@tung-engineering/agent-platform-web-sdk 0.0.89 → 0.0.90
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/README.md +8 -2
- package/dist/web-sdk.cjs +389 -313
- package/dist/web-sdk.cjs.map +1 -1
- package/dist/web-sdk.min.js +375 -299
- package/dist/web-sdk.min.js.map +1 -1
- package/dist/web-sdk.mjs +16704 -8402
- package/dist/web-sdk.mjs.map +1 -1
- package/package.json +2 -1
package/dist/web-sdk.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var FS=Object.defineProperty,kS=Object.defineProperties;var vS=Object.getOwnPropertyDescriptors;var Zf=Object.getOwnPropertySymbols;var _S=Object.prototype.hasOwnProperty,xS=Object.prototype.propertyIsEnumerable;var ye=Math.pow,Al=(uA,NA,WA)=>NA in uA?FS(uA,NA,{enumerable:!0,configurable:!0,writable:!0,value:WA}):uA[NA]=WA,k=(uA,NA)=>{for(var WA in NA||(NA={}))_S.call(NA,WA)&&Al(uA,WA,NA[WA]);if(Zf)for(var WA of Zf(NA))xS.call(NA,WA)&&Al(uA,WA,NA[WA]);return uA},$=(uA,NA)=>kS(uA,vS(NA));var hA=(uA,NA,WA)=>Al(uA,typeof NA!="symbol"?NA+"":NA,WA);var T=(uA,NA,WA)=>new Promise((rl,Ti)=>{var sl=xt=>{try{_s(WA.next(xt))}catch(xs){Ti(xs)}},ol=xt=>{try{_s(WA.throw(xt))}catch(xs){Ti(xs)}},_s=xt=>xt.done?rl(xt.value):Promise.resolve(xt.value).then(sl,ol);_s((WA=WA.apply(uA,NA)).next())});var AgentPlatformWebSdk=(function(uA){"use strict";var xf,We,Le,yn,dr,Un,fi;const Jf=[`
|
|
2
2
|
:where([data-ap-sdk][popover]) {
|
|
3
3
|
position: fixed;
|
|
4
4
|
margin: 0;
|
|
@@ -540,6 +540,60 @@ var Y_=Object.defineProperty,V_=Object.defineProperties;var X_=Object.getOwnProp
|
|
|
540
540
|
white-space: nowrap;
|
|
541
541
|
}
|
|
542
542
|
|
|
543
|
+
/* ── Screenshot preview (see screenshot.ts / panel.ts's captureScreenshotFor) ──────── */
|
|
544
|
+
|
|
545
|
+
.ap-sdk-panel__screenshot {
|
|
546
|
+
padding: 10px 16px;
|
|
547
|
+
border-bottom: 1px solid #f3f4f6;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
.ap-sdk-screenshot__status {
|
|
551
|
+
font-size: 12px;
|
|
552
|
+
color: oklch(47% 0.13 40);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.ap-sdk-screenshot__status--muted {
|
|
556
|
+
color: #9ca3af;
|
|
557
|
+
font-style: italic;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
.ap-sdk-screenshot__error {
|
|
561
|
+
margin-top: 4px;
|
|
562
|
+
font-size: 11px;
|
|
563
|
+
font-family: ui-monospace, monospace;
|
|
564
|
+
color: #b91c1c;
|
|
565
|
+
word-break: break-word;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.ap-sdk-screenshot__toggle {
|
|
569
|
+
display: flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
gap: 6px;
|
|
572
|
+
font-size: 12px;
|
|
573
|
+
color: oklch(47% 0.13 40);
|
|
574
|
+
cursor: pointer;
|
|
575
|
+
margin-bottom: 8px;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.ap-sdk-screenshot__toggle input {
|
|
579
|
+
cursor: pointer;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.ap-sdk-screenshot__thumb {
|
|
583
|
+
display: block;
|
|
584
|
+
max-width: 100%;
|
|
585
|
+
max-height: 140px;
|
|
586
|
+
border-radius: 7px;
|
|
587
|
+
border: 1px solid #e5e7eb;
|
|
588
|
+
object-fit: contain;
|
|
589
|
+
background: #f9fafb;
|
|
590
|
+
transition: opacity 0.15s;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
.ap-sdk-screenshot--excluded .ap-sdk-screenshot__thumb {
|
|
594
|
+
opacity: 0.4;
|
|
595
|
+
}
|
|
596
|
+
|
|
543
597
|
.ap-sdk-credentials-section {
|
|
544
598
|
padding: 0 16px 12px;
|
|
545
599
|
border-bottom: 1px solid #f3f4f6;
|
|
@@ -1528,192 +1582,47 @@ button.ap-sdk-list-item__link {
|
|
|
1528
1582
|
gap: 8px;
|
|
1529
1583
|
}
|
|
1530
1584
|
`].join(`
|
|
1531
|
-
`);let
|
|
1532
|
-
`)}return
|
|
1533
|
-
`)}const Yn=new Set;let Vn=null,ko=!1,Ts=!1;function Lu(e){if(e.getAttribute("aria-modal")==="false")return!1;const t=getComputedStyle(e);return t.display!=="none"&&t.visibility!=="hidden"}function Iu(){const e=document.querySelectorAll("dialog[open]");for(let n=0;n<e.length;n++)try{if(e[n].matches(":modal"))return!0}catch(r){}const t=document.querySelectorAll('[role="dialog"], [role="alertdialog"]');for(let n=0;n<t.length;n++){const r=t[n];if(!(Yn.has(r)||r.hasAttribute("data-ap-sdk"))&&r.isConnected&&Lu(r))return!0}return!1}function Qi(){const e=Iu(),t=e&&!Ts;Ts=e;for(const n of Yn){n.hasAttribute("inert")&&n.removeAttribute("inert"),n.getAttribute("aria-hidden")==="true"&&n.removeAttribute("aria-hidden");const r=n.contains(document.activeElement);if(n.matches(":popover-open")){if(t&&!r){try{n.hidePopover()}catch(o){}try{n.showPopover()}catch(o){}}}else try{n.showPopover()}catch(o){}}}function ea(e){if(!(e instanceof Node))return!1;for(const t of Yn)if(t===e||t.contains(e))return!0;return!1}function Xn(e){(ea(e.target)||"relatedTarget"in e&&ea(e.relatedTarget))&&e.stopPropagation()}function $u(){ko||(window.addEventListener("focusin",Xn,!0),window.addEventListener("focusout",Xn,!0),window.addEventListener("pointerdown",Xn,!0),ko=!0),!Vn&&(Vn=new MutationObserver(e=>{e.some(n=>n.type==="childList"||n.attributeName==="open"&&n.target.tagName==="DIALOG"||n.attributeName==="inert"||n.attributeName==="aria-hidden"||n.attributeName==="role")&&Qi()}),Vn.observe(document.documentElement,{attributes:!0,attributeFilter:["open","inert","aria-hidden","role"],childList:!0,subtree:!0}))}function Mt(e){"showPopover"in e&&(e.setAttribute("popover","manual"),Yn.add(e),$u(),Qi())}function Ut(e){if(Yn.delete(e),Yn.size===0&&(Vn&&(Vn.disconnect(),Vn=null),ko&&(window.removeEventListener("focusin",Xn,!0),window.removeEventListener("focusout",Xn,!0),window.removeEventListener("pointerdown",Xn,!0),ko=!1),Ts=!1),"hidePopover"in e)try{e.hidePopover()}catch(t){}}function Es(e="ap-sdk-highlight"){const t=document.createElement("div");return t.className=e,t.setAttribute("data-ap-sdk","1"),t.style.display="none",document.body.appendChild(t),Mt(t),{el:t,update:i=>{const a=i.getBoundingClientRect();t.style.top=`${a.top}px`,t.style.left=`${a.left}px`,t.style.width=`${a.width}px`,t.style.height=`${a.height}px`,t.style.display="block"},hide:()=>{t.style.display="none"},destroy:()=>{Ut(t),t.remove()}}}const ta=/^cc-|current-password|new-password/i,zu=/token|secret|password|apikey|auth/i,As="[redacted]",Cs="[data-ap-sdk-exclude]";let Ps=null;function Ou(e){Ps=(e==null?void 0:e.trim())||null}function Nu(){return Ps?`${Cs}, ${Ps}`:Cs}function na(e){let t;try{if(t=Nu(),e.matches(t)){e.textContent="";return}for(const n of Array.from(e.querySelectorAll(t)))n.remove()}catch(n){for(const r of Array.from(e.querySelectorAll(Cs)))r.remove()}}function Du(e){if(e instanceof HTMLInputElement&&e.type==="password")return!0;const t=e.getAttribute("autocomplete");return!!t&&ta.test(t)}function ra(e){const t=[e,...Array.from(e.querySelectorAll("*"))];for(const n of t){n instanceof HTMLInputElement&&n.type==="password"&&n.setAttribute("value",As);const r=n.getAttribute("autocomplete");r&&ta.test(r)&&n.setAttribute("value",As);for(const o of Array.from(n.attributes))zu.test(o.name)&&n.setAttribute(o.name,As)}}const Mu="🎯 Click any element to capture";let fn=null,Oe=null,qe=null;function Cr(e){return e instanceof Element?e.closest("[data-ap-sdk]")!==null||e.closest(".ap-sdk-panel")!==null||e.closest(".ap-sdk-highlight")!==null||e.closest(".ap-sdk-picker-cursor")!==null:!1}function Uu(){var e,t;return((t=(e=window.matchMedia)==null?void 0:e.call(window,"(pointer: coarse)").matches)!=null?t:!1)||"ontouchstart"in window}function oa(e){fn==null||fn.update(e)}function sa(e){const t=Ki(),n=Cu(e),r=Pu(e);let o=e,i;try{const a=e.cloneNode(!0);ra(a),na(a),o=a,i=a.outerHTML.slice(0,4e3)}catch(a){}return v(v({pageUrl:window.location.href,pageTitle:document.title,elementText:go(o),cssSelector:fo(e),innerTree:wu(o),outerTree:Au(e),elementOuterHtml:i,ancestry:n},r),t)}function Rs(e,t){qe&&qe();const n=Uu();fn=Es(),Oe=document.createElement("div"),Oe.className="ap-sdk-picker-cursor",Oe.setAttribute("data-ap-sdk","1"),Oe.textContent=n?"Tap any element to preview":Mu,document.body.appendChild(Oe),Mt(Oe);let r=null,o=null;const i=h=>{qe==null||qe(),e(sa(h),h)},a=h=>{if(o=h,oa(h),!Oe)return;Oe.classList.add("ap-sdk-picker-cursor--confirm"),Oe.innerHTML="";const g=document.createElement("span");g.className="ap-sdk-picker-cursor__label",g.textContent=`<${h.tagName.toLowerCase()}>`;const m=document.createElement("button");m.type="button",m.className="ap-sdk-picker-cursor__btn ap-sdk-picker-cursor__btn--cancel",m.textContent="✕ Cancel",m.setAttribute("data-ap-sdk","1"),m.setAttribute("aria-label","Cancel picking"),m.addEventListener("click",S=>{S.preventDefault(),S.stopPropagation(),qe==null||qe(),t()});const k=document.createElement("button");k.type="button",k.className="ap-sdk-picker-cursor__btn",k.textContent="⬆ Parent",k.setAttribute("data-ap-sdk","1"),k.addEventListener("click",S=>{S.preventDefault(),S.stopPropagation(),o!=null&&o.parentElement&&a(o.parentElement)});const y=document.createElement("button");y.type="button",y.className="ap-sdk-picker-cursor__btn ap-sdk-picker-cursor__btn--primary",y.textContent="✓ Select",y.setAttribute("data-ap-sdk","1"),y.addEventListener("click",S=>{S.preventDefault(),S.stopPropagation(),o&&i(o)}),Oe.appendChild(g),Oe.appendChild(m),Oe.appendChild(k),Oe.appendChild(y)},d=h=>{Cr(h.target)||(r=h.target,oa(r))},l=h=>{var m;if(Cr(h.target))return;h.preventDefault(),h.stopImmediatePropagation();const g=(m=h.target)!=null?m:r;if(g){if(n){a(g);return}i(g)}},p=h=>{h.key==="Escape"&&(qe==null||qe(),t())};n||document.addEventListener("mouseover",d,{capture:!0}),document.addEventListener("click",l,{capture:!0}),document.addEventListener("keydown",p,{capture:!0}),qe=()=>{n||document.removeEventListener("mouseover",d,{capture:!0}),document.removeEventListener("click",l,{capture:!0}),document.removeEventListener("keydown",p,{capture:!0}),Oe&&Ut(Oe),Oe==null||Oe.remove(),fn==null||fn.destroy(),fn=null,Oe=null,o=null,qe=null}}function Ls(){qe==null||qe()}function Kn(){return qe!==null}const _o={TASK_STATUS_UPDATED:"task:status:updated",TASK_INTERACTION_CREATED:"task:interaction:created",TASK_INTERACTION_ANSWERED:"task:interaction:answered",TASK_BROWSER_COMMAND_CREATED:"task:browser-command:created"};function w(e,t,n){var d;function r(l,p){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:p,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,p);const h=a.prototype,g=Object.keys(h);for(let m=0;m<g.length;m++){const k=g[m];k in l||(l[k]=h[k].bind(l))}}const o=(d=n==null?void 0:n.Parent)!=null?d:Object;class i extends o{}Object.defineProperty(i,"name",{value:e});function a(l){var g;var p;const h=n!=null&&n.Parent?new i:this;r(h,l),(g=(p=h._zod).deferred)!=null||(p.deferred=[]);for(const m of h._zod.deferred)m();return h}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>{var p,h;return n!=null&&n.Parent&&l instanceof n.Parent?!0:(h=(p=l==null?void 0:l._zod)==null?void 0:p.traits)==null?void 0:h.has(e)}}),Object.defineProperty(a,"name",{value:e}),a}class Qn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ia extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const aa={};function gn(e){return aa}function ca(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,o])=>t.indexOf(+r)===-1).map(([r,o])=>o)}function Is(e,t){return typeof t=="bigint"?t.toString():t}function vo(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function $s(e){return e==null}function zs(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function ju(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let o=(r.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(o=Number.parseInt(l[1]))}const i=n>o?n:o,a=Number.parseInt(e.toFixed(i).replace(".","")),d=Number.parseInt(t.toFixed(i).replace(".",""));return a%d/ku(10,i)}const la=Symbol("evaluating");function ne(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==la)return r===void 0&&(r=la,r=n()),r},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function Ln(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function mn(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ua(e){return JSON.stringify(e)}function Zu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const da="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Pr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const qu=vo(()=>{var e;if(typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch(t){return!1}});function er(e){if(Pr(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(Pr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function pa(e){return er(e)?v({},e):Array.isArray(e)?[...e]:e}const Hu=new Set(["string","number","symbol"]);function tr(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function bn(e,t,n){const r=new e._zod.constr(t!=null?t:e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function U(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?M(v({},t),{error:()=>t.error}):t}function Fu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const Bu={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Gu(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=mn(e._zod.def,{get shape(){const a={};for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&(a[d]=n.shape[d])}return Ln(this,"shape",a),a},checks:[]});return bn(e,i)}function Wu(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=mn(e._zod.def,{get shape(){const a=v({},e._zod.def.shape);for(const d in t){if(!(d in n.shape))throw new Error(`Unrecognized key: "${d}"`);t[d]&&delete a[d]}return Ln(this,"shape",a),a},checks:[]});return bn(e,i)}function Ju(e,t){if(!er(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=mn(e._zod.def,{get shape(){const i=v(v({},e._zod.def.shape),t);return Ln(this,"shape",i),i}});return bn(e,o)}function Yu(e,t){if(!er(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=mn(e._zod.def,{get shape(){const r=v(v({},e._zod.def.shape),t);return Ln(this,"shape",r),r}});return bn(e,n)}function Vu(e,t){const n=mn(e._zod.def,{get shape(){const r=v(v({},e._zod.def.shape),t._zod.def.shape);return Ln(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return bn(e,n)}function Xu(e,t,n){const o=t._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=mn(t._zod.def,{get shape(){const d=t._zod.def.shape,l=v({},d);if(n)for(const p in n){if(!(p in d))throw new Error(`Unrecognized key: "${p}"`);n[p]&&(l[p]=e?new e({type:"optional",innerType:d[p]}):d[p])}else for(const p in d)l[p]=e?new e({type:"optional",innerType:d[p]}):d[p];return Ln(this,"shape",l),l},checks:[]});return bn(t,a)}function Ku(e,t,n){const r=mn(t._zod.def,{get shape(){const o=t._zod.def.shape,i=v({},o);if(n)for(const a in n){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(i[a]=new e({type:"nonoptional",innerType:o[a]}))}else for(const a in o)i[a]=new e({type:"nonoptional",innerType:o[a]});return Ln(this,"shape",i),i}});return bn(t,r)}function nr(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function rr(e,t){return t.map(n=>{var o;var r;return(o=(r=n).path)!=null||(r.path=[]),n.path.unshift(e),n})}function yo(e){return typeof e=="string"?e:e==null?void 0:e.message}function kn(e,t,n){var o,i,a,d,l,p,h,g,m,k,y;const r=M(v({},e),{path:(o=e.path)!=null?o:[]});if(!e.message){const S=(y=(k=(g=(p=yo((d=(a=(i=e.inst)==null?void 0:i._zod.def)==null?void 0:a.error)==null?void 0:d.call(a,e)))!=null?p:yo((l=t==null?void 0:t.error)==null?void 0:l.call(t,e)))!=null?g:yo((h=n.customError)==null?void 0:h.call(n,e)))!=null?k:yo((m=n.localeError)==null?void 0:m.call(n,e)))!=null?y:"Invalid input";r.message=S}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function Os(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Rr(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:v({},t)}const ha=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Is,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},fa=w("$ZodError",ha),ga=w("$ZodError",ha,{Parent:Error});function Qu(e,t=n=>n.message){const n={},r=[];for(const o of e.issues)o.path.length>0?(n[o.path[0]]=n[o.path[0]]||[],n[o.path[0]].push(t(o))):r.push(t(o));return{formErrors:r,fieldErrors:n}}function ed(e,t=n=>n.message){const n={_errors:[]},r=o=>{for(const i of o.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(a=>r({issues:a}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let a=n,d=0;for(;d<i.path.length;){const l=i.path[d];d===i.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(t(i))):a[l]=a[l]||{_errors:[]},a=a[l],d++}}};return r(e),n}const Ns=e=>(t,n,r,o)=>{var d;const i=r?Object.assign(r,{async:!1}):{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Qn;if(a.issues.length){const l=new((d=o==null?void 0:o.Err)!=null?d:e)(a.issues.map(p=>kn(p,i,gn())));throw da(l,o==null?void 0:o.callee),l}return a.value},Ds=e=>(t,n,r,o)=>z(null,null,function*(){var d;const i=r?Object.assign(r,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise&&(a=yield a),a.issues.length){const l=new((d=o==null?void 0:o.Err)!=null?d:e)(a.issues.map(p=>kn(p,i,gn())));throw da(l,o==null?void 0:o.callee),l}return a.value}),wo=e=>(t,n,r)=>{const o=r?M(v({},r),{async:!1}):{async:!1},i=t._zod.run({value:n,issues:[]},o);if(i instanceof Promise)throw new Qn;return i.issues.length?{success:!1,error:new(e!=null?e:fa)(i.issues.map(a=>kn(a,o,gn())))}:{success:!0,data:i.value}},td=wo(ga),xo=e=>(t,n,r)=>z(null,null,function*(){const o=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},o);return i instanceof Promise&&(i=yield i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>kn(a,o,gn())))}:{success:!0,data:i.value}}),nd=xo(ga),rd=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ns(e)(t,n,o)},od=e=>(t,n,r)=>Ns(e)(t,n,r),sd=e=>(t,n,r)=>z(null,null,function*(){const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ds(e)(t,n,o)}),id=e=>(t,n,r)=>z(null,null,function*(){return Ds(e)(t,n,r)}),ad=e=>(t,n,r)=>{const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wo(e)(t,n,o)},cd=e=>(t,n,r)=>wo(e)(t,n,r),ld=e=>(t,n,r)=>z(null,null,function*(){const o=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return xo(e)(t,n,o)}),ud=e=>(t,n,r)=>z(null,null,function*(){return xo(e)(t,n,r)}),dd=/^[cC][^\s-]{8,}$/,pd=/^[0-9a-z]+$/,hd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,fd=/^[0-9a-vA-V]{20}$/,gd=/^[A-Za-z0-9]{27}$/,md=/^[a-zA-Z0-9_-]{21}$/,bd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,kd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ma=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_d=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,vd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yd(){return new RegExp(vd,"u")}const wd=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,xd=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Sd=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Td=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ed=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ba=/^[A-Za-z0-9_-]*$/,Ad=/^\+[1-9]\d{6,14}$/,ka="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Cd=new RegExp(`^${ka}$`);function _a(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Pd(e){return new RegExp(`^${_a(e)}$`)}function Rd(e){const t=_a({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ka}T(?:${r})$`)}const Ld=e=>{var n,r;const t=e?`[\\s\\S]{${(n=e==null?void 0:e.minimum)!=null?n:0},${(r=e==null?void 0:e.maximum)!=null?r:""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Id=/^-?\d+$/,va=/^-?\d+(?:\.\d+)?$/,$d=/^(?:true|false)$/i,zd=/^[^A-Z]*$/,Od=/^[^a-z]*$/,st=w("$ZodCheck",(e,t)=>{var r,o;var n;(r=e._zod)!=null||(e._zod={}),e._zod.def=t,(o=(n=e._zod).onattach)!=null||(n.onattach=[])}),ya={number:"number",bigint:"bigint",object:"date"},wa=w("$ZodCheckLessThan",(e,t)=>{st.init(e,t);const n=ya[typeof t.value];e._zod.onattach.push(r=>{var a;const o=r._zod.bag,i=(a=t.inclusive?o.maximum:o.exclusiveMaximum)!=null?a:Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xa=w("$ZodCheckGreaterThan",(e,t)=>{st.init(e,t);const n=ya[typeof t.value];e._zod.onattach.push(r=>{var a;const o=r._zod.bag,i=(a=t.inclusive?o.minimum:o.exclusiveMinimum)!=null?a:Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Nd=w("$ZodCheckMultipleOf",(e,t)=>{st.init(e,t),e._zod.onattach.push(n=>{var o;var r;(o=(r=n._zod.bag).multipleOf)!=null||(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):ju(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Dd=w("$ZodCheckNumberFormat",(e,t)=>{var a;st.init(e,t),t.format=t.format||"float64";const n=(a=t.format)==null?void 0:a.includes("int"),r=n?"int":"number",[o,i]=Bu[t.format];e._zod.onattach.push(d=>{const l=d._zod.bag;l.format=t.format,l.minimum=o,l.maximum=i,n&&(l.pattern=Id)}),e._zod.check=d=>{const l=d.value;if(n){if(!Number.isInteger(l)){d.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?d.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):d.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<o&&d.issues.push({origin:"number",input:l,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),l>i&&d.issues.push({origin:"number",input:l,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Md=w("$ZodCheckMaxLength",(e,t)=>{var r;var n;st.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=o=>{const i=o.value;return!$s(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{var a;const i=(a=o._zod.bag.maximum)!=null?a:Number.POSITIVE_INFINITY;t.maximum<i&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const i=o.value;if(i.length<=t.maximum)return;const d=Os(i);o.issues.push({origin:d,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),Ud=w("$ZodCheckMinLength",(e,t)=>{var r;var n;st.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=o=>{const i=o.value;return!$s(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{var a;const i=(a=o._zod.bag.minimum)!=null?a:Number.NEGATIVE_INFINITY;t.minimum>i&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const i=o.value;if(i.length>=t.minimum)return;const d=Os(i);o.issues.push({origin:d,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),jd=w("$ZodCheckLengthEquals",(e,t)=>{var r;var n;st.init(e,t),(r=(n=e._zod.def).when)!=null||(n.when=o=>{const i=o.value;return!$s(i)&&i.length!==void 0}),e._zod.onattach.push(o=>{const i=o._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=o=>{const i=o.value,a=i.length;if(a===t.length)return;const d=Os(i),l=a>t.length;o.issues.push(M(v({origin:d},l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length}),{inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort}))}}),So=w("$ZodCheckStringFormat",(e,t)=>{var o,i;var n,r;st.init(e,t),e._zod.onattach.push(a=>{var l;const d=a._zod.bag;d.format=t.format,t.pattern&&((l=d.patterns)!=null||(d.patterns=new Set),d.patterns.add(t.pattern))}),t.pattern?(o=(n=e._zod).check)!=null||(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push(M(v({origin:"string",code:"invalid_format",format:t.format,input:a.value},t.pattern?{pattern:t.pattern.toString()}:{}),{inst:e,continue:!t.abort}))}):(i=(r=e._zod).check)!=null||(r.check=()=>{})}),Zd=w("$ZodCheckRegex",(e,t)=>{So.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),qd=w("$ZodCheckLowerCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=zd),So.init(e,t)}),Hd=w("$ZodCheckUpperCase",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Od),So.init(e,t)}),Fd=w("$ZodCheckIncludes",(e,t)=>{st.init(e,t);const n=tr(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(o=>{var a;const i=o._zod.bag;(a=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),Bd=w("$ZodCheckStartsWith",(e,t)=>{var r;st.init(e,t);const n=new RegExp(`^${tr(t.prefix)}.*`);(r=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(o=>{var a;const i=o._zod.bag;(a=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),Gd=w("$ZodCheckEndsWith",(e,t)=>{var r;st.init(e,t);const n=new RegExp(`.*${tr(t.suffix)}$`);(r=t.pattern)!=null||(t.pattern=n),e._zod.onattach.push(o=>{var a;const i=o._zod.bag;(a=i.patterns)!=null||(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}}),Wd=w("$ZodCheckOverwrite",(e,t)=>{st.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Jd{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
1534
|
-
`).filter(
|
|
1535
|
-
`))}}const Yd={major:4,minor:3,patch:5},me=w("$ZodType",(e,t)=>{var o,i,a;var n;e!=null||(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yd;const r=[...(o=e._zod.def.checks)!=null?o:[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const d of r)for(const l of d._zod.onattach)l(e);if(r.length===0)(i=(n=e._zod).deferred)!=null||(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const d=(p,h,g)=>{let m=nr(p),k;for(const y of h){if(y._zod.def.when){if(!y._zod.def.when(p))continue}else if(m)continue;const S=p.issues.length,$=y._zod.check(p);if($ instanceof Promise&&(g==null?void 0:g.async)===!1)throw new Qn;if(k||$ instanceof Promise)k=(k!=null?k:Promise.resolve()).then(()=>z(null,null,function*(){yield $,p.issues.length!==S&&(m||(m=nr(p,S)))}));else{if(p.issues.length===S)continue;m||(m=nr(p,S))}}return k?k.then(()=>p):p},l=(p,h,g)=>{if(nr(p))return p.aborted=!0,p;const m=d(h,r,g);if(m instanceof Promise){if(g.async===!1)throw new Qn;return m.then(k=>e._zod.parse(k,g))}return e._zod.parse(m,g)};e._zod.run=(p,h)=>{if(h.skipChecks)return e._zod.parse(p,h);if(h.direction==="backward"){const m=e._zod.parse({value:p.value,issues:[]},M(v({},h),{skipChecks:!0}));return m instanceof Promise?m.then(k=>l(k,p,h)):l(m,p,h)}const g=e._zod.parse(p,h);if(g instanceof Promise){if(h.async===!1)throw new Qn;return g.then(m=>d(m,r,h))}return d(g,r,h)}}ne(e,"~standard",()=>({validate:d=>{var l;try{const p=td(e,d);return p.success?{value:p.data}:{issues:(l=p.error)==null?void 0:l.issues}}catch(p){return nd(e,d).then(h=>{var g;return h.success?{value:h.data}:{issues:(g=h.error)==null?void 0:g.issues}})}},vendor:"zod",version:1}))}),Ms=w("$ZodString",(e,t)=>{var n,r,o;me.init(e,t),e._zod.pattern=(o=[...(r=(n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)!=null?r:[]].pop())!=null?o:Ld(e._zod.bag),e._zod.parse=(i,a)=>{if(t.coerce)try{i.value=String(i.value)}catch(d){}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),be=w("$ZodStringFormat",(e,t)=>{So.init(e,t),Ms.init(e,t)}),Vd=w("$ZodGUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=kd),be.init(e,t)}),Xd=w("$ZodUUID",(e,t)=>{var n,r;if(t.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);(n=t.pattern)!=null||(t.pattern=ma(i))}else(r=t.pattern)!=null||(t.pattern=ma());be.init(e,t)}),Kd=w("$ZodEmail",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=_d),be.init(e,t)}),Qd=w("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),o=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=o.href:n.value=r;return}catch(r){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),ep=w("$ZodEmoji",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=yd()),be.init(e,t)}),tp=w("$ZodNanoID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=md),be.init(e,t)}),np=w("$ZodCUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=dd),be.init(e,t)}),rp=w("$ZodCUID2",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=pd),be.init(e,t)}),op=w("$ZodULID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=hd),be.init(e,t)}),sp=w("$ZodXID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=fd),be.init(e,t)}),ip=w("$ZodKSUID",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=gd),be.init(e,t)}),ap=w("$ZodISODateTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Rd(t)),be.init(e,t)}),cp=w("$ZodISODate",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Cd),be.init(e,t)}),lp=w("$ZodISOTime",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Pd(t)),be.init(e,t)}),up=w("$ZodISODuration",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=bd),be.init(e,t)}),dp=w("$ZodIPv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=wd),be.init(e,t),e._zod.bag.format="ipv4"}),pp=w("$ZodIPv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=xd),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch(o){r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),hp=w("$ZodCIDRv4",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Sd),be.init(e,t)}),fp=w("$ZodCIDRv6",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Td),be.init(e,t),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[i,a]=o;if(!a)throw new Error;const d=Number(a);if(`${d}`!==a)throw new Error;if(d<0||d>128)throw new Error;new URL(`http://[${i}]`)}catch(i){r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function Sa(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch(t){return!1}}const gp=w("$ZodBase64",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Ed),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{Sa(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function mp(e){if(!ba.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Sa(n)}const bp=w("$ZodBase64URL",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=ba),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{mp(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),kp=w("$ZodE164",(e,t)=>{var n;(n=t.pattern)!=null||(t.pattern=Ad),be.init(e,t)});function _p(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||t&&(!("alg"in o)||o.alg!==t))}catch(n){return!1}}const vp=w("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=n=>{_p(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Ta=w("$ZodNumber",(e,t)=>{var n;me.init(e,t),e._zod.pattern=(n=e._zod.bag.pattern)!=null?n:va,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch(d){}const i=r.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return r;const a=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return r.issues.push(v({expected:"number",code:"invalid_type",input:i,inst:e},a?{received:a}:{})),r}}),yp=w("$ZodNumberFormat",(e,t)=>{Dd.init(e,t),Ta.init(e,t)}),wp=w("$ZodBoolean",(e,t)=>{me.init(e,t),e._zod.pattern=$d,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch(i){}const o=n.value;return typeof o=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),n}}),xp=w("$ZodAny",(e,t)=>{me.init(e,t),e._zod.parse=n=>n}),Sp=w("$ZodUnknown",(e,t)=>{me.init(e,t),e._zod.parse=n=>n}),Tp=w("$ZodNever",(e,t)=>{me.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function Ea(e,t,n){e.issues.length&&t.issues.push(...rr(n,e.issues)),t.value[n]=e.value}const Ep=w("$ZodArray",(e,t)=>{me.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!Array.isArray(o))return n.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),n;n.value=Array(o.length);const i=[];for(let a=0;a<o.length;a++){const d=o[a],l=t.element._zod.run({value:d,issues:[]},r);l instanceof Promise?i.push(l.then(p=>Ea(p,n,a))):Ea(l,n,a)}return i.length?Promise.all(i).then(()=>n):n}});function To(e,t,n,r,o){if(e.issues.length){if(o&&!(n in r))return;t.issues.push(...rr(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function Aa(e){var r,o,i,a;const t=Object.keys(e.shape);for(const d of t)if(!((a=(i=(o=(r=e.shape)==null?void 0:r[d])==null?void 0:o._zod)==null?void 0:i.traits)!=null&&a.has("$ZodType")))throw new Error(`Invalid element at key "${d}": expected a Zod schema`);const n=Fu(e.shape);return M(v({},e),{keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)})}function Ca(e,t,n,r,o,i){const a=[],d=o.keySet,l=o.catchall._zod,p=l.def.type,h=l.optout==="optional";for(const g in t){if(d.has(g))continue;if(p==="never"){a.push(g);continue}const m=l.run({value:t[g],issues:[]},r);m instanceof Promise?e.push(m.then(k=>To(k,n,g,t,h))):To(m,n,g,t,h)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const Ap=w("$ZodObject",(e,t)=>{me.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const d=t.shape;Object.defineProperty(t,"shape",{get:()=>{const l=v({},d);return Object.defineProperty(t,"shape",{value:l}),l}})}const r=vo(()=>Aa(t));ne(e._zod,"propValues",()=>{var p;const d=t.shape,l={};for(const h in d){const g=d[h]._zod;if(g.values){(p=l[h])!=null||(l[h]=new Set);for(const m of g.values)l[h].add(m)}}return l});const o=Pr,i=t.catchall;let a;e._zod.parse=(d,l)=>{a!=null||(a=r.value);const p=d.value;if(!o(p))return d.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),d;d.value={};const h=[],g=a.shape;for(const m of a.keys){const k=g[m],y=k._zod.optout==="optional",S=k._zod.run({value:p[m],issues:[]},l);S instanceof Promise?h.push(S.then($=>To($,d,m,p,y))):To(S,d,m,p,y)}return i?Ca(h,p,d,l,r.value,e):h.length?Promise.all(h).then(()=>d):d}}),Cp=w("$ZodObjectJIT",(e,t)=>{Ap.init(e,t);const n=e._zod.parse,r=vo(()=>Aa(t)),o=m=>{var A;const k=new Jd(["shape","payload","ctx"]),y=r.value,S=T=>{const L=ua(T);return`shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`};k.write("const input = payload.value;");const $=Object.create(null);let E=0;for(const T of y.keys)$[T]=`key_${E++}`;k.write("const newResult = {};");for(const T of y.keys){const L=$[T],q=ua(T),H=m[T],se=((A=H==null?void 0:H._zod)==null?void 0:A.optout)==="optional";k.write(`const ${L} = ${S(T)};`),se?k.write(`
|
|
1536
|
-
if (${
|
|
1537
|
-
if (${
|
|
1538
|
-
payload.issues = payload.issues.concat(${
|
|
1585
|
+
`);let il=!1;function Cr(){if(il)return;const A=document.createElement("style");A.setAttribute("data-ap-sdk","1"),A.textContent=Jf,document.head.appendChild(A),il=!0}function Ss(A){if(A===document.body)return"body";const e=[];let t=A;for(;t&&t!==document.body;){if(t.id){e.unshift(`#${CSS.escape(t.id)}`);break}let n=t.tagName.toLowerCase();const r=t.parentElement;if(r){const s=Array.from(r.children).filter(o=>o.tagName===t.tagName);if(s.length>1){const o=s.indexOf(t)+1;n+=`:nth-of-type(${o})`}}e.unshift(n),t=t.parentElement}return e.join(" > ")||A.tagName.toLowerCase()}function Is(A,e=200){var n;const t=((n=A.textContent)!=null?n:"").replace(/\s+/g," ").trim();return t.length>e?t.slice(0,e)+"…":t}const jf=["role","type","name","href","src","alt","title","for","placeholder","data-testid"];function Ts(A){const e=A.tagName.toLowerCase(),t=A.id?`#${A.id}`:"",n=A.classList.length?"."+Array.from(A.classList).join("."):"",r=[],s=new Set,o=a=>{if(s.has(a)||r.length>=8)return;const i=A.getAttribute(a);if(!i)return;s.add(a);const l=i.length>80?i.slice(0,80)+"…":i;r.push(`[${a}="${l}"]`)};for(const a of Array.from(A.attributes))a.name.startsWith("aria-")&&o(a.name);for(const a of jf)o(a);return`${e}${t}${n}${r.join("")}`}function Yf(A,e=80){const t=Array.from(A.childNodes).filter(n=>n.nodeType===Node.TEXT_NODE).map(n=>{var r;return((r=n.textContent)!=null?r:"").trim()}).filter(Boolean).join(" ");return t.length>e?t.slice(0,e)+"…":t}function qf(A,e=5,t=10){function n(r,s){const o=Ts(r),a=" ".repeat(s),i=Array.from(r.children).slice(0,t);if(s>=e||i.length===0){const l=Yf(r);return l?`${a}${o} "${l}"`:`${a}${o}`}return[`${a}${o}`,...i.map(l=>n(l,s+1))].join(`
|
|
1586
|
+
`)}return n(A,0)}const Ag='section, article, aside, nav, main, header, footer, form, fieldset, dialog, [role="region"], [role="navigation"], [role="main"], [role="complementary"], [role="banner"], [role="contentinfo"], [role="form"], [role="search"], [role="dialog"]',eg={fieldset:"legend",table:"caption",figure:"figcaption",details:"summary"};function Hs(A,e){const t=A.replace(/\s+/g," ").trim();return t.length>e?t.slice(0,e)+"…":t}function tg(A){var t;const e=A.querySelectorAll('h1, h2, h3, h4, h5, h6, [role="heading"]');for(const n of Array.from(e)){let r=n.parentElement;for(;r&&r!==A&&!r.matches(Ag);)r=r.parentElement;if(r===A){const s=((t=n.textContent)!=null?t:"").trim();if(s)return s}}return""}function ng(A,e=80){var o,a,i;const t=eg[A.tagName.toLowerCase()];if(t){const l=(a=(o=A.querySelector(t))==null?void 0:o.textContent)==null?void 0:a.trim();if(l)return Hs(l,e)}const n=tg(A);if(n)return Hs(n,e);const r=(i=A.getAttribute("aria-label"))==null?void 0:i.trim();if(r)return Hs(r,e);const s=A.getAttribute("aria-labelledby");if(s){const l=s.split(/\s+/).map(u=>{var h,f,g;return(g=(f=(h=document.getElementById(u))==null?void 0:h.textContent)==null?void 0:f.trim())!=null?g:""}).filter(Boolean).join(" ");if(l)return Hs(l,e)}return""}function rg(A,e=6){const t=[],n=new Set;let r=A;for(;r&&r!==document.body&&t.length<e;){const s=r===A?"":ng(r),o=s&&!n.has(s)?`${Ts(r)} ["${s}"]`:Ts(r);s&&n.add(s),t.unshift(o),r=r.parentElement}return t.join(" > ")||Ts(A)}function al(A,e){return A.length>e?A.slice(0,e)+"… (truncated)":A}function br(A){var n;const e=document.querySelector(A);return((n=e==null?void 0:e.content)==null?void 0:n.trim())||void 0}function cl(){const A=e=>{try{return e()}catch(t){return}};return{description:A(()=>br('meta[name="description"]')),canonicalUrl:A(()=>{var e;return((e=document.querySelector('link[rel="canonical"]'))==null?void 0:e.href)||void 0}),lang:A(()=>document.documentElement.lang||void 0),ogTitle:A(()=>br('meta[property="og:title"]')),ogDescription:A(()=>br('meta[property="og:description"]')),ogType:A(()=>br('meta[property="og:type"]')),ogSiteName:A(()=>br('meta[property="og:site_name"]')),viewportWidth:A(()=>window.innerWidth),viewportHeight:A(()=>window.innerHeight),scrollX:A(()=>Math.round(window.scrollX)),scrollY:A(()=>Math.round(window.scrollY)),selectionText:A(()=>{var t;const e=(t=window.getSelection())==null?void 0:t.toString().trim();return e?al(e,1e3):void 0}),capturedAt:new Date().toISOString()}}function sg(A){const e=[];let t=A;for(;t&&e.length<6;){let n=t.tagName.toLowerCase();t.id?n+=`#${t.id}`:t.classList.length&&(n+=`.${Array.from(t.classList).slice(0,2).join(".")}`),e.unshift(n),t=t.parentElement}return e.join(" > ")}function og(A){const e=A.getAttribute("role")||void 0,t=A.getAttribute("aria-label")||void 0;let n;const r=A.closest("section, article, main, nav, aside, header, footer, [role]");if(r){const s=r.querySelector("h1, h2, h3, h4, h5, h6"),o=r.getAttribute("aria-label")||((s==null?void 0:s.textContent)||"").trim(),a=r.tagName.toLowerCase();n=o?`${a}: ${al(o,120)}`:a}return{elementRole:e,elementAriaLabel:t,enclosingSection:n}}function ig(A,e){const t=[A.trim(),"",`Page: ${e.pageTitle} (${e.pageUrl})`];return e.description&&t.push(`Description: ${e.description}`),e.selectionText&&t.push(`Selection: ${e.selectionText}`),e.elementText&&t.push(`Selected element: ${e.elementText}`),e.elementRole&&t.push(` Role: ${e.elementRole}`),e.elementAriaLabel&&t.push(` ARIA label: ${e.elementAriaLabel}`),e.enclosingSection&&t.push(`Section: ${e.enclosingSection}`),e.ancestry&&t.push(`Ancestry: ${e.ancestry}`),e.cssSelector&&t.push(`Selector: ${e.cssSelector}`),t.join(`
|
|
1587
|
+
`)}const Hn=new Set;let Ln=null,Ls=!1,Hi=!1;function ag(A){if(A.getAttribute("aria-modal")==="false")return!1;const e=getComputedStyle(A);return e.display!=="none"&&e.visibility!=="hidden"}function cg(){const A=document.querySelectorAll("dialog[open]");for(let t=0;t<A.length;t++)try{if(A[t].matches(":modal"))return!0}catch(n){}const e=document.querySelectorAll('[role="dialog"], [role="alertdialog"]');for(let t=0;t<e.length;t++){const n=e[t];if(!(Hn.has(n)||n.hasAttribute("data-ap-sdk"))&&n.isConnected&&ag(n))return!0}return!1}function ll(){const A=cg(),e=A&&!Hi;Hi=A;for(const t of Hn){t.hasAttribute("inert")&&t.removeAttribute("inert"),t.getAttribute("aria-hidden")==="true"&&t.removeAttribute("aria-hidden");const n=t.contains(document.activeElement);if(t.matches(":popover-open")){if(e&&!n){try{t.hidePopover()}catch(r){}try{t.showPopover()}catch(r){}}}else try{t.showPopover()}catch(r){}}}function ul(A){if(!(A instanceof Node))return!1;for(const e of Hn)if(e===A||e.contains(A))return!0;return!1}function Dn(A){(ul(A.target)||"relatedTarget"in A&&ul(A.relatedTarget))&&A.stopPropagation()}function lg(){Ls||(window.addEventListener("focusin",Dn,!0),window.addEventListener("focusout",Dn,!0),window.addEventListener("pointerdown",Dn,!0),Ls=!0),!Ln&&(Ln=new MutationObserver(A=>{A.some(t=>t.type==="childList"||t.attributeName==="open"&&t.target.tagName==="DIALOG"||t.attributeName==="inert"||t.attributeName==="aria-hidden"||t.attributeName==="role")&&ll()}),Ln.observe(document.documentElement,{attributes:!0,attributeFilter:["open","inert","aria-hidden","role"],childList:!0,subtree:!0}))}function tt(A){"showPopover"in A&&(A.setAttribute("popover","manual"),Hn.add(A),lg(),ll())}function nt(A){if(Hn.delete(A),Hn.size===0&&(Ln&&(Ln.disconnect(),Ln=null),Ls&&(window.removeEventListener("focusin",Dn,!0),window.removeEventListener("focusout",Dn,!0),window.removeEventListener("pointerdown",Dn,!0),Ls=!1),Hi=!1),"hidePopover"in A)try{A.hidePopover()}catch(e){}}function Li(A="ap-sdk-highlight"){const e=document.createElement("div");return e.className=A,e.setAttribute("data-ap-sdk","1"),e.style.display="none",document.body.appendChild(e),tt(e),{el:e,update:s=>{const o=s.getBoundingClientRect();e.style.top=`${o.top}px`,e.style.left=`${o.left}px`,e.style.width=`${o.width}px`,e.style.height=`${o.height}px`,e.style.display="block"},hide:()=>{e.style.display="none"},destroy:()=>{nt(e),e.remove()}}}const dl=/^cc-|current-password|new-password/i,ug=/token|secret|password|apikey|auth/i,Di="[redacted]",Ds="[data-ap-sdk-exclude]";let Ri=null;function dg(A){Ri=(A==null?void 0:A.trim())||null}function pl(){return Ri?`${Ds}, ${Ri}`:Ds}function Oi(A){let e;try{if(e=pl(),A.matches(e)){A.textContent="";return}for(const t of Array.from(A.querySelectorAll(e)))t.remove()}catch(t){for(const n of Array.from(A.querySelectorAll(Ds)))n.remove()}}function hl(A){if(A instanceof HTMLInputElement&&A.type==="password")return!0;const e=A.getAttribute("autocomplete");return!!e&&dl.test(e)}function fl(A){if(hl(A))return!0;try{return A.closest(pl())!==null}catch(e){return A.closest(Ds)!==null}}function gl(A){const e=[A,...Array.from(A.querySelectorAll("*"))];for(const t of e){t instanceof HTMLInputElement&&t.type==="password"&&t.setAttribute("value",Di);const n=t.getAttribute("autocomplete");n&&dl.test(n)&&t.setAttribute("value",Di);for(const r of Array.from(t.attributes))ug.test(r.name)&&t.setAttribute(r.name,Di)}}const pg="🎯 Click any element to capture";let St=null,zA=null,jA=null;function Qr(A){return A instanceof Element?A.closest("[data-ap-sdk]")!==null||A.closest(".ap-sdk-panel")!==null||A.closest(".ap-sdk-highlight")!==null||A.closest(".ap-sdk-picker-cursor")!==null:!1}function hg(){var A,e;return((e=(A=window.matchMedia)==null?void 0:A.call(window,"(pointer: coarse)").matches)!=null?e:!1)||"ontouchstart"in window}function Bl(A){St==null||St.update(A)}function wl(A){const e=cl(),t=sg(A),n=og(A);let r=A,s;try{const o=A.cloneNode(!0);gl(o),Oi(o),r=o,s=o.outerHTML.slice(0,4e3)}catch(o){}return k(k({pageUrl:window.location.href,pageTitle:document.title,elementText:Is(r),cssSelector:Ss(A),innerTree:qf(r),outerTree:rg(A),elementOuterHtml:s,ancestry:t},n),e)}function Mi(A,e){jA&&jA();const t=hg();St=Li(),zA=document.createElement("div"),zA.className="ap-sdk-picker-cursor",zA.setAttribute("data-ap-sdk","1"),zA.textContent=t?"Tap any element to preview":pg,document.body.appendChild(zA),tt(zA);let n=null,r=null;const s=u=>{jA==null||jA(),A(wl(u),u)},o=u=>{if(r=u,Bl(u),!zA)return;zA.classList.add("ap-sdk-picker-cursor--confirm"),zA.innerHTML="";const h=document.createElement("span");h.className="ap-sdk-picker-cursor__label",h.textContent=`<${u.tagName.toLowerCase()}>`;const f=document.createElement("button");f.type="button",f.className="ap-sdk-picker-cursor__btn ap-sdk-picker-cursor__btn--cancel",f.textContent="✕ Cancel",f.setAttribute("data-ap-sdk","1"),f.setAttribute("aria-label","Cancel picking"),f.addEventListener("click",Q=>{Q.preventDefault(),Q.stopPropagation(),jA==null||jA(),e()});const g=document.createElement("button");g.type="button",g.className="ap-sdk-picker-cursor__btn",g.textContent="⬆ Parent",g.setAttribute("data-ap-sdk","1"),g.addEventListener("click",Q=>{Q.preventDefault(),Q.stopPropagation(),r!=null&&r.parentElement&&o(r.parentElement)});const m=document.createElement("button");m.type="button",m.className="ap-sdk-picker-cursor__btn ap-sdk-picker-cursor__btn--primary",m.textContent="✓ Select",m.setAttribute("data-ap-sdk","1"),m.addEventListener("click",Q=>{Q.preventDefault(),Q.stopPropagation(),r&&s(r)}),zA.appendChild(h),zA.appendChild(f),zA.appendChild(g),zA.appendChild(m)},a=u=>{Qr(u.target)||(n=u.target,Bl(n))},i=u=>{var f;if(Qr(u.target))return;u.preventDefault(),u.stopImmediatePropagation();const h=(f=u.target)!=null?f:n;if(h){if(t){o(h);return}s(h)}},l=u=>{u.key==="Escape"&&(jA==null||jA(),e())};t||document.addEventListener("mouseover",a,{capture:!0}),document.addEventListener("click",i,{capture:!0}),document.addEventListener("keydown",l,{capture:!0}),jA=()=>{t||document.removeEventListener("mouseover",a,{capture:!0}),document.removeEventListener("click",i,{capture:!0}),document.removeEventListener("keydown",l,{capture:!0}),zA&&nt(zA),zA==null||zA.remove(),St==null||St.destroy(),St=null,zA=null,r=null,jA=null}}function Pi(){jA==null||jA()}function Rn(){return jA!==null}const Rs={TASK_STATUS_UPDATED:"task:status:updated",TASK_INTERACTION_CREATED:"task:interaction:created",TASK_INTERACTION_ANSWERED:"task:interaction:answered",TASK_BROWSER_COMMAND_CREATED:"task:browser-command:created"};function _(A,e,t){var a;function n(i,l){if(i._zod||Object.defineProperty(i,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),i._zod.traits.has(A))return;i._zod.traits.add(A),e(i,l);const u=o.prototype,h=Object.keys(u);for(let f=0;f<h.length;f++){const g=h[f];g in i||(i[g]=u[g].bind(i))}}const r=(a=t==null?void 0:t.Parent)!=null?a:Object;class s extends r{}Object.defineProperty(s,"name",{value:A});function o(i){var h;var l;const u=t!=null&&t.Parent?new s:this;n(u,i),(h=(l=u._zod).deferred)!=null||(l.deferred=[]);for(const f of u._zod.deferred)f();return u}return Object.defineProperty(o,"init",{value:n}),Object.defineProperty(o,Symbol.hasInstance,{value:i=>{var l,u;return t!=null&&t.Parent&&i instanceof t.Parent?!0:(u=(l=i==null?void 0:i._zod)==null?void 0:l.traits)==null?void 0:u.has(A)}}),Object.defineProperty(o,"name",{value:A}),o}class On extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class ml extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Cl={};function It(A){return Cl}function bl(A){const e=Object.values(A).filter(n=>typeof n=="number");return Object.entries(A).filter(([n,r])=>e.indexOf(+n)===-1).map(([n,r])=>r)}function Ki(A,e){return typeof e=="bigint"?e.toString():e}function Os(A){return{get value(){{const e=A();return Object.defineProperty(this,"value",{value:e}),e}}}}function Ni(A){return A==null}function zi(A){const e=A.startsWith("^")?1:0,t=A.endsWith("$")?A.length-1:A.length;return A.slice(e,t)}function fg(A,e){const t=(A.toString().split(".")[1]||"").length,n=e.toString();let r=(n.split(".")[1]||"").length;if(r===0&&/\d?e-\d?/.test(n)){const i=n.match(/\d?e-(\d?)/);i!=null&&i[1]&&(r=Number.parseInt(i[1]))}const s=t>r?t:r,o=Number.parseInt(A.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/ye(10,s)}const Ql=Symbol("evaluating");function oA(A,e,t){let n;Object.defineProperty(A,e,{get(){if(n!==Ql)return n===void 0&&(n=Ql,n=t()),n},set(r){Object.defineProperty(A,e,{value:r})},configurable:!0})}function qt(A,e,t){Object.defineProperty(A,e,{value:t,writable:!0,enumerable:!0,configurable:!0})}function Tt(...A){const e={};for(const t of A){const n=Object.getOwnPropertyDescriptors(t);Object.assign(e,n)}return Object.defineProperties({},e)}function yl(A){return JSON.stringify(A)}function gg(A){return A.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ul="captureStackTrace"in Error?Error.captureStackTrace:(...A)=>{};function yr(A){return typeof A=="object"&&A!==null&&!Array.isArray(A)}const Bg=Os(()=>{var A;if(typeof navigator!="undefined"&&((A=navigator==null?void 0:navigator.userAgent)!=null&&A.includes("Cloudflare")))return!1;try{const e=Function;return new e(""),!0}catch(e){return!1}});function Mn(A){if(yr(A)===!1)return!1;const e=A.constructor;if(e===void 0||typeof e!="function")return!0;const t=e.prototype;return!(yr(t)===!1||Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)}function El(A){return Mn(A)?k({},A):Array.isArray(A)?[...A]:A}const wg=new Set(["string","number","symbol"]);function Pn(A){return A.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ht(A,e,t){const n=new A._zod.constr(e!=null?e:A._zod.def);return(!e||t!=null&&t.parent)&&(n._zod.parent=A),n}function G(A){const e=A;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?$(k({},e),{error:()=>e.error}):e}function mg(A){return Object.keys(A).filter(e=>A[e]._zod.optin==="optional"&&A[e]._zod.optout==="optional")}const Cg={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function bg(A,e){const t=A._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=Tt(A._zod.def,{get shape(){const o={};for(const a in e){if(!(a in t.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(o[a]=t.shape[a])}return qt(this,"shape",o),o},checks:[]});return Ht(A,s)}function Qg(A,e){const t=A._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=Tt(A._zod.def,{get shape(){const o=k({},A._zod.def.shape);for(const a in e){if(!(a in t.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete o[a]}return qt(this,"shape",o),o},checks:[]});return Ht(A,s)}function yg(A,e){if(!Mn(e))throw new Error("Invalid input to extend: expected a plain object");const t=A._zod.def.checks;if(t&&t.length>0){const s=A._zod.def.shape;for(const o in e)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const r=Tt(A._zod.def,{get shape(){const s=k(k({},A._zod.def.shape),e);return qt(this,"shape",s),s}});return Ht(A,r)}function Ug(A,e){if(!Mn(e))throw new Error("Invalid input to safeExtend: expected a plain object");const t=Tt(A._zod.def,{get shape(){const n=k(k({},A._zod.def.shape),e);return qt(this,"shape",n),n}});return Ht(A,t)}function Eg(A,e){const t=Tt(A._zod.def,{get shape(){const n=k(k({},A._zod.def.shape),e._zod.def.shape);return qt(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return Ht(A,t)}function Fg(A,e,t){const r=e._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=Tt(e._zod.def,{get shape(){const a=e._zod.def.shape,i=k({},a);if(t)for(const l in t){if(!(l in a))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(i[l]=A?new A({type:"optional",innerType:a[l]}):a[l])}else for(const l in a)i[l]=A?new A({type:"optional",innerType:a[l]}):a[l];return qt(this,"shape",i),i},checks:[]});return Ht(e,o)}function kg(A,e,t){const n=Tt(e._zod.def,{get shape(){const r=e._zod.def.shape,s=k({},r);if(t)for(const o in t){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(s[o]=new A({type:"nonoptional",innerType:r[o]}))}else for(const o in r)s[o]=new A({type:"nonoptional",innerType:r[o]});return qt(this,"shape",s),s}});return Ht(e,n)}function Kn(A,e=0){var t;if(A.aborted===!0)return!0;for(let n=e;n<A.issues.length;n++)if(((t=A.issues[n])==null?void 0:t.continue)!==!0)return!0;return!1}function Nn(A,e){return e.map(t=>{var r;var n;return(r=(n=t).path)!=null||(n.path=[]),t.path.unshift(A),t})}function Ms(A){return typeof A=="string"?A:A==null?void 0:A.message}function Lt(A,e,t){var r,s,o,a,i,l,u,h,f,g,m;const n=$(k({},A),{path:(r=A.path)!=null?r:[]});if(!A.message){const Q=(m=(g=(h=(l=Ms((a=(o=(s=A.inst)==null?void 0:s._zod.def)==null?void 0:o.error)==null?void 0:a.call(o,A)))!=null?l:Ms((i=e==null?void 0:e.error)==null?void 0:i.call(e,A)))!=null?h:Ms((u=t.customError)==null?void 0:u.call(t,A)))!=null?g:Ms((f=t.localeError)==null?void 0:f.call(t,A)))!=null?m:"Invalid input";n.message=Q}return delete n.inst,delete n.continue,e!=null&&e.reportInput||delete n.input,n}function $i(A){return Array.isArray(A)?"array":typeof A=="string"?"string":"unknown"}function Ur(...A){const[e,t,n]=A;return typeof e=="string"?{message:e,code:"custom",input:t,inst:n}:k({},e)}const Fl=(A,e)=>{A.name="$ZodError",Object.defineProperty(A,"_zod",{value:A._zod,enumerable:!1}),Object.defineProperty(A,"issues",{value:e,enumerable:!1}),A.message=JSON.stringify(e,Ki,2),Object.defineProperty(A,"toString",{value:()=>A.message,enumerable:!1})},kl=_("$ZodError",Fl),vl=_("$ZodError",Fl,{Parent:Error});function vg(A,e=t=>t.message){const t={},n=[];for(const r of A.issues)r.path.length>0?(t[r.path[0]]=t[r.path[0]]||[],t[r.path[0]].push(e(r))):n.push(e(r));return{formErrors:n,fieldErrors:t}}function _g(A,e=t=>t.message){const t={_errors:[]},n=r=>{for(const s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>n({issues:o}));else if(s.code==="invalid_key")n({issues:s.issues});else if(s.code==="invalid_element")n({issues:s.issues});else if(s.path.length===0)t._errors.push(e(s));else{let o=t,a=0;for(;a<s.path.length;){const i=s.path[a];a===s.path.length-1?(o[i]=o[i]||{_errors:[]},o[i]._errors.push(e(s))):o[i]=o[i]||{_errors:[]},o=o[i],a++}}};return n(A),t}const Gi=A=>(e,t,n,r)=>{var a;const s=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:t,issues:[]},s);if(o instanceof Promise)throw new On;if(o.issues.length){const i=new((a=r==null?void 0:r.Err)!=null?a:A)(o.issues.map(l=>Lt(l,s,It())));throw Ul(i,r==null?void 0:r.callee),i}return o.value},Vi=A=>(e,t,n,r)=>T(null,null,function*(){var a;const s=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:t,issues:[]},s);if(o instanceof Promise&&(o=yield o),o.issues.length){const i=new((a=r==null?void 0:r.Err)!=null?a:A)(o.issues.map(l=>Lt(l,s,It())));throw Ul(i,r==null?void 0:r.callee),i}return o.value}),Ps=A=>(e,t,n)=>{const r=n?$(k({},n),{async:!1}):{async:!1},s=e._zod.run({value:t,issues:[]},r);if(s instanceof Promise)throw new On;return s.issues.length?{success:!1,error:new(A!=null?A:kl)(s.issues.map(o=>Lt(o,r,It())))}:{success:!0,data:s.value}},xg=Ps(vl),Ks=A=>(e,t,n)=>T(null,null,function*(){const r=n?Object.assign(n,{async:!0}):{async:!0};let s=e._zod.run({value:t,issues:[]},r);return s instanceof Promise&&(s=yield s),s.issues.length?{success:!1,error:new A(s.issues.map(o=>Lt(o,r,It())))}:{success:!0,data:s.value}}),Sg=Ks(vl),Ig=A=>(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Gi(A)(e,t,r)},Tg=A=>(e,t,n)=>Gi(A)(e,t,n),Hg=A=>(e,t,n)=>T(null,null,function*(){const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Vi(A)(e,t,r)}),Lg=A=>(e,t,n)=>T(null,null,function*(){return Vi(A)(e,t,n)}),Dg=A=>(e,t,n)=>{const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ps(A)(e,t,r)},Rg=A=>(e,t,n)=>Ps(A)(e,t,n),Og=A=>(e,t,n)=>T(null,null,function*(){const r=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return Ks(A)(e,t,r)}),Mg=A=>(e,t,n)=>T(null,null,function*(){return Ks(A)(e,t,n)}),Pg=/^[cC][^\s-]{8,}$/,Kg=/^[0-9a-z]+$/,Ng=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,zg=/^[0-9a-vA-V]{20}$/,$g=/^[A-Za-z0-9]{27}$/,Gg=/^[a-zA-Z0-9_-]{21}$/,Vg=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Zg=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,_l=A=>A?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${A}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xg=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Wg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jg(){return new RegExp(Wg,"u")}const jg=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Yg=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qg=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,AB=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eB=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,xl=/^[A-Za-z0-9_-]*$/,tB=/^\+[1-9]\d{6,14}$/,Sl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",nB=new RegExp(`^${Sl}$`);function Il(A){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof A.precision=="number"?A.precision===-1?`${e}`:A.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${A.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function rB(A){return new RegExp(`^${Il(A)}$`)}function sB(A){const e=Il({precision:A.precision}),t=["Z"];A.local&&t.push(""),A.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${t.join("|")})`;return new RegExp(`^${Sl}T(?:${n})$`)}const oB=A=>{var t,n;const e=A?`[\\s\\S]{${(t=A==null?void 0:A.minimum)!=null?t:0},${(n=A==null?void 0:A.maximum)!=null?n:""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},iB=/^-?\d+$/,Tl=/^-?\d+(?:\.\d+)?$/,aB=/^(?:true|false)$/i,cB=/^[^A-Z]*$/,lB=/^[^a-z]*$/,fe=_("$ZodCheck",(A,e)=>{var n,r;var t;(n=A._zod)!=null||(A._zod={}),A._zod.def=e,(r=(t=A._zod).onattach)!=null||(t.onattach=[])}),Hl={number:"number",bigint:"bigint",object:"date"},Ll=_("$ZodCheckLessThan",(A,e)=>{fe.init(A,e);const t=Hl[typeof e.value];A._zod.onattach.push(n=>{var o;const r=n._zod.bag,s=(o=e.inclusive?r.maximum:r.exclusiveMaximum)!=null?o:Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?r.maximum=e.value:r.exclusiveMaximum=e.value)}),A._zod.check=n=>{(e.inclusive?n.value<=e.value:n.value<e.value)||n.issues.push({origin:t,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:A,continue:!e.abort})}}),Dl=_("$ZodCheckGreaterThan",(A,e)=>{fe.init(A,e);const t=Hl[typeof e.value];A._zod.onattach.push(n=>{var o;const r=n._zod.bag,s=(o=e.inclusive?r.minimum:r.exclusiveMinimum)!=null?o:Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?r.minimum=e.value:r.exclusiveMinimum=e.value)}),A._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:t,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:A,continue:!e.abort})}}),uB=_("$ZodCheckMultipleOf",(A,e)=>{fe.init(A,e),A._zod.onattach.push(t=>{var r;var n;(r=(n=t._zod.bag).multipleOf)!=null||(n.multipleOf=e.value)}),A._zod.check=t=>{if(typeof t.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?t.value%e.value===BigInt(0):fg(t.value,e.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:e.value,input:t.value,inst:A,continue:!e.abort})}}),dB=_("$ZodCheckNumberFormat",(A,e)=>{var o;fe.init(A,e),e.format=e.format||"float64";const t=(o=e.format)==null?void 0:o.includes("int"),n=t?"int":"number",[r,s]=Cg[e.format];A._zod.onattach.push(a=>{const i=a._zod.bag;i.format=e.format,i.minimum=r,i.maximum=s,t&&(i.pattern=iB)}),A._zod.check=a=>{const i=a.value;if(t){if(!Number.isInteger(i)){a.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:i,inst:A});return}if(!Number.isSafeInteger(i)){i>0?a.issues.push({input:i,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:A,origin:n,inclusive:!0,continue:!e.abort}):a.issues.push({input:i,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:A,origin:n,inclusive:!0,continue:!e.abort});return}}i<r&&a.issues.push({origin:"number",input:i,code:"too_small",minimum:r,inclusive:!0,inst:A,continue:!e.abort}),i>s&&a.issues.push({origin:"number",input:i,code:"too_big",maximum:s,inclusive:!0,inst:A,continue:!e.abort})}}),pB=_("$ZodCheckMaxLength",(A,e)=>{var n;var t;fe.init(A,e),(n=(t=A._zod.def).when)!=null||(t.when=r=>{const s=r.value;return!Ni(s)&&s.length!==void 0}),A._zod.onattach.push(r=>{var o;const s=(o=r._zod.bag.maximum)!=null?o:Number.POSITIVE_INFINITY;e.maximum<s&&(r._zod.bag.maximum=e.maximum)}),A._zod.check=r=>{const s=r.value;if(s.length<=e.maximum)return;const a=$i(s);r.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:s,inst:A,continue:!e.abort})}}),hB=_("$ZodCheckMinLength",(A,e)=>{var n;var t;fe.init(A,e),(n=(t=A._zod.def).when)!=null||(t.when=r=>{const s=r.value;return!Ni(s)&&s.length!==void 0}),A._zod.onattach.push(r=>{var o;const s=(o=r._zod.bag.minimum)!=null?o:Number.NEGATIVE_INFINITY;e.minimum>s&&(r._zod.bag.minimum=e.minimum)}),A._zod.check=r=>{const s=r.value;if(s.length>=e.minimum)return;const a=$i(s);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:s,inst:A,continue:!e.abort})}}),fB=_("$ZodCheckLengthEquals",(A,e)=>{var n;var t;fe.init(A,e),(n=(t=A._zod.def).when)!=null||(t.when=r=>{const s=r.value;return!Ni(s)&&s.length!==void 0}),A._zod.onattach.push(r=>{const s=r._zod.bag;s.minimum=e.length,s.maximum=e.length,s.length=e.length}),A._zod.check=r=>{const s=r.value,o=s.length;if(o===e.length)return;const a=$i(s),i=o>e.length;r.issues.push($(k({origin:a},i?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length}),{inclusive:!0,exact:!0,input:r.value,inst:A,continue:!e.abort}))}}),Ns=_("$ZodCheckStringFormat",(A,e)=>{var r,s;var t,n;fe.init(A,e),A._zod.onattach.push(o=>{var i;const a=o._zod.bag;a.format=e.format,e.pattern&&((i=a.patterns)!=null||(a.patterns=new Set),a.patterns.add(e.pattern))}),e.pattern?(r=(t=A._zod).check)!=null||(t.check=o=>{e.pattern.lastIndex=0,!e.pattern.test(o.value)&&o.issues.push($(k({origin:"string",code:"invalid_format",format:e.format,input:o.value},e.pattern?{pattern:e.pattern.toString()}:{}),{inst:A,continue:!e.abort}))}):(s=(n=A._zod).check)!=null||(n.check=()=>{})}),gB=_("$ZodCheckRegex",(A,e)=>{Ns.init(A,e),A._zod.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:e.pattern.toString(),inst:A,continue:!e.abort})}}),BB=_("$ZodCheckLowerCase",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=cB),Ns.init(A,e)}),wB=_("$ZodCheckUpperCase",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=lB),Ns.init(A,e)}),mB=_("$ZodCheckIncludes",(A,e)=>{fe.init(A,e);const t=Pn(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${t}`:t);e.pattern=n,A._zod.onattach.push(r=>{var o;const s=r._zod.bag;(o=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(n)}),A._zod.check=r=>{r.value.includes(e.includes,e.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:r.value,inst:A,continue:!e.abort})}}),CB=_("$ZodCheckStartsWith",(A,e)=>{var n;fe.init(A,e);const t=new RegExp(`^${Pn(e.prefix)}.*`);(n=e.pattern)!=null||(e.pattern=t),A._zod.onattach.push(r=>{var o;const s=r._zod.bag;(o=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(t)}),A._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:A,continue:!e.abort})}}),bB=_("$ZodCheckEndsWith",(A,e)=>{var n;fe.init(A,e);const t=new RegExp(`.*${Pn(e.suffix)}$`);(n=e.pattern)!=null||(e.pattern=t),A._zod.onattach.push(r=>{var o;const s=r._zod.bag;(o=s.patterns)!=null||(s.patterns=new Set),s.patterns.add(t)}),A._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:A,continue:!e.abort})}}),QB=_("$ZodCheckOverwrite",(A,e)=>{fe.init(A,e),A._zod.check=t=>{t.value=e.tx(t.value)}});class yB{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const n=e.split(`
|
|
1588
|
+
`).filter(o=>o),r=Math.min(...n.map(o=>o.length-o.trimStart().length)),s=n.map(o=>o.slice(r)).map(o=>" ".repeat(this.indent*2)+o);for(const o of s)this.content.push(o)}compile(){var s;const e=Function,t=this==null?void 0:this.args,r=[...((s=this==null?void 0:this.content)!=null?s:[""]).map(o=>` ${o}`)];return new e(...t,r.join(`
|
|
1589
|
+
`))}}const UB={major:4,minor:3,patch:5},QA=_("$ZodType",(A,e)=>{var r,s,o;var t;A!=null||(A={}),A._zod.def=e,A._zod.bag=A._zod.bag||{},A._zod.version=UB;const n=[...(r=A._zod.def.checks)!=null?r:[]];A._zod.traits.has("$ZodCheck")&&n.unshift(A);for(const a of n)for(const i of a._zod.onattach)i(A);if(n.length===0)(s=(t=A._zod).deferred)!=null||(t.deferred=[]),(o=A._zod.deferred)==null||o.push(()=>{A._zod.run=A._zod.parse});else{const a=(l,u,h)=>{let f=Kn(l),g;for(const m of u){if(m._zod.def.when){if(!m._zod.def.when(l))continue}else if(f)continue;const Q=l.issues.length,U=m._zod.check(l);if(U instanceof Promise&&(h==null?void 0:h.async)===!1)throw new On;if(g||U instanceof Promise)g=(g!=null?g:Promise.resolve()).then(()=>T(null,null,function*(){yield U,l.issues.length!==Q&&(f||(f=Kn(l,Q)))}));else{if(l.issues.length===Q)continue;f||(f=Kn(l,Q))}}return g?g.then(()=>l):l},i=(l,u,h)=>{if(Kn(l))return l.aborted=!0,l;const f=a(u,n,h);if(f instanceof Promise){if(h.async===!1)throw new On;return f.then(g=>A._zod.parse(g,h))}return A._zod.parse(f,h)};A._zod.run=(l,u)=>{if(u.skipChecks)return A._zod.parse(l,u);if(u.direction==="backward"){const f=A._zod.parse({value:l.value,issues:[]},$(k({},u),{skipChecks:!0}));return f instanceof Promise?f.then(g=>i(g,l,u)):i(f,l,u)}const h=A._zod.parse(l,u);if(h instanceof Promise){if(u.async===!1)throw new On;return h.then(f=>a(f,n,u))}return a(h,n,u)}}oA(A,"~standard",()=>({validate:a=>{var i;try{const l=xg(A,a);return l.success?{value:l.data}:{issues:(i=l.error)==null?void 0:i.issues}}catch(l){return Sg(A,a).then(u=>{var h;return u.success?{value:u.data}:{issues:(h=u.error)==null?void 0:h.issues}})}},vendor:"zod",version:1}))}),Zi=_("$ZodString",(A,e)=>{var t,n,r;QA.init(A,e),A._zod.pattern=(r=[...(n=(t=A==null?void 0:A._zod.bag)==null?void 0:t.patterns)!=null?n:[]].pop())!=null?r:oB(A._zod.bag),A._zod.parse=(s,o)=>{if(e.coerce)try{s.value=String(s.value)}catch(a){}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:A}),s}}),yA=_("$ZodStringFormat",(A,e)=>{Ns.init(A,e),Zi.init(A,e)}),EB=_("$ZodGUID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Zg),yA.init(A,e)}),FB=_("$ZodUUID",(A,e)=>{var t,n;if(e.version){const s={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(s===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);(t=e.pattern)!=null||(e.pattern=_l(s))}else(n=e.pattern)!=null||(e.pattern=_l());yA.init(A,e)}),kB=_("$ZodEmail",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Xg),yA.init(A,e)}),vB=_("$ZodURL",(A,e)=>{yA.init(A,e),A._zod.check=t=>{try{const n=t.value.trim(),r=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(r.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:t.value,inst:A,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:t.value,inst:A,continue:!e.abort})),e.normalize?t.value=r.href:t.value=n;return}catch(n){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:A,continue:!e.abort})}}}),_B=_("$ZodEmoji",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Jg()),yA.init(A,e)}),xB=_("$ZodNanoID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Gg),yA.init(A,e)}),SB=_("$ZodCUID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Pg),yA.init(A,e)}),IB=_("$ZodCUID2",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Kg),yA.init(A,e)}),TB=_("$ZodULID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Ng),yA.init(A,e)}),HB=_("$ZodXID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=zg),yA.init(A,e)}),LB=_("$ZodKSUID",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=$g),yA.init(A,e)}),DB=_("$ZodISODateTime",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=sB(e)),yA.init(A,e)}),RB=_("$ZodISODate",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=nB),yA.init(A,e)}),OB=_("$ZodISOTime",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=rB(e)),yA.init(A,e)}),MB=_("$ZodISODuration",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Vg),yA.init(A,e)}),PB=_("$ZodIPv4",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=jg),yA.init(A,e),A._zod.bag.format="ipv4"}),KB=_("$ZodIPv6",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=Yg),yA.init(A,e),A._zod.bag.format="ipv6",A._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch(r){n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:A,continue:!e.abort})}}}),NB=_("$ZodCIDRv4",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=qg),yA.init(A,e)}),zB=_("$ZodCIDRv6",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=AB),yA.init(A,e),A._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[s,o]=r;if(!o)throw new Error;const a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${s}]`)}catch(s){n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:A,continue:!e.abort})}}});function Rl(A){if(A==="")return!0;if(A.length%4!==0)return!1;try{return atob(A),!0}catch(e){return!1}}const $B=_("$ZodBase64",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=eB),yA.init(A,e),A._zod.bag.contentEncoding="base64",A._zod.check=n=>{Rl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:A,continue:!e.abort})}});function GB(A){if(!xl.test(A))return!1;const e=A.replace(/[-_]/g,n=>n==="-"?"+":"/"),t=e.padEnd(Math.ceil(e.length/4)*4,"=");return Rl(t)}const VB=_("$ZodBase64URL",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=xl),yA.init(A,e),A._zod.bag.contentEncoding="base64url",A._zod.check=n=>{GB(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:A,continue:!e.abort})}}),ZB=_("$ZodE164",(A,e)=>{var t;(t=e.pattern)!=null||(e.pattern=tB),yA.init(A,e)});function XB(A,e=null){try{const t=A.split(".");if(t.length!==3)return!1;const[n]=t;if(!n)return!1;const r=JSON.parse(atob(n));return!("typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||e&&(!("alg"in r)||r.alg!==e))}catch(t){return!1}}const WB=_("$ZodJWT",(A,e)=>{yA.init(A,e),A._zod.check=t=>{XB(t.value,e.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:A,continue:!e.abort})}}),Ol=_("$ZodNumber",(A,e)=>{var t;QA.init(A,e),A._zod.pattern=(t=A._zod.bag.pattern)!=null?t:Tl,A._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch(a){}const s=n.value;if(typeof s=="number"&&!Number.isNaN(s)&&Number.isFinite(s))return n;const o=typeof s=="number"?Number.isNaN(s)?"NaN":Number.isFinite(s)?void 0:"Infinity":void 0;return n.issues.push(k({expected:"number",code:"invalid_type",input:s,inst:A},o?{received:o}:{})),n}}),JB=_("$ZodNumberFormat",(A,e)=>{dB.init(A,e),Ol.init(A,e)}),jB=_("$ZodBoolean",(A,e)=>{QA.init(A,e),A._zod.pattern=aB,A._zod.parse=(t,n)=>{if(e.coerce)try{t.value=!!t.value}catch(s){}const r=t.value;return typeof r=="boolean"||t.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:A}),t}}),YB=_("$ZodAny",(A,e)=>{QA.init(A,e),A._zod.parse=t=>t}),qB=_("$ZodUnknown",(A,e)=>{QA.init(A,e),A._zod.parse=t=>t}),Aw=_("$ZodNever",(A,e)=>{QA.init(A,e),A._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:A}),t)});function Ml(A,e,t){A.issues.length&&e.issues.push(...Nn(t,A.issues)),e.value[t]=A.value}const ew=_("$ZodArray",(A,e)=>{QA.init(A,e),A._zod.parse=(t,n)=>{const r=t.value;if(!Array.isArray(r))return t.issues.push({expected:"array",code:"invalid_type",input:r,inst:A}),t;t.value=Array(r.length);const s=[];for(let o=0;o<r.length;o++){const a=r[o],i=e.element._zod.run({value:a,issues:[]},n);i instanceof Promise?s.push(i.then(l=>Ml(l,t,o))):Ml(i,t,o)}return s.length?Promise.all(s).then(()=>t):t}});function zs(A,e,t,n,r){if(A.issues.length){if(r&&!(t in n))return;e.issues.push(...Nn(t,A.issues))}A.value===void 0?t in n&&(e.value[t]=void 0):e.value[t]=A.value}function Pl(A){var n,r,s,o;const e=Object.keys(A.shape);for(const a of e)if(!((o=(s=(r=(n=A.shape)==null?void 0:n[a])==null?void 0:r._zod)==null?void 0:s.traits)!=null&&o.has("$ZodType")))throw new Error(`Invalid element at key "${a}": expected a Zod schema`);const t=mg(A.shape);return $(k({},A),{keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(t)})}function Kl(A,e,t,n,r,s){const o=[],a=r.keySet,i=r.catchall._zod,l=i.def.type,u=i.optout==="optional";for(const h in e){if(a.has(h))continue;if(l==="never"){o.push(h);continue}const f=i.run({value:e[h],issues:[]},n);f instanceof Promise?A.push(f.then(g=>zs(g,t,h,e,u))):zs(f,t,h,e,u)}return o.length&&t.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:s}),A.length?Promise.all(A).then(()=>t):t}const tw=_("$ZodObject",(A,e)=>{QA.init(A,e);const t=Object.getOwnPropertyDescriptor(e,"shape");if(!(t!=null&&t.get)){const a=e.shape;Object.defineProperty(e,"shape",{get:()=>{const i=k({},a);return Object.defineProperty(e,"shape",{value:i}),i}})}const n=Os(()=>Pl(e));oA(A._zod,"propValues",()=>{var l;const a=e.shape,i={};for(const u in a){const h=a[u]._zod;if(h.values){(l=i[u])!=null||(i[u]=new Set);for(const f of h.values)i[u].add(f)}}return i});const r=yr,s=e.catchall;let o;A._zod.parse=(a,i)=>{o!=null||(o=n.value);const l=a.value;if(!r(l))return a.issues.push({expected:"object",code:"invalid_type",input:l,inst:A}),a;a.value={};const u=[],h=o.shape;for(const f of o.keys){const g=h[f],m=g._zod.optout==="optional",Q=g._zod.run({value:l[f],issues:[]},i);Q instanceof Promise?u.push(Q.then(U=>zs(U,a,f,l,m))):zs(Q,a,f,l,m)}return s?Kl(u,l,a,i,n.value,A):u.length?Promise.all(u).then(()=>a):a}}),nw=_("$ZodObjectJIT",(A,e)=>{tw.init(A,e);const t=A._zod.parse,n=Os(()=>Pl(e)),r=f=>{var F;const g=new yB(["shape","payload","ctx"]),m=n.value,Q=y=>{const x=yl(y);return`shape[${x}]._zod.run({ value: input[${x}], issues: [] }, ctx)`};g.write("const input = payload.value;");const U=Object.create(null);let E=0;for(const y of m.keys)U[y]=`key_${E++}`;g.write("const newResult = {};");for(const y of m.keys){const x=U[y],R=yl(y),I=f[y],K=((F=I==null?void 0:I._zod)==null?void 0:F.optout)==="optional";g.write(`const ${x} = ${Q(y)};`),K?g.write(`
|
|
1590
|
+
if (${x}.issues.length) {
|
|
1591
|
+
if (${R} in input) {
|
|
1592
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1539
1593
|
...iss,
|
|
1540
|
-
path: iss.path ? [${
|
|
1594
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
1541
1595
|
})));
|
|
1542
1596
|
}
|
|
1543
1597
|
}
|
|
1544
1598
|
|
|
1545
|
-
if (${
|
|
1546
|
-
if (${
|
|
1547
|
-
newResult[${
|
|
1599
|
+
if (${x}.value === undefined) {
|
|
1600
|
+
if (${R} in input) {
|
|
1601
|
+
newResult[${R}] = undefined;
|
|
1548
1602
|
}
|
|
1549
1603
|
} else {
|
|
1550
|
-
newResult[${
|
|
1604
|
+
newResult[${R}] = ${x}.value;
|
|
1551
1605
|
}
|
|
1552
1606
|
|
|
1553
|
-
`):
|
|
1554
|
-
if (${
|
|
1555
|
-
payload.issues = payload.issues.concat(${
|
|
1607
|
+
`):g.write(`
|
|
1608
|
+
if (${x}.issues.length) {
|
|
1609
|
+
payload.issues = payload.issues.concat(${x}.issues.map(iss => ({
|
|
1556
1610
|
...iss,
|
|
1557
|
-
path: iss.path ? [${
|
|
1611
|
+
path: iss.path ? [${R}, ...iss.path] : [${R}]
|
|
1558
1612
|
})));
|
|
1559
1613
|
}
|
|
1560
1614
|
|
|
1561
|
-
if (${
|
|
1562
|
-
if (${
|
|
1563
|
-
newResult[${
|
|
1615
|
+
if (${x}.value === undefined) {
|
|
1616
|
+
if (${R} in input) {
|
|
1617
|
+
newResult[${R}] = undefined;
|
|
1564
1618
|
}
|
|
1565
1619
|
} else {
|
|
1566
|
-
newResult[${
|
|
1620
|
+
newResult[${R}] = ${x}.value;
|
|
1567
1621
|
}
|
|
1568
1622
|
|
|
1569
|
-
`)}k.write("payload.value = newResult;"),k.write("return payload;");const j=k.compile();return(T,L)=>j(m,T,L)};let i;const a=Pr,d=!aa.jitless,p=d&&qu.value,h=t.catchall;let g;e._zod.parse=(m,k)=>{g!=null||(g=r.value);const y=m.value;return a(y)?d&&p&&(k==null?void 0:k.async)===!1&&k.jitless!==!0?(i||(i=o(t.shape)),m=i(m,k),h?Ca([],y,m,k,g,e):m):n(m,k):(m.issues.push({expected:"object",code:"invalid_type",input:y,inst:e}),m)}});function Pa(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const o=e.filter(i=>!nr(i));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(a=>kn(a,r,gn())))}),t)}const Ra=w("$ZodUnion",(e,t)=>{me.init(e,t),ne(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ne(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ne(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ne(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${o.map(i=>zs(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(o,i)=>{if(n)return r(o,i);let a=!1;const d=[];for(const l of t.options){const p=l._zod.run({value:o.value,issues:[]},i);if(p instanceof Promise)d.push(p),a=!0;else{if(p.issues.length===0)return p;d.push(p)}}return a?Promise.all(d).then(l=>Pa(l,o,e,i)):Pa(d,o,e,i)}}),Pp=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Ra.init(e,t);const n=e._zod.parse;ne(e._zod,"propValues",()=>{const o={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[d,l]of Object.entries(a)){o[d]||(o[d]=new Set);for(const p of l)o[d].add(p)}}return o});const r=vo(()=>{var a;const o=t.options,i=new Map;for(const d of o){const l=(a=d._zod.propValues)==null?void 0:a[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(d)}"`);for(const p of l){if(i.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);i.set(p,d)}}return i});e._zod.parse=(o,i)=>{const a=o.value;if(!Pr(a))return o.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),o;const d=r.value.get(a==null?void 0:a[t.discriminator]);return d?d._zod.run(o,i):t.unionFallback?n(o,i):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:a,path:[t.discriminator],inst:e}),o)}}),Rp=w("$ZodIntersection",(e,t)=>{me.init(e,t),e._zod.parse=(n,r)=>{const o=n.value,i=t.left._zod.run({value:o,issues:[]},r),a=t.right._zod.run({value:o,issues:[]},r);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([l,p])=>La(n,l,p)):La(n,i,a)}});function Us(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(er(e)&&er(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),o=v(v({},e),t);for(const i of r){const a=Us(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};o[i]=a.data}return{valid:!0,data:o}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const o=e[r],i=t[r],a=Us(o,i);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function La(e,t,n){const r=new Map;let o;for(const d of t.issues)if(d.code==="unrecognized_keys"){o!=null||(o=d);for(const l of d.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else e.issues.push(d);for(const d of n.issues)if(d.code==="unrecognized_keys")for(const l of d.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else e.issues.push(d);const i=[...r].filter(([,d])=>d.l&&d.r).map(([d])=>d);if(i.length&&o&&e.issues.push(M(v({},o),{keys:i})),nr(e))return e;const a=Us(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Lp=w("$ZodRecord",(e,t)=>{me.init(e,t),e._zod.parse=(n,r)=>{const o=n.value;if(!er(o))return n.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),n;const i=[],a=t.keyType._zod.values;if(a){n.value={};const d=new Set;for(const p of a)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){d.add(typeof p=="number"?p.toString():p);const h=t.valueType._zod.run({value:o[p],issues:[]},r);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...rr(p,g.issues)),n.value[p]=g.value})):(h.issues.length&&n.issues.push(...rr(p,h.issues)),n.value[p]=h.value)}let l;for(const p in o)d.has(p)||(l=l!=null?l:[],l.push(p));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l})}else{n.value={};for(const d of Reflect.ownKeys(o)){if(d==="__proto__")continue;let l=t.keyType._zod.run({value:d,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof d=="string"&&va.test(d)&&l.issues.length&&l.issues.some(g=>g.code==="invalid_type"&&g.expected==="number")){const g=t.keyType._zod.run({value:Number(d),issues:[]},r);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(l=g)}if(l.issues.length){t.mode==="loose"?n.value[d]=o[d]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(g=>kn(g,r,gn())),input:d,path:[d],inst:e});continue}const h=t.valueType._zod.run({value:o[d],issues:[]},r);h instanceof Promise?i.push(h.then(g=>{g.issues.length&&n.issues.push(...rr(d,g.issues)),n.value[l.value]=g.value})):(h.issues.length&&n.issues.push(...rr(d,h.issues)),n.value[l.value]=h.value)}}return i.length?Promise.all(i).then(()=>n):n}}),Ip=w("$ZodEnum",(e,t)=>{me.init(e,t);const n=ca(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(o=>Hu.has(typeof o)).map(o=>typeof o=="string"?tr(o):o.toString()).join("|")})$`),e._zod.parse=(o,i)=>{const a=o.value;return r.has(a)||o.issues.push({code:"invalid_value",values:n,input:a,inst:e}),o}}),$p=w("$ZodLiteral",(e,t)=>{if(me.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?tr(r):r?tr(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,o)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),zp=w("$ZodTransform",(e,t)=>{me.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ia(e.constructor.name);const o=t.transform(n.value,n);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(a=>(n.value=a,n));if(o instanceof Promise)throw new Qn;return n.value=o,n}});function Ia(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const $a=w("$ZodOptional",(e,t)=>{me.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ne(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${zs(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Ia(i,n.value)):Ia(o,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),Op=w("$ZodExactOptional",(e,t)=>{$a.init(e,t),ne(e._zod,"values",()=>t.innerType._zod.values),ne(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),Np=w("$ZodNullable",(e,t)=>{me.init(e,t),ne(e._zod,"optin",()=>t.innerType._zod.optin),ne(e._zod,"optout",()=>t.innerType._zod.optout),ne(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${zs(n.source)}|null)$`):void 0}),ne(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Dp=w("$ZodDefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>za(i,t)):za(o,t)}});function za(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Mp=w("$ZodPrefault",(e,t)=>{me.init(e,t),e._zod.optin="optional",ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Up=w("$ZodNonOptional",(e,t)=>{me.init(e,t),ne(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>Oa(i,e)):Oa(o,e)}});function Oa(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const jp=w("$ZodCatch",(e,t)=>{me.init(e,t),ne(e._zod,"optin",()=>t.innerType._zod.optin),ne(e._zod,"optout",()=>t.innerType._zod.optout),ne(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue(M(v({},n),{error:{issues:i.issues.map(a=>kn(a,r,gn()))},input:n.value})),n.issues=[]),n)):(n.value=o.value,o.issues.length&&(n.value=t.catchValue(M(v({},n),{error:{issues:o.issues.map(i=>kn(i,r,gn()))},input:n.value})),n.issues=[]),n)}}),Zp=w("$ZodPipe",(e,t)=>{me.init(e,t),ne(e._zod,"values",()=>t.in._zod.values),ne(e._zod,"optin",()=>t.in._zod.optin),ne(e._zod,"optout",()=>t.out._zod.optout),ne(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(a=>Eo(a,t.in,r)):Eo(i,t.in,r)}const o=t.in._zod.run(n,r);return o instanceof Promise?o.then(i=>Eo(i,t.out,r)):Eo(o,t.out,r)}});function Eo(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const qp=w("$ZodReadonly",(e,t)=>{me.init(e,t),ne(e._zod,"propValues",()=>t.innerType._zod.propValues),ne(e._zod,"values",()=>t.innerType._zod.values),ne(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ne(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(Na):Na(o)}});function Na(e){return e.value=Object.freeze(e.value),e}const Hp=w("$ZodCustom",(e,t)=>{st.init(e,t),me.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,o=t.fn(r);if(o instanceof Promise)return o.then(i=>Da(i,n,r,e));Da(o,n,r,e)}});function Da(e,t,n,r){var o;if(!e){const i={code:"custom",input:n,inst:r,path:[...(o=r._zod.def.path)!=null?o:[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(Rr(i))}}var Ma;class Fp{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){var r;const n=t._zod.parent;if(n){const o=v({},(r=this.get(n))!=null?r:{});delete o.id;const i=v(v({},o),this._map.get(t));return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Bp(){return new Fp}(eu=(Ma=globalThis).__zod_globalRegistry)!=null||(Ma.__zod_globalRegistry=Bp());const Lr=globalThis.__zod_globalRegistry;function Gp(e,t){return new e(v({type:"string"},U(t)))}function Wp(e,t){return new e(v({type:"string",format:"email",check:"string_format",abort:!1},U(t)))}function Ua(e,t){return new e(v({type:"string",format:"guid",check:"string_format",abort:!1},U(t)))}function Jp(e,t){return new e(v({type:"string",format:"uuid",check:"string_format",abort:!1},U(t)))}function Yp(e,t){return new e(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},U(t)))}function Vp(e,t){return new e(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},U(t)))}function Xp(e,t){return new e(v({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},U(t)))}function Kp(e,t){return new e(v({type:"string",format:"url",check:"string_format",abort:!1},U(t)))}function Qp(e,t){return new e(v({type:"string",format:"emoji",check:"string_format",abort:!1},U(t)))}function eh(e,t){return new e(v({type:"string",format:"nanoid",check:"string_format",abort:!1},U(t)))}function th(e,t){return new e(v({type:"string",format:"cuid",check:"string_format",abort:!1},U(t)))}function nh(e,t){return new e(v({type:"string",format:"cuid2",check:"string_format",abort:!1},U(t)))}function rh(e,t){return new e(v({type:"string",format:"ulid",check:"string_format",abort:!1},U(t)))}function oh(e,t){return new e(v({type:"string",format:"xid",check:"string_format",abort:!1},U(t)))}function sh(e,t){return new e(v({type:"string",format:"ksuid",check:"string_format",abort:!1},U(t)))}function ih(e,t){return new e(v({type:"string",format:"ipv4",check:"string_format",abort:!1},U(t)))}function ah(e,t){return new e(v({type:"string",format:"ipv6",check:"string_format",abort:!1},U(t)))}function ch(e,t){return new e(v({type:"string",format:"cidrv4",check:"string_format",abort:!1},U(t)))}function lh(e,t){return new e(v({type:"string",format:"cidrv6",check:"string_format",abort:!1},U(t)))}function uh(e,t){return new e(v({type:"string",format:"base64",check:"string_format",abort:!1},U(t)))}function dh(e,t){return new e(v({type:"string",format:"base64url",check:"string_format",abort:!1},U(t)))}function ph(e,t){return new e(v({type:"string",format:"e164",check:"string_format",abort:!1},U(t)))}function hh(e,t){return new e(v({type:"string",format:"jwt",check:"string_format",abort:!1},U(t)))}function fh(e,t){return new e(v({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},U(t)))}function gh(e,t){return new e(v({type:"string",format:"date",check:"string_format"},U(t)))}function mh(e,t){return new e(v({type:"string",format:"time",check:"string_format",precision:null},U(t)))}function bh(e,t){return new e(v({type:"string",format:"duration",check:"string_format"},U(t)))}function kh(e,t){return new e(v({type:"number",checks:[]},U(t)))}function _h(e,t){return new e(v({type:"number",check:"number_format",abort:!1,format:"safeint"},U(t)))}function vh(e,t){return new e(v({type:"boolean"},U(t)))}function yh(e){return new e({type:"any"})}function wh(e){return new e({type:"unknown"})}function xh(e,t){return new e(v({type:"never"},U(t)))}function ja(e,t){return new wa(M(v({check:"less_than"},U(t)),{value:e,inclusive:!1}))}function js(e,t){return new wa(M(v({check:"less_than"},U(t)),{value:e,inclusive:!0}))}function Za(e,t){return new xa(M(v({check:"greater_than"},U(t)),{value:e,inclusive:!1}))}function Zs(e,t){return new xa(M(v({check:"greater_than"},U(t)),{value:e,inclusive:!0}))}function qa(e,t){return new Nd(M(v({check:"multiple_of"},U(t)),{value:e}))}function Ha(e,t){return new Md(M(v({check:"max_length"},U(t)),{maximum:e}))}function Ao(e,t){return new Ud(M(v({check:"min_length"},U(t)),{minimum:e}))}function Fa(e,t){return new jd(M(v({check:"length_equals"},U(t)),{length:e}))}function Sh(e,t){return new Zd(M(v({check:"string_format",format:"regex"},U(t)),{pattern:e}))}function Th(e){return new qd(v({check:"string_format",format:"lowercase"},U(e)))}function Eh(e){return new Hd(v({check:"string_format",format:"uppercase"},U(e)))}function Ah(e,t){return new Fd(M(v({check:"string_format",format:"includes"},U(t)),{includes:e}))}function Ch(e,t){return new Bd(M(v({check:"string_format",format:"starts_with"},U(t)),{prefix:e}))}function Ph(e,t){return new Gd(M(v({check:"string_format",format:"ends_with"},U(t)),{suffix:e}))}function or(e){return new Wd({check:"overwrite",tx:e})}function Rh(e){return or(t=>t.normalize(e))}function Lh(){return or(e=>e.trim())}function Ih(){return or(e=>e.toLowerCase())}function $h(){return or(e=>e.toUpperCase())}function zh(){return or(e=>Zu(e))}function Oh(e,t,n){return new e(v({type:"array",element:t},U(n)))}function Nh(e,t,n){return new e(v({type:"custom",check:"custom",fn:t},U(n)))}function Dh(e){const t=Mh(n=>(n.addIssue=r=>{var o,i,a,d;if(typeof r=="string")n.issues.push(Rr(r,n.value,t._zod.def));else{const l=r;l.fatal&&(l.continue=!1),(o=l.code)!=null||(l.code="custom"),(i=l.input)!=null||(l.input=n.value),(a=l.inst)!=null||(l.inst=t),(d=l.continue)!=null||(l.continue=!t._zod.def.abort),n.issues.push(Rr(l))}},e(n.value,n)));return t}function Mh(e,t){const n=new st(v({check:"custom"},U(t)));return n._zod.check=e,n}function Ba(e){var n,r,o,i,a,d,l,p,h;let t=(n=e==null?void 0:e.target)!=null?n:"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:(r=e.processors)!=null?r:{},metadataRegistry:(o=e==null?void 0:e.metadata)!=null?o:Lr,target:t,unrepresentable:(i=e==null?void 0:e.unrepresentable)!=null?i:"throw",override:(a=e==null?void 0:e.override)!=null?a:(()=>{}),io:(d=e==null?void 0:e.io)!=null?d:"output",counter:0,seen:new Map,cycles:(l=e==null?void 0:e.cycles)!=null?l:"ref",reused:(p=e==null?void 0:e.reused)!=null?p:"inline",external:(h=e==null?void 0:e.external)!=null?h:void 0}}function Re(e,t,n={path:[],schemaPath:[]}){var h,g,m;var r;const o=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);const d=(g=(h=e._zod).toJSONSchema)==null?void 0:g.call(h);if(d)a.schema=d;else{const k=M(v({},n),{schemaPath:[...n.schemaPath,e],path:n.path});if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,k);else{const S=a.schema,$=t.processors[o.type];if(!$)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);$(e,t,S,k)}const y=e._zod.parent;y&&(a.ref||(a.ref=y),Re(y,t,k),t.seen.get(y).isParent=!0)}const l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&&Ye(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&a.schema._prefault&&((m=(r=a.schema).default)!=null||(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ga(e,t){var a,d,l,p;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const h of e.seen.entries()){const g=(a=e.metadataRegistry.get(h[0]))==null?void 0:a.id;if(g){const m=r.get(g);if(m&&m!==h[0])throw new Error(`Duplicate schema id "${g}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(g,h[0])}}const o=h=>{var S,$,E,j,A;const g=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const T=(S=e.external.registry.get(h[0]))==null?void 0:S.id,L=($=e.external.uri)!=null?$:(H=>H);if(T)return{ref:L(T)};const q=(j=(E=h[1].defId)!=null?E:h[1].schema.id)!=null?j:`schema${e.counter++}`;return h[1].defId=q,{defId:q,ref:`${L("__shared")}#/${g}/${q}`}}if(h[1]===n)return{ref:"#"};const k=`#/${g}/`,y=(A=h[1].schema.id)!=null?A:`__schema${e.counter++}`;return{defId:y,ref:k+y}},i=h=>{if(h[1].schema.$ref)return;const g=h[1],{ref:m,defId:k}=o(h);g.def=v({},g.schema),k&&(g.defId=k);const y=g.schema;for(const S in y)delete y[S];y.$ref=m};if(e.cycles==="throw")for(const h of e.seen.entries()){const g=h[1];if(g.cycle)throw new Error(`Cycle detected: #/${(d=g.cycle)==null?void 0:d.join("/")}/<root>
|
|
1623
|
+
`)}g.write("payload.value = newResult;"),g.write("return payload;");const v=g.compile();return(y,x)=>v(f,y,x)};let s;const o=yr,a=!Cl.jitless,l=a&&Bg.value,u=e.catchall;let h;A._zod.parse=(f,g)=>{h!=null||(h=n.value);const m=f.value;return o(m)?a&&l&&(g==null?void 0:g.async)===!1&&g.jitless!==!0?(s||(s=r(e.shape)),f=s(f,g),u?Kl([],m,f,g,h,A):f):t(f,g):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:A}),f)}});function Nl(A,e,t,n){for(const s of A)if(s.issues.length===0)return e.value=s.value,e;const r=A.filter(s=>!Kn(s));return r.length===1?(e.value=r[0].value,r[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:A.map(s=>s.issues.map(o=>Lt(o,n,It())))}),e)}const zl=_("$ZodUnion",(A,e)=>{QA.init(A,e),oA(A._zod,"optin",()=>e.options.some(r=>r._zod.optin==="optional")?"optional":void 0),oA(A._zod,"optout",()=>e.options.some(r=>r._zod.optout==="optional")?"optional":void 0),oA(A._zod,"values",()=>{if(e.options.every(r=>r._zod.values))return new Set(e.options.flatMap(r=>Array.from(r._zod.values)))}),oA(A._zod,"pattern",()=>{if(e.options.every(r=>r._zod.pattern)){const r=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${r.map(s=>zi(s.source)).join("|")})$`)}});const t=e.options.length===1,n=e.options[0]._zod.run;A._zod.parse=(r,s)=>{if(t)return n(r,s);let o=!1;const a=[];for(const i of e.options){const l=i._zod.run({value:r.value,issues:[]},s);if(l instanceof Promise)a.push(l),o=!0;else{if(l.issues.length===0)return l;a.push(l)}}return o?Promise.all(a).then(i=>Nl(i,r,A,s)):Nl(a,r,A,s)}}),rw=_("$ZodDiscriminatedUnion",(A,e)=>{e.inclusive=!1,zl.init(A,e);const t=A._zod.parse;oA(A._zod,"propValues",()=>{const r={};for(const s of e.options){const o=s._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(const[a,i]of Object.entries(o)){r[a]||(r[a]=new Set);for(const l of i)r[a].add(l)}}return r});const n=Os(()=>{var o;const r=e.options,s=new Map;for(const a of r){const i=(o=a._zod.propValues)==null?void 0:o[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const l of i){if(s.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);s.set(l,a)}}return s});A._zod.parse=(r,s)=>{const o=r.value;if(!yr(o))return r.issues.push({code:"invalid_type",expected:"object",input:o,inst:A}),r;const a=n.value.get(o==null?void 0:o[e.discriminator]);return a?a._zod.run(r,s):e.unionFallback?t(r,s):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:A}),r)}}),sw=_("$ZodIntersection",(A,e)=>{QA.init(A,e),A._zod.parse=(t,n)=>{const r=t.value,s=e.left._zod.run({value:r,issues:[]},n),o=e.right._zod.run({value:r,issues:[]},n);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([i,l])=>$l(t,i,l)):$l(t,s,o)}});function Xi(A,e){if(A===e)return{valid:!0,data:A};if(A instanceof Date&&e instanceof Date&&+A==+e)return{valid:!0,data:A};if(Mn(A)&&Mn(e)){const t=Object.keys(e),n=Object.keys(A).filter(s=>t.indexOf(s)!==-1),r=k(k({},A),e);for(const s of n){const o=Xi(A[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};r[s]=o.data}return{valid:!0,data:r}}if(Array.isArray(A)&&Array.isArray(e)){if(A.length!==e.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;n<A.length;n++){const r=A[n],s=e[n],o=Xi(r,s);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};t.push(o.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function $l(A,e,t){const n=new Map;let r;for(const a of e.issues)if(a.code==="unrecognized_keys"){r!=null||(r=a);for(const i of a.keys)n.has(i)||n.set(i,{}),n.get(i).l=!0}else A.issues.push(a);for(const a of t.issues)if(a.code==="unrecognized_keys")for(const i of a.keys)n.has(i)||n.set(i,{}),n.get(i).r=!0;else A.issues.push(a);const s=[...n].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&r&&A.issues.push($(k({},r),{keys:s})),Kn(A))return A;const o=Xi(e.value,t.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return A.value=o.data,A}const ow=_("$ZodRecord",(A,e)=>{QA.init(A,e),A._zod.parse=(t,n)=>{const r=t.value;if(!Mn(r))return t.issues.push({expected:"record",code:"invalid_type",input:r,inst:A}),t;const s=[],o=e.keyType._zod.values;if(o){t.value={};const a=new Set;for(const l of o)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){a.add(typeof l=="number"?l.toString():l);const u=e.valueType._zod.run({value:r[l],issues:[]},n);u instanceof Promise?s.push(u.then(h=>{h.issues.length&&t.issues.push(...Nn(l,h.issues)),t.value[l]=h.value})):(u.issues.length&&t.issues.push(...Nn(l,u.issues)),t.value[l]=u.value)}let i;for(const l in r)a.has(l)||(i=i!=null?i:[],i.push(l));i&&i.length>0&&t.issues.push({code:"unrecognized_keys",input:r,inst:A,keys:i})}else{t.value={};for(const a of Reflect.ownKeys(r)){if(a==="__proto__")continue;let i=e.keyType._zod.run({value:a,issues:[]},n);if(i instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Tl.test(a)&&i.issues.length&&i.issues.some(h=>h.code==="invalid_type"&&h.expected==="number")){const h=e.keyType._zod.run({value:Number(a),issues:[]},n);if(h instanceof Promise)throw new Error("Async schemas not supported in object keys currently");h.issues.length===0&&(i=h)}if(i.issues.length){e.mode==="loose"?t.value[a]=r[a]:t.issues.push({code:"invalid_key",origin:"record",issues:i.issues.map(h=>Lt(h,n,It())),input:a,path:[a],inst:A});continue}const u=e.valueType._zod.run({value:r[a],issues:[]},n);u instanceof Promise?s.push(u.then(h=>{h.issues.length&&t.issues.push(...Nn(a,h.issues)),t.value[i.value]=h.value})):(u.issues.length&&t.issues.push(...Nn(a,u.issues)),t.value[i.value]=u.value)}}return s.length?Promise.all(s).then(()=>t):t}}),iw=_("$ZodEnum",(A,e)=>{QA.init(A,e);const t=bl(e.entries),n=new Set(t);A._zod.values=n,A._zod.pattern=new RegExp(`^(${t.filter(r=>wg.has(typeof r)).map(r=>typeof r=="string"?Pn(r):r.toString()).join("|")})$`),A._zod.parse=(r,s)=>{const o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t,input:o,inst:A}),r}}),aw=_("$ZodLiteral",(A,e)=>{if(QA.init(A,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");const t=new Set(e.values);A._zod.values=t,A._zod.pattern=new RegExp(`^(${e.values.map(n=>typeof n=="string"?Pn(n):n?Pn(n.toString()):String(n)).join("|")})$`),A._zod.parse=(n,r)=>{const s=n.value;return t.has(s)||n.issues.push({code:"invalid_value",values:e.values,input:s,inst:A}),n}}),cw=_("$ZodTransform",(A,e)=>{QA.init(A,e),A._zod.parse=(t,n)=>{if(n.direction==="backward")throw new ml(A.constructor.name);const r=e.transform(t.value,t);if(n.async)return(r instanceof Promise?r:Promise.resolve(r)).then(o=>(t.value=o,t));if(r instanceof Promise)throw new On;return t.value=r,t}});function Gl(A,e){return A.issues.length&&e===void 0?{issues:[],value:void 0}:A}const Vl=_("$ZodOptional",(A,e)=>{QA.init(A,e),A._zod.optin="optional",A._zod.optout="optional",oA(A._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),oA(A._zod,"pattern",()=>{const t=e.innerType._zod.pattern;return t?new RegExp(`^(${zi(t.source)})?$`):void 0}),A._zod.parse=(t,n)=>{if(e.innerType._zod.optin==="optional"){const r=e.innerType._zod.run(t,n);return r instanceof Promise?r.then(s=>Gl(s,t.value)):Gl(r,t.value)}return t.value===void 0?t:e.innerType._zod.run(t,n)}}),lw=_("$ZodExactOptional",(A,e)=>{Vl.init(A,e),oA(A._zod,"values",()=>e.innerType._zod.values),oA(A._zod,"pattern",()=>e.innerType._zod.pattern),A._zod.parse=(t,n)=>e.innerType._zod.run(t,n)}),uw=_("$ZodNullable",(A,e)=>{QA.init(A,e),oA(A._zod,"optin",()=>e.innerType._zod.optin),oA(A._zod,"optout",()=>e.innerType._zod.optout),oA(A._zod,"pattern",()=>{const t=e.innerType._zod.pattern;return t?new RegExp(`^(${zi(t.source)}|null)$`):void 0}),oA(A._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),A._zod.parse=(t,n)=>t.value===null?t:e.innerType._zod.run(t,n)}),dw=_("$ZodDefault",(A,e)=>{QA.init(A,e),A._zod.optin="optional",oA(A._zod,"values",()=>e.innerType._zod.values),A._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);if(t.value===void 0)return t.value=e.defaultValue,t;const r=e.innerType._zod.run(t,n);return r instanceof Promise?r.then(s=>Zl(s,e)):Zl(r,e)}});function Zl(A,e){return A.value===void 0&&(A.value=e.defaultValue),A}const pw=_("$ZodPrefault",(A,e)=>{QA.init(A,e),A._zod.optin="optional",oA(A._zod,"values",()=>e.innerType._zod.values),A._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=e.defaultValue),e.innerType._zod.run(t,n))}),hw=_("$ZodNonOptional",(A,e)=>{QA.init(A,e),oA(A._zod,"values",()=>{const t=e.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),A._zod.parse=(t,n)=>{const r=e.innerType._zod.run(t,n);return r instanceof Promise?r.then(s=>Xl(s,A)):Xl(r,A)}});function Xl(A,e){return!A.issues.length&&A.value===void 0&&A.issues.push({code:"invalid_type",expected:"nonoptional",input:A.value,inst:e}),A}const fw=_("$ZodCatch",(A,e)=>{QA.init(A,e),oA(A._zod,"optin",()=>e.innerType._zod.optin),oA(A._zod,"optout",()=>e.innerType._zod.optout),oA(A._zod,"values",()=>e.innerType._zod.values),A._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);const r=e.innerType._zod.run(t,n);return r instanceof Promise?r.then(s=>(t.value=s.value,s.issues.length&&(t.value=e.catchValue($(k({},t),{error:{issues:s.issues.map(o=>Lt(o,n,It()))},input:t.value})),t.issues=[]),t)):(t.value=r.value,r.issues.length&&(t.value=e.catchValue($(k({},t),{error:{issues:r.issues.map(s=>Lt(s,n,It()))},input:t.value})),t.issues=[]),t)}}),gw=_("$ZodPipe",(A,e)=>{QA.init(A,e),oA(A._zod,"values",()=>e.in._zod.values),oA(A._zod,"optin",()=>e.in._zod.optin),oA(A._zod,"optout",()=>e.out._zod.optout),oA(A._zod,"propValues",()=>e.in._zod.propValues),A._zod.parse=(t,n)=>{if(n.direction==="backward"){const s=e.out._zod.run(t,n);return s instanceof Promise?s.then(o=>$s(o,e.in,n)):$s(s,e.in,n)}const r=e.in._zod.run(t,n);return r instanceof Promise?r.then(s=>$s(s,e.out,n)):$s(r,e.out,n)}});function $s(A,e,t){return A.issues.length?(A.aborted=!0,A):e._zod.run({value:A.value,issues:A.issues},t)}const Bw=_("$ZodReadonly",(A,e)=>{QA.init(A,e),oA(A._zod,"propValues",()=>e.innerType._zod.propValues),oA(A._zod,"values",()=>e.innerType._zod.values),oA(A._zod,"optin",()=>{var t,n;return(n=(t=e.innerType)==null?void 0:t._zod)==null?void 0:n.optin}),oA(A._zod,"optout",()=>{var t,n;return(n=(t=e.innerType)==null?void 0:t._zod)==null?void 0:n.optout}),A._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);const r=e.innerType._zod.run(t,n);return r instanceof Promise?r.then(Wl):Wl(r)}});function Wl(A){return A.value=Object.freeze(A.value),A}const ww=_("$ZodCustom",(A,e)=>{fe.init(A,e),QA.init(A,e),A._zod.parse=(t,n)=>t,A._zod.check=t=>{const n=t.value,r=e.fn(n);if(r instanceof Promise)return r.then(s=>Jl(s,t,n,A));Jl(r,t,n,A)}});function Jl(A,e,t,n){var r;if(!A){const s={code:"custom",input:t,inst:n,path:[...(r=n._zod.def.path)!=null?r:[]],continue:!n._zod.def.abort};n._zod.def.params&&(s.params=n._zod.def.params),e.issues.push(Ur(s))}}var jl;class mw{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){var n;const t=e._zod.parent;if(t){const r=k({},(n=this.get(t))!=null?n:{});delete r.id;const s=k(k({},r),this._map.get(e));return Object.keys(s).length?s:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Cw(){return new mw}(xf=(jl=globalThis).__zod_globalRegistry)!=null||(jl.__zod_globalRegistry=Cw());const Er=globalThis.__zod_globalRegistry;function bw(A,e){return new A(k({type:"string"},G(e)))}function Qw(A,e){return new A(k({type:"string",format:"email",check:"string_format",abort:!1},G(e)))}function Yl(A,e){return new A(k({type:"string",format:"guid",check:"string_format",abort:!1},G(e)))}function yw(A,e){return new A(k({type:"string",format:"uuid",check:"string_format",abort:!1},G(e)))}function Uw(A,e){return new A(k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4"},G(e)))}function Ew(A,e){return new A(k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6"},G(e)))}function Fw(A,e){return new A(k({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7"},G(e)))}function kw(A,e){return new A(k({type:"string",format:"url",check:"string_format",abort:!1},G(e)))}function vw(A,e){return new A(k({type:"string",format:"emoji",check:"string_format",abort:!1},G(e)))}function _w(A,e){return new A(k({type:"string",format:"nanoid",check:"string_format",abort:!1},G(e)))}function xw(A,e){return new A(k({type:"string",format:"cuid",check:"string_format",abort:!1},G(e)))}function Sw(A,e){return new A(k({type:"string",format:"cuid2",check:"string_format",abort:!1},G(e)))}function Iw(A,e){return new A(k({type:"string",format:"ulid",check:"string_format",abort:!1},G(e)))}function Tw(A,e){return new A(k({type:"string",format:"xid",check:"string_format",abort:!1},G(e)))}function Hw(A,e){return new A(k({type:"string",format:"ksuid",check:"string_format",abort:!1},G(e)))}function Lw(A,e){return new A(k({type:"string",format:"ipv4",check:"string_format",abort:!1},G(e)))}function Dw(A,e){return new A(k({type:"string",format:"ipv6",check:"string_format",abort:!1},G(e)))}function Rw(A,e){return new A(k({type:"string",format:"cidrv4",check:"string_format",abort:!1},G(e)))}function Ow(A,e){return new A(k({type:"string",format:"cidrv6",check:"string_format",abort:!1},G(e)))}function Mw(A,e){return new A(k({type:"string",format:"base64",check:"string_format",abort:!1},G(e)))}function Pw(A,e){return new A(k({type:"string",format:"base64url",check:"string_format",abort:!1},G(e)))}function Kw(A,e){return new A(k({type:"string",format:"e164",check:"string_format",abort:!1},G(e)))}function Nw(A,e){return new A(k({type:"string",format:"jwt",check:"string_format",abort:!1},G(e)))}function zw(A,e){return new A(k({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null},G(e)))}function $w(A,e){return new A(k({type:"string",format:"date",check:"string_format"},G(e)))}function Gw(A,e){return new A(k({type:"string",format:"time",check:"string_format",precision:null},G(e)))}function Vw(A,e){return new A(k({type:"string",format:"duration",check:"string_format"},G(e)))}function Zw(A,e){return new A(k({type:"number",checks:[]},G(e)))}function Xw(A,e){return new A(k({type:"number",check:"number_format",abort:!1,format:"safeint"},G(e)))}function Ww(A,e){return new A(k({type:"boolean"},G(e)))}function Jw(A){return new A({type:"any"})}function jw(A){return new A({type:"unknown"})}function Yw(A,e){return new A(k({type:"never"},G(e)))}function ql(A,e){return new Ll($(k({check:"less_than"},G(e)),{value:A,inclusive:!1}))}function Wi(A,e){return new Ll($(k({check:"less_than"},G(e)),{value:A,inclusive:!0}))}function Au(A,e){return new Dl($(k({check:"greater_than"},G(e)),{value:A,inclusive:!1}))}function Ji(A,e){return new Dl($(k({check:"greater_than"},G(e)),{value:A,inclusive:!0}))}function eu(A,e){return new uB($(k({check:"multiple_of"},G(e)),{value:A}))}function tu(A,e){return new pB($(k({check:"max_length"},G(e)),{maximum:A}))}function Gs(A,e){return new hB($(k({check:"min_length"},G(e)),{minimum:A}))}function nu(A,e){return new fB($(k({check:"length_equals"},G(e)),{length:A}))}function qw(A,e){return new gB($(k({check:"string_format",format:"regex"},G(e)),{pattern:A}))}function Am(A){return new BB(k({check:"string_format",format:"lowercase"},G(A)))}function em(A){return new wB(k({check:"string_format",format:"uppercase"},G(A)))}function tm(A,e){return new mB($(k({check:"string_format",format:"includes"},G(e)),{includes:A}))}function nm(A,e){return new CB($(k({check:"string_format",format:"starts_with"},G(e)),{prefix:A}))}function rm(A,e){return new bB($(k({check:"string_format",format:"ends_with"},G(e)),{suffix:A}))}function zn(A){return new QB({check:"overwrite",tx:A})}function sm(A){return zn(e=>e.normalize(A))}function om(){return zn(A=>A.trim())}function im(){return zn(A=>A.toLowerCase())}function am(){return zn(A=>A.toUpperCase())}function cm(){return zn(A=>gg(A))}function lm(A,e,t){return new A(k({type:"array",element:e},G(t)))}function um(A,e,t){return new A(k({type:"custom",check:"custom",fn:e},G(t)))}function dm(A){const e=pm(t=>(t.addIssue=n=>{var r,s,o,a;if(typeof n=="string")t.issues.push(Ur(n,t.value,e._zod.def));else{const i=n;i.fatal&&(i.continue=!1),(r=i.code)!=null||(i.code="custom"),(s=i.input)!=null||(i.input=t.value),(o=i.inst)!=null||(i.inst=e),(a=i.continue)!=null||(i.continue=!e._zod.def.abort),t.issues.push(Ur(i))}},A(t.value,t)));return e}function pm(A,e){const t=new fe(k({check:"custom"},G(e)));return t._zod.check=A,t}function ru(A){var t,n,r,s,o,a,i,l,u;let e=(t=A==null?void 0:A.target)!=null?t:"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:(n=A.processors)!=null?n:{},metadataRegistry:(r=A==null?void 0:A.metadata)!=null?r:Er,target:e,unrepresentable:(s=A==null?void 0:A.unrepresentable)!=null?s:"throw",override:(o=A==null?void 0:A.override)!=null?o:(()=>{}),io:(a=A==null?void 0:A.io)!=null?a:"output",counter:0,seen:new Map,cycles:(i=A==null?void 0:A.cycles)!=null?i:"ref",reused:(l=A==null?void 0:A.reused)!=null?l:"inline",external:(u=A==null?void 0:A.external)!=null?u:void 0}}function MA(A,e,t={path:[],schemaPath:[]}){var u,h,f;var n;const r=A._zod.def,s=e.seen.get(A);if(s)return s.count++,t.schemaPath.includes(A)&&(s.cycle=t.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:t.path};e.seen.set(A,o);const a=(h=(u=A._zod).toJSONSchema)==null?void 0:h.call(u);if(a)o.schema=a;else{const g=$(k({},t),{schemaPath:[...t.schemaPath,A],path:t.path});if(A._zod.processJSONSchema)A._zod.processJSONSchema(e,o.schema,g);else{const Q=o.schema,U=e.processors[r.type];if(!U)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);U(A,e,Q,g)}const m=A._zod.parent;m&&(o.ref||(o.ref=m),MA(m,e,g),e.seen.get(m).isParent=!0)}const i=e.metadataRegistry.get(A);return i&&Object.assign(o.schema,i),e.io==="input"&&ie(A)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((f=(n=o.schema).default)!=null||(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(A).schema}function su(A,e){var o,a,i,l;const t=A.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const u of A.seen.entries()){const h=(o=A.metadataRegistry.get(u[0]))==null?void 0:o.id;if(h){const f=n.get(h);if(f&&f!==u[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(h,u[0])}}const r=u=>{var Q,U,E,v,F;const h=A.target==="draft-2020-12"?"$defs":"definitions";if(A.external){const y=(Q=A.external.registry.get(u[0]))==null?void 0:Q.id,x=(U=A.external.uri)!=null?U:(I=>I);if(y)return{ref:x(y)};const R=(v=(E=u[1].defId)!=null?E:u[1].schema.id)!=null?v:`schema${A.counter++}`;return u[1].defId=R,{defId:R,ref:`${x("__shared")}#/${h}/${R}`}}if(u[1]===t)return{ref:"#"};const g=`#/${h}/`,m=(F=u[1].schema.id)!=null?F:`__schema${A.counter++}`;return{defId:m,ref:g+m}},s=u=>{if(u[1].schema.$ref)return;const h=u[1],{ref:f,defId:g}=r(u);h.def=k({},h.schema),g&&(h.defId=g);const m=h.schema;for(const Q in m)delete m[Q];m.$ref=f};if(A.cycles==="throw")for(const u of A.seen.entries()){const h=u[1];if(h.cycle)throw new Error(`Cycle detected: #/${(a=h.cycle)==null?void 0:a.join("/")}/<root>
|
|
1570
1624
|
|
|
1571
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const h of e.seen.entries()){const g=h[1];if(t===h[0]){i(h);continue}if(e.external){const k=(l=e.external.registry.get(h[0]))==null?void 0:l.id;if(t!==h[0]&&k){i(h);continue}}if((p=e.metadataRegistry.get(h[0]))==null?void 0:p.id){i(h);continue}if(g.cycle){i(h);continue}if(g.count>1&&e.reused==="ref"){i(h);continue}}}function Wa(e,t){var a,d,l,p,h;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=g=>{var E,j,A;const m=e.seen.get(g);if(m.ref===null)return;const k=(E=m.def)!=null?E:m.schema,y=v({},k),S=m.ref;if(m.ref=null,S){r(S);const T=e.seen.get(S),L=T.schema;if(L.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(k.allOf=(j=k.allOf)!=null?j:[],k.allOf.push(L)):Object.assign(k,L),Object.assign(k,y),g._zod.parent===S)for(const H in k)H==="$ref"||H==="allOf"||H in y||delete k[H];if(L.$ref)for(const H in k)H==="$ref"||H==="allOf"||H in T.def&&JSON.stringify(k[H])===JSON.stringify(T.def[H])&&delete k[H]}const $=g._zod.parent;if($&&$!==S){r($);const T=e.seen.get($);if(T!=null&&T.schema.$ref&&(k.$ref=T.schema.$ref,T.def))for(const L in k)L==="$ref"||L==="allOf"||L in T.def&&JSON.stringify(k[L])===JSON.stringify(T.def[L])&&delete k[L]}e.override({zodSchema:g,jsonSchema:k,path:(A=m.path)!=null?A:[]})};for(const g of[...e.seen.entries()].reverse())r(g[0]);const o={};if(e.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":e.target,(a=e.external)!=null&&a.uri){const g=(d=e.external.registry.get(t))==null?void 0:d.id;if(!g)throw new Error("Schema is missing an `id` property");o.$id=e.external.uri(g)}Object.assign(o,(l=n.def)!=null?l:n.schema);const i=(h=(p=e.external)==null?void 0:p.defs)!=null?h:{};for(const g of e.seen.entries()){const m=g[1];m.def&&m.defId&&(i[m.defId]=m.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?o.$defs=i:o.definitions=i);try{const g=JSON.parse(JSON.stringify(o));return Object.defineProperty(g,"~standard",{value:M(v({},t["~standard"]),{jsonSchema:{input:Co(t,"input",e.processors),output:Co(t,"output",e.processors)}}),enumerable:!1,writable:!1}),g}catch(g){throw new Error("Error converting schema to JSON.")}}function Ye(e,t){const n=t!=null?t:{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Ye(r.element,n);if(r.type==="set")return Ye(r.valueType,n);if(r.type==="lazy")return Ye(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Ye(r.innerType,n);if(r.type==="intersection")return Ye(r.left,n)||Ye(r.right,n);if(r.type==="record"||r.type==="map")return Ye(r.keyType,n)||Ye(r.valueType,n);if(r.type==="pipe")return Ye(r.in,n)||Ye(r.out,n);if(r.type==="object"){for(const o in r.shape)if(Ye(r.shape[o],n))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(Ye(o,n))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(Ye(o,n))return!0;return!!(r.rest&&Ye(r.rest,n))}return!1}const Uh=(e,t={})=>n=>{const r=Ba(M(v({},n),{processors:t}));return Re(e,r),Ga(r,e),Wa(r,e)},Co=(e,t,n={})=>r=>{const{libraryOptions:o,target:i}=r!=null?r:{},a=Ba(M(v({},o!=null?o:{}),{target:i,io:t,processors:n}));return Re(e,a),Ga(a,e),Wa(a,e)},jh={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Zh=(e,t,n,r)=>{var h;const o=n;o.type="string";const{minimum:i,maximum:a,format:d,patterns:l,contentEncoding:p}=e._zod.bag;if(typeof i=="number"&&(o.minLength=i),typeof a=="number"&&(o.maxLength=a),d&&(o.format=(h=jh[d])!=null?h:d,o.format===""&&delete o.format,d==="time"&&delete o.format),p&&(o.contentEncoding=p),l&&l.size>0){const g=[...l];g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(m=>M(v({},t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{}),{pattern:m.source}))])}},qh=(e,t,n,r)=>{const o=n,{minimum:i,maximum:a,format:d,multipleOf:l,exclusiveMaximum:p,exclusiveMinimum:h}=e._zod.bag;typeof d=="string"&&d.includes("int")?o.type="integer":o.type="number",typeof h=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.minimum=h,o.exclusiveMinimum=!0):o.exclusiveMinimum=h),typeof i=="number"&&(o.minimum=i,typeof h=="number"&&t.target!=="draft-04"&&(h>=i?delete o.minimum:delete o.exclusiveMinimum)),typeof p=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p),typeof a=="number"&&(o.maximum=a,typeof p=="number"&&t.target!=="draft-04"&&(p<=a?delete o.maximum:delete o.exclusiveMaximum)),typeof l=="number"&&(o.multipleOf=l)},Hh=(e,t,n,r)=>{n.type="boolean"},Fh=(e,t,n,r)=>{n.not={}},Bh=(e,t,n,r)=>{},Gh=(e,t,n,r)=>{},Wh=(e,t,n,r)=>{const o=e._zod.def,i=ca(o.entries);i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),n.enum=i},Jh=(e,t,n,r)=>{const o=e._zod.def,i=[];for(const a of o.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else i.every(a=>typeof a=="number")&&(n.type="number"),i.every(a=>typeof a=="string")&&(n.type="string"),i.every(a=>typeof a=="boolean")&&(n.type="boolean"),i.every(a=>a===null)&&(n.type="null"),n.enum=i},Yh=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Vh=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Xh=(e,t,n,r)=>{const o=n,i=e._zod.def,{minimum:a,maximum:d}=e._zod.bag;typeof a=="number"&&(o.minItems=a),typeof d=="number"&&(o.maxItems=d),o.type="array",o.items=Re(i.element,t,M(v({},r),{path:[...r.path,"items"]}))},Kh=(e,t,n,r)=>{var p;const o=n,i=e._zod.def;o.type="object",o.properties={};const a=i.shape;for(const h in a)o.properties[h]=Re(a[h],t,M(v({},r),{path:[...r.path,"properties",h]}));const d=new Set(Object.keys(a)),l=new Set([...d].filter(h=>{const g=i.shape[h]._zod;return t.io==="input"?g.optin===void 0:g.optout===void 0}));l.size>0&&(o.required=Array.from(l)),((p=i.catchall)==null?void 0:p._zod.def.type)==="never"?o.additionalProperties=!1:i.catchall?i.catchall&&(o.additionalProperties=Re(i.catchall,t,M(v({},r),{path:[...r.path,"additionalProperties"]}))):t.io==="output"&&(o.additionalProperties=!1)},Qh=(e,t,n,r)=>{const o=e._zod.def,i=o.inclusive===!1,a=o.options.map((d,l)=>Re(d,t,M(v({},r),{path:[...r.path,i?"oneOf":"anyOf",l]})));i?n.oneOf=a:n.anyOf=a},ef=(e,t,n,r)=>{const o=e._zod.def,i=Re(o.left,t,M(v({},r),{path:[...r.path,"allOf",0]})),a=Re(o.right,t,M(v({},r),{path:[...r.path,"allOf",1]})),d=p=>"allOf"in p&&Object.keys(p).length===1,l=[...d(i)?i.allOf:[i],...d(a)?a.allOf:[a]];n.allOf=l},tf=(e,t,n,r)=>{const o=n,i=e._zod.def;o.type="object";const a=i.keyType,d=a._zod.bag,l=d==null?void 0:d.patterns;if(i.mode==="loose"&&l&&l.size>0){const h=Re(i.valueType,t,M(v({},r),{path:[...r.path,"patternProperties","*"]}));o.patternProperties={};for(const g of l)o.patternProperties[g.source]=h}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(o.propertyNames=Re(i.keyType,t,M(v({},r),{path:[...r.path,"propertyNames"]}))),o.additionalProperties=Re(i.valueType,t,M(v({},r),{path:[...r.path,"additionalProperties"]}));const p=a._zod.values;if(p){const h=[...p].filter(g=>typeof g=="string"||typeof g=="number");h.length>0&&(o.required=h)}},nf=(e,t,n,r)=>{const o=e._zod.def,i=Re(o.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=o.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},rf=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},of=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.default=JSON.parse(JSON.stringify(o.defaultValue))},sf=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},af=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType;let a;try{a=o.catchValue(void 0)}catch(d){throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},cf=(e,t,n,r)=>{const o=e._zod.def,i=t.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;Re(i,t,r);const a=t.seen.get(e);a.ref=i},lf=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType,n.readOnly=!0},Ja=(e,t,n,r)=>{const o=e._zod.def;Re(o.innerType,t,r);const i=t.seen.get(e);i.ref=o.innerType},uf=w("ZodISODateTime",(e,t)=>{ap.init(e,t),we.init(e,t)});function df(e){return fh(uf,e)}const pf=w("ZodISODate",(e,t)=>{cp.init(e,t),we.init(e,t)});function hf(e){return gh(pf,e)}const ff=w("ZodISOTime",(e,t)=>{lp.init(e,t),we.init(e,t)});function gf(e){return mh(ff,e)}const mf=w("ZodISODuration",(e,t)=>{up.init(e,t),we.init(e,t)});function bf(e){return bh(mf,e)}const dt=w("ZodError",(e,t)=>{fa.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ed(e,n)},flatten:{value:n=>Qu(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,Is,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,Is,2)}},isEmpty:{get(){return e.issues.length===0}}})},{Parent:Error}),kf=Ns(dt),_f=Ds(dt),vf=wo(dt),yf=xo(dt),wf=rd(dt),xf=od(dt),Sf=sd(dt),Tf=id(dt),Ef=ad(dt),Af=cd(dt),Cf=ld(dt),Pf=ud(dt),ke=w("ZodType",(e,t)=>(me.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Co(e,"input"),output:Co(e,"output")}}),e.toJSONSchema=Uh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>{var r;return e.clone(mn(t,{checks:[...(r=t.checks)!=null?r:[],...n.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0})},e.with=e.check,e.clone=(n,r)=>bn(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>kf(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>vf(e,n,r),e.parseAsync=(n,r)=>z(null,null,function*(){return _f(e,n,r,{callee:e.parseAsync})}),e.safeParseAsync=(n,r)=>z(null,null,function*(){return yf(e,n,r)}),e.spa=e.safeParseAsync,e.encode=(n,r)=>wf(e,n,r),e.decode=(n,r)=>xf(e,n,r),e.encodeAsync=(n,r)=>z(null,null,function*(){return Sf(e,n,r)}),e.decodeAsync=(n,r)=>z(null,null,function*(){return Tf(e,n,r)}),e.safeEncode=(n,r)=>Ef(e,n,r),e.safeDecode=(n,r)=>Af(e,n,r),e.safeEncodeAsync=(n,r)=>z(null,null,function*(){return Cf(e,n,r)}),e.safeDecodeAsync=(n,r)=>z(null,null,function*(){return Pf(e,n,r)}),e.refine=(n,r)=>e.check(Sg(n,r)),e.superRefine=n=>e.check(Tg(n)),e.overwrite=n=>e.check(or(n)),e.optional=()=>oc(e),e.exactOptional=()=>dg(e),e.nullable=()=>sc(e),e.nullish=()=>oc(sc(e)),e.nonoptional=n=>bg(e,n),e.array=()=>ct(e),e.or=n=>ng([e,n]),e.and=n=>sg(e,n),e.transform=n=>ac(e,lg(n)),e.default=n=>fg(e,n),e.prefault=n=>mg(e,n),e.catch=n=>_g(e,n),e.pipe=n=>ac(e,n),e.readonly=()=>wg(e),e.describe=n=>{const r=e.clone();return Lr.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=Lr.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Lr.get(e);const r=e.clone();return Lr.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),Ya=w("_ZodString",(e,t)=>{var r,o,i;Ms.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(a,d,l)=>Zh(e,a,d);const n=e._zod.bag;e.format=(r=n.format)!=null?r:null,e.minLength=(o=n.minimum)!=null?o:null,e.maxLength=(i=n.maximum)!=null?i:null,e.regex=(...a)=>e.check(Sh(...a)),e.includes=(...a)=>e.check(Ah(...a)),e.startsWith=(...a)=>e.check(Ch(...a)),e.endsWith=(...a)=>e.check(Ph(...a)),e.min=(...a)=>e.check(Ao(...a)),e.max=(...a)=>e.check(Ha(...a)),e.length=(...a)=>e.check(Fa(...a)),e.nonempty=(...a)=>e.check(Ao(1,...a)),e.lowercase=a=>e.check(Th(a)),e.uppercase=a=>e.check(Eh(a)),e.trim=()=>e.check(Lh()),e.normalize=(...a)=>e.check(Rh(...a)),e.toLowerCase=()=>e.check(Ih()),e.toUpperCase=()=>e.check($h()),e.slugify=()=>e.check(zh())}),Rf=w("ZodString",(e,t)=>{Ms.init(e,t),Ya.init(e,t),e.email=n=>e.check(Wp(Lf,n)),e.url=n=>e.check(Kp(If,n)),e.jwt=n=>e.check(hh(Wf,n)),e.emoji=n=>e.check(Qp($f,n)),e.guid=n=>e.check(Ua(Va,n)),e.uuid=n=>e.check(Jp(Po,n)),e.uuidv4=n=>e.check(Yp(Po,n)),e.uuidv6=n=>e.check(Vp(Po,n)),e.uuidv7=n=>e.check(Xp(Po,n)),e.nanoid=n=>e.check(eh(zf,n)),e.guid=n=>e.check(Ua(Va,n)),e.cuid=n=>e.check(th(Of,n)),e.cuid2=n=>e.check(nh(Nf,n)),e.ulid=n=>e.check(rh(Df,n)),e.base64=n=>e.check(uh(Ff,n)),e.base64url=n=>e.check(dh(Bf,n)),e.xid=n=>e.check(oh(Mf,n)),e.ksuid=n=>e.check(sh(Uf,n)),e.ipv4=n=>e.check(ih(jf,n)),e.ipv6=n=>e.check(ah(Zf,n)),e.cidrv4=n=>e.check(ch(qf,n)),e.cidrv6=n=>e.check(lh(Hf,n)),e.e164=n=>e.check(ph(Gf,n)),e.datetime=n=>e.check(df(n)),e.date=n=>e.check(hf(n)),e.time=n=>e.check(gf(n)),e.duration=n=>e.check(bf(n))});function P(e){return Gp(Rf,e)}const we=w("ZodStringFormat",(e,t)=>{be.init(e,t),Ya.init(e,t)}),Lf=w("ZodEmail",(e,t)=>{Kd.init(e,t),we.init(e,t)}),Va=w("ZodGUID",(e,t)=>{Vd.init(e,t),we.init(e,t)}),Po=w("ZodUUID",(e,t)=>{Xd.init(e,t),we.init(e,t)}),If=w("ZodURL",(e,t)=>{Qd.init(e,t),we.init(e,t)}),$f=w("ZodEmoji",(e,t)=>{ep.init(e,t),we.init(e,t)}),zf=w("ZodNanoID",(e,t)=>{tp.init(e,t),we.init(e,t)}),Of=w("ZodCUID",(e,t)=>{np.init(e,t),we.init(e,t)}),Nf=w("ZodCUID2",(e,t)=>{rp.init(e,t),we.init(e,t)}),Df=w("ZodULID",(e,t)=>{op.init(e,t),we.init(e,t)}),Mf=w("ZodXID",(e,t)=>{sp.init(e,t),we.init(e,t)}),Uf=w("ZodKSUID",(e,t)=>{ip.init(e,t),we.init(e,t)}),jf=w("ZodIPv4",(e,t)=>{dp.init(e,t),we.init(e,t)}),Zf=w("ZodIPv6",(e,t)=>{pp.init(e,t),we.init(e,t)}),qf=w("ZodCIDRv4",(e,t)=>{hp.init(e,t),we.init(e,t)}),Hf=w("ZodCIDRv6",(e,t)=>{fp.init(e,t),we.init(e,t)}),Ff=w("ZodBase64",(e,t)=>{gp.init(e,t),we.init(e,t)}),Bf=w("ZodBase64URL",(e,t)=>{bp.init(e,t),we.init(e,t)}),Gf=w("ZodE164",(e,t)=>{kp.init(e,t),we.init(e,t)}),Wf=w("ZodJWT",(e,t)=>{vp.init(e,t),we.init(e,t)}),Xa=w("ZodNumber",(e,t)=>{var r,o,i,a,d,l,p,h,g;Ta.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(m,k,y)=>qh(e,m,k),e.gt=(m,k)=>e.check(Za(m,k)),e.gte=(m,k)=>e.check(Zs(m,k)),e.min=(m,k)=>e.check(Zs(m,k)),e.lt=(m,k)=>e.check(ja(m,k)),e.lte=(m,k)=>e.check(js(m,k)),e.max=(m,k)=>e.check(js(m,k)),e.int=m=>e.check(Ka(m)),e.safe=m=>e.check(Ka(m)),e.positive=m=>e.check(Za(0,m)),e.nonnegative=m=>e.check(Zs(0,m)),e.negative=m=>e.check(ja(0,m)),e.nonpositive=m=>e.check(js(0,m)),e.multipleOf=(m,k)=>e.check(qa(m,k)),e.step=(m,k)=>e.check(qa(m,k)),e.finite=()=>e;const n=e._zod.bag;e.minValue=(i=Math.max((r=n.minimum)!=null?r:Number.NEGATIVE_INFINITY,(o=n.exclusiveMinimum)!=null?o:Number.NEGATIVE_INFINITY))!=null?i:null,e.maxValue=(l=Math.min((a=n.maximum)!=null?a:Number.POSITIVE_INFINITY,(d=n.exclusiveMaximum)!=null?d:Number.POSITIVE_INFINITY))!=null?l:null,e.isInt=((p=n.format)!=null?p:"").includes("int")||Number.isSafeInteger((h=n.multipleOf)!=null?h:.5),e.isFinite=!0,e.format=(g=n.format)!=null?g:null});function jt(e){return kh(Xa,e)}const Jf=w("ZodNumberFormat",(e,t)=>{yp.init(e,t),Xa.init(e,t)});function Ka(e){return _h(Jf,e)}const Yf=w("ZodBoolean",(e,t)=>{wp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Hh(e,n,r)});function _e(e){return vh(Yf,e)}const Vf=w("ZodAny",(e,t)=>{xp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Bh()});function Qa(){return yh(Vf)}const Xf=w("ZodUnknown",(e,t)=>{Sp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Gh()});function ec(){return wh(Xf)}const Kf=w("ZodNever",(e,t)=>{Tp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Fh(e,n,r)});function Qf(e){return xh(Kf,e)}const eg=w("ZodArray",(e,t)=>{Ep.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Xh(e,n,r,o),e.element=t.element,e.min=(n,r)=>e.check(Ao(n,r)),e.nonempty=n=>e.check(Ao(1,n)),e.max=(n,r)=>e.check(Ha(n,r)),e.length=(n,r)=>e.check(Fa(n,r)),e.unwrap=()=>e.element});function ct(e,t){return Oh(eg,e,t)}const tg=w("ZodObject",(e,t)=>{Cp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Kh(e,n,r,o),ne(e,"shape",()=>t.shape),e.keyof=()=>pt(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone(M(v({},e._zod.def),{catchall:n})),e.passthrough=()=>e.clone(M(v({},e._zod.def),{catchall:ec()})),e.loose=()=>e.clone(M(v({},e._zod.def),{catchall:ec()})),e.strict=()=>e.clone(M(v({},e._zod.def),{catchall:Qf()})),e.strip=()=>e.clone(M(v({},e._zod.def),{catchall:void 0})),e.extend=n=>Ju(e,n),e.safeExtend=n=>Yu(e,n),e.merge=n=>Vu(e,n),e.pick=n=>Gu(e,n),e.omit=n=>Wu(e,n),e.partial=(...n)=>Xu(rc,e,n[0]),e.required=(...n)=>Ku(ic,e,n[0])});function fe(e,t){const n=v({type:"object",shape:e!=null?e:{}},U(t));return new tg(n)}const tc=w("ZodUnion",(e,t)=>{Ra.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Qh(e,n,r,o),e.options=t.options});function ng(e,t){return new tc(v({type:"union",options:e},U(t)))}const rg=w("ZodDiscriminatedUnion",(e,t)=>{tc.init(e,t),Pp.init(e,t)});function nc(e,t,n){return new rg(v({type:"union",options:t,discriminator:e},U(n)))}const og=w("ZodIntersection",(e,t)=>{Rp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>ef(e,n,r,o)});function sg(e,t){return new og({type:"intersection",left:e,right:t})}const ig=w("ZodRecord",(e,t)=>{Lp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>tf(e,n,r,o),e.keyType=t.keyType,e.valueType=t.valueType});function Zt(e,t,n){return new ig(v({type:"record",keyType:e,valueType:t},U(n)))}const qs=w("ZodEnum",(e,t)=>{Ip.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(r,o,i)=>Wh(e,r,o),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,o)=>{const i={};for(const a of r)if(n.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new qs(M(v(M(v({},t),{checks:[]}),U(o)),{entries:i}))},e.exclude=(r,o)=>{const i=v({},t.entries);for(const a of r)if(n.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new qs(M(v(M(v({},t),{checks:[]}),U(o)),{entries:i}))}});function pt(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new qs(v({type:"enum",entries:n},U(t)))}const ag=w("ZodLiteral",(e,t)=>{$p.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Jh(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function ht(e,t){return new ag(v({type:"literal",values:Array.isArray(e)?e:[e]},U(t)))}const cg=w("ZodTransform",(e,t)=>{zp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Vh(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new ia(e.constructor.name);n.addIssue=i=>{var a,d,l;if(typeof i=="string")n.issues.push(Rr(i,n.value,t));else{const p=i;p.fatal&&(p.continue=!1),(a=p.code)!=null||(p.code="custom"),(d=p.input)!=null||(p.input=n.value),(l=p.inst)!=null||(p.inst=e),n.issues.push(Rr(p))}};const o=t.transform(n.value,n);return o instanceof Promise?o.then(i=>(n.value=i,n)):(n.value=o,n)}});function lg(e){return new cg({type:"transform",transform:e})}const rc=w("ZodOptional",(e,t)=>{$a.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ja(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function oc(e){return new rc({type:"optional",innerType:e})}const ug=w("ZodExactOptional",(e,t)=>{Op.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Ja(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function dg(e){return new ug({type:"optional",innerType:e})}const pg=w("ZodNullable",(e,t)=>{Np.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>nf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function sc(e){return new pg({type:"nullable",innerType:e})}const hg=w("ZodDefault",(e,t)=>{Dp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>of(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function fg(e,t){return new hg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():pa(t)}})}const gg=w("ZodPrefault",(e,t)=>{Mp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>sf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function mg(e,t){return new gg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():pa(t)}})}const ic=w("ZodNonOptional",(e,t)=>{Up.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>rf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function bg(e,t){return new ic(v({type:"nonoptional",innerType:e},U(t)))}const kg=w("ZodCatch",(e,t)=>{jp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>af(e,n,r,o),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _g(e,t){return new kg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const vg=w("ZodPipe",(e,t)=>{Zp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>cf(e,n,r,o),e.in=t.in,e.out=t.out});function ac(e,t){return new vg({type:"pipe",in:e,out:t})}const yg=w("ZodReadonly",(e,t)=>{qp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>lf(e,n,r,o),e.unwrap=()=>e._zod.def.innerType});function wg(e){return new yg({type:"readonly",innerType:e})}const xg=w("ZodCustom",(e,t)=>{Hp.init(e,t),ke.init(e,t),e._zod.processJSONSchema=(n,r,o)=>Yh(e,n)});function Sg(e,t={}){return Nh(xg,e,t)}function Tg(e){return Dh(e)}const Eg=fe({name:P().min(1).max(100).optional(),command:P().min(1).max(500),args:ct(P()).optional(),failOnError:_e().default(!0).optional(),timeout:jt().int().min(1e3).max(3e5).default(3e4).optional(),workingDirectory:P().optional(),env:Zt(P(),P()).optional(),runOnBackground:_e().optional(),agentTags:ct(P()).optional()});fe({name:P(),command:P(),success:_e(),exitCode:jt().optional(),stdout:P().optional(),stderr:P().optional(),error:P().optional(),duration:jt(),failOnError:_e()});const In=fe({path:P(),extraCommands:ct(Eg).optional(),id:P().uuid().optional(),rotationKey:P().optional(),usageStatus:pt(["free","in_use"]).optional(),agentTags:ct(P()).optional()}),Ag=nc("operation",[In.extend({operation:ht("create"),content:P().optional(),contentPath:P().optional(),encoding:pt(["utf-8","base64"]).optional()}),In.extend({operation:ht("merge"),data:Zt(P(),Qa()),mergeStrategy:pt(["deep","shallow"]).optional(),arrayMergeStrategy:pt(["concat","replace"]).optional()}),In.extend({operation:ht("modify"),content:P().optional(),contentPath:P().optional(),createIfMissing:_e().optional()}),In.extend({operation:ht("delete"),ignoreIfMissing:_e().optional()}),In.extend({operation:ht("createDirectory"),contentPath:P().optional(),mode:jt().optional(),ignoreIfExists:_e().optional()}),In.extend({operation:ht("download"),url:P().url(),headers:Zt(P(),P()).optional(),timeout:jt().min(1e3).max(3e5).optional()}),In.extend({operation:ht("gitClone"),gitUrl:P(),gitSecretKey:P().optional(),sourceBranch:P().optional(),targetBranch:P().optional(),originalBranch:P().optional(),defaultBranch:P().optional()})]);var Ae=(e=>(e.PENDING="pending",e.ASSIGNED="assigned",e.IN_PROGRESS="in_progress",e.WAITING_FOR_INPUT="waiting_for_input",e.WAITING_FOR_PLAN_APPROVAL="waiting_for_plan_approval",e.PLAN_APPROVED="plan_approved",e.PLAN_REJECTED="plan_rejected",e.COMPLETED="completed",e.FAILED="failed",e.CANCELLED="cancelled",e.RESULT_REJECTED="result_rejected",e))(Ae||{});const Cg=fe({type:pt(["json","file","regex"]).describe("Extraction method"),source:P().describe("Source to extract from (file path or stdout/stderr)"),schema:fe({}).passthrough().optional().describe("JSON schema for validation"),pattern:P().optional().describe("Regex pattern for extraction")}),Pg=fe({type:pt(["issue_update","bulk_issue_update","notification","webhook"]).describe("Hook type"),config:Qa().describe("Hook-specific configuration")});fe({command:P().optional().describe("Legacy — unused in SDK mode"),args:ct(P()).optional().describe("Legacy — unused in SDK mode"),env:Zt(P(),P()).optional().describe("Environment variables"),workingDirectory:P().optional().describe("Working directory for command execution"),fileOperations:ct(Ag).optional().describe("File operations to perform during setup"),gitUrl:P().optional().describe("Git repository URL (populated from project)"),gitPrivateKey:P().optional().describe("Git SSH private key (populated from project)"),gitCommitMessage:P().optional().describe("Commit message for git operations"),resultExtraction:Cg.optional().describe("Schema for extracting result data"),postExecutionHooks:ct(Pg).optional().describe("Hooks to run after task completion"),executionMode:pt(["claudeAgentSdk","openaiAgentSdk","opencodeSdk","cursorSdk","codexSdk"]).optional().default("claudeAgentSdk").describe("Execution mode (default: claudeAgentSdk)"),executionPlan:nc("executionMode",[fe({executionMode:ht("claudeAgentSdk"),promptText:P(),sdkOptions:fe({model:P(),permissionMode:pt(["plan","acceptEdits","bypassPermissions","ask"]),settingSources:ct(P()),allowDangerouslySkipPermissions:_e(),persistSession:_e(),streamSdkEvents:_e().optional(),allowedTools:ct(P()).optional(),settings:fe({enabledPlugins:Zt(P(),_e())}),env:Zt(P(),P()).optional()}),resume:fe({sessionId:P().optional(),continue:_e()}).optional()}),fe({executionMode:ht("opencodeSdk"),promptText:P(),sdkOptions:fe({provider:P(),model:P(),allowedTools:ct(P()).optional(),env:Zt(P(),P()).optional()}),resume:fe({sessionId:P().optional(),continue:_e()}).optional()}),fe({executionMode:ht("openaiAgentSdk"),promptText:P(),sdkOptions:fe({model:P(),env:Zt(P(),P()).optional()}),resume:fe({sessionId:P().optional(),continue:_e()}).optional()}),fe({executionMode:ht("codexSdk"),promptText:P(),sdkOptions:fe({model:P().optional(),sandboxMode:pt(["read-only","workspace-write","danger-full-access"]).optional(),approvalPolicy:pt(["never","on-request","on-failure","untrusted"]).optional(),env:Zt(P(),P()).optional()}),resume:fe({sessionId:P().optional(),continue:_e()}).optional()}),fe({executionMode:ht("cursorSdk"),promptText:P(),sdkOptions:fe({model:P(),env:Zt(P(),P()).optional()}),resume:fe({sessionId:P().optional(),continue:_e()}).optional()})]).optional().describe("Backend-built prompt + resolved SDK options for this phase"),planEnabled:_e().optional().default(!1).describe("Enable planning phase (computed at runtime for agent)"),planContent:P().optional().describe("Final approved plan content"),planApproved:_e().optional().describe("Plan approval status"),planApprovedAt:P().optional().describe("ISO timestamp of approval"),planRejected:_e().optional().describe("Plan rejection flag"),planRejectionFeedback:P().optional().describe("User rejection feedback"),rejectedPlanContent:P().optional().describe("Previously rejected plan content"),planCompletedAt:P().optional().describe("ISO timestamp when plan was generated"),planRejectedAt:P().optional().describe("ISO timestamp when plan was rejected"),resultRejectionFeedback:P().optional().describe("User feedback when rejecting the result (most recent)"),resultRejectedAt:P().optional().describe("ISO timestamp when result was rejected (most recent)"),resultRejectionHistory:ct(fe({feedback:P(),rejectedAt:P()})).optional().describe("All rejection messages in chronological order"),notificationChannelPlanMessageId:jt().optional(),notificationChannelPlanMessageSentAt:P().optional(),notificationChannelCompletedMessageId:jt().optional(),notificationChannelFailedMessageId:jt().optional(),streamSdkEvents:_e().optional().describe("Stream SDK messages (thinking, tool calls, etc.) as sdk_event chunks"),originalTaskSummary:P().optional().describe("Summary from the original task run (passed to retry for historical context)"),planWasApproved:_e().optional().describe("True when planApproved was cleared for rePlan=true retry — indicates the plan had been approved before"),planComments:ct(fe({id:P(),selectedText:P(),startOffset:jt(),endOffset:jt(),commentText:P(),createdAt:P()})).optional().describe("Inline review comments attached to the plan"),hasAiConfigSecrets:_e().optional().describe("True when AI Config has secret-backed env vars; agent must fetch resolved values via /tasks/:id/resolve-secrets"),hasCredentials:_e().optional().describe("True when the task has credentials attached; agent must fetch resolved values via /tasks/:id/resolve-credentials"),mcpServersMode:pt(["all","ignoreExistingMcpServers"]).optional().describe("MCP server strategy for this run; 'ignoreExistingMcpServers' overrides the existing .mcp.json with only the template's configured servers plus the agent-platform server"),enableBrowserTools:_e().optional().describe("When true, the MCP server registers browser_interact and browser_get_context (browser_automate tasks only)")}),Ae.PENDING+"",Ae.CANCELLED,Ae.ASSIGNED+"",Ae.CANCELLED,Ae.IN_PROGRESS+"",Ae.CANCELLED,Ae.FAILED,Ae.WAITING_FOR_INPUT+"",Ae.CANCELLED,Ae.WAITING_FOR_PLAN_APPROVAL+"",Ae.CANCELLED,Ae.PLAN_APPROVED+"",Ae.CANCELLED,Ae.PLAN_REJECTED+"",Ae.CANCELLED,Ae.COMPLETED+"",Ae.RESULT_REJECTED+"",Ae.CANCELLED,Ae.FAILED+"",Ae.CANCELLED+"";const cc="browser_capture",Rg="browser_automate";function lc(e){let t=(e||"").trim().toLowerCase();const n=t.indexOf("@");return n>=0&&(t=t.slice(n+1)),t=t.split("/")[0].split(":")[0],t.startsWith("www.")&&(t=t.slice(4)),t}function Lg(e,t){const n=lc(e),r=(t||"").trim().toLowerCase();if(!n||!r)return!1;if(r.startsWith("*.")){const o=r.slice(2);return n===o||n.endsWith("."+o)}return n===lc(r)}function uc(e,t){var i;let n;try{const a=new URL(e);if(a.protocol!=="http:"&&a.protocol!=="https:")return null;n=a.hostname}catch(a){return null}let r=null,o=-1;for(const a of t)for(const d of(i=a.domains)!=null?i:[])Lg(n,d)&&d.length>o&&(o=d.length,r=a.id);return r}class dc extends Error{}function pc(e){return z(this,null,function*(){if(!e.ok){const t=yield e.json().catch(()=>({message:`HTTP ${e.status}`})),n=t.message||t.error||`HTTP ${e.status}`;throw e.status===401?new dc(n):new Error(n)}return e.json()})}let hc=3e4;function Ig(e){Number.isFinite(e)&&e>0&&(hc=e)}function Ro(r){return z(this,arguments,function*(e,t={},n=hc){const o=new AbortController,i=setTimeout(()=>o.abort(),n);try{return yield fetch(e,M(v({},t),{credentials:"omit",signal:o.signal}))}catch(a){throw a instanceof DOMException&&a.name==="AbortError"?new Error(`Request timed out after ${Math.round(n/1e3)}s. Please check your connection and try again.`):a}finally{clearTimeout(i)}})}function He(e,t,n,r){return z(this,null,function*(){const i=`${e.backendUrl.replace(/\/+$/,"")}/api${n}`,a=yield Ro(i,{method:t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:r!==void 0?JSON.stringify(r):void 0});return pc(a)})}function $g(e,t){return z(this,null,function*(){return He(e,"GET",`/projects/by-key/${encodeURIComponent(t)}`)})}const zg=["project","note","ctx"];function Og(e){var n,r;const t=zg.filter(o=>e[o]===void 0||e[o]===null);if(t.length>0)throw new Error(`createTask: missing required field(s): ${t.join(", ")}`);if(!((n=e.project)!=null&&n.id)&&!((r=e.project)!=null&&r.key))throw new Error("createTask: project must have an id or key")}function Hs(e,t){return z(this,null,function*(){var h,g,m,k,y,S;Og(t);const{project:n,note:r,ctx:o,advancedOpts:i,titleOverride:a,titleInstruction:d,allowSubmit:l,type:p=cc}=t;return He(e,"POST","/tasks",M(v(v(v(v(v(v(v(v(v(v(v(v(M(v({type:p,title:a||r.slice(0,120)||o.pageTitle||"Browser capture",titleInstruction:d!=null?d:r},n.id?{projectId:n.id}:{projectKey:n.key}),{autoAssign:!0}),i!=null&&i.claudeTemplateId?{claudeTemplateId:i.claudeTemplateId}:{}),(i==null?void 0:i.quickMode)!==void 0?{quickMode:i.quickMode}:{}),(i==null?void 0:i.modelOverride)!=null?{modelOverride:i.modelOverride}:{}),(i==null?void 0:i.claudeProfileId)!=null?{claudeProfileId:i.claudeProfileId}:{}),(i==null?void 0:i.effort)!=null?{effort:i.effort}:{}),(i==null?void 0:i.executionMode)!=null?{executionMode:i.executionMode}:{}),(h=i==null?void 0:i.selectedPluginIds)!=null&&h.length?{selectedPluginIds:i.selectedPluginIds}:{}),(g=i==null?void 0:i.selectedSkillIds)!=null&&g.length?{selectedSkillIds:i.selectedSkillIds}:{}),(m=i==null?void 0:i.selectedPluginSkillIds)!=null&&m.length?{selectedPluginSkillIds:i.selectedPluginSkillIds}:{}),(k=i==null?void 0:i.selectedMcpServerIds)!=null&&k.length?{selectedMcpServerIds:i.selectedMcpServerIds}:{}),(y=i==null?void 0:i.selectedSlashCommandIds)!=null&&y.length?{selectedSlashCommandIds:i.selectedSlashCommandIds}:{}),(S=i==null?void 0:i.selectedRemoteContextProviderIds)!=null&&S.length?{selectedRemoteContextProviderIds:i.selectedRemoteContextProviderIds}:{}),{metadata:v({type:p,note:r,source:"web-sdk",pageUrl:o.pageUrl,pageTitle:o.pageTitle,elementText:o.elementText,cssSelector:o.cssSelector,elementOuterHtml:o.elementOuterHtml,ancestry:o.ancestry,elementRole:o.elementRole,elementAriaLabel:o.elementAriaLabel,enclosingSection:o.enclosingSection,description:o.description,canonicalUrl:o.canonicalUrl,lang:o.lang,ogTitle:o.ogTitle,ogDescription:o.ogDescription,ogType:o.ogType,ogSiteName:o.ogSiteName,viewportWidth:o.viewportWidth,viewportHeight:o.viewportHeight,scrollX:o.scrollX,scrollY:o.scrollY,selectionText:o.selectionText,capturedAt:o.capturedAt,interactionSteps:o.interactionSteps},l!==void 0?{allowSubmit:l}:{})}))})}function fc(e,t){return z(this,null,function*(){return Hs(e,M(v({},t),{type:Rg}))})}function gc(e,t,n,r){return z(this,null,function*(){var o;return He(e,"POST","/planning-sessions",v(M(v({},t.id?{projectId:t.id}:{projectKey:t.key}),{instruction:n,quickMode:(o=r==null?void 0:r.quickMode)!=null?o:!1}),r!=null&&r.claudeTemplateId?{claudeTemplateId:r.claudeTemplateId}:{}))})}function Ng(e,t){return z(this,null,function*(){const n=t?`?projectId=${encodeURIComponent(t)}`:"";return He(e,"GET",`/claude-templates${n}`)})}function mc(e,t){return z(this,null,function*(){return He(e,"GET",`/tasks/${t}`)})}function Dg(e,t){return z(this,null,function*(){return He(e,"GET",`/planning-sessions/${t}`)})}function bc(e){return z(this,null,function*(){return He(e,"GET","/projects")})}function Mg(e){return z(this,null,function*(){return(yield He(e,"GET","/tenants/current")).membership})}function kc(e,t){if(!e||e.includes("tenant:*")||e.includes(t))return!0;const n=t.split(":")[0];return e.includes(`${n}:*`)}function Fs(e,t,n){return z(this,null,function*(){const o=`${e.backendUrl.replace(/\/+$/,"")}/api/auth/tokens/exchange-code`,i=yield Ro(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:t,origin:n})});return pc(i)})}function Ug(e,t){return z(this,null,function*(){return He(e,"GET",`/tasks/${t}/browser-commands/pending`)})}function jg(e,t,n,r,o){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/browser-commands/${n}/result`,{status:r,message:o})})}function Zg(e,t){return z(this,null,function*(){return He(e,"GET",`/tasks/${t}/chunks`)})}function qg(e,t,n){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/instructions`,{content:n})})}function Hg(e,t){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/cancel`)})}function Fg(e,t){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/approve-result`)})}function Bg(e,t,n){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/reject-result`,{feedback:n})})}function Lo(e,t){return z(this,null,function*(){return He(e,"GET",`/tasks/${t}/interactions?filter=unanswered`)})}function _c(e,t,n,r){return z(this,null,function*(){return He(e,"POST",`/tasks/${t}/interactions/${n}/answer`,{answer:r})})}function Gg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs={exports:{}};/*!
|
|
1572
|
-
* Pusher JavaScript Library v8.5.0
|
|
1573
|
-
* https://pusher.com/
|
|
1574
|
-
*
|
|
1575
|
-
* Copyright 2020, Pusher
|
|
1576
|
-
* Released under the MIT licence.
|
|
1577
|
-
*/var vc;function Wg(){return vc||(vc=1,(function(e,t){(function(r,o){e.exports=o()})(self,()=>(()=>{var n={594(a,d){var l=this&&this.__extends||(function(){var j=function(A,T){return j=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,q){L.__proto__=q}||function(L,q){for(var H in q)q.hasOwnProperty(H)&&(L[H]=q[H])},j(A,T)};return function(A,T){j(A,T);function L(){this.constructor=A}A.prototype=T===null?Object.create(T):(L.prototype=T.prototype,new L)}})();Object.defineProperty(d,"__esModule",{value:!0});var p=256,h=(function(){function j(A){A===void 0&&(A="="),this._paddingCharacter=A}return j.prototype.encodedLength=function(A){return this._paddingCharacter?(A+2)/3*4|0:(A*8+5)/6|0},j.prototype.encode=function(A){for(var T="",L=0;L<A.length-2;L+=3){var q=A[L]<<16|A[L+1]<<8|A[L+2];T+=this._encodeByte(q>>>18&63),T+=this._encodeByte(q>>>12&63),T+=this._encodeByte(q>>>6&63),T+=this._encodeByte(q>>>0&63)}var H=A.length-L;if(H>0){var q=A[L]<<16|(H===2?A[L+1]<<8:0);T+=this._encodeByte(q>>>18&63),T+=this._encodeByte(q>>>12&63),H===2?T+=this._encodeByte(q>>>6&63):T+=this._paddingCharacter||"",T+=this._paddingCharacter||""}return T},j.prototype.maxDecodedLength=function(A){return this._paddingCharacter?A/4*3|0:(A*6+7)/8|0},j.prototype.decodedLength=function(A){return this.maxDecodedLength(A.length-this._getPaddingLength(A))},j.prototype.decode=function(A){if(A.length===0)return new Uint8Array(0);for(var T=this._getPaddingLength(A),L=A.length-T,q=new Uint8Array(this.maxDecodedLength(L)),H=0,se=0,je=0,nt=0,ee=0,Se=0,at=0;se<L-4;se+=4)nt=this._decodeChar(A.charCodeAt(se+0)),ee=this._decodeChar(A.charCodeAt(se+1)),Se=this._decodeChar(A.charCodeAt(se+2)),at=this._decodeChar(A.charCodeAt(se+3)),q[H++]=nt<<2|ee>>>4,q[H++]=ee<<4|Se>>>2,q[H++]=Se<<6|at,je|=nt&p,je|=ee&p,je|=Se&p,je|=at&p;if(se<L-1&&(nt=this._decodeChar(A.charCodeAt(se)),ee=this._decodeChar(A.charCodeAt(se+1)),q[H++]=nt<<2|ee>>>4,je|=nt&p,je|=ee&p),se<L-2&&(Se=this._decodeChar(A.charCodeAt(se+2)),q[H++]=ee<<4|Se>>>2,je|=Se&p),se<L-3&&(at=this._decodeChar(A.charCodeAt(se+3)),q[H++]=Se<<6|at,je|=at&p),je!==0)throw new Error("Base64Coder: incorrect characters for decoding");return q},j.prototype._encodeByte=function(A){var T=A;return T+=65,T+=25-A>>>8&6,T+=51-A>>>8&-75,T+=61-A>>>8&-15,T+=62-A>>>8&3,String.fromCharCode(T)},j.prototype._decodeChar=function(A){var T=p;return T+=(42-A&A-44)>>>8&-p+A-43+62,T+=(46-A&A-48)>>>8&-p+A-47+63,T+=(47-A&A-58)>>>8&-p+A-48+52,T+=(64-A&A-91)>>>8&-p+A-65+0,T+=(96-A&A-123)>>>8&-p+A-97+26,T},j.prototype._getPaddingLength=function(A){var T=0;if(this._paddingCharacter){for(var L=A.length-1;L>=0&&A[L]===this._paddingCharacter;L--)T++;if(A.length<4||T>2)throw new Error("Base64Coder: incorrect padding")}return T},j})();d.Coder=h;var g=new h;function m(j){return g.encode(j)}d.encode=m;function k(j){return g.decode(j)}d.decode=k;var y=(function(j){l(A,j);function A(){return j!==null&&j.apply(this,arguments)||this}return A.prototype._encodeByte=function(T){var L=T;return L+=65,L+=25-T>>>8&6,L+=51-T>>>8&-75,L+=61-T>>>8&-13,L+=62-T>>>8&49,String.fromCharCode(L)},A.prototype._decodeChar=function(T){var L=p;return L+=(44-T&T-46)>>>8&-p+T-45+62,L+=(94-T&T-96)>>>8&-p+T-95+63,L+=(47-T&T-58)>>>8&-p+T-48+52,L+=(64-T&T-91)>>>8&-p+T-65+0,L+=(96-T&T-123)>>>8&-p+T-97+26,L},A})(h);d.URLSafeCoder=y;var S=new y;function $(j){return S.encode(j)}d.encodeURLSafe=$;function E(j){return S.decode(j)}d.decodeURLSafe=E,d.encodedLength=function(j){return g.encodedLength(j)},d.maxDecodedLength=function(j){return g.maxDecodedLength(j)},d.decodedLength=function(j){return g.decodedLength(j)}},978(a,d){var l="utf8: invalid source encoding";function p(h){for(var g=[],m=0;m<h.length;m++){var k=h[m];if(k&128){var y=void 0;if(k<224){if(m>=h.length)throw new Error(l);var S=h[++m];if((S&192)!==128)throw new Error(l);k=(k&31)<<6|S&63,y=128}else if(k<240){if(m>=h.length-1)throw new Error(l);var S=h[++m],$=h[++m];if((S&192)!==128||($&192)!==128)throw new Error(l);k=(k&15)<<12|(S&63)<<6|$&63,y=2048}else if(k<248){if(m>=h.length-2)throw new Error(l);var S=h[++m],$=h[++m],E=h[++m];if((S&192)!==128||($&192)!==128||(E&192)!==128)throw new Error(l);k=(k&15)<<18|(S&63)<<12|($&63)<<6|E&63,y=65536}else throw new Error(l);if(k<y||k>=55296&&k<=57343)throw new Error(l);if(k>=65536){if(k>1114111)throw new Error(l);k-=65536,g.push(String.fromCharCode(55296|k>>10)),k=56320|k&1023}}g.push(String.fromCharCode(k))}return g.join("")}d.D4=p},721(a,d,l){a.exports=l(207).default},207(a,d,l){l.d(d,{default:()=>ws});class p{constructor(s,c){this.lastId=0,this.prefix=s,this.name=c}create(s){this.lastId++;var c=this.lastId,f=this.prefix+c,b=this.name+"["+c+"]",x=!1,R=function(){x||(s.apply(null,arguments),x=!0)};return this[c]=R,{number:c,id:f,name:b,callback:R}}remove(s){delete this[s.number]}}var h=new p("_pusher_script_","Pusher.ScriptReceivers"),g={VERSION:"8.5.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""};const m=g;class k{constructor(s){this.options=s,this.receivers=s.receivers||h,this.loading={}}load(s,c,f){var b=this;if(b.loading[s]&&b.loading[s].length>0)b.loading[s].push(f);else{b.loading[s]=[f];var x=Y.createScriptRequest(b.getPath(s,c)),R=b.receivers.create(function(D){if(b.receivers.remove(R),b.loading[s]){var J=b.loading[s];delete b.loading[s];for(var te=function($e){$e||x.cleanup()},ie=0;ie<J.length;ie++)J[ie](D,te)}});x.send(R)}}getRoot(s){var c,f=Y.getDocument().location.protocol;return s&&s.useTLS||f==="https:"?c=this.options.cdn_https:c=this.options.cdn_http,c.replace(/\/*$/,"")+"/"+this.options.version}getPath(s,c){return this.getRoot(c)+"/"+s+this.options.suffix+".js"}}var y=new p("_pusher_dependencies","Pusher.DependenciesReceivers"),S=new k({cdn_http:m.cdn_http,cdn_https:m.cdn_https,version:m.VERSION,suffix:m.dependency_suffix,receivers:y});const $={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},j={buildLogSuffix:function(u){const s="See:",c=$.urls[u];if(!c)return"";let f;return c.fullUrl?f=c.fullUrl:c.path&&(f=$.baseUrl+c.path),f?`${s} ${f}`:""}};var A;(function(u){u.UserAuthentication="user-authentication",u.ChannelAuthorization="channel-authorization"})(A||(A={}));class T extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class L extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class q extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class H extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class se extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class je extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class nt extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class ee extends Error{constructor(s){super(s),Object.setPrototypeOf(this,new.target.prototype)}}class Se extends Error{constructor(s,c){super(c),this.status=s,Object.setPrototypeOf(this,new.target.prototype)}}const At=function(u,s,c,f,b){const x=Y.createXHR();x.open("POST",c.endpoint,!0),x.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var R in c.headers)x.setRequestHeader(R,c.headers[R]);if(c.headersProvider!=null){let D=c.headersProvider();for(var R in D)x.setRequestHeader(R,D[R])}return x.onreadystatechange=function(){if(x.readyState===4)if(x.status===200){let D,J=!1;try{D=JSON.parse(x.responseText),J=!0}catch(te){b(new Se(200,`JSON returned from ${f.toString()} endpoint was invalid, yet status code was 200. Data was: ${x.responseText}`),null)}J&&b(null,D)}else{let D="";switch(f){case A.UserAuthentication:D=j.buildLogSuffix("authenticationEndpoint");break;case A.ChannelAuthorization:D=`Clients must be authorized to join private or presence channels. ${j.buildLogSuffix("authorizationEndpoint")}`;break}b(new Se(x.status,`Unable to retrieve auth string from ${f.toString()} endpoint - received status: ${x.status} from ${c.endpoint}. ${D}`),null)}},x.send(s),x};function vr(u){return ye(Yt(u))}var Jt=String.fromCharCode,Ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yr=function(u){var s=u.charCodeAt(0);return s<128?u:s<2048?Jt(192|s>>>6)+Jt(128|s&63):Jt(224|s>>>12&15)+Jt(128|s>>>6&63)+Jt(128|s&63)},Yt=function(u){return u.replace(/[^\x00-\x7F]/g,yr)},an=function(u){var s=[0,2,1][u.length%3],c=u.charCodeAt(0)<<16|(u.length>1?u.charCodeAt(1):0)<<8|(u.length>2?u.charCodeAt(2):0),f=[Ct.charAt(c>>>18),Ct.charAt(c>>>12&63),s>=2?"=":Ct.charAt(c>>>6&63),s>=1?"=":Ct.charAt(c&63)];return f.join("")},ye=window.btoa||function(u){return u.replace(/[\s\S]{1,3}/g,an)};class Vt{constructor(s,c,f,b){this.clear=c,this.timer=s(()=>{this.timer&&(this.timer=b(this.timer))},f)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}const ge=Vt;function Pt(u){window.clearTimeout(u)}function le(u){window.clearInterval(u)}class Le extends ge{constructor(s,c){super(setTimeout,Pt,s,function(f){return c(),null})}}class En extends ge{constructor(s,c){super(setInterval,le,s,function(f){return c(),f})}}var Rt={now(){return Date.now?Date.now():new Date().valueOf()},defer(u){return new Le(0,u)},method(u,...s){var c=Array.prototype.slice.call(arguments,1);return function(f){return f[u].apply(f,c.concat(arguments))}}};const Te=Rt;function Pe(u,...s){for(var c=0;c<s.length;c++){var f=s[c];for(var b in f)f[b]&&f[b].constructor&&f[b].constructor===Object?u[b]=Pe(u[b]||{},f[b]):u[b]=f[b]}return u}function Fn(){for(var u=["Pusher"],s=0;s<arguments.length;s++)typeof arguments[s]=="string"?u.push(arguments[s]):u.push(ue(arguments[s]));return u.join(" : ")}function An(u,s){var c=Array.prototype.indexOf;if(u===null)return-1;if(c&&u.indexOf===c)return u.indexOf(s);for(var f=0,b=u.length;f<b;f++)if(u[f]===s)return f;return-1}function Ne(u,s){for(var c in u)Object.prototype.hasOwnProperty.call(u,c)&&s(u[c],c,u)}function Xt(u){var s=[];return Ne(u,function(c,f){s.push(f)}),s}function bt(u){var s=[];return Ne(u,function(c){s.push(c)}),s}function kt(u,s,c){for(var f=0;f<u.length;f++)s.call(c||window,u[f],f,u)}function cn(u,s){for(var c=[],f=0;f<u.length;f++)c.push(s(u[f],f,u,c));return c}function F(u,s){var c={};return Ne(u,function(f,b){c[b]=s(f)}),c}function re(u,s){s=s||function(b){return!!b};for(var c=[],f=0;f<u.length;f++)s(u[f],f,u,c)&&c.push(u[f]);return c}function xe(u,s){var c={};return Ne(u,function(f,b){(s&&s(f,b,u,c)||f)&&(c[b]=f)}),c}function rt(u){var s=[];return Ne(u,function(c,f){s.push([f,c])}),s}function _t(u,s){for(var c=0;c<u.length;c++)if(s(u[c],c,u))return!0;return!1}function Lt(u,s){for(var c=0;c<u.length;c++)if(!s(u[c],c,u))return!1;return!0}function Cn(u){return F(u,function(s){return typeof s=="object"&&(s=ue(s)),encodeURIComponent(vr(s.toString()))})}function Kt(u){var s=xe(u,function(f){return f!==void 0}),c=cn(rt(Cn(s)),Te.method("join","=")).join("&");return c}function De(u){var s=[],c=[];return(function f(b,x){var R,D,J;switch(typeof b){case"object":if(!b)return null;for(R=0;R<s.length;R+=1)if(s[R]===b)return{$ref:c[R]};if(s.push(b),c.push(x),Object.prototype.toString.apply(b)==="[object Array]")for(J=[],R=0;R<b.length;R+=1)J[R]=f(b[R],x+"["+R+"]");else{J={};for(D in b)Object.prototype.hasOwnProperty.call(b,D)&&(J[D]=f(b[D],x+"["+JSON.stringify(D)+"]"))}return J;case"number":case"string":case"boolean":return b}})(u,"$")}function ue(u){try{return JSON.stringify(u)}catch(s){return JSON.stringify(De(u))}}class Ie{constructor(){this.globalLog=s=>{window.console&&window.console.log&&window.console.log(s)}}debug(...s){this.log(this.globalLog,s)}warn(...s){this.log(this.globalLogWarn,s)}error(...s){this.log(this.globalLogError,s)}globalLogWarn(s){window.console&&window.console.warn?window.console.warn(s):this.globalLog(s)}globalLogError(s){window.console&&window.console.error?window.console.error(s):this.globalLogWarn(s)}log(s,...c){var f=Fn.apply(this,arguments);ws.log?ws.log(f):ws.logToConsole&&s.bind(this)(f)}}const X=new Ie;var wr=function(u,s,c,f,b){(c.headers!==void 0||c.headersProvider!=null)&&X.warn(`To send headers with the ${f.toString()} request, you must use AJAX, rather than JSONP.`);var x=u.nextAuthCallbackID.toString();u.nextAuthCallbackID++;var R=u.getDocument(),D=R.createElement("script");u.auth_callbacks[x]=function(ie){b(null,ie)};var J="Pusher.auth_callbacks['"+x+"']";D.src=c.endpoint+"?callback="+encodeURIComponent(J)+"&"+s;var te=R.getElementsByTagName("head")[0]||R.documentElement;te.insertBefore(D,te.firstChild)};const ot=wr;class It{constructor(s){this.src=s}send(s){var c=this,f="Error loading "+c.src;c.script=document.createElement("script"),c.script.id=s.id,c.script.src=c.src,c.script.type="text/javascript",c.script.charset="UTF-8",c.script.addEventListener?(c.script.onerror=function(){s.callback(f)},c.script.onload=function(){s.callback(null)}):c.script.onreadystatechange=function(){(c.script.readyState==="loaded"||c.script.readyState==="complete")&&s.callback(null)},c.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(c.errorScript=document.createElement("script"),c.errorScript.id=s.id+"_error",c.errorScript.text=s.name+"('"+f+"');",c.script.async=c.errorScript.async=!1):c.script.async=!0;var b=document.getElementsByTagName("head")[0];b.insertBefore(c.script,b.firstChild),c.errorScript&&b.insertBefore(c.errorScript,c.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class ln{constructor(s,c){this.url=s,this.data=c}send(s){if(!this.request){var c=Kt(this.data),f=this.url+"/"+s.number+"?"+c;this.request=Y.createScriptRequest(f),this.request.send(s)}}cleanup(){this.request&&this.request.cleanup()}}var $t=function(u,s){return function(c,f){var b="http"+(s?"s":"")+"://",x=b+(u.host||u.options.host)+u.options.path,R=Y.createJSONPRequest(x,c),D=Y.ScriptReceivers.create(function(J,te){h.remove(D),R.cleanup(),te&&te.host&&(u.host=te.host),f&&f(J,te)});R.send(D)}},zt={name:"jsonp",getAgent:$t};const Pn=zt;function Bn(u,s,c){var f=u+(s.useTLS?"s":""),b=s.useTLS?s.hostTLS:s.hostNonTLS;return f+"://"+b+c}function Gn(u,s){var c="/app/"+u,f="?protocol="+m.PROTOCOL+"&client=js&version="+m.VERSION+(s?"&"+s:"");return c+f}var zi={getInitial:function(u,s){var c=(s.httpPath||"")+Gn(u,"flash=false");return Bn("ws",s,c)}},xr={getInitial:function(u,s){var c=(s.httpPath||"/pusher")+Gn(u);return Bn("http",s,c)}},Sr={getInitial:function(u,s){return Bn("http",s,s.httpPath||"/pusher")},getPath:function(u,s){return Gn(u)}};class Oi{constructor(){this._callbacks={}}get(s){return this._callbacks[un(s)]}add(s,c,f){var b=un(s);this._callbacks[b]=this._callbacks[b]||[],this._callbacks[b].push({fn:c,context:f})}remove(s,c,f){if(!s&&!c&&!f){this._callbacks={};return}var b=s?[un(s)]:Xt(this._callbacks);c||f?this.removeCallback(b,c,f):this.removeAllCallbacks(b)}removeCallback(s,c,f){kt(s,function(b){this._callbacks[b]=re(this._callbacks[b]||[],function(x){return c&&c!==x.fn||f&&f!==x.context}),this._callbacks[b].length===0&&delete this._callbacks[b]},this)}removeAllCallbacks(s){kt(s,function(c){delete this._callbacks[c]},this)}}function un(u){return"_"+u}class Ot{constructor(s){this.callbacks=new Oi,this.global_callbacks=[],this.failThrough=s}bind(s,c,f){return this.callbacks.add(s,c,f),this}bind_global(s){return this.global_callbacks.push(s),this}unbind(s,c,f){return this.callbacks.remove(s,c,f),this}unbind_global(s){return s?(this.global_callbacks=re(this.global_callbacks||[],c=>c!==s),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(s,c,f){for(var b=0;b<this.global_callbacks.length;b++)this.global_callbacks[b](s,c);var x=this.callbacks.get(s),R=[];if(f?R.push(c,f):c&&R.push(c),x&&x.length>0)for(var b=0;b<x.length;b++)x[b].fn.apply(x[b].context||window,R);else this.failThrough&&this.failThrough(s,c);return this}}class Ni extends Ot{constructor(s,c,f,b,x){super(),this.initialize=Y.transportConnectionInitializer,this.hooks=s,this.name=c,this.priority=f,this.key=b,this.options=x,this.state="new",this.timeline=x.timeline,this.activityTimeout=x.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var s=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(s,this.options)}catch(c){return Te.defer(()=>{this.onError(c),this.changeState("closed")}),!1}return this.bindListeners(),X.debug("Connecting",{transport:this.name,url:s}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(s){return this.state==="open"?(Te.defer(()=>{this.socket&&this.socket.send(s)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(s){this.emit("error",{type:"WebSocketError",error:s}),this.timeline.error(this.buildTimelineMessage({error:s.toString()}))}onClose(s){s?this.changeState("closed",{code:s.code,reason:s.reason,wasClean:s.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(s){this.emit("message",s)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=s=>{this.onError(s)},this.socket.onclose=s=>{this.onClose(s)},this.socket.onmessage=s=>{this.onMessage(s)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(s,c){this.state=s,this.timeline.info(this.buildTimelineMessage({state:s,params:c})),this.emit(s,c)}buildTimelineMessage(s){return Pe({cid:this.id},s)}}class he{constructor(s){this.hooks=s}isSupported(s){return this.hooks.isSupported(s)}createConnection(s,c,f,b){return new Ni(this.hooks,s,c,f,b)}}var Rn=new he({urls:zi,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!Y.getWebSocketAPI()},isSupported:function(){return!!Y.getWebSocketAPI()},getSocket:function(u){return Y.createWebSocket(u)}}),ds={urls:xr,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},ro=Pe({getSocket:function(u){return Y.HTTPFactory.createStreamingSocket(u)}},ds),Tr=Pe({getSocket:function(u){return Y.HTTPFactory.createPollingSocket(u)}},ds),oo={isSupported:function(){return Y.isXHRSupported()}},ps=new he(Pe({},ro,oo)),Di=new he(Pe({},Tr,oo)),vt={ws:Rn,xhr_streaming:ps,xhr_polling:Di};const yt=vt;var hs=new he({file:"sockjs",urls:Sr,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(u,s){return new window.SockJS(u,null,{js_path:S.getPath("sockjs",{useTLS:s.useTLS}),ignore_null_origin:s.ignoreNullOrigin})},beforeOpen:function(u,s){u.send(JSON.stringify({path:s}))}}),so={isSupported:function(u){var s=Y.isXDRSupported(u.useTLS);return s}},io=new he(Pe({},ro,so)),fs=new he(Pe({},Tr,so));yt.xdr_streaming=io,yt.xdr_polling=fs,yt.sockjs=hs;const Nt=yt;class gs extends Ot{constructor(){super();var s=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){s.emit("online")},!1),window.addEventListener("offline",function(){s.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var ms=new gs;class bs{constructor(s,c,f){this.manager=s,this.transport=c,this.minPingDelay=f.minPingDelay,this.maxPingDelay=f.maxPingDelay,this.pingDelay=void 0}createConnection(s,c,f,b){b=Pe({},b,{activityTimeout:this.pingDelay});var x=this.transport.createConnection(s,c,f,b),R=null,D=function(){x.unbind("open",D),x.bind("closed",J),R=Te.now()},J=te=>{if(x.unbind("closed",J),te.code===1002||te.code===1003)this.manager.reportDeath();else if(!te.wasClean&&R){var ie=Te.now()-R;ie<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(ie/2,this.minPingDelay))}};return x.bind("open",D),x}isSupported(s){return this.manager.isAlive()&&this.transport.isSupported(s)}}const ao={decodeMessage:function(u){try{var s=JSON.parse(u.data),c=s.data;if(typeof c=="string")try{c=JSON.parse(s.data)}catch(b){}var f={event:s.event,channel:s.channel,data:c};return s.user_id&&(f.user_id=s.user_id),f}catch(b){throw{type:"MessageParseError",error:b,data:u.data}}},encodeMessage:function(u){return JSON.stringify(u)},processHandshake:function(u){var s=ao.decodeMessage(u);if(s.event==="pusher:connection_established"){if(!s.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:s.data.socket_id,activityTimeout:s.data.activity_timeout*1e3}}else{if(s.event==="pusher:error")return{action:this.getCloseAction(s.data),error:this.getCloseError(s.data)};throw"Invalid handshake"}},getCloseAction:function(u){return u.code<4e3?u.code>=1002&&u.code<=1004?"backoff":null:u.code===4e3?"tls_only":u.code<4100?"refused":u.code<4200?"backoff":u.code<4300?"retry":"refused"},getCloseError:function(u){return u.code!==1e3&&u.code!==1001?{type:"PusherError",data:{code:u.code,message:u.reason||u.message}}:null}},dn=ao;class Z extends Ot{constructor(s,c){super(),this.id=s,this.transport=c,this.activityTimeout=c.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(s){return this.transport.send(s)}send_event(s,c,f){var b={event:s,data:c};return f&&(b.channel=f),X.debug("Event sent",b),this.send(dn.encodeMessage(b))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var s={message:f=>{var b;try{b=dn.decodeMessage(f)}catch(x){this.emit("error",{type:"MessageParseError",error:x,data:f.data})}if(b!==void 0){switch(X.debug("Event recd",b),b.event){case"pusher:error":this.emit("error",{type:"PusherError",data:b.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",b)}},activity:()=>{this.emit("activity")},error:f=>{this.emit("error",f)},closed:f=>{c(),f&&f.code&&this.handleCloseEvent(f),this.transport=null,this.emit("closed")}},c=()=>{Ne(s,(f,b)=>{this.transport.unbind(b,f)})};Ne(s,(f,b)=>{this.transport.bind(b,f)})}handleCloseEvent(s){var c=dn.getCloseAction(s),f=dn.getCloseError(s);f&&this.emit("error",f),c&&this.emit(c,{action:c,error:f})}}class _{constructor(s,c){this.transport=s,this.callback=c,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=s=>{this.unbindListeners();var c;try{c=dn.processHandshake(s)}catch(f){this.finish("error",{error:f}),this.transport.close();return}c.action==="connected"?this.finish("connected",{connection:new Z(c.id,this.transport),activityTimeout:c.activityTimeout}):(this.finish(c.action,{error:c.error}),this.transport.close())},this.onClosed=s=>{this.unbindListeners();var c=dn.getCloseAction(s)||"backoff",f=dn.getCloseError(s);this.finish(c,{error:f})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(s,c){this.callback(Pe({transport:this.transport,action:s},c))}}class C{constructor(s,c){this.timeline=s,this.options=c||{}}send(s,c){this.timeline.isEmpty()||this.timeline.send(Y.TimelineTransport.getAgent(this,s),c)}}class O extends Ot{constructor(s,c){super(function(f,b){X.debug("No callbacks on "+s+" for "+f)}),this.name=s,this.pusher=c,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(s,c){return c(null,{auth:""})}trigger(s,c){if(s.indexOf("client-")!==0)throw new T("Event '"+s+"' does not start with 'client-'");if(!this.subscribed){var f=j.buildLogSuffix("triggeringClientEvents");X.warn(`Client event triggered before channel 'subscription_succeeded' event . ${f}`)}return this.pusher.send_event(s,c,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(s){var c=s.event,f=s.data;if(c==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(s);else if(c==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(s);else if(c.indexOf("pusher_internal:")!==0){var b={};this.emit(c,f,b)}}handleSubscriptionSucceededEvent(s){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",s.data)}handleSubscriptionCountEvent(s){s.data.subscription_count&&(this.subscriptionCount=s.data.subscription_count),this.emit("pusher:subscription_count",s.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(s,c)=>{s?(this.subscriptionPending=!1,X.error(s.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:s.message},s instanceof Se?{status:s.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:c.auth,channel_data:c.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class de extends O{authorize(s,c){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:s},c)}}class Ze{constructor(){this.reset()}get(s){return Object.prototype.hasOwnProperty.call(this.members,s)?{id:s,info:this.members[s]}:null}each(s){Ne(this.members,(c,f)=>{s(this.get(f))})}setMyID(s){this.myID=s}onSubscription(s){this.members=s.presence.hash,this.count=s.presence.count,this.me=this.get(this.myID)}addMember(s){return this.get(s.user_id)===null&&this.count++,this.members[s.user_id]=s.user_info,this.get(s.user_id)}removeMember(s){var c=this.get(s.user_id);return c&&(delete this.members[s.user_id],this.count--),c}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var Ee=function(u,s,c,f){function b(x){return x instanceof c?x:new c(function(R){R(x)})}return new(c||(c=Promise))(function(x,R){function D(ie){try{te(f.next(ie))}catch($e){R($e)}}function J(ie){try{te(f.throw(ie))}catch($e){R($e)}}function te(ie){ie.done?x(ie.value):b(ie.value).then(D,J)}te((f=f.apply(u,s||[])).next())})};class Je extends de{constructor(s,c){super(s,c),this.members=new Ze}authorize(s,c){super.authorize(s,(f,b)=>Ee(this,void 0,void 0,function*(){if(!f)if(b=b,b.channel_data!=null){var x=JSON.parse(b.channel_data);this.members.setMyID(x.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let R=j.buildLogSuffix("authorizationEndpoint");X.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${R}, or the user should be signed in.`),c("Invalid auth response");return}c(f,b)}))}handleEvent(s){var c=s.event;if(c.indexOf("pusher_internal:")===0)this.handleInternalEvent(s);else{var f=s.data,b={};s.user_id&&(b.user_id=s.user_id),this.emit(c,f,b)}}handleInternalEvent(s){var c=s.event,f=s.data;switch(c){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(s);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(s);break;case"pusher_internal:member_added":var b=this.members.addMember(f);this.emit("pusher:member_added",b);break;case"pusher_internal:member_removed":var x=this.members.removeMember(f);x&&this.emit("pusher:member_removed",x);break}}handleSubscriptionSucceededEvent(s){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(s.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var Dt=l(978),Qt=l(594);class co extends de{constructor(s,c,f){super(s,c),this.key=null,this.nacl=f}authorize(s,c){super.authorize(s,(f,b)=>{if(f){c(f,b);return}let x=b.shared_secret;if(!x){c(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,Qt.decode)(x),delete b.shared_secret,c(null,b)})}trigger(s,c){throw new je("Client events are not currently supported for encrypted channels")}handleEvent(s){var c=s.event,f=s.data;if(c.indexOf("pusher_internal:")===0||c.indexOf("pusher:")===0){super.handleEvent(s);return}this.handleEncryptedEvent(c,f)}handleEncryptedEvent(s,c){if(!this.key){X.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!c.ciphertext||!c.nonce){X.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+c);return}let f=(0,Qt.decode)(c.ciphertext);if(f.length<this.nacl.secretbox.overheadLength){X.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${f.length}`);return}let b=(0,Qt.decode)(c.nonce);if(b.length<this.nacl.secretbox.nonceLength){X.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${b.length}`);return}let x=this.nacl.secretbox.open(f,b,this.key);if(x===null){X.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(R,D)=>{if(R){X.error(`Failed to make a request to the authEndpoint: ${D}. Unable to fetch new key, so dropping encrypted event`);return}if(x=this.nacl.secretbox.open(f,b,this.key),x===null){X.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(s,this.getDataToEmit(x))});return}this.emit(s,this.getDataToEmit(x))}getDataToEmit(s){let c=(0,Dt.D4)(s);try{return JSON.parse(c)}catch(f){return c}}}class Me extends Ot{constructor(s,c){super(),this.state="initialized",this.connection=null,this.key=s,this.options=c,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var f=Y.getNetwork();f.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),f.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(s){this.key=s,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(s){return this.connection?this.connection.send(s):!1}send_event(s,c,f){return this.connection?this.connection.send_event(s,c,f):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var s=(c,f)=>{c?this.runner=this.strategy.connect(0,s):f.action==="error"?(this.emit("error",{type:"HandshakeError",error:f.error}),this.timeline.error({handshakeError:f.error})):(this.abortConnecting(),this.handshakeCallbacks[f.action](f))};this.runner=this.strategy.connect(0,s)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var s=this.abandonConnection();s.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(s){this.timeline.info({action:"retry",delay:s}),s>0&&this.emit("connecting_in",Math.round(s/1e3)),this.retryTimer=new Le(s||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new Le(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new Le(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new Le(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(s){return Pe({},s,{message:c=>{this.resetActivityCheck(),this.emit("message",c)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:c=>{this.emit("error",c)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(s){return Pe({},s,{connected:c=>{this.activityTimeout=Math.min(this.options.activityTimeout,c.activityTimeout,c.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(c.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let s=c=>f=>{f.error&&this.emit("error",{type:"WebSocketError",error:f.error}),c(f)};return{tls_only:s(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:s(()=>{this.disconnect()}),backoff:s(()=>{this.retryIn(1e3)}),retry:s(()=>{this.retryIn(0)})}}setConnection(s){this.connection=s;for(var c in this.connectionCallbacks)this.connection.bind(c,this.connectionCallbacks[c]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var s in this.connectionCallbacks)this.connection.unbind(s,this.connectionCallbacks[s]);var c=this.connection;return this.connection=null,c}}updateState(s,c){var f=this.state;if(this.state=s,f!==s){var b=s;b==="connected"&&(b+=" with new socket ID "+c.socket_id),X.debug("State changed",f+" -> "+b),this.timeline.info({state:s,params:c}),this.emit("state_change",{previous:f,current:s}),this.emit(s,c)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class ks{constructor(){this.channels={}}add(s,c){return this.channels[s]||(this.channels[s]=_s(s,c)),this.channels[s]}all(){return bt(this.channels)}find(s){return this.channels[s]}remove(s){var c=this.channels[s];return delete this.channels[s],c}disconnect(){Ne(this.channels,function(s){s.disconnect()})}}function _s(u,s){if(u.indexOf("private-encrypted-")===0){if(s.config.nacl)return pn.createEncryptedChannel(u,s,s.config.nacl);let c="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",f=j.buildLogSuffix("encryptedChannelSupport");throw new je(`${c}. ${f}`)}else{if(u.indexOf("private-")===0)return pn.createPrivateChannel(u,s);if(u.indexOf("presence-")===0)return pn.createPresenceChannel(u,s);if(u.indexOf("#")===0)throw new L('Cannot create a channel with name "'+u+'".');return pn.createChannel(u,s)}}var jk={createChannels(){return new ks},createConnectionManager(u,s){return new Me(u,s)},createChannel(u,s){return new O(u,s)},createPrivateChannel(u,s){return new de(u,s)},createPresenceChannel(u,s){return new Je(u,s)},createEncryptedChannel(u,s,c){return new co(u,s,c)},createTimelineSender(u,s){return new C(u,s)},createHandshake(u,s){return new _(u,s)},createAssistantToTheTransportManager(u,s,c){return new bs(u,s,c)}};const pn=jk;class tu{constructor(s){this.options=s||{},this.livesLeft=this.options.lives||1/0}getAssistant(s){return pn.createAssistantToTheTransportManager(this,s,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class Wn{constructor(s,c){this.strategies=s,this.loop=!!c.loop,this.failFast=!!c.failFast,this.timeout=c.timeout,this.timeoutLimit=c.timeoutLimit}isSupported(){return _t(this.strategies,Te.method("isSupported"))}connect(s,c){var f=this.strategies,b=0,x=this.timeout,R=null,D=(J,te)=>{te?c(null,te):(b=b+1,this.loop&&(b=b%f.length),b<f.length?(x&&(x=x*2,this.timeoutLimit&&(x=Math.min(x,this.timeoutLimit))),R=this.tryStrategy(f[b],s,{timeout:x,failFast:this.failFast},D)):c(!0))};return R=this.tryStrategy(f[b],s,{timeout:x,failFast:this.failFast},D),{abort:function(){R.abort()},forceMinPriority:function(J){s=J,R&&R.forceMinPriority(J)}}}tryStrategy(s,c,f,b){var x=null,R=null;return f.timeout>0&&(x=new Le(f.timeout,function(){R.abort(),b(!0)})),R=s.connect(c,function(D,J){D&&x&&x.isRunning()&&!f.failFast||(x&&x.ensureAborted(),b(D,J))}),{abort:function(){x&&x.ensureAborted(),R.abort()},forceMinPriority:function(D){R.forceMinPriority(D)}}}}class Mi{constructor(s){this.strategies=s}isSupported(){return _t(this.strategies,Te.method("isSupported"))}connect(s,c){return Zk(this.strategies,s,function(f,b){return function(x,R){if(b[f].error=x,x){qk(b)&&c(!0);return}kt(b,function(D){D.forceMinPriority(R.transport.priority)}),c(null,R)}})}}function Zk(u,s,c){var f=cn(u,function(b,x,R,D){return b.connect(s,c(x,D))});return{abort:function(){kt(f,Hk)},forceMinPriority:function(b){kt(f,function(x){x.forceMinPriority(b)})}}}function qk(u){return Lt(u,function(s){return!!s.error})}function Hk(u){!u.error&&!u.aborted&&(u.abort(),u.aborted=!0)}class Fk{constructor(s,c,f){this.strategy=s,this.transports=c,this.ttl=f.ttl||18e5,this.usingTLS=f.useTLS,this.timeline=f.timeline}isSupported(){return this.strategy.isSupported()}connect(s,c){var f=this.usingTLS,b=Bk(f),x=b&&b.cacheSkipCount?b.cacheSkipCount:0,R=[this.strategy];if(b&&b.timestamp+this.ttl>=Te.now()){var D=this.transports[b.transport];D&&(["ws","wss"].includes(b.transport)||x>3?(this.timeline.info({cached:!0,transport:b.transport,latency:b.latency}),R.push(new Wn([D],{timeout:b.latency*2+1e3,failFast:!0}))):x++)}var J=Te.now(),te=R.pop().connect(s,function ie($e,xs){$e?(nu(f),R.length>0?(J=Te.now(),te=R.pop().connect(s,ie)):c($e)):(Gk(f,xs.transport.name,Te.now()-J,x),c(null,xs))});return{abort:function(){te.abort()},forceMinPriority:function(ie){s=ie,te&&te.forceMinPriority(ie)}}}}function Ui(u){return"pusherTransport"+(u?"TLS":"NonTLS")}function Bk(u){var s=Y.getLocalStorage();if(s)try{var c=s[Ui(u)];if(c)return JSON.parse(c)}catch(f){nu(u)}return null}function Gk(u,s,c,f){var b=Y.getLocalStorage();if(b)try{b[Ui(u)]=ue({timestamp:Te.now(),transport:s,latency:c,cacheSkipCount:f})}catch(x){}}function nu(u){var s=Y.getLocalStorage();if(s)try{delete s[Ui(u)]}catch(c){}}class vs{constructor(s,{delay:c}){this.strategy=s,this.options={delay:c}}isSupported(){return this.strategy.isSupported()}connect(s,c){var f=this.strategy,b,x=new Le(this.options.delay,function(){b=f.connect(s,c)});return{abort:function(){x.ensureAborted(),b&&b.abort()},forceMinPriority:function(R){s=R,b&&b.forceMinPriority(R)}}}}class lo{constructor(s,c,f){this.test=s,this.trueBranch=c,this.falseBranch=f}isSupported(){var s=this.test()?this.trueBranch:this.falseBranch;return s.isSupported()}connect(s,c){var f=this.test()?this.trueBranch:this.falseBranch;return f.connect(s,c)}}class Wk{constructor(s){this.strategy=s}isSupported(){return this.strategy.isSupported()}connect(s,c){var f=this.strategy.connect(s,function(b,x){x&&f.abort(),c(b,x)});return f}}function uo(u){return function(){return u.isSupported()}}var Jk=function(u,s,c){var f={};function b(gu,B_,G_,W_,J_){var mu=c(u,gu,B_,G_,W_,J_);return f[gu]=mu,mu}var x=Object.assign({},s,{hostNonTLS:u.wsHost+":"+u.wsPort,hostTLS:u.wsHost+":"+u.wssPort,httpPath:u.wsPath}),R=Object.assign({},x,{useTLS:!0}),D=Object.assign({},s,{hostNonTLS:u.httpHost+":"+u.httpPort,hostTLS:u.httpHost+":"+u.httpsPort,httpPath:u.httpPath}),J={loop:!0,timeout:15e3,timeoutLimit:6e4},te=new tu({minPingDelay:1e4,maxPingDelay:u.activityTimeout}),ie=new tu({lives:2,minPingDelay:1e4,maxPingDelay:u.activityTimeout}),$e=b("ws","ws",3,x,te),xs=b("wss","ws",3,R,te),j_=b("sockjs","sockjs",1,D),lu=b("xhr_streaming","xhr_streaming",1,D,ie),Z_=b("xdr_streaming","xdr_streaming",1,D,ie),uu=b("xhr_polling","xhr_polling",1,D),q_=b("xdr_polling","xdr_polling",1,D),du=new Wn([$e],J),H_=new Wn([xs],J),F_=new Wn([j_],J),pu=new Wn([new lo(uo(lu),lu,Z_)],J),hu=new Wn([new lo(uo(uu),uu,q_)],J),fu=new Wn([new lo(uo(pu),new Mi([pu,new vs(hu,{delay:4e3})]),hu)],J),qi=new lo(uo(fu),fu,F_),Hi;return s.useTLS?Hi=new Mi([du,new vs(qi,{delay:2e3})]):Hi=new Mi([du,new vs(H_,{delay:2e3}),new vs(qi,{delay:5e3})]),new Fk(new Wk(new lo(uo($e),Hi,qi)),f,{ttl:18e5,timeline:s.timeline,useTLS:s.useTLS})};const Yk=Jk;function Vk(){var u=this;u.timeline.info(u.buildTimelineMessage({transport:u.name+(u.options.useTLS?"s":"")})),u.hooks.isInitialized()?u.changeState("initialized"):u.hooks.file?(u.changeState("initializing"),S.load(u.hooks.file,{useTLS:u.options.useTLS},function(s,c){u.hooks.isInitialized()?(u.changeState("initialized"),c(!0)):(s&&u.onError(s),u.onClose(),c(!1))})):u.onClose()}var Xk={getRequest:function(u){var s=new window.XDomainRequest;return s.ontimeout=function(){u.emit("error",new q),u.close()},s.onerror=function(c){u.emit("error",c),u.close()},s.onprogress=function(){s.responseText&&s.responseText.length>0&&u.onChunk(200,s.responseText)},s.onload=function(){s.responseText&&s.responseText.length>0&&u.onChunk(200,s.responseText),u.emit("finished",200),u.close()},s},abortRequest:function(u){u.ontimeout=u.onerror=u.onprogress=u.onload=null,u.abort()}};const Kk=Xk,Qk=256*1024;class e_ extends Ot{constructor(s,c,f){super(),this.hooks=s,this.method=c,this.url=f}start(s){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},Y.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(s)}close(){this.unloader&&(Y.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(s,c){for(;;){var f=this.advanceBuffer(c);if(f)this.emit("chunk",{status:s,data:f});else break}this.isBufferTooLong(c)&&this.emit("buffer_too_long")}advanceBuffer(s){var c=s.slice(this.position),f=c.indexOf(`
|
|
1578
|
-
`);return f!==-1?(this.position+=f+1,c.slice(0,f)):null}isBufferTooLong(s){return this.position===s.length&&s.length>Qk}}var ji;(function(u){u[u.CONNECTING=0]="CONNECTING",u[u.OPEN=1]="OPEN",u[u.CLOSED=3]="CLOSED"})(ji||(ji={}));const Jn=ji;var t_=1;class n_{constructor(s,c){this.hooks=s,this.session=ou(1e3)+"/"+i_(8),this.location=r_(c),this.readyState=Jn.CONNECTING,this.openStream()}send(s){return this.sendRaw(JSON.stringify([s]))}ping(){this.hooks.sendHeartbeat(this)}close(s,c){this.onClose(s,c,!0)}sendRaw(s){if(this.readyState===Jn.OPEN)try{return Y.createSocketRequest("POST",ru(o_(this.location,this.session))).start(s),!0}catch(c){return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(s,c,f){this.closeStream(),this.readyState=Jn.CLOSED,this.onclose&&this.onclose({code:s,reason:c,wasClean:f})}onChunk(s){if(s.status===200){this.readyState===Jn.OPEN&&this.onActivity();var c,f=s.data.slice(0,1);switch(f){case"o":c=JSON.parse(s.data.slice(1)||"{}"),this.onOpen(c);break;case"a":c=JSON.parse(s.data.slice(1)||"[]");for(var b=0;b<c.length;b++)this.onEvent(c[b]);break;case"m":c=JSON.parse(s.data.slice(1)||"null"),this.onEvent(c);break;case"h":this.hooks.onHeartbeat(this);break;case"c":c=JSON.parse(s.data.slice(1)||"[]"),this.onClose(c[0],c[1],!0);break}}}onOpen(s){this.readyState===Jn.CONNECTING?(s&&s.hostname&&(this.location.base=s_(this.location.base,s.hostname)),this.readyState=Jn.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(s){this.readyState===Jn.OPEN&&this.onmessage&&this.onmessage({data:s})}onActivity(){this.onactivity&&this.onactivity()}onError(s){this.onerror&&this.onerror(s)}openStream(){this.stream=Y.createSocketRequest("POST",ru(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",s=>{this.onChunk(s)}),this.stream.bind("finished",s=>{this.hooks.onFinished(this,s)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(s){Te.defer(()=>{this.onError(s),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function r_(u){var s=/([^\?]*)\/*(\??.*)/.exec(u);return{base:s[1],queryString:s[2]}}function o_(u,s){return u.base+"/"+s+"/xhr_send"}function ru(u){var s=u.indexOf("?")===-1?"?":"&";return u+s+"t="+ +new Date+"&n="+t_++}function s_(u,s){var c=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(u);return c[1]+s+c[3]}function ou(u){return Y.randomInt(u)}function i_(u){for(var s=[],c=0;c<u;c++)s.push(ou(32).toString(32));return s.join("")}const a_=n_;var c_={getReceiveURL:function(u,s){return u.base+"/"+s+"/xhr_streaming"+u.queryString},onHeartbeat:function(u){u.sendRaw("[]")},sendHeartbeat:function(u){u.sendRaw("[]")},onFinished:function(u,s){u.onClose(1006,"Connection interrupted ("+s+")",!1)}};const l_=c_;var u_={getReceiveURL:function(u,s){return u.base+"/"+s+"/xhr"+u.queryString},onHeartbeat:function(){},sendHeartbeat:function(u){u.sendRaw("[]")},onFinished:function(u,s){s===200?u.reconnect():u.onClose(1006,"Connection interrupted ("+s+")",!1)}};const d_=u_;var p_={getRequest:function(u){var s=Y.getXHRAPI(),c=new s;return c.onreadystatechange=c.onprogress=function(){switch(c.readyState){case 3:c.responseText&&c.responseText.length>0&&u.onChunk(c.status,c.responseText);break;case 4:c.responseText&&c.responseText.length>0&&u.onChunk(c.status,c.responseText),u.emit("finished",c.status),u.close();break}},c},abortRequest:function(u){u.onreadystatechange=null,u.abort()}};const h_=p_;var f_={createStreamingSocket(u){return this.createSocket(l_,u)},createPollingSocket(u){return this.createSocket(d_,u)},createSocket(u,s){return new a_(u,s)},createXHR(u,s){return this.createRequest(h_,u,s)},createRequest(u,s,c){return new e_(u,s,c)}};const su=f_;su.createXDR=function(u,s){return this.createRequest(Kk,u,s)};var g_={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:h,DependenciesReceivers:y,getDefaultStrategy:Yk,Transports:Nt,transportConnectionInitializer:Vk,HTTPFactory:su,TimelineTransport:Pn,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(u){window.Pusher=u;var s=()=>{this.onDocumentBody(u.ready)};window.JSON?s():S.load("json2",{},s)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:At,jsonp:ot}},onDocumentBody(u){document.body?u():setTimeout(()=>{this.onDocumentBody(u)},0)},createJSONPRequest(u,s){return new ln(u,s)},createScriptRequest(u){return new It(u)},getLocalStorage(){try{return window.localStorage}catch(u){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var u=this.getXHRAPI();return new u},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return ms},createWebSocket(u){var s=this.getWebSocketAPI();return new s(u)},createSocketRequest(u,s){if(this.isXHRSupported())return this.HTTPFactory.createXHR(u,s);if(this.isXDRSupported(s.indexOf("https:")===0))return this.HTTPFactory.createXDR(u,s);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var u=this.getXHRAPI();return!!u&&new u().withCredentials!==void 0},isXDRSupported(u){var s=u?"https:":"http:",c=this.getProtocol();return!!window.XDomainRequest&&c===s},addUnloadListener(u){window.addEventListener!==void 0?window.addEventListener("unload",u,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",u)},removeUnloadListener(u){window.addEventListener!==void 0?window.removeEventListener("unload",u,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",u)},randomInt(u){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*u)}};const Y=g_;var Zi;(function(u){u[u.ERROR=3]="ERROR",u[u.INFO=6]="INFO",u[u.DEBUG=7]="DEBUG"})(Zi||(Zi={}));const ys=Zi;class m_{constructor(s,c,f){this.key=s,this.session=c,this.events=[],this.options=f||{},this.sent=0,this.uniqueID=0}log(s,c){s<=this.options.level&&(this.events.push(Pe({},c,{timestamp:Te.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(s){this.log(ys.ERROR,s)}info(s){this.log(ys.INFO,s)}debug(s){this.log(ys.DEBUG,s)}isEmpty(){return this.events.length===0}send(s,c){var f=Pe({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],s(f,(b,x)=>{b||this.sent++,c&&c(b,x)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class b_{constructor(s,c,f,b){this.name=s,this.priority=c,this.transport=f,this.options=b||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(s,c){if(this.isSupported()){if(this.priority<s)return iu(new H,c)}else return iu(new ee,c);var f=!1,b=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),x=null,R=function(){b.unbind("initialized",R),b.connect()},D=function(){x=pn.createHandshake(b,function($e){f=!0,ie(),c(null,$e)})},J=function($e){ie(),c($e)},te=function(){ie();var $e;$e=ue(b),c(new se($e))},ie=function(){b.unbind("initialized",R),b.unbind("open",D),b.unbind("error",J),b.unbind("closed",te)};return b.bind("initialized",R),b.bind("open",D),b.bind("error",J),b.bind("closed",te),b.initialize(),{abort:()=>{f||(ie(),x?x.close():b.close())},forceMinPriority:$e=>{f||this.priority<$e&&(x?x.close():b.close())}}}}function iu(u,s){return Te.defer(function(){s(u)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:k_}=Y;var __=function(u,s,c,f,b,x){var R=k_[c];if(!R)throw new nt(c);var D=(!u.enabledTransports||An(u.enabledTransports,s)!==-1)&&(!u.disabledTransports||An(u.disabledTransports,s)===-1),J;return D?(b=Object.assign({ignoreNullOrigin:u.ignoreNullOrigin},b),J=new b_(s,f,x?x.getAssistant(R):R,b)):J=v_,J},v_={isSupported:function(){return!1},connect:function(u,s){var c=Te.defer(function(){s(new ee)});return{abort:function(){c.ensureAborted()},forceMinPriority:function(){}}}};function y_(u){if(u==null)throw"You must pass an options object";if(u.cluster==null)throw"Options object must provide a cluster";"disableStats"in u&&X.warn("The disableStats option is deprecated in favor of enableStats")}const w_=(u,s)=>{var c="socket_id="+encodeURIComponent(u.socketId);for(var f in s.params)c+="&"+encodeURIComponent(f)+"="+encodeURIComponent(s.params[f]);if(s.paramsProvider!=null){let b=s.paramsProvider();for(var f in b)c+="&"+encodeURIComponent(f)+"="+encodeURIComponent(b[f])}return c},x_=u=>{if(typeof Y.getAuthorizers()[u.transport]=="undefined")throw`'${u.transport}' is not a recognized auth transport`;return(s,c)=>{const f=w_(s,u);Y.getAuthorizers()[u.transport](Y,f,u,A.UserAuthentication,c)}},S_=(u,s)=>{var c="socket_id="+encodeURIComponent(u.socketId);c+="&channel_name="+encodeURIComponent(u.channelName);for(var f in s.params)c+="&"+encodeURIComponent(f)+"="+encodeURIComponent(s.params[f]);if(s.paramsProvider!=null){let b=s.paramsProvider();for(var f in b)c+="&"+encodeURIComponent(f)+"="+encodeURIComponent(b[f])}return c},T_=u=>{if(typeof Y.getAuthorizers()[u.transport]=="undefined")throw`'${u.transport}' is not a recognized auth transport`;return(s,c)=>{const f=S_(s,u);Y.getAuthorizers()[u.transport](Y,f,u,A.ChannelAuthorization,c)}},E_=(u,s,c)=>{const f={authTransport:s.transport,authEndpoint:s.endpoint,auth:{params:s.params,headers:s.headers}};return(b,x)=>{const R=u.channel(b.channelName);c(R,f).authorize(b.socketId,x)}};function au(u,s){let c={activityTimeout:u.activityTimeout||m.activityTimeout,cluster:u.cluster,httpPath:u.httpPath||m.httpPath,httpPort:u.httpPort||m.httpPort,httpsPort:u.httpsPort||m.httpsPort,pongTimeout:u.pongTimeout||m.pongTimeout,statsHost:u.statsHost||m.stats_host,unavailableTimeout:u.unavailableTimeout||m.unavailableTimeout,wsPath:u.wsPath||m.wsPath,wsPort:u.wsPort||m.wsPort,wssPort:u.wssPort||m.wssPort,enableStats:L_(u),httpHost:A_(u),useTLS:R_(u),wsHost:C_(u),userAuthenticator:I_(u),channelAuthorizer:z_(u,s)};return"disabledTransports"in u&&(c.disabledTransports=u.disabledTransports),"enabledTransports"in u&&(c.enabledTransports=u.enabledTransports),"ignoreNullOrigin"in u&&(c.ignoreNullOrigin=u.ignoreNullOrigin),"timelineParams"in u&&(c.timelineParams=u.timelineParams),"nacl"in u&&(c.nacl=u.nacl),c}function A_(u){return u.httpHost?u.httpHost:u.cluster?`sockjs-${u.cluster}.pusher.com`:m.httpHost}function C_(u){return u.wsHost?u.wsHost:P_(u.cluster)}function P_(u){return`ws-${u}.pusher.com`}function R_(u){return Y.getProtocol()==="https:"?!0:u.forceTLS!==!1}function L_(u){return"enableStats"in u?u.enableStats:"disableStats"in u?!u.disableStats:!1}const cu=u=>"customHandler"in u&&u.customHandler!=null;function I_(u){const s=Object.assign(Object.assign({},m.userAuthentication),u.userAuthentication);return cu(s)?s.customHandler:x_(s)}function $_(u,s){let c;if("channelAuthorization"in u)c=Object.assign(Object.assign({},m.channelAuthorization),u.channelAuthorization);else if(c={transport:u.authTransport||m.authTransport,endpoint:u.authEndpoint||m.authEndpoint},"auth"in u&&("params"in u.auth&&(c.params=u.auth.params),"headers"in u.auth&&(c.headers=u.auth.headers)),"authorizer"in u)return{customHandler:E_(s,c,u.authorizer)};return c}function z_(u,s){const c=$_(u,s);return cu(c)?c.customHandler:T_(c)}class O_ extends Ot{constructor(s){super(function(c,f){X.debug(`No callbacks on watchlist events for ${c}`)}),this.pusher=s,this.bindWatchlistInternalEvent()}handleEvent(s){s.data.events.forEach(c=>{this.emit(c.name,c)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",s=>{var c=s.event;c==="pusher_internal:watchlist_events"&&this.handleEvent(s)})}}function N_(){let u,s;return{promise:new Promise((f,b)=>{u=f,s=b}),resolve:u,reject:s}}const D_=N_;class M_ extends Ot{constructor(s){super(function(c,f){X.debug("No callbacks on user for "+c)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(c,f)=>{if(c){X.warn(`Error during signin: ${c}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:f.auth,user_data:f.user_data})},this.pusher=s,this.pusher.connection.bind("state_change",({previous:c,current:f})=>{c!=="connected"&&f==="connected"&&this._signin(),c==="connected"&&f!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new O_(s),this.pusher.connection.bind("message",c=>{var f=c.event;f==="pusher:signin_success"&&this._onSigninSuccess(c.data),this.serverToUserChannel&&this.serverToUserChannel.name===c.channel&&this.serverToUserChannel.handleEvent(c)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(s){try{this.user_data=JSON.parse(s.user_data)}catch(c){X.error(`Failed parsing user data after signin: ${s.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){X.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const s=c=>{c.subscriptionPending&&c.subscriptionCancelled?c.reinstateSubscription():!c.subscriptionPending&&this.pusher.connection.state==="connected"&&c.subscribe()};this.serverToUserChannel=new O(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((c,f)=>{c.indexOf("pusher_internal:")===0||c.indexOf("pusher:")===0||this.emit(c,f)}),s(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:s,resolve:c}=D_();s.done=!1;const f=()=>{s.done=!0};s.then(f).catch(f),this.signinDonePromise=s,this._signinDoneResolve=c}}class Be{static ready(){Be.isReady=!0;for(var s=0,c=Be.instances.length;s<c;s++)Be.instances[s].connect()}static getClientFeatures(){return Xt(xe({ws:Y.Transports.ws},function(s){return s.isSupported({})}))}constructor(s,c){U_(s),y_(c),this.key=s,this.options=c,this.config=au(this.options,this),this.channels=pn.createChannels(),this.global_emitter=new Ot,this.sessionID=Y.randomInt(1e9),this.timeline=new m_(this.key,this.sessionID,{cluster:this.config.cluster,features:Be.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:ys.INFO,version:m.VERSION}),this.config.enableStats&&(this.timelineSender=pn.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+Y.TimelineTransport.name}));var f=b=>Y.getDefaultStrategy(this.config,b,__);this.connection=pn.createConnectionManager(this.key,{getStrategy:f,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",b=>{var x=b.event,R=x.indexOf("pusher_internal:")===0;if(b.channel){var D=this.channel(b.channel);D&&D.handleEvent(b)}R||this.global_emitter.emit(b.event,b.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",b=>{X.warn(b)}),Be.instances.push(this),this.timeline.info({instances:Be.instances.length}),this.user=new M_(this),Be.isReady&&this.connect()}switchCluster(s){const{appKey:c,cluster:f}=s;this.key=c,this.options=Object.assign(Object.assign({},this.options),{cluster:f}),this.config=au(this.options,this),this.connection.switchCluster(this.key)}channel(s){return this.channels.find(s)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var s=this.connection.isUsingTLS(),c=this.timelineSender;this.timelineSenderTimer=new En(6e4,function(){c.send(s)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(s,c,f){return this.global_emitter.bind(s,c,f),this}unbind(s,c,f){return this.global_emitter.unbind(s,c,f),this}bind_global(s){return this.global_emitter.bind_global(s),this}unbind_global(s){return this.global_emitter.unbind_global(s),this}unbind_all(s){return this.global_emitter.unbind_all(),this}subscribeAll(){var s;for(s in this.channels.channels)this.channels.channels.hasOwnProperty(s)&&this.subscribe(s)}subscribe(s){var c=this.channels.add(s,this);return c.subscriptionPending&&c.subscriptionCancelled?c.reinstateSubscription():!c.subscriptionPending&&this.connection.state==="connected"&&c.subscribe(),c}unsubscribe(s){var c=this.channels.find(s);c&&c.subscriptionPending?c.cancelSubscription():(c=this.channels.remove(s),c&&c.subscribed&&c.unsubscribe())}send_event(s,c,f){return this.connection.send_event(s,c,f)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Be.instances=[],Be.isReady=!1,Be.logToConsole=!1,Be.Runtime=Y,Be.ScriptReceivers=Y.ScriptReceivers,Be.DependenciesReceivers=Y.DependenciesReceivers,Be.auth_callbacks=Y.auth_callbacks;const ws=Be;function U_(u){if(u==null)throw"You must pass your app key when you instantiate Pusher."}Y.setup(Be)}},r={};function o(a){var d=r[a];if(d!==void 0)return d.exports;var l=r[a]={exports:{}};return n[a].call(l.exports,l,l.exports,o),l.exports}o.d=(a,d)=>{for(var l in d)o.o(d,l)&&!o.o(a,l)&&Object.defineProperty(a,l,{enumerable:!0,get:d[l]})},o.o=(a,d)=>Object.prototype.hasOwnProperty.call(a,d);var i=o(721);return i})())})(Bs)),Bs.exports}var Jg=Wg();const Yg=Gg(Jg);let wt=null,sr=null;function Vg(e){return z(this,null,function*(){return sr||(sr=z(null,null,function*(){const t=e.backendUrl.replace(/\/+$/,""),n=yield Ro(`${t}/api/settings`,{headers:{Authorization:`Bearer ${e.token}`}});if(!n.ok)throw new Error(`Failed to fetch settings: HTTP ${n.status}`);const r=yield n.json();wt=new Yg(r.pusher.key,{cluster:r.pusher.cluster||"local",forceTLS:!0,wsHost:r.pusher.wsHost||void 0,wsPort:r.pusher.wssPort,wssPort:r.pusher.wssPort,enabledTransports:r.pusher.wsHost?["ws"]:void 0,channelAuthorization:{customHandler:({socketId:o,channelName:i},a)=>{Ro(`${t}/api/pusher/auth`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${e.token}`},body:JSON.stringify({socket_id:o,channel_name:i})}).then(d=>d.json()).then(d=>a(null,d)).catch(d=>a(d instanceof Error?d:new Error(String(d)),null))}}})}),sr.catch(()=>{sr=null}),sr)})}function Xg(e){if(!e||!wt)return null;let t=!1;const n=({current:r})=>{r==="connected"&&t?(t=!1,e()):r!=="connected"&&(t=!0)};return wt.connection.bind("state_change",n),()=>wt==null?void 0:wt.connection.unbind("state_change",n)}function Kg(e,t,n){return z(this,null,function*(){if(yield Vg(e),!wt)return()=>{};const r=wt.subscribe(`private-task-${t}`);n.onStatusUpdate&&r.bind(_o.TASK_STATUS_UPDATED,n.onStatusUpdate),n.onInteractionCreated&&r.bind(_o.TASK_INTERACTION_CREATED,n.onInteractionCreated),n.onInteractionAnswered&&r.bind(_o.TASK_INTERACTION_ANSWERED,n.onInteractionAnswered),n.onBrowserCommandCreated&&r.bind(_o.TASK_BROWSER_COMMAND_CREATED,n.onBrowserCommandCreated);const o=Xg(n.onReconnect);return()=>{r.unbind_all(),wt==null||wt.unsubscribe(`private-task-${t}`),o==null||o()}})}const Gs="ap-sdk-active-automation";function Qg(){try{const e=sessionStorage.getItem(Gs);if(!e)return null;const t=JSON.parse(e);return t!=null&&t.taskId&&(t!=null&&t.backendUrl)&&(t!=null&&t.title)?t:null}catch(e){return null}}function yc(e){try{sessionStorage.setItem(Gs,JSON.stringify(e))}catch(t){}}function wc(){try{sessionStorage.removeItem(Gs)}catch(e){}}function em(e){return z(this,null,function*(){var i;try{(i=e.focus)==null||i.call(e)}catch(a){}e.scrollIntoView({block:"center",inline:"center",behavior:"instant"});let t=e.getBoundingClientRect();t.width===0&&t.height===0&&(yield tm(),t=e.getBoundingClientRect());const n=t.left+t.width/2,r=t.top+t.height/2,o={bubbles:!0,cancelable:!0,clientX:n,clientY:r};typeof PointerEvent=="function"&&e.dispatchEvent(new PointerEvent("pointerdown",o)),e.dispatchEvent(new MouseEvent("mousedown",o)),typeof PointerEvent=="function"&&e.dispatchEvent(new PointerEvent("pointerup",o)),e.dispatchEvent(new MouseEvent("mouseup",o)),e.click()})}function tm(){return new Promise(e=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>e()):setTimeout(e,16)})}const Ws="shared",xc="ap-sdk-panel-size:",Sc=280,Tc=200;function nm(e){try{const t=sessionStorage.getItem(xc+e);if(!t)return null;const n=JSON.parse(t);return typeof(n==null?void 0:n.width)=="number"&&typeof(n==null?void 0:n.height)=="number"?n:null}catch(t){return null}}function rm(e,t){try{sessionStorage.setItem(xc+e,JSON.stringify(t))}catch(n){}}function Io(e,t,n){return Math.min(Math.max(e,t),n)}function Ec(){return window.innerWidth-32}function Ac(){return window.innerHeight-64}function Js(e,t){const n=nm(t);n&&(e.style.width=`${Io(n.width,Sc,Ec())}px`,e.style.height=`${Io(n.height,Tc,Ac())}px`);const r=document.createElement("div");r.className="ap-sdk-resize-handle",r.setAttribute("data-ap-sdk","1"),e.appendChild(r);let o=!1,i=0,a=0,d=0,l=0,p=0,h=0;const g=y=>{o&&(p=Io(d+(y.clientX-i),Sc,Ec()),h=Io(l+(y.clientY-a),Tc,Ac()),e.style.width=`${p}px`,e.style.height=`${h}px`)},m=()=>{o&&(o=!1,document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",m),rm(t,{width:p,height:h}))},k=y=>{const S=y.target;if(!(S===r||r.contains(S)))return;y.preventDefault(),y.stopPropagation(),o=!0,i=y.clientX,a=y.clientY;const $=e.getBoundingClientRect();d=$.width,l=$.height,p=d,h=l,document.addEventListener("pointermove",g),document.addEventListener("pointerup",m)};return window.addEventListener("pointerdown",k,{capture:!0}),()=>{window.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",m)}}const Ir="shared",Cc="ap-sdk-panel-pos:";function om(e){try{const t=sessionStorage.getItem(Cc+e);if(!t)return null;const n=JSON.parse(t);return typeof(n==null?void 0:n.left)=="number"&&typeof(n==null?void 0:n.top)=="number"?n:null}catch(t){return null}}function sm(e,t){try{sessionStorage.setItem(Cc+e,JSON.stringify(t))}catch(n){}}function Pc(e,t,n){return Math.min(Math.max(e,t),n)}function $r(e,t){const n=(y,S)=>{const $=Math.max(0,window.innerWidth-e.offsetWidth),E=Math.max(0,window.innerHeight-e.offsetHeight);e.style.left=`${Pc(y,0,$)}px`,e.style.top=`${Pc(S,0,E)}px`,e.style.right="auto",e.style.transform="none"},r=om(t);r&&n(r.left,r.top);let o=!1,i=0,a=0,d=0,l=0,p=0,h=0;const g=y=>{o&&(p=d+(y.clientX-i),h=l+(y.clientY-a),n(p,h))},m=()=>{o&&(o=!1,document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",m),sm(t,{left:p,top:h}))},k=y=>{const S=y.target;if(!(S===e||e.contains(S))||!S.closest(".ap-sdk-panel__header")||S.closest("button, a, input, select, textarea"))return;y.preventDefault(),o=!0,i=y.clientX,a=y.clientY;const $=e.getBoundingClientRect();d=$.left,l=$.top,p=d,h=l,document.addEventListener("pointermove",g),document.addEventListener("pointerup",m)};return window.addEventListener("pointerdown",k,{capture:!0}),()=>{window.removeEventListener("pointerdown",k,{capture:!0}),document.removeEventListener("pointermove",g),document.removeEventListener("pointerup",m)}}function Ys(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var $n=Ys();function Rc(e){$n=e}var zn={exec:()=>null};function ir(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),o=t[r];return o||(o=e(r),t[r]=o),o}}function K(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(o,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(Ge.caret,"$1"),n=n.replace(o,a),r},getRegex:()=>new RegExp(n,t)};return r}var im=((e="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+e)}catch(t){return!1}})(),Ge={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:ir(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:ir(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:ir(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:ir(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:ir(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:ir(e=>new RegExp(`^ {0,${e}}>`))},am=/^(?:[ \t]*(?:\n|$))+/,cm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,lm=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,zr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,um=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Vs=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Lc=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ic=K(Lc).replace(/bull/g,Vs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),dm=K(Lc).replace(/bull/g,Vs).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Xs=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,pm=/^[^\n]+/,Ks=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,hm=K(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ks).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fm=K(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,Vs).getRegex(),$o="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Qs=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,gm=K("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Qs).replace("tag",$o).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),$c=e=>K(Xs).replace("hr",zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$o).getRegex(),mm=$c(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),bm=$c(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),km=K(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",bm).getRegex(),ei={blockquote:km,code:cm,def:hm,fences:lm,heading:um,hr:zr,html:gm,lheading:Ic,list:fm,newline:am,paragraph:mm,table:zn,text:pm},zc=K("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$o).getRegex(),_m=M(v({},ei),{lheading:dm,table:zc,paragraph:K(Xs).replace("hr",zr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",zc).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$o).getRegex()}),vm=M(v({},ei),{html:K(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qs).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:zn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:K(Xs).replace("hr",zr).replace("heading",` *#{1,6} *[^
|
|
1579
|
-
]`).replace("lheading",Ic).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),ym=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,wm=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Oc=/^( {2,}|\\)\n(?!\s*$)/,xm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,en=/[\p{P}\p{S}]/u,ar=/[\s\p{P}\p{S}]/u,Or=/[^\s\p{P}\p{S}]/u,Sm=K(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ar).getRegex(),Tm=/[\p{Pi}\p{Ps}"']/u,Nc=/(?!~)[\p{P}\p{S}]/u,Em=/(?!~)[\s\p{P}\p{S}]/u,Am=/(?:[^\s\p{P}\p{S}]|~)/u,Cm=K(/link|precode-code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-",im?"(?<!`)()":"(^^|[^`])").replace("code",new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),Dc=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Pm=K(Dc,"u").replace(/punct/g,en).getRegex(),Rm=K(Dc,"u").replace(/punct/g,Nc).getRegex(),Lm=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Im=K(Lm,"u").replace(/openQuote/g,Tm).replace(/punct/g,en).getRegex(),Mc="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",$m=K(Mc,"gu").replace(/notPunctSpace/g,Or).replace(/punctSpace/g,ar).replace(/punct/g,en).getRegex(),zm=K(Mc,"gu").replace(/notPunctSpace/g,Am).replace(/punctSpace/g,Em).replace(/punct/g,Nc).getRegex(),Om="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Nm=K(Om,"gu").replace(/notPunctSpace/g,Or).replace(/punctSpace/g,ar).replace(/punct/g,en).getRegex(),Dm=K("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Or).replace(/punctSpace/g,ar).replace(/punct/g,en).getRegex(),Mm="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Um=K(Mm,"gu").replace(/notPunctSpace/g,Or).replace(/punctSpace/g,ar).replace(/punct/g,en).getRegex(),jm=K(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,en).getRegex(),Zm="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",qm=K(Zm,"gu").replace(/notPunctSpace/g,Or).replace(/punctSpace/g,ar).replace(/punct/g,en).getRegex(),Hm=K(/\\(punct)/,"gu").replace(/punct/g,en).getRegex(),Fm=K(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Bm=K(Qs).replace("(?:-->|$)","-->").getRegex(),Gm=K("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Bm).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Wm=K(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Uc=K(/^!?\[(label)\]\[(ref)\]/).replace("label",zo).replace("ref",Ks).getRegex(),jc=K(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ks).getRegex(),Jm=K("reflink|nolink(?!\\()","g").replace("reflink",Uc).replace("nolink",jc).getRegex(),Zc=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ti={_backpedal:zn,anyPunctuation:Hm,autolink:Fm,blockSkip:Cm,br:Oc,code:wm,del:zn,delLDelim:zn,delRDelim:zn,emStrongLDelim:Pm,emStrongRDelimAst:$m,emStrongRDelimUnd:Dm,escape:ym,link:Wm,nolink:jc,punctuation:Sm,reflink:Uc,reflinkSearch:Jm,tag:Gm,text:xm,url:zn},Ym=M(v({},ti),{emStrongLDelim:Im,emStrongRDelimAst:Nm,emStrongRDelimUnd:Um,link:K(/^!?\[(label)\]\((.*?)\)/).replace("label",zo).getRegex(),reflink:K(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zo).getRegex()}),ni=M(v({},ti),{emStrongRDelimAst:zm,emStrongLDelim:Rm,delLDelim:jm,delRDelim:qm,url:K(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Zc).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:K(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Zc).getRegex()}),Vm=M(v({},ni),{br:K(Oc).replace("{2,}","*").getRegex(),text:K(ni.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),Oo={normal:ei,gfm:_m,pedantic:vm},Nr={normal:ti,gfm:ni,breaks:Vm,pedantic:Ym},Xm={"&":"&","<":"<",">":">",'"':""","'":"'"},qc=e=>Xm[e];function qt(e,t){if(t){if(Ge.escapeTest.test(e))return e.replace(Ge.escapeReplace,qc)}else if(Ge.escapeTestNoEncode.test(e))return e.replace(Ge.escapeReplaceNoEncode,qc);return e}function Hc(e){try{e=encodeURI(e).replace(Ge.percentDecode,"%")}catch(t){return null}return e}function Fc(e,t){var i;let n=e.replace(Ge.findPipe,(a,d,l)=>{let p=!1,h=d;for(;--h>=0&&l[h]==="\\";)p=!p;return p?"|":" |"}),r=n.split(Ge.splitPipe),o=0;if(r[0].trim()||r.shift(),r.length>0&&!((i=r.at(-1))!=null&&i.trim())&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(Ge.slashPipe,"|");return r}function _n(e,t,n){let r=e.length;if(r===0)return"";let o=0;for(;o<r&&e.charAt(r-o-1)===t;)o++;return e.slice(0,r-o)}function Bc(e){let t=e.split(`
|
|
1580
|
-
`),n=t.length-1;for(;n>=0&&Ge.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
1581
|
-
`)}function Km(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Qm(e,t=0){let n=t,r="";for(let o of e)if(o===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=o,n++;return r}function Gc(e,t,n,r,o){let i=t.href,a=t.title||null,d=e[1].replace(o.other.outputLinkReplace,"$1");r.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:d,tokens:r.inlineTokens(d)};return r.state.inLink=!1,l}function eb(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let o=r[1];return t.split(`
|
|
1582
|
-
`).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[d]=a;return d.length>=o.length?i.slice(o.length):i}).join(`
|
|
1583
|
-
`)}var No=class{constructor(e){pe(this,"options");pe(this,"rules");pe(this,"lexer");this.options=e||$n}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=this.options.pedantic?t[0]:Bc(t[0]),r=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:r}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=eb(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=_n(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:_n(t[0],`
|
|
1584
|
-
`),depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:_n(t[0],`
|
|
1585
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=_n(t[0],`
|
|
1586
|
-
`).split(`
|
|
1587
|
-
`),r="",o="",i=[];for(;n.length>0;){let a=!1,d=[],l;for(l=0;l<n.length;l++)if(this.rules.other.blockquoteStart.test(n[l]))d.push(n[l]),a=!0;else if(!a)d.push(n[l]);else break;n=n.slice(l);let p=d.join(`
|
|
1588
|
-
`),h=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
1589
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
|
|
1590
|
-
${p}`:p,o=o?`${o}
|
|
1591
|
-
${h}`:h;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(h,i,!0),this.lexer.state.top=g,n.length===0)break;let m=i.at(-1);if((m==null?void 0:m.type)==="code")break;if((m==null?void 0:m.type)==="blockquote"){let k=m,y=n.join(`
|
|
1592
|
-
`),S=k.raw+`
|
|
1593
|
-
`+y.replace(this.rules.other.blockquoteSetextReplace2,""),$=this.blockquote(S);i[i.length-1]=$,r=`${r}
|
|
1594
|
-
${y}`,o=o.substring(0,o.length-k.text.length)+$.text;break}else if((m==null?void 0:m.type)==="list"){let k=m,y=k.raw+`
|
|
1595
|
-
`+n.join(`
|
|
1596
|
-
`),S=this.list(y);i[i.length-1]=S,r=r.substring(0,r.length-m.raw.length)+S.raw,o=o.substring(0,o.length-k.raw.length)+S.raw,n=y.substring(i.at(-1).raw.length).split(`
|
|
1597
|
-
`);continue}}return{type:"blockquote",raw:r,tokens:i,text:o}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,o={type:"list",raw:"",ordered:r,start:r?+n.slice(0,-1):"",loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:"[*+-]");let i=this.rules.other.listItemRegex(n),a=!1;for(;e;){let l=!1,p="",h="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;p=t[0],e=e.substring(p.length);let g=Qm(t[2].split(`
|
|
1598
|
-
`,1)[0],t[1].length),m=e.split(`
|
|
1599
|
-
`,1)[0],k=!g.trim(),y=0;if(this.options.pedantic?(y=2,h=g.trimStart()):k?y=t[1].length+1:(y=g.search(this.rules.other.nonSpaceChar),y=y>4?1:y,h=g.slice(y),y+=t[1].length),k&&this.rules.other.blankLine.test(m)&&(p+=m+`
|
|
1600
|
-
`,e=e.substring(m.length+1),l=!0),!l){let S=this.rules.other.nextBulletRegex(y),$=this.rules.other.hrRegex(y),E=this.rules.other.fencesBeginRegex(y),j=this.rules.other.headingBeginRegex(y),A=this.rules.other.htmlBeginRegex(y),T=this.rules.other.blockquoteBeginRegex(y);for(;e;){let L=e.split(`
|
|
1601
|
-
`,1)[0],q;if(m=L,this.options.pedantic?(m=m.replace(this.rules.other.listReplaceNesting," "),q=m):q=m.replace(this.rules.other.tabCharGlobal," "),E.test(m)||j.test(m)||A.test(m)||T.test(m)||S.test(m)||$.test(m))break;if(q.search(this.rules.other.nonSpaceChar)>=y||!m.trim())h+=`
|
|
1602
|
-
`+q.slice(y);else{if(k||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(g)||j.test(g)||$.test(g))break;h+=`
|
|
1603
|
-
`+m}k=!m.trim(),p+=L+`
|
|
1604
|
-
`,e=e.substring(L.length+1),g=q.slice(y)}}o.loose||(a?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(a=!0)),o.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]}),o.raw+=p}let d=o.items.at(-1);if(d)d.raw=d.raw.trimEnd(),d.text=d.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let l of o.items){this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]);let p=l.tokens[0];if(l.task&&((p==null?void 0:p.type)==="text"||(p==null?void 0:p.type)==="paragraph")){l.text=l.text.replace(this.rules.other.listReplaceTask,""),p.raw=p.raw.replace(this.rules.other.listReplaceTask,""),p.text=p.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let h=this.rules.other.listTaskCheckbox.exec(l.raw);if(h){let g={type:"checkbox",raw:h[0]+" ",checked:h[0]!=="[ ]"};l.checked=g.checked,o.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=g.raw+l.tokens[0].raw,l.tokens[0].text=g.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(g)):l.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):l.tokens.unshift(g)}}else l.task&&(l.task=!1);if(!o.loose){let h=l.tokens.filter(m=>m.type==="space"),g=h.length>0&&h.some(m=>this.rules.other.anyLine.test(m.raw));o.loose=g}}if(o.loose)for(let l of o.items){l.loose=!0;for(let p of l.tokens)p.type==="text"&&(p.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t){let n=Bc(t[0]);return{type:"html",block:!0,raw:n,pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:n}}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:_n(t[0],`
|
|
1605
|
-
`),href:r,title:o}}}table(e){var a;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fc(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(a=t[3])!=null&&a.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
1606
|
-
`):[],i={type:"table",raw:_n(t[0],`
|
|
1607
|
-
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let d of r)this.rules.other.tableAlignRight.test(d)?i.align.push("right"):this.rules.other.tableAlignCenter.test(d)?i.align.push("center"):this.rules.other.tableAlignLeft.test(d)?i.align.push("left"):i.align.push(null);for(let d=0;d<n.length;d++)i.header.push({text:n[d],tokens:this.lexer.inline(n[d]),header:!0,align:i.align[d]});for(let d of o)i.rows.push(Fc(d,i.header.length).map((l,p)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:i.align[p]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:_n(t[0],`
|
|
1608
|
-
`),depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
|
|
1609
|
-
`?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=_n(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=Km(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],o="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],o=i[3])}else o=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),Gc(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=t[r.toLowerCase()];if(!o){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return Gc(n,o,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,a,d=o,l=0,p=r[0][0],h=n===p,g=p==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(g.lastIndex=0,t=t.slice(-1*e.length+o);(r=g.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){d+=a;continue}else if(r[5]||r[6]){if(o%3&&!((o+a)%3)){l+=a;continue}if(h)break}if(d-=a,d>0)continue;a=Math.min(a,a+d+l);let m=[...r[0]][0].length,k=e.slice(0,o+r.index+m+a);if(Math.min(o,a)%2){let S=k.slice(1,-1);return{type:"em",raw:k,text:S,tokens:this.lexer.inlineTokens(S)}}let y=k.slice(2,-2);return{type:"strong",raw:k,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),o=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&o&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let o=[...r[0]].length-1,i,a,d=o,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+o);(r=l.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==o))continue;if(r[3]||r[4]){d+=a;continue}if(d-=a,d>0)continue;a=Math.min(a,a+d);let p=[...r[0]][0].length,h=e.slice(0,o+r.index+p+a),g=h.slice(o,-o);return{type:"del",raw:h,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n,r;let t;if(t=this.rules.inline.url.exec(e)){let o,i;if(t[2]==="@")o=t[0],i="mailto:"+o;else{let a;do a=t[0],t[0]=(r=(n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])!=null?r:"";while(a!==t[0]);o=t[0],t[1]==="www."?i="http://"+t[0]:i=t[0]}return{type:"link",raw:t[0],text:o,href:i,tokens:[{type:"text",raw:o,text:o}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},xt=class Bi{constructor(t){pe(this,"tokens");pe(this,"options");pe(this,"state");pe(this,"inlineQueue");pe(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||$n,this.options.tokenizer=this.options.tokenizer||new No,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Ge,block:Oo.normal,inline:Nr.normal};this.options.pedantic?(n.block=Oo.pedantic,n.inline=Nr.pedantic):this.options.gfm&&(n.block=Oo.gfm,this.options.breaks?n.inline=Nr.breaks:n.inline=Nr.gfm),this.tokenizer.rules=n}static get rules(){return{block:Oo,inline:Nr}}static lex(t,n){return new Bi(n).lex(t)}static lexInline(t,n){return new Bi(n).inlineTokens(t)}lex(t){t=t.replace(Ge.carriageReturn,`
|
|
1610
|
-
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){var i,a,d;this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(Ge.tabCharGlobal," ").replace(Ge.spaceLine,""));let o=1/0;for(;t;){if(t.length<o)o=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}let l;if((a=(i=this.options.extensions)==null?void 0:i.block)!=null&&a.some(h=>(l=h.call({lexer:this},t,n))?(t=t.substring(l.raw.length),n.push(l),!0):!1))continue;if(l=this.tokenizer.space(t)){t=t.substring(l.raw.length);let h=n.at(-1);l.raw.length===1&&h!==void 0?h.raw+=`
|
|
1611
|
-
`:n.push(l);continue}if(l=this.tokenizer.code(t)){t=t.substring(l.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
1612
|
-
`)?"":`
|
|
1613
|
-
`)+l.raw,h.text+=`
|
|
1614
|
-
`+l.text,this.inlineQueue.at(-1).src=h.text):n.push(l);continue}if(l=this.tokenizer.fences(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.heading(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.hr(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.blockquote(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.list(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.html(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.def(t)){t=t.substring(l.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
1615
|
-
`)?"":`
|
|
1616
|
-
`)+l.raw,h.text+=`
|
|
1617
|
-
`+l.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},n.push(l));continue}if(l=this.tokenizer.table(t)){t=t.substring(l.raw.length),n.push(l);continue}if(l=this.tokenizer.lheading(t)){t=t.substring(l.raw.length),n.push(l);continue}let p=t;if((d=this.options.extensions)!=null&&d.startBlock){let h=1/0,g=t.slice(1),m;this.options.extensions.startBlock.forEach(k=>{m=k.call({lexer:this},g),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(p=t.substring(0,h+1))}if(this.state.top&&(l=this.tokenizer.paragraph(p))){let h=n.at(-1);r&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
1618
|
-
`)?"":`
|
|
1619
|
-
`)+l.raw,h.text+=`
|
|
1620
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(l),r=p.length!==t.length,t=t.substring(l.raw.length);continue}if(l=this.tokenizer.text(t)){t=t.substring(l.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
1621
|
-
`)?"":`
|
|
1622
|
-
`)+l.raw,h.text+=`
|
|
1623
|
-
`+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(l);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var d,l,p,h,g,m;this.tokenizer.lexer=this;let r=t;if(this.tokens.links){let k=Object.keys(this.tokens.links);k.length>0&&(r=r.replace(this.tokenizer.rules.inline.reflinkSearch,y=>k.includes(y.slice(y.lastIndexOf("[")+1,-1))?"["+"a".repeat(y.length-2)+"]":y))}r=r.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),r=r.replace(this.tokenizer.rules.inline.blockSkip,(k,y,S)=>{let $=S?S.length:0;return k.slice(0,$)+"["+"a".repeat(k.length-$-2)+"]"}),r=(p=(l=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:l.call({lexer:this},r))!=null?p:r;let o=!1,i="",a=1/0;for(;t;){if(t.length<a)a=t.length;else{this.infiniteLoopError(t.charCodeAt(0));break}o||(i=""),o=!1;let k;if((g=(h=this.options.extensions)==null?void 0:h.inline)!=null&&g.some(S=>(k=S.call({lexer:this},t,n))?(t=t.substring(k.raw.length),n.push(k),!0):!1))continue;if(k=this.tokenizer.escape(t)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.tag(t)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.link(t)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(k.raw.length);let S=n.at(-1);k.type==="text"&&(S==null?void 0:S.type)==="text"?(S.raw+=k.raw,S.text+=k.text):n.push(k);continue}if(k=this.tokenizer.emStrong(t,r,i)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.codespan(t)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.br(t)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.del(t,r,i)){t=t.substring(k.raw.length),n.push(k);continue}if(k=this.tokenizer.autolink(t)){t=t.substring(k.raw.length),n.push(k);continue}if(!this.state.inLink&&(k=this.tokenizer.url(t))){t=t.substring(k.raw.length),n.push(k);continue}let y=t;if((m=this.options.extensions)!=null&&m.startInline){let S=1/0,$=t.slice(1),E;this.options.extensions.startInline.forEach(j=>{E=j.call({lexer:this},$),typeof E=="number"&&E>=0&&(S=Math.min(S,E))}),S<1/0&&S>=0&&(y=t.substring(0,S+1))}if(k=this.tokenizer.inlineText(y)){t=t.substring(k.raw.length),k.raw.slice(-1)!=="_"&&(i=k.raw.slice(-1)),o=!0;let S=n.at(-1);(S==null?void 0:S.type)==="text"?(S.raw+=k.raw,S.text+=k.text):n.push(k);continue}if(t){this.infiniteLoopError(t.charCodeAt(0));break}}return n}infiniteLoopError(t){let n="Infinite loop on byte: "+t;if(this.options.silent)console.error(n);else throw new Error(n)}},Do=class{constructor(e){pe(this,"options");pe(this,"parser");this.options=e||$n}space(e){return""}code({text:e,lang:t,escaped:n}){var i;let r=(i=(t||"").match(Ge.notSpaceStart))==null?void 0:i[0],o=e.replace(Ge.endingNewline,"")+`
|
|
1624
|
-
`;return r?'<pre><code class="language-'+qt(r)+'">'+(n?o:qt(o,!0))+`</code></pre>
|
|
1625
|
-
`:"<pre><code>"+(n?o:qt(o,!0))+`</code></pre>
|
|
1626
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
1627
|
-
${this.parser.parse(e)}</blockquote>
|
|
1628
|
-
`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
1629
|
-
`}hr(e){return`<hr>
|
|
1630
|
-
`}list(e){let t=e.ordered,n=e.start,r="";for(let a=0;a<e.items.length;a++){let d=e.items[a];r+=this.listitem(d)}let o=t?"ol":"ul",i=t&&n!==1?' start="'+n+'"':"";return"<"+o+i+`>
|
|
1631
|
-
`+r+"</"+o+`>
|
|
1632
|
-
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
1633
|
-
`}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
1634
|
-
`}table(e){let t="",n="";for(let o=0;o<e.header.length;o++)n+=this.tablecell(e.header[o]);t+=this.tablerow({text:n});let r="";for(let o=0;o<e.rows.length;o++){let i=e.rows[o];n="";for(let a=0;a<i.length;a++)n+=this.tablecell(i[a]);r+=this.tablerow({text:n})}return r&&(r=`<tbody>${r}</tbody>`),`<table>
|
|
1635
|
-
<thead>
|
|
1636
|
-
`+t+`</thead>
|
|
1637
|
-
`+r+`</table>
|
|
1638
|
-
`}tablerow({text:e}){return`<tr>
|
|
1639
|
-
${e}</tr>
|
|
1640
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
1641
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${qt(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),o=Hc(e);if(o===null)return r;e=o;let i='<a href="'+e+'"';return t&&(i+=' title="'+qt(t)+'"'),i+=">"+r+"</a>",i}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let o=Hc(e);if(o===null)return qt(n);e=o;let i=`<img src="${e}" alt="${qt(n)}"`;return t&&(i+=` title="${qt(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:qt(e.text)}},ri=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},St=class Gi{constructor(t){pe(this,"options");pe(this,"renderer");pe(this,"textRenderer");this.options=t||$n,this.options.renderer=this.options.renderer||new Do,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ri}static parse(t,n){return new Gi(n).parse(t)}static parseInline(t,n){return new Gi(n).parseInline(t)}parse(t){var r,o;this.renderer.parser=this;let n="";for(let i=0;i<t.length;i++){let a=t[i];if((o=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&o[a.type]){let l=a,p=this.options.extensions.renderers[l.type].call({parser:this},l);if(p!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(l.type)){n+=p||"";continue}}let d=a;switch(d.type){case"space":{n+=this.renderer.space(d);break}case"hr":{n+=this.renderer.hr(d);break}case"heading":{n+=this.renderer.heading(d);break}case"code":{n+=this.renderer.code(d);break}case"table":{n+=this.renderer.table(d);break}case"blockquote":{n+=this.renderer.blockquote(d);break}case"list":{n+=this.renderer.list(d);break}case"checkbox":{n+=this.renderer.checkbox(d);break}case"html":{n+=this.renderer.html(d);break}case"def":{n+=this.renderer.def(d);break}case"paragraph":{n+=this.renderer.paragraph(d);break}case"text":{n+=this.renderer.text(d);break}default:{let l='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){var o,i;this.renderer.parser=this;let r="";for(let a=0;a<t.length;a++){let d=t[a];if((i=(o=this.options.extensions)==null?void 0:o.renderers)!=null&&i[d.type]){let p=this.options.extensions.renderers[d.type].call({parser:this},d);if(p!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(d.type)){r+=p||"";continue}}let l=d;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let p='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(p),"";throw new Error(p)}}}return r}},Dr=(us=class{constructor(e){pe(this,"options");pe(this,"block");this.options=e||$n}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?xt.lex:xt.lexInline}provideParser(e=this.block){return e?St.parse:St.parseInline}},pe(us,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),pe(us,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),us),tb=class{constructor(...e){pe(this,"defaults",Ys());pe(this,"options",this.setOptions);pe(this,"parse",this.parseMarkdown(!0));pe(this,"parseInline",this.parseMarkdown(!1));pe(this,"Parser",St);pe(this,"Renderer",Do);pe(this,"TextRenderer",ri);pe(this,"Lexer",xt);pe(this,"Tokenizer",No);pe(this,"Hooks",Dr);this.use(...e)}walkTokens(e,t){var r,o;let n=[];for(let i of e)switch(n=n.concat(t.call(this,i)),i.type){case"table":{let a=i;for(let d of a.header)n=n.concat(this.walkTokens(d.tokens,t));for(let d of a.rows)for(let l of d)n=n.concat(this.walkTokens(l.tokens,t));break}case"list":{let a=i;n=n.concat(this.walkTokens(a.items,t));break}default:{let a=i;(o=(r=this.defaults.extensions)==null?void 0:r.childTokens)!=null&&o[a.type]?this.defaults.extensions.childTokens[a.type].forEach(d=>{let l=a[d].flat(1/0);n=n.concat(this.walkTokens(l,t))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let r=v({},n);if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let i=t.renderers[o.name];i?t.renderers[o.name]=function(...a){let d=o.renderer.apply(this,a);return d===!1&&(d=i.apply(this,a)),d}:t.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[o.level];i?i.unshift(o.tokenizer):t[o.level]=[o.tokenizer],o.start&&(o.level==="block"?t.startBlock?t.startBlock.push(o.start):t.startBlock=[o.start]:o.level==="inline"&&(t.startInline?t.startInline.push(o.start):t.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(t.childTokens[o.name]=o.childTokens)}),r.extensions=t),n.renderer){let o=this.defaults.renderer||new Do(this.defaults);for(let i in n.renderer){if(!(i in o))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,d=n.renderer[a],l=o[a];o[a]=(...p)=>{let h=d.apply(o,p);return h===!1&&(h=l.apply(o,p)),h||""}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new No(this.defaults);for(let i in n.tokenizer){if(!(i in o))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,d=n.tokenizer[a],l=o[a];o[a]=(...p)=>{let h=d.apply(o,p);return h===!1&&(h=l.apply(o,p)),h}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Dr;for(let i in n.hooks){if(!(i in o))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,d=n.hooks[a],l=o[a];Dr.passThroughHooks.has(i)?o[a]=p=>{if(this.defaults.async&&Dr.passThroughHooksRespectAsync.has(i))return z(this,null,function*(){let g=yield d.call(o,p);return l.call(o,g)});let h=d.call(o,p);return l.call(o,h)}:o[a]=(...p)=>{if(this.defaults.async)return z(this,null,function*(){let g=yield d.apply(o,p);return g===!1&&(g=yield l.apply(o,p)),g});let h=d.apply(o,p);return h===!1&&(h=l.apply(o,p)),h}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens,i=n.walkTokens;r.walkTokens=function(a){let d=[];return d.push(i.call(this,a)),o&&(d=d.concat(o.call(this,a))),d}}this.defaults=v(v({},this.defaults),r)}),this}setOptions(e){return this.defaults=v(v({},this.defaults),e),this}lexer(e,t){return xt.lex(e,t!=null?t:this.defaults)}parser(e,t){return St.parse(e,t!=null?t:this.defaults)}parseMarkdown(e){return(t,n)=>{let r=v({},n),o=v(v({},this.defaults),r),i=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&r.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=e),o.async)return z(this,null,function*(){let a=o.hooks?yield o.hooks.preprocess(t):t,d=yield(o.hooks?yield o.hooks.provideLexer(e):e?xt.lex:xt.lexInline)(a,o),l=o.hooks?yield o.hooks.processAllTokens(d):d;o.walkTokens&&(yield Promise.all(this.walkTokens(l,o.walkTokens)));let p=yield(o.hooks?yield o.hooks.provideParser(e):e?St.parse:St.parseInline)(l,o);return o.hooks?yield o.hooks.postprocess(p):p}).catch(i);try{o.hooks&&(t=o.hooks.preprocess(t));let a=(o.hooks?o.hooks.provideLexer(e):e?xt.lex:xt.lexInline)(t,o);o.hooks&&(a=o.hooks.processAllTokens(a)),o.walkTokens&&this.walkTokens(a,o.walkTokens);let d=(o.hooks?o.hooks.provideParser(e):e?St.parse:St.parseInline)(a,o);return o.hooks&&(d=o.hooks.postprocess(d)),d}catch(a){return i(a)}}}onError(e,t){return n=>{if(n.message+=`
|
|
1642
|
-
Please report this to https://github.com/markedjs/marked.`,e){let r="<p>An error occurred:</p><pre>"+qt(n.message+"",!0)+"</pre>";return t?Promise.resolve(r):r}if(t)return Promise.reject(n);throw n}}},On=new tb;function ce(e,t){return On.parse(e,t)}ce.options=ce.setOptions=function(e){return On.setOptions(e),ce.defaults=On.defaults,Rc(ce.defaults),ce},ce.getDefaults=Ys,ce.defaults=$n;function nb(...e){return On.use(...e),ce.defaults=On.defaults,Rc(ce.defaults),ce}ce.use=nb,ce.walkTokens=function(e,t){return On.walkTokens(e,t)},ce.parseInline=On.parseInline,ce.Parser=St,ce.parser=St.parse,ce.Renderer=Do,ce.TextRenderer=ri,ce.Lexer=xt,ce.lexer=xt.lex,ce.Tokenizer=No,ce.Hooks=Dr,ce.parse=ce,ce.options,ce.setOptions,ce.walkTokens,ce.parseInline,St.parse,xt.lex;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Wc,setPrototypeOf:Jc,isFrozen:rb,getPrototypeOf:ob,getOwnPropertyDescriptor:sb}=Object;let{freeze:Ve,seal:ft,create:oi}=Object,{apply:si,construct:ii}=typeof Reflect!="undefined"&&Reflect;Ve||(Ve=function(t){return t}),ft||(ft=function(t){return t}),si||(si=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];return t.apply(n,o)}),ii||(ii=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return new t(...r)});const Mo=Ke(Array.prototype.forEach),ib=Ke(Array.prototype.lastIndexOf),Yc=Ke(Array.prototype.pop),Mr=Ke(Array.prototype.push),ab=Ke(Array.prototype.splice),Uo=Ke(String.prototype.toLowerCase),ai=Ke(String.prototype.toString),ci=Ke(String.prototype.match),Ur=Ke(String.prototype.replace),cb=Ke(String.prototype.indexOf),lb=Ke(String.prototype.trim),Tt=Ke(Object.prototype.hasOwnProperty),Xe=Ke(RegExp.prototype.test),jr=ub(TypeError);function Ke(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return si(e,t,r)}}function ub(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ii(e,n)}}function V(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Uo;Jc&&Jc(e,null);let r=t.length;for(;r--;){let o=t[r];if(typeof o=="string"){const i=n(o);i!==o&&(rb(t)||(t[r]=i),o=i)}e[o]=!0}return e}function db(e){for(let t=0;t<e.length;t++)Tt(e,t)||(e[t]=null);return e}function Ht(e){const t=oi(null);for(const[n,r]of Wc(e))Tt(e,n)&&(Array.isArray(r)?t[n]=db(r):r&&typeof r=="object"&&r.constructor===Object?t[n]=Ht(r):t[n]=r);return t}function Zr(e,t){for(;e!==null;){const r=sb(e,t);if(r){if(r.get)return Ke(r.get);if(typeof r.value=="function")return Ke(r.value)}e=ob(e)}function n(){return null}return n}const Vc=Ve(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),li=Ve(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ui=Ve(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pb=Ve(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),di=Ve(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),hb=Ve(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Xc=Ve(["#text"]),Kc=Ve(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),pi=Ve(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Qc=Ve(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),jo=Ve(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),fb=ft(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gb=ft(/<%[\w\W]*|[\w\W]*%>/gm),mb=ft(/\$\{[\w\W]*/gm),bb=ft(/^data-[\-\w.\u00B7-\uFFFF]+$/),kb=ft(/^aria-[\-\w]+$/),el=ft(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),_b=ft(/^(?:\w+script|data):/i),vb=ft(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),tl=ft(/^html$/i),yb=ft(/^[a-z][.\w]*(-[.\w]+)+$/i);var nl=Object.freeze({__proto__:null,ARIA_ATTR:kb,ATTR_WHITESPACE:vb,CUSTOM_ELEMENT:yb,DATA_ATTR:bb,DOCTYPE_NAME:tl,ERB_EXPR:gb,IS_ALLOWED_URI:el,IS_SCRIPT_OR_DATA:_b,MUSTACHE_EXPR:fb,TMPLIT_EXPR:mb});const qr={element:1,text:3,progressingInstruction:7,comment:8,document:9},wb=function(){return typeof window=="undefined"?null:window},xb=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let r=null;const o="data-tt-policy-suffix";n&&n.hasAttribute(o)&&(r=n.getAttribute(o));const i="dompurify"+(r?"#"+r:"");try{return t.createPolicy(i,{createHTML(a){return a},createScriptURL(a){return a}})}catch(a){return console.warn("TrustedTypes policy "+i+" could not be created."),null}},rl=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function ol(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wb();const t=Z=>ol(Z);if(t.version="3.3.1",t.removed=[],!e||!e.document||e.document.nodeType!==qr.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e;const r=n,o=r.currentScript,{DocumentFragment:i,HTMLTemplateElement:a,Node:d,Element:l,NodeFilter:p,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:m,trustedTypes:k}=e,y=l.prototype,S=Zr(y,"cloneNode"),$=Zr(y,"remove"),E=Zr(y,"nextSibling"),j=Zr(y,"childNodes"),A=Zr(y,"parentNode");if(typeof a=="function"){const Z=n.createElement("template");Z.content&&Z.content.ownerDocument&&(n=Z.content.ownerDocument)}let T,L="";const{implementation:q,createNodeIterator:H,createDocumentFragment:se,getElementsByTagName:je}=n,{importNode:nt}=r;let ee=rl();t.isSupported=typeof Wc=="function"&&typeof A=="function"&&q&&q.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:Se,ERB_EXPR:at,TMPLIT_EXPR:At,DATA_ATTR:vr,ARIA_ATTR:Jt,IS_SCRIPT_OR_DATA:Ct,ATTR_WHITESPACE:yr,CUSTOM_ELEMENT:Yt}=nl;let{IS_ALLOWED_URI:an}=nl,ye=null;const Vt=V({},[...Vc,...li,...ui,...di,...Xc]);let ge=null;const Pt=V({},[...Kc,...pi,...Qc,...jo]);let le=Object.seal(oi(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Le=null,En=null;const Rt=Object.seal(oi(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Te=!0,Pe=!0,Fn=!1,An=!0,Ne=!1,Xt=!0,bt=!1,kt=!1,cn=!1,F=!1,re=!1,xe=!1,rt=!0,_t=!1;const Lt="user-content-";let Cn=!0,Kt=!1,De={},ue=null;const Ie=V({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let X=null;const wr=V({},["audio","video","img","source","image","track"]);let ot=null;const It=V({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ln="http://www.w3.org/1998/Math/MathML",$t="http://www.w3.org/2000/svg",zt="http://www.w3.org/1999/xhtml";let Pn=zt,Bn=!1,Gn=null;const zi=V({},[ln,$t,zt],ai);let xr=V({},["mi","mo","mn","ms","mtext"]),Sr=V({},["annotation-xml"]);const Oi=V({},["title","style","font","a","script"]);let un=null;const Ot=["application/xhtml+xml","text/html"],Ni="text/html";let he=null,Rn=null;const ds=n.createElement("form"),ro=function(_){return _ instanceof RegExp||_ instanceof Function},Tr=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Rn&&Rn===_)){if((!_||typeof _!="object")&&(_={}),_=Ht(_),un=Ot.indexOf(_.PARSER_MEDIA_TYPE)===-1?Ni:_.PARSER_MEDIA_TYPE,he=un==="application/xhtml+xml"?ai:Uo,ye=Tt(_,"ALLOWED_TAGS")?V({},_.ALLOWED_TAGS,he):Vt,ge=Tt(_,"ALLOWED_ATTR")?V({},_.ALLOWED_ATTR,he):Pt,Gn=Tt(_,"ALLOWED_NAMESPACES")?V({},_.ALLOWED_NAMESPACES,ai):zi,ot=Tt(_,"ADD_URI_SAFE_ATTR")?V(Ht(It),_.ADD_URI_SAFE_ATTR,he):It,X=Tt(_,"ADD_DATA_URI_TAGS")?V(Ht(wr),_.ADD_DATA_URI_TAGS,he):wr,ue=Tt(_,"FORBID_CONTENTS")?V({},_.FORBID_CONTENTS,he):Ie,Le=Tt(_,"FORBID_TAGS")?V({},_.FORBID_TAGS,he):Ht({}),En=Tt(_,"FORBID_ATTR")?V({},_.FORBID_ATTR,he):Ht({}),De=Tt(_,"USE_PROFILES")?_.USE_PROFILES:!1,Te=_.ALLOW_ARIA_ATTR!==!1,Pe=_.ALLOW_DATA_ATTR!==!1,Fn=_.ALLOW_UNKNOWN_PROTOCOLS||!1,An=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=_.SAFE_FOR_TEMPLATES||!1,Xt=_.SAFE_FOR_XML!==!1,bt=_.WHOLE_DOCUMENT||!1,F=_.RETURN_DOM||!1,re=_.RETURN_DOM_FRAGMENT||!1,xe=_.RETURN_TRUSTED_TYPE||!1,cn=_.FORCE_BODY||!1,rt=_.SANITIZE_DOM!==!1,_t=_.SANITIZE_NAMED_PROPS||!1,Cn=_.KEEP_CONTENT!==!1,Kt=_.IN_PLACE||!1,an=_.ALLOWED_URI_REGEXP||el,Pn=_.NAMESPACE||zt,xr=_.MATHML_TEXT_INTEGRATION_POINTS||xr,Sr=_.HTML_INTEGRATION_POINTS||Sr,le=_.CUSTOM_ELEMENT_HANDLING||{},_.CUSTOM_ELEMENT_HANDLING&&ro(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(le.tagNameCheck=_.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_.CUSTOM_ELEMENT_HANDLING&&ro(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(le.attributeNameCheck=_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_.CUSTOM_ELEMENT_HANDLING&&typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(le.allowCustomizedBuiltInElements=_.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(Pe=!1),re&&(F=!0),De&&(ye=V({},Xc),ge=[],De.html===!0&&(V(ye,Vc),V(ge,Kc)),De.svg===!0&&(V(ye,li),V(ge,pi),V(ge,jo)),De.svgFilters===!0&&(V(ye,ui),V(ge,pi),V(ge,jo)),De.mathMl===!0&&(V(ye,di),V(ge,Qc),V(ge,jo))),_.ADD_TAGS&&(typeof _.ADD_TAGS=="function"?Rt.tagCheck=_.ADD_TAGS:(ye===Vt&&(ye=Ht(ye)),V(ye,_.ADD_TAGS,he))),_.ADD_ATTR&&(typeof _.ADD_ATTR=="function"?Rt.attributeCheck=_.ADD_ATTR:(ge===Pt&&(ge=Ht(ge)),V(ge,_.ADD_ATTR,he))),_.ADD_URI_SAFE_ATTR&&V(ot,_.ADD_URI_SAFE_ATTR,he),_.FORBID_CONTENTS&&(ue===Ie&&(ue=Ht(ue)),V(ue,_.FORBID_CONTENTS,he)),_.ADD_FORBID_CONTENTS&&(ue===Ie&&(ue=Ht(ue)),V(ue,_.ADD_FORBID_CONTENTS,he)),Cn&&(ye["#text"]=!0),bt&&V(ye,["html","head","body"]),ye.table&&(V(ye,["tbody"]),delete Le.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw jr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw jr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');T=_.TRUSTED_TYPES_POLICY,L=T.createHTML("")}else T===void 0&&(T=xb(k,o)),T!==null&&typeof L=="string"&&(L=T.createHTML(""));Ve&&Ve(_),Rn=_}},oo=V({},[...li,...ui,...pb]),ps=V({},[...di,...hb]),Di=function(_){let C=A(_);(!C||!C.tagName)&&(C={namespaceURI:Pn,tagName:"template"});const O=Uo(_.tagName),de=Uo(C.tagName);return Gn[_.namespaceURI]?_.namespaceURI===$t?C.namespaceURI===zt?O==="svg":C.namespaceURI===ln?O==="svg"&&(de==="annotation-xml"||xr[de]):!!oo[O]:_.namespaceURI===ln?C.namespaceURI===zt?O==="math":C.namespaceURI===$t?O==="math"&&Sr[de]:!!ps[O]:_.namespaceURI===zt?C.namespaceURI===$t&&!Sr[de]||C.namespaceURI===ln&&!xr[de]?!1:!ps[O]&&(Oi[O]||!oo[O]):!!(un==="application/xhtml+xml"&&Gn[_.namespaceURI]):!1},vt=function(_){Mr(t.removed,{element:_});try{A(_).removeChild(_)}catch(C){$(_)}},yt=function(_,C){try{Mr(t.removed,{attribute:C.getAttributeNode(_),from:C})}catch(O){Mr(t.removed,{attribute:null,from:C})}if(C.removeAttribute(_),_==="is")if(F||re)try{vt(C)}catch(O){}else try{C.setAttribute(_,"")}catch(O){}},hs=function(_){let C=null,O=null;if(cn)_="<remove></remove>"+_;else{const Ee=ci(_,/^[\r\n\t ]+/);O=Ee&&Ee[0]}un==="application/xhtml+xml"&&Pn===zt&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const de=T?T.createHTML(_):_;if(Pn===zt)try{C=new m().parseFromString(de,un)}catch(Ee){}if(!C||!C.documentElement){C=q.createDocument(Pn,"template",null);try{C.documentElement.innerHTML=Bn?L:de}catch(Ee){}}const Ze=C.body||C.documentElement;return _&&O&&Ze.insertBefore(n.createTextNode(O),Ze.childNodes[0]||null),Pn===zt?je.call(C,bt?"html":"body")[0]:bt?C.documentElement:Ze},so=function(_){return H.call(_.ownerDocument||_,_,p.SHOW_ELEMENT|p.SHOW_COMMENT|p.SHOW_TEXT|p.SHOW_PROCESSING_INSTRUCTION|p.SHOW_CDATA_SECTION,null)},io=function(_){return _ instanceof g&&(typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||!(_.attributes instanceof h)||typeof _.removeAttribute!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function")},fs=function(_){return typeof d=="function"&&_ instanceof d};function Nt(Z,_,C){Mo(Z,O=>{O.call(t,_,C,Rn)})}const gs=function(_){let C=null;if(Nt(ee.beforeSanitizeElements,_,null),io(_))return vt(_),!0;const O=he(_.nodeName);if(Nt(ee.uponSanitizeElement,_,{tagName:O,allowedTags:ye}),Xt&&_.hasChildNodes()&&!fs(_.firstElementChild)&&Xe(/<[/\w!]/g,_.innerHTML)&&Xe(/<[/\w!]/g,_.textContent)||_.nodeType===qr.progressingInstruction||Xt&&_.nodeType===qr.comment&&Xe(/<[/\w]/g,_.data))return vt(_),!0;if(!(Rt.tagCheck instanceof Function&&Rt.tagCheck(O))&&(!ye[O]||Le[O])){if(!Le[O]&&bs(O)&&(le.tagNameCheck instanceof RegExp&&Xe(le.tagNameCheck,O)||le.tagNameCheck instanceof Function&&le.tagNameCheck(O)))return!1;if(Cn&&!ue[O]){const de=A(_)||_.parentNode,Ze=j(_)||_.childNodes;if(Ze&&de){const Ee=Ze.length;for(let Je=Ee-1;Je>=0;--Je){const Dt=S(Ze[Je],!0);Dt.__removalCount=(_.__removalCount||0)+1,de.insertBefore(Dt,E(_))}}}return vt(_),!0}return _ instanceof l&&!Di(_)||(O==="noscript"||O==="noembed"||O==="noframes")&&Xe(/<\/no(script|embed|frames)/i,_.innerHTML)?(vt(_),!0):(Ne&&_.nodeType===qr.text&&(C=_.textContent,Mo([Se,at,At],de=>{C=Ur(C,de," ")}),_.textContent!==C&&(Mr(t.removed,{element:_.cloneNode()}),_.textContent=C)),Nt(ee.afterSanitizeElements,_,null),!1)},ms=function(_,C,O){if(rt&&(C==="id"||C==="name")&&(O in n||O in ds))return!1;if(!(Pe&&!En[C]&&Xe(vr,C))){if(!(Te&&Xe(Jt,C))){if(!(Rt.attributeCheck instanceof Function&&Rt.attributeCheck(C,_))){if(!ge[C]||En[C]){if(!(bs(_)&&(le.tagNameCheck instanceof RegExp&&Xe(le.tagNameCheck,_)||le.tagNameCheck instanceof Function&&le.tagNameCheck(_))&&(le.attributeNameCheck instanceof RegExp&&Xe(le.attributeNameCheck,C)||le.attributeNameCheck instanceof Function&&le.attributeNameCheck(C,_))||C==="is"&&le.allowCustomizedBuiltInElements&&(le.tagNameCheck instanceof RegExp&&Xe(le.tagNameCheck,O)||le.tagNameCheck instanceof Function&&le.tagNameCheck(O))))return!1}else if(!ot[C]){if(!Xe(an,Ur(O,yr,""))){if(!((C==="src"||C==="xlink:href"||C==="href")&&_!=="script"&&cb(O,"data:")===0&&X[_])){if(!(Fn&&!Xe(Ct,Ur(O,yr,"")))){if(O)return!1}}}}}}}return!0},bs=function(_){return _!=="annotation-xml"&&ci(_,Yt)},ao=function(_){Nt(ee.beforeSanitizeAttributes,_,null);const{attributes:C}=_;if(!C||io(_))return;const O={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ge,forceKeepAttr:void 0};let de=C.length;for(;de--;){const Ze=C[de],{name:Ee,namespaceURI:Je,value:Dt}=Ze,Qt=he(Ee),co=Dt;let Me=Ee==="value"?co:lb(co);if(O.attrName=Qt,O.attrValue=Me,O.keepAttr=!0,O.forceKeepAttr=void 0,Nt(ee.uponSanitizeAttribute,_,O),Me=O.attrValue,_t&&(Qt==="id"||Qt==="name")&&(yt(Ee,_),Me=Lt+Me),Xt&&Xe(/((--!?|])>)|<\/(style|title|textarea)/i,Me)){yt(Ee,_);continue}if(Qt==="attributename"&&ci(Me,"href")){yt(Ee,_);continue}if(O.forceKeepAttr)continue;if(!O.keepAttr){yt(Ee,_);continue}if(!An&&Xe(/\/>/i,Me)){yt(Ee,_);continue}Ne&&Mo([Se,at,At],_s=>{Me=Ur(Me,_s," ")});const ks=he(_.nodeName);if(!ms(ks,Qt,Me)){yt(Ee,_);continue}if(T&&typeof k=="object"&&typeof k.getAttributeType=="function"&&!Je)switch(k.getAttributeType(ks,Qt)){case"TrustedHTML":{Me=T.createHTML(Me);break}case"TrustedScriptURL":{Me=T.createScriptURL(Me);break}}if(Me!==co)try{Je?_.setAttributeNS(Je,Ee,Me):_.setAttribute(Ee,Me),io(_)?vt(_):Yc(t.removed)}catch(_s){yt(Ee,_)}}Nt(ee.afterSanitizeAttributes,_,null)},dn=function Z(_){let C=null;const O=so(_);for(Nt(ee.beforeSanitizeShadowDOM,_,null);C=O.nextNode();)Nt(ee.uponSanitizeShadowNode,C,null),gs(C),ao(C),C.content instanceof i&&Z(C.content);Nt(ee.afterSanitizeShadowDOM,_,null)};return t.sanitize=function(Z){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=null,O=null,de=null,Ze=null;if(Bn=!Z,Bn&&(Z="<!-->"),typeof Z!="string"&&!fs(Z))if(typeof Z.toString=="function"){if(Z=Z.toString(),typeof Z!="string")throw jr("dirty is not a string, aborting")}else throw jr("toString is not a function");if(!t.isSupported)return Z;if(kt||Tr(_),t.removed=[],typeof Z=="string"&&(Kt=!1),Kt){if(Z.nodeName){const Dt=he(Z.nodeName);if(!ye[Dt]||Le[Dt])throw jr("root node is forbidden and cannot be sanitized in-place")}}else if(Z instanceof d)C=hs("<!---->"),O=C.ownerDocument.importNode(Z,!0),O.nodeType===qr.element&&O.nodeName==="BODY"||O.nodeName==="HTML"?C=O:C.appendChild(O);else{if(!F&&!Ne&&!bt&&Z.indexOf("<")===-1)return T&&xe?T.createHTML(Z):Z;if(C=hs(Z),!C)return F?null:xe?L:""}C&&cn&&vt(C.firstChild);const Ee=so(Kt?Z:C);for(;de=Ee.nextNode();)gs(de),ao(de),de.content instanceof i&&dn(de.content);if(Kt)return Z;if(F){if(re)for(Ze=se.call(C.ownerDocument);C.firstChild;)Ze.appendChild(C.firstChild);else Ze=C;return(ge.shadowroot||ge.shadowrootmode)&&(Ze=nt.call(r,Ze,!0)),Ze}let Je=bt?C.outerHTML:C.innerHTML;return bt&&ye["!doctype"]&&C.ownerDocument&&C.ownerDocument.doctype&&C.ownerDocument.doctype.name&&Xe(tl,C.ownerDocument.doctype.name)&&(Je="<!DOCTYPE "+C.ownerDocument.doctype.name+`>
|
|
1643
|
-
`+Je),Ne&&Mo([Se,at,At],Dt=>{Je=Ur(Je,Dt," ")}),T&&xe?T.createHTML(Je):Je},t.setConfig=function(){let Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tr(Z),kt=!0},t.clearConfig=function(){Rn=null,kt=!1},t.isValidAttribute=function(Z,_,C){Rn||Tr({});const O=he(Z),de=he(_);return ms(O,de,C)},t.addHook=function(Z,_){typeof _=="function"&&Mr(ee[Z],_)},t.removeHook=function(Z,_){if(_!==void 0){const C=ib(ee[Z],_);return C===-1?void 0:ab(ee[Z],C,1)[0]}return Yc(ee[Z])},t.removeHooks=function(Z){ee[Z]=[]},t.removeAllHooks=function(){ee=rl()},t}var Sb=ol();function sl(e){const t=ce.parse(e,{gfm:!0,breaks:!0,async:!1});return Sb.sanitize(t)}const il=1e3,Tb=32,al=15e3,Eb=new Set(["completed","failed","cancelled"]),Ab=4e3;let I=null,Hr=null,Fr=null,Ft=null,Fe=null,hi=null,Zo=null,fi=!1,qo=null,Br=null,G={kind:"connecting"},cr=[],lt=!0,lr=null,ve=null,ur=null,tn=null,Gr=-1,Qe=null,nn=!1,rn=null,Nn=new Set;function gi(){Fo(),wc(),Ft&&clearInterval(Ft),Ft=null,rn==null||rn(),rn=null,Fe==null||Fe.destroy(),Fe=null,I&&Ut(I),I==null||I.remove(),I=null,Hr==null||Hr(),Hr=null,Fr==null||Fr(),Fr=null,hi=null,G={kind:"connecting"},cr=[],lt=!0,lr=null,ve=null,ur=null,tn=null,Zo=null,Gr=-1,Qe=null,nn=!1,Nn=new Set}function mi(e,t,n,r,o){I&&gi(),hi=o!=null?o:null,G={kind:"connecting"},cr=[],lt=!0,lr=null,Gr=-1,Qe=null,nn=!1,Nn=new Set,ve=e,ur=n,tn=t,Zo=r,yc({taskId:e,backendUrl:n,title:r}),I=document.createElement("div"),I.className="ap-sdk-panel",I.setAttribute("data-ap-sdk","1"),I.setAttribute("role","dialog"),I.setAttribute("aria-modal","true"),I.setAttribute("aria-label","Automation in progress");const i=r.length>55?`${r.slice(0,52)}…`:r;I.innerHTML=`
|
|
1644
|
-
<div class="ap-sdk-panel__header">
|
|
1645
|
-
<span class="ap-sdk-panel__title">
|
|
1646
|
-
<span class="ap-sdk-panel__logo">AP</span>
|
|
1647
|
-
Automating page
|
|
1648
|
-
</span>
|
|
1649
|
-
<div class="ap-sdk-panel__header-actions">
|
|
1650
|
-
<button class="ap-sdk-panel__close" aria-label="Close" data-ap-close>×</button>
|
|
1651
|
-
</div>
|
|
1652
|
-
</div>
|
|
1653
|
-
<div class="ap-sdk-runner__meta">
|
|
1654
|
-
<div class="ap-sdk-runner__meta-row">
|
|
1655
|
-
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--automate">Automate</span>
|
|
1656
|
-
<span class="ap-sdk-runner__title" title="${Ub(r)}">${ki(i)}</span>
|
|
1657
|
-
</div>
|
|
1658
|
-
<div class="ap-sdk-runner__meta-row ap-sdk-runner__meta-row--controls">
|
|
1659
|
-
<span class="ap-sdk-runner__counter" data-ap-runner-counter>0 actions</span>
|
|
1660
|
-
<span class="ap-sdk-runner__timer" data-ap-runner-timer>00:00</span>
|
|
1661
|
-
<span class="ap-sdk-status-badge ap-sdk-status-badge--in-progress" data-ap-runner-status>running</span>
|
|
1662
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__cancel-btn" data-ap-runner-cancel type="button">Cancel task</button>
|
|
1663
|
-
</div>
|
|
1664
|
-
</div>
|
|
1665
|
-
<div class="ap-sdk-runner__log-toolbar">
|
|
1666
|
-
<button type="button" class="ap-sdk-runner__scroll-toggle" data-ap-runner-scroll-toggle>Auto ↓</button>
|
|
1667
|
-
<button type="button" class="ap-sdk-runner__scroll-jump" data-ap-runner-scroll-jump title="Jump to latest output">Jump to latest</button>
|
|
1668
|
-
</div>
|
|
1669
|
-
<div class="ap-sdk-runner__log" data-ap-runner-log></div>
|
|
1670
|
-
<div class="ap-sdk-runner__chat" data-ap-runner-chat>
|
|
1671
|
-
<div class="ap-sdk-runner__question" data-ap-runner-question style="display:none"></div>
|
|
1672
|
-
<form class="ap-sdk-runner__chat-form" data-ap-runner-chat-form>
|
|
1673
|
-
<input
|
|
1674
|
-
type="text"
|
|
1675
|
-
class="ap-sdk-runner__chat-input"
|
|
1676
|
-
data-ap-runner-chat-input
|
|
1677
|
-
placeholder="Send a message to the agent…"
|
|
1678
|
-
autocomplete="off"
|
|
1679
|
-
/>
|
|
1680
|
-
<button type="submit" class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-runner-chat-send>Send</button>
|
|
1681
|
-
</form>
|
|
1682
|
-
<div class="ap-sdk-runner__chat-error" data-ap-runner-chat-error style="display:none"></div>
|
|
1683
|
-
</div>
|
|
1684
|
-
<div class="ap-sdk-runner__hint" data-ap-runner-hint>Closing keeps the task running — resume anytime from My Captures.</div>
|
|
1685
|
-
<div class="ap-sdk-panel__status" data-ap-runner-summary style="display:none"></div>
|
|
1686
|
-
`,I.addEventListener("wheel",a=>{a.stopPropagation()},{passive:!0}),I.addEventListener("touchmove",a=>{a.stopPropagation()},{passive:!0}),document.body.appendChild(I),Fe=Es(),Mt(I),Hr=Js(I,Ws),Fr=$r(I,Ir),I.querySelector("[data-ap-close]").addEventListener("click",()=>{gi(),o==null||o()}),I.querySelector("[data-ap-runner-chat-form]").addEventListener("submit",a=>{a.preventDefault(),Rb(t,e)}),I.querySelector("[data-ap-runner-cancel]").addEventListener("click",a=>{a.stopPropagation();const d=a.currentTarget;if(!fi){fi=!0,d.textContent="Confirm",qo=setTimeout(Fo,Ab),Br=l=>{l.target!==d&&Fo()},document.addEventListener("click",Br,!0);return}Fo(),Cb(t,e)}),I.querySelector("[data-ap-runner-scroll-toggle]").addEventListener("click",()=>{lt=!lt,lt&&cl(),Ho()}),I.querySelector("[data-ap-runner-scroll-jump]").addEventListener("click",()=>{lt=!0,cl(),Ho()}),I.querySelector("[data-ap-runner-log]").addEventListener("scroll",()=>{if(!lt||!I)return;const a=I.querySelector("[data-ap-runner-log]");a.scrollHeight-a.scrollTop-a.clientHeight>Tb&&(lt=!1,Ho())}),bi(),ll(e,t)}function cl(){const e=I==null?void 0:I.querySelector("[data-ap-runner-log]");e&&(e.scrollTop=e.scrollHeight)}function Ho(){if(!I)return;const e=I.querySelector("[data-ap-runner-scroll-toggle]");e&&(e.textContent=lt?"Auto ↓":"Manual",e.title=lt?"Disable auto-scroll":"Enable auto-scroll",e.classList.toggle("ap-sdk-runner__scroll-toggle--active",lt))}function ll(e,t){const n=d=>z(null,null,function*(){if(ve!==e||!I||G.kind!=="idle"&&G.kind!=="connecting"||Nn.has(d.commandId))return;Nn.add(d.commandId);const l={id:d.commandId,taskId:d.taskId,action:d.action,selector:d.selector,value:d.value,description:d.description,status:"pending",createdAt:new Date().toISOString()};Dn({kind:"executing",command:l,actionsRun:G.kind==="idle"?G.actionsRun:0}),yield dl(l,t,e)}),r=d=>{if(!(ve!==e||!I)&&Eb.has(d)){if(G.kind==="executing")Dn({kind:"finishing",status:d,actionsRun:G.actionsRun});else if(G.kind==="connecting"||G.kind==="idle"){const l=G.kind==="idle"?G.actionsRun:0;Dn({kind:"finished",status:d,actionsRun:l})}}},o=d=>{ve!==e||!I||(d.outputChunk&&pl([d.outputChunk]),r(d.status))},i=()=>z(null,null,function*(){var d;if(!(ve!==e||!I))try{const l=yield Lo(t,e);ve===e&&I&&(Qe=(d=l[0])!=null?d:null,Mn())}catch(l){}}),a=()=>z(null,null,function*(){var d;try{const[l,p,h,g]=yield Promise.all([mc(t,e),Zg(t,e),Lo(t,e),Ug(t,e)]);if(ve!==e||!I)return;pl(p),Qe=(d=h[0])!=null?d:null,Mn(),r(l.status),g&&g.status==="pending"&&(G.kind==="idle"||G.kind==="connecting")&&!Nn.has(g.id)?(Nn.add(g.id),Dn({kind:"executing",command:g,actionsRun:G.kind==="idle"?G.actionsRun:0}),yield dl(g,t,e)):G.kind==="connecting"&&Dn({kind:"idle",actionsRun:0})}catch(l){}});a(),Kg(t,e,{onStatusUpdate:o,onInteractionCreated:i,onInteractionAnswered:i,onBrowserCommandCreated:n,onReconnect:()=>{a()}}).then(d=>{if(ve!==e||G.kind==="finished"){d();return}rn=d})}function Dn(e){G=e,G.kind==="idle"&&lr===null&&(lr=Date.now(),Bo(),Ft=setInterval(Bo,il)),G.kind==="finished"&&(Ft&&(clearInterval(Ft),Ft=null),rn==null||rn(),rn=null,Fe==null||Fe.hide(),wc()),bi()}function Fo(){fi=!1,qo&&(clearTimeout(qo),qo=null),Br&&(document.removeEventListener("click",Br,!0),Br=null);const e=I==null?void 0:I.querySelector("[data-ap-runner-cancel]");e&&(e.textContent="Cancel task")}function Cb(e,t){return z(this,null,function*(){if(ve!==t||!I)return;const n=I.querySelector("[data-ap-runner-cancel]");n&&(n.disabled=!0);try{yield Hg(e,t)}catch(r){n&&(n.disabled=!1)}})}function ul(){if(!ve||!tn||!ur||!Zo)return;const e=ve,t=tn;yc({taskId:e,backendUrl:ur,title:Zo}),Ft&&clearInterval(Ft),Bo(),Ft=setInterval(Bo,il);const n=G.kind==="finished"?G.actionsRun:0;Nn=new Set,G={kind:"idle",actionsRun:n},bi(),ll(e,t)}function bi(){if(!I)return;const e=I.querySelector("[data-ap-runner-status]"),t=I.querySelector("[data-ap-runner-counter]"),n=I.querySelector("[data-ap-runner-log]"),r=I.querySelector("[data-ap-runner-hint]");if(!e||!t||!n||!r)return;const o="actionsRun"in G?G.actionsRun:0;t.textContent=`${o} action${o===1?"":"s"}`,Ho(),G.kind==="finished"?(e.textContent=G.status.replace(/_/g," "),e.className=`ap-sdk-status-badge ap-sdk-status-badge--${G.status.replace(/_/g,"-")}`,r.style.display="none",Db(G.status)):(e.textContent="running",e.className="ap-sdk-status-badge ap-sdk-status-badge--in-progress",r.style.display="block");const i=n.querySelector("[data-ap-runner-placeholder]");if(cr.length===0&&(G.kind==="connecting"||G.kind==="idle")){if(!i){const h=document.createElement("div");h.className="ap-sdk-runner__placeholder",h.setAttribute("data-ap-runner-placeholder","1"),h.textContent="Waiting for the agent's first action…",n.appendChild(h)}}else i==null||i.remove();Mn();const a=I.querySelector("[data-ap-runner-chat-input]"),d=I.querySelector("[data-ap-runner-chat-send]");if(a&&d){const h=G.kind==="finished"&&G.status==="failed";a.disabled=h,d.disabled=h||nn,h&&(a.placeholder="This task failed — start a new automation to continue.")}const l=I.querySelector("[data-ap-runner-cancel]");l&&(l.style.display=G.kind==="finished"?"none":"");const p=I.querySelector("[data-ap-runner-summary]");p&&G.kind!=="finished"&&(p.style.display="none",p.innerHTML="")}function Mn(){var o;if(!I)return;const e=I.querySelector("[data-ap-runner-question]"),t=I.querySelector("[data-ap-runner-chat-input]");if(!e||!t)return;if(!Qe){e.style.display="none",e.innerHTML="",t.placeholder="Send a message to the agent…";return}const n=Qe.questionMetadata,r=(o=n==null?void 0:n.options)!=null?o:[];if(t.placeholder="Type your answer…",e.style.display="block",e.innerHTML=`
|
|
1687
|
-
<div class="ap-sdk-runner__question-label">${ki((n==null?void 0:n.header)||"The agent has a question")}</div>
|
|
1688
|
-
<div class="ap-sdk-runner__question-text ap-sdk-markdown">${sl((n==null?void 0:n.question)||Qe.question)}</div>
|
|
1689
|
-
${r.length>0?'<div class="ap-sdk-runner__question-options" data-ap-runner-question-options></div>':""}
|
|
1690
|
-
`,r.length>0){const i=e.querySelector("[data-ap-runner-question-options]");for(const a of r){const d=document.createElement("button");d.type="button",d.className="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__question-option",d.textContent=a.label,d.addEventListener("click",()=>void Pb(a.label)),i.appendChild(d)}}}function Pb(e){return z(this,null,function*(){var r;if(!I||!Qe||!ve||nn)return;const t=ve,n=tn;if(n){nn=!0;try{const o={selectedOption:e};yield _c(n,t,Qe.id,o),Qe=null,Mn();const i=yield Lo(n,t);ve===t&&I&&(Qe=(r=i[0])!=null?r:null,Mn())}catch(o){const i=I.querySelector("[data-ap-runner-chat-error]");i&&(i.textContent="Failed to send your answer — try again.",i.style.display="block")}finally{nn=!1}}})}function Bo(){if(!I||lr===null)return;const e=I.querySelector("[data-ap-runner-timer]");if(!e)return;const t=Math.max(0,Math.floor((Date.now()-lr)/1e3)),n=String(Math.floor(t/60)).padStart(2,"0"),r=String(t%60).padStart(2,"0");e.textContent=`${n}:${r}`}function dl(e,t,n){return z(this,null,function*(){let r="done",o;try{if(e.action==="getContext"){const a=e.selector?document.querySelector(e.selector):document.body;if(!a)throw new Error(`element not found (${e.selector})`);Fe==null||Fe.update(a),o=Ib(a)}else{if(!e.selector)throw new Error(`${e.action} command is missing a selector`);const a=document.querySelector(e.selector);if(!a)throw new Error(`element not found (${e.selector})`);if(Fe==null||Fe.update(a),e.action==="click")yield em(a),o="Clicked";else{if(e.value===void 0)throw new Error("inputText command is missing a value");$b(a,e.value),o="Entered text"}}}catch(a){r="error",o=a instanceof Error?a.message:"Unknown error executing command"}if(ve===n&&I&&zb(r,e,o),yield Lb(t,n,e.id,r,o),ve!==n||!I)return;Fe==null||Fe.hide();const i=(G.kind==="executing"||G.kind==="finishing"?G.actionsRun:0)+1;G.kind==="finishing"?Dn({kind:"finished",status:G.status,actionsRun:i}):G.kind==="executing"&&Dn({kind:"idle",actionsRun:i})})}function Rb(e,t){return z(this,null,function*(){var a;if(!I||nn||G.kind==="finished"&&G.status==="failed")return;const n=I.querySelector("[data-ap-runner-chat-input]"),r=I.querySelector("[data-ap-runner-chat-error]"),o=I.querySelector("[data-ap-runner-chat-send]");if(!n||!r||!o)return;const i=n.value.trim();if(i){nn=!0,o.disabled=!0,r.style.display="none";try{if(Qe){yield _c(e,t,Qe.id,i),Qe=null,Mn();try{const d=yield Lo(e,t);ve===t&&I&&(Qe=(a=d[0])!=null?a:null,Mn())}catch(d){}}else yield qg(e,t,i),G.kind==="finished"&&ul();n.value=""}catch(d){r.textContent=d instanceof Error?d.message:"Failed to send — try again.",r.style.display="block"}finally{nn=!1,o.disabled=!1}}})}function Lb(e,t,n,r,o){return z(this,null,function*(){try{yield jg(e,t,n,r,o)}catch(i){}})}function Ib(e){const t=e.cloneNode(!0);t.querySelectorAll("script, style, noscript").forEach(o=>o.remove()),ra(t),na(t);let n=t.outerHTML,r=!1;return n.length>al&&(n=n.slice(0,al),r=!0),`URL: ${location.href}
|
|
1691
|
-
Title: ${document.title}
|
|
1692
|
-
|
|
1693
|
-
${n}${r?`
|
|
1694
|
-
… (truncated)`:""}`}function $b(e,t){var i;const r=e instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,o=(i=Object.getOwnPropertyDescriptor(r,"value"))==null?void 0:i.set;if(!o)throw new Error("target element does not accept text input");o.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function zb(e,t,n){var h,g;const r=e==="done"?"✓":"✗",o=t.selector?` \`${t.selector}\``:"",i=t.description||`${t.action}${o}`,a=e==="done"&&t.action==="getContext"?`read context (${(h=n==null?void 0:n.length)!=null?h:0} chars)`:n,d=a?` — ${a}`:"";if(cr.push({status:e,text:`${r} ${i}${d}`}),!I)return;const l=I.querySelector("[data-ap-runner-log]");if(!l)return;(g=l.querySelector("[data-ap-runner-placeholder]"))==null||g.remove();const p=document.createElement("div");p.className=`ap-sdk-runner__log-entry ap-sdk-runner__log-entry--${e}`,p.textContent=cr[cr.length-1].text,l.appendChild(p),lt&&(l.scrollTop=l.scrollHeight)}function Ob(e){var t,n;return(n=(t=e.display)==null?void 0:t.variant)!=null?n:e.sdkEventType}function Nb(e){const t=Ob(e);return(e.stream==="stdout"||e.stream==="stderr"||e.stream==="sdk_event"&&(t==="text"||t==="thinking"))&&e.data.trim()||null}function pl(e){var r;const t=e.filter(o=>o.sequence>Gr).sort((o,i)=>o.sequence-i.sequence);if(t.length===0||(Gr=Math.max(Gr,...t.map(o=>o.sequence)),!I))return;const n=I.querySelector("[data-ap-runner-log]");if(n)for(const o of t){const i=Nb(o);if(!i)continue;(r=n.querySelector("[data-ap-runner-placeholder]"))==null||r.remove();const a=document.createElement("div");a.className=`ap-sdk-runner__log-entry ap-sdk-runner__log-entry--output ap-sdk-runner__log-entry--${o.stream}`,o.stream==="sdk_event"?(a.classList.add("ap-sdk-markdown"),a.innerHTML=sl(i)):a.textContent=i,n.appendChild(a),lt&&(n.scrollTop=n.scrollHeight)}}function Db(e){if(!I||!ve||!ur)return;const t=I.querySelector("[data-ap-runner-summary]");if(!t)return;const n=`${ur.replace(/\/+$/,"")}/tasks/${ve}`,r=e==="completed"?"Automation complete!":"Automation ended",o=e==="completed",i=o?"ap-sdk-panel__btn--secondary":"ap-sdk-panel__btn--primary";t.style.display="block",t.innerHTML=`
|
|
1695
|
-
<div class="ap-sdk-success-card">
|
|
1696
|
-
<p class="ap-sdk-success-headline">${ki(r)}</p>
|
|
1697
|
-
${o?`
|
|
1698
|
-
<div class="ap-sdk-runner__approval" data-ap-runner-approval>
|
|
1699
|
-
<div class="ap-sdk-runner__approval-actions">
|
|
1700
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary ap-sdk-panel__btn--block" data-ap-runner-approve><span class="ap-sdk-btn-icon" aria-hidden="true">✓</span>Approve</button>
|
|
1701
|
-
<button class="ap-sdk-runner__text-btn ap-sdk-runner__text-btn--danger" data-ap-runner-reject>Reject</button>
|
|
1702
|
-
</div>
|
|
1703
|
-
<div class="ap-sdk-runner__reject-form" data-ap-runner-reject-form style="display:none">
|
|
1704
|
-
<textarea class="ap-sdk-panel__textarea" rows="2" placeholder="What was wrong? (optional)" data-ap-runner-reject-feedback></textarea>
|
|
1705
|
-
<div class="ap-sdk-runner__reject-hint">Leave blank to reject permanently, or add details so the agent can retry with your feedback.</div>
|
|
1706
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--danger ap-sdk-panel__btn--block" data-ap-runner-reject-submit>Reject Permanently</button>
|
|
1707
|
-
</div>
|
|
1708
|
-
<div class="ap-sdk-runner__approval-error" data-ap-runner-approval-error style="display:none"></div>
|
|
1709
|
-
</div>
|
|
1710
|
-
<div class="ap-sdk-runner__divider"></div>`:""}
|
|
1711
|
-
<div class="ap-sdk-success-actions ap-sdk-success-actions--stacked">
|
|
1712
|
-
<button class="ap-sdk-panel__btn ${i} ap-sdk-panel__btn--block" data-ap-runner-view>View task<span class="ap-sdk-btn-icon ap-sdk-btn-icon--trailing" aria-hidden="true">↗</span></button>
|
|
1713
|
-
<button class="ap-sdk-runner__text-btn" data-ap-runner-close>Close</button>
|
|
1714
|
-
</div>
|
|
1715
|
-
</div>
|
|
1716
|
-
`,t.querySelector("[data-ap-runner-view]").addEventListener("click",()=>window.open(n,"_blank","noopener,noreferrer")),t.querySelector("[data-ap-runner-close]").addEventListener("click",()=>{const a=hi;gi(),a==null||a()}),o&&Mb(t)}function Mb(e){const t=e.querySelector("[data-ap-runner-approve]"),n=e.querySelector("[data-ap-runner-reject]"),r=e.querySelector("[data-ap-runner-reject-form]"),o=e.querySelector("[data-ap-runner-reject-feedback]"),i=e.querySelector("[data-ap-runner-reject-submit]"),a=e.querySelector("[data-ap-runner-approval-error]"),d=e.querySelector(".ap-sdk-runner__approval-actions"),l=h=>{a.textContent=h,a.style.display="block"};t.addEventListener("click",()=>z(null,null,function*(){if(!ve||!tn)return;const h=ve,g=tn;t.disabled=!0,n.disabled=!0,a.style.display="none";try{yield Fg(g,h),d.innerHTML='<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">✓ Approved</span>',r.style.display="none"}catch(m){t.disabled=!1,n.disabled=!1,l(m instanceof Error?m.message:"Failed to approve — try again.")}})),n.addEventListener("click",()=>{r.style.display=r.style.display==="none"?"block":"none",r.style.display==="block"&&o.focus()});const p=()=>{i.textContent=o.value.trim()?"Reject & Continue":"Reject Permanently"};o.addEventListener("input",p),i.addEventListener("click",()=>z(null,null,function*(){if(!ve||!tn)return;const h=ve,g=tn,m=o.value.trim();i.disabled=!0,t.disabled=!0,a.style.display="none",i.textContent="Rejecting…";try{yield Bg(g,h,m),m?ul():(d.innerHTML='<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">✕ Rejected</span>',r.style.display="none")}catch(k){i.disabled=!1,t.disabled=!1,p(),l(k instanceof Error?k.message:"Failed to reject — try again.")}}))}function Ub(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function ki(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function jb(e,t,n){const r=!!(t.backendUrl&&t.token),o=document.createElement("div");o.className="ap-sdk-advanced",o.innerHTML=`
|
|
1625
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of A.seen.entries()){const h=u[1];if(e===u[0]){s(u);continue}if(A.external){const g=(i=A.external.registry.get(u[0]))==null?void 0:i.id;if(e!==u[0]&&g){s(u);continue}}if((l=A.metadataRegistry.get(u[0]))==null?void 0:l.id){s(u);continue}if(h.cycle){s(u);continue}if(h.count>1&&A.reused==="ref"){s(u);continue}}}function ou(A,e){var o,a,i,l,u;const t=A.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=h=>{var E,v,F;const f=A.seen.get(h);if(f.ref===null)return;const g=(E=f.def)!=null?E:f.schema,m=k({},g),Q=f.ref;if(f.ref=null,Q){n(Q);const y=A.seen.get(Q),x=y.schema;if(x.$ref&&(A.target==="draft-07"||A.target==="draft-04"||A.target==="openapi-3.0")?(g.allOf=(v=g.allOf)!=null?v:[],g.allOf.push(x)):Object.assign(g,x),Object.assign(g,m),h._zod.parent===Q)for(const I in g)I==="$ref"||I==="allOf"||I in m||delete g[I];if(x.$ref)for(const I in g)I==="$ref"||I==="allOf"||I in y.def&&JSON.stringify(g[I])===JSON.stringify(y.def[I])&&delete g[I]}const U=h._zod.parent;if(U&&U!==Q){n(U);const y=A.seen.get(U);if(y!=null&&y.schema.$ref&&(g.$ref=y.schema.$ref,y.def))for(const x in g)x==="$ref"||x==="allOf"||x in y.def&&JSON.stringify(g[x])===JSON.stringify(y.def[x])&&delete g[x]}A.override({zodSchema:h,jsonSchema:g,path:(F=f.path)!=null?F:[]})};for(const h of[...A.seen.entries()].reverse())n(h[0]);const r={};if(A.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":A.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":A.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":A.target,(o=A.external)!=null&&o.uri){const h=(a=A.external.registry.get(e))==null?void 0:a.id;if(!h)throw new Error("Schema is missing an `id` property");r.$id=A.external.uri(h)}Object.assign(r,(i=t.def)!=null?i:t.schema);const s=(u=(l=A.external)==null?void 0:l.defs)!=null?u:{};for(const h of A.seen.entries()){const f=h[1];f.def&&f.defId&&(s[f.defId]=f.def)}A.external||Object.keys(s).length>0&&(A.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{const h=JSON.parse(JSON.stringify(r));return Object.defineProperty(h,"~standard",{value:$(k({},e["~standard"]),{jsonSchema:{input:Vs(e,"input",A.processors),output:Vs(e,"output",A.processors)}}),enumerable:!1,writable:!1}),h}catch(h){throw new Error("Error converting schema to JSON.")}}function ie(A,e){const t=e!=null?e:{seen:new Set};if(t.seen.has(A))return!1;t.seen.add(A);const n=A._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return ie(n.element,t);if(n.type==="set")return ie(n.valueType,t);if(n.type==="lazy")return ie(n.getter(),t);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return ie(n.innerType,t);if(n.type==="intersection")return ie(n.left,t)||ie(n.right,t);if(n.type==="record"||n.type==="map")return ie(n.keyType,t)||ie(n.valueType,t);if(n.type==="pipe")return ie(n.in,t)||ie(n.out,t);if(n.type==="object"){for(const r in n.shape)if(ie(n.shape[r],t))return!0;return!1}if(n.type==="union"){for(const r of n.options)if(ie(r,t))return!0;return!1}if(n.type==="tuple"){for(const r of n.items)if(ie(r,t))return!0;return!!(n.rest&&ie(n.rest,t))}return!1}const hm=(A,e={})=>t=>{const n=ru($(k({},t),{processors:e}));return MA(A,n),su(n,A),ou(n,A)},Vs=(A,e,t={})=>n=>{const{libraryOptions:r,target:s}=n!=null?n:{},o=ru($(k({},r!=null?r:{}),{target:s,io:e,processors:t}));return MA(A,o),su(o,A),ou(o,A)},fm={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},gm=(A,e,t,n)=>{var u;const r=t;r.type="string";const{minimum:s,maximum:o,format:a,patterns:i,contentEncoding:l}=A._zod.bag;if(typeof s=="number"&&(r.minLength=s),typeof o=="number"&&(r.maxLength=o),a&&(r.format=(u=fm[a])!=null?u:a,r.format===""&&delete r.format,a==="time"&&delete r.format),l&&(r.contentEncoding=l),i&&i.size>0){const h=[...i];h.length===1?r.pattern=h[0].source:h.length>1&&(r.allOf=[...h.map(f=>$(k({},e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{}),{pattern:f.source}))])}},Bm=(A,e,t,n)=>{const r=t,{minimum:s,maximum:o,format:a,multipleOf:i,exclusiveMaximum:l,exclusiveMinimum:u}=A._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(r.minimum=u,r.exclusiveMinimum=!0):r.exclusiveMinimum=u),typeof s=="number"&&(r.minimum=s,typeof u=="number"&&e.target!=="draft-04"&&(u>=s?delete r.minimum:delete r.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(r.maximum=l,r.exclusiveMaximum=!0):r.exclusiveMaximum=l),typeof o=="number"&&(r.maximum=o,typeof l=="number"&&e.target!=="draft-04"&&(l<=o?delete r.maximum:delete r.exclusiveMaximum)),typeof i=="number"&&(r.multipleOf=i)},wm=(A,e,t,n)=>{t.type="boolean"},mm=(A,e,t,n)=>{t.not={}},Cm=(A,e,t,n)=>{},bm=(A,e,t,n)=>{},Qm=(A,e,t,n)=>{const r=A._zod.def,s=bl(r.entries);s.every(o=>typeof o=="number")&&(t.type="number"),s.every(o=>typeof o=="string")&&(t.type="string"),t.enum=s},ym=(A,e,t,n)=>{const r=A._zod.def,s=[];for(const o of r.values)if(o===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(o))}else s.push(o);if(s.length!==0)if(s.length===1){const o=s[0];t.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?t.enum=[o]:t.const=o}else s.every(o=>typeof o=="number")&&(t.type="number"),s.every(o=>typeof o=="string")&&(t.type="string"),s.every(o=>typeof o=="boolean")&&(t.type="boolean"),s.every(o=>o===null)&&(t.type="null"),t.enum=s},Um=(A,e,t,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Em=(A,e,t,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Fm=(A,e,t,n)=>{const r=t,s=A._zod.def,{minimum:o,maximum:a}=A._zod.bag;typeof o=="number"&&(r.minItems=o),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=MA(s.element,e,$(k({},n),{path:[...n.path,"items"]}))},km=(A,e,t,n)=>{var l;const r=t,s=A._zod.def;r.type="object",r.properties={};const o=s.shape;for(const u in o)r.properties[u]=MA(o[u],e,$(k({},n),{path:[...n.path,"properties",u]}));const a=new Set(Object.keys(o)),i=new Set([...a].filter(u=>{const h=s.shape[u]._zod;return e.io==="input"?h.optin===void 0:h.optout===void 0}));i.size>0&&(r.required=Array.from(i)),((l=s.catchall)==null?void 0:l._zod.def.type)==="never"?r.additionalProperties=!1:s.catchall?s.catchall&&(r.additionalProperties=MA(s.catchall,e,$(k({},n),{path:[...n.path,"additionalProperties"]}))):e.io==="output"&&(r.additionalProperties=!1)},vm=(A,e,t,n)=>{const r=A._zod.def,s=r.inclusive===!1,o=r.options.map((a,i)=>MA(a,e,$(k({},n),{path:[...n.path,s?"oneOf":"anyOf",i]})));s?t.oneOf=o:t.anyOf=o},_m=(A,e,t,n)=>{const r=A._zod.def,s=MA(r.left,e,$(k({},n),{path:[...n.path,"allOf",0]})),o=MA(r.right,e,$(k({},n),{path:[...n.path,"allOf",1]})),a=l=>"allOf"in l&&Object.keys(l).length===1,i=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];t.allOf=i},xm=(A,e,t,n)=>{const r=t,s=A._zod.def;r.type="object";const o=s.keyType,a=o._zod.bag,i=a==null?void 0:a.patterns;if(s.mode==="loose"&&i&&i.size>0){const u=MA(s.valueType,e,$(k({},n),{path:[...n.path,"patternProperties","*"]}));r.patternProperties={};for(const h of i)r.patternProperties[h.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(r.propertyNames=MA(s.keyType,e,$(k({},n),{path:[...n.path,"propertyNames"]}))),r.additionalProperties=MA(s.valueType,e,$(k({},n),{path:[...n.path,"additionalProperties"]}));const l=o._zod.values;if(l){const u=[...l].filter(h=>typeof h=="string"||typeof h=="number");u.length>0&&(r.required=u)}},Sm=(A,e,t,n)=>{const r=A._zod.def,s=MA(r.innerType,e,n),o=e.seen.get(A);e.target==="openapi-3.0"?(o.ref=r.innerType,t.nullable=!0):t.anyOf=[s,{type:"null"}]},Im=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType},Tm=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType,t.default=JSON.parse(JSON.stringify(r.defaultValue))},Hm=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType,e.io==="input"&&(t._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Lm=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType;let o;try{o=r.catchValue(void 0)}catch(a){throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=o},Dm=(A,e,t,n)=>{const r=A._zod.def,s=e.io==="input"?r.in._zod.def.type==="transform"?r.out:r.in:r.out;MA(s,e,n);const o=e.seen.get(A);o.ref=s},Rm=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType,t.readOnly=!0},iu=(A,e,t,n)=>{const r=A._zod.def;MA(r.innerType,e,n);const s=e.seen.get(A);s.ref=r.innerType},Om=_("ZodISODateTime",(A,e)=>{DB.init(A,e),vA.init(A,e)});function Mm(A){return zw(Om,A)}const Pm=_("ZodISODate",(A,e)=>{RB.init(A,e),vA.init(A,e)});function Km(A){return $w(Pm,A)}const Nm=_("ZodISOTime",(A,e)=>{OB.init(A,e),vA.init(A,e)});function zm(A){return Gw(Nm,A)}const $m=_("ZodISODuration",(A,e)=>{MB.init(A,e),vA.init(A,e)});function Gm(A){return Vw($m,A)}const Ue=_("ZodError",(A,e)=>{kl.init(A,e),A.name="ZodError",Object.defineProperties(A,{format:{value:t=>_g(A,t)},flatten:{value:t=>vg(A,t)},addIssue:{value:t=>{A.issues.push(t),A.message=JSON.stringify(A.issues,Ki,2)}},addIssues:{value:t=>{A.issues.push(...t),A.message=JSON.stringify(A.issues,Ki,2)}},isEmpty:{get(){return A.issues.length===0}}})},{Parent:Error}),Vm=Gi(Ue),Zm=Vi(Ue),Xm=Ps(Ue),Wm=Ks(Ue),Jm=Ig(Ue),jm=Tg(Ue),Ym=Hg(Ue),qm=Lg(Ue),AC=Dg(Ue),eC=Rg(Ue),tC=Og(Ue),nC=Mg(Ue),UA=_("ZodType",(A,e)=>(QA.init(A,e),Object.assign(A["~standard"],{jsonSchema:{input:Vs(A,"input"),output:Vs(A,"output")}}),A.toJSONSchema=hm(A,{}),A.def=e,A.type=e.type,Object.defineProperty(A,"_def",{value:e}),A.check=(...t)=>{var n;return A.clone(Tt(e,{checks:[...(n=e.checks)!=null?n:[],...t.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},A.with=A.check,A.clone=(t,n)=>Ht(A,t,n),A.brand=()=>A,A.register=((t,n)=>(t.add(A,n),A)),A.parse=(t,n)=>Vm(A,t,n,{callee:A.parse}),A.safeParse=(t,n)=>Xm(A,t,n),A.parseAsync=(t,n)=>T(null,null,function*(){return Zm(A,t,n,{callee:A.parseAsync})}),A.safeParseAsync=(t,n)=>T(null,null,function*(){return Wm(A,t,n)}),A.spa=A.safeParseAsync,A.encode=(t,n)=>Jm(A,t,n),A.decode=(t,n)=>jm(A,t,n),A.encodeAsync=(t,n)=>T(null,null,function*(){return Ym(A,t,n)}),A.decodeAsync=(t,n)=>T(null,null,function*(){return qm(A,t,n)}),A.safeEncode=(t,n)=>AC(A,t,n),A.safeDecode=(t,n)=>eC(A,t,n),A.safeEncodeAsync=(t,n)=>T(null,null,function*(){return tC(A,t,n)}),A.safeDecodeAsync=(t,n)=>T(null,null,function*(){return nC(A,t,n)}),A.refine=(t,n)=>A.check(YC(t,n)),A.superRefine=t=>A.check(qC(t)),A.overwrite=t=>A.check(zn(t)),A.optional=()=>Bu(A),A.exactOptional=()=>MC(A),A.nullable=()=>wu(A),A.nullish=()=>Bu(wu(A)),A.nonoptional=t=>GC(A,t),A.array=()=>be(A),A.or=t=>xC([A,t]),A.and=t=>TC(A,t),A.transform=t=>Cu(A,RC(t)),A.default=t=>NC(A,t),A.prefault=t=>$C(A,t),A.catch=t=>ZC(A,t),A.pipe=t=>Cu(A,t),A.readonly=()=>JC(A),A.describe=t=>{const n=A.clone();return Er.add(n,{description:t}),n},Object.defineProperty(A,"description",{get(){var t;return(t=Er.get(A))==null?void 0:t.description},configurable:!0}),A.meta=(...t)=>{if(t.length===0)return Er.get(A);const n=A.clone();return Er.add(n,t[0]),n},A.isOptional=()=>A.safeParse(void 0).success,A.isNullable=()=>A.safeParse(null).success,A.apply=t=>t(A),A)),au=_("_ZodString",(A,e)=>{var n,r,s;Zi.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(o,a,i)=>gm(A,o,a);const t=A._zod.bag;A.format=(n=t.format)!=null?n:null,A.minLength=(r=t.minimum)!=null?r:null,A.maxLength=(s=t.maximum)!=null?s:null,A.regex=(...o)=>A.check(qw(...o)),A.includes=(...o)=>A.check(tm(...o)),A.startsWith=(...o)=>A.check(nm(...o)),A.endsWith=(...o)=>A.check(rm(...o)),A.min=(...o)=>A.check(Gs(...o)),A.max=(...o)=>A.check(tu(...o)),A.length=(...o)=>A.check(nu(...o)),A.nonempty=(...o)=>A.check(Gs(1,...o)),A.lowercase=o=>A.check(Am(o)),A.uppercase=o=>A.check(em(o)),A.trim=()=>A.check(om()),A.normalize=(...o)=>A.check(sm(...o)),A.toLowerCase=()=>A.check(im()),A.toUpperCase=()=>A.check(am()),A.slugify=()=>A.check(cm())}),rC=_("ZodString",(A,e)=>{Zi.init(A,e),au.init(A,e),A.email=t=>A.check(Qw(sC,t)),A.url=t=>A.check(kw(oC,t)),A.jwt=t=>A.check(Nw(bC,t)),A.emoji=t=>A.check(vw(iC,t)),A.guid=t=>A.check(Yl(cu,t)),A.uuid=t=>A.check(yw(Zs,t)),A.uuidv4=t=>A.check(Uw(Zs,t)),A.uuidv6=t=>A.check(Ew(Zs,t)),A.uuidv7=t=>A.check(Fw(Zs,t)),A.nanoid=t=>A.check(_w(aC,t)),A.guid=t=>A.check(Yl(cu,t)),A.cuid=t=>A.check(xw(cC,t)),A.cuid2=t=>A.check(Sw(lC,t)),A.ulid=t=>A.check(Iw(uC,t)),A.base64=t=>A.check(Mw(wC,t)),A.base64url=t=>A.check(Pw(mC,t)),A.xid=t=>A.check(Tw(dC,t)),A.ksuid=t=>A.check(Hw(pC,t)),A.ipv4=t=>A.check(Lw(hC,t)),A.ipv6=t=>A.check(Dw(fC,t)),A.cidrv4=t=>A.check(Rw(gC,t)),A.cidrv6=t=>A.check(Ow(BC,t)),A.e164=t=>A.check(Kw(CC,t)),A.datetime=t=>A.check(Mm(t)),A.date=t=>A.check(Km(t)),A.time=t=>A.check(zm(t)),A.duration=t=>A.check(Gm(t))});function L(A){return bw(rC,A)}const vA=_("ZodStringFormat",(A,e)=>{yA.init(A,e),au.init(A,e)}),sC=_("ZodEmail",(A,e)=>{kB.init(A,e),vA.init(A,e)}),cu=_("ZodGUID",(A,e)=>{EB.init(A,e),vA.init(A,e)}),Zs=_("ZodUUID",(A,e)=>{FB.init(A,e),vA.init(A,e)}),oC=_("ZodURL",(A,e)=>{vB.init(A,e),vA.init(A,e)}),iC=_("ZodEmoji",(A,e)=>{_B.init(A,e),vA.init(A,e)}),aC=_("ZodNanoID",(A,e)=>{xB.init(A,e),vA.init(A,e)}),cC=_("ZodCUID",(A,e)=>{SB.init(A,e),vA.init(A,e)}),lC=_("ZodCUID2",(A,e)=>{IB.init(A,e),vA.init(A,e)}),uC=_("ZodULID",(A,e)=>{TB.init(A,e),vA.init(A,e)}),dC=_("ZodXID",(A,e)=>{HB.init(A,e),vA.init(A,e)}),pC=_("ZodKSUID",(A,e)=>{LB.init(A,e),vA.init(A,e)}),hC=_("ZodIPv4",(A,e)=>{PB.init(A,e),vA.init(A,e)}),fC=_("ZodIPv6",(A,e)=>{KB.init(A,e),vA.init(A,e)}),gC=_("ZodCIDRv4",(A,e)=>{NB.init(A,e),vA.init(A,e)}),BC=_("ZodCIDRv6",(A,e)=>{zB.init(A,e),vA.init(A,e)}),wC=_("ZodBase64",(A,e)=>{$B.init(A,e),vA.init(A,e)}),mC=_("ZodBase64URL",(A,e)=>{VB.init(A,e),vA.init(A,e)}),CC=_("ZodE164",(A,e)=>{ZB.init(A,e),vA.init(A,e)}),bC=_("ZodJWT",(A,e)=>{WB.init(A,e),vA.init(A,e)}),lu=_("ZodNumber",(A,e)=>{var n,r,s,o,a,i,l,u,h;Ol.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(f,g,m)=>Bm(A,f,g),A.gt=(f,g)=>A.check(Au(f,g)),A.gte=(f,g)=>A.check(Ji(f,g)),A.min=(f,g)=>A.check(Ji(f,g)),A.lt=(f,g)=>A.check(ql(f,g)),A.lte=(f,g)=>A.check(Wi(f,g)),A.max=(f,g)=>A.check(Wi(f,g)),A.int=f=>A.check(uu(f)),A.safe=f=>A.check(uu(f)),A.positive=f=>A.check(Au(0,f)),A.nonnegative=f=>A.check(Ji(0,f)),A.negative=f=>A.check(ql(0,f)),A.nonpositive=f=>A.check(Wi(0,f)),A.multipleOf=(f,g)=>A.check(eu(f,g)),A.step=(f,g)=>A.check(eu(f,g)),A.finite=()=>A;const t=A._zod.bag;A.minValue=(s=Math.max((n=t.minimum)!=null?n:Number.NEGATIVE_INFINITY,(r=t.exclusiveMinimum)!=null?r:Number.NEGATIVE_INFINITY))!=null?s:null,A.maxValue=(i=Math.min((o=t.maximum)!=null?o:Number.POSITIVE_INFINITY,(a=t.exclusiveMaximum)!=null?a:Number.POSITIVE_INFINITY))!=null?i:null,A.isInt=((l=t.format)!=null?l:"").includes("int")||Number.isSafeInteger((u=t.multipleOf)!=null?u:.5),A.isFinite=!0,A.format=(h=t.format)!=null?h:null});function rt(A){return Zw(lu,A)}const QC=_("ZodNumberFormat",(A,e)=>{JB.init(A,e),lu.init(A,e)});function uu(A){return Xw(QC,A)}const yC=_("ZodBoolean",(A,e)=>{jB.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>wm(A,t,n)});function EA(A){return Ww(yC,A)}const UC=_("ZodAny",(A,e)=>{YB.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Cm()});function du(){return Jw(UC)}const EC=_("ZodUnknown",(A,e)=>{qB.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>bm()});function pu(){return jw(EC)}const FC=_("ZodNever",(A,e)=>{Aw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>mm(A,t,n)});function kC(A){return Yw(FC,A)}const vC=_("ZodArray",(A,e)=>{ew.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Fm(A,t,n,r),A.element=e.element,A.min=(t,n)=>A.check(Gs(t,n)),A.nonempty=t=>A.check(Gs(1,t)),A.max=(t,n)=>A.check(tu(t,n)),A.length=(t,n)=>A.check(nu(t,n)),A.unwrap=()=>A.element});function be(A,e){return lm(vC,A,e)}const _C=_("ZodObject",(A,e)=>{nw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>km(A,t,n,r),oA(A,"shape",()=>e.shape),A.keyof=()=>Ee(Object.keys(A._zod.def.shape)),A.catchall=t=>A.clone($(k({},A._zod.def),{catchall:t})),A.passthrough=()=>A.clone($(k({},A._zod.def),{catchall:pu()})),A.loose=()=>A.clone($(k({},A._zod.def),{catchall:pu()})),A.strict=()=>A.clone($(k({},A._zod.def),{catchall:kC()})),A.strip=()=>A.clone($(k({},A._zod.def),{catchall:void 0})),A.extend=t=>yg(A,t),A.safeExtend=t=>Ug(A,t),A.merge=t=>Eg(A,t),A.pick=t=>bg(A,t),A.omit=t=>Qg(A,t),A.partial=(...t)=>Fg(gu,A,t[0]),A.required=(...t)=>kg(mu,A,t[0])});function CA(A,e){const t=k({type:"object",shape:A!=null?A:{}},G(e));return new _C(t)}const hu=_("ZodUnion",(A,e)=>{zl.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>vm(A,t,n,r),A.options=e.options});function xC(A,e){return new hu(k({type:"union",options:A},G(e)))}const SC=_("ZodDiscriminatedUnion",(A,e)=>{hu.init(A,e),rw.init(A,e)});function fu(A,e,t){return new SC(k({type:"union",options:e,discriminator:A},G(t)))}const IC=_("ZodIntersection",(A,e)=>{sw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>_m(A,t,n,r)});function TC(A,e){return new IC({type:"intersection",left:A,right:e})}const HC=_("ZodRecord",(A,e)=>{ow.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>xm(A,t,n,r),A.keyType=e.keyType,A.valueType=e.valueType});function st(A,e,t){return new HC(k({type:"record",keyType:A,valueType:e},G(t)))}const ji=_("ZodEnum",(A,e)=>{iw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(n,r,s)=>Qm(A,n,r),A.enum=e.entries,A.options=Object.values(e.entries);const t=new Set(Object.keys(e.entries));A.extract=(n,r)=>{const s={};for(const o of n)if(t.has(o))s[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new ji($(k($(k({},e),{checks:[]}),G(r)),{entries:s}))},A.exclude=(n,r)=>{const s=k({},e.entries);for(const o of n)if(t.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new ji($(k($(k({},e),{checks:[]}),G(r)),{entries:s}))}});function Ee(A,e){const t=Array.isArray(A)?Object.fromEntries(A.map(n=>[n,n])):A;return new ji(k({type:"enum",entries:t},G(e)))}const LC=_("ZodLiteral",(A,e)=>{aw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>ym(A,t,n),A.values=new Set(e.values),Object.defineProperty(A,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function Fe(A,e){return new LC(k({type:"literal",values:Array.isArray(A)?A:[A]},G(e)))}const DC=_("ZodTransform",(A,e)=>{cw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Em(A,t),A._zod.parse=(t,n)=>{if(n.direction==="backward")throw new ml(A.constructor.name);t.addIssue=s=>{var o,a,i;if(typeof s=="string")t.issues.push(Ur(s,t.value,e));else{const l=s;l.fatal&&(l.continue=!1),(o=l.code)!=null||(l.code="custom"),(a=l.input)!=null||(l.input=t.value),(i=l.inst)!=null||(l.inst=A),t.issues.push(Ur(l))}};const r=e.transform(t.value,t);return r instanceof Promise?r.then(s=>(t.value=s,t)):(t.value=r,t)}});function RC(A){return new DC({type:"transform",transform:A})}const gu=_("ZodOptional",(A,e)=>{Vl.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>iu(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function Bu(A){return new gu({type:"optional",innerType:A})}const OC=_("ZodExactOptional",(A,e)=>{lw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>iu(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function MC(A){return new OC({type:"optional",innerType:A})}const PC=_("ZodNullable",(A,e)=>{uw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Sm(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function wu(A){return new PC({type:"nullable",innerType:A})}const KC=_("ZodDefault",(A,e)=>{dw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Tm(A,t,n,r),A.unwrap=()=>A._zod.def.innerType,A.removeDefault=A.unwrap});function NC(A,e){return new KC({type:"default",innerType:A,get defaultValue(){return typeof e=="function"?e():El(e)}})}const zC=_("ZodPrefault",(A,e)=>{pw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Hm(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function $C(A,e){return new zC({type:"prefault",innerType:A,get defaultValue(){return typeof e=="function"?e():El(e)}})}const mu=_("ZodNonOptional",(A,e)=>{hw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Im(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function GC(A,e){return new mu(k({type:"nonoptional",innerType:A},G(e)))}const VC=_("ZodCatch",(A,e)=>{fw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Lm(A,t,n,r),A.unwrap=()=>A._zod.def.innerType,A.removeCatch=A.unwrap});function ZC(A,e){return new VC({type:"catch",innerType:A,catchValue:typeof e=="function"?e:()=>e})}const XC=_("ZodPipe",(A,e)=>{gw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Dm(A,t,n,r),A.in=e.in,A.out=e.out});function Cu(A,e){return new XC({type:"pipe",in:A,out:e})}const WC=_("ZodReadonly",(A,e)=>{Bw.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Rm(A,t,n,r),A.unwrap=()=>A._zod.def.innerType});function JC(A){return new WC({type:"readonly",innerType:A})}const jC=_("ZodCustom",(A,e)=>{ww.init(A,e),UA.init(A,e),A._zod.processJSONSchema=(t,n,r)=>Um(A,t)});function YC(A,e={}){return um(jC,A,e)}function qC(A){return dm(A)}const Ab=CA({name:L().min(1).max(100).optional(),command:L().min(1).max(500),args:be(L()).optional(),failOnError:EA().default(!0).optional(),timeout:rt().int().min(1e3).max(3e5).default(3e4).optional(),workingDirectory:L().optional(),env:st(L(),L()).optional(),runOnBackground:EA().optional(),agentTags:be(L()).optional()});CA({name:L(),command:L(),success:EA(),exitCode:rt().optional(),stdout:L().optional(),stderr:L().optional(),error:L().optional(),duration:rt(),failOnError:EA()});const An=CA({path:L(),extraCommands:be(Ab).optional(),id:L().uuid().optional(),rotationKey:L().optional(),usageStatus:Ee(["free","in_use"]).optional(),agentTags:be(L()).optional()}),eb=fu("operation",[An.extend({operation:Fe("create"),content:L().optional(),contentPath:L().optional(),encoding:Ee(["utf-8","base64"]).optional()}),An.extend({operation:Fe("merge"),data:st(L(),du()),mergeStrategy:Ee(["deep","shallow"]).optional(),arrayMergeStrategy:Ee(["concat","replace"]).optional()}),An.extend({operation:Fe("modify"),content:L().optional(),contentPath:L().optional(),createIfMissing:EA().optional()}),An.extend({operation:Fe("delete"),ignoreIfMissing:EA().optional()}),An.extend({operation:Fe("createDirectory"),contentPath:L().optional(),mode:rt().optional(),ignoreIfExists:EA().optional()}),An.extend({operation:Fe("download"),url:L().url(),headers:st(L(),L()).optional(),timeout:rt().min(1e3).max(3e5).optional()}),An.extend({operation:Fe("gitClone"),gitUrl:L(),gitSecretKey:L().optional(),sourceBranch:L().optional(),targetBranch:L().optional(),originalBranch:L().optional(),defaultBranch:L().optional()})]);var _A=(A=>(A.DRAFT="draft",A.PENDING="pending",A.ASSIGNED="assigned",A.IN_PROGRESS="in_progress",A.WAITING_FOR_INPUT="waiting_for_input",A.WAITING_FOR_PLAN_APPROVAL="waiting_for_plan_approval",A.PLAN_APPROVED="plan_approved",A.PLAN_REJECTED="plan_rejected",A.COMPLETED="completed",A.FAILED="failed",A.CANCELLED="cancelled",A.RESULT_REJECTED="result_rejected",A))(_A||{});const tb=CA({type:Ee(["json","file","regex"]).describe("Extraction method"),source:L().describe("Source to extract from (file path or stdout/stderr)"),schema:CA({}).passthrough().optional().describe("JSON schema for validation"),pattern:L().optional().describe("Regex pattern for extraction")}),nb=CA({type:Ee(["issue_update","bulk_issue_update","notification","webhook"]).describe("Hook type"),config:du().describe("Hook-specific configuration")});CA({command:L().optional().describe("Legacy — unused in SDK mode"),args:be(L()).optional().describe("Legacy — unused in SDK mode"),env:st(L(),L()).optional().describe("Environment variables"),workingDirectory:L().optional().describe("Working directory for command execution"),fileOperations:be(eb).optional().describe("File operations to perform during setup"),gitUrl:L().optional().describe("Git repository URL (populated from project)"),gitPrivateKey:L().optional().describe("Git SSH private key (populated from project)"),gitCommitMessage:L().optional().describe("Commit message for git operations"),resultExtraction:tb.optional().describe("Schema for extracting result data"),postExecutionHooks:be(nb).optional().describe("Hooks to run after task completion"),executionMode:Ee(["claudeAgentSdk","openaiAgentSdk","opencodeSdk","cursorSdk","codexSdk"]).optional().default("claudeAgentSdk").describe("Execution mode (default: claudeAgentSdk)"),executionPlan:fu("executionMode",[CA({executionMode:Fe("claudeAgentSdk"),promptText:L(),sdkOptions:CA({model:L(),permissionMode:Ee(["plan","acceptEdits","bypassPermissions","ask"]),settingSources:be(L()),allowDangerouslySkipPermissions:EA(),persistSession:EA(),streamSdkEvents:EA().optional(),allowedTools:be(L()).optional(),settings:CA({enabledPlugins:st(L(),EA())}),env:st(L(),L()).optional()}),resume:CA({sessionId:L().optional(),continue:EA()}).optional()}),CA({executionMode:Fe("opencodeSdk"),promptText:L(),sdkOptions:CA({provider:L(),model:L(),allowedTools:be(L()).optional(),env:st(L(),L()).optional()}),resume:CA({sessionId:L().optional(),continue:EA()}).optional()}),CA({executionMode:Fe("openaiAgentSdk"),promptText:L(),sdkOptions:CA({model:L(),env:st(L(),L()).optional()}),resume:CA({sessionId:L().optional(),continue:EA()}).optional()}),CA({executionMode:Fe("codexSdk"),promptText:L(),sdkOptions:CA({model:L().optional(),sandboxMode:Ee(["read-only","workspace-write","danger-full-access"]).optional(),approvalPolicy:Ee(["never","on-request","on-failure","untrusted"]).optional(),env:st(L(),L()).optional()}),resume:CA({sessionId:L().optional(),continue:EA()}).optional()}),CA({executionMode:Fe("cursorSdk"),promptText:L(),sdkOptions:CA({model:L(),env:st(L(),L()).optional()}),resume:CA({sessionId:L().optional(),continue:EA()}).optional()})]).optional().describe("Backend-built prompt + resolved SDK options for this phase"),planEnabled:EA().optional().default(!1).describe("Enable planning phase (computed at runtime for agent)"),planContent:L().optional().describe("Final approved plan content"),planApproved:EA().optional().describe("Plan approval status"),planApprovedAt:L().optional().describe("ISO timestamp of approval"),planRejected:EA().optional().describe("Plan rejection flag"),planRejectionFeedback:L().optional().describe("User rejection feedback"),rejectedPlanContent:L().optional().describe("Previously rejected plan content"),planCompletedAt:L().optional().describe("ISO timestamp when plan was generated"),planRejectedAt:L().optional().describe("ISO timestamp when plan was rejected"),resultRejectionFeedback:L().optional().describe("User feedback when rejecting the result (most recent)"),resultRejectedAt:L().optional().describe("ISO timestamp when result was rejected (most recent)"),resultRejectionHistory:be(CA({feedback:L(),rejectedAt:L()})).optional().describe("All rejection messages in chronological order"),notificationChannelPlanMessageId:rt().optional(),notificationChannelPlanMessageSentAt:L().optional(),notificationChannelCompletedMessageId:rt().optional(),notificationChannelFailedMessageId:rt().optional(),streamSdkEvents:EA().optional().describe("Stream SDK messages (thinking, tool calls, etc.) as sdk_event chunks"),originalTaskSummary:L().optional().describe("Summary from the original task run (passed to retry for historical context)"),planWasApproved:EA().optional().describe("True when planApproved was cleared for rePlan=true retry — indicates the plan had been approved before"),planComments:be(CA({id:L(),selectedText:L(),startOffset:rt(),endOffset:rt(),commentText:L(),createdAt:L()})).optional().describe("Inline review comments attached to the plan"),hasAiConfigSecrets:EA().optional().describe("True when AI Config has secret-backed env vars; agent must fetch resolved values via /tasks/:id/resolve-secrets"),hasCredentials:EA().optional().describe("True when the task has credentials attached; agent must fetch resolved values via /tasks/:id/resolve-credentials"),mcpServersMode:Ee(["all","ignoreExistingMcpServers"]).optional().describe("MCP server strategy for this run; 'ignoreExistingMcpServers' overrides the existing .mcp.json with only the template's configured servers plus the agent-platform server"),enableBrowserTools:EA().optional().describe("When true, the MCP server registers browser_interact and browser_get_context (browser_automate tasks only)")}),_A.DRAFT+"",_A.CANCELLED,_A.PENDING+"",_A.CANCELLED,_A.ASSIGNED+"",_A.CANCELLED,_A.IN_PROGRESS+"",_A.CANCELLED,_A.FAILED,_A.WAITING_FOR_INPUT+"",_A.CANCELLED,_A.WAITING_FOR_PLAN_APPROVAL+"",_A.CANCELLED,_A.PLAN_APPROVED+"",_A.CANCELLED,_A.PLAN_REJECTED+"",_A.CANCELLED,_A.COMPLETED+"",_A.RESULT_REJECTED+"",_A.CANCELLED,_A.FAILED+"",_A.CANCELLED+"";const bu="browser_capture",rb="browser_automate";function Qu(A){let e=(A||"").trim().toLowerCase();const t=e.indexOf("@");return t>=0&&(e=e.slice(t+1)),e=e.split("/")[0].split(":")[0],e.startsWith("www.")&&(e=e.slice(4)),e}function sb(A,e){const t=Qu(A),n=(e||"").trim().toLowerCase();if(!t||!n)return!1;if(n.startsWith("*.")){const r=n.slice(2);return t===r||t.endsWith("."+r)}return t===Qu(n)}function yu(A,e){var s;let t;try{const o=new URL(A);if(o.protocol!=="http:"&&o.protocol!=="https:")return null;t=o.hostname}catch(o){return null}let n=null,r=-1;for(const o of e)for(const a of(s=o.domains)!=null?s:[])sb(t,a)&&a.length>r&&(r=a.length,n=o.id);return n}class Uu extends Error{}function Yi(A){return T(this,null,function*(){if(!A.ok){const e=yield A.json().catch(()=>({message:`HTTP ${A.status}`})),t=e.message||e.error||`HTTP ${A.status}`;throw A.status===401?new Uu(t):new Error(t)}return A.json()})}let Eu=3e4;function ob(A){Number.isFinite(A)&&A>0&&(Eu=A)}function Fr(n){return T(this,arguments,function*(A,e={},t=Eu){const r=new AbortController,s=setTimeout(()=>r.abort(),t);try{return yield fetch(A,$(k({},e),{credentials:"omit",signal:r.signal}))}catch(o){throw o instanceof DOMException&&o.name==="AbortError"?new Error(`Request timed out after ${Math.round(t/1e3)}s. Please check your connection and try again.`):o}finally{clearTimeout(s)}})}function YA(A,e,t,n){return T(this,null,function*(){const s=`${A.backendUrl.replace(/\/+$/,"")}/api${t}`,o=yield Fr(s,{method:e,headers:{"Content-Type":"application/json",Authorization:`Bearer ${A.token}`},body:n!==void 0?JSON.stringify(n):void 0});return Yi(o)})}function ib(A,e,t){return T(this,null,function*(){const n=A.backendUrl.replace(/\/+$/,""),r=new FormData;r.append("file",e,t);const s=yield Fr(`${n}/api/files/upload`,{method:"POST",headers:{Authorization:`Bearer ${A.token}`},body:r});return Yi(s)})}function ab(A,e){return T(this,null,function*(){return YA(A,"GET",`/projects/by-key/${encodeURIComponent(e)}`)})}const cb=["project","note","ctx"];function lb(A){var t,n;const e=cb.filter(r=>A[r]===void 0||A[r]===null);if(e.length>0)throw new Error(`createTask: missing required field(s): ${e.join(", ")}`);if(!((t=A.project)!=null&&t.id)&&!((n=A.project)!=null&&n.key))throw new Error("createTask: project must have an id or key")}function qi(A,e){return T(this,null,function*(){var h,f,g,m,Q,U;lb(e);const{project:t,note:n,ctx:r,advancedOpts:s,titleOverride:o,titleInstruction:a,allowSubmit:i,extraFileIds:l,type:u=bu}=e;return YA(A,"POST","/tasks",$(k(k(k(k(k(k(k(k(k(k(k(k($(k({type:u,title:o||n.slice(0,120)||r.pageTitle||"Browser capture",titleInstruction:a!=null?a:n},t.id?{projectId:t.id}:{projectKey:t.key}),{autoAssign:!0}),s!=null&&s.claudeTemplateId?{claudeTemplateId:s.claudeTemplateId}:{}),(s==null?void 0:s.quickMode)!==void 0?{quickMode:s.quickMode}:{}),(s==null?void 0:s.modelOverride)!=null?{modelOverride:s.modelOverride}:{}),(s==null?void 0:s.claudeProfileId)!=null?{claudeProfileId:s.claudeProfileId}:{}),(s==null?void 0:s.effort)!=null?{effort:s.effort}:{}),(s==null?void 0:s.executionMode)!=null?{executionMode:s.executionMode}:{}),(h=s==null?void 0:s.selectedPluginIds)!=null&&h.length?{selectedPluginIds:s.selectedPluginIds}:{}),(f=s==null?void 0:s.selectedSkillIds)!=null&&f.length?{selectedSkillIds:s.selectedSkillIds}:{}),(g=s==null?void 0:s.selectedPluginSkillIds)!=null&&g.length?{selectedPluginSkillIds:s.selectedPluginSkillIds}:{}),(m=s==null?void 0:s.selectedMcpServerIds)!=null&&m.length?{selectedMcpServerIds:s.selectedMcpServerIds}:{}),(Q=s==null?void 0:s.selectedSlashCommandIds)!=null&&Q.length?{selectedSlashCommandIds:s.selectedSlashCommandIds}:{}),(U=s==null?void 0:s.selectedRemoteContextProviderIds)!=null&&U.length?{selectedRemoteContextProviderIds:s.selectedRemoteContextProviderIds}:{}),{metadata:k(k({type:u,note:n,source:"web-sdk",pageUrl:r.pageUrl,pageTitle:r.pageTitle,elementText:r.elementText,cssSelector:r.cssSelector,elementOuterHtml:r.elementOuterHtml,ancestry:r.ancestry,elementRole:r.elementRole,elementAriaLabel:r.elementAriaLabel,enclosingSection:r.enclosingSection,description:r.description,canonicalUrl:r.canonicalUrl,lang:r.lang,ogTitle:r.ogTitle,ogDescription:r.ogDescription,ogType:r.ogType,ogSiteName:r.ogSiteName,viewportWidth:r.viewportWidth,viewportHeight:r.viewportHeight,scrollX:r.scrollX,scrollY:r.scrollY,selectionText:r.selectionText,capturedAt:r.capturedAt,interactionSteps:r.interactionSteps},i!==void 0?{allowSubmit:i}:{}),l!=null&&l.length?{extraFileIds:l}:{})}))})}function Fu(A,e){return T(this,null,function*(){return qi(A,$(k({},e),{type:rb}))})}function ku(A,e,t,n,r){return T(this,null,function*(){var s;return YA(A,"POST","/planning-sessions",k(k($(k({},e.id?{projectId:e.id}:{projectKey:e.key}),{instruction:t,quickMode:(s=n==null?void 0:n.quickMode)!=null?s:!1}),n!=null&&n.claudeTemplateId?{claudeTemplateId:n.claudeTemplateId}:{}),r!=null&&r.length?{fileIds:r}:{}))})}function ub(A,e){return T(this,null,function*(){const t=e?`?projectId=${encodeURIComponent(e)}`:"";return YA(A,"GET",`/claude-templates${t}`)})}function vu(A,e){return T(this,null,function*(){return YA(A,"GET",`/tasks/${e}`)})}function db(A,e){return T(this,null,function*(){return YA(A,"GET",`/planning-sessions/${e}`)})}function _u(A){return T(this,null,function*(){return YA(A,"GET","/projects")})}function pb(A){return T(this,null,function*(){return(yield YA(A,"GET","/tenants/current")).membership})}function xu(A,e){if(!A||A.includes("tenant:*")||A.includes(e))return!0;const t=e.split(":")[0];return A.includes(`${t}:*`)}function Aa(A,e,t){return T(this,null,function*(){const r=`${A.backendUrl.replace(/\/+$/,"")}/api/auth/tokens/exchange-code`,s=yield Fr(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,origin:t})});return Yi(s)})}function hb(A,e){return T(this,null,function*(){return YA(A,"GET",`/tasks/${e}/browser-commands/pending`)})}function fb(A,e,t,n,r){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/browser-commands/${t}/result`,{status:n,message:r})})}function gb(A,e){return T(this,null,function*(){return YA(A,"GET",`/tasks/${e}/chunks`)})}function Bb(A,e,t){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/instructions`,{content:t})})}function wb(A,e){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/cancel`)})}function mb(A,e){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/approve-result`)})}function Cb(A,e,t){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/reject-result`,{feedback:t})})}function Xs(A,e){return T(this,null,function*(){return YA(A,"GET",`/tasks/${e}/interactions?filter=unanswered`)})}function Su(A,e,t,n){return T(this,null,function*(){return YA(A,"POST",`/tasks/${e}/interactions/${t}/answer`,{answer:n})})}function bb(A,e,t){const n=!!(e.backendUrl&&e.token),r=document.createElement("div");r.className="ap-sdk-advanced",r.innerHTML=`
|
|
1717
1626
|
<details class="ap-sdk-advanced__details">
|
|
1718
1627
|
<summary class="ap-sdk-advanced__summary">Advanced options</summary>
|
|
1719
1628
|
<div class="ap-sdk-advanced__body">
|
|
@@ -1732,12 +1641,134 @@ ${n}${r?`
|
|
|
1732
1641
|
</div>
|
|
1733
1642
|
</div>
|
|
1734
1643
|
</details>
|
|
1735
|
-
`,
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
`,document.body.appendChild(et),Mt(et),Go=et.querySelector("[data-ap-recorder-counter]");const n=()=>{vi();const l=pr;it==null||it(),e(l)},r=()=>{it==null||it()};et.querySelector("[data-ap-recorder-stop]").addEventListener("click",n),et.querySelector("[data-ap-recorder-discard]").addEventListener("click",r);const o=l=>{if(Cr(l.target))return;const p=l.target;yi({action:"click",cssSelector:fo(p),elementText:go(p),description:Gb(go(p),p.tagName),capturedAt:new Date().toISOString()})},i=l=>{if(Cr(l.target))return;const p=l.target;if(!(p instanceof HTMLInputElement)&&!(p instanceof HTMLTextAreaElement)&&!(p instanceof HTMLSelectElement))return;const h=hl(p),g=Du(p),m=g?"[redacted]":Qb(p);yi(M(v({action:"inputText",cssSelector:fo(p),elementText:h,value:m},g?{redacted:!0}:{}),{description:fl(h,m,g),capturedAt:new Date().toISOString()}))},a=()=>{const l=Math.round(window.scrollX),p=Math.round(window.scrollY);Bt?(Bt.scrollX=l,Bt.scrollY=p,Bt.description=gl(l,p)):Bt={action:"scroll",scrollX:l,scrollY:p,description:gl(l,p),capturedAt:new Date().toISOString()},Gt&&clearTimeout(Gt),Gt=setTimeout(()=>{Gt=null,vi()},Jb)},d=l=>{if(l.key==="Escape"){r();return}if(Cr(l.target))return;const p=Xb(l);if(!p)return;const h=l.target instanceof Element?l.target:document.body,g=Kb(h);yi({action:"keypress",cssSelector:fo(h),elementText:g,key:p,description:Wb(p,g),capturedAt:new Date().toISOString()})};document.addEventListener("click",o,{capture:!0}),document.addEventListener("change",i,{capture:!0}),window.addEventListener("scroll",a,{capture:!0,passive:!0}),document.addEventListener("keydown",d,{capture:!0}),it=()=>{document.removeEventListener("click",o,{capture:!0}),document.removeEventListener("change",i,{capture:!0}),window.removeEventListener("scroll",a,{capture:!0}),document.removeEventListener("keydown",d,{capture:!0}),Gt&&(clearTimeout(Gt),Gt=null),Bt=null,et&&Ut(et),et==null||et.remove(),et=null,Go=null,it=null}}function tk(){it==null||it()}function Wo(){return it!==null}const nk="data-ap-sdk",rk="ap-sdk-fab",kl="ap-sdk-fab--dragging",wi="ap-sdk-fab--open",_l="ap-sdk-fab-pos",Jo="ap-sdk-fab--left-edge",ok='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>',sk='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 3 7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="m13 13 6 6"/></svg>',ik='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="8"/></svg>',ak='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>';let N=null,Wt=null,vn=null,yn=null,gt=null,hr=null,fr=null,gr=null,Yo=null,Wr=null,mr=null,Vo=null,Xo=null,Ko=null,vl=0,yl=0,wl=0,xl=0,br=!1,Et=!1,Jr=null,Un=null;function ck(){Jr=e=>{if(!N){Qo();return}if(!br){if(Math.hypot(e.clientX-wl,e.clientY-xl)<5)return;br=!0,Et=!0,N.classList.add(kl)}lk(e.clientX-vl,e.clientY-yl)},Un=()=>{if(!N){Qo();return}br?(br=!1,N.classList.remove(kl),N.style.transition="",uk(N.getBoundingClientRect())):N.style.transition="",Qo()},window.addEventListener("pointermove",Jr),window.addEventListener("pointerup",Un),window.addEventListener("pointercancel",Un)}function Qo(){Jr&&(window.removeEventListener("pointermove",Jr),Jr=null),Un&&(window.removeEventListener("pointerup",Un),window.removeEventListener("pointercancel",Un),Un=null)}function lk(e,t){if(!N)return;const n=N.offsetWidth||52,r=N.offsetHeight||52;N.style.top=`${Math.max(0,Math.min(t,window.innerHeight-r))}px`,N.style.left=`${Math.max(0,Math.min(e,window.innerWidth-n))}px`,N.style.bottom="auto",N.style.right="auto"}function uk(e){if(!N)return;const n=Math.max(16,Math.min(window.innerHeight-e.bottom,window.innerHeight-52-16)),r=e.left+e.width/2<window.innerWidth/2?"left":"right";N.style.top="auto",N.style.bottom=`${n}px`,r==="left"?(N.style.right="auto",N.style.left="16px",N.classList.add(Jo)):(N.style.left="auto",N.style.right="16px",N.classList.remove(Jo));try{localStorage.setItem(_l,JSON.stringify({edge:r,bottom:n}))}catch(o){}}function dk(){if(N)try{const e=localStorage.getItem(_l);if(!e)return;const t=JSON.parse(e);if(typeof t.bottom!="number"||t.edge!=="left"&&t.edge!=="right")return;const r=Math.max(16,Math.min(t.bottom,window.innerHeight-52-16));N.style.top="auto",N.style.bottom=`${r}px`,t.edge==="left"?(N.style.right="auto",N.style.left="16px",N.classList.add(Jo)):(N.style.left="auto",N.style.right="16px",N.classList.remove(Jo))}catch(e){}}function kr(){N==null||N.classList.remove(wi),mr&&(window.removeEventListener("pointerdown",mr,{capture:!0}),mr=null)}function pk(){N&&(N.classList.add(wi),mr=e=>{!N||N.contains(e.target)||kr()},requestAnimationFrame(()=>{mr&&window.addEventListener("pointerdown",mr,{capture:!0})}))}function es(e){return new DOMParser().parseFromString(e,"text/html").body.firstElementChild}function Sl(e,t,n){var d;if(Vo=e,Xo=t,Ko=n,N)return;N=document.createElement("div"),N.className=rk,N.setAttribute(nk,"1"),hr=document.createElement("div"),hr.className="ap-sdk-fab__row";const r=document.createElement("span");r.className="ap-sdk-fab__label",r.textContent="View captures",gt=document.createElement("button"),gt.className="ap-sdk-fab__list ap-sdk-fab__sub",gt.setAttribute("aria-label","My captures"),gt.setAttribute("title","View my captures"),gt.appendChild(es(ak));const o=document.createElement("span");o.className="ap-sdk-fab__badge",o.setAttribute("data-ap-badge",""),o.style.display="none",gt.appendChild(o),hr.appendChild(r),hr.appendChild(gt),fr=document.createElement("div"),fr.className="ap-sdk-fab__row";const i=document.createElement("span");i.className="ap-sdk-fab__label",i.textContent="Capture element",vn=document.createElement("button"),vn.className="ap-sdk-fab__capture ap-sdk-fab__sub",vn.setAttribute("aria-label","Capture element"),vn.setAttribute("title","Capture element to Agent Platform"),vn.appendChild(es(sk)),fr.appendChild(i),fr.appendChild(vn),gr=document.createElement("div"),gr.className="ap-sdk-fab__row";const a=document.createElement("span");a.className="ap-sdk-fab__label",a.textContent="Record interaction",yn=document.createElement("button"),yn.className="ap-sdk-fab__record ap-sdk-fab__sub",yn.setAttribute("aria-label","Record interaction"),yn.setAttribute("title","Record a sequence of interactions"),yn.appendChild(es(ik)),gr.appendChild(a),gr.appendChild(yn),Wt=document.createElement("button"),Wt.className="ap-sdk-fab__main",Wt.setAttribute("aria-label","Agent Platform"),Wt.setAttribute("title","Agent Platform"),Wt.appendChild(es(ok)),N.appendChild(hr),N.appendChild(fr),N.appendChild(gr),N.appendChild(Wt),Wt.addEventListener("click",l=>{if(Et){Et=!1;return}l.preventDefault(),l.stopPropagation(),N!=null&&N.classList.contains(wi)?kr():pk()}),vn.addEventListener("click",l=>{if(Et){Et=!1;return}l.preventDefault(),l.stopPropagation(),kr(),!Kn()&&!Wo()&&Vo&&Vo()}),yn.addEventListener("click",l=>{if(Et){Et=!1;return}l.preventDefault(),l.stopPropagation(),kr(),!Kn()&&!Wo()&&Xo&&Xo()}),gt.addEventListener("click",l=>{if(Et){Et=!1;return}l.preventDefault(),l.stopPropagation(),kr(),Ko&&Ko()}),Wr=l=>{if(!N||!(N===l.target||N.contains(l.target)))return;const p=N.getBoundingClientRect();vl=l.clientX-p.left,yl=l.clientY-p.top,wl=l.clientX,xl=l.clientY,br=!1,Et=!1,N.style.transition="none",l.stopPropagation(),ck()},window.addEventListener("pointerdown",Wr,{capture:!0}),((d=document.body)!=null?d:document.documentElement).appendChild(N),Mt(N),dk(),Yo=setInterval(()=>{Wt&&Wt.classList.toggle("ap-sdk-fab__main--active",Kn()||Wo())},200)}function jn(e){const t=gt==null?void 0:gt.querySelector("[data-ap-badge]");t&&(e>0?(t.textContent=String(e),t.style.display=""):t.style.display="none")}function Tl(){br=!1,Et=!1,Qo(),kr(),Yo&&(clearInterval(Yo),Yo=null),Wr&&(window.removeEventListener("pointerdown",Wr,{capture:!0}),Wr=null),N&&Ut(N),N==null||N.remove(),N=null,Wt=null,vn=null,yn=null,gt=null,hr=null,fr=null,gr=null,Vo=null,Xo=null,Ko=null}function El(e,t){return z(this,null,function*(){try{if(e.type==="planning"){const r=yield Dg(t,e.id);return{capture:e,status:r.status,approved:r.status==="approved"}}const n=yield mc(t,e.id);return{capture:e,status:n.status,approved:n.approved===!0}}catch(n){return{capture:e,status:"unavailable",approved:!1}}})}function Al(e){return e.filter(t=>!t.approved).length}function Cl(e){return z(this,null,function*(){const t=dr();if(!e||t.length===0){jn(t.length);return}const n=yield Promise.all(t.map(r=>El(r,e)));jn(Al(n))})}let wn=null;function hk(){const e=new Uint32Array(4);return crypto.getRandomValues(e),Array.from(e,t=>t.toString(16)).join("")}function xi(e){if(wn){const d=wn;d.cleanup(),d.popup.closed||d.popup.close(),wn=null}const t=e.replace(/\/+$/,""),n=new URL(t).origin,r=hk(),o=window.location.origin,i=`${t}/oauth/authorize?origin=${encodeURIComponent(o)}&state=${encodeURIComponent(r)}`,a=window.open(i,"ap-sdk-oauth","width=480,height=640");return a?new Promise((d,l)=>{let p=!1;function h(){window.removeEventListener("message",g),clearInterval(m),(wn==null?void 0:wn.popup)===a&&(wn=null)}function g(k){if(k.origin!==n)return;const y=k.data;!y||y.type!=="ap-sdk-oauth"||y.state!==r||!y.code||(p=!0,h(),d({code:y.code}))}window.addEventListener("message",g);const m=window.setInterval(()=>{a.closed&&(h(),p||l(new Error("Connection cancelled.")))},500);wn={popup:a,cleanup:h}}):Promise.reject(new Error("Popup blocked — please allow popups for this site and try again."))}const fk="https://agent-platform.tung.engineering",Si="ap-sdk-config";function gk(){try{const e=sessionStorage.getItem(Si);if(!e)return null;const t=JSON.parse(e);return!(t!=null&&t.backendUrl)||!(t!=null&&t.token)||!(t!=null&&t.projectCode)||!(t!=null&&t.expiresAt)?null:new Date(t.expiresAt).getTime()<=Date.now()?(Pl(),null):t}catch(e){return null}}function ts(e){sessionStorage.setItem(Si,JSON.stringify(e)),bk({backendUrl:e.backendUrl,projectCode:e.projectCode})}function Pl(){sessionStorage.removeItem(Si)}const Rl="ap-sdk-last-connection";function mk(){try{const e=localStorage.getItem(Rl);if(!e)return null;const t=JSON.parse(e);return!(t!=null&&t.backendUrl)||!(t!=null&&t.projectCode)?null:t}catch(e){return null}}function bk(e){try{localStorage.setItem(Rl,JSON.stringify(e))}catch(t){}}let Q=null,Yr=null;function on(){Q&&Ut(Q),Q==null||Q.remove(),Q=null,Yr==null||Yr(),Yr=null}function Ti(e){Q&&on(),Q=document.createElement("div"),Q.className="ap-sdk-panel",Q.setAttribute("data-ap-sdk","1"),Q.setAttribute("role","dialog"),Q.setAttribute("aria-modal","true"),Q.setAttribute("aria-label","Connect to Agent Platform");const t=mk();t?n(t):r(fk),document.body.appendChild(Q),Mt(Q),Yr=$r(Q,Ir);function n(i){if(!Q)return;Q.innerHTML=`
|
|
1644
|
+
`,A.appendChild(r);const s=r.querySelector("[data-ap-adv-template-field]"),o=r.querySelector("[data-ap-template]"),a=r.querySelector("[data-ap-quickmode]");let i=[];if(n){const l={backendUrl:e.backendUrl,token:e.token};ub(l,t!=null?t:void 0).then(u=>{var f,g;if(i=u,u.length===0){s.style.display="none";return}const h=(f=u.find(m=>m.isDefault&&m.scope==="project"))!=null?f:u.find(m=>m.isDefault&&m.scope==="global");o.innerHTML='<option value="">None (use default)</option>'+u.map(m=>`<option value="${Qb(m.id)}">${yb(m.name)}${m.isDefault?" (Default)":""}</option>`).join(""),o.value=(g=h==null?void 0:h.id)!=null?g:""}).catch(()=>{s.style.display="none"})}else{o.innerHTML='<option value="">None</option>',o.disabled=!0;const l=document.createElement("span");l.className="ap-sdk-advanced__hint",l.textContent="Connect credentials to enable template selection",s.appendChild(l)}return{getOptions(){var h,f,g,m,Q,U,E,v;const l=o.value||null,u=l?(f=(h=i.find(F=>F.id===l))==null?void 0:h.templateData)!=null?f:{}:{};return k(k(k(k(k(k(k(k(k(k({claudeTemplateId:l,quickMode:a.checked},u.modelOverride!=null?{modelOverride:u.modelOverride}:{}),u.claudeProfileId!=null?{claudeProfileId:u.claudeProfileId}:{}),u.effort!=null?{effort:u.effort}:{}),u.executionMode!=null?{executionMode:u.executionMode}:{}),(g=u.selectedPluginIds)!=null&&g.length?{selectedPluginIds:u.selectedPluginIds}:{}),(m=u.selectedSkillIds)!=null&&m.length?{selectedSkillIds:u.selectedSkillIds}:{}),(Q=u.selectedPluginSkillIds)!=null&&Q.length?{selectedPluginSkillIds:u.selectedPluginSkillIds}:{}),(U=u.selectedMcpServerIds)!=null&&U.length?{selectedMcpServerIds:u.selectedMcpServerIds}:{}),(E=u.selectedSlashCommandIds)!=null&&E.length?{selectedSlashCommandIds:u.selectedSlashCommandIds}:{}),(v=u.selectedRemoteContextProviderIds)!=null&&v.length?{selectedRemoteContextProviderIds:u.selectedRemoteContextProviderIds}:{})}}}function Qb(A){return A.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function yb(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const ea="shared",Iu="ap-sdk-panel-size:",Tu=280,Hu=200;function Ub(A){try{const e=sessionStorage.getItem(Iu+A);if(!e)return null;const t=JSON.parse(e);return typeof(t==null?void 0:t.width)=="number"&&typeof(t==null?void 0:t.height)=="number"?t:null}catch(e){return null}}function Eb(A,e){try{sessionStorage.setItem(Iu+A,JSON.stringify(e))}catch(t){}}function Ws(A,e,t){return Math.min(Math.max(A,e),t)}function Lu(){return window.innerWidth-32}function Du(){return window.innerHeight-64}function ta(A,e){const t=Ub(e);t&&(A.style.width=`${Ws(t.width,Tu,Lu())}px`,A.style.height=`${Ws(t.height,Hu,Du())}px`);const n=document.createElement("div");n.className="ap-sdk-resize-handle",n.setAttribute("data-ap-sdk","1"),A.appendChild(n);let r=!1,s=0,o=0,a=0,i=0,l=0,u=0;const h=m=>{r&&(l=Ws(a+(m.clientX-s),Tu,Lu()),u=Ws(i+(m.clientY-o),Hu,Du()),A.style.width=`${l}px`,A.style.height=`${u}px`)},f=()=>{r&&(r=!1,document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",f),Eb(e,{width:l,height:u}))},g=m=>{const Q=m.target;if(!(Q===n||n.contains(Q)))return;m.preventDefault(),m.stopPropagation(),r=!0,s=m.clientX,o=m.clientY;const U=A.getBoundingClientRect();a=U.width,i=U.height,l=a,u=i,document.addEventListener("pointermove",h),document.addEventListener("pointerup",f)};return window.addEventListener("pointerdown",g,{capture:!0}),()=>{window.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",f)}}const kr="shared",Ru="ap-sdk-panel-pos:";function Fb(A){try{const e=sessionStorage.getItem(Ru+A);if(!e)return null;const t=JSON.parse(e);return typeof(t==null?void 0:t.left)=="number"&&typeof(t==null?void 0:t.top)=="number"?t:null}catch(e){return null}}function kb(A,e){try{sessionStorage.setItem(Ru+A,JSON.stringify(e))}catch(t){}}function Ou(A,e,t){return Math.min(Math.max(A,e),t)}function vr(A,e){const t=(m,Q)=>{const U=Math.max(0,window.innerWidth-A.offsetWidth),E=Math.max(0,window.innerHeight-A.offsetHeight);A.style.left=`${Ou(m,0,U)}px`,A.style.top=`${Ou(Q,0,E)}px`,A.style.right="auto",A.style.transform="none"},n=Fb(e);n&&t(n.left,n.top);let r=!1,s=0,o=0,a=0,i=0,l=0,u=0;const h=m=>{r&&(l=a+(m.clientX-s),u=i+(m.clientY-o),t(l,u))},f=()=>{r&&(r=!1,document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",f),kb(e,{left:l,top:u}))},g=m=>{const Q=m.target;if(!(Q===A||A.contains(Q))||!Q.closest(".ap-sdk-panel__header")||Q.closest("button, a, input, select, textarea"))return;m.preventDefault(),r=!0,s=m.clientX,o=m.clientY;const U=A.getBoundingClientRect();a=U.left,i=U.top,l=a,u=i,document.addEventListener("pointermove",h),document.addEventListener("pointerup",f)};return window.addEventListener("pointerdown",g,{capture:!0}),()=>{window.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",h),document.removeEventListener("pointerup",f)}}const Js="ap-sdk-panel-draft";function Mu(){var A,e;try{const t=localStorage.getItem(Js);if(!t)return null;const n=JSON.parse(t);return!Array.isArray(n.completedPicks)||!n.currentCtx||typeof n.currentCtx!="object"?null:{captureType:(A=n.captureType)!=null?A:"task",note:(e=n.note)!=null?e:"",completedPicks:n.completedPicks,allowSubmit:!!n.allowSubmit,currentCtx:n.currentCtx}}catch(t){return null}}function vb(A){try{if(!A.note&&A.completedPicks.length===0&&!A.allowSubmit){localStorage.removeItem(Js);return}localStorage.setItem(Js,JSON.stringify(A))}catch(e){}}function na(){try{localStorage.removeItem(Js)}catch(A){}}/*!
|
|
1645
|
+
* html2canvas-pro 2.4.3 <https://yorickshan.github.io/html2canvas-pro/>
|
|
1646
|
+
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
1647
|
+
* Released under MIT License
|
|
1648
|
+
*/var _b=class el{constructor(e={}){const t=e.window||(typeof window!="undefined"?window:void 0);if(!t)throw new Error("Window object is required but not available");this.window=t,this.cspNonce=e.cspNonce,this.cache=e.cache}static fromElement(e,t={}){const n=e.ownerDocument;if(!n)throw new Error("Element is not attached to a document");const r=n.defaultView;if(!r)throw new Error("Document is not attached to a window");return new el(k({window:r},t))}clone(e={}){var t,n;return new el({window:e.window||this.window,cspNonce:(t=e.cspNonce)!=null?t:this.cspNonce,cache:(n=e.cache)!=null?n:this.cache})}},xb=class{constructor(A={}){this.config=k({maxImageTimeout:3e5,allowDataUrls:!0},A)}validateUrl(A,e="general"){if(!A||typeof A!="string")return{valid:!1,error:"URL must be a non-empty string"};if(A.startsWith("data:"))return this.config.allowDataUrls?{valid:!0,sanitized:A}:{valid:!1,error:"Data URLs are not allowed"};if(A.startsWith("blob:"))return{valid:!0,sanitized:A};try{const t=new URL(A);if(!["http:","https:"].includes(t.protocol))return{valid:!1,error:`Protocol ${t.protocol} is not allowed. Only http and https are permitted.`};if(e==="proxy"&&this.config.allowedProxyDomains&&this.config.allowedProxyDomains.length>0){const n=t.hostname.toLowerCase();if(!this.config.allowedProxyDomains.some(r=>{const s=r.toLowerCase();return n===s||n.endsWith("."+s)}))return{valid:!1,error:`Proxy domain ${t.hostname} is not in the allowed list`}}if(e==="proxy"){if(!this.config.allowLocalhostProxy){const n=t.hostname.toLowerCase();if(n==="localhost"||n==="127.0.0.1"||n==="::1")return{valid:!1,error:"Localhost is not allowed for proxy URLs"};if(this.isPrivateIP(n))return{valid:!1,error:"Private IP addresses are not allowed for proxy URLs"};if(n.startsWith("169.254.")||n.startsWith("fe80:"))return{valid:!1,error:"Link-local addresses are not allowed for proxy URLs"}}return{valid:!0,sanitized:A,requiresRuntimeCheck:!0}}return{valid:!0,sanitized:A}}catch(t){return{valid:!1,error:`Invalid URL format: ${t instanceof Error?t.message:"Unknown error"}`}}}isPrivateIP(A){return[/^0\./,/^10\./,/^100\.(6[4-9]|[7-9][0-9]|1[0-1][0-9]|12[0-7])\./,/^127\./,/^169\.254\./,/^172\.(1[6-9]|2[0-9]|3[0-1])\./,/^192\.0\.0\./,/^192\.0\.2\./,/^192\.168\./,/^198\.(1[8-9])\./,/^198\.51\.100\./,/^203\.0\.113\./,/^2(2[4-9]|3[0-9])\./,/^24[0-9]\./,/^255\.255\.255\.255$/].some(e=>e.test(A))?!0:A.includes(":")?this.isPrivateIPv6(A):!1}isPrivateIPv6(A){const e=A.toLowerCase().trim().replace(/^\[|\]$/g,"").split("%")[0];if(/^(0:){7}1$/.test(e)||e==="::1"||/^(0:){7}0$/.test(e)||e==="::")return!0;const t=this.expandIPv6(e);if(!t)return this.isPrivateIPv6Prefix(e);const n=parseInt(t.substring(0,2),16);if(n>=252&&n<=253)return!0;if(n===254){const r=parseInt(t.substring(2,4),16);if(r>=128&&r<=191)return!0}return n===255}expandIPv6(A){try{if(A.includes("::")){const e=A.split("::");if(e.length>2)return null;const t=e[0]?e[0].split(":"):[],n=e[1]?e[1].split(":"):[],r=8-t.length-n.length;if(r<0)return null;const s=Array(r).fill("0000");return[...t,...s,...n].map(o=>o.padStart(4,"0")).join(":")}else{const e=A.split(":");return e.length!==8?null:e.map(t=>t.padStart(4,"0")).join(":")}}catch(e){return null}}isPrivateIPv6Prefix(A){return!!(/^fc[0-9a-f]{0,2}:?/i.test(A)||/^fd[0-9a-f]{0,2}:?/i.test(A)||/^fe[89ab][0-9a-f]:?/i.test(A)||/^ff[0-9a-f]{0,2}:?/i.test(A))}validateCspNonce(A){return!A||typeof A!="string"?{valid:!1,error:"CSP nonce must be a non-empty string"}:A.length<16?{valid:!1,error:"CSP nonce is too short (minimum 16 characters recommended)"}:/^[A-Za-z0-9+/=_-]+$/.test(A)?{valid:!0,sanitized:A}:{valid:!1,error:"CSP nonce contains invalid characters"}}validateImageTimeout(A){return typeof A!="number"||isNaN(A)?{valid:!1,error:"Image timeout must be a number"}:A<0?{valid:!1,error:"Image timeout cannot be negative"}:this.config.maxImageTimeout&&A>this.config.maxImageTimeout?{valid:!1,error:`Image timeout ${A}ms exceeds maximum allowed ${this.config.maxImageTimeout}ms`}:{valid:!0,sanitized:A}}validateDimensions(A,e){if(typeof A!="number"||typeof e!="number")return{valid:!1,error:"Dimensions must be numbers"};if(isNaN(A)||isNaN(e))return{valid:!1,error:"Dimensions cannot be NaN"};if(A<=0||e<=0)return{valid:!1,error:"Dimensions must be positive"};const t=32767;return A>t||e>t?{valid:!1,error:`Dimensions exceed maximum allowed (${t}px)`}:{valid:!0,sanitized:{width:A,height:e}}}validateScale(A){return typeof A!="number"||isNaN(A)?{valid:!1,error:"Scale must be a number"}:A<=0?{valid:!1,error:"Scale must be positive"}:A>10?{valid:!1,error:"Scale factor too large (maximum 10x)"}:{valid:!0,sanitized:A}}validateElement(A){if(!A)return{valid:!1,error:"Element is required"};if(typeof A!="object")return{valid:!1,error:"Element must be an object"};const e=A;return typeof HTMLElement!="undefined"&&A instanceof HTMLElement?A.ownerDocument?{valid:!0}:{valid:!1,error:"Element must be attached to a document"}:e.ownerDocument?e.ownerDocument.defaultView?{valid:!0}:{valid:!1,error:"Document must be attached to a window (ownerDocument.defaultView required)"}:{valid:!1,error:"Element must be attached to a document (ownerDocument required)"}}validateOptions(A){var n,r;const e=[],t=A.proxy;if(t!=null&&typeof t=="string"&&t.length>0){const s=this.validateUrl(t,"proxy");s.valid||e.push(`Proxy: ${s.error}`)}if(A.imageTimeout!==void 0){const s=this.validateImageTimeout(A.imageTimeout);s.valid||e.push(`Image timeout: ${s.error}`)}if(A.width!==void 0||A.height!==void 0){const s=(n=A.width)!=null?n:800,o=(r=A.height)!=null?r:600,a=this.validateDimensions(s,o);a.valid||e.push(`Dimensions: ${a.error}`)}if(A.scale!==void 0){const s=this.validateScale(A.scale);s.valid||e.push(`Scale: ${s.error}`)}if(A.cspNonce!==void 0){const s=this.validateCspNonce(A.cspNonce);s.valid||e.push(`CSP nonce: ${s.error}`)}if(this.config.customValidator){const s=this.config.customValidator(A,"options");s.valid||e.push(`Custom validation: ${s.error}`)}return e.length>0?{valid:!1,error:e.join("; ")}:{valid:!0}}};function Sb(A={}){return new xb(k({allowDataUrls:!0,maxImageTimeout:3e5},A))}var Ib=class{constructor(A,e=!0){this.context=A,this.activeMetrics=new Map,this.completedMetrics=[],this.enabled=e,this.getTime=typeof performance!="undefined"&&typeof performance.now=="function"?()=>performance.now():()=>Date.now()}start(A,e){var t;this.enabled&&(this.activeMetrics.has(A)&&((t=this.context)==null||t.logger.warn(`Performance metric '${A}' already started. Overwriting.`)),this.activeMetrics.set(A,{name:A,startTime:this.getTime(),metadata:e}))}end(A){var t,n;if(!this.enabled)return;const e=this.activeMetrics.get(A);if(!e){(t=this.context)==null||t.logger.warn(`Performance metric '${A}' not found. Was start() called?`);return}return e.endTime=this.getTime(),e.duration=e.endTime-e.startTime,this.completedMetrics.push(e),this.activeMetrics.delete(A),(n=this.context)==null||n.logger.debug(`⏱️ ${A}: ${e.duration.toFixed(2)}ms`,e.metadata),e}measure(A,e,t){this.start(A,t);try{const n=e();return this.end(A),n}catch(n){throw this.end(A),n}}measureAsync(A,e,t){return T(this,null,function*(){this.start(A,t);try{const n=yield e();return this.end(A),n}catch(n){throw this.end(A),n}})}getMetrics(){return[...this.completedMetrics]}getMetric(A){return this.completedMetrics.find(e=>e.name===A)}getSummary(){const A=this.completedMetrics.reduce((t,n)=>t+(n.duration||0),0),e=this.completedMetrics.map(t=>({name:t.name,duration:t.duration||0,percentage:A>0?((t.duration||0)/A*100).toFixed(1)+"%":"0%"}));return{totalDuration:A,metrics:this.getMetrics(),breakdown:e}}logSummary(){if(!this.enabled||this.completedMetrics.length===0||!this.context)return;const A=this.getSummary();this.context.logger.info(`
|
|
1649
|
+
📊 Performance Summary (Total: ${A.totalDuration.toFixed(2)}ms):`),A.breakdown.sort((e,t)=>t.duration-e.duration).forEach(e=>{this.context.logger.info(` ${e.name.padEnd(20)} ${e.duration.toFixed(2).padStart(8)}ms ${e.percentage.padStart(6)}`)})}clear(){this.activeMetrics.clear(),this.completedMetrics.splice(0)}isEnabled(){return this.enabled}getActiveMetrics(){return Array.from(this.activeMetrics.keys())}},ke=(We=class{constructor(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}add(e,t,n,r){return new We(this.left+e,this.top+t,this.width+n,this.height+r)}static fromClientRect(e,t){return new We(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)}static fromDOMRectList(e,t){const n=Array.from(t);let r=n.find(s=>s.width!==0);return r||(r=n.find(s=>s.height!==0)),!r&&n.length>0&&(r=n[0]),r?new We(r.left+e.windowBounds.left,r.top+e.windowBounds.top,r.width,r.height):We.EMPTY}},We.EMPTY=new We(0,0,0,0),We);const _r=(A,e)=>ke.fromClientRect(A,e.getBoundingClientRect()),Tb=A=>{const e=A.body,t=A.documentElement;if(!e||!t)throw new Error("Unable to get document size");return new ke(0,0,Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight)))};for(var js=function(A){for(var e=[],t=0,n=A.length;t<n;){var r=A.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){var s=A.charCodeAt(t++);(s&64512)===56320?e.push(((r&1023)<<10)+(s&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},HA=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var n=[],r=-1,s="";++r<t;){var o=A[r];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(r+1===t||n.length>16384)&&(s+=String.fromCharCode.apply(String,n),n.length=0)}return s},Pu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hb=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ys=0;Ys<Pu.length;Ys++)Hb[Pu.charCodeAt(Ys)]=Ys;for(var Ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xr=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),qs=0;qs<Ku.length;qs++)xr[Ku.charCodeAt(qs)]=qs;for(var Lb=function(A){var e=A.length*.75,t=A.length,n,r=0,s,o,a,i;A[A.length-1]==="="&&(e--,A[A.length-2]==="="&&e--);var l=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)s=xr[A.charCodeAt(n)],o=xr[A.charCodeAt(n+1)],a=xr[A.charCodeAt(n+2)],i=xr[A.charCodeAt(n+3)],u[r++]=s<<2|o>>4,u[r++]=(o&15)<<4|a>>2,u[r++]=(a&3)<<6|i&63;return l},Db=function(A){for(var e=A.length,t=[],n=0;n<e;n+=2)t.push(A[n+1]<<8|A[n]);return t},Rb=function(A){for(var e=A.length,t=[],n=0;n<e;n+=4)t.push(A[n+3]<<24|A[n+2]<<16|A[n+1]<<8|A[n]);return t},en=5,ra=11,sa=2,Ob=ra-en,Nu=65536>>en,oa=(1<<en)-1,Mb=Nu+(1024>>en)+32,Pb=65536>>ra,Kb=(1<<Ob)-1,zu=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},Nb=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},zb=function(A,e){var t=Lb(A),n=Array.isArray(t)?Rb(t):new Uint32Array(t),r=Array.isArray(t)?Db(t):new Uint16Array(t),s=24,o=zu(r,s/2,n[4]/2),a=n[5]===2?zu(r,(s+n[4])/2):Nb(n,Math.ceil((s+n[4])/4));return new $b(n[0],n[1],n[2],n[3],o,a)},$b=(function(){function A(e,t,n,r,s,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=s,this.data=o}return A.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>en],t=(t<<sa)+(e&oa),this.data[t];if(e<=65535)return t=this.index[Nu+(e-55296>>en)],t=(t<<sa)+(e&oa),this.data[t];if(e<this.highStart)return t=Mb-Pb+(e>>ra),t=this.index[t],t+=e>>en&Kb,t=this.index[t],t=(t<<sa)+(e&oa),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A})(),$u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gb=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ao=0;Ao<$u.length;Ao++)Gb[$u.charCodeAt(Ao)]=Ao;var Vb="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",Gu=50,Zb=1,Vu=2,Zu=3,Xb=4,Wb=5,Xu=7,Wu=8,Ju=9,Dt=10,ia=11,ju=12,aa=13,Jb=14,Sr=15,ca=16,eo=17,Ir=18,jb=19,Yu=20,la=21,Tr=22,ua=23,$n=24,Qe=25,Hr=26,Lr=27,Gn=28,Yb=29,tn=30,qb=31,to=32,no=33,da=34,pa=35,ha=36,Dr=37,fa=38,ro=39,so=40,ga=41,qu=42,AQ=43,eQ=[9001,65288],Ad="!",nA="×",oo="÷",Ba=zb(Vb),mt=[tn,ha],wa=[Zb,Vu,Zu,Wb],ed=[Dt,Wu],td=[Lr,Hr],tQ=wa.concat(ed),nd=[fa,ro,so,da,pa],nQ=[Sr,aa],rQ=function(A,e){e===void 0&&(e="strict");var t=[],n=[],r=[];return A.forEach(function(s,o){var a=Ba.get(s);if(a>Gu?(r.push(!0),a-=Gu):r.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(s)!==-1)return n.push(o),t.push(ca);if(a===Xb||a===ia){if(o===0)return n.push(o),t.push(tn);var i=t[o-1];return tQ.indexOf(i)===-1?(n.push(n[o-1]),t.push(i)):(n.push(o),t.push(tn))}if(n.push(o),a===qb)return t.push(e==="strict"?la:Dr);if(a===qu||a===Yb)return t.push(tn);if(a===AQ)return s>=131072&&s<=196605||s>=196608&&s<=262141?t.push(Dr):t.push(tn);t.push(a)}),[n,t,r]},ma=function(A,e,t,n){var r=n[t];if(Array.isArray(A)?A.indexOf(r)!==-1:A===r)for(var s=t;s<=n.length;){s++;var o=n[s];if(o===e)return!0;if(o!==Dt)break}if(r===Dt)for(var s=t;s>0;){s--;var a=n[s];if(Array.isArray(A)?A.indexOf(a)!==-1:A===a)for(var i=t;i<=n.length;){i++;var o=n[i];if(o===e)return!0;if(o!==Dt)break}if(a!==Dt)break}return!1},rd=function(A,e){for(var t=A;t>=0;){var n=e[t];if(n===Dt)t--;else return n}return 0},sQ=function(A,e,t,n,r){if(t[n]===0)return nA;var s=n-1;if(Array.isArray(r)&&r[s]===!0)return nA;var o=s-1,a=s+1,i=e[s],l=o>=0?e[o]:0,u=e[a];if(i===Vu&&u===Zu)return nA;if(wa.indexOf(i)!==-1)return Ad;if(wa.indexOf(u)!==-1||ed.indexOf(u)!==-1)return nA;if(rd(s,e)===Wu)return oo;if(Ba.get(A[s])===ia||(i===to||i===no)&&Ba.get(A[a])===ia||i===Xu||u===Xu||i===Ju||[Dt,aa,Sr].indexOf(i)===-1&&u===Ju||[eo,Ir,jb,$n,Gn].indexOf(u)!==-1||rd(s,e)===Tr||ma(ua,Tr,s,e)||ma([eo,Ir],la,s,e)||ma(ju,ju,s,e))return nA;if(i===Dt)return oo;if(i===ua||u===ua)return nA;if(u===ca||i===ca)return oo;if([aa,Sr,la].indexOf(u)!==-1||i===Jb||l===ha&&nQ.indexOf(i)!==-1||i===Gn&&u===ha||u===Yu||mt.indexOf(u)!==-1&&i===Qe||mt.indexOf(i)!==-1&&u===Qe||i===Lr&&[Dr,to,no].indexOf(u)!==-1||[Dr,to,no].indexOf(i)!==-1&&u===Hr||mt.indexOf(i)!==-1&&td.indexOf(u)!==-1||td.indexOf(i)!==-1&&mt.indexOf(u)!==-1||[Lr,Hr].indexOf(i)!==-1&&(u===Qe||[Tr,Sr].indexOf(u)!==-1&&e[a+1]===Qe)||[Tr,Sr].indexOf(i)!==-1&&u===Qe||i===Qe&&[Qe,Gn,$n].indexOf(u)!==-1)return nA;if([Qe,Gn,$n,eo,Ir].indexOf(u)!==-1)for(var h=s;h>=0;){var f=e[h];if(f===Qe)return nA;if([Gn,$n].indexOf(f)!==-1)h--;else break}if([Lr,Hr].indexOf(u)!==-1)for(var h=[eo,Ir].indexOf(i)!==-1?o:s;h>=0;){var f=e[h];if(f===Qe)return nA;if([Gn,$n].indexOf(f)!==-1)h--;else break}if(fa===i&&[fa,ro,da,pa].indexOf(u)!==-1||[ro,da].indexOf(i)!==-1&&[ro,so].indexOf(u)!==-1||[so,pa].indexOf(i)!==-1&&u===so||nd.indexOf(i)!==-1&&[Yu,Hr].indexOf(u)!==-1||nd.indexOf(u)!==-1&&i===Lr||mt.indexOf(i)!==-1&&mt.indexOf(u)!==-1||i===$n&&mt.indexOf(u)!==-1||mt.concat(Qe).indexOf(i)!==-1&&u===Tr&&eQ.indexOf(A[a])===-1||mt.concat(Qe).indexOf(u)!==-1&&i===Ir)return nA;if(i===ga&&u===ga){for(var g=t[s],m=1;g>0&&(g--,e[g]===ga);)m++;if(m%2!==0)return nA}return i===to&&u===no?nA:oo},oQ=function(A,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=rQ(A,e.lineBreak),n=t[0],r=t[1],s=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(r=r.map(function(a){return[Qe,tn,qu].indexOf(a)!==-1?Dr:a}));var o=e.wordBreak==="keep-all"?s.map(function(a,i){return a&&A[i]>=19968&&A[i]<=40959}):void 0;return[n,r,o]},iQ=(function(){function A(e,t,n,r){this.codePoints=e,this.required=t===Ad,this.start=n,this.end=r}return A.prototype.slice=function(){return HA.apply(void 0,this.codePoints.slice(this.start,this.end))},A})(),aQ=function(A,e){var t=js(A),n=oQ(t,e),r=n[0],s=n[1],o=n[2],a=t.length,i=0,l=0;return{next:function(){if(l>=a)return{done:!0,value:null};for(var u=nA;l<a&&(u=sQ(t,s,r,++l,o))===nA;);if(u!==nA||l===a){var h=new iQ(t,u,i,l);return i=l,{value:h,done:!1}}return{done:!0,value:null}}}};const sd=65533,te=A=>A>=48&&A<=57,cQ=A=>A>=55296&&A<=57343,Vn=A=>te(A)||A>=65&&A<=70||A>=97&&A<=102,lQ=A=>A>=97&&A<=122,uQ=A=>A>=65&&A<=90,dQ=A=>lQ(A)||uQ(A),pQ=A=>A>=128,io=A=>A===10||A===9||A===32,ao=A=>dQ(A)||pQ(A)||A===95,od=A=>ao(A)||te(A)||A===45,hQ=A=>A>=0&&A<=8||A===11||A>=14&&A<=31||A===127,Rt=(A,e)=>A!==92?!1:e!==10,co=(A,e,t)=>A===45?ao(e)||Rt(e,t):ao(A)?!0:!!(A===92&&Rt(A,e)),Ca=(A,e,t)=>A===43||A===45?te(e)?!0:e===46&&te(t):te(A===46?e:A),fQ=A=>{let e=0,t=1;(A[e]===43||A[e]===45)&&(A[e]===45&&(t=-1),e++);const n=[];for(;te(A[e]);)n.push(A[e++]);const r=n.length?parseInt(HA(...n),10):0;A[e]===46&&e++;const s=[];for(;te(A[e]);)s.push(A[e++]);const o=s.length,a=o?parseInt(HA(...s),10):0;(A[e]===69||A[e]===101)&&e++;let i=1;(A[e]===43||A[e]===45)&&(A[e]===45&&(i=-1),e++);const l=[];for(;te(A[e]);)l.push(A[e++]);const u=l.length?parseInt(HA(...l),10):0;return t*(r+a*Math.pow(10,-o))*Math.pow(10,i*u)},gQ={type:2},BQ={type:3},wQ={type:4},mQ={type:13},CQ={type:8},bQ={type:21},QQ={type:9},yQ={type:10},UQ={type:11},EQ={type:12},FQ={type:14},lo={type:23},kQ={type:1},vQ={type:25},_Q={type:24},xQ={type:26},SQ={type:27},IQ={type:28},TQ={type:29},HQ={type:31},ba={type:32};var Qa=(Le=class{static get(){return Le._pool.pop()||new Le}static release(e){Le._pool.length<Le.MAX_POOL_SIZE&&(e._reset(),Le._pool.push(e))}constructor(){this._value=[]}_reset(){this._value=[]}write(e){this._value=this._value.concat(js(e))}read(){const e=[];let t=this.consumeToken();for(;t!==ba;)e.push(t),t=this.consumeToken();return e}consumeToken(){const e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:{const t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(od(t)||Rt(n,r)){const s=co(t,n,r)?2:1;return{type:5,value:this.consumeName(),flags:s}}break}case 36:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),mQ;break;case 39:return this.consumeStringToken(39);case 40:return gQ;case 41:return BQ;case 42:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),FQ;break;case 43:if(Ca(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return wQ;case 45:{const t=e,n=this.peekCodePoint(0),r=this.peekCodePoint(1);if(Ca(t,n,r))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(co(t,n,r))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(n===45&&r===62)return this.consumeCodePoint(),this.consumeCodePoint(),_Q;break}case 46:if(Ca(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(this.peekCodePoint(0)===42)for(this.consumeCodePoint();;){let t=this.consumeCodePoint();if(t===42&&(t=this.consumeCodePoint(),t===47))return this.consumeToken();if(t===-1)return this.consumeToken()}break;case 58:return xQ;case 59:return SQ;case 60:if(this.peekCodePoint(0)===33&&this.peekCodePoint(1)===45&&this.peekCodePoint(2)===45)return this.consumeCodePoint(),this.consumeCodePoint(),vQ;break;case 64:if(co(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2)))return{type:7,value:this.consumeName()};break;case 91:return IQ;case 92:if(Rt(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return TQ;case 61:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),CQ;break;case 123:return UQ;case 125:return EQ;case 117:case 85:{const t=this.peekCodePoint(0),n=this.peekCodePoint(1);return t===43&&(Vn(n)||n===63)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken()}case 124:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),QQ;if(this.peekCodePoint(0)===124)return this.consumeCodePoint(),bQ;break;case 126:if(this.peekCodePoint(0)===61)return this.consumeCodePoint(),yQ;break;case-1:return ba}return io(e)?(this.consumeWhiteSpace(),HQ):te(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):ao(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:HA(e)}}consumeCodePoint(){const e=this._value.shift();return typeof e=="undefined"?-1:e}reconsumeCodePoint(e){this._value.unshift(e)}peekCodePoint(e){return e>=this._value.length?-1:this._value[e]}consumeUnicodeRangeToken(){const e=[];let t=this.consumeCodePoint();for(;Vn(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();let n=!1;for(;t===63&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(HA(...e.map(s=>s===63?48:s)),16),end:parseInt(HA(...e.map(s=>s===63?70:s)),16)};const r=parseInt(HA(...e),16);if(this.peekCodePoint(0)===45&&Vn(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();const s=[];for(;Vn(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(HA(...s),16)}}else return{type:30,start:r,end:r}}consumeIdentLikeToken(){const e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===40?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===40?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}}consumeUrlToken(){const e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1)return{type:22,value:""};const t=this.peekCodePoint(0);if(t===39||t===34){const n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),lo)}for(;;){const n=this.consumeCodePoint();if(n===-1||n===41)return{type:22,value:HA(...e)};if(io(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===-1||this.peekCodePoint(0)===41?(this.consumeCodePoint(),{type:22,value:HA(...e)}):(this.consumeBadUrlRemnants(),lo);if(n===34||n===39||n===40||hQ(n))return this.consumeBadUrlRemnants(),lo;if(n===92)if(Rt(n,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),lo;else e.push(n)}}consumeWhiteSpace(){for(;io(this.peekCodePoint(0));)this.consumeCodePoint()}consumeBadUrlRemnants(){for(;;){const e=this.consumeCodePoint();if(e===41||e===-1)return;Rt(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}}consumeStringSlice(e){let n="";for(;e>0;){const r=Math.min(5e4,e);n+=HA(...this._value.splice(0,r)),e-=r}return this._value.shift(),n}consumeStringToken(e){let t="",n=0;do{const r=this._value[n];if(r===-1||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===10)return this._value.splice(0,n),kQ;if(r===92){const s=this._value[n+1];s!==-1&&s!==void 0&&(s===10?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):Rt(r,s)&&(t+=this.consumeStringSlice(n),t+=HA(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)}consumeNumber(){const e=[];let t=4,n=this.peekCodePoint(0);for((n===43||n===45)&&e.push(this.consumeCodePoint());te(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);let r=this.peekCodePoint(1);if(n===46&&te(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;te(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);const s=this.peekCodePoint(2);if((n===69||n===101)&&((r===43||r===45)&&te(s)||te(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;te(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[fQ(e),t]}consumeNumericToken(){const[e,t]=this.consumeNumber(),n=this.peekCodePoint(0);return co(n,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:e,flags:t,unit:this.consumeName()}:n===37?(this.consumeCodePoint(),{type:16,number:e,flags:t}):{type:17,number:e,flags:t}}consumeEscapedCodePoint(){const e=this.consumeCodePoint();if(Vn(e)){let t=HA(e);for(;Vn(this.peekCodePoint(0))&&t.length<6;)t+=HA(this.consumeCodePoint());io(this.peekCodePoint(0))&&this.consumeCodePoint();const n=parseInt(t,16);return n===0||cQ(n)||n>1114111?sd:n}return e===-1?sd:e}consumeName(){let e="";for(;;){const t=this.consumeCodePoint();if(od(t))e+=HA(t);else if(Rt(t,this.peekCodePoint(0)))e+=HA(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}}},Le._pool=[],Le.MAX_POOL_SIZE=40,Le),id=class Ii{constructor(e){this._tokens=e}static create(e){const t=new Qa;return t.write(e),new Ii(t.read())}static parseValue(e){return Ii.create(e).parseComponentValue()}static parseValues(e){return Ii.create(e).parseComponentValues()}parseComponentValue(){let e=this.consumeToken();for(;e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);const t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")}parseComponentValues(){const e=[];for(;;){const t=this.consumeComponentValue();if(t.type===32)return e;e.push(t)}}consumeComponentValue(){const e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e}consumeSimpleBlock(e){const t={type:e,values:[]};let n=this.consumeToken();for(;;){if(n.type===32||DQ(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}}consumeFunction(e){const t={name:e.value,values:[],type:18};for(;;){const n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}}consumeToken(){const e=this._tokens.shift();return typeof e=="undefined"?ba:e}reconsumeToken(e){this._tokens.unshift(e)}};const ot=A=>A.type===15,$A=A=>A.type===17,j=A=>A.type===20,LQ=A=>A.type===0,Rr=(A,e)=>j(A)&&A.value===e,Or=A=>A.type!==31,GA=A=>A.type!==31&&A.type!==4,Pe=A=>{const e=[];let t=[];return A.forEach(n=>{if(n.type===4){t.length&&(e.push(t),t=[]);return}n.type!==31&&t.push(n)}),t.length&&e.push(t),e},DQ=(A,e)=>e===11&&A.type===12||e===28&&A.type===29?!0:e===2&&A.type===3,RQ=/(\d+(?:\.\d+)?|[+\-*/()])/g,ad=A=>{const e=A.match(RQ);if(!e)return NaN;const t=[],n=[],r={"+":1,"-":1,"*":2,"/":2};for(const o of e)if(/^\d+(?:\.\d+)?$/.test(o))t.push(parseFloat(o));else if(o==="(")n.push(o);else if(o===")"){for(;n.length&&n[n.length-1]!=="(";)t.push(n.pop());if(!n.length)return NaN;n.pop()}else{for(;n.length&&r[n[n.length-1]]>=r[o];)t.push(n.pop());n.push(o)}for(;n.length;){const o=n.pop();if(o==="(")return NaN;t.push(o)}const s=[];for(const o of t)if(typeof o=="number")s.push(o);else{const a=s.pop(),i=s.pop();if(i===void 0||a===void 0)return NaN;switch(o){case"+":s.push(i+a);break;case"-":s.push(i-a);break;case"*":s.push(i*a);break;case"/":s.push(a===0?NaN:i/a);break;default:return NaN}}return s.length===1?s[0]:NaN},xA=(A,e,t)=>Math.min(Math.max(A,e),t),ge=(A,e)=>[A[0]*e[0]+A[1]*e[1]+A[2]*e[2],A[3]*e[0]+A[4]*e[1]+A[5]*e[2],A[6]*e[0]+A[7]*e[1]+A[8]*e[2]],Ot=A=>ge([3.2409699419045226,-1.537383177570094,-.4986107602930034,-.9692436362808796,1.8759675015077202,.04155505740717559,.05563007969699366,-.20397695888897652,1.0569715142428786],A),ya=A=>ge([.41239079926595934,.357584339383878,.1804807884018343,.21263900587151027,.715168678767756,.07219231536073371,.01933081871559182,.11919477979462598,.9505321522496607],A),nn=A=>A.map(e=>{const t=e<0?-1:1,n=Math.abs(e);return n>.0031308?t*(1.055*ye(n,1/2.4)-.055):12.92*e}),Ua=A=>A.map(e=>{const t=e<0?-1:1,n=Math.abs(e);return n<=.04045?e/12.92:t*ye((n+.055)/1.055,2.4)}),OQ=A=>{const[e,t,n]=nn(Ot([A[0],A[1],A[2]]));return[e,t,n,A[3]]},MQ=A=>{const[e,t,n]=Ot([A[0],A[1],A[2]]);return[xA(Math.round(e*255),0,255),xA(Math.round(t*255),0,255),xA(Math.round(n*255),0,255),A[3]]},Mt=A=>A.type===17||A.type===15,iA=A=>A.type===16||Mt(A)||cd(A),cd=A=>A.type===17&&A._calcPercentage!==void 0,PQ=A=>A.type===18&&A.name==="calc",KQ=A=>{const e=ud(A,0);if(!e)return null;const t=ud(A,100);if(!t)return null;const n=e.number,r=t.number-n;return r===0?e:{type:17,number:n,flags:4,_calcPercentage:r,_calcPixelOffset:n}},ld=A=>PQ(A)?KQ(A):iA(A)?A:null,ud=(A,e=0)=>{const t=n=>{let r="";for(const s of n)if(s.type!==31){if(s.type===18)if(s.name==="calc"){const o=t(s.values);if(o===null)return null;r+=`(${o})`}else return null;else if(s.type===17)r+=s.number.toString();else if(s.type===15)s.unit==="px"?r+=s.number.toString():s.unit==="rem"||s.unit==="em"?r+=(s.number*16).toString():r+=s.number.toString();else if(s.type===16)r+=(s.number/100*e).toString();else if(s.type===6){const o=s.value;o==="+"||o==="-"||o==="*"||o==="/"?r+=` ${o} `:o==="("?r+="(":o===")"&&(r+=")")}}return r};try{const n=t(A.values);if(n===null||n.trim()==="")return null;const r=ad(n);if(typeof r=="number"&&!isNaN(r))return{type:17,number:r,flags:4}}catch(n){return null}return null},dd=A=>A.length>1?[A[0],A[1]]:[A[0]],LA={type:17,number:0,flags:4},Ct={type:16,number:50,flags:4},Ke={type:16,number:100,flags:4},Mr=(A,e,t)=>{const[n,r]=A;return[J(n,e),J(typeof r!="undefined"?r:n,t)]},J=(A,e)=>{if(cd(A))return A._calcPercentage/100*e+A._calcPixelOffset;if(A.type===16)return A.number/100*e;if(ot(A))switch(A.unit){case"rem":case"em":return 16*A.number;default:return A.number}return A.number},pd="deg",hd="grad",fd="rad",gd="turn",Zn={name:"angle",parse:(A,e)=>{if(e.type===15)switch(e.unit){case pd:return Math.PI*e.number/180;case hd:return Math.PI/200*e.number;case fd:return e.number;case gd:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Bd=A=>A.type===15&&(A.unit===pd||A.unit===hd||A.unit===fd||A.unit===gd),wd=A=>{switch(A.filter(j).map(e=>e.value).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[LA,LA];case"to top":case"bottom":return ve(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[LA,Ke];case"to right":case"left":return ve(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Ke,Ke];case"to bottom":case"top":return ve(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Ke,LA];case"to left":case"right":return ve(270)}return 0},ve=A=>Math.PI*A/180,bt=A=>(255&A)===0,FA=A=>{const e=255&A,t=255&A>>8,n=255&A>>16,r=255&A>>24;return e<255?`rgba(${r},${n},${t},${e/255})`:`rgb(${r},${n},${t})`},Ne=(A,e,t,n)=>(A<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0,Pt=(A,e)=>{if(A.type===17)return A.number;if(A.type===16){const t=e===3?1:255;return e===3?A.number/100*t:Math.round(A.number/100*t)}return 0},rn=A=>(A[0].type===20?A[0].value:"unknown")==="from",NQ=A=>Ne(xA(Math.round(A[0]*255),0,255),xA(Math.round(A[1]*255),0,255),xA(Math.round(A[2]*255),0,255),xA(A[3],0,1)),Ea=([A,e,t,n])=>{const r=nn([A,e,t]);return Ne(xA(Math.round(r[0]*255),0,255),xA(Math.round(r[1]*255),0,255),xA(Math.round(r[2]*255),0,255),n)},Pr=A=>{const e=Ot([A[0],A[1],A[2]]);return Ea([e[0],e[1],e[2],A[3]])},zQ=(A,e)=>{if(rn(e.filter(GA)))throw new Error("Relative color not supported for lab()");const[t,n,r,s]=uo(e),o=nn(Ot(fo([t,n,r])));return Ne(xA(Math.round(o[0]*255),0,255),xA(Math.round(o[1]*255),0,255),xA(Math.round(o[2]*255),0,255),s)},$Q=(A,e)=>{if(rn(e.filter(GA)))throw new Error("Relative color not supported for oklab()");const[t,n,r,s]=uo(e),o=nn(Ot(ho([t,n,r])));return Ne(xA(Math.round(o[0]*255),0,255),xA(Math.round(o[1]*255),0,255),xA(Math.round(o[2]*255),0,255),s)},GQ=(A,e)=>{if(rn(e.filter(GA)))throw new Error("Relative color not supported for oklch()");const[t,n,r,s]=Qd(e),o=nn(Ot(ho(po([t,n,r]))));return Ne(xA(Math.round(o[0]*255),0,255),xA(Math.round(o[1]*255),0,255),xA(Math.round(o[2]*255),0,255),s)},VQ=(A,e)=>{if(rn(e.filter(GA)))throw new Error("Relative color not supported for lch()");const[t,n,r,s]=bd(e),o=nn(Ot(fo(po([t,n,r]))));return Ne(xA(Math.round(o[0]*255),0,255),xA(Math.round(o[1]*255),0,255),xA(Math.round(o[2]*255),0,255),s)},md=(A,e)=>{const[t,n,r,s]=e.filter(GA);return[(t.type===17?ve(t.number):Zn.parse(A,t))/(Math.PI*2),iA(n)?n.number/100:0,iA(r)?r.number/100:0,typeof s!="undefined"&&iA(s)?J(s,1):1]},Cd=(A,e)=>{if(rn(e))throw new Error("Relative color not supported for hsl()");const[t,n,r,s]=md(A,e),o=Ud([t,n,r]);return Ne(o[0]*255,o[1]*255,o[2]*255,n===0?1:s)},bd=A=>{const e=A.filter(GA);return[iA(e[0])?e[0].number:0,iA(e[1])?e[1].number:0,$A(e[2])||ot(e[2])?e[2].number:0,typeof e[4]!="undefined"&&iA(e[4])?J(e[4],1):1]},uo=A=>{const e=A.filter(GA);return[e[0].type===16?e[0].number/100:$A(e[0])?e[0].number:0,e[1].type===16?e[1].number/100:$A(e[1])?e[1].number:0,$A(e[2])||ot(e[2])?e[2].number:0,typeof e[4]!="undefined"&&iA(e[4])?J(e[4],1):1]},Qd=A=>{const e=A.filter(GA);return[e[0].type===16?e[0].number/100:$A(e[0])?e[0].number:0,e[1].type===16?e[1].number/100:$A(e[1])?e[1].number:0,$A(e[2])||ot(e[2])?e[2].number:0,typeof e[4]!="undefined"&&iA(e[4])?J(e[4],1):1]},yd=A=>ge([1.0479297925449969,.022946870601609652,-.05019226628920524,.02962780877005599,.9904344267538799,-.017073799063418826,-.009243040646204504,.015055191490298152,.7518742814281371],A),Fa=A=>ge([.955473421488075,-.02309845494876471,.06325924320057072,-.0283697093338637,1.0099953980813041,.021041441191917323,.012314014864481998,-.020507649298898964,1.330365926242124],A),ka=(A,e,t)=>(t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-A)*t*6+A:t<1/2?e:t<2/3?(e-A)*6*(2/3-t)+A:A),Ud=([A,e,t])=>{if(e===0)return[t*255,t*255,t*255];const n=t<=.5?t*(e+1):t+e-t*e,r=t*2-n;return[ka(r,n,A+1/3),ka(r,n,A),ka(r,n,A-1/3)]},po=([A,e,t])=>(e<0&&(e=0),isNaN(t)&&(t=0),[A,e*Math.cos(t*Math.PI/180),e*Math.sin(t*Math.PI/180)]),ho=A=>ge([1.2268798758459243,-.5578149944602171,.2813910456659647,-.0405757452148008,1.112286803280317,-.0717110580655164,-.0763729366746601,-.4214933324022432,1.5869240198367816],ge([1,.3963377773761749,.2158037573099136,1,-.1055613458156586,-.0638541728258133,1,-.0894841775298119,-1.2914855480194092],A).map(e=>ye(e,3))),fo=A=>{const e=(A[0]+16)/116,t=A[1]/500+e,n=e-A[2]/200,r=24389/27,s=24/116,o=[(t>s?ye(t,3):(116*t-16)/r)*.3457/.3585,A[0]>8?ye(e,3):A[0]/r,(n>s?ye(n,3):(116*n-16)/r)*.2958/.3585];return Fa([o[0],o[1],o[2]])},ZQ=(A,e)=>{const t=e.filter(GA);if(t.length===3){const[n,r,s]=t.map(Pt),o=Ua([n/255,r/255,s/255]),[a,i,l]=ya([o[0],o[1],o[2]]);return[a,i,l,1]}if(t.length===4){const[n,r,s,o]=t.map(Pt),a=Ua([n/255,r/255,s/255]),[i,l,u]=ya([a[0],a[1],a[2]]);return[i,l,u,o]}return[0,0,0,1]},XQ=(A,e)=>{const[t,n,r,s]=md(A,e),o=Ua(Ud([t,n,r])),[a,i,l]=ya([o[0],o[1],o[2]]);return[a,i,l,s]},WQ=(A,e)=>{const[t,n,r,s]=uo(e),[o,a,i]=fo([t,n,r]);return[o,a,i,s]},JQ=(A,e)=>{const[t,n,r,s]=bd(e),[o,a,i]=fo(po([t,n,r]));return[o,a,i,s]},jQ=(A,e)=>{const[t,n,r,s]=Qd(e),[o,a,i]=ho(po([t,n,r]));return[o,a,i,s]},YQ=(A,e)=>{const[t,n,r,s]=uo(e),[o,a,i]=ho([t,n,r]);return[o,a,i,s]},qQ=A=>Fa([A[0],A[1],A[2]]),Ed=A=>A,Ay=A=>{const[e,t,n]=yd([A[0],A[2],A[3]]);return[e,t,n,A[3]]},Fd=A=>Pr([A[0],A[1],A[2],A[3]]),ey=A=>{const e=qQ([A[0],A[1],A[2]]);return Pr([e[0],e[1],e[2],A[3]])},ty=A=>ge([.4865709486482162,.26566769316909306,.1982172852343625,.2289745640697488,.6917385218365064,.079286914093745,0,.04511338185890264,1.043944368900976],A),ny=A=>ge([2.493496911941425,-.9313836179191239,-.40271078445071684,-.8294889695615747,1.7626640603183463,.023624685841943577,.03584583024378447,-.07617238926804182,.9568845240076872],A),ry=A=>A.map(e=>{const t=e<0?-1:1;return e*t<=.04045?e/12.92:t*ye((e+.055)/1.055,2.4)||0}),sy=A=>nn(A),oy=A=>{const e=ry([A[0],A[1],A[2]]);return ty([e[0],e[1],e[2]])},iy=A=>{const[e,t,n]=sy(ny([A[0],A[1],A[2]]));return[e,t,n,A[3]]},ay=A=>{const e=oy([A[0],A[1],A[2]]);return Pr([e[0],e[1],e[2],A[3]])},cy=A=>ge([2.0415879038107465,-.5650069742788596,-.34473135077832956,-.9692436362808795,1.8759675015077202,.04155505740717557,.013444280632031142,-.11836239223101838,1.0151749943912054],A),ly=A=>ge([.5766690429101305,.1855582379065463,.1882286462349947,.29734497525053605,.6273635662554661,.0752914584939978,.02703136138641234,.07068885253582723,.9913375368376388],A),uy=A=>{const e=A.map(t=>(t<0?-1:1)*ye(Math.abs(t),2.19921875));return[e[0],e[1],e[2]]},dy=A=>{const e=A.map(t=>(t<0?-1:1)*ye(Math.abs(t),.4547069271758437));return[e[0],e[1],e[2]]},py=A=>{const[e,t,n]=dy(cy([A[0],A[1],A[2]]));return[e,t,n,A[3]]},hy=A=>{const e=Ot(ly(uy([A[0],A[1],A[2]])));return Ea([e[0],e[1],e[2],A[3]])},fy=A=>ge([.7977666449006423,.13518129740053308,.0313477341283922,.2880748288194013,.711835234241873,8993693872564e-17,0,0,.8251046025104602],A),gy=A=>ge([1.3457868816471583,-.25557208737979464,-.05110186497554526,-.5446307051249019,1.5082477428451468,.02052744743642139,0,0,1.2119675456389452],A),By=A=>A.map(e=>e<16/512?e/16:ye(e,1.8)),wy=A=>A.map(e=>e>1/512?ye(e,1/1.8):e*16),my=A=>{const e=By([A[0],A[1],A[2]]);return Fa(fy([e[0],e[1],e[2]]))},Cy=A=>{const[e,t,n]=wy(gy(yd([A[0],A[1],A[2]])));return[e,t,n,A[3]]},by=A=>{const e=my([A[0],A[1],A[2]]);return Pr([e[0],e[1],e[2],A[3]])},go=1.09929682680944,kd=.018053968510807,Qy=A=>A.map(function(e){return e<kd*4.5?e/4.5:Math.pow((e+go-1)/go,1/.45)}),yy=A=>A.map(function(e){return e>=kd?go*Math.pow(e,.45)-(go-1):4.5*e}),Uy=A=>ge([.6369580483012914,.14461690358620832,.1688809751641721,.2627002120112671,.6779980715188708,.05930171646986196,0,.028072693049087428,1.060985057710791],A),Ey=A=>ge([1.716651187971268,-.355670783776392,-.25336628137366,-.666684351832489,1.616481236634939,.0157685458139111,.017639857445311,-.042770613257809,.942103121235474],A),Fy=A=>{const e=Qy([A[0],A[1],A[2]]);return Uy([e[0],e[1],e[2]])},ky=A=>{const[e,t,n]=yy(Ey([A[0],A[1],A[2]]));return[e,t,n,A[3]]},vy=A=>{const e=Fy([A[0],A[1],A[2]]);return Pr([e[0],e[1],e[2],A[3]])},Kt={name:"color",parse:(A,e)=>{if(e.type===18){const t=Iy[e.name];if(typeof t=="undefined")throw new Error(`Attempting to parse an unsupported color function "${e.name}"`);return t(A,e.values)}if(e.type===5){const[t,n,r,s]=vd(e);return Ne(t,n,r,s)}if(e.type===20){const t=it[e.value.toUpperCase()];if(typeof t!="undefined")return t}return it.TRANSPARENT}},vd=A=>{if(A.value.length===3){const e=A.value.substring(0,1),t=A.value.substring(1,2),n=A.value.substring(2,3);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(n+n,16),1]}if(A.value.length===4){const e=A.value.substring(0,1),t=A.value.substring(1,2),n=A.value.substring(2,3),r=A.value.substring(3,4);return[parseInt(e+e,16),parseInt(t+t,16),parseInt(n+n,16),parseInt(r+r,16)/255]}if(A.value.length===6){const e=A.value.substring(0,2),t=A.value.substring(2,4),n=A.value.substring(4,6);return[parseInt(e,16),parseInt(t,16),parseInt(n,16),1]}if(A.value.length===8){const e=A.value.substring(0,2),t=A.value.substring(2,4),n=A.value.substring(4,6),r=A.value.substring(6,8);return[parseInt(e,16),parseInt(t,16),parseInt(n,16),parseInt(r,16)/255]}return[0,0,0,1]},_d=(A,e)=>{const t=e.filter(GA);if(rn(t))throw new Error("Relative color not supported for rgb()");if(t.length===3){const[n,r,s]=t.map(Pt);return Ne(n,r,s,1)}if(t.length===4){const[n,r,s,o]=t.map(Pt);return Ne(n,r,s,o)}return t.length===5&&t[3].type===6&&t[3].value==="/"?Ne(Pt(t[0],0),Pt(t[1],1),Pt(t[2],2),Pt(t[4],3)):0},_y=(A,e)=>{const t=e.filter(GA),n=t[0].type===20?t[0].value:"unknown";if(rn(t)){const r=(U,E)=>{if($A(E))return E.number;const v=y=>y==="r"||y==="x"?0:y==="g"||y==="y"?1:2;if(j(E))return U[v(E.value)];const F=y=>{const x=y.filter(GA);let R="(";for(const I of x)R+=I.type===18&&I.name==="calc"?F(I.values):$A(I)?I.number:I.type===6||j(I)?I.value:"";return R+=")",R};if(E.type===18){const y=E.values.filter(GA);if(E.name==="calc")return ad(F(y).replace(/r|x/,U[0].toString()).replace(/g|y/,U[1].toString()).replace(/b|z/,U[2].toString()))}return null},s=t[1].type===18?t[1].name:j(t[1])||t[1].type===5?"rgb":"unknown",o=j(t[2])?t[2].value:"unknown";let a=t[1].type===18?t[1].values:j(t[1])?[t[1]]:[];if(j(t[1])){if(typeof it[t[1].value.toUpperCase()]=="undefined")throw new Error("Attempting to use unknown color in relative color 'from'");{const U=Xn(A,t[1].value),E=255&U,v=255&U>>8,F=255&U>>16;a=[{type:17,number:255&U>>24,flags:1},{type:17,number:F,flags:1},{type:17,number:v,flags:1},{type:17,number:E>1?E/255:E,flags:1}]}}else if(t[1].type===5){const[U,E,v,F]=vd(t[1]);a=[{type:17,number:U,flags:1},{type:17,number:E,flags:1},{type:17,number:v,flags:1},{type:17,number:F>1?F/255:F,flags:1}]}if(a.length===0)throw new Error("Attempting to use unknown color in relative color 'from'");if(o==="unknown")throw new Error("Attempting to use unknown colorspace in relative color 'to'");const i=xy[s],l=Sy[o],u=xd[o];if(typeof i=="undefined")throw new Error(`Attempting to parse an unsupported color space "${s}" for color() function`);if(typeof l=="undefined")throw new Error(`Attempting to parse an unsupported color space "${o}" for color() function`);const h=l(i(A,a)),f=r(h,t[3]),g=r(h,t[4]),m=r(h,t[5]),Q=t.length>6&&t[6].type===6&&t[6].value==="/"&&$A(t[7])?t[7].number:1;if(f===null||g===null||m===null)throw new Error("Invalid relative color in color() function");return u([f,g,m,Q])}else{const r=n,s=xd[r];if(typeof s=="undefined")throw new Error(`Attempting to parse an unsupported color space "${r}" for color() function`);return s([$A(t[1])?t[1].number:0,$A(t[2])?t[2].number:0,$A(t[3])?t[3].number:0,t.length>4&&t[4].type===6&&t[4].value==="/"&&$A(t[5])?t[5].number:1])}},xd={srgb:NQ,"srgb-linear":Ea,"display-p3":ay,"a98-rgb":hy,"prophoto-rgb":by,xyz:Fd,"xyz-d50":ey,"xyz-d65":Fd,rec2020:vy},xy={rgb:ZQ,hsl:XQ,lab:WQ,lch:JQ,oklab:YQ,oklch:jQ},Sy={srgb:OQ,"srgb-linear":MQ,"display-p3":iy,"a98-rgb":py,"prophoto-rgb":Cy,xyz:Ed,"xyz-d50":Ay,"xyz-d65":Ed,rec2020:ky},Iy={hsl:Cd,hsla:Cd,rgb:_d,rgba:_d,lch:VQ,oklch:GQ,oklab:$Q,lab:zQ,color:_y},Xn=(A,e)=>Kt.parse(A,id.create(e).parseComponentValue()),it={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},sn=A=>A.nodeType===Node.ELEMENT_NODE,Sd=A=>A.nodeType===Node.TEXT_NODE,on=A=>typeof A.className=="object",Kr=A=>sn(A)&&typeof A.style!="undefined"&&!on(A),Ty=A=>A.tagName==="INPUT",Hy=A=>A.tagName==="HTML",Id=A=>A.tagName==="svg",va=A=>A.tagName==="BODY",Td=A=>A.tagName==="CANVAS",Hd=A=>A.tagName==="VIDEO",_a=A=>A.tagName==="IMG",Ld=A=>A.tagName==="IFRAME",Dd=A=>A.tagName==="STYLE",Ly=A=>A.tagName==="SCRIPT",Bo=A=>A.tagName==="TEXTAREA",wo=A=>A.tagName==="SELECT",Nr=A=>A.tagName==="SLOT",Dy=A=>A.tagName==="LI",Ry=A=>A.tagName==="OL",Rd=A=>!on(A)&&A.tagName.indexOf("-")>0,Oy=new Set(["IMG","VIDEO","AUDIO","CANVAS","IFRAME","INPUT","TEXTAREA","SELECT","BR","HR","META","LINK","BASE","COL","SOURCE","TRACK","WBR","AREA","PARAM","EMBED","OBJECT"]),My=A=>!on(A)&&!Oy.has(A.tagName),xa={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 52;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},qA=(A,e)=>(A&e)!==0;var Py=class{constructor(){this.counters={}}getCounterValue(A){const e=this.counters[A];return e&&e.length?e[e.length-1]:1}getCounterValues(A){const e=this.counters[A];return e||[]}pop(A){A.forEach(e=>this.counters[e].pop())}parse(A){const e=A.counterIncrement,t=A.counterReset;let n=!0;e!==null&&e.forEach(s=>{const o=this.counters[s.counter];o&&s.increment!==0&&(n=!1,o.length||o.push(1),o[Math.max(0,o.length-1)]+=s.increment)});const r=[];return n&&t.forEach(s=>{let o=this.counters[s.counter];r.push(s.counter),o||(o=this.counters[s.counter]=[]),o.push(s.reset)}),r}};const Od={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Md={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Ky={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ny={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Wn=(A,e,t,n,r,s)=>A<e||A>t?zr(A,r,s.length>0):n.integers.reduce((o,a,i)=>{for(;A>=a;)A-=a,o+=n.values[i];return o},"")+s,Pd=(A,e,t,n)=>{let r="";do t||A--,r=n(A)+r,A/=e;while(A*e>=e);return r},DA=(A,e,t,n,r)=>{const s=t-e+1;return(A<0?"-":"")+(Pd(Math.abs(A),s,n,o=>HA(Math.floor(o%s)+e))+r)},an=(A,e,t=". ")=>{const n=e.length;return Pd(Math.abs(A),n,!1,r=>e[Math.floor(r%n)])+t},zy=1,$y=2,Gy=4,Vy=8,Qt=(A,e,t,n,r,s)=>{if(A<-9999||A>9999)return zr(A,4,r.length>0);let o=Math.abs(A),a=r;if(o===0)return e[0]+a;for(let i=0;o>0&&i<=4;i++){const l=o%10;l===0&&qA(s,zy)&&a!==""?a=e[l]+a:l>1||l===1&&i===0||l===1&&i===1&&qA(s,$y)||l===1&&i===1&&qA(s,Gy)&&A>100||l===1&&i>1&&qA(s,Vy)?a=e[l]+(i>0?t[i-1]:"")+a:l===1&&i>0&&(a=t[i-1]+a),o=Math.floor(o/10)}return(A<0?n:"")+a},Kd="十百千萬",Nd="拾佰仟萬",zd="マイナス",Sa="마이너스",zr=(A,e,t)=>{const n=t?". ":"",r=t?"、":"",s=t?", ":"",o=t?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:const a=DA(A,48,57,!0,n);return a.length<4?`0${a}`:a;case 4:return an(A,"〇一二三四五六七八九",r);case 6:return Wn(A,1,3999,Od,3,n).toLowerCase();case 7:return Wn(A,1,3999,Od,3,n);case 8:return DA(A,945,969,!1,n);case 9:return DA(A,97,122,!1,n);case 10:return DA(A,65,90,!1,n);case 11:return DA(A,1632,1641,!0,n);case 12:case 49:return Wn(A,1,9999,Md,3,n);case 35:return Wn(A,1,9999,Md,3,n).toLowerCase();case 13:return DA(A,2534,2543,!0,n);case 14:case 30:return DA(A,6112,6121,!0,n);case 15:return an(A,"子丑寅卯辰巳午未申酉戌亥",r);case 16:return an(A,"甲乙丙丁戊己庚辛壬癸",r);case 17:case 48:return Qt(A,"零一二三四五六七八九",Kd,"負",r,14);case 47:return Qt(A,"零壹貳參肆伍陸柒捌玖",Nd,"負",r,15);case 42:return Qt(A,"零一二三四五六七八九",Kd,"负",r,14);case 41:return Qt(A,"零壹贰叁肆伍陆柒捌玖",Nd,"负",r,15);case 26:return Qt(A,"〇一二三四五六七八九","十百千万",zd,r,0);case 25:return Qt(A,"零壱弐参四伍六七八九","拾百千万",zd,r,7);case 31:return Qt(A,"영일이삼사오육칠팔구","십백천만",Sa,s,7);case 33:return Qt(A,"零一二三四五六七八九","十百千萬",Sa,s,0);case 32:return Qt(A,"零壹貳參四五六七八九","拾百千",Sa,s,7);case 18:return DA(A,2406,2415,!0,n);case 20:return Wn(A,1,19999,Ny,3,n);case 21:return DA(A,2790,2799,!0,n);case 22:return DA(A,2662,2671,!0,n);case 52:return Wn(A,1,10999,Ky,3,n);case 23:return an(A,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return an(A,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return DA(A,3302,3311,!0,n);case 28:return an(A,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",r);case 29:return an(A,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",r);case 34:return DA(A,3792,3801,!0,n);case 37:return DA(A,6160,6169,!0,n);case 38:return DA(A,4160,4169,!0,n);case 39:return DA(A,2918,2927,!0,n);case 40:return DA(A,1776,1785,!0,n);case 43:return DA(A,3046,3055,!0,n);case 44:return DA(A,3174,3183,!0,n);case 45:return DA(A,3664,3673,!0,n);case 46:return DA(A,3872,3881,!0,n);default:return DA(A,48,57,!0,n)}},Zy={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:(A,e)=>e.map(t=>{if(j(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2;case"text":return 3}return 0})},Xy={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mo=(A,e)=>{const t=Kt.parse(A,e[0]),n=e[1];return n&&iA(n)?{color:t,stop:n}:{color:t,stop:null}},Ia=(A,e)=>{const t=A[0],n=A[A.length-1];t.stop===null&&(t.stop=LA),n.stop===null&&(n.stop=Ke);const r=[];let s=0;for(let a=0;a<A.length;a++){const i=A[a].stop;if(i!==null){const l=J(i,e);l>s?r.push(l):r.push(s),s=l}else r.push(null)}let o=null;for(let a=0;a<r.length;a++){const i=r[a];if(i===null)o===null&&(o=a);else if(o!==null){const l=a-o,u=(i-r[o-1])/(l+1);for(let h=1;h<=l;h++)r[o+h-1]=u*h;o=null}}return A.map(({color:a},i)=>({color:a,stop:Math.max(Math.min(1,r[i]/e),0)}))},Wy=(A,e,t)=>{const n=e/2,r=t/2,s=J(A[0],e)-n,o=r-J(A[1],t);return(Math.atan2(o,s)+Math.PI*2)%(Math.PI*2)},$d=(A,e,t)=>{const n=typeof A=="number"?A:Wy(A,e,t),r=Math.abs(e*Math.sin(n))+Math.abs(t*Math.cos(n)),s=e/2,o=t/2,a=r/2,i=Math.sin(n-Math.PI/2)*a,l=Math.cos(n-Math.PI/2)*a;return[r,s-l,s+l,o-i,o+i]},ze=(A,e)=>Math.sqrt(A*A+e*e),Gd=(A,e,t,n,r)=>[[0,0],[0,e],[A,0],[A,e]].reduce((s,o)=>{const[a,i]=o,l=ze(t-a,n-i);return(r?l<s.optimumDistance:l>s.optimumDistance)?{optimumCorner:o,optimumDistance:l}:s},{optimumDistance:r?1/0:-1/0,optimumCorner:null}).optimumCorner,Jy=(A,e,t,n,r)=>{let s=0,o=0;switch(A.size){case 0:A.shape===0?s=o=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):A.shape===1&&(s=Math.min(Math.abs(e),Math.abs(e-n)),o=Math.min(Math.abs(t),Math.abs(t-r)));break;case 2:if(A.shape===0)s=o=Math.min(ze(e,t),ze(e,t-r),ze(e-n,t),ze(e-n,t-r));else if(A.shape===1){const a=Math.min(Math.abs(t),Math.abs(t-r))/Math.min(Math.abs(e),Math.abs(e-n)),[i,l]=Gd(n,r,e,t,!0);s=ze(i-e,(l-t)/a),o=a*s}break;case 1:A.shape===0?s=o=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-r)):A.shape===1&&(s=Math.max(Math.abs(e),Math.abs(e-n)),o=Math.max(Math.abs(t),Math.abs(t-r)));break;case 3:if(A.shape===0)s=o=Math.max(ze(e,t),ze(e,t-r),ze(e-n,t),ze(e-n,t-r));else if(A.shape===1){const a=Math.max(Math.abs(t),Math.abs(t-r))/Math.max(Math.abs(e),Math.abs(e-n)),[i,l]=Gd(n,r,e,t,!1);s=ze(i-e,(l-t)/a),o=a*s}break}return Array.isArray(A.size)&&(s=J(A.size[0],n),o=A.size.length===2?J(A.size[1],r):s),[s,o]},Vd=(A,e)=>{let t=ve(180);const n=[];return Pe(e).forEach((r,s)=>{if(s===0){const a=r[0];if(a.type===20&&a.value==="to"){t=wd(r);return}else if(Bd(a)){t=Zn.parse(A,a);return}}const o=mo(A,r);n.push(o)}),{angle:t,stops:n,type:1}},Co=(A,e)=>{let t=ve(180);const n=[];return Pe(e).forEach((r,s)=>{if(s===0){const a=r[0];if(a.type===20&&["top","left","right","bottom"].indexOf(a.value)!==-1){t=wd(r);return}else if(Bd(a)){t=(Zn.parse(A,a)+ve(270))%ve(360);return}}const o=mo(A,r);n.push(o)}),{angle:t,stops:n,type:1}},jy=(A,e)=>{const t=ve(180),n=[];let r=1;const s=0,o=3,a=[];return Pe(e).forEach((i,l)=>{const u=i[0];if(l===0){if(j(u)&&u.value==="linear"){r=1;return}else if(j(u)&&u.value==="radial"){r=2;return}}if(u.type===18){if(u.name==="from"){const h=Kt.parse(A,u.values[0]);n.push({stop:LA,color:h})}else if(u.name==="to"){const h=Kt.parse(A,u.values[0]);n.push({stop:Ke,color:h})}else if(u.name==="color-stop"){const h=u.values.filter(GA);if(h.length===2){const f=Kt.parse(A,h[1]),g=h[0];$A(g)&&n.push({stop:{type:16,number:g.number*100,flags:g.flags},color:f})}}}}),r===1?{angle:(t+ve(180))%ve(360),stops:n,type:r}:{size:o,shape:s,stops:n,position:a,type:r}},Zd="closest-side",Xd="farthest-side",Wd="closest-corner",Jd="farthest-corner",jd="circle",Yd="ellipse",qd="cover",Ap="contain",Yy=(A,e)=>{let t=0,n=3;const r=[],s=[];return Pe(e).forEach((o,a)=>{let i=!0;if(a===0){let l=!1;i=o.reduce((u,h)=>{if(l)if(j(h))switch(h.value){case"center":return s.push(Ct),u;case"top":case"left":return s.push(LA),u;case"right":case"bottom":return s.push(Ke),u}else(iA(h)||Mt(h))&&s.push(h);else if(j(h))switch(h.value){case jd:return t=0,!1;case Yd:return t=1,!1;case"at":return l=!0,!1;case Zd:return n=0,!1;case qd:case Xd:return n=1,!1;case Ap:case Wd:return n=2,!1;case Jd:return n=3,!1}else if(Mt(h)||iA(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return u},i)}if(i){const l=mo(A,o);r.push(l)}}),{size:n,shape:t,stops:r,position:s,type:2}},bo=(A,e)=>{let t=0,n=3;const r=[],s=[];return Pe(e).forEach((o,a)=>{let i=!0;if(a===0?i=o.reduce((l,u)=>{if(j(u))switch(u.value){case"center":return s.push(Ct),!1;case"top":case"left":return s.push(LA),!1;case"right":case"bottom":return s.push(Ke),!1}else if(iA(u)||Mt(u))return s.push(u),!1;return l},i):a===1&&(i=o.reduce((l,u)=>{if(j(u))switch(u.value){case jd:return t=0,!1;case Yd:return t=1,!1;case Ap:case Zd:return n=0,!1;case Xd:return n=1,!1;case Wd:return n=2,!1;case qd:case Jd:return n=3,!1}else if(Mt(u)||iA(u))return Array.isArray(n)||(n=[]),n.push(u),!1;return l},i)),i){const l=mo(A,o);r.push(l)}}),{size:n,shape:t,stops:r,position:s,type:2}},$r=(A,e)=>$(k({},Vd(A,e)),{type:3}),qy=A=>A.type===1,A0=A=>A.type===2,e0=A=>A.type===3,Qo={name:"image",parse:(A,e)=>{if(e.type===22){const t={url:e.value,type:0};return A.cache.addImage(e.value),t}if(e.type===18){const t=tp[e.name];if(typeof t=="undefined")throw new Error(`Attempting to parse an unsupported image function "${e.name}"`);return t(A,e.values)}throw new Error(`Unsupported image type ${e.type}`)}};function ep(A){return!(A.type===20&&A.value==="none")&&(A.type!==18||!!tp[A.name])}const tp={"linear-gradient":Vd,"-moz-linear-gradient":Co,"-ms-linear-gradient":Co,"-o-linear-gradient":Co,"-webkit-linear-gradient":Co,"radial-gradient":Yy,"-moz-radial-gradient":bo,"-ms-radial-gradient":bo,"-o-radial-gradient":bo,"-webkit-radial-gradient":bo,"-webkit-gradient":jy,"repeating-linear-gradient":$r,"-webkit-repeating-linear-gradient":$r,"-moz-repeating-linear-gradient":$r,"-ms-repeating-linear-gradient":$r,"-o-repeating-linear-gradient":$r},t0={name:"background-image",initialValue:"none",type:1,prefix:!1,skipCache:!0,parse:(A,e)=>{if(e.length===0)return[];const t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(n=>GA(n)&&ep(n)).map(n=>Qo.parse(A,n))}},n0={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:(A,e)=>e.map(t=>{if(j(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})},r0={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:(A,e)=>Pe(e).map(t=>t.map(ld).filter(n=>n!==null)).map(dd)},s0={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:(A,e)=>Pe(e).map(t=>t.filter(j).map(n=>n.value).join(" ")).map(o0)},o0=A=>{switch(A){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}},i0={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:(A,e)=>Pe(e).map(t=>t.map(n=>a0(n)?n:ld(n)).filter(n=>n!==null))},a0=A=>j(A)||iA(A),yo=A=>({name:`border-${A}-color`,initialValue:"transparent",prefix:!1,type:3,format:"color"}),c0=yo("top"),l0=yo("right"),u0=yo("bottom"),d0=yo("left"),Uo=A=>({name:`border-${A}-radius`,initialValue:"0 0",prefix:!1,type:1,parse:(e,t)=>dd(t.filter(iA))}),p0=Uo("top-left"),h0=Uo("top-right"),f0=Uo("bottom-right"),g0=Uo("bottom-left"),Eo=A=>({name:`border-${A}-style`,initialValue:"solid",prefix:!1,type:2,parse:(e,t)=>{switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}),B0=Eo("top"),w0=Eo("right"),m0=Eo("bottom"),C0=Eo("left"),Fo=A=>({name:`border-${A}-width`,initialValue:"0",type:0,prefix:!1,parse:(e,t)=>ot(t)?t.number:0}),b0=Fo("top"),Q0=Fo("right"),y0=Fo("bottom"),U0=Fo("left"),Ta={type:0},Ha=A=>{const[e]=A;return e?j(e)?e.value==="farthest-side"?"farthest-side":"closest-side":iA(e)?e:"closest-side":"closest-side"},np=A=>{let e=null,t=null;for(const n of A)if(j(n))switch(n.value){case"left":e=LA;break;case"right":e=Ke;break;case"top":t=LA;break;case"bottom":t=Ke;break;case"center":e===null?e=Ct:t===null&&(t=Ct);break}else iA(n)&&(e===null?e=n:t===null&&(t=n));return{cx:e!=null?e:Ct,cy:t!=null?t:Ct}},E0=A=>{var r,s,o,a;const e=[];for(const i of A)if(i.type!==31){if(j(i)&&i.value==="round")break;iA(i)&&e.push(i)}const t=(r=e[0])!=null?r:LA,n=(s=e[1])!=null?s:t;return{type:1,top:t,right:n,bottom:(o=e[2])!=null?o:t,left:(a=e[3])!=null?a:n}},F0=A=>{const e=A.filter(Or),t=e.findIndex(s=>Rr(s,"at")),n=t===-1?e:e.slice(0,t),r=t===-1?[]:e.slice(t+1);return k({type:2,radius:Ha(n)},np(r))},k0=A=>{const e=A.filter(Or),t=e.findIndex(s=>Rr(s,"at")),n=t===-1?e:e.slice(0,t),r=t===-1?[]:e.slice(t+1);return k({type:3,rx:Ha(n.slice(0,1)),ry:Ha(n.slice(1,2))},np(r))},v0=A=>{const e=Pe(A),t=[];for(const n of e){if(n.length===1&&j(n[0]))continue;const r=n.filter(iA);r.length>=2&&t.push([r[0],r[1]])}return{type:4,points:t}},_0=A=>{const e=A.find(t=>t.type===0);return e?{type:5,d:e.value}:Ta},x0={name:"clip-path",initialValue:"none",prefix:!1,type:0,parse:(A,e)=>{if(j(e)&&e.value==="none")return Ta;if(e.type===18)switch(e.name){case"inset":return E0(e.values);case"circle":return F0(e.values);case"ellipse":return k0(e.values);case"polygon":return v0(e.values);case"path":return _0(e.values)}return Ta}},S0={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},I0={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"rtl":return 1;default:return 0}}},T0={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:(A,e)=>e.filter(j).reduce((t,n)=>t|H0(n.value),0)},H0=A=>{switch(A){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},rp={name:"float",initialValue:"none",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},L0={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:(A,e)=>e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0},D0={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"strict":return"strict";default:return"normal"}}},R0={name:"line-height",initialValue:"normal",prefix:!1,type:4},La=(A,e)=>j(A)&&A.value==="normal"?1.2*e:A.type===17?e*A.number:iA(A)?J(A,e):e,O0={name:"list-style-image",initialValue:"none",type:0,prefix:!1,skipCache:!0,parse:(A,e)=>e.type===20&&e.value==="none"?null:Qo.parse(A,e)},M0={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"inside":return 0;default:return 1}}},ko=A=>({name:`margin-${A}`,initialValue:"0",prefix:!1,type:4}),P0=ko("top"),K0=ko("right"),N0=ko("bottom"),z0=ko("left"),sp={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:(A,e)=>e.filter(j).map(t=>{switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}})},$0={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"break-word":return"break-word";default:return"normal"}}},vo=A=>({name:`padding-${A}`,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}),G0=vo("top"),V0=vo("right"),Z0=vo("bottom"),X0=vo("left"),W0={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},J0={name:"position",initialValue:"static",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},j0={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:(A,e)=>e.length===1&&Rr(e[0],"none")?[]:Pe(e).map(t=>{const n={color:it.TRANSPARENT,offsetX:LA,offsetY:LA,blur:LA};let r=0;for(let s=0;s<t.length;s++){const o=t[s];Mt(o)?(r===0?n.offsetX=o:r===1?n.offsetY=o:n.blur=o,r++):n.color=Kt.parse(A,o)}return n})},Y0={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},q0={name:"transform",initialValue:"none",prefix:!0,type:0,parse:(A,e)=>{if(e.type===20&&e.value==="none")return null;if(e.type===18){const t=AU[e.name];if(typeof t=="undefined")throw new Error(`Attempting to parse an unsupported transform function "${e.name}"`);return t(A,e.values)}return null}},AU={matrix:(A,e)=>{const t=e.filter(n=>n.type===17).map(n=>n.number);return t.length===6?t:null},matrix3d:(A,e)=>{const t=e.filter(l=>l.type===17).map(l=>l.number),[n,r,{},{},s,o,{},{},{},{},{},{},a,i]=t;return t.length===16?[n,r,s,o,a,i]:null},rotate:(A,e)=>{if(e.length!==1)return null;const t=e[0];let n=0;if(t.type===17&&t.number===0)n=0;else if(t.type===15)n=Zn.parse(A,t);else return null;const r=Math.cos(n),s=Math.sin(n);return[r,s,-s,r,0,0]}},op={type:16,number:50,flags:4},eU=[op,op],tU={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:(A,e)=>{const t=e.filter(iA);return t.length!==2?eU:[t[0],t[1]]}},nU={name:"rotate",initialValue:"none",prefix:!1,type:0,parse:(A,e)=>e.type===20&&e.value==="none"?null:e.type===17&&e.number===0?0:e.type===15?Zn.parse(A,e)*180/Math.PI:null},rU={name:"visibility",initialValue:"none",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"hidden":return 1;case"collapse":return 2;default:return 0}}},sU={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"break-all":return"break-all";case"keep-all":return"keep-all";default:return"normal"}}},oU={name:"white-space",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"pre":return"pre";case"nowrap":return"nowrap";case"pre-wrap":return"pre-wrap";case"pre-line":return"pre-line";default:return"normal"}}},_o=A=>A!==0,Da=A=>A===3||A===4,iU={name:"writing-mode",initialValue:"horizontal-tb",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"vertical-rl":return 1;case"vertical-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4;default:return 0}}},aU={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:(A,e)=>{if(e.type===20)return{auto:!0,order:0};if($A(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},ip={name:"time",parse:(A,e)=>{if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},cU={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:(A,e)=>$A(e)?e.number:1},ap={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},cp={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:(A,e)=>e.filter(j).map(t=>{switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(t=>t!==0)},lU={name:"text-decoration-style",initialValue:"solid",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"double":return 1;case"dotted":return 2;case"dashed":return 3;case"wavy":return 4;default:return 0}}},uU={name:"text-decoration-thickness",initialValue:"auto",prefix:!1,type:0,parse:(A,e)=>{if(j(e))switch(e.value){case"auto":return"auto";case"from-font":return"from-font"}return ot(e)?e.number:"auto"}},dU={name:"text-underline-offset",initialValue:"auto",prefix:!1,type:0,parse:(A,e)=>j(e)&&e.value==="auto"?"auto":ot(e)?e.number:"auto"},pU={name:"font-family",initialValue:"",prefix:!1,type:1,parse:(A,e)=>{const t=[],n=[],r=[];let s=!1;return e.forEach(o=>{switch(o.type){case 20:t.push(o.value);break;case 0:s=!0,t.push(o.value);break;case 17:t.push(o.number.toString());break;case 4:n.push(t.join(" ")),r.push(s),s=!1,t.length=0;break}}),t.length&&(n.push(t.join(" ")),r.push(s)),n.map((o,a)=>r[a]||o.indexOf(" ")!==-1?`'${o.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}'`:o)}},hU={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},fU={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:(A,e)=>{if($A(e))return e.number;if(j(e))switch(e.value){case"bold":return 700;default:return 400}return 400}},gU={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:(A,e)=>e.filter(j).map(t=>t.value)},BU={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},wU={name:"content",initialValue:"none",type:1,prefix:!1,parse:(A,e)=>{if(e.length===0)return[];const t=e[0];return t.type===20&&t.value==="none"?[]:e}},lp=(A,e)=>{const t=[],n=A.filter(Or);for(let r=0;r<n.length;r++){const s=n[r],o=n[r+1];if(s.type===20){const a=o&&$A(o)?o.number:e;t.push([s.value,a])}}return t},mU={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:(A,e)=>{if(e.length===0)return null;const t=e[0];return t.type===20&&t.value==="none"?null:lp(e,1).map(([n,r])=>({counter:n,increment:r}))}},CU={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:(A,e)=>e.length===0?[]:lp(e,0).filter(([t])=>t!=="none").map(([t,n])=>({counter:t,reset:n}))},bU={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:(A,e)=>e.filter(ot).map(t=>ip.parse(A,t))},QU={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:(A,e)=>{if(e.length===0)return null;const t=e[0];if(t.type===20&&t.value==="none")return null;const n=[],r=e.filter(LQ);if(r.length%2!==0)return null;for(let s=0;s<r.length;s+=2){const o=r[s].value,a=r[s+1].value;n.push({open:o,close:a})}return n}},up=(A,e,t)=>{if(!A)return"";const n=A[Math.min(e,A.length-1)];return n?t?n.open:n.close:""},yU={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:(A,e)=>e.length===1&&Rr(e[0],"none")?[]:Pe(e).map(t=>{const n={color:255,offsetX:LA,offsetY:LA,blur:LA,spread:LA,inset:!1};let r=0;for(let s=0;s<t.length;s++){const o=t[s];Rr(o,"inset")?n.inset=!0:Mt(o)?(r===0?n.offsetX=o:r===1?n.offsetY=o:r===2?n.blur=o:n.spread=o,r++):n.color=Kt.parse(A,o)}return n})},UU={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:(A,e)=>{const t=[0,1,2],n=[];return e.filter(j).forEach(r=>{switch(r.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2);break}}),t.forEach(r=>{n.indexOf(r)===-1&&n.push(r)}),n}},EU={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},FU={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:(A,e)=>ot(e)?e.number:0},kU={name:"-webkit-line-clamp",initialValue:"none",prefix:!0,type:0,parse:(A,e)=>e.type===20&&e.value==="none"?0:e.type===17?Math.max(0,Math.floor(e.number)):0},vU={name:"object-fit",initialValue:"fill",prefix:!1,type:1,parse:(A,e)=>e.filter(j).reduce((t,n)=>t|_U(n.value),0)},_U=A=>{switch(A){case"contain":return 2;case"cover":return 4;case"none":return 8;case"scale-down":return 16}return 0},xU={name:"text-overflow",initialValue:"clip",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"ellipsis":return 1;default:return 0}}},SU={name:"image-rendering",initialValue:"auto",prefix:!1,type:2,parse:(A,e)=>{switch(e.toLowerCase()){case"crisp-edges":case"-webkit-crisp-edges":case"-moz-crisp-edges":return 1;case"pixelated":case"-webkit-optimize-contrast":return 2;case"smooth":case"high-quality":return 3;default:return 0}}},VA={NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"},IU=new Set(Object.values(VA)),TU={name:"mix-blend-mode",initialValue:"normal",type:2,prefix:!1,parse:(A,e)=>IU.has(e)?e:VA.NORMAL},HU={name:"filter",initialValue:"none",prefix:!1,type:1,parse:(A,e)=>{if(e.length===1&&e[0].type===20&&e[0].value==="none")return null;const t=[];for(const n of e)if(n.type===18){const r=n,s=LU(r.values);switch(r.name){case"blur":t.push(`blur(${s}px)`);break;case"brightness":case"contrast":case"invert":case"opacity":case"saturate":case"sepia":t.push(`${r.name}(${s})`);break;case"grayscale":t.push(`grayscale(${s})`);break;case"hue-rotate":t.push(`hue-rotate(${s}deg)`);break;case"drop-shadow":t.push(`drop-shadow(${s})`);break}}return t.length>0?t.join(" "):null}},LU=A=>{const e=[];for(const t of A)t.type!==31&&(t.type===15?e.push(`${t.number}${t.unit}`):t.type===17?e.push(`${t.number}`):t.type===16?e.push(`${t.number}%`):t.type===20?e.push(t.value):t.type===5&&e.push(`#${t.value}`));return e.join(" ")},DU={name:"font-variant-ligatures",initialValue:"normal",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"none":return 1;case"common-ligatures":return 2;case"no-common-ligatures":return 3;case"discretionary-ligatures":return 4;case"no-discretionary-ligatures":return 5;case"historical-ligatures":return 6;case"no-historical-ligatures":return 7;case"contextual":return 8;case"no-contextual":return 9;default:return 0}}},RU={name:"zoom",initialValue:"1",type:0,prefix:!1,parse:(A,e)=>e.type===16?Math.max(0,e.number/100):e.type===17?Math.max(0,e.number):1},OU={name:"object-position",initialValue:"50% 50%",prefix:!1,type:1,parse:(A,e)=>{const t=[];let n=0;for(;n<e.length&&t.length<2;){const r=e[n];if(j(r))switch(r.value){case"left":case"top":t.push(LA);break;case"center":t.push(Ct);break;case"right":case"bottom":t.push(Ke);break}else iA(r)&&t.push(r);n++}for(;t.length<2;)t.push(Ct);return[t[0],t[1]]}},MU=new Set(Object.values({NORMAL:"normal",MULTIPLY:"multiply",SCREEN:"screen",OVERLAY:"overlay",DARKEN:"darken",LIGHTEN:"lighten",COLOR_DODGE:"color-dodge",COLOR_BURN:"color-burn",HARD_LIGHT:"hard-light",SOFT_LIGHT:"soft-light",DIFFERENCE:"difference",EXCLUSION:"exclusion",HUE:"hue",SATURATION:"saturation",COLOR:"color",LUMINOSITY:"luminosity"})),PU={name:"background-blend-mode",initialValue:"normal",prefix:!1,type:1,parse:(A,e)=>{const t=[],n=e.filter(GA);for(const r of n)j(r)&&MU.has(r.value)&&t.push(r.value);return t.length>0?t:["normal"]}},KU={name:"border-image-source",initialValue:"none",prefix:!1,type:1,skipCache:!0,parse:(A,e)=>{if(e.length===0)return null;const t=e.filter(n=>GA(n)&&ep(n));return t.length===0?null:Qo.parse(A,t[0])}},NU=A=>{const e=[...A];return e.length===1?e.push(e[0],e[0],e[0]):e.length===2?e.push(e[0],e[1]):e.length===3&&e.push(e[1]),e.slice(0,4)},zU={name:"border-image-slice",initialValue:"100%",prefix:!1,type:1,parse:(A,e)=>{const t=e.filter(Or),n=[];let r=!1,s="percent";for(const u of t){if(j(u)&&u.value==="fill"){r=!0;continue}u.type===17?(n.push(u.number),s="number"):u.type===16&&(n.push(u.number),s="percent")}const[o,a,i,l]=NU(n.length>0?n:[100]);return{top:o,right:a,bottom:i,left:l,fill:r,unit:s}}},$U=A=>{switch(A){case"repeat":return 1;case"round":return 2;case"space":return 3;default:return 0}},GU={name:"border-image-repeat",initialValue:"stretch",prefix:!1,type:1,parse:(A,e)=>{var s,o;const t=e.filter(Or),n=[];for(const a of t)j(a)&&n.push($U(a.value));const r=(s=n[0])!=null?s:0;return{horizontal:r,vertical:(o=n[1])!=null?o:r}}},VU={name:"box-decoration-break",initialValue:"slice",prefix:!1,type:2,parse:(A,e)=>{switch(e){case"clone":return 1;default:return 0}}},ZU=1e4;var XU=class{constructor(A){this.styles=A}get topColor(){return this.styles.borderTopColor}get rightColor(){return this.styles.borderRightColor}get bottomColor(){return this.styles.borderBottomColor}get leftColor(){return this.styles.borderLeftColor}get topStyle(){return this.styles.borderTopStyle}get rightStyle(){return this.styles.borderRightStyle}get bottomStyle(){return this.styles.borderBottomStyle}get leftStyle(){return this.styles.borderLeftStyle}get topWidth(){return this.styles.borderTopWidth}get rightWidth(){return this.styles.borderRightWidth}get bottomWidth(){return this.styles.borderBottomWidth}get leftWidth(){return this.styles.borderLeftWidth}get topLeftRadius(){return this.styles.borderTopLeftRadius}get topRightRadius(){return this.styles.borderTopRightRadius}get bottomRightRadius(){return this.styles.borderBottomRightRadius}get bottomLeftRadius(){return this.styles.borderBottomLeftRadius}get imageSource(){return this.styles.borderImageSource}get imageSlice(){return this.styles.borderImageSlice}get imageRepeat(){return this.styles.borderImageRepeat}get boxShadow(){return this.styles.boxShadow}},WU=class{constructor(A){this.styles=A}get color(){return this.styles.backgroundColor}get image(){return this.styles.backgroundImage}get clip(){return this.styles.backgroundClip}get origin(){return this.styles.backgroundOrigin}get position(){return this.styles.backgroundPosition}get repeat(){return this.styles.backgroundRepeat}get size(){return this.styles.backgroundSize}get blendMode(){return this.styles.backgroundBlendMode}},JU=class{constructor(A){this.styles=A}get family(){return this.styles.fontFamily}get size(){return this.styles.fontSize}get style(){return this.styles.fontStyle}get variant(){return this.styles.fontVariant}get weight(){return this.styles.fontWeight}get ligatures(){return this.styles.fontVariantLigatures}get color(){return this.styles.color}get letterSpacing(){return this.styles.letterSpacing}get lineHeight(){return this.styles.lineHeight}get textAlign(){return this.styles.textAlign}get textTransform(){return this.styles.textTransform}get textOverflow(){return this.styles.textOverflow}get textShadow(){return this.styles.textShadow}get textDecorationColor(){return this.styles.textDecorationColor}get textDecorationLine(){return this.styles.textDecorationLine}get textDecorationStyle(){return this.styles.textDecorationStyle}get textDecorationThickness(){return this.styles.textDecorationThickness}get textUnderlineOffset(){return this.styles.textUnderlineOffset}get wordBreak(){return this.styles.wordBreak}get lineBreak(){return this.styles.lineBreak}get overflowWrap(){return this.styles.overflowWrap}get writingMode(){return this.styles.writingMode}get direction(){return this.styles.direction}get webkitTextStrokeColor(){return this.styles.webkitTextStrokeColor}get webkitTextStrokeWidth(){return this.styles.webkitTextStrokeWidth}get webkitLineClamp(){return this.styles.webkitLineClamp}get paintOrder(){return this.styles.paintOrder}},jU=class{constructor(A){this.styles=A}get display(){return this.styles.display}get position(){return this.styles.position}get float(){return this.styles.float}get zIndex(){return this.styles.zIndex}get marginTop(){return this.styles.marginTop}get marginRight(){return this.styles.marginRight}get marginBottom(){return this.styles.marginBottom}get marginLeft(){return this.styles.marginLeft}get paddingTop(){return this.styles.paddingTop}get paddingRight(){return this.styles.paddingRight}get paddingBottom(){return this.styles.paddingBottom}get paddingLeft(){return this.styles.paddingLeft}get overflowX(){return this.styles.overflowX}get overflowY(){return this.styles.overflowY}get opacity(){return this.styles.opacity}get visibility(){return this.styles.visibility}get transform(){return this.styles.transform}get transformOrigin(){return this.styles.transformOrigin}get rotate(){return this.styles.rotate}get zoom(){return this.styles.zoom}get clipPath(){return this.styles.clipPath}get mixBlendMode(){return this.styles.mixBlendMode}get filter(){return this.styles.filter}get imageRendering(){return this.styles.imageRendering}get objectFit(){return this.styles.objectFit}get objectPosition(){return this.styles.objectPosition}get boxDecorationBreak(){return this.styles.boxDecorationBreak}get listStyleImage(){return this.styles.listStyleImage}get listStylePosition(){return this.styles.listStylePosition}get listStyleType(){return this.styles.listStyleType}get animationDuration(){return this.styles.animationDuration}isVisible(){return this.styles.isVisible()}isTransparent(){return this.styles.isTransparent()}isTransformed(){return this.styles.isTransformed()}isPositioned(){return this.styles.isPositioned()}isPositionedWithZIndex(){return this.styles.isPositionedWithZIndex()}isFloating(){return this.styles.isFloating()}isInlineLevel(){return this.styles.isInlineLevel()}},YU=(yn=class{get border(){var e;return(e=this._border)!=null?e:this._border=new XU(this)}get background(){var e;return(e=this._background)!=null?e:this._background=new WU(this)}get font(){var e;return(e=this._font)!=null?e:this._font=new JU(this)}get layout(){var e;return(e=this._layout)!=null?e:this._layout=new jU(this)}constructor(e,t){var s,o;const n=yn.standardProps;if(t.display==="none"){this.display=0;for(const[i,l]of n)i!=="display"&&(this[i]=Be(e,l,void 0));this.float=Be(e,rp,void 0),this.textDecorationColor=Be(e,ap,void 0),this.textDecorationLine=Be(e,cp,void 0);const a=Be(e,sp,void 0);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0];return}for(const[a,i,l]of n)this[a]=Be(e,i,t[l]);this.float=Be(e,rp,t.cssFloat),this.textDecorationColor=Be(e,ap,(s=t.textDecorationColor)!=null?s:t.color),this.textDecorationLine=Be(e,cp,(o=t.textDecorationLine)!=null?o:t.textDecoration);const r=Be(e,sp,t.overflow);this.overflowX=r[0],this.overflowY=r[r.length>1?1:0]}isVisible(){return this.display>0&&this.opacity>0&&this.visibility===0}isTransparent(){return bt(this.backgroundColor)}isTransformed(){return this.transform!==null||this.rotate!==null}isPositioned(){return this.position!==0}isPositionedWithZIndex(){return this.isPositioned()&&!this.zIndex.auto}isFloating(){return this.float!==0}isInlineLevel(){return qA(this.display,4)||qA(this.display,33554432)||qA(this.display,268435456)||qA(this.display,536870912)||qA(this.display,67108864)||qA(this.display,134217728)}},yn.standardProps=[["animationDuration",bU,"animationDuration"],["backgroundClip",Zy,"backgroundClip"],["backgroundColor",Xy,"backgroundColor"],["backgroundImage",t0,"backgroundImage"],["backgroundOrigin",n0,"backgroundOrigin"],["backgroundPosition",r0,"backgroundPosition"],["backgroundRepeat",s0,"backgroundRepeat"],["backgroundSize",i0,"backgroundSize"],["borderTopColor",c0,"borderTopColor"],["borderRightColor",l0,"borderRightColor"],["borderBottomColor",u0,"borderBottomColor"],["borderLeftColor",d0,"borderLeftColor"],["borderTopLeftRadius",p0,"borderTopLeftRadius"],["borderTopRightRadius",h0,"borderTopRightRadius"],["borderBottomRightRadius",f0,"borderBottomRightRadius"],["borderBottomLeftRadius",g0,"borderBottomLeftRadius"],["borderTopStyle",B0,"borderTopStyle"],["borderRightStyle",w0,"borderRightStyle"],["borderBottomStyle",m0,"borderBottomStyle"],["borderLeftStyle",C0,"borderLeftStyle"],["borderTopWidth",b0,"borderTopWidth"],["borderRightWidth",Q0,"borderRightWidth"],["borderBottomWidth",y0,"borderBottomWidth"],["borderLeftWidth",U0,"borderLeftWidth"],["boxShadow",yU,"boxShadow"],["clipPath",x0,"clipPath"],["color",S0,"color"],["direction",I0,"direction"],["display",T0,"display"],["fontFamily",pU,"fontFamily"],["fontSize",hU,"fontSize"],["fontStyle",BU,"fontStyle"],["fontVariant",gU,"fontVariant"],["fontWeight",fU,"fontWeight"],["letterSpacing",L0,"letterSpacing"],["lineBreak",D0,"lineBreak"],["lineHeight",R0,"lineHeight"],["listStyleImage",O0,"listStyleImage"],["listStylePosition",M0,"listStylePosition"],["listStyleType",xa,"listStyleType"],["marginTop",P0,"marginTop"],["marginRight",K0,"marginRight"],["marginBottom",N0,"marginBottom"],["marginLeft",z0,"marginLeft"],["opacity",cU,"opacity"],["overflowWrap",$0,"overflowWrap"],["paddingTop",G0,"paddingTop"],["paddingRight",V0,"paddingRight"],["paddingBottom",Z0,"paddingBottom"],["paddingLeft",X0,"paddingLeft"],["paintOrder",UU,"paintOrder"],["position",J0,"position"],["textAlign",W0,"textAlign"],["textDecorationStyle",lU,"textDecorationStyle"],["textDecorationThickness",uU,"textDecorationThickness"],["textUnderlineOffset",dU,"textUnderlineOffset"],["textShadow",j0,"textShadow"],["textTransform",Y0,"textTransform"],["textOverflow",xU,"textOverflow"],["transform",q0,"transform"],["transformOrigin",tU,"transformOrigin"],["rotate",nU,"rotate"],["visibility",rU,"visibility"],["webkitTextStrokeColor",EU,"webkitTextStrokeColor"],["webkitTextStrokeWidth",FU,"webkitTextStrokeWidth"],["webkitLineClamp",kU,"webkitLineClamp"],["wordBreak",sU,"wordBreak"],["whiteSpace",oU,"whiteSpace"],["writingMode",iU,"writingMode"],["zIndex",aU,"zIndex"],["objectFit",vU,"objectFit"],["imageRendering",SU,"imageRendering"],["mixBlendMode",TU,"mixBlendMode"],["filter",HU,"filter"],["fontVariantLigatures",DU,"fontVariantLigatures"],["zoom",RU,"zoom"],["objectPosition",OU,"objectPosition"],["backgroundBlendMode",PU,"backgroundBlendMode"],["borderImageSource",KU,"borderImageSource"],["borderImageSlice",zU,"borderImageSlice"],["borderImageRepeat",GU,"borderImageRepeat"],["boxDecorationBreak",VU,"boxDecorationBreak"]],yn),qU=class{constructor(A,e){this.content=Be(A,wU,e.content),this.quotes=Be(A,QU,e.quotes)}},dp=class{constructor(A,e){this.counterIncrement=Be(A,mU,e.counterIncrement),this.counterReset=Be(A,CU,e.counterReset)}};const pp=new Map,Be=(A,e,t)=>{let n=t!==null&&typeof t!="undefined"?t.toString():e.initialValue;n.trim()===""&&(n=e.initialValue);let r=pp.get(e);if(r){const i=r.get(n);if(i!==void 0)return r.delete(n),r.set(n,i),i}const s=Qa.get();s.write(n);const o=new id(s.read());Qa.release(s);const a=(()=>{switch(e.type){case 2:{const i=o.parseComponentValue();return e.parse(A,j(i)?i.value:e.initialValue)}case 0:return e.parse(A,o.parseComponentValue());case 1:return e.parse(A,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(e.format){case"angle":return Zn.parse(A,o.parseComponentValue());case"color":return Kt.parse(A,o.parseComponentValue());case"image":return Qo.parse(A,o.parseComponentValue());case"length":{const i=o.parseComponentValue();return Mt(i)?i:LA}case"length-percentage":{const i=o.parseComponentValue();return iA(i)?i:LA}case"time":return ip.parse(A,o.parseComponentValue())}}})();if(r||(r=new Map,pp.set(e,r)),!(e.skipCache||e.type===3&&e.format==="image")){if(r.size>=200){const i=r.keys().next().value;r.delete(i)}r.set(n,a)}return a},AE="data-html2canvas-debug",eE=A=>{if(typeof A.getAttribute!="function")return 0;switch(A.getAttribute(AE)){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Ra=(A,e)=>{const t=eE(A);return t===1||e===t},tE="data-html2canvas-ignore";var nE=class{constructor(A,e,t){this.cloneNodeFn=A,this.options=e,this.context=t}appendChildNode(A,e,t){this.safeAppendClonedChild(A,e,t)}cloneChildNodes(A,e,t){A.shadowRoot&&e.shadowRoot?(this.cloneShadowDOMChildren(A.shadowRoot,e.shadowRoot,t),this.cloneLightDOMChildren(A,e,t)):A.shadowRoot&&!e.shadowRoot?this.cloneShadowDOMAsLightDOM(A.shadowRoot,e,t):this.cloneLightDOMChildren(A,e,t)}shouldCloneChild(A){return!sn(A)||!Ly(A)&&!A.hasAttribute("data-html2canvas-ignore")&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(A))}shouldCloneStyleElement(A){return!this.options.copyStyles||!sn(A)||!Dd(A)}safeAppendClonedChild(A,e,t){this.shouldCloneChild(e)&&this.shouldCloneStyleElement(e)&&A.appendChild(this.cloneNodeFn(e,t))}cloneAssignedNodes(A,e,t){A.forEach(n=>{this.safeAppendClonedChild(e,n,t)})}cloneSlotFallbackContent(A,e,t){for(let n=A.firstChild;n;n=n.nextSibling)this.safeAppendClonedChild(e,n,t)}cloneSlotElement(A,e,t){if(!Nr(A))return;const n=A;if(typeof n.assignedNodes!="function"){this.context.logger.warn("HTMLSlotElement.assignedNodes is not available",A),this.cloneSlotFallbackContent(A,e,t);return}const r=n.assignedNodes();if(!r||!Array.isArray(r)){this.context.logger.warn("assignedNodes() did not return a valid array",A),this.cloneSlotFallbackContent(A,e,t);return}r.length>0?this.cloneAssignedNodes(r,e,t):this.cloneSlotFallbackContent(A,e,t)}cloneShadowDOMChildren(A,e,t){for(let n=A.firstChild;n;n=n.nextSibling)sn(n)&&Nr(n)?this.cloneSlotElement(n,e,t):this.safeAppendClonedChild(e,n,t)}cloneLightDOMChildren(A,e,t){for(let n=A.firstChild;n;n=n.nextSibling)this.appendChildNode(e,n,t)}cloneSlotElementAsLightDOM(A,e,t){if(!Nr(A))return;const n=A;if(typeof n.assignedNodes!="function"){for(let s=A.firstChild;s;s=s.nextSibling)this.appendChildNode(e,s,t);return}const r=n.assignedNodes();if(r&&Array.isArray(r)&&r.length>0)r.forEach(s=>this.appendChildNode(e,s,t));else for(let s=A.firstChild;s;s=s.nextSibling)this.appendChildNode(e,s,t)}cloneShadowDOMAsLightDOM(A,e,t){for(let n=A.firstChild;n;n=n.nextSibling)sn(n)&&Nr(n)?this.cloneSlotElementAsLightDOM(n,e,t):this.appendChildNode(e,n,t)}};const rE=A=>{let e=A;for(;e;){if(e.parentNode&&e.parentNode.host)return e.parentNode;const t=e.getRootNode();if(t&&t!==e.ownerDocument&&t.host)return t;e=e.parentNode}return null};var Oa=class{constructor(A,e,t){var n;if(this.context=A,this.options=t,this.scrolledElements=[],this.referenceElement=e,this.counters=new Py,this.quoteDepth=0,this.slotCloner=new nE((r,s)=>this.cloneNode(r,s),{ignoreElements:t.ignoreElements,copyStyles:(n=t.copyStyles)!=null?n:!0},A),!e.ownerDocument)throw new Error("Cloned element does not have an owner document");if(!this.options.iframeContainer){const r=rE(e);r&&(this.options.iframeContainer=r)}this.documentElement=this.cloneNode(e.ownerDocument.documentElement,!1)}toIFrame(A,e){var h,f;const t=sE(A,e,this.options.iframeContainer);if(!t.contentWindow)throw new Error("Unable to find iframe window");const n=A.defaultView.pageXOffset,r=A.defaultView.pageYOffset,s=t.contentWindow,o=s.document,a=aE(t).then(()=>T(this,null,function*(){this.scrolledElements.forEach(dE),s&&s.scrollTo(e.left,e.top);const g=this.options.onclone,m=this.clonedReferenceElement;if(typeof m=="undefined")throw new Error(`Error finding the ${this.referenceElement.nodeName} in the cloned document`);return o.fonts&&o.fonts.ready&&(yield o.fonts.ready),/(AppleWebKit)/g.test(navigator.userAgent)&&(yield iE(o)),typeof g=="function"&&(yield Promise.resolve().then(()=>g(o,m))),s.scrollTo(e.left,e.top),/AppleWebKit/g.test(navigator.userAgent)&&(s.scrollY!==e.top||s.scrollX!==e.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-e.left,s.scrollY-e.top,0,0)),t})),i=A.baseURI;o.open();const l=lE(document.doctype)+"<html></html>";try{const g=(h=this.referenceElement.ownerDocument)==null?void 0:h.defaultView,m=g&&g.trustedTypes;let Q=(f=m==null?void 0:m.getPolicy)==null?void 0:f.call(m,"html2canvas-pro");!Q&&m&&(Q=m.createPolicy("html2canvas-pro",{createHTML:E=>E}));const U=Q?Q.createHTML(l):l;o.write(U)}catch(g){o.write(l)}uE(this.referenceElement.ownerDocument,n,r),o.close();const u=o.adoptNode(this.documentElement);return BE(u,i),o.replaceChild(u,o.documentElement),a}createElementClone(A){if(Ra(A,2))debugger;if(Td(A))return this.createCanvasClone(A);if(Hd(A))return this.createVideoClone(A);if(Dd(A))return this.createStyleClone(A);const e=A.cloneNode(!1);return _a(e)&&(_a(A)&&A.currentSrc&&A.currentSrc!==A.src&&(e.src=A.currentSrc,e.srcset=""),e.loading==="lazy"&&(e.loading="eager")),Rd(e)&&!on(e)?this.createCustomElementClone(A,e):e}createCustomElementClone(A,e){const t=document.createElement("div");t.className=e.className,Ma(e.style,t);const n=e.attributes;for(let r=0;r<n.length;r++){const s=n[r];s.name!=="class"&&s.name!=="style"&&t.setAttribute(s.name,s.value)}if(A.shadowRoot)try{t.attachShadow({mode:"open"})}catch(r){this.context.logger.error("Failed to attach shadow root to custom element clone:",r)}return t}createStyleClone(A){try{const t=A.sheet;if(t&&t.cssRules){const n=[].slice.call(t.cssRules,0).reduce((s,o)=>o&&typeof o.cssText=="string"?s+o.cssText:s,""),r=A.cloneNode(!1);return r.textContent=n,this.options.cspNonce&&(r.nonce=this.options.cspNonce),r}}catch(t){if(this.context.logger.error("Unable to access cssRules property",t),t.name!=="SecurityError")throw t}const e=A.cloneNode(!1);return this.options.cspNonce&&(e.nonce=this.options.cspNonce),e}createCanvasClone(A){var t,n;if(this.options.inlineImages&&A.ownerDocument){const r=A.ownerDocument.createElement("img");try{return r.src=A.toDataURL(),r}catch(s){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",A)}}const e=A.cloneNode(!1);try{e.width=A.width,e.height=A.height;const r=A.getContext("2d"),s=e.getContext("2d",{willReadFrequently:!0});if(s)if(!this.options.allowTaint&&r)s.putImageData(r.getImageData(0,0,A.width,A.height),0,0);else{const o=(t=A.getContext("webgl2"))!=null?t:A.getContext("webgl");o&&((n=o.getContextAttributes())==null?void 0:n.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",A),s.drawImage(A,0,0)}return e}catch(r){this.context.logger.info("Unable to clone canvas as it is tainted",A)}return e}createVideoClone(A){const e=A.ownerDocument.createElement("canvas");e.width=A.offsetWidth,e.height=A.offsetHeight;const t=e.getContext("2d");try{return t&&(t.drawImage(A,0,0,e.width,e.height),this.options.allowTaint||t.getImageData(0,0,e.width,e.height)),e}catch(r){this.context.logger.info("Unable to clone video as it is tainted",A)}const n=A.ownerDocument.createElement("canvas");return n.width=A.offsetWidth,n.height=A.offsetHeight,n}appendChildNode(A,e,t){this.slotCloner.appendChildNode(A,e,t)}cloneChildNodes(A,e,t){this.slotCloner.cloneChildNodes(A,e,t)}cloneNode(A,e){if(Sd(A))return document.createTextNode(A.data);if(!A.ownerDocument)return A.cloneNode(!1);const t=A.ownerDocument.defaultView;if(t&&sn(A)&&(Kr(A)||on(A))){const n=this.createElementClone(A);n.style.transitionProperty="none";const r=t.getComputedStyle(A),s=My(A);this.referenceElement===A&&Kr(n)&&(this.clonedReferenceElement=n),va(n)&&fE(n,this.options.cspNonce);const o=this.counters.parse(new dp(this.context,r));if(s){const a=t.getComputedStyle(A,":before"),i=this.resolvePseudoContent(A,n,a,0);i&&n.insertBefore(i,n.firstChild);const l=t.getComputedStyle(A,":after"),u=this.resolvePseudoContent(A,n,l,1);u&&n.appendChild(u)}return Rd(A)&&(e=!0),Hd(A)||this.cloneChildNodes(A,n,e),this.counters.pop(o),(r&&(this.options.copyStyles||on(A))&&!Ld(A)||e)&&Ma(r,n),(A.scrollTop!==0||A.scrollLeft!==0)&&this.scrolledElements.push([n,A.scrollLeft,A.scrollTop]),(Bo(A)||wo(A))&&(Bo(n)||wo(n))&&(n.value=A.value),n}return A.cloneNode(!1)}resolvePseudoContent(A,e,t,n){if(!t)return;const r=t.content,s=e.ownerDocument;if(!s||!r||r==="none"||r==="-moz-alt-content"||t.display==="none")return;this.counters.parse(new dp(this.context,t));const o=new qU(this.context,t),a=s.createElement("html2canvaspseudoelement");Ma(t,a),o.content.forEach(l=>{if(l.type===0)a.appendChild(s.createTextNode(l.value));else if(l.type===22){const u=s.createElement("img");u.src=l.value,u.style.opacity="1",a.appendChild(u)}else if(l.type===18){if(l.name==="attr"){const u=l.values.filter(j);u.length&&a.appendChild(s.createTextNode(A.getAttribute(u[0].value)||""))}else if(l.name==="counter"){const[u,h]=l.values.filter(GA);if(u&&j(u)){const f=this.counters.getCounterValue(u.value),g=h&&j(h)?xa.parse(this.context,h.value):3;a.appendChild(s.createTextNode(zr(f,g,!1)))}}else if(l.name==="counters"){const[u,h,f]=l.values.filter(GA);if(u&&j(u)){const g=this.counters.getCounterValues(u.value),m=f&&j(f)?xa.parse(this.context,f.value):3,Q=h&&h.type===0?h.value:"",U=g.map(E=>zr(E,m,!1)).join(Q);a.appendChild(s.createTextNode(U))}}}else if(l.type===20)switch(l.value){case"open-quote":a.appendChild(s.createTextNode(up(o.quotes,this.quoteDepth++,!0)));break;case"close-quote":a.appendChild(s.createTextNode(up(o.quotes,--this.quoteDepth,!1)));break;default:a.appendChild(s.createTextNode(l.value))}}),a.className=`${Pa} ${Ka}`;const i=n===0?` ${Pa}`:` ${Ka}`;return on(e)?e.className.baseValue+=i:e.className+=i,a}static destroy(A){return A.parentNode?(A.parentNode.removeChild(A),!0):!1}};const sE=(A,e,t)=>{const n=A.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=e.width.toString(),n.height=e.height.toString(),n.scrolling="no",n.setAttribute(tE,"true"),(t||A.body).appendChild(n),n},oE=A=>new Promise(e=>{if(A.complete){e();return}if(!A.src){e();return}A.onload=e,A.onerror=e}),iE=A=>Promise.all([].slice.call(A.images,0).map(oE)),aE=A=>new Promise((e,t)=>{const n=A.contentWindow;if(!n)return t("No window assigned for iframe");const r=n.document;n.onload=A.onload=()=>{n.onload=A.onload=null;const s=600;let o=0;const a=setInterval(()=>{o++,(r.body.childNodes.length>0&&r.readyState==="complete"||o>=s)&&(clearInterval(a),e(A))},50)}}),cE=["all","d","content"],Ma=(A,e)=>{const t=[];for(let n=A.length-1;n>=0;n--){const r=A.item(n);if(cE.indexOf(r)===-1&&!r.startsWith("--")){const s=A.getPropertyValue(r);if(s){const o=A.getPropertyPriority(r);t.push(o?`${r}:${s} !${o}`:`${r}:${s}`)}}}return t.length>0&&(e.style.cssText=t.join(";")+";"),e},lE=A=>{let e="";return A&&(e+="<!DOCTYPE ",A.name&&(e+=A.name),A.internalSubset&&(e+=" "+A.internalSubset.replace(/"/g,""").replace(/>/g,">")),A.publicId?(e+=' PUBLIC "'+A.publicId.replace(/"/g,""")+'"',A.systemId&&(e+=' "'+A.systemId.replace(/"/g,""")+'"')):A.systemId&&(e+=' SYSTEM "'+A.systemId.replace(/"/g,""")+'"'),e+=">"),e},uE=(A,e,t)=>{A&&A.defaultView&&(e!==A.defaultView.pageXOffset||t!==A.defaultView.pageYOffset)&&A.defaultView.scrollTo(e,t)},dE=([A,e,t])=>{A.scrollLeft=e,A.scrollTop=t},pE=":before",hE=":after",Pa="___html2canvas___pseudoelement_before",Ka="___html2canvas___pseudoelement_after",hp=`{
|
|
1650
|
+
content: "" !important;
|
|
1651
|
+
display: none !important;
|
|
1652
|
+
}`,fE=(A,e)=>{gE(A,`.${Pa}${pE}${hp}
|
|
1653
|
+
.${Ka}${hE}${hp}`,e)},gE=(A,e,t)=>{const n=A.ownerDocument;if(n){const r=n.createElement("style");r.textContent=e,t&&(r.nonce=t),A.appendChild(r)}},BE=(A,e)=>{var r;const t=A.ownerDocument.createElement("base");t.href=e;const n=A.getElementsByTagName("head").item(0);n==null||n.insertBefore(t,(r=n==null?void 0:n.firstChild)!=null?r:null)};for(var fp=class{static normalizeElement(A,e){const t={};return Kr(A)&&(e.animationDuration.some(n=>n>0)&&(t.animationDuration=A.style.animationDuration,A.style.animationDuration="0s"),e.transform!==null&&(t.transform=A.style.transform,A.style.transform="translate(0, 0)"),e.rotate!==null&&(t.rotate=A.style.rotate,A.style.rotate="0deg",t.transform===void 0&&(t.transform=A.style.transform,A.style.transform="translate(0, 0)"))),t}static restoreElement(A,e){Kr(A)&&(e.animationDuration!==void 0&&(A.style.animationDuration=e.animationDuration),e.transform!==void 0&&(A.style.transform=e.transform),e.rotate!==void 0&&(A.style.rotate=e.rotate))}},at=class{constructor(A,e,t={}){if(this.context=A,this.textNodes=[],this.elements=[],this.createsStackingContext=!1,this.createsRealStackingContext=!1,this.isListOwner=!1,this.debugRender=!1,Ra(e,3))debugger;if(this.styles=new YU(A,A.config.window.getComputedStyle(e,null)),t.normalizeDom!==!1&&Kr(e)&&(this.originalStyles=fp.normalizeElement(e,this.styles),this.originalElement=e),this.bounds=_r(this.context,e),e.tagName==="FIELDSET"){const n=e.querySelector(":scope > legend");if(n){const r=_r(this.context,n);this.legendBounds=r;const s=r.top+r.height/2-this.styles.borderTopWidth/2;this.bounds=new ke(this.bounds.left,s,this.bounds.width,this.bounds.height-(s-this.bounds.top))}}Ra(e,4)&&(this.debugRender=!0)}restore(){this.originalStyles&&this.originalElement&&(fp.restoreElement(this.originalElement,this.originalStyles),this.originalStyles=void 0,this.originalElement=void 0)}restoreTree(){this.restore();for(const A of this.elements)A.restoreTree()}},wE="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",gp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gr=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),xo=0;xo<gp.length;xo++)Gr[gp.charCodeAt(xo)]=xo;for(var mE=function(A){var e=A.length*.75,t=A.length,n,r=0,s,o,a,i;A[A.length-1]==="="&&(e--,A[A.length-2]==="="&&e--);var l=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)s=Gr[A.charCodeAt(n)],o=Gr[A.charCodeAt(n+1)],a=Gr[A.charCodeAt(n+2)],i=Gr[A.charCodeAt(n+3)],u[r++]=s<<2|o>>4,u[r++]=(o&15)<<4|a>>2,u[r++]=(a&3)<<6|i&63;return l},CE=function(A){for(var e=A.length,t=[],n=0;n<e;n+=2)t.push(A[n+1]<<8|A[n]);return t},bE=function(A){for(var e=A.length,t=[],n=0;n<e;n+=4)t.push(A[n+3]<<24|A[n+2]<<16|A[n+1]<<8|A[n]);return t},cn=5,Na=11,za=2,QE=Na-cn,Bp=65536>>cn,$a=(1<<cn)-1,yE=Bp+(1024>>cn)+32,UE=65536>>Na,EE=(1<<QE)-1,wp=function(A,e,t){return A.slice?A.slice(e,t):new Uint16Array(Array.prototype.slice.call(A,e,t))},FE=function(A,e,t){return A.slice?A.slice(e,t):new Uint32Array(Array.prototype.slice.call(A,e,t))},kE=function(A,e){var t=mE(A),n=Array.isArray(t)?bE(t):new Uint32Array(t),r=Array.isArray(t)?CE(t):new Uint16Array(t),s=24,o=wp(r,s/2,n[4]/2),a=n[5]===2?wp(r,(s+n[4])/2):FE(n,Math.ceil((s+n[4])/4));return new vE(n[0],n[1],n[2],n[3],o,a)},vE=(function(){function A(e,t,n,r,s,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=s,this.data=o}return A.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>cn],t=(t<<za)+(e&$a),this.data[t];if(e<=65535)return t=this.index[Bp+(e-55296>>cn)],t=(t<<za)+(e&$a),this.data[t];if(e<this.highStart)return t=yE-UE+(e>>Na),t=this.index[t],t+=e>>cn&EE,t=this.index[t],t=(t<<za)+(e&$a),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},A})(),mp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_E=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),So=0;So<mp.length;So++)_E[mp.charCodeAt(So)]=So;var xE=1,Ga=2,Va=3,Cp=4,bp=5,SE=7,Qp=8,Za=9,Xa=10,yp=11,Up=12,Ep=13,Fp=14,Wa=15,IE=function(A){for(var e=[],t=0,n=A.length;t<n;){var r=A.charCodeAt(t++);if(r>=55296&&r<=56319&&t<n){var s=A.charCodeAt(t++);(s&64512)===56320?e.push(((r&1023)<<10)+(s&1023)+65536):(e.push(r),t--)}else e.push(r)}return e},TE=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,A);var t=A.length;if(!t)return"";for(var n=[],r=-1,s="";++r<t;){var o=A[r];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(r+1===t||n.length>16384)&&(s+=String.fromCharCode.apply(String,n),n.length=0)}return s},HE=kE(wE),_e="×",Ja="÷",LE=function(A){return HE.get(A)},DE=function(A,e,t){var n=t-2,r=e[n],s=e[t-1],o=e[t];if(s===Ga&&o===Va)return _e;if(s===Ga||s===Va||s===Cp||o===Ga||o===Va||o===Cp)return Ja;if(s===Qp&&[Qp,Za,yp,Up].indexOf(o)!==-1||(s===yp||s===Za)&&(o===Za||o===Xa)||(s===Up||s===Xa)&&o===Xa||o===Ep||o===bp||o===SE||s===xE)return _e;if(s===Ep&&o===Fp){for(;r===bp;)r=e[--n];if(r===Fp)return _e}if(s===Wa&&o===Wa){for(var a=0;r===Wa;)a++,r=e[--n];if(a%2===0)return _e}return Ja},RE=function(A){var e=IE(A),t=e.length,n=0,r=0,s=e.map(LE);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=_e;n<t&&(o=DE(e,s,++n))===_e;);if(o!==_e||n===t){var a=TE.apply(null,e.slice(r,n));return r=n,{value:a,done:!1}}return{done:!0,value:null}}}},OE=function(A){for(var e=RE(A),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t};const ME=A=>{if(A.createRange){const t=A.createRange();if(t.getBoundingClientRect){const n=A.createElement("boundtest");n.style.height="123px",n.style.display="block",A.body.appendChild(n),t.selectNode(n);const r=t.getBoundingClientRect(),s=Math.round(r.height);if(A.body.removeChild(n),s===123)return!0}}return!1},PE=A=>{const e=A.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",A.body.appendChild(e);const t=A.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";const n=e.firstChild,r=js(n.data).map(i=>HA(i));let s=0,o={};const a=r.every((i,l)=>{t.setStart(n,s),t.setEnd(n,s+i.length);const u=t.getBoundingClientRect();s+=i.length;const h=u.x>o.x||u.y>o.y;return o=u,l===0?!0:h});return A.body.removeChild(e),a},KE=()=>typeof new Image().crossOrigin!="undefined",NE=()=>typeof new XMLHttpRequest().responseType=="string",zE=A=>{const e=new Image,t=A.createElement("canvas"),n=t.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(e,0,0),t.toDataURL()}catch(r){return!1}return!0},kp=A=>A[0]===0&&A[1]===255&&A[2]===0&&A[3]===255,$E=A=>{const e=A.createElement("canvas"),t=100;e.width=t,e.height=t;const n=e.getContext("2d");if(!n)return Promise.reject(new Error("Failed to get 2D rendering context"));n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,t,t);const r=new Image,s=e.toDataURL();r.src=s;const o=ja(t,t,0,0,r);return n.fillStyle="red",n.fillRect(0,0,t,t),Ya(o).then(a=>{n.drawImage(a,0,0);const i=n.getImageData(0,0,t,t).data;n.fillStyle="red",n.fillRect(0,0,t,t);const l=A.createElement("div");return l.style.backgroundImage=`url(${s})`,l.style.height=`${t}px`,kp(i)?Ya(ja(t,t,0,0,l)):Promise.reject(new Error("ForeignObject rendering not supported"))}).then(a=>(n.drawImage(a,0,0),kp(n.getImageData(0,0,t,t).data))).catch(()=>!1)},ja=(A,e,t,n,r)=>{const s="http://www.w3.org/2000/svg",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject");return o.setAttributeNS(null,"width",A.toString()),o.setAttributeNS(null,"height",e.toString()),a.setAttributeNS(null,"width","100%"),a.setAttributeNS(null,"height","100%"),a.setAttributeNS(null,"x",t.toString()),a.setAttributeNS(null,"y",n.toString()),a.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(a),a.appendChild(r),o},Ya=A=>new Promise((e,t)=>{const n=new Image;n.onload=()=>e(n),n.onerror=t,n.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(A))}`}),Ae={get SUPPORT_RANGE_BOUNDS(){const A=ME(document);return Object.defineProperty(Ae,"SUPPORT_RANGE_BOUNDS",{value:A}),A},get SUPPORT_WORD_BREAKING(){const A=Ae.SUPPORT_RANGE_BOUNDS&&PE(document);return Object.defineProperty(Ae,"SUPPORT_WORD_BREAKING",{value:A}),A},get SUPPORT_SVG_DRAWING(){const A=zE(document);return Object.defineProperty(Ae,"SUPPORT_SVG_DRAWING",{value:A}),A},get SUPPORT_FOREIGNOBJECT_DRAWING(){const A=typeof Array.from=="function"&&typeof window.fetch=="function"?$E(document):Promise.resolve(!1);return Object.defineProperty(Ae,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:A}),A},get SUPPORT_CORS_IMAGES(){const A=KE();return Object.defineProperty(Ae,"SUPPORT_CORS_IMAGES",{value:A}),A},get SUPPORT_RESPONSE_TYPE(){const A=NE();return Object.defineProperty(Ae,"SUPPORT_RESPONSE_TYPE",{value:A}),A},get SUPPORT_CORS_XHR(){const A="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Ae,"SUPPORT_CORS_XHR",{value:A}),A},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){const A=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(Ae,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:A}),A}};var ln=class{constructor(A,e){this.text=A,this.bounds=e}};const GE=(A,e,t,n)=>{const r=XE(e,t),s=[];let o=0;return r.forEach(a=>{if(t.textDecorationLine.length||a.trim().length>0)if(Ae.SUPPORT_RANGE_BOUNDS){const i=vp(n,o,a.length).getClientRects();if(i.length>1){const l=un(a);let u=0;l.forEach(h=>{s.push(new ln(h,ke.fromDOMRectList(A,vp(n,u+o,h.length).getClientRects()))),u+=h.length})}else s.push(new ln(a,ke.fromDOMRectList(A,i)))}else{const i=n.splitText(a.length);s.push(new ln(a,VE(A,n))),n=i}else Ae.SUPPORT_RANGE_BOUNDS||(n=n.splitText(a.length));o+=a.length}),s},VE=(A,e)=>{const t=e.ownerDocument;if(t){const n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));const r=e.parentNode;if(r){r.replaceChild(n,e);const s=_r(A,n);return n.firstChild&&r.replaceChild(n.firstChild,n),s}}return ke.EMPTY},vp=(A,e,t)=>{const n=A.ownerDocument;if(!n)throw new Error("Node has no owner document");const r=n.createRange();return r.setStart(A,e),r.setEnd(A,e+t),r},un=A=>{if(Ae.SUPPORT_NATIVE_TEXT_SEGMENTATION){const e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(A)).map(t=>t.segment)}return OE(A)},ZE=(A,e)=>{if(Ae.SUPPORT_NATIVE_TEXT_SEGMENTATION){const t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(A)).map(n=>n.segment)}return JE(A,e)},XE=(A,e)=>_o(e.writingMode)||e.letterSpacing!==0?un(A):ZE(A,e),WE=[32,160,4961,65792,65793,4153,4241],JE=(A,e)=>{const t=aQ(A,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[];let r;for(;!(r=t.next()).done;)if(r.value){const s=js(r.value.slice());let o="";s.forEach(a=>{WE.indexOf(a)===-1?o+=HA(a):(o.length&&n.push(o),n.push(HA(a)),o="")}),o.length&&n.push(o)}return n};var jE=class{constructor(A,e,t){this.text=YE(e.data,t.textTransform),this.text.length!==e.data.length&&(e.data=this.text),this.textBounds=GE(A,this.text,t,e)}};const YE=(A,e)=>{switch(e){case 1:return A.toLowerCase();case 3:return A.replace(qE,AF);case 2:return A.toUpperCase();default:return A}},qE=/(^|\s|:|-|\(|\))([a-z])/g,AF=(A,e,t)=>A.length>0?e+t.toUpperCase():A;var _p=class extends at{constructor(A,e){super(A,e),this.src=e.currentSrc||e.src,this.intrinsicWidth=e.naturalWidth,this.intrinsicHeight=e.naturalHeight,this.context.cache.addImage(this.src)}},xp=class extends at{constructor(A,e){super(A,e),this.canvas=e,this.intrinsicWidth=e.width,this.intrinsicHeight=e.height}};const eF=["position","inset","top","right","bottom","left","inset-inline","inset-inline-start","inset-inline-end","inset-block","inset-block-start","inset-block-end","margin","margin-top","margin-right","margin-bottom","margin-left","margin-inline","margin-inline-start","margin-inline-end","margin-block","margin-block-start","margin-block-end"],tF=(A,e)=>{const t=e.getAttribute("style");eF.forEach(r=>e.style.removeProperty(r));const n=A.serializeToString(e);return t===null?e.removeAttribute("style"):e.setAttribute("style",t),n};var Sp=class extends at{constructor(A,e){super(A,e);const t=new XMLSerializer,n=_r(A,e);e.setAttribute("width",`${n.width}px`),e.setAttribute("height",`${n.height}px`),this.svg=`data:image/svg+xml,${encodeURIComponent(tF(t,e))}`,this.intrinsicWidth=e.width.baseVal.value,this.intrinsicHeight=e.height.baseVal.value,this.context.cache.addImage(this.svg)}},Ip=class extends at{constructor(A,e){super(A,e),this.value=e.value}},qa=class extends at{constructor(A,e){super(A,e),this.start=e.start,this.reversed=typeof e.reversed=="boolean"&&e.reversed===!0}};const nF=[{type:15,flags:0,unit:"px",number:3}],rF=[{type:16,flags:0,number:50}],sF=A=>A.width>A.height?new ke(A.left+(A.width-A.height)/2,A.top,A.height,A.height):A.width<A.height?new ke(A.left,A.top+(A.height-A.width)/2,A.width,A.width):A,oF=A=>{const e=A.type==="password"?new Array(A.value.length+1).join("•"):A.value;return e.length===0?A.placeholder||"":e},iF=A=>A.value.length===0&&!!A.placeholder,aF="checkbox",cF="radio",Tp=707406591,lF=1970632191;var Jn=class extends at{constructor(A,e){switch(super(A,e),this.type=e.type.toLowerCase(),this.checked=e.checked,this.value=oF(e),this.isPlaceholder=iF(e),(this.type==="checkbox"||this.type==="radio")&&(this.styles.backgroundColor=3739148031,this.styles.borderTopColor=this.styles.borderRightColor=this.styles.borderBottomColor=this.styles.borderLeftColor=2779096575,this.styles.borderTopWidth=this.styles.borderRightWidth=this.styles.borderBottomWidth=this.styles.borderLeftWidth=1,this.styles.borderTopStyle=this.styles.borderRightStyle=this.styles.borderBottomStyle=this.styles.borderLeftStyle=1,this.styles.backgroundClip=[0],this.styles.backgroundOrigin=[0],this.bounds=sF(this.bounds)),this.type){case aF:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=nF;break;case cF:this.styles.borderTopRightRadius=this.styles.borderTopLeftRadius=this.styles.borderBottomRightRadius=this.styles.borderBottomLeftRadius=rF;break}}},Hp=class extends at{constructor(A,e){super(A,e);const t=e.options[e.selectedIndex||0];this.value=t&&t.text||""}},Lp=class extends at{constructor(A,e){super(A,e),this.value=e.value}},Dp=class extends at{constructor(A,e,t){super(A,e),this.src=e.src,this.width=parseInt(e.width,10)||0,this.height=parseInt(e.height,10)||0,this.backgroundColor=this.styles.backgroundColor,this.parseTreeFn=t;try{if(e.contentWindow&&e.contentWindow.document&&e.contentWindow.document.documentElement&&this.parseTreeFn){this.tree=this.parseTreeFn(A,e.contentWindow.document.documentElement);const n=e.contentWindow.document.documentElement?Xn(A,getComputedStyle(e.contentWindow.document.documentElement).backgroundColor):it.TRANSPARENT,r=e.contentWindow.document.body?Xn(A,getComputedStyle(e.contentWindow.document.body).backgroundColor):it.TRANSPARENT;this.backgroundColor=bt(n)?bt(r)?this.styles.backgroundColor:r:n}}catch(n){}}};const uF=["OL","UL","MENU"],Ac=(A,e,t,n)=>{for(let r=e.firstChild,s;r;r=s)s=r.nextSibling,Rp(A,r,t,n)},Rp=(A,e,t,n)=>{if(Sd(e)&&e.data.length>0)t.textNodes.push(new jE(A,e,t.styles));else if(sn(e))if(Nr(e)&&e.assignedNodes)e.assignedNodes().forEach(r=>Rp(A,r,t,n));else{const r=Op(A,e);r.styles.isVisible()&&(dF(e,r,n)?r.createsRealStackingContext=!0:pF(r.styles)&&(r.createsStackingContext=!0),uF.indexOf(e.tagName)!==-1&&(r.isListOwner=!0),t.elements.push(r),e.shadowRoot?Ac(A,e.shadowRoot,r,n):!Bo(e)&&!Id(e)&&!wo(e)&&Ac(A,e,r,n))}},Op=(A,e)=>_a(e)?new _p(A,e):Td(e)?new xp(A,e):Id(e)?new Sp(A,e):Dy(e)?new Ip(A,e):Ry(e)?new qa(A,e):Ty(e)?new Jn(A,e):wo(e)?new Hp(A,e):Bo(e)?new Lp(A,e):Ld(e)?new Dp(A,e,Mp):new at(A,e),Mp=(A,e)=>{const t=Op(A,e);return t.createsRealStackingContext=!0,Ac(A,e,t,t),t},dF=(A,e,t)=>e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||va(A)&&t.styles.isTransparent(),pF=A=>A.isPositioned()||A.isFloating()?!0:qA(A.display,268435456)||qA(A.display,33554432)||qA(A.display,536870912)||qA(A.display,134217728),Pp=(A,e)=>A.length===e.length?A.some((t,n)=>t===e[n]):!1,hF=(A,e,t,n,r)=>A.map((s,o)=>{switch(o){case 0:return s.add(e,t);case 1:return s.add(e+n,t);case 2:return s.add(e+n,t+r);case 3:return s.add(e,t+r)}return s});var O=class Xf{constructor(e,t){this.type=0,this.x=e,this.y=t}add(e,t){return new Xf(this.x+e,this.y+t)}};const jn=(A,e,t)=>new O(A.x+(e.x-A.x)*t,A.y+(e.y-A.y)*t);var Io=class vs{constructor(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}subdivide(e,t){const n=jn(this.start,this.startControl,e),r=jn(this.startControl,this.endControl,e),s=jn(this.endControl,this.end,e),o=jn(n,r,e),a=jn(r,s,e),i=jn(o,a,e);return t?new vs(this.start,n,o,i):new vs(i,a,s,this.end)}add(e,t){return new vs(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))}reverse(){return new vs(this.end,this.endControl,this.startControl,this.start)}};const xe=A=>A.type===1;var fF=class{constructor(A){const e=A.styles,t=A.bounds;let[n,r]=Mr(e.borderTopLeftRadius,t.width,t.height),[s,o]=Mr(e.borderTopRightRadius,t.width,t.height),[a,i]=Mr(e.borderBottomRightRadius,t.width,t.height),[l,u]=Mr(e.borderBottomLeftRadius,t.width,t.height);const h=[];h.push((n+s)/t.width),h.push((l+a)/t.width),h.push((r+u)/t.height),h.push((o+i)/t.height);const f=Math.max(...h);f>1&&(n/=f,r/=f,s/=f,o/=f,a/=f,i/=f,l/=f,u/=f);const g=t.width-s,m=t.height-i,Q=t.width-a,U=t.height-u,E=e.borderTopWidth,v=e.borderRightWidth,F=e.borderBottomWidth,y=e.borderLeftWidth,x=J(e.paddingTop,A.bounds.width),R=J(e.paddingRight,A.bounds.width),I=J(e.paddingBottom,A.bounds.width),K=J(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||r>0?kA(t.left+y/3,t.top+E/3,n-y/3,r-E/3,0):new O(t.left+y/3,t.top+E/3),this.topRightBorderDoubleOuterBox=n>0||r>0?kA(t.left+g,t.top+E/3,s-v/3,o-E/3,1):new O(t.left+t.width-v/3,t.top+E/3),this.bottomRightBorderDoubleOuterBox=a>0||i>0?kA(t.left+Q,t.top+m,a-v/3,i-F/3,2):new O(t.left+t.width-v/3,t.top+t.height-F/3),this.bottomLeftBorderDoubleOuterBox=l>0||u>0?kA(t.left+y/3,t.top+U,l-y/3,u-F/3,3):new O(t.left+y/3,t.top+t.height-F/3),this.topLeftBorderDoubleInnerBox=n>0||r>0?kA(t.left+y*2/3,t.top+E*2/3,n-y*2/3,r-E*2/3,0):new O(t.left+y*2/3,t.top+E*2/3),this.topRightBorderDoubleInnerBox=n>0||r>0?kA(t.left+g,t.top+E*2/3,s-v*2/3,o-E*2/3,1):new O(t.left+t.width-v*2/3,t.top+E*2/3),this.bottomRightBorderDoubleInnerBox=a>0||i>0?kA(t.left+Q,t.top+m,a-v*2/3,i-F*2/3,2):new O(t.left+t.width-v*2/3,t.top+t.height-F*2/3),this.bottomLeftBorderDoubleInnerBox=l>0||u>0?kA(t.left+y*2/3,t.top+U,l-y*2/3,u-F*2/3,3):new O(t.left+y*2/3,t.top+t.height-F*2/3),this.topLeftBorderStroke=n>0||r>0?kA(t.left+y/2,t.top+E/2,n-y/2,r-E/2,0):new O(t.left+y/2,t.top+E/2),this.topRightBorderStroke=n>0||r>0?kA(t.left+g,t.top+E/2,s-v/2,o-E/2,1):new O(t.left+t.width-v/2,t.top+E/2),this.bottomRightBorderStroke=a>0||i>0?kA(t.left+Q,t.top+m,a-v/2,i-F/2,2):new O(t.left+t.width-v/2,t.top+t.height-F/2),this.bottomLeftBorderStroke=l>0||u>0?kA(t.left+y/2,t.top+U,l-y/2,u-F/2,3):new O(t.left+y/2,t.top+t.height-F/2),this.topLeftBorderBox=n>0||r>0?kA(t.left,t.top,n,r,0):new O(t.left,t.top),this.topRightBorderBox=s>0||o>0?kA(t.left+g,t.top,s,o,1):new O(t.left+t.width,t.top),this.bottomRightBorderBox=a>0||i>0?kA(t.left+Q,t.top+m,a,i,2):new O(t.left+t.width,t.top+t.height),this.bottomLeftBorderBox=l>0||u>0?kA(t.left,t.top+U,l,u,3):new O(t.left,t.top+t.height),this.topLeftPaddingBox=n>0||r>0?kA(t.left+y,t.top+E,Math.max(0,n-y),Math.max(0,r-E),0):new O(t.left+y,t.top+E),this.topRightPaddingBox=s>0||o>0?kA(t.left+Math.min(g,t.width-v),t.top+E,g>t.width+v?0:Math.max(0,s-v),Math.max(0,o-E),1):new O(t.left+t.width-v,t.top+E),this.bottomRightPaddingBox=a>0||i>0?kA(t.left+Math.min(Q,t.width-y),t.top+Math.min(m,t.height-F),Math.max(0,a-v),Math.max(0,i-F),2):new O(t.left+t.width-v,t.top+t.height-F),this.bottomLeftPaddingBox=l>0||u>0?kA(t.left+y,t.top+Math.min(U,t.height-F),Math.max(0,l-y),Math.max(0,u-F),3):new O(t.left+y,t.top+t.height-F),this.topLeftContentBox=n>0||r>0?kA(t.left+y+K,t.top+E+x,Math.max(0,n-(y+K)),Math.max(0,r-(E+x)),0):new O(t.left+y+K,t.top+E+x),this.topRightContentBox=s>0||o>0?kA(t.left+Math.min(g,t.width+y+K),t.top+E+x,g>t.width+y+K?0:s-y+K,o-(E+x),1):new O(t.left+t.width-(v+R),t.top+E+x),this.bottomRightContentBox=a>0||i>0?kA(t.left+Math.min(Q,t.width-(y+K)),t.top+Math.min(m,t.height+E+x),Math.max(0,a-(v+R)),i-(F+I),2):new O(t.left+t.width-(v+R),t.top+t.height-(F+I)),this.bottomLeftContentBox=l>0||u>0?kA(t.left+y+K,t.top+U,Math.max(0,l-(y+K)),u-(F+I),3):new O(t.left+y+K,t.top+t.height-(F+I))}};const kA=(A,e,t,n,r)=>{const s=4*((Math.sqrt(2)-1)/3),o=t*s,a=n*s,i=A+t,l=e+n;switch(r){case 0:return new Io(new O(A,l),new O(A,l-a),new O(i-o,e),new O(i,e));case 1:return new Io(new O(A,e),new O(A+o,e),new O(i,l-a),new O(i,l));case 2:return new Io(new O(i,e),new O(i,e+a),new O(A+o,l),new O(A,l));default:return new Io(new O(i,l),new O(i-o,l),new O(A,e+a),new O(A,e))}},To=A=>[A.topLeftBorderBox,A.topRightBorderBox,A.bottomRightBorderBox,A.bottomLeftBorderBox],gF=A=>[A.topLeftContentBox,A.topRightContentBox,A.bottomRightContentBox,A.bottomLeftContentBox],Ho=A=>[A.topLeftPaddingBox,A.topRightPaddingBox,A.bottomRightPaddingBox,A.bottomLeftPaddingBox];var ec=class{constructor(A,e,t){this.offsetX=A,this.offsetY=e,this.matrix=t,this.type=0,this.target=6}},Lo=class{constructor(A,e){this.path=A,this.target=e,this.type=1}},BF=class{constructor(A){this.opacity=A,this.type=2,this.target=6}},Vr=class{constructor(A){this.applyClip=A,this.type=3,this.target=6}};const wF={[VA.NORMAL]:"source-over",[VA.MULTIPLY]:"multiply",[VA.SCREEN]:"screen",[VA.OVERLAY]:"overlay",[VA.DARKEN]:"darken",[VA.LIGHTEN]:"lighten",[VA.COLOR_DODGE]:"color-dodge",[VA.COLOR_BURN]:"color-burn",[VA.HARD_LIGHT]:"hard-light",[VA.SOFT_LIGHT]:"soft-light",[VA.DIFFERENCE]:"difference",[VA.EXCLUSION]:"exclusion",[VA.HUE]:"hue",[VA.SATURATION]:"saturation",[VA.COLOR]:"color",[VA.LUMINOSITY]:"luminosity"};var mF=class{constructor(A){this.mixBlendMode=A,this.type=4,this.target=6,this.compositeOperation=wF[A]}},CF=class mr{constructor(e){this.type=5,this.target=6;const t=mr.parseDropShadow(e);this.shadow=t.shadow,this.safeFilterString=t.safeFilterString}static parseDropShadow(e){if(!e)return{safeFilterString:""};const t=mr.findDropShadows(e);if(t.length===0)return{safeFilterString:e};const n=mr.parseDropShadowBody(t[0].body);let r="",s=0;for(const o of t)r+=e.slice(s,o.start),s=o.end;return r+=e.slice(s),{shadow:n,safeFilterString:r.replace(/\s+/g," ").trim()}}static findDropShadows(e){const t=[],n=/drop-shadow\(/gi;let r;for(;(r=n.exec(e))!==null;){const s=r.index+12-1,o=r.index;let a=1,i=s+1;for(;i<e.length&&a>0;){const u=e[i];u==="("?a++:u===")"&&a--,i++}if(a!==0)break;const l=e.slice(s+1,i-1);t.push({body:l,start:o,end:i})}return t}static parseDropShadowBody(e){var s;const t=mr.tokenizeFilterArgs(e.trim()),n=[];let r;for(const o of t)mr.isCSSLength(o)?n.push(parseFloat(o)):o&&(r=o);if(!(n.length<2||n.length>3))return{offsetX:n[0],offsetY:n[1],blur:(s=n[2])!=null?s:0,color:r!=null?r:"rgba(0,0,0,1)"}}static tokenizeFilterArgs(e){const t=[];let n="",r=0;for(let s=0;s<e.length;s++){const o=e[s];o==="("?(r++,n+=o):o===")"?(r--,n+=o):/\s/.test(o)?r>0?n+=o:n&&(t.push(n),n=""):n+=o}return n&&t.push(n),t}static isCSSLength(e){return/^-?[\d.]+(px|em|rem|pt|cm|mm|in|pc|ex|ch|vw|vh|vmin|vmax|%)?$/i.test(e)}};const Kp=A=>A.type===0,tc=A=>A.type===1,bF=A=>A.type===2,Np=A=>A.type===3,QF=A=>A.type===4,yF=A=>A.type===5;var zp=class{constructor(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}},$p=class{constructor(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new fF(this.container),this.container.styles.opacity<1&&this.effects.push(new BF(this.container.styles.opacity)),this.container.styles.rotate!==null){const t=this.container.styles.transformOrigin,n=this.container.bounds.left+J(t[0],this.container.bounds.width),r=this.container.bounds.top+J(t[1],this.container.bounds.height),s=this.container.styles.rotate*Math.PI/180,o=Math.cos(s),a=Math.sin(s),i=[o,a,-a,o,0,0];this.effects.push(new ec(n,r,i))}if(this.container.styles.transform!==null){const t=this.container.styles.transformOrigin,n=this.container.bounds.left+J(t[0],this.container.bounds.width),r=this.container.bounds.top+J(t[1],this.container.bounds.height),s=this.container.styles.transform;this.effects.push(new ec(n,r,s))}if(Gp(this.container.styles)){const t=To(this.curves),n=Ho(this.curves);Pp(t,n)?this.effects.push(new Lo(t,6)):(this.effects.push(new Lo(t,2)),this.effects.push(new Lo(n,4)))}if(this.container.styles.clipPath.type!==0){const t=UF(this.container.styles.clipPath,this.container.bounds);t&&this.effects.push(t)}if(this.container.styles.mixBlendMode!==VA.NORMAL&&this.effects.push(new mF(this.container.styles.mixBlendMode)),this.container.styles.filter!==null&&this.effects.push(new CF(this.container.styles.filter)),this.container.styles.zoom!==1){const t=this.container.styles.transformOrigin,n=this.container.bounds.left+J(t[0],this.container.bounds.width),r=this.container.bounds.top+J(t[1],this.container.bounds.height),s=this.container.styles.zoom,o=[s,0,0,s,0,0];this.effects.push(new ec(n,r,o))}}getEffects(A){let e=[2,3].indexOf(this.container.styles.position)===-1,t=this.parent;const n=this.effects.slice(0);for(;t;){const r=t.effects.filter(s=>!tc(s));if(e||t.container.styles.position!==0||!t.parent){if(e=[2,3].indexOf(t.container.styles.position)===-1,Gp(t.container.styles)){const s=To(t.curves),o=Ho(t.curves);Pp(s,o)||n.unshift(new Lo(o,6))}n.unshift(...r)}else n.unshift(...r);t=t.parent}return n.filter(r=>qA(r.target,A))}};const Gp=A=>A.overflowX!==0||A.overflowY!==0,Vp=(A,e,t,n,r)=>A==="closest-side"?Math.min(e-t,n-e):A==="farthest-side"?Math.max(e-t,n-e):J(A,r),UF=(A,e)=>{const{left:t,top:n,width:r,height:s}=e;switch(A.type){case 1:{const o=J(A.left,r),a=J(A.top,s),i=t+o,l=n+a,u=Math.max(0,r-o-J(A.right,r)),h=Math.max(0,s-a-J(A.bottom,s));return new Vr(f=>{f.beginPath(),f.rect(i,l,u,h),f.clip()})}case 2:{const o=t+J(A.cx,r),a=n+J(A.cy,s);let i;return A.radius==="closest-side"?i=Math.min(o-t,a-n,t+r-o,n+s-a):A.radius==="farthest-side"?i=Math.max(o-t,a-n,t+r-o,n+s-a):i=J(A.radius,Math.sqrt(r*r+s*s)/Math.SQRT2),new Vr(l=>{l.beginPath(),l.arc(o,a,Math.max(0,i),0,Math.PI*2),l.clip()})}case 3:{const o=t+J(A.cx,r),a=n+J(A.cy,s),i=Vp(A.rx,o,t,t+r,r),l=Vp(A.ry,a,n,n+s,s);return new Vr(u=>{u.beginPath(),u.ellipse(o,a,Math.max(0,i),Math.max(0,l),0,0,Math.PI*2),u.clip()})}case 4:{const o=A.points.map(([a,i])=>[t+J(a,r),n+J(i,s)]);return new Vr(a=>{if(a.beginPath(),o.length>0){a.moveTo(o[0][0],o[0][1]);for(let i=1;i<o.length;i++)a.lineTo(o[i][0],o[i][1]);a.closePath()}a.clip()})}case 5:{const{d:o}=A;let a=null;return new Vr(i=>{try{a||(a=new Path2D(o));const l=i.getTransform();i.translate(t,n),i.clip(a),i.setTransform(l)}catch(l){}})}case 0:return null;default:return null}},nc=(A,e,t,n)=>{A.container.elements.forEach(r=>{const s=r.createsRealStackingContext,o=r.createsStackingContext,a=new $p(r,A);qA(r.styles.display,2048)&&n.push(a);const i=r.isListOwner?[]:n;if(s||o){const l=s||r.styles.isPositioned()?t:e,u=new zp(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){const h=r.styles.zIndex.order;if(h<0){let f=0;l.negativeZIndex.some((g,m)=>h>g.element.container.styles.zIndex.order?(f=m,!1):f>0),l.negativeZIndex.splice(f,0,u)}else if(h>0){let f=0;l.positiveZIndex.some((g,m)=>h>=g.element.container.styles.zIndex.order?(f=m+1,!1):f>0),l.positiveZIndex.splice(f,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else r.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);nc(a,u,s?u:t,i)}else r.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),nc(a,e,t,i);r.isListOwner&&Zp(r,i)})},Zp=(A,e)=>{let t=A instanceof qa?A.start:1;const n=A instanceof qa?A.reversed:!1;for(let r=0;r<e.length;r++){const s=e[r];s.container instanceof Ip&&typeof s.container.value=="number"&&s.container.value!==0&&(t=s.container.value),s.listValue=zr(t,s.container.styles.listStyleType,!0),t+=n?-1:1}},EF=A=>{const e=new $p(A,null),t=new zp(e),n=[];return nc(e,t,t,n),Zp(e.container,n),t},rc=A=>{const e=A.bounds,t=A.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},Zr=A=>{const e=A.styles,t=A.bounds,n=J(e.paddingLeft,t.width),r=J(e.paddingRight,t.width),s=J(e.paddingTop,t.width),o=J(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,s+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+r),-(e.borderTopWidth+e.borderBottomWidth+s+o))},FF=(A,e)=>A===0?e.bounds:A===2?Zr(e):rc(e),kF=(A,e)=>A===0?e.bounds:A===2?Zr(e):rc(e),Do=(A,e,t)=>{const n=FF(dn(A.styles.backgroundOrigin,e),A),r=kF(dn(A.styles.backgroundClip,e),A),s=vF(dn(A.styles.backgroundSize,e),t,n);let[o,a]=s;const i=Mr(dn(A.styles.backgroundPosition,e),n.width-o,n.height-a),l=_F(dn(A.styles.backgroundRepeat,e),i,s,n,r),u=Math.round(n.left+i[0]),h=Math.round(n.top+i[1]);return o=Math.max(1,o),a=Math.max(1,a),[l,u,h,o,a]},Yn=A=>j(A)&&A.value==="auto",Ro=A=>typeof A=="number",vF=(A,[e,t,n],r)=>{const[s,o]=A;if(!s)return[0,0];if(iA(s)&&o&&iA(o))return[J(s,r.width),J(o,r.height)];const a=Ro(n);if(j(s)&&(s.value==="contain"||s.value==="cover"))return Ro(n)?r.width/r.height<n!=(s.value==="cover")?[r.width,r.width/n]:[r.height*n,r.height]:[r.width,r.height];const i=Ro(e),l=Ro(t),u=i||l;if(Yn(s)&&(!o||Yn(o)))return i&&l?[e,t]:!a&&!u?[r.width,r.height]:u&&a?[i?e:t*n,l?t:e/n]:[i?e:r.width,l?t:r.height];if(a){let g=0,m=0;return iA(s)?g=J(s,r.width):iA(o)&&(m=J(o,r.height)),Yn(s)?g=m*n:(!o||Yn(o))&&(m=g/n),[g,m]}let h=null,f=null;if(iA(s)?h=J(s,r.width):o&&iA(o)&&(f=J(o,r.height)),h!==null&&(!o||Yn(o))&&(f=i&&l?h/e*t:r.height),f!==null&&Yn(s)&&(h=i&&l?f/t*e:r.width),h!==null&&f!==null)return[h,f];throw new Error("Unable to calculate background-size for element")},dn=(A,e)=>{const t=A[e];return typeof t=="undefined"?A[0]:t},_F=(A,[e,t],[n,r],s,o)=>{switch(A){case 2:return[new O(Math.round(s.left),Math.round(s.top+t)),new O(Math.round(s.left+s.width),Math.round(s.top+t)),new O(Math.round(s.left+s.width),Math.round(r+s.top+t)),new O(Math.round(s.left),Math.round(r+s.top+t))];case 3:return[new O(Math.round(s.left+e),Math.round(s.top)),new O(Math.round(s.left+e+n),Math.round(s.top)),new O(Math.round(s.left+e+n),Math.round(s.height+s.top)),new O(Math.round(s.left+e),Math.round(s.height+s.top))];case 1:return[new O(Math.round(s.left+e),Math.round(s.top+t)),new O(Math.round(s.left+e+n),Math.round(s.top+t)),new O(Math.round(s.left+e+n),Math.round(s.top+t+r)),new O(Math.round(s.left+e),Math.round(s.top+t+r))];default:return[new O(Math.round(o.left),Math.round(o.top)),new O(Math.round(o.left+o.width),Math.round(o.top)),new O(Math.round(o.left+o.width),Math.round(o.height+o.top)),new O(Math.round(o.left),Math.round(o.height+o.top))]}};var xF=class{constructor(A){this.ctx=A}render(A,e){this.ctx.fillStyle=FA(e.textDecorationColor||e.color);let t=1;typeof e.textDecorationThickness=="number"?t=e.textDecorationThickness:e.textDecorationThickness==="from-font"&&(t=Math.max(1,Math.floor(e.fontSize.number*.05)));let n=0;typeof e.textUnderlineOffset=="number"&&(n=e.textUnderlineOffset);const r=e.textDecorationStyle;e.textDecorationLine.forEach(s=>{let o=0;switch(s){case 1:o=A.top+A.height-t+n;break;case 2:o=A.top;break;case 3:o=A.top+(A.height/2-t/2);break;default:return}this.draw(A.left,o,A.width,t,r)})}draw(A,e,t,n,r){switch(r){case 0:this.ctx.fillRect(A,e,t,n);break;case 1:{const s=Math.max(1,n);this.ctx.fillRect(A,e,t,n),this.ctx.fillRect(A,e+n+s,t,n);break}case 2:this.drawPattern(A,e,t,n,[n,n*2]);break;case 3:this.drawPattern(A,e,t,n,[n*3,n*2]);break;case 4:this.drawWavy(A,e,t,n);break;default:this.ctx.fillRect(A,e,t,n)}}drawPattern(A,e,t,n,r){this.ctx.save(),this.ctx.beginPath(),this.ctx.setLineDash(r),this.ctx.lineWidth=n,this.ctx.strokeStyle=this.ctx.fillStyle,this.ctx.moveTo(A,e+n/2),this.ctx.lineTo(A+t,e+n/2),this.ctx.stroke(),this.ctx.restore()}drawWavy(A,e,t,n){this.ctx.save(),this.ctx.beginPath(),this.ctx.lineWidth=n,this.ctx.strokeStyle=this.ctx.fillStyle;const r=n*2,s=n*4;let o=A;for(this.ctx.moveTo(o,e+n/2);o<A+t;){const a=Math.min(o+s/2,A+t);if(this.ctx.quadraticCurveTo(o+s/4,e+n/2-r,a,e+n/2),o=a,o<A+t){const i=Math.min(o+s/2,A+t);this.ctx.quadraticCurveTo(o+s/4,e+n/2+r,i,e+n/2),o=i}}this.ctx.stroke(),this.ctx.restore()}};const SF="Mg",qn=A=>A!==void 0&&!Number.isNaN(A),Xp=(A,e)=>{const t=A.measureText(SF),n=t;return{baseline:qn(n.fontBoundingBoxAscent)?n.fontBoundingBoxAscent:qn(t.actualBoundingBoxAscent)?t.actualBoundingBoxAscent:e,height:qn(n.fontBoundingBoxAscent)&&qn(n.fontBoundingBoxDescent)?n.fontBoundingBoxAscent+n.fontBoundingBoxDescent:qn(t.actualBoundingBoxAscent)&&qn(t.actualBoundingBoxDescent)?t.actualBoundingBoxAscent+t.actualBoundingBoxDescent:e}},Wp=(A,e)=>Xp(A,e).baseline,IF=["-apple-system","system-ui"],TF=1,HF=/[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/,Xr=A=>HF.test(A),LF=()=>{if(typeof navigator=="undefined")return null;const A=navigator.userAgent,e=/iPhone|iPad|iPod/.test(A),t=/Macintosh/.test(A)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>1;if(!e&&!t)return null;for(const n of[/(?:iPhone|CPU(?:\siPhone)?)\sOS\s(\d+)[\._](\d+)/,/Version\/(\d+)\.(\d+)/]){const r=A.match(n);if(r&&r[1])return parseInt(r[1],10)}return null},DF=A=>{const e=LF();return e!==null&&e>=15&&e<17?A.map(t=>IF.indexOf(t)!==-1?'-apple-system, "Helvetica Neue", Arial, sans-serif':t):A},RF=()=>{var A;return(A=typeof window!="undefined"?window:void 0)!=null&&A.chrome?"miter":"round"};var OF=class{constructor(A){this.glyphWidthCache=null,this.ctx=A.ctx,this.options=A.options,this.decorationRenderer=new xF(A.ctx)}cachedMeasureText(A,e){let t=this.glyphWidthCache;t||(t=new Map,this.glyphWidthCache=t);const n=A+e;let r=t.get(n);return r===void 0&&(r=this.ctx.measureText(A).width,t.set(n,r)),r}iterateLettersWithLetterSpacing(A,e,t,n,r){if(_o(n)){this.iterateVerticalGlyphs(A,e,t,n,r);return}const s=un(A.text),o=A.bounds.top+t,a=this.ctx.font;let i=A.bounds.left;for(const l of s){if(Xr(l)){const u=this.ctx.textBaseline;this.ctx.textBaseline="ideographic",r(l,i,o),this.ctx.textBaseline=u}else r(l,i,o);i+=this.cachedMeasureText(l,a)+e}}iterateVerticalGlyphs(A,e,t,n,r){const s=un(A.text),o=this.ctx.font,a=n===4?-Math.PI/2:Math.PI/2;let i=A.bounds.top;for(let l=0;l<s.length;){const u=s[l];if(!(Da(n)||!Xr(u)&&u.trim().length>0)){const g=this.ctx.textBaseline;Xr(u)&&(this.ctx.textBaseline="ideographic"),r(u,A.bounds.left,i+t),this.ctx.textBaseline=g,i+=this.cachedMeasureText(u,o)+e,l++;continue}const h=l;for(;l<s.length;){const g=s[l];if(!Da(n)&&!Xr(g)&&g.trim().length===0)break;if(Da(n)||!Xr(g)&&g.trim().length>0)l++;else break}this.ctx.save(),this.ctx.translate(A.bounds.left+t,i),this.ctx.rotate(a);let f=0;for(let g=h;g<l;g++)r(s[g],0,f),f+=this.cachedMeasureText(s[g],o)+e;this.ctx.restore(),i+=f}}renderTextWithLetterSpacing(A,e,t,n=0){this.renderFillText(A,e,t,n)}canRenderWholeText(A,e){return A===0&&!_o(e)}renderFillText(A,e,t,n){this.canRenderWholeText(e,n)?this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+t):this.iterateLettersWithLetterSpacing(A,e,t,n,(r,s,o)=>{this.ctx.fillText(r,s,o)})}renderStrokeText(A,e,t,n){this.canRenderWholeText(e,n)?this.ctx.strokeText(A.text,A.bounds.left,A.bounds.top+t):this.iterateLettersWithLetterSpacing(A,e,t,n,(r,s,o)=>{this.ctx.strokeText(r,s,o)})}renderTextStrokeWithStyle(A,e,t){!e.webkitTextStrokeWidth||!A.text.trim().length||(this.ctx.strokeStyle=FA(e.webkitTextStrokeColor),this.ctx.lineWidth=e.webkitTextStrokeWidth,this.ctx.lineJoin=RF(),this.renderStrokeText(A,e.letterSpacing,t,e.writingMode),this.ctx.strokeStyle="",this.ctx.lineWidth=0,this.ctx.lineJoin="miter")}renderTextFillWithShadows(A,e,t){this.ctx.fillStyle=FA(e.color),this.renderTextWithLetterSpacing(A,e.letterSpacing,t,e.writingMode);const n=e.textShadow;n.length&&A.text.trim().length&&(n.slice(0).reverse().forEach(r=>{this.ctx.shadowColor=FA(r.color),this.ctx.shadowOffsetX=r.offsetX.number*this.options.scale,this.ctx.shadowOffsetY=r.offsetY.number*this.options.scale,this.ctx.shadowBlur=r.blur.number,this.renderTextWithLetterSpacing(A,e.letterSpacing,t,e.writingMode)}),this.ctx.shadowColor="",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0)}renderTextBoundWithPaintOrder(A,e,t,n){t.forEach(r=>{switch(r){case 0:this.ctx.fillStyle=FA(e.color),this.renderTextWithLetterSpacing(A,e.letterSpacing,n,e.writingMode);break;case 1:this.renderTextStrokeWithStyle(A,e,n);break}})}renderTextDecoration(A,e){this.decorationRenderer.render(A,e)}truncateTextWithEllipsis(A,e,t){const r=this.ctx.measureText("…").width,s=un(A);if(t===0){const o=l=>this.ctx.measureText(s.slice(0,l).join("")).width+r<=e;let a=0,i=s.length;for(;a<i;){const l=a+i+1>>1;o(l)?a=l:i=l-1}return s.slice(0,a).join("")+"…"}else{const o=this.ctx.font;let a=r;const i=[];for(const l of s){const u=this.cachedMeasureText(l,o);if(a+u>e)break;i.push(l),a+=u+t}return i.join("")+"…"}}createFontStyle(A){const e=A.fontVariant.filter(r=>r==="normal"||r==="small-caps").join(""),t=DF(A.fontFamily).join(", "),n=ot(A.fontSize)?`${A.fontSize.number}${A.fontSize.unit}`:`${A.fontSize.number}px`;return[[A.fontStyle,e,A.fontWeight,n,t].join(" "),t,n]}renderLineClampedText(A,e,t,n,r){const s=e.fontSize.number*1.5,o=[];let a=[],i=A.textBounds[0].bounds.top;A.textBounds.forEach(h=>{Math.abs(h.bounds.top-i)>=s*.5?(a.length>0&&o.push(a),a=[h],i=h.bounds.top):a.push(h)}),a.length>0&&o.push(a);const l=e.webkitLineClamp;if(o.length<=l)return!1;for(let h=0;h<l-1;h++)o[h].forEach(f=>this.renderTextBoundWithPaintOrder(f,e,t,n));const u=o[l-1];if(u!=null&&u.length&&r){const h=u.map(Q=>Q.text).join(""),f=u[0],g=r.width-(f.bounds.left-r.left),m=new ln(this.truncateTextWithEllipsis(h,g,e.letterSpacing),f.bounds);for(const Q of t)Q===0?(this.ctx.fillStyle=FA(e.color),this.renderTextWithLetterSpacing(m,e.letterSpacing,n,e.writingMode)):Q===1&&this.renderTextStrokeWithStyle(m,e,n)}return!0}renderEllipsisText(A,e,t,n,r){const s=e.fontSize.number*1.5,o=A.textBounds[0].bounds.top;if(!A.textBounds.every(l=>Math.abs(l.bounds.top-o)<s*.5))return!1;let a=A.textBounds.map(l=>l.text).join("").replace(/\s+/g," ").trim();if(this.ctx.measureText(a).width<=r.width+TF)return!1;const i=new ln(this.truncateTextWithEllipsis(a,r.width,e.letterSpacing),A.textBounds[0].bounds);for(const l of t)l===0?this.renderTextFillWithShadows(i,e,n):l===1&&this.renderTextStrokeWithStyle(i,e,n);return!0}renderTextNode(A,e,t){return T(this,null,function*(){this.glyphWidthCache=null;const[n]=this.createFontStyle(e);this.ctx.font=n,this.ctx.direction=e.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic";const r=e.paintOrder,s=Wp(this.ctx,e.fontSize.number);e.webkitLineClamp>0&&(e.display&2)!==0&&e.overflowY===1&&A.textBounds.length>0&&this.renderLineClampedText(A,e,r,s,t)||e.textOverflow===1&&t&&e.overflowX===1&&A.textBounds.length>0&&this.renderEllipsisText(A,e,r,s,t)||A.textBounds.forEach(o=>{r.forEach(a=>{a===0?(this.renderTextFillWithShadows(o,e,s),e.textDecorationLine.length&&this.renderTextDecoration(o.bounds,e)):a===1&&this.renderTextStrokeWithStyle(o,e,s)})})})}};const Jp=(A,e)=>{e.forEach((t,n)=>{const r=xe(t)?t.start:t;n===0?A.moveTo(r.x,r.y):A.lineTo(r.x,r.y),xe(t)&&A.bezierCurveTo(t.startControl.x,t.startControl.y,t.endControl.x,t.endControl.y,t.end.x,t.end.y)})},jp=(A,e)=>{A.beginPath(),Jp(A,e),A.closePath()};var MF=class{constructor(A){this.maxSize=A,this._map=new Map}get(A){if(!this._map.has(A))return;const e=this._map.get(A);return this._map.delete(A),this._map.set(A,e),e}set(A,e){if(this._map.has(A))this._map.delete(A);else if(this._map.size>=this.maxSize){const t=this._map.keys().next().value;t!==void 0&&this._map.delete(t)}this._map.set(A,e)}get size(){return this._map.size}clear(){this._map.clear()}},Yp=class{constructor(A){this.patternCache=new MF(50),this.ctx=A.ctx,this.context=A.context,this.canvas=A.canvas}renderBackgroundImage(A){return T(this,null,function*(){var r,s,o,a;let e=A.styles.backgroundImage.length-1;const t=A.styles.backgroundBlendMode;let n=0;for(const i of A.styles.backgroundImage.slice(0).reverse()){if(n>0){const l=(s=(r=t[n])!=null?r:t[0])!=null?s:"normal";l!=="normal"&&(this.ctx.save(),this.ctx.globalCompositeOperation=l)}i.type===0?yield this.renderBackgroundURLImage(A,i,e):qy(i)?this.renderLinearGradient(A,i,e):e0(i)?this.renderRepeatingLinearGradient(A,i,e):A0(i)&&this.renderRadialGradient(A,i,e),n>0&&((a=(o=t[n])!=null?o:t[0])!=null?a:"normal")!=="normal"&&this.ctx.restore(),e--,n++}})}renderBackgroundURLImage(A,e,t){return T(this,null,function*(){var s,o;let n;const r=e.url;try{n=yield this.context.cache.match(r)}catch(a){this.context.logger.error(`Error loading background-image ${r}`),(o=(s=this.context).onError)==null||o.call(s,a instanceof Error?a:new Error(String(a)))}if(n){const a=isNaN(n.width)||n.width===0?1:n.width,i=isNaN(n.height)||n.height===0?1:n.height,[l,u,h,f,g]=Do(A,t,[a,i,a/i]),m=dn(A.styles.backgroundRepeat,t),Q=m===1?"no-repeat":m===2?"repeat-x":m===3?"repeat-y":"repeat",U=`${r}|${Math.round(f)}x${Math.round(g)}|${A.styles.imageRendering}|${Q}`;let E=this.patternCache.get(U);if(!E){const v=this.resizeImage(n,f,g,A.styles.imageRendering);E=this.ctx.createPattern(v,Q),this.patternCache.set(U,E)}this.renderRepeat(l,E,u,h)}})}renderRepeatingLinearGradient(A,e,t){var X;const[n,r,s,o,a]=Do(A,t,[null,null,null]),[i,l,u,h,f]=$d(e.angle,o,a),g=Ia(e.stops,i||1),m=g[g.length-1],Q=g[0],U=m.stop-Q.stop;if(U<=0){this.renderLinearGradient(A,e,t);return}const E=u-l,v=f-h,F=U/(Math.sqrt(E*E+v*v)||1),y=l,x=h,R=l+E*F,I=h+v*F,K=(X=this.canvas.ownerDocument)!=null?X:document,N=`rlg|${e.angle}|${Math.round(U)}|${JSON.stringify(e.stops)}`;let Z=this.patternCache.get(N);if(!Z){const aA=K.createElement("canvas"),fA=Math.max(1,Math.ceil(U));aA.width=fA,aA.height=fA;const PA=aA.getContext("2d");if(!PA)return;const Ce=PA.createLinearGradient(y-r,x-s,R-r,I-s);g.forEach(pe=>{Ce.addColorStop((pe.stop-Q.stop)/U,FA(pe.color))}),PA.fillStyle=Ce,PA.fillRect(0,0,fA,fA),fA>0&&(Z=this.ctx.createPattern(aA,"repeat"),this.patternCache.set(N,Z))}Z&&this.renderRepeat(n,Z,r,s)}renderLinearGradient(A,e,t){var Q;const[n,r,s,o,a]=Do(A,t,[null,null,null]),[i,l,u,h,f]=$d(e.angle,o,a),g=`lg|${e.angle}|${Math.round(o)}x${Math.round(a)}|${JSON.stringify(e.stops)}`;let m=this.patternCache.get(g);if(!m){const U=((Q=this.canvas.ownerDocument)!=null?Q:document).createElement("canvas");U.width=o,U.height=a;const E=U.getContext("2d");if(!E)return;const v=E.createLinearGradient(l,h,u,f);Ia(e.stops,i||1).forEach(F=>v.addColorStop(F.stop,FA(F.color))),E.fillStyle=v,E.fillRect(0,0,o,a),o>0&&a>0&&(m=this.ctx.createPattern(U,"repeat"),this.patternCache.set(g,m))}m&&this.renderRepeat(n,m,r,s)}renderRadialGradient(A,e,t){var g;const[n,r,s,o,a]=Do(A,t,[null,null,null]),i=e.position.length===0?[Ct]:e.position,l=J(i[0],o),u=J(i[i.length-1],a);let[h,f]=Jy(e,l,u,o,a);if((h===0||f===0)&&(h=Math.max(h,.01),f=Math.max(f,.01)),h>0&&f>0){const m=`rg|${Math.round(l)}x${Math.round(u)}|${Math.round(h)}x${Math.round(f)}|${JSON.stringify(e.stops)}`,Q=Ia(e.stops,h*2),U=Q[Q.length-1];let E=this.patternCache.get(m);if(!E){const v=((g=this.canvas.ownerDocument)!=null?g:document).createElement("canvas");v.width=Math.ceil(h*2),v.height=Math.ceil(f*2);const F=v.getContext("2d");if(F){const y=F.createRadialGradient(h,h,0,h,h,h);Q.forEach(x=>y.addColorStop(x.stop,FA(x.color))),F.fillStyle=y,h!==f&&F.scale(1,f/h),F.fillRect(0,0,h*2,h*2),E=this.ctx.createPattern(v,"no-repeat"),this.patternCache.set(m,E)}}E&&(this.path(n),this.ctx.save(),this.ctx.clip(),U&&(this.ctx.fillStyle=FA(U.color),this.ctx.fill()),this.ctx.translate(r+l-h,s+u-f),this.ctx.fillStyle=E,this.ctx.fillRect(0,0,h*2,f*2),this.ctx.restore())}}renderRepeat(A,e,t,n){this.path(A),this.ctx.fillStyle=e,this.ctx.translate(t,n),this.ctx.fill(),this.ctx.translate(-t,-n)}resizeImage(A,e,t,n){var o;const r=((o=this.canvas.ownerDocument)!=null?o:document).createElement("canvas");r.width=Math.max(1,e),r.height=Math.max(1,t);const s=r.getContext("2d");return s?(n===2||n===1?(this.context.logger.debug("Disabling image smoothing for background image due to CSS image-rendering"),s.imageSmoothingEnabled=!1):n===3?(this.context.logger.debug("Enabling image smoothing for background image due to CSS image-rendering: smooth"),s.imageSmoothingEnabled=!0):s.imageSmoothingEnabled=this.ctx.imageSmoothingEnabled,this.ctx.imageSmoothingQuality&&(s.imageSmoothingQuality=this.ctx.imageSmoothingQuality),s.drawImage(A,0,0,A.width,A.height,0,0,e,t),r):A}path(A){jp(this.ctx,A)}};const qp=(A,e)=>{switch(e){case 0:return Se(A.topLeftBorderBox,A.topLeftPaddingBox,A.topRightBorderBox,A.topRightPaddingBox);case 1:return Se(A.topRightBorderBox,A.topRightPaddingBox,A.bottomRightBorderBox,A.bottomRightPaddingBox);case 2:return Se(A.bottomRightBorderBox,A.bottomRightPaddingBox,A.bottomLeftBorderBox,A.bottomLeftPaddingBox);default:return Se(A.bottomLeftBorderBox,A.bottomLeftPaddingBox,A.topLeftBorderBox,A.topLeftPaddingBox)}},PF=(A,e)=>{switch(e){case 0:return Se(A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox,A.topRightBorderBox,A.topRightBorderDoubleOuterBox);case 1:return Se(A.topRightBorderBox,A.topRightBorderDoubleOuterBox,A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox);case 2:return Se(A.bottomRightBorderBox,A.bottomRightBorderDoubleOuterBox,A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox);default:return Se(A.bottomLeftBorderBox,A.bottomLeftBorderDoubleOuterBox,A.topLeftBorderBox,A.topLeftBorderDoubleOuterBox)}},KF=(A,e)=>{switch(e){case 0:return Se(A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox,A.topRightBorderDoubleInnerBox,A.topRightPaddingBox);case 1:return Se(A.topRightBorderDoubleInnerBox,A.topRightPaddingBox,A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox);case 2:return Se(A.bottomRightBorderDoubleInnerBox,A.bottomRightPaddingBox,A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox);default:return Se(A.bottomLeftBorderDoubleInnerBox,A.bottomLeftPaddingBox,A.topLeftBorderDoubleInnerBox,A.topLeftPaddingBox)}},NF=(A,e)=>{switch(e){case 0:return Oo(A.topLeftBorderStroke,A.topRightBorderStroke);case 1:return Oo(A.topRightBorderStroke,A.bottomRightBorderStroke);case 2:return Oo(A.bottomRightBorderStroke,A.bottomLeftBorderStroke);default:return Oo(A.bottomLeftBorderStroke,A.topLeftBorderStroke)}},Oo=(A,e)=>{const t=[];return xe(A)?t.push(A.subdivide(.5,!1)):t.push(A),xe(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Se=(A,e,t,n)=>{const r=[];return xe(A)?r.push(A.subdivide(.5,!1)):r.push(A),xe(t)?r.push(t.subdivide(.5,!0)):r.push(t),xe(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),xe(e)?r.push(e.subdivide(.5,!1).reverse()):r.push(e),r};var zF=class{constructor(A,e){this.ctx=A.ctx,this.pathCallbacks=e}renderSolidBorder(A,e,t){return T(this,null,function*(){this.pathCallbacks.path(qp(t,e)),this.ctx.fillStyle=FA(A),this.ctx.fill()})}renderDoubleBorder(A,e,t,n){return T(this,null,function*(){if(e<3){yield this.renderSolidBorder(A,t,n);return}const r=PF(n,t);this.pathCallbacks.path(r),this.ctx.fillStyle=FA(A),this.ctx.fill();const s=KF(n,t);this.pathCallbacks.path(s),this.ctx.fill()})}renderDashedDottedBorder(A,e,t,n,r){return T(this,null,function*(){this.ctx.save();const s=NF(n,t),o=qp(n,t);r===2&&(this.pathCallbacks.path(o),this.ctx.clip());let a,i,l,u;xe(o[0])?(a=o[0].start.x,i=o[0].start.y):(a=o[0].x,i=o[0].y),xe(o[1])?(l=o[1].end.x,u=o[1].end.y):(l=o[1].x,u=o[1].y);let h;t===0||t===2?h=Math.abs(a-l):h=Math.abs(i-u),this.ctx.beginPath(),r===3?this.pathCallbacks.formatPath(s):this.pathCallbacks.formatPath(o.slice(0,2));let f=e<3?e*3:e*2,g=e<3?e*2:e;r===3&&(f=e,g=e);let m=!0;if(h<=f*2)m=!1;else if(h<=f*2+g){const Q=h/(2*f+g);f*=Q,g*=Q}else{const Q=Math.floor((h+g)/(f+g)),U=(h-Q*f)/(Q-1),E=(h-(Q+1)*f)/Q;g=E<=0||Math.abs(g-U)<Math.abs(g-E)?U:E}if(m&&(r===3?this.ctx.setLineDash([0,f+g]):this.ctx.setLineDash([f,g])),r===3?(this.ctx.lineCap="round",this.ctx.lineWidth=e):this.ctx.lineWidth=e*2+1.1,this.ctx.strokeStyle=FA(A),this.ctx.stroke(),this.ctx.setLineDash([]),r===2){if(xe(o[0])){const Q=o[3],U=o[0];this.ctx.beginPath(),this.pathCallbacks.formatPath([new O(Q.end.x,Q.end.y),new O(U.start.x,U.start.y)]),this.ctx.stroke()}if(xe(o[1])){const Q=o[1],U=o[2];this.ctx.beginPath(),this.pathCallbacks.formatPath([new O(Q.end.x,Q.end.y),new O(U.start.x,U.start.y)]),this.ctx.stroke()}}this.ctx.restore()})}},$F=class{constructor(A){this.ctx=A}renderBorderImage(A,e,t,n,r,s,o,a){const i=e.naturalWidth||e.width,l=e.naturalHeight||e.height;if(i<=0||l<=0)return;const u=Math.min(t.unit==="percent"?t.top/100*l:Math.min(t.top,l),l),h=Math.min(t.unit==="percent"?t.right/100*i:Math.min(t.right,i),i),f=Math.min(t.unit==="percent"?t.bottom/100*l:Math.min(t.bottom,l),l),g=Math.min(t.unit==="percent"?t.left/100*i:Math.min(t.left,i),i),{left:m,top:Q,width:U,height:E}=A;if(U<=0||E<=0)return;const v=Math.min(r,E),F=Math.min(s,U),y=Math.min(o,E-v),x=Math.min(a,U-F);this.drawRegion(e,0,0,g,u,m,Q,x,v),this.drawRegion(e,i-h,0,h,u,m+U-F,Q,F,v),this.drawRegion(e,i-h,l-f,h,f,m+U-F,Q+E-y,F,y),this.drawRegion(e,0,l-f,g,f,m,Q+E-y,x,y);const R=[{sx:g,sy:0,sw:i-g-h,sh:u,dx:m+x,dy:Q,dw:U-x-F,dh:v,repeat:n.horizontal},{sx:i-h,sy:u,sw:h,sh:l-u-f,dx:m+U-F,dy:Q+v,dw:F,dh:E-v-y,repeat:n.vertical},{sx:g,sy:l-f,sw:i-g-h,sh:f,dx:m+x,dy:Q+E-y,dw:U-x-F,dh:y,repeat:n.horizontal},{sx:0,sy:u,sw:g,sh:l-u-f,dx:m,dy:Q+v,dw:x,dh:E-v-y,repeat:n.vertical}];for(const I of R){if(I.sw<=0||I.sh<=0||I.dw<=0||I.dh<=0)continue;const K=I.dw>=I.dh;I.repeat===0?this.ctx.drawImage(e,I.sx,I.sy,I.sw,I.sh,I.dx,I.dy,I.dw,I.dh):(I.repeat===1||I.repeat===2)&&this.drawRepeatedEdge(e,I,K,I.repeat===2)}if(t.fill){const I=g,K=u,N=i-g-h,Z=l-u-f,X=m+x,aA=Q+v,fA=U-x-F,PA=E-v-y;this.drawRegion(e,I,K,N,Z,X,aA,fA,PA)}}drawRegion(A,e,t,n,r,s,o,a,i){n>0&&r>0&&a>0&&i>0&&this.ctx.drawImage(A,e,t,n,r,s,o,a,i)}drawRepeatedEdge(A,e,t,n){const r=t?e.sw:e.sh,s=t?e.dw:e.dh;if(r<=0||s<=0)return;let o,a;n?(a=Math.max(1,Math.round(s/r)),o=s/a):(o=r,a=Math.ceil(s/o)),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(e.dx,e.dy,e.dw,e.dh),this.ctx.clip();for(let i=0;i<a;i++){const l=i*o,u=s-l,h=Math.min(o,u);if(h<=0)break;t?this.ctx.drawImage(A,e.sx,e.sy,e.sw,e.sh,e.dx+l,e.dy,h,e.dh):this.ctx.drawImage(A,e.sx,e.sy,e.sw,e.sh,e.dx,e.dy+l,e.dw,h)}this.ctx.restore()}},GF=class{constructor(A,e){this.activeEffects=[],this.didSave=!1,this.saveAtDepth=-1,this.ctx=A.ctx,this.pathCallback=e}applyEffects(A){for(;this.activeEffects.length;)this.popEffect();this.didSave=!1,this.saveAtDepth=-1;const e=n=>Kp(n)||tc(n)||Np(n),t=A.reduceRight((n,r,s)=>n!==-1?n:e(r)?s:-1,-1);for(let n=0;n<A.length;n++){const r=A[n];e(r)&&(this.didSave||(this.ctx.save(),this.didSave=!0),n===t&&(this.saveAtDepth=this.activeEffects.length)),this.applyEffect(r)}}applyEffect(A){Kp(A)?(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)):tc(A)?(this.pathCallback.path(A.path),this.ctx.clip()):Np(A)?A.applyClip(this.ctx):bF(A)?this.ctx.globalAlpha*=A.opacity:QF(A)?this.ctx.globalCompositeOperation=A.compositeOperation:yF(A)&&(this.ctx.filter=A.safeFilterString||"none",A.shadow&&(this.ctx.shadowOffsetX=A.shadow.offsetX,this.ctx.shadowOffsetY=A.shadow.offsetY,this.ctx.shadowBlur=A.shadow.blur,this.ctx.shadowColor=A.shadow.color)),this.activeEffects.push(A)}popEffect(){this.activeEffects.length!==0&&(this.didSave&&this.activeEffects.length-1===this.saveAtDepth&&(this.ctx.restore(),this.didSave=!1,this.saveAtDepth=-1),this.activeEffects.pop(),!this.didSave&&this.activeEffects.length===0&&(this.ctx.globalAlpha=1,this.ctx.globalCompositeOperation="source-over",this.ctx.filter="none",this.ctx.shadowOffsetX=0,this.ctx.shadowOffsetY=0,this.ctx.shadowBlur=0,this.ctx.shadowColor="rgba(0, 0, 0, 0)"))}getActiveEffectCount(){return this.activeEffects.length}hasActiveEffects(){return this.activeEffects.length>0}};const VF=(A,e,t,n,r)=>{let s=0,o=0,a=A,i=e,l=t.left,u=t.top,h=t.width,f=t.height;const g=h/f,m=a/i,Q=r?J(r[0],1):.5,U=r?J(r[1],1):.5;return n===2?m>g?(f=h/m,u+=(t.height-f)*U):(h=f*m,l+=(t.width-h)*Q):n===4?m>g?(a=i*g,s+=(A-a)*Q):(i=a/g,o+=(e-i)*U):n===8?(a>h?(s+=(a-h)*Q,a=h):(l+=(h-a)*Q,h=a),i>f?(o+=(i-f)*U,i=f):(u+=(f-i)*U,f=i)):n===16&&((m>g?h:f*m)<(a>h?a:h)?m>g?(f=h/m,u+=(t.height-f)*U):(h=f*m,l+=(t.width-h)*Q):(a>h?(s+=(a-h)*Q,a=h):(l+=(h-a)*Q,h=a),i>f?(o+=(i-f)*U,i=f):(u+=(f-i)*U,f=i))),{sx:s,sy:o,sw:a,sh:i,dx:l,dy:u,dw:h,dh:f}};function ZF(A,e,t,n,r,s,o,a){return T(this,null,function*(){var i,l;if(r instanceof _p)try{const u=yield e.cache.match(r.src),h=A.imageSmoothingEnabled;o.imageRendering===2||o.imageRendering===1?A.imageSmoothingEnabled=!1:o.imageRendering===3&&(A.imageSmoothingEnabled=!0),a(r,s,u),A.imageSmoothingEnabled=h}catch(u){e.logger.error(`Error loading image ${r.src}`),(i=e.onError)==null||i.call(e,u instanceof Error?u:new Error(String(u)))}if(r instanceof xp&&a(r,s,r.canvas),r instanceof Sp)try{a(r,s,yield e.cache.match(r.svg))}catch(u){e.logger.error(`Error loading svg ${r.svg.substring(0,255)}`),(l=e.onError)==null||l.call(e,u instanceof Error?u:new Error(String(u)))}if(r instanceof Dp&&r.tree){const u=yield n(e,{scale:t.scale,backgroundColor:r.backgroundColor,x:0,y:0,width:r.width,height:r.height}).render(r.tree);r.width&&r.height&&A.drawImage(u,0,0,r.width,r.height,r.bounds.left,r.bounds.top,r.bounds.width,r.bounds.height)}})}function XF(A,e,t,n,r){if(n instanceof Jn){const s=Math.min(n.bounds.width,n.bounds.height);n.type==="checkbox"&&n.checked?(A.save(),t([new O(n.bounds.left+s*.39363,n.bounds.top+s*.79),new O(n.bounds.left+s*.16,n.bounds.top+s*.5549),new O(n.bounds.left+s*.27347,n.bounds.top+s*.44071),new O(n.bounds.left+s*.39694,n.bounds.top+s*.5649),new O(n.bounds.left+s*.72983,n.bounds.top+s*.23),new O(n.bounds.left+s*.84,n.bounds.top+s*.34085),new O(n.bounds.left+s*.39363,n.bounds.top+s*.79)]),A.fillStyle=FA(Tp),A.fill(),A.restore()):n.type==="radio"&&n.checked&&(A.save(),A.beginPath(),A.arc(n.bounds.left+s/2,n.bounds.top+s/2,s/4,0,Math.PI*2,!0),A.fillStyle=FA(Tp),A.fill(),A.restore())}if(YF(n)&&n.value.length){const[s]=e.createFontStyle(r);A.font=s;const o=J(r.fontSize,0),{baseline:a,height:i}=Xp(A,o);A.fillStyle=n instanceof Jn&&n.isPlaceholder?FA(lF):FA(r.color),A.textBaseline="alphabetic",A.textAlign=qF(n.styles.textAlign);const l=Zr(n),u=n instanceof Jn?WF(l,rc(n),i):l;let h=0;switch(n.styles.textAlign){case 1:h+=l.width/2;break;case 2:h+=l.width;break}let f=0;n instanceof Jn&&(f=(l.height-i)/2);const g=l.add(h,f,0,0);A.save(),t([new O(u.left,u.top),new O(u.left+u.width,u.top),new O(u.left+u.width,u.top+u.height),new O(u.left,u.top+u.height)]),A.clip();const m=JF(A,n.value,l.width,r.whiteSpace==="pre"||r.whiteSpace==="nowrap"),Q=La(r.lineHeight,o);m.forEach((U,E)=>{let v=g.left;const F=A.measureText(U).width;switch(r.textAlign){case 1:v+=(l.width-F)/2;break;case 2:v+=l.width-F;break}const y=new ke(v,g.top+E*Q,0,0);e.renderTextWithLetterSpacing(new ln(U,y),r.letterSpacing,a,r.writingMode)}),A.restore(),A.textBaseline="alphabetic",A.textAlign="left"}}const WF=(A,e,t)=>A.height<t?new ke(A.left,e.top,A.width,e.height):A,JF=(A,e,t,n)=>{const r=[],s=e.split(`
|
|
1654
|
+
`);for(const o of s){if(n){r.push(o);continue}const a=o.split(/(\s+)/);let i="";for(const l of a){const u=i+l;A.measureText(u).width<=t||i===""?i=u:(r.push(i),i=l)}r.push(i)}return r};function jF(A,e,t,n,r,s){return T(this,null,function*(){var o;if(qA(r.styles.display,2048)){if(r.styles.listStyleImage!==null){const a=r.styles.listStyleImage;if(a.type===0){const i=a.url;try{const l=yield e.cache.match(i);A.drawImage(l,r.bounds.left-(l.width+10),r.bounds.top)}catch(l){e.logger.error(`Error loading list-style-image ${i}`),(o=e.onError)==null||o.call(e,l instanceof Error?l:new Error(String(l)))}}}else if(n.listValue&&r.styles.listStyleType!==-1){const[a]=t.createFontStyle(s);A.font=a,A.fillStyle=FA(s.color),A.textBaseline="middle",A.textAlign="right";const i=new ke(r.bounds.left,r.bounds.top+J(r.styles.paddingTop,r.bounds.width),r.bounds.width,La(s.lineHeight,s.fontSize.number)/2+1);t.renderTextWithLetterSpacing(new ln(n.listValue,i),s.letterSpacing,La(s.lineHeight,s.fontSize.number)/2+2,s.writingMode),A.textBaseline="bottom",A.textAlign="left"}}})}const YF=A=>A instanceof Lp||A instanceof Hp?!0:A instanceof Jn&&A.type!=="radio"&&A.type!=="checkbox",qF=A=>{switch(A){case 1:return"center";case 2:return"right";default:return"left"}};var Ak=class Wf{constructor(e,t){this.context=e,this.options=t,this.canvas=t.canvas?t.canvas:document.createElement("canvas");const n=this.canvas.getContext("2d");if(!n)throw new Error("Failed to get 2D rendering context from canvas");this.ctx=n,t.canvas||(this.canvas.width=Math.floor(t.width*t.scale),this.canvas.height=Math.floor(t.height*t.scale),this.canvas.style.width=`${t.width}px`,this.canvas.style.height=`${t.height}px`),this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-t.x,-t.y),this.ctx.textBaseline="bottom",t.imageSmoothing!==void 0&&(this.ctx.imageSmoothingEnabled=t.imageSmoothing),t.imageSmoothingQuality&&(this.ctx.imageSmoothingQuality=t.imageSmoothingQuality),this.backgroundRenderer=new Yp({ctx:this.ctx,context:this.context,canvas:this.canvas,options:{width:t.width,height:t.height,scale:t.scale}}),this.borderRenderer=new zF({ctx:this.ctx},{path:r=>this.path(r),formatPath:r=>this.formatPath(r)}),this.borderImageRenderer=new $F(this.ctx),this.effectsRenderer=new GF({ctx:this.ctx},{path:r=>this.path(r)}),this.textRenderer=new OF({ctx:this.ctx,options:{scale:t.scale}}),this.context.logger.debug(`Canvas renderer initialized (${t.width}x${t.height}) with scale ${t.scale}`)}renderStack(e){return T(this,null,function*(){e.element.container.styles.isVisible()&&(yield this.renderStackContent(e))})}renderNode(e){return T(this,null,function*(){if(e.container.debugRender)debugger;e.container.styles.isVisible()&&(yield this.renderNodeBackgroundAndBorders(e),yield this.renderNodeContent(e))})}renderReplacedElement(e,t,n){const r=n.naturalWidth||e.intrinsicWidth,s=n.naturalHeight||e.intrinsicHeight;if(n&&r>0&&s>0){const o=Zr(e),a=Ho(t);this.path(a),this.ctx.save(),this.ctx.clip();const{sx:i,sy:l,sw:u,sh:h,dx:f,dy:g,dw:m,dh:Q}=VF(r,s,o,e.styles.objectFit,e.styles.objectPosition);this.ctx.drawImage(n,i,l,u,h,f,g,m,Q),this.ctx.restore()}}renderNodeContent(e){return T(this,null,function*(){this.effectsRenderer.applyEffects(e.getEffects(4));const t=e.container,n=e.curves,r=t.styles,s=Zr(t);for(const o of t.textNodes)yield this.textRenderer.renderTextNode(o,r,s);yield ZF(this.ctx,this.context,{scale:this.options.scale,backgroundColor:this.options.backgroundColor,x:this.options.x,y:this.options.y,width:this.options.width,height:this.options.height},(o,a)=>new Wf(o,a),t,n,r,(o,a,i)=>this.renderReplacedElement(o,a,i)),XF(this.ctx,this.textRenderer,this.path.bind(this),t,r),yield jF(this.ctx,this.context,this.textRenderer,e,t,r)})}renderStackContent(e){return T(this,null,function*(){if(e.element.container.debugRender)debugger;const t=this.options.signal;yield this.renderNodeBackgroundAndBorders(e.element);for(const n of e.negativeZIndex){if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderStack(n)}if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderNodeContent(e.element);for(const n of e.nonInlineLevel)yield this.renderNode(n);for(const n of e.nonPositionedFloats){if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderStack(n)}for(const n of e.nonPositionedInlineLevel){if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderStack(n)}for(const n of e.inlineLevel)yield this.renderNode(n);for(const n of e.zeroOrAutoZIndexOrTransformedOrOpacity){if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderStack(n)}for(const n of e.positiveZIndex){if(t!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");yield this.renderStack(n)}})}mask(e){this.ctx.beginPath();const t=this.options.x,n=this.options.y;this.ctx.moveTo(t,n),this.ctx.lineTo(t+this.options.width,n),this.ctx.lineTo(t+this.options.width,n+this.options.height),this.ctx.lineTo(t,n+this.options.height),this.ctx.lineTo(t,n),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()}path(e){jp(this.ctx,e)}formatPath(e){Jp(this.ctx,e)}renderNodeBackgroundAndBorders(e){return T(this,null,function*(){this.effectsRenderer.applyEffects(e.getEffects(2));const t=e.container.styles,n=!bt(t.backgroundColor)||t.backgroundImage.length,r=tk(t),s=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],o=dn(t.backgroundClip,0),a=ek(o,e.curves);if((n||t.boxShadow.length)&&(r&&e.container.textNodes.length>0?yield this.renderTextClippedBackground(e):(this.ctx.save(),this.path(a),this.ctx.clip(),bt(t.backgroundColor)||(this.ctx.fillStyle=FA(t.backgroundColor),this.ctx.fill()),yield this.backgroundRenderer.renderBackgroundImage(e.container),this.ctx.restore()),t.boxShadow.slice(0).reverse().forEach(l=>{this.ctx.save();const u=To(e.curves),h=l.inset?0:ZU,f=hF(u,-h+(l.inset?1:-1)*l.spread.number,(l.inset?1:-1)*l.spread.number,l.spread.number*(l.inset?-2:2),l.spread.number*(l.inset?-2:2));l.inset?(this.path(u),this.ctx.clip(),this.mask(f)):(this.mask(u),this.ctx.clip(),this.path(f)),this.ctx.shadowOffsetX=l.offsetX.number+h,this.ctx.shadowOffsetY=l.offsetY.number,this.ctx.shadowColor=FA(l.color),this.ctx.shadowBlur=l.blur.number,this.ctx.fillStyle=l.inset?FA(l.color):"rgba(0,0,0,1)",this.ctx.fill(),this.ctx.restore()})),t.borderImageSource){const l=t.borderImageSource;if(l.type===0){const u=l.url;try{const h=yield this.context.cache.match(u);if(h){const f=e.container.bounds;this.borderImageRenderer.renderBorderImage(f,h,t.borderImageSlice,t.borderImageRepeat,Math.max(0,t.borderTopWidth),Math.max(0,t.borderRightWidth),Math.max(0,t.borderBottomWidth),Math.max(0,t.borderLeftWidth))}}catch(h){this.context.logger.error(`Error loading border-image ${u}`)}}return}let i=0;for(const l of s){if(l.style!==0&&!bt(l.color)&&l.width>0){const u=()=>T(this,null,function*(){l.style===2?yield this.borderRenderer.renderDashedDottedBorder(l.color,l.width,i,e.curves,2):l.style===3?yield this.borderRenderer.renderDashedDottedBorder(l.color,l.width,i,e.curves,3):l.style===4?yield this.borderRenderer.renderDoubleBorder(l.color,l.width,i,e.curves):yield this.borderRenderer.renderSolidBorder(l.color,i,e.curves)}),h=e.container.legendBounds;if(i===0&&h){const f=e.container.bounds,g=h.left-f.left,m=h.left+h.width-f.left;g>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(f.left,f.top,g,f.height),this.ctx.clip(),yield u(),this.ctx.restore());const Q=f.left+m,U=f.width-m;U>0&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(Q,f.top,U,f.height),this.ctx.clip(),yield u(),this.ctx.restore())}else yield u()}i++}})}render(e){return T(this,null,function*(){this.options.backgroundColor&&(this.ctx.fillStyle=FA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height));const t=EF(e);return yield this.renderStack(t),this.effectsRenderer.applyEffects([]),this.canvas})}renderTextClippedBackground(e){return T(this,null,function*(){var m;const t=e.container,n=t.styles,r=t.bounds;if(r.width<=0||r.height<=0)return;const s=((m=this.canvas.ownerDocument)!=null?m:document).createElement("canvas"),o=Math.ceil(r.width),a=Math.ceil(r.height);s.width=o,s.height=a;const i=s.getContext("2d");if(!i)return;const[l]=this.textRenderer.createFontStyle(n);i.font=l,i.textBaseline="alphabetic",i.textAlign="left",i.direction=n.direction===1?"rtl":"ltr";const u=Wp(i,n.fontSize.number),h=new Yp({ctx:i,context:this.context,canvas:s,options:{width:o,height:a,scale:1}});bt(n.backgroundColor)||(i.fillStyle=FA(n.backgroundColor),i.fillRect(0,0,o,a)),i.save(),i.translate(-r.left,-r.top),yield h.renderBackgroundImage(t),i.restore(),i.globalCompositeOperation="destination-in",i.fillStyle="#000";const f=n.writingMode,g=n.letterSpacing;for(const Q of t.textNodes)for(const U of Q.textBounds){const E=U.bounds.left-r.left,v=U.bounds.top-r.top+u;g>0?this.renderTextMaskWithLetterSpacing(i,U,g,E,v,f):i.fillText(U.text,E,v)}this.ctx.drawImage(s,r.left,r.top)})}renderTextMaskWithLetterSpacing(e,t,n,r,s,o){const a=un(t.text);let i=r;for(const l of a){if(_o(o)){e.fillText(t.text,r,s);return}e.fillText(l,i,s),i+=e.measureText(l).width+n}}};const ek=(A,e)=>{switch(A){case 0:return To(e);case 2:return gF(e);default:return Ho(e)}},tk=A=>A.backgroundClip.some(e=>e===3);var nk=class{constructor(A,e){this.context=A,this.options=e,this.canvas=e.canvas?e.canvas:document.createElement("canvas");const t=this.canvas.getContext("2d");if(!t)throw new Error("Failed to get 2D rendering context from canvas");this.ctx=t,this.canvas.width=Math.floor(e.width*e.scale),this.canvas.height=Math.floor(e.height*e.scale),this.canvas.style.width=`${e.width}px`,this.canvas.style.height=`${e.height}px`,this.ctx.scale(this.options.scale,this.options.scale),this.ctx.translate(-e.x,-e.y),this.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (${e.width}x${e.height} at ${e.x},${e.y}) with scale ${e.scale}`)}render(A){return T(this,null,function*(){var t;if((t=this.options.signal)!=null&&t.aborted)throw new DOMException("The operation was aborted.","AbortError");const e=yield Ya(ja(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A));return this.options.backgroundColor&&(this.ctx.fillStyle=FA(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(e,-this.options.x*this.options.scale,-this.options.y*this.options.scale),this.canvas})}},rk=(dr=class{constructor({id:e,enabled:t}){this.id=e,this.enabled=t,this.start=Date.now()}debug(...e){this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug(this.id,`${this.getTime()}ms`,...e):this.info(...e))}getTime(){return Date.now()-this.start}info(...e){this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info(this.id,`${this.getTime()}ms`,...e)}warn(...e){this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn(this.id,`${this.getTime()}ms`,...e):this.info(...e))}error(...e){this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error(this.id,`${this.getTime()}ms`,...e):this.info(...e))}},dr.instances={},dr),sk=class{constructor(A,e){var t;if(this.context=A,this._options=e,this._cache=new Map,this._pendingOperations=new Map,this._deferMode=!1,this._collectedUrls=new Set,this.maxSize=(t=e.maxCacheSize)!=null?t:100,this.maxSize<1)throw new Error("Cache maxSize must be at least 1");this.maxSize>1e4&&this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`)}startDefer(){this._deferMode=!0}preloadAll(A=10){return T(this,null,function*(){this._deferMode=!1;const e=Array.from(this._collectedUrls);if(this._collectedUrls.clear(),e.length===0)return;const t=Math.max(1,Math.min(A,100));this.context.logger.debug(`Preloading ${e.length} image(s) with concurrency ${t}`);for(let n=0;n<e.length;n+=t){const r=e.slice(n,n+t).map(s=>this._addImageWithPending(s));yield Promise.allSettled(r)}})}addImage(A){if(this._deferMode)return!this.has(A)&&(Wr(A)||Ah(A))&&this._collectedUrls.add(A),Promise.resolve();const e=this._pendingOperations.get(A);if(e)return e;if(this.has(A)){const t=this._cache.get(A);return this._cache.delete(A),this._cache.set(A,t),Promise.resolve()}return Wr(A)||Ah(A)?this._addImageWithPending(A):Promise.resolve()}_addImageWithPending(A){const e=this._pendingOperations.get(A);if(e)return e;const t=this._addImageInternal(A);return this._pendingOperations.set(A,t),t.finally(()=>{this._pendingOperations.delete(A)}),t}_addImageInternal(A){return T(this,null,function*(){var n;const e=(n=this._options.imageTimeout)!=null?n:15e3,t=this.withTimeout(this.loadImage(A),e,`Timed out (${e}ms) loading image`);t.catch(r=>{this.context.logger.error(`Failed to load image ${A}: ${r instanceof Error?r.message:"Unknown error"}`)}),this.set(A,t)})}withTimeout(A,e,t){if(e<=0)return A;let n;const r=new Promise((s,o)=>{n=setTimeout(()=>o(new Error(t)),e)});return Promise.race([A,r]).finally(()=>{n!==void 0&&clearTimeout(n)})}match(A){const e=this._cache.get(A);if(e)return this._cache.delete(A),this._cache.set(A,e),e.value}set(A,e){if(this._cache.has(A))this._cache.delete(A);else if(this._cache.size>=this.maxSize){const t=this._cache.keys().next().value;t!==void 0&&(this._cache.delete(t),this.context.logger.debug(`Cache: Evicted LRU entry: ${t}`))}this._cache.set(A,{value:e})}size(){return this._cache.size}getMaxSize(){return this.maxSize}clear(){this._cache.clear()}loadImage(A){return T(this,null,function*(){const e=this.context.originChecker,t=i=>e.isSameOrigin(i),n=typeof this._options.customIsSameOrigin=="function"?yield this._options.customIsSameOrigin(A,t):t(A),r=!n&&this._options.allowTaint===!1&&!Mo(A)&&!Wr(A)&&typeof this._options.proxy!="string",s=!Mo(A)&&(this._options.useCORS===!0||r)&&Ae.SUPPORT_CORS_IMAGES&&!n,o=!Mo(A)&&!n&&!Wr(A)&&typeof this._options.proxy=="string"&&Ae.SUPPORT_CORS_XHR&&!s;if(!n&&this._options.allowTaint===!1&&!Mo(A)&&!Wr(A)&&!o&&!s)return;let a=A;return o&&(a=yield this.proxy(a)),this.context.logger.debug(`Added image ${A.substring(0,256)}`),yield new Promise((i,l)=>{const u=new Image;u.onload=()=>i(u),u.onerror=l,(ck(a)||s)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(()=>i(u),500)})})}has(A){return this._cache.has(A)}keys(){return Promise.resolve(Array.from(this._cache.keys()))}proxy(A){const e=this._options.proxy;if(!e)throw new Error("No proxy defined");const t=A.substring(0,256);return new Promise((n,r)=>{const s=Ae.SUPPORT_RESPONSE_TYPE?"blob":"text",o=new XMLHttpRequest;o.onload=()=>{if(o.status===200)if(s==="text")n(o.response);else{const i=new FileReader;i.addEventListener("load",()=>n(i.result),!1),i.addEventListener("error",l=>r(l),!1),i.readAsDataURL(o.response)}else r(`Failed to proxy resource ${t} with status code ${o.status}`)},o.onerror=r;const a=e.indexOf("?")>-1?"&":"?";if(o.open("GET",`${e}${a}url=${encodeURIComponent(A)}&responseType=${s}`),s!=="text"&&o instanceof XMLHttpRequest&&(o.responseType=s),this._options.imageTimeout){const i=this._options.imageTimeout;o.timeout=i,o.ontimeout=()=>r(`Timed out (${i}ms) proxying ${t}`)}o.send()})}};const ok=/^data:image\/svg\+xml/i,ik=/^data:image\/.*;base64,/i,ak=/^data:image\/.*/i,Ah=A=>Ae.SUPPORT_SVG_DRAWING||!lk(A),Mo=A=>ak.test(A),ck=A=>ik.test(A),Wr=A=>A.substring(0,4)==="blob",lk=A=>A.slice(-3).toLowerCase()==="svg"||ok.test(A);var uk=class{constructor(A){if(!A||!A.document)throw new Error("Valid window object required for OriginChecker");if(!A.location||!A.location.href)throw new Error("Window object must have valid location");this.link=A.document.createElement("a"),this.origin=this.getOrigin(A.location.href)}getOrigin(A){return this.link.href=A,this.link.href=this.link.href,this.link.protocol+this.link.hostname+this.link.port}isSameOrigin(A){return this.getOrigin(A)===this.origin}getContextOrigin(){return this.origin}},dk=(Un=class{constructor(e,t,n){var r,s;this.windowBounds=t,this.instanceName=`#${Un.instanceCount++}`,this.config=n,this.logger=new rk({id:this.instanceName,enabled:e.logging}),this.originChecker=new uk(n.window),this.cache=(s=(r=e.cache)!=null?r:n.cache)!=null?s:new sk(this,e),this.onError=e.onError}},Un.instanceCount=1,Un);const Po=A=>{if(A!=null&&A.aborted)throw new DOMException("The operation was aborted.","AbortError")},pk=A=>{["scale","width","height","imageTimeout","x","y","windowWidth","windowHeight","scrollX","scrollY"].forEach(e=>{const t=A[e];if(t!=null&&typeof t!="number"){const n=Number(t);Number.isNaN(n)||(A[e]=n)}})},hk=A=>{var e,t,n;return{allowTaint:(e=A.allowTaint)!=null?e:!1,imageTimeout:(t=A.imageTimeout)!=null?t:15e3,proxy:A.proxy,useCORS:(n=A.useCORS)!=null?n:!1,customIsSameOrigin:A.customIsSameOrigin,maxCacheSize:A.maxCacheSize}},fk=(A,e,t)=>{var n,r;return k({logging:(n=A.logging)!=null?n:!0,cache:(r=A.cache)!=null?r:e.cache},t)},gk=800,Bk=600,eh=0,wk=(A,e)=>{var n,r,s,o,a,i,l,u;const t=e;return{windowWidth:(r=(n=A.windowWidth)!=null?n:t.innerWidth)!=null?r:gk,windowHeight:(o=(s=A.windowHeight)!=null?s:t.innerHeight)!=null?o:Bk,scrollX:(i=(a=A.scrollX)!=null?a:t.pageXOffset)!=null?i:eh,scrollY:(u=(l=A.scrollY)!=null?l:t.pageYOffset)!=null?u:eh}},mk=(A,e,t)=>{var n,r;return{allowTaint:(n=A.allowTaint)!=null?n:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,iframeContainer:A.iframeContainer,inlineImages:t,copyStyles:t,cspNonce:(r=A.cspNonce)!=null?r:e.cspNonce}},Ck=(A,e,t,n,r,s,o)=>{var a,i,l,u,h,f;return{canvas:A.canvas,backgroundColor:e,signal:A.signal,scale:(i=(a=A.scale)!=null?a:o)!=null?i:1,x:((l=A.x)!=null?l:0)+t,y:((u=A.y)!=null?u:0)+n,width:(h=A.width)!=null?h:Math.ceil(r),height:(f=A.height)!=null?f:Math.ceil(s),imageSmoothing:A.imageSmoothing,imageSmoothingQuality:A.imageSmoothingQuality}},bk=(A,e,t)=>{const n=e.ownerDocument,r=n.documentElement?Xn(A,getComputedStyle(n.documentElement).backgroundColor):it.TRANSPARENT,s=n.body?Xn(A,getComputedStyle(n.body).backgroundColor):it.TRANSPARENT,o=typeof t=="string"?Xn(A,t):t===null?it.TRANSPARENT:4294967295;return e===n.documentElement?bt(r)?bt(s)?o:s:r:o},Qk=(A,e,t)=>T(null,null,function*(){var N,Z,X,aA,fA,PA;if(pk(e),!e.skipValidation){const Ce=e.validator||Sb(),pe=Ce.validateElement(A);if(!pe.valid)throw new Error(pe.error);const Je=Ce.validateOptions(e);if(!Je.valid)throw new Error(`Invalid options: ${Je.error}`)}if(!A||typeof A!="object")throw new Error("Invalid element provided as first argument");const n=A.ownerDocument;if(!n)throw new Error("Element is not attached to a Document");const r=n.defaultView;if(!r)throw new Error("Document is not attached to a Window");const s=fk(e,t,hk(e)),o=wk(e,r),a=new ke(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),i=new dk(s,a,t),l=(Z=(N=e.enablePerformanceMonitoring)!=null?N:e.logging)!=null?Z:!1,u=new Ib(i,l);u.start("total",{width:o.windowWidth,height:o.windowHeight});const h=e.signal;Po(h);const f=(X=e.foreignObjectRendering)!=null?X:!1,g=mk(e,t,f);i.logger.debug(`Starting document clone with size ${a.width}x${a.height} scrolled to ${-a.left},${-a.top}`),u.start("clone");const m=new Oa(i,A,g),Q=m.clonedReferenceElement;if(!Q)throw new Error("Unable to find element in cloned iframe");const U=yield m.toIFrame(n,a);u.end("clone"),h!=null&&h.aborted&&(((aA=e.removeContainer)==null||aA)&&Oa.destroy(U),Po(h));const{width:E,height:v,left:F,top:y}=va(Q)||Hy(Q)?Tb(Q.ownerDocument):_r(i,Q),x=bk(i,Q,e.backgroundColor),R=Ck(e,x,F,y,E,v,(fA=r.devicePixelRatio)!=null?fA:1);let I,K;try{return f?(i.logger.debug("Document cloned, using foreign object rendering"),u.start("render-foreignobject"),I=yield new nk(i,R).render(Q),u.end("render-foreignobject")):(i.logger.debug(`Document cloned, element located at ${F},${y} with size ${E}x${v} using computed rendering`),i.logger.debug("Starting DOM parsing"),u.start("parse"),Po(h),i.cache.startDefer(),K=Mp(i,Q),u.end("parse"),u.start("preload"),yield i.cache.preloadAll(),u.end("preload"),x===K.styles.backgroundColor&&(K.styles.backgroundColor=it.TRANSPARENT),i.logger.debug(`Starting renderer for element at ${R.x},${R.y} with size ${R.width}x${R.height}`),u.start("render"),Po(h),I=yield new Ak(i,R).render(K),u.end("render")),u.start("cleanup"),((PA=e.removeContainer)==null||PA)&&(Oa.destroy(U)||i.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),u.end("cleanup"),u.end("total"),i.logger.debug("Finished rendering"),l&&u.logSummary(),I}finally{K&&K.restoreTree()}}),yk=(A,e={},t)=>Qk(A,e,_b.fromElement(A,{cspNonce:e.cspNonce,cache:e.cache}));function Uk(A){return T(this,null,function*(){if(!(A instanceof HTMLElement))return{blob:null,error:null};try{const e=yield yk(A,{backgroundColor:"#ffffff",logging:!1,useCORS:!0,scale:1,ignoreElements:n=>n instanceof Element&&n.hasAttribute("data-ap-sdk"),onclone:(n,r)=>{try{Oi(r)}catch(s){}}}),t=yield Ek(e);return t?{blob:t,error:null}:{blob:null,error:"canvas.toBlob produced no image data"}}catch(e){return console.error("[Agent Platform SDK] screenshot capture failed:",e),{blob:null,error:e instanceof Error?e.message:String(e)}}})}function Ek(A){return new Promise(e=>{A.toBlob(t=>e(t),"image/png")})}const Fk={click:"🖱",inputText:"⌨",scroll:"↕",keypress:"⌤"};function kk(A,e){const{needsCredentials:t,canCreateTask:n,canCreatePlanning:r,captureType:s,hasOnReselect:o,hasOnAddAnother:a}=e;return`
|
|
1655
|
+
<div class="ap-sdk-panel__header">
|
|
1656
|
+
<span class="ap-sdk-panel__title">
|
|
1657
|
+
<span class="ap-sdk-panel__logo">AP</span>
|
|
1658
|
+
Capture to Agent Platform
|
|
1659
|
+
</span>
|
|
1660
|
+
<div class="ap-sdk-panel__header-actions">
|
|
1661
|
+
<button class="ap-sdk-panel__clear" aria-label="Clear selections" title="Clear selections" data-ap-clear-selections type="button">⟲</button>
|
|
1662
|
+
<button class="ap-sdk-panel__config" aria-label="Configure" data-ap-reconfigure>⚙</button>
|
|
1663
|
+
<button class="ap-sdk-panel__close" aria-label="Close" data-ap-close>×</button>
|
|
1664
|
+
</div>
|
|
1665
|
+
</div>
|
|
1666
|
+
<div class="ap-sdk-pick-list" data-ap-pick-list style="display:none"></div>
|
|
1667
|
+
<div class="ap-sdk-panel__context" data-ap-context>
|
|
1668
|
+
${th(A)}
|
|
1669
|
+
</div>
|
|
1670
|
+
<div class="ap-sdk-panel__screenshot" data-ap-screenshot style="display:none"></div>
|
|
1671
|
+
<div class="ap-sdk-panel__pick-actions" data-ap-pick-actions>
|
|
1672
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-panel__btn--select-parent" data-ap-select-parent type="button">
|
|
1673
|
+
⬆ Select parent
|
|
1674
|
+
</button>
|
|
1675
|
+
${o?`
|
|
1676
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-panel__btn--reselect" data-ap-reselect type="button">
|
|
1677
|
+
↻ Re-select
|
|
1678
|
+
</button>`:""}
|
|
1679
|
+
</div>
|
|
1680
|
+
${t?`
|
|
1681
|
+
<div class="ap-sdk-credentials-section" data-ap-credentials>
|
|
1682
|
+
<p class="ap-sdk-credentials-heading">Connect to Agent Platform to continue</p>
|
|
1683
|
+
<p class="ap-sdk-config-hint">You'll be asked to approve this connection on Agent Platform's own sign-in page.</p>
|
|
1684
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-connect-required type="button">Connect via Agent Platform</button>
|
|
1685
|
+
</div>`:""}
|
|
1686
|
+
<div class="ap-sdk-panel__body">
|
|
1687
|
+
<div class="ap-sdk-panel__field">
|
|
1688
|
+
<label class="ap-sdk-panel__label" for="ap-sdk-note">Instruction</label>
|
|
1689
|
+
<textarea id="ap-sdk-note" class="ap-sdk-panel__textarea" rows="3"
|
|
1690
|
+
placeholder="Describe the task or planning session…" data-ap-note></textarea>
|
|
1691
|
+
</div>
|
|
1692
|
+
${a?`
|
|
1693
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--add-another" data-ap-add-another disabled>
|
|
1694
|
+
+ Add another
|
|
1695
|
+
</button>`:""}
|
|
1696
|
+
<div class="ap-sdk-panel__field">
|
|
1697
|
+
<div class="ap-sdk-panel__label">Type</div>
|
|
1698
|
+
<div class="ap-sdk-panel__toggle">
|
|
1699
|
+
${r?`<button class="ap-sdk-panel__toggle-btn${s==="planning"?" ap-sdk-active":""}" data-ap-type="planning">Planning Session</button>`:""}
|
|
1700
|
+
${n?`<button class="ap-sdk-panel__toggle-btn${s==="task"?" ap-sdk-active":""}" data-ap-type="task">Task</button>`:""}
|
|
1701
|
+
${n?`<button class="ap-sdk-panel__toggle-btn${s==="automate"?" ap-sdk-active":""}" data-ap-type="automate">Automate</button>`:""}
|
|
1702
|
+
</div>
|
|
1703
|
+
</div>
|
|
1704
|
+
<div class="ap-sdk-panel__field" data-ap-automate-options style="display:none">
|
|
1705
|
+
<label class="ap-sdk-advanced__checkbox-label">
|
|
1706
|
+
<input type="checkbox" data-ap-allow-submit />
|
|
1707
|
+
Allow submit / confirm actions
|
|
1708
|
+
</label>
|
|
1709
|
+
<span class="ap-sdk-advanced__hint">Lets the agent click Submit, Confirm, Send, or Publish buttons to finish the task. It will still avoid payments and deletions unless you ask for them.</span>
|
|
1710
|
+
</div>
|
|
1711
|
+
</div>
|
|
1712
|
+
<div class="ap-sdk-panel__status" data-ap-status style="display:none"></div>
|
|
1713
|
+
<div class="ap-sdk-panel__footer">
|
|
1714
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-submit>Submit</button>
|
|
1715
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-cancel>Cancel</button>
|
|
1716
|
+
</div>
|
|
1717
|
+
`}function th(A){var e,t;return(e=A.interactionSteps)!=null&&e.length?`
|
|
1718
|
+
<div class="ap-sdk-panel__context-label">Recorded steps (${A.interactionSteps.length})</div>
|
|
1719
|
+
<div class="ap-sdk-panel__context-steps">
|
|
1720
|
+
${A.interactionSteps.map(n=>`
|
|
1721
|
+
<div class="ap-sdk-panel__context-step">
|
|
1722
|
+
<span class="ap-sdk-panel__context-step-icon">${Fk[n.action]}</span>
|
|
1723
|
+
<span class="ap-sdk-panel__context-step-text">${we(n.description)}</span>
|
|
1724
|
+
</div>
|
|
1725
|
+
`).join("")}
|
|
1726
|
+
</div>
|
|
1727
|
+
`:`
|
|
1728
|
+
<div class="ap-sdk-panel__context-label">Captured element</div>
|
|
1729
|
+
<div class="ap-sdk-panel__context-text" title="${we((t=A.elementText)!=null?t:"")}">${we(A.elementText||"(no text)")}</div>
|
|
1730
|
+
${A.cssSelector?`<div class="ap-sdk-panel__context-selector" title="${we(A.cssSelector)}">${we(A.cssSelector)}</div>`:""}
|
|
1731
|
+
`}function Nt(A,e,t){if(!e){A.style.display="none",A.textContent="",A.innerHTML="";return}A.style.display="block",A.className=`ap-sdk-panel__status ap-sdk-panel__status--${e}`,A.textContent=t}function vk(A,e,t,n,r){const s=e==="task"?"Task":"Planning",o=e==="task"?"Task created successfully!":"Planning session created!",a=e==="task"?"View task →":"View planning session →",i=t.length>55?`${t.slice(0,52)}…`:t;A.style.display="block",A.className="ap-sdk-panel__status",A.innerHTML=`
|
|
1732
|
+
<div class="ap-sdk-success-card">
|
|
1733
|
+
<svg class="ap-sdk-success-check" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
|
1734
|
+
<circle class="ap-sdk-success-check__circle" cx="24" cy="24" r="22"/>
|
|
1735
|
+
<path class="ap-sdk-success-check__tick" d="M14 24l7 7 13-14"/>
|
|
1736
|
+
</svg>
|
|
1737
|
+
<p class="ap-sdk-success-headline">${we(o)}</p>
|
|
1738
|
+
<div class="ap-sdk-success-meta">
|
|
1739
|
+
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${e}">${we(s)}</span>
|
|
1740
|
+
<span class="ap-sdk-success-title" title="${we(t)}">${we(i)}</span>
|
|
1741
|
+
</div>
|
|
1742
|
+
<div class="ap-sdk-success-actions">
|
|
1743
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-success-view>${we(a)}</button>
|
|
1744
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-success-close>Close</button>
|
|
1745
|
+
</div>
|
|
1746
|
+
</div>
|
|
1747
|
+
`,A.querySelector("[data-ap-success-view]").addEventListener("click",()=>window.open(n,"_blank","noopener,noreferrer")),A.querySelector("[data-ap-success-close]").addEventListener("click",r)}function sc(A,e){A.querySelectorAll("button, input, textarea, select").forEach(t=>{t.disabled=e})}function we(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function _k(A,e){let t=null,n=null;const r=()=>{if(A.screenshotCapturing){e.style.display="block",e.className="ap-sdk-panel__screenshot",e.innerHTML='<div class="ap-sdk-screenshot__status">📸 Capturing screenshot…</div>';return}if(!A.currentScreenshotBlob){A.screenshotError?(e.style.display="block",e.className="ap-sdk-panel__screenshot",e.innerHTML=`
|
|
1748
|
+
<div class="ap-sdk-screenshot__status ap-sdk-screenshot__status--muted">Screenshot unavailable for this element.</div>
|
|
1749
|
+
<div class="ap-sdk-screenshot__error">${we(A.screenshotError)}</div>
|
|
1750
|
+
`):(e.style.display="none",e.innerHTML="");return}t&&URL.revokeObjectURL(t),t=URL.createObjectURL(A.currentScreenshotBlob),e.style.display="block",e.className=`ap-sdk-panel__screenshot${A.screenshotIncluded?"":" ap-sdk-screenshot--excluded"}`,e.innerHTML=`
|
|
1751
|
+
<label class="ap-sdk-screenshot__toggle">
|
|
1752
|
+
<input type="checkbox" data-ap-screenshot-include ${A.screenshotIncluded?"checked":""} />
|
|
1753
|
+
Attach a screenshot of the selected element
|
|
1754
|
+
</label>
|
|
1755
|
+
<img class="ap-sdk-screenshot__thumb" src="${t}" alt="Screenshot of the selected element" />
|
|
1756
|
+
`,e.querySelector("[data-ap-screenshot-include]").addEventListener("change",o=>{A.screenshotIncluded=o.target.checked,e.classList.toggle("ap-sdk-screenshot--excluded",!A.screenshotIncluded)})};return{captureScreenshotFor:o=>{const a=Symbol();n=a,A.screenshotCapturing=!0,A.currentScreenshotBlob=null,A.screenshotIncluded=!1,A.screenshotError=null,r(),Uk(o).then(({blob:i,error:l})=>{n===a&&(A.currentScreenshotBlob=i,A.screenshotCapturing=!1,A.screenshotError=i?null:l!=null?l:"Unknown error",i||(A.screenshotIncluded=!1),r())})},renderScreenshotUi:r,invalidateInFlightCapture:()=>{n=null},cleanup:()=>{t&&(URL.revokeObjectURL(t),t=null)}}}function xk({state:A,els:e,screenshotCtl:t,defaultCaptureType:n,updateHighlight:r,onReselect:s,onAddAnother:o}){const{contextEl:a,pickListEl:i,pickActionsEl:l,noteEl:u,addAnotherBtn:h,selectParentBtn:f,reselectBtn:g,clearSelectionsBtn:m,typeButtons:Q,allowSubmitCheckbox:U,automateOptionsEl:E,statusEl:v}=e,F=()=>{vb({captureType:A.captureType,note:u.value,completedPicks:A.completedPicks.map(({ctx:N,instruction:Z})=>({ctx:N,instruction:Z})),allowSubmit:A.allowSubmit,currentCtx:A.currentCtx})},y=N=>{N?(a.innerHTML=th(N),u.disabled=!1,u.placeholder="Describe the task or planning session…",setTimeout(()=>u.focus(),50)):(a.innerHTML=`
|
|
1757
|
+
<div class="ap-sdk-panel__context-label">Next element</div>
|
|
1758
|
+
<div class="ap-sdk-panel__context-text ap-sdk-awaiting-pick">👆 Hover and click any element on the page</div>
|
|
1759
|
+
`,u.disabled=!0,u.placeholder="Pick an element to continue…")},x=()=>{if(A.completedPicks.length===0){i.style.display="none",i.innerHTML="";return}i.style.display="block",i.innerHTML=A.completedPicks.map((N,Z)=>{var X;return`
|
|
1760
|
+
<div class="ap-sdk-pick-entry" data-pick-index="${Z}">
|
|
1761
|
+
<div class="ap-sdk-pick-entry__header">
|
|
1762
|
+
<span class="ap-sdk-pick-entry__number">${Z+1}</span>
|
|
1763
|
+
<span class="ap-sdk-pick-entry__element" title="${we((X=N.ctx.elementText)!=null?X:"")}">${we(N.ctx.elementText||"(no text)")}</span>
|
|
1764
|
+
<button class="ap-sdk-pick-entry__remove" data-ap-remove="${Z}" aria-label="Remove pick ${Z+1}">×</button>
|
|
1765
|
+
</div>
|
|
1766
|
+
<div class="ap-sdk-pick-entry__instruction">${we(N.instruction)}</div>
|
|
1767
|
+
</div>
|
|
1768
|
+
`}).join(""),i.querySelectorAll("[data-ap-remove]").forEach(N=>{N.addEventListener("click",()=>{const Z=parseInt(N.dataset.apRemove,10);A.completedPicks.splice(Z,1),x(),F()})})},R=()=>{if(!A.currentPickedEl){l.style.display="none";return}l.style.display="",f.disabled=!A.currentPickedEl.parentElement||A.awaitingPick,g&&(g.disabled=A.awaitingPick)},I=()=>{h&&(h.disabled=!u.value.trim()||A.submitting||A.awaitingPick)},K=(N,Z)=>{A.currentCtx=N,A.currentPickedEl=Z,y(N),r(Z),R(),F()};return R(),m.addEventListener("click",()=>{A.completedPicks=[],A.allowSubmit=!1,A.captureType=n,u.value="",U.checked=!1,Q.forEach(N=>N.classList.toggle("ap-sdk-active",N.dataset.apType===A.captureType)),E.style.display="none",x(),na(),Nt(v,null,""),I(),u.focus()}),f.addEventListener("click",()=>{var Z;const N=(Z=A.currentPickedEl)==null?void 0:Z.parentElement;N&&(K(wl(N),N),t.captureScreenshotFor(N))}),g&&s&&g.addEventListener("click",()=>{if(A.awaitingPick)return;const N=A.currentCtx,Z=A.currentPickedEl,X=A.currentScreenshotBlob,aA=A.screenshotIncluded,fA=A.screenshotError;A.awaitingPick=!0,R(),I(),y(null),t.invalidateInFlightCapture(),A.screenshotCapturing=!1,A.currentScreenshotBlob=null,A.screenshotError=null,t.renderScreenshotUi(),s((PA,Ce)=>{A.awaitingPick=!1,K(PA,Ce),t.captureScreenshotFor(Ce),I()},()=>{A.awaitingPick=!1,Z&&K(N,Z),A.currentScreenshotBlob=X,A.screenshotIncluded=aA,A.screenshotError=fA,t.renderScreenshotUi(),I()})}),h&&o&&(u.addEventListener("input",I),h.addEventListener("click",()=>{const N=u.value.trim();!N||A.awaitingPick||(A.completedPicks.push({ctx:A.currentCtx,instruction:N,screenshotBlob:A.screenshotIncluded?A.currentScreenshotBlob:null}),x(),u.value="",A.awaitingPick=!0,h.disabled=!0,R(),y(null),t.invalidateInFlightCapture(),A.screenshotCapturing=!1,A.currentScreenshotBlob=null,A.screenshotError=null,t.renderScreenshotUi(),F(),o((Z,X)=>{A.awaitingPick=!1,K(Z,X),t.captureScreenshotFor(X),I()}))})),{persistDraft:F,renderPickList:x}}function Sk(A,e){A.style.display="block",A.className="ap-sdk-panel__status ap-sdk-panel__status--error",A.innerHTML=`
|
|
1769
|
+
<p>Your session expired.</p>
|
|
1770
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-reconnect type="button">Reconnect</button>
|
|
1771
|
+
`;const t=A.querySelector("[data-ap-reconnect]");t.addEventListener("click",()=>T(null,null,function*(){t.disabled=!0,t.textContent="Connecting…";try{yield e()}catch(n){Nt(A,"error",n instanceof Error?n.message:"Could not reconnect — please try again.")}}))}let zt=null;function Ik(){const A=new Uint32Array(4);return crypto.getRandomValues(A),Array.from(A,e=>e.toString(16)).join("")}function oc(A){if(zt){const a=zt;a.cleanup(),a.popup.closed||a.popup.close(),zt=null}const e=A.replace(/\/+$/,""),t=new URL(e).origin,n=Ik(),r=window.location.origin,s=`${e}/oauth/authorize?origin=${encodeURIComponent(r)}&state=${encodeURIComponent(n)}`,o=window.open(s,"ap-sdk-oauth","width=480,height=640");return o?new Promise((a,i)=>{let l=!1;function u(){window.removeEventListener("message",h),clearInterval(f),(zt==null?void 0:zt.popup)===o&&(zt=null)}function h(g){if(g.origin!==t)return;const m=g.data;!m||m.type!=="ap-sdk-oauth"||m.state!==n||!m.code||(l=!0,u(),a({code:m.code}))}window.addEventListener("message",h);const f=window.setInterval(()=>{o.closed&&(u(),l||i(new Error("Connection cancelled.")))},500);zt={popup:o,cleanup:u}}):Promise.reject(new Error("Popup blocked — please allow popups for this site and try again."))}const Tk="https://agent-platform.tung.engineering",ic="ap-sdk-config";function Hk(){try{const A=sessionStorage.getItem(ic);if(!A)return null;const e=JSON.parse(A);return!(e!=null&&e.backendUrl)||!(e!=null&&e.token)||!(e!=null&&e.projectCode)||!(e!=null&&e.expiresAt)?null:new Date(e.expiresAt).getTime()<=Date.now()?(nh(),null):e}catch(A){return null}}function Ko(A){sessionStorage.setItem(ic,JSON.stringify(A)),Dk({backendUrl:A.backendUrl,projectCode:A.projectCode})}function nh(){sessionStorage.removeItem(ic)}const rh="ap-sdk-last-connection";function Lk(){try{const A=localStorage.getItem(rh);if(!A)return null;const e=JSON.parse(A);return!(e!=null&&e.backendUrl)||!(e!=null&&e.projectCode)?null:e}catch(A){return null}}function Dk(A){try{localStorage.setItem(rh,JSON.stringify(A))}catch(e){}}let rA=null,Jr=null;function yt(){rA&&nt(rA),rA==null||rA.remove(),rA=null,Jr==null||Jr(),Jr=null}function ac(A){rA&&yt(),rA=document.createElement("div"),rA.className="ap-sdk-panel",rA.setAttribute("data-ap-sdk","1"),rA.setAttribute("role","dialog"),rA.setAttribute("aria-modal","true"),rA.setAttribute("aria-label","Connect to Agent Platform");const e=Lk();e?t(e):n(Tk),document.body.appendChild(rA),tt(rA),Jr=vr(rA,kr);function t(s){if(!rA)return;rA.innerHTML=`
|
|
1741
1772
|
<div class="ap-sdk-panel__header">
|
|
1742
1773
|
<span class="ap-sdk-panel__title">
|
|
1743
1774
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
@@ -1747,7 +1778,7 @@ ${n}${r?`
|
|
|
1747
1778
|
</div>
|
|
1748
1779
|
<div class="ap-sdk-panel__body">
|
|
1749
1780
|
<p class="ap-sdk-config-hint">
|
|
1750
|
-
Reconnect to <strong>${
|
|
1781
|
+
Reconnect to <strong>${cc(s.backendUrl)}</strong>. You'll be asked to
|
|
1751
1782
|
approve this connection on Agent Platform's own sign-in page.
|
|
1752
1783
|
</p>
|
|
1753
1784
|
</div>
|
|
@@ -1756,7 +1787,7 @@ ${n}${r?`
|
|
|
1756
1787
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-reconnect>Reconnect</button>
|
|
1757
1788
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-use-different>Use a different connection</button>
|
|
1758
1789
|
</div>
|
|
1759
|
-
`;const
|
|
1790
|
+
`;const o=rA.querySelector("[data-ap-cfg-status]"),a=rA.querySelector("[data-ap-reconnect]");rA.querySelector("[data-ap-close]").addEventListener("click",()=>{yt()}),rA.querySelector("[data-ap-use-different]").addEventListener("click",()=>n(s.backendUrl)),a.addEventListener("click",()=>T(null,null,function*(){a.disabled=!0,a.textContent="Connecting…",$t(o,null,"");try{const{code:i}=yield oc(s.backendUrl),{token:l,expiresAt:u}=yield Aa({backendUrl:s.backendUrl},i,window.location.origin),h={backendUrl:s.backendUrl,token:l},f=yield _u(h);if(f.length===0){$t(o,"error","No projects found — check your account permissions."),a.disabled=!1,a.textContent="Reconnect";return}const g=f.find(U=>U.key===s.projectCode);if(g){yt(),A({backendUrl:s.backendUrl,token:l,projectCode:g.key,expiresAt:u});return}const m=yu(window.location.href,f),Q=m?f.find(U=>U.id===m):void 0;Q?(yt(),A({backendUrl:s.backendUrl,token:l,projectCode:Q.key,expiresAt:u})):r(s.backendUrl,l,u,f)}catch(i){$t(o,"error",`Could not connect — ${i instanceof Error?i.message:"please try again"}`),a.disabled=!1,a.textContent="Reconnect"}}))}function n(s){if(!rA)return;rA.innerHTML=`
|
|
1760
1791
|
<div class="ap-sdk-panel__header">
|
|
1761
1792
|
<span class="ap-sdk-panel__title">
|
|
1762
1793
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
@@ -1769,7 +1800,7 @@ ${n}${r?`
|
|
|
1769
1800
|
<label class="ap-sdk-panel__label" for="ap-sdk-cfg-url">Backend URL</label>
|
|
1770
1801
|
<input id="ap-sdk-cfg-url" class="ap-sdk-panel__input" type="url"
|
|
1771
1802
|
placeholder="https://your-platform.example.com"
|
|
1772
|
-
value="${
|
|
1803
|
+
value="${sh(s)}" autocomplete="off" data-ap-cfg-url />
|
|
1773
1804
|
</div>
|
|
1774
1805
|
<p class="ap-sdk-config-hint">
|
|
1775
1806
|
You'll be asked to approve this connection on Agent Platform's own sign-in page.
|
|
@@ -1780,7 +1811,7 @@ ${n}${r?`
|
|
|
1780
1811
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-connect>Connect via Agent Platform</button>
|
|
1781
1812
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-cancel>Cancel</button>
|
|
1782
1813
|
</div>
|
|
1783
|
-
`;const
|
|
1814
|
+
`;const o=rA.querySelector("[data-ap-cfg-url]"),a=rA.querySelector("[data-ap-cfg-status]"),i=rA.querySelector("[data-ap-connect]");rA.querySelector("[data-ap-close]").addEventListener("click",()=>{yt()}),rA.querySelector("[data-ap-cancel]").addEventListener("click",()=>{yt()}),i.addEventListener("click",()=>T(null,null,function*(){const l=o.value.trim();if(!l){$t(a,"error","Backend URL is required.");return}i.disabled=!0,i.textContent="Connecting…",$t(a,null,"");try{const{code:u}=yield oc(l),{token:h,expiresAt:f}=yield Aa({backendUrl:l},u,window.location.origin),m=yield _u({backendUrl:l,token:h});if(m.length===0){$t(a,"error","No projects found — check your account permissions."),i.disabled=!1,i.textContent="Connect via Agent Platform";return}const Q=yu(window.location.href,m),U=Q?m.find(E=>E.id===Q):void 0;if(U){yt(),A({backendUrl:l,token:h,projectCode:U.key,expiresAt:f});return}r(l,h,f,m)}catch(u){$t(a,"error",`Could not connect — ${u instanceof Error?u.message:"please try again"}`),i.disabled=!1,i.textContent="Connect via Agent Platform"}})),setTimeout(()=>o.focus(),50)}function r(s,o,a,i){if(!rA)return;const l=i.map(f=>`<option value="${sh(f.key)}"${f.key===(e==null?void 0:e.projectCode)?" selected":""}>${cc(f.name)} (${cc(f.key)})</option>`).join("");rA.innerHTML=`
|
|
1784
1815
|
<div class="ap-sdk-panel__header">
|
|
1785
1816
|
<span class="ap-sdk-panel__title">
|
|
1786
1817
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
@@ -1793,7 +1824,7 @@ ${n}${r?`
|
|
|
1793
1824
|
<label class="ap-sdk-panel__label" for="ap-sdk-cfg-project">Project</label>
|
|
1794
1825
|
<select id="ap-sdk-cfg-project" class="ap-sdk-panel__input" data-ap-cfg-project>
|
|
1795
1826
|
<option value="">Select a project…</option>
|
|
1796
|
-
${
|
|
1827
|
+
${l}
|
|
1797
1828
|
</select>
|
|
1798
1829
|
</div>
|
|
1799
1830
|
</div>
|
|
@@ -1802,130 +1833,175 @@ ${n}${r?`
|
|
|
1802
1833
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-save>Save</button>
|
|
1803
1834
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-back>Back</button>
|
|
1804
1835
|
</div>
|
|
1805
|
-
`;const
|
|
1836
|
+
`;const u=rA.querySelector("[data-ap-cfg-project]"),h=rA.querySelector("[data-ap-cfg-status]");rA.querySelector("[data-ap-close]").addEventListener("click",()=>{yt()}),rA.querySelector("[data-ap-back]").addEventListener("click",()=>n(s)),rA.querySelector("[data-ap-save]").addEventListener("click",()=>{const f=u.value;if(!f){$t(h,"error","Please select a project.");return}yt(),A({backendUrl:s,token:o,projectCode:f,expiresAt:a})})}}function $t(A,e,t){if(!e){A.style.display="none",A.textContent="";return}A.style.display="block",A.className=`ap-sdk-panel__status ap-sdk-panel__status--${e}`,A.textContent=t}function sh(A){return A.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function cc(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const lc="ap-sdk-active-automation";function Rk(){try{const A=sessionStorage.getItem(lc);if(!A)return null;const e=JSON.parse(A);return e!=null&&e.taskId&&(e!=null&&e.backendUrl)&&(e!=null&&e.title)?e:null}catch(A){return null}}function oh(A){try{sessionStorage.setItem(lc,JSON.stringify(A))}catch(e){}}function ih(){try{sessionStorage.removeItem(lc)}catch(A){}}function uc(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var pn=uc();function ah(A){pn=A}var hn={exec:()=>null};function Ar(A){let e=[];return t=>{let n=Math.max(0,Math.min(3,t-1)),r=e[n];return r||(r=A(n),e[n]=r),r}}function tA(A,e=""){let t=typeof A=="string"?A:A.source,n={replace:(r,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(ne.caret,"$1"),t=t.replace(r,o),n},getRegex:()=>new RegExp(t,e)};return n}var Ok=((A="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+A)}catch(e){return!1}})(),ne={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:A=>new RegExp(`^( {0,3}${A})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:Ar(A=>new RegExp(`^ {0,${A}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:Ar(A=>new RegExp(`^ {0,${A}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:Ar(A=>new RegExp(`^ {0,${A}}(?:\`\`\`|~~~)`)),headingBeginRegex:Ar(A=>new RegExp(`^ {0,${A}}#`)),htmlBeginRegex:Ar(A=>new RegExp(`^ {0,${A}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:Ar(A=>new RegExp(`^ {0,${A}}>`))},Mk=/^(?:[ \t]*(?:\n|$))+/,Pk=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Kk=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jr=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Nk=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,dc=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,ch=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,lh=tA(ch).replace(/bull/g,dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),zk=tA(ch).replace(/bull/g,dc).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),pc=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,$k=/^[^\n]+/,hc=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Gk=tA(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",hc).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vk=tA(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,dc).getRegex(),No="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",fc=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Zk=tA("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",fc).replace("tag",No).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),uh=A=>tA(pc).replace("hr",jr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",A).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex(),Xk=uh(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Wk=uh(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Jk=tA(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Wk).getRegex(),gc={blockquote:Jk,code:Pk,def:Gk,fences:Kk,heading:Nk,hr:jr,html:Zk,lheading:lh,list:Vk,newline:Mk,paragraph:Xk,table:hn,text:$k},dh=tA("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",jr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex(),jk=$(k({},gc),{lheading:zk,table:dh,paragraph:tA(pc).replace("hr",jr).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",No).getRegex()}),Yk=$(k({},gc),{html:tA(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",fc).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:hn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:tA(pc).replace("hr",jr).replace("heading",` *#{1,6} *[^
|
|
1837
|
+
]`).replace("lheading",lh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),qk=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Av=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ph=/^( {2,}|\\)\n(?!\s*$)/,ev=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Ut=/[\p{P}\p{S}]/u,er=/[\s\p{P}\p{S}]/u,Yr=/[^\s\p{P}\p{S}]/u,tv=tA(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,er).getRegex(),nv=/[\p{Pi}\p{Ps}"']/u,hh=/(?!~)[\p{P}\p{S}]/u,rv=/(?!~)[\s\p{P}\p{S}]/u,sv=/(?:[^\s\p{P}\p{S}]|~)/u,ov=tA(/link|precode-code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-",Ok?"(?<!`)()":"(^^|[^`])").replace("code",new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),fh=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,iv=tA(fh,"u").replace(/punct/g,Ut).getRegex(),av=tA(fh,"u").replace(/punct/g,hh).getRegex(),cv=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,lv=tA(cv,"u").replace(/openQuote/g,nv).replace(/punct/g,Ut).getRegex(),gh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uv=tA(gh,"gu").replace(/notPunctSpace/g,Yr).replace(/punctSpace/g,er).replace(/punct/g,Ut).getRegex(),dv=tA(gh,"gu").replace(/notPunctSpace/g,sv).replace(/punctSpace/g,rv).replace(/punct/g,hh).getRegex(),pv="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",hv=tA(pv,"gu").replace(/notPunctSpace/g,Yr).replace(/punctSpace/g,er).replace(/punct/g,Ut).getRegex(),fv=tA("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Yr).replace(/punctSpace/g,er).replace(/punct/g,Ut).getRegex(),gv="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Bv=tA(gv,"gu").replace(/notPunctSpace/g,Yr).replace(/punctSpace/g,er).replace(/punct/g,Ut).getRegex(),wv=tA(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Ut).getRegex(),mv="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",Cv=tA(mv,"gu").replace(/notPunctSpace/g,Yr).replace(/punctSpace/g,er).replace(/punct/g,Ut).getRegex(),bv=tA(/\\(punct)/,"gu").replace(/punct/g,Ut).getRegex(),Qv=tA(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),yv=tA(fc).replace("(?:-->|$)","-->").getRegex(),Uv=tA("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",yv).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),zo=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,Ev=tA(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",zo).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Bh=tA(/^!?\[(label)\]\[(ref)\]/).replace("label",zo).replace("ref",hc).getRegex(),wh=tA(/^!?\[(ref)\](?:\[\])?/).replace("ref",hc).getRegex(),Fv=tA("reflink|nolink(?!\\()","g").replace("reflink",Bh).replace("nolink",wh).getRegex(),mh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Bc={_backpedal:hn,anyPunctuation:bv,autolink:Qv,blockSkip:ov,br:ph,code:Av,del:hn,delLDelim:hn,delRDelim:hn,emStrongLDelim:iv,emStrongRDelimAst:uv,emStrongRDelimUnd:fv,escape:qk,link:Ev,nolink:wh,punctuation:tv,reflink:Bh,reflinkSearch:Fv,tag:Uv,text:ev,url:hn},kv=$(k({},Bc),{emStrongLDelim:lv,emStrongRDelimAst:hv,emStrongRDelimUnd:Bv,link:tA(/^!?\[(label)\]\((.*?)\)/).replace("label",zo).getRegex(),reflink:tA(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",zo).getRegex()}),wc=$(k({},Bc),{emStrongRDelimAst:dv,emStrongLDelim:av,delLDelim:wv,delRDelim:Cv,url:tA(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",mh).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:tA(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",mh).getRegex()}),vv=$(k({},wc),{br:tA(ph).replace("{2,}","*").getRegex(),text:tA(wc.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),$o={normal:gc,gfm:jk,pedantic:Yk},qr={normal:Bc,gfm:wc,breaks:vv,pedantic:kv},_v={"&":"&","<":"<",">":">",'"':""","'":"'"},Ch=A=>_v[A];function ct(A,e){if(e){if(ne.escapeTest.test(A))return A.replace(ne.escapeReplace,Ch)}else if(ne.escapeTestNoEncode.test(A))return A.replace(ne.escapeReplaceNoEncode,Ch);return A}function bh(A){try{A=encodeURI(A).replace(ne.percentDecode,"%")}catch(e){return null}return A}function Qh(A,e){var s;let t=A.replace(ne.findPipe,(o,a,i)=>{let l=!1,u=a;for(;--u>=0&&i[u]==="\\";)l=!l;return l?"|":" |"}),n=t.split(ne.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!((s=n.at(-1))!=null&&s.trim())&&n.pop(),e)if(n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(ne.slashPipe,"|");return n}function Gt(A,e,t){let n=A.length;if(n===0)return"";let r=0;for(;r<n&&A.charAt(n-r-1)===e;)r++;return A.slice(0,n-r)}function yh(A){let e=A.split(`
|
|
1838
|
+
`),t=e.length-1;for(;t>=0&&ne.blankLine.test(e[t]);)t--;return e.length-t<=2?A:e.slice(0,t+1).join(`
|
|
1839
|
+
`)}function xv(A,e){if(A.indexOf(e[1])===-1)return-1;let t=0;for(let n=0;n<A.length;n++)if(A[n]==="\\")n++;else if(A[n]===e[0])t++;else if(A[n]===e[1]&&(t--,t<0))return n;return t>0?-2:-1}function Sv(A,e=0){let t=e,n="";for(let r of A)if(r===" "){let s=4-t%4;n+=" ".repeat(s),t+=s}else n+=r,t++;return n}function Uh(A,e,t,n,r){let s=e.href,o=e.title||null,a=A[1].replace(r.other.outputLinkReplace,"$1");n.state.inLink=!0;let i={type:A[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:o,text:a,tokens:n.inlineTokens(a)};return n.state.inLink=!1,i}function Iv(A,e,t){let n=A.match(t.other.indentCodeCompensation);if(n===null)return e;let r=n[1];return e.split(`
|
|
1840
|
+
`).map(s=>{let o=s.match(t.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=r.length?s.slice(r.length):s}).join(`
|
|
1841
|
+
`)}var Go=class{constructor(A){hA(this,"options");hA(this,"rules");hA(this,"lexer");this.options=A||pn}space(A){let e=this.rules.block.newline.exec(A);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(A){let e=this.rules.block.code.exec(A);if(e){let t=this.options.pedantic?e[0]:yh(e[0]),n=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:n}}}fences(A){let e=this.rules.block.fences.exec(A);if(e){let t=e[0],n=Iv(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:n}}}heading(A){let e=this.rules.block.heading.exec(A);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let n=Gt(t,"#");(this.options.pedantic||!n||this.rules.other.endingSpaceChar.test(n))&&(t=n.trim())}return{type:"heading",raw:Gt(e[0],`
|
|
1842
|
+
`),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(A){let e=this.rules.block.hr.exec(A);if(e)return{type:"hr",raw:Gt(e[0],`
|
|
1843
|
+
`)}}blockquote(A){let e=this.rules.block.blockquote.exec(A);if(e){let t=Gt(e[0],`
|
|
1844
|
+
`).split(`
|
|
1845
|
+
`),n="",r="",s=[];for(;t.length>0;){let o=!1,a=[],i;for(i=0;i<t.length;i++)if(this.rules.other.blockquoteStart.test(t[i]))a.push(t[i]),o=!0;else if(!o)a.push(t[i]);else break;t=t.slice(i);let l=a.join(`
|
|
1846
|
+
`),u=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
1847
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");n=n?`${n}
|
|
1848
|
+
${l}`:l,r=r?`${r}
|
|
1849
|
+
${u}`:u;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=h,t.length===0)break;let f=s.at(-1);if((f==null?void 0:f.type)==="code")break;if((f==null?void 0:f.type)==="blockquote"){let g=f,m=t.join(`
|
|
1850
|
+
`),Q=g.raw+`
|
|
1851
|
+
`+m.replace(this.rules.other.blockquoteSetextReplace2,""),U=this.blockquote(Q);s[s.length-1]=U,n=`${n}
|
|
1852
|
+
${m}`,r=r.substring(0,r.length-g.text.length)+U.text;break}else if((f==null?void 0:f.type)==="list"){let g=f,m=g.raw+`
|
|
1853
|
+
`+t.join(`
|
|
1854
|
+
`),Q=this.list(m);s[s.length-1]=Q,n=n.substring(0,n.length-f.raw.length)+Q.raw,r=r.substring(0,r.length-g.raw.length)+Q.raw,t=m.substring(s.at(-1).raw.length).split(`
|
|
1855
|
+
`);continue}}return{type:"blockquote",raw:n,tokens:s,text:r}}}list(A){let e=this.rules.block.list.exec(A);if(e){let t=e[1].trim(),n=t.length>1,r={type:"list",raw:"",ordered:n,start:n?+t.slice(0,-1):"",loose:!1,items:[]};t=n?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=n?t:"[*+-]");let s=this.rules.other.listItemRegex(t),o=!1;for(;A;){let i=!1,l="",u="";if(!(e=s.exec(A))||this.rules.block.hr.test(A))break;l=e[0],A=A.substring(l.length);let h=Sv(e[2].split(`
|
|
1856
|
+
`,1)[0],e[1].length),f=A.split(`
|
|
1857
|
+
`,1)[0],g=!h.trim(),m=0;if(this.options.pedantic?(m=2,u=h.trimStart()):g?m=e[1].length+1:(m=h.search(this.rules.other.nonSpaceChar),m=m>4?1:m,u=h.slice(m),m+=e[1].length),g&&this.rules.other.blankLine.test(f)&&(l+=f+`
|
|
1858
|
+
`,A=A.substring(f.length+1),i=!0),!i){let Q=this.rules.other.nextBulletRegex(m),U=this.rules.other.hrRegex(m),E=this.rules.other.fencesBeginRegex(m),v=this.rules.other.headingBeginRegex(m),F=this.rules.other.htmlBeginRegex(m),y=this.rules.other.blockquoteBeginRegex(m);for(;A;){let x=A.split(`
|
|
1859
|
+
`,1)[0],R;if(f=x,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),R=f):R=f.replace(this.rules.other.tabCharGlobal," "),E.test(f)||v.test(f)||F.test(f)||y.test(f)||Q.test(f)||U.test(f))break;if(R.search(this.rules.other.nonSpaceChar)>=m||!f.trim())u+=`
|
|
1860
|
+
`+R.slice(m);else{if(g||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||E.test(h)||v.test(h)||U.test(h))break;u+=`
|
|
1861
|
+
`+f}g=!f.trim(),l+=x+`
|
|
1862
|
+
`,A=A.substring(x.length+1),h=R.slice(m)}}r.loose||(o?r.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0)),r.items.push({type:"list_item",raw:l,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),r.raw+=l}let a=r.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let i of r.items){this.lexer.state.top=!1,i.tokens=this.lexer.blockTokens(i.text,[]);let l=i.tokens[0];if(i.task&&((l==null?void 0:l.type)==="text"||(l==null?void 0:l.type)==="paragraph")){i.text=i.text.replace(this.rules.other.listReplaceTask,""),l.raw=l.raw.replace(this.rules.other.listReplaceTask,""),l.text=l.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(i.raw);if(u){let h={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};i.checked=h.checked,r.loose?i.tokens[0]&&["paragraph","text"].includes(i.tokens[0].type)&&"tokens"in i.tokens[0]&&i.tokens[0].tokens?(i.tokens[0].raw=h.raw+i.tokens[0].raw,i.tokens[0].text=h.raw+i.tokens[0].text,i.tokens[0].tokens.unshift(h)):i.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):i.tokens.unshift(h)}}else i.task&&(i.task=!1);if(!r.loose){let u=i.tokens.filter(f=>f.type==="space"),h=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));r.loose=h}}if(r.loose)for(let i of r.items){i.loose=!0;for(let l of i.tokens)l.type==="text"&&(l.type="paragraph")}return r}}html(A){let e=this.rules.block.html.exec(A);if(e){let t=yh(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(A){let e=this.rules.block.def.exec(A);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),n=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:Gt(e[0],`
|
|
1863
|
+
`),href:n,title:r}}}table(A){var o;let e=this.rules.block.table.exec(A);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=Qh(e[1]),n=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(o=e[3])!=null&&o.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
1864
|
+
`):[],s={type:"table",raw:Gt(e[0],`
|
|
1865
|
+
`),header:[],align:[],rows:[]};if(t.length===n.length){for(let a of n)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<t.length;a++)s.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:s.align[a]});for(let a of r)s.rows.push(Qh(a,s.header.length).map((i,l)=>({text:i,tokens:this.lexer.inline(i),header:!1,align:s.align[l]})));return s}}lheading(A){let e=this.rules.block.lheading.exec(A);if(e){let t=e[1].trim();return{type:"heading",raw:Gt(e[0],`
|
|
1866
|
+
`),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(A){let e=this.rules.block.paragraph.exec(A);if(e){let t=e[1].charAt(e[1].length-1)===`
|
|
1867
|
+
`?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(A){let e=this.rules.block.text.exec(A);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(A){let e=this.rules.inline.escape.exec(A);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(A){let e=this.rules.inline.tag.exec(A);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(A){let e=this.rules.inline.link.exec(A);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let s=Gt(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=xv(e[2],"()");if(s===-2)return;if(s>-1){let o=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,o).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(n);s&&(n=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?n=n.slice(1):n=n.slice(1,-1)),Uh(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(A,e){let t;if((t=this.rules.inline.reflink.exec(A))||(t=this.rules.inline.nolink.exec(A))){let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[n.toLowerCase()];if(!r){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return Uh(t,r,t[0],this.lexer,this.rules)}}emStrong(A,e,t=""){let n=this.rules.inline.emStrongLDelim.exec(A);if(!(!n||!n[1]&&!n[2]&&!n[3]&&!n[4]||n[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(n[1]||n[3])||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,s,o,a=r,i=0,l=n[0][0],u=t===l,h=l==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*A.length+r);(n=h.exec(e))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s)continue;if(o=[...s].length,n[3]||n[4]){a+=o;continue}else if(n[5]||n[6]){if(r%3&&!((r+o)%3)){i+=o;continue}if(u)break}if(a-=o,a>0)continue;o=Math.min(o,o+a+i);let f=[...n[0]][0].length,g=A.slice(0,r+n.index+f+o);if(Math.min(r,o)%2){let Q=g.slice(1,-1);return{type:"em",raw:g,text:Q,tokens:this.lexer.inlineTokens(Q)}}let m=g.slice(2,-2);return{type:"strong",raw:g,text:m,tokens:this.lexer.inlineTokens(m)}}}}codespan(A){let e=this.rules.inline.code.exec(A);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),n=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return n&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(A){let e=this.rules.inline.br.exec(A);if(e)return{type:"br",raw:e[0]}}del(A,e,t=""){let n=this.rules.inline.delLDelim.exec(A);if(n&&(!n[1]||!t||this.rules.inline.punctuation.exec(t))){let r=[...n[0]].length-1,s,o,a=r,i=this.rules.inline.delRDelim;for(i.lastIndex=0,e=e.slice(-1*A.length+r);(n=i.exec(e))!==null;){if(s=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!s||(o=[...s].length,o!==r))continue;if(n[3]||n[4]){a+=o;continue}if(a-=o,a>0)continue;o=Math.min(o,o+a);let l=[...n[0]][0].length,u=A.slice(0,r+n.index+l+o),h=u.slice(r,-r);return{type:"del",raw:u,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(A){let e=this.rules.inline.autolink.exec(A);if(e){let t,n;return e[2]==="@"?(t=e[1],n="mailto:"+t):(t=e[1],n=t),{type:"link",raw:e[0],text:t,href:n,tokens:[{type:"text",raw:t,text:t}]}}}url(A){var t,n;let e;if(e=this.rules.inline.url.exec(A)){let r,s;if(e[2]==="@")r=e[0],s="mailto:"+r;else{let o;do o=e[0],e[0]=(n=(t=this.rules.inline._backpedal.exec(e[0]))==null?void 0:t[0])!=null?n:"";while(o!==e[0]);r=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(A){let e=this.rules.inline.text.exec(A);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},$e=class tl{constructor(e){hA(this,"tokens");hA(this,"options");hA(this,"state");hA(this,"inlineQueue");hA(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||pn,this.options.tokenizer=this.options.tokenizer||new Go,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:ne,block:$o.normal,inline:qr.normal};this.options.pedantic?(t.block=$o.pedantic,t.inline=qr.pedantic):this.options.gfm&&(t.block=$o.gfm,this.options.breaks?t.inline=qr.breaks:t.inline=qr.gfm),this.tokenizer.rules=t}static get rules(){return{block:$o,inline:qr}}static lex(e,t){return new tl(t).lex(e)}static lexInline(e,t){return new tl(t).inlineTokens(e)}lex(e){e=e.replace(ne.carriageReturn,`
|
|
1868
|
+
`),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let n=this.inlineQueue[t];this.inlineTokens(n.src,n.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){var s,o,a;this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(ne.tabCharGlobal," ").replace(ne.spaceLine,""));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(u=>(i=u.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let u=t.at(-1);i.raw.length===1&&u!==void 0?u.raw+=`
|
|
1869
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
1870
|
+
`)?"":`
|
|
1871
|
+
`)+i.raw,u.text+=`
|
|
1872
|
+
`+i.text,this.inlineQueue.at(-1).src=u.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="paragraph"||(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
1873
|
+
`)?"":`
|
|
1874
|
+
`)+i.raw,u.text+=`
|
|
1875
|
+
`+i.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let l=e;if((a=this.options.extensions)!=null&&a.startBlock){let u=1/0,h=e.slice(1),f;this.options.extensions.startBlock.forEach(g=>{f=g.call({lexer:this},h),typeof f=="number"&&f>=0&&(u=Math.min(u,f))}),u<1/0&&u>=0&&(l=e.substring(0,u+1))}if(this.state.top&&(i=this.tokenizer.paragraph(l))){let u=t.at(-1);n&&(u==null?void 0:u.type)==="paragraph"?(u.raw+=(u.raw.endsWith(`
|
|
1876
|
+
`)?"":`
|
|
1877
|
+
`)+i.raw,u.text+=`
|
|
1878
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(i),n=l.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let u=t.at(-1);(u==null?void 0:u.type)==="text"?(u.raw+=(u.raw.endsWith(`
|
|
1879
|
+
`)?"":`
|
|
1880
|
+
`)+i.raw,u.text+=`
|
|
1881
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){var a,i,l,u,h,f;this.tokenizer.lexer=this;let n=e;if(this.tokens.links){let g=Object.keys(this.tokens.links);g.length>0&&(n=n.replace(this.tokenizer.rules.inline.reflinkSearch,m=>g.includes(m.slice(m.lastIndexOf("[")+1,-1))?"["+"a".repeat(m.length-2)+"]":m))}n=n.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),n=n.replace(this.tokenizer.rules.inline.blockSkip,(g,m,Q)=>{let U=Q?Q.length:0;return g.slice(0,U)+"["+"a".repeat(g.length-U-2)+"]"}),n=(l=(i=(a=this.options.hooks)==null?void 0:a.emStrongMask)==null?void 0:i.call({lexer:this},n))!=null?l:n;let r=!1,s="",o=1/0;for(;e;){if(e.length<o)o=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}r||(s=""),r=!1;let g;if((h=(u=this.options.extensions)==null?void 0:u.inline)!=null&&h.some(Q=>(g=Q.call({lexer:this},e,t))?(e=e.substring(g.raw.length),t.push(g),!0):!1))continue;if(g=this.tokenizer.escape(e)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.tag(e)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.link(e)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(g.raw.length);let Q=t.at(-1);g.type==="text"&&(Q==null?void 0:Q.type)==="text"?(Q.raw+=g.raw,Q.text+=g.text):t.push(g);continue}if(g=this.tokenizer.emStrong(e,n,s)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.codespan(e)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.br(e)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.del(e,n,s)){e=e.substring(g.raw.length),t.push(g);continue}if(g=this.tokenizer.autolink(e)){e=e.substring(g.raw.length),t.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(e))){e=e.substring(g.raw.length),t.push(g);continue}let m=e;if((f=this.options.extensions)!=null&&f.startInline){let Q=1/0,U=e.slice(1),E;this.options.extensions.startInline.forEach(v=>{E=v.call({lexer:this},U),typeof E=="number"&&E>=0&&(Q=Math.min(Q,E))}),Q<1/0&&Q>=0&&(m=e.substring(0,Q+1))}if(g=this.tokenizer.inlineText(m)){e=e.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(s=g.raw.slice(-1)),r=!0;let Q=t.at(-1);(Q==null?void 0:Q.type)==="text"?(Q.raw+=g.raw,Q.text+=g.text):t.push(g);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},Vo=class{constructor(A){hA(this,"options");hA(this,"parser");this.options=A||pn}space(A){return""}code({text:A,lang:e,escaped:t}){var s;let n=(s=(e||"").match(ne.notSpaceStart))==null?void 0:s[0],r=A.replace(ne.endingNewline,"")+`
|
|
1882
|
+
`;return n?'<pre><code class="language-'+ct(n)+'">'+(t?r:ct(r,!0))+`</code></pre>
|
|
1883
|
+
`:"<pre><code>"+(t?r:ct(r,!0))+`</code></pre>
|
|
1884
|
+
`}blockquote({tokens:A}){return`<blockquote>
|
|
1885
|
+
${this.parser.parse(A)}</blockquote>
|
|
1886
|
+
`}html({text:A}){return A}def(A){return""}heading({tokens:A,depth:e}){return`<h${e}>${this.parser.parseInline(A)}</h${e}>
|
|
1887
|
+
`}hr(A){return`<hr>
|
|
1888
|
+
`}list(A){let e=A.ordered,t=A.start,n="";for(let o=0;o<A.items.length;o++){let a=A.items[o];n+=this.listitem(a)}let r=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+r+s+`>
|
|
1889
|
+
`+n+"</"+r+`>
|
|
1890
|
+
`}listitem(A){return`<li>${this.parser.parse(A.tokens)}</li>
|
|
1891
|
+
`}checkbox({checked:A}){return"<input "+(A?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:A}){return`<p>${this.parser.parseInline(A)}</p>
|
|
1892
|
+
`}table(A){let e="",t="";for(let r=0;r<A.header.length;r++)t+=this.tablecell(A.header[r]);e+=this.tablerow({text:t});let n="";for(let r=0;r<A.rows.length;r++){let s=A.rows[r];t="";for(let o=0;o<s.length;o++)t+=this.tablecell(s[o]);n+=this.tablerow({text:t})}return n&&(n=`<tbody>${n}</tbody>`),`<table>
|
|
1893
|
+
<thead>
|
|
1894
|
+
`+e+`</thead>
|
|
1895
|
+
`+n+`</table>
|
|
1896
|
+
`}tablerow({text:A}){return`<tr>
|
|
1897
|
+
${A}</tr>
|
|
1898
|
+
`}tablecell(A){let e=this.parser.parseInline(A.tokens),t=A.header?"th":"td";return(A.align?`<${t} align="${A.align}">`:`<${t}>`)+e+`</${t}>
|
|
1899
|
+
`}strong({tokens:A}){return`<strong>${this.parser.parseInline(A)}</strong>`}em({tokens:A}){return`<em>${this.parser.parseInline(A)}</em>`}codespan({text:A}){return`<code>${ct(A,!0)}</code>`}br(A){return"<br>"}del({tokens:A}){return`<del>${this.parser.parseInline(A)}</del>`}link({href:A,title:e,tokens:t}){let n=this.parser.parseInline(t),r=bh(A);if(r===null)return n;A=r;let s='<a href="'+A+'"';return e&&(s+=' title="'+ct(e)+'"'),s+=">"+n+"</a>",s}image({href:A,title:e,text:t,tokens:n}){n&&(t=this.parser.parseInline(n,this.parser.textRenderer));let r=bh(A);if(r===null)return ct(t);A=r;let s=`<img src="${A}" alt="${ct(t)}"`;return e&&(s+=` title="${ct(e)}"`),s+=">",s}text(A){return"tokens"in A&&A.tokens?this.parser.parseInline(A.tokens):"escaped"in A&&A.escaped?A.text:ct(A.text)}},mc=class{strong({text:A}){return A}em({text:A}){return A}codespan({text:A}){return A}del({text:A}){return A}html({text:A}){return A}text({text:A}){return A}link({text:A}){return""+A}image({text:A}){return""+A}br(){return""}checkbox({raw:A}){return A}},Ge=class nl{constructor(e){hA(this,"options");hA(this,"renderer");hA(this,"textRenderer");this.options=e||pn,this.options.renderer=this.options.renderer||new Vo,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new mc}static parse(e,t){return new nl(t).parse(e)}static parseInline(e,t){return new nl(t).parseInline(e)}parse(e){var n,r;this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let o=e[s];if((r=(n=this.options.extensions)==null?void 0:n.renderers)!=null&&r[o.type]){let i=o,l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(i.type)){t+=l||"";continue}}let a=o;switch(a.type){case"space":{t+=this.renderer.space(a);break}case"hr":{t+=this.renderer.hr(a);break}case"heading":{t+=this.renderer.heading(a);break}case"code":{t+=this.renderer.code(a);break}case"table":{t+=this.renderer.table(a);break}case"blockquote":{t+=this.renderer.blockquote(a);break}case"list":{t+=this.renderer.list(a);break}case"checkbox":{t+=this.renderer.checkbox(a);break}case"html":{t+=this.renderer.html(a);break}case"def":{t+=this.renderer.def(a);break}case"paragraph":{t+=this.renderer.paragraph(a);break}case"text":{t+=this.renderer.text(a);break}default:{let i='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return t}parseInline(e,t=this.renderer){var r,s;this.renderer.parser=this;let n="";for(let o=0;o<e.length;o++){let a=e[o];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[a.type]){let l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(a.type)){n+=l||"";continue}}let i=a;switch(i.type){case"escape":{n+=t.text(i);break}case"html":{n+=t.html(i);break}case"link":{n+=t.link(i);break}case"image":{n+=t.image(i);break}case"checkbox":{n+=t.checkbox(i);break}case"strong":{n+=t.strong(i);break}case"em":{n+=t.em(i);break}case"codespan":{n+=t.codespan(i);break}case"br":{n+=t.br(i);break}case"del":{n+=t.del(i);break}case"text":{n+=t.text(i);break}default:{let l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}},As=(fi=class{constructor(A){hA(this,"options");hA(this,"block");this.options=A||pn}preprocess(A){return A}postprocess(A){return A}processAllTokens(A){return A}emStrongMask(A){return A}provideLexer(A=this.block){return A?$e.lex:$e.lexInline}provideParser(A=this.block){return A?Ge.parse:Ge.parseInline}},hA(fi,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),hA(fi,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),fi),Tv=class{constructor(...A){hA(this,"defaults",uc());hA(this,"options",this.setOptions);hA(this,"parse",this.parseMarkdown(!0));hA(this,"parseInline",this.parseMarkdown(!1));hA(this,"Parser",Ge);hA(this,"Renderer",Vo);hA(this,"TextRenderer",mc);hA(this,"Lexer",$e);hA(this,"Tokenizer",Go);hA(this,"Hooks",As);this.use(...A)}walkTokens(A,e){var n,r;let t=[];for(let s of A)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let o=s;for(let a of o.header)t=t.concat(this.walkTokens(a.tokens,e));for(let a of o.rows)for(let i of a)t=t.concat(this.walkTokens(i.tokens,e));break}case"list":{let o=s;t=t.concat(this.walkTokens(o.items,e));break}default:{let o=s;(r=(n=this.defaults.extensions)==null?void 0:n.childTokens)!=null&&r[o.type]?this.defaults.extensions.childTokens[o.type].forEach(a=>{let i=o[a].flat(1/0);t=t.concat(this.walkTokens(i,e))}):o.tokens&&(t=t.concat(this.walkTokens(o.tokens,e)))}}return t}use(...A){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return A.forEach(t=>{let n=k({},t);if(n.async=this.defaults.async||n.async||!1,t.extensions&&(t.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){let s=e.renderers[r.name];s?e.renderers[r.name]=function(...o){let a=r.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),n.extensions=e),t.renderer){let r=this.defaults.renderer||new Vo(this.defaults);for(let s in t.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,a=t.renderer[o],i=r[o];r[o]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=i.apply(r,l)),u||""}}n.renderer=r}if(t.tokenizer){let r=this.defaults.tokenizer||new Go(this.defaults);for(let s in t.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,a=t.tokenizer[o],i=r[o];r[o]=(...l)=>{let u=a.apply(r,l);return u===!1&&(u=i.apply(r,l)),u}}n.tokenizer=r}if(t.hooks){let r=this.defaults.hooks||new As;for(let s in t.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,a=t.hooks[o],i=r[o];As.passThroughHooks.has(s)?r[o]=l=>{if(this.defaults.async&&As.passThroughHooksRespectAsync.has(s))return T(this,null,function*(){let h=yield a.call(r,l);return i.call(r,h)});let u=a.call(r,l);return i.call(r,u)}:r[o]=(...l)=>{if(this.defaults.async)return T(this,null,function*(){let h=yield a.apply(r,l);return h===!1&&(h=yield i.apply(r,l)),h});let u=a.apply(r,l);return u===!1&&(u=i.apply(r,l)),u}}n.hooks=r}if(t.walkTokens){let r=this.defaults.walkTokens,s=t.walkTokens;n.walkTokens=function(o){let a=[];return a.push(s.call(this,o)),r&&(a=a.concat(r.call(this,o))),a}}this.defaults=k(k({},this.defaults),n)}),this}setOptions(A){return this.defaults=k(k({},this.defaults),A),this}lexer(A,e){return $e.lex(A,e!=null?e:this.defaults)}parser(A,e){return Ge.parse(A,e!=null?e:this.defaults)}parseMarkdown(A){return(e,t)=>{let n=k({},t),r=k(k({},this.defaults),n),s=this.onError(!!r.silent,!!r.async);if(this.defaults.async===!0&&n.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(r.hooks&&(r.hooks.options=r,r.hooks.block=A),r.async)return T(this,null,function*(){let o=r.hooks?yield r.hooks.preprocess(e):e,a=yield(r.hooks?yield r.hooks.provideLexer(A):A?$e.lex:$e.lexInline)(o,r),i=r.hooks?yield r.hooks.processAllTokens(a):a;r.walkTokens&&(yield Promise.all(this.walkTokens(i,r.walkTokens)));let l=yield(r.hooks?yield r.hooks.provideParser(A):A?Ge.parse:Ge.parseInline)(i,r);return r.hooks?yield r.hooks.postprocess(l):l}).catch(s);try{r.hooks&&(e=r.hooks.preprocess(e));let o=(r.hooks?r.hooks.provideLexer(A):A?$e.lex:$e.lexInline)(e,r);r.hooks&&(o=r.hooks.processAllTokens(o)),r.walkTokens&&this.walkTokens(o,r.walkTokens);let a=(r.hooks?r.hooks.provideParser(A):A?Ge.parse:Ge.parseInline)(o,r);return r.hooks&&(a=r.hooks.postprocess(a)),a}catch(o){return s(o)}}}onError(A,e){return t=>{if(t.message+=`
|
|
1900
|
+
Please report this to https://github.com/markedjs/marked.`,A){let n="<p>An error occurred:</p><pre>"+ct(t.message+"",!0)+"</pre>";return e?Promise.resolve(n):n}if(e)return Promise.reject(t);throw t}}},fn=new Tv;function dA(A,e){return fn.parse(A,e)}dA.options=dA.setOptions=function(A){return fn.setOptions(A),dA.defaults=fn.defaults,ah(dA.defaults),dA},dA.getDefaults=uc,dA.defaults=pn;function Hv(...A){return fn.use(...A),dA.defaults=fn.defaults,ah(dA.defaults),dA}dA.use=Hv,dA.walkTokens=function(A,e){return fn.walkTokens(A,e)},dA.parseInline=fn.parseInline,dA.Parser=Ge,dA.parser=Ge.parse,dA.Renderer=Vo,dA.TextRenderer=mc,dA.Lexer=$e,dA.lexer=$e.lex,dA.Tokenizer=Go,dA.Hooks=As,dA.parse=dA,dA.options,dA.setOptions,dA.walkTokens,dA.parseInline,Ge.parse,$e.lex;/*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */const{entries:Eh,setPrototypeOf:Fh,isFrozen:Lv,getPrototypeOf:Dv,getOwnPropertyDescriptor:Rv}=Object;let{freeze:ae,seal:Ie,create:Cc}=Object,{apply:bc,construct:Qc}=typeof Reflect!="undefined"&&Reflect;ae||(ae=function(e){return e}),Ie||(Ie=function(e){return e}),bc||(bc=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),s=2;s<n;s++)r[s-2]=arguments[s];return e.apply(t,r)}),Qc||(Qc=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)});const Zo=le(Array.prototype.forEach),Ov=le(Array.prototype.lastIndexOf),kh=le(Array.prototype.pop),es=le(Array.prototype.push),Mv=le(Array.prototype.splice),Xo=le(String.prototype.toLowerCase),yc=le(String.prototype.toString),Uc=le(String.prototype.match),ts=le(String.prototype.replace),Pv=le(String.prototype.indexOf),Kv=le(String.prototype.trim),Ve=le(Object.prototype.hasOwnProperty),ce=le(RegExp.prototype.test),ns=Nv(TypeError);function le(A){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return bc(A,e,n)}}function Nv(A){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qc(A,t)}}function eA(A,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Xo;Fh&&Fh(A,null);let n=e.length;for(;n--;){let r=e[n];if(typeof r=="string"){const s=t(r);s!==r&&(Lv(e)||(e[n]=s),r=s)}A[r]=!0}return A}function zv(A){for(let e=0;e<A.length;e++)Ve(A,e)||(A[e]=null);return A}function lt(A){const e=Cc(null);for(const[t,n]of Eh(A))Ve(A,t)&&(Array.isArray(n)?e[t]=zv(n):n&&typeof n=="object"&&n.constructor===Object?e[t]=lt(n):e[t]=n);return e}function rs(A,e){for(;A!==null;){const n=Rv(A,e);if(n){if(n.get)return le(n.get);if(typeof n.value=="function")return le(n.value)}A=Dv(A)}function t(){return null}return t}const vh=ae(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Ec=ae(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Fc=ae(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),$v=ae(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),kc=ae(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Gv=ae(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),_h=ae(["#text"]),xh=ae(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),vc=ae(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Sh=ae(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Wo=ae(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vv=Ie(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Zv=Ie(/<%[\w\W]*|[\w\W]*%>/gm),Xv=Ie(/\$\{[\w\W]*/gm),Wv=Ie(/^data-[\-\w.\u00B7-\uFFFF]+$/),Jv=Ie(/^aria-[\-\w]+$/),Ih=Ie(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),jv=Ie(/^(?:\w+script|data):/i),Yv=Ie(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Th=Ie(/^html$/i),qv=Ie(/^[a-z][.\w]*(-[.\w]+)+$/i);var Hh=Object.freeze({__proto__:null,ARIA_ATTR:Jv,ATTR_WHITESPACE:Yv,CUSTOM_ELEMENT:qv,DATA_ATTR:Wv,DOCTYPE_NAME:Th,ERB_EXPR:Zv,IS_ALLOWED_URI:Ih,IS_SCRIPT_OR_DATA:jv,MUSTACHE_EXPR:Vv,TMPLIT_EXPR:Xv});const ss={element:1,text:3,progressingInstruction:7,comment:8,document:9},A_=function(){return typeof window=="undefined"?null:window},e_=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch(o){return console.warn("TrustedTypes policy "+s+" could not be created."),null}},Lh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Dh(){let A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:A_();const e=V=>Dh(V);if(e.version="3.3.1",e.removed=[],!A||!A.document||A.document.nodeType!==ss.document||!A.Element)return e.isSupported=!1,e;let{document:t}=A;const n=t,r=n.currentScript,{DocumentFragment:s,HTMLTemplateElement:o,Node:a,Element:i,NodeFilter:l,NamedNodeMap:u=A.NamedNodeMap||A.MozNamedAttrMap,HTMLFormElement:h,DOMParser:f,trustedTypes:g}=A,m=i.prototype,Q=rs(m,"cloneNode"),U=rs(m,"remove"),E=rs(m,"nextSibling"),v=rs(m,"childNodes"),F=rs(m,"parentNode");if(typeof o=="function"){const V=t.createElement("template");V.content&&V.content.ownerDocument&&(t=V.content.ownerDocument)}let y,x="";const{implementation:R,createNodeIterator:I,createDocumentFragment:K,getElementsByTagName:N}=t,{importNode:Z}=n;let X=Lh();e.isSupported=typeof Eh=="function"&&typeof F=="function"&&R&&R.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:aA,ERB_EXPR:fA,TMPLIT_EXPR:PA,DATA_ATTR:Ce,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:Je,ATTR_WHITESPACE:pr,CUSTOM_ELEMENT:fs}=Hh;let{IS_ALLOWED_URI:ht}=Hh,bA=null;const ft=eA({},[...vh,...Ec,...Fc,...kc,..._h]);let gA=null;const En=eA({},[...xh,...vc,...Sh,...Wo]);let BA=Object.seal(Cc(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),se=null,Fn=null;const je=Object.seal(Cc(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let SA=!0,OA=!0,kn=!1,Wt=!0,ZA=!1,gt=!0,De=!1,Re=!1,Ft=!1,IA=!1,Bt=!1,vn=!1,gi=!0,gs=!1;const zc="user-content-";let Bs=!0,_n=!1,Jt={},he=null;const ws=eA({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let wA=null;const Bi=eA({},["audio","video","img","source","image","track"]);let ms=null;const wi=eA({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hr="http://www.w3.org/1998/Math/MathML",fr="http://www.w3.org/2000/svg",Ye="http://www.w3.org/1999/xhtml";let jt=Ye,xn=!1,Sn=null;const $c=eA({},[hr,fr,Ye],yc);let gr=eA({},["mi","mo","mn","ms","mtext"]),Br=eA({},["annotation-xml"]);const Gc=eA({},["title","style","font","a","script"]);let kt=null;const qe=["application/xhtml+xml","text/html"],Vc="text/html";let mA=null,Yt=null;const mi=t.createElement("form"),Cs=function(b){return b instanceof RegExp||b instanceof Function},wr=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Yt&&Yt===b)){if((!b||typeof b!="object")&&(b={}),b=lt(b),kt=qe.indexOf(b.PARSER_MEDIA_TYPE)===-1?Vc:b.PARSER_MEDIA_TYPE,mA=kt==="application/xhtml+xml"?yc:Xo,bA=Ve(b,"ALLOWED_TAGS")?eA({},b.ALLOWED_TAGS,mA):ft,gA=Ve(b,"ALLOWED_ATTR")?eA({},b.ALLOWED_ATTR,mA):En,Sn=Ve(b,"ALLOWED_NAMESPACES")?eA({},b.ALLOWED_NAMESPACES,yc):$c,ms=Ve(b,"ADD_URI_SAFE_ATTR")?eA(lt(wi),b.ADD_URI_SAFE_ATTR,mA):wi,wA=Ve(b,"ADD_DATA_URI_TAGS")?eA(lt(Bi),b.ADD_DATA_URI_TAGS,mA):Bi,he=Ve(b,"FORBID_CONTENTS")?eA({},b.FORBID_CONTENTS,mA):ws,se=Ve(b,"FORBID_TAGS")?eA({},b.FORBID_TAGS,mA):lt({}),Fn=Ve(b,"FORBID_ATTR")?eA({},b.FORBID_ATTR,mA):lt({}),Jt=Ve(b,"USE_PROFILES")?b.USE_PROFILES:!1,SA=b.ALLOW_ARIA_ATTR!==!1,OA=b.ALLOW_DATA_ATTR!==!1,kn=b.ALLOW_UNKNOWN_PROTOCOLS||!1,Wt=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ZA=b.SAFE_FOR_TEMPLATES||!1,gt=b.SAFE_FOR_XML!==!1,De=b.WHOLE_DOCUMENT||!1,IA=b.RETURN_DOM||!1,Bt=b.RETURN_DOM_FRAGMENT||!1,vn=b.RETURN_TRUSTED_TYPE||!1,Ft=b.FORCE_BODY||!1,gi=b.SANITIZE_DOM!==!1,gs=b.SANITIZE_NAMED_PROPS||!1,Bs=b.KEEP_CONTENT!==!1,_n=b.IN_PLACE||!1,ht=b.ALLOWED_URI_REGEXP||Ih,jt=b.NAMESPACE||Ye,gr=b.MATHML_TEXT_INTEGRATION_POINTS||gr,Br=b.HTML_INTEGRATION_POINTS||Br,BA=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&Cs(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(BA.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&Cs(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(BA.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(BA.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ZA&&(OA=!1),Bt&&(IA=!0),Jt&&(bA=eA({},_h),gA=[],Jt.html===!0&&(eA(bA,vh),eA(gA,xh)),Jt.svg===!0&&(eA(bA,Ec),eA(gA,vc),eA(gA,Wo)),Jt.svgFilters===!0&&(eA(bA,Fc),eA(gA,vc),eA(gA,Wo)),Jt.mathMl===!0&&(eA(bA,kc),eA(gA,Sh),eA(gA,Wo))),b.ADD_TAGS&&(typeof b.ADD_TAGS=="function"?je.tagCheck=b.ADD_TAGS:(bA===ft&&(bA=lt(bA)),eA(bA,b.ADD_TAGS,mA))),b.ADD_ATTR&&(typeof b.ADD_ATTR=="function"?je.attributeCheck=b.ADD_ATTR:(gA===En&&(gA=lt(gA)),eA(gA,b.ADD_ATTR,mA))),b.ADD_URI_SAFE_ATTR&&eA(ms,b.ADD_URI_SAFE_ATTR,mA),b.FORBID_CONTENTS&&(he===ws&&(he=lt(he)),eA(he,b.FORBID_CONTENTS,mA)),b.ADD_FORBID_CONTENTS&&(he===ws&&(he=lt(he)),eA(he,b.ADD_FORBID_CONTENTS,mA)),Bs&&(bA["#text"]=!0),De&&eA(bA,["html","head","body"]),bA.table&&(eA(bA,["tbody"]),delete se.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw ns('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ns('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');y=b.TRUSTED_TYPES_POLICY,x=y.createHTML("")}else y===void 0&&(y=e_(g,r)),y!==null&&typeof x=="string"&&(x=y.createHTML(""));ae&&ae(b),Yt=b}},bs=eA({},[...Ec,...Fc,...$v]),Ci=eA({},[...kc,...Gv]),Zc=function(b){let H=F(b);(!H||!H.tagName)&&(H={namespaceURI:jt,tagName:"template"});const M=Xo(b.tagName),pA=Xo(H.tagName);return Sn[b.namespaceURI]?b.namespaceURI===fr?H.namespaceURI===Ye?M==="svg":H.namespaceURI===hr?M==="svg"&&(pA==="annotation-xml"||gr[pA]):!!bs[M]:b.namespaceURI===hr?H.namespaceURI===Ye?M==="math":H.namespaceURI===fr?M==="math"&&Br[pA]:!!Ci[M]:b.namespaceURI===Ye?H.namespaceURI===fr&&!Br[pA]||H.namespaceURI===hr&&!gr[pA]?!1:!Ci[M]&&(Gc[M]||!bs[M]):!!(kt==="application/xhtml+xml"&&Sn[b.namespaceURI]):!1},Oe=function(b){es(e.removed,{element:b});try{F(b).removeChild(b)}catch(H){U(b)}},Me=function(b,H){try{es(e.removed,{attribute:H.getAttributeNode(b),from:H})}catch(M){es(e.removed,{attribute:null,from:H})}if(H.removeAttribute(b),b==="is")if(IA||Bt)try{Oe(H)}catch(M){}else try{H.setAttribute(b,"")}catch(M){}},bi=function(b){let H=null,M=null;if(Ft)b="<remove></remove>"+b;else{const TA=Uc(b,/^[\r\n\t ]+/);M=TA&&TA[0]}kt==="application/xhtml+xml"&&jt===Ye&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const pA=y?y.createHTML(b):b;if(jt===Ye)try{H=new f().parseFromString(pA,kt)}catch(TA){}if(!H||!H.documentElement){H=R.createDocument(jt,"template",null);try{H.documentElement.innerHTML=xn?x:pA}catch(TA){}}const JA=H.body||H.documentElement;return b&&M&&JA.insertBefore(t.createTextNode(M),JA.childNodes[0]||null),jt===Ye?N.call(H,De?"html":"body")[0]:De?H.documentElement:JA},Qs=function(b){return I.call(b.ownerDocument||b,b,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ys=function(b){return b instanceof h&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof u)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},Qi=function(b){return typeof a=="function"&&b instanceof a};function At(V,b,H){Zo(V,M=>{M.call(e,b,H,Yt)})}const yi=function(b){let H=null;if(At(X.beforeSanitizeElements,b,null),ys(b))return Oe(b),!0;const M=mA(b.nodeName);if(At(X.uponSanitizeElement,b,{tagName:M,allowedTags:bA}),gt&&b.hasChildNodes()&&!Qi(b.firstElementChild)&&ce(/<[/\w!]/g,b.innerHTML)&&ce(/<[/\w!]/g,b.textContent)||b.nodeType===ss.progressingInstruction||gt&&b.nodeType===ss.comment&&ce(/<[/\w]/g,b.data))return Oe(b),!0;if(!(je.tagCheck instanceof Function&&je.tagCheck(M))&&(!bA[M]||se[M])){if(!se[M]&&Ei(M)&&(BA.tagNameCheck instanceof RegExp&&ce(BA.tagNameCheck,M)||BA.tagNameCheck instanceof Function&&BA.tagNameCheck(M)))return!1;if(Bs&&!he[M]){const pA=F(b)||b.parentNode,JA=v(b)||b.childNodes;if(JA&&pA){const TA=JA.length;for(let oe=TA-1;oe>=0;--oe){const et=Q(JA[oe],!0);et.__removalCount=(b.__removalCount||0)+1,pA.insertBefore(et,E(b))}}}return Oe(b),!0}return b instanceof i&&!Zc(b)||(M==="noscript"||M==="noembed"||M==="noframes")&&ce(/<\/no(script|embed|frames)/i,b.innerHTML)?(Oe(b),!0):(ZA&&b.nodeType===ss.text&&(H=b.textContent,Zo([aA,fA,PA],pA=>{H=ts(H,pA," ")}),b.textContent!==H&&(es(e.removed,{element:b.cloneNode()}),b.textContent=H)),At(X.afterSanitizeElements,b,null),!1)},Ui=function(b,H,M){if(gi&&(H==="id"||H==="name")&&(M in t||M in mi))return!1;if(!(OA&&!Fn[H]&&ce(Ce,H))){if(!(SA&&ce(pe,H))){if(!(je.attributeCheck instanceof Function&&je.attributeCheck(H,b))){if(!gA[H]||Fn[H]){if(!(Ei(b)&&(BA.tagNameCheck instanceof RegExp&&ce(BA.tagNameCheck,b)||BA.tagNameCheck instanceof Function&&BA.tagNameCheck(b))&&(BA.attributeNameCheck instanceof RegExp&&ce(BA.attributeNameCheck,H)||BA.attributeNameCheck instanceof Function&&BA.attributeNameCheck(H,b))||H==="is"&&BA.allowCustomizedBuiltInElements&&(BA.tagNameCheck instanceof RegExp&&ce(BA.tagNameCheck,M)||BA.tagNameCheck instanceof Function&&BA.tagNameCheck(M))))return!1}else if(!ms[H]){if(!ce(ht,ts(M,pr,""))){if(!((H==="src"||H==="xlink:href"||H==="href")&&b!=="script"&&Pv(M,"data:")===0&&wA[b])){if(!(kn&&!ce(Je,ts(M,pr,"")))){if(M)return!1}}}}}}}return!0},Ei=function(b){return b!=="annotation-xml"&&Uc(b,fs)},Us=function(b){At(X.beforeSanitizeAttributes,b,null);const{attributes:H}=b;if(!H||ys(b))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:gA,forceKeepAttr:void 0};let pA=H.length;for(;pA--;){const JA=H[pA],{name:TA,namespaceURI:oe,value:et}=JA,wt=mA(TA),Es=et;let XA=TA==="value"?Es:Kv(Es);if(M.attrName=wt,M.attrValue=XA,M.keepAttr=!0,M.forceKeepAttr=void 0,At(X.uponSanitizeAttribute,b,M),XA=M.attrValue,gs&&(wt==="id"||wt==="name")&&(Me(TA,b),XA=zc+XA),gt&&ce(/((--!?|])>)|<\/(style|title|textarea)/i,XA)){Me(TA,b);continue}if(wt==="attributename"&&Uc(XA,"href")){Me(TA,b);continue}if(M.forceKeepAttr)continue;if(!M.keepAttr){Me(TA,b);continue}if(!Wt&&ce(/\/>/i,XA)){Me(TA,b);continue}ZA&&Zo([aA,fA,PA],ki=>{XA=ts(XA,ki," ")});const Fi=mA(b.nodeName);if(!Ui(Fi,wt,XA)){Me(TA,b);continue}if(y&&typeof g=="object"&&typeof g.getAttributeType=="function"&&!oe)switch(g.getAttributeType(Fi,wt)){case"TrustedHTML":{XA=y.createHTML(XA);break}case"TrustedScriptURL":{XA=y.createScriptURL(XA);break}}if(XA!==Es)try{oe?b.setAttributeNS(oe,TA,XA):b.setAttribute(TA,XA),ys(b)?Oe(b):kh(e.removed)}catch(ki){Me(TA,b)}}At(X.afterSanitizeAttributes,b,null)},vt=function V(b){let H=null;const M=Qs(b);for(At(X.beforeSanitizeShadowDOM,b,null);H=M.nextNode();)At(X.uponSanitizeShadowNode,H,null),yi(H),Us(H),H.content instanceof s&&V(H.content);At(X.afterSanitizeShadowDOM,b,null)};return e.sanitize=function(V){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},H=null,M=null,pA=null,JA=null;if(xn=!V,xn&&(V="<!-->"),typeof V!="string"&&!Qi(V))if(typeof V.toString=="function"){if(V=V.toString(),typeof V!="string")throw ns("dirty is not a string, aborting")}else throw ns("toString is not a function");if(!e.isSupported)return V;if(Re||wr(b),e.removed=[],typeof V=="string"&&(_n=!1),_n){if(V.nodeName){const et=mA(V.nodeName);if(!bA[et]||se[et])throw ns("root node is forbidden and cannot be sanitized in-place")}}else if(V instanceof a)H=bi("<!---->"),M=H.ownerDocument.importNode(V,!0),M.nodeType===ss.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?H=M:H.appendChild(M);else{if(!IA&&!ZA&&!De&&V.indexOf("<")===-1)return y&&vn?y.createHTML(V):V;if(H=bi(V),!H)return IA?null:vn?x:""}H&&Ft&&Oe(H.firstChild);const TA=Qs(_n?V:H);for(;pA=TA.nextNode();)yi(pA),Us(pA),pA.content instanceof s&&vt(pA.content);if(_n)return V;if(IA){if(Bt)for(JA=K.call(H.ownerDocument);H.firstChild;)JA.appendChild(H.firstChild);else JA=H;return(gA.shadowroot||gA.shadowrootmode)&&(JA=Z.call(n,JA,!0)),JA}let oe=De?H.outerHTML:H.innerHTML;return De&&bA["!doctype"]&&H.ownerDocument&&H.ownerDocument.doctype&&H.ownerDocument.doctype.name&&ce(Th,H.ownerDocument.doctype.name)&&(oe="<!DOCTYPE "+H.ownerDocument.doctype.name+`>
|
|
1901
|
+
`+oe),ZA&&Zo([aA,fA,PA],et=>{oe=ts(oe,et," ")}),y&&vn?y.createHTML(oe):oe},e.setConfig=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wr(V),Re=!0},e.clearConfig=function(){Yt=null,Re=!1},e.isValidAttribute=function(V,b,H){Yt||wr({});const M=mA(V),pA=mA(b);return Ui(M,pA,H)},e.addHook=function(V,b){typeof b=="function"&&es(X[V],b)},e.removeHook=function(V,b){if(b!==void 0){const H=Ov(X[V],b);return H===-1?void 0:Mv(X[V],H,1)[0]}return kh(X[V])},e.removeHooks=function(V){X[V]=[]},e.removeAllHooks=function(){X=Lh()},e}var t_=Dh();function Rh(A){const e=dA.parse(A,{gfm:!0,breaks:!0,async:!1});return t_.sanitize(e)}function n_(A){return T(this,null,function*(){var s;try{(s=A.focus)==null||s.call(A)}catch(o){}A.scrollIntoView({block:"center",inline:"center",behavior:"instant"});let e=A.getBoundingClientRect();e.width===0&&e.height===0&&(yield r_(),e=A.getBoundingClientRect());const t=e.left+e.width/2,n=e.top+e.height/2,r={bubbles:!0,cancelable:!0,clientX:t,clientY:n};typeof PointerEvent=="function"&&A.dispatchEvent(new PointerEvent("pointerdown",r)),A.dispatchEvent(new MouseEvent("mousedown",r)),typeof PointerEvent=="function"&&A.dispatchEvent(new PointerEvent("pointerup",r)),A.dispatchEvent(new MouseEvent("mouseup",r)),A.click()})}function r_(){return new Promise(A=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(()=>A()):setTimeout(A,16)})}function s_(A){return A&&A.__esModule&&Object.prototype.hasOwnProperty.call(A,"default")?A.default:A}var _c={exports:{}};/*!
|
|
1902
|
+
* Pusher JavaScript Library v8.5.0
|
|
1903
|
+
* https://pusher.com/
|
|
1904
|
+
*
|
|
1905
|
+
* Copyright 2020, Pusher
|
|
1906
|
+
* Released under the MIT licence.
|
|
1907
|
+
*/var Oh;function o_(){return Oh||(Oh=1,(function(A,e){(function(n,r){A.exports=r()})(self,()=>(()=>{var t={594(o,a){var i=this&&this.__extends||(function(){var v=function(F,y){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,R){x.__proto__=R}||function(x,R){for(var I in R)R.hasOwnProperty(I)&&(x[I]=R[I])},v(F,y)};return function(F,y){v(F,y);function x(){this.constructor=F}F.prototype=y===null?Object.create(y):(x.prototype=y.prototype,new x)}})();Object.defineProperty(a,"__esModule",{value:!0});var l=256,u=(function(){function v(F){F===void 0&&(F="="),this._paddingCharacter=F}return v.prototype.encodedLength=function(F){return this._paddingCharacter?(F+2)/3*4|0:(F*8+5)/6|0},v.prototype.encode=function(F){for(var y="",x=0;x<F.length-2;x+=3){var R=F[x]<<16|F[x+1]<<8|F[x+2];y+=this._encodeByte(R>>>18&63),y+=this._encodeByte(R>>>12&63),y+=this._encodeByte(R>>>6&63),y+=this._encodeByte(R>>>0&63)}var I=F.length-x;if(I>0){var R=F[x]<<16|(I===2?F[x+1]<<8:0);y+=this._encodeByte(R>>>18&63),y+=this._encodeByte(R>>>12&63),I===2?y+=this._encodeByte(R>>>6&63):y+=this._paddingCharacter||"",y+=this._paddingCharacter||""}return y},v.prototype.maxDecodedLength=function(F){return this._paddingCharacter?F/4*3|0:(F*6+7)/8|0},v.prototype.decodedLength=function(F){return this.maxDecodedLength(F.length-this._getPaddingLength(F))},v.prototype.decode=function(F){if(F.length===0)return new Uint8Array(0);for(var y=this._getPaddingLength(F),x=F.length-y,R=new Uint8Array(this.maxDecodedLength(x)),I=0,K=0,N=0,Z=0,X=0,aA=0,fA=0;K<x-4;K+=4)Z=this._decodeChar(F.charCodeAt(K+0)),X=this._decodeChar(F.charCodeAt(K+1)),aA=this._decodeChar(F.charCodeAt(K+2)),fA=this._decodeChar(F.charCodeAt(K+3)),R[I++]=Z<<2|X>>>4,R[I++]=X<<4|aA>>>2,R[I++]=aA<<6|fA,N|=Z&l,N|=X&l,N|=aA&l,N|=fA&l;if(K<x-1&&(Z=this._decodeChar(F.charCodeAt(K)),X=this._decodeChar(F.charCodeAt(K+1)),R[I++]=Z<<2|X>>>4,N|=Z&l,N|=X&l),K<x-2&&(aA=this._decodeChar(F.charCodeAt(K+2)),R[I++]=X<<4|aA>>>2,N|=aA&l),K<x-3&&(fA=this._decodeChar(F.charCodeAt(K+3)),R[I++]=aA<<6|fA,N|=fA&l),N!==0)throw new Error("Base64Coder: incorrect characters for decoding");return R},v.prototype._encodeByte=function(F){var y=F;return y+=65,y+=25-F>>>8&6,y+=51-F>>>8&-75,y+=61-F>>>8&-15,y+=62-F>>>8&3,String.fromCharCode(y)},v.prototype._decodeChar=function(F){var y=l;return y+=(42-F&F-44)>>>8&-l+F-43+62,y+=(46-F&F-48)>>>8&-l+F-47+63,y+=(47-F&F-58)>>>8&-l+F-48+52,y+=(64-F&F-91)>>>8&-l+F-65+0,y+=(96-F&F-123)>>>8&-l+F-97+26,y},v.prototype._getPaddingLength=function(F){var y=0;if(this._paddingCharacter){for(var x=F.length-1;x>=0&&F[x]===this._paddingCharacter;x--)y++;if(F.length<4||y>2)throw new Error("Base64Coder: incorrect padding")}return y},v})();a.Coder=u;var h=new u;function f(v){return h.encode(v)}a.encode=f;function g(v){return h.decode(v)}a.decode=g;var m=(function(v){i(F,v);function F(){return v!==null&&v.apply(this,arguments)||this}return F.prototype._encodeByte=function(y){var x=y;return x+=65,x+=25-y>>>8&6,x+=51-y>>>8&-75,x+=61-y>>>8&-13,x+=62-y>>>8&49,String.fromCharCode(x)},F.prototype._decodeChar=function(y){var x=l;return x+=(44-y&y-46)>>>8&-l+y-45+62,x+=(94-y&y-96)>>>8&-l+y-95+63,x+=(47-y&y-58)>>>8&-l+y-48+52,x+=(64-y&y-91)>>>8&-l+y-65+0,x+=(96-y&y-123)>>>8&-l+y-97+26,x},F})(u);a.URLSafeCoder=m;var Q=new m;function U(v){return Q.encode(v)}a.encodeURLSafe=U;function E(v){return Q.decode(v)}a.decodeURLSafe=E,a.encodedLength=function(v){return h.encodedLength(v)},a.maxDecodedLength=function(v){return h.maxDecodedLength(v)},a.decodedLength=function(v){return h.decodedLength(v)}},978(o,a){var i="utf8: invalid source encoding";function l(u){for(var h=[],f=0;f<u.length;f++){var g=u[f];if(g&128){var m=void 0;if(g<224){if(f>=u.length)throw new Error(i);var Q=u[++f];if((Q&192)!==128)throw new Error(i);g=(g&31)<<6|Q&63,m=128}else if(g<240){if(f>=u.length-1)throw new Error(i);var Q=u[++f],U=u[++f];if((Q&192)!==128||(U&192)!==128)throw new Error(i);g=(g&15)<<12|(Q&63)<<6|U&63,m=2048}else if(g<248){if(f>=u.length-2)throw new Error(i);var Q=u[++f],U=u[++f],E=u[++f];if((Q&192)!==128||(U&192)!==128||(E&192)!==128)throw new Error(i);g=(g&15)<<18|(Q&63)<<12|(U&63)<<6|E&63,m=65536}else throw new Error(i);if(g<m||g>=55296&&g<=57343)throw new Error(i);if(g>=65536){if(g>1114111)throw new Error(i);g-=65536,h.push(String.fromCharCode(55296|g>>10)),g=56320|g&1023}}h.push(String.fromCharCode(g))}return h.join("")}a.D4=l},721(o,a,i){o.exports=i(207).default},207(o,a,i){i.d(a,{default:()=>xi});class l{constructor(c,d){this.lastId=0,this.prefix=c,this.name=d}create(c){this.lastId++;var d=this.lastId,B=this.prefix+d,C=this.name+"["+d+"]",S=!1,D=function(){S||(c.apply(null,arguments),S=!0)};return this[d]=D,{number:d,id:B,name:C,callback:D}}remove(c){delete this[c.number]}}var u=new l("_pusher_script_","Pusher.ScriptReceivers"),h={VERSION:"8.5.0",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""};const f=h;class g{constructor(c){this.options=c,this.receivers=c.receivers||u,this.loading={}}load(c,d,B){var C=this;if(C.loading[c]&&C.loading[c].length>0)C.loading[c].push(B);else{C.loading[c]=[B];var S=q.createScriptRequest(C.getPath(c,d)),D=C.receivers.create(function(z){if(C.receivers.remove(D),C.loading[c]){var Y=C.loading[c];delete C.loading[c];for(var sA=function(KA){KA||S.cleanup()},lA=0;lA<Y.length;lA++)Y[lA](z,sA)}});S.send(D)}}getRoot(c){var d,B=q.getDocument().location.protocol;return c&&c.useTLS||B==="https:"?d=this.options.cdn_https:d=this.options.cdn_http,d.replace(/\/*$/,"")+"/"+this.options.version}getPath(c,d){return this.getRoot(d)+"/"+c+this.options.suffix+".js"}}var m=new l("_pusher_dependencies","Pusher.DependenciesReceivers"),Q=new g({cdn_http:f.cdn_http,cdn_https:f.cdn_https,version:f.VERSION,suffix:f.dependency_suffix,receivers:m});const U={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}},v={buildLogSuffix:function(p){const c="See:",d=U.urls[p];if(!d)return"";let B;return d.fullUrl?B=d.fullUrl:d.path&&(B=U.baseUrl+d.path),B?`${c} ${B}`:""}};var F;(function(p){p.UserAuthentication="user-authentication",p.ChannelAuthorization="channel-authorization"})(F||(F={}));class y extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class x extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class R extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class I extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class K extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class N extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class Z extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class X extends Error{constructor(c){super(c),Object.setPrototypeOf(this,new.target.prototype)}}class aA extends Error{constructor(c,d){super(d),this.status=c,Object.setPrototypeOf(this,new.target.prototype)}}const PA=function(p,c,d,B,C){const S=q.createXHR();S.open("POST",d.endpoint,!0),S.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var D in d.headers)S.setRequestHeader(D,d.headers[D]);if(d.headersProvider!=null){let z=d.headersProvider();for(var D in z)S.setRequestHeader(D,z[D])}return S.onreadystatechange=function(){if(S.readyState===4)if(S.status===200){let z,Y=!1;try{z=JSON.parse(S.responseText),Y=!0}catch(sA){C(new aA(200,`JSON returned from ${B.toString()} endpoint was invalid, yet status code was 200. Data was: ${S.responseText}`),null)}Y&&C(null,z)}else{let z="";switch(B){case F.UserAuthentication:z=v.buildLogSuffix("authenticationEndpoint");break;case F.ChannelAuthorization:z=`Clients must be authorized to join private or presence channels. ${v.buildLogSuffix("authorizationEndpoint")}`;break}C(new aA(S.status,`Unable to retrieve auth string from ${B.toString()} endpoint - received status: ${S.status} from ${d.endpoint}. ${z}`),null)}},S.send(c),S};function Ce(p){return bA(fs(p))}var pe=String.fromCharCode,Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pr=function(p){var c=p.charCodeAt(0);return c<128?p:c<2048?pe(192|c>>>6)+pe(128|c&63):pe(224|c>>>12&15)+pe(128|c>>>6&63)+pe(128|c&63)},fs=function(p){return p.replace(/[^\x00-\x7F]/g,pr)},ht=function(p){var c=[0,2,1][p.length%3],d=p.charCodeAt(0)<<16|(p.length>1?p.charCodeAt(1):0)<<8|(p.length>2?p.charCodeAt(2):0),B=[Je.charAt(d>>>18),Je.charAt(d>>>12&63),c>=2?"=":Je.charAt(d>>>6&63),c>=1?"=":Je.charAt(d&63)];return B.join("")},bA=window.btoa||function(p){return p.replace(/[\s\S]{1,3}/g,ht)};class ft{constructor(c,d,B,C){this.clear=d,this.timer=c(()=>{this.timer&&(this.timer=C(this.timer))},B)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}const gA=ft;function En(p){window.clearTimeout(p)}function BA(p){window.clearInterval(p)}class se extends gA{constructor(c,d){super(setTimeout,En,c,function(B){return d(),null})}}class Fn extends gA{constructor(c,d){super(setInterval,BA,c,function(B){return d(),B})}}var je={now(){return Date.now?Date.now():new Date().valueOf()},defer(p){return new se(0,p)},method(p,...c){var d=Array.prototype.slice.call(arguments,1);return function(B){return B[p].apply(B,d.concat(arguments))}}};const SA=je;function OA(p,...c){for(var d=0;d<c.length;d++){var B=c[d];for(var C in B)B[C]&&B[C].constructor&&B[C].constructor===Object?p[C]=OA(p[C]||{},B[C]):p[C]=B[C]}return p}function kn(){for(var p=["Pusher"],c=0;c<arguments.length;c++)typeof arguments[c]=="string"?p.push(arguments[c]):p.push(he(arguments[c]));return p.join(" : ")}function Wt(p,c){var d=Array.prototype.indexOf;if(p===null)return-1;if(d&&p.indexOf===d)return p.indexOf(c);for(var B=0,C=p.length;B<C;B++)if(p[B]===c)return B;return-1}function ZA(p,c){for(var d in p)Object.prototype.hasOwnProperty.call(p,d)&&c(p[d],d,p)}function gt(p){var c=[];return ZA(p,function(d,B){c.push(B)}),c}function De(p){var c=[];return ZA(p,function(d){c.push(d)}),c}function Re(p,c,d){for(var B=0;B<p.length;B++)c.call(d||window,p[B],B,p)}function Ft(p,c){for(var d=[],B=0;B<p.length;B++)d.push(c(p[B],B,p,d));return d}function IA(p,c){var d={};return ZA(p,function(B,C){d[C]=c(B)}),d}function Bt(p,c){c=c||function(C){return!!C};for(var d=[],B=0;B<p.length;B++)c(p[B],B,p,d)&&d.push(p[B]);return d}function vn(p,c){var d={};return ZA(p,function(B,C){(c&&c(B,C,p,d)||B)&&(d[C]=B)}),d}function gi(p){var c=[];return ZA(p,function(d,B){c.push([B,d])}),c}function gs(p,c){for(var d=0;d<p.length;d++)if(c(p[d],d,p))return!0;return!1}function zc(p,c){for(var d=0;d<p.length;d++)if(!c(p[d],d,p))return!1;return!0}function Bs(p){return IA(p,function(c){return typeof c=="object"&&(c=he(c)),encodeURIComponent(Ce(c.toString()))})}function _n(p){var c=vn(p,function(B){return B!==void 0}),d=Ft(gi(Bs(c)),SA.method("join","=")).join("&");return d}function Jt(p){var c=[],d=[];return(function B(C,S){var D,z,Y;switch(typeof C){case"object":if(!C)return null;for(D=0;D<c.length;D+=1)if(c[D]===C)return{$ref:d[D]};if(c.push(C),d.push(S),Object.prototype.toString.apply(C)==="[object Array]")for(Y=[],D=0;D<C.length;D+=1)Y[D]=B(C[D],S+"["+D+"]");else{Y={};for(z in C)Object.prototype.hasOwnProperty.call(C,z)&&(Y[z]=B(C[z],S+"["+JSON.stringify(z)+"]"))}return Y;case"number":case"string":case"boolean":return C}})(p,"$")}function he(p){try{return JSON.stringify(p)}catch(c){return JSON.stringify(Jt(p))}}class ws{constructor(){this.globalLog=c=>{window.console&&window.console.log&&window.console.log(c)}}debug(...c){this.log(this.globalLog,c)}warn(...c){this.log(this.globalLogWarn,c)}error(...c){this.log(this.globalLogError,c)}globalLogWarn(c){window.console&&window.console.warn?window.console.warn(c):this.globalLog(c)}globalLogError(c){window.console&&window.console.error?window.console.error(c):this.globalLogWarn(c)}log(c,...d){var B=kn.apply(this,arguments);xi.log?xi.log(B):xi.logToConsole&&c.bind(this)(B)}}const wA=new ws;var Bi=function(p,c,d,B,C){(d.headers!==void 0||d.headersProvider!=null)&&wA.warn(`To send headers with the ${B.toString()} request, you must use AJAX, rather than JSONP.`);var S=p.nextAuthCallbackID.toString();p.nextAuthCallbackID++;var D=p.getDocument(),z=D.createElement("script");p.auth_callbacks[S]=function(lA){C(null,lA)};var Y="Pusher.auth_callbacks['"+S+"']";z.src=d.endpoint+"?callback="+encodeURIComponent(Y)+"&"+c;var sA=D.getElementsByTagName("head")[0]||D.documentElement;sA.insertBefore(z,sA.firstChild)};const ms=Bi;class wi{constructor(c){this.src=c}send(c){var d=this,B="Error loading "+d.src;d.script=document.createElement("script"),d.script.id=c.id,d.script.src=d.src,d.script.type="text/javascript",d.script.charset="UTF-8",d.script.addEventListener?(d.script.onerror=function(){c.callback(B)},d.script.onload=function(){c.callback(null)}):d.script.onreadystatechange=function(){(d.script.readyState==="loaded"||d.script.readyState==="complete")&&c.callback(null)},d.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(d.errorScript=document.createElement("script"),d.errorScript.id=c.id+"_error",d.errorScript.text=c.name+"('"+B+"');",d.script.async=d.errorScript.async=!1):d.script.async=!0;var C=document.getElementsByTagName("head")[0];C.insertBefore(d.script,C.firstChild),d.errorScript&&C.insertBefore(d.errorScript,d.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class hr{constructor(c,d){this.url=c,this.data=d}send(c){if(!this.request){var d=_n(this.data),B=this.url+"/"+c.number+"?"+d;this.request=q.createScriptRequest(B),this.request.send(c)}}cleanup(){this.request&&this.request.cleanup()}}var fr=function(p,c){return function(d,B){var C="http"+(c?"s":"")+"://",S=C+(p.host||p.options.host)+p.options.path,D=q.createJSONPRequest(S,d),z=q.ScriptReceivers.create(function(Y,sA){u.remove(z),D.cleanup(),sA&&sA.host&&(p.host=sA.host),B&&B(Y,sA)});D.send(z)}},Ye={name:"jsonp",getAgent:fr};const jt=Ye;function xn(p,c,d){var B=p+(c.useTLS?"s":""),C=c.useTLS?c.hostTLS:c.hostNonTLS;return B+"://"+C+d}function Sn(p,c){var d="/app/"+p,B="?protocol="+f.PROTOCOL+"&client=js&version="+f.VERSION+(c?"&"+c:"");return d+B}var $c={getInitial:function(p,c){var d=(c.httpPath||"")+Sn(p,"flash=false");return xn("ws",c,d)}},gr={getInitial:function(p,c){var d=(c.httpPath||"/pusher")+Sn(p);return xn("http",c,d)}},Br={getInitial:function(p,c){return xn("http",c,c.httpPath||"/pusher")},getPath:function(p,c){return Sn(p)}};class Gc{constructor(){this._callbacks={}}get(c){return this._callbacks[kt(c)]}add(c,d,B){var C=kt(c);this._callbacks[C]=this._callbacks[C]||[],this._callbacks[C].push({fn:d,context:B})}remove(c,d,B){if(!c&&!d&&!B){this._callbacks={};return}var C=c?[kt(c)]:gt(this._callbacks);d||B?this.removeCallback(C,d,B):this.removeAllCallbacks(C)}removeCallback(c,d,B){Re(c,function(C){this._callbacks[C]=Bt(this._callbacks[C]||[],function(S){return d&&d!==S.fn||B&&B!==S.context}),this._callbacks[C].length===0&&delete this._callbacks[C]},this)}removeAllCallbacks(c){Re(c,function(d){delete this._callbacks[d]},this)}}function kt(p){return"_"+p}class qe{constructor(c){this.callbacks=new Gc,this.global_callbacks=[],this.failThrough=c}bind(c,d,B){return this.callbacks.add(c,d,B),this}bind_global(c){return this.global_callbacks.push(c),this}unbind(c,d,B){return this.callbacks.remove(c,d,B),this}unbind_global(c){return c?(this.global_callbacks=Bt(this.global_callbacks||[],d=>d!==c),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(c,d,B){for(var C=0;C<this.global_callbacks.length;C++)this.global_callbacks[C](c,d);var S=this.callbacks.get(c),D=[];if(B?D.push(d,B):d&&D.push(d),S&&S.length>0)for(var C=0;C<S.length;C++)S[C].fn.apply(S[C].context||window,D);else this.failThrough&&this.failThrough(c,d);return this}}class Vc extends qe{constructor(c,d,B,C,S){super(),this.initialize=q.transportConnectionInitializer,this.hooks=c,this.name=d,this.priority=B,this.key=C,this.options=S,this.state="new",this.timeline=S.timeline,this.activityTimeout=S.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var c=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(c,this.options)}catch(d){return SA.defer(()=>{this.onError(d),this.changeState("closed")}),!1}return this.bindListeners(),wA.debug("Connecting",{transport:this.name,url:c}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(c){return this.state==="open"?(SA.defer(()=>{this.socket&&this.socket.send(c)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(c){this.emit("error",{type:"WebSocketError",error:c}),this.timeline.error(this.buildTimelineMessage({error:c.toString()}))}onClose(c){c?this.changeState("closed",{code:c.code,reason:c.reason,wasClean:c.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(c){this.emit("message",c)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=c=>{this.onError(c)},this.socket.onclose=c=>{this.onClose(c)},this.socket.onmessage=c=>{this.onMessage(c)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(c,d){this.state=c,this.timeline.info(this.buildTimelineMessage({state:c,params:d})),this.emit(c,d)}buildTimelineMessage(c){return OA({cid:this.id},c)}}class mA{constructor(c){this.hooks=c}isSupported(c){return this.hooks.isSupported(c)}createConnection(c,d,B,C){return new Vc(this.hooks,c,d,B,C)}}var Yt=new mA({urls:$c,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!q.getWebSocketAPI()},isSupported:function(){return!!q.getWebSocketAPI()},getSocket:function(p){return q.createWebSocket(p)}}),mi={urls:gr,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},Cs=OA({getSocket:function(p){return q.HTTPFactory.createStreamingSocket(p)}},mi),wr=OA({getSocket:function(p){return q.HTTPFactory.createPollingSocket(p)}},mi),bs={isSupported:function(){return q.isXHRSupported()}},Ci=new mA(OA({},Cs,bs)),Zc=new mA(OA({},wr,bs)),Oe={ws:Yt,xhr_streaming:Ci,xhr_polling:Zc};const Me=Oe;var bi=new mA({file:"sockjs",urls:Br,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(p,c){return new window.SockJS(p,null,{js_path:Q.getPath("sockjs",{useTLS:c.useTLS}),ignore_null_origin:c.ignoreNullOrigin})},beforeOpen:function(p,c){p.send(JSON.stringify({path:c}))}}),Qs={isSupported:function(p){var c=q.isXDRSupported(p.useTLS);return c}},ys=new mA(OA({},Cs,Qs)),Qi=new mA(OA({},wr,Qs));Me.xdr_streaming=ys,Me.xdr_polling=Qi,Me.sockjs=bi;const At=Me;class yi extends qe{constructor(){super();var c=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){c.emit("online")},!1),window.addEventListener("offline",function(){c.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var Ui=new yi;class Ei{constructor(c,d,B){this.manager=c,this.transport=d,this.minPingDelay=B.minPingDelay,this.maxPingDelay=B.maxPingDelay,this.pingDelay=void 0}createConnection(c,d,B,C){C=OA({},C,{activityTimeout:this.pingDelay});var S=this.transport.createConnection(c,d,B,C),D=null,z=function(){S.unbind("open",z),S.bind("closed",Y),D=SA.now()},Y=sA=>{if(S.unbind("closed",Y),sA.code===1002||sA.code===1003)this.manager.reportDeath();else if(!sA.wasClean&&D){var lA=SA.now()-D;lA<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(lA/2,this.minPingDelay))}};return S.bind("open",z),S}isSupported(c){return this.manager.isAlive()&&this.transport.isSupported(c)}}const Us={decodeMessage:function(p){try{var c=JSON.parse(p.data),d=c.data;if(typeof d=="string")try{d=JSON.parse(c.data)}catch(C){}var B={event:c.event,channel:c.channel,data:d};return c.user_id&&(B.user_id=c.user_id),B}catch(C){throw{type:"MessageParseError",error:C,data:p.data}}},encodeMessage:function(p){return JSON.stringify(p)},processHandshake:function(p){var c=Us.decodeMessage(p);if(c.event==="pusher:connection_established"){if(!c.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:c.data.socket_id,activityTimeout:c.data.activity_timeout*1e3}}else{if(c.event==="pusher:error")return{action:this.getCloseAction(c.data),error:this.getCloseError(c.data)};throw"Invalid handshake"}},getCloseAction:function(p){return p.code<4e3?p.code>=1002&&p.code<=1004?"backoff":null:p.code===4e3?"tls_only":p.code<4100?"refused":p.code<4200?"backoff":p.code<4300?"retry":"refused"},getCloseError:function(p){return p.code!==1e3&&p.code!==1001?{type:"PusherError",data:{code:p.code,message:p.reason||p.message}}:null}},vt=Us;class V extends qe{constructor(c,d){super(),this.id=c,this.transport=d,this.activityTimeout=d.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(c){return this.transport.send(c)}send_event(c,d,B){var C={event:c,data:d};return B&&(C.channel=B),wA.debug("Event sent",C),this.send(vt.encodeMessage(C))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var c={message:B=>{var C;try{C=vt.decodeMessage(B)}catch(S){this.emit("error",{type:"MessageParseError",error:S,data:B.data})}if(C!==void 0){switch(wA.debug("Event recd",C),C.event){case"pusher:error":this.emit("error",{type:"PusherError",data:C.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",C)}},activity:()=>{this.emit("activity")},error:B=>{this.emit("error",B)},closed:B=>{d(),B&&B.code&&this.handleCloseEvent(B),this.transport=null,this.emit("closed")}},d=()=>{ZA(c,(B,C)=>{this.transport.unbind(C,B)})};ZA(c,(B,C)=>{this.transport.bind(C,B)})}handleCloseEvent(c){var d=vt.getCloseAction(c),B=vt.getCloseError(c);B&&this.emit("error",B),d&&this.emit(d,{action:d,error:B})}}class b{constructor(c,d){this.transport=c,this.callback=d,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=c=>{this.unbindListeners();var d;try{d=vt.processHandshake(c)}catch(B){this.finish("error",{error:B}),this.transport.close();return}d.action==="connected"?this.finish("connected",{connection:new V(d.id,this.transport),activityTimeout:d.activityTimeout}):(this.finish(d.action,{error:d.error}),this.transport.close())},this.onClosed=c=>{this.unbindListeners();var d=vt.getCloseAction(c)||"backoff",B=vt.getCloseError(c);this.finish(d,{error:B})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(c,d){this.callback(OA({transport:this.transport,action:c},d))}}class H{constructor(c,d){this.timeline=c,this.options=d||{}}send(c,d){this.timeline.isEmpty()||this.timeline.send(q.TimelineTransport.getAgent(this,c),d)}}class M extends qe{constructor(c,d){super(function(B,C){wA.debug("No callbacks on "+c+" for "+B)}),this.name=c,this.pusher=d,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(c,d){return d(null,{auth:""})}trigger(c,d){if(c.indexOf("client-")!==0)throw new y("Event '"+c+"' does not start with 'client-'");if(!this.subscribed){var B=v.buildLogSuffix("triggeringClientEvents");wA.warn(`Client event triggered before channel 'subscription_succeeded' event . ${B}`)}return this.pusher.send_event(c,d,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(c){var d=c.event,B=c.data;if(d==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(c);else if(d==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(c);else if(d.indexOf("pusher_internal:")!==0){var C={};this.emit(d,B,C)}}handleSubscriptionSucceededEvent(c){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",c.data)}handleSubscriptionCountEvent(c){c.data.subscription_count&&(this.subscriptionCount=c.data.subscription_count),this.emit("pusher:subscription_count",c.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(c,d)=>{c?(this.subscriptionPending=!1,wA.error(c.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:c.message},c instanceof aA?{status:c.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:d.auth,channel_data:d.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class pA extends M{authorize(c,d){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:c},d)}}class JA{constructor(){this.reset()}get(c){return Object.prototype.hasOwnProperty.call(this.members,c)?{id:c,info:this.members[c]}:null}each(c){ZA(this.members,(d,B)=>{c(this.get(B))})}setMyID(c){this.myID=c}onSubscription(c){this.members=c.presence.hash,this.count=c.presence.count,this.me=this.get(this.myID)}addMember(c){return this.get(c.user_id)===null&&this.count++,this.members[c.user_id]=c.user_info,this.get(c.user_id)}removeMember(c){var d=this.get(c.user_id);return d&&(delete this.members[c.user_id],this.count--),d}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var TA=function(p,c,d,B){function C(S){return S instanceof d?S:new d(function(D){D(S)})}return new(d||(d=Promise))(function(S,D){function z(lA){try{sA(B.next(lA))}catch(KA){D(KA)}}function Y(lA){try{sA(B.throw(lA))}catch(KA){D(KA)}}function sA(lA){lA.done?S(lA.value):C(lA.value).then(z,Y)}sA((B=B.apply(p,c||[])).next())})};class oe extends pA{constructor(c,d){super(c,d),this.members=new JA}authorize(c,d){super.authorize(c,(B,C)=>TA(this,void 0,void 0,function*(){if(!B)if(C=C,C.channel_data!=null){var S=JSON.parse(C.channel_data);this.members.setMyID(S.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let D=v.buildLogSuffix("authorizationEndpoint");wA.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${D}, or the user should be signed in.`),d("Invalid auth response");return}d(B,C)}))}handleEvent(c){var d=c.event;if(d.indexOf("pusher_internal:")===0)this.handleInternalEvent(c);else{var B=c.data,C={};c.user_id&&(C.user_id=c.user_id),this.emit(d,B,C)}}handleInternalEvent(c){var d=c.event,B=c.data;switch(d){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(c);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(c);break;case"pusher_internal:member_added":var C=this.members.addMember(B);this.emit("pusher:member_added",C);break;case"pusher_internal:member_removed":var S=this.members.removeMember(B);S&&this.emit("pusher:member_removed",S);break}}handleSubscriptionSucceededEvent(c){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(c.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var et=i(978),wt=i(594);class Es extends pA{constructor(c,d,B){super(c,d),this.key=null,this.nacl=B}authorize(c,d){super.authorize(c,(B,C)=>{if(B){d(B,C);return}let S=C.shared_secret;if(!S){d(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=(0,wt.decode)(S),delete C.shared_secret,d(null,C)})}trigger(c,d){throw new N("Client events are not currently supported for encrypted channels")}handleEvent(c){var d=c.event,B=c.data;if(d.indexOf("pusher_internal:")===0||d.indexOf("pusher:")===0){super.handleEvent(c);return}this.handleEncryptedEvent(d,B)}handleEncryptedEvent(c,d){if(!this.key){wA.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!d.ciphertext||!d.nonce){wA.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+d);return}let B=(0,wt.decode)(d.ciphertext);if(B.length<this.nacl.secretbox.overheadLength){wA.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${B.length}`);return}let C=(0,wt.decode)(d.nonce);if(C.length<this.nacl.secretbox.nonceLength){wA.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${C.length}`);return}let S=this.nacl.secretbox.open(B,C,this.key);if(S===null){wA.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(D,z)=>{if(D){wA.error(`Failed to make a request to the authEndpoint: ${z}. Unable to fetch new key, so dropping encrypted event`);return}if(S=this.nacl.secretbox.open(B,C,this.key),S===null){wA.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(c,this.getDataToEmit(S))});return}this.emit(c,this.getDataToEmit(S))}getDataToEmit(c){let d=(0,et.D4)(c);try{return JSON.parse(d)}catch(B){return d}}}class XA extends qe{constructor(c,d){super(),this.state="initialized",this.connection=null,this.key=c,this.options=d,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var B=q.getNetwork();B.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),B.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(c){this.key=c,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(c){return this.connection?this.connection.send(c):!1}send_event(c,d,B){return this.connection?this.connection.send_event(c,d,B):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var c=(d,B)=>{d?this.runner=this.strategy.connect(0,c):B.action==="error"?(this.emit("error",{type:"HandshakeError",error:B.error}),this.timeline.error({handshakeError:B.error})):(this.abortConnecting(),this.handshakeCallbacks[B.action](B))};this.runner=this.strategy.connect(0,c)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var c=this.abandonConnection();c.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(c){this.timeline.info({action:"retry",delay:c}),c>0&&this.emit("connecting_in",Math.round(c/1e3)),this.retryTimer=new se(c||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new se(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new se(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new se(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(c){return OA({},c,{message:d=>{this.resetActivityCheck(),this.emit("message",d)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:d=>{this.emit("error",d)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(c){return OA({},c,{connected:d=>{this.activityTimeout=Math.min(this.options.activityTimeout,d.activityTimeout,d.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(d.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let c=d=>B=>{B.error&&this.emit("error",{type:"WebSocketError",error:B.error}),d(B)};return{tls_only:c(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:c(()=>{this.disconnect()}),backoff:c(()=>{this.retryIn(1e3)}),retry:c(()=>{this.retryIn(0)})}}setConnection(c){this.connection=c;for(var d in this.connectionCallbacks)this.connection.bind(d,this.connectionCallbacks[d]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var c in this.connectionCallbacks)this.connection.unbind(c,this.connectionCallbacks[c]);var d=this.connection;return this.connection=null,d}}updateState(c,d){var B=this.state;if(this.state=c,B!==c){var C=c;C==="connected"&&(C+=" with new socket ID "+d.socket_id),wA.debug("State changed",B+" -> "+C),this.timeline.info({state:c,params:d}),this.emit("state_change",{previous:B,current:c}),this.emit(c,d)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class Fi{constructor(){this.channels={}}add(c,d){return this.channels[c]||(this.channels[c]=ki(c,d)),this.channels[c]}all(){return De(this.channels)}find(c){return this.channels[c]}remove(c){var d=this.channels[c];return delete this.channels[c],d}disconnect(){ZA(this.channels,function(c){c.disconnect()})}}function ki(p,c){if(p.indexOf("private-encrypted-")===0){if(c.config.nacl)return _t.createEncryptedChannel(p,c,c.config.nacl);let d="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",B=v.buildLogSuffix("encryptedChannelSupport");throw new N(`${d}. ${B}`)}else{if(p.indexOf("private-")===0)return _t.createPrivateChannel(p,c);if(p.indexOf("presence-")===0)return _t.createPresenceChannel(p,c);if(p.indexOf("#")===0)throw new x('Cannot create a channel with name "'+p+'".');return _t.createChannel(p,c)}}var Bx={createChannels(){return new Fi},createConnectionManager(p,c){return new XA(p,c)},createChannel(p,c){return new M(p,c)},createPrivateChannel(p,c){return new pA(p,c)},createPresenceChannel(p,c){return new oe(p,c)},createEncryptedChannel(p,c,d){return new Es(p,c,d)},createTimelineSender(p,c){return new H(p,c)},createHandshake(p,c){return new b(p,c)},createAssistantToTheTransportManager(p,c,d){return new Ei(p,c,d)}};const _t=Bx;class Sf{constructor(c){this.options=c||{},this.livesLeft=this.options.lives||1/0}getAssistant(c){return _t.createAssistantToTheTransportManager(this,c,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class In{constructor(c,d){this.strategies=c,this.loop=!!d.loop,this.failFast=!!d.failFast,this.timeout=d.timeout,this.timeoutLimit=d.timeoutLimit}isSupported(){return gs(this.strategies,SA.method("isSupported"))}connect(c,d){var B=this.strategies,C=0,S=this.timeout,D=null,z=(Y,sA)=>{sA?d(null,sA):(C=C+1,this.loop&&(C=C%B.length),C<B.length?(S&&(S=S*2,this.timeoutLimit&&(S=Math.min(S,this.timeoutLimit))),D=this.tryStrategy(B[C],c,{timeout:S,failFast:this.failFast},z)):d(!0))};return D=this.tryStrategy(B[C],c,{timeout:S,failFast:this.failFast},z),{abort:function(){D.abort()},forceMinPriority:function(Y){c=Y,D&&D.forceMinPriority(Y)}}}tryStrategy(c,d,B,C){var S=null,D=null;return B.timeout>0&&(S=new se(B.timeout,function(){D.abort(),C(!0)})),D=c.connect(d,function(z,Y){z&&S&&S.isRunning()&&!B.failFast||(S&&S.ensureAborted(),C(z,Y))}),{abort:function(){S&&S.ensureAborted(),D.abort()},forceMinPriority:function(z){D.forceMinPriority(z)}}}}class Xc{constructor(c){this.strategies=c}isSupported(){return gs(this.strategies,SA.method("isSupported"))}connect(c,d){return wx(this.strategies,c,function(B,C){return function(S,D){if(C[B].error=S,S){mx(C)&&d(!0);return}Re(C,function(z){z.forceMinPriority(D.transport.priority)}),d(null,D)}})}}function wx(p,c,d){var B=Ft(p,function(C,S,D,z){return C.connect(c,d(S,z))});return{abort:function(){Re(B,Cx)},forceMinPriority:function(C){Re(B,function(S){S.forceMinPriority(C)})}}}function mx(p){return zc(p,function(c){return!!c.error})}function Cx(p){!p.error&&!p.aborted&&(p.abort(),p.aborted=!0)}class bx{constructor(c,d,B){this.strategy=c,this.transports=d,this.ttl=B.ttl||18e5,this.usingTLS=B.useTLS,this.timeline=B.timeline}isSupported(){return this.strategy.isSupported()}connect(c,d){var B=this.usingTLS,C=Qx(B),S=C&&C.cacheSkipCount?C.cacheSkipCount:0,D=[this.strategy];if(C&&C.timestamp+this.ttl>=SA.now()){var z=this.transports[C.transport];z&&(["ws","wss"].includes(C.transport)||S>3?(this.timeline.info({cached:!0,transport:C.transport,latency:C.latency}),D.push(new In([z],{timeout:C.latency*2+1e3,failFast:!0}))):S++)}var Y=SA.now(),sA=D.pop().connect(c,function lA(KA,Si){KA?(If(B),D.length>0?(Y=SA.now(),sA=D.pop().connect(c,lA)):d(KA)):(yx(B,Si.transport.name,SA.now()-Y,S),d(null,Si))});return{abort:function(){sA.abort()},forceMinPriority:function(lA){c=lA,sA&&sA.forceMinPriority(lA)}}}}function Wc(p){return"pusherTransport"+(p?"TLS":"NonTLS")}function Qx(p){var c=q.getLocalStorage();if(c)try{var d=c[Wc(p)];if(d)return JSON.parse(d)}catch(B){If(p)}return null}function yx(p,c,d,B){var C=q.getLocalStorage();if(C)try{C[Wc(p)]=he({timestamp:SA.now(),transport:c,latency:d,cacheSkipCount:B})}catch(S){}}function If(p){var c=q.getLocalStorage();if(c)try{delete c[Wc(p)]}catch(d){}}class vi{constructor(c,{delay:d}){this.strategy=c,this.options={delay:d}}isSupported(){return this.strategy.isSupported()}connect(c,d){var B=this.strategy,C,S=new se(this.options.delay,function(){C=B.connect(c,d)});return{abort:function(){S.ensureAborted(),C&&C.abort()},forceMinPriority:function(D){c=D,C&&C.forceMinPriority(D)}}}}class Fs{constructor(c,d,B){this.test=c,this.trueBranch=d,this.falseBranch=B}isSupported(){var c=this.test()?this.trueBranch:this.falseBranch;return c.isSupported()}connect(c,d){var B=this.test()?this.trueBranch:this.falseBranch;return B.connect(c,d)}}class Ux{constructor(c){this.strategy=c}isSupported(){return this.strategy.isSupported()}connect(c,d){var B=this.strategy.connect(c,function(C,S){S&&B.abort(),d(C,S)});return B}}function ks(p){return function(){return p.isSupported()}}var Ex=function(p,c,d){var B={};function C(Gf,QS,yS,US,ES){var Vf=d(p,Gf,QS,yS,US,ES);return B[Gf]=Vf,Vf}var S=Object.assign({},c,{hostNonTLS:p.wsHost+":"+p.wsPort,hostTLS:p.wsHost+":"+p.wssPort,httpPath:p.wsPath}),D=Object.assign({},S,{useTLS:!0}),z=Object.assign({},c,{hostNonTLS:p.httpHost+":"+p.httpPort,hostTLS:p.httpHost+":"+p.httpsPort,httpPath:p.httpPath}),Y={loop:!0,timeout:15e3,timeoutLimit:6e4},sA=new Sf({minPingDelay:1e4,maxPingDelay:p.activityTimeout}),lA=new Sf({lives:2,minPingDelay:1e4,maxPingDelay:p.activityTimeout}),KA=C("ws","ws",3,S,sA),Si=C("wss","ws",3,D,sA),BS=C("sockjs","sockjs",1,z),Mf=C("xhr_streaming","xhr_streaming",1,z,lA),wS=C("xdr_streaming","xdr_streaming",1,z,lA),Pf=C("xhr_polling","xhr_polling",1,z),mS=C("xdr_polling","xdr_polling",1,z),Kf=new In([KA],Y),CS=new In([Si],Y),bS=new In([BS],Y),Nf=new In([new Fs(ks(Mf),Mf,wS)],Y),zf=new In([new Fs(ks(Pf),Pf,mS)],Y),$f=new In([new Fs(ks(Nf),new Xc([Nf,new vi(zf,{delay:4e3})]),zf)],Y),Yc=new Fs(ks($f),$f,bS),qc;return c.useTLS?qc=new Xc([Kf,new vi(Yc,{delay:2e3})]):qc=new Xc([Kf,new vi(CS,{delay:2e3}),new vi(Yc,{delay:5e3})]),new bx(new Ux(new Fs(ks(KA),qc,Yc)),B,{ttl:18e5,timeline:c.timeline,useTLS:c.useTLS})};const Fx=Ex;function kx(){var p=this;p.timeline.info(p.buildTimelineMessage({transport:p.name+(p.options.useTLS?"s":"")})),p.hooks.isInitialized()?p.changeState("initialized"):p.hooks.file?(p.changeState("initializing"),Q.load(p.hooks.file,{useTLS:p.options.useTLS},function(c,d){p.hooks.isInitialized()?(p.changeState("initialized"),d(!0)):(c&&p.onError(c),p.onClose(),d(!1))})):p.onClose()}var vx={getRequest:function(p){var c=new window.XDomainRequest;return c.ontimeout=function(){p.emit("error",new R),p.close()},c.onerror=function(d){p.emit("error",d),p.close()},c.onprogress=function(){c.responseText&&c.responseText.length>0&&p.onChunk(200,c.responseText)},c.onload=function(){c.responseText&&c.responseText.length>0&&p.onChunk(200,c.responseText),p.emit("finished",200),p.close()},c},abortRequest:function(p){p.ontimeout=p.onerror=p.onprogress=p.onload=null,p.abort()}};const _x=vx,xx=256*1024;class Sx extends qe{constructor(c,d,B){super(),this.hooks=c,this.method=d,this.url=B}start(c){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},q.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(c)}close(){this.unloader&&(q.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(c,d){for(;;){var B=this.advanceBuffer(d);if(B)this.emit("chunk",{status:c,data:B});else break}this.isBufferTooLong(d)&&this.emit("buffer_too_long")}advanceBuffer(c){var d=c.slice(this.position),B=d.indexOf(`
|
|
1908
|
+
`);return B!==-1?(this.position+=B+1,d.slice(0,B)):null}isBufferTooLong(c){return this.position===c.length&&c.length>xx}}var Jc;(function(p){p[p.CONNECTING=0]="CONNECTING",p[p.OPEN=1]="OPEN",p[p.CLOSED=3]="CLOSED"})(Jc||(Jc={}));const Tn=Jc;var Ix=1;class Tx{constructor(c,d){this.hooks=c,this.session=Hf(1e3)+"/"+Rx(8),this.location=Hx(d),this.readyState=Tn.CONNECTING,this.openStream()}send(c){return this.sendRaw(JSON.stringify([c]))}ping(){this.hooks.sendHeartbeat(this)}close(c,d){this.onClose(c,d,!0)}sendRaw(c){if(this.readyState===Tn.OPEN)try{return q.createSocketRequest("POST",Tf(Lx(this.location,this.session))).start(c),!0}catch(d){return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(c,d,B){this.closeStream(),this.readyState=Tn.CLOSED,this.onclose&&this.onclose({code:c,reason:d,wasClean:B})}onChunk(c){if(c.status===200){this.readyState===Tn.OPEN&&this.onActivity();var d,B=c.data.slice(0,1);switch(B){case"o":d=JSON.parse(c.data.slice(1)||"{}"),this.onOpen(d);break;case"a":d=JSON.parse(c.data.slice(1)||"[]");for(var C=0;C<d.length;C++)this.onEvent(d[C]);break;case"m":d=JSON.parse(c.data.slice(1)||"null"),this.onEvent(d);break;case"h":this.hooks.onHeartbeat(this);break;case"c":d=JSON.parse(c.data.slice(1)||"[]"),this.onClose(d[0],d[1],!0);break}}}onOpen(c){this.readyState===Tn.CONNECTING?(c&&c.hostname&&(this.location.base=Dx(this.location.base,c.hostname)),this.readyState=Tn.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(c){this.readyState===Tn.OPEN&&this.onmessage&&this.onmessage({data:c})}onActivity(){this.onactivity&&this.onactivity()}onError(c){this.onerror&&this.onerror(c)}openStream(){this.stream=q.createSocketRequest("POST",Tf(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",c=>{this.onChunk(c)}),this.stream.bind("finished",c=>{this.hooks.onFinished(this,c)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(c){SA.defer(()=>{this.onError(c),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function Hx(p){var c=/([^\?]*)\/*(\??.*)/.exec(p);return{base:c[1],queryString:c[2]}}function Lx(p,c){return p.base+"/"+c+"/xhr_send"}function Tf(p){var c=p.indexOf("?")===-1?"?":"&";return p+c+"t="+ +new Date+"&n="+Ix++}function Dx(p,c){var d=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(p);return d[1]+c+d[3]}function Hf(p){return q.randomInt(p)}function Rx(p){for(var c=[],d=0;d<p;d++)c.push(Hf(32).toString(32));return c.join("")}const Ox=Tx;var Mx={getReceiveURL:function(p,c){return p.base+"/"+c+"/xhr_streaming"+p.queryString},onHeartbeat:function(p){p.sendRaw("[]")},sendHeartbeat:function(p){p.sendRaw("[]")},onFinished:function(p,c){p.onClose(1006,"Connection interrupted ("+c+")",!1)}};const Px=Mx;var Kx={getReceiveURL:function(p,c){return p.base+"/"+c+"/xhr"+p.queryString},onHeartbeat:function(){},sendHeartbeat:function(p){p.sendRaw("[]")},onFinished:function(p,c){c===200?p.reconnect():p.onClose(1006,"Connection interrupted ("+c+")",!1)}};const Nx=Kx;var zx={getRequest:function(p){var c=q.getXHRAPI(),d=new c;return d.onreadystatechange=d.onprogress=function(){switch(d.readyState){case 3:d.responseText&&d.responseText.length>0&&p.onChunk(d.status,d.responseText);break;case 4:d.responseText&&d.responseText.length>0&&p.onChunk(d.status,d.responseText),p.emit("finished",d.status),p.close();break}},d},abortRequest:function(p){p.onreadystatechange=null,p.abort()}};const $x=zx;var Gx={createStreamingSocket(p){return this.createSocket(Px,p)},createPollingSocket(p){return this.createSocket(Nx,p)},createSocket(p,c){return new Ox(p,c)},createXHR(p,c){return this.createRequest($x,p,c)},createRequest(p,c,d){return new Sx(p,c,d)}};const Lf=Gx;Lf.createXDR=function(p,c){return this.createRequest(_x,p,c)};var Vx={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:u,DependenciesReceivers:m,getDefaultStrategy:Fx,Transports:At,transportConnectionInitializer:kx,HTTPFactory:Lf,TimelineTransport:jt,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(p){window.Pusher=p;var c=()=>{this.onDocumentBody(p.ready)};window.JSON?c():Q.load("json2",{},c)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:PA,jsonp:ms}},onDocumentBody(p){document.body?p():setTimeout(()=>{this.onDocumentBody(p)},0)},createJSONPRequest(p,c){return new hr(p,c)},createScriptRequest(p){return new wi(p)},getLocalStorage(){try{return window.localStorage}catch(p){return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var p=this.getXHRAPI();return new p},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return Ui},createWebSocket(p){var c=this.getWebSocketAPI();return new c(p)},createSocketRequest(p,c){if(this.isXHRSupported())return this.HTTPFactory.createXHR(p,c);if(this.isXDRSupported(c.indexOf("https:")===0))return this.HTTPFactory.createXDR(p,c);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var p=this.getXHRAPI();return!!p&&new p().withCredentials!==void 0},isXDRSupported(p){var c=p?"https:":"http:",d=this.getProtocol();return!!window.XDomainRequest&&d===c},addUnloadListener(p){window.addEventListener!==void 0?window.addEventListener("unload",p,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",p)},removeUnloadListener(p){window.addEventListener!==void 0?window.removeEventListener("unload",p,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",p)},randomInt(p){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*p)}};const q=Vx;var jc;(function(p){p[p.ERROR=3]="ERROR",p[p.INFO=6]="INFO",p[p.DEBUG=7]="DEBUG"})(jc||(jc={}));const _i=jc;class Zx{constructor(c,d,B){this.key=c,this.session=d,this.events=[],this.options=B||{},this.sent=0,this.uniqueID=0}log(c,d){c<=this.options.level&&(this.events.push(OA({},d,{timestamp:SA.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(c){this.log(_i.ERROR,c)}info(c){this.log(_i.INFO,c)}debug(c){this.log(_i.DEBUG,c)}isEmpty(){return this.events.length===0}send(c,d){var B=OA({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],c(B,(C,S)=>{C||this.sent++,d&&d(C,S)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class Xx{constructor(c,d,B,C){this.name=c,this.priority=d,this.transport=B,this.options=C||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(c,d){if(this.isSupported()){if(this.priority<c)return Df(new I,d)}else return Df(new X,d);var B=!1,C=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),S=null,D=function(){C.unbind("initialized",D),C.connect()},z=function(){S=_t.createHandshake(C,function(KA){B=!0,lA(),d(null,KA)})},Y=function(KA){lA(),d(KA)},sA=function(){lA();var KA;KA=he(C),d(new K(KA))},lA=function(){C.unbind("initialized",D),C.unbind("open",z),C.unbind("error",Y),C.unbind("closed",sA)};return C.bind("initialized",D),C.bind("open",z),C.bind("error",Y),C.bind("closed",sA),C.initialize(),{abort:()=>{B||(lA(),S?S.close():C.close())},forceMinPriority:KA=>{B||this.priority<KA&&(S?S.close():C.close())}}}}function Df(p,c){return SA.defer(function(){c(p)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Wx}=q;var Jx=function(p,c,d,B,C,S){var D=Wx[d];if(!D)throw new Z(d);var z=(!p.enabledTransports||Wt(p.enabledTransports,c)!==-1)&&(!p.disabledTransports||Wt(p.disabledTransports,c)===-1),Y;return z?(C=Object.assign({ignoreNullOrigin:p.ignoreNullOrigin},C),Y=new Xx(c,B,S?S.getAssistant(D):D,C)):Y=jx,Y},jx={isSupported:function(){return!1},connect:function(p,c){var d=SA.defer(function(){c(new X)});return{abort:function(){d.ensureAborted()},forceMinPriority:function(){}}}};function Yx(p){if(p==null)throw"You must pass an options object";if(p.cluster==null)throw"Options object must provide a cluster";"disableStats"in p&&wA.warn("The disableStats option is deprecated in favor of enableStats")}const qx=(p,c)=>{var d="socket_id="+encodeURIComponent(p.socketId);for(var B in c.params)d+="&"+encodeURIComponent(B)+"="+encodeURIComponent(c.params[B]);if(c.paramsProvider!=null){let C=c.paramsProvider();for(var B in C)d+="&"+encodeURIComponent(B)+"="+encodeURIComponent(C[B])}return d},AS=p=>{if(typeof q.getAuthorizers()[p.transport]=="undefined")throw`'${p.transport}' is not a recognized auth transport`;return(c,d)=>{const B=qx(c,p);q.getAuthorizers()[p.transport](q,B,p,F.UserAuthentication,d)}},eS=(p,c)=>{var d="socket_id="+encodeURIComponent(p.socketId);d+="&channel_name="+encodeURIComponent(p.channelName);for(var B in c.params)d+="&"+encodeURIComponent(B)+"="+encodeURIComponent(c.params[B]);if(c.paramsProvider!=null){let C=c.paramsProvider();for(var B in C)d+="&"+encodeURIComponent(B)+"="+encodeURIComponent(C[B])}return d},tS=p=>{if(typeof q.getAuthorizers()[p.transport]=="undefined")throw`'${p.transport}' is not a recognized auth transport`;return(c,d)=>{const B=eS(c,p);q.getAuthorizers()[p.transport](q,B,p,F.ChannelAuthorization,d)}},nS=(p,c,d)=>{const B={authTransport:c.transport,authEndpoint:c.endpoint,auth:{params:c.params,headers:c.headers}};return(C,S)=>{const D=p.channel(C.channelName);d(D,B).authorize(C.socketId,S)}};function Rf(p,c){let d={activityTimeout:p.activityTimeout||f.activityTimeout,cluster:p.cluster,httpPath:p.httpPath||f.httpPath,httpPort:p.httpPort||f.httpPort,httpsPort:p.httpsPort||f.httpsPort,pongTimeout:p.pongTimeout||f.pongTimeout,statsHost:p.statsHost||f.stats_host,unavailableTimeout:p.unavailableTimeout||f.unavailableTimeout,wsPath:p.wsPath||f.wsPath,wsPort:p.wsPort||f.wsPort,wssPort:p.wssPort||f.wssPort,enableStats:aS(p),httpHost:rS(p),useTLS:iS(p),wsHost:sS(p),userAuthenticator:cS(p),channelAuthorizer:uS(p,c)};return"disabledTransports"in p&&(d.disabledTransports=p.disabledTransports),"enabledTransports"in p&&(d.enabledTransports=p.enabledTransports),"ignoreNullOrigin"in p&&(d.ignoreNullOrigin=p.ignoreNullOrigin),"timelineParams"in p&&(d.timelineParams=p.timelineParams),"nacl"in p&&(d.nacl=p.nacl),d}function rS(p){return p.httpHost?p.httpHost:p.cluster?`sockjs-${p.cluster}.pusher.com`:f.httpHost}function sS(p){return p.wsHost?p.wsHost:oS(p.cluster)}function oS(p){return`ws-${p}.pusher.com`}function iS(p){return q.getProtocol()==="https:"?!0:p.forceTLS!==!1}function aS(p){return"enableStats"in p?p.enableStats:"disableStats"in p?!p.disableStats:!1}const Of=p=>"customHandler"in p&&p.customHandler!=null;function cS(p){const c=Object.assign(Object.assign({},f.userAuthentication),p.userAuthentication);return Of(c)?c.customHandler:AS(c)}function lS(p,c){let d;if("channelAuthorization"in p)d=Object.assign(Object.assign({},f.channelAuthorization),p.channelAuthorization);else if(d={transport:p.authTransport||f.authTransport,endpoint:p.authEndpoint||f.authEndpoint},"auth"in p&&("params"in p.auth&&(d.params=p.auth.params),"headers"in p.auth&&(d.headers=p.auth.headers)),"authorizer"in p)return{customHandler:nS(c,d,p.authorizer)};return d}function uS(p,c){const d=lS(p,c);return Of(d)?d.customHandler:tS(d)}class dS extends qe{constructor(c){super(function(d,B){wA.debug(`No callbacks on watchlist events for ${d}`)}),this.pusher=c,this.bindWatchlistInternalEvent()}handleEvent(c){c.data.events.forEach(d=>{this.emit(d.name,d)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",c=>{var d=c.event;d==="pusher_internal:watchlist_events"&&this.handleEvent(c)})}}function pS(){let p,c;return{promise:new Promise((B,C)=>{p=B,c=C}),resolve:p,reject:c}}const hS=pS;class fS extends qe{constructor(c){super(function(d,B){wA.debug("No callbacks on user for "+d)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(d,B)=>{if(d){wA.warn(`Error during signin: ${d}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:B.auth,user_data:B.user_data})},this.pusher=c,this.pusher.connection.bind("state_change",({previous:d,current:B})=>{d!=="connected"&&B==="connected"&&this._signin(),d==="connected"&&B!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new dS(c),this.pusher.connection.bind("message",d=>{var B=d.event;B==="pusher:signin_success"&&this._onSigninSuccess(d.data),this.serverToUserChannel&&this.serverToUserChannel.name===d.channel&&this.serverToUserChannel.handleEvent(d)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(c){try{this.user_data=JSON.parse(c.user_data)}catch(d){wA.error(`Failed parsing user data after signin: ${c.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){wA.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const c=d=>{d.subscriptionPending&&d.subscriptionCancelled?d.reinstateSubscription():!d.subscriptionPending&&this.pusher.connection.state==="connected"&&d.subscribe()};this.serverToUserChannel=new M(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((d,B)=>{d.indexOf("pusher_internal:")===0||d.indexOf("pusher:")===0||this.emit(d,B)}),c(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:c,resolve:d}=hS();c.done=!1;const B=()=>{c.done=!0};c.then(B).catch(B),this.signinDonePromise=c,this._signinDoneResolve=d}}class ee{static ready(){ee.isReady=!0;for(var c=0,d=ee.instances.length;c<d;c++)ee.instances[c].connect()}static getClientFeatures(){return gt(vn({ws:q.Transports.ws},function(c){return c.isSupported({})}))}constructor(c,d){gS(c),Yx(d),this.key=c,this.options=d,this.config=Rf(this.options,this),this.channels=_t.createChannels(),this.global_emitter=new qe,this.sessionID=q.randomInt(1e9),this.timeline=new Zx(this.key,this.sessionID,{cluster:this.config.cluster,features:ee.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:_i.INFO,version:f.VERSION}),this.config.enableStats&&(this.timelineSender=_t.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+q.TimelineTransport.name}));var B=C=>q.getDefaultStrategy(this.config,C,Jx);this.connection=_t.createConnectionManager(this.key,{getStrategy:B,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",C=>{var S=C.event,D=S.indexOf("pusher_internal:")===0;if(C.channel){var z=this.channel(C.channel);z&&z.handleEvent(C)}D||this.global_emitter.emit(C.event,C.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",C=>{wA.warn(C)}),ee.instances.push(this),this.timeline.info({instances:ee.instances.length}),this.user=new fS(this),ee.isReady&&this.connect()}switchCluster(c){const{appKey:d,cluster:B}=c;this.key=d,this.options=Object.assign(Object.assign({},this.options),{cluster:B}),this.config=Rf(this.options,this),this.connection.switchCluster(this.key)}channel(c){return this.channels.find(c)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var c=this.connection.isUsingTLS(),d=this.timelineSender;this.timelineSenderTimer=new Fn(6e4,function(){d.send(c)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(c,d,B){return this.global_emitter.bind(c,d,B),this}unbind(c,d,B){return this.global_emitter.unbind(c,d,B),this}bind_global(c){return this.global_emitter.bind_global(c),this}unbind_global(c){return this.global_emitter.unbind_global(c),this}unbind_all(c){return this.global_emitter.unbind_all(),this}subscribeAll(){var c;for(c in this.channels.channels)this.channels.channels.hasOwnProperty(c)&&this.subscribe(c)}subscribe(c){var d=this.channels.add(c,this);return d.subscriptionPending&&d.subscriptionCancelled?d.reinstateSubscription():!d.subscriptionPending&&this.connection.state==="connected"&&d.subscribe(),d}unsubscribe(c){var d=this.channels.find(c);d&&d.subscriptionPending?d.cancelSubscription():(d=this.channels.remove(c),d&&d.subscribed&&d.unsubscribe())}send_event(c,d,B){return this.connection.send_event(c,d,B)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}ee.instances=[],ee.isReady=!1,ee.logToConsole=!1,ee.Runtime=q,ee.ScriptReceivers=q.ScriptReceivers,ee.DependenciesReceivers=q.DependenciesReceivers,ee.auth_callbacks=q.auth_callbacks;const xi=ee;function gS(p){if(p==null)throw"You must pass your app key when you instantiate Pusher."}q.setup(ee)}},n={};function r(o){var a=n[o];if(a!==void 0)return a.exports;var i=n[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}r.d=(o,a)=>{for(var i in a)r.o(a,i)&&!r.o(o,i)&&Object.defineProperty(o,i,{enumerable:!0,get:a[i]})},r.o=(o,a)=>Object.prototype.hasOwnProperty.call(o,a);var s=r(721);return s})())})(_c)),_c.exports}var i_=o_();const a_=s_(i_);let Ze=null,tr=null;function c_(A){return T(this,null,function*(){return tr||(tr=T(null,null,function*(){const e=A.backendUrl.replace(/\/+$/,""),t=yield Fr(`${e}/api/settings`,{headers:{Authorization:`Bearer ${A.token}`}});if(!t.ok)throw new Error(`Failed to fetch settings: HTTP ${t.status}`);const n=yield t.json();Ze=new a_(n.pusher.key,{cluster:n.pusher.cluster||"local",forceTLS:!0,wsHost:n.pusher.wsHost||void 0,wsPort:n.pusher.wssPort,wssPort:n.pusher.wssPort,enabledTransports:n.pusher.wsHost?["ws"]:void 0,channelAuthorization:{customHandler:({socketId:r,channelName:s},o)=>{Fr(`${e}/api/pusher/auth`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${A.token}`},body:JSON.stringify({socket_id:r,channel_name:s})}).then(a=>a.json()).then(a=>o(null,a)).catch(a=>o(a instanceof Error?a:new Error(String(a)),null))}}})}),tr.catch(()=>{tr=null}),tr)})}function l_(A){if(!A||!Ze)return null;let e=!1;const t=({current:n})=>{n==="connected"&&e?(e=!1,A()):n!=="connected"&&(e=!0)};return Ze.connection.bind("state_change",t),()=>Ze==null?void 0:Ze.connection.unbind("state_change",t)}function u_(A,e,t){return T(this,null,function*(){if(yield c_(A),!Ze)return()=>{};const n=Ze.subscribe(`private-task-${e}`);t.onStatusUpdate&&n.bind(Rs.TASK_STATUS_UPDATED,t.onStatusUpdate),t.onInteractionCreated&&n.bind(Rs.TASK_INTERACTION_CREATED,t.onInteractionCreated),t.onInteractionAnswered&&n.bind(Rs.TASK_INTERACTION_ANSWERED,t.onInteractionAnswered),t.onBrowserCommandCreated&&n.bind(Rs.TASK_BROWSER_COMMAND_CREATED,t.onBrowserCommandCreated);const r=l_(t.onReconnect);return()=>{n.unbind_all(),Ze==null||Ze.unsubscribe(`private-task-${e}`),r==null||r()}})}function Mh(A,e){const t=a=>T(null,null,function*(){if(w.currentTaskId!==A||!w.runnerEl||w.state.kind!=="idle"&&w.state.kind!=="connecting"||w.handledCommandIds.has(a.commandId))return;w.handledCommandIds.add(a.commandId);const i={id:a.commandId,taskId:a.taskId,action:a.action,selector:a.selector,value:a.value,description:a.description,status:"pending",createdAt:new Date().toISOString()};Bn({kind:"executing",command:i,actionsRun:w.state.kind==="idle"?w.state.actionsRun:0}),yield Kh(i,e,A)}),n=a=>{if(!(w.currentTaskId!==A||!w.runnerEl)&&E_.has(a)){if(w.state.kind==="executing")Bn({kind:"finishing",status:a,actionsRun:w.state.actionsRun});else if(w.state.kind==="connecting"||w.state.kind==="idle"){const i=w.state.kind==="idle"?w.state.actionsRun:0;Bn({kind:"finished",status:a,actionsRun:i})}}},r=a=>{w.currentTaskId!==A||!w.runnerEl||(a.outputChunk&&zh([a.outputChunk]),n(a.status))},s=()=>T(null,null,function*(){var a;if(!(w.currentTaskId!==A||!w.runnerEl))try{const i=yield Xs(e,A);w.currentTaskId===A&&w.runnerEl&&(w.currentQuestion=(a=i[0])!=null?a:null,gn())}catch(i){}}),o=()=>T(null,null,function*(){var a;try{const[i,l,u,h]=yield Promise.all([vu(e,A),gb(e,A),Xs(e,A),hb(e,A)]);if(w.currentTaskId!==A||!w.runnerEl)return;zh(l),w.currentQuestion=(a=u[0])!=null?a:null,gn(),n(i.status),h&&h.status==="pending"&&(w.state.kind==="idle"||w.state.kind==="connecting")&&!w.handledCommandIds.has(h.id)?(w.handledCommandIds.add(h.id),Bn({kind:"executing",command:h,actionsRun:w.state.kind==="idle"?w.state.actionsRun:0}),yield Kh(h,e,A)):w.state.kind==="connecting"&&Bn({kind:"idle",actionsRun:0})}catch(i){}});o(),u_(e,A,{onStatusUpdate:r,onInteractionCreated:s,onInteractionAnswered:s,onBrowserCommandCreated:t,onReconnect:()=>{o()}}).then(a=>{if(w.currentTaskId!==A||w.state.kind==="finished"){a();return}w.unsubscribeTaskChannel=a})}function Jo(){var e;w.cancelArmed=!1,w.cancelArmTimeout&&(clearTimeout(w.cancelArmTimeout),w.cancelArmTimeout=null),w.cancelDisarmDocListener&&(document.removeEventListener("click",w.cancelDisarmDocListener,!0),w.cancelDisarmDocListener=null);const A=(e=w.runnerEl)==null?void 0:e.querySelector("[data-ap-runner-cancel]");A&&(A.textContent="Cancel task")}function d_(A,e){return T(this,null,function*(){if(w.currentTaskId!==e||!w.runnerEl)return;const t=w.runnerEl.querySelector("[data-ap-runner-cancel]");t&&(t.disabled=!0);try{yield wb(A,e)}catch(n){t&&(t.disabled=!1)}})}function Ph(){if(!w.currentTaskId||!w.currentApiOpts||!w.currentBackendUrl||!w.currentCaptureTitle)return;const A=w.currentTaskId,e=w.currentApiOpts;oh({taskId:A,backendUrl:w.currentBackendUrl,title:w.currentCaptureTitle}),w.timerHandle&&clearInterval(w.timerHandle),Yo(),w.timerHandle=setInterval(Yo,$h);const t=w.state.kind==="finished"?w.state.actionsRun:0;w.handledCommandIds=new Set,w.state={kind:"idle",actionsRun:t},xc(),Mh(A,e)}function Kh(A,e,t){return T(this,null,function*(){var o,a,i;let n="done",r;try{if(A.action==="getContext"){const l=A.selector?document.querySelector(A.selector):document.body;if(!l)throw new Error(`element not found (${A.selector})`);if(fl(l))throw new Error("Target element is in a sensitive or excluded region and cannot be automated");(o=w.highlightOverlay)==null||o.update(l),r=g_(l)}else{if(!A.selector)throw new Error(`${A.action} command is missing a selector`);const l=document.querySelector(A.selector);if(!l)throw new Error(`element not found (${A.selector})`);if(fl(l))throw new Error("Target element is in a sensitive or excluded region and cannot be automated");if((a=w.highlightOverlay)==null||a.update(l),A.action==="click")yield n_(l),r="Clicked";else{if(A.value===void 0)throw new Error("inputText command is missing a value");B_(l,A.value),r="Entered text"}}}catch(l){n="error",r=l instanceof Error?l.message:"Unknown error executing command"}if(w.currentTaskId===t&&w.runnerEl&&C_(n,A,r),yield f_(e,t,A.id,n,r),w.currentTaskId!==t||!w.runnerEl)return;(i=w.highlightOverlay)==null||i.hide();const s=(w.state.kind==="executing"||w.state.kind==="finishing"?w.state.actionsRun:0)+1;w.state.kind==="finishing"?Bn({kind:"finished",status:w.state.status,actionsRun:s}):w.state.kind==="executing"&&Bn({kind:"idle",actionsRun:s})})}function p_(A){return T(this,null,function*(){var n;if(!w.runnerEl||!w.currentQuestion||!w.currentTaskId||w.chatSubmitInFlight)return;const e=w.currentTaskId,t=w.currentApiOpts;if(t){w.chatSubmitInFlight=!0;try{const r={selectedOption:A};yield Su(t,e,w.currentQuestion.id,r),w.currentQuestion=null,gn();const s=yield Xs(t,e);w.currentTaskId===e&&w.runnerEl&&(w.currentQuestion=(n=s[0])!=null?n:null,gn())}catch(r){const s=w.runnerEl.querySelector("[data-ap-runner-chat-error]");s&&(s.textContent="Failed to send your answer — try again.",s.style.display="block")}finally{w.chatSubmitInFlight=!1}}})}function h_(A,e){return T(this,null,function*(){var o;if(!w.runnerEl||w.chatSubmitInFlight||w.state.kind==="finished"&&w.state.status==="failed")return;const t=w.runnerEl.querySelector("[data-ap-runner-chat-input]"),n=w.runnerEl.querySelector("[data-ap-runner-chat-error]"),r=w.runnerEl.querySelector("[data-ap-runner-chat-send]");if(!t||!n||!r)return;const s=t.value.trim();if(s){w.chatSubmitInFlight=!0,r.disabled=!0,n.style.display="none";try{if(w.currentQuestion){yield Su(A,e,w.currentQuestion.id,s),w.currentQuestion=null,gn();try{const a=yield Xs(A,e);w.currentTaskId===e&&w.runnerEl&&(w.currentQuestion=(o=a[0])!=null?o:null,gn())}catch(a){}}else yield Bb(A,e,s),w.state.kind==="finished"&&Ph();t.value=""}catch(a){n.textContent=a instanceof Error?a.message:"Failed to send — try again.",n.style.display="block"}finally{w.chatSubmitInFlight=!1,r.disabled=!1}}})}function f_(A,e,t,n,r){return T(this,null,function*(){try{yield fb(A,e,t,n,r)}catch(s){}})}function g_(A){const e=A.cloneNode(!0);e.querySelectorAll("script, style, noscript").forEach(r=>r.remove()),gl(e),Oi(e);let t=e.outerHTML,n=!1;return t.length>Gh&&(t=t.slice(0,Gh),n=!0),`URL: ${location.href}
|
|
1909
|
+
Title: ${document.title}
|
|
1910
|
+
|
|
1911
|
+
${t}${n?`
|
|
1912
|
+
… (truncated)`:""}`}function B_(A,e){var s;const n=A instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,r=(s=Object.getOwnPropertyDescriptor(n,"value"))==null?void 0:s.set;if(!r)throw new Error("target element does not accept text input");r.call(A,e),A.dispatchEvent(new Event("input",{bubbles:!0})),A.dispatchEvent(new Event("change",{bubbles:!0}))}function w_(A){if(!w.runnerEl||!w.currentTaskId||!w.currentBackendUrl)return;const e=w.runnerEl.querySelector("[data-ap-runner-summary]");if(!e)return;const t=`${w.currentBackendUrl.replace(/\/+$/,"")}/tasks/${w.currentTaskId}`,n=A==="completed"?"Automation complete!":"Automation ended",r=A==="completed",s=r?"ap-sdk-panel__btn--secondary":"ap-sdk-panel__btn--primary";e.style.display="block",e.innerHTML=`
|
|
1913
|
+
<div class="ap-sdk-success-card">
|
|
1914
|
+
<p class="ap-sdk-success-headline">${Sc(n)}</p>
|
|
1915
|
+
${r?`
|
|
1916
|
+
<div class="ap-sdk-runner__approval" data-ap-runner-approval>
|
|
1917
|
+
<div class="ap-sdk-runner__approval-actions">
|
|
1918
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary ap-sdk-panel__btn--block" data-ap-runner-approve><span class="ap-sdk-btn-icon" aria-hidden="true">✓</span>Approve</button>
|
|
1919
|
+
<button class="ap-sdk-runner__text-btn ap-sdk-runner__text-btn--danger" data-ap-runner-reject>Reject</button>
|
|
1920
|
+
</div>
|
|
1921
|
+
<div class="ap-sdk-runner__reject-form" data-ap-runner-reject-form style="display:none">
|
|
1922
|
+
<textarea class="ap-sdk-panel__textarea" rows="2" placeholder="What was wrong? (optional)" data-ap-runner-reject-feedback></textarea>
|
|
1923
|
+
<div class="ap-sdk-runner__reject-hint">Leave blank to reject permanently, or add details so the agent can retry with your feedback.</div>
|
|
1924
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--danger ap-sdk-panel__btn--block" data-ap-runner-reject-submit>Reject Permanently</button>
|
|
1925
|
+
</div>
|
|
1926
|
+
<div class="ap-sdk-runner__approval-error" data-ap-runner-approval-error style="display:none"></div>
|
|
1927
|
+
</div>
|
|
1928
|
+
<div class="ap-sdk-runner__divider"></div>`:""}
|
|
1929
|
+
<div class="ap-sdk-success-actions ap-sdk-success-actions--stacked">
|
|
1930
|
+
<button class="ap-sdk-panel__btn ${s} ap-sdk-panel__btn--block" data-ap-runner-view>View task<span class="ap-sdk-btn-icon ap-sdk-btn-icon--trailing" aria-hidden="true">↗</span></button>
|
|
1931
|
+
<button class="ap-sdk-runner__text-btn" data-ap-runner-close>Close</button>
|
|
1932
|
+
</div>
|
|
1933
|
+
</div>
|
|
1934
|
+
`,e.querySelector("[data-ap-runner-view]").addEventListener("click",()=>window.open(t,"_blank","noopener,noreferrer")),e.querySelector("[data-ap-runner-close]").addEventListener("click",()=>{const o=w.closeHandler;Ic(),o==null||o()}),r&&m_(e)}function m_(A){const e=A.querySelector("[data-ap-runner-approve]"),t=A.querySelector("[data-ap-runner-reject]"),n=A.querySelector("[data-ap-runner-reject-form]"),r=A.querySelector("[data-ap-runner-reject-feedback]"),s=A.querySelector("[data-ap-runner-reject-submit]"),o=A.querySelector("[data-ap-runner-approval-error]"),a=A.querySelector(".ap-sdk-runner__approval-actions"),i=u=>{o.textContent=u,o.style.display="block"};e.addEventListener("click",()=>T(null,null,function*(){if(!w.currentTaskId||!w.currentApiOpts)return;const u=w.currentTaskId,h=w.currentApiOpts;e.disabled=!0,t.disabled=!0,o.style.display="none";try{yield mb(h,u),a.innerHTML='<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">✓ Approved</span>',n.style.display="none"}catch(f){e.disabled=!1,t.disabled=!1,i(f instanceof Error?f.message:"Failed to approve — try again.")}})),t.addEventListener("click",()=>{n.style.display=n.style.display==="none"?"block":"none",n.style.display==="block"&&r.focus()});const l=()=>{s.textContent=r.value.trim()?"Reject & Continue":"Reject Permanently"};r.addEventListener("input",l),s.addEventListener("click",()=>T(null,null,function*(){if(!w.currentTaskId||!w.currentApiOpts)return;const u=w.currentTaskId,h=w.currentApiOpts,f=r.value.trim();s.disabled=!0,e.disabled=!0,o.style.display="none",s.textContent="Rejecting…";try{yield Cb(h,u,f),f?Ph():(a.innerHTML='<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">✕ Rejected</span>',n.style.display="none")}catch(g){s.disabled=!1,e.disabled=!1,l(),i(g instanceof Error?g.message:"Failed to reject — try again.")}}))}function Nh(){var e;const A=(e=w.runnerEl)==null?void 0:e.querySelector("[data-ap-runner-log]");A&&(A.scrollTop=A.scrollHeight)}function jo(){if(!w.runnerEl)return;const A=w.runnerEl.querySelector("[data-ap-runner-scroll-toggle]");A&&(A.textContent=w.autoScrollEnabled?"Auto ↓":"Manual",A.title=w.autoScrollEnabled?"Disable auto-scroll":"Enable auto-scroll",A.classList.toggle("ap-sdk-runner__scroll-toggle--active",w.autoScrollEnabled))}function xc(){if(!w.runnerEl)return;const A=w.runnerEl.querySelector("[data-ap-runner-status]"),e=w.runnerEl.querySelector("[data-ap-runner-counter]"),t=w.runnerEl.querySelector("[data-ap-runner-log]"),n=w.runnerEl.querySelector("[data-ap-runner-hint]");if(!A||!e||!t||!n)return;const r="actionsRun"in w.state?w.state.actionsRun:0;e.textContent=`${r} action${r===1?"":"s"}`,jo(),w.state.kind==="finished"?(A.textContent=w.state.status.replace(/_/g," "),A.className=`ap-sdk-status-badge ap-sdk-status-badge--${w.state.status.replace(/_/g,"-")}`,n.style.display="none",w_(w.state.status)):(A.textContent="running",A.className="ap-sdk-status-badge ap-sdk-status-badge--in-progress",n.style.display="block");const s=t.querySelector("[data-ap-runner-placeholder]");if(w.logEntries.length===0&&(w.state.kind==="connecting"||w.state.kind==="idle")){if(!s){const u=document.createElement("div");u.className="ap-sdk-runner__placeholder",u.setAttribute("data-ap-runner-placeholder","1"),u.textContent="Waiting for the agent's first action…",t.appendChild(u)}}else s==null||s.remove();gn();const o=w.runnerEl.querySelector("[data-ap-runner-chat-input]"),a=w.runnerEl.querySelector("[data-ap-runner-chat-send]");if(o&&a){const u=w.state.kind==="finished"&&w.state.status==="failed";o.disabled=u,a.disabled=u||w.chatSubmitInFlight,u&&(o.placeholder="This task failed — start a new automation to continue.")}const i=w.runnerEl.querySelector("[data-ap-runner-cancel]");i&&(i.style.display=w.state.kind==="finished"?"none":"");const l=w.runnerEl.querySelector("[data-ap-runner-summary]");l&&w.state.kind!=="finished"&&(l.style.display="none",l.innerHTML="")}function gn(){var r;if(!w.runnerEl)return;const A=w.runnerEl.querySelector("[data-ap-runner-question]"),e=w.runnerEl.querySelector("[data-ap-runner-chat-input]");if(!A||!e)return;if(!w.currentQuestion){A.style.display="none",A.innerHTML="",e.placeholder="Send a message to the agent…";return}const t=w.currentQuestion.questionMetadata,n=(r=t==null?void 0:t.options)!=null?r:[];if(e.placeholder="Type your answer…",A.style.display="block",A.innerHTML=`
|
|
1935
|
+
<div class="ap-sdk-runner__question-label">${Sc((t==null?void 0:t.header)||"The agent has a question")}</div>
|
|
1936
|
+
<div class="ap-sdk-runner__question-text ap-sdk-markdown">${Rh((t==null?void 0:t.question)||w.currentQuestion.question)}</div>
|
|
1937
|
+
${n.length>0?'<div class="ap-sdk-runner__question-options" data-ap-runner-question-options></div>':""}
|
|
1938
|
+
`,n.length>0){const s=A.querySelector("[data-ap-runner-question-options]");for(const o of n){const a=document.createElement("button");a.type="button",a.className="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__question-option",a.textContent=o.label,a.addEventListener("click",()=>void p_(o.label)),s.appendChild(a)}}}function Yo(){if(!w.runnerEl||w.runStartedAt===null)return;const A=w.runnerEl.querySelector("[data-ap-runner-timer]");if(!A)return;const e=Math.max(0,Math.floor((Date.now()-w.runStartedAt)/1e3)),t=String(Math.floor(e/60)).padStart(2,"0"),n=String(e%60).padStart(2,"0");A.textContent=`${t}:${n}`}function C_(A,e,t){var u,h;const n=A==="done"?"✓":"✗",r=e.selector?` \`${e.selector}\``:"",s=e.description||`${e.action}${r}`,o=A==="done"&&e.action==="getContext"?`read context (${(u=t==null?void 0:t.length)!=null?u:0} chars)`:t,a=o?` — ${o}`:"";if(w.logEntries.push({status:A,text:`${n} ${s}${a}`}),!w.runnerEl)return;const i=w.runnerEl.querySelector("[data-ap-runner-log]");if(!i)return;(h=i.querySelector("[data-ap-runner-placeholder]"))==null||h.remove();const l=document.createElement("div");l.className=`ap-sdk-runner__log-entry ap-sdk-runner__log-entry--${A}`,l.textContent=w.logEntries[w.logEntries.length-1].text,i.appendChild(l),w.autoScrollEnabled&&(i.scrollTop=i.scrollHeight)}function b_(A){var e,t;return(t=(e=A.display)==null?void 0:e.variant)!=null?t:A.sdkEventType}function Q_(A){const e=b_(A);return(A.stream==="stdout"||A.stream==="stderr"||A.stream==="sdk_event"&&(e==="text"||e==="thinking"))&&A.data.trim()||null}function zh(A){var n;const e=A.filter(r=>r.sequence>w.lastRenderedChunkSequence).sort((r,s)=>r.sequence-s.sequence);if(e.length===0||(w.lastRenderedChunkSequence=Math.max(w.lastRenderedChunkSequence,...e.map(r=>r.sequence)),!w.runnerEl))return;const t=w.runnerEl.querySelector("[data-ap-runner-log]");if(t)for(const r of e){const s=Q_(r);if(!s)continue;(n=t.querySelector("[data-ap-runner-placeholder]"))==null||n.remove();const o=document.createElement("div");o.className=`ap-sdk-runner__log-entry ap-sdk-runner__log-entry--output ap-sdk-runner__log-entry--${r.stream}`,r.stream==="sdk_event"?(o.classList.add("ap-sdk-markdown"),o.innerHTML=Rh(s)):o.textContent=s,t.appendChild(o),w.autoScrollEnabled&&(t.scrollTop=t.scrollHeight)}}function y_(A){return A.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Sc(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}const $h=1e3,U_=32,Gh=15e3,E_=new Set(["completed","failed","cancelled"]),F_=4e3,w={runnerEl:null,runnerResizeCleanup:null,runnerDragCleanup:null,timerHandle:null,highlightOverlay:null,closeHandler:null,currentCaptureTitle:null,cancelArmed:!1,cancelArmTimeout:null,cancelDisarmDocListener:null,state:{kind:"connecting"},logEntries:[],autoScrollEnabled:!0,runStartedAt:null,currentTaskId:null,currentBackendUrl:null,currentApiOpts:null,lastRenderedChunkSequence:-1,currentQuestion:null,chatSubmitInFlight:!1,unsubscribeTaskChannel:null,handledCommandIds:new Set};function Bn(A){var e,t;w.state=A,w.state.kind==="idle"&&w.runStartedAt===null&&(w.runStartedAt=Date.now(),Yo(),w.timerHandle=setInterval(Yo,$h)),w.state.kind==="finished"&&(w.timerHandle&&(clearInterval(w.timerHandle),w.timerHandle=null),(e=w.unsubscribeTaskChannel)==null||e.call(w),w.unsubscribeTaskChannel=null,(t=w.highlightOverlay)==null||t.hide(),ih()),xc()}function Ic(){var A,e,t,n,r;Jo(),ih(),w.timerHandle&&clearInterval(w.timerHandle),w.timerHandle=null,(A=w.unsubscribeTaskChannel)==null||A.call(w),w.unsubscribeTaskChannel=null,(e=w.highlightOverlay)==null||e.destroy(),w.highlightOverlay=null,w.runnerEl&&nt(w.runnerEl),(t=w.runnerEl)==null||t.remove(),w.runnerEl=null,(n=w.runnerResizeCleanup)==null||n.call(w),w.runnerResizeCleanup=null,(r=w.runnerDragCleanup)==null||r.call(w),w.runnerDragCleanup=null,w.closeHandler=null,w.state={kind:"connecting"},w.logEntries=[],w.autoScrollEnabled=!0,w.runStartedAt=null,w.currentTaskId=null,w.currentBackendUrl=null,w.currentApiOpts=null,w.currentCaptureTitle=null,w.lastRenderedChunkSequence=-1,w.currentQuestion=null,w.chatSubmitInFlight=!1,w.handledCommandIds=new Set}function Tc(A,e,t,n,r){w.runnerEl&&Ic(),w.closeHandler=r!=null?r:null,w.state={kind:"connecting"},w.logEntries=[],w.autoScrollEnabled=!0,w.runStartedAt=null,w.lastRenderedChunkSequence=-1,w.currentQuestion=null,w.chatSubmitInFlight=!1,w.handledCommandIds=new Set,w.currentTaskId=A,w.currentBackendUrl=t,w.currentApiOpts=e,w.currentCaptureTitle=n,oh({taskId:A,backendUrl:t,title:n});const s=document.createElement("div");w.runnerEl=s,s.className="ap-sdk-panel",s.setAttribute("data-ap-sdk","1"),s.setAttribute("role","dialog"),s.setAttribute("aria-modal","true"),s.setAttribute("aria-label","Automation in progress");const o=n.length>55?`${n.slice(0,52)}…`:n;s.innerHTML=`
|
|
1806
1939
|
<div class="ap-sdk-panel__header">
|
|
1807
1940
|
<span class="ap-sdk-panel__title">
|
|
1808
1941
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
1809
|
-
|
|
1942
|
+
Automating page
|
|
1810
1943
|
</span>
|
|
1811
1944
|
<div class="ap-sdk-panel__header-actions">
|
|
1812
|
-
<button class="ap-sdk-panel__clear" aria-label="Clear selections" title="Clear selections" data-ap-clear-selections type="button">⟲</button>
|
|
1813
|
-
<button class="ap-sdk-panel__config" aria-label="Configure" data-ap-reconfigure>⚙</button>
|
|
1814
1945
|
<button class="ap-sdk-panel__close" aria-label="Close" data-ap-close>×</button>
|
|
1815
1946
|
</div>
|
|
1816
1947
|
</div>
|
|
1817
|
-
<div class="ap-sdk-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
<div class="ap-sdk-panel__pick-actions" data-ap-pick-actions>
|
|
1822
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-panel__btn--select-parent" data-ap-select-parent type="button">
|
|
1823
|
-
⬆ Select parent
|
|
1824
|
-
</button>
|
|
1825
|
-
${l?`
|
|
1826
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-panel__btn--reselect" data-ap-reselect type="button">
|
|
1827
|
-
↻ Re-select
|
|
1828
|
-
</button>`:""}
|
|
1829
|
-
</div>
|
|
1830
|
-
${m?`
|
|
1831
|
-
<div class="ap-sdk-credentials-section" data-ap-credentials>
|
|
1832
|
-
<p class="ap-sdk-credentials-heading">Connect to Agent Platform to continue</p>
|
|
1833
|
-
<p class="ap-sdk-config-hint">You'll be asked to approve this connection on Agent Platform's own sign-in page.</p>
|
|
1834
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-connect-required type="button">Connect via Agent Platform</button>
|
|
1835
|
-
</div>`:""}
|
|
1836
|
-
<div class="ap-sdk-panel__body">
|
|
1837
|
-
<div class="ap-sdk-panel__field">
|
|
1838
|
-
<label class="ap-sdk-panel__label" for="ap-sdk-note">Instruction</label>
|
|
1839
|
-
<textarea id="ap-sdk-note" class="ap-sdk-panel__textarea" rows="3"
|
|
1840
|
-
placeholder="Describe the task or planning session…" data-ap-note></textarea>
|
|
1841
|
-
</div>
|
|
1842
|
-
${d?`
|
|
1843
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--add-another" data-ap-add-another disabled>
|
|
1844
|
-
+ Add another
|
|
1845
|
-
</button>`:""}
|
|
1846
|
-
<div class="ap-sdk-panel__field">
|
|
1847
|
-
<div class="ap-sdk-panel__label">Type</div>
|
|
1848
|
-
<div class="ap-sdk-panel__toggle">
|
|
1849
|
-
${y?`<button class="ap-sdk-panel__toggle-btn${E.captureType==="planning"?" ap-sdk-active":""}" data-ap-type="planning">Planning Session</button>`:""}
|
|
1850
|
-
${k?`<button class="ap-sdk-panel__toggle-btn${E.captureType==="task"?" ap-sdk-active":""}" data-ap-type="task">Task</button>`:""}
|
|
1851
|
-
${k?`<button class="ap-sdk-panel__toggle-btn${E.captureType==="automate"?" ap-sdk-active":""}" data-ap-type="automate">Automate</button>`:""}
|
|
1852
|
-
</div>
|
|
1948
|
+
<div class="ap-sdk-runner__meta">
|
|
1949
|
+
<div class="ap-sdk-runner__meta-row">
|
|
1950
|
+
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--automate">Automate</span>
|
|
1951
|
+
<span class="ap-sdk-runner__title" title="${y_(n)}">${Sc(o)}</span>
|
|
1853
1952
|
</div>
|
|
1854
|
-
<div class="ap-sdk-
|
|
1855
|
-
<
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
</
|
|
1859
|
-
<span class="ap-sdk-advanced__hint">Lets the agent click Submit, Confirm, Send, or Publish buttons to finish the task. It will still avoid payments and deletions unless you ask for them.</span>
|
|
1953
|
+
<div class="ap-sdk-runner__meta-row ap-sdk-runner__meta-row--controls">
|
|
1954
|
+
<span class="ap-sdk-runner__counter" data-ap-runner-counter>0 actions</span>
|
|
1955
|
+
<span class="ap-sdk-runner__timer" data-ap-runner-timer>00:00</span>
|
|
1956
|
+
<span class="ap-sdk-status-badge ap-sdk-status-badge--in-progress" data-ap-runner-status>running</span>
|
|
1957
|
+
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__cancel-btn" data-ap-runner-cancel type="button">Cancel task</button>
|
|
1860
1958
|
</div>
|
|
1861
1959
|
</div>
|
|
1862
|
-
<div class="ap-sdk-
|
|
1863
|
-
|
|
1864
|
-
<button class="ap-sdk-
|
|
1865
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-cancel>Cancel</button>
|
|
1960
|
+
<div class="ap-sdk-runner__log-toolbar">
|
|
1961
|
+
<button type="button" class="ap-sdk-runner__scroll-toggle" data-ap-runner-scroll-toggle>Auto ↓</button>
|
|
1962
|
+
<button type="button" class="ap-sdk-runner__scroll-jump" data-ap-runner-scroll-jump title="Jump to latest output">Jump to latest</button>
|
|
1866
1963
|
</div>
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1964
|
+
<div class="ap-sdk-runner__log" data-ap-runner-log></div>
|
|
1965
|
+
<div class="ap-sdk-runner__chat" data-ap-runner-chat>
|
|
1966
|
+
<div class="ap-sdk-runner__question" data-ap-runner-question style="display:none"></div>
|
|
1967
|
+
<form class="ap-sdk-runner__chat-form" data-ap-runner-chat-form>
|
|
1968
|
+
<input
|
|
1969
|
+
type="text"
|
|
1970
|
+
class="ap-sdk-runner__chat-input"
|
|
1971
|
+
data-ap-runner-chat-input
|
|
1972
|
+
placeholder="Send a message to the agent…"
|
|
1973
|
+
autocomplete="off"
|
|
1974
|
+
/>
|
|
1975
|
+
<button type="submit" class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-runner-chat-send>Send</button>
|
|
1976
|
+
</form>
|
|
1977
|
+
<div class="ap-sdk-runner__chat-error" data-ap-runner-chat-error style="display:none"></div>
|
|
1978
|
+
</div>
|
|
1979
|
+
<div class="ap-sdk-runner__hint" data-ap-runner-hint>Closing keeps the task running — resume anytime from My Captures.</div>
|
|
1980
|
+
<div class="ap-sdk-panel__status" data-ap-runner-summary style="display:none"></div>
|
|
1981
|
+
`,s.addEventListener("wheel",a=>{a.stopPropagation()},{passive:!0}),s.addEventListener("touchmove",a=>{a.stopPropagation()},{passive:!0}),document.body.appendChild(s),w.highlightOverlay=Li(),tt(s),w.runnerResizeCleanup=ta(s,ea),w.runnerDragCleanup=vr(s,kr),s.querySelector("[data-ap-close]").addEventListener("click",()=>{Ic(),r==null||r()}),s.querySelector("[data-ap-runner-chat-form]").addEventListener("submit",a=>{a.preventDefault(),h_(e,A)}),s.querySelector("[data-ap-runner-cancel]").addEventListener("click",a=>{a.stopPropagation();const i=a.currentTarget;if(!w.cancelArmed){w.cancelArmed=!0,i.textContent="Confirm",w.cancelArmTimeout=setTimeout(Jo,F_),w.cancelDisarmDocListener=l=>{l.target!==i&&Jo()},document.addEventListener("click",w.cancelDisarmDocListener,!0);return}Jo(),d_(e,A)}),s.querySelector("[data-ap-runner-scroll-toggle]").addEventListener("click",()=>{w.autoScrollEnabled=!w.autoScrollEnabled,w.autoScrollEnabled&&Nh(),jo()}),s.querySelector("[data-ap-runner-scroll-jump]").addEventListener("click",()=>{w.autoScrollEnabled=!0,Nh(),jo()}),s.querySelector("[data-ap-runner-log]").addEventListener("scroll",()=>{if(!w.autoScrollEnabled||!w.runnerEl)return;const a=w.runnerEl.querySelector("[data-ap-runner-log]");a.scrollHeight-a.scrollTop-a.clientHeight>U_&&(w.autoScrollEnabled=!1,jo())}),xc(),Mh(A,e)}const Hc="ap-sdk-captures",k_=50;function nr(){try{const A=localStorage.getItem(Hc);return A?JSON.parse(A):[]}catch(A){return[]}}function v_(A){const e=nr(),t=[A,...e].slice(0,k_);try{localStorage.setItem(Hc,JSON.stringify(t))}catch(n){}}function __(){try{localStorage.removeItem(Hc)}catch(A){}}function Vh(A){var o,a,i,l,u;if(A.id){const h=document.querySelector(`label[for="${CSS.escape(A.id)}"]`),f=(o=h==null?void 0:h.textContent)==null?void 0:o.trim();if(f)return f}const e=A.closest("label"),t=(a=e==null?void 0:e.textContent)==null?void 0:a.trim();if(t)return t;const n=(i=A.getAttribute("aria-label"))==null?void 0:i.trim();if(n)return n;const r=(l=A.placeholder)==null?void 0:l.trim();if(r)return r;const s=(u=A.getAttribute("name"))==null?void 0:u.trim();return s||A.tagName.toLowerCase()}function x_(A,e){return`Click "${A}" ${e.toLowerCase()}`}function Zh(A,e,t){return t?`Typed [redacted] into ${A}`:`Typed "${e}" into ${A}`}function Xh(A,e){return`Scrolled to (${A}, ${e})`}function S_(A,e){return e?`Pressed "${A}" in ${e}`:`Pressed "${A}"`}function Wh(A){return A.map((e,t)=>`${t+1}. ${e.description}`).join(`
|
|
1982
|
+
`)}const I_=400,T_=new Set(["Enter","Tab","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End","PageUp","PageDown"]),H_=new Set(["Control","Meta","Alt","Shift"]);function L_(A){if(H_.has(A.key))return null;const e=[];return A.ctrlKey&&e.push("Ctrl"),A.metaKey&&e.push("Cmd"),A.altKey&&e.push("Alt"),e.length>0?(e.push(A.key.length===1?A.key.toUpperCase():A.key),e.join("+")):T_.has(A.key)?A.key:null}function D_(A){return A instanceof HTMLInputElement||A instanceof HTMLTextAreaElement||A instanceof HTMLSelectElement?Vh(A):Is(A)||A.tagName.toLowerCase()}let rr=[],ue=null,qo=null,me=null,ut=null,dt=null;function Jh(){qo&&(qo.textContent=`● Recording — ${rr.length} step${rr.length===1?"":"s"}`)}function Lc(){dt&&(clearTimeout(dt),dt=null),ut&&(rr.push(ut),ut=null,Jh())}function Dc(A){Lc(),rr.push(A),Jh()}function R_(A){var e,t,n;return A instanceof HTMLSelectElement&&(n=(t=(e=A.selectedOptions[0])==null?void 0:e.textContent)==null?void 0:t.trim())!=null?n:A.value}function O_(A,e){me&&me(),rr=[],ut=null,ue=document.createElement("div"),ue.className="ap-sdk-recorder-bar",ue.setAttribute("data-ap-sdk","1"),ue.innerHTML=`
|
|
1983
|
+
<span class="ap-sdk-recorder-bar__counter" data-ap-recorder-counter>● Recording — 0 steps</span>
|
|
1984
|
+
<button class="ap-sdk-recorder-bar__btn ap-sdk-recorder-bar__btn--stop" data-ap-recorder-stop type="button">Stop</button>
|
|
1985
|
+
<button class="ap-sdk-recorder-bar__btn ap-sdk-recorder-bar__btn--discard" data-ap-recorder-discard type="button">Discard</button>
|
|
1986
|
+
`,document.body.appendChild(ue),tt(ue),qo=ue.querySelector("[data-ap-recorder-counter]");const t=()=>{Lc();const i=rr;me==null||me(),A(i)},n=()=>{me==null||me()};ue.querySelector("[data-ap-recorder-stop]").addEventListener("click",t),ue.querySelector("[data-ap-recorder-discard]").addEventListener("click",n);const r=i=>{if(Qr(i.target))return;const l=i.target;Dc({action:"click",cssSelector:Ss(l),elementText:Is(l),description:x_(Is(l),l.tagName),capturedAt:new Date().toISOString()})},s=i=>{if(Qr(i.target))return;const l=i.target;if(!(l instanceof HTMLInputElement)&&!(l instanceof HTMLTextAreaElement)&&!(l instanceof HTMLSelectElement))return;const u=Vh(l),h=hl(l),f=h?"[redacted]":R_(l);Dc($(k({action:"inputText",cssSelector:Ss(l),elementText:u,value:f},h?{redacted:!0}:{}),{description:Zh(u,f,h),capturedAt:new Date().toISOString()}))},o=()=>{const i=Math.round(window.scrollX),l=Math.round(window.scrollY);ut?(ut.scrollX=i,ut.scrollY=l,ut.description=Xh(i,l)):ut={action:"scroll",scrollX:i,scrollY:l,description:Xh(i,l),capturedAt:new Date().toISOString()},dt&&clearTimeout(dt),dt=setTimeout(()=>{dt=null,Lc()},I_)},a=i=>{if(i.key==="Escape"){n();return}if(Qr(i.target))return;const l=L_(i);if(!l)return;const u=i.target instanceof Element?i.target:document.body,h=D_(u);Dc({action:"keypress",cssSelector:Ss(u),elementText:h,key:l,description:S_(l,h),capturedAt:new Date().toISOString()})};document.addEventListener("click",r,{capture:!0}),document.addEventListener("change",s,{capture:!0}),window.addEventListener("scroll",o,{capture:!0,passive:!0}),document.addEventListener("keydown",a,{capture:!0}),me=()=>{document.removeEventListener("click",r,{capture:!0}),document.removeEventListener("change",s,{capture:!0}),window.removeEventListener("scroll",o,{capture:!0}),document.removeEventListener("keydown",a,{capture:!0}),dt&&(clearTimeout(dt),dt=null),ut=null,ue&&nt(ue),ue==null||ue.remove(),ue=null,qo=null,me=null}}function M_(){me==null||me()}function Ai(){return me!==null}const P_="data-ap-sdk",K_="ap-sdk-fab",jh="ap-sdk-fab--dragging",Rc="ap-sdk-fab--open",Yh="ap-sdk-fab-pos",ei="ap-sdk-fab--left-edge",N_='<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>',z_='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 3 7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="m13 13 6 6"/></svg>',$_='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="8"/></svg>',G_='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>';let P=null,pt=null,Vt=null,Zt=null,Te=null,sr=null,or=null,ir=null,ti=null,os=null,ar=null,ni=null,ri=null,si=null,qh=0,Af=0,ef=0,tf=0,cr=!1,Xe=!1,is=null,wn=null;function V_(){is=A=>{if(!P){oi();return}if(!cr){if(Math.hypot(A.clientX-ef,A.clientY-tf)<5)return;cr=!0,Xe=!0,P.classList.add(jh)}Z_(A.clientX-qh,A.clientY-Af)},wn=()=>{if(!P){oi();return}cr?(cr=!1,P.classList.remove(jh),P.style.transition="",X_(P.getBoundingClientRect())):P.style.transition="",oi()},window.addEventListener("pointermove",is),window.addEventListener("pointerup",wn),window.addEventListener("pointercancel",wn)}function oi(){is&&(window.removeEventListener("pointermove",is),is=null),wn&&(window.removeEventListener("pointerup",wn),window.removeEventListener("pointercancel",wn),wn=null)}function Z_(A,e){if(!P)return;const t=P.offsetWidth||52,n=P.offsetHeight||52;P.style.top=`${Math.max(0,Math.min(e,window.innerHeight-n))}px`,P.style.left=`${Math.max(0,Math.min(A,window.innerWidth-t))}px`,P.style.bottom="auto",P.style.right="auto"}function X_(A){if(!P)return;const t=Math.max(16,Math.min(window.innerHeight-A.bottom,window.innerHeight-52-16)),n=A.left+A.width/2<window.innerWidth/2?"left":"right";P.style.top="auto",P.style.bottom=`${t}px`,n==="left"?(P.style.right="auto",P.style.left="16px",P.classList.add(ei)):(P.style.left="auto",P.style.right="16px",P.classList.remove(ei));try{localStorage.setItem(Yh,JSON.stringify({edge:n,bottom:t}))}catch(r){}}function W_(){if(P)try{const A=localStorage.getItem(Yh);if(!A)return;const e=JSON.parse(A);if(typeof e.bottom!="number"||e.edge!=="left"&&e.edge!=="right")return;const n=Math.max(16,Math.min(e.bottom,window.innerHeight-52-16));P.style.top="auto",P.style.bottom=`${n}px`,e.edge==="left"?(P.style.right="auto",P.style.left="16px",P.classList.add(ei)):(P.style.left="auto",P.style.right="16px",P.classList.remove(ei))}catch(A){}}function lr(){P==null||P.classList.remove(Rc),ar&&(window.removeEventListener("pointerdown",ar,{capture:!0}),ar=null)}function J_(){P&&(P.classList.add(Rc),ar=A=>{!P||P.contains(A.target)||lr()},requestAnimationFrame(()=>{ar&&window.addEventListener("pointerdown",ar,{capture:!0})}))}function ii(A){return new DOMParser().parseFromString(A,"text/html").body.firstElementChild}function nf(A,e,t){var a;if(ni=A,ri=e,si=t,P)return;P=document.createElement("div"),P.className=K_,P.setAttribute(P_,"1"),sr=document.createElement("div"),sr.className="ap-sdk-fab__row";const n=document.createElement("span");n.className="ap-sdk-fab__label",n.textContent="View captures",Te=document.createElement("button"),Te.className="ap-sdk-fab__list ap-sdk-fab__sub",Te.setAttribute("aria-label","My captures"),Te.setAttribute("title","View my captures"),Te.appendChild(ii(G_));const r=document.createElement("span");r.className="ap-sdk-fab__badge",r.setAttribute("data-ap-badge",""),r.style.display="none",Te.appendChild(r),sr.appendChild(n),sr.appendChild(Te),or=document.createElement("div"),or.className="ap-sdk-fab__row";const s=document.createElement("span");s.className="ap-sdk-fab__label",s.textContent="Capture element",Vt=document.createElement("button"),Vt.className="ap-sdk-fab__capture ap-sdk-fab__sub",Vt.setAttribute("aria-label","Capture element"),Vt.setAttribute("title","Capture element to Agent Platform"),Vt.appendChild(ii(z_)),or.appendChild(s),or.appendChild(Vt),ir=document.createElement("div"),ir.className="ap-sdk-fab__row";const o=document.createElement("span");o.className="ap-sdk-fab__label",o.textContent="Record interaction",Zt=document.createElement("button"),Zt.className="ap-sdk-fab__record ap-sdk-fab__sub",Zt.setAttribute("aria-label","Record interaction"),Zt.setAttribute("title","Record a sequence of interactions"),Zt.appendChild(ii($_)),ir.appendChild(o),ir.appendChild(Zt),pt=document.createElement("button"),pt.className="ap-sdk-fab__main",pt.setAttribute("aria-label","Agent Platform"),pt.setAttribute("title","Agent Platform"),pt.appendChild(ii(N_)),P.appendChild(sr),P.appendChild(or),P.appendChild(ir),P.appendChild(pt),pt.addEventListener("click",i=>{if(Xe){Xe=!1;return}i.preventDefault(),i.stopPropagation(),P!=null&&P.classList.contains(Rc)?lr():J_()}),Vt.addEventListener("click",i=>{if(Xe){Xe=!1;return}i.preventDefault(),i.stopPropagation(),lr(),!Rn()&&!Ai()&&ni&&ni()}),Zt.addEventListener("click",i=>{if(Xe){Xe=!1;return}i.preventDefault(),i.stopPropagation(),lr(),!Rn()&&!Ai()&&ri&&ri()}),Te.addEventListener("click",i=>{if(Xe){Xe=!1;return}i.preventDefault(),i.stopPropagation(),lr(),si&&si()}),os=i=>{if(!P||!(P===i.target||P.contains(i.target)))return;const l=P.getBoundingClientRect();qh=i.clientX-l.left,Af=i.clientY-l.top,ef=i.clientX,tf=i.clientY,cr=!1,Xe=!1,P.style.transition="none",i.stopPropagation(),V_()},window.addEventListener("pointerdown",os,{capture:!0}),((a=document.body)!=null?a:document.documentElement).appendChild(P),tt(P),W_(),ti=setInterval(()=>{pt&&pt.classList.toggle("ap-sdk-fab__main--active",Rn()||Ai())},200)}function mn(A){const e=Te==null?void 0:Te.querySelector("[data-ap-badge]");e&&(A>0?(e.textContent=String(A),e.style.display=""):e.style.display="none")}function rf(){cr=!1,Xe=!1,oi(),lr(),ti&&(clearInterval(ti),ti=null),os&&(window.removeEventListener("pointerdown",os,{capture:!0}),os=null),P&&nt(P),P==null||P.remove(),P=null,pt=null,Vt=null,Zt=null,Te=null,sr=null,or=null,ir=null,ni=null,ri=null,si=null}function sf(A,e){return T(this,null,function*(){try{if(A.type==="planning"){const n=yield db(e,A.id);return{capture:A,status:n.status,approved:n.status==="approved"}}const t=yield vu(e,A.id);return{capture:A,status:t.status,approved:t.approved===!0}}catch(t){return{capture:A,status:"unavailable",approved:!1}}})}function of(A){return A.filter(e=>!e.approved).length}function af(A){return T(this,null,function*(){const e=nr();if(!A||e.length===0){mn(e.length);return}const t=yield Promise.all(e.map(n=>sf(n,A)));mn(of(t))})}function cf(A){return A.screenshotBlob?`
|
|
1880
1987
|
|
|
1988
|
+
(A screenshot of the selected element is attached.)`:""}function j_(A){return A.map((e,t)=>{var r,s;const n=[`## Pick ${t+1}`,""];return(r=e.ctx.interactionSteps)!=null&&r.length?n.push("Recorded steps:",Wh(e.ctx.interactionSteps)):(n.push(`Element: ${e.ctx.elementText||"(no text)"}`),e.ctx.cssSelector&&n.push(`Selector: ${e.ctx.cssSelector}`),e.ctx.ancestry&&n.push(`Ancestry: ${e.ctx.ancestry}`)),n.push(`Page: ${e.ctx.pageTitle} (${e.ctx.pageUrl})`),(s=e.ctx.innerTree)!=null&&s.trim()&&n.push(`
|
|
1881
1989
|
Element tree:
|
|
1882
|
-
${
|
|
1990
|
+
${e.ctx.innerTree}`),e.screenshotBlob&&n.push(`Screenshot: attached (see screenshot-${t+1}.png)`),n.push("",`Instruction:
|
|
1991
|
+
${e.instruction}`),n.join(`
|
|
1992
|
+
`)}).join(`
|
|
1883
1993
|
|
|
1884
|
-
|
|
1885
|
-
|
|
1994
|
+
---
|
|
1995
|
+
|
|
1996
|
+
`)}function Y_(i){return T(this,arguments,function*({opts:A,advancedOpts:e,allPicks:t,captureType:n,note:r,allowSubmit:s,project:o,projectCode:a}){var m,Q;const u=t.some(U=>!!U.screenshotBlob)?(yield Promise.all(t.map((U,E)=>U.screenshotBlob?ib(A,U.screenshotBlob,`screenshot-${E+1}.png`).then(v=>v.id).catch(()=>null):Promise.resolve(null)))).filter(U=>U!==null):[],h={id:o==null?void 0:o.id,key:a};let f,g;if(t.length===1){const U=r+cf(t[0]),E=t[0].ctx;if(n==="task")f=(yield qi(A,{project:h,note:U,ctx:E,advancedOpts:e,extraFileIds:u})).id,g=r.slice(0,120)||E.pageTitle||"Browser capture";else if(n==="planning"){let v=ig(r,$(k({},E),{ancestry:E.outerTree||E.ancestry}));(m=E.innerTree)!=null&&m.trim()&&(v+=`
|
|
1886
1997
|
|
|
1887
|
-
`);E.captureType==="task"?(ue=(yield Hs(rt,{project:De,note:ot,ctx:Lt[0].ctx,advancedOpts:_t,titleOverride:It,type:cc,titleInstruction:ln})).id,Ie="task",X=It):E.captureType==="planning"?(ue=(yield gc(rt,De,ot,_t)).id,Ie="planning",X=It):(ue=(yield fc(rt,{project:De,note:ot,ctx:Lt[0].ctx,advancedOpts:_t,titleOverride:It,titleInstruction:ln,allowSubmit:E.allowSubmit})).id,Ie="automate",X=It)}if(Fb({id:ue,type:Ie,title:X,backendUrl:F,createdAt:new Date().toISOString()}),Ai(),Cl(rt).catch(()=>{}),Ie==="automate"){Le(),mi(ue,rt,F,X,p);return}const wr=Ie==="task"?`${F.replace(/\/+$/,"")}/tasks/${ue}`:`${F.replace(/\/+$/,"")}/planning/${ue}`;wk(se,Ie,X,wr,Le),W.classList.add("ap-sdk-panel--success"),sn==null||sn(),sn=null,tt==null||tt.hide(),E.submitting=!1,Ci(W,!1)}catch(De){De instanceof dc?yk(se,()=>z(null,null,function*(){const{code:ue}=yield xi(F),{token:Ie,expiresAt:X}=yield Fs({backendUrl:F},ue,window.location.origin);ts({backendUrl:F,token:Ie,projectCode:o,expiresAt:X}),n.token=Ie,i({backendUrl:F,token:Ie}),yield Pe()})):Sn(se,"error",De instanceof Error?De.message:"An unexpected error occurred."),E.submitting=!1,Ci(W,!1),q.textContent="Submit"}});q.addEventListener("click",Pe),setTimeout(()=>H.focus(),50)}const _k={click:"🖱",inputText:"⌨",scroll:"↕",keypress:"⌤"};function zl(e){var t,n;return(t=e.interactionSteps)!=null&&t.length?`
|
|
1888
|
-
<div class="ap-sdk-panel__context-label">Recorded steps (${e.interactionSteps.length})</div>
|
|
1889
|
-
<div class="ap-sdk-panel__context-steps">
|
|
1890
|
-
${e.interactionSteps.map(r=>`
|
|
1891
|
-
<div class="ap-sdk-panel__context-step">
|
|
1892
|
-
<span class="ap-sdk-panel__context-step-icon">${_k[r.action]}</span>
|
|
1893
|
-
<span class="ap-sdk-panel__context-step-text">${ut(r.description)}</span>
|
|
1894
|
-
</div>
|
|
1895
|
-
`).join("")}
|
|
1896
|
-
</div>
|
|
1897
|
-
`:`
|
|
1898
|
-
<div class="ap-sdk-panel__context-label">Captured element</div>
|
|
1899
|
-
<div class="ap-sdk-panel__context-text" title="${ut((n=e.elementText)!=null?n:"")}">${ut(e.elementText||"(no text)")}</div>
|
|
1900
|
-
${e.cssSelector?`<div class="ap-sdk-panel__context-selector" title="${ut(e.cssSelector)}">${ut(e.cssSelector)}</div>`:""}
|
|
1901
|
-
`}function vk(e){return e.map((t,n)=>{var o,i;const r=[`## Pick ${n+1}`,""];return(o=t.ctx.interactionSteps)!=null&&o.length?r.push("Recorded steps:",ml(t.ctx.interactionSteps)):(r.push(`Element: ${t.ctx.elementText||"(no text)"}`),t.ctx.cssSelector&&r.push(`Selector: ${t.ctx.cssSelector}`),t.ctx.ancestry&&r.push(`Ancestry: ${t.ctx.ancestry}`)),r.push(`Page: ${t.ctx.pageTitle} (${t.ctx.pageUrl})`),(i=t.ctx.innerTree)!=null&&i.trim()&&r.push(`
|
|
1902
1998
|
Element tree:
|
|
1903
|
-
${
|
|
1904
|
-
${t.instruction}`),r.join(`
|
|
1905
|
-
`)}).join(`
|
|
1999
|
+
${E.innerTree}`),(Q=E.interactionSteps)!=null&&Q.length&&(v+=`
|
|
1906
2000
|
|
|
1907
|
-
|
|
2001
|
+
Recorded steps:
|
|
2002
|
+
${Wh(E.interactionSteps)}`),v+=cf(t[0]),f=(yield ku(A,h,v,e,u)).id,g=r.slice(0,120)||E.pageTitle||"Planning session"}else f=(yield Fu(A,{project:h,note:U,ctx:E,advancedOpts:e,allowSubmit:s,extraFileIds:u})).id,g=r.slice(0,120)||E.pageTitle||"Browser automation"}else{const U=j_(t),E=t[0].instruction.slice(0,120)||t[0].ctx.pageTitle||"Multi-element capture",v=t.map(F=>F.instruction).filter(Boolean).join(`
|
|
1908
2003
|
|
|
1909
|
-
`)}function
|
|
1910
|
-
<p>Your session expired.</p>
|
|
1911
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-reconnect type="button">Reconnect</button>
|
|
1912
|
-
`;const n=e.querySelector("[data-ap-reconnect]");n.addEventListener("click",()=>z(null,null,function*(){n.disabled=!0,n.textContent="Connecting…";try{yield t()}catch(r){Sn(e,"error",r instanceof Error?r.message:"Could not reconnect — please try again.")}}))}function wk(e,t,n,r,o){const i=t==="task"?"Task":"Planning",a=t==="task"?"Task created successfully!":"Planning session created!",d=t==="task"?"View task →":"View planning session →",l=n.length>55?`${n.slice(0,52)}…`:n;e.style.display="block",e.className="ap-sdk-panel__status",e.innerHTML=`
|
|
1913
|
-
<div class="ap-sdk-success-card">
|
|
1914
|
-
<svg class="ap-sdk-success-check" viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg">
|
|
1915
|
-
<circle class="ap-sdk-success-check__circle" cx="24" cy="24" r="22"/>
|
|
1916
|
-
<path class="ap-sdk-success-check__tick" d="M14 24l7 7 13-14"/>
|
|
1917
|
-
</svg>
|
|
1918
|
-
<p class="ap-sdk-success-headline">${ut(a)}</p>
|
|
1919
|
-
<div class="ap-sdk-success-meta">
|
|
1920
|
-
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${t}">${ut(i)}</span>
|
|
1921
|
-
<span class="ap-sdk-success-title" title="${ut(n)}">${ut(l)}</span>
|
|
1922
|
-
</div>
|
|
1923
|
-
<div class="ap-sdk-success-actions">
|
|
1924
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-success-view>${ut(d)}</button>
|
|
1925
|
-
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-success-close>Close</button>
|
|
1926
|
-
</div>
|
|
1927
|
-
</div>
|
|
1928
|
-
`,e.querySelector("[data-ap-success-view]").addEventListener("click",()=>window.open(r,"_blank","noopener,noreferrer")),e.querySelector("[data-ap-success-close]").addEventListener("click",o)}function Ci(e,t){e.querySelectorAll("button, input, textarea, select").forEach(n=>{n.disabled=t})}function ut(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}let oe=null,eo=null,to=null;function Ol(){return oe!==null}function Zn(){oe&&Ut(oe),oe==null||oe.remove(),oe=null,eo==null||eo(),eo=null,to==null||to(),to=null}function xk(e){return e==="task"?"Task":e==="planning"?"Planning":"Automate"}function Sk(e){if(oe){Zn();return}oe=document.createElement("div"),oe.className="ap-sdk-panel",oe.setAttribute("data-ap-sdk","1"),oe.setAttribute("role","dialog"),oe.setAttribute("aria-modal","true"),oe.setAttribute("aria-label","My captures"),oe.addEventListener("wheel",t=>{t.stopPropagation()},{passive:!0}),oe.addEventListener("touchmove",t=>{t.stopPropagation()},{passive:!0}),oe.innerHTML=`
|
|
2004
|
+
`);n==="task"?(f=(yield qi(A,{project:h,note:U,ctx:t[0].ctx,advancedOpts:e,titleOverride:E,type:bu,titleInstruction:v,extraFileIds:u})).id,g=E):n==="planning"?(f=(yield ku(A,h,U,e,u)).id,g=E):(f=(yield Fu(A,{project:h,note:U,ctx:t[0].ctx,advancedOpts:e,titleOverride:E,titleInstruction:v,allowSubmit:s,extraFileIds:u})).id,g=E)}return{createdId:f,captureType:n,captureTitle:g}})}function q_(A){const{state:e,apiOpts:t,project:n,projectCode:r,needsCredentials:s,statusEl:o,submitBtn:a,panelEl:i,screenshotEl:l,noteEl:u,advancedOptionsRef:h,onClose:f,onCredentialsSaved:g,closeAndCleanup:m,clearTrackCleanup:Q,hideHighlight:U}=A,E=()=>T(null,null,function*(){if(e.submitting)return;if(s){Nt(o,"error","Connect to Agent Platform first.");return}const v=t.backendUrl,F=t.token,y=u.value.trim();if(!y){Nt(o,"error","Please enter an instruction.");return}e.submitting=!0,sc(i,!0),Nt(o,null,""),a.textContent="Submitting…";const x={backendUrl:v,token:F},R=h.getOptions(),I=[...e.completedPicks,{ctx:e.currentCtx,instruction:y,screenshotBlob:e.screenshotIncluded?e.currentScreenshotBlob:null}];try{const{createdId:K,captureType:N,captureTitle:Z}=yield Y_({opts:x,advancedOpts:R,allPicks:I,captureType:e.captureType,note:y,allowSubmit:e.allowSubmit,project:n,projectCode:r});if(v_({id:K,type:N,title:Z,backendUrl:v,createdAt:new Date().toISOString()}),na(),af(x).catch(()=>{}),N==="automate"){m(),Tc(K,x,v,Z,f);return}const X=N==="task"?`${v.replace(/\/+$/,"")}/tasks/${K}`:`${v.replace(/\/+$/,"")}/planning/${K}`;vk(o,N,Z,X,m),i.classList.add("ap-sdk-panel--success"),Q(),U(),l.style.display="none",e.submitting=!1,sc(i,!1)}catch(K){K instanceof Uu?Sk(o,()=>T(null,null,function*(){const{code:N}=yield oc(v),{token:Z,expiresAt:X}=yield Aa({backendUrl:v},N,window.location.origin);Ko({backendUrl:v,token:Z,projectCode:r,expiresAt:X}),t.token=Z,g({backendUrl:v,token:Z}),yield E()})):Nt(o,"error",K instanceof Error?K.message:"An unexpected error occurred."),e.submitting=!1,sc(i,!1),a.textContent="Submit"}});return E}let AA=null,de=null,Et=null,as=null,cs=null;function ls(){return AA!==null}function us(){AA&&nt(AA),AA==null||AA.remove(),AA=null,Et==null||Et(),Et=null,as==null||as(),as=null,cs==null||cs(),cs=null,de==null||de.destroy(),de=null}function lf(A,e,t,n,r,s,o,a,i,l,u=null,h){var je,SA,OA,kn,Wt,ZA,gt,De,Re,Ft;AA&&us();const f=!t.backendUrl||!t.token,g=xu(u,"tasks:write"),m=xu(u,"planning-sessions:write"),Q=!g&&m?"planning":"task",U=h?null:Mu(),E={captureType:(SA=(je=h==null?void 0:h.captureType)!=null?je:U==null?void 0:U.captureType)!=null?SA:Q,submitting:!1,completedPicks:(kn=(OA=h==null?void 0:h.completedPicks)!=null?OA:U==null?void 0:U.completedPicks)!=null?kn:[],currentCtx:A,currentPickedEl:e,awaitingPick:!1,allowSubmit:(ZA=(Wt=h==null?void 0:h.allowSubmit)!=null?Wt:U==null?void 0:U.allowSubmit)!=null?ZA:!1,currentScreenshotBlob:(gt=h==null?void 0:h.currentScreenshotBlob)!=null?gt:null,screenshotCapturing:!1,screenshotIncluded:(De=h==null?void 0:h.screenshotIncluded)!=null?De:!1,screenshotError:(Re=h==null?void 0:h.screenshotError)!=null?Re:null};AA=document.createElement("div"),AA.className="ap-sdk-panel",AA.setAttribute("data-ap-sdk","1"),AA.setAttribute("role","dialog"),AA.setAttribute("aria-modal","true"),AA.setAttribute("aria-label","Capture to Agent Platform"),AA.innerHTML=kk(A,{needsCredentials:f,canCreateTask:g,canCreatePlanning:m,captureType:E.captureType,hasOnReselect:!!i,hasOnAddAnother:!!a}),AA.addEventListener("wheel",IA=>{IA.stopPropagation()},{passive:!0}),AA.addEventListener("touchmove",IA=>{IA.stopPropagation()},{passive:!0});const v=AA.querySelector(".ap-sdk-panel__body"),F=bb(v,t,(Ft=n==null?void 0:n.id)!=null?Ft:null);document.body.appendChild(AA),de=Li(),E.currentPickedEl&&de.update(E.currentPickedEl),tt(AA),as=ta(AA,ea),cs=vr(AA,kr);const y=AA.querySelector("[data-ap-close]"),x=AA.querySelector("[data-ap-cancel]"),R=AA.querySelector("[data-ap-submit]"),I=AA.querySelector("[data-ap-note]"),K=AA.querySelector("[data-ap-status]"),N=AA.querySelectorAll("[data-ap-type]"),Z=AA.querySelector("[data-ap-automate-options]"),X=AA.querySelector("[data-ap-allow-submit]"),aA=AA.querySelector("[data-ap-pick-list]"),fA=AA.querySelector("[data-ap-context]"),PA=AA.querySelector("[data-ap-screenshot]"),Ce=AA.querySelector("[data-ap-add-another]"),pe=AA.querySelector("[data-ap-pick-actions]"),Je=AA.querySelector("[data-ap-select-parent]"),pr=AA.querySelector("[data-ap-reselect]"),fs=AA.querySelector("[data-ap-clear-selections]"),ht=_k(E,PA),bA=()=>{E.currentPickedEl&&(de==null||de.update(E.currentPickedEl))};window.addEventListener("scroll",bA,{capture:!0,passive:!0}),window.addEventListener("resize",bA),Et=()=>{window.removeEventListener("scroll",bA,!0),window.removeEventListener("resize",bA),ht.cleanup()};const ft=xk({state:E,els:{contextEl:fA,pickListEl:aA,pickActionsEl:pe,noteEl:I,addAnotherBtn:Ce,selectParentBtn:Je,reselectBtn:pr,clearSelectionsBtn:fs,typeButtons:N,allowSubmitCheckbox:X,automateOptionsEl:Z,statusEl:K},screenshotCtl:ht,defaultCaptureType:Q,updateHighlight:IA=>de==null?void 0:de.update(IA),onReselect:i,onAddAnother:a});h?(I.value=h.note,X.checked=h.allowSubmit,Z.style.display=E.captureType==="automate"?"":"none",ft.renderPickList(),Nt(K,"success","Reconnected — your draft was kept."),ht.renderScreenshotUi()):U?(I.value=U.note,X.checked=U.allowSubmit,Z.style.display=E.captureType==="automate"?"":"none",ft.renderPickList(),Nt(K,"success","Restored your previous selections."),ht.renderScreenshotUi()):E.currentPickedEl&&ht.captureScreenshotFor(E.currentPickedEl);const gA=()=>{us(),l==null||l()},En=()=>({captureType:E.captureType,note:I.value,completedPicks:E.completedPicks,currentCtx:E.currentCtx,currentPickedEl:E.currentPickedEl,allowSubmit:E.allowSubmit,currentScreenshotBlob:E.currentScreenshotBlob,screenshotIncluded:E.screenshotIncluded,screenshotError:E.screenshotError});y.addEventListener("click",gA),x.addEventListener("click",gA);const BA=AA.querySelector("[data-ap-connect-required]");BA&&o&&BA.addEventListener("click",()=>{const IA=En();gA(),o(IA)}),N.forEach(IA=>{IA.addEventListener("click",()=>{E.captureType=IA.dataset.apType,N.forEach(Bt=>Bt.classList.toggle("ap-sdk-active",Bt===IA)),Z.style.display=E.captureType==="automate"?"":"none",ft.persistDraft()})}),X.addEventListener("change",()=>{E.allowSubmit=X.checked,ft.persistDraft()}),I.addEventListener("input",ft.persistDraft);const se=AA.querySelector("[data-ap-reconfigure]");o?se.addEventListener("click",()=>{const IA=En();gA(),o(IA)}):se.style.display="none";const Fn=q_({state:E,apiOpts:t,project:n,projectCode:r,needsCredentials:f,statusEl:K,submitBtn:R,panelEl:AA,screenshotEl:PA,noteEl:I,advancedOptionsRef:F,onClose:l,onCredentialsSaved:s,closeAndCleanup:gA,clearTrackCleanup:()=>{Et==null||Et(),Et=null},hideHighlight:()=>de==null?void 0:de.hide()});R.addEventListener("click",Fn),setTimeout(()=>I.focus(),50)}let cA=null,ds=null,ps=null;function uf(){return cA!==null}function Cn(){cA&&nt(cA),cA==null||cA.remove(),cA=null,ds==null||ds(),ds=null,ps==null||ps(),ps=null}function Ax(A){return A==="task"?"Task":A==="planning"?"Planning":"Automate"}function ex(A){if(cA){Cn();return}cA=document.createElement("div"),cA.className="ap-sdk-panel",cA.setAttribute("data-ap-sdk","1"),cA.setAttribute("role","dialog"),cA.setAttribute("aria-modal","true"),cA.setAttribute("aria-label","My captures"),cA.addEventListener("wheel",e=>{e.stopPropagation()},{passive:!0}),cA.addEventListener("touchmove",e=>{e.stopPropagation()},{passive:!0}),cA.innerHTML=`
|
|
1929
2005
|
<div class="ap-sdk-panel__header">
|
|
1930
2006
|
<span class="ap-sdk-panel__title">
|
|
1931
2007
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
@@ -1938,27 +2014,27 @@ ${t.instruction}`),r.join(`
|
|
|
1938
2014
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-clear-history>Clear history</button>
|
|
1939
2015
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-close-list>Close</button>
|
|
1940
2016
|
</div>
|
|
1941
|
-
`,document.body.appendChild(
|
|
2017
|
+
`,document.body.appendChild(cA),tt(cA),ds=ta(cA,ea),ps=vr(cA,kr),cA.querySelector("[data-ap-close]").addEventListener("click",()=>{Cn()}),cA.querySelector("[data-ap-close-list]").addEventListener("click",()=>{Cn()}),cA.querySelector("[data-ap-clear-history]").addEventListener("click",()=>{__(),mn(0),df(A)}),df(A)}function df(A){if(!cA)return;const e=cA.querySelector("[data-ap-list-body]"),t=nr();if(t.length===0){e.innerHTML='<p class="ap-sdk-list-empty">No captures yet. Use the capture button to get started.</p>';return}if(e.innerHTML=t.map(n=>`
|
|
1942
2018
|
<div class="ap-sdk-list-item">
|
|
1943
2019
|
<div class="ap-sdk-list-item__row">
|
|
1944
|
-
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${
|
|
1945
|
-
<span class="ap-sdk-list-item__title" title="${
|
|
2020
|
+
<span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${n.type}">${Ax(n.type)}</span>
|
|
2021
|
+
<span class="ap-sdk-list-item__title" title="${ai(n.title)}">${rx(n.title)}</span>
|
|
1946
2022
|
</div>
|
|
1947
2023
|
<div class="ap-sdk-list-item__row">
|
|
1948
|
-
<span class="ap-sdk-status-badge" data-ap-status="${
|
|
1949
|
-
${
|
|
2024
|
+
<span class="ap-sdk-status-badge" data-ap-status="${ai(n.id)}">${A?"…":"—"}</span>
|
|
2025
|
+
${n.type==="automate"&&A?`<button class="ap-sdk-list-item__link" data-ap-resume="${ai(n.id)}">Resume →</button>`:`<a class="ap-sdk-list-item__link" href="${ai(nx(n))}" target="_blank" rel="noopener noreferrer">View →</a>`}
|
|
1950
2026
|
</div>
|
|
1951
2027
|
</div>
|
|
1952
|
-
`).join(""),
|
|
2028
|
+
`).join(""),A){const n=A;Promise.all(t.map(r=>tx(r,n))).then(r=>{mn(of(r))}),e.querySelectorAll("[data-ap-resume]").forEach(r=>{r.addEventListener("click",()=>{const s=r.dataset.apResume,o=t.find(a=>a.id===s);o&&(Cn(),Tc(o.id,n,o.backendUrl,o.title,()=>{}))})})}}function tx(A,e){return T(this,null,function*(){const t=yield sf(A,e),n=cA==null?void 0:cA.querySelector(`[data-ap-status="${CSS.escape(A.id)}"]`);return n&&(n.textContent=t.status.replace(/_/g," "),n.className=`ap-sdk-status-badge ap-sdk-status-badge--${t.status.replace(/_/g,"-")}`),t})}function nx(A){const e=A.backendUrl.replace(/\/+$/,"");return A.type==="planning"?`${e}/planning/${A.id}`:`${e}/tasks/${A.id}`}function ai(A){return A.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function rx(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}let He=null,ci=!1;function sx(){He==null||He.disconnect(),Array.from(document.body.querySelectorAll(':scope > [data-ap-sdk="1"]')).forEach(A=>document.body.appendChild(A)),He&&He.observe(document.body,{childList:!0}),ci=!1}function pf(){He||(He=new MutationObserver(A=>{!A.some(t=>Array.from(t.addedNodes).some(n=>n instanceof Element&&n.getAttribute("data-ap-sdk")!=="1"))||ci||(ci=!0,queueMicrotask(sx))}),He.observe(document.body,{childList:!0}))}function ox(){He==null||He.disconnect(),He=null,ci=!1}let re=null;function bn(){re&&nt(re),re==null||re.remove(),re=null}function hf(A){const e=A.note.trim();return e?e.length>80?`${e.slice(0,77)}…`:e:A.completedPicks.length>0?`${A.completedPicks.length} saved pick${A.completedPicks.length===1?"":"s"}`:"Untitled draft"}function ff(A){if(re)return;const e=Mu();e&&(re=document.createElement("div"),re.className="ap-sdk-resume-banner",re.setAttribute("data-ap-sdk","1"),re.setAttribute("role","status"),re.innerHTML=`
|
|
1953
2029
|
<div>
|
|
1954
2030
|
<span class="ap-sdk-resume-banner__title">Resume your draft?</span>
|
|
1955
|
-
<span class="ap-sdk-resume-banner__summary" title="${
|
|
2031
|
+
<span class="ap-sdk-resume-banner__summary" title="${ix(hf(e))}">${gf(hf(e))}</span>
|
|
1956
2032
|
</div>
|
|
1957
2033
|
<div class="ap-sdk-resume-banner__actions">
|
|
1958
2034
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-resume-draft type="button">Resume</button>
|
|
1959
2035
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-discard-draft type="button">Discard</button>
|
|
1960
2036
|
</div>
|
|
1961
|
-
`,document.body.appendChild(
|
|
2037
|
+
`,document.body.appendChild(re),tt(re),re.querySelector("[data-ap-resume-draft]").addEventListener("click",()=>{bn(),A(e)}),re.querySelector("[data-ap-discard-draft]").addEventListener("click",()=>{na(),bn()}))}function gf(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ix(A){return gf(A)}const ax={click:"🖱",inputText:"⌨",scroll:"↕",keypress:"⌤"};let RA=null,Xt=[],hs=null;function li(){RA&&nt(RA),RA==null||RA.remove(),RA=null,Xt=[],hs==null||hs(),hs=null}function cx(A,e,t){RA&&li(),Xt=[...A],RA=document.createElement("div"),RA.className="ap-sdk-panel ap-sdk-record-review",RA.setAttribute("data-ap-sdk","1"),RA.setAttribute("role","dialog"),RA.setAttribute("aria-modal","true"),RA.setAttribute("aria-label","Review recorded steps"),RA.innerHTML=`
|
|
1962
2038
|
<div class="ap-sdk-panel__header">
|
|
1963
2039
|
<span class="ap-sdk-panel__title">
|
|
1964
2040
|
<span class="ap-sdk-panel__logo">AP</span>
|
|
@@ -1973,11 +2049,11 @@ ${t.instruction}`),r.join(`
|
|
|
1973
2049
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-review-continue>Continue</button>
|
|
1974
2050
|
<button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-review-cancel>Cancel</button>
|
|
1975
2051
|
</div>
|
|
1976
|
-
`,document.body.appendChild(
|
|
1977
|
-
<div class="ap-sdk-record-step" data-step-index="${
|
|
1978
|
-
<span class="ap-sdk-record-step__icon">${
|
|
1979
|
-
${
|
|
1980
|
-
<button class="ap-sdk-record-step__remove" data-ap-step-remove="${
|
|
2052
|
+
`,document.body.appendChild(RA),tt(RA),hs=vr(RA,kr);const n=RA.querySelector("[data-ap-review-list]"),r=RA.querySelector("[data-ap-review-continue]"),s=()=>{if(Xt.length===0){n.innerHTML='<p class="ap-sdk-list-empty">No steps recorded.</p>',r.disabled=!0;return}r.disabled=!1,n.innerHTML=Xt.map((a,i)=>{var l;return`
|
|
2053
|
+
<div class="ap-sdk-record-step" data-step-index="${i}">
|
|
2054
|
+
<span class="ap-sdk-record-step__icon">${ax[a.action]}</span>
|
|
2055
|
+
${a.action==="inputText"&&!a.redacted?`<input class="ap-sdk-record-step__input" type="text" value="${lx((l=a.value)!=null?l:"")}" data-ap-step-value />`:`<span class="ap-sdk-record-step__description">${Bf(a.description)}</span>`}
|
|
2056
|
+
<button class="ap-sdk-record-step__remove" data-ap-step-remove="${i}" aria-label="Remove step ${i+1}">✕</button>
|
|
1981
2057
|
</div>
|
|
1982
|
-
`}).join(""),
|
|
2058
|
+
`}).join(""),n.querySelectorAll("[data-ap-step-remove]").forEach(a=>{a.addEventListener("click",()=>{const i=parseInt(a.dataset.apStepRemove,10);Xt.splice(i,1),s()})}),n.querySelectorAll("[data-ap-step-value]").forEach(a=>{const i=a.closest("[data-step-index]"),l=parseInt(i.dataset.stepIndex,10);a.addEventListener("input",()=>{var h;const u=Xt[l];u.value=a.value,u.description=Zh((h=u.elementText)!=null?h:"",a.value,!1)})})};s();const o=()=>{li()};RA.querySelector("[data-ap-review-close]").addEventListener("click",o),RA.querySelector("[data-ap-review-cancel]").addEventListener("click",o),r.addEventListener("click",()=>{if(Xt.length===0)return;const a=Xt,i=$(k({},cl()),{pageUrl:window.location.href,pageTitle:document.title,interactionSteps:a});li(),e(i)})}function Bf(A){return A.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function lx(A){return Bf(A)}let W=null,ui=null,di=null,pi=null;function Oc(A,e,t){ui=A,di=e,pi=t,nf(A,e,t)}const wf="#agent-platform-web-sdk",mf="ap-sdk-fab-unlocked";let Qn=null;function Cf(){try{if(localStorage.getItem(mf)==="1")return!0}catch(A){}return window.location.hash===wf}function bf(){try{localStorage.setItem(mf,"1")}catch(A){}}function Qf(A){return T(this,null,function*(){var t,n,r,s,o;if(Cr(),A.requestTimeoutMs!=null&&ob(A.requestTimeoutMs),dg((t=A.exclusionSelector)!=null?t:null),W&&W.projectCode===A.projectCode&&W.backendUrl===((n=A.backendUrl)!=null?n:null)&&W.token===((r=A.token)!=null?r:null))return;W={projectCode:A.projectCode,backendUrl:(s=A.backendUrl)!=null?s:null,token:(o=A.token)!=null?o:null,project:null,resolvingProject:!1,permissions:null},Oc(()=>Uf(),()=>dx(),()=>Nc()),mn(nr().length);let e=!1;if(W.backendUrl&&W.token){const a=W.backendUrl,i=W.token;yield _f(),af({backendUrl:a,token:i}).catch(()=>{}),vf({backendUrl:a,token:i}).catch(()=>{});const l=Rk();l&&(Tc(l.taskId,{backendUrl:a,token:i},l.backendUrl,l.title,()=>{}),e=!0)}e||ff(yf),pf()})}function Mc(A,e){return T(this,null,function*(){if(!W)throw new Error("AgentPlatformSDK: call init() first.");W.backendUrl=A,W.token=e,W.project=null,W.permissions=null,yield _f(),vf({backendUrl:A,token:e}).catch(()=>{})})}function Pc(A,e,t){if(!W)throw new Error("AgentPlatformSDK: call init() first.");lf(A,e,{backendUrl:W.backendUrl,token:W.token},W.project,W.projectCode,n=>T(null,null,function*(){yield Mc(n.backendUrl,n.token)}),n=>{ac(r=>{Ko(r),hi(r).then(()=>Pc(n.currentCtx,n.currentPickedEl,n)).catch(console.error)})},n=>{Mi((r,s)=>{ls()&&n(r,s)},()=>{Ef()})},(n,r)=>{Mi((s,o)=>{ls()&&n(s,o)},()=>{ls()&&r()})},()=>{Rn()&&Pi()},W.permissions,t)}function Kc(A,e){if(!W)throw new Error("AgentPlatformSDK: call init() first.");lf(A,null,{backendUrl:W.backendUrl,token:W.token},W.project,W.projectCode,t=>T(null,null,function*(){yield Mc(t.backendUrl,t.token)}),t=>{ac(n=>{Ko(n),hi(n).then(()=>Kc(t.currentCtx,t)).catch(console.error)})},void 0,void 0,()=>{},W.permissions,e)}function yf(A){var e;if(!W){ur();return}(e=A.currentCtx.interactionSteps)!=null&&e.length?Kc(A.currentCtx,void 0):Pc(A.currentCtx,null,void 0)}function Uf(){if(!W)throw new Error("AgentPlatformSDK: call init() first.");Rn()||(bn(),Cr(),Mi((A,e)=>T(null,null,function*(){uf()&&Cn(),Pc(A,e)}),()=>{}))}function ux(){Pi()}function dx(){if(!W)throw new Error("AgentPlatformSDK: call init() first.");Ai()||(bn(),Cr(),O_(A=>{cx(A,e=>Kc(e))}))}function Ef(){ls()&&us()}function px(){return Rn()}function Ff(){ox(),Qn&&(window.removeEventListener("hashchange",Qn),Qn=null),Pi(),M_(),li(),us(),Cn(),bn(),rf(),ui=null,di=null,pi=null,W=null}function kf(){if(typeof window=="undefined"||typeof document=="undefined")return;Cr();const A=Hk(),e=()=>{A?hi(A).catch(console.error):(Oc(()=>ur(),()=>ur(),()=>Nc()),mn(nr().length),ff(yf),pf())};if(Cf()){bf(),e();return}Qn=()=>{window.location.hash===wf&&(bf(),window.removeEventListener("hashchange",Qn),Qn=null,e())},window.addEventListener("hashchange",Qn)}function hx(){ui&&di&&pi&&nf(ui,di,pi)}function fx(){rf()}function ur(){bn(),ac(A=>{Ko(A),hi(A).catch(console.error)})}function gx(){nh(),Ff(),Cr(),Cf()&&(Oc(()=>ur(),()=>ur(),()=>Nc()),mn(nr().length))}function hi(A){return T(this,null,function*(){yield Qf({projectCode:A.projectCode,backendUrl:A.backendUrl,token:A.token})})}function Nc(){if(uf()){Cn();return}bn(),ls()&&us();const A=W!=null&&W.backendUrl&&(W!=null&&W.token)?{backendUrl:W.backendUrl,token:W.token}:null;ex(A)}function vf(A){return T(this,null,function*(){const e=yield pb(A);W&&(W.permissions=e.permissions)})}function _f(){return T(this,null,function*(){if(!(!W||!W.backendUrl||!W.token||W.project||W.resolvingProject)){W.resolvingProject=!0;try{W.project=yield ab({backendUrl:W.backendUrl,token:W.token},W.projectCode)}catch(A){}finally{W&&(W.resolvingProject=!1)}}})}return kf(),uA.activateElementPicker=Uf,uA.autoInit=kf,uA.clearConfig=gx,uA.closePanelIfOpen=Ef,uA.configure=ur,uA.deactivateElementPicker=ux,uA.destroy=Ff,uA.hideFab=fx,uA.init=Qf,uA.isPickerRunning=px,uA.showFab=hx,uA.updateCredentials=Mc,Object.defineProperty(uA,Symbol.toStringTag,{value:"Module"}),uA})({});
|
|
1983
2059
|
//# sourceMappingURL=web-sdk.min.js.map
|