PageSourceSearch

https://athenaseo.ai/wp-content/plugins/wedocs-pro/assets/build/frontend.js?ver=27e06da67d1bee9dac3d

js athenaseo.ai collected 2026-10-05 13:06:40 UTC 231,366 bytes, 1 lines download raw bytes

vendor: 50,075 bytes, line 1
1(()=>{var e={98(e){e.exports=function(){"use strict";function e(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function t(t,r){return t.get(e(t,r))}function r(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}const n={},o=e=>new Promise(t=>{if(!e)return t();const r=window.scrollX,o=window.scrollY;n.restoreFocusTimeout=setTimeout(()=>{n.previousActiveElement instanceof HTMLElement?(n.previousActiveElement.focus(),n.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(r,o)}),a="swal2-",s=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"].reduce((e,t)=>(e[t]=a+t,e),{}),i=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=a+t,e),{}),l="SweetAlert2:",c=e=>e.charAt(0).toUpperCase()+e.slice(1),d=e=>{console.warn(`${l} ${"object"==typeof e?e.join(" "):e}`)},u=e=>{console.error(`${l} ${e}`)},h=[],m=(e,t=null)=>{var r;r=`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`,h.includes(r)||(h.push(r),d(r))},p=e=>"function"==typeof e?e():e,w=e=>e&&"function"==typeof e.toPromise,f=e=>w(e)?e.toPromise():Promise.resolve(e),g=e=>e&&Promise.resolve(e)===e,v=()=>document.body.querySelector(`.${s.container}`),b=e=>{const t=v();return t?t.querySelector(e):null},y=e=>b(`.${e}`),x=()=>y(s.popup),k=()=>y(s.icon),j=()=>y(s.title),E=()=>y(s["html-container"]),C=()=>y(s.image),S=()=>y(s["progress-steps"]),L=()=>y(s["validation-message"]),$=()=>b(`.${s.actions} .${s.confirm}`),R=()=>b(`.${s.actions} .${s.cancel}`),_=()=>b(`.${s.actions} .${s.deny}`),P=()=>b(`.${s.loader}`),N=()=>y(s.actions),M=()=>y(s.footer),T=()=>y(s["timer-progress-bar"]),A=()=>y(s.close),D=()=>{const e=x();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),r=Array.from(t).sort((e,t)=>{const r=parseInt(e.getAttribute("tabindex")||"0"),n=parseInt(t.getAttribute("tabindex")||"0");return r>n?1:r<n?-1:0}),n=e.querySelectorAll('\n  a[href],\n  area[href],\n  input:not([disabled]),\n  select:not([disabled]),\n  textarea:not([disabled]),\n  button:not([disabled]),\n  iframe,\n  object,\n  embed,\n  [tabindex="0"],\n  [contenteditable],\n  audio[controls],\n  video[controls],\n  summary\n'),o=Array.from(n).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(r.concat(o))].filter(e=>ee(e))},B=()=>F(document.body,s.shown)&&!F(document.body,s["toast-shown"])&&!F(document.body,s["no-backdrop"]),z=()=>{const e=x();return!!e&&F(e,s.toast)},O=(e,t)=>{if(e.textContent="",t){const r=(new DOMParser).parseFromString(t,"text/html"),n=r.querySelector("head");n&&Array.from(n.childNodes).forEach(t=>{e.appendChild(t)});const o=r.querySelector("body");o&&Array.from(o.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},F=(e,t)=>!!t&&t.split(/\s+/).every(t=>e.classList.contains(t)),I=(e,t,r)=>{if(((e,t)=>{Array.from(e.classList).forEach(r=>{Object.values(s).includes(r)||Object.values(i).includes(r)||Object.values(t.showClass||{}).includes(r)||e.classList.remove(r)})})(e,t),!t.customClass)return;const n=t.customClass[r];n&&("string"==typeof n||n.forEach?W(e,n):d(`Invalid type of customClass.${r}! Expected string or iterable object, got "${typeof n}"`))},H=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${s.popup} > .${s[t]}`);case"checkbox":return e.querySelector(`.${s.popup} > .${s.checkbox} input`);case"radio":return e.querySelector(`.${s.popup} > .${s.radio} input:checked`)||e.querySelector(`.${s.popup} > .${s.radio} input:first-child`);case"range":return e.querySelector(`.${s.popup} > .${s.range} input`);default:return e.querySelector(`.${s.popup} > .${s.input}`)}},U=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},V=(e,t,r)=>{if(!e||!t)return;const n="string"==typeof t?t.split(/\s+/).filter(Boolean):t;(Array.isArray(e)?e:[e]).forEach(e=>{n.forEach(t=>{r?e.classList.add(t):e.classList.remove(t)})})},W=(e,t)=>{V(e,t,!0)},q=(e,t)=>{V(e,t,!1)},Y=(e,t)=>Array.from(e.children).find(e=>e instanceof HTMLElement&&F(e,t)),K=(e,t,r)=>{r===`${parseInt(`${r}`)}`&&(r=parseInt(r)),r||0===r?e.style.setProperty(t,"number"==typeof r?`${r}px`:r):e.style.removeProperty(t)},Z=(e,t="flex")=>{e&&(e.style.display=t)},J=e=>{e&&(e.style.display="none")},X=(e,t="block")=>{e&&new MutationObserver(()=>{Q(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},G=(e,t,r,n)=>{const o=e.querySelector(t);o&&o.style.setProperty(r,n)},Q=(e,t,r="flex")=>{t?Z(e,r):J(e)},ee=e=>Boolean(e&&(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),te=e=>Boolean(e.scrollHeight>e.clientHeight),re=e=>{const t=window.getComputedStyle(e),r=parseFloat(t.getPropertyValue("animation-duration")||"0"),n=parseFloat(t.getPropertyValue("transition-duration")||"0");return r>0||n>0},ne=(e,t=!1)=>{const r=T();r&&ee(r)&&(t&&(r.style.transition="none",r.style.width="100%"),setTimeout(()=>{r.style.transition=`width ${e/1e3}s linear`,r.style.width="0%"},10))},oe=`\n <div aria-labelledby="${s.title}" aria-describedby="${s["html-container"]}" class="${s.popup}" tabindex="-1">\n   <button type="button" class="${s.close}"></button>\n   <ul class="${s["progress-steps"]}"></ul>\n   <div class="${s.icon}"></div>\n   <img class="${s.image}" />\n   <h2 class="${s.title}" id="${s.title}"></h2>\n   <div class="${s["html-container"]}" id="${s["html-container"]}"></div>\n   <input class="${s.input}" id="${s.input}" />\n   <input type="file" class="${s.file}" />\n   <div class="${s.range}">\n     <input type="range" />\n     <output></output>\n   </div>\n   <select class="${s.select}" id="${s.select}"></select>\n   <div class="${s.radio}"></div>\n   <label class="${s.checkbox}">\n     <input type="checkbox" id="${s.checkbox}" />\n     <span class="${s.label}"></span>\n   </label>\n   <textarea class="${s.textarea}" id="${s.textarea}"></textarea>\n   <div class="${s["validation-message"]}" id="${s["validation-message"]}"></div>\n   <div class="${s.actions}">\n     <div class="${s.loader}"></div>\n     <button type="button" class="${s.confirm}"></button>\n     <button type="button" class="${s.deny}"></button>\n     <button type="button" class="${s.cancel}"></button>\n   </div>\n   <div class="${s.footer}"></div>\n   <div class="${s["timer-progress-bar-container"]}">\n     <div class="${s["timer-progress-bar"]}"></div>\n   </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),ae=()=>{n.currentInstance&&n.currentInstance.resetValidationMessage()},se=e=>{const t=(()=>{const e=v();return!!e&&(e.remove(),q([document.documentElement,document.body],[s["no-backdrop"],s["toast-shown"],s["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void u("SweetAlert2 requires document to initialize");const r=document.createElement("div");r.className=s.container,t&&W(r,s["no-transition"]),O(r,oe),r.dataset.swal2Theme=e.theme;const o=(e=>{if("string"==typeof e){const t=document.querySelector(e);if(!t)throw new Error(`Target element "${e}" not found`);return t}return e})(e.target||"body");o.appendChild(r),e.topLayer&&(r.setAttribute("popover",""),r.showPopover()),(e=>{const t=x();t&&(t.setAttribute("role",e.toast?"alert":"dialog"),t.setAttribute("aria-live",e.toast?"polite":"assertive"),e.toast||t.setAttribute("aria-modal","true"))})(e),(e=>{"rtl"===window.getComputedStyle(e).direction&&(W(v(),s.rtl),n.isRTL=!0)})(o),(()=>{const e=x();if(!e)return;const t=Y(e,s.input),r=Y(e,s.file),n=e.querySelector(`.${s.range} input`),o=e.querySelector(`.${s.range} output`),a=Y(e,s.select),i=e.querySelector(`.${s.checkbox} input`),l=Y(e,s.textarea);t&&(t.oninput=ae),r&&(r.onchange=ae),a&&(a.onchange=ae),i&&(i.onchange=ae),l&&(l.oninput=ae),n&&o&&(n.oninput=()=>{ae(),o.value=n.value},n.onchange=()=>{ae(),o.value=n.value})})()},ie=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?le(e,t):e&&O(t,e)},le=(e,t)=>{"jquery"in e?ce(t,e):O(t,e.toString())},ce=(e,t)=>{if(e.textContent="",0 in t)for(let r=0;r in t;r++)e.appendChild(t[r].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},de=(e,t)=>{const r=N(),n=P();r&&n&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?Z(r):J(r),I(r,t,"actions"),function(e,t,r){const n=$(),o=_(),a=R();n&&o&&a&&(ue(n,"confirm",r),ue(o,"deny",r),ue(a,"cancel",r),function(e,t,r,n){n.buttonsStyling?(W([e,t,r],s.styled),[[e,"confirm",n.confirmButtonColor],[t,"deny",n.denyButtonColor],[r,"cancel",n.cancelButtonColor]].forEach(([e,t,r])=>{r&&e.style.setProperty(`--swal2-${t}-button-background-color`,r),function(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const r=t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/,"rgba($1, $2, $3, 0.5)");e.style.setProperty("--swal2-action-button-focus-box-shadow",t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/,` ${r}`))}(e)})):q([e,t,r],s.styled)}(n,o,a,r),r.reverseButtons&&(r.toast?(e.insertBefore(a,n),e.insertBefore(o,n)):(e.insertBefore(a,t),e.insertBefore(o,t),e.insertBefore(n,t))))}(r,n,t),O(n,t.loaderHtml||""),I(n,t,"loader"))};function ue(e,t,r){const n=c(t);Q(e,r[`show${n}Button`],"inline-block"),O(e,r[`${t}ButtonText`]||""),e.setAttribute("aria-label",r[`${t}ButtonAriaLabel`]||""),e.className=s[t],I(e,r,`${t}Button`)}const he=(e,t)=>{const r=v();r&&(function(e,t){"string"==typeof t?e.style.background=t:t||W([document.documentElement,document.body],s["no-backdrop"])}(r,t.backdrop),function(e,t){t&&(t in s?W(e,s[t]):(d('The "position" parameter is not valid, defaulting to "center"'),W(e,s.center)))}(r,t.position),function(e,t){t&&W(e,s[`grow-${t}`])}(r,t.grow),I(r,t,"container"))};var me={innerParams:new WeakMap,domCache:new WeakMap,focusedElement:new WeakMap};const pe=["input","file","range","select","radio","checkbox","textarea"],we=e=>{if(!e.input)return;if(!ke[e.input])return void u(`Unexpected type of input! Expected ${Object.keys(ke).join(" | ")}, got "${e.input}"`);const t=ye(e.input);if(!t)return;const r=ke[e.input](t,e);Z(t),e.inputAutoFocus&&setTimeout(()=>{U(r)})},fe=(e,t)=>{const r=x();if(!r)return;const n=H(r,e);if(n){(e=>{for(const{name:t}of Array.from(e.attributes))["id","type","value","style"].includes(t)||e.removeAttribute(t)})(n);for(const e in t)n.setAttribute(e,t[e])}},ge=e=>{if(!e.input)return;const t=ye(e.input);t&&I(t,e,"input")},ve=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},be=(e,t,r)=>{if(r.inputLabel){const n=document.createElement("label"),o=s["input-label"];n.setAttribute("for",e.id),n.className=o,"object"==typeof r.customClass&&W(n,r.customClass.inputLabel),n.innerText=r.inputLabel,t.insertAdjacentElement("beforebegin",n)}},ye=e=>{const t=x();if(t)return Y(t,s[e]||s.input)},xe=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:g(t)||d(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},ke={};ke.text=ke.email=ke.password=ke.number=ke.tel=ke.url=ke.search=ke.date=ke["datetime-local"]=ke.time=ke.week=ke.month=(e,t)=>{const r=e;return xe(r,t.inputValue),be(r,r,t),ve(r,t),r.type=t.input,r},ke.file=(e,t)=>{const r=e;return be(r,r,t),ve(r,t),r},ke.range=(e,t)=>{const r=e,n=r.querySelector("input"),o=r.querySelector("output");return n&&(xe(n,t.inputValue),n.type=t.input,be(n,e,t)),o&&xe(o,t.inputValue),e},ke.select=(e,t)=>{const r=e;if(r.textContent="",t.inputPlaceholder){const e=document.createElement("option");O(e,t.inputPlaceholder),e.value="",e.disabled=!0,e.selected=!0,r.appendChild(e)}return be(r,r,t),r},ke.radio=e=>(e.textContent="",e),ke.checkbox=(e,t)=>{const r=x();if(!r)throw new Error("Popup not found");const n=H(r,"checkbox");if(!n)throw new Error("Checkbox input not found");n.value="1",n.checked=Boolean(t.inputValue);const o=e.querySelector("span");if(o){const e=t.inputPlaceholder||t.inputLabel;e&&O(o,e)}return n},ke.textarea=(e,t)=>{const r=e;xe(r,t.inputValue),ve(r,t),be(r,r,t);return setTimeout(()=>{if("MutationObserver"in window){const e=x();if(!e)return;const n=parseInt(window.getComputedStyle(e).width);new MutationObserver(()=>{if(!document.body.contains(r))return;const e=r.offsetWidth+(a=r,parseInt(window.getComputedStyle(a).marginLeft)+parseInt(window.getComputedStyle(a).marginRight)),o=x();var a;o&&(e>n?o.style.width=`${e}px`:K(o,"width",t.width))}).observe(r,{attributes:!0,attributeFilter:["style"]})}}),r};const je=(e,t)=>{const r=E();r&&(X(r),I(r,t,"htmlContainer"),t.html?(ie(t.html,r),Z(r,"block")):t.text?(r.textContent=t.text,Z(r,"block")):J(r),((e,t)=>{const r=x();if(!r)return;const n=me.innerParams.get(e),o=!n||t.input!==n.input;pe.forEach(e=>{const n=Y(r,s[e]);n&&(fe(e,t.inputAttributes),n.className=s[e],o&&J(n))}),t.input&&(o&&we(t),ge(t))})(e,t))},Ee=(e,t)=>{for(const[r,n]of Object.entries(i))t.icon!==r&&q(e,n);W(e,t.icon&&i[t.icon]),Le(e,t),Ce(),I(e,t,"icon")},Ce=()=>{const e=x();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color");e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach(e=>{e.style.backgroundColor=t})},Se=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let r=e.innerHTML,n="";t.iconHtml?n=$e(t.iconHtml):"success"===t.icon?(n=(e=>`\n  ${e.animation?'<div class="swal2-success-circular-line-left"></div>':""}\n  <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>\n  <div class="swal2-success-ring"></div>\n  ${e.animation?'<div class="swal2-success-fix"></div>':""}\n  ${e.animation?'<div class="swal2-success-circular-line-right"></div>':""}\n`)(t),r=r.replace(/ style=".*?"/g,"")):"error"===t.icon?n='\n  <span class="swal2-x-mark">\n    <span class="swal2-x-mark-line-left"></span>\n    <span class="swal2-x-mark-line-right"></span>\n  </span>\n':t.icon&&(n=$e({question:"?",warning:"!",info:"i"}[t.icon])),r.trim()!==n.trim()&&O(e,n)},Le=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const r of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])G(e,r,"background-color",t.iconColor);G(e,".swal2-success-ring","border-color",t.iconColor)}},$e=e=>`<div class="${s["icon-content"]}">${e}</div>`;let Re=!1,_e=0,Pe=0,Ne=0,Me=0;const Te=e=>{const t=x();if(!t)return;const r=k();if(e.target===t||r&&r.contains(e.target)){Re=!0;const r=Be(e);_e=r.clientX,Pe=r.clientY,Ne=parseInt(t.style.insetInlineStart)||0,Me=parseInt(t.style.insetBlockStart)||0,W(t,"swal2-dragging")}},Ae=e=>{const t=x();if(t&&Re){let{clientX:r,clientY:o}=Be(e);const a=r-_e;t.style.insetInlineStart=`${Ne+(n.isRTL?-a:a)}px`,t.style.insetBlockStart=`${Me+(o-Pe)}px`}},De=()=>{const e=x();Re=!1,q(e,"swal2-dragging")},Be=e=>{const t=e.type.startsWith("touch")?e.touches[0]:e;return{clientX:t.clientX,clientY:t.clientY}},ze=(e,t)=>{const r=v(),n=x();if(r&&n){if(t.toast){K(r,"width",t.width),n.style.width="100%";const e=P();e&&n.insertBefore(e,k())}else K(n,"width",t.width);K(n,"padding",t.padding),t.color&&(n.style.color=t.color),t.background&&(n.style.background=t.background),J(L()),Oe(n,t),t.draggable&&!t.toast?(W(n,s.draggable),(e=>{e.addEventListener("mousedown",Te),document.body.addEventListener("mousemove",Ae),e.addEventListener("mouseup",De),e.addEventListener("touchstart",Te),document.body.addEventListener("touchmove",Ae),e.addEventListener("touchend",De)})(n)):(q(n,s.draggable),(e=>{e.removeEventListener("mousedown",Te),document.body.removeEventListener("mousemove",Ae),e.removeEventListener("mouseup",De),e.removeEventListener("touchstart",Te),document.body.removeEventListener("touchmove",Ae),e.removeEventListener("touchend",De)})(n))}},Oe=(e,t)=>{const r=t.showClass||{};e.className=`${s.popup} ${ee(e)?r.popup:""}`,t.toast?(W([document.documentElement,document.body],s["toast-shown"]),W(e,s.toast)):W(e,s.modal),I(e,t,"popup"),"string"==typeof t.customClass&&W(e,t.customClass),t.icon&&W(e,s[`icon-${t.icon}`])},Fe=e=>{const t=document.createElement("li");return W(t,s["progress-step"]),O(t,e),t},Ie=e=>{const t=document.createElement("li");return W(t,s["progress-step-line"]),e.progressStepsDistance&&K(t,"width",e.progressStepsDistance),t},He=(e,t)=>{var r;ze(0,t),he(0,t),((e,t)=>{const r=S();if(!r)return;const{progressSteps:n,currentProgressStep:o}=t;n&&0!==n.length&&void 0!==o?(Z(r),r.textContent="",o>=n.length&&d("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),n.forEach((e,a)=>{const i=Fe(e);if(r.appendChild(i),a===o&&W(i,s["active-progress-step"]),a!==n.length-1){const e=Ie(t);r.appendChild(e)}})):J(r)})(0,t),((e,t)=>{const r=me.innerParams.get(e),n=k();if(n){if(r&&t.icon===r.icon)return Se(n,t),void Ee(n,t);if(t.icon||t.iconHtml){if(t.icon&&-1===Object.keys(i).indexOf(t.icon))return u(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void J(n);Z(n),Se(n,t),Ee(n,t),W(n,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Ce)}else J(n)}})(e,t),((e,t)=>{const r=C();r&&(t.imageUrl?(Z(r,""),r.setAttribute("src",t.imageUrl),r.setAttribute("alt",t.imageAlt||""),K(r,"width",t.imageWidth),K(r,"height",t.imageHeight),r.className=s.image,I(r,t,"image")):J(r))})(0,t),((e,t)=>{const r=j();r&&(X(r),Q(r,Boolean(t.title||t.titleText),"block"),t.title&&ie(t.title,r),t.titleText&&(r.innerText=t.titleText),I(r,t,"title"))})(0,t),((e,t)=>{const r=A();r&&(O(r,t.closeButtonHtml||""),I(r,t,"closeButton"),Q(r,t.showCloseButton),r.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),je(e,t),de(0,t),((e,t)=>{const r=M();r&&(X(r),Q(r,Boolean(t.footer),"block"),t.footer&&ie(t.footer,r),I(r,t,"footer"))})(0,t);const o=x();"function"==typeof t.didRender&&o&&t.didRender(o),null===(r=n.eventEmitter)||void 0===r||r.emit("didRender",o)},Ue=()=>{var e;return null===(e=$())||void 0===e?void 0:e.click()},Ve=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),We=e=>{if(e.keydownTarget&&e.keydownHandlerAdded&&e.keydownHandler){const t=e.keydownHandler;e.keydownTarget.removeEventListener("keydown",t,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1}},qe=(e,t)=>{var r;const n=D();return n.length?(-2===(e+=t)&&(e=n.length-1),e===n.length?e=0:-1===e&&(e=n.length-1),n[e].focus(),!(navigator.userAgent.includes("Firefox")&&n[e]instanceof HTMLIFrameElement)):(null===(r=x())||void 0===r||r.focus(),!0)},Ye=["ArrowRight","ArrowDown"],Ke=["ArrowLeft","ArrowUp"],Ze=(e,t,r)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?Je(t,e):"Tab"===t.key?Xe(t):[...Ye,...Ke].includes(t.key)?Ge(t.key):"Escape"===t.key&&Qe(t,e,r)))},Je=(e,t)=>{if(!p(t.allowEnterKey))return;const r=x();if(!r||!t.input)return;const n=H(r,t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;Ue(),e.preventDefault()}},Xe=e=>{const t=e.target,r=D().findIndex(e=>e===t);let n=!0;n=e.shiftKey?qe(r,-1):qe(r,1),e.stopPropagation(),n&&e.preventDefault()},Ge=e=>{const t=N(),r=$(),n=_(),o=R();if(!(t&&r&&n&&o))return;const a=[r,n,o];if(document.activeElement instanceof HTMLElement&&!a.includes(document.activeElement))return;const s=Ye.includes(e)?"nextElementSibling":"previousElementSibling";let i=document.activeElement;if(i){for(let e=0;e<t.children.length;e++){if(i=i[s],!i)return;if(i instanceof HTMLButtonElement&&ee(i))break}i instanceof HTMLButtonElement&&i.focus()}},Qe=(e,t,r)=>{e.preventDefault(),p(t.allowEscapeKey)&&r(Ve.esc)};var et={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const tt=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},rt="undefined"!=typeof window&&Boolean(window.GestureEvent),nt=rt&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,ot=()=>{const e=v();if(!e)return;let t;e.ontouchstart=e=>{t=at(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},at=e=>{const t=e.target,r=v(),n=E();return!(!r||!n||st(e)||it(e)||t!==r&&(te(r)||!(t instanceof HTMLElement)||((e,t)=>{let r=e;for(;r&&r!==t;){if(te(r))return!0;r=r.parentElement}return!1})(t,n)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||te(n)&&n.contains(t)))},st=e=>Boolean(e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType),it=e=>e.touches&&e.touches.length>1;let lt=null;const ct=e=>{null===lt&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(lt=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${lt+(()=>{const e=document.createElement("div");e.className=s["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function dt(e,t,r,a){z()?vt(e,a):(o(r).then(()=>vt(e,a)),We(n)),rt?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),B()&&(null!==lt&&(document.body.style.paddingRight=`${lt}px`,lt=null),(()=>{if(F(document.body,s.iosfix)){const e=parseInt(document.body.style.top,10);q(document.body,s.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),tt()),q([document.documentElement,document.body],[s.shown,s["height-auto"],s["no-backdrop"],s["toast-shown"]])}function ut(e){e=wt(e);const t=et.swalPromiseResolve.get(this),r=ht(this);this.isAwaitingPromise?e.isDismissed||(pt(this),t(e)):r&&t(e)}const ht=e=>{const t=x();if(!t)return!1;const r=me.innerParams.get(e);if(!r||F(t,r.hideClass.popup))return!1;q(t,r.showClass.popup),W(t,r.hideClass.popup);const n=v();return q(n,r.showClass.backdrop),W(n,r.hideClass.backdrop),ft(e,t,r),!0};function mt(e){const t=et.swalPromiseReject.get(this);pt(this),t&&t(e)}const pt=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,me.innerParams.get(e)||e._destroy())},wt=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),ft=(e,t,r)=>{var o;const a=v(),s=re(t);"function"==typeof r.willClose&&r.willClose(t),null===(o=n.eventEmitter)||void 0===o||o.emit("willClose",t),s&&a?gt(e,t,a,Boolean(r.returnFocus),r.didClose):a&&dt(e,a,Boolean(r.returnFocus),r.didClose)},gt=(e,t,r,o,a)=>{n.swalCloseEventFinishedCallback=dt.bind(null,e,r,o,a);const s=function(e){var r;e.target===t&&(null===(r=n.swalCloseEventFinishedCallback)||void 0===r||r.call(n),delete n.swalCloseEventFinishedCallback,t.removeEventListener("animationend",s),t.removeEventListener("transitionend",s))};t.addEventListener("animationend",s),t.addEventListener("transitionend",s)},vt=(e,t)=>{setTimeout(()=>{var r;"function"==typeof t&&t.bind(e.params)(),null===(r=n.eventEmitter)||void 0===r||r.emit("didClose"),e._destroy&&e._destroy()})},bt=e=>{let t=x();if(t||new Xr,t=x(),!t)return;const r=P();z()?J(k()):yt(t,e),Z(r),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},yt=(e,t)=>{const r=N(),n=P();r&&n&&(!t&&ee($())&&(t=$()),Z(r),t&&(J(t),n.setAttribute("data-button-to-replace",t.className),r.insertBefore(n,t)),W([e,r],s.loading))},xt=e=>e.checked?1:0,kt=e=>e.checked?e.value:null,jt=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,Et=(e,t)=>{const r=x();if(!r)return;const n=e=>{"select"===t.input?function(e,t,r){const n=Y(e,s.select);if(!n)return;const o=(e,t,n)=>{const o=document.createElement("option");o.value=n,O(o,t),o.selected=Lt(n,r.inputValue),e.appendChild(o)};t.forEach(e=>{const t=e[0],r=e[1];if(Array.isArray(r)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,n.appendChild(e),r.forEach(t=>o(e,t[1],t[0]))}else o(n,r,t)}),n.focus()}(r,St(e),t):"radio"===t.input&&function(e,t,r){const n=Y(e,s.radio);if(!n)return;t.forEach(e=>{const t=e[0],o=e[1],a=document.createElement("input"),i=document.createElement("label");a.type="radio",a.name=s.radio,a.value=t,Lt(t,r.inputValue)&&(a.checked=!0);const l=document.createElement("span");O(l,o),l.className=s.label,i.appendChild(a),i.appendChild(l),n.appendChild(i)});const o=n.querySelectorAll("input");o.length&&o[0].focus()}(r,St(e),t)};w(t.inputOptions)||g(t.inputOptions)?(bt($()),f(t.inputOptions).then(t=>{e.hideLoading(),n(t)})):"object"==typeof t.inputOptions?n(t.inputOptions):u("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},Ct=(e,t)=>{const r=e.getInput();r&&(J(r),f(t.inputValue).then(n=>{r.value="number"===t.input?`${parseFloat(n)||0}`:`${n}`,Z(r),r.focus(),e.hideLoading()}).catch(t=>{u(`Error in inputValue promise: ${t}`),r.value="",Z(r),r.focus(),e.hideLoading()}))};const St=e=>(e instanceof Map?Array.from(e):Object.entries(e)).map(([e,t])=>[e,"object"==typeof t?St(t):t]),Lt=(e,t)=>Boolean(t)&&null!=t&&t.toString()===e.toString(),$t=(e,t)=>{const r=me.innerParams.get(e);if(!r.input)return void u(`The "input" parameter is needed to be set when using returnInputValueOn${c(t)}`);const n=e.getInput(),o=((e,t)=>{const r=e.getInput();if(!r)return null;switch(t.input){case"checkbox":return xt(r);case"radio":return kt(r);case"file":return jt(r);default:return t.inputAutoTrim?r.value.trim():r.value}})(e,r);r.inputValidator?Rt(e,o,t):n&&!n.checkValidity()?(e.enableButtons(),e.showValidationMessage(r.validationMessage||n.validationMessage)):"deny"===t?_t(e,o):Mt(e,o)},Rt=(e,t,r)=>{const n=me.innerParams.get(e);e.disableInput(),Promise.resolve().then(()=>f(n.inputValidator(t,n.validationMessage))).then(n=>{e.enableButtons(),e.enableInput(),n?e.showValidationMessage(n):"deny"===r?_t(e,t):Mt(e,t)})},_t=(e,t)=>{const r=me.innerParams.get(e);r.showLoaderOnDeny&&bt(_()),r.preDeny?(e.isAwaitingPromise=!0,Promise.resolve().then(()=>f(r.preDeny(t,r.validationMessage))).then(r=>{!1===r?(e.hideLoading(),pt(e)):e.close({isDenied:!0,value:void 0===r?t:r})}).catch(t=>Nt(e,t))):e.close({isDenied:!0,value:t})},Pt=(e,t)=>{e.close({isConfirmed:!0,value:t})},Nt=(e,t)=>{e.rejectPromise(t)},Mt=(e,t)=>{const r=me.innerParams.get(e);r.showLoaderOnConfirm&&bt(),r.preConfirm?(e.resetValidationMessage(),e.isAwaitingPromise=!0,Promise.resolve().then(()=>f(r.preConfirm(t,r.validationMessage))).then(r=>{ee(L())||!1===r?(e.hideLoading(),pt(e)):Pt(e,void 0===r?t:r)}).catch(t=>Nt(e,t))):Pt(e,t)};function Tt(){const e=me.innerParams.get(this);if(!e)return;const t=me.domCache.get(this);J(t.loader),z()?e.icon&&Z(k()):At(t),q([t.popup,t.actions],s.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),this.enableButtons()}const At=e=>{const t=e.loader.getAttribute("data-button-to-replace"),r=t?e.popup.getElementsByClassName(t):[];r.length?Z(r[0],"inline-block"):!ee($())&&!ee(_())&&!ee(R())&&J(e.actions)};function Dt(){const e=me.innerParams.get(this),t=me.domCache.get(this);return t?H(t.popup,e.input):null}function Bt(e,t,r){const n=me.domCache.get(e);t.forEach(e=>{n[e].disabled=r})}function zt(e,t){const r=x();r&&e&&("radio"===e.type?r.querySelectorAll(`[name="${s.radio}"]`).forEach(e=>{e.disabled=t}):e.disabled=t)}function Ot(){Bt(this,["confirmButton","denyButton","cancelButton"],!1);const e=me.focusedElement.get(this);e instanceof HTMLElement&&document.activeElement===document.body&&e.focus(),me.focusedElement.delete(this)}function Ft(){me.focusedElement.set(this,document.activeElement),Bt(this,["confirmButton","denyButton","cancelButton"],!0)}function It(){zt(this.getInput(),!1)}function Ht(){zt(this.getInput(),!0)}function Ut(e){const t=me.domCache.get(this),r=me.innerParams.get(this);O(t.validationMessage,e),t.validationMessage.className=s["validation-message"],r.customClass&&r.customClass.validationMessage&&W(t.validationMessage,r.customClass.validationMessage),Z(t.validationMessage);const n=this.getInput();n&&(n.setAttribute("aria-invalid","true"),n.setAttribute("aria-describedby",s["validation-message"]),U(n),W(n,s.inputerror))}function Vt(){const e=me.domCache.get(this);e.validationMessage&&J(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),q(t,s.inputerror))}const Wt={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"&times;",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0,topLayer:!1},qt=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Yt={allowEnterKey:void 0},Kt=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],Zt=e=>Object.prototype.hasOwnProperty.call(Wt,e),Jt=e=>-1!==qt.indexOf(e),Xt=e=>Yt[e],Gt=e=>{Zt(e)||d(`Unknown parameter "${e}"`)},Qt=e=>{Kt.includes(e)&&d(`The parameter "${e}" is incompatible with toasts`)},er=e=>{const t=Xt(e);t&&m(e,t)},tr=e=>{!1===e.backdrop&&e.allowOutsideClick&&d('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","bootstrap-4","bootstrap-4-light","bootstrap-4-dark","bootstrap-5","bootstrap-5-light","bootstrap-5-dark","material-ui","material-ui-light","material-ui-dark","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&d(`Invalid theme "${e.theme}"`);for(const t in e)Gt(t),e.toast&&Qt(t),er(t)};function rr(e){const t=v(),r=x(),n=me.innerParams.get(this);if(!r||F(r,n.hideClass.popup))return void d("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");const o=nr(e),a=Object.assign({},n,o);tr(a),t&&(t.dataset.swal2Theme=a.theme),He(this,a),me.innerParams.set(this,a),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const nr=e=>{const t={};return Object.keys(e).forEach(r=>{if(Jt(r)){const n=e;t[r]=n[r]}else d(`Invalid parameter to update: ${r}`)}),t};function or(){var e;const t=me.domCache.get(this),r=me.innerParams.get(this);r?(t.popup&&n.swalCloseEventFinishedCallback&&(n.swalCloseEventFinishedCallback(),delete n.swalCloseEventFinishedCallback),"function"==typeof r.didDestroy&&r.didDestroy(),null===(e=n.eventEmitter)||void 0===e||e.emit("didDestroy"),ar(this)):sr(this)}const ar=e=>{sr(e),delete e.params,delete n.keydownHandler,delete n.keydownTarget,delete n.currentInstance},sr=e=>{e.isAwaitingPromise?(ir(me,e),e.isAwaitingPromise=!0):(ir(et,e),ir(me,e),delete e.isAwaitingPromise,delete e.disableButtons,delete e.enableButtons,delete e.getInput,delete e.disableInput,delete e.enableInput,delete e.hideLoading,delete e.disableLoading,delete e.showValidationMessage,delete e.resetValidationMessage,delete e.close,delete e.closePopup,delete e.closeModal,delete e.closeToast,delete e.rejectPromise,delete e.update,delete e._destroy)},ir=(e,t)=>{for(const r in e)e[r].delete(t)};var lr=Object.freeze({__proto__:null,_destroy:or,close:ut,closeModal:ut,closePopup:ut,closeToast:ut,disableButtons:Ft,disableInput:Ht,disableLoading:Tt,enableButtons:Ot,enableInput:It,getInput:Dt,handleAwaitingPromise:pt,hideLoading:Tt,rejectPromise:mt,resetValidationMessage:Vt,showValidationMessage:Ut,update:rr});const cr=(e,t,r)=>{t.popup.onclick=()=>{e&&(dr(e)||e.timer||e.input)||r(Ve.close)}},dr=e=>Boolean(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let ur=!1;const hr=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(ur=!0)}}},mr=e=>{e.container.onmousedown=t=>{t.target===e.container&&t.preventDefault(),e.popup.onmouseup=function(t){e.popup.onmouseup=()=>{},(t.target===e.popup||t.target instanceof HTMLElement&&e.popup.contains(t.target))&&(ur=!0)}}},pr=(e,t,r)=>{t.container.onclick=n=>{ur?ur=!1:n.target===t.container&&p(e.allowOutsideClick)&&r(Ve.backdrop)}},wr=e=>e instanceof Element||(e=>"object"==typeof e&&null!==e&&"jquery"in e)(e);const fr=()=>{if(n.timeout)return(()=>{const e=T();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const r=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${r}%`})(),n.timeout.stop()},gr=()=>{if(n.timeout){const e=n.timeout.start();return ne(e),e}};let vr=!1;const br={};const yr=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in br){const r=t.getAttribute&&t.getAttribute(e);if(r)return void br[e].fire({template:r})}};n.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const r=this._getHandlersByEventName(e);r.includes(t)||r.push(t)}once(e,t){const r=(...n)=>{this.removeListener(e,r),t.apply(this,n)};this.on(e,r)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const r=this._getHandlersByEventName(e),n=r.indexOf(t);n>-1&&r.splice(n,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var xr=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||wr(e[0])?["title","html","icon"].forEach((r,n)=>{const o=e[n];"string"==typeof o||wr(o)?t[r]=o:void 0!==o&&u(`Unexpected type of ${r}! Expected "string" or "Element", got ${typeof o}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){br[e]=this,vr||(document.body.addEventListener("click",yr),vr=!0)},clickCancel:()=>{var e;return null===(e=R())||void 0===e?void 0:e.click()},clickConfirm:Ue,clickDeny:()=>{var e;return null===(e=_())||void 0===e?void 0:e.click()},enableLoading:bt,fire:function(...e){return new this(...e)},getActions:N,getCancelButton:R,getCloseButton:A,getConfirmButton:$,getContainer:v,getDenyButton:_,getFocusableElements:D,getFooter:M,getHtmlContainer:E,getIcon:k,getIconContent:()=>y(s["icon-content"]),getImage:C,getInputLabel:()=>y(s["input-label"]),getLoader:P,getPopup:x,getProgressSteps:S,getTimerLeft:()=>n.timeout&&n.timeout.getTimerLeft(),getTimerProgressBar:T,getTitle:j,getValidationMessage:L,increaseTimer:e=>{if(n.timeout){const t=n.timeout.increase(e);return ne(t,!0),t}},isDeprecatedParameter:Xt,isLoading:()=>{const e=x();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>Boolean(n.timeout&&n.timeout.isRunning()),isUpdatableParameter:Jt,isValidParameter:Zt,isVisible:()=>ee(x()),mixin:function(e){return class extends(this){_main(t,r){return super._main(t,Object.assign({},e,r))}}},off:(e,t)=>{n.eventEmitter&&(e?t?n.eventEmitter.removeListener(e,t):n.eventEmitter.removeAllListeners(e):n.eventEmitter.reset())},on:(e,t)=>{n.eventEmitter&&n.eventEmitter.on(e,t)},once:(e,t)=>{n.eventEmitter&&n.eventEmitter.once(e,t)},resumeTimer:gr,showLoading:bt,stopTimer:fr,toggleTimer:()=>{const e=n.timeout;return e&&(e.running?fr():gr())}});class kr{constructor(e,t){this.callback=e,this.remaining=t,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=(new Date).getTime()-this.started.getTime()),this.remaining}increase(e){const t=this.running;return t&&this.stop(),this.remaining+=e,t&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}}const jr=["swal-title","swal-html","swal-footer"],Er=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{Nr(e,["name","value"]);const r=e.getAttribute("name"),n=e.getAttribute("value");r&&n&&(t[r]=r in Wt&&"boolean"==typeof Wt[r]?"false"!==n:r in Wt&&"object"==typeof Wt[r]?JSON.parse(n):n)}),t},Cr=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const r=e.getAttribute("name"),n=e.getAttribute("value");r&&n&&(t[r]=new Function(`return ${n}`)())}),t},Sr=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{Nr(e,["type","color","aria-label"]);const r=e.getAttribute("type");if(!r||!["confirm","cancel","deny"].includes(r))return;t[`${r}ButtonText`]=e.innerHTML,t[`show${c(r)}Button`]=!0;const n=e.getAttribute("color");null!==n&&(t[`${r}ButtonColor`]=n);const o=e.getAttribute("aria-label");null!==o&&(t[`${r}ButtonAriaLabel`]=o)}),t},Lr=e=>{const t={},r=e.querySelector("swal-image");if(r){Nr(r,["src","width","height","alt"]);const e=r.getAttribute("src");null!==e&&(t.imageUrl=e||void 0);const n=r.getAttribute("width");null!==n&&(t.imageWidth=n||void 0);const o=r.getAttribute("height");null!==o&&(t.imageHeight=o||void 0);const a=r.getAttribute("alt");null!==a&&(t.imageAlt=a||void 0)}return t},$r=e=>{const t={},r=e.querySelector("swal-icon");return r&&(Nr(r,["type","color"]),r.hasAttribute("type")&&(t.icon=r.getAttribute("type")),r.hasAttribute("color")&&(t.iconColor=r.getAttribute("color")),t.iconHtml=r.innerHTML),t},Rr=e=>{const t={},r=e.querySelector("swal-input");r&&(Nr(r,["type","label","placeholder","value"]),t.input=r.getAttribute("type")||"text",r.hasAttribute("label")&&(t.inputLabel=r.getAttribute("label")),r.hasAttribute("placeholder")&&(t.inputPlaceholder=r.getAttribute("placeholder")),r.hasAttribute("value")&&(t.inputValue=r.getAttribute("value")));const n=Array.from(e.querySelectorAll("swal-input-option"));return n.length&&(t.inputOptions={},n.forEach(e=>{Nr(e,["value"]);const r=e.getAttribute("value");if(!r)return;const n=e.innerHTML;t.inputOptions[r]=n})),t},_r=(e,t)=>{const r={};for(const n in t){const o=t[n],a=e.querySelector(o);a&&(Nr(a,[]),r[o.replace(/^swal-/,"")]=a.innerHTML.trim())}return r},Pr=e=>{const t=jr.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const r=e.tagName.toLowerCase();t.includes(r)||d(`Unrecognized element <${r}>`)})},Nr=(e,t)=>{Array.from(e.attributes).forEach(r=>{-1===t.indexOf(r.name)&&d([`Unrecognized attribute "${r.name}" on <${e.tagName.toLowerCase()}>.`,t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element."])})},Mr=e=>{var t,r;const o=v(),a=x();if(!o||!a)return;"function"==typeof e.willOpen&&e.willOpen(a),null===(t=n.eventEmitter)||void 0===t||t.emit("willOpen",a);const s=window.getComputedStyle(document.body).overflowY;if(Br(o,a,e),setTimeout(()=>{Ar(o,a)},10),B()&&(Dr(o,void 0!==e.scrollbarPadding&&e.scrollbarPadding,s),(()=>{const e=v();Array.from(document.body.children).forEach(t=>{t.contains(e)||(t.hasAttribute("aria-hidden")&&t.setAttribute("data-previous-aria-hidden",t.getAttribute("aria-hidden")||""),t.setAttribute("aria-hidden","true"))})})()),nt&&!1===e.backdrop&&a.scrollHeight>o.clientHeight&&(o.style.pointerEvents="auto"),z()||n.previousActiveElement||(n.previousActiveElement=document.activeElement),"function"==typeof e.didOpen){const t=e.didOpen;setTimeout(()=>t(a))}null===(r=n.eventEmitter)||void 0===r||r.emit("didOpen",a)},Tr=e=>{const t=x();if(!t||e.target!==t)return;const r=v();r&&(t.removeEventListener("animationend",Tr),t.removeEventListener("transitionend",Tr),r.style.overflowY="auto",q(r,s["no-transition"]))},Ar=(e,t)=>{re(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",Tr),t.addEventListener("transitionend",Tr)):e.style.overflowY="auto"},Dr=(e,t,r)=>{(()=>{if(rt&&!F(document.body,s.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",W(document.body,s.iosfix),ot()}})(),t&&"hidden"!==r&&ct(r),setTimeout(()=>{e.scrollTop=0})},Br=(e,t,r)=>{var n;null!==(n=r.showClass)&&void 0!==n&&n.backdrop&&W(e,r.showClass.backdrop),r.animation?(t.style.setProperty("opacity","0","important"),Z(t,"grid"),setTimeout(()=>{var e;null!==(e=r.showClass)&&void 0!==e&&e.popup&&W(t,r.showClass.popup),t.style.removeProperty("opacity")},10)):Z(t,"grid"),W([document.documentElement,document.body],s.shown),r.heightAuto&&r.backdrop&&!r.toast&&W([document.documentElement,document.body],s["height-auto"])};var zr=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),Or=(e,t)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid URL");function Fr(e){(function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=zr),"url"===e.input&&(e.inputValidator=Or))})(e),e.showLoaderOnConfirm&&!e.preConfirm&&d("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"),function(e){(!e.target||"string"==typeof e.target&&!document.querySelector(e.target)||"string"!=typeof e.target&&!e.target.appendChild)&&(d('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),se(e)}let Ir;var Hr=new WeakMap;class Ur{constructor(...t){if(r(this,Hr,Promise.resolve({isConfirmed:!1,isDenied:!1,isDismissed:!0})),"undefined"==typeof window)return;Ir=this;const n=Object.freeze(this.constructor.argsToParams(t));var o,a,s;this.params=n,this.isAwaitingPromise=!1,o=Hr,a=this,s=this._main(Ir.params),o.set(e(o,a),s)}_main(e,t={}){if(tr(Object.assign({},t,e)),n.currentInstance){const e=et.swalPromiseResolve.get(n.currentInstance),{isAwaitingPromise:t}=n.currentInstance;n.currentInstance._destroy(),t||e({isDismissed:!0}),B()&&tt()}n.currentInstance=Ir;const r=Wr(e,t);Fr(r),Object.freeze(r),n.timeout&&(n.timeout.stop(),delete n.timeout),clearTimeout(n.restoreFocusTimeout);const o=qr(Ir);return He(Ir,r),me.innerParams.set(Ir,r),Vr(Ir,o,r)}then(e){return t(Hr,this).then(e)}finally(e){return t(Hr,this).finally(e)}}const Vr=(e,t,r)=>new Promise((o,a)=>{const s=t=>{e.close({isDismissed:!0,dismiss:t,isConfirmed:!1,isDenied:!1})};et.swalPromiseResolve.set(e,o),et.swalPromiseReject.set(e,a),t.confirmButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.input?$t(e,"confirm"):Mt(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=me.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?$t(e,"deny"):_t(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(Ve.cancel)})(e,s)},t.closeButton.onclick=()=>{s(Ve.close)},((e,t,r)=>{e.toast?cr(e,t,r):(hr(t),mr(t),pr(e,t,r))})(r,t,s),((e,t,r)=>{if(We(e),!t.toast){const n=e=>Ze(t,e,r);e.keydownHandler=n;const o=t.keydownListenerCapture?window:x();if(o){e.keydownTarget=o,e.keydownListenerCapture=t.keydownListenerCapture;const r=n;e.keydownTarget.addEventListener("keydown",r,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0}}})(n,r,s),((e,t)=>{"select"===t.input||"radio"===t.input?Et(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(w(t.inputValue)||g(t.inputValue))&&(bt($()),Ct(e,t))})(e,r),Mr(r),Yr(n,r,s),Kr(t,r),setTimeout(()=>{t.container.scrollTop=0})}),Wr=(e,t)=>{const r=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const r=t.content;return Pr(r),Object.assign(Er(r),Cr(r),Sr(r),Lr(r),$r(r),Rr(r),_r(r,jr))})(e),n=Object.assign({},Wt,t,r,e);return n.showClass=Object.assign({},Wt.showClass,n.showClass),n.hideClass=Object.assign({},Wt.hideClass,n.hideClass),!1===n.animation&&(n.showClass={backdrop:"swal2-noanimation"},n.hideClass={}),n},qr=e=>{const t={popup:x(),container:v(),actions:N(),confirmButton:$(),denyButton:_(),cancelButton:R(),loader:P(),closeButton:A(),validationMessage:L(),progressSteps:S()};return me.domCache.set(e,t),t},Yr=(e,t,r)=>{const n=T();J(n),t.timer&&(e.timeout=new kr(()=>{r("timer"),delete e.timeout},t.timer),t.timerProgressBar&&n&&(Z(n),I(n,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&ne(t.timer)})))},Kr=(e,t)=>{if(!t.toast)return p(t.allowEnterKey)?void(Zr(e)||Jr(e,t)||qe(-1,1)):(m("allowEnterKey","preConfirm: () => false"),void e.popup.focus())},Zr=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&ee(e))return e.focus(),!0;return!1},Jr=(e,t)=>t.focusDeny&&ee(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&ee(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!ee(e.confirmButton)||(e.confirmButton.focus(),0));Ur.prototype.disableButtons=Ft,Ur.prototype.enableButtons=Ot,Ur.prototype.getInput=Dt,Ur.prototype.disableInput=Ht,Ur.prototype.enableInput=It,Ur.prototype.hideLoading=Tt,Ur.prototype.disableLoading=Tt,Ur.prototype.showValidationMessage=Ut,Ur.prototype.resetValidationMessage=Vt,Ur.prototype.close=ut,Ur.prototype.closePopup=ut,Ur.prototype.closeModal=ut,Ur.prototype.closeToast=ut,Ur.prototype.rejectPromise=mt,Ur.prototype.update=rr,Ur.prototype._destroy=or,Object.assign(Ur,xr),Object.keys(lr).forEach(e=>{Ur[e]=function(...t){if(Ir&&Ir[e])return Ir[e](...t)}}),Ur.DismissReason=Ve,Ur.version="11.26.25";const Xr=Ur;return Xr.default=Xr,Xr}(),void 0!==this&&this.Sweetalert2&&(this.swal=this.sweetAlert=this.Swal=this.SweetAlert=this.Sweetalert2),"undefined"!=typeof document&&function(e,t){var r=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(r),r.styleSheet)r.styleSheet.disabled||(r.styleSheet.cssText=t);else try{r.innerHTML=t}catch(e){r.innerText=t}}(document,':root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;
1--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start     top            top-end" "center-start  center         center-end" "bottom-start  bottom-center  bottom-end
vendor: 12,791 bytes, line 1
1";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:
1"!
vendor: 11,078 bytes, line 1
1";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}
1')}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{const e=Object.getPrototypeOf;let t;r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}const a=Object.create(null);r.r(a);const s={};t||=[null,e({}),e([]),e(e)];for(var i=2&o&&n;("object"==typeof i||"function"==typeof i)&&!~t.indexOf(i);i=e(i))Object.getOwnPropertyNames(i).forEach(e=>s[e]=()=>n[e]);return s.default=()=>n,r.d(a,s),a}})(),r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.hasOwn(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{let e;globalThis.importScripts&&(e=globalThis.location+"");const t=globalThis.document;if(!e&&t&&("SCRIPT"===t.currentScript?.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){const r=t.getElementsByTagName("script");if(r.length){let t=r.length-1;for(;t>-1&&(!e||!/^https?:/.test(e));)e=r[t--].src}}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),r.p=e})(),(()=>{"use strict";const e=window.wp.i18n,t=window.wp.element,n=function(t,r=60){const n=t?.substr(0,r);return n?.length>=r?(0,e.__)(`${n}...`,"wedocs-pro"):(0,e.__)(n,"wedocs-pro")},o=window.wp.data,a=window.React;var s=r.t(a,2),i=e=>{throw TypeError(e)},l=(e,t,r)=>t.has(e)||i("Cannot "+r),c=(e,t,r)=>(l(e,t,"read from private field"),r?r.call(e):t.get(e)),d=(e,t,r)=>t.has(e)?i("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),u=(e,t,r,n)=>(l(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),h=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,m=/^[\\/]{2}/;function p(e,t){return t+e.replace(/\\/g,"/")}var w,f="popstate";function g(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function v(e={}){return function(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:a=!1}=n,s=o.history,i="POP",l=null,c=d();function d(){return(s.state||{idx:null}).idx}function u(){i="POP";let e=d(),t=null==e?null:e-c;c=e,l&&l({action:i,location:m.location,delta:t})}function h(e){return C(o,e)}null==c&&(c=0,s.replaceState({...s.state,idx:c},""));let m={get action(){return i},get location(){return e(o,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(f,u),l=e,()=>{o.removeEventListener(f,u),l=null}},createHref:e=>t(o,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}}
1,push:function(e,t){i="PUSH";let n=g(e)?e:k(m.location,e,t);r&&r(n,e),c=d()+1;let u=x(n,c),h=m.createHref(n.mask||n);try{s.pushState(u,"",h)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(h)}a&&l&&l({action:i,location:m.location,delta:1})},replace:function(e,t){i="REPLACE";let n=g(e)?e:k(m.location,e,t);r&&r(n,e),c=d();let o=x(n,c),u=m.createHref(n.mask||n);s.replaceState(o,"",u),a&&l&&l({action:i,location:m.location,delta:0})},go:e=>s.go(e)};return m}(function(e,t){let{pathname:r="/",search:n="",hash:o=""}=E(e.location.hash.substring(1));return r.startsWith("/")||r.startsWith(".")||(r="/"+r),k("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){let t=e.location.href,r=t.indexOf("#");n=-1===r?t:t.slice(0,r)}return n+"#"+("string"==typeof t?t:j(t))},function(e,t){y("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}function b(e,t){if(!1===e||null==e)throw new Error(t)}function y(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function x(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function k(e,t,r=null,n,o){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?E(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),mask:o}}function j({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"===r.charAt(0)?r:"#"+r),e}function E(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function C(e,t,r=!1){let n="http://localhost";e&&(n="null"!==e.location.origin?e.location.origin:e.location.href),b(n,"No window.location.(origin|href) available to create URL");let o="string"==typeof t?t:j(t);return o=o.replace(/ $/,"%20"),!r&&m.test(o)&&(o=n+o),new URL(o,n)}var S=class{constructor(e){if(d(this,w,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(c(this,w).has(e))return c(this,w).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){c(this,w).set(e,t)}};w=new WeakMap;var L=new Set(["lazy","caseSensitive","path","id","index","children"]),$=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function R(e){return $.has(e)}function _(e,t,r=[],n={},o=!1){return e.map((e,a)=>{let s=[...r,String(a)],i="string"==typeof e.id?e.id:s.join("-");if(b(!0!==e.index||!e.children,"Cannot specify children on an index route"),b(o||!n[i],`Found a route id collision on i
1d "${i}".  Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let r={...e,id:i};return n[i]=P(r,t(r)),r}{let r={...e,id:i,children:void 0};return n[i]=P(r,t(r)),e.children&&(r.children=_(e.children,t,s,n,o)),r}})}function P(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function N(e,t,r="/"){return M(e,t,r,!1)}function M(e,t,r,n,o){let a=Z(("string"==typeof t?E(t):t).pathname||"/",r);if(null==a)return null;let s=o??T(e),i=null,l=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return y(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(a);for(let e=0;null==i&&e<s.length;++e)i=W(s[e],l,n);return i}function T(e){let t=A(e);return function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(t),t}function A(e,t=[],r=[],n="",o=!1){let a=(e,a,s=o,i)=>{let l={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(n)&&s)return;b(l.relativePath.startsWith(n),`Absolute route path "${l.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(n.length)}let c=ne([n,l.relativePath]),d=r.concat(l);e.children&&e.children.length>0&&(b(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),A(e.children,t,d,c,s)),(null!=e.path||e.index)&&t.push({path:c,score:V(c,e.index),routesMeta:d.map((e,t)=>{let[r,n]=K(e.relativePath,e.caseSensitive,t===d.length-1);return{...e,matcher:r,compiledParams:n}})})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of D(e.path))a(e,t,!0,r);else a(e,t)}),t}function D(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===n.length)return o?[a,""]:[a];let s=D(n.join("/")),i=[];return i.push(...s.map(e=>""===e?a:[a,e].join("/"))),o&&i.push(...s),i.map(t=>e.startsWith("/")&&""===t?"/":t)}var B=/^:[\w-]+$/,z=3,O=2,F=1,I=10,H=-2,U=e=>"*"===e;function V(e,t){let r=e.split("/"),n=r.length;return r.some(U)&&(n+=H),t&&(n+=O),r.filter(e=>!U(e)).reduce((e,t)=>e+(B.test(t)?z:""===t?F:I),n)}function W(e,t,r=!1){let{routesMeta:n}=e,o={},a="/",s=[];for(let e=0;e<n.length;++e){let i=n[e],l=e===n.length-1,c="/"===a?t:t.slice(a.length)||"/",d={path:i.relativePath,caseSensitive:i.caseSensitive,end:l},u=i.matcher&&i.compiledParams?Y(d,c,i.matcher,i.compiledParams):q(d,c),h=i.route;if(!u&&l&&r&&!n[n.length-1].route.index&&(u=q({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},c)),!u)return null;
1Object.assign(o,u.params),s.push({params:o,pathname:ne([a,u.pathname]),pathnameBase:ae(ne([a,u.pathnameBase])),route:h}),"/"!==u.pathnameBase&&(a=ne([a,u.pathnameBase]))}return s}function q(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=K(e.path,e.caseSensitive,e.end);return Y(e,t,r,n)}function Y(e,t,r,n){let o=t.match(r);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),i=o.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=i[n]||"";s=a.slice(0,a.length-e.length).replace(/(.)\/+$/,"$1")}const o=i[n];return e[t]=r&&!o?void 0:(o||"").replace(/%2F/g,"/"),e},{}),pathname:a,pathnameBase:s,pattern:e}}function K(e,t=!1,r=!0){y("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,o,a)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=a.charAt(o+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function Z(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}var J=e=>h.test(e);function X(e,t){let r=oe(t).split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function G(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Q(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function ee(e){let t=Q(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function te(e,t,r,n=!1){let o;"string"==typeof e?o=E(e):(o={...e},b(!o.pathname||!o.pathname.includes("?"),G("?","pathname","search",o)),b(!o.pathname||!o.pathname.includes("#"),G("#","pathname","hash",o)),b(!o.search||!o.search.includes("#"),G("#","search","hash",o)));let a,s=""===e||""===o.pathname,i=s?"/":o.pathname;if(null==i)a=r;else{let e=t.length-1;if(!n&&i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}a=e>=0?t[e]:"/"}let l=function(e,t="/"){let r,{pathname:n,search:o="",hash:a=""}="string"==typeof e?E(e):e;return n?(n=re(n),r=n.startsWith("/")?X(n.substring(1),"/"):X(n,t)):r=t,{pathname:r,search:se(o),hash:ie(a)}}(o,a),c=i&&"/"!==i&&i.endsWith("/"),d=(s||"."===i)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!d||(l.pathname+="/"),l}var re=e=>e.replace(/[\\/]{2,}/g,"/"),ne=e=>re(e.join("/")),oe=e=>e.replace(/\/+$/,""),ae=e=>oe(e).replace(/^\/*/,"/"),se=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",ie=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",le=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],ce=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function de(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function ue(e){let t=e.map(e=>e.route.path).filter(Boolean);return ne(t)||"/"}var he="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function me(e,t){let r=e;if("string"!=typeof r||!h.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,o=!1;if(he)try{let e=new URL(window.location.href),n=m.test(r)?new URL(p(r,e.protocol)):new URL(r),a=Z(n.pathname,t);n.origin===e.origin&&null!=a?r=a+n.search+n.hash:o=!0}catch(e){y(!1,`<Link to="${r}">
1 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:o,to:r}}var pe=Symbol("Uninstrumented");function we(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(r);for(let n of t)e[n]&&r[n].push(e[n])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=fe(r.lazy,t.lazy,()=>{});e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let o=e[t],a=r[`lazy.${t}`];if("function"==typeof o&&a.length>0){let e=fe(a,o,()=>{});e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let o=t[e];if("function"==typeof o&&r[e].length>0){let t=o[pe]??o,a=fe(r[e],t,(...e)=>ve(e[0]));a&&("loader"===e&&!0===t.hydrate&&(a.hydrate=!0),a[pe]=t,n[e]=a)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[pe]??e,n=fe(r.middleware,t,(...e)=>ve(e[0]));return n?(n[pe]=t,n):e})),n}function fe(e,t,r){return 0===e.length?null:async(...n)=>{let o=await ge(e,r(...n),()=>t(...n),e.length-1);if("error"===o.type)throw o.value;return o.value}}async function ge(e,t,r,n){let o,a=e[n];if(a){let s,i=async()=>(s?console.error("You cannot call instrumented handlers more than once"):s=ge(e,t,r,n-1),o=await s,b(o,"Expected a result"),"error"===o.type&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(i,t)}catch(e){console.error("An instrumentation function threw an error:",e)}s||await i(),await s}else try{let e=await r();o={type:"success",value:e}}catch(e){o={type:"error",value:e}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ve(e){let{request:t,context:r,params:n,pattern:o}=e;return{request:ye(t),params:{...n},pattern:o,context:xe(r)}}function be(e,t){return{currentUrl:j(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function ye(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function xe(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===Se}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var ke,je,Ee,Ce,Se=Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Le=["POST","PUT","PATCH","DELETE"],$e=new Set(Le),Re=["GET",...Le],_e=new Set(Re),Pe=new Set([301,302,303,307,308]),Ne=new Set([307,308]),Me={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Te={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ae={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},De=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),Be="remix-router-transitions",ze=Symbol("ResetLoaderData"),Oe=class{constructor(e){d(this,ke),d(this,je),d(this,Ee),d(this,Ce),u(this,ke,e),u(this,je,T(e))}get stableRoutes(){return c(this,ke)}get activeRoutes(){return c(this,Ee)??c(this,ke)}get branches(){return c(this,Ce)??c(this,je)}get hasHMRRoutes(){return null!=c(this,Ee)}setRoutes(e){u(this,ke,e),u(this,je,T(e))}setHmrRoutes(e){u(this,Ee,e),u(this,Ce,T(e))}commitHmrRoutes(){c(this,Ee)&&(u(this,ke,c(this,Ee)),u(this,je,c(this,Ce)),u(this,Ee,void 0),u(this,Ce,void 0))}};function Fe(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;b(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],o=e.mapRouteProperties||De,a=o;if(e.instrumentations){let t=e.instrumentations;a=e=>({...o(e),...we(t.map(e=>
1e.route).filter(Boolean),e)})}let s={},i=new Oe(_(e.routes,a,void 0,s)),l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let c,d,u,h=e.dataStrategy||Qe,m={...e.future},p=null,w=new Set,f=null,g=null,v=null,x=null,L=null!=e.hydrationData,$=M(i.activeRoutes,e.history.location,l,!1,i.branches),R=!1,P=null;if(null!=$||e.patchRoutesOnNavigation)if($&&!e.hydrationData&&_e($,i.activeRoutes,e.history.location.pathname).active&&($=null),$)if($.some(e=>e.route.lazy))c=!1,d=!c;else if($.some(e=>Ve(e.route))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,n=$;if(r){let e=$.findIndex(e=>void 0!==r[e.route.id]);n=n.slice(0,e+1)}d=!1,c=!0,n.forEach(e=>{let n=We(e.route,t,r);d=d||n.renderFallback,c=c&&!n.shouldLoad})}else c=!0,d=!c;else{c=!1,d=!c,$=[];let t=_e(null,i.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(R=!0,$=t.matches)}else{let t=bt(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=vt(i.activeRoutes);c=!0,d=!c,$=r,P={[n.id]:t}}let N,T,A={historyAction:e.history.action,location:e.history.location,matches:$,initialized:c,renderFallback:d,navigation:Me,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},D="POP",B=null,z=!1,O=!1,F=new Map,I=null,H=!1,U=!1,V=new Set,W=new Map,q=0,Y=-1,K=new Map,X=new Set,G=new Map,Q=new Map,ee=new Set,te=new Map,re=null;function ne(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=s[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e})),A={...A,...e};let r=[],n=[];A.fetchers.forEach((e,t)=>{"idle"===e.state&&(ee.has(t)?r.push(t):n.push(t))}),ee.forEach(e=>{A.fetchers.has(e)||W.has(e)||r.push(e)}),0===w.size&&(f={newErrors:e.errors??null}),[...w].forEach(n=>n(A,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>ve(A.fetchers,e)),n.forEach(e=>A.fetchers.delete(e))}function oe(t,r,{flushSync:n}={}){let o,a=null!=A.actionData&&null!=A.navigation.formMethod&&$t(A.navigation.formMethod)&&"loading"===A.navigation.state&&!0!==t.state?._isRedirect;o=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:a?A.actionData:null;let s=r.loaderData?wt(A.loaderData,r.loaderData,r.matches||[],r.errors):A.loaderData,l=A.blockers;l.size>0&&(l=new Map(l),l.forEach((e,t)=>l.set(t,Ae)));let c,d=!H&&Re(t,r.matches||A.matches),u=!0===z||null!=A.navigation.formMethod&&$t(A.navigation.formMethod)&&!0!==t.state?._isRedirect;if(i.commitHmrRoutes(),H||"POP"===D||("PUSH"===D?e.history.push(t,t.state):"REPLACE"===D&&e.history.replace(t,t.state)),"POP"===D){let e=F.get(A.location.pathname);e&&e.has(t.pathname)?c={currentLocation:A.location,nextLocation:t}:F.has(t.pathname)&&(c={currentLocation:t,nextLocation:A.location})}else if(O){let e=F.get(A.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),F.set(A.location.pathname,e)),c={currentLocation:A.location,nextLocation:t}}ne({...r,actionData:o,loaderData:s,historyAction:D,location:t,initialized:!0,renderFallback:!1,navigation:Me,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:u,blockers:l},{viewTransitionOpts:c,flushSync:!0===n}),D="POP",z=!1,O=!1,H=!1,U=!1,B?.resolve(),B=null,re?.resolve(),re=null}async function ae(t,r,o){N&&N.abort(),N=null,D=t,H=!0===(o&&o.startUninterruptedRevalidation),function(e,t){if(g&&x){let r=$e(e,t);g[r]=x()}}(A.location,A.matches),z=!0===(o&&o.preventScrollReset),O=!0===(o&&o.enableViewTransition);let c=i.activeRoutes,d=o?.initialHydration&&A.matches&&A.matches.length>0&&!R?A.matches:M(c,r,l,!1,i.branches),u=!0===(o&&o.flushSync);if(d&&A.initialized&&!U&&(h=A.location,m=r,h.pathname===m.pathname&&h.search===m.search&&(""===h.hash?""!==m.hash:h.hash===m.hash||""!==m.hash))&&!(o&&o.submission&&$t(o.submission.formMethod)))return void oe(r,{matches:d},{flushSync:u});var h,m;let p=_e(d,c,r.pathname);if(p.active&&p.matches&&(d=p.matches),!d){let{error:e,notFoundMatches:t,route:n}=Le(r.pathname);return void oe(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:u})}let w=o&&o.overrideNavigation?{...o.overrideNavigation,matches:d,historyAction:t}:void 0;N=new AbortController;let f,v=dt(e.history,r,N.signal,o&&o.submission),b=e.getContext?await e.getContext():new S;if(o&&o.pendingError)f=[gt(d).route.id,{type:"error",error:o.pendingError}];else if(o&&o.submission&&$t(o.submission.formMethod)){let c=await async function(t,r,o,c,d,u,h,m,p={}){he();let w,f=function(e,t,r,n){return{state:"submitting",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}(r,c,d,o);if(ne({navigation:f},{flushSync:!0===p.flushSync}),h){let e=await Pe(c,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=vt(i.activeRoutes);
1return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=gt(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=Le(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}c=e.matches}let g=_t(c,r);if(g.route.action||g.route.lazy){let e=ot(a,s,t,r,c,g,m?[]:n,u),o=await le(t,r,e,u,null);if(w=o[g.route.id],!w)for(let e of c)if(o[e.route.id]){w=o[e.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else w={type:"error",error:bt(405,{method:t.method,pathname:r.pathname,routeId:g.route.id})};if(Ct(w)){let r;return r=p&&null!=p.replace?p.replace:ct(w.response.headers.get("Location"),new URL(t.url),l,e.history)===A.location.pathname+A.location.search,await ie(t,w,!0,{submission:o,replace:r}),{shortCircuited:!0}}if(Et(w)){let e=gt(c,g.route.id);return!0!==(p&&p.replace)&&(D="PUSH"),{matches:c,pendingActionResult:[e.route.id,w,g.route.id]}}return{matches:c,pendingActionResult:[g.route.id,w]}}(v,r,o.submission,d,t,b,p.active,o&&!0===o.initialHydration,{replace:o.replace,flushSync:u});if(c.shortCircuited)return;if(c.pendingActionResult){let[e,t]=c.pendingActionResult;if(Et(t)&&de(t.error)&&404===t.error.status)return N=null,void oe(r,{matches:c.matches,loaderData:{},errors:{[e]:t.error}})}d=c.matches||d,f=c.pendingActionResult,w=Nt(r,d,t,o.submission),u=!1,p.active=!1,v=dt(e.history,v.url,v.signal)}let{shortCircuited:y,matches:k,loaderData:j,errors:E,workingFetchers:C}=await async function(t,r,o,c,d,u,h,m,p,w,f,g,v,b){let y=h||Nt(r,o,c,m),x=m||p||Pt(y),k=!H&&!f;if(u){if(k){let e=se(v);ne({navigation:y,...void 0!==e?{actionData:e}:{}},{flushSync:g})}let e=await Pe(o,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=vt(i.activeRoutes);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=gt(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=Le(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}o=e.matches}let j=i.activeRoutes,{dsMatches:E,revalidatingFetchers:C}
1=Ue(t,d,a,s,e.history,A,o,x,r,f?[]:n,!0===f,U,V,ee,G,X,j,l,null!=e.patchRoutesOnNavigation,i.branches,v,b);if(Y=++q,!e.dataStrategy&&!E.some(e=>e.shouldLoad)&&!E.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===C.length){let e=new Map(A.fetchers),t=ke(e);return oe(r,{matches:o,loaderData:{},errors:v&&Et(v[1])?{[v[0]]:v[1].error}:null,...ft(v),...t?{fetchers:e}:{}},{flushSync:g}),{shortCircuited:!0}}if(k){let e={};if(!u){e.navigation=y;let t=se(v);void 0!==t&&(e.actionData=t)}C.length>0&&(e.fetchers=function(e){let t=new Map(A.fetchers);return e.forEach(e=>{let r=t.get(e.key),n=Mt(void 0,r?r.data:void 0);t.set(e.key,n)}),t}(C)),ne(e,{flushSync:g})}C.forEach(e=>{ye(e.key),e.controller&&W.set(e.key,e.controller)});let S=()=>C.forEach(e=>ye(e.key));N&&N.signal.addEventListener("abort",S);let{loaderResults:L,fetcherResults:$}=await ce(E,C,t,r,d);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",S),C.forEach(e=>W.delete(e.key));let R=yt(L);if(R)return await ie(t,R.result,!0,{replace:w}),{shortCircuited:!0};if(R=yt($),R)return X.add(R.key),await ie(t,R.result,!0,{replace:w}),{shortCircuited:!0};let _=new Map(A.fetchers),{loaderData:P,errors:M}=pt(A,o,L,v,C,$,_);f&&A.errors&&(M={...A.errors,...M});let T=ke(_),D=je(Y,_);return{matches:o,loaderData:P,errors:M,...T||D||C.length>0?{workingFetchers:_}:{}}}(v,r,d,t,b,p.active,w,o&&o.submission,o&&o.fetcherSubmission,o&&o.replace,o&&!0===o.initialHydration,u,f,o&&o.callSiteDefaultShouldRevalidate);y||(N=null,oe(r,{matches:k||d,...ft(f),loaderData:j,errors:E,...C?{fetchers:C}:{}}))}function se(e){return e&&!Et(e[1])?{[e[0]]:e[1].data}:A.actionData?0===Object.keys(A.actionData).length?null:A.actionData:void 0}async function ie(n,o,a,{submission:s,fetcherSubmission:i,preventScrollReset:c,replace:d}={}){a||(B?.resolve(),B=null),o.response.headers.has("X-Remix-Revalidate")&&(U=!0);let u=o.response.headers.get("Location");b(u,"Expected a Location header on the redirect Response"),u=ct(u,new URL(n.url),l,e.history);let h=k(A.location,u,{_isRedirect:!0});if(r){let e=!1;if(o.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(J(u)){const r=C(t,u,!0);e=r.origin!==t.location.origin||null==Z(r.pathname,l)}if(e)return void(d?t.location.replace(u):t.location.assign(u))}N=null;let m=!0===d||o.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:p,formAction:w,formEncType:f}=A.navigation;!s&&!i&&p&&w&&f&&(s=Pt(A.navigation));let g=s||i;if(Ne.has(o.response.status)&&g&&$t(g.formMethod))await ae(m,h,{submission:{...g,formAction:u},preventScrollReset:c||z,enableViewTransition:a?O:void 0});else{let e=Nt(h,[],m,s);await ae(m,h,{overrideNavigation:e,fetcherSubmission:i,preventScrollReset:c||z,enableViewTransition:a?O:void 0})}}async function le(e,t,r,n,o){let a,s={};try{a=await async function(e,t,r,n,o,a,s){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let i={request:t,url:ut(t,r),pattern:ue(n),params:n[0].params,context:a,matches:n},l=s?()=>{throw new Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response.  You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=i;return et(t,()=>e({...t,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},c=await e({...i,fetcherKey:o,runClientMiddleware:l});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(e){}return c}(h,e,t,r,o,n,!1)}catch(e){return r.filter(e=>e.shouldLoad).forEach(t=>{s[t.route.id]={type:"error",error:e}}),s}if(e.signal.aborted)return s;if(!$t(e.method))for(let e of r){if("error"===a[e.route.id]?.type)break;a.hasOwnProperty(e.route.id)||A.loaderData.hasOwnProperty(e.route.id)||A.errors&&A.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,n]of Object.entries(a))if(jt(n)){let o=n.result;s[t]={type:"redirect",response:st(o,e,t,r,l)}}else s[t]=await at(n);return s}async function ce(e,t,r,n,o){let a=le(r,n,e,o,null),s=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await le(e.request,e.path,e.matches,o,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:bt(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await s).reduce((e,t)=>
1Object.assign(e,t),{})}}function he(){U=!0,G.forEach((e,t)=>{W.has(t)&&V.add(t),ye(t)})}function me(e,t,r={}){let n=new Map(A.fetchers);n.set(e,t),ne({fetchers:n},{flushSync:!0===(r&&r.flushSync)})}function ge(e,t,r,n={}){let o=gt(A.matches,t),a=new Map(A.fetchers);ve(a,e),ne({errors:{[o.route.id]:r},fetchers:a},{flushSync:!0===(n&&n.flushSync)})}function ve(e,t){let r=A.fetchers.get(t);!W.has(t)||r&&"loading"===r.state&&K.has(t)||ye(t),G.delete(t),K.delete(t),X.delete(t),ee.delete(t),V.delete(t),e.delete(t)}function ye(e,t){let r=W.get(e);r&&(r.abort(t),W.delete(e))}function xe(e,t){for(let r of e){let e=t.get(r);b(e,`Expected fetcher: ${r}`);let n=Tt(e.data);t.set(r,n)}}function ke(e){let t=[],r=!1;for(let n of X){let o=e.get(n);b(o,`Expected fetcher: ${n}`),"loading"===o.state&&(X.delete(n),t.push(n),r=!0)}return xe(t,e),r}function je(e,t){let r=[];for(let[n,o]of K)if(o<e){let e=t.get(n);b(e,`Expected fetcher: ${n}`),"loading"===e.state&&(ye(n),K.delete(n),r.push(n))}return xe(r,t),r.length>0}function Ee(e){A.blockers.delete(e),te.delete(e)}function Ce(e,t){let r=A.blockers.get(e)||Ae;b("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(A.blockers);n.set(e,t),ne({blockers:n})}function Se({currentLocation:e,nextLocation:t,historyAction:r}){if(0===te.size)return;te.size>1&&y(!1,"A router only supports one blocker at a time");let n=Array.from(te.entries()),[o,a]=n[n.length-1],s=A.blockers.get(o);return s&&"proceeding"===s.state?void 0:a({currentLocation:e,nextLocation:t,historyAction:r})?o:void 0}function Le(e){let t=bt(404,{pathname:e}),r=i.activeRoutes,{matches:n,route:o}=vt(r);return{notFoundMatches:n,route:o,error:t}}function $e(e,t){return v&&v(e,t.map(e=>function(e,t){let{route:r,pathname:n,params:o}=e;return{id:r.id,pathname:n,params:o,data:t[r.id],loaderData:t[r.id],handle:r.handle}}(e,A.loaderData)))||e.key}function Re(e,t){if(g){let r=$e(e,t),n=g[r];if("number"==typeof n)return n}return null}function _e(t,r,n){if(e.patchRoutesOnNavigation){let e=i.branches;if(!t)return{active:!0,matches:M(r,n,l,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:M(r,n,l,!0,e)}}return{active:!1,matches:null}}async function Pe(t,r,n,o){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let c=t;for(;;){let t=s;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:c,fetcherKey:o,patch:(e,r)=>{n.aborted||Ye(e,r,i,t,a,!1)}})}catch(e){return{type:"error",error:e,partialMatches:c}}if(n.aborted)return{type:"aborted"};let d=i.branches,u=M(i.activeRoutes,r,l,!1,d),h=null;if(u){if(0===Object.keys(u[0].params).length)return{type:"success",matches:u};if(h=M(i.activeRoutes,r,l,!0,d),!(h&&c.length<h.length&&ze(c,h.slice(0,c.length))))return{type:"success",matches:u}}if(h||(h=M(i.activeRoutes,r,l,!0,d)),!h||ze(c,h))return{type:"success",matches:null};c=h}}function ze(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return u={get basename(){return l},get future(){return m},get state(){return A},get routes(){return i.stableRoutes},get branches(){return i.branches},get manifest(){return s},get window(){return t},initialize:function(){if(p=e.history.listen(({action:t,location:r,delta:n})=>{if(T)return T(),void(T=void 0);y(0===te.size||null!=n,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let o=Se({currentLocation:A.location,nextLocation:r,historyAction:t});if(o&&null!=n){let t=new Promise(e=>{T=e});return e.history.go(-1*n),Ce(o,{state:"blocked",location:r,proceed(){Ce(o,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(A.blockers);e.set(o,Ae),ne({blockers:e})}}),B?.resolve(),void(B=null)}return ae(t,r)}),r){!function(e,t){try{let r=e.sessionStorage.getItem(Be);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(e){}}(t,F);let e=()=>function(e,t){if(t.size>0){let r={};for(let[e,n]of t)r[e]=[...n];try{e.sessionStorage.setItem(Be,JSON.stringify(r))}catch(e){y(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}(t,F);t.addEventListener("pagehide",e),I=()=>t.removeEventListener("pagehide",e)}return A.initialized||ae("POP",A.location,{initialHydration:!0}),u},subscribe:function(e){if(w.add(e),f){let{newErrors:t}=f;f=null,e(A,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>w.delete(e)},enableScrollRestoration:function(e,t,r){if(g=e,x=t,v=r||null,!L&&A.navigation===Me){L=!0;let e=Re(A.location,A.matches);null!=e&&ne({restoreScrollPosition:e})}return()=>{g=null,x=null,v=null}},navigate:async function t(r,n){if(B?.resolve(),B=null,"number"==typeof r){B||(B=At());let t=B.promise;return e.history.go(r),t}let o,a=Ie(A.location,A.matches,l,r,n?.fromRouteId,n?.relative),{path:s,submission:i,error:c}=He(!1,a,n);n?.mask&&(o={pathname:"",search:"",hash:"",..."string"==typeof n.mask?E(n.mask):{...A.location.mask,...n.mask}});let d=A.location,u=k(d,s,n&&n.state,void 0,o);u={...u,...e.history.encodeLocation(u)};let h=n&&null!=n.replace?n.replace:void 0,m="PUSH";!0===h?m="REPLACE":!1===h||null!=i&&$t(i.formMethod)&&i.formAction===A.location.pathname+A.location.search&&(m="REPLACE");let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,w=!0===(n&&n.flushSync),f=Se({currentLocation:d,nextLocation:u,historyAction:m});f?Ce(f,{state:"blocked",location:u,proceed(){Ce(f,{state:"proceeding",proceed:void 0,reset:void 0,location:u}),t(r,n)},reset(){let e=new Map(A.blockers);e.set(f,Ae),ne({blockers:e})}}):await ae(m,u,{submission:i,pendingError:c,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:w,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})},fetch:async function(t,r,o,c){ye(t);let d=!0===(c&&c.flushSync),u=i.activeRoutes,h=Ie(A.location,A.matches,l,o,r,c?.relative),m=M(u,h,l,!1,i.branches),p=_e(m,u,h);if(p.active&&p.matches&&(m=p.matches),!m)return void ge(t,r,bt(404,{pathname:h}),{flushSync:d});let{path:w,submission:f,error:g}=He(!0,h,c);if(g)return void ge(t,r,g,{flushSync:d});let v=e.getContext?await e.getContext():new S,y=!0===(c&&c.preventScrollReset);f&&$t(f.formMethod)?await async function(t,r,o,c,d,u,h,m,p,w){he(),G.delete(t);let f=A.fetchers.get(t);me(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(p,f),{flushSync:h});let g=new AbortController,v=dt(e.history,o,g.signal,p);if(u){let e=await Pe(c,new URL(v.url).pathname,v.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,r,e.error,{flushSync:h});if(!e.matches)return void ge(t,r,bt(404,{pathname:o}),{flushSync:h});c=e.matches}let y=_t(c,o);if(!y.route.action&&!y.route.lazy){let e=bt(405,{method:p.formMethod,pathname:o,routeId:r});return void ge(t,r,e,{flushSync:h})}W.set(t,g);let x=q,k=ot(a,s,v,o,c,y,n,d),j=await le(v,o,k,d,t),E=j[y.route.id];if(!E)for(let e of k)if(j[e.route.id]){E=j[e.route.id];break}if(v.signal.aborted)return void(W.get(t)===g&&W.delete(t));if(ee.has(t)){if(Ct(E)||Et(E))return void me(t,Tt(void 0))}else{if(Ct(E))return W.delete(t),Y>x?void me(t,Tt(void 0)):(X.add(t),me(t,Mt(p)),ie(v,E,!1,{fetcherSubmission:p,preventScrollReset:m}));if(Et(E))return void ge(t,r,E.error)}let C=A.navigation.location||A.location,S=dt(e.history,C,g.signal),L=i.activeRoutes,$="idle"!==A.navigation.state?M(L,A.navigation.location,l,!1,i.branches):A.matches;b($,"Didn't find any matches after fetcher action");let R=++q;K.set(t,R);let{dsMatches:_,revalidatingFetchers:P}=Ue(S,d,a,s,e.history,A,$,p,C,n,!1,U,V,ee,G,X,L,l,null!=e.patchRoutesOnNavigation,i.branches,[y.route.id,E],w),T=Mt(p,E.data),B=new Map(A.fetchers);B.set(t,T),P.filter(e=>
1e.key!==t).forEach(e=>{let t=e.key,r=B.get(t),n=Mt(void 0,r?r.data:void 0);B.set(t,n),ye(t),e.controller&&W.set(t,e.controller)}),ne({fetchers:B});let z=()=>P.forEach(e=>ye(e.key));g.signal.addEventListener("abort",z);let{loaderResults:O,fetcherResults:F}=await ce(_,P,S,C,d);if(g.signal.aborted)return;g.signal.removeEventListener("abort",z),K.delete(t),W.delete(t),P.forEach(e=>W.delete(e.key));let I=A.fetchers.has(t),H=e=>{if(!I)return e;let r=new Map(e.fetchers);return r.set(t,Tt(E.data)),{...e,fetchers:r}},Z=yt(O);if(Z)return A=H(A),ie(S,Z.result,!1,{preventScrollReset:m});if(Z=yt(F),Z)return X.add(Z.key),A=H(A),ie(S,Z.result,!1,{preventScrollReset:m});let J=new Map(A.fetchers);I&&J.set(t,Tt(E.data));let{loaderData:Q,errors:te}=pt(A,$,O,void 0,P,F,J);je(R,J),"loading"===A.navigation.state&&R>Y?(b(D,"Expected pending action"),N&&N.abort(),oe(A.navigation.location,{matches:$,loaderData:Q,errors:te,fetchers:J})):(ne({errors:te,loaderData:wt(A.loaderData,Q,$,te),fetchers:J}),U=!1)}(t,r,w,m,v,p.active,d,y,f,c&&c.defaultShouldRevalidate):(G.set(t,{routeId:r,path:w}),await async function(t,r,o,i,l,c,d,u,h){let m=A.fetchers.get(t);me(t,Mt(h,m?m.data:void 0),{flushSync:d});let p=new AbortController,w=dt(e.history,o,p.signal);if(c){let e=await Pe(i,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void ge(t,r,e.error,{flushSync:d});if(!e.matches)return void ge(t,r,bt(404,{pathname:o}),{flushSync:d});i=e.matches}let f=_t(i,o);W.set(t,p);let g=q,v=ot(a,s,w,o,i,f,n,l),b=await le(w,o,v,l,t),y=b[f.route.id];if(!y)for(let e of i)if(b[e.route.id]){y=b[e.route.id];break}if(W.get(t)===p&&W.delete(t),!w.signal.aborted){if(!ee.has(t))return Ct(y)?Y>g?void me(t,Tt(void 0)):(X.add(t),void await ie(w,y,!1,{preventScrollReset:u})):void(Et(y)?ge(t,r,y.error):me(t,Tt(y.data)));me(t,Tt(void 0))}}(t,r,w,m,v,p.active,d,y,f))},revalidate:function(){re||(re=At()),he(),ne({revalidation:"loading"});let e=re.promise;return"submitting"===A.navigation.state?e:"idle"===A.navigation.state?(ae(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),e):(ae(D||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:!0===O}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:function(e){return Q.set(e,(Q.get(e)||0)+1),ee.has(e)&&ee.delete(e),A.fetchers.get(e)||Te},resetFetcher:function(e,t){ye(e,t?.reason),me(e,Tt(null))},deleteFetcher:function(e){let t=(Q.get(e)||0)-1;t<=0?(Q.delete(e),ee.add(e)):Q.set(e,t),ne({fetchers:new Map(A.fetchers)})},dispose:function(){p&&p(),I&&I(),w.clear(),N&&N.abort(),A.fetchers.forEach((e,t)=>ve(A.fetchers,t)),A.blockers.forEach((e,t)=>Ee(t))},getBlocker:function(e,t){let r=A.blockers.get(e)||Ae;return te.get(e)!==t&&te.set(e,t),r},deleteBlocker:Ee,patchRoutes:function(e,t,r=!1){Ye(e,t,i,s,a,r),i.hasHMRRoutes||ne({})},_internalFetchControllers:W,_internalSetRoutes:function(e){s={},i.setHmrRoutes(_(e,a,void 0,s))},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){ne(e)}},e.instrumentations&&(u=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let n of t)e[n]&&r[n].push(e[n])}})),r.navigate.length>0){let t=e.navigate[pe]??e.navigate,n=fe(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?j(r):".",...be(e,n??{})}});n&&(n[pe]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[pe]??e.fetch,n=fe(r.fetch,t,(...t)=>{let[r,,n,o]=t;return{href:n??".",fetcherKey:r,...be(e,o??{})}});n&&(n[pe]=t,e.fetch=n)}return e}(u,e.instrumentations.map(e=>e.router).filter(Boolean))),u}function Ie(e,t,r,n,o,a){let s,i;if(o){s=[];for(let e of t)if(s.push(e),e.route.id===o){i=e;break}}else s=t,i=t[t.length-1];let l=te(n||".",ee(s),Z(e.pathname,r)||e.pathname,"path"===a);if(null==n&&(l.search=e.search,l.hash=e.hash),(null==n||""===n||"."===n)&&i){let e=Rt(l.search);if(i.route.index&&!e)l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index";else if(!i.route.index&&e){let e=new URLSearchParams(l.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();l.search=r?`?${r}`:""}}return"/"!==r&&(l.pathname=function({basename:e,pathname:t}){return"/"===t?e:ne([e,t])}({basename:r,pathname:l.pathname})),j(l)}function He(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&(n=r.formMethod,!_e.has(n.toUpperCase())))return{path:t,error:bt(405,{method:r.formMethod})};var n;let o,a,s=()=>({path:t,error:bt(400,{type:"invalid-body"})}),i=(r.formMethod||"get").toUpperCase(),l=xt(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!$t(i))return s();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}\n`,""):String(r.body);return{path:t,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!$t(i))return s();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:i,formAction:l,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(e){return s()}}}if(b("function"==typeof FormData,"FormData is not available in this environment"),r.formData)o=ht(r.formData),a=r.formData;else if(r.body instanceof FormData)o=ht(r.body),a=r.body;
1else if(r.body instanceof URLSearchParams)o=r.body,a=mt(o);else if(null==r.body)o=new URLSearchParams,a=new FormData;else try{o=new URLSearchParams(r.body),a=mt(o)}catch(e){return s()}let c={formMethod:i,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:a,json:void 0,text:void 0};if($t(c.formMethod))return{path:t,submission:c};let d=E(t);return e&&d.search&&Rt(d.search)&&o.append("index",""),d.search=`?${o}`,{path:j(d),submission:c}}function Ue(e,t,r,n,o,a,s,i,l,c,d,u,h,m,p,w,f,g,v,b,y,x){let k,j=y?Et(y[1])?y[1].error:y[1].data:void 0,E=o.createURL(a.location),C=o.createURL(l);if(d&&a.errors){let e=Object.keys(a.errors)[0];k=s.findIndex(t=>t.route.id===e)}else if(y&&Et(y[1])){let e=y[0];k=s.findIndex(t=>t.route.id===e)-1}let S=y?y[1].statusCode:void 0,L=S&&S>=400,$={currentUrl:E,currentParams:a.matches[0]?.params||{},nextUrl:C,nextParams:s[0].params,...i,actionResult:j,actionStatus:S},R=ue(s),_=s.map((o,s)=>{let{route:i}=o,h=null;if(null!=k&&s>k)h=!1;else if(i.lazy)h=!0;else if(Ve(i))if(d){let{shouldLoad:e}=We(i,a.loaderData,a.errors);h=e}else(function(e,t,r){let n=!t||r.route.id!==t.route.id,o=!e.hasOwnProperty(r.route.id);return n||o})(a.loaderData,a.matches[s],o)&&(h=!0);else h=!1;if(null!==h)return nt(r,n,e,l,R,o,c,t,h);let m=!1;"boolean"==typeof x?m=x:L?m=!1:(u||E.pathname+E.search===C.pathname+C.search||E.search!==C.search||function(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}(a.matches[s],o))&&(m=!0);let p={...$,defaultShouldRevalidate:m},w=qe(o,p);return nt(r,n,e,l,R,o,c,t,w,p,x)}),P=[];return p.forEach((e,i)=>{if(d||!s.some(t=>t.route.id===e.routeId)||m.has(i))return;let l=a.fetchers.get(i),p=l&&"idle"!==l.state&&void 0===l.data,y=M(f,e.path,g??"/",!1,b);if(!y){if(v&&p)return;return void P.push({key:i,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(w.has(i))return;let k=_t(y,e.path),j=new AbortController,E=dt(o,e.path,j.signal),C=null;if(h.has(i))h.delete(i),C=ot(r,n,E,e.path,y,k,c,t);else if(p)u&&(C=ot(r,n,E,e.path,y,k,c,t));else{let o;o="boolean"==typeof x?x:!L&&u;let a={...$,defaultShouldRevalidate:o};qe(k,a)&&(C=ot(r,n,E,e.path,y,k,c,t,a))}
1C&&P.push({key:i,routeId:e.routeId,path:e.path,matches:C,match:k,request:E,controller:j})}),{dsMatches:_,revalidatingFetchers:P}}function Ve(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function We(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Ve(e))return{shouldLoad:!1,renderFallback:!1};let n=null!=t&&e.id in t,o=null!=r&&void 0!==r[e.id];if(!n&&o)return{shouldLoad:!1,renderFallback:!1};if("function"==typeof e.loader&&!0===e.loader.hydrate)return{shouldLoad:!0,renderFallback:!n};let a=!n&&!o;return{shouldLoad:a,renderFallback:a}}function qe(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function Ye(e,t,r,n,o,a){let s;if(e){let t=n[e];b(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),s=t.children}else s=r.activeRoutes;let i=[],l=[];if(t.forEach(e=>{let t=s.find(t=>Ke(e,t));t?l.push({existingRoute:t,newRoute:e}):i.push(e)}),i.length>0){let t=_(i,o,[e||"_","patch",String(s?.length||"0")],n);s.push(...t)}if(a&&l.length>0)for(let e=0;e<l.length;e++){let{existingRoute:t,newRoute:r}=l[e],n=t,[a]=_([r],o,[],{},!0);Object.assign(n,{element:a.element?a.element:n.element,errorElement:a.errorElement?a.errorElement:n.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:n.hydrateFallbackElement})}r.hasHMRRoutes||r.setRoutes([...r.activeRoutes])}function Ke(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||(e.children?.every((e,r)=>t.children?.some(t=>Ke(e,t)))??!1))}ke=new WeakMap,je=new WeakMap,Ee=new WeakMap,Ce=new WeakMap;var Ze=new WeakMap,Je=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let o=r[t.id];if(b(o,"No route found in manifest"),!o.lazy||"object"!=typeof o.lazy)return;let a=o.lazy[e];if(!a)return;let s=Ze.get(o);s||(s={},Ze.set(o,s));let i=s[e];if(i)return i;let l=(async()=>{let t=function(e){return L.has(e)}(e),r=void 0!==o[e]&&"hasErrorBoundary"!==e;if(t)y(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),s[e]=Promise.resolve();else if(r)y(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();null!=t&&(Object.assign(o,{[e]:t}),Object.assign(o,n(o)))}"object"==typeof o.lazy&&(o.lazy[e]=void 0,Object.values(o.lazy).every(e=>void 0===e)&&(o.lazy=void 0))})();return s[e]=l,l},Xe=new WeakMap;async function Ge(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function Qe(e){return e.matches.some(e=>e.route.middleware)?et(e,()=>Ge(e)):Ge(e)}function et(e,t){return async function(e,t,r,n,o){let{matches:a,...s}=e,i=a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]);return await tt(s,i,t,r,n,o)}(e,t,e=>{if(Lt(t=e)&&(r=t.status,Pe.has(r))&&t.headers.has("Location"))throw e;var t,r;return e},kt,function(t,r,n){if(n)return Promise.resolve(Object.assign(n.value,{[r]:{type:"error",result:t}}));{let{matches:n}=e,o=Math.min(Math.max(n.findIndex(e=>e.route.id===r),0),Math.max(n.findIndex(e=>e.shouldCallHandler()),0)),a=gt(n,n[o].route.id).route.id;return Promise.resolve({[a]:{type:"error",result:t}})}})}async function tt(e,t,r,n,o,a,s=0){let{request:i}=e;if(i.signal.aborted)throw i.signal.reason??new Error(`Request aborted: ${i.method} ${i.url}`);let l=t[s];if(!l)return await r();let c,[d,u]=l,h=async()=>{if(c)throw new Error("You may only call `next()` once per middleware");try{let i=await tt(e,t,r,n,o,a,s+1);return c={value:i},c.value}catch(e){return c={value:await a(e,d,c)},c.value}};try{let t=await u(e,h),r=null!=t?n(t):void 0;return o(r)?r:c?r??c.value:(c={value:await h()},c.value)}catch(e){return await a(e,d,c)}}function rt(e,t,r,n,o){let a=Je({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),s=function(e,t,r,n,o){let a=r[e.id];if(b(a,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=Xe.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{b("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let o=R(e),s=void 0!==a[e]&&"hasErrorBoundary"!==e;o?y(!o,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):s?y(!s,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):r[e]=n}Object.assign(a,r),Object.assign(a,{...n(a),lazy:void 0})})();return Xe.set(a,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let s,i=Object.keys(e.lazy),l=[];for(let a of i){if(o&&o.includes(a))continue;let i=Je({key:a,route:e,manifest:r,mapRouteProperties:n});i&&(l.push(i),a===t&&(s=i))}let c=l.length>0?Promise.all(l).then(()=>{}):void 0;return c?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:c,lazyHandlerPromise:s}}(n.route,$t(r.method)?"action":"loader",t,e,o);return{middleware:a,route:s.lazyRoutePromise,handler:s.lazyHandlerPromise}}function nt(e,t,r,n,o,a,s,i,l,c=null,d){let u=!1,h=rt(e,t,r,a,s);return{...a,_lazyPromises:h,shouldLoad:l,shouldRevalidateArgs:c,shouldCallHandler:e=>(u=!0,c?qe(a,"boolean"==typeof d?{...c,defaultShouldRevalidate:d}:"boolean"==typeof e?{...c,defaultShouldRevalidate:e}:c):l),resolve(e){let{lazy:t,loader:s,middleware:c}=a.route,d=u||l||e&&!$t(r.method)&&(t||s),m=c&&c.length>0&&!s&&!t;
1return!d||!$t(r.method)&&m?Promise.resolve({type:"data",result:void 0}):async function({request:e,path:t,pattern:r,match:n,lazyHandlerPromise:o,lazyRoutePromise:a,handlerOverride:s,scopedContext:i}){let l,c,d=$t(e.method),u=d?"action":"loader",h=o=>{let a,l=new Promise((e,t)=>a=t);c=()=>a(),e.signal.addEventListener("abort",c);let d=a=>"function"!=typeof o?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${u}" [routeId: ${n.route.id}]`)):o({request:e,url:ut(e,t),pattern:r,params:n.params,context:i},...void 0!==a?[a]:[]),h=(async()=>{try{return{type:"data",result:await(s?s(e=>d(e)):d())}}catch(e){return{type:"error",result:e}}})();return Promise.race([h,l])};try{let t=d?n.route.action:n.route.loader;if(o||a)if(t){let e,[r]=await Promise.all([h(t).catch(t=>{e=t}),o,a]);if(void 0!==e)throw e;l=r}else{await o;let t=d?n.route.action:n.route.loader;if(!t){if("action"===u){let t=new URL(e.url),r=t.pathname+t.search;throw bt(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[l]=await Promise.all([h(t),a])}else{if(!t){let t=new URL(e.url);throw bt(404,{pathname:t.pathname+t.search})}l=await h(t)}}catch(e){return{type:"error",result:e}}finally{c&&e.signal.removeEventListener("abort",c)}return l}({request:r,path:n,pattern:o,match:a,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:e,scopedContext:i})}}}function ot(e,t,r,n,o,a,s,i,l=null){return o.map(c=>c.route.id!==a.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:l,shouldCallHandler:()=>!1,_lazyPromises:rt(e,t,r,c,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:nt(e,t,r,n,ue(o),c,s,i,!0,l))}async function at(e){let{result:t,type:r}=e;if(Lt(t)){let e;try{e=await async function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(t)}catch(e){return{type:"error",error:e}}return"error"===r?{type:"error",error:new ce(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===r?St(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:(n=t,new ce(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)),statusCode:de(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:de(t)?t.status:void 0}:St(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t};var n}function st(e,t,r,n,o){let a=e.headers.get("Location");if(b(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!J(a)){let s=n.slice(0,n.findIndex(e=>e.route.id===r)+1);a=Ie(new URL(t.url),s,o,a),e.headers.set("Location",a)}return e}var it=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function lt(e){try{return it.includes(new URL(e).protocol)}catch{return!1}}function ct(e,t,r,n){if(J(e)){let n=e,o=m.test(n)?new URL(p(n,t.protocol)):new URL(n);if(lt(o.toString()))throw new Error("Invalid redirect location");let a=null!=Z(o.pathname,r);if(o.origin===t.origin&&a)return re(o.pathname)+o.search+o.hash}try{if(lt(n.createURL(e).toString()))throw new Error("Invalid redirect location")}catch(e){}return e}function dt(e,t,r,n){let o=e.createURL(xt(t)).toString(),a={signal:r};if(n&&$t(n.formMethod)){let{formMethod:e,formEncType:t}=n;a.method=e.toUpperCase(),"application/json"===t?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(n.json)):"text/plain"===t?a.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?a.body=ht(n.formData):a.body=n.formData}return new Request(o,a)}function ut(e,t){let r=new URL(e.url),n="string"==typeof t?E(t):t;if(r.pathname=n.pathname||"/",n.search){let e=new URLSearchParams(n.search),t=e.getAll("index");e.delete("index");for(let r of t.filter(Boolean))e.append("index",r);r.search=e.size?`?${e.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function ht(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function mt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function pt(e,t,r,n,o,a,s){let{loaderData:i,errors:l}=function(e,t,r,n=!1,o=!1){let a,s={},i=null,l=!1,c={},d=r&&Et(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let u=r.route.id,h=t[u];
1if(b(!Ct(h),"Cannot handle redirect results in processLoaderData"),Et(h)){let t=h.error;if(void 0!==d&&(t=d,d=void 0),i=i||{},o)i[u]=t;else{let r=gt(e,u);null==i[r.route.id]&&(i[r.route.id]=t)}n||(s[u]=ze),l||(l=!0,a=de(h.error)?h.error.status:500),h.headers&&(c[u]=h.headers)}else s[u]=h.data,h.statusCode&&200!==h.statusCode&&!l&&(a=h.statusCode),h.headers&&(c[u]=h.headers)}),void 0!==d&&r&&(i={[r[0]]:d},r[2]&&(s[r[2]]=void 0)),{loaderData:s,errors:i,statusCode:a||200,loaderHeaders:c}}(t,r,n);return o.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:o}=t;if(o&&o.signal.aborted)return;let i=a[r];if(b(i,"Did not find corresponding fetcher result"),Et(i)){let t=gt(e.matches,n?.route.id);l&&l[t.route.id]||(l={...l,[t.route.id]:i.error}),s.delete(r)}else if(Ct(i))b(!1,"Unhandled fetcher revalidation redirect");else{let e=Tt(i.data);s.set(r,e)}}),{loaderData:i,errors:l}}function wt(e,t,r,n){let o=Object.entries(t).filter(([,e])=>e!==ze).reduce((e,[t,r])=>(e[t]=r,e),{});for(let a of r){let r=a.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&a.route.loader&&(o[r]=e[r]),n&&n.hasOwnProperty(r))break}return o}function ft(e){return e?Et(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function gt(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function vt(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function bt(e,{pathname:t,routeId:r,method:n,type:o,message:a}={}){let s="Unknown Server Error",i="Unknown @remix-run/router error";return 400===e?(s="Bad Request",n&&t&&r?i=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===o&&(i="Unable to encode submission body")):403===e?(s="Forbidden",i=`Route "${r}" does not match URL "${t}"`):404===e?(s="Not Found",i=`No route matches URL "${t}"`):405===e&&(s="Method Not Allowed",n&&t&&r?i=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(i=`Invalid request method "${n.toUpperCase()}"`)),new ce(e||500,s,new Error(i),!0)}function yt(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[r,n]=t[e];if(Ct(n))return{key:r,result:n}}}function xt(e){return j({..."string"==typeof e?E(e):e,hash:""})}function kt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}(t))}function jt(e){return Lt(e.result)&&Pe.has(e.result.status)}function Et(e){return"error"===e.type}function Ct(e){return"redirect"===(e&&e.type)}function St(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Lt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function $t(e){return $e.has(e.toUpperCase())}function Rt(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function _t(e,t){let r="string"==typeof t?E(t).search:t.search;if(e[e.length-1].route.index&&Rt(r||""))return e[e.length-1];let n=Q(e);return n[n.length-1]}function Pt(e){let{formMethod:t,formAction:r,formEncType:n,text:o,formData:a,json:s}=e;if(t&&r&&n)return null!=o?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:o}:null!=a?{formMethod:t,formAction:r,formEncType:n,formData:a,json:void 0,text:void 0}:void 0!==s?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:s,text:void 0}:void 0}function Nt(e,t,r,n){return n?{state:"loading",location:e,matches:t,historyAction:r,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:e,matches:t,historyAction:r,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Mt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function At(){let e,t,r=new Promise((n,o)=>{e=async e=>{n(e);try{await r}catch(e){}},t=async e=>{o(e);try{await r}catch(e){}}});return{promise:r,resolve:e,reject:t}}var Dt=a.createContext(null);Dt.displayName="DataRouter";var Bt=a.createContext(null);Bt.displayName="DataRouterState";var zt=a.createContext(!1);function Ot(){return a.useContext(zt)}var Ft=a.createContext({isTransitioning:!1});Ft.displayName="ViewTransition";var It=a.createContext(new Map);It.displayName="Fetchers",a.createContext(null).displayName="Await";var Ht=a.createContext(null);Ht.displayName="Navigation";var Ut=a.createContext(null);Ut.displayName="Location";var Vt=a.createContext({outlet:null,matches:[],isDataRoute:!1});Vt.displayName="Route";var Wt=a.createContext(null);Wt.displayName="RouteError";var qt="REACT_ROUTER_ERROR";function Yt(){return null!=a.useContext(Ut)}function Kt(){return b(Yt(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(Ut).location}var Zt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jt(e){a.useContext(Ht).static||a.useLayoutEffect(e)}function Xt(){let{isDataRoute:e}=a.useContext(Vt);return e?function(){let{router:e}=function(e){let t=a.useContext(Dt);return b(t,sr(e)),t}("useNavigate"),t=ir("useNavigate"),r=a.useRef(!1);return Jt(()=>{r.current=!0}),a.useCallback(async(n,o={})=>{y(r.current,Zt),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}():function(){b(Yt(),"useNavigate() may be used only in the context of a <Router> component.");
1let e=a.useContext(Dt),{basename:t,navigator:r}=a.useContext(Ht),{matches:n}=a.useContext(Vt),{pathname:o}=Kt(),s=JSON.stringify(ee(n)),i=a.useRef(!1);return Jt(()=>{i.current=!0}),a.useCallback((n,a={})=>{if(y(i.current,Zt),!i.current)return;if("number"==typeof n)return void r.go(n);let l=te(n,JSON.parse(s),o,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:ne([t,l.pathname])),(a.replace?r.replace:r.push)(l,a.state,a)},[t,r,s,o,e])}()}function Gt(e,{relative:t}={}){let{matches:r}=a.useContext(Vt),{pathname:n}=Kt(),o=JSON.stringify(ee(r));return a.useMemo(()=>te(e,JSON.parse(o),n,"path"===t),[e,o,n,t])}function Qt(e,t,r){b(Yt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n}=a.useContext(Ht),{matches:o}=a.useContext(Vt),s=o[o.length-1],i=s?s.params:{},l=s?s.pathname:"/",c=s?s.pathnameBase:"/",d=s&&s.route;{let e=d&&d.path||"";cr(l,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let u,h=Kt();if(t){let e="string"==typeof t?E(t):t;b("/"===c||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),u=e}else u=h;let m=u.pathname||"/",p=m;if("/"!==c){let e=c.replace(/^\//,"").split("/");p="/"+m.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=r&&r.state.matches.length?r.state.matches.map(e=>Object.assign(e,{route:r.manifest[e.route.id]||e.route})):N(e,{pathname:p});y(d||null!=w,`No routes matched location "${u.pathname}${u.search}${u.hash}" `),y(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${u.pathname}${u.search}${u.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let f=function(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let o=e,s=n?.errors;if(null!=s){let e=o.findIndex(e=>e.route.id&&void 0!==s?.[e.route.id]);b(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:a}=n,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||void 0===a[t.route.id]);if(t.route.lazy||s){r.isStatic&&(i=!0),o=l>=0?o.slice(0,l+1):[o[0]];break}}}}let c=r?.onError,d=n&&c?(e,t)=>{c(e,{location:n.location,params:n.matches?.[0]?.params??{},pattern:ue(n.matches),errorInfo:t})}:void 0;return o.reduceRight((e,r,c)=>{let u,h=!1,m=null,p=null;n&&(u=s&&r.route.id?s[r.route.id]:void 0,m=r.route.errorElement||tr,i&&(l<0&&0===c?(cr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):l===c&&(h=!0,p=r.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,c+1)),f=()=>{let t;return t=u?m:h?p:r.route.Component?a.createElement(r.route.Component,null):r.route.element?r.route.element:e,a.createElement(ar,{match:r,routeContext:{outlet:e,matches:w,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===c)?a.createElement(rr,{location:n.location,revalidation:n.revalidation,component:m,error:u,children:f(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:d}):f()},null)}(w&&w.map(e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:ne([c,n.encodeLocation?n.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:ne([c,n.encodeLocation?n.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return t&&f?a.createElement(Ut.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...u},navigationType:"POP"}},f):f}function er(){let e=function(){let e=a.useContext(Wt),t=function(e){let t=a.useContext(Bt);return b(t,sr(e)),t}("useRouteError"),r=ir("useRouteError");return void 0!==e?e:t.errors?.[r]}(),t=de(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},s={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=a.createElement(a.Fragment,null,a.createElement("p",null,"💿 Hey developer 👋"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:s},"ErrorBoundary")," or"," ",a.createElement("code",{style:s},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application 
1Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:o},r):null,i)}a.createContext(null);var tr=a.createElement(er,null),rr=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${qt}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new ce(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?a.createElement(Vt.Provider,{value:this.props.routeContext},a.createElement(Wt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?a.createElement(or,{error:e},t):t}};rr.contextType=zt;var nr=new WeakMap;function or({children:e,error:t}){let{basename:r}=a.useContext(Ht);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${qt}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let n=nr.get(t);if(n)throw n;let o=me(e.location,r),s=o.absoluteURL||o.to;if(lt(s))throw new Error("Invalid redirect location");if(he&&!nr.get(t)){if(!o.isExternal&&!e.reloadDocument){const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:e.replace}));throw nr.set(t,r),r}window.location.href=s}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return e}function ar({routeContext:e,match:t,children:r}){let n=a.useContext(Dt);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(Vt.Provider,{value:e},r)}function sr(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function ir(e){let t=function(e){let t=a.useContext(Vt);return b(t,sr(e)),t}(e),r=t.matches[t.matches.length-1];return b(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var lr={};function cr(e,t,r){t||lr[e]||(lr[e]=!0,y(!1,r))}var dr={};function ur(e,t){e||dr[t]||(dr[t]=!0,console.warn(t))}var hr=s.useOptimistic,mr=()=>{};function pr(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&y(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:a.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&y(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&y(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var wr=["HydrateFallback","hydrateFallbackElement"],fr=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function gr({router:e,flushSync:t,onError:r,useTransitions:n}){let o=Ot();n=o||n;let[s,i]=a.useState(e.state),[l,c]=(d=s,hr?hr(d):[d,mr]);var d;
1let[u,h]=a.useState(),[m,p]=a.useState({isTransitioning:!1}),[w,f]=a.useState(),[g,v]=a.useState(),[b,y]=a.useState(),x=a.useRef(new Map),k=a.useCallback((o,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:u})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:o.location,params:o.matches[0]?.params??{},pattern:ue(o.matches)})),o.fetchers.forEach((e,t)=>{void 0!==e.data&&x.current.set(t,e.data)}),s.forEach(e=>x.current.delete(e)),ur(!1===d||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let m=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(ur(null==u||m,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),u&&m){if(t&&d){t(()=>{g&&(w?.resolve(),g.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:u.currentLocation,nextLocation:u.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>i(o))});return r.finished.finally(()=>{t(()=>{f(void 0),v(void 0),h(void 0),p({isTransitioning:!1})})}),void t(()=>v(r))}g?(w?.resolve(),g.skipTransition(),y({state:o,currentLocation:u.currentLocation,nextLocation:u.nextLocation})):(h(o),p({isTransitioning:!0,flushSync:!1,currentLocation:u.currentLocation,nextLocation:u.nextLocation}))}else t&&d?t(()=>i(o)):!1===n?i(o):a.startTransition(()=>{!0===n&&c(e=>vr(e,o)),i(o)})},[e.window,t,g,w,n,c,r]);a.useLayoutEffect(()=>e.subscribe(k),[e,k]),a.useEffect(()=>{m.isTransitioning&&!m.flushSync&&f(new fr)},[m]),a.useEffect(()=>{if(w&&u&&e.window){let t=u,r=w.promise,o=e.window.document.startViewTransition(async()=>{!1===n?i(t):a.startTransition(()=>{!0===n&&c(e=>vr(e,t)),i(t)}),await r});o.finished.finally(()=>{f(void 0),v(void 0),h(void 0),p({isTransitioning:!1})}),v(o)}},[u,w,e.window,n,c]),a.useEffect(()=>{w&&u&&l.location.key===u.location.key&&w.resolve()},[w,g,l.location,u]),a.useEffect(()=>{!m.isTransitioning&&b&&(h(b.state),p({isTransitioning:!0,flushSync:!1,currentLocation:b.currentLocation,nextLocation:b.nextLocation}),y(void 0))},[m.isTransitioning,b]);let j=a.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),E=e.basename||"/",C=a.useMemo(()=>({router:e,navigator:j,static:!1,basename:E,onError:r}),[e,j,E,r]);return a.createElement(a.Fragment,null,a.createElement(Dt.Provider,{value:C},a.createElement(Bt.Provider,{value:l},a.createElement(It.Provider,{value:x.current},a.createElement(Ft.Provider,{value:m},a.createElement(xr,{basename:E,location:l.location,navigationType:l.historyAction,navigator:j,useTransitions:n},a.createElement(br,{routes:e.routes,manifest:e.manifest,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function vr(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var br=a.memo(function({routes:e,manifest:t,future:r,state:n,isStatic:o,onError:a}){return Qt(e,void 0,{manifest:t,state:n,isStatic:o,onError:a,future:r})});function yr(e){b(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function xr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:s=!1,useTransitions:i}){b(!Yt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),c=a.useMemo(()=>({basename:l,navigator:o,static:s,useTransitions:i,future:{}}),[l,o,s,i]);"string"==typeof r&&(r=E(r));let{pathname:d="/",search:u="",hash:h="",state:m=null,key:p="default",mask:w}=r,f=a.useMemo(()=>{let e=Z(d,l);return null==e?null:{location:{pathname:e,search:u,hash:h,state:m,ke
1y:p,mask:w},navigationType:n}},[l,d,u,h,m,p,n,w]);return y(null!=f,`<Router basename="${l}"> is not able to match the URL "${d}${u}${h}" because it does not start with the basename, so the <Router> won't render anything.`),null==f?null:a.createElement(Ht.Provider,{value:c},a.createElement(Ut.Provider,{children:t,value:f}))}a.Component;var kr=function e(t,r=[]){let n=[];return a.Children.forEach(t,(t,o)=>{if(!a.isValidElement(t))return;let s=[...r,o];if(t.type===a.Fragment)return void n.push.apply(n,e(t.props.children,s));b(t.type===yr,`[${"string"==typeof t.type?t.type:t.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),b(!t.props.index||!t.props.children,"An index route cannot have child routes.");let i={id:t.props.id||s.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,middleware:t.props.middleware,loader:t.props.loader,action:t.props.action,hydrateFallbackElement:t.props.hydrateFallbackElement,HydrateFallback:t.props.HydrateFallback,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:!0===t.props.hasErrorBoundary||null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(i.children=e(t.props.children,s)),n.push(i)}),n},jr="get",Er="application/x-www-form-urlencoded";function Cr(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Sr=null,Lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $r(e){return null==e||Lr.has(e)?e:(y(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Er}"`),null)}function Rr(e,t){if(!1===e||null==e)throw new Error(t)}function _r(e,t,r,n){let o="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${n}`:o.pathname=`${o.pathname}.${n}`:"/"===o.pathname?o.pathname=`_root.${n}`:t&&"/"===Z(o.pathname,t)?o.pathname=`${oe(t)}/_root.${n}`:o.pathname=`${oe(o.pathname)}.${n}`,o}function Pr(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Nr(e,t,r,n,o,a){let s=(e,t)=>!r[t]||e.route.id!==r[t].route.id,i=(e,t)=>r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===a?t.filter((e,t)=>s(e,t)||i(e,t)):"data"===a?t.filter((t,a)=>{let l=n.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(s(t,a)||i(t,a))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function Mr(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1),[...new Set(n)];var n}function Tr(){let e=a.useContext(Dt);return Rr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ar(){let e=a.useContext(Bt);return Rr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),Symbol("SingleFetchRedirect");var Dr=a.createContext(void 0);function Br(){let e=a.useContext(Dr);return Rr(e,"You must render this element inside a <HydratedRouter> element"),e}function zr(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Or({page:e,...t}){let r=Ot(),{nonce:n}=Br(),{router:o}=Tr(),s=a.useMemo(()=>N(o.routes,e,o.basename),[o.routes,e,o.basename]);return s?(null==t.nonce&&n&&(t={...t,nonce:n}),r?a.createElement(Ir,{page:e,matches:s,...t}):a.createElement(Hr,{page:e,matches:s,...t})):null}function Fr(e){let{manifest:t,routeModules:r}
1=Br(),[n,o]=a.useState([]);return a.useEffect(()=>{let n=!1;return async function(e,t,r){return function(e,t){let r=new Set,n=new Set(t);return e.reduce((e,o)=>{if(t&&(null==(a=o)||"string"!=typeof a.page)&&"script"===o.as&&o.href&&n.has(o.href))return e;var a;let s=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(o));return r.has(s)||(r.add(s),e.push({key:s,link:o})),e},[])}((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let r=await(import(e.module));return t[e.id]=r,r}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(Pr).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||o(e)}),()=>{n=!0}},[e,t,r]),n}function Ir({page:e,matches:t,...r}){let n=Kt(),{future:o}=Br(),{basename:s}=Tr(),i=a.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=_r(e,s,o.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,i=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?a=!0:i.push(e.route.id);return a&&i.length>0&&r.searchParams.set("_routes",i.join(",")),[r.pathname+r.search]},[s,o.v8_trailingSlashAwareDataRequests,e,n,t]);return a.createElement(a.Fragment,null,i.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})))}function Hr({page:e,matches:t,...r}){let n=Kt(),{future:o,manifest:s,routeModules:i}=Br(),{basename:l}=Tr(),{loaderData:c,matches:d}=Ar(),u=a.useMemo(()=>Nr(e,t,d,s,n,"data"),[e,t,d,s,n]),h=a.useMemo(()=>Nr(e,t,d,s,n,"assets"),[e,t,d,s,n]),m=a.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,a=!1;if(t.forEach(e=>{let t=s.routes[e.route.id];t&&t.hasLoader&&(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:r.add(e.route.id))}),0===r.size)return[];let d=_r(e,l,o.v8_trailingSlashAwareDataRequests,"data");return a&&r.size>0&&d.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[d.pathname+d.search]},[l,o.v8_trailingSlashAwareDataRequests,c,n,s,u,t,e,i]),p=a.useMemo(()=>Mr(h,s),[h,s]),w=Fr(h);return a.createElement(a.Fragment,null,m.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),p.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),w.map(({key:e,link:t})=>a.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}Dr.displayName="FrameworkContext";function Ur(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}a.Component;var Vr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Vr&&(window.__reactRouterVersion="7.18.2")}catch(e){}function Wr(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:qr(e.errors)}),e}function qr(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new ce(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if("string"==typeof n.__subType&&le.includes(n.__subType)){let t=window[n.__subType];if("function"==typeof t)try{let o=new t(n.message);o.stack="",r[e]=o}catch(e){}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}var Yr=a.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:o,replace:s,mask:i,state:l,target:c,to:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:p,...w},f){let{basename:g,navigator:v,useTransitions:y}=a.useContext(Ht),x="string"==typeof d&&h.test(d),k=me(d,g),E=function(e,{relative:t}={}){b(Yt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=a.useContext(Ht),{hash:o,pathname:s,search:i}=Gt(e,{relative:t}),l=s;return"/"!==r&&(l="/"===s?r:ne([r,s])),n.createHref({pathname:l,search:i,hash:o})}(d=k.to,{relative:n}),C=Kt(),S=null;if(i){let e=te(i,[],C.mask?C.mask.pathname:"/",!0);"/"!==g&&(e.pathname="/"===e.pathname?g:ne([g,e.pathname])),S=v.createHref(e)}
1let[L,$,R]=function(e,t){let r=a.useContext(Dr),[n,o]=a.useState(!1),[s,i]=a.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:d,onMouseLeave:u,onTouchStart:h}=t,m=a.useRef(null);a.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return m.current&&e.observe(m.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]);let p=()=>{o(!0)},w=()=>{o(!1),i(!1)};return r?"intent"!==e?[s,m,{}]:[s,m,{onFocus:zr(l,p),onBlur:zr(c,w),onMouseEnter:zr(d,p),onMouseLeave:zr(u,w),onTouchStart:zr(h,p)}]:[!1,m,{}]}(r,w),_=function(e,{target:t,replace:r,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c,useTransitions:d}={}){let u=Xt(),h=Kt(),m=Gt(e,{relative:i});return a.useCallback(p=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(p,t)){p.preventDefault();let t=void 0!==r?r:j(h)===j(m),w=()=>u(e,{replace:t,mask:n,state:o,preventScrollReset:s,relative:i,viewTransition:l,defaultShouldRevalidate:c});d?a.startTransition(()=>w()):w()}},[h,u,m,r,n,o,t,e,s,i,l,c,d])}(d,{replace:s,mask:i,state:l,target:c,preventScrollReset:u,relative:n,viewTransition:m,defaultShouldRevalidate:p,useTransitions:y}),P=!(k.isExternal||o),N=a.createElement("a",{...w,...R,href:(P?S:void 0)||k.absoluteURL||E,onClick:P?function(t){e&&e(t),t.defaultPrevented||_(t)}:e,ref:Ur(f,$),target:c,"data-discover":x||"render"!==t?void 0:"true"});return L&&!x?a.createElement(a.Fragment,null,N,a.createElement(Or,{page:E})):N});function Kr(e){let t=a.useContext(Dt);return b(t,function(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Yr.displayName="Link",a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:o,to:s,viewTransition:i,children:l,...c},d){let u=Gt(s,{relative:c.relative}),h=Kt(),m=a.useContext(Bt),{navigator:p,basename:w}=a.useContext(Ht),f=null!=m&&function(e,{relative:t}={}){let r=a.useContext(Ft);b(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Kr("useViewTransitionState"),o=Gt(e,{relative:t});if(!r.isTransitioning)return!1;let s=Z(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Z(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=q(o.pathname,i)||null!=q(o.pathname,s)}(u)&&!0===i,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,v=h.pathname,y=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,g=g.toLowerCase()),y&&w&&(y=Z(y,w)||y);const x="/"!==g&&g.endsWith("/")?g.length-1:g.length;let k,j=v===g||!n&&v.startsWith(g)&&"/"===v.charAt(x),E=null!=y&&(y===g||!n&&y.startsWith(g)&&"/"===y.charAt(g.length)),C={isActive:j,isPending:E,isTransitioning:f},S=j?e:void 0;k="function"==typeof r?r(C):[r,j?"active":null,E?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let L="function"==typeof o?o(C):o;return a.createElement(Yr,{...c,"aria-current":S,className:k,ref:d,style:L,to:s,viewTransition:i},"function"==typeof l?l(C):l)}).displayName="NavLink",a.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:s,method:i=jr,action:l,onSubmit:c,relative:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:p,...w},f)=>{let{useTransitions:g}=a.useContext(Ht),v=function(){let{router:e}=Kr("useSubmit"),{basename:t}=a.useContext(Ht),r=ir("useRouteId"),n=e.fetch,o=e.navigate;return a.useCallback(async(e,a={})=>{let{action:s,method:i,encType:l,formData:c,body:d}=function(e,t){let r,n,o,a,s;if(Cr(i=e)&&"form"===i.tagName.toLowerCase()){let s=e.getAttribute("action");n=s?Z(s,t):null,r=e.getAttribute("method")||jr,o=$r(e.getAttribute("enctype"))||Er,a=new FormData(e)}else if(function(e){return Cr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Cr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||s.getAttribute("action");if(n=i?Z(i,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||jr,o=$r(e.getAttribute("formenctype"))||$r(s.getAttribute("enctype"))||Er,a=new FormData(s,e),!function(){if(null===Sr)try{new FormData(document.createElement("form"),0),Sr=!1}catch(e){Sr=!0}return Sr}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?`${t}.`:"";a.append(`${e}x`,"0"),a.append(`${e}y`,"0")}
1else t&&a.append(t,n)}}else{if(Cr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=jr,n=null,o=Er,s=e}var i;return a&&"text/plain"===o&&(s=a,a=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:a,body:s}}(e,t);if(!1===a.navigate){let e=a.fetcherKey||Jr();await n(e,r,a.action||s,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||i,formEncType:a.encType||l,flushSync:a.flushSync})}else await o(a.action||s,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:c,body:d,formMethod:a.method||i,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[n,o,t,r])}(),y=function(e,{relative:t}={}){let{basename:r}=a.useContext(Ht),n=a.useContext(Vt);b(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),s={...Gt(e||".",{relative:t})},i=Kt();if(null==e){s.search=i.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return e&&"."!==e||!o.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),"/"!==r&&(s.pathname="/"===s.pathname?r:ne([r,s.pathname])),j(s)}(l,{relative:d}),x="get"===i.toLowerCase()?"get":"post",k="string"==typeof l&&h.test(l);return a.createElement("form",{ref:f,method:x,action:y,onSubmit:n?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i,h=()=>v(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:o,state:s,relative:d,preventScrollReset:u,viewTransition:m,defaultShouldRevalidate:p});g&&!1!==r?a.startTransition(()=>h()):h()},...w,"data-discover":k||"render"!==e?void 0:"true"})}).displayName="Form";var Zr=0,Jr=()=>`__${String(++Zr)}__`;const Xr=window.ReactJSXRuntime,Gr=()=>(0,Xr.jsx)(Yr,{to:"/",className:"inline-flex no-underline p-1.5 rounded-md items-center text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:shadow-none transition-all duration-200",children:(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),Qr=({docId:t})=>{const r=(0,o.useSelect)(e=>e("wedocs/docs").getDoc(parseInt(t)),[]);return(0,Xr.jsx)(Yr,{to:r.link,target:"_blank",className:"inline-flex no-underline items-center text-gray-400 hover:text-indigo-600 focus:shadow-none p-1 transition-colors",title:(0,e.__)("View Doc","wedocs-pro"),children:(0,Xr.jsxs)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Xr.jsx)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Xr.jsx)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})},en=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),tn=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})}),rn=({docId:r})=>{const n=`wedocs_feedback_${r}`,[o,a]=(0,t.useState)(null),s=weDocsPro_Front_Vars?.general_settings?.helpful;if((0,t.useEffect)(()=>{const e=localStorage.getItem(n);e&&a(e)},[r]),"off"===s)return null;const i=e=>{o||(a(e),localStorage.setItem(n,e),wp.apiFetch({path:`/wp/v2/docs/${r}/helpfullness`,method:"POST",data:{type:e}}).catch(()=>{}))};return(0,Xr.jsxs)("div",{className:"flex-shrink-0 relative bg-white rounded-b-[10px]",children:[(0,Xr.jsx)("div",{className:"absolute inset-x-0 top-0 h-4 -translate-y-full bg-gradient-to-t from-black/[0.07] to-transparent pointer-events-none"}),(0,Xr.jsx)("div",{className:"px-6 py-3",children:o?(0,Xr.jsxs)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium",children:[(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Xr.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,e.__)("You already gave your feedback — thank you!","wedocs-pro")]}):(0,Xr.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,Xr.jsx)("p",{className:"text-sm text-gray-500 m-0",children:(0,e.__)("Did this answer your question?","wedocs-pro")}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Xr.jsx)("button",{onClick:()=>i("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,e.__)("Yes","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😊"})}),(0,Xr.jsx)("button",{onClick:()=>i("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,e.__)("No","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😞"})})]})]})})]})},nn=({docId:e,isExpanded:t,setIsExpanded:r})=>{const n=(0,o.useSelect)(t=>t("wedocs/docs").getDoc(parseInt(e)),[]);return(0,Xr.jsxs)("div",{className:"absolute inset-0 z-10 bg-white rounded-[10px] flex flex-col",children:[(0,Xr.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-white/20 sticky top-0 z-10 flex-shrink-0",children:[(0,Xr.jsx)(Gr,{}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2",children:[r&&(0,Xr.jsx)("button",{onClick:()=>r(!t),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300 ease-in-out",title:t?"Compress":"Expand",children:t?(0,Xr.jsx)(tn,{}):(0,Xr.jsx)(en,{})}),(0,Xr.jsx)(Qr,{docId:e})]})]}),(0,Xr.jsxs)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll",children:[(0,Xr.jsx)("div",{className:"doc-heading text-gray-900 font-medium text-lg mb-3",dangerouslySetInnerHTML:{__html:n?.title?.rendered}}),(0,Xr.jsx)("article",{className:"prose break-words",dangerouslySetInnerHTML:{__html:n?.content?.rendered}})]}),(0,Xr.jsx)(rn,{docId:e})]})};var on=r(98),an=r.n(on);function sn({title:e,titleId:t,...r},n){return a.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-8-5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-1.5 0v-4.5A.75.75 0 0 1 10 5Zm0 10a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",clipRule:"evenodd"}))}const ln=a.forwardRef(sn),cn=({frontendPreview:r,previewColors:a,turnstileSiteKey:s})=>{const{sendBtnBg:i,sendBtnFont:l}=a,[c,d]=(0,t.useState)({}),[u,h]=(0,t.useState)(""),[m,p]=(0,t.useState)(!1),[w,f]=(0,t.useState)(""),[g,v]=(0,t.useState)(""),[b,y]=(0,t.useState)(!1),[x,k]=(0,t.useState)(!1),[j,E]=(0,t.useState)("..."),[C,S]=(0,t.useState)({name:!1,email:!1,body:!1}),L=weDocsPro_Front_Vars.userCapabilities.upload_files||!1;const{messaging_success_title:$,messaging_success_text:R}=(0,o.useSelect)(e=>e("wedocs/settings").getAssistantSettingsOption("message"),[]),_=e=>/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,5})+$/.test(e),P=(e,t,r)=>{const n=e.target.value;t(n),S({...C,[r]:"email"===r?!Boolean(_(n)):0===n?.length})},N=e=>{d({src:e?.url,name:e?.filename})};return(0,t.useEffect)(()=>{r&&"undefined"!==s&&Boolean(s)&&!Boolean(m)&&(y(!0),turnstile.render("#wedocs-tur
1nstile",{sitekey:s,callback:e=>{E(e),y(!1)},"error-callback":e=>{"invalid_sitekey"===e&&E("")}}))},[s,m]),(0,Xr.jsx)(Xr.Fragment,{children:Boolean(x)?(0,Xr.jsx)("div",{className:"success-message px-6 pb-5 h-96 flex items-center justify-center",children:(0,Xr.jsxs)("div",{className:"text-center",children:[(0,Xr.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"145",height:"66",fill:"none",className:"mx-auto mb-6",children:[(0,Xr.jsx)("path",{d:"M86.01 13.544L144.745.043l-27.923 42.665L86.01 13.544z",fill:"#ffc700"}),(0,Xr.jsx)("path",{d:"M97.343 24.404l4.963 15.769V28.098L144.745.043 97.343 24.404z",fill:"#f90"}),(0,Xr.jsx)("path",{d:"M107.928 34.302l-5.623 5.871V28.084l5.623 6.218z",fill:"#c96000"}),(0,Xr.jsx)("path",{d:"M96.506 47.499a.36.36 0 0 1-.242-.098c-.138-.132-.138-.351-.006-.489l1.186-1.243c.132-.138.351-.15.489-.017s.15.345.017.489l-1.197 1.255c-.069.069-.155.104-.248.104zM60.144 65.597c-.19 0-.34-.15-.345-.34s.15-.351.34-.351c1.105-.023 2.251-.115 3.408-.27.19-.023.363.109.386.294s-.109.363-.294.386a30.35 30.35 0 0 1-3.483.276zm-3.454-.144h-.034a25.17 25.17 0 0 1-3.448-.61.35.35 0 0 1-.253-.42.35.35 0 0 1 .42-.253 23.67 23.67 0 0 0 3.356.593c.19.023.328.19.305.38-.023.184-.173.311-.345.311zm10.298-.76c-.155 0-.299-.109-.334-.265a.34.34 0 0 1 .259-.415l3.304-.921a.344.344 0 1 1 .207.656l-3.356.932a.45.45 0 0 1-.081.012zm-16.975-.927c-.046 0-.092-.006-.132-.029a25.31 25.31 0 0 1-3.131-1.577c-.161-.098-.219-.311-.121-.472s.311-.219.472-.121a24.29 24.29 0 0 0 3.039 1.531.34.34 0 0 1 .184.449c-.052.138-.178.219-.311.219zm23.555-1.174c-.138 0-.265-.081-.322-.219-.069-.178.017-.38.196-.449l.604-.248 2.556-1.111c.173-.081.38-.006.46.173.081.173.006.38-.173.461l-2.579 1.122-.61.248c-.046.017-.092.023-.132.023zm-29.489-2.343a.33.33 0 0 1-.213-.075 28.81 28.81 0 0 1-2.412-2.124l-3.431-.15c-.19-.017-.334-.178-.317-.368s.178-.334.368-.317l3.177.144c.132-.132.351-.127.483.006a28.69 28.69 0 0 0 2.556 2.268.34.34 0 0 1 .058.484c-.069.086-.167.132-.271.132zm35.769-.535a.34.34 0 0 1-.305-.184c-.086-.167-.023-.38.15-.466l3.01-1.658c.167-.098.374-.04.472.127s.04.374-.127.472l-3.045 1.675c-.046.023-.098.035-.155.035zm-34.889-1.761c-.178 0-.334-.138-.345-.322-.011-.19.132-.357.322-.368l3.402-.386a.35.35 0 0 1 .397.288.35.35 0 0 1-.288.397l-3.465.391h-.023zm-10.344-.409c-.017 0-.029 0-.046-.006l-3.431-.564c-.19-.035-.311-.219-.276-.403.035-.19.219-.311.403-.276l3.396.558c.19.023.322.201.294.391-.023.173-.173.299-.34.299zm17.159-.691a.35.35 0 0 1-.334-.253c-.052-.184.058-.374.242-.426 1.157-.311 2.239-.691 3.212-1.122.173-.075.38 0 .455.173s0 .38-.173.455c-1.002.449-2.118.835-3.31 1.157a.3.3 0 0 1-.092.017zm-23.952-.599c-.029 0-.052-.006-.081-.011l-2.372-.61-.984-.276c-.184-.052-.288-.242-.236-.426s.242-.288.426-.236l.979.27 2.354.604c.184.046.299.23.253.415-.04.161-.184.27-.34.27zm57.994-.023c-.115 0-.224-.058-.288-.155a.35.35 0 0 1 .098-.478l2.826-1.957c.155-.115.368-.081.484.075s.081.368-.075.484L86 56.174c-.052.035-.121.058-.184.058zm-46.62-.858c-.104 0-.201-.046-.271-.132l-.886-1.174-1.122-1.687c-.098-.161-.052-.374.115-.478.161-.098.374-.052.478.115l1.099 1.646.863 1.145a.34.34 0 0 1-.058.483c-.069.058-.144.081-.219.081zM21.173 54.36a.39.39 0 0 1-.109-.017l-3.281-1.123a.35.35 0 0 1-.207-.443c.063-.178.265-.271.443-.207l3.264 1.117c.184.058.282.253.224.438a.36.36 0 0 1-.334.236zm36.84-.391c-.104 0-.207-.046-.276-.132-.115-.15-.086-.368.063-.483.944-.725 1.698-1.543 2.251-2.435.098-.161.311-.213.478-.109.161.098.213.311.109.478-.593.961-1.41 1.842-2.418 2.619a.37.37 0 0 1-.207.063zM91.4 52.15c-.098 0-.201-.046-.27-.127a.34.34 0 0 1 .052-.483l2.602-2.245c.144-.127.357-.121.489.023.127.144.121.357-.023.489l-2.631 2.268a.36.36 0 0 1-.219.075zm-76.736-.121c-.04 0-.086-.006-.127-.023l-3.218-1.284c-.178-.075-.259-.276-.19-.449.075-.178.276-.259.449-.19l3.206 1.278c.179.069.265.271.196.449-.046.138-.178.219-.317.219zm20.93-2.538c-.132 0-.259-.075-.317-.207-.489-1.111-.875-2.228-1.151-3.321-.046-.184.063-.374.253-.42.184-.046.374.063.42.253.265 1.053.639 2.13 1.111 3.206.075.173 0 .38-.178.455a.29.29 0 0 1-.138.035zM8.263 49.41a.4.4 0 0 1-.138-.029L4.953 48a.35.35 0 0 1-.178-.455.35.35 0 0 1 .455-.178l3.166 1.376a.35.35 0 0 1 .184.455c-.052.132-.178.213-.317.213zm53.245-1.197c-.017 0-.035 0-.058-.006-.19-.029-.317-.207-.288-.397.104-.627.15-1.312.15-2.032l-.017-.725-.04-.61c-.017-.19.127-.357.317-.374s.357.127.374.317l.04.639.017.754a13.21 13.21 0 0 1-.161 2.141c-.017.173-.167.294-.334.294zm-27.526-5.405a.35.35 0 0 1-.345-.334l-.006-.368a13.24 13.24 0 0 1 .075-1.439 11.5
17 11.57 0 0 1 .322-1.715.34.34 0 0 1 .42-.242c.184.052.294.236.248.42a11.03 11.03 0 0 0-.299 1.612l-.075 1.364.006.351c.006.19-.144.351-.334.357zm26.962-1.428c-.15 0-.282-.092-.328-.242a13.96 13.96 0 0 0-1.382-3.068c-.098-.161-.046-.374.115-.472s.374-.046.472.115c.599.99 1.088 2.072 1.451 3.223.058.184-.046.374-.224.432a.63.63 0 0 1-.104.012zM35.76 36.24a.33.33 0 0 1-.19-.058c-.161-.104-.207-.316-.104-.478a10.96 10.96 0 0 1 2.395-2.625c.15-.115.368-.092.483.058s.092.368-.058.483c-.875.685-1.629 1.514-2.245 2.458-.058.104-.173.161-.282.161zm21.597-.685a.34.34 0 0 1-.236-.092c-.426-.397-.886-.766-1.37-1.094a12.87 12.87 0 0 0-1.382-.817.35.35 0 0 1-.15-.466.35.35 0 0 1 .466-.15 12.77 12.77 0 0 1 1.456.864 12.22 12.22 0 0 1 1.45 1.163c.138.132.15.351.017.489-.069.069-.161.104-.253.104zm-6.044-3.218c-.034 0-.063-.006-.098-.012l-.863-.236c-.84-.213-1.669-.374-2.464-.489-.19-.029-.322-.201-.294-.391s.201-.322.391-.294a24.13 24.13 0 0 1 2.538.506l.886.242c.184.052.288.248.236.426a.35.35 0 0 1-.334.248zm-10.212-.282c-.144 0-.276-.092-.328-.23-.063-.178.035-.374.213-.437a11.21 11.21 0 0 1 1.157-.334 13.48 13.48 0 0 1 2.325-.317c.19-.012.351.138.363.328s-.138.351-.328.363c-.771.04-1.52.138-2.21.299l-1.082.311a.36.36 0 0 1-.109.017zM1.92 46.624a.4.4 0 0 1-.138-.029l-1.577-.702c-.173-.081-.253-.282-.173-.455s.282-.253.455-.173l1.577.702c.173.075.253.282.173.455-.058.127-.184.201-.317.201z",fill:"#6366f1"})]}),(0,Xr.jsx)("h2",{className:"text-3xl font-medium text-gray-900 mb-2.5",children:$||(0,e.__)("Thanks","wedocs-pro")}),(0,Xr.jsx)("p",{className:"text-gray-500 text-sm leading-6",children:R?(0,Xr.jsx)("span",{className:"block",children:R}):(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)("span",{className:"block",children:(0,e.__)("Your message has been sent!","wedocs-pro")}),(0,Xr.jsx)("span",{className:"block",children:(0,e.__)("We will reply to you as soon as possible!","wedocs-pro")})]})})]})}):(0,Xr.jsxs)("div",{className:"h-full flex flex-col",children:[(0,Xr.jsxs)("div",{className:"flex-1 overflow-y-auto px-6 xxs:px-4 pt-5 xs:pt-3 space-y-5 xs:space-y-2",children:[(0,Xr.jsxs)("div",{className:"relative",children:[(0,Xr.jsx)("input",{type:"text",placeholder:(0,e.__)("Full Name","wedocs-pro"),disabled:!r,className:`${r?"!py-2":"!py-1"} ${C?.name?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} !border w-full text-base !text-gray-500 leading-6 !px-3.5 !rounded-md !bg-white`,value:u,onChange:e=>P(e,h,"name")}),C?.name&&(0,Xr.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:(0,Xr.jsx)(ln,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),(0,Xr.jsxs)("div",{className:"relative",children:[(0,Xr.jsx)("input",{type:"email",placeholder:(0,e.__)("Email","wedocs-pro"),disabled:!r,className:`${r?"!py-2":"!py-1"} ${C?.email?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} !border w-full text-base !text-gray-500 leading-6 !px-3.5 !py-1 !rounded-md !bg-white`,value:w,onChange:e=>P(e,f,"email")}),C?.email&&(0,Xr.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:(0,Xr.jsx)(ln,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),(0,Xr.jsxs)("div",{className:"relative",children:[(0,Xr.jsx)("textarea",{rows:"7",disabled:!r,className:`${r?"!py-2":"!py-1"} ${C?.body?"!border-red-500 focus:ring-red-500 focus:border-red-500":"!border-gray-300 focus:ring-blue-500 focus:border-blue-500"} w-full text-base text-gray-500 leading-6 !px-3.5 !py-2 !rounded-md xs:!h-[88px] !bg-white`,placeholder:(0,e.__)("Message","wedocs-pro"),value:g,onChange:e=>P(e,v,"body")}),C?.body&&(0,Xr.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3",children:(0,Xr.jsx)(ln,{className:"h-5 w-5 text-red-500","aria-hidden":"true"})})]}),Boolean(L)&&(0,Xr.jsxs)("div",{className:"attachment-contents xs:mt-1",children:[(0,Xr.jsxs)("div",{className:(Object.keys(c).length>0?"flex items-center":"inline-block overflow-hidden")+" attachment-field flex items-center text-indigo-500 text-sm font-medium mb-1 cursor-pointer relative",children:[(0,Xr.jsxs)("div",{className:"flex items-center",onClick:()=>{!function({callback:t,title:r=(0,e.__)("Select or upload media.","wedocs-pro"),selectMultiple:n=!1,fileType:o="image",dimension:a={}}){const s=wp.media({title:r,library:{type:o},multiple:n});s.open(),s.on("select",()=>{const r=s.state().get("selection").first().toJSON();if(r?.type===o){if("image"===r?.type){const t=r.width,n=r.height;if(a?.width<t&&a.height<n)return void an().fire({title:(0,e.__)("Upload Failed","wedocs-pro"),text:(0,e.__)("The image dimensions are too big. The maximum size is 20x20 pixels.","wedocs-pro"),icon:"error",toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3})}t(r)}else an().fire({title:(0,e.__)("Upload Failed","wedocs-pro"),text:(0,e.__)("The attachment type is not matched.","wedocs-pro"),icon:"error",toast:!0,position:"bottom-end",showConfirmButton:!1,timer:3e3})})}({fileType:"application",selectMultiple:!1,callback:N})},children:[(0,e.__)("Attachment","wedocs-pro"),(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"18",fill:"none",className:"ml-3",children:(0,Xr.jsx)("path",{stroke:"#9ca3af",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",d:"M10.609 4.771l-5.488 5.488c-.651.651-.651 1.706 0 2.357s1.706.651 2.357 0l5.345-5.488c1.302-1.302 1.302-3.412 0-4.714s-3.412-1.302-4.714 0L2.764 7.902a5 5 0 0 0 7.071 7.071l5.214-5.202"})})]}),Object.keys(c).length>0&&(0,Xr.jsxs)("div",{id:"file-chosen",className:"flex items-center space-x-2.5 ml-auto",children:[(0,Xr.jsx)("span",{id:"file-chosen",className:"text-sm leading-5 font-medium text-gray-500",children:n(c?.name,15)}),(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,className:"w-4 h-4 stroke-gray-500 ml-2 relative z-50 cursor-pointer",onClick:()=>{d({})},children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})]}),(0,Xr.jsx)("label",{className:"text-sm text-gray-500",children:(0,e.__)("(Supported formats: Docs/PDF)","wedocs-pro")})]}),r&&s&&(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsx)("div",{id:"wedocs-tur
1nstile",className:"wedocs-turnstile","data-sitekey":s}),!j&&(0,Xr.jsx)("div",{id:"turnstile-error",className:"text-sm text-red-500",children:(0,e.__)("Cloudflare turnstile site key not valid.","wedocs-pro")})]})]}),(0,Xr.jsx)("div",{className:"flex-shrink-0 px-6 xxs:px-4 pb-2.5 xxs:pb-1 pt-3",children:(0,Xr.jsx)("button",{type:"submit",disabled:!r||m||b,className:(r?"disabled:opacity-30":"")+" bg-indigo-600 hover:bg-indigo-800 focus:bg-indigo-600 border-indigo-600 text-white rounded-md w-full text-base capitalize font-medium py-2.5 cursor-pointer no-underline xs:py-2",onClick:()=>{if(""===u)return void S({...C,name:!0});if(!Boolean(_(w)))return void S({...C,email:!0});if(""===g)return void S({...C,body:!0});const e={name:u,from:w,token:j,message:g,attachment:{...c}};p(!0),(0,o.dispatch)("wedocs/docs").sendMessage(e).then(e=>{Boolean(e?.success)&&(v(""),h(""),f(""),k(e?.success),d({}),setTimeout(()=>{k(!1),p(!1)},3e3))}).catch(e=>{console.log(e)})},style:{color:`rgba(${l?.r}, ${l?.g}, ${l?.b}, ${l?.a})`,background:`rgba(${i?.r}, ${i?.g}, ${i?.b}, ${i?.a})`},children:(0,e.__)(m?"Sending...":"Send","wedocs-pro")})})]})})},dn=window.wp.apiFetch;var un=r.n(dn);const hn=({text:e,typingSpeed:r=25,children:n})=>{const[o,a]=(0,t.useState)(""),[s,i]=(0,t.useState)(0),[l,c]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{if(e&&s<e.length){const t=setTimeout(()=>{a(t=>t+e[s]),i(e=>e+1)},r);return()=>clearTimeout(t)}c(!0)},[s,e,r]),(0,Xr.jsxs)("span",{children:[o,l&&n]})},mn=r.p+"images/guest-avatar.5b164b46.jpg",pn=({frontendPreview:r})=>{const n=(0,t.useRef)(null),[o,a]=(0,t.useState)([]),[s,i]=(0,t.useState)(""),[l,c]=(0,t.useState)(""),[d,u]=(0,t.useState)(""),[h,m]=(0,t.useState)(!1),p=(0,t.useRef)(null);let w=weDocsPro_Front_Vars?.currentUserId||null;(0,t.useEffect)(()=>{w&&un()({path:"/wp/v2/users/"+w}).then(e=>c(e?.avatar_urls?.[96]||e?.avatar_urls?.[24]||"")).catch(()=>{})},[w]),(0,t.useEffect)(()=>{un()({path:"/wp/v2/settings"}).then(e=>{e?.site_icon_url?u(e.site_icon_url):e?.site_icon&&un()({path:"/wp/v2/media/"+e.site_icon}).then(e=>{u(e?.media_details?.sizes?.thumbnail?.source_url||e?.source_url||"")}).catch(()=>{})}).catch(()=>{})},[]);const f=()=>d?(0,Xr.jsx)("img",{src:d,className:"flex-shrink-0 w-7 h-7 rounded-full object-cover shadow-sm",alt:(0,e.__)("Bot","wedocs-pro")}):(0,Xr.jsx)("div",{className:"ai-icon flex-shrink-0 w-7 h-7 rounded-full bg-[#FDA92A] flex items-center justify-center shadow-sm",children:(0,Xr.jsx)("svg",{width:"18",height:"17",fill:"none",children:(0,Xr.jsx)("path",{fill:"#fff",fillRule:"evenodd",d:"M3.295 3.38a1.33 1.33 0 0 1 .541 2.544v3.941l.215-.022c.974-4.101 4.804-6.463 9.381-6.463s8.406 2.361 9.381 6.461a4.78 4.78 0 0 1 .215.019V5.923a1.33 1.33 0 0 1 .542-2.543 1.33 1.33 0 0 1 .542 2.543v4.218c.707.324 1.184.913 1.233 1.827a67.2 67.2 0 0 1 .004.739l-.001.999c-.074 1.382-1.12 2.025-2.466 2.129-.845 4.297-4.755 6.784-9.45 6.784s-8.605-2.489-9.45-6.788c-1.345-.126-2.389-.879-2.461-2.258-.003-.052-.004-.814-.004-.866l.004-.606c.05-.914.526-1.552 1.234-1.914V5.923a1.33 1.33 0 0 1 .542-2.543zm17.635 8.384c.007.138.011 1.096.011 1.236l-.012 1.221c-.208 3.96-3.486 6.288-7.498 6.288s-7.289-2.328-7.498-6.288c-.007-.133-.01-1.086-.01-1.221l.011-1.236c.216-3.954 3.49-6.273 7.498-6.273s7.282 2.319 7.498 6.273zm-2.729-.127c0-.782-.632-1.415-1.415-1.415s-1.415.633-1.415 1.415.632 1.415 1.415 1.415 1.415-.632 1.415-1.415zm-6.716 0c0 .781-.633 1.415-1.415 1.415s-1.415-.633-1.415-1.415.633-1.415 1.415-1.415 1.415.633 1.415 1.415z"})})}),g=async e=>{if(!e||""===e.trim()||!r)return;m(!0),i(""),a(t=>[...t,{text:e,image:l,isMe:!0}]);const t=await v(e);let n="";t.post_links&&t.post_links.length>0&&(n+='<br/><ul style="margin: 0; list-style: none;">',t.post_links.forEach((e,t)=>{e?.title&&(n+='<li style="margin-bottom: 6px;"><sup style="margin-right: 8px;">['+(t+1)+']</sup><a href="'+e?.permalink+'" target="_blank" rel="noopener noreferrer">'+e?.title+"</a></li>")}),n+="</ul>"),m(!1),a(e=>[...e,{text:t.chat,readMore:n,isMe:!1}])},v=async t=>""===t?"":await un()({path:"/wp/v2/docs/settings/ai-integration/chat",data:{prompt:t},method:"POST"}).then(e=>e).catch(()=>({chat:(0,e.__)("Sorry, I am not able to understand you. Please try again.","wedocs-pro"),post_links:[]}));return(0,t.useEffect)(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[o,h]),(0,Xr.jsx)("div",{className:"h-full flex flex-col",children:(0,Xr.jsx)("div",{className:"flex flex-row flex-1 overflow-hidden bg-white",children:(0,Xr.jsxs)("div",{className:"w-full px-5 xxs:px-3 flex flex-col h-full",children:[(0,Xr.jsxs)("div",{className:"flex flex-col mt-5 flex-1 overflow-auto space-y-3 pr-1",ref:n,children:[o.map((r,n)=>{let o="dynamicId"+n;return(0,Xr.jsx)(t.Fragment,{children:(0,Xr.jsxs)("div",{className:"flex items-end gap-2 "+(r.isMe?"justify-end":"justify-start"),children:[!r.isMe&&(0,Xr.jsx)(f,{}),(0,Xr.jsx)("div",{id:o,ref:p,className:"max-w-[78%] text-sm leading-relaxed "+(r.isMe?"bg-indigo-500 text-white px-4 py-2.5 rounded-2xl rounded-br-sm shadow-sm":"bg-gray-100 text-gray-700 px-4 py-2.5 rounded-2xl rounded-bl-sm"),children:r.isMe?(0,Xr.jsx)("span",{dangerouslySetInnerHTML:{__html:r.text}}
1):(0,Xr.jsx)(hn,{text:r.text,children:(0,Xr.jsx)("div",{dangerouslySetInnerHTML:{__html:r.readMore}})})}),r.isMe&&(0,Xr.jsx)("div",{className:"flex-shrink-0",children:(0,Xr.jsx)("img",{src:r.image||mn,className:"w-7 h-7 rounded-full object-cover",alt:(0,e.__)("User Avatar","wedocs-pro"),onError:e=>{e.target.src=mn}})})]})},n)}),(0,Xr.jsx)("style",{children:"\n              @keyframes wedocsTyping {\n                0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }\n                30% { transform: translateY(-5px); opacity: 1; }\n              }\n            "}),h&&(0,Xr.jsxs)("div",{className:"flex items-end gap-2 justify-start",children:[(0,Xr.jsx)(f,{}),(0,Xr.jsxs)("div",{className:"bg-gray-100 px-4 py-3 rounded-2xl rounded-bl-sm flex items-center gap-1.5",children:[(0,Xr.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0s"}}),(0,Xr.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0.2s"}}),(0,Xr.jsx)("span",{className:"w-2 h-2 rounded-full bg-gray-400",style:{animation:"wedocsTyping 1.2s ease-in-out infinite",animationDelay:"0.4s"}})]})]})]}),(0,Xr.jsx)("div",{className:"py-3 xxs:pb-2 flex-shrink-0",children:(0,Xr.jsxs)("div",{className:`flex items-center gap-2 rounded-2xl border ${r?"border-gray-200 shadow-[0_2px_12px_rgba(0,0,0,0.08)]":"border-gray-200"} bg-white px-4 py-2 transition-shadow focus-within:shadow-[0_2px_16px_rgba(99,102,241,0.15)] focus-within:border-indigo-300`,children:[(0,Xr.jsx)("input",{className:"flex-1 border-none !outline-none !shadow-none !ring-0 bg-transparent text-sm text-gray-700 placeholder-gray-400 !p-0 !m-0 !border-0 focus:!ring-0 focus:!border-0 focus:!outline-none",value:s,autoFocus:r,onChange:e=>i(e.currentTarget.value),onKeyUp:e=>{var t;"Enter"===(t=e).key&&g(t.currentTarget.value)},type:"text",readOnly:!r,placeholder:(0,e.__)("Ask me anything...","wedocs-pro")}),(0,Xr.jsx)("button",{onClick:()=>g(s),disabled:!r||!s.trim()||h,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-xl bg-indigo-500 hover:bg-indigo-600 disabled:opacity-40 disabled:cursor-not-allowed transition-all duration-150 cursor-pointer",children:(0,Xr.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",children:[(0,Xr.jsx)("path",{d:"M22 2L11 13",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Xr.jsx)("path",{d:"M22 2L15 22L11 13L2 9L22 2Z",stroke:"white",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})})]})})})},wn=()=>(0,Xr.jsxs)("div",{className:"animate-pulse flex flex-col flex-1 overflow-hidden",children:[(0,Xr.jsxs)("div",{className:"flex-1 px-6 py-4 overflow-hidden",children:[(0,Xr.jsx)("div",{className:"h-5 w-3/4 bg-gray-200 rounded mb-5"}),(0,Xr.jsxs)("div",{className:"space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"})]}),(0,Xr.jsxs)("div",{className:"mt-6 space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-2/3 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"})]}),(0,Xr.jsxs)("div",{className:"mt-6 space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"})]})]}),(0,Xr.jsx)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3",children:(0,Xr.jsx)("div",{className:"h-4 w-52 bg-gray-200 rounded"})})]}),fn=({docId:r})=>{const[n,o]=(0,t.useState)(null),a=weDocsPro_Front_Vars?.general_settings?.helpful;if("off"===a)return null;const s=e=>{n||(o(e),wp.apiFetch({path:`/wp/v2/docs/${r}/helpfullness`,method:"POST",data:{type:e}}).catch(()=>{}))};return(0,Xr.jsx)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3 bg-white rounded-b-[10px]",children:n?(0,Xr.jsxs)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium",children:[(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Xr.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,e.__)("Thanks for your feedback","wedocs-pro")]}):(0,Xr.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,Xr.jsx)("p",{className:"text-sm text-gray-500 m-0",children:(0,e.__)("Did this answer your question?","wedocs-pro")}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Xr.jsx)("button",{onClick:()=>s("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,e.__)("Yes","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😊"})}),(0,Xr.jsx)("button",{onClick:()=>s("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,e.__)("No","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😞"})})]})]})})},gn=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),vn=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})}),bn=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),yn=({doc:t,setShowDocContent:r,isExpanded:n,setIsExpanded:o})=>(0,Xr.jsxs)("div",{className:"absolute inset-0 z-10 bg-white rounded-[10px] flex flex-col",children:[(0,Xr.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-white/20 sticky top-0 z-10 flex-shrink-0",children:[(0,Xr.jsx)("button",{onClick:()=>r(!1),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:shadow-none transition-all duration-200",title:(0,e.__)("Close","wedocs-pro"),children:(0,Xr.jsx)(bn,{})}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,Xr.jsx)("button",{onClick:()=>o(!n),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300 ease-in-out",title:n?"Compress":"Expand",children:n?(0,Xr.jsx)(vn,{}):(0,Xr.jsx)(gn,{})}),t?.link&&(0,Xr.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",className:"inline-flex no-underline items-center text-gray-400 hover:text-indigo-600 focus:shadow-none p-1 transition-colors",title:(0,e.__)("View Doc","wedocs-pro"),children:(0,Xr.jsxs)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Xr.jsx)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Xr.jsx)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),t?(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsxs)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll",children:[(0,Xr.jsx)("div",{className:"doc-heading text-gray-900 font-medium mb-3 "+(n?"text-xl":"text-lg"),dangerouslySetInnerHTML:{__html:t?.title?.rendered}}),(0,Xr.jsx)("article",{className:"prose break-words "+(n?"prose-lg":""),dangerouslySetInnerHTML:{__html:t?.content?.rendered}})]}),(0,Xr.jsx)(fn,{docId:t?.id})]}):(0,Xr.jsx)(wn,{})]}),xn=({docId:r,classes:s,settings:i,previewColors:l,showDocContent:c,frontendPreview:d,setShowDocContent:u})=>{const{id:h}=function(){let{matches:e}=a.useContext(Vt),t=e[e.length-1];return t?.params??{}}(),[m,p]=(0,t.useState)(null),[w,f]=(0,t.useState)(!1);(0,t.useEffect)(()=>
1{if(!d)return;const e=()=>{const e=window.innerWidth<=575,t=document.getElementById("wpadminbar")?.offsetHeight||0,r=e?144:160,n=e?16:32,o=window.innerHeight-t-r-n-8;p(Math.min(772,o))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[d]),(0,t.useEffect)(()=>{d&&f(Boolean(h)||Boolean(c))},[h,c,d]);const g=[(0,e.__)("How to Install","wedocs-pro"),(0,e.__)("Activating & Deactivating WPUF Modules","wedocs-pro")],v=(0,o.useSelect)(e=>e("wedocs/docs").getHelpfulDocs(),[]),[b,y]=(0,t.useState)([...v]),{widgetBg:x,activeTabBg:k,activeTabFont:j,inactiveTabBg:E,inactiveTabFont:C,tabTitleFont:S,tabDescriptionFont:L}=l,$=(0,t.useRef)({color:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`}),R=(0,t.useRef)({color:`rgba(${j?.r}, ${j?.g}, ${j?.b}, ${j?.a})`,background:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`}),_=(0,t.useRef)({fill:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`}),P=(0,t.useRef)({fill:`rgba(${j?.r}, ${j?.g}, ${j?.b}, ${j?.a})`}),[N,M]=(0,t.useState)(i?.placement?.order?.[0]||"explore");let T=[{key:"integrate_ai",name:(0,e.__)("A.I. chat","wedocs-pro"),enable:"off"!==i?.integrate_ai?.ai_enabled},{key:"explore",name:(0,e.__)("Explore","wedocs-pro"),enable:"off"!==i?.explore?.explore_enable},{key:"message",name:(0,e.__)("Messaging","wedocs-pro"),enable:"off"!==i?.message?.messaging_enable}];const[A,D]=(0,t.useState)([...T]);(0,t.useEffect)(()=>{"integrate_ai"===N&&"off"===i?.integrate_ai?.ai_enabled&&("on"===i?.explore?.explore_enable?M("explore"):"on"===i?.message?.messaging_enable&&M("message")),"message"===N&&"off"===i?.message?.messaging_enable&&("on"===i?.integrate_ai?.ai_enabled?M("integrate_ai"):"on"===i?.explore?.explore_enable&&M("explore")),"explore"===N&&"off"===i?.explore?.explore_enable&&("on"===i?.integrate_ai?.ai_enabled?M("integrate_ai"):"on"===i?.message?.messaging_enable&&M("message"))},[i]),(0,t.useEffect)(()=>{if(i?.placement?.order?.length>0){const e=A?.sort((e,t)=>i?.placement?.order?.indexOf(e?.key)-i?.placement?.order?.indexOf(t?.key));D([...e])}},[i?.placement?.order]),(0,t.useEffect)(()=>{const e={...R.current,background:`rgba(${k?.r}, ${k?.g}, ${k?.b}, ${k?.a})`};R.current=e},[k]),(0,t.useEffect)(()=>{const e={...R.current,color:`rgba(${j?.r}, ${j?.g}, ${j?.b}, ${j?.a})`},t={...P.current,fill:`rgba(${j?.r}, ${j?.g}, ${j?.b}, ${j?.a})`};R.current=e,P.current=t},[j]),(0,t.useEffect)(()=>{const e={...$.current,color:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`},t={..._.current,fill:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`};$.current=e,_.current=t},[C]);const[B,z]=(0,t.useState)(""),O=(e,t=!1)=>{z(t?"":e.target.value)},F=(0,o.useSelect)(e=>e("wedocs/docs").getDocs(),[]),I=Boolean(B)?F?.filter(e=>e?.title?.rendered?.toLowerCase().includes(B.toLowerCase())):b?.filter(e=>e?.title?.rendered?.toLowerCase().includes(B.toLowerCase()));return(0,t.useEffect)(()=>{if("selected"===i?.explore?.show_content)y([...i?.explore?.selected_articles]);else{if(v?.length>10)return void y([...v]);const e=F?.filter(e=>0!==parseInt(e.parent)),t=e?.filter(t=>e?.find(e=>e?.id===t?.parent));if(0===v?.length)return void y([...t?.filter((e,t)=>t<10)]);const r=[],n=v?.map(e=>e?.id),o=10-v.length;t?.filter((e,t)=>{r.length>=o||!n?.includes(e?.id)&&r?.push(e)}),y([...v,...r])}},[i?.explore?.show_content,v,F]),(0,Xr.jsx)("div",{className:`${s||""} ${d?w?"w-[580px]":"w-[400px]":"w-[26rem]"} xs:w-[300px] palette-preview-container transition-[width] duration-300 ease-in-out`,children:(0,Xr.jsxs)("div",{className:(d?"pb-5 h-[772px] flex flex-col":"pb-4")+" palette-preview relative bg-white rounded-[10px] shadow-xl mb-5 overflow-hidden",style:m?{height:`${m}px`}:{},children:[(0,Xr.jsx)("div",{className:"preview-header flex items-center justify-center flex-shrink-0 "+(d?"min-h-48":"h-48"),style:{background:`rgba(${x?.r}, ${x?.g}, ${x?.b}, ${x?.a})`},children:(0,Xr.jsxs)("div",{className:"text-center",children:[(0,Xr.jsx)("div",{className:"tabs flex items-center font-medium text-sm leading-5 w-fit h-10 xs:h-9 shadow-sm rounded-[10px] mb-5 mx-auto mt-[26px]",style:{color:`rgba(${C?.r}, ${C?.g}, ${C?.b}, ${C?.a})`,background:`rgba(${E?.r}, ${E?.g}, ${E?.b}, ${E?.a})`},children:A&&A?.map(t=>(0,Xr.jsxs)("div",{className:(Boolean(t?.enable)?"":"hidden")+" tab flex items-center justify-center mx-auto gap-2 py-2.5 px-5 xs:px-3 rounded-[10px] cursor-pointer outline-none h-[100%] leading-4",onClick:()=>(e=>{M(e)})(t?.key),style:N===t?.key?R.current:$.current,children:[i?.[t.key]?.[`${t.key}_tab_icon`]?.src?(0,Xr.jsx)("img",{src:i?.[t.key]?.[`${t.key}_tab_icon`]?.src,alt:i?.[t.key]?.[`${t.key}_tab_icon`]?.name,className:"max-h-5 max-w-5"}):(0,Xr.jsxs)(Xr.Fragment,{children:["integrate_ai"===t?.key&&(0,Xr.jsx)("svg",{width:"19",height:"16",fill:"none",children:(0,Xr.jsx)("path",{fillRule:"evenodd",style:N===t?.key?P.current:_.current,d:"M1.703.818a1.02 1.02 0 0 1 1.022 1.022 1.02 1.02 0 0 1-.606.934v3.032l.165-.017C3.033 2.635 5.979.818 9.5.818s6.466 1.816 7.216 4.97l.165.014V2.775a1.02 1.02 0 0 1-.606-.934c0-.564.458-1.022 1.022-1.022a1.02 1.02 0 0 1 1.022 1.022 1.02 1.02 0 0 1-.606.934v3.245c.544.249.911.702.949 1.405l.003.568-.001.768c-.057 1.063-.862 1.557-1.897 1.638-.65 3.305-3.658 5.219-7.269 5.219s-6.62-1.914-7.269-5.221C1.195 10.3.392 9.72.337 8.659l-.003-.666.003-.466a1.68 1.68 0 0 1 .949-1.472v-3.28a1.02 1.02 0 0 1-.605-.934c0-.564.458-1.022 1.022-1.022zm13.566 6.45l.009.951-.01.939c-.16 3.046-2.682 4.837-5.768 4.837s-5.607-1.79-5.768-4.837l-.008-.939.009-.951c.166-3.042 2.685-4.826 5.768-4.826s5.601 1.784 5.768 4.826zM13.17 7.17c0-.602-.486-1.088-1.088-1.088s-1.088.486-1.088 1.088.486 1.088 1.088 1.088 1.088-.486 1.088-1.088zm-5.167 0a1.09 1.09 0 0 1-1.088 1.088A1.09 1.09 0 0 1 5.827 7.17a1.09 1.09 0 0 1 1.088-1.088A1.09 1.09 0 0 1 8.003 7.17z"})}),"explore"===t?.key&&(0,Xr.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"18",style:N===t?.key?P.current:_.current,children:[(0,Xr.jsx)("path",{d:"M1.161 2.514a2 2 0 0 1 2-2h4.586a2 2 0 0 1 1.414.586l3.414 3.414a2 2 0 0 1 .586 1.414v8.586a2 2 0 0 1-2 2H9.633c.95-1.062 1.528-2.463 1.528-4a6 6 0 0 0-6-6c-1.537 0-2.938.578-4 1.528V2.514z"}),(0,Xr.jsx)("path",{fillRule:"evenodd",d:"M5.161 8.514a4 4 0 0 0-4 4c0 .741.202 1.436.554 2.032L.454 15.807a1 1 0 0 0 0 1.414 1 1 0 0 0 1.414 0l1.261-1.261c.595.352 1.29.5
154 2.032.554a4 4 0 1 0 0-8zm-2 4a2 2 0 1 1 4 0 2 2 0 0 1-2 2 1.99 1.99 0 0 1-1.414-.586 1.99 1.99 0 0 1-.586-1.414z"})]}),"message"===t?.key&&(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"17",height:"15",style:N===t?.key?P.current:_.current,children:(0,Xr.jsx)("path",{fillRule:"evenodd",d:"M16.161 7.514c0 3.866-3.582 7-8 7-1.492 0-2.888-.357-4.083-.979l-3.917.979 1.338-3.123C.654 10.281.161 8.948.161 7.514c0-3.866 3.582-7 8-7s8 3.134 8 7zm-11-1h-2v2h2v-2zm8 0h-2v2h2v-2zm-6 0h2v2h-2v-2z"})})]}),i?.[t.key]?.[`${t?.key}_title`]?n(i?.[t.key]?.[`${t?.key}_title`],10):(0,e.__)(t?.name,"wedocs-pro")]},t?.key))}),(0,Xr.jsx)("div",{className:`preview-heading xs:mb-0.5 mb-1.5 ${i?.preference?.widget_title_font?.size?`text-${i?.preference?.widget_title_font?.size}`:"text-lg"} ${i?.preference?.widget_title_font?.weight?`font-${i?.preference?.widget_title_font?.weight}`:"font-medium"}`,style:{color:`rgba(${S?.r}, ${S?.g}, ${S?.b}, ${S?.a})`},children:i?.[N]?.[`${N}_subtitle_one`]?n(i?.[N]?.[`${N}_subtitle_one`],20):"explore"===N?(0,e.__)("Explore Feature","wedocs-pro"):"message"===N?(0,e.__)("Message Us","wedocs-pro"):(0,e.__)("A.I. Chat","wedocs-pro")}),(0,Xr.jsx)("div",{className:`preview-description ${d?"w-[360px]":"w-80"} mx-auto mb-[30px] ${i?.preference?.widget_description_font?.size?`text-${i?.preference?.widget_description_font?.size}`:"text-base"} ${i?.preference?.widget_description_font?.weight?`font-${i?.preference?.widget_description_font?.weight}`:"font-normal"}`,style:{color:`rgba(${L?.r}, ${L?.g}, ${L?.b}, ${L?.a})`},children:i?.[N]?.[`${N}_subtitle_two`]?n(i?.[N]?.[`${N}_subtitle_two`],80):"explore"===N?(0,e.__)("Search with keywords for quick answers","wedocs-pro"):"message"===N?(0,e.__)("Feel free to get in touch for any inquiries","wedocs-pro"):(0,e.__)("Feel free to ask any questions or inquiries","wedocs-pro")})]})}),(0,Xr.jsxs)("div",{className:`${"explore"!==N&&"hidden"} explore-tab -mt-5`,children:[(0,Xr.jsxs)("div",{className:`${d&&Boolean(h)&&"hidden"} listing-docs`,children:[(0,Xr.jsx)("div",{className:"sticky top-0 z-10 bg-white px-5 pt-4 pb-3 border-b border-gray-100",children:(0,Xr.jsxs)("div",{className:(d?"!py-[9px] !px-3.5":"px-3 py-1")+" search-panel xs:!py-[7px] doc-search-panel relative flex items-center justify-center border border-solid border-[#D1D5DB] bg-white/90 rounded-md w-full mx-auto shadow-sm",children:[(0,Xr.jsx)("input",{id:"doc-search",type:"text",className:"!border-0 !border-transparent !bg-white text-sm text-gray-900 placeholder-gray-400 w-full focus:!shadow-none !px-0 !py-0 disabled:shadow-none",placeholder:(0,e.__)("Search","wedocs-pro"),value:B,disabled:!d,onChange:O}),B&&B.length>0&&(0,Xr.jsx)("div",{onClick:e=>O(e,!0),className:"cursor-pointer absolute inset-y-0 right-9 flex items-center pr-2",children:(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,className:"w-5 h-5 stroke-[#6b7280]",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),(0,Xr.jsx)("label",{htmlFor:"doc-search",children:(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",className:"cursor-pointer",children:(0,Xr.jsx)("path",{d:"M16.661 16.094l-5-5m1.667-4.167c0 3.222-2.612 5.833-5.833 5.833s-5.833-2.612-5.833-5.833 2.612-5.833 5.833-5.833 5.833 2.612 5.833 5.833z",stroke:"#6b7280",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}),(0,Xr.jsx)("div",{className:(d?"h-[510px] xs:h-[calc(100dvh-30rem)] overflow-y-auto":"h-[420px]")+" xs:px-4 pb-4 explore-docs",children:d?(0,Xr.jsxs)(Xr.Fragment,{children:[I?.length>0?I?.map((e,t)=>(0,Xr.jsxs)(Yr,{to:`/${e?.id}`,className:"doc-section block no-underline border border-solid border-[#D1D5DB] box-border p-4 mb-2.5 last:mb-0 rounded-md w-[360px] xs:w-full mx-auto transition-shadow duration-200 hover:shadow-xl hover:border-gray-300 cursor-pointer",children:[(0,Xr.jsx)("div",{className:"doc-heading text-lg text-gray-900 font-medium mb-1.5",dangerouslySetInnerHTML:{__html:n(e?.title?.rendered,32)}}),(0,Xr.jsx)("div",{className:"doc-description text-sm font-normal text-gray-500 leading-5 break-words",dangerouslySetInnerHTML:{__html:n(e?.content?.rendered,100)}})]},t)):(0,Xr.jsxs)("div",{className:"flex items-center cursor-pointer text-base px-8 w-[340px] xs:w-full xs:px-2",children:[(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-6 h-6 mr-2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z"})}),(B&&B?.length>0?(0,e.__)("Search result","wedocs-pro"):(0,e.__)("Data","wedocs-pro"))+(0,e.__)(" not found","wedocs-pro")]}),(0,Xr.jsx)("div",{className:"h-4"})]}):(0,Xr.jsxs)(Xr.Fragment,{children:[g&&g?.map((t,r)=>(0,Xr.jsxs)("div",{className:`${"explore"!==N&&"hidden"} doc-section border border-[#D1D5DB] box-border p-4 mb-2.5 last:mb-0 rounded-md w-[340px] mx-auto`,children:[(0,Xr.jsx)("div",{className:"doc-heading text-lg text-gray-900 mb-1.5",children:t}),(0,Xr.jsx)("div",{className:"doc-description text-sm font-normal text-gray-500 leading-5",children:(0,e.__)("Here you will find everything about WP User Frontend, what it offers and its","wedocs-pro")})]},r)),(0,Xr.jsx)("div",{className:"h-4"})]})})]}),Boolean(h)&&(0,Xr.jsx)(nn,{docId:h,isExpanded:w,setIsExpanded:f})]}),"message"===N&&(0,Xr.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,Xr.jsx)(cn,{turnstileSiteKey:i?.message?.turnstile_site_key||"",frontendPreview:d,previewColors:l})}),"integrate_ai"===N&&(0,Xr.jsx)("div",{className:"flex-1 overflow-hidden flex flex-col",children:(0,Xr.jsx)(pn,{frontendPreview:d})}),d&&c&&(0,Xr.jsx)(yn,{setShowDocContent:u,doc:F?.find(e=>e?.id===parseInt(r)),isExpanded:w,setIsExpanded:f})]})})},kn=({classes:e,show:t,setShow:r,previewColors:n})=>{const{bubbleBg:o,bubbleIcon:a}=n;return(0,Xr.jsx)("div",{onClick:()=>{r(!t)},className:`${e||""} msg-icon xs:w-12 xs:h-12 w-16 h-16 rounded-full ml-auto flex items-center justify-center`,style:{background:`rgba(${o?.r}, ${o?.g}, ${o?.b}, ${o?.a})`},children:t?(0,Xr.jsx)("svg",{width:"22",height:"22",xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6 text-white rotate-180 transition-all cancel-svg",style:{fill:`rgba(${a?.r}, ${a?.g}, ${a?.b}, ${a?.a})`},children:(0,Xr.jsx)("path",{d:"M2.45.42A1.435 1.435 0 0 0 .42 2.45L8.97 11 .42 19.55a1.435 1.435 0 1 0 2.03 2.03L11 13.03l8.55 8.55a1.435 1.435 0 1 0 2.03-2.03L13.03 11l8.55-8.55A1.435 1.435 0 0 0 19.55.42L11 8.97 2.45.42Z"})}):(0,Xr.jsx)("svg",{width:"25",height:"24",xmlns:"http://www.w3.org/2000/svg",className:"rotate-360 transition-all",style:{fill:`rgba(${a?.r}, ${a?.g}, ${a?.b}, ${a?.a})`},children:(0,Xr.jsx)("path",{d:"M2.157 23.042a1.2 1.2 0 0 1-1.198-1.187V6.481A5.91 5.91 0 0 1 6.871.569h11.835a5.91 5.91 0 0 1 5.912 5.912v7.099a5.91 5.91 0 0 1-5.912 5.912H7.27L2.833 22.82c-.198.141-.434.219-.677.222zM6.882 2.943a3.55 3.55 0 0 0-3.549 3.549v13l2.84-2.13c.205-.152.454-.234.71-.233h11.824a3.55 3.55 0 0 0 3.55-3.549V6.481a3.55 3.55 0 0 0-3.55-3.549l-11.824.011zm8.264 5.934H8.058c-.165.016-.331-.003-.488-.055s-.302-.136-.424-.248-.221-.247-.288-.398-.102-.315-.102-.481.035-.329.102-.481.165-.287.288-.398.267-.196.424-.248.323-.071.488-.055h7.088c.165-.016.331.003.488.055s.302.136.424.248.221.247.288.398.102.315.102.481-.035.329-.102.481-.165.287-.288.398a1.19 1.19 0 0 1-.424.248c-.157.052-.323.071-.488.055zm-7.088 4.725h3.549c.165.016.331-.003.488-.055s.302-.136.424-.248.22-.247.287-.398a1.19 1.19 0 0 0 0-.961c-.067-.151-.165-.287-.287-.398s-.267-.196-.424-.248-.323-.071-.488-.055H8.058c-.165-.016-.331.003-.488.055s-.302.136-.424.248-.221.247-.288.398-.102.315-.102.481.035.329.102.481.165.287.288.398.267.196.424.248.323.071.488.055z"})})})},jn={widgetBg:{r:99,g:102,b:241,a:1},activeTabBg:{r:255,g:255,b:255,a:1},activeTabFont:{r:55,g:65,b:81,a:1},inactiveTabBg:{r:67,g:56,b:202,a:1},inactiveTabFont:{r:199,g:210,b:254,a:1},tabTitleFont:{r:255,g:255,b:255,a:1},tabDescriptionFont:{r:199,g:210,b:254,a:1},breadcrumbColor:{r:67,g:56,b:202,a:1},sendBtnBg:{r:99,g:102,b:241,a:1},sendBtnFont:{r:255,g:255,b:255,a:1},bubbleBg:{r:87,g:116,b:241,a:1},bubbleIcon:{r:255,g:255,b:255,a:1}},En=({classes:e,settings:r,bodyClasses:n,iconClasses:o,previewColors:a,staticPreview:s,frontendPreview:i})=>{const l=a?{...jn,...(c=a)&&!Array.isArray(c)?c:{}}:a;var c;const[d,u]=(0,t.useState)(0),[h,m]=(0,t.useState)(!1),[p,w]=(0,t.useState)(!1),f=document.querySelectorAll('a[rel~="widget-link"]');
1return f?.forEach(e=>{e.addEventListener("click",e=>{u(e?.target?.getAttribute("data-id")),m(!0),w(!0)})}),(0,t.useEffect)(()=>{h||w(!1)},[h]),(0,Xr.jsx)(Xr.Fragment,{children:l&&(0,Xr.jsxs)("div",{className:`${e||""} palette-preview-container relative`,children:[s?(0,Xr.jsx)(xn,{settings:r,classes:n,previewColors:l}):h&&(0,Xr.jsx)(xn,{docId:d,settings:r,classes:n,previewColors:l,showDocContent:p,frontendPreview:i,setShowDocContent:w}),(0,Xr.jsx)(kn,{setShow:m,settings:r,classes:o,previewColors:l,show:!s&&h})]})})},Cn=()=>(0,Xr.jsxs)("div",{className:"animate-pulse flex flex-col flex-1 overflow-hidden",children:[(0,Xr.jsxs)("div",{className:"flex-1 px-6 py-4 overflow-hidden",children:[(0,Xr.jsx)("div",{className:"h-5 w-3/4 bg-gray-200 rounded mb-5"}),(0,Xr.jsxs)("div",{className:"space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"})]}),(0,Xr.jsxs)("div",{className:"mt-6 space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-5/6 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-2/3 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-4/5 bg-gray-100 rounded"})]}),(0,Xr.jsxs)("div",{className:"mt-6 space-y-2.5",children:[(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-3/4 bg-gray-100 rounded"}),(0,Xr.jsx)("div",{className:"h-3 w-full bg-gray-100 rounded"})]})]}),(0,Xr.jsx)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3",children:(0,Xr.jsx)("div",{className:"h-4 w-52 bg-gray-200 rounded"})})]}),Sn=({docId:r})=>{const[n,o]=(0,t.useState)(null),a=weDocsPro_Front_Vars?.general_settings?.helpful;if("off"===a)return null;const s=e=>{n||(o(e),wp.apiFetch({path:`/wp/v2/docs/${r}/helpfullness`,method:"POST",data:{type:e}}).catch(()=>{}))};return(0,Xr.jsx)("div",{className:"flex-shrink-0 border-t border-gray-100 px-6 py-3 bg-white",children:n?(0,Xr.jsxs)("div",{className:"flex items-center justify-center gap-2 py-1 rounded-lg bg-green-50 text-green-700 text-sm font-medium",children:[(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Xr.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,e.__)("Thanks for your feedback","wedocs-pro")]}):(0,Xr.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,Xr.jsx)("p",{className:"text-sm text-gray-500 m-0",children:(0,e.__)("Did this answer your question?","wedocs-pro")}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,Xr.jsx)("button",{onClick:()=>s("positive"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-green-400 hover:bg-green-50 transition-all duration-200",title:(0,e.__)("Yes","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😊"})}),(0,Xr.jsx)("button",{onClick:()=>s("negative"),className:"group w-8 h-8 flex items-center justify-center rounded-full border border-gray-200 hover:border-red-400 hover:bg-red-50 transition-all duration-200",title:(0,e.__)("No","wedocs-pro"),children:(0,Xr.jsx)("span",{className:"text-base leading-none transition-transform duration-200 group-hover:scale-125",children:"😞"})})]})]})})},Ln=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 8V4m0 0h4M4 4l5 5m11-5h-4m4 0v4m0-4l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})}),$n=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 9V4m0 5H4m5 0L3 3m12 6h5m-5 0V4m0 5l6-6M9 15v5m0-5H4m5 0l-6 6m12-6h5m-5 0v5m0-5l6 6"})}),Rn=()=>(0,Xr.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,Xr.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})}),Pn=({doc:t,onClose:r,isExpanded:n,setIsExpanded:o,loading:a,showClose:s})=>(0,Xr.jsxs)("div",{className:"wedocs-single-wrap flex flex-col h-full bg-white rounded-[10px] overflow-hidden",children:[(0,Xr.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 bg-white/80 backdrop-blur-sm border-b border-gray-100 flex-shrink-0",children:[s?(0,Xr.jsx)("button",{onClick:r,className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 focus:outline-none transition-all duration-200",title:(0,e.__)("Close","wedocs-pro"),children:(0,Xr.jsx)(Rn,{})}):(0,Xr.jsx)("span",{}),(0,Xr.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,Xr.jsx)("button",{onClick:()=>o(!n),className:"p-1.5 rounded-md text-gray-500 hover:text-indigo-600 hover:bg-gray-100 transition-all duration-300",title:n?"Compress":"Expand",children:n?(0,Xr.jsx)($n,{}):(0,Xr.jsx)(Ln,{})}),!a&&t?.link&&(0,Xr.jsx)("a",{href:t.link,target:"_blank",rel:"noreferrer",className:"inline-flex items-center text-gray-400 hover:text-indigo-600 p-1 transition-colors",title:(0,e.__)("View Doc","wedocs-pro"),children:(0,Xr.jsxs)("svg",{width:"19",height:"14",viewBox:"0 0 19 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,Xr.jsx)("path",{d:"M11.6995 7.14388C11.6995 8.52459 10.5802 9.64388 9.1995 9.64388C7.81879 9.64388 6.6995 8.52459 6.6995 7.14388C6.6995 5.76317 7.81879 4.64388 9.1995 4.64388C10.5802 4.64388 11.6995 5.76317 11.6995 7.14388Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,Xr.jsx)("path",{d:"M1.24805 7.14385C2.30994 3.76294 5.46851 1.31055 9.19987 1.31055C12.9312 1.31055 16.0898 3.76298 17.1517 7.14391C16.0898 10.5248 12.9312 12.9772 9.19989 12.9772C5.46851 12.9772 2.30992 10.5248 1.24805 7.14385Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})]}),a?(0,Xr.jsx)(Cn,{}):(0,Xr.jsxs)(Xr.Fragment,{children:[(0,Xr.jsxs)("div",{className:"flex-1 overflow-y-auto px-6 py-4 doc-content-scroll",children:[(0,Xr.jsx)("div",{className:"doc-heading text-gray-900 font-medium mb-3 "+(n?"text-xl":"text-lg"),dangerouslySetInnerHTML:{__html:t?.title?.rendered}}),(0,Xr.jsx)("article",{className:"prose break-words "+(n?"prose-lg":""),dangerouslySetInnerHTML:{__html:t?.content?.rendered}})]}),(0,Xr.jsx)(Sn,{docId:t?.id})]})]}),Nn=({doc:e,onClose:r,loading:n})=>{const[o,a]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),(0,Xr.jsxs)("div",{className:"wedocs-single-wrap",style:{position:"fixed",top:"var(--wp-admin--admin-bar--height, 0px)",right:0,bottom:0,left:0,zIndex:99999,display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,Xr.jsx)("div",{onClick:r,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.12)",backdropFilter:"blur(1px)"}}),(0,Xr.jsx)("div",{style:{position:"relative",width:o?"700px":"480px",maxWidth:"95vw",height:o?"80vh":"600px",maxHeight:"90vh",transition:"width 0.3s ease, height 0.3s ease",borderRadius:"10px",overflow:"hidden",boxShadow:"0 25px 60px rgba(0,0,0,0.2)",display:"flex",flexDirection:"column"},children:(0,Xr.jsx)(Pn,{doc:e,onClose:r,isExpanded:o,setIsExpanded:a,loading:n,showClose:!0})})]})},Mn=({doc:e,onClose:r,loading:n})=>{const[o,a]=(0,t.useState)(!1);return(0,t.useEffect)(()=>{const e=e=>{"Escape"===e.key&&r()};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[r]),(0,Xr.jsxs)("div",{className:"wedocs-single-wrap",style:{position:"fixed",top:"var(--wp-admin--admin-bar--height, 0px)",right:0,bottom:0,left:0,zIndex:99999,display:"flex",justifyContent:"flex-end"},children:[(0,Xr.jsx)("div",{onClick:r,style:{position:"absolute",inset:0,background:"rgba(0,0,0,0.12)"}}),(0,Xr.jsx)("div",{style:{position:"relative",width:o?"600px":"420p
1x",maxWidth:"95vw",height:"100%",transition:"width 0.3s ease",boxShadow:"-4px 0 24px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",borderRadius:"10px 0 0 10px",overflow:"hidden"},children:(0,Xr.jsx)(Pn,{doc:e,onClose:r,isExpanded:o,setIsExpanded:a,loading:n,showClose:!0})})]})},Tn=({doc:e,onClose:r,anchorEl:n,loading:o})=>{const[a,s]=(0,t.useState)(!1),i=(0,t.useRef)(null),[l,c]=(0,t.useState)({top:0,left:0});return(0,t.useEffect)(()=>{if(n){const e=n.getBoundingClientRect(),t=a?480:360,r=480,o=window.innerWidth,s=window.innerHeight;let i=e.left;i+t>o-16&&(i=o-t-16);const l=e.bottom+8+r>s?e.top-r-8:e.bottom+8;c({top:l,left:Math.max(8,i)})}},[n,a]),(0,t.useEffect)(()=>{const e=e=>{"Escape"===e.key&&r()},t=e=>{i.current&&!i.current.contains(e.target)&&e.target!==n&&r()};return document.addEventListener("keydown",e),document.addEventListener("mousedown",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("mousedown",t)}},[r,n]),(0,Xr.jsx)("div",{className:"wedocs-single-wrap",style:{position:"fixed",zIndex:99999,top:l.top,left:l.left},children:(0,Xr.jsx)("div",{ref:i,style:{width:a?"480px":"360px",height:"480px",maxWidth:"95vw",transition:"width 0.3s ease",borderRadius:"10px",overflow:"hidden",boxShadow:"0 8px 32px rgba(0,0,0,0.18)",display:"flex",flexDirection:"column",border:"1px solid #e5e7eb"},children:(0,Xr.jsx)(Pn,{doc:e,onClose:r,isExpanded:a,setIsExpanded:s,loading:o,showClose:!0})})})},An=()=>{const e="off"===weDocsPro_Front_Vars?.assistant_settings?.assist_enable,r="off"===weDocsPro_Front_Vars?.assistant_settings?.integrate_ai?.ai_enabled,n="off"===weDocsPro_Front_Vars?.assistant_settings?.explore?.explore_enable,o="off"===weDocsPro_Front_Vars?.assistant_settings?.message?.messaging_enable,[a,s]=(0,t.useState)(!1),[i,l]=(0,t.useState)({type:null,doc:null,anchorEl:null,loading:!1});(0,t.useEffect)(()=>{const e=()=>{"complete"===document.readyState&&(s(!0),setTimeout(()=>{s(!0)},100))};return e(),window.addEventListener("load",e),()=>{window.removeEventListener("load",e)}},[]),(0,t.useEffect)(()=>{const t=document.querySelectorAll('a[rel~="widget-link"]'),r=e=>{e.preventDefault()};e?t.forEach(e=>{const t=document.createElement("a");t.innerHTML=e.innerHTML;for(let r=0;r<e.attributes.length;r++){const n=e.attributes[r];t.setAttribute(n.name,n.value)}e.replaceWith(t)}):t.forEach(e=>e.addEventListener("click",r))},[e]),(0,t.useEffect)(()=>{const e=[];return[{selector:'a[rel~="inline-link"]',type:"inline"},{selector:'a[rel~="sidebar-link"]',type:"sidebar"},{selector:'a[rel~="modal-link"]',type:"modal"}].forEach(({selector:t,type:r})=>{document.querySelectorAll(t).forEach(t=>{const n=e=>{e.preventDefault();const n=t.getAttribute("data-id");n&&(l({type:r,doc:null,anchorEl:"inline"===r?t:null,loading:!0}),Promise.all([wp.apiFetch({path:`/wp/v2/docs/${n}?_embed`}),new Promise(e=>setTimeout(e,600))]).then(([e])=>{l(t=>({...t,doc:e,loading:!1}))}).catch(()=>{l({type:null,doc:null,anchorEl:null,loading:!1})}))};t.addEventListener("click",n),e.push({linkDom:t,handler:n})})}),()=>{e.forEach(({linkDom:e,handler:t})=>{e.removeEventListener("click",t)})}},[]);const c=()=>l({type:null,doc:null,anchorEl:null,loading:!1});return(0,Xr.jsxs)("div",{style:{position:"fixed"},className:"xs:bottom-4 xs:right-6 xxs:right-3 md:bottom-4 md:right-6 bottom-8 right-14 z-[999]",children:[(0,Xr.jsx)("span",{className:"hidden font-extrabold"}),a&&weDocsPro_Front_Vars.assistant_settings&&!e&&!(r&&n&&o)&&(0,Xr.jsx)(En,{previewColors:weDocsPro_Front_Vars?.assistant_settings?.preference?.color_settings?.preview_colors,settings:weDocsPro_Front_Vars?.assistant_settings,bodyClasses:"-translate-y-full absolute right-0 ml-auto",iconClasses:"mt-24 cursor-pointer hover:bg-indigo-600",frontendPreview:!0}),"modal"===i.type&&(i.loading||i.doc)&&(0,Xr.jsx)(Nn,{doc:i.doc,onClose:c,loading:i.loading}),"sidebar"===i.type&&(i.loading||i.doc)&&(0,Xr.jsx)(Mn,{doc:i.doc,onClose:c,loading:i.loading}),"inline"===i.type&&(i.loading||i.doc)&&(0,Xr.jsx)(Tn,{doc:i.doc,onClose:c,anchorEl:i.anchorEl,loading:i.loading})]})},Dn=window.ReactDOM;function Bn(e){return a.createElement(gr,{flushSync:Dn.flushSync,...e})}const zn=document.createElement("div");zn.setAttribute("id","wedocs-messaging-bubble-root"),zn.setAttribute("class","wedocs-single-wrap"),document.body.appendChild(zn);const On=document.getElementById("wedocs-messaging-bubble-root");let Fn=[{path:"/",component:An},{path:"/:id",component:An},{path:"/*",component:An}];const In=function(e,t){return Fe({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:v({window:t?.window}),hydrationData:Wr(),routes:e,mapRouteProperties:pr,hydrationRouteProperties:wr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.
1instrumentations}).initialize()}(kr((0,Xr.jsx)(t.Fragment,{children:Fn&&Fn.map((e,t)=>(0,Xr.jsx)(yr,{path:e.path,element:(0,Xr.jsx)(e.component,{}),errorElement:(0,Xr.jsx)(e.component,{})},t))})));On&&(0,t.createRoot)(On).render((0,Xr.jsx)(Bn,{router:In}))})()})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.