@esvndev/es-react-table-interface 1.5.93 → 1.5.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +95 -95
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -88,91 +88,7 @@ object-assign
|
|
|
88
88
|
* sweetalert2 v11.22.3
|
|
89
89
|
* Released under the MIT License.
|
|
90
90
|
*/
|
|
91
|
-
function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function fj(e,t){return e.get(pj(e,t))}function mj(e,t,n){(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,n)}const vj={},gj=e=>new Promise(t=>{if(!e)return t();const n=window.scrollX,r=window.scrollY;vj.restoreFocusTimeout=setTimeout(()=>{vj.previousActiveElement instanceof HTMLElement?(vj.previousActiveElement.focus(),vj.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(n,r)}),bj="swal2-",yj=["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]=bj+t,e),{}),wj=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=bj+t,e),{}),xj="SweetAlert2:",Ej=e=>e.charAt(0).toUpperCase()+e.slice(1),kj=e=>{console.warn(`${xj} ${"object"==typeof e?e.join(" "):e}`)},Cj=e=>{console.error(`${xj} ${e}`)},Sj=[],Mj=(e,t=null)=>{(e=>{Sj.includes(e)||(Sj.push(e),kj(e))})(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},Aj=e=>"function"==typeof e?e():e,_j=e=>e&&"function"==typeof e.toPromise,Oj=e=>_j(e)?e.toPromise():Promise.resolve(e),Nj=e=>e&&Promise.resolve(e)===e,Zj=()=>document.body.querySelector(`.${yj.container}`),Dj=e=>{const t=Zj();return t?t.querySelector(e):null},Ij=e=>Dj(`.${e}`),Hj=()=>Ij(yj.popup),Tj=()=>Ij(yj.icon),Lj=()=>Ij(yj.title),Pj=()=>Ij(yj["html-container"]),Vj=()=>Ij(yj.image),Bj=()=>Ij(yj["progress-steps"]),jj=()=>Ij(yj["validation-message"]),zj=()=>Dj(`.${yj.actions} .${yj.confirm}`),Rj=()=>Dj(`.${yj.actions} .${yj.cancel}`),Wj=()=>Dj(`.${yj.actions} .${yj.deny}`),Fj=()=>Dj(`.${yj.loader}`),qj=()=>Ij(yj.actions),Yj=()=>Ij(yj.footer),Uj=()=>Ij(yj["timer-progress-bar"]),Gj=()=>Ij(yj.close),Xj=()=>{const e=Hj();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),r=parseInt(t.getAttribute("tabindex")||"0");return n>r?1:n<r?-1:0}),r=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'),a=Array.from(r).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(n.concat(a))].filter(e=>pz(e))},Kj=()=>$j(document.body,yj.shown)&&!$j(document.body,yj["toast-shown"])&&!$j(document.body,yj["no-backdrop"]),Jj=()=>{const e=Hj();return!!e&&$j(e,yj.toast)},Qj=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),r=n.querySelector("head");r&&Array.from(r.childNodes).forEach(t=>{e.appendChild(t)});const a=n.querySelector("body");a&&Array.from(a.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},$j=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},ez=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach(n=>{Object.values(yj).includes(n)||Object.values(wj).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)})})(e,t),!t.customClass)return;const r=t.customClass[n];r&&("string"==typeof r||r.forEach?az(e,r):kj(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`))},tz=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${yj.popup} > .${yj[t]}`);case"checkbox":return e.querySelector(`.${yj.popup} > .${yj.checkbox} input`);case"radio":return e.querySelector(`.${yj.popup} > .${yj.radio} input:checked`)||e.querySelector(`.${yj.popup} > .${yj.radio} input:first-child`);case"range":return e.querySelector(`.${yj.popup} > .${yj.range} input`);default:return e.querySelector(`.${yj.popup} > .${yj.input}`)}},nz=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},rz=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},az=(e,t)=>{rz(e,t,!0)},iz=(e,t)=>{rz(e,t,!1)},oz=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const r=n[e];if(r instanceof HTMLElement&&$j(r,t))return r}},lz=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},sz=(e,t="flex")=>{e&&(e.style.display=t)},cz=e=>{e&&(e.style.display="none")},dz=(e,t="block")=>{e&&new MutationObserver(()=>{uz(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},hz=(e,t,n,r)=>{const a=e.querySelector(t);a&&a.style.setProperty(n,r)},uz=(e,t,n="flex")=>{t?sz(e,n):cz(e)},pz=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),fz=e=>!!(e.scrollHeight>e.clientHeight),mz=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},vz=(e,t=!1)=>{const n=Uj();n&&pz(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"},10))},gz=`\n <div aria-labelledby="${yj.title}" aria-describedby="${yj["html-container"]}" class="${yj.popup}" tabindex="-1">\n <button type="button" class="${yj.close}"></button>\n <ul class="${yj["progress-steps"]}"></ul>\n <div class="${yj.icon}"></div>\n <img class="${yj.image}" />\n <h2 class="${yj.title}" id="${yj.title}"></h2>\n <div class="${yj["html-container"]}" id="${yj["html-container"]}"></div>\n <input class="${yj.input}" id="${yj.input}" />\n <input type="file" class="${yj.file}" />\n <div class="${yj.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${yj.select}" id="${yj.select}"></select>\n <div class="${yj.radio}"></div>\n <label class="${yj.checkbox}">\n <input type="checkbox" id="${yj.checkbox}" />\n <span class="${yj.label}"></span>\n </label>\n <textarea class="${yj.textarea}" id="${yj.textarea}"></textarea>\n <div class="${yj["validation-message"]}" id="${yj["validation-message"]}"></div>\n <div class="${yj.actions}">\n <div class="${yj.loader}"></div>\n <button type="button" class="${yj.confirm}"></button>\n <button type="button" class="${yj.deny}"></button>\n <button type="button" class="${yj.cancel}"></button>\n </div>\n <div class="${yj.footer}"></div>\n <div class="${yj["timer-progress-bar-container"]}">\n <div class="${yj["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),bz=()=>{vj.currentInstance.resetValidationMessage()},yz=e=>{const t=(()=>{const e=Zj();return!!e&&(e.remove(),iz([document.documentElement,document.body],[yj["no-backdrop"],yj["toast-shown"],yj["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void Cj("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=yj.container,t&&az(n,yj["no-transition"]),Qj(n,gz),n.dataset.swal2Theme=e.theme;const r="string"==typeof(a=e.target)?document.querySelector(a):a;var a;r.appendChild(n),e.topLayer&&(n.setAttribute("popover",""),n.showPopover()),(e=>{const t=Hj();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&&az(Zj(),yj.rtl)})(r),(()=>{const e=Hj(),t=oz(e,yj.input),n=oz(e,yj.file),r=e.querySelector(`.${yj.range} input`),a=e.querySelector(`.${yj.range} output`),i=oz(e,yj.select),o=e.querySelector(`.${yj.checkbox} input`),l=oz(e,yj.textarea);t.oninput=bz,n.onchange=bz,i.onchange=bz,o.onchange=bz,l.oninput=bz,r.oninput=()=>{bz(),a.value=r.value},r.onchange=()=>{bz(),a.value=r.value}})()},wz=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?xz(e,t):e&&Qj(t,e)},xz=(e,t)=>{e.jquery?Ez(t,e):Qj(t,e.toString())},Ez=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},kz=(e,t)=>{const n=qj(),r=Fj();n&&r&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?sz(n):cz(n),ez(n,t,"actions"),function(e,t,n){const r=zj(),a=Wj(),i=Rj();if(!r||!a||!i)return;Sz(r,"confirm",n),Sz(a,"deny",n),Sz(i,"cancel",n),function(e,t,n,r){if(!r.buttonsStyling)return void iz([e,t,n],yj.styled);az([e,t,n],yj.styled),r.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",r.confirmButtonColor);r.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",r.denyButtonColor);r.cancelButtonColor&&n.style.setProperty("--swal2-cancel-button-background-color",r.cancelButtonColor);Cz(e),Cz(t),Cz(n)}(r,a,i,n),n.reverseButtons&&(n.toast?(e.insertBefore(i,r),e.insertBefore(a,r)):(e.insertBefore(i,t),e.insertBefore(a,t),e.insertBefore(r,t)))}(n,r,t),Qj(r,t.loaderHtml||""),ez(r,t,"loader"))};function Cz(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const n=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\(.*/,` ${n}`))}function Sz(e,t,n){const r=Ej(t);uz(e,n[`show${r}Button`],"inline-block"),Qj(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=yj[t],ez(e,n,`${t}Button`)}const Mz=(e,t)=>{const n=Zj();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||az([document.documentElement,document.body],yj["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in yj?az(e,yj[t]):(kj('The "position" parameter is not valid, defaulting to "center"'),az(e,yj.center))}(n,t.position),function(e,t){if(!t)return;az(e,yj[`grow-${t}`])}(n,t.grow),ez(n,t,"container"))};var Az={innerParams:new WeakMap,domCache:new WeakMap};const _z=["input","file","range","select","radio","checkbox","textarea"],Oz=e=>{if(!e.input)return;if(!Lz[e.input])return void Cj(`Unexpected type of input! Expected ${Object.keys(Lz).join(" | ")}, got "${e.input}"`);const t=Hz(e.input);if(!t)return;const n=Lz[e.input](t,e);sz(t),e.inputAutoFocus&&setTimeout(()=>{nz(n)})},Nz=(e,t)=>{const n=Hj();if(!n)return;const r=tz(n,e);if(r){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(r);for(const e in t)r.setAttribute(e,t[e])}},Zz=e=>{if(!e.input)return;const t=Hz(e.input);t&&ez(t,e,"input")},Dz=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},Iz=(e,t,n)=>{if(n.inputLabel){const r=document.createElement("label"),a=yj["input-label"];r.setAttribute("for",e.id),r.className=a,"object"==typeof n.customClass&&az(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Hz=e=>{const t=Hj();if(t)return oz(t,yj[e]||yj.input)},Tz=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:Nj(t)||kj(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Lz={};Lz.text=Lz.email=Lz.password=Lz.number=Lz.tel=Lz.url=Lz.search=Lz.date=Lz["datetime-local"]=Lz.time=Lz.week=Lz.month=(e,t)=>(Tz(e,t.inputValue),Iz(e,e,t),Dz(e,t),e.type=t.input,e),Lz.file=(e,t)=>(Iz(e,e,t),Dz(e,t),e),Lz.range=(e,t)=>{const n=e.querySelector("input"),r=e.querySelector("output");return Tz(n,t.inputValue),n.type=t.input,Tz(r,t.inputValue),Iz(n,e,t),e},Lz.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");Qj(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return Iz(e,e,t),e},Lz.radio=e=>(e.textContent="",e),Lz.checkbox=(e,t)=>{const n=tz(Hj(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const r=e.querySelector("span");return Qj(r,t.inputPlaceholder||t.inputLabel),n},Lz.textarea=(e,t)=>{Tz(e,t.inputValue),Dz(e,t),Iz(e,e,t);return setTimeout(()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(Hj()).width);new MutationObserver(()=>{if(!document.body.contains(e))return;const r=e.offsetWidth+(a=e,parseInt(window.getComputedStyle(a).marginLeft)+parseInt(window.getComputedStyle(a).marginRight));var a;r>n?Hj().style.width=`${r}px`:lz(Hj(),"width",t.width)}).observe(e,{attributes:!0,attributeFilter:["style"]})}}),e};const Pz=(e,t)=>{const n=Pj();n&&(dz(n),ez(n,t,"htmlContainer"),t.html?(wz(t.html,n),sz(n,"block")):t.text?(n.textContent=t.text,sz(n,"block")):cz(n),((e,t)=>{const n=Hj();if(!n)return;const r=Az.innerParams.get(e),a=!r||t.input!==r.input;_z.forEach(e=>{const r=oz(n,yj[e]);r&&(Nz(e,t.inputAttributes),r.className=yj[e],a&&cz(r))}),t.input&&(a&&Oz(t),Zz(t))})(e,t))},Vz=(e,t)=>{for(const[n,r]of Object.entries(wj))t.icon!==n&&iz(e,r);az(e,t.icon&&wj[t.icon]),zz(e,t),Bz(),ez(e,t,"icon")},Bz=()=>{const e=Hj();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},jz=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,r="";if(t.iconHtml)r=Rz(t.iconHtml);else if("success"===t.icon)r=(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),n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)r='\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';else if(t.icon){r=Rz({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==r.trim()&&Qj(e,r)},zz=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])hz(e,n,"background-color",t.iconColor);hz(e,".swal2-success-ring","border-color",t.iconColor)}},Rz=e=>`<div class="${yj["icon-content"]}">${e}</div>`;let Wz=!1,Fz=0,qz=0,Yz=0,Uz=0;const Gz=e=>{const t=Hj();if(e.target===t||Tj().contains(e.target)){Wz=!0;const n=Jz(e);Fz=n.clientX,qz=n.clientY,Yz=parseInt(t.style.insetInlineStart)||0,Uz=parseInt(t.style.insetBlockStart)||0,az(t,"swal2-dragging")}},Xz=e=>{const t=Hj();if(Wz){let{clientX:n,clientY:r}=Jz(e);t.style.insetInlineStart=`${Yz+(n-Fz)}px`,t.style.insetBlockStart=`${Uz+(r-qz)}px`}},Kz=()=>{const e=Hj();Wz=!1,iz(e,"swal2-dragging")},Jz=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},Qz=(e,t)=>{const n=Zj(),r=Hj();if(n&&r){if(t.toast){lz(n,"width",t.width),r.style.width="100%";const e=Fj();e&&r.insertBefore(e,Tj())}else lz(r,"width",t.width);lz(r,"padding",t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),cz(jj()),$z(r,t),t.draggable&&!t.toast?(az(r,yj.draggable),(e=>{e.addEventListener("mousedown",Gz),document.body.addEventListener("mousemove",Xz),e.addEventListener("mouseup",Kz),e.addEventListener("touchstart",Gz),document.body.addEventListener("touchmove",Xz),e.addEventListener("touchend",Kz)})(r)):(iz(r,yj.draggable),(e=>{e.removeEventListener("mousedown",Gz),document.body.removeEventListener("mousemove",Xz),e.removeEventListener("mouseup",Kz),e.removeEventListener("touchstart",Gz),document.body.removeEventListener("touchmove",Xz),e.removeEventListener("touchend",Kz)})(r))}},$z=(e,t)=>{const n=t.showClass||{};e.className=`${yj.popup} ${pz(e)?n.popup:""}`,t.toast?(az([document.documentElement,document.body],yj["toast-shown"]),az(e,yj.toast)):az(e,yj.modal),ez(e,t,"popup"),"string"==typeof t.customClass&&az(e,t.customClass),t.icon&&az(e,yj[`icon-${t.icon}`])},eR=e=>{const t=document.createElement("li");return az(t,yj["progress-step"]),Qj(t,e),t},tR=e=>{const t=document.createElement("li");return az(t,yj["progress-step-line"]),e.progressStepsDistance&&lz(t,"width",e.progressStepsDistance),t},nR=(e,t)=>{Qz(0,t),Mz(0,t),((e,t)=>{const n=Bj();if(!n)return;const{progressSteps:r,currentProgressStep:a}=t;r&&0!==r.length&&void 0!==a?(sz(n),n.textContent="",a>=r.length&&kj("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.forEach((e,i)=>{const o=eR(e);if(n.appendChild(o),i===a&&az(o,yj["active-progress-step"]),i!==r.length-1){const e=tR(t);n.appendChild(e)}})):cz(n)})(0,t),((e,t)=>{const n=Az.innerParams.get(e),r=Tj();if(!r)return;if(n&&t.icon===n.icon)return jz(r,t),void Vz(r,t);if(!t.icon&&!t.iconHtml)return void cz(r);if(t.icon&&-1===Object.keys(wj).indexOf(t.icon))return Cj(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void cz(r);sz(r),jz(r,t),Vz(r,t),az(r,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Bz)})(e,t),((e,t)=>{const n=Vj();n&&(t.imageUrl?(sz(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),lz(n,"width",t.imageWidth),lz(n,"height",t.imageHeight),n.className=yj.image,ez(n,t,"image")):cz(n))})(0,t),((e,t)=>{const n=Lj();n&&(dz(n),uz(n,t.title||t.titleText,"block"),t.title&&wz(t.title,n),t.titleText&&(n.innerText=t.titleText),ez(n,t,"title"))})(0,t),((e,t)=>{const n=Gj();n&&(Qj(n,t.closeButtonHtml||""),ez(n,t,"closeButton"),uz(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Pz(e,t),kz(0,t),((e,t)=>{const n=Yj();n&&(dz(n),uz(n,t.footer,"block"),t.footer&&wz(t.footer,n),ez(n,t,"footer"))})(0,t);const n=Hj();"function"==typeof t.didRender&&n&&t.didRender(n),vj.eventEmitter.emit("didRender",n)},rR=()=>{var e;return null===(e=zj())||void 0===e?void 0:e.click()},aR=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),iR=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},oR=(e,t)=>{var n;const r=Xj();if(r.length)return-2===(e+=t)&&(e=r.length-1),e===r.length?e=0:-1===e&&(e=r.length-1),void r[e].focus();null===(n=Hj())||void 0===n||n.focus()},lR=["ArrowRight","ArrowDown"],sR=["ArrowLeft","ArrowUp"],cR=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?dR(t,e):"Tab"===t.key?hR(t):[...lR,...sR].includes(t.key)?uR(t.key):"Escape"===t.key&&pR(t,e,n)))},dR=(e,t)=>{if(!Aj(t.allowEnterKey))return;const n=tz(Hj(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;rR(),e.preventDefault()}},hR=e=>{const t=e.target,n=Xj();let r=-1;for(let e=0;e<n.length;e++)if(t===n[e]){r=e;break}e.shiftKey?oR(r,-1):oR(r,1),e.stopPropagation(),e.preventDefault()},uR=e=>{const t=qj(),n=zj(),r=Wj(),a=Rj();if(!(t&&n&&r&&a))return;const i=[n,r,a];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const o=lR.includes(e)?"nextElementSibling":"previousElementSibling";let l=document.activeElement;if(l){for(let e=0;e<t.children.length;e++){if(l=l[o],!l)return;if(l instanceof HTMLButtonElement&&pz(l))break}l instanceof HTMLButtonElement&&l.focus()}},pR=(e,t,n)=>{e.preventDefault(),Aj(t.allowEscapeKey)&&n(aR.esc)};var fR={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const mR=()=>{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")})},vR="undefined"!=typeof window&&!!window.GestureEvent,gR=()=>{const e=Zj();if(!e)return;let t;e.ontouchstart=e=>{t=bR(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},bR=e=>{const t=e.target,n=Zj(),r=Pj();return!(!n||!r)&&(!yR(e)&&!wR(e)&&(t===n||!(fz(n)||!(t instanceof HTMLElement)||((e,t)=>{let n=e;for(;n&&n!==t;){if(fz(n))return!0;n=n.parentElement}return!1})(t,r)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||fz(r)&&r.contains(t))))},yR=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,wR=e=>e.touches&&e.touches.length>1;let xR=null;const ER=e=>{null===xR&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(xR=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${xR+(()=>{const e=document.createElement("div");e.className=yj["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function kR(e,t,n,r){Jj()?ZR(e,r):(gj(n).then(()=>ZR(e,r)),iR(vj)),vR?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),Kj()&&(null!==xR&&(document.body.style.paddingRight=`${xR}px`,xR=null),(()=>{if($j(document.body,yj.iosfix)){const e=parseInt(document.body.style.top,10);iz(document.body,yj.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),mR()),iz([document.documentElement,document.body],[yj.shown,yj["height-auto"],yj["no-backdrop"],yj["toast-shown"]])}function CR(e){e=_R(e);const t=fR.swalPromiseResolve.get(this),n=SR(this);this.isAwaitingPromise?e.isDismissed||(AR(this),t(e)):n&&t(e)}const SR=e=>{const t=Hj();if(!t)return!1;const n=Az.innerParams.get(e);if(!n||$j(t,n.hideClass.popup))return!1;iz(t,n.showClass.popup),az(t,n.hideClass.popup);const r=Zj();return iz(r,n.showClass.backdrop),az(r,n.hideClass.backdrop),OR(e,t,n),!0};function MR(e){const t=fR.swalPromiseReject.get(this);AR(this),t&&t(e)}const AR=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,Az.innerParams.get(e)||e._destroy())},_R=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),OR=(e,t,n)=>{var r;const a=Zj(),i=mz(t);"function"==typeof n.willClose&&n.willClose(t),null===(r=vj.eventEmitter)||void 0===r||r.emit("willClose",t),i?NR(e,t,a,n.returnFocus,n.didClose):kR(e,a,n.returnFocus,n.didClose)},NR=(e,t,n,r,a)=>{vj.swalCloseEventFinishedCallback=kR.bind(null,e,n,r,a);const i=function(e){var n;e.target===t&&(null===(n=vj.swalCloseEventFinishedCallback)||void 0===n||n.call(vj),delete vj.swalCloseEventFinishedCallback,t.removeEventListener("animationend",i),t.removeEventListener("transitionend",i))};t.addEventListener("animationend",i),t.addEventListener("transitionend",i)},ZR=(e,t)=>{setTimeout(()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=vj.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()})},DR=e=>{let t=Hj();if(t||new hF,t=Hj(),!t)return;const n=Fj();Jj()?cz(Tj()):IR(t,e),sz(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},IR=(e,t)=>{const n=qj(),r=Fj();n&&r&&(!t&&pz(zj())&&(t=zj()),sz(n),t&&(cz(t),r.setAttribute("data-button-to-replace",t.className),n.insertBefore(r,t)),az([e,n],yj.loading))},HR=e=>e.checked?1:0,TR=e=>e.checked?e.value:null,LR=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,PR=(e,t)=>{const n=Hj();if(!n)return;const r=e=>{"select"===t.input?function(e,t,n){const r=oz(e,yj.select);if(!r)return;const a=(e,t,r)=>{const a=document.createElement("option");a.value=r,Qj(a,t),a.selected=jR(r,n.inputValue),e.appendChild(a)};t.forEach(e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,r.appendChild(e),n.forEach(t=>a(e,t[1],t[0]))}else a(r,n,t)}),r.focus()}(n,BR(e),t):"radio"===t.input&&function(e,t,n){const r=oz(e,yj.radio);if(!r)return;t.forEach(e=>{const t=e[0],a=e[1],i=document.createElement("input"),o=document.createElement("label");i.type="radio",i.name=yj.radio,i.value=t,jR(t,n.inputValue)&&(i.checked=!0);const l=document.createElement("span");Qj(l,a),l.className=yj.label,o.appendChild(i),o.appendChild(l),r.appendChild(o)});const a=r.querySelectorAll("input");a.length&&a[0].focus()}(n,BR(e),t)};_j(t.inputOptions)||Nj(t.inputOptions)?(DR(zj()),Oj(t.inputOptions).then(t=>{e.hideLoading(),r(t)})):"object"==typeof t.inputOptions?r(t.inputOptions):Cj("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},VR=(e,t)=>{const n=e.getInput();n&&(cz(n),Oj(t.inputValue).then(r=>{n.value="number"===t.input?`${parseFloat(r)||0}`:`${r}`,sz(n),n.focus(),e.hideLoading()}).catch(t=>{Cj(`Error in inputValue promise: ${t}`),n.value="",sz(n),n.focus(),e.hideLoading()}))};const BR=e=>{const t=[];return e instanceof Map?e.forEach((e,n)=>{let r=e;"object"==typeof r&&(r=BR(r)),t.push([n,r])}):Object.keys(e).forEach(n=>{let r=e[n];"object"==typeof r&&(r=BR(r)),t.push([n,r])}),t},jR=(e,t)=>!!t&&t.toString()===e.toString(),zR=(e,t)=>{const n=Az.innerParams.get(e);if(!n.input)return void Cj(`The "input" parameter is needed to be set when using returnInputValueOn${Ej(t)}`);const r=e.getInput(),a=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return HR(n);case"radio":return TR(n);case"file":return LR(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?RR(e,a,t):r&&!r.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||r.validationMessage)):"deny"===t?WR(e,a):YR(e,a)},RR=(e,t,n)=>{const r=Az.innerParams.get(e);e.disableInput();Promise.resolve().then(()=>Oj(r.inputValidator(t,r.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):"deny"===n?WR(e,t):YR(e,t)})},WR=(e,t)=>{const n=Az.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&DR(Wj()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then(()=>Oj(n.preDeny(t,n.validationMessage))).then(n=>{!1===n?(e.hideLoading(),AR(e)):e.close({isDenied:!0,value:void 0===n?t:n})}).catch(t=>qR(e||void 0,t))}else e.close({isDenied:!0,value:t})},FR=(e,t)=>{e.close({isConfirmed:!0,value:t})},qR=(e,t)=>{e.rejectPromise(t)},YR=(e,t)=>{const n=Az.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&DR(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then(()=>Oj(n.preConfirm(t,n.validationMessage))).then(n=>{pz(jj())||!1===n?(e.hideLoading(),AR(e)):FR(e,void 0===n?t:n)}).catch(t=>qR(e||void 0,t))}else FR(e,t)};function UR(){const e=Az.innerParams.get(this);if(!e)return;const t=Az.domCache.get(this);cz(t.loader),Jj()?e.icon&&sz(Tj()):GR(t),iz([t.popup,t.actions],yj.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const GR=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?sz(t[0],"inline-block"):pz(zj())||pz(Wj())||pz(Rj())||cz(e.actions)};function XR(){const e=Az.innerParams.get(this),t=Az.domCache.get(this);return t?tz(t.popup,e.input):null}function KR(e,t,n){const r=Az.domCache.get(e);t.forEach(e=>{r[e].disabled=n})}function JR(e,t){const n=Hj();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${yj.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function QR(){KR(this,["confirmButton","denyButton","cancelButton"],!1)}function $R(){KR(this,["confirmButton","denyButton","cancelButton"],!0)}function eW(){JR(this.getInput(),!1)}function tW(){JR(this.getInput(),!0)}function nW(e){const t=Az.domCache.get(this),n=Az.innerParams.get(this);Qj(t.validationMessage,e),t.validationMessage.className=yj["validation-message"],n.customClass&&n.customClass.validationMessage&&az(t.validationMessage,n.customClass.validationMessage),sz(t.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid","true"),r.setAttribute("aria-describedby",yj["validation-message"]),nz(r),az(r,yj.inputerror))}function rW(){const e=Az.domCache.get(this);e.validationMessage&&cz(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),iz(t,yj.inputerror))}const aW={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:"×",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},iW=["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"],oW={allowEnterKey:void 0},lW=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],sW=e=>Object.prototype.hasOwnProperty.call(aW,e),cW=e=>-1!==iW.indexOf(e),dW=e=>oW[e],hW=e=>{sW(e)||kj(`Unknown parameter "${e}"`)},uW=e=>{lW.includes(e)&&kj(`The parameter "${e}" is incompatible with toasts`)},pW=e=>{const t=dW(e);t&&Mj(e,t)},fW=e=>{!1===e.backdrop&&e.allowOutsideClick&&kj('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&kj(`Invalid theme "${e.theme}"`);for(const t in e)hW(t),e.toast&&uW(t),pW(t)};function mW(e){const t=Zj(),n=Hj(),r=Az.innerParams.get(this);if(!n||$j(n,r.hideClass.popup))return void kj("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 a=vW(e),i=Object.assign({},r,a);fW(i),t.dataset.swal2Theme=i.theme,nR(this,i),Az.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const vW=e=>{const t={};return Object.keys(e).forEach(n=>{cW(n)?t[n]=e[n]:kj(`Invalid parameter to update: ${n}`)}),t};function gW(){const e=Az.domCache.get(this),t=Az.innerParams.get(this);t?(e.popup&&vj.swalCloseEventFinishedCallback&&(vj.swalCloseEventFinishedCallback(),delete vj.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),vj.eventEmitter.emit("didDestroy"),bW(this)):yW(this)}const bW=e=>{yW(e),delete e.params,delete vj.keydownHandler,delete vj.keydownTarget,delete vj.currentInstance},yW=e=>{e.isAwaitingPromise?(wW(Az,e),e.isAwaitingPromise=!0):(wW(fR,e),wW(Az,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)},wW=(e,t)=>{for(const n in e)e[n].delete(t)};var xW=Object.freeze({__proto__:null,_destroy:gW,close:CR,closeModal:CR,closePopup:CR,closeToast:CR,disableButtons:$R,disableInput:tW,disableLoading:UR,enableButtons:QR,enableInput:eW,getInput:XR,handleAwaitingPromise:AR,hideLoading:UR,rejectPromise:MR,resetValidationMessage:rW,showValidationMessage:nW,update:mW});const EW=(e,t,n)=>{t.popup.onclick=()=>{e&&(kW(e)||e.timer||e.input)||n(aR.close)}},kW=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let CW=!1;const SW=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(CW=!0)}}},MW=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))&&(CW=!0)}}},AW=(e,t,n)=>{t.container.onclick=r=>{CW?CW=!1:r.target===t.container&&Aj(e.allowOutsideClick)&&n(aR.backdrop)}},_W=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const OW=()=>{if(vj.timeout)return(()=>{const e=Uj();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),vj.timeout.stop()},NW=()=>{if(vj.timeout){const e=vj.timeout.start();return vz(e),e}};let ZW=!1;const DW={};const IW=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in DW){const n=t.getAttribute(e);if(n)return void DW[e].fire({template:n})}};vj.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){const n=(...r)=>{this.removeListener(e,n),t.apply(this,r)};this.on(e,n)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const n=this._getHandlersByEventName(e),r=n.indexOf(t);r>-1&&n.splice(r,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var HW=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||_W(e[0])?["title","html","icon"].forEach((n,r)=>{const a=e[r];"string"==typeof a||_W(a)?t[n]=a:void 0!==a&&Cj(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof a}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){DW[e]=this,ZW||(document.body.addEventListener("click",IW),ZW=!0)},clickCancel:()=>{var e;return null===(e=Rj())||void 0===e?void 0:e.click()},clickConfirm:rR,clickDeny:()=>{var e;return null===(e=Wj())||void 0===e?void 0:e.click()},enableLoading:DR,fire:function(...e){return new this(...e)},getActions:qj,getCancelButton:Rj,getCloseButton:Gj,getConfirmButton:zj,getContainer:Zj,getDenyButton:Wj,getFocusableElements:Xj,getFooter:Yj,getHtmlContainer:Pj,getIcon:Tj,getIconContent:()=>Ij(yj["icon-content"]),getImage:Vj,getInputLabel:()=>Ij(yj["input-label"]),getLoader:Fj,getPopup:Hj,getProgressSteps:Bj,getTimerLeft:()=>vj.timeout&&vj.timeout.getTimerLeft(),getTimerProgressBar:Uj,getTitle:Lj,getValidationMessage:jj,increaseTimer:e=>{if(vj.timeout){const t=vj.timeout.increase(e);return vz(t,!0),t}},isDeprecatedParameter:dW,isLoading:()=>{const e=Hj();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!vj.timeout||!vj.timeout.isRunning()),isUpdatableParameter:cW,isValidParameter:sW,isVisible:()=>pz(Hj()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?vj.eventEmitter.removeListener(e,t):vj.eventEmitter.removeAllListeners(e):vj.eventEmitter.reset()},on:(e,t)=>{vj.eventEmitter.on(e,t)},once:(e,t)=>{vj.eventEmitter.once(e,t)},resumeTimer:NW,showLoading:DR,stopTimer:OW,toggleTimer:()=>{const e=vj.timeout;return e&&(e.running?OW():NW())}});class TW{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 LW=["swal-title","swal-html","swal-footer"],PW=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{qW(e,["name","value"]);const n=e.getAttribute("name"),r=e.getAttribute("value");n&&r&&(t[n]="boolean"==typeof aW[n]?"false"!==r:"object"==typeof aW[n]?JSON.parse(r):r)}),t},VW=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const n=e.getAttribute("name"),r=e.getAttribute("value");n&&r&&(t[n]=new Function(`return ${r}`)())}),t},BW=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{qW(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${Ej(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))}),t},jW=e=>{const t={},n=e.querySelector("swal-image");return n&&(qW(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},zW=e=>{const t={},n=e.querySelector("swal-icon");return n&&(qW(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},RW=e=>{const t={},n=e.querySelector("swal-input");n&&(qW(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const r=Array.from(e.querySelectorAll("swal-input-option"));return r.length&&(t.inputOptions={},r.forEach(e=>{qW(e,["value"]);const n=e.getAttribute("value");if(!n)return;const r=e.innerHTML;t.inputOptions[n]=r})),t},WW=(e,t)=>{const n={};for(const r in t){const a=t[r],i=e.querySelector(a);i&&(qW(i,[]),n[a.replace(/^swal-/,"")]=i.innerHTML.trim())}return n},FW=e=>{const t=LW.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const n=e.tagName.toLowerCase();t.includes(n)||kj(`Unrecognized element <${n}>`)})},qW=(e,t)=>{Array.from(e.attributes).forEach(n=>{-1===t.indexOf(n.name)&&kj([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])})},YW=e=>{const t=Zj(),n=Hj();"function"==typeof e.willOpen&&e.willOpen(n),vj.eventEmitter.emit("willOpen",n);const r=window.getComputedStyle(document.body).overflowY;KW(t,n,e),setTimeout(()=>{GW(t,n)},10),Kj()&&(XW(t,e.scrollbarPadding,r),(()=>{const e=Zj();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"))})})()),Jj()||vj.previousActiveElement||(vj.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),vj.eventEmitter.emit("didOpen",n),iz(t,yj["no-transition"])},UW=e=>{const t=Hj();if(e.target!==t)return;const n=Zj();t.removeEventListener("animationend",UW),t.removeEventListener("transitionend",UW),n.style.overflowY="auto"},GW=(e,t)=>{mz(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",UW),t.addEventListener("transitionend",UW)):e.style.overflowY="auto"},XW=(e,t,n)=>{(()=>{if(vR&&!$j(document.body,yj.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",az(document.body,yj.iosfix),gR()}})(),t&&"hidden"!==n&&ER(n),setTimeout(()=>{e.scrollTop=0})},KW=(e,t,n)=>{az(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),sz(t,"grid"),setTimeout(()=>{az(t,n.showClass.popup),t.style.removeProperty("opacity")},10)):sz(t,"grid"),az([document.documentElement,document.body],yj.shown),n.heightAuto&&n.backdrop&&!n.toast&&az([document.documentElement,document.body],yj["height-auto"])};var JW=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),QW=(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 $W(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=JW),"url"===e.input&&(e.inputValidator=QW))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&kj("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)&&(kj('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),yz(e)}let eF;var tF=new WeakMap;class nF{constructor(...e){if(mj(this,tF,void 0),"undefined"==typeof window)return;eF=this;const t=Object.freeze(this.constructor.argsToParams(e));this.params=t,this.isAwaitingPromise=!1,function(e,t,n){e.set(pj(e,t),n)}(tF,this,this._main(eF.params))}_main(e,t={}){if(fW(Object.assign({},t,e)),vj.currentInstance){const e=fR.swalPromiseResolve.get(vj.currentInstance),{isAwaitingPromise:t}=vj.currentInstance;vj.currentInstance._destroy(),t||e({isDismissed:!0}),Kj()&&mR()}vj.currentInstance=eF;const n=aF(e,t);$W(n),Object.freeze(n),vj.timeout&&(vj.timeout.stop(),delete vj.timeout),clearTimeout(vj.restoreFocusTimeout);const r=iF(eF);return nR(eF,n),Az.innerParams.set(eF,n),rF(eF,r,n)}then(e){return fj(tF,this).then(e)}finally(e){return fj(tF,this).finally(e)}}const rF=(e,t,n)=>new Promise((r,a)=>{const i=t=>{e.close({isDismissed:!0,dismiss:t})};fR.swalPromiseResolve.set(e,r),fR.swalPromiseReject.set(e,a),t.confirmButton.onclick=()=>{(e=>{const t=Az.innerParams.get(e);e.disableButtons(),t.input?zR(e,"confirm"):YR(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=Az.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?zR(e,"deny"):WR(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(aR.cancel)})(e,i)},t.closeButton.onclick=()=>{i(aR.close)},((e,t,n)=>{e.toast?EW(e,t,n):(SW(t),MW(t),AW(e,t,n))})(n,t,i),((e,t,n)=>{iR(e),t.toast||(e.keydownHandler=e=>cR(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:Hj(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(vj,n,i),((e,t)=>{"select"===t.input||"radio"===t.input?PR(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(_j(t.inputValue)||Nj(t.inputValue))&&(DR(zj()),VR(e,t))})(e,n),YW(n),oF(vj,n,i),lF(t,n),setTimeout(()=>{t.container.scrollTop=0})}),aF=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return FW(n),Object.assign(PW(n),VW(n),BW(n),jW(n),zW(n),RW(n),WW(n,LW))})(e),r=Object.assign({},aW,t,n,e);return r.showClass=Object.assign({},aW.showClass,r.showClass),r.hideClass=Object.assign({},aW.hideClass,r.hideClass),!1===r.animation&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},iF=e=>{const t={popup:Hj(),container:Zj(),actions:qj(),confirmButton:zj(),denyButton:Wj(),cancelButton:Rj(),loader:Fj(),closeButton:Gj(),validationMessage:jj(),progressSteps:Bj()};return Az.domCache.set(e,t),t},oF=(e,t,n)=>{const r=Uj();cz(r),t.timer&&(e.timeout=new TW(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(sz(r),ez(r,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&vz(t.timer)})))},lF=(e,t)=>{if(!t.toast)return Aj(t.allowEnterKey)?void(sF(e)||cF(e,t)||oR(-1,1)):(Mj("allowEnterKey"),void dF())},sF=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&pz(e))return e.focus(),!0;return!1},cF=(e,t)=>t.focusDeny&&pz(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&pz(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!pz(e.confirmButton))&&(e.confirmButton.focus(),!0),dF=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout(()=>{e.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${e}`)}nF.prototype.disableButtons=$R,nF.prototype.enableButtons=QR,nF.prototype.getInput=XR,nF.prototype.disableInput=tW,nF.prototype.enableInput=eW,nF.prototype.hideLoading=UR,nF.prototype.disableLoading=UR,nF.prototype.showValidationMessage=nW,nF.prototype.resetValidationMessage=rW,nF.prototype.close=CR,nF.prototype.closePopup=CR,nF.prototype.closeModal=CR,nF.prototype.closeToast=CR,nF.prototype.rejectPromise=MR,nF.prototype.update=mW,nF.prototype._destroy=gW,Object.assign(nF,HW),Object.keys(xW).forEach(e=>{nF[e]=function(...t){return eF&&eF[e]?eF[e](...t):null}}),nF.DismissReason=aR,nF.version="11.22.3";const hF=nF;hF.default=hF,"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.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.1s;--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-icon-animations: true;--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 $swal2-outline-color;--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;--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:all}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";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;container-name:swal2-popup}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;word-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;word-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:"!";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)}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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)}@container swal2-popup style(--swal2-icon-animations:true){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:all}.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}@container swal2-popup style(--swal2-icon-animations:true){.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:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);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}}');const uF=[{key:"title",getter:e=>e.getTitle()},{key:"html",getter:e=>e.getHtmlContainer()},{key:"confirmButtonText",getter:e=>e.getConfirmButton()},{key:"denyButtonText",getter:e=>e.getDenyButton()},{key:"cancelButtonText",getter:e=>e.getCancelButton()},{key:"footer",getter:e=>e.getFooter()},{key:"closeButtonHtml",getter:e=>e.getCloseButton()},{key:"iconHtml",getter:e=>e.getIconContent()},{key:"loaderHtml",getter:e=>e.getLoader()}],pF=()=>{};const fF=function(e){function t(e){const t={},n={},r=uF.map(e=>e.key);return Object.entries(e).forEach(e=>{let[a,i]=e;r.includes(a)&&f.default.isValidElement(i)?(t[a]=i,n[a]=" "):n[a]=i}),[t,n]}function n(t,n){Object.entries(n).forEach(n=>{let[r,a]=n;const i=uF.find(e=>e.key===r).getter(e),l=o.createRoot(i);l.render(a),t.__roots.push(l)})}function r(e){e.__roots.forEach(e=>{e.unmount()}),e.__roots=[]}return class extends e{static argsToParams(t){if(f.default.isValidElement(t[0])||f.default.isValidElement(t[1])){const e={};return["title","html","icon"].forEach((n,r)=>{void 0!==t[r]&&(e[n]=t[r])}),e}return e.argsToParams(t)}_main(e,a){this.__roots=[],this.__params=Object.assign({},a,e);const[i,o]=t(this.__params),l=o.willOpen||pF,s=o.didOpen||pF,c=o.didDestroy||pF;return super._main(Object.assign({},o,{willOpen:e=>{n(this,i),l(e)},didOpen:e=>{setTimeout(()=>{s(e)})},didDestroy:e=>{c(e),r(this)}}))}update(e){Object.assign(this.__params,e),r(this);const[a,i]=t(this.__params);super.update(i),n(this,a)}}}(hF),mF=()=>{for(let e=0;e<20;e++){return crypto.randomUUID()}},vF=(e,t,n)=>e.filter(e=>!t.some(t=>t[n]===e[n])),gF=(e,t="dd/MM/yyyy")=>{if(!e)return"";const n=new Date(e),r={dd:String(n.getDate()).padStart(2,"0"),MM:String(n.getMonth()+1).padStart(2,"0"),yyyy:n.getFullYear(),HH:String(n.getHours()).padStart(2,"0"),mm:String(n.getMinutes()).padStart(2,"0")};return t?.replace(/dd|MM|yyyy|HH|mm/g,e=>r[e])},bF=(e,t)=>e?t&&e===t?",":e:void 0,yF=(e,t)=>t?e&&e===t?".":t:e&&"."===e?",":".",wF=e=>"number"==typeof e||!isNaN(Number(e))&&""!==e?.toString().trim(),xF=e=>{const t=[...e];let n=[];return t.forEach(e=>{e.children?n=n.concat(xF(e.children)):n.push(e)}),n},EF=e=>JSON.parse(JSON.stringify(e)),kF=e=>{const t=[];let n=0;function r(e){return e.reduce((e,t)=>e+(t.children?r(t.children):1),0)}return n=function e(t,n=0){return t.reduce((t,r)=>{const a=r.children?e(r.children,n+1):n+1;return Math.max(t,a)},n)}(e),function e(a,i=0){t[i]=t[i]||[],a.forEach(a=>{const o=Array.isArray(a.children)&&a.children.length>0;t[i].push({...a,colspan:o?r(a.children??[]):1,rowspan:o?1:n-i,children:o?a.children:[]}),o&&e(a.children??[],i+1)})}(e),t},CF=(e,t,n)=>e?e.map(e=>e[n]===t[n]?{...e,...t}:(e.children&&e.children.length>0&&(e.children=CF(e.children,t,n)),e)):[];function SF(e,t){const n=[];return e.forEach(e=>{if(e.parent){let r=n.find(t=>t.field===e.parent);r||(r={...t.find(t=>t.field===e.parent),children:[],chosen:!1,selected:!1},n.push(r)),r.children.push(e)}else n.push(e)}),n}const MF=e=>!!cj(e)||0===Object.keys(e).length,AF=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n].w!==t[n].w||e[n].h===t[n].h||e[n].x===t[n].x||e[n].y===t[n].y)return!1;return!0},_F=e=>[...e].reduce((e,t)=>{const n=[...e],r=n.find(e=>e[0].y===t.y);return r?r.push(t):n.push([t]),n},[]);const OF=(e,t,n,r)=>{const a=[...e];return a.forEach(e=>{e.forEach(e=>{e.id===t&&(n in e.style?e.style[n]=r:n in e?e[n]=r:e.style[n]=r)})}),a},NF=(e,t,n)=>{const r=EF(e);return Object.values(r.reduce((e,r)=>{const a=t.filter(e=>!n.includes(e)).map(e=>`${e}:${r[e]}`).join("|");return e[a]||(e[a]={},t.forEach(t=>{e[a][t]=r[t]}),n.forEach(t=>{e[a][t]=0})),n.forEach(t=>{t in r&&(e[a][t]+=Number(r[t]||0))}),e},{}))},ZF=(e,t)=>EF(e).map(e=>{let n=HF(e);return e.map(e=>("signature"===e.type?n=7:"table"===e.type&&(n=1+(t[e.table?.field??""]?.length??0)+((e.table?.fieldSums?.length??0)>0?1:0)),e.children?{...e,id:e.id?e.id:mF(),rows:n,children:IF(e.children)}:{...e,id:e.id?e.id:mF(),rows:n}))}),DF=e=>{const t=[];let n=0,r=1;return e.forEach(e=>{let a=0;e.forEach(e=>{t.push({w:e.width,h:e.rows,max:12,x:a,y:n,i:e.id,static:!1}),a+=e.width,r=e.rows}),n+=r}),t};function IF(e){return e.forEach(e=>{e.forEach(e=>{e.id=mF()})}),e}const HF=e=>{let t=0;return e.forEach(e=>{let n=0;e.children?.forEach(e=>{n+=e.reduce((e,t)=>Math.max(t.rows??1,e),0)}),t=Math.max(t,n)}),t},TF=e=>96*e/72,LF=(e,t)=>{if(e&&e.flat().length>0){const n=[...e];return n?.map(e=>e?.map(e=>e.id===t.id?{...e,...t}:e))}return[]},PF=(e,t)=>{const n=t.flat();return e.map(e=>(e.length>1?e?.sort((e,t)=>e.x-t.x):e).map(e=>{const t=n.find(t=>t&&t.id===e.i);if(t){return{...t,id:e.i,width:e.w,...t.align?{align:t.align}:{}}}return{width:e.w,id:e.i,i:e.i,rows:e.h,type:"content",children:[]}}))},VF=(e,t)=>{if(t.length>1){const n=t.reduce((t,n)=>e(t)+e(" ")+e(n));return n}return e(t.toString())},BF=(e,t)=>{e.errors?.length>0&&fF.fire({title:t("Error"),text:VF(t,[e.errors[0].propertyName,e.errors[0].errorMessage]),allowOutsideClick:!1,showCancelButton:!0,showConfirmButton:!1,cancelButtonText:t("Ok"),customClass:{cancelButton:"btn btn-danger ms-1"},buttonsStyling:!1})},jF=e=>{const{title:t,handleModal:n,typeModal:a="Edit",componentRight:i,component:o,className:l=""}=e,{t:s}=dc();return r.jsxs("div",{className:`${l||"mb-1"} modal-header d-flex align-items-center justify-content-between`,children:[r.jsxs("div",{className:"d-flex align-items-center justify-content-start",children:[r.jsxs("h5",{className:"modal-title",children:["Edit"===a||"Approval"===a?r.jsx(Bc,{fontSize:17,className:"me-1"}):"View"===a?r.jsx(qc,{fontSize:17,className:"me-1"}):"Print"===a?r.jsx(rd,{fontSize:17,className:"me-1"}):"Detail"===a?r.jsx(qc,{fontSize:17,className:"me-1"}):"Order"===a?r.jsx("span",{className:"e-icons e-sorting-1 me-1",style:{fontSize:"14px"}}):"Process"===a?r.jsx("span",{className:"e-flat e-icons e-paste-match-destination me-1",style:{fontSize:"14px"}}):"Delete"===a?r.jsx("span",{className:"e-flat e-icons e-trash me-1",style:{fontSize:"14px"}}):"Sidebar"===a?r.jsx(r.Fragment,{}):r.jsx(nd,{fontSize:17,className:"me-1"})," ",s(t)]}),o?o():r.jsx(r.Fragment,{})]}),r.jsxs("div",{className:"todo-item-action d-flex align-items-center",children:[i?i():r.jsx(r.Fragment,{}),r.jsx(ud,{className:sj("fw-normal cursor-pointer",{"d-none":!n}),fontSize:20,onClick:()=>n()})]})]})},zF=t=>{const{handleModal:n,openModal:a,windowSize:i,namePrint:o,organization:l,optionTypePrint:s,printApi:c,exportApi:d,setNamePrint:h,dataSetting:u,setTypeModal:p,setDataSetting:f,DOCUMENT_URL_VIEW:m,CDN_URL_VIEW:v,optionalFields:g,handleGetTemplate:b,defaultNameTemplate:y,deleteGeneralSettingApi:w,dataSource:x}=t,{t:E}=dc(),[k,C]=e.useState({value:"A4",label:"A4"}),[S,M]=e.useState(""),[A,_]=e.useState({}),O=()=>{n()},N=async(e,t,n)=>{if(n??o){const r=(t??s).find(e=>e.name===(n??o));if(r){M(""),h(r.name);let t={...x};if(g&&(g?.length??0)>0)for(let e=0;e<g.length;e++){const n=g[e];if(A[n.field]?.value){t=await n.callback(A[n.field]?.value,t)}}c({organization:l,setting:r.setting,file:r.file,tableFields:r.tableFields,dataFields:r.dataFields,data:[t],typePage:e??k.value}).then(e=>{M(e)}).catch(()=>GN(E("GetFail"))),f({...r})}}},Z=()=>{w(u?.id??"").then(e=>{e.isValid?(b(),XN(E("DeleteSuccessful")),h(y),O()):BF(e,E)}).catch(()=>{UN(E,"DeleteFail")})},D=[{value:"A4",label:E("A4")},{value:"A4R",label:E("A4 horizontal")},{value:"A3",label:E("A3")},{value:"A3R",label:E("A3 horizontal")},{value:"A5",label:E("A5")},{value:"A5R",label:E("A5 horizontal")}],I=e=>{const t=document.createElement("a");t.href=`${v}\\${e.file?.path}`,t.download=`${e.name}${e.file?.type}`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},H=e=>{d({organization:l,setting:e.setting,file:e.file,tableFields:e.tableFields,dataFields:e.dataFields,data:[x]}).then(t=>{const n=window.URL.createObjectURL(new Blob([t])),r=document.createElement("a");r.href=n,r.setAttribute("download",`${e.name}${e.file?.type}`),document.body.appendChild(r),r.click(),document.body.removeChild(r)}).catch(()=>GN(E("GetFail")))};return r.jsxs(eB,{isOpen:a,toggle:()=>n(),className:"modal-dialog-centered modal-xl",contentClassName:"p-0",onOpened:()=>{N()},onClosed:()=>{C({value:"A4",label:"A4"})},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{typeModal:"Print",handleModal:()=>n(),title:"",className:"mb-0",component:()=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:[r.jsx("span",{className:"cursor-pointer mx-50",children:E(o)}),r.jsxs(ej,{className:"nav-item",children:[r.jsx($P,{tag:"div",className:"me-0 d-flex",children:r.jsx(Ic,{fontSize:15,className:"cursor-pointer"})}),r.jsxs(XP,{className:"mt-0 p-0",end:!0,children:[s.map((e,t)=>r.jsx(FP,{tag:"div",onClick:()=>N(void 0,void 0,e.name),children:r.jsxs(r.Fragment,{children:[e.file&&(".doc"===e.file.type||".docx"===e.file.type?r.jsx(Rc,{className:"me-50",fontSize:15}):r.jsx(jc,{className:"me-50",fontSize:15})),E(e.name)," "]})},t)),r.jsx("hr",{className:"my-0"}),r.jsx(FP,{tag:"div",onClick:()=>n("modalOption"),children:E("Print Options")})]})]})]}),!!u?.file&&!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{outline:!0,color:"primary",style:{fontSize:14,fontWeight:500},className:"btn-border-0 d-flex align-items-center",onClick:()=>YN(E,I,u,E("MsgExportFileTemplate",{name:u?.name})),children:[r.jsx(Pc,{fontSize:16,className:"me-50"}),E("Download sample file")]})}),(g?.length??0)>0&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:g?.map(e=>r.jsxs(r.Fragment,{children:[r.jsx(yB,{checked:A[e.field]?.checked,type:"checkbox",onChange:t=>{A[e.field]?A[e.field].checked=t.target.checked:A[e.field]={checked:t.target.checked},A[e.field].value?(A[e.field].value=void 0,_({...A}),N()):_({...A})}}),r.jsx("span",{className:"ms-50 me-50",children:E(e.label)}),A[e.field]?.checked&&r.jsx(dy,{options:e.options,value:A[e.field]?.value,columns:e.columns,fieldLabel:e.fieldLabel,fieldValue:e.fieldValue,isClearable:e.isClearable,loadOptions:e.loadOptions,onChange:t=>{A[e.field].value=t,_({...A}),N()}})]}))})]}),componentRight:()=>r.jsxs(r.Fragment,{children:[!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsx(dy,{options:D,value:k,isDisabled:!S,onChange:e=>{C(e),N(e.value)}})}),!!u?.file&&!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{outline:!0,color:"primary",style:{fontSize:14,fontWeight:500},className:"btn-border-0 d-flex align-items-center",onClick:()=>YN(E,H,u,E("MsgExportFilePrintTemplate",{name:u?.name})),children:[r.jsx(Kc,{fontSize:16,className:"me-50"}),E("Export file")]})}),S&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Add")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(nd,{className:"me-50",fontSize:16}),E("Thêm mẫu")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Edit")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(Bc,{className:"me-50",fontSize:16}),E("Sửa mẫu")]})}),r.jsx("div",{className:sj("d-flex align-items-center pe-50 me-50 border-end",{"d-none":!u?.id}),children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{qN(E,Z,u?.id)},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(ld,{className:"me-50",fontSize:16}),E("Xóa mẫu")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Duplicate")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(Lc,{className:"me-50",fontSize:16}),E("Duplicate")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:13,fontWeight:400},outline:!0,color:"primary",onClick:()=>window.open("/setup?tab=4"),className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(ed,{className:"me-50",fontSize:16}),E("Thiết lập chữ ký")]})})]})}),r.jsx(aB,{className:"p-0",children:r.jsx("div",{style:{height:i.innerHeight-170+"px"},children:S?r.jsx(r.Fragment,{children:r.jsx("iframe",{src:`${m}/${S}`,width:"100%",height:"100%"})}):r.jsx(r.Fragment,{children:r.jsxs("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center text-primary",children:[r.jsx(oj,{className:"me-1",children:" "}),E("Loading...")]})})})}),r.jsx("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsx(e.Fragment,{children:r.jsx(_P,{color:"secondary",onClick:O,outline:!0,children:E("Close")})})})]})};function RF(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}function WF(e){function t(e,r,s,c,u){for(var p,f,m,v,w,E=0,k=0,C=0,S=0,M=0,D=0,H=m=p=0,L=0,P=0,V=0,B=0,j=s.length,z=j-1,R="",W="",F="",q="";L<j;){if(f=s.charCodeAt(L),L===z&&0!==k+S+C+E&&(0!==k&&(f=47===k?10:47),S=C=E=0,j++,z++),0===k+S+C+E){if(L===z&&(0<P&&(R=R.replace(h,"")),0<R.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:R+=s.charAt(L)}f=59}switch(f){case 123:for(p=(R=R.trim()).charCodeAt(0),m=1,B=++L;L<j;){switch(f=s.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(f=s.charCodeAt(L+1)){case 42:case 47:e:{for(H=L+1;H<z;++H)switch(s.charCodeAt(H)){case 47:if(42===f&&42===s.charCodeAt(H-1)&&L+2!==H){L=H+1;break e}break;case 10:if(47===f){L=H+1;break e}}L=H}}break;case 91:f++;case 40:f++;case 34:case 39:for(;L++<z&&s.charCodeAt(L)!==f;);}if(0===m)break;L++}if(m=s.substring(B,L),0===p&&(p=(R=R.replace(d,"").trim()).charCodeAt(0)),64===p){switch(0<P&&(R=R.replace(h,"")),f=R.charCodeAt(1)){case 100:case 109:case 115:case 45:P=r;break;default:P=Z}if(B=(m=t(r,P,m,f,u+1)).length,0<I&&(w=l(3,m,P=n(Z,R,V),r,_,A,B,f,u,c),R=P.join(""),void 0!==w&&0===(B=(m=w.trim()).length)&&(f=0,m="")),0<B)switch(f){case 115:R=R.replace(x,o);case 100:case 109:case 45:m=R+"{"+m+"}";break;case 107:m=(R=R.replace(g,"$1 $2"))+"{"+m+"}",m=1===N||2===N&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=R+m,112===c&&(W+=m,m="")}else m=""}else m=t(r,n(r,R,V),m,c,u+1);F+=m,m=V=P=H=p=0,R="",f=s.charCodeAt(++L);break;case 125:case 59:if(1<(B=(R=(0<P?R.replace(h,""):R).trim()).length))switch(0===H&&(p=R.charCodeAt(0),45===p||96<p&&123>p)&&(B=(R=R.replace(" ",":")).length),0<I&&void 0!==(w=l(1,R,r,e,_,A,W.length,c,u,c))&&0===(B=(R=w.trim()).length)&&(R="\0\0"),p=R.charCodeAt(0),f=R.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){q+=R+s.charAt(L);break}default:58!==R.charCodeAt(B-1)&&(W+=a(R,p,f,R.charCodeAt(2)))}V=P=H=p=0,R="",f=s.charCodeAt(++L)}}switch(f){case 13:case 10:47===k?k=0:0===1+p&&107!==c&&0<R.length&&(P=1,R+="\0"),0<I*T&&l(0,R,r,e,_,A,W.length,c,u,c),A=1,_++;break;case 59:case 125:if(0===k+S+C+E){A++;break}default:switch(A++,v=s.charAt(L),f){case 9:case 32:if(0===S+E+k)switch(M){case 44:case 58:case 9:case 32:v="";break;default:32!==f&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===S+k+E&&(P=V=1,v="\f"+v);break;case 108:if(0===S+k+E+O&&0<H)switch(L-H){case 2:112===M&&58===s.charCodeAt(L-3)&&(O=M);case 8:111===D&&(O=D)}break;case 58:0===S+k+E&&(H=L);break;case 44:0===k+C+S+E&&(P=1,v+="\r");break;case 34:case 39:0===k&&(S=S===f?0:0===S?f:S);break;case 91:0===S+k+C&&E++;break;case 93:0===S+k+C&&E--;break;case 41:0===S+k+E&&C--;break;case 40:if(0===S+k+E){if(0===p)if(2*M+3*D==533);else p=1;C++}break;case 64:0===k+C+S+E+H+m&&(m=1);break;case 42:case 47:if(!(0<S+E+C))switch(k){case 0:switch(2*f+3*s.charCodeAt(L+1)){case 235:k=47;break;case 220:B=L,k=42}break;case 42:47===f&&42===M&&B+2!==L&&(33===s.charCodeAt(B+2)&&(W+=s.substring(B,L+1)),v="",k=0)}}0===k&&(R+=v)}D=M,M=f,L++}if(0<(B=W.length)){if(P=r,0<I&&(void 0!==(w=l(2,W,P,e,_,A,B,c,u,c))&&0===(W=w).length))return q+W+F;if(W=P.join(",")+"{"+W+"}",0!==N*O){switch(2!==N||i(W,2)||(O=0),O){case 111:W=W.replace(y,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}O=0}}return q+W+F}function n(e,t,n){var a=t.trim().split(m);t=a;var i=a.length,o=e.length;switch(o){case 0:case 1:var l=0;for(e=0===o?"":e[0]+" ";l<i;++l)t[l]=r(e,t[l],n).trim();break;default:var s=l=0;for(t=[];l<i;++l)for(var c=0;c<o;++c)t[s++]=r(e[c]+" ",a[l],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function a(e,t,n,r){var o=e+";",l=2*t+3*n+4*r;if(944===l){e=o.indexOf(":",9)+1;var s=o.substring(e,o.length-1).trim();return s=o.substring(0,e).trim()+s+";",1===N||2===N&&i(s,1)?"-webkit-"+s+s:s}if(0===N||2===N&&!i(o,1))return o;switch(l){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(M,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(s=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+s+o;case 1005:return p.test(o)?o.replace(u,":-webkit-")+o.replace(u,":-moz-")+o:o;case 1e3:switch(t=(s=o.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=o.replace(w,"tb");break;case 232:s=o.replace(w,"tb-rl");break;case 220:s=o.replace(w,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+s+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,l=(s=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:o=o.replace(s,"-webkit-"+s)+";"+o;break;case 207:case 102:o=o.replace(s,"-webkit-"+(102<l?"inline-":"")+"box")+";"+o.replace(s,"-webkit-"+s)+";"+o.replace(s,"-ms-"+s+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return s=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+s+"-ms-flex-"+s+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(k,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(k,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?a(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):o.replace(s,"-webkit-"+s)+o.replace(s,"-moz-"+s.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===n+r&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+o}return o}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),H(2!==t?r:r.replace(C,"$1"),n,t)}function o(e,t){var n=a(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function l(e,t,n,r,a,i,o,l,s,d){for(var h,u=0,p=t;u<I;++u)switch(h=D[u].call(c,e,p,n,r,a,i,o,l,s,d)){case void 0:case!1:case!0:case null:break;default:p=h}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(H=null,e?"function"!=typeof e?N=1:(N=2,H=e):N=0),s}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<I){var a=l(-1,n,r,r,_,A,0,0,0,0);void 0!==a&&"string"==typeof a&&(n=a)}var i=t(Z,r,n,0,0);return 0<I&&(void 0!==(a=l(-2,i,r,r,_,A,i.length,0,0,0))&&(i=a)),O=0,A=_=1,i}var d=/^\0+/g,h=/[\0\r\f]/g,u=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,k=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,M=/([^-])(image-set\()/,A=1,_=1,O=0,N=1,Z=[],D=[],I=0,H=null,T=0;return c.use=function e(t){switch(t){case void 0:case null:I=D.length=0;break;default:if("function"==typeof t)D[I++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else T=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}RF('.react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property: left, top, width, height;\n}\n.react-grid-item img {\n pointer-events: none;\n user-select: none;\n}\n.react-grid-item.cssTransforms {\n transition-property: transform, width, height;\n}\n.react-grid-item.resizing {\n transition: none;\n z-index: 1;\n will-change: width, height;\n}\n\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n\n.react-grid-item.dropping {\n visibility: hidden;\n}\n\n.react-grid-item.react-grid-placeholder {\n background: red;\n opacity: 0.2;\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n.react-grid-item.react-grid-placeholder.placeholder-resizing {\n transition: none;\n}\n\n.react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n}\n\n.react-grid-item > .react-resizable-handle::after {\n content: "";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n\n.react-resizable-hide > .react-resizable-handle {\n display: none;\n}\n\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n');var FF={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function qF(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var YF=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,UF=qF(function(e){return YF.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),GF=ZI.exports,XF={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KF={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},JF={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},QF={};function $F(e){return GF.isMemo(e)?JF:QF[e.$$typeof]||XF}QF[GF.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},QF[GF.Memo]=JF;var eq=Object.defineProperty,tq=Object.getOwnPropertyNames,nq=Object.getOwnPropertySymbols,rq=Object.getOwnPropertyDescriptor,aq=Object.getPrototypeOf,iq=Object.prototype;var oq=function e(t,n,r){if("string"!=typeof n){if(iq){var a=aq(n);a&&a!==iq&&e(t,a,r)}var i=tq(n);nq&&(i=i.concat(nq(n)));for(var o=$F(t),l=$F(n),s=0;s<i.length;++s){var c=i[s];if(!(KF[c]||r&&r[c]||l&&l[c]||o&&o[c])){var d=rq(n,c);try{eq(t,c,d)}catch(e){}}}}return t};function lq(){return(lq=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var sq=function(e,t){for(var n=[e[0]],r=0,a=t.length;r<a;r+=1)n.push(t[r],e[r+1]);return n},cq=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!ZI.exports.typeOf(e)},dq=Object.freeze([]),hq=Object.freeze({});function uq(e){return"function"==typeof e}function pq(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function fq(e){return e&&"string"==typeof e.styledComponentId}var mq="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",vq="undefined"!=typeof window&&"HTMLElement"in window,gq=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV)),bq="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function yq(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach(function(t){e=e.replace(/%[a-z]/,t)}),e}function wq(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(yq.apply(void 0,[bq[e]].concat(n)).trim())}var xq=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,a=r;e>=a;)(a<<=1)<0&&wq(16,""+e);this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var i=r;i<a;i++)this.groupSizes[i]=0}for(var o=this.indexOfGroup(e+1),l=0,s=t.length;l<s;l++)this.tag.insertRule(o,t[l])&&(this.groupSizes[e]++,o++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var a=n;a<r;a++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),a=r+n,i=r;i<a;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),Eq=new Map,kq=new Map,Cq=1,Sq=function(e){if(Eq.has(e))return Eq.get(e);for(;kq.has(Cq);)Cq++;var t=Cq++;return"production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&wq(16,""+t),Eq.set(e,t),kq.set(t,e),t},Mq=function(e){return kq.get(e)},Aq=function(e,t){t>=Cq&&(Cq=t+1),Eq.set(e,t),kq.set(t,e)},_q="style["+mq+'][data-styled-version="5.3.11"]',Oq=new RegExp("^"+mq+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),Nq=function(e,t,n){for(var r,a=n.split(","),i=0,o=a.length;i<o;i++)(r=a[i])&&e.registerName(t,r)},Zq=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],a=0,i=n.length;a<i;a++){var o=n[a].trim();if(o){var l=o.match(Oq);if(l){var s=0|parseInt(l[1],10),c=l[2];0!==s&&(Aq(c,s),Nq(e,c,l[3]),e.getTag().insertRules(s,r)),r.length=0}else r.push(o)}}},Dq=function(e){var t=document.head,n=e||t,r=document.createElement("style"),a=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(mq))return r}}(n),i=void 0!==a?a.nextSibling:null;r.setAttribute(mq,"active"),r.setAttribute("data-styled-version","5.3.11");var o="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},Iq=function(){function e(e){var t=this.element=Dq(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var a=t[n];if(a.ownerNode===e)return a}wq(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),Hq=function(){function e(e){var t=this.element=Dq(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),Tq=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Lq=vq,Pq={isServer:!vq,useCSSOMInjection:!gq},Vq=function(){function e(e,t,n){void 0===e&&(e=hq),void 0===t&&(t={}),this.options=lq({},Pq,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&vq&&Lq&&(Lq=!1,function(e){for(var t=document.querySelectorAll(_q),n=0,r=t.length;n<r;n++){var a=t[n];a&&"active"!==a.getAttribute(mq)&&(Zq(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}e.registerId=function(e){return Sq(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(lq({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,a=t.target,e=n?new Tq(a):r?new Iq(a):new Hq(a),new xq(e)));var e,t,n,r,a},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(Sq(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Sq(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(Sq(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",a=0;a<n;a++){var i=Mq(a);if(void 0!==i){var o=e.names.get(i),l=t.getGroup(a);if(o&&l&&o.size){var s=mq+".g"+a+'[id="'+i+'"]',c="";void 0!==o&&o.forEach(function(e){e.length>0&&(c+=e+",")}),r+=""+l+s+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),Bq=/(a)(d)/gi,jq=function(e){return String.fromCharCode(e+(e>25?39:97))};function zq(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=jq(t%52)+n;return(jq(t%52)+n).replace(Bq,"$1-$2")}var Rq=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Wq=function(e){return Rq(5381,e)};var Fq=Wq("5.3.11"),qq=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(uq(n)&&!fq(n))return!1}return!0}(e),this.componentId=t,this.baseHash=Rq(Fq,t),this.baseStyle=n,Vq.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,a=[];if(this.baseStyle&&a.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))a.push(this.staticRulesId);else{var i=iY(this.rules,e,t,n).join(""),o=zq(Rq(this.baseHash,i)>>>0);if(!t.hasNameForId(r,o)){var l=n(i,"."+o,void 0,r);t.insertRules(r,o,l)}a.push(o),this.staticRulesId=o}else{for(var s=this.rules.length,c=Rq(this.baseHash,n.hash),d="",h=0;h<s;h++){var u=this.rules[h];if("string"==typeof u)d+=u,"production"!==process.env.NODE_ENV&&(c=Rq(c,u+h));else if(u){var p=iY(u,e,t,n),f=Array.isArray(p)?p.join(""):p;c=Rq(c,f+h),d+=f}}if(d){var m=zq(c>>>0);if(!t.hasNameForId(r,m)){var v=n(d,"."+m,void 0,r);t.insertRules(r,m,v)}a.push(m)}}return a.join(" ")},e}(),Yq=/^\s*\/\/.*$/gm,Uq=[":","[",".","#"];var Gq=f.default.createContext();Gq.Consumer;var Xq=f.default.createContext(),Kq=(Xq.Consumer,new Vq),Jq=function(e){var t,n,r,a,i=void 0===e?hq:e,o=i.options,l=void 0===o?hq:o,s=i.plugins,c=void 0===s?dq:s,d=new WF(l),h=[],u=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,a,i,o,l,s,c,d,h){switch(n){case 1:if(0===d&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(a[0]+r),"";default:return r+(0===h?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}(function(e){h.push(e)}),p=function(e,r,i){return 0===r&&-1!==Uq.indexOf(i[n.length])||i.match(a)?e:"."+t};function f(e,i,o,l){void 0===l&&(l="&");var s=e.replace(Yq,""),c=i&&o?o+" "+i+" { "+s+" }":s;return t=l,n=i,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),d(o||!i?"":i,c)}return d.use([].concat(c,[function(e,t,a){2===e&&a.length&&a[0].lastIndexOf(n)>0&&(a[0]=a[0].replace(r,p))},u,function(e){if(-2===e){var t=h;return h=[],t}}])),f.hash=c.length?c.reduce(function(e,t){return t.name||wq(15),Rq(e,t.name)},5381).toString():"",f}();var Qq=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Jq);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return wq(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Jq),this.name+e.hash},e}(),$q=/([A-Z])/,eY=/([A-Z])/g,tY=/^ms-/,nY=function(e){return"-"+e.toLowerCase()};function rY(e){return $q.test(e)?e.replace(eY,nY).replace(tY,"-ms-"):e}var aY=function(e){return null==e||!1===e||""===e};function iY(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,l=e.length;o<l;o+=1)""!==(a=iY(e[o],t,n,r))&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(aY(e))return"";if(fq(e))return"."+e.styledComponentId;if(uq(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var s=e(t);return"production"!==process.env.NODE_ENV&&ZI.exports.isElement(s)&&console.warn(pq(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),iY(s,t,n,r)}var c;return e instanceof Qq?n?(e.inject(n,r),e.getName(r)):e:cq(e)?function e(t,n){var r,a,i=[];for(var o in t)t.hasOwnProperty(o)&&!aY(t[o])&&(Array.isArray(t[o])&&t[o].isCss||uq(t[o])?i.push(rY(o)+":",t[o],";"):cq(t[o])?i.push.apply(i,e(t[o],o)):i.push(rY(o)+": "+(r=o,(null==(a=t[o])||"boolean"==typeof a||""===a?"":"number"!=typeof a||0===a||r in FF||r.startsWith("--")?String(a).trim():a+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString()}var oY=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function lY(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return uq(e)||cq(e)?oY(iY(sq(dq,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:oY(iY(sq(e,n)))}var sY=/invalid hook call/i,cY=new Set,dY=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,hY=/(^-|-$)/g;function uY(e){return e.replace(dY,"-").replace(hY,"")}function pY(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var fY=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},mY=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function vY(e,t,n){var r=e[n];fY(t)&&fY(r)?gY(r,t):e[n]=t}function gY(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(fY(o))for(var l in o)mY(l)&&vY(e,o[l],l)}return e}var bY=f.default.createContext();bY.Consumer;var yY={};function wY(t,n,r){var a=fq(t),i=!pY(t),o=n.attrs,l=void 0===o?dq:o,s=n.componentId,c=void 0===s?function(e,t){var n="string"!=typeof e?"sc":uY(e);yY[n]=(yY[n]||0)+1;var r=n+"-"+function(e){return zq(Wq(e)>>>0)}("5.3.11"+n+yY[n]);return t?t+"-"+r:r}(n.displayName,n.parentComponentId):s,d=n.displayName,h=void 0===d?function(e){return pY(e)?"styled."+e:"Styled("+pq(e)+")"}(t):d,u=n.displayName&&n.componentId?uY(n.displayName)+"-"+n.componentId:n.componentId||c,p=a&&t.attrs?Array.prototype.concat(t.attrs,l).filter(Boolean):l,m=n.shouldForwardProp;a&&t.shouldForwardProp&&(m=n.shouldForwardProp?function(e,r,a){return t.shouldForwardProp(e,r,a)&&n.shouldForwardProp(e,r,a)}:t.shouldForwardProp);var v,g=new qq(r,u,a?t.componentStyle:void 0),b=g.isStatic&&0===l.length,y=function(t,n){return function(t,n,r,a){var i=t.attrs,o=t.componentStyle,l=t.defaultProps,s=t.foldedComponentIds,c=t.shouldForwardProp,d=t.styledComponentId,h=t.target,u=function(e,t,n){void 0===e&&(e=hq);var r=lq({},t,{theme:e}),a={};return n.forEach(function(e){var t,n,i,o=e;for(t in uq(o)&&(o=o(r)),o)r[t]=a[t]="className"===t?(n=a[t],i=o[t],n&&i?n+" "+i:n||i):o[t]}),[r,a]}(function(e,t,n){return void 0===n&&(n=hq),e.theme!==n.theme&&e.theme||t||n.theme}(n,e.useContext(bY),l)||hq,n,i),p=u[0],f=u[1],m=function(t,n,r,a){var i=e.useContext(Gq)||Kq,o=e.useContext(Xq)||Jq,l=n?t.generateAndInjectStyles(hq,i,o):t.generateAndInjectStyles(r,i,o);return"production"!==process.env.NODE_ENV&&!n&&a&&a(l),l}(o,a,p,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=r,g=f.$as||n.$as||f.as||n.as||h,b=pY(g),y=f!==n?lq({},n,{},f):n,w={};for(var x in y)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?w.as=y[x]:(c?c(x,UF,g):!b||UF(x))&&(w[x]=y[x]));return n.style&&f.style!==n.style&&(w.style=lq({},n.style,{},f.style)),w.className=Array.prototype.concat(s,d,m!==d?m:null,n.className,f.className).filter(Boolean).join(" "),w.ref=v,e.createElement(g,w)}(v,t,n,b)};return y.displayName=h,(v=f.default.forwardRef(y)).attrs=p,v.componentStyle=g,v.displayName=h,v.shouldForwardProp=m,v.foldedComponentIds=a?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):dq,v.styledComponentId=u,v.target=a?t.target:t,v.withComponent=function(e){var t=n.componentId,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["componentId"]),i=t&&t+"-"+(pY(e)?e:uY(pq(e)));return wY(e,lq({},a,{attrs:p,componentId:i}),r)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=a?gY({},t.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(function(t,n){if("production"!==process.env.NODE_ENV){var r="The component "+t+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",a=console.error;try{var i=!0;console.error=function(e){if(sY.test(e))i=!1,cY.delete(r);else{for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];a.apply(void 0,[e].concat(n))}},e.useRef(),i&&!cY.has(r)&&(console.warn(r),cY.add(r))}catch(t){sY.test(t.message)&&cY.delete(r)}finally{console.error=a}}}(h,u),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(a){if(!r&&(n[a]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+i+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(h,u)),Object.defineProperty(v,"toString",{value:function(){return"."+v.styledComponentId}}),i&&oq(v,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var xY=function(e){return function e(t,n,r){if(void 0===r&&(r=hq),!ZI.exports.isValidElementType(n))return wq(1,String(n));var a=function(){return t(n,r,lY.apply(void 0,arguments))};return a.withConfig=function(a){return e(t,n,lq({},r,{},a))},a.attrs=function(a){return e(t,n,lq({},r,{attrs:Array.prototype.concat(r.attrs,a).filter(Boolean)}))},a}(wY,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){xY[e]=xY(e)}),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);var EY,kY=xY,CY={};Object.defineProperty(CY,"__esModule",{value:!0});var SY=f.default;var MY,AY=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(SY),_Y=function(){return _Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},_Y.apply(this,arguments)};function OY(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function NY(){}function ZY(e){var t,n=void 0;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r))}}function DY(e){return!!(e||"").match(/\d/)}function IY(e){return null==e}function HY(e){return"number"==typeof e&&isNaN(e)}function TY(e){return IY(e)||HY(e)||"number"==typeof e&&!isFinite(e)}function LY(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function PY(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function VY(e,t,n){var r=PY(n),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}function BY(e){var t=SY.useRef(e);t.current=e;var n=SY.useRef(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.current.apply(t,e)});return n.current}function jY(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:n,addNegation:r}}function zY(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return"".concat(t?"-":"").concat(r).concat(a?".".concat(a):"")}function RY(e,t,n){for(var r="",a=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||a;return r}function WY(e,t){return Array(t+1).join(e)}function FY(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],i=r[1];if(!(i=Number(i)))return n+a;var o=1+i,l=(a=a.replace(".","")).length;return o<0?a="0."+WY("0",Math.abs(o))+a:o>=l?a+=WY("0",o-l):a=(a.substring(0,o)||"0")+"."+a.substring(o),n+a}function qY(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,a=jY(e),i=a.beforeDecimal,o=a.afterDecimal,l=a.hasNegation,s=parseFloat("0.".concat(o||"0")),c=(o.length<=t?"0.".concat(o):s.toFixed(t)).split("."),d=i;i&&Number(c[0])&&(d=i.split("").reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},c[0]));var h=RY(c[1]||"",t,n),u=r?".":"";return"".concat(l?"-":"").concat(d).concat(u).concat(h)}function YY(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.event="event",e.props="prop"}(MY||(MY={}));var UY=ZY(function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:i-r}}});function GY(e,t,n){return Math.min(Math.max(e,t),n)}function XY(e){return Math.max(e.selectionStart,e.selectionEnd)}function KY(){return"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function JY(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function QY(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function $Y(e,t,n,r,a,i,o){void 0===o&&(o=QY);var l=a.findIndex(function(e){return e}),s=e.slice(0,l);t||n.startsWith(s)||(t=s,n=s+n,r+=s.length);for(var c=n.length,d=e.length,h={},u=new Array(c),p=0;p<c;p++){u[p]=-1;for(var f=0,m=d;f<m;f++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:f})&&!0!==h[f]){u[p]=f,h[f]=!0;break}}for(var v=r;v<c&&(-1===u[v]||!i(n[v]));)v++;var g=v===c||-1===u[v]?d:u[v];for(v=r-1;v>0&&-1===u[v];)v--;var b=-1===v||-1===u[v]?0:u[v]+1;return b>g?g:r-b<g-r?b:g}function eU(e,t,n,r){var a=e.length;if(t=GY(t,0,a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return-1===t&&(t=a),t}function tU(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=Boolean(DY(e[n])||DY(e[n-1]));return t}function nU(e,t,n,r,a,i){void 0===i&&(i=NY);var o=BY(function(e,t){var n,i;return TY(e)?(i="",n=""):"number"==typeof e||t?(i="number"==typeof e?FY(e):e,n=r(i)):(i=a(e,void 0),n=r(i)),{formattedValue:n,numAsString:i}}),l=SY.useState(function(){return o(IY(e)?t:e,n)}),s=l[0],c=l[1],d=e,h=n;IY(e)&&(d=s.numAsString,h=!0);var u=o(d,h);return SY.useMemo(function(){c(u)},[u.formattedValue]),[s,function(e,t){e.formattedValue!==s.formattedValue&&c({formattedValue:e.formattedValue,numAsString:e.value}),i(e,t)}]}function rU(e){return e.replace(/[^0-9]/g,"")}function aU(e){return e}function iU(e){var t=e.type,n=void 0===t?"text":t,r=e.displayType,a=void 0===r?"input":r,i=e.customInput,o=e.renderText,l=e.getInputRef,s=e.format,c=void 0===s?aU:s,d=e.removeFormatting,h=void 0===d?rU:d,u=e.defaultValue,p=e.valueIsNumericString,f=e.onValueChange,m=e.isAllowed,v=e.onChange,g=void 0===v?NY:v,b=e.onKeyDown,y=void 0===b?NY:b,w=e.onMouseUp,x=void 0===w?NY:w,E=e.onFocus,k=void 0===E?NY:E,C=e.onBlur,S=void 0===C?NY:C,M=e.value,A=e.getCaretBoundary,_=void 0===A?tU:A,O=e.isValidInputCharacter,N=void 0===O?DY:O,Z=e.isCharacterSame,D=e.min,I=e.max,H=e.placeholder,T=e.autoFocus,L=OY(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame","min","max","placeholder","autoFocus"]),P=nU(M,u,Boolean(p),c,h,f),V=P[0],B=V.formattedValue,j=V.numAsString,z=P[1],R=SY.useRef({formattedValue:B,numAsString:j}),W=function(e,t){R.current={formattedValue:e.formattedValue,numAsString:e.value},z(e,t)},F=SY.useState(!1),q=F[0],Y=F[1],U=SY.useRef(null),G=SY.useRef({setCaretTimeout:null,focusTimeout:null});SY.useEffect(function(){return Y(!0),function(){clearTimeout(G.current.setCaretTimeout),clearTimeout(G.current.focusTimeout)}},[]);var X=c,K=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},J=function(e,t,n){0===e.selectionStart&&e.selectionEnd===e.value.length||(YY(e,t),G.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&YY(e,t)},0))},Q=function(e,t,n){return eU(e,t,_(e),n)},$=function(e,t,n){var r=_(t),a=$Y(t,B,e,n,r,N,Z);return eU(t,a,r)};SY.useEffect(function(){var e=R.current,t=e.formattedValue,n=e.numAsString;B===t||B===j&&t===n||W(K(B,j),{event:void 0,source:MY.props})},[B,j]);var ee=U.current?XY(U.current):void 0;("undefined"!=typeof window?SY.useLayoutEffect:SY.useEffect)(function(){var e=U.current;if(B!==R.current.formattedValue&&e){var t=$(R.current.formattedValue,B,ee);e.value=B,J(e,t,B)}},[B]);var te=q&&KY()?"numeric":void 0,ne=Object.assign({inputMode:te},L,{type:n,placeholder:H,autoFocus:T,value:B,onChange:function(e){(function(e,t,n){var r=UY(B,e),a=_Y(_Y({},r),{lastValue:B}),i=h(e,a),o=X(i);if(i=h(o,void 0),m&&!m(K(o,i))){var l=t.target,s=XY(l),c=$(e,B,s);return l.value=B,J(l,c,B),!1}return function(e){var t,n=e.formattedValue,r=void 0===n?"":n,a=e.input,i=e.source,o=e.event,l=e.numAsString;if(a){var s=e.inputValue||a.value,c=XY(a);a.value=r,void 0!==(t=$(s,r,c))&&J(a,t,r)}r!==B&&W(K(r,l),{event:o,source:i})}({formattedValue:o,numAsString:i,inputValue:e,event:t,source:n,input:t.target}),!0})(e.target.value,e,MY.event)&&g(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,a=n.selectionStart,i=n.selectionEnd,o=n.value,l=void 0===o?"":o;if("ArrowLeft"===r||"Backspace"===r?t=Math.max(a-1,0):"ArrowRight"===r?t=Math.min(a+1,l.length):"Delete"===r&&(t=a),void 0!==t&&a===i){var s=t;"ArrowLeft"===r||"ArrowRight"===r?(s=Q(l,t,"ArrowLeft"===r?"left":"right"))!==t&&e.preventDefault():"Delete"!==r||N(l[t])?"Backspace"!==r||N(l[t])||(s=Q(l,t,"left")):s=Q(l,t,"right"),s!==t&&J(n,s,l),e.isUnitTestRun&&J(n,s,l),y(e)}else y(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,a=t.value,i=void 0===a?"":a;if(n===r){var o=Q(i,n);o!==n&&J(t,o,i)}x(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;U.current=t,G.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,a=t.selectionEnd,i=t.value,o=void 0===i?"":i,l=Q(o,r);l===r||0===r&&a===o.length||J(t,l,o),k(_Y(_Y({},e),{currentTarget:n}))},0)},onBlur:function(e){U.current=null,clearTimeout(G.current.focusTimeout),clearTimeout(G.current.setCaretTimeout);var t=UY(B,e.target.value),n=_Y(_Y({},t),{lastValue:B}),r=h(e.target.value,n);(D||0===D||I||0===I)&&""!==e.target.value?((D||0===D)&&Number(r)<=D&&(e.target.value=D.toString(),S(e)),(I||0===I)&&Number(r)>=I&&(e.target.value=I.toString(),S(e))):S(e)}});if("text"===a)return o?AY.default.createElement(AY.default.Fragment,null,o(B,L)||null):AY.default.createElement("span",_Y({},L,{ref:l}),B);if(i){var re=i;return AY.default.createElement(re,_Y({},ne,{ref:l}))}return AY.default.createElement("input",_Y({},ne,{ref:l}))}function oU(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix,i=void 0===a?"":a,o=t.suffix,l=void 0===o?"":o,s=t.allowNegative,c=t.thousandsGroupStyle,d=void 0===c?"thousand":c;if(""===e||"-"===e)return e;var h=lU(t),u=h.thousandSeparator,p=h.decimalSeparator,f=0!==n&&-1!==e.indexOf(".")||n&&r,m=jY(e,s),v=m.beforeDecimal,g=m.afterDecimal,b=m.addNegation;return void 0!==n&&(g=RY(g,n,!!r)),u&&(v=VY(v,u,d)),i&&(v=i+v),l&&(g+=l),b&&(v="-".concat(v)),v+(f&&p||"")+g}function lU(e){var t=e.decimalSeparator,n=void 0===t?".":t,r=e.thousandSeparator,a=e.allowedDecimalSeparators;return!0===r&&(r=","),a||(a=[n,"."]),{decimalSeparator:n,thousandSeparator:r,allowedDecimalSeparators:a}}function sU(e,t,n){void 0===t&&(t=JY(e));var r=n.allowNegative,a=n.prefix,i=void 0===a?"":a,o=n.suffix,l=void 0===o?"":o,s=n.decimalScale,c=t.from,d=t.to,h=d.start,u=d.end,p=lU(n),f=p.allowedDecimalSeparators,m=p.decimalSeparator,v=e[u]===m;if(DY(e)&&(e===i||e===l)&&""===t.lastValue)return e;if(u-h==1&&-1!==f.indexOf(e[h])){var g=0===s?"":m;e=e.substring(0,h)+g+e.substring(h+1,e.length)}var b=function(e,t,n){var r=!1,a=!1;i.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,a=!0):l.startsWith("-")&&e.length===l.length?r=!1:"-"===e[0]&&(r=!0);var o=r?1:0;return a&&(o=2),o&&(e=e.substring(o),t-=o,n-=o),{value:e,start:t,end:n,hasNegation:r}},y=b(e,h,u),w=y.hasNegation;e=y.value,h=y.start,u=y.end;var x=b(t.lastValue,c.start,c.end),E=x.start,k=x.end,C=x.value,S=e.substring(h,u);!(e.length&&C.length&&(E>C.length-l.length||k<i.length))||S&&l.startsWith(S)||(e=C);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),u-=M;var A=(e=e.substring(M)).length,_=e.length-l.length;e.endsWith(l)?A=_:(u>_||u>e.length-l.length)&&(A=u),e=e.substring(0,A),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-".concat(e)),e}(w?"-".concat(e):e,r);var O=(e=(e.match(function(e){return new RegExp("(^-)|[0-9]|".concat(LY(e)),"g")}(m))||[]).join("")).indexOf(m),N=jY(e=e.replace(new RegExp(LY(m),"g"),function(e,t){return t===O?".":""}),r),Z=N.beforeDecimal,D=N.afterDecimal,I=N.addNegation;return d.end-d.start<c.end-c.start&&""===Z&&v&&!parseFloat(D)&&(e=I?"-":""),e}function cU(e,t){var n=t.prefix,r=void 0===n?"":n,a=t.suffix,i=void 0===a?"":a,o=Array.from({length:e.length+1}).map(function(){return!0}),l="-"===e[0];o.fill(!1,0,r.length+(l?1:0));var s=e.length;return o.fill(!1,s-i.length+1,s+1),o}function dU(e){e=function(e){var t=lU(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix,i=void 0===a?"":a,o=e.allowNegative,l=void 0===o||o;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));return i.startsWith("-")&&l&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: ".concat(i,"\n allowNegative: ").concat(l,"\n ")),l=!1),_Y(_Y({},e),{allowNegative:l})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown,i=void 0===a?NY:a,o=e.onBlur,l=void 0===o?NY:o,s=e.thousandSeparator,c=e.decimalScale,d=e.fixedDecimalScale,h=e.prefix,u=void 0===h?"":h,p=e.defaultValue,f=e.value,m=e.valueIsNumericString,v=e.onValueChange,g=OY(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),b=lU(e),y=b.decimalSeparator,w=b.allowedDecimalSeparators,x=function(t){return oU(t,e)},E=function(t,n){return sU(t,n,e)},k=IY(f)?p:f,C=null!=m?m:function(e,t,n){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==n?void 0:n.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(k,u,t);IY(f)?IY(p)||(C=C||"number"==typeof p):C=C||"number"==typeof f;var S=function(e){return TY(e)?e:("number"==typeof e&&(e=FY(e)),C&&"number"==typeof c?qY(e,c,Boolean(d)):e)},M=nU(S(f),S(p),Boolean(C),x,E,v),A=M[0],_=A.numAsString,O=A.formattedValue,N=M[1];return _Y(_Y({},g),{value:O,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===y||DY(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,a=e.currentValueIndex,i=e.formattedValueIndex,o=t[a],l=r[i],s=UY(n,t).to;return!!(a>=s.start&&a<s.end&&w&&w.includes(o)&&l===y)||o===l},onValueChange:N,format:x,removeFormatting:E,getCaretBoundary:function(t){return cU(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,o=t.selectionEnd,l=t.value,h=void 0===l?"":l;if(a===o){"Backspace"===r&&"-"===h[0]&&a===u.length+1&&n&&YY(t,1),c&&d&&("Backspace"===r&&h[a-1]===y?(YY(t,a-1),e.preventDefault()):"Delete"===r&&h[a]===y&&e.preventDefault()),(null==w?void 0:w.includes(r))&&h[a]===y&&YY(t,a+1);var p=!0===s?",":s;"Backspace"===r&&h[a-1]===p&&YY(t,a-1),"Delete"===r&&h[a]===p&&YY(t,a+1),i(e)}else i(e)},onBlur:function(t){var n=_;if(n.match(/\d/g)||(n=""),r||(n=zY(n)),d&&c&&(n=qY(n,c,d)),n!==_){var a=oU(n,e);N({formattedValue:a,value:n,floatValue:parseFloat(n)},{event:t,source:MY.event})}l(t)}})}CY.NumberFormatBase=iU,CY.NumericFormat=function(e){var t=dU(e);return AY.default.createElement(iU,_Y({},t))},CY.addInputMode=KY,CY.applyThousandSeparator=VY,CY.caretUnknownFormatBoundary=tU,CY.charIsNumber=DY,CY.clamp=GY,CY.escapeRegExp=LY,CY.findChangeRange=UY,CY.findChangedIndex=function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{start:n,end:a-r}},CY.fixLeadingZero=zY,CY.geInputCaretPosition=XY,CY.getCaretPosInBoundary=eU,CY.getCaretPosition=$Y,CY.getDefaultChangeMeta=JY,CY.getMaskAtIndex=function(e,t){return void 0===e&&(e=" "),"string"==typeof e?e:e[t]||" "},CY.getNumericCaretBoundary=cU,CY.getThousandsGroupRegex=PY,CY.isNanValue=HY,CY.isNil=IY,CY.isNotValidValue=TY,CY.limitToScale=RY,CY.memoizeOnce=ZY,CY.noop=NY,EY=CY.numericFormatter=oU,CY.removeNumericFormat=sU,CY.returnTrue=function(){return!0},CY.roundToPrecision=qY,CY.setCaretPosition=YY,CY.splitDecimal=jY,CY.toNumericString=FY,CY.useInternalValues=nU,CY.useNumericFormat=dU,CY.usePersistentCallback=BY;const hU=kY.table`
|
|
92
|
-
thead {
|
|
93
|
-
th.header-cell {
|
|
94
|
-
line-height: normal;
|
|
95
|
-
&.header-selected {
|
|
96
|
-
background-color: #eb461912;
|
|
97
|
-
}
|
|
98
|
-
&.header-first-top {
|
|
99
|
-
//border-top-color: #000 !important;
|
|
100
|
-
border-top-color: #eb4619 !important;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
&.header-first-left {
|
|
105
|
-
border-inline-start-color: #eb4619 !important;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&.header-last-bottom {
|
|
109
|
-
border-bottom-color: #eb4619 !important;
|
|
110
|
-
}
|
|
111
|
-
&.header-last-right {
|
|
112
|
-
border-inline-end-color: #eb4619 !important;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
&.header-content-selected {
|
|
116
|
-
border-bottom-color: #eb4619 !important;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
tbody {
|
|
122
|
-
td.td-cell {
|
|
123
|
-
overflow: hidden;
|
|
124
|
-
white-space: nowrap;
|
|
125
|
-
text-overflow: ellipsis;
|
|
126
|
-
|
|
127
|
-
&.td-selected {
|
|
128
|
-
background-color: #eb461912;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&.td-first-top {
|
|
132
|
-
border-top: 1px solid #eb4619 !important;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
&.td-first-left {
|
|
136
|
-
border-inline-start-color: #eb4619 !important;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
&.td-last-bottom {
|
|
140
|
-
border-bottom-color: #eb4619 !important;
|
|
141
|
-
}
|
|
142
|
-
&.td-last-right {
|
|
143
|
-
border-inline-end-color: #eb4619 !important;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&.footer-select {
|
|
147
|
-
border-bottom-color: #eb4619 !important;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
tfoot {
|
|
153
|
-
td.td-cell {
|
|
154
|
-
&.td-selected {
|
|
155
|
-
background-color: #eb461912;
|
|
156
|
-
}
|
|
157
|
-
&.td-first-top {
|
|
158
|
-
border-top: 1px solid #eb4619 !important;
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
&.td-first-left {
|
|
163
|
-
border-inline-start-color: #eb4619 !important;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
&.td-last-bottom {
|
|
167
|
-
border-bottom-color: #eb4619 !important;
|
|
168
|
-
}
|
|
169
|
-
&.td-last-right {
|
|
170
|
-
border-inline-end-color: #eb4619 !important;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
`,uU=t=>{const{t:n,typeEdit:a,currentLayout:i,layout:o,dataTable:l,formatNumber:s,onClick:c,onSectionClick:d,styles:h,currentItem:u,setCurrentItem:p}=t,f=xF(o.table?.columns??[]).findIndex(e=>o.table?.fieldSums.includes(e.field)),m=e=>{p(e),d?.(e)},v=(e,t,n)=>{const r=t[e.field??""]?.toString();if("stt"===e.field)return n+1;if("number"===e.dataType){const t={thousandSeparator:bF(s?.thousandSeparator??".",s?.decimalSeparator??","),decimalSeparator:yF(s?.thousandSeparator??".",s?.decimalSeparator??","),prefix:s?.prefixNegative,suffix:s?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(r)?EY(r,t):0}return"date"===e.dataType?e.format?gF(r,e.format):gF(r,"dd/MM/yyyy HH:mm"):r},g=(t,n)=>r.jsx(e.Fragment,{children:r.jsx("td",{className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"summary"===u}),style:{textAlign:"right",color:o.table?.summary?.color??h?.color??"#000",fontFamily:o.table?.summary.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.summary.fontSize??h?.fontSize??11),fontWeight:o.table?.summary.bold??h?.bold?"bold":"normal",fontStyle:o.table?.summary.italic??h?.italic?"italic":"normal",textDecoration:o.table?.summary.underline??h?.underline?"underline":"none",padding:"0 0.5rem",lineHeight:"1.5",borderInlineEnd:"1px solid",borderInlineStart:0===n?"1px solid":"",borderBottom:"1px solid",borderColor:h?.color??"#000"},children:o.table?.fieldSums.includes(t.field??"")&&(()=>{const e=(n=l,r=t.field??"",n&&n.length>0?n.reduce((e,t)=>e+("number"!=typeof t[r]&&isNaN(t[r])?0:Number(t[r])),0):0);var n,r;const a=(e=>null==e||""===e)(e)?"0":parseFloat(Number(e).toFixed(t.fraction??2)).toString(),i={thousandSeparator:bF(s?.thousandSeparator??".",s?.decimalSeparator??","),decimalSeparator:yF(s?.thousandSeparator??".",s?.decimalSeparator??","),prefix:s?.prefixNegative,suffix:s?.suffixNegative,decimalScale:t.fraction??2,fixedDecimalScale:!!t.fraction};return"number"===t.dataType?EY(a,i):0})()})},`summary-cell-${n}`);return r.jsx(e.Fragment,{children:r.jsx("div",{className:sj("h-100 grid-item-container grid-item-table align-items-center",{active:"layout"===a,selected:"section"===a&&i?.id===o.id}),style:{minHeight:23*(o.rows??1)},onClick:c,children:r.jsxs(hU,{style:{width:"100%",minWidth:"100%"},children:[r.jsx("thead",{className:"",children:kF(o.table?.columns??[]).map((e,t)=>r.jsx("tr",{children:e.map((l,s)=>r.jsx("th",{className:sj("header-cell",{"header-selected":i&&i.id===o.id&&"header"===u,"header-first-top":i&&i.id===o.id&&"header"===u&&0===t,"header-last-bottom":i&&i.id===o.id&&"header"===u&&(!l.children||t===kF(o.table?.columns??[]).length-1),"header-first-left":i&&i.id===o.id&&"header"===u&&0===s,"header-last-right":i&&i.id===o.id&&"header"===u&&0===t&&s===e.length-1,"header-content-selected":i&&i.id===o.id&&"content"===u&&(!l.children||t===kF(o.table?.columns??[]).length-1)}),onClick:e=>{"section"===a?m("header"):e.preventDefault()},style:{textAlign:"center",color:o.table?.header?.color??h?.color??"#000",fontFamily:o.table?.header.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.header.fontSize??h?.fontSize??11),fontWeight:o.table?.header.bold??h?.bold?"bold":"normal",fontStyle:o.table?.header.italic??h?.italic?"italic":"normal",textDecoration:o.table?.header.underline??h?.underline?"underline":"none",width:l.width,height:23,borderInlineEnd:"1px solid #000",borderInlineStart:0===s?"1px solid #000":void 0,borderBottom:"1px solid #000",borderTop:0===t?"1px solid #000":void 0,maxHeight:23,borderColor:h?.color??"#000"},scope:"col",rowSpan:l.rowspan,colSpan:l.colspan,children:n(l.headerDisplay??l.headerText??"")},s))},t))}),r.jsx("tbody",{className:"be-table-tbody",children:(o.table?.isTotalTable&&o.table?.fieldTotalTable?.length>0?NF(l,o.table?.columns?.map(e=>e.field??"")??[],o.table?.fieldTotalTable??[]):l)?.map((e,t)=>r.jsx("tr",{className:"be-table-row",children:xF(o.table?.columns??[]).map((n,s)=>r.jsx("td",{onClick:e=>{"section"===a?m("content"):e.preventDefault()},className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"content"===u,"td-first-top":i&&i.id===o.id&&"content"===u&&0===t,"td-last-bottom":i&&i.id===o.id&&"content"===u&&t===l.length-1,"td-first-left":i&&i.id===o.id&&"content"===u&&0===s,"td-last-right":i&&i.id===o.id&&"content"===u&&s===xF(o.table?.columns??[]).length-1,"footer-select":i&&i.id===o.id&&"summary"===u&&t===l.length-1}),style:{textAlign:"stt"===n.field?"center":"number"===n.dataType?"right":"left",color:o.table?.content?.color??h?.color??"#000",fontFamily:o.table?.content.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.content.fontSize??h?.fontSize??11),fontWeight:o.table?.content.bold??h?.bold?"bold":"normal",fontStyle:o.table?.content.italic??h?.italic?"italic":"normal",textDecoration:o.table?.content.underline??h?.underline?"underline":"none",padding:"0 0.5rem",maxWidth:n.width,width:n.width,height:23,borderInlineEnd:"1px solid #000",borderInlineStart:0===s?"1px solid #000":void 0,borderBottom:"1px solid #000",borderColor:h?.color??"#000"},children:v(n,e,t)},`col-${t}-${s}`))},`row-${t}`))}),(f??0)>0&&r.jsx("tfoot",{className:"be-table-tfoot",children:r.jsxs("tr",{onClick:e=>{"section"===a?m("summary"):e.preventDefault()},className:"be-table-row be-table-row-level-0",children:[r.jsx("td",{className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"summary"===u,"td-first-top":i&&i.id===o.id&&"summary"===u,"td-last-bottom":i&&i.id===o.id&&"summary"===u,"td-first-left":i&&i.id===o.id&&"summary"===u,"td-last-right":!1}),style:{textAlign:"left",color:o.table?.summary?.color??h?.color??"#000",fontFamily:o.table?.summary.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.summary.fontSize??h?.fontSize??11),fontWeight:o.table?.summary.bold??h?.bold?"bold":"normal",fontStyle:o.table?.summary.italic??h?.italic?"italic":"normal",textDecoration:o.table?.summary.underline??h?.underline?"underline":"none",padding:"0 0.5rem",lineHeight:"1.5",height:23,borderInlineEnd:"1px solid #000",borderInlineStart:"1px solid #000",borderBottom:"1px solid #000",borderColor:h?.color??"#000"},colSpan:f??0,children:"Tổng"}),xF(o.table?.columns??[]).slice(f??0).map((e,t)=>g(e,t))]})})]})})})};var pU={exports:{}},fU={};function mU(e){return function(t,n,r,a,i,o,l){return e(t,n,l)}}function vU(e){return function(t,n,r,a){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,a);var i=a.get(t),o=a.get(n);if(i&&o)return i===n&&o===t;a.set(t,n),a.set(n,t);var l=e(t,n,r,a);return a.delete(t),a.delete(n),l}}function gU(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function bU(e){return e.constructor===Object||null==e.constructor}function yU(e){return"function"==typeof e.then}function wU(e,t){return e===t||e!=e&&t!=t}var xU=Object.prototype.toString;function EU(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,a=e.areObjectsEqual,i=e.areRegExpsEqual,o=e.areSetsEqual,l=(0,e.createIsNestedEqual)(s);function s(e,s,c){if(e===s)return!0;if(!e||!s||"object"!=typeof e||"object"!=typeof s)return e!=e&&s!=s;if(bU(e)&&bU(s))return a(e,s,l,c);var d=Array.isArray(e),h=Array.isArray(s);if(d||h)return d===h&&t(e,s,l,c);var u=xU.call(e);return u===xU.call(s)&&("[object Date]"===u?n(e,s,l,c):"[object RegExp]"===u?i(e,s,l,c):"[object Map]"===u?r(e,s,l,c):"[object Set]"===u?o(e,s,l,c):"[object Object]"===u||"[object Arguments]"===u?!yU(e)&&!yU(s)&&a(e,s,l,c):("[object Boolean]"===u||"[object Number]"===u||"[object String]"===u)&&wU(e.valueOf(),s.valueOf()))}return s}function kU(e,t,n,r){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!n(e[a],t[a],a,a,e,t,r))return!1;return!0}var CU=vU(kU);function SU(e,t){return wU(e.valueOf(),t.valueOf())}function MU(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var i={},o=0;return e.forEach(function(l,s){if(a){var c=!1,d=0;t.forEach(function(a,h){c||i[d]||!(c=n(s,h,o,d,e,t,r)&&n(l,a,s,h,e,t,r))||(i[d]=!0),d++}),o++,a=c}}),a}var AU=vU(MU),_U=Object.prototype.hasOwnProperty;function OU(e,t,n,r){var a,i=Object.keys(e),o=i.length;if(Object.keys(t).length!==o)return!1;for(;o-- >0;){if("_owner"===(a=i[o])){var l=!!e.$$typeof,s=!!t.$$typeof;if((l||s)&&l!==s)return!1}if(!_U.call(t,a)||!n(e[a],t[a],a,a,e,t,r))return!1}return!0}var NU=vU(OU);function ZU(e,t){return e.source===t.source&&e.flags===t.flags}function DU(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var i={};return e.forEach(function(o,l){if(a){var s=!1,c=0;t.forEach(function(a,d){s||i[c]||!(s=n(o,a,l,d,e,t,r))||(i[c]=!0),c++}),a=s}}),a}var IU=vU(DU),HU=Object.freeze({areArraysEqual:kU,areDatesEqual:SU,areMapsEqual:MU,areObjectsEqual:OU,areRegExpsEqual:ZU,areSetsEqual:DU,createIsNestedEqual:mU}),TU=Object.freeze({areArraysEqual:CU,areDatesEqual:SU,areMapsEqual:AU,areObjectsEqual:NU,areRegExpsEqual:ZU,areSetsEqual:IU,createIsNestedEqual:mU}),LU=EU(HU);var PU=EU(gU(HU,{createIsNestedEqual:function(){return wU}}));var VU=EU(TU);var BU=EU(gU(TU,{createIsNestedEqual:function(){return wU}}));var jU=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return VU(e,t,new WeakMap)},circularShallowEqual:function(e,t){return BU(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=EU(gU(TU,e(TU)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return EU(gU(HU,e(HU)))},deepEqual:function(e,t){return LU(e,t,void 0)},sameValueZeroEqual:wU,shallowEqual:function(e,t){return PU(e,t,void 0)}}),zU=OI(jU),RU={exports:{}};function WU(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=WU(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function FU(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=WU(e))&&(r&&(r+=" "),r+=t);return r}RU.exports=FU,RU.exports.clsx=FU;var qU={};Object.defineProperty(qU,"__esModule",{value:!0}),qU.bottom=XU,qU.childrenEqual=function(e,t){return(0,YU.deepEqual)(UU.default.Children.map(e,e=>e?.key),UU.default.Children.map(t,e=>e?.key))&&(0,YU.deepEqual)(UU.default.Children.map(e,e=>e?.props["data-grid"]),UU.default.Children.map(t,e=>e?.props["data-grid"]))},qU.cloneLayout=KU,qU.cloneLayoutItem=QU,qU.collides=$U,qU.compact=eG,qU.compactItem=rG,qU.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},qU.correctBounds=aG,qU.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},qU.fastRGLPropsEqual=void 0,qU.getAllCollisions=lG,qU.getFirstCollision=oG,qU.getLayoutItem=iG,qU.getStatics=sG,qU.modifyLayout=JU,qU.moveElement=cG,qU.moveElementAwayFromCollision=dG,qU.noop=void 0,qU.perc=function(e){return 100*e+"%"},qU.resizeItemInDirection=function(e,t,n,r){const a=yG[e];return a?a(t,{...t,...n},r):n},qU.setTopLeft=function(e){let{top:t,left:n,width:r,height:a}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${a}px`,position:"absolute"}},qU.setTransform=function(e){let{top:t,left:n,width:r,height:a}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${a}px`,position:"absolute"}},qU.sortLayoutItems=wG,qU.sortLayoutItemsByColRow=EG,qU.sortLayoutItemsByRowCol=xG,qU.synchronizeLayoutWithChildren=function(e,t,n,r,a){e=e||[];const i=[];UU.default.Children.forEach(t,t=>{if(null==t?.key)return;const n=iG(e,String(t.key)),r=t.props["data-grid"];n&&null==r?i.push(QU(n)):r?(GU||kG([r],"ReactGridLayout.children"),i.push(QU({...r,i:t.key}))):i.push(QU({w:1,h:1,x:0,y:XU(i),i:String(t.key)}))});const o=aG(i,{cols:n});return a?o:eG(o,r,n)},qU.validateLayout=kG,qU.withLayoutItem=function(e,t,n){let r=iG(e,t);return r?(r=n(QU(r)),[e=JU(e,r),r]):[e,null]};var YU=zU,UU=function(e){return e&&e.__esModule?e:{default:e}}(f.default);const GU="production"===process.env.NODE_ENV;function XU(e){let t,n=0;for(let r=0,a=e.length;r<a;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function KU(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=QU(e[n]);return t}function JU(e,t){const n=Array(e.length);for(let r=0,a=e.length;r<a;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function QU(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function $U(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function eG(e,t,n,r){const a=sG(e),i=wG(e,t),o=Array(e.length);for(let l=0,s=i.length;l<s;l++){let s=QU(i[l]);s.static||(s=rG(a,s,t,n,i,r),a.push(s)),o[e.indexOf(i[l])]=s,s.moved=!1}return o}qU.fastRGLPropsEqual=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)};const tG={x:"w",y:"h"};function nG(e,t,n,r){const a=tG[r];t[r]+=1;for(let i=e.map(e=>e.i).indexOf(t.i)+1;i<e.length;i++){const o=e[i];if(!o.static){if(o.y>t.y+t.h)break;$U(t,o)&&nG(e,o,n+t[a],r)}}t[r]=n}function rG(e,t,n,r,a,i){const o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(XU(e),t.y);t.y>0&&!oG(e,t);)t.y--;else if(o)for(;t.x>0&&!oG(e,t);)t.x--;let l;for(;(l=oG(e,t))&&(null!==n||!i);)if(o?nG(a,t,l.x+l.w,"x"):nG(a,t,l.y+l.h,"y"),o&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!oG(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function aG(e,t){const n=sG(e);for(let r=0,a=e.length;r<a;r++){const a=e[r];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),a.static)for(;oG(n,a);)a.y++;else n.push(a)}return e}function iG(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function oG(e,t){for(let n=0,r=e.length;n<r;n++)if($U(e[n],t))return e[n]}function lG(e,t){return e.filter(e=>$U(e,t))}function sG(e){return e.filter(e=>e.static)}function cG(e,t,n,r,a,i,o,l,s){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const c=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=wG(e,o);("vertical"===o&&"number"==typeof r?d>=r:"horizontal"===o&&"number"==typeof n&&c>=n)&&(h=h.reverse());const u=lG(h,t),p=u.length>0;if(p&&s)return KU(e);if(p&&i)return t.i,t.x=c,t.y=d,t.moved=!1,e;for(let n=0,r=u.length;n<r;n++){const r=u[n];CG((t.i,t.x,t.y,r.i,r.x,r.y)),r.moved||(e=r.static?dG(e,r,t,a,o):dG(e,t,r,a,o))}return e}function dG(e,t,n,r,a,i){const o="horizontal"===a,l="vertical"===a,s=t.static;if(r){r=!1;const i={x:o?Math.max(t.x-n.w,0):n.x,y:l?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=oG(e,i),d=c&&c.y+c.h>t.y,h=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,cG(e,n,o?i.x:void 0,l?i.y:void 0,r,s,a);if(d&&l)return cG(e,n,void 0,t.y+1,r,s,a);if(d&&null==a)return t.y=n.y,n.y=n.y+n.h,e;if(h&&o)return cG(e,t,n.x,void 0,r,s,a)}const c=o?n.x+1:void 0,d=l?n.y+1:void 0;return null==c&&null==d?e:cG(e,n,o?n.x+1:void 0,l?n.y+1:void 0,r,s,a)}const hG=(e,t,n,r)=>e+n>r?t:n,uG=(e,t,n)=>e<0?t:n,pG=e=>Math.max(0,e),fG=e=>Math.max(0,e),mG=(e,t,n)=>{let{left:r,height:a,width:i}=t;const o=e.top-(a-e.height);return{left:r,width:i,height:uG(o,e.height,a),top:fG(o)}},vG=(e,t,n)=>{let{top:r,left:a,height:i,width:o}=t;return{top:r,height:i,width:hG(e.left,e.width,o,n),left:pG(a)}},gG=(e,t,n)=>{let{top:r,height:a,width:i}=t;const o=e.left-(i-e.width);return{height:a,width:o<0?e.width:hG(e.left,e.width,i,n),top:fG(r),left:pG(o)}},bG=(e,t,n)=>{let{top:r,left:a,height:i,width:o}=t;return{width:o,left:a,height:uG(r,e.height,i),top:fG(r)}},yG={n:mG,ne:function(){return mG(arguments.length<=0?void 0:arguments[0],vG(...arguments))},e:vG,se:function(){return bG(arguments.length<=0?void 0:arguments[0],vG(...arguments))},s:bG,sw:function(){return bG(arguments.length<=0?void 0:arguments[0],gG(...arguments))},w:gG,nw:function(){return mG(arguments.length<=0?void 0:arguments[0],gG(...arguments))}};function wG(e,t){return"horizontal"===t?EG(e):"vertical"===t?xG(e):e}function xG(e){return e.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function EG(e){return e.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function kG(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,a=e.length;r<a;r++){const a=e[r];for(let e=0;e<n.length;e++){const i=n[e],o=a[i];if("number"!=typeof o||Number.isNaN(o))throw new Error(`ReactGridLayout: ${t}[${r}].${i} must be a number! Received: ${o} (${typeof o})`)}if(void 0!==a.i&&"string"!=typeof a.i)throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function CG(){}qU.noop=()=>{};var SG={};function MG(e){const{margin:t,containerPadding:n,containerWidth:r,cols:a}=e;return(r-t[0]*(a-1)-2*n[0])/a}function AG(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function _G(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(SG,"__esModule",{value:!0}),SG.calcGridColWidth=MG,SG.calcGridItemPosition=function(e,t,n,r,a,i){const{margin:o,containerPadding:l,rowHeight:s}=e,c=MG(e),d={};i&&i.resizing?(d.width=Math.round(i.resizing.width),d.height=Math.round(i.resizing.height)):(d.width=AG(r,c,o[0]),d.height=AG(a,s,o[1]));i&&i.dragging?(d.top=Math.round(i.dragging.top),d.left=Math.round(i.dragging.left)):i&&i.resizing&&"number"==typeof i.resizing.top&&"number"==typeof i.resizing.left?(d.top=Math.round(i.resizing.top),d.left=Math.round(i.resizing.left)):(d.top=Math.round((s+o[1])*n+l[1]),d.left=Math.round((c+o[0])*t+l[0]));return d},SG.calcGridItemWHPx=AG,SG.calcWH=function(e,t,n,r,a,i){const{margin:o,maxRows:l,cols:s,rowHeight:c}=e,d=MG(e);let h=Math.round((t+o[0])/(d+o[0])),u=Math.round((n+o[1])/(c+o[1])),p=_G(h,0,s-r),f=_G(u,0,l-a);-1!==["sw","w","nw"].indexOf(i)&&(p=_G(h,0,s));-1!==["nw","n","ne"].indexOf(i)&&(f=_G(u,0,l));return{w:p,h:f}},SG.calcXY=function(e,t,n,r,a){const{margin:i,containerPadding:o,cols:l,rowHeight:s,maxRows:c}=e,d=MG(e);let h=Math.round((n-o[0])/(d+i[0])),u=Math.round((t-o[1])/(s+i[1]));return h=_G(h,0,l-r),u=_G(u,0,c-a),{x:h,y:u}},SG.clamp=_G;var OG={},NG={exports:{}},ZG={},DG={},IG={};Object.defineProperty(IG,"__esModule",{value:!0}),IG.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},IG.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},IG.int=function(e){return parseInt(e,10)},IG.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},IG.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var HG={};Object.defineProperty(HG,"__esModule",{value:!0}),HG.browserPrefixToKey=PG,HG.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},HG.default=void 0,HG.getPrefix=LG;const TG=["Moz","Webkit","O","ms"];function LG(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const t=window.document?.documentElement?.style;if(!t)return"";if(e in t)return"";for(let n=0;n<TG.length;n++)if(PG(e,TG[n])in t)return TG[n];return""}function PG(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}HG.default=LG(),Object.defineProperty(DG,"__esModule",{value:!0}),DG.addClassName=FG,DG.addEvent=function(e,t,n,r){if(!e)return;const a={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,a):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},DG.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&FG(e.body,"react-draggable-transparent-selection")},DG.createCSSTransform=function(e,t){const n=RG(e,t,"px");return{[(0,BG.browserPrefixToKey)("transform",BG.default)]:n}},DG.createSVGTransform=function(e,t){return RG(e,t,"")},DG.getTouch=function(e,t){return e.targetTouches&&(0,VG.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,VG.findInArray)(e.changedTouches,e=>t===e.identifier)},DG.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},DG.getTranslation=RG,DG.innerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,VG.int)(n.paddingTop),t-=(0,VG.int)(n.paddingBottom),t},DG.innerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,VG.int)(n.paddingLeft),t-=(0,VG.int)(n.paddingRight),t},DG.matchesSelector=zG,DG.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(zG(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},DG.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:a,y:i}},DG.outerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,VG.int)(n.borderTopWidth),t+=(0,VG.int)(n.borderBottomWidth),t},DG.outerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,VG.int)(n.borderLeftWidth),t+=(0,VG.int)(n.borderRightWidth),t},DG.removeClassName=qG,DG.removeEvent=function(e,t,n,r){if(!e)return;const a={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,a):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},DG.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{WG(e)}):WG(e)};var VG=IG,BG=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(HG);let jG="";function zG(e,t){return jG||(jG=(0,VG.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,VG.isFunction)(e[t])})),!!(0,VG.isFunction)(e[jG])&&e[jG](t)}function RG(e,t,n){let{x:r,y:a}=e,i=`translate(${r}${n},${a}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function WG(e){if(e)try{if(e.body&&qG(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function FG(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function qG(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}var YG={};Object.defineProperty(YG,"__esModule",{value:!0}),YG.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},YG.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},YG.createCoreData=function(e,t,n){const r=!(0,UG.isNum)(e.lastX),a=XG(e);return r?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}},YG.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},YG.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);const a=XG(e);if("string"==typeof r){const{ownerDocument:e}=a,t=e.defaultView;let n;if("parent"===r)n=a.parentNode;else{n=a.getRootNode().querySelector(r)}if(!(n instanceof t.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const i=n,o=t.getComputedStyle(a),l=t.getComputedStyle(i);r={left:-a.offsetLeft+(0,UG.int)(l.paddingLeft)+(0,UG.int)(o.marginLeft),top:-a.offsetTop+(0,UG.int)(l.paddingTop)+(0,UG.int)(o.marginTop),right:(0,GG.innerWidth)(i)-(0,GG.outerWidth)(a)-a.offsetLeft+(0,UG.int)(l.paddingRight)-(0,UG.int)(o.marginRight),bottom:(0,GG.innerHeight)(i)-(0,GG.outerHeight)(a)-a.offsetTop+(0,UG.int)(l.paddingBottom)-(0,UG.int)(o.marginBottom)}}(0,UG.isNum)(r.right)&&(t=Math.min(t,r.right));(0,UG.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,UG.isNum)(r.left)&&(t=Math.max(t,r.left));(0,UG.isNum)(r.top)&&(n=Math.max(n,r.top));return[t,n]},YG.getControlPosition=function(e,t,n){const r="number"==typeof t?(0,GG.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;const a=XG(n),i=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,GG.offsetXYFromParent)(r||e,i,n.props.scale)},YG.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],a=Math.round(n/e[1])*e[1];return[r,a]};var UG=IG,GG=DG;function XG(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var KG={},JG={};Object.defineProperty(JG,"__esModule",{value:!0}),JG.default=function(){},Object.defineProperty(KG,"__esModule",{value:!0}),KG.default=void 0;var QG=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),$G=iX(NI.exports),eX=iX(g.default),tX=DG,nX=YG,rX=IG,aX=iX(JG);function iX(e){return e&&e.__esModule?e:{default:e}}function oX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const lX={start:"touchstart",move:"touchmove",stop:"touchend"},sX={start:"mousedown",move:"mousemove",stop:"mouseup"};let cX=sX;class dX extends QG.Component{constructor(){super(...arguments),oX(this,"dragging",!1),oX(this,"lastX",NaN),oX(this,"lastY",NaN),oX(this,"touchIdentifier",null),oX(this,"mounted",!1),oX(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,tX.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,tX.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,tX.getTouchIdentifier)(e);this.touchIdentifier=r;const a=(0,nX.getControlPosition)(e,r,this);if(null==a)return;const{x:i,y:o}=a,l=(0,nX.createCoreData)(this,i,o);(0,aX.default)("DraggableCore: handleDragStart: %j",l),(0,aX.default)("calling",this.props.onStart);!1!==this.props.onStart(e,l)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,tX.addUserSelectStyles)(n),this.dragging=!0,this.lastX=i,this.lastY=o,(0,tX.addEvent)(n,cX.move,this.handleDrag),(0,tX.addEvent)(n,cX.stop,this.handleDragStop))}),oX(this,"handleDrag",e=>{const t=(0,nX.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,nX.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const a=(0,nX.createCoreData)(this,n,r);(0,aX.default)("DraggableCore: handleDrag: %j",a);if(!1!==this.props.onDrag(e,a)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),oX(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,nX.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,nX.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const a=(0,nX.createCoreData)(this,n,r);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,tX.scheduleRemoveUserSelectStyles)(i.ownerDocument),(0,aX.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,aX.default)("DraggableCore: Removing handlers"),(0,tX.removeEvent)(i.ownerDocument,cX.move,this.handleDrag),(0,tX.removeEvent)(i.ownerDocument,cX.stop,this.handleDragStop))}),oX(this,"onMouseDown",e=>(cX=sX,this.handleDragStart(e))),oX(this,"onMouseUp",e=>(cX=sX,this.handleDragStop(e))),oX(this,"onTouchStart",e=>(cX=lX,this.handleDragStart(e))),oX(this,"onTouchEnd",e=>(cX=lX,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,tX.addEvent)(e,lX.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,tX.removeEvent)(t,sX.move,this.handleDrag),(0,tX.removeEvent)(t,lX.move,this.handleDrag),(0,tX.removeEvent)(t,sX.stop,this.handleDragStop),(0,tX.removeEvent)(t,lX.stop,this.handleDragStop),(0,tX.removeEvent)(e,lX.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,tX.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:eX.default.findDOMNode(this)}render(){return QG.cloneElement(QG.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}KG.default=dX,oX(dX,"displayName","DraggableCore"),oX(dX,"propTypes",{allowAnyClick:$G.default.bool,allowMobileScroll:$G.default.bool,children:$G.default.node.isRequired,disabled:$G.default.bool,enableUserSelectHack:$G.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:$G.default.arrayOf($G.default.number),handle:$G.default.string,cancel:$G.default.string,nodeRef:$G.default.object,onStart:$G.default.func,onDrag:$G.default.func,onStop:$G.default.func,onMouseDown:$G.default.func,scale:$G.default.number,className:rX.dontSetMe,style:rX.dontSetMe,transform:rX.dontSetMe}),oX(dX,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),n=d(NI.exports),r=d(g.default),a=RU.exports,i=DG,o=YG,l=IG,s=d(KG),c=d(JG);function d(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),u(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,o.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),u(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[a,i]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=a,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)}),u(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,o.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:f,scale:m,...v}=this.props;let g={},b=null;const y=!Boolean(p)||this.state.dragging,w=p||l,x={x:(0,o.canDragX)(this)&&y?this.state.x:w.x,y:(0,o.canDragY)(this)&&y?this.state.y:w.y};this.state.isElementSVG?b=(0,i.createSVGTransform)(x,f):g=(0,i.createCSSTransform)(x,f);const E=(0,a.clsx)(r.props.className||"",c,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(s.default,h({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:E,style:{...r.props.style,...g},transform:b}))}}e.default=p,u(p,"displayName","Draggable"),u(p,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),u(p,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(ZG);const{default:hX,DraggableCore:uX}=ZG;NG.exports=hX,NG.exports.default=hX,NG.exports.DraggableCore=uX;var pX={exports:{}},fX={},mX={__esModule:!0,cloneElement:function(e,t){t.style&&e.props.style&&(t.style=bX(bX({},e.props.style),t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return vX.default.cloneElement(e,t)}},vX=function(e){return e&&e.__esModule?e:{default:e}}(f.default);function gX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function bX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gX(Object(n),!0).forEach(function(t){yX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function yX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wX={__esModule:!0,resizableProps:void 0},xX=function(e){return e&&e.__esModule?e:{default:e}}(NI.exports);var EX={axis:xX.default.oneOf(["both","x","y","none"]),className:xX.default.string,children:xX.default.element.isRequired,draggableOpts:xX.default.shape({allowAnyClick:xX.default.bool,cancel:xX.default.string,children:xX.default.node,disabled:xX.default.bool,enableUserSelectHack:xX.default.bool,offsetParent:xX.default.node,grid:xX.default.arrayOf(xX.default.number),handle:xX.default.string,nodeRef:xX.default.object,onStart:xX.default.func,onDrag:xX.default.func,onStop:xX.default.func,onMouseDown:xX.default.func,scale:xX.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"y"===a.axis?(r=xX.default.number).isRequired.apply(r,t):xX.default.number.apply(xX.default,t)},handle:xX.default.oneOfType([xX.default.node,xX.default.func]),handleSize:xX.default.arrayOf(xX.default.number),lockAspectRatio:xX.default.bool,maxConstraints:xX.default.arrayOf(xX.default.number),minConstraints:xX.default.arrayOf(xX.default.number),onResizeStop:xX.default.func,onResizeStart:xX.default.func,onResize:xX.default.func,resizeHandles:xX.default.arrayOf(xX.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:xX.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"x"===a.axis?(r=xX.default.number).isRequired.apply(r,t):xX.default.number.apply(xX.default,t)}};wX.resizableProps=EX,fX.__esModule=!0,fX.default=void 0;var kX=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=_X(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(f.default),CX=NG.exports,SX=mX,MX=wX,AX=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function _X(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(_X=function(e){return e?n:t})(e)}function OX(){return OX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},OX.apply(this,arguments)}function NX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ZX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?NX(Object(n),!0).forEach(function(t){DX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function DX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IX(e,t){return IX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},IX(e,t)}var HX=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRefs={},t.lastHandleRect=null,t.slack=null,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,IX(t,n);var a=r.prototype;return a.componentWillUnmount=function(){this.resetData()},a.resetData=function(){this.lastHandleRect=this.slack=null},a.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,a=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!a&&!i)return[e,t];if(i){var o=this.props.width/this.props.height,l=e-this.props.width,s=t-this.props.height;Math.abs(l)>Math.abs(s*o)?t=e/o:e=t*o}var c=e,d=t,h=this.slack||[0,0],u=h[0],p=h[1];return e+=u,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),a&&(e=Math.min(a[0],e),t=Math.min(a[1],t)),this.slack=[u+(c-e),p+(d-t)],[e,t]},a.resizeHandler=function(e,t){var n=this;return function(r,a){var i=a.node,o=a.deltaX,l=a.deltaY;"onResizeStart"===e&&n.resetData();var s=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(s||c){var d=t[0],h=t[t.length-1],u=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===h)o+=u.left-n.lastHandleRect.left;if("n"===d)l+=u.top-n.lastHandleRect.top}n.lastHandleRect=u,"w"===h&&(o=-o),"n"===d&&(l=-l);var p=n.props.width+(s?o/n.props.transformScale:0),f=n.props.height+(c?l/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var v=p!==n.props.width||f!==n.props.height,g="function"==typeof n.props[e]?n.props[e]:null;g&&!("onResize"===e&&!v)&&(null==r.persist||r.persist(),g(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},a.renderResizeHandle=function(e,t){var n=this.props.handle;if(!n)return kX.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof n)return n(e,t);var r=ZX({ref:t},"string"==typeof n.type?{}:{handleAxis:e});return kX.cloneElement(n,r)},a.render=function(){var e=this,t=this.props,n=t.children,r=t.className,a=t.draggableOpts;t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart;var i=t.resizeHandles;t.transformScale;var o=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,AX);return(0,SX.cloneElement)(n,ZX(ZX({},o),{},{className:(r?r+" ":"")+"react-resizable",children:[].concat(n.props.children,i.map(function(t){var n,r=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=kX.createRef();return kX.createElement(CX.DraggableCore,OX({},a,{nodeRef:r,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,r))}))}))},r}(kX.Component);fX.default=HX,HX.propTypes=MX.resizableProps,HX.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var TX={__esModule:!0,default:void 0},LX=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=RX(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(f.default),PX=zX(NI.exports),VX=zX(fX),BX=wX,jX=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function zX(e){return e&&e.__esModule?e:{default:e}}function RX(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(RX=function(e){return e?n:t})(e)}function WX(){return WX=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},WX.apply(this,arguments)}function FX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function qX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?FX(Object(n),!0).forEach(function(t){YX(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FX(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function YX(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function UX(e,t){return UX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},UX(e,t)}var GX=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(null==e.persist||e.persist(),t.setState(r,function(){return t.props.onResize&&t.props.onResize(e,n)})):t.setState(r)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,UX(t,n),r.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},r.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize;e.onResize;var r=e.onResizeStart,a=e.onResizeStop,i=e.draggableOpts,o=e.minConstraints,l=e.maxConstraints,s=e.lockAspectRatio,c=e.axis;e.width,e.height;var d=e.resizeHandles,h=e.style,u=e.transformScale,p=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,jX);return LX.createElement(VX.default,{axis:c,draggableOpts:i,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:s,maxConstraints:l,minConstraints:o,onResizeStart:r,onResize:this.onResize,onResizeStop:a,resizeHandles:d,transformScale:u,width:this.state.width},LX.createElement("div",WX({},p,{style:qX(qX({},h),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(LX.Component);TX.default=GX,GX.propTypes=qX(qX({},BX.resizableProps),{},{children:PX.default.element}),pX.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},pX.exports.Resizable=fX.default,pX.exports.ResizableBox=TX.default;var XX={};Object.defineProperty(XX,"__esModule",{value:!0}),XX.resizeHandleType=XX.resizeHandleAxesType=XX.default=void 0;var KX=QX(NI.exports),JX=QX(f.default);function QX(e){return e&&e.__esModule?e:{default:e}}const $X=XX.resizeHandleAxesType=KX.default.arrayOf(KX.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),eK=XX.resizeHandleType=KX.default.oneOfType([KX.default.node,KX.default.func]);XX.default={className:KX.default.string,style:KX.default.object,width:KX.default.number,autoSize:KX.default.bool,cols:KX.default.number,draggableCancel:KX.default.string,draggableHandle:KX.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:KX.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&qU.validateLayout(t,"layout")},margin:KX.default.arrayOf(KX.default.number),containerPadding:KX.default.arrayOf(KX.default.number),rowHeight:KX.default.number,maxRows:KX.default.number,isBounded:KX.default.bool,isDraggable:KX.default.bool,isResizable:KX.default.bool,allowOverlap:KX.default.bool,preventCollision:KX.default.bool,useCSSTransforms:KX.default.bool,transformScale:KX.default.number,isDroppable:KX.default.bool,resizeHandles:$X,resizeHandle:eK,onLayoutChange:KX.default.func,onDragStart:KX.default.func,onDrag:KX.default.func,onDragStop:KX.default.func,onResizeStart:KX.default.func,onResize:KX.default.func,onResizeStop:KX.default.func,onDrop:KX.default.func,droppingItem:KX.default.shape({i:KX.default.string.isRequired,w:KX.default.number.isRequired,h:KX.default.number.isRequired}),children:function(e,t){const n=e[t],r={};JX.default.Children.forEach(n,function(e){if(null!=e?.key){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}})},innerRef:KX.default.any},Object.defineProperty(OG,"__esModule",{value:!0}),OG.default=void 0;var tK=dK(f.default),nK=g.default,rK=dK(NI.exports),aK=NG.exports,iK=pX.exports,oK=qU,lK=SG,sK=XX,cK=dK(RU.exports);function dK(e){return e&&e.__esModule?e:{default:e}}function hK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class uK extends tK.default.Component{constructor(){super(...arguments),hK(this,"state",{resizing:null,dragging:null,className:""}),hK(this,"elementRef",tK.default.createRef()),hK(this,"onDragStart",(e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:a}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:o}=n;if(!o)return;const l=o.getBoundingClientRect(),s=n.getBoundingClientRect(),c=s.left/a,d=l.left/a,h=s.top/a,u=l.top/a;i.left=c-d+o.scrollLeft,i.top=h-u+o.scrollTop,this.setState({dragging:i});const{x:p,y:f}=(0,lK.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,p,f,{e:e,node:n,newPosition:i})}),hK(this,"onDrag",(e,t,n)=>{let{node:r,deltaX:a,deltaY:i}=t;const{onDrag:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let l=this.state.dragging.top+i,s=this.state.dragging.left+a;const{isBounded:c,i:d,w:h,h:u,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=r;if(e){const{margin:t,rowHeight:n}=this.props,r=e.clientHeight-(0,lK.calcGridItemWHPx)(u,n,t[1]);l=(0,lK.clamp)(l,0,r);const a=(0,lK.calcGridColWidth)(f),i=p-(0,lK.calcGridItemWHPx)(h,a,t[0]);s=(0,lK.clamp)(s,0,i)}}const m={top:l,left:s};n?this.setState({dragging:m}):(0,nK.flushSync)(()=>{this.setState({dragging:m})});const{x:v,y:g}=(0,lK.calcXY)(f,l,s,h,u);return o.call(this,d,v,g,{e:e,node:r,newPosition:m})}),hK(this,"onDragStop",(e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:a,h:i,i:o}=this.props,{left:l,top:s}=this.state.dragging,c={top:s,left:l};this.setState({dragging:null});const{x:d,y:h}=(0,lK.calcXY)(this.getPositionParams(),s,l,a,i);return r.call(this,o,d,h,{e:e,node:n,newPosition:c})}),hK(this,"onResizeStop",(e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop")),hK(this,"onResizeStart",(e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart")),hK(this,"onResize",(e,t,n)=>this.onResizeHandler(e,t,n,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,lK.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,lK.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,oK.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:a}=this.state,i=a&&t.left!==r.left||t.top!==r.top;if(a){if(i){const e=t.left-a.left,r=t.top-a.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r},!0)}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let a;return r?a=(0,oK.setTransform)(e):(a=(0,oK.setTopLeft)(e),t&&(a.left=(0,oK.perc)(e.left/n),a.width=(0,oK.perc)(e.width/n))),a}mixinDraggable(e,t){return tK.default.createElement(aK.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(e,t,n){const{cols:r,minW:a,minH:i,maxW:o,maxH:l,transformScale:s,resizeHandles:c,resizeHandle:d}=this.props,h=this.getPositionParams(),u=(0,lK.calcGridItemPosition)(h,0,0,r,0).width,p=(0,lK.calcGridItemPosition)(h,0,0,a,i),f=(0,lK.calcGridItemPosition)(h,0,0,o,l),m=[p.width,p.height],v=[Math.min(f.width,u),Math.min(f.height,1/0)];return tK.default.createElement(iK.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:m,maxConstraints:v,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:s,resizeHandles:c,handle:d},e)}onResizeHandler(e,t,n,r){let{node:a,size:i,handle:o}=t;const l=this.props[r];if(!l)return;const{x:s,y:c,i:d,maxH:h,minH:u,containerWidth:p}=this.props,{minW:f,maxW:m}=this.props;let v=i;a&&(v=(0,oK.resizeItemInDirection)(o,n,i,p),(0,nK.flushSync)(()=>{this.setState({resizing:"onResizeStop"===r?null:v})}));let{w:g,h:b}=(0,lK.calcWH)(this.getPositionParams(),v.width,v.height,s,c,o);g=(0,lK.clamp)(g,Math.max(f,1),m),b=(0,lK.clamp)(b,u,h),l.call(this,d,g,b,{e:e,node:a,size:v,handle:o})}render(){const{x:e,y:t,w:n,h:r,isDraggable:a,isResizable:i,droppingPosition:o,useCSSTransforms:l}=this.props,s=(0,lK.calcGridItemPosition)(this.getPositionParams(),e,t,n,r,this.state),c=tK.default.Children.only(this.props.children);let d=tK.default.cloneElement(c,{ref:this.elementRef,className:(0,cK.default)("react-grid-item",c.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(o),cssTransforms:l}),style:{...this.props.style,...c.props.style,...this.createStyle(s)}});return d=this.mixinResizable(d,s,i),d=this.mixinDraggable(d,a),d}}OG.default=uK,hK(uK,"propTypes",{children:rK.default.element,cols:rK.default.number.isRequired,containerWidth:rK.default.number.isRequired,rowHeight:rK.default.number.isRequired,margin:rK.default.array.isRequired,maxRows:rK.default.number.isRequired,containerPadding:rK.default.array.isRequired,x:rK.default.number.isRequired,y:rK.default.number.isRequired,w:rK.default.number.isRequired,h:rK.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:rK.default.string.isRequired,resizeHandles:sK.resizeHandleAxesType,resizeHandle:sK.resizeHandleType,onDragStop:rK.default.func,onDragStart:rK.default.func,onDrag:rK.default.func,onResizeStop:rK.default.func,onResizeStart:rK.default.func,onResize:rK.default.func,isDraggable:rK.default.bool.isRequired,isResizable:rK.default.bool.isRequired,isBounded:rK.default.bool.isRequired,static:rK.default.bool,useCSSTransforms:rK.default.bool.isRequired,transformScale:rK.default.number,className:rK.default.string,handle:rK.default.string,cancel:rK.default.string,droppingPosition:rK.default.shape({e:rK.default.object.isRequired,left:rK.default.number.isRequired,top:rK.default.number.isRequired})}),hK(uK,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Object.defineProperty(fU,"__esModule",{value:!0}),fU.default=void 0;var pK=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),fK=zU,mK=wK(RU.exports),vK=qU,gK=SG,bK=wK(OG),yK=wK(XX);function wK(e){return e&&e.__esModule?e:{default:e}}function xK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const EK="react-grid-layout";let kK=!1;try{kK=/firefox/i.test(navigator.userAgent)}catch(ige){}class CK extends pK.Component{constructor(){super(...arguments),xK(this,"state",{activeDrag:null,layout:(0,vK.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,vK.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),xK(this,"dragEnterCounter",0),xK(this,"onDragStart",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o}=this.state,l=(0,vK.getLayoutItem)(o,e);if(!l)return;const s={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,vK.cloneLayoutItem)(l),oldLayout:o,activeDrag:s}),this.props.onDragStart(o,l,l,null,a,i)}),xK(this,"onDrag",(e,t,n,r)=>{let{e:a,node:i}=r;const{oldDragItem:o}=this.state;let{layout:l}=this.state;const{cols:s,allowOverlap:c,preventCollision:d}=this.props,h=(0,vK.getLayoutItem)(l,e);if(!h)return;const u={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,vK.moveElement)(l,h,t,n,!0,d,(0,vK.compactType)(this.props),s,c),this.props.onDrag(l,o,h,u,a,i),this.setState({layout:c?l:(0,vK.compact)(l,(0,vK.compactType)(this.props),s),activeDrag:u})}),xK(this,"onDragStop",(e,t,n,r)=>{let{e:a,node:i}=r;if(!this.state.activeDrag)return;const{oldDragItem:o}=this.state;let{layout:l}=this.state;const{cols:s,preventCollision:c,allowOverlap:d}=this.props,h=(0,vK.getLayoutItem)(l,e);if(!h)return;l=(0,vK.moveElement)(l,h,t,n,!0,c,(0,vK.compactType)(this.props),s,d);const u=d?l:(0,vK.compact)(l,(0,vK.compactType)(this.props),s);this.props.onDragStop(u,o,h,null,a,i);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:u,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(u,p)}),xK(this,"onResizeStart",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o}=this.state,l=(0,vK.getLayoutItem)(o,e);l&&(this.setState({oldResizeItem:(0,vK.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(o,l,l,null,a,i))}),xK(this,"onResize",(e,t,n,r)=>{let{e:a,node:i,size:o,handle:l}=r;const{oldResizeItem:s}=this.state,{layout:c}=this.state,{cols:d,preventCollision:h,allowOverlap:u}=this.props;let p,f,m,v=!1;const[g,b]=(0,vK.withLayoutItem)(c,e,e=>{let r;if(f=e.x,m=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(f=e.x+(e.w-t),t=e.x!==f&&f<0?e.w:t,f=f<0?0:f),-1!==["ne","n","nw"].indexOf(l)&&(m=e.y+(e.h-n),n=e.y!==m&&m<0?e.h:n,m=m<0?0:m),v=!0),h&&!u){r=(0,vK.getAllCollisions)(c,{...e,w:t,h:n,x:f,y:m}).filter(t=>t.i!==e.i).length>0,r&&(m=e.y,n=e.h,f=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e});if(!b)return;if(p=g,v){const e=!0;p=(0,vK.moveElement)(g,b,f,m,e,this.props.preventCollision,(0,vK.compactType)(this.props),d,u)}const y={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(p,s,b,y,a,i),this.setState({layout:u?p:(0,vK.compact)(p,(0,vK.compactType)(this.props),d),activeDrag:y})}),xK(this,"onResizeStop",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o,oldResizeItem:l}=this.state,{cols:s,allowOverlap:c}=this.props,d=(0,vK.getLayoutItem)(o,e),h=c?o:(0,vK.compact)(o,(0,vK.compactType)(this.props),s);this.props.onResizeStop(h,l,d,null,a,i);const{oldLayout:u}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,u)}),xK(this,"onDragOver",e=>{if(e.preventDefault(),e.stopPropagation(),kK&&!e.nativeEvent.target?.classList.contains(EK))return!1;const{droppingItem:t,onDropDragOver:n,margin:r,cols:a,rowHeight:i,maxRows:o,width:l,containerPadding:s,transformScale:c}=this.props,d=n?.(e);if(!1===d)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const h={...t,...d},{layout:u}=this.state,p=e.currentTarget.getBoundingClientRect(),f=e.clientX-p.left,m=e.clientY-p.top,v={left:f/c,top:m/c,e:e};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=f||t!=m)&&this.setState({droppingPosition:v})}}else{const e={cols:a,margin:r,maxRows:o,rowHeight:i,containerWidth:l,containerPadding:s||r},t=(0,gK.calcXY)(e,m,f,h.w,h.h);this.setState({droppingDOMNode:pK.createElement("div",{key:h.i}),droppingPosition:v,layout:[...u,{...h,x:t.x,y:t.y,static:!1,isDraggable:!0}]})}}),xK(this,"removeDroppingPlaceholder",()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,r=(0,vK.compact)(n.filter(t=>t.i!==e.i),(0,vK.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:r,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),xK(this,"onDragLeave",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()}),xK(this,"onDragEnter",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++}),xK(this,"onDrop",e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find(e=>e.i===t.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,t){let n;if(t.activeDrag)return null;if((0,fK.deepEqual)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,vK.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n){return{layout:(0,vK.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,vK.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,t){return this.props.children!==e.children||!(0,vK.fastRGLPropsEqual)(this.props,e,fK.deepEqual)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,vK.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,t){t||(t=this.state.layout),(0,fK.deepEqual)(t,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:e}=this.state;if(!e)return null;const{width:t,cols:n,margin:r,containerPadding:a,rowHeight:i,maxRows:o,useCSSTransforms:l,transformScale:s}=this.props;return pK.createElement(bK.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:t,cols:n,margin:r,containerPadding:a||r,maxRows:o,rowHeight:i,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:s},pK.createElement("div",null))}processGridItem(e,t){if(!e||!e.key)return;const n=(0,vK.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;const{width:r,cols:a,margin:i,containerPadding:o,rowHeight:l,maxRows:s,isDraggable:c,isResizable:d,isBounded:h,useCSSTransforms:u,transformScale:p,draggableCancel:f,draggableHandle:m,resizeHandles:v,resizeHandle:g}=this.props,{mounted:b,droppingPosition:y}=this.state,w="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&c,x="boolean"==typeof n.isResizable?n.isResizable:!n.static&&d,E=n.resizeHandles||v,k=w&&h&&!1!==n.isBounded;return pK.createElement(bK.default,{containerWidth:r,cols:a,margin:i,containerPadding:o||i,maxRows:s,rowHeight:l,cancel:f,handle:m,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:w,isResizable:x,isBounded:k,useCSSTransforms:u&&b,usePercentages:!b,transformScale:p,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?y:void 0,resizeHandles:E,resizeHandle:g},e)}render(){const{className:e,style:t,isDroppable:n,innerRef:r}=this.props,a=(0,mK.default)(EK,e),i={height:this.containerHeight(),...t};return pK.createElement("div",{ref:r,className:a,style:i,onDrop:n?this.onDrop:vK.noop,onDragLeave:n?this.onDragLeave:vK.noop,onDragEnter:n?this.onDragEnter:vK.noop,onDragOver:n?this.onDragOver:vK.noop},pK.Children.map(this.props.children,e=>this.processGridItem(e)),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}fU.default=CK,xK(CK,"displayName","ReactGridLayout"),xK(CK,"propTypes",yK.default),xK(CK,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:vK.noop,onDragStart:vK.noop,onDrag:vK.noop,onDragStop:vK.noop,onResizeStart:vK.noop,onResize:vK.noop,onResizeStop:vK.noop,onDrop:vK.noop,onDropDragOver:vK.noop});var SK={},MK={};Object.defineProperty(MK,"__esModule",{value:!0}),MK.findOrGenerateResponsiveLayout=function(e,t,n,r,a,i){if(e[n])return(0,AK.cloneLayout)(e[n]);let o=e[r];const l=_K(t),s=l.slice(l.indexOf(n));for(let t=0,n=s.length;t<n;t++){const n=s[t];if(e[n]){o=e[n];break}}return o=(0,AK.cloneLayout)(o||[]),(0,AK.compact)((0,AK.correctBounds)(o,{cols:a}),i,a)},MK.getBreakpointFromWidth=function(e,t){const n=_K(e);let r=n[0];for(let a=1,i=n.length;a<i;a++){const i=n[a];t>e[i]&&(r=i)}return r},MK.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},MK.sortBreakpoints=_K;var AK=qU;function _K(e){return Object.keys(e).sort(function(t,n){return e[t]-e[n]})}Object.defineProperty(SK,"__esModule",{value:!0}),SK.default=void 0;var OK=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),NK=TK(NI.exports),ZK=zU,DK=qU,IK=MK,HK=TK(fU);function TK(e){return e&&e.__esModule?e:{default:e}}function LK(){return LK=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},LK.apply(null,arguments)}function PK(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const VK=e=>Object.prototype.toString.call(e);function BK(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class jK extends OK.Component{constructor(){super(...arguments),PK(this,"state",this.generateInitialState()),PK(this,"onLayoutChange",e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})})}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,a=(0,IK.getBreakpointFromWidth)(t,e),i=(0,IK.getColsFromBreakpoint)(a,r),o=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,IK.findOrGenerateResponsiveLayout)(n,t,a,a,i,o),breakpoint:a,cols:i}}static getDerivedStateFromProps(e,t){if(!(0,ZK.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,IK.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,ZK.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,ZK.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:r,compactType:a}=this.props,i=this.props.breakpoint||(0,IK.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),o=this.state.breakpoint,l=(0,IK.getColsFromBreakpoint)(i,n),s={...r};if(o!==i||e.breakpoints!==t||e.cols!==n){o in s||(s[o]=(0,DK.cloneLayout)(this.state.layout));let e=(0,IK.findOrGenerateResponsiveLayout)(s,t,i,o,l,a);e=(0,DK.synchronizeLayoutWithChildren)(e,this.props.children,l,a,this.props.allowOverlap),s[i]=e,this.props.onBreakpointChange(i,l),this.props.onLayoutChange(e,s),this.setState({breakpoint:i,layout:e,cols:l})}const c=BK(this.props.margin,i),d=BK(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,c,l,d)}render(){const{breakpoint:e,breakpoints:t,cols:n,layouts:r,margin:a,containerPadding:i,onBreakpointChange:o,onLayoutChange:l,onWidthChange:s,...c}=this.props;return OK.createElement(HK.default,LK({},c,{margin:BK(a,this.state.breakpoint),containerPadding:BK(i,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}SK.default=jK,PK(jK,"propTypes",{breakpoint:NK.default.string,breakpoints:NK.default.object,allowOverlap:NK.default.bool,cols:NK.default.object,margin:NK.default.oneOfType([NK.default.array,NK.default.object]),containerPadding:NK.default.oneOfType([NK.default.array,NK.default.object]),layouts(e,t){if("[object Object]"!==VK(e[t]))throw new Error("Layout property must be an object. Received: "+VK(e[t]));Object.keys(e[t]).forEach(t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,DK.validateLayout)(e.layouts[t],"layouts."+t)})},width:NK.default.number.isRequired,onBreakpointChange:NK.default.func,onLayoutChange:NK.default.func,onWidthChange:NK.default.func}),PK(jK,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:DK.noop,onLayoutChange:DK.noop,onWidthChange:DK.noop});var zK={},RK=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),WK="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,FK="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),qK="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(FK):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var YK=["top","right","bottom","left","width","height","size","weight"],UK="undefined"!=typeof MutationObserver,GK=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function o(){qK(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(o,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){WK&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),UK?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){WK&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;YK.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),XK=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},KK=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||FK},JK=rJ(0,0,0,0);function QK(e){return parseFloat(e)||0}function $K(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+QK(e["border-"+n+"-width"])},0)}function eJ(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return JK;var r=KK(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],i=e["padding-"+a];t[a]=QK(i)}return t}(r),i=a.left+a.right,o=a.top+a.bottom,l=QK(r.width),s=QK(r.height);if("border-box"===r.boxSizing&&(Math.round(l+i)!==t&&(l-=$K(r,"left","right")+i),Math.round(s+o)!==n&&(s-=$K(r,"top","bottom")+o)),!function(e){return e===KK(e).document.documentElement}(e)){var c=Math.round(l+i)-t,d=Math.round(s+o)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(d)&&(s-=d)}return rJ(a.left,a.top,l,s)}var tJ="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof KK(e).SVGGraphicsElement}:function(e){return e instanceof KK(e).SVGElement&&"function"==typeof e.getBBox};function nJ(e){return WK?tJ(e)?function(e){var t=e.getBBox();return rJ(0,0,t.width,t.height)}(e):eJ(e):JK}function rJ(e,t,n,r){return{x:e,y:t,width:n,height:r}}var aJ=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=rJ(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=nJ(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),iJ=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,a=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(i.prototype);return XK(o,{x:t,y:n,width:r,height:a,top:n,right:t+r,bottom:a+n,left:t}),o}(t);XK(this,{target:e,contentRect:n})},oJ=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new RK,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof KK(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new aJ(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof KK(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new iJ(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),lJ="undefined"!=typeof WeakMap?new WeakMap:new RK,sJ=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=GK.getInstance(),r=new oJ(t,n,this);lJ.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){sJ.prototype[e]=function(){var t;return(t=lJ.get(this))[e].apply(t,arguments)}});var cJ=void 0!==FK.ResizeObserver?FK.ResizeObserver:sJ,dJ=OI(Object.freeze({__proto__:null,default:cJ}));Object.defineProperty(zK,"__esModule",{value:!0}),zK.default=function(e){var t;return t=class extends hJ.Component{constructor(){super(...arguments),gJ(this,"state",{width:1280}),gJ(this,"elementRef",hJ.createRef()),gJ(this,"mounted",!1),gJ(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new pJ.default(e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}});const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?hJ.createElement("div",{className:(0,fJ.default)(this.props.className,bJ),style:this.props.style,ref:this.elementRef}):hJ.createElement(e,vJ({innerRef:this.elementRef},n,this.state))}},gJ(t,"defaultProps",{measureBeforeMount:!1}),gJ(t,"propTypes",{measureBeforeMount:uJ.default.bool}),t};var hJ=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),uJ=mJ(NI.exports),pJ=mJ(dJ),fJ=mJ(RU.exports);function mJ(e){return e&&e.__esModule?e:{default:e}}function vJ(){return vJ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},vJ.apply(null,arguments)}function gJ(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const bJ="react-grid-layout";!function(e){e.exports=fU.default,e.exports.utils=qU,e.exports.calculateUtils=SG,e.exports.Responsive=SK.default,e.exports.Responsive.utils=MK,e.exports.WidthProvider=zK.default}(pU);const yJ=kY.span`
|
|
91
|
+
function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function fj(e,t){return e.get(pj(e,t))}function mj(e,t,n){(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,n)}const vj={},gj=e=>new Promise(t=>{if(!e)return t();const n=window.scrollX,r=window.scrollY;vj.restoreFocusTimeout=setTimeout(()=>{vj.previousActiveElement instanceof HTMLElement?(vj.previousActiveElement.focus(),vj.previousActiveElement=null):document.body&&document.body.focus(),t()},100),window.scrollTo(n,r)}),bj="swal2-",yj=["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]=bj+t,e),{}),wj=["success","warning","info","question","error"].reduce((e,t)=>(e[t]=bj+t,e),{}),xj="SweetAlert2:",Ej=e=>e.charAt(0).toUpperCase()+e.slice(1),kj=e=>{console.warn(`${xj} ${"object"==typeof e?e.join(" "):e}`)},Cj=e=>{console.error(`${xj} ${e}`)},Sj=[],Mj=(e,t=null)=>{(e=>{Sj.includes(e)||(Sj.push(e),kj(e))})(`"${e}" is deprecated and will be removed in the next major release.${t?` Use "${t}" instead.`:""}`)},Aj=e=>"function"==typeof e?e():e,_j=e=>e&&"function"==typeof e.toPromise,Oj=e=>_j(e)?e.toPromise():Promise.resolve(e),Nj=e=>e&&Promise.resolve(e)===e,Zj=()=>document.body.querySelector(`.${yj.container}`),Dj=e=>{const t=Zj();return t?t.querySelector(e):null},Ij=e=>Dj(`.${e}`),Hj=()=>Ij(yj.popup),Tj=()=>Ij(yj.icon),Lj=()=>Ij(yj.title),Pj=()=>Ij(yj["html-container"]),Vj=()=>Ij(yj.image),Bj=()=>Ij(yj["progress-steps"]),jj=()=>Ij(yj["validation-message"]),zj=()=>Dj(`.${yj.actions} .${yj.confirm}`),Rj=()=>Dj(`.${yj.actions} .${yj.cancel}`),Wj=()=>Dj(`.${yj.actions} .${yj.deny}`),Fj=()=>Dj(`.${yj.loader}`),qj=()=>Ij(yj.actions),Yj=()=>Ij(yj.footer),Uj=()=>Ij(yj["timer-progress-bar"]),Gj=()=>Ij(yj.close),Xj=()=>{const e=Hj();if(!e)return[];const t=e.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(t).sort((e,t)=>{const n=parseInt(e.getAttribute("tabindex")||"0"),r=parseInt(t.getAttribute("tabindex")||"0");return n>r?1:n<r?-1:0}),r=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'),a=Array.from(r).filter(e=>"-1"!==e.getAttribute("tabindex"));return[...new Set(n.concat(a))].filter(e=>pz(e))},Kj=()=>$j(document.body,yj.shown)&&!$j(document.body,yj["toast-shown"])&&!$j(document.body,yj["no-backdrop"]),Jj=()=>{const e=Hj();return!!e&&$j(e,yj.toast)},Qj=(e,t)=>{if(e.textContent="",t){const n=(new DOMParser).parseFromString(t,"text/html"),r=n.querySelector("head");r&&Array.from(r.childNodes).forEach(t=>{e.appendChild(t)});const a=n.querySelector("body");a&&Array.from(a.childNodes).forEach(t=>{t instanceof HTMLVideoElement||t instanceof HTMLAudioElement?e.appendChild(t.cloneNode(!0)):e.appendChild(t)})}},$j=(e,t)=>{if(!t)return!1;const n=t.split(/\s+/);for(let t=0;t<n.length;t++)if(!e.classList.contains(n[t]))return!1;return!0},ez=(e,t,n)=>{if(((e,t)=>{Array.from(e.classList).forEach(n=>{Object.values(yj).includes(n)||Object.values(wj).includes(n)||Object.values(t.showClass||{}).includes(n)||e.classList.remove(n)})})(e,t),!t.customClass)return;const r=t.customClass[n];r&&("string"==typeof r||r.forEach?az(e,r):kj(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`))},tz=(e,t)=>{if(!t)return null;switch(t){case"select":case"textarea":case"file":return e.querySelector(`.${yj.popup} > .${yj[t]}`);case"checkbox":return e.querySelector(`.${yj.popup} > .${yj.checkbox} input`);case"radio":return e.querySelector(`.${yj.popup} > .${yj.radio} input:checked`)||e.querySelector(`.${yj.popup} > .${yj.radio} input:first-child`);case"range":return e.querySelector(`.${yj.popup} > .${yj.range} input`);default:return e.querySelector(`.${yj.popup} > .${yj.input}`)}},nz=e=>{if(e.focus(),"file"!==e.type){const t=e.value;e.value="",e.value=t}},rz=(e,t,n)=>{e&&t&&("string"==typeof t&&(t=t.split(/\s+/).filter(Boolean)),t.forEach(t=>{Array.isArray(e)?e.forEach(e=>{n?e.classList.add(t):e.classList.remove(t)}):n?e.classList.add(t):e.classList.remove(t)}))},az=(e,t)=>{rz(e,t,!0)},iz=(e,t)=>{rz(e,t,!1)},oz=(e,t)=>{const n=Array.from(e.children);for(let e=0;e<n.length;e++){const r=n[e];if(r instanceof HTMLElement&&$j(r,t))return r}},lz=(e,t,n)=>{n===`${parseInt(n)}`&&(n=parseInt(n)),n||0===parseInt(n)?e.style.setProperty(t,"number"==typeof n?`${n}px`:n):e.style.removeProperty(t)},sz=(e,t="flex")=>{e&&(e.style.display=t)},cz=e=>{e&&(e.style.display="none")},dz=(e,t="block")=>{e&&new MutationObserver(()=>{uz(e,e.innerHTML,t)}).observe(e,{childList:!0,subtree:!0})},hz=(e,t,n,r)=>{const a=e.querySelector(t);a&&a.style.setProperty(n,r)},uz=(e,t,n="flex")=>{t?sz(e,n):cz(e)},pz=e=>!(!e||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),fz=e=>!!(e.scrollHeight>e.clientHeight),mz=e=>{const t=window.getComputedStyle(e),n=parseFloat(t.getPropertyValue("animation-duration")||"0"),r=parseFloat(t.getPropertyValue("transition-duration")||"0");return n>0||r>0},vz=(e,t=!1)=>{const n=Uj();n&&pz(n)&&(t&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${e/1e3}s linear`,n.style.width="0%"},10))},gz=`\n <div aria-labelledby="${yj.title}" aria-describedby="${yj["html-container"]}" class="${yj.popup}" tabindex="-1">\n <button type="button" class="${yj.close}"></button>\n <ul class="${yj["progress-steps"]}"></ul>\n <div class="${yj.icon}"></div>\n <img class="${yj.image}" />\n <h2 class="${yj.title}" id="${yj.title}"></h2>\n <div class="${yj["html-container"]}" id="${yj["html-container"]}"></div>\n <input class="${yj.input}" id="${yj.input}" />\n <input type="file" class="${yj.file}" />\n <div class="${yj.range}">\n <input type="range" />\n <output></output>\n </div>\n <select class="${yj.select}" id="${yj.select}"></select>\n <div class="${yj.radio}"></div>\n <label class="${yj.checkbox}">\n <input type="checkbox" id="${yj.checkbox}" />\n <span class="${yj.label}"></span>\n </label>\n <textarea class="${yj.textarea}" id="${yj.textarea}"></textarea>\n <div class="${yj["validation-message"]}" id="${yj["validation-message"]}"></div>\n <div class="${yj.actions}">\n <div class="${yj.loader}"></div>\n <button type="button" class="${yj.confirm}"></button>\n <button type="button" class="${yj.deny}"></button>\n <button type="button" class="${yj.cancel}"></button>\n </div>\n <div class="${yj.footer}"></div>\n <div class="${yj["timer-progress-bar-container"]}">\n <div class="${yj["timer-progress-bar"]}"></div>\n </div>\n </div>\n`.replace(/(^|\n)\s*/g,""),bz=()=>{vj.currentInstance.resetValidationMessage()},yz=e=>{const t=(()=>{const e=Zj();return!!e&&(e.remove(),iz([document.documentElement,document.body],[yj["no-backdrop"],yj["toast-shown"],yj["has-column"]]),!0)})();if("undefined"==typeof window||"undefined"==typeof document)return void Cj("SweetAlert2 requires document to initialize");const n=document.createElement("div");n.className=yj.container,t&&az(n,yj["no-transition"]),Qj(n,gz),n.dataset.swal2Theme=e.theme;const r="string"==typeof(a=e.target)?document.querySelector(a):a;var a;r.appendChild(n),e.topLayer&&(n.setAttribute("popover",""),n.showPopover()),(e=>{const t=Hj();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&&az(Zj(),yj.rtl)})(r),(()=>{const e=Hj(),t=oz(e,yj.input),n=oz(e,yj.file),r=e.querySelector(`.${yj.range} input`),a=e.querySelector(`.${yj.range} output`),i=oz(e,yj.select),o=e.querySelector(`.${yj.checkbox} input`),l=oz(e,yj.textarea);t.oninput=bz,n.onchange=bz,i.onchange=bz,o.onchange=bz,l.oninput=bz,r.oninput=()=>{bz(),a.value=r.value},r.onchange=()=>{bz(),a.value=r.value}})()},wz=(e,t)=>{e instanceof HTMLElement?t.appendChild(e):"object"==typeof e?xz(e,t):e&&Qj(t,e)},xz=(e,t)=>{e.jquery?Ez(t,e):Qj(t,e.toString())},Ez=(e,t)=>{if(e.textContent="",0 in t)for(let n=0;n in t;n++)e.appendChild(t[n].cloneNode(!0));else e.appendChild(t.cloneNode(!0))},kz=(e,t)=>{const n=qj(),r=Fj();n&&r&&(t.showConfirmButton||t.showDenyButton||t.showCancelButton?sz(n):cz(n),ez(n,t,"actions"),function(e,t,n){const r=zj(),a=Wj(),i=Rj();if(!r||!a||!i)return;Sz(r,"confirm",n),Sz(a,"deny",n),Sz(i,"cancel",n),function(e,t,n,r){if(!r.buttonsStyling)return void iz([e,t,n],yj.styled);az([e,t,n],yj.styled),r.confirmButtonColor&&e.style.setProperty("--swal2-confirm-button-background-color",r.confirmButtonColor);r.denyButtonColor&&t.style.setProperty("--swal2-deny-button-background-color",r.denyButtonColor);r.cancelButtonColor&&n.style.setProperty("--swal2-cancel-button-background-color",r.cancelButtonColor);Cz(e),Cz(t),Cz(n)}(r,a,i,n),n.reverseButtons&&(n.toast?(e.insertBefore(i,r),e.insertBefore(a,r)):(e.insertBefore(i,t),e.insertBefore(a,t),e.insertBefore(r,t)))}(n,r,t),Qj(r,t.loaderHtml||""),ez(r,t,"loader"))};function Cz(e){const t=window.getComputedStyle(e);if(t.getPropertyValue("--swal2-action-button-focus-box-shadow"))return;const n=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\(.*/,` ${n}`))}function Sz(e,t,n){const r=Ej(t);uz(e,n[`show${r}Button`],"inline-block"),Qj(e,n[`${t}ButtonText`]||""),e.setAttribute("aria-label",n[`${t}ButtonAriaLabel`]||""),e.className=yj[t],ez(e,n,`${t}Button`)}const Mz=(e,t)=>{const n=Zj();n&&(!function(e,t){"string"==typeof t?e.style.background=t:t||az([document.documentElement,document.body],yj["no-backdrop"])}(n,t.backdrop),function(e,t){if(!t)return;t in yj?az(e,yj[t]):(kj('The "position" parameter is not valid, defaulting to "center"'),az(e,yj.center))}(n,t.position),function(e,t){if(!t)return;az(e,yj[`grow-${t}`])}(n,t.grow),ez(n,t,"container"))};var Az={innerParams:new WeakMap,domCache:new WeakMap};const _z=["input","file","range","select","radio","checkbox","textarea"],Oz=e=>{if(!e.input)return;if(!Lz[e.input])return void Cj(`Unexpected type of input! Expected ${Object.keys(Lz).join(" | ")}, got "${e.input}"`);const t=Hz(e.input);if(!t)return;const n=Lz[e.input](t,e);sz(t),e.inputAutoFocus&&setTimeout(()=>{nz(n)})},Nz=(e,t)=>{const n=Hj();if(!n)return;const r=tz(n,e);if(r){(e=>{for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name;["id","type","value","style"].includes(n)||e.removeAttribute(n)}})(r);for(const e in t)r.setAttribute(e,t[e])}},Zz=e=>{if(!e.input)return;const t=Hz(e.input);t&&ez(t,e,"input")},Dz=(e,t)=>{!e.placeholder&&t.inputPlaceholder&&(e.placeholder=t.inputPlaceholder)},Iz=(e,t,n)=>{if(n.inputLabel){const r=document.createElement("label"),a=yj["input-label"];r.setAttribute("for",e.id),r.className=a,"object"==typeof n.customClass&&az(r,n.customClass.inputLabel),r.innerText=n.inputLabel,t.insertAdjacentElement("beforebegin",r)}},Hz=e=>{const t=Hj();if(t)return oz(t,yj[e]||yj.input)},Tz=(e,t)=>{["string","number"].includes(typeof t)?e.value=`${t}`:Nj(t)||kj(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`)},Lz={};Lz.text=Lz.email=Lz.password=Lz.number=Lz.tel=Lz.url=Lz.search=Lz.date=Lz["datetime-local"]=Lz.time=Lz.week=Lz.month=(e,t)=>(Tz(e,t.inputValue),Iz(e,e,t),Dz(e,t),e.type=t.input,e),Lz.file=(e,t)=>(Iz(e,e,t),Dz(e,t),e),Lz.range=(e,t)=>{const n=e.querySelector("input"),r=e.querySelector("output");return Tz(n,t.inputValue),n.type=t.input,Tz(r,t.inputValue),Iz(n,e,t),e},Lz.select=(e,t)=>{if(e.textContent="",t.inputPlaceholder){const n=document.createElement("option");Qj(n,t.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,e.appendChild(n)}return Iz(e,e,t),e},Lz.radio=e=>(e.textContent="",e),Lz.checkbox=(e,t)=>{const n=tz(Hj(),"checkbox");n.value="1",n.checked=Boolean(t.inputValue);const r=e.querySelector("span");return Qj(r,t.inputPlaceholder||t.inputLabel),n},Lz.textarea=(e,t)=>{Tz(e,t.inputValue),Dz(e,t),Iz(e,e,t);return setTimeout(()=>{if("MutationObserver"in window){const n=parseInt(window.getComputedStyle(Hj()).width);new MutationObserver(()=>{if(!document.body.contains(e))return;const r=e.offsetWidth+(a=e,parseInt(window.getComputedStyle(a).marginLeft)+parseInt(window.getComputedStyle(a).marginRight));var a;r>n?Hj().style.width=`${r}px`:lz(Hj(),"width",t.width)}).observe(e,{attributes:!0,attributeFilter:["style"]})}}),e};const Pz=(e,t)=>{const n=Pj();n&&(dz(n),ez(n,t,"htmlContainer"),t.html?(wz(t.html,n),sz(n,"block")):t.text?(n.textContent=t.text,sz(n,"block")):cz(n),((e,t)=>{const n=Hj();if(!n)return;const r=Az.innerParams.get(e),a=!r||t.input!==r.input;_z.forEach(e=>{const r=oz(n,yj[e]);r&&(Nz(e,t.inputAttributes),r.className=yj[e],a&&cz(r))}),t.input&&(a&&Oz(t),Zz(t))})(e,t))},Vz=(e,t)=>{for(const[n,r]of Object.entries(wj))t.icon!==n&&iz(e,r);az(e,t.icon&&wj[t.icon]),zz(e,t),Bz(),ez(e,t,"icon")},Bz=()=>{const e=Hj();if(!e)return;const t=window.getComputedStyle(e).getPropertyValue("background-color"),n=e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let e=0;e<n.length;e++)n[e].style.backgroundColor=t},jz=(e,t)=>{if(!t.icon&&!t.iconHtml)return;let n=e.innerHTML,r="";if(t.iconHtml)r=Rz(t.iconHtml);else if("success"===t.icon)r=(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),n=n.replace(/ style=".*?"/g,"");else if("error"===t.icon)r='\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';else if(t.icon){r=Rz({question:"?",warning:"!",info:"i"}[t.icon])}n.trim()!==r.trim()&&Qj(e,r)},zz=(e,t)=>{if(t.iconColor){e.style.color=t.iconColor,e.style.borderColor=t.iconColor;for(const n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])hz(e,n,"background-color",t.iconColor);hz(e,".swal2-success-ring","border-color",t.iconColor)}},Rz=e=>`<div class="${yj["icon-content"]}">${e}</div>`;let Wz=!1,Fz=0,qz=0,Yz=0,Uz=0;const Gz=e=>{const t=Hj();if(e.target===t||Tj().contains(e.target)){Wz=!0;const n=Jz(e);Fz=n.clientX,qz=n.clientY,Yz=parseInt(t.style.insetInlineStart)||0,Uz=parseInt(t.style.insetBlockStart)||0,az(t,"swal2-dragging")}},Xz=e=>{const t=Hj();if(Wz){let{clientX:n,clientY:r}=Jz(e);t.style.insetInlineStart=`${Yz+(n-Fz)}px`,t.style.insetBlockStart=`${Uz+(r-qz)}px`}},Kz=()=>{const e=Hj();Wz=!1,iz(e,"swal2-dragging")},Jz=e=>{let t=0,n=0;return e.type.startsWith("mouse")?(t=e.clientX,n=e.clientY):e.type.startsWith("touch")&&(t=e.touches[0].clientX,n=e.touches[0].clientY),{clientX:t,clientY:n}},Qz=(e,t)=>{const n=Zj(),r=Hj();if(n&&r){if(t.toast){lz(n,"width",t.width),r.style.width="100%";const e=Fj();e&&r.insertBefore(e,Tj())}else lz(r,"width",t.width);lz(r,"padding",t.padding),t.color&&(r.style.color=t.color),t.background&&(r.style.background=t.background),cz(jj()),$z(r,t),t.draggable&&!t.toast?(az(r,yj.draggable),(e=>{e.addEventListener("mousedown",Gz),document.body.addEventListener("mousemove",Xz),e.addEventListener("mouseup",Kz),e.addEventListener("touchstart",Gz),document.body.addEventListener("touchmove",Xz),e.addEventListener("touchend",Kz)})(r)):(iz(r,yj.draggable),(e=>{e.removeEventListener("mousedown",Gz),document.body.removeEventListener("mousemove",Xz),e.removeEventListener("mouseup",Kz),e.removeEventListener("touchstart",Gz),document.body.removeEventListener("touchmove",Xz),e.removeEventListener("touchend",Kz)})(r))}},$z=(e,t)=>{const n=t.showClass||{};e.className=`${yj.popup} ${pz(e)?n.popup:""}`,t.toast?(az([document.documentElement,document.body],yj["toast-shown"]),az(e,yj.toast)):az(e,yj.modal),ez(e,t,"popup"),"string"==typeof t.customClass&&az(e,t.customClass),t.icon&&az(e,yj[`icon-${t.icon}`])},eR=e=>{const t=document.createElement("li");return az(t,yj["progress-step"]),Qj(t,e),t},tR=e=>{const t=document.createElement("li");return az(t,yj["progress-step-line"]),e.progressStepsDistance&&lz(t,"width",e.progressStepsDistance),t},nR=(e,t)=>{Qz(0,t),Mz(0,t),((e,t)=>{const n=Bj();if(!n)return;const{progressSteps:r,currentProgressStep:a}=t;r&&0!==r.length&&void 0!==a?(sz(n),n.textContent="",a>=r.length&&kj("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),r.forEach((e,i)=>{const o=eR(e);if(n.appendChild(o),i===a&&az(o,yj["active-progress-step"]),i!==r.length-1){const e=tR(t);n.appendChild(e)}})):cz(n)})(0,t),((e,t)=>{const n=Az.innerParams.get(e),r=Tj();if(!r)return;if(n&&t.icon===n.icon)return jz(r,t),void Vz(r,t);if(!t.icon&&!t.iconHtml)return void cz(r);if(t.icon&&-1===Object.keys(wj).indexOf(t.icon))return Cj(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`),void cz(r);sz(r),jz(r,t),Vz(r,t),az(r,t.showClass&&t.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",Bz)})(e,t),((e,t)=>{const n=Vj();n&&(t.imageUrl?(sz(n,""),n.setAttribute("src",t.imageUrl),n.setAttribute("alt",t.imageAlt||""),lz(n,"width",t.imageWidth),lz(n,"height",t.imageHeight),n.className=yj.image,ez(n,t,"image")):cz(n))})(0,t),((e,t)=>{const n=Lj();n&&(dz(n),uz(n,t.title||t.titleText,"block"),t.title&&wz(t.title,n),t.titleText&&(n.innerText=t.titleText),ez(n,t,"title"))})(0,t),((e,t)=>{const n=Gj();n&&(Qj(n,t.closeButtonHtml||""),ez(n,t,"closeButton"),uz(n,t.showCloseButton),n.setAttribute("aria-label",t.closeButtonAriaLabel||""))})(0,t),Pz(e,t),kz(0,t),((e,t)=>{const n=Yj();n&&(dz(n),uz(n,t.footer,"block"),t.footer&&wz(t.footer,n),ez(n,t,"footer"))})(0,t);const n=Hj();"function"==typeof t.didRender&&n&&t.didRender(n),vj.eventEmitter.emit("didRender",n)},rR=()=>{var e;return null===(e=zj())||void 0===e?void 0:e.click()},aR=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),iR=e=>{e.keydownTarget&&e.keydownHandlerAdded&&(e.keydownTarget.removeEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!1)},oR=(e,t)=>{var n;const r=Xj();if(r.length)return-2===(e+=t)&&(e=r.length-1),e===r.length?e=0:-1===e&&(e=r.length-1),void r[e].focus();null===(n=Hj())||void 0===n||n.focus()},lR=["ArrowRight","ArrowDown"],sR=["ArrowLeft","ArrowUp"],cR=(e,t,n)=>{e&&(t.isComposing||229===t.keyCode||(e.stopKeydownPropagation&&t.stopPropagation(),"Enter"===t.key?dR(t,e):"Tab"===t.key?hR(t):[...lR,...sR].includes(t.key)?uR(t.key):"Escape"===t.key&&pR(t,e,n)))},dR=(e,t)=>{if(!Aj(t.allowEnterKey))return;const n=tz(Hj(),t.input);if(e.target&&n&&e.target instanceof HTMLElement&&e.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(t.input))return;rR(),e.preventDefault()}},hR=e=>{const t=e.target,n=Xj();let r=-1;for(let e=0;e<n.length;e++)if(t===n[e]){r=e;break}e.shiftKey?oR(r,-1):oR(r,1),e.stopPropagation(),e.preventDefault()},uR=e=>{const t=qj(),n=zj(),r=Wj(),a=Rj();if(!(t&&n&&r&&a))return;const i=[n,r,a];if(document.activeElement instanceof HTMLElement&&!i.includes(document.activeElement))return;const o=lR.includes(e)?"nextElementSibling":"previousElementSibling";let l=document.activeElement;if(l){for(let e=0;e<t.children.length;e++){if(l=l[o],!l)return;if(l instanceof HTMLButtonElement&&pz(l))break}l instanceof HTMLButtonElement&&l.focus()}},pR=(e,t,n)=>{e.preventDefault(),Aj(t.allowEscapeKey)&&n(aR.esc)};var fR={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap};const mR=()=>{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")})},vR="undefined"!=typeof window&&!!window.GestureEvent,gR=()=>{const e=Zj();if(!e)return;let t;e.ontouchstart=e=>{t=bR(e)},e.ontouchmove=e=>{t&&(e.preventDefault(),e.stopPropagation())}},bR=e=>{const t=e.target,n=Zj(),r=Pj();return!(!n||!r)&&(!yR(e)&&!wR(e)&&(t===n||!(fz(n)||!(t instanceof HTMLElement)||((e,t)=>{let n=e;for(;n&&n!==t;){if(fz(n))return!0;n=n.parentElement}return!1})(t,r)||"INPUT"===t.tagName||"TEXTAREA"===t.tagName||fz(r)&&r.contains(t))))},yR=e=>e.touches&&e.touches.length&&"stylus"===e.touches[0].touchType,wR=e=>e.touches&&e.touches.length>1;let xR=null;const ER=e=>{null===xR&&(document.body.scrollHeight>window.innerHeight||"scroll"===e)&&(xR=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${xR+(()=>{const e=document.createElement("div");e.className=yj["scrollbar-measure"],document.body.appendChild(e);const t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t})()}px`)};function kR(e,t,n,r){Jj()?ZR(e,r):(gj(n).then(()=>ZR(e,r)),iR(vj)),vR?(t.setAttribute("style","display:none !important"),t.removeAttribute("class"),t.innerHTML=""):t.remove(),Kj()&&(null!==xR&&(document.body.style.paddingRight=`${xR}px`,xR=null),(()=>{if($j(document.body,yj.iosfix)){const e=parseInt(document.body.style.top,10);iz(document.body,yj.iosfix),document.body.style.top="",document.body.scrollTop=-1*e}})(),mR()),iz([document.documentElement,document.body],[yj.shown,yj["height-auto"],yj["no-backdrop"],yj["toast-shown"]])}function CR(e){e=_R(e);const t=fR.swalPromiseResolve.get(this),n=SR(this);this.isAwaitingPromise?e.isDismissed||(AR(this),t(e)):n&&t(e)}const SR=e=>{const t=Hj();if(!t)return!1;const n=Az.innerParams.get(e);if(!n||$j(t,n.hideClass.popup))return!1;iz(t,n.showClass.popup),az(t,n.hideClass.popup);const r=Zj();return iz(r,n.showClass.backdrop),az(r,n.hideClass.backdrop),OR(e,t,n),!0};function MR(e){const t=fR.swalPromiseReject.get(this);AR(this),t&&t(e)}const AR=e=>{e.isAwaitingPromise&&(delete e.isAwaitingPromise,Az.innerParams.get(e)||e._destroy())},_R=e=>void 0===e?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},e),OR=(e,t,n)=>{var r;const a=Zj(),i=mz(t);"function"==typeof n.willClose&&n.willClose(t),null===(r=vj.eventEmitter)||void 0===r||r.emit("willClose",t),i?NR(e,t,a,n.returnFocus,n.didClose):kR(e,a,n.returnFocus,n.didClose)},NR=(e,t,n,r,a)=>{vj.swalCloseEventFinishedCallback=kR.bind(null,e,n,r,a);const i=function(e){var n;e.target===t&&(null===(n=vj.swalCloseEventFinishedCallback)||void 0===n||n.call(vj),delete vj.swalCloseEventFinishedCallback,t.removeEventListener("animationend",i),t.removeEventListener("transitionend",i))};t.addEventListener("animationend",i),t.addEventListener("transitionend",i)},ZR=(e,t)=>{setTimeout(()=>{var n;"function"==typeof t&&t.bind(e.params)(),null===(n=vj.eventEmitter)||void 0===n||n.emit("didClose"),e._destroy&&e._destroy()})},DR=e=>{let t=Hj();if(t||new hF,t=Hj(),!t)return;const n=Fj();Jj()?cz(Tj()):IR(t,e),sz(n),t.setAttribute("data-loading","true"),t.setAttribute("aria-busy","true"),t.focus()},IR=(e,t)=>{const n=qj(),r=Fj();n&&r&&(!t&&pz(zj())&&(t=zj()),sz(n),t&&(cz(t),r.setAttribute("data-button-to-replace",t.className),n.insertBefore(r,t)),az([e,n],yj.loading))},HR=e=>e.checked?1:0,TR=e=>e.checked?e.value:null,LR=e=>e.files&&e.files.length?null!==e.getAttribute("multiple")?e.files:e.files[0]:null,PR=(e,t)=>{const n=Hj();if(!n)return;const r=e=>{"select"===t.input?function(e,t,n){const r=oz(e,yj.select);if(!r)return;const a=(e,t,r)=>{const a=document.createElement("option");a.value=r,Qj(a,t),a.selected=jR(r,n.inputValue),e.appendChild(a)};t.forEach(e=>{const t=e[0],n=e[1];if(Array.isArray(n)){const e=document.createElement("optgroup");e.label=t,e.disabled=!1,r.appendChild(e),n.forEach(t=>a(e,t[1],t[0]))}else a(r,n,t)}),r.focus()}(n,BR(e),t):"radio"===t.input&&function(e,t,n){const r=oz(e,yj.radio);if(!r)return;t.forEach(e=>{const t=e[0],a=e[1],i=document.createElement("input"),o=document.createElement("label");i.type="radio",i.name=yj.radio,i.value=t,jR(t,n.inputValue)&&(i.checked=!0);const l=document.createElement("span");Qj(l,a),l.className=yj.label,o.appendChild(i),o.appendChild(l),r.appendChild(o)});const a=r.querySelectorAll("input");a.length&&a[0].focus()}(n,BR(e),t)};_j(t.inputOptions)||Nj(t.inputOptions)?(DR(zj()),Oj(t.inputOptions).then(t=>{e.hideLoading(),r(t)})):"object"==typeof t.inputOptions?r(t.inputOptions):Cj("Unexpected type of inputOptions! Expected object, Map or Promise, got "+typeof t.inputOptions)},VR=(e,t)=>{const n=e.getInput();n&&(cz(n),Oj(t.inputValue).then(r=>{n.value="number"===t.input?`${parseFloat(r)||0}`:`${r}`,sz(n),n.focus(),e.hideLoading()}).catch(t=>{Cj(`Error in inputValue promise: ${t}`),n.value="",sz(n),n.focus(),e.hideLoading()}))};const BR=e=>{const t=[];return e instanceof Map?e.forEach((e,n)=>{let r=e;"object"==typeof r&&(r=BR(r)),t.push([n,r])}):Object.keys(e).forEach(n=>{let r=e[n];"object"==typeof r&&(r=BR(r)),t.push([n,r])}),t},jR=(e,t)=>!!t&&t.toString()===e.toString(),zR=(e,t)=>{const n=Az.innerParams.get(e);if(!n.input)return void Cj(`The "input" parameter is needed to be set when using returnInputValueOn${Ej(t)}`);const r=e.getInput(),a=((e,t)=>{const n=e.getInput();if(!n)return null;switch(t.input){case"checkbox":return HR(n);case"radio":return TR(n);case"file":return LR(n);default:return t.inputAutoTrim?n.value.trim():n.value}})(e,n);n.inputValidator?RR(e,a,t):r&&!r.checkValidity()?(e.enableButtons(),e.showValidationMessage(n.validationMessage||r.validationMessage)):"deny"===t?WR(e,a):YR(e,a)},RR=(e,t,n)=>{const r=Az.innerParams.get(e);e.disableInput();Promise.resolve().then(()=>Oj(r.inputValidator(t,r.validationMessage))).then(r=>{e.enableButtons(),e.enableInput(),r?e.showValidationMessage(r):"deny"===n?WR(e,t):YR(e,t)})},WR=(e,t)=>{const n=Az.innerParams.get(e||void 0);if(n.showLoaderOnDeny&&DR(Wj()),n.preDeny){e.isAwaitingPromise=!0;Promise.resolve().then(()=>Oj(n.preDeny(t,n.validationMessage))).then(n=>{!1===n?(e.hideLoading(),AR(e)):e.close({isDenied:!0,value:void 0===n?t:n})}).catch(t=>qR(e||void 0,t))}else e.close({isDenied:!0,value:t})},FR=(e,t)=>{e.close({isConfirmed:!0,value:t})},qR=(e,t)=>{e.rejectPromise(t)},YR=(e,t)=>{const n=Az.innerParams.get(e||void 0);if(n.showLoaderOnConfirm&&DR(),n.preConfirm){e.resetValidationMessage(),e.isAwaitingPromise=!0;Promise.resolve().then(()=>Oj(n.preConfirm(t,n.validationMessage))).then(n=>{pz(jj())||!1===n?(e.hideLoading(),AR(e)):FR(e,void 0===n?t:n)}).catch(t=>qR(e||void 0,t))}else FR(e,t)};function UR(){const e=Az.innerParams.get(this);if(!e)return;const t=Az.domCache.get(this);cz(t.loader),Jj()?e.icon&&sz(Tj()):GR(t),iz([t.popup,t.actions],yj.loading),t.popup.removeAttribute("aria-busy"),t.popup.removeAttribute("data-loading"),t.confirmButton.disabled=!1,t.denyButton.disabled=!1,t.cancelButton.disabled=!1}const GR=e=>{const t=e.popup.getElementsByClassName(e.loader.getAttribute("data-button-to-replace"));t.length?sz(t[0],"inline-block"):pz(zj())||pz(Wj())||pz(Rj())||cz(e.actions)};function XR(){const e=Az.innerParams.get(this),t=Az.domCache.get(this);return t?tz(t.popup,e.input):null}function KR(e,t,n){const r=Az.domCache.get(e);t.forEach(e=>{r[e].disabled=n})}function JR(e,t){const n=Hj();if(n&&e)if("radio"===e.type){const e=n.querySelectorAll(`[name="${yj.radio}"]`);for(let n=0;n<e.length;n++)e[n].disabled=t}else e.disabled=t}function QR(){KR(this,["confirmButton","denyButton","cancelButton"],!1)}function $R(){KR(this,["confirmButton","denyButton","cancelButton"],!0)}function eW(){JR(this.getInput(),!1)}function tW(){JR(this.getInput(),!0)}function nW(e){const t=Az.domCache.get(this),n=Az.innerParams.get(this);Qj(t.validationMessage,e),t.validationMessage.className=yj["validation-message"],n.customClass&&n.customClass.validationMessage&&az(t.validationMessage,n.customClass.validationMessage),sz(t.validationMessage);const r=this.getInput();r&&(r.setAttribute("aria-invalid","true"),r.setAttribute("aria-describedby",yj["validation-message"]),nz(r),az(r,yj.inputerror))}function rW(){const e=Az.domCache.get(this);e.validationMessage&&cz(e.validationMessage);const t=this.getInput();t&&(t.removeAttribute("aria-invalid"),t.removeAttribute("aria-describedby"),iz(t,yj.inputerror))}const aW={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:"×",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},iW=["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"],oW={allowEnterKey:void 0},lW=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],sW=e=>Object.prototype.hasOwnProperty.call(aW,e),cW=e=>-1!==iW.indexOf(e),dW=e=>oW[e],hW=e=>{sW(e)||kj(`Unknown parameter "${e}"`)},uW=e=>{lW.includes(e)&&kj(`The parameter "${e}" is incompatible with toasts`)},pW=e=>{const t=dW(e);t&&Mj(e,t)},fW=e=>{!1===e.backdrop&&e.allowOutsideClick&&kj('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),e.theme&&!["light","dark","auto","minimal","borderless","embed-iframe","bulma","bulma-light","bulma-dark"].includes(e.theme)&&kj(`Invalid theme "${e.theme}"`);for(const t in e)hW(t),e.toast&&uW(t),pW(t)};function mW(e){const t=Zj(),n=Hj(),r=Az.innerParams.get(this);if(!n||$j(n,r.hideClass.popup))return void kj("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 a=vW(e),i=Object.assign({},r,a);fW(i),t.dataset.swal2Theme=i.theme,nR(this,i),Az.innerParams.set(this,i),Object.defineProperties(this,{params:{value:Object.assign({},this.params,e),writable:!1,enumerable:!0}})}const vW=e=>{const t={};return Object.keys(e).forEach(n=>{cW(n)?t[n]=e[n]:kj(`Invalid parameter to update: ${n}`)}),t};function gW(){const e=Az.domCache.get(this),t=Az.innerParams.get(this);t?(e.popup&&vj.swalCloseEventFinishedCallback&&(vj.swalCloseEventFinishedCallback(),delete vj.swalCloseEventFinishedCallback),"function"==typeof t.didDestroy&&t.didDestroy(),vj.eventEmitter.emit("didDestroy"),bW(this)):yW(this)}const bW=e=>{yW(e),delete e.params,delete vj.keydownHandler,delete vj.keydownTarget,delete vj.currentInstance},yW=e=>{e.isAwaitingPromise?(wW(Az,e),e.isAwaitingPromise=!0):(wW(fR,e),wW(Az,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)},wW=(e,t)=>{for(const n in e)e[n].delete(t)};var xW=Object.freeze({__proto__:null,_destroy:gW,close:CR,closeModal:CR,closePopup:CR,closeToast:CR,disableButtons:$R,disableInput:tW,disableLoading:UR,enableButtons:QR,enableInput:eW,getInput:XR,handleAwaitingPromise:AR,hideLoading:UR,rejectPromise:MR,resetValidationMessage:rW,showValidationMessage:nW,update:mW});const EW=(e,t,n)=>{t.popup.onclick=()=>{e&&(kW(e)||e.timer||e.input)||n(aR.close)}},kW=e=>!!(e.showConfirmButton||e.showDenyButton||e.showCancelButton||e.showCloseButton);let CW=!1;const SW=e=>{e.popup.onmousedown=()=>{e.container.onmouseup=function(t){e.container.onmouseup=()=>{},t.target===e.container&&(CW=!0)}}},MW=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))&&(CW=!0)}}},AW=(e,t,n)=>{t.container.onclick=r=>{CW?CW=!1:r.target===t.container&&Aj(e.allowOutsideClick)&&n(aR.backdrop)}},_W=e=>e instanceof Element||(e=>"object"==typeof e&&e.jquery)(e);const OW=()=>{if(vj.timeout)return(()=>{const e=Uj();if(!e)return;const t=parseInt(window.getComputedStyle(e).width);e.style.removeProperty("transition"),e.style.width="100%";const n=t/parseInt(window.getComputedStyle(e).width)*100;e.style.width=`${n}%`})(),vj.timeout.stop()},NW=()=>{if(vj.timeout){const e=vj.timeout.start();return vz(e),e}};let ZW=!1;const DW={};const IW=e=>{for(let t=e.target;t&&t!==document;t=t.parentNode)for(const e in DW){const n=t.getAttribute(e);if(n)return void DW[e].fire({template:n})}};vj.eventEmitter=new class{constructor(){this.events={}}_getHandlersByEventName(e){return void 0===this.events[e]&&(this.events[e]=[]),this.events[e]}on(e,t){const n=this._getHandlersByEventName(e);n.includes(t)||n.push(t)}once(e,t){const n=(...r)=>{this.removeListener(e,n),t.apply(this,r)};this.on(e,n)}emit(e,...t){this._getHandlersByEventName(e).forEach(e=>{try{e.apply(this,t)}catch(e){console.error(e)}})}removeListener(e,t){const n=this._getHandlersByEventName(e),r=n.indexOf(t);r>-1&&n.splice(r,1)}removeAllListeners(e){void 0!==this.events[e]&&(this.events[e].length=0)}reset(){this.events={}}};var HW=Object.freeze({__proto__:null,argsToParams:e=>{const t={};return"object"!=typeof e[0]||_W(e[0])?["title","html","icon"].forEach((n,r)=>{const a=e[r];"string"==typeof a||_W(a)?t[n]=a:void 0!==a&&Cj(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof a}`)}):Object.assign(t,e[0]),t},bindClickHandler:function(e="data-swal-template"){DW[e]=this,ZW||(document.body.addEventListener("click",IW),ZW=!0)},clickCancel:()=>{var e;return null===(e=Rj())||void 0===e?void 0:e.click()},clickConfirm:rR,clickDeny:()=>{var e;return null===(e=Wj())||void 0===e?void 0:e.click()},enableLoading:DR,fire:function(...e){return new this(...e)},getActions:qj,getCancelButton:Rj,getCloseButton:Gj,getConfirmButton:zj,getContainer:Zj,getDenyButton:Wj,getFocusableElements:Xj,getFooter:Yj,getHtmlContainer:Pj,getIcon:Tj,getIconContent:()=>Ij(yj["icon-content"]),getImage:Vj,getInputLabel:()=>Ij(yj["input-label"]),getLoader:Fj,getPopup:Hj,getProgressSteps:Bj,getTimerLeft:()=>vj.timeout&&vj.timeout.getTimerLeft(),getTimerProgressBar:Uj,getTitle:Lj,getValidationMessage:jj,increaseTimer:e=>{if(vj.timeout){const t=vj.timeout.increase(e);return vz(t,!0),t}},isDeprecatedParameter:dW,isLoading:()=>{const e=Hj();return!!e&&e.hasAttribute("data-loading")},isTimerRunning:()=>!(!vj.timeout||!vj.timeout.isRunning()),isUpdatableParameter:cW,isValidParameter:sW,isVisible:()=>pz(Hj()),mixin:function(e){return class extends(this){_main(t,n){return super._main(t,Object.assign({},e,n))}}},off:(e,t)=>{e?t?vj.eventEmitter.removeListener(e,t):vj.eventEmitter.removeAllListeners(e):vj.eventEmitter.reset()},on:(e,t)=>{vj.eventEmitter.on(e,t)},once:(e,t)=>{vj.eventEmitter.once(e,t)},resumeTimer:NW,showLoading:DR,stopTimer:OW,toggleTimer:()=>{const e=vj.timeout;return e&&(e.running?OW():NW())}});class TW{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 LW=["swal-title","swal-html","swal-footer"],PW=e=>{const t={};return Array.from(e.querySelectorAll("swal-param")).forEach(e=>{qW(e,["name","value"]);const n=e.getAttribute("name"),r=e.getAttribute("value");n&&r&&(t[n]="boolean"==typeof aW[n]?"false"!==r:"object"==typeof aW[n]?JSON.parse(r):r)}),t},VW=e=>{const t={};return Array.from(e.querySelectorAll("swal-function-param")).forEach(e=>{const n=e.getAttribute("name"),r=e.getAttribute("value");n&&r&&(t[n]=new Function(`return ${r}`)())}),t},BW=e=>{const t={};return Array.from(e.querySelectorAll("swal-button")).forEach(e=>{qW(e,["type","color","aria-label"]);const n=e.getAttribute("type");n&&["confirm","cancel","deny"].includes(n)&&(t[`${n}ButtonText`]=e.innerHTML,t[`show${Ej(n)}Button`]=!0,e.hasAttribute("color")&&(t[`${n}ButtonColor`]=e.getAttribute("color")),e.hasAttribute("aria-label")&&(t[`${n}ButtonAriaLabel`]=e.getAttribute("aria-label")))}),t},jW=e=>{const t={},n=e.querySelector("swal-image");return n&&(qW(n,["src","width","height","alt"]),n.hasAttribute("src")&&(t.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(t.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(t.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(t.imageAlt=n.getAttribute("alt")||void 0)),t},zW=e=>{const t={},n=e.querySelector("swal-icon");return n&&(qW(n,["type","color"]),n.hasAttribute("type")&&(t.icon=n.getAttribute("type")),n.hasAttribute("color")&&(t.iconColor=n.getAttribute("color")),t.iconHtml=n.innerHTML),t},RW=e=>{const t={},n=e.querySelector("swal-input");n&&(qW(n,["type","label","placeholder","value"]),t.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(t.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(t.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(t.inputValue=n.getAttribute("value")));const r=Array.from(e.querySelectorAll("swal-input-option"));return r.length&&(t.inputOptions={},r.forEach(e=>{qW(e,["value"]);const n=e.getAttribute("value");if(!n)return;const r=e.innerHTML;t.inputOptions[n]=r})),t},WW=(e,t)=>{const n={};for(const r in t){const a=t[r],i=e.querySelector(a);i&&(qW(i,[]),n[a.replace(/^swal-/,"")]=i.innerHTML.trim())}return n},FW=e=>{const t=LW.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(e.children).forEach(e=>{const n=e.tagName.toLowerCase();t.includes(n)||kj(`Unrecognized element <${n}>`)})},qW=(e,t)=>{Array.from(e.attributes).forEach(n=>{-1===t.indexOf(n.name)&&kj([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`,""+(t.length?`Allowed attributes are: ${t.join(", ")}`:"To set the value, use HTML within the element.")])})},YW=e=>{const t=Zj(),n=Hj();"function"==typeof e.willOpen&&e.willOpen(n),vj.eventEmitter.emit("willOpen",n);const r=window.getComputedStyle(document.body).overflowY;KW(t,n,e),setTimeout(()=>{GW(t,n)},10),Kj()&&(XW(t,e.scrollbarPadding,r),(()=>{const e=Zj();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"))})})()),Jj()||vj.previousActiveElement||(vj.previousActiveElement=document.activeElement),"function"==typeof e.didOpen&&setTimeout(()=>e.didOpen(n)),vj.eventEmitter.emit("didOpen",n),iz(t,yj["no-transition"])},UW=e=>{const t=Hj();if(e.target!==t)return;const n=Zj();t.removeEventListener("animationend",UW),t.removeEventListener("transitionend",UW),n.style.overflowY="auto"},GW=(e,t)=>{mz(t)?(e.style.overflowY="hidden",t.addEventListener("animationend",UW),t.addEventListener("transitionend",UW)):e.style.overflowY="auto"},XW=(e,t,n)=>{(()=>{if(vR&&!$j(document.body,yj.iosfix)){const e=document.body.scrollTop;document.body.style.top=-1*e+"px",az(document.body,yj.iosfix),gR()}})(),t&&"hidden"!==n&&ER(n),setTimeout(()=>{e.scrollTop=0})},KW=(e,t,n)=>{az(e,n.showClass.backdrop),n.animation?(t.style.setProperty("opacity","0","important"),sz(t,"grid"),setTimeout(()=>{az(t,n.showClass.popup),t.style.removeProperty("opacity")},10)):sz(t,"grid"),az([document.documentElement,document.body],yj.shown),n.heightAuto&&n.backdrop&&!n.toast&&az([document.documentElement,document.body],yj["height-auto"])};var JW=(e,t)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e)?Promise.resolve():Promise.resolve(t||"Invalid email address"),QW=(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 $W(e){!function(e){e.inputValidator||("email"===e.input&&(e.inputValidator=JW),"url"===e.input&&(e.inputValidator=QW))}(e),e.showLoaderOnConfirm&&!e.preConfirm&&kj("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)&&(kj('Target parameter is not valid, defaulting to "body"'),e.target="body")}(e),"string"==typeof e.title&&(e.title=e.title.split("\n").join("<br />")),yz(e)}let eF;var tF=new WeakMap;class nF{constructor(...e){if(mj(this,tF,void 0),"undefined"==typeof window)return;eF=this;const t=Object.freeze(this.constructor.argsToParams(e));this.params=t,this.isAwaitingPromise=!1,function(e,t,n){e.set(pj(e,t),n)}(tF,this,this._main(eF.params))}_main(e,t={}){if(fW(Object.assign({},t,e)),vj.currentInstance){const e=fR.swalPromiseResolve.get(vj.currentInstance),{isAwaitingPromise:t}=vj.currentInstance;vj.currentInstance._destroy(),t||e({isDismissed:!0}),Kj()&&mR()}vj.currentInstance=eF;const n=aF(e,t);$W(n),Object.freeze(n),vj.timeout&&(vj.timeout.stop(),delete vj.timeout),clearTimeout(vj.restoreFocusTimeout);const r=iF(eF);return nR(eF,n),Az.innerParams.set(eF,n),rF(eF,r,n)}then(e){return fj(tF,this).then(e)}finally(e){return fj(tF,this).finally(e)}}const rF=(e,t,n)=>new Promise((r,a)=>{const i=t=>{e.close({isDismissed:!0,dismiss:t})};fR.swalPromiseResolve.set(e,r),fR.swalPromiseReject.set(e,a),t.confirmButton.onclick=()=>{(e=>{const t=Az.innerParams.get(e);e.disableButtons(),t.input?zR(e,"confirm"):YR(e,!0)})(e)},t.denyButton.onclick=()=>{(e=>{const t=Az.innerParams.get(e);e.disableButtons(),t.returnInputValueOnDeny?zR(e,"deny"):WR(e,!1)})(e)},t.cancelButton.onclick=()=>{((e,t)=>{e.disableButtons(),t(aR.cancel)})(e,i)},t.closeButton.onclick=()=>{i(aR.close)},((e,t,n)=>{e.toast?EW(e,t,n):(SW(t),MW(t),AW(e,t,n))})(n,t,i),((e,t,n)=>{iR(e),t.toast||(e.keydownHandler=e=>cR(t,e,n),e.keydownTarget=t.keydownListenerCapture?window:Hj(),e.keydownListenerCapture=t.keydownListenerCapture,e.keydownTarget.addEventListener("keydown",e.keydownHandler,{capture:e.keydownListenerCapture}),e.keydownHandlerAdded=!0)})(vj,n,i),((e,t)=>{"select"===t.input||"radio"===t.input?PR(e,t):["text","email","number","tel","textarea"].some(e=>e===t.input)&&(_j(t.inputValue)||Nj(t.inputValue))&&(DR(zj()),VR(e,t))})(e,n),YW(n),oF(vj,n,i),lF(t,n),setTimeout(()=>{t.container.scrollTop=0})}),aF=(e,t)=>{const n=(e=>{const t="string"==typeof e.template?document.querySelector(e.template):e.template;if(!t)return{};const n=t.content;return FW(n),Object.assign(PW(n),VW(n),BW(n),jW(n),zW(n),RW(n),WW(n,LW))})(e),r=Object.assign({},aW,t,n,e);return r.showClass=Object.assign({},aW.showClass,r.showClass),r.hideClass=Object.assign({},aW.hideClass,r.hideClass),!1===r.animation&&(r.showClass={backdrop:"swal2-noanimation"},r.hideClass={}),r},iF=e=>{const t={popup:Hj(),container:Zj(),actions:qj(),confirmButton:zj(),denyButton:Wj(),cancelButton:Rj(),loader:Fj(),closeButton:Gj(),validationMessage:jj(),progressSteps:Bj()};return Az.domCache.set(e,t),t},oF=(e,t,n)=>{const r=Uj();cz(r),t.timer&&(e.timeout=new TW(()=>{n("timer"),delete e.timeout},t.timer),t.timerProgressBar&&(sz(r),ez(r,t,"timerProgressBar"),setTimeout(()=>{e.timeout&&e.timeout.running&&vz(t.timer)})))},lF=(e,t)=>{if(!t.toast)return Aj(t.allowEnterKey)?void(sF(e)||cF(e,t)||oR(-1,1)):(Mj("allowEnterKey"),void dF())},sF=e=>{const t=Array.from(e.popup.querySelectorAll("[autofocus]"));for(const e of t)if(e instanceof HTMLElement&&pz(e))return e.focus(),!0;return!1},cF=(e,t)=>t.focusDeny&&pz(e.denyButton)?(e.denyButton.focus(),!0):t.focusCancel&&pz(e.cancelButton)?(e.cancelButton.focus(),!0):!(!t.focusConfirm||!pz(e.confirmButton))&&(e.confirmButton.focus(),!0),dF=()=>{document.activeElement instanceof HTMLElement&&"function"==typeof document.activeElement.blur&&document.activeElement.blur()};if("undefined"!=typeof window&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){const e=new Date,t=localStorage.getItem("swal-initiation");t?(e.getTime()-Date.parse(t))/864e5>3&&setTimeout(()=>{document.body.style.pointerEvents="none";const e=document.createElement("audio");e.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",e.loop=!0,document.body.appendChild(e),setTimeout(()=>{e.play().catch(()=>{})},2500)},500):localStorage.setItem("swal-initiation",`${e}`)}nF.prototype.disableButtons=$R,nF.prototype.enableButtons=QR,nF.prototype.getInput=XR,nF.prototype.disableInput=tW,nF.prototype.enableInput=eW,nF.prototype.hideLoading=UR,nF.prototype.disableLoading=UR,nF.prototype.showValidationMessage=nW,nF.prototype.resetValidationMessage=rW,nF.prototype.close=CR,nF.prototype.closePopup=CR,nF.prototype.closeModal=CR,nF.prototype.closeToast=CR,nF.prototype.rejectPromise=MR,nF.prototype.update=mW,nF.prototype._destroy=gW,Object.assign(nF,HW),Object.keys(xW).forEach(e=>{nF[e]=function(...t){return eF&&eF[e]?eF[e](...t):null}}),nF.DismissReason=aR,nF.version="11.22.3";const hF=nF;hF.default=hF,"undefined"!=typeof document&&function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.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.1s;--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-icon-animations: true;--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 $swal2-outline-color;--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;--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:all}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";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;container-name:swal2-popup}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;word-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;word-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:"!";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)}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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}@container swal2-popup style(--swal2-icon-animations:true){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)}@container swal2-popup style(--swal2-icon-animations:true){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:all}.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}@container swal2-popup style(--swal2-icon-animations:true){.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:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);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}}');const uF=[{key:"title",getter:e=>e.getTitle()},{key:"html",getter:e=>e.getHtmlContainer()},{key:"confirmButtonText",getter:e=>e.getConfirmButton()},{key:"denyButtonText",getter:e=>e.getDenyButton()},{key:"cancelButtonText",getter:e=>e.getCancelButton()},{key:"footer",getter:e=>e.getFooter()},{key:"closeButtonHtml",getter:e=>e.getCloseButton()},{key:"iconHtml",getter:e=>e.getIconContent()},{key:"loaderHtml",getter:e=>e.getLoader()}],pF=()=>{};const fF=function(e){function t(e){const t={},n={},r=uF.map(e=>e.key);return Object.entries(e).forEach(e=>{let[a,i]=e;r.includes(a)&&f.default.isValidElement(i)?(t[a]=i,n[a]=" "):n[a]=i}),[t,n]}function n(t,n){Object.entries(n).forEach(n=>{let[r,a]=n;const i=uF.find(e=>e.key===r).getter(e),l=o.createRoot(i);l.render(a),t.__roots.push(l)})}function r(e){e.__roots.forEach(e=>{e.unmount()}),e.__roots=[]}return class extends e{static argsToParams(t){if(f.default.isValidElement(t[0])||f.default.isValidElement(t[1])){const e={};return["title","html","icon"].forEach((n,r)=>{void 0!==t[r]&&(e[n]=t[r])}),e}return e.argsToParams(t)}_main(e,a){this.__roots=[],this.__params=Object.assign({},a,e);const[i,o]=t(this.__params),l=o.willOpen||pF,s=o.didOpen||pF,c=o.didDestroy||pF;return super._main(Object.assign({},o,{willOpen:e=>{n(this,i),l(e)},didOpen:e=>{setTimeout(()=>{s(e)})},didDestroy:e=>{c(e),r(this)}}))}update(e){Object.assign(this.__params,e),r(this);const[a,i]=t(this.__params);super.update(i),n(this,a)}}}(hF),mF=()=>{for(let e=0;e<20;e++){return crypto.randomUUID()}},vF=(e,t,n)=>e.filter(e=>!t.some(t=>t[n]===e[n])),gF=(e,t="dd/MM/yyyy")=>{if(!e)return"";const n=new Date(e),r={dd:String(n.getDate()).padStart(2,"0"),MM:String(n.getMonth()+1).padStart(2,"0"),yyyy:n.getFullYear(),HH:String(n.getHours()).padStart(2,"0"),mm:String(n.getMinutes()).padStart(2,"0")};return t?.replace(/dd|MM|yyyy|HH|mm/g,e=>r[e])},bF=(e,t)=>e?t&&e===t?",":e:void 0,yF=(e,t)=>t?e&&e===t?".":t:e&&"."===e?",":".",wF=e=>"number"==typeof e||!isNaN(Number(e))&&""!==e?.toString().trim(),xF=e=>{const t=[...e];let n=[];return t.forEach(e=>{e.children?n=n.concat(xF(e.children)):n.push(e)}),n},EF=e=>JSON.parse(JSON.stringify(e)),kF=e=>{const t=[];let n=0;function r(e){return e.reduce((e,t)=>e+(t.children?r(t.children):1),0)}return n=function e(t,n=0){return t.reduce((t,r)=>{const a=r.children?e(r.children,n+1):n+1;return Math.max(t,a)},n)}(e),function e(a,i=0){t[i]=t[i]||[],a.forEach(a=>{const o=Array.isArray(a.children)&&a.children.length>0;t[i].push({...a,colspan:o?r(a.children??[]):1,rowspan:o?1:n-i,children:o?a.children:[]}),o&&e(a.children??[],i+1)})}(e),t},CF=(e,t,n,r)=>e?e.map(e=>e[n]===(r??t[n])?{...e,...t}:(e.children&&e.children.length>0&&(e.children=CF(e.children,t,n,r)),e)):[];function SF(e,t){const n=[];return e.forEach(e=>{if(e.parent){let r=n.find(t=>t.field===e.parent);r||(r={...t.find(t=>t.field===e.parent),children:[],chosen:!1,selected:!1},n.push(r)),r.children.push(e)}else n.push(e)}),n}const MF=e=>!!cj(e)||0===Object.keys(e).length,AF=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n].w!==t[n].w||e[n].h===t[n].h||e[n].x===t[n].x||e[n].y===t[n].y)return!1;return!0},_F=e=>[...e].reduce((e,t)=>{const n=[...e],r=n.find(e=>e[0].y===t.y);return r?r.push(t):n.push([t]),n},[]);const OF=(e,t,n,r)=>{const a=[...e];return a.forEach(e=>{e.forEach(e=>{e.id===t&&(n in e.style?e.style[n]=r:n in e?e[n]=r:e.style[n]=r)})}),a},NF=(e,t,n)=>{const r=EF(e);return Object.values(r.reduce((e,r)=>{const a=t.filter(e=>!n.includes(e)).map(e=>`${e}:${r[e]}`).join("|");return e[a]||(e[a]={},t.forEach(t=>{e[a][t]=r[t]}),n.forEach(t=>{e[a][t]=0})),n.forEach(t=>{t in r&&(e[a][t]+=Number(r[t]||0))}),e},{}))},ZF=(e,t)=>EF(e).map(e=>{let n=HF(e);return e.map(e=>("signature"===e.type?n=7:"table"===e.type&&(n=1+(t[e.table?.field??""]?.length??0)+((e.table?.fieldSums?.length??0)>0?1:0)),e.children?{...e,id:e.id?e.id:mF(),rows:n,children:IF(e.children)}:{...e,id:e.id?e.id:mF(),rows:n}))}),DF=e=>{const t=[];let n=0,r=1;return e.forEach(e=>{let a=0;e.forEach(e=>{t.push({w:e.width,h:e.rows,max:12,x:a,y:n,i:e.id,static:!1}),a+=e.width,r=e.rows}),n+=r}),t};function IF(e){return e.forEach(e=>{e.forEach(e=>{e.id=mF()})}),e}const HF=e=>{let t=0;return e.forEach(e=>{let n=0;e.children?.forEach(e=>{n+=e.reduce((e,t)=>Math.max(t.rows??1,e),0)}),t=Math.max(t,n)}),t},TF=e=>96*e/72,LF=(e,t)=>{if(e&&e.flat().length>0){const n=[...e];return n?.map(e=>e?.map(e=>e.id===t.id?{...e,...t}:e))}return[]},PF=(e,t)=>{const n=t.flat();return e.map(e=>(e.length>1?e?.sort((e,t)=>e.x-t.x):e).map(e=>{const t=n.find(t=>t&&t.id===e.i);if(t){return{...t,id:e.i,width:e.w,...t.align?{align:t.align}:{}}}return{width:e.w,id:e.i,i:e.i,rows:e.h,type:"content",children:[]}}))},VF=(e,t)=>{if(t.length>1){const n=t.reduce((t,n)=>e(t)+e(" ")+e(n));return n}return e(t.toString())},BF=(e,t)=>{e.errors?.length>0&&fF.fire({title:t("Error"),text:VF(t,[e.errors[0].propertyName,e.errors[0].errorMessage]),allowOutsideClick:!1,showCancelButton:!0,showConfirmButton:!1,cancelButtonText:t("Ok"),customClass:{cancelButton:"btn btn-danger ms-1"},buttonsStyling:!1})},jF=e=>{const{title:t,handleModal:n,typeModal:a="Edit",componentRight:i,component:o,className:l=""}=e,{t:s}=dc();return r.jsxs("div",{className:`${l||"mb-1"} modal-header d-flex align-items-center justify-content-between`,children:[r.jsxs("div",{className:"d-flex align-items-center justify-content-start",children:[r.jsxs("h5",{className:"modal-title",children:["Edit"===a||"Approval"===a?r.jsx(Bc,{fontSize:17,className:"me-1"}):"View"===a?r.jsx(qc,{fontSize:17,className:"me-1"}):"Print"===a?r.jsx(rd,{fontSize:17,className:"me-1"}):"Detail"===a?r.jsx(qc,{fontSize:17,className:"me-1"}):"Order"===a?r.jsx("span",{className:"e-icons e-sorting-1 me-1",style:{fontSize:"14px"}}):"Process"===a?r.jsx("span",{className:"e-flat e-icons e-paste-match-destination me-1",style:{fontSize:"14px"}}):"Delete"===a?r.jsx("span",{className:"e-flat e-icons e-trash me-1",style:{fontSize:"14px"}}):"Sidebar"===a?r.jsx(r.Fragment,{}):r.jsx(nd,{fontSize:17,className:"me-1"})," ",s(t)]}),o?o():r.jsx(r.Fragment,{})]}),r.jsxs("div",{className:"todo-item-action d-flex align-items-center",children:[i?i():r.jsx(r.Fragment,{}),r.jsx(ud,{className:sj("fw-normal cursor-pointer",{"d-none":!n}),fontSize:20,onClick:()=>n()})]})]})},zF=t=>{const{handleModal:n,openModal:a,windowSize:i,namePrint:o,organization:l,optionTypePrint:s,printApi:c,exportApi:d,setNamePrint:h,dataSetting:u,setTypeModal:p,setDataSetting:f,DOCUMENT_URL_VIEW:m,CDN_URL_VIEW:v,optionalFields:g,handleGetTemplate:b,defaultNameTemplate:y,deleteGeneralSettingApi:w,dataSource:x}=t,{t:E}=dc(),[k,C]=e.useState({value:"A4",label:"A4"}),[S,M]=e.useState(""),[A,_]=e.useState({}),O=()=>{n()},N=async(e,t,n)=>{if(n??o){const r=(t??s).find(e=>e.name===(n??o));if(r){M(""),h(r.name);let t={...x};if(g&&(g?.length??0)>0)for(let e=0;e<g.length;e++){const n=g[e];if(A[n.field]?.value){t=await n.callback(A[n.field]?.value,t)}}c({organization:l,setting:r.setting,file:r.file,tableFields:r.tableFields,dataFields:r.dataFields,data:[t],typePage:e??k.value}).then(e=>{M(e)}).catch(()=>GN(E("GetFail"))),f({...r})}}},Z=()=>{w(u?.id??"").then(e=>{e.isValid?(b(),XN(E("DeleteSuccessful")),h(y),O()):BF(e,E)}).catch(()=>{UN(E,"DeleteFail")})},D=[{value:"A4",label:E("A4")},{value:"A4R",label:E("A4 horizontal")},{value:"A3",label:E("A3")},{value:"A3R",label:E("A3 horizontal")},{value:"A5",label:E("A5")},{value:"A5R",label:E("A5 horizontal")}],I=e=>{const t=document.createElement("a");t.href=`${v}\\${e.file?.path}`,t.download=`${e.name}${e.file?.type}`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},H=e=>{d({organization:l,setting:e.setting,file:e.file,tableFields:e.tableFields,dataFields:e.dataFields,data:[x]}).then(t=>{const n=window.URL.createObjectURL(new Blob([t])),r=document.createElement("a");r.href=n,r.setAttribute("download",`${e.name}${e.file?.type}`),document.body.appendChild(r),r.click(),document.body.removeChild(r)}).catch(()=>GN(E("GetFail")))};return r.jsxs(eB,{isOpen:a,toggle:()=>n(),className:"modal-dialog-centered modal-xl",contentClassName:"p-0",onOpened:()=>{const e={};g?.forEach(t=>{e[t.field]={checked:!0}}),_(e),N()},onClosed:()=>{C({value:"A4",label:"A4"})},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{typeModal:"Print",handleModal:()=>n(),title:"",className:"mb-0",component:()=>r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:[r.jsx("span",{className:"cursor-pointer mx-50",children:E(o)}),r.jsxs(ej,{className:"nav-item",children:[r.jsx($P,{tag:"div",className:"me-0 d-flex",children:r.jsx(Ic,{fontSize:15,className:"cursor-pointer"})}),r.jsxs(XP,{className:"mt-0 p-0",end:!0,children:[s.map((e,t)=>r.jsx(FP,{tag:"div",onClick:()=>N(void 0,void 0,e.name),children:r.jsxs(r.Fragment,{children:[e.file&&(".doc"===e.file.type||".docx"===e.file.type?r.jsx(Rc,{className:"me-50",fontSize:15}):r.jsx(jc,{className:"me-50",fontSize:15})),E(e.name)," "]})},t)),r.jsx("hr",{className:"my-0"}),r.jsx(FP,{tag:"div",onClick:()=>n("modalOption"),children:E("Print Options")})]})]})]}),!!u?.file&&!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{outline:!0,color:"primary",style:{fontSize:14,fontWeight:500},className:"btn-border-0 d-flex align-items-center",onClick:()=>YN(E,I,u,E("MsgExportFileTemplate",{name:u?.name})),children:[r.jsx(Pc,{fontSize:16,className:"me-50"}),E("Download sample file")]})}),(g?.length??0)>0&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:g?.map(e=>r.jsxs(r.Fragment,{children:[r.jsx(yB,{checked:A[e.field]?.checked,type:"checkbox",onChange:t=>{A[e.field]?A[e.field].checked=t.target.checked:A[e.field]={checked:t.target.checked},A[e.field].value?(A[e.field].value=void 0,_({...A}),N()):_({...A})}}),r.jsx("span",{className:"ms-50 me-50",children:E(e.label)}),A[e.field]?.checked&&r.jsx(dy,{options:e.options,value:A[e.field]?.value,columns:e.columns,fieldLabel:e.fieldLabel,fieldValue:e.fieldValue,isClearable:e.isClearable,loadOptions:e.loadOptions,onChange:t=>{A[e.field].value=t,_({...A}),N()}})]}))})]}),componentRight:()=>r.jsxs(r.Fragment,{children:[!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsx(dy,{options:D,value:k,isDisabled:!S,onChange:e=>{C(e),N(e.value)}})}),!!u?.file&&!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{outline:!0,color:"primary",style:{fontSize:14,fontWeight:500},className:"btn-border-0 d-flex align-items-center",onClick:()=>YN(E,H,u,E("MsgExportFilePrintTemplate",{name:u?.name})),children:[r.jsx(Kc,{fontSize:16,className:"me-50"}),E("Export file")]})}),S&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Add")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(nd,{className:"me-50",fontSize:16}),E("Thêm mẫu")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Edit")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(Bc,{className:"me-50",fontSize:16}),E("Sửa mẫu")]})}),r.jsx("div",{className:sj("d-flex align-items-center pe-50 me-50 border-end",{"d-none":!u?.id}),children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{qN(E,Z,u?.id)},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(ld,{className:"me-50",fontSize:16}),E("Xóa mẫu")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:14,fontWeight:500},outline:!0,color:"primary",onClick:()=>{n("modalEdit"),p("Duplicate")},className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(Lc,{className:"me-50",fontSize:16}),E("Duplicate")]})}),S&&!u?.file&&!!u?.setting&&r.jsx("div",{className:"d-flex align-items-center pe-50 me-50 border-end",children:r.jsxs(_P,{style:{fontSize:13,fontWeight:400},outline:!0,color:"primary",onClick:()=>window.open("/setup?tab=4"),className:sj("btn-border-0 d-flex align-items-center"),children:[r.jsx(ed,{className:"me-50",fontSize:16}),E("Thiết lập chữ ký")]})})]})}),r.jsx(aB,{className:"p-0",children:r.jsx("div",{style:{height:i.innerHeight-170+"px"},children:S?r.jsx(r.Fragment,{children:r.jsx("iframe",{src:`${m}/${S}`,width:"100%",height:"100%"})}):r.jsx(r.Fragment,{children:r.jsxs("div",{className:"h-100 w-100 d-flex justify-content-center align-items-center text-primary",children:[r.jsx(oj,{className:"me-1",children:" "}),E("Loading...")]})})})}),r.jsx("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsx(e.Fragment,{children:r.jsx(_P,{color:"secondary",onClick:O,outline:!0,children:E("Close")})})})]})};function RF(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}RF('.react-grid-layout {\n position: relative;\n transition: height 200ms ease;\n}\n.react-grid-item {\n transition: all 200ms ease;\n transition-property: left, top, width, height;\n}\n.react-grid-item img {\n pointer-events: none;\n user-select: none;\n}\n.react-grid-item.cssTransforms {\n transition-property: transform, width, height;\n}\n.react-grid-item.resizing {\n transition: none;\n z-index: 1;\n will-change: width, height;\n}\n\n.react-grid-item.react-draggable-dragging {\n transition: none;\n z-index: 3;\n will-change: transform;\n}\n\n.react-grid-item.dropping {\n visibility: hidden;\n}\n\n.react-grid-item.react-grid-placeholder {\n background: red;\n opacity: 0.2;\n transition-duration: 100ms;\n z-index: 2;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n -o-user-select: none;\n user-select: none;\n}\n\n.react-grid-item.react-grid-placeholder.placeholder-resizing {\n transition: none;\n}\n\n.react-grid-item > .react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n}\n\n.react-grid-item > .react-resizable-handle::after {\n content: "";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 5px;\n height: 5px;\n border-right: 2px solid rgba(0, 0, 0, 0.4);\n border-bottom: 2px solid rgba(0, 0, 0, 0.4);\n}\n\n.react-resizable-hide > .react-resizable-handle {\n display: none;\n}\n\n.react-grid-item > .react-resizable-handle.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n,\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-grid-item > .react-resizable-handle.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n');var WF={exports:{}},FF={};function qF(e){return function(t,n,r,a,i,o,l){return e(t,n,l)}}function YF(e){return function(t,n,r,a){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r,a);var i=a.get(t),o=a.get(n);if(i&&o)return i===n&&o===t;a.set(t,n),a.set(n,t);var l=e(t,n,r,a);return a.delete(t),a.delete(n),l}}function UF(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function GF(e){return e.constructor===Object||null==e.constructor}function XF(e){return"function"==typeof e.then}function KF(e,t){return e===t||e!=e&&t!=t}var JF=Object.prototype.toString;function QF(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,a=e.areObjectsEqual,i=e.areRegExpsEqual,o=e.areSetsEqual,l=(0,e.createIsNestedEqual)(s);function s(e,s,c){if(e===s)return!0;if(!e||!s||"object"!=typeof e||"object"!=typeof s)return e!=e&&s!=s;if(GF(e)&&GF(s))return a(e,s,l,c);var d=Array.isArray(e),h=Array.isArray(s);if(d||h)return d===h&&t(e,s,l,c);var u=JF.call(e);return u===JF.call(s)&&("[object Date]"===u?n(e,s,l,c):"[object RegExp]"===u?i(e,s,l,c):"[object Map]"===u?r(e,s,l,c):"[object Set]"===u?o(e,s,l,c):"[object Object]"===u||"[object Arguments]"===u?!XF(e)&&!XF(s)&&a(e,s,l,c):("[object Boolean]"===u||"[object Number]"===u||"[object String]"===u)&&KF(e.valueOf(),s.valueOf()))}return s}function $F(e,t,n,r){var a=e.length;if(t.length!==a)return!1;for(;a-- >0;)if(!n(e[a],t[a],a,a,e,t,r))return!1;return!0}var eq=YF($F);function tq(e,t){return KF(e.valueOf(),t.valueOf())}function nq(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var i={},o=0;return e.forEach(function(l,s){if(a){var c=!1,d=0;t.forEach(function(a,h){c||i[d]||!(c=n(s,h,o,d,e,t,r)&&n(l,a,s,h,e,t,r))||(i[d]=!0),d++}),o++,a=c}}),a}var rq=YF(nq),aq=Object.prototype.hasOwnProperty;function iq(e,t,n,r){var a,i=Object.keys(e),o=i.length;if(Object.keys(t).length!==o)return!1;for(;o-- >0;){if("_owner"===(a=i[o])){var l=!!e.$$typeof,s=!!t.$$typeof;if((l||s)&&l!==s)return!1}if(!aq.call(t,a)||!n(e[a],t[a],a,a,e,t,r))return!1}return!0}var oq=YF(iq);function lq(e,t){return e.source===t.source&&e.flags===t.flags}function sq(e,t,n,r){var a=e.size===t.size;if(!a)return!1;if(!e.size)return!0;var i={};return e.forEach(function(o,l){if(a){var s=!1,c=0;t.forEach(function(a,d){s||i[c]||!(s=n(o,a,l,d,e,t,r))||(i[c]=!0),c++}),a=s}}),a}var cq=YF(sq),dq=Object.freeze({areArraysEqual:$F,areDatesEqual:tq,areMapsEqual:nq,areObjectsEqual:iq,areRegExpsEqual:lq,areSetsEqual:sq,createIsNestedEqual:qF}),hq=Object.freeze({areArraysEqual:eq,areDatesEqual:tq,areMapsEqual:rq,areObjectsEqual:oq,areRegExpsEqual:lq,areSetsEqual:cq,createIsNestedEqual:qF}),uq=QF(dq);var pq=QF(UF(dq,{createIsNestedEqual:function(){return KF}}));var fq=QF(hq);var mq=QF(UF(hq,{createIsNestedEqual:function(){return KF}}));var vq=Object.freeze({__proto__:null,circularDeepEqual:function(e,t){return fq(e,t,new WeakMap)},circularShallowEqual:function(e,t){return mq(e,t,new WeakMap)},createCustomCircularEqual:function(e){var t=QF(UF(hq,e(hq)));return function(e,n,r){return void 0===r&&(r=new WeakMap),t(e,n,r)}},createCustomEqual:function(e){return QF(UF(dq,e(dq)))},deepEqual:function(e,t){return uq(e,t,void 0)},sameValueZeroEqual:KF,shallowEqual:function(e,t){return pq(e,t,void 0)}}),gq=OI(vq),bq={exports:{}};function yq(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=yq(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function wq(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=yq(e))&&(r&&(r+=" "),r+=t);return r}bq.exports=wq,bq.exports.clsx=wq;var xq={};Object.defineProperty(xq,"__esModule",{value:!0}),xq.bottom=Sq,xq.childrenEqual=function(e,t){return(0,Eq.deepEqual)(kq.default.Children.map(e,e=>e?.key),kq.default.Children.map(t,e=>e?.key))&&(0,Eq.deepEqual)(kq.default.Children.map(e,e=>e?.props["data-grid"]),kq.default.Children.map(t,e=>e?.props["data-grid"]))},xq.cloneLayout=Mq,xq.cloneLayoutItem=_q,xq.collides=Oq,xq.compact=Nq,xq.compactItem=Iq,xq.compactType=function(e){const{verticalCompact:t,compactType:n}=e||{};return!1===t?null:n},xq.correctBounds=Hq,xq.fastPositionEqual=function(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height},xq.fastRGLPropsEqual=void 0,xq.getAllCollisions=Pq,xq.getFirstCollision=Lq,xq.getLayoutItem=Tq,xq.getStatics=Vq,xq.modifyLayout=Aq,xq.moveElement=Bq,xq.moveElementAwayFromCollision=jq,xq.noop=void 0,xq.perc=function(e){return 100*e+"%"},xq.resizeItemInDirection=function(e,t,n,r){const a=Xq[e];return a?a(t,{...t,...n},r):n},xq.setTopLeft=function(e){let{top:t,left:n,width:r,height:a}=e;return{top:`${t}px`,left:`${n}px`,width:`${r}px`,height:`${a}px`,position:"absolute"}},xq.setTransform=function(e){let{top:t,left:n,width:r,height:a}=e;const i=`translate(${n}px,${t}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${r}px`,height:`${a}px`,position:"absolute"}},xq.sortLayoutItems=Kq,xq.sortLayoutItemsByColRow=Qq,xq.sortLayoutItemsByRowCol=Jq,xq.synchronizeLayoutWithChildren=function(e,t,n,r,a){e=e||[];const i=[];kq.default.Children.forEach(t,t=>{if(null==t?.key)return;const n=Tq(e,String(t.key)),r=t.props["data-grid"];n&&null==r?i.push(_q(n)):r?(Cq||$q([r],"ReactGridLayout.children"),i.push(_q({...r,i:t.key}))):i.push(_q({w:1,h:1,x:0,y:Sq(i),i:String(t.key)}))});const o=Hq(i,{cols:n});return a?o:Nq(o,r,n)},xq.validateLayout=$q,xq.withLayoutItem=function(e,t,n){let r=Tq(e,t);return r?(r=n(_q(r)),[e=Aq(e,r),r]):[e,null]};var Eq=gq,kq=function(e){return e&&e.__esModule?e:{default:e}}(f.default);const Cq="production"===process.env.NODE_ENV;function Sq(e){let t,n=0;for(let r=0,a=e.length;r<a;r++)t=e[r].y+e[r].h,t>n&&(n=t);return n}function Mq(e){const t=Array(e.length);for(let n=0,r=e.length;n<r;n++)t[n]=_q(e[n]);return t}function Aq(e,t){const n=Array(e.length);for(let r=0,a=e.length;r<a;r++)t.i===e[r].i?n[r]=t:n[r]=e[r];return n}function _q(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function Oq(e,t){return e.i!==t.i&&(!(e.x+e.w<=t.x)&&(!(e.x>=t.x+t.w)&&(!(e.y+e.h<=t.y)&&!(e.y>=t.y+t.h))))}function Nq(e,t,n,r){const a=Vq(e),i=Kq(e,t),o=Array(e.length);for(let l=0,s=i.length;l<s;l++){let s=_q(i[l]);s.static||(s=Iq(a,s,t,n,i,r),a.push(s)),o[e.indexOf(i[l])]=s,s.moved=!1}return o}xq.fastRGLPropsEqual=function(e,t,n){return e===t||e.className===t.className&&n(e.style,t.style)&&e.width===t.width&&e.autoSize===t.autoSize&&e.cols===t.cols&&e.draggableCancel===t.draggableCancel&&e.draggableHandle===t.draggableHandle&&n(e.verticalCompact,t.verticalCompact)&&n(e.compactType,t.compactType)&&n(e.layout,t.layout)&&n(e.margin,t.margin)&&n(e.containerPadding,t.containerPadding)&&e.rowHeight===t.rowHeight&&e.maxRows===t.maxRows&&e.isBounded===t.isBounded&&e.isDraggable===t.isDraggable&&e.isResizable===t.isResizable&&e.allowOverlap===t.allowOverlap&&e.preventCollision===t.preventCollision&&e.useCSSTransforms===t.useCSSTransforms&&e.transformScale===t.transformScale&&e.isDroppable===t.isDroppable&&n(e.resizeHandles,t.resizeHandles)&&n(e.resizeHandle,t.resizeHandle)&&e.onLayoutChange===t.onLayoutChange&&e.onDragStart===t.onDragStart&&e.onDrag===t.onDrag&&e.onDragStop===t.onDragStop&&e.onResizeStart===t.onResizeStart&&e.onResize===t.onResize&&e.onResizeStop===t.onResizeStop&&e.onDrop===t.onDrop&&n(e.droppingItem,t.droppingItem)&&n(e.innerRef,t.innerRef)};const Zq={x:"w",y:"h"};function Dq(e,t,n,r){const a=Zq[r];t[r]+=1;for(let i=e.map(e=>e.i).indexOf(t.i)+1;i<e.length;i++){const o=e[i];if(!o.static){if(o.y>t.y+t.h)break;Oq(t,o)&&Dq(e,o,n+t[a],r)}}t[r]=n}function Iq(e,t,n,r,a,i){const o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(Sq(e),t.y);t.y>0&&!Lq(e,t);)t.y--;else if(o)for(;t.x>0&&!Lq(e,t);)t.x--;let l;for(;(l=Lq(e,t))&&(null!==n||!i);)if(o?Dq(a,t,l.x+l.w,"x"):Dq(a,t,l.y+l.h,"y"),o&&t.x+t.w>r)for(t.x=r-t.w,t.y++;t.x>0&&!Lq(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function Hq(e,t){const n=Vq(e);for(let r=0,a=e.length;r<a;r++){const a=e[r];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),a.static)for(;Lq(n,a);)a.y++;else n.push(a)}return e}function Tq(e,t){for(let n=0,r=e.length;n<r;n++)if(e[n].i===t)return e[n]}function Lq(e,t){for(let n=0,r=e.length;n<r;n++)if(Oq(e[n],t))return e[n]}function Pq(e,t){return e.filter(e=>Oq(e,t))}function Vq(e){return e.filter(e=>e.static)}function Bq(e,t,n,r,a,i,o,l,s){if(t.static&&!0!==t.isDraggable)return e;if(t.y===r&&t.x===n)return e;t.i,String(n),String(r),t.x,t.y;const c=t.x,d=t.y;"number"==typeof n&&(t.x=n),"number"==typeof r&&(t.y=r),t.moved=!0;let h=Kq(e,o);("vertical"===o&&"number"==typeof r?d>=r:"horizontal"===o&&"number"==typeof n&&c>=n)&&(h=h.reverse());const u=Pq(h,t),p=u.length>0;if(p&&s)return Mq(e);if(p&&i)return t.i,t.x=c,t.y=d,t.moved=!1,e;for(let n=0,r=u.length;n<r;n++){const r=u[n];eY((t.i,t.x,t.y,r.i,r.x,r.y)),r.moved||(e=r.static?jq(e,r,t,a,o):jq(e,t,r,a,o))}return e}function jq(e,t,n,r,a,i){const o="horizontal"===a,l="vertical"===a,s=t.static;if(r){r=!1;const i={x:o?Math.max(t.x-n.w,0):n.x,y:l?Math.max(t.y-n.h,0):n.y,w:n.w,h:n.h,i:"-1"},c=Lq(e,i),d=c&&c.y+c.h>t.y,h=c&&t.x+t.w>c.x;if(!c)return n.i,i.x,i.y,Bq(e,n,o?i.x:void 0,l?i.y:void 0,r,s,a);if(d&&l)return Bq(e,n,void 0,t.y+1,r,s,a);if(d&&null==a)return t.y=n.y,n.y=n.y+n.h,e;if(h&&o)return Bq(e,t,n.x,void 0,r,s,a)}const c=o?n.x+1:void 0,d=l?n.y+1:void 0;return null==c&&null==d?e:Bq(e,n,o?n.x+1:void 0,l?n.y+1:void 0,r,s,a)}const zq=(e,t,n,r)=>e+n>r?t:n,Rq=(e,t,n)=>e<0?t:n,Wq=e=>Math.max(0,e),Fq=e=>Math.max(0,e),qq=(e,t,n)=>{let{left:r,height:a,width:i}=t;const o=e.top-(a-e.height);return{left:r,width:i,height:Rq(o,e.height,a),top:Fq(o)}},Yq=(e,t,n)=>{let{top:r,left:a,height:i,width:o}=t;return{top:r,height:i,width:zq(e.left,e.width,o,n),left:Wq(a)}},Uq=(e,t,n)=>{let{top:r,height:a,width:i}=t;const o=e.left-(i-e.width);return{height:a,width:o<0?e.width:zq(e.left,e.width,i,n),top:Fq(r),left:Wq(o)}},Gq=(e,t,n)=>{let{top:r,left:a,height:i,width:o}=t;return{width:o,left:a,height:Rq(r,e.height,i),top:Fq(r)}},Xq={n:qq,ne:function(){return qq(arguments.length<=0?void 0:arguments[0],Yq(...arguments))},e:Yq,se:function(){return Gq(arguments.length<=0?void 0:arguments[0],Yq(...arguments))},s:Gq,sw:function(){return Gq(arguments.length<=0?void 0:arguments[0],Uq(...arguments))},w:Uq,nw:function(){return qq(arguments.length<=0?void 0:arguments[0],Uq(...arguments))}};function Kq(e,t){return"horizontal"===t?Qq(e):"vertical"===t?Jq(e):e}function Jq(e){return e.slice(0).sort(function(e,t){return e.y>t.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1})}function Qq(e){return e.slice(0).sort(function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1})}function $q(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout";const n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let r=0,a=e.length;r<a;r++){const a=e[r];for(let e=0;e<n.length;e++){const i=n[e],o=a[i];if("number"!=typeof o||Number.isNaN(o))throw new Error(`ReactGridLayout: ${t}[${r}].${i} must be a number! Received: ${o} (${typeof o})`)}if(void 0!==a.i&&"string"!=typeof a.i)throw new Error(`ReactGridLayout: ${t}[${r}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function eY(){}xq.noop=()=>{};var tY={};function nY(e){const{margin:t,containerPadding:n,containerWidth:r,cols:a}=e;return(r-t[0]*(a-1)-2*n[0])/a}function rY(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function aY(e,t,n){return Math.max(Math.min(e,n),t)}Object.defineProperty(tY,"__esModule",{value:!0}),tY.calcGridColWidth=nY,tY.calcGridItemPosition=function(e,t,n,r,a,i){const{margin:o,containerPadding:l,rowHeight:s}=e,c=nY(e),d={};i&&i.resizing?(d.width=Math.round(i.resizing.width),d.height=Math.round(i.resizing.height)):(d.width=rY(r,c,o[0]),d.height=rY(a,s,o[1]));i&&i.dragging?(d.top=Math.round(i.dragging.top),d.left=Math.round(i.dragging.left)):i&&i.resizing&&"number"==typeof i.resizing.top&&"number"==typeof i.resizing.left?(d.top=Math.round(i.resizing.top),d.left=Math.round(i.resizing.left)):(d.top=Math.round((s+o[1])*n+l[1]),d.left=Math.round((c+o[0])*t+l[0]));return d},tY.calcGridItemWHPx=rY,tY.calcWH=function(e,t,n,r,a,i){const{margin:o,maxRows:l,cols:s,rowHeight:c}=e,d=nY(e);let h=Math.round((t+o[0])/(d+o[0])),u=Math.round((n+o[1])/(c+o[1])),p=aY(h,0,s-r),f=aY(u,0,l-a);-1!==["sw","w","nw"].indexOf(i)&&(p=aY(h,0,s));-1!==["nw","n","ne"].indexOf(i)&&(f=aY(u,0,l));return{w:p,h:f}},tY.calcXY=function(e,t,n,r,a){const{margin:i,containerPadding:o,cols:l,rowHeight:s,maxRows:c}=e,d=nY(e);let h=Math.round((n-o[0])/(d+i[0])),u=Math.round((t-o[1])/(s+i[1]));return h=aY(h,0,l-r),u=aY(u,0,c-a),{x:h,y:u}},tY.clamp=aY;var iY={},oY={exports:{}},lY={},sY={},cY={};Object.defineProperty(cY,"__esModule",{value:!0}),cY.dontSetMe=function(e,t,n){if(e[t])return new Error(`Invalid prop ${t} passed to ${n} - do not set this, set it on the child.`)},cY.findInArray=function(e,t){for(let n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},cY.int=function(e){return parseInt(e,10)},cY.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},cY.isNum=function(e){return"number"==typeof e&&!isNaN(e)};var dY={};Object.defineProperty(dY,"__esModule",{value:!0}),dY.browserPrefixToKey=pY,dY.browserPrefixToStyle=function(e,t){return t?`-${t.toLowerCase()}-${e}`:e},dY.default=void 0,dY.getPrefix=uY;const hY=["Moz","Webkit","O","ms"];function uY(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";const t=window.document?.documentElement?.style;if(!t)return"";if(e in t)return"";for(let n=0;n<hY.length;n++)if(pY(e,hY[n])in t)return hY[n];return""}function pY(e,t){return t?`${t}${function(e){let t="",n=!0;for(let r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)}`:e}dY.default=uY(),Object.defineProperty(sY,"__esModule",{value:!0}),sY.addClassName=wY,sY.addEvent=function(e,t,n,r){if(!e)return;const a={capture:!0,...r};e.addEventListener?e.addEventListener(t,n,a):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},sY.addUserSelectStyles=function(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&wY(e.body,"react-draggable-transparent-selection")},sY.createCSSTransform=function(e,t){const n=bY(e,t,"px");return{[(0,mY.browserPrefixToKey)("transform",mY.default)]:n}},sY.createSVGTransform=function(e,t){return bY(e,t,"")},sY.getTouch=function(e,t){return e.targetTouches&&(0,fY.findInArray)(e.targetTouches,e=>t===e.identifier)||e.changedTouches&&(0,fY.findInArray)(e.changedTouches,e=>t===e.identifier)},sY.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},sY.getTranslation=bY,sY.innerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,fY.int)(n.paddingTop),t-=(0,fY.int)(n.paddingBottom),t},sY.innerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,fY.int)(n.paddingLeft),t-=(0,fY.int)(n.paddingRight),t},sY.matchesSelector=gY,sY.matchesSelectorAndParentsTo=function(e,t,n){let r=e;do{if(gY(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},sY.offsetXYFromParent=function(e,t,n){const r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:a,y:i}},sY.outerHeight=function(e){let t=e.clientHeight;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,fY.int)(n.borderTopWidth),t+=(0,fY.int)(n.borderBottomWidth),t},sY.outerWidth=function(e){let t=e.clientWidth;const n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,fY.int)(n.borderLeftWidth),t+=(0,fY.int)(n.borderRightWidth),t},sY.removeClassName=xY,sY.removeEvent=function(e,t,n,r){if(!e)return;const a={capture:!0,...r};e.removeEventListener?e.removeEventListener(t,n,a):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},sY.scheduleRemoveUserSelectStyles=function(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{yY(e)}):yY(e)};var fY=cY,mY=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(dY);let vY="";function gY(e,t){return vY||(vY=(0,fY.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(t){return(0,fY.isFunction)(e[t])})),!!(0,fY.isFunction)(e[vY])&&e[vY](t)}function bY(e,t,n){let{x:r,y:a}=e,i=`translate(${r}${n},${a}${n})`;if(t){i=`translate(${`${"string"==typeof t.x?t.x:t.x+n}`}, ${`${"string"==typeof t.y?t.y:t.y+n}`})`+i}return i}function yY(e){if(e)try{if(e.body&&xY(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{const t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}}function wY(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function xY(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}var EY={};Object.defineProperty(EY,"__esModule",{value:!0}),EY.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},EY.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},EY.createCoreData=function(e,t,n){const r=!(0,kY.isNum)(e.lastX),a=SY(e);return r?{node:a,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:a,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}},EY.createDraggableData=function(e,t){const n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}},EY.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);const a=SY(e);if("string"==typeof r){const{ownerDocument:e}=a,t=e.defaultView;let n;if("parent"===r)n=a.parentNode;else{n=a.getRootNode().querySelector(r)}if(!(n instanceof t.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');const i=n,o=t.getComputedStyle(a),l=t.getComputedStyle(i);r={left:-a.offsetLeft+(0,kY.int)(l.paddingLeft)+(0,kY.int)(o.marginLeft),top:-a.offsetTop+(0,kY.int)(l.paddingTop)+(0,kY.int)(o.marginTop),right:(0,CY.innerWidth)(i)-(0,CY.outerWidth)(a)-a.offsetLeft+(0,kY.int)(l.paddingRight)-(0,kY.int)(o.marginRight),bottom:(0,CY.innerHeight)(i)-(0,CY.outerHeight)(a)-a.offsetTop+(0,kY.int)(l.paddingBottom)-(0,kY.int)(o.marginBottom)}}(0,kY.isNum)(r.right)&&(t=Math.min(t,r.right));(0,kY.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,kY.isNum)(r.left)&&(t=Math.max(t,r.left));(0,kY.isNum)(r.top)&&(n=Math.max(n,r.top));return[t,n]},EY.getControlPosition=function(e,t,n){const r="number"==typeof t?(0,CY.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;const a=SY(n),i=n.props.offsetParent||a.offsetParent||a.ownerDocument.body;return(0,CY.offsetXYFromParent)(r||e,i,n.props.scale)},EY.snapToGrid=function(e,t,n){const r=Math.round(t/e[0])*e[0],a=Math.round(n/e[1])*e[1];return[r,a]};var kY=cY,CY=sY;function SY(e){const t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}var MY={},AY={};Object.defineProperty(AY,"__esModule",{value:!0}),AY.default=function(){},Object.defineProperty(MY,"__esModule",{value:!0}),MY.default=void 0;var _Y=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),OY=TY(NI.exports),NY=TY(g.default),ZY=sY,DY=EY,IY=cY,HY=TY(AY);function TY(e){return e&&e.__esModule?e:{default:e}}function LY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const PY={start:"touchstart",move:"touchmove",stop:"touchend"},VY={start:"mousedown",move:"mousemove",stop:"mouseup"};let BY=VY;class jY extends _Y.Component{constructor(){super(...arguments),LY(this,"dragging",!1),LY(this,"lastX",NaN),LY(this,"lastY",NaN),LY(this,"touchIdentifier",null),LY(this,"mounted",!1),LY(this,"handleDragStart",e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&"number"==typeof e.button&&0!==e.button)return!1;const t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!(0,ZY.matchesSelectorAndParentsTo)(e.target,this.props.handle,t)||this.props.cancel&&(0,ZY.matchesSelectorAndParentsTo)(e.target,this.props.cancel,t))return;"touchstart"!==e.type||this.props.allowMobileScroll||e.preventDefault();const r=(0,ZY.getTouchIdentifier)(e);this.touchIdentifier=r;const a=(0,DY.getControlPosition)(e,r,this);if(null==a)return;const{x:i,y:o}=a,l=(0,DY.createCoreData)(this,i,o);(0,HY.default)("DraggableCore: handleDragStart: %j",l),(0,HY.default)("calling",this.props.onStart);!1!==this.props.onStart(e,l)&&!1!==this.mounted&&(this.props.enableUserSelectHack&&(0,ZY.addUserSelectStyles)(n),this.dragging=!0,this.lastX=i,this.lastY=o,(0,ZY.addEvent)(n,BY.move,this.handleDrag),(0,ZY.addEvent)(n,BY.stop,this.handleDragStop))}),LY(this,"handleDrag",e=>{const t=(0,DY.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=(0,DY.snapToGrid)(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}const a=(0,DY.createCoreData)(this,n,r);(0,HY.default)("DraggableCore: handleDrag: %j",a);if(!1!==this.props.onDrag(e,a)&&!1!==this.mounted)this.lastX=n,this.lastY=r;else try{this.handleDragStop(new MouseEvent("mouseup"))}catch(e){const t=document.createEvent("MouseEvents");t.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(t)}}),LY(this,"handleDragStop",e=>{if(!this.dragging)return;const t=(0,DY.getControlPosition)(e,this.touchIdentifier,this);if(null==t)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=(0,DY.snapToGrid)(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}const a=(0,DY.createCoreData)(this,n,r);if(!1===this.props.onStop(e,a)||!1===this.mounted)return!1;const i=this.findDOMNode();i&&this.props.enableUserSelectHack&&(0,ZY.scheduleRemoveUserSelectStyles)(i.ownerDocument),(0,HY.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,i&&((0,HY.default)("DraggableCore: Removing handlers"),(0,ZY.removeEvent)(i.ownerDocument,BY.move,this.handleDrag),(0,ZY.removeEvent)(i.ownerDocument,BY.stop,this.handleDragStop))}),LY(this,"onMouseDown",e=>(BY=VY,this.handleDragStart(e))),LY(this,"onMouseUp",e=>(BY=VY,this.handleDragStop(e))),LY(this,"onTouchStart",e=>(BY=PY,this.handleDragStart(e))),LY(this,"onTouchEnd",e=>(BY=PY,this.handleDragStop(e)))}componentDidMount(){this.mounted=!0;const e=this.findDOMNode();e&&(0,ZY.addEvent)(e,PY.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const e=this.findDOMNode();if(e){const{ownerDocument:t}=e;(0,ZY.removeEvent)(t,VY.move,this.handleDrag),(0,ZY.removeEvent)(t,PY.move,this.handleDrag),(0,ZY.removeEvent)(t,VY.stop,this.handleDragStop),(0,ZY.removeEvent)(t,PY.stop,this.handleDragStop),(0,ZY.removeEvent)(e,PY.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,ZY.scheduleRemoveUserSelectStyles)(t)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:NY.default.findDOMNode(this)}render(){return _Y.cloneElement(_Y.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}MY.default=jY,LY(jY,"displayName","DraggableCore"),LY(jY,"propTypes",{allowAnyClick:OY.default.bool,allowMobileScroll:OY.default.bool,children:OY.default.node.isRequired,disabled:OY.default.bool,enableUserSelectHack:OY.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:OY.default.arrayOf(OY.default.number),handle:OY.default.string,cancel:OY.default.string,nodeRef:OY.default.object,onStart:OY.default.func,onDrag:OY.default.func,onStop:OY.default.func,onMouseDown:OY.default.func,scale:OY.default.number,className:IY.dontSetMe,style:IY.dontSetMe,transform:IY.dontSetMe}),LY(jY,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return s.default}}),e.default=void 0;var t=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),n=d(NI.exports),r=d(g.default),a=bq.exports,i=sY,o=EY,l=cY,s=d(MY),c=d(AY);function d(e){return e&&e.__esModule?e:{default:e}}function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(null,arguments)}function u(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class p extends t.Component{static getDerivedStateFromProps(e,t){let{position:n}=e,{prevPropsPosition:r}=t;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,c.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:{...n}})}constructor(e){super(e),u(this,"onDragStart",(e,t)=>{(0,c.default)("Draggable: onDragStart: %j",t);if(!1===this.props.onStart(e,(0,o.createDraggableData)(this,t)))return!1;this.setState({dragging:!0,dragged:!0})}),u(this,"onDrag",(e,t)=>{if(!this.state.dragging)return!1;(0,c.default)("Draggable: onDrag: %j",t);const n=(0,o.createDraggableData)(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){const{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;const[a,i]=(0,o.getBoundPosition)(this,r.x,r.y);r.x=a,r.y=i,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(!1===this.props.onDrag(e,n))return!1;this.setState(r)}),u(this,"onDragStop",(e,t)=>{if(!this.state.dragging)return!1;if(!1===this.props.onStop(e,(0,o.createDraggableData)(this,t)))return!1;(0,c.default)("Draggable: onDragStop: %j",t);const n={dragging:!1,slackX:0,slackY:0};if(Boolean(this.props.position)){const{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)}),this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??r.default.findDOMNode(this)}render(){const{axis:e,bounds:n,children:r,defaultPosition:l,defaultClassName:c,defaultClassNameDragging:d,defaultClassNameDragged:u,position:p,positionOffset:f,scale:m,...v}=this.props;let g={},b=null;const y=!Boolean(p)||this.state.dragging,w=p||l,x={x:(0,o.canDragX)(this)&&y?this.state.x:w.x,y:(0,o.canDragY)(this)&&y?this.state.y:w.y};this.state.isElementSVG?b=(0,i.createSVGTransform)(x,f):g=(0,i.createCSSTransform)(x,f);const E=(0,a.clsx)(r.props.className||"",c,{[d]:this.state.dragging,[u]:this.state.dragged});return t.createElement(s.default,h({},v,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(r),{className:E,style:{...r.props.style,...g},transform:b}))}}e.default=p,u(p,"displayName","Draggable"),u(p,"propTypes",{...s.default.propTypes,axis:n.default.oneOf(["both","x","y","none"]),bounds:n.default.oneOfType([n.default.shape({left:n.default.number,right:n.default.number,top:n.default.number,bottom:n.default.number}),n.default.string,n.default.oneOf([!1])]),defaultClassName:n.default.string,defaultClassNameDragging:n.default.string,defaultClassNameDragged:n.default.string,defaultPosition:n.default.shape({x:n.default.number,y:n.default.number}),positionOffset:n.default.shape({x:n.default.oneOfType([n.default.number,n.default.string]),y:n.default.oneOfType([n.default.number,n.default.string])}),position:n.default.shape({x:n.default.number,y:n.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe}),u(p,"defaultProps",{...s.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})}(lY);const{default:zY,DraggableCore:RY}=lY;oY.exports=zY,oY.exports.default=zY,oY.exports.DraggableCore=RY;var WY={exports:{}},FY={},qY={__esModule:!0,cloneElement:function(e,t){t.style&&e.props.style&&(t.style=GY(GY({},e.props.style),t.style));t.className&&e.props.className&&(t.className=e.props.className+" "+t.className);return YY.default.cloneElement(e,t)}},YY=function(e){return e&&e.__esModule?e:{default:e}}(f.default);function UY(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function GY(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?UY(Object(n),!0).forEach(function(t){XY(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UY(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function XY(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var KY={__esModule:!0,resizableProps:void 0},JY=function(e){return e&&e.__esModule?e:{default:e}}(NI.exports);var QY={axis:JY.default.oneOf(["both","x","y","none"]),className:JY.default.string,children:JY.default.element.isRequired,draggableOpts:JY.default.shape({allowAnyClick:JY.default.bool,cancel:JY.default.string,children:JY.default.node,disabled:JY.default.bool,enableUserSelectHack:JY.default.bool,offsetParent:JY.default.node,grid:JY.default.arrayOf(JY.default.number),handle:JY.default.string,nodeRef:JY.default.object,onStart:JY.default.func,onDrag:JY.default.func,onStop:JY.default.func,onMouseDown:JY.default.func,scale:JY.default.number}),height:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"y"===a.axis?(r=JY.default.number).isRequired.apply(r,t):JY.default.number.apply(JY.default,t)},handle:JY.default.oneOfType([JY.default.node,JY.default.func]),handleSize:JY.default.arrayOf(JY.default.number),lockAspectRatio:JY.default.bool,maxConstraints:JY.default.arrayOf(JY.default.number),minConstraints:JY.default.arrayOf(JY.default.number),onResizeStop:JY.default.func,onResizeStart:JY.default.func,onResize:JY.default.func,resizeHandles:JY.default.arrayOf(JY.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:JY.default.number,width:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,a=t[0];return"both"===a.axis||"x"===a.axis?(r=JY.default.number).isRequired.apply(r,t):JY.default.number.apply(JY.default,t)}};KY.resizableProps=QY,FY.__esModule=!0,FY.default=void 0;var $Y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=aU(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(f.default),eU=oY.exports,tU=qY,nU=KY,rU=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function aU(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(aU=function(e){return e?n:t})(e)}function iU(){return iU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},iU.apply(this,arguments)}function oU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oU(Object(n),!0).forEach(function(t){sU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function sU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cU(e,t){return cU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},cU(e,t)}var dU=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).handleRefs={},t.lastHandleRect=null,t.slack=null,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,cU(t,n);var a=r.prototype;return a.componentWillUnmount=function(){this.resetData()},a.resetData=function(){this.lastHandleRect=this.slack=null},a.runConstraints=function(e,t){var n=this.props,r=n.minConstraints,a=n.maxConstraints,i=n.lockAspectRatio;if(!r&&!a&&!i)return[e,t];if(i){var o=this.props.width/this.props.height,l=e-this.props.width,s=t-this.props.height;Math.abs(l)>Math.abs(s*o)?t=e/o:e=t*o}var c=e,d=t,h=this.slack||[0,0],u=h[0],p=h[1];return e+=u,t+=p,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),a&&(e=Math.min(a[0],e),t=Math.min(a[1],t)),this.slack=[u+(c-e),p+(d-t)],[e,t]},a.resizeHandler=function(e,t){var n=this;return function(r,a){var i=a.node,o=a.deltaX,l=a.deltaY;"onResizeStart"===e&&n.resetData();var s=("both"===n.props.axis||"x"===n.props.axis)&&"n"!==t&&"s"!==t,c=("both"===n.props.axis||"y"===n.props.axis)&&"e"!==t&&"w"!==t;if(s||c){var d=t[0],h=t[t.length-1],u=i.getBoundingClientRect();if(null!=n.lastHandleRect){if("w"===h)o+=u.left-n.lastHandleRect.left;if("n"===d)l+=u.top-n.lastHandleRect.top}n.lastHandleRect=u,"w"===h&&(o=-o),"n"===d&&(l=-l);var p=n.props.width+(s?o/n.props.transformScale:0),f=n.props.height+(c?l/n.props.transformScale:0),m=n.runConstraints(p,f);p=m[0],f=m[1];var v=p!==n.props.width||f!==n.props.height,g="function"==typeof n.props[e]?n.props[e]:null;g&&!("onResize"===e&&!v)&&(null==r.persist||r.persist(),g(r,{node:i,size:{width:p,height:f},handle:t})),"onResizeStop"===e&&n.resetData()}}},a.renderResizeHandle=function(e,t){var n=this.props.handle;if(!n)return $Y.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+e,ref:t});if("function"==typeof n)return n(e,t);var r=lU({ref:t},"string"==typeof n.type?{}:{handleAxis:e});return $Y.cloneElement(n,r)},a.render=function(){var e=this,t=this.props,n=t.children,r=t.className,a=t.draggableOpts;t.width,t.height,t.handle,t.handleSize,t.lockAspectRatio,t.axis,t.minConstraints,t.maxConstraints,t.onResize,t.onResizeStop,t.onResizeStart;var i=t.resizeHandles;t.transformScale;var o=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,rU);return(0,tU.cloneElement)(n,lU(lU({},o),{},{className:(r?r+" ":"")+"react-resizable",children:[].concat(n.props.children,i.map(function(t){var n,r=null!=(n=e.handleRefs[t])?n:e.handleRefs[t]=$Y.createRef();return $Y.createElement(eU.DraggableCore,iU({},a,{nodeRef:r,key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t,r))}))}))},r}($Y.Component);FY.default=dU,dU.propTypes=nU.resizableProps,dU.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var hU={__esModule:!0,default:void 0},uU=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=bU(t);if(n&&n.has(e))return n.get(e);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=a?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,n&&n.set(e,r);return r}(f.default),pU=gU(NI.exports),fU=gU(FY),mU=KY,vU=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function gU(e){return e&&e.__esModule?e:{default:e}}function bU(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(bU=function(e){return e?n:t})(e)}function yU(){return yU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yU.apply(this,arguments)}function wU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xU(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wU(Object(n),!0).forEach(function(t){EU(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wU(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function EU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kU(e,t){return kU=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kU(e,t)}var CU=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return(t=e.call.apply(e,[this].concat(r))||this).state={width:t.props.width,height:t.props.height,propsWidth:t.props.width,propsHeight:t.props.height},t.onResize=function(e,n){var r=n.size;t.props.onResize?(null==e.persist||e.persist(),t.setState(r,function(){return t.props.onResize&&t.props.onResize(e,n)})):t.setState(r)},t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,kU(t,n),r.getDerivedStateFromProps=function(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null},r.prototype.render=function(){var e=this.props,t=e.handle,n=e.handleSize;e.onResize;var r=e.onResizeStart,a=e.onResizeStop,i=e.draggableOpts,o=e.minConstraints,l=e.maxConstraints,s=e.lockAspectRatio,c=e.axis;e.width,e.height;var d=e.resizeHandles,h=e.style,u=e.transformScale,p=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,vU);return uU.createElement(fU.default,{axis:c,draggableOpts:i,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:s,maxConstraints:l,minConstraints:o,onResizeStart:r,onResize:this.onResize,onResizeStop:a,resizeHandles:d,transformScale:u,width:this.state.width},uU.createElement("div",yU({},p,{style:xU(xU({},h),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},r}(uU.Component);hU.default=CU,CU.propTypes=xU(xU({},mU.resizableProps),{},{children:pU.default.element}),WY.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},WY.exports.Resizable=FY.default,WY.exports.ResizableBox=hU.default;var SU={};Object.defineProperty(SU,"__esModule",{value:!0}),SU.resizeHandleType=SU.resizeHandleAxesType=SU.default=void 0;var MU=_U(NI.exports),AU=_U(f.default);function _U(e){return e&&e.__esModule?e:{default:e}}const OU=SU.resizeHandleAxesType=MU.default.arrayOf(MU.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),NU=SU.resizeHandleType=MU.default.oneOfType([MU.default.node,MU.default.func]);SU.default={className:MU.default.string,style:MU.default.object,width:MU.default.number,autoSize:MU.default.bool,cols:MU.default.number,draggableCancel:MU.default.string,draggableHandle:MU.default.string,verticalCompact:function(e){!1===e.verticalCompact&&"production"!==process.env.NODE_ENV&&console.warn('`verticalCompact` on <ReactGridLayout> is deprecated and will be removed soon. Use `compactType`: "horizontal" | "vertical" | null.')},compactType:MU.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&xq.validateLayout(t,"layout")},margin:MU.default.arrayOf(MU.default.number),containerPadding:MU.default.arrayOf(MU.default.number),rowHeight:MU.default.number,maxRows:MU.default.number,isBounded:MU.default.bool,isDraggable:MU.default.bool,isResizable:MU.default.bool,allowOverlap:MU.default.bool,preventCollision:MU.default.bool,useCSSTransforms:MU.default.bool,transformScale:MU.default.number,isDroppable:MU.default.bool,resizeHandles:OU,resizeHandle:NU,onLayoutChange:MU.default.func,onDragStart:MU.default.func,onDrag:MU.default.func,onDragStop:MU.default.func,onResizeStart:MU.default.func,onResize:MU.default.func,onResizeStop:MU.default.func,onDrop:MU.default.func,droppingItem:MU.default.shape({i:MU.default.string.isRequired,w:MU.default.number.isRequired,h:MU.default.number.isRequired}),children:function(e,t){const n=e[t],r={};AU.default.Children.forEach(n,function(e){if(null!=e?.key){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}})},innerRef:MU.default.any},Object.defineProperty(iY,"__esModule",{value:!0}),iY.default=void 0;var ZU=jU(f.default),DU=g.default,IU=jU(NI.exports),HU=oY.exports,TU=WY.exports,LU=xq,PU=tY,VU=SU,BU=jU(bq.exports);function jU(e){return e&&e.__esModule?e:{default:e}}function zU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class RU extends ZU.default.Component{constructor(){super(...arguments),zU(this,"state",{resizing:null,dragging:null,className:""}),zU(this,"elementRef",ZU.default.createRef()),zU(this,"onDragStart",(e,t)=>{let{node:n}=t;const{onDragStart:r,transformScale:a}=this.props;if(!r)return;const i={top:0,left:0},{offsetParent:o}=n;if(!o)return;const l=o.getBoundingClientRect(),s=n.getBoundingClientRect(),c=s.left/a,d=l.left/a,h=s.top/a,u=l.top/a;i.left=c-d+o.scrollLeft,i.top=h-u+o.scrollTop,this.setState({dragging:i});const{x:p,y:f}=(0,PU.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return r.call(this,this.props.i,p,f,{e:e,node:n,newPosition:i})}),zU(this,"onDrag",(e,t,n)=>{let{node:r,deltaX:a,deltaY:i}=t;const{onDrag:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let l=this.state.dragging.top+i,s=this.state.dragging.left+a;const{isBounded:c,i:d,w:h,h:u,containerWidth:p}=this.props,f=this.getPositionParams();if(c){const{offsetParent:e}=r;if(e){const{margin:t,rowHeight:n}=this.props,r=e.clientHeight-(0,PU.calcGridItemWHPx)(u,n,t[1]);l=(0,PU.clamp)(l,0,r);const a=(0,PU.calcGridColWidth)(f),i=p-(0,PU.calcGridItemWHPx)(h,a,t[0]);s=(0,PU.clamp)(s,0,i)}}const m={top:l,left:s};n?this.setState({dragging:m}):(0,DU.flushSync)(()=>{this.setState({dragging:m})});const{x:v,y:g}=(0,PU.calcXY)(f,l,s,h,u);return o.call(this,d,v,g,{e:e,node:r,newPosition:m})}),zU(this,"onDragStop",(e,t)=>{let{node:n}=t;const{onDragStop:r}=this.props;if(!r)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");const{w:a,h:i,i:o}=this.props,{left:l,top:s}=this.state.dragging,c={top:s,left:l};this.setState({dragging:null});const{x:d,y:h}=(0,PU.calcXY)(this.getPositionParams(),s,l,a,i);return r.call(this,o,d,h,{e:e,node:n,newPosition:c})}),zU(this,"onResizeStop",(e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStop")),zU(this,"onResizeStart",(e,t,n)=>this.onResizeHandler(e,t,n,"onResizeStart")),zU(this,"onResize",(e,t,n)=>this.onResizeHandler(e,t,n,"onResize"))}shouldComponentUpdate(e,t){if(this.props.children!==e.children)return!0;if(this.props.droppingPosition!==e.droppingPosition)return!0;const n=(0,PU.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),r=(0,PU.calcGridItemPosition)(this.getPositionParams(e),e.x,e.y,e.w,e.h,t);return!(0,LU.fastPositionEqual)(n,r)||this.props.useCSSTransforms!==e.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(e){this.moveDroppingItem(e)}moveDroppingItem(e){const{droppingPosition:t}=this.props;if(!t)return;const n=this.elementRef.current;if(!n)return;const r=e.droppingPosition||{left:0,top:0},{dragging:a}=this.state,i=a&&t.left!==r.left||t.top!==r.top;if(a){if(i){const e=t.left-a.left,r=t.top-a.top;this.onDrag(t.e,{node:n,deltaX:e,deltaY:r},!0)}}else this.onDragStart(t.e,{node:n,deltaX:t.left,deltaY:t.top})}getPositionParams(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return{cols:e.cols,containerPadding:e.containerPadding,containerWidth:e.containerWidth,margin:e.margin,maxRows:e.maxRows,rowHeight:e.rowHeight}}createStyle(e){const{usePercentages:t,containerWidth:n,useCSSTransforms:r}=this.props;let a;return r?a=(0,LU.setTransform)(e):(a=(0,LU.setTopLeft)(e),t&&(a.left=(0,LU.perc)(e.left/n),a.width=(0,LU.perc)(e.width/n))),a}mixinDraggable(e,t){return ZU.default.createElement(HU.DraggableCore,{disabled:!t,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},e)}curryResizeHandler(e,t){return(n,r)=>t(n,r,e)}mixinResizable(e,t,n){const{cols:r,minW:a,minH:i,maxW:o,maxH:l,transformScale:s,resizeHandles:c,resizeHandle:d}=this.props,h=this.getPositionParams(),u=(0,PU.calcGridItemPosition)(h,0,0,r,0).width,p=(0,PU.calcGridItemPosition)(h,0,0,a,i),f=(0,PU.calcGridItemPosition)(h,0,0,o,l),m=[p.width,p.height],v=[Math.min(f.width,u),Math.min(f.height,1/0)];return ZU.default.createElement(TU.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:t.width,height:t.height,minConstraints:m,maxConstraints:v,onResizeStop:this.curryResizeHandler(t,this.onResizeStop),onResizeStart:this.curryResizeHandler(t,this.onResizeStart),onResize:this.curryResizeHandler(t,this.onResize),transformScale:s,resizeHandles:c,handle:d},e)}onResizeHandler(e,t,n,r){let{node:a,size:i,handle:o}=t;const l=this.props[r];if(!l)return;const{x:s,y:c,i:d,maxH:h,minH:u,containerWidth:p}=this.props,{minW:f,maxW:m}=this.props;let v=i;a&&(v=(0,LU.resizeItemInDirection)(o,n,i,p),(0,DU.flushSync)(()=>{this.setState({resizing:"onResizeStop"===r?null:v})}));let{w:g,h:b}=(0,PU.calcWH)(this.getPositionParams(),v.width,v.height,s,c,o);g=(0,PU.clamp)(g,Math.max(f,1),m),b=(0,PU.clamp)(b,u,h),l.call(this,d,g,b,{e:e,node:a,size:v,handle:o})}render(){const{x:e,y:t,w:n,h:r,isDraggable:a,isResizable:i,droppingPosition:o,useCSSTransforms:l}=this.props,s=(0,PU.calcGridItemPosition)(this.getPositionParams(),e,t,n,r,this.state),c=ZU.default.Children.only(this.props.children);let d=ZU.default.cloneElement(c,{ref:this.elementRef,className:(0,BU.default)("react-grid-item",c.props.className,this.props.className,{static:this.props.static,resizing:Boolean(this.state.resizing),"react-draggable":a,"react-draggable-dragging":Boolean(this.state.dragging),dropping:Boolean(o),cssTransforms:l}),style:{...this.props.style,...c.props.style,...this.createStyle(s)}});return d=this.mixinResizable(d,s,i),d=this.mixinDraggable(d,a),d}}iY.default=RU,zU(RU,"propTypes",{children:IU.default.element,cols:IU.default.number.isRequired,containerWidth:IU.default.number.isRequired,rowHeight:IU.default.number.isRequired,margin:IU.default.array.isRequired,maxRows:IU.default.number.isRequired,containerPadding:IU.default.array.isRequired,x:IU.default.number.isRequired,y:IU.default.number.isRequired,w:IU.default.number.isRequired,h:IU.default.number.isRequired,minW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minWidth not Number"):n>e.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):n<e.w||n<e.minW?new Error("maxWidth smaller than item width/minWidth"):void 0},minH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("minHeight not Number"):n>e.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){const n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n<e.h||n<e.minH?new Error("maxHeight smaller than item height/minHeight"):void 0},i:IU.default.string.isRequired,resizeHandles:VU.resizeHandleAxesType,resizeHandle:VU.resizeHandleType,onDragStop:IU.default.func,onDragStart:IU.default.func,onDrag:IU.default.func,onResizeStop:IU.default.func,onResizeStart:IU.default.func,onResize:IU.default.func,isDraggable:IU.default.bool.isRequired,isResizable:IU.default.bool.isRequired,isBounded:IU.default.bool.isRequired,static:IU.default.bool,useCSSTransforms:IU.default.bool.isRequired,transformScale:IU.default.number,className:IU.default.string,handle:IU.default.string,cancel:IU.default.string,droppingPosition:IU.default.shape({e:IU.default.object.isRequired,left:IU.default.number.isRequired,top:IU.default.number.isRequired})}),zU(RU,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1}),Object.defineProperty(FF,"__esModule",{value:!0}),FF.default=void 0;var WU=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),FU=gq,qU=KU(bq.exports),YU=xq,UU=tY,GU=KU(iY),XU=KU(SU);function KU(e){return e&&e.__esModule?e:{default:e}}function JU(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const QU="react-grid-layout";let $U=!1;try{$U=/firefox/i.test(navigator.userAgent)}catch(ige){}class eG extends WU.Component{constructor(){super(...arguments),JU(this,"state",{activeDrag:null,layout:(0,YU.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,YU.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),JU(this,"dragEnterCounter",0),JU(this,"onDragStart",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o}=this.state,l=(0,YU.getLayoutItem)(o,e);if(!l)return;const s={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:e};return this.setState({oldDragItem:(0,YU.cloneLayoutItem)(l),oldLayout:o,activeDrag:s}),this.props.onDragStart(o,l,l,null,a,i)}),JU(this,"onDrag",(e,t,n,r)=>{let{e:a,node:i}=r;const{oldDragItem:o}=this.state;let{layout:l}=this.state;const{cols:s,allowOverlap:c,preventCollision:d}=this.props,h=(0,YU.getLayoutItem)(l,e);if(!h)return;const u={w:h.w,h:h.h,x:h.x,y:h.y,placeholder:!0,i:e};l=(0,YU.moveElement)(l,h,t,n,!0,d,(0,YU.compactType)(this.props),s,c),this.props.onDrag(l,o,h,u,a,i),this.setState({layout:c?l:(0,YU.compact)(l,(0,YU.compactType)(this.props),s),activeDrag:u})}),JU(this,"onDragStop",(e,t,n,r)=>{let{e:a,node:i}=r;if(!this.state.activeDrag)return;const{oldDragItem:o}=this.state;let{layout:l}=this.state;const{cols:s,preventCollision:c,allowOverlap:d}=this.props,h=(0,YU.getLayoutItem)(l,e);if(!h)return;l=(0,YU.moveElement)(l,h,t,n,!0,c,(0,YU.compactType)(this.props),s,d);const u=d?l:(0,YU.compact)(l,(0,YU.compactType)(this.props),s);this.props.onDragStop(u,o,h,null,a,i);const{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:u,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(u,p)}),JU(this,"onResizeStart",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o}=this.state,l=(0,YU.getLayoutItem)(o,e);l&&(this.setState({oldResizeItem:(0,YU.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(o,l,l,null,a,i))}),JU(this,"onResize",(e,t,n,r)=>{let{e:a,node:i,size:o,handle:l}=r;const{oldResizeItem:s}=this.state,{layout:c}=this.state,{cols:d,preventCollision:h,allowOverlap:u}=this.props;let p,f,m,v=!1;const[g,b]=(0,YU.withLayoutItem)(c,e,e=>{let r;if(f=e.x,m=e.y,-1!==["sw","w","nw","n","ne"].indexOf(l)&&(-1!==["sw","nw","w"].indexOf(l)&&(f=e.x+(e.w-t),t=e.x!==f&&f<0?e.w:t,f=f<0?0:f),-1!==["ne","n","nw"].indexOf(l)&&(m=e.y+(e.h-n),n=e.y!==m&&m<0?e.h:n,m=m<0?0:m),v=!0),h&&!u){r=(0,YU.getAllCollisions)(c,{...e,w:t,h:n,x:f,y:m}).filter(t=>t.i!==e.i).length>0,r&&(m=e.y,n=e.h,f=e.x,t=e.w,v=!1)}return e.w=t,e.h=n,e});if(!b)return;if(p=g,v){const e=!0;p=(0,YU.moveElement)(g,b,f,m,e,this.props.preventCollision,(0,YU.compactType)(this.props),d,u)}const y={w:b.w,h:b.h,x:b.x,y:b.y,static:!0,i:e};this.props.onResize(p,s,b,y,a,i),this.setState({layout:u?p:(0,YU.compact)(p,(0,YU.compactType)(this.props),d),activeDrag:y})}),JU(this,"onResizeStop",(e,t,n,r)=>{let{e:a,node:i}=r;const{layout:o,oldResizeItem:l}=this.state,{cols:s,allowOverlap:c}=this.props,d=(0,YU.getLayoutItem)(o,e),h=c?o:(0,YU.compact)(o,(0,YU.compactType)(this.props),s);this.props.onResizeStop(h,l,d,null,a,i);const{oldLayout:u}=this.state;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(h,u)}),JU(this,"onDragOver",e=>{if(e.preventDefault(),e.stopPropagation(),$U&&!e.nativeEvent.target?.classList.contains(QU))return!1;const{droppingItem:t,onDropDragOver:n,margin:r,cols:a,rowHeight:i,maxRows:o,width:l,containerPadding:s,transformScale:c}=this.props,d=n?.(e);if(!1===d)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;const h={...t,...d},{layout:u}=this.state,p=e.currentTarget.getBoundingClientRect(),f=e.clientX-p.left,m=e.clientY-p.top,v={left:f/c,top:m/c,e:e};if(this.state.droppingDOMNode){if(this.state.droppingPosition){const{left:e,top:t}=this.state.droppingPosition;(e!=f||t!=m)&&this.setState({droppingPosition:v})}}else{const e={cols:a,margin:r,maxRows:o,rowHeight:i,containerWidth:l,containerPadding:s||r},t=(0,UU.calcXY)(e,m,f,h.w,h.h);this.setState({droppingDOMNode:WU.createElement("div",{key:h.i}),droppingPosition:v,layout:[...u,{...h,x:t.x,y:t.y,static:!1,isDraggable:!0}]})}}),JU(this,"removeDroppingPlaceholder",()=>{const{droppingItem:e,cols:t}=this.props,{layout:n}=this.state,r=(0,YU.compact)(n.filter(t=>t.i!==e.i),(0,YU.compactType)(this.props),t,this.props.allowOverlap);this.setState({layout:r,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),JU(this,"onDragLeave",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter--,0===this.dragEnterCounter&&this.removeDroppingPlaceholder()}),JU(this,"onDragEnter",e=>{e.preventDefault(),e.stopPropagation(),this.dragEnterCounter++}),JU(this,"onDrop",e=>{e.preventDefault(),e.stopPropagation();const{droppingItem:t}=this.props,{layout:n}=this.state,r=n.find(e=>e.i===t.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,r,e)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(e,t){let n;if(t.activeDrag)return null;if((0,FU.deepEqual)(e.layout,t.propsLayout)&&e.compactType===t.compactType?(0,YU.childrenEqual)(e.children,t.children)||(n=t.layout):n=e.layout,n){return{layout:(0,YU.synchronizeLayoutWithChildren)(n,e.children,e.cols,(0,YU.compactType)(e),e.allowOverlap),compactType:e.compactType,children:e.children,propsLayout:e.layout}}return null}shouldComponentUpdate(e,t){return this.props.children!==e.children||!(0,YU.fastRGLPropsEqual)(this.props,e,FU.deepEqual)||this.state.activeDrag!==t.activeDrag||this.state.mounted!==t.mounted||this.state.droppingPosition!==t.droppingPosition}componentDidUpdate(e,t){if(!this.state.activeDrag){const e=this.state.layout,n=t.layout;this.onLayoutMaybeChanged(e,n)}}containerHeight(){if(!this.props.autoSize)return;const e=(0,YU.bottom)(this.state.layout),t=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return e*this.props.rowHeight+(e-1)*this.props.margin[1]+2*t+"px"}onLayoutMaybeChanged(e,t){t||(t=this.state.layout),(0,FU.deepEqual)(t,e)||this.props.onLayoutChange(e)}placeholder(){const{activeDrag:e}=this.state;if(!e)return null;const{width:t,cols:n,margin:r,containerPadding:a,rowHeight:i,maxRows:o,useCSSTransforms:l,transformScale:s}=this.props;return WU.createElement(GU.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder "+(this.state.resizing?"placeholder-resizing":""),containerWidth:t,cols:n,margin:r,containerPadding:a||r,maxRows:o,rowHeight:i,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:s},WU.createElement("div",null))}processGridItem(e,t){if(!e||!e.key)return;const n=(0,YU.getLayoutItem)(this.state.layout,String(e.key));if(!n)return null;const{width:r,cols:a,margin:i,containerPadding:o,rowHeight:l,maxRows:s,isDraggable:c,isResizable:d,isBounded:h,useCSSTransforms:u,transformScale:p,draggableCancel:f,draggableHandle:m,resizeHandles:v,resizeHandle:g}=this.props,{mounted:b,droppingPosition:y}=this.state,w="boolean"==typeof n.isDraggable?n.isDraggable:!n.static&&c,x="boolean"==typeof n.isResizable?n.isResizable:!n.static&&d,E=n.resizeHandles||v,k=w&&h&&!1!==n.isBounded;return WU.createElement(GU.default,{containerWidth:r,cols:a,margin:i,containerPadding:o||i,maxRows:s,rowHeight:l,cancel:f,handle:m,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:w,isResizable:x,isBounded:k,useCSSTransforms:u&&b,usePercentages:!b,transformScale:p,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:t?y:void 0,resizeHandles:E,resizeHandle:g},e)}render(){const{className:e,style:t,isDroppable:n,innerRef:r}=this.props,a=(0,qU.default)(QU,e),i={height:this.containerHeight(),...t};return WU.createElement("div",{ref:r,className:a,style:i,onDrop:n?this.onDrop:YU.noop,onDragLeave:n?this.onDragLeave:YU.noop,onDragEnter:n?this.onDragEnter:YU.noop,onDragOver:n?this.onDragOver:YU.noop},WU.Children.map(this.props.children,e=>this.processGridItem(e)),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}}FF.default=eG,JU(eG,"displayName","ReactGridLayout"),JU(eG,"propTypes",XU.default),JU(eG,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:YU.noop,onDragStart:YU.noop,onDrag:YU.noop,onDragStop:YU.noop,onResizeStart:YU.noop,onResize:YU.noop,onResizeStop:YU.noop,onDrop:YU.noop,onDropDragOver:YU.noop});var tG={},nG={};Object.defineProperty(nG,"__esModule",{value:!0}),nG.findOrGenerateResponsiveLayout=function(e,t,n,r,a,i){if(e[n])return(0,rG.cloneLayout)(e[n]);let o=e[r];const l=aG(t),s=l.slice(l.indexOf(n));for(let t=0,n=s.length;t<n;t++){const n=s[t];if(e[n]){o=e[n];break}}return o=(0,rG.cloneLayout)(o||[]),(0,rG.compact)((0,rG.correctBounds)(o,{cols:a}),i,a)},nG.getBreakpointFromWidth=function(e,t){const n=aG(e);let r=n[0];for(let a=1,i=n.length;a<i;a++){const i=n[a];t>e[i]&&(r=i)}return r},nG.getColsFromBreakpoint=function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},nG.sortBreakpoints=aG;var rG=xq;function aG(e){return Object.keys(e).sort(function(t,n){return e[t]-e[n]})}Object.defineProperty(tG,"__esModule",{value:!0}),tG.default=void 0;var iG=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),oG=hG(NI.exports),lG=gq,sG=xq,cG=nG,dG=hG(FF);function hG(e){return e&&e.__esModule?e:{default:e}}function uG(){return uG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},uG.apply(null,arguments)}function pG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const fG=e=>Object.prototype.toString.call(e);function mG(e,t){return null==e?null:Array.isArray(e)?e:e[t]}class vG extends iG.Component{constructor(){super(...arguments),pG(this,"state",this.generateInitialState()),pG(this,"onLayoutChange",e=>{this.props.onLayoutChange(e,{...this.props.layouts,[this.state.breakpoint]:e})})}generateInitialState(){const{width:e,breakpoints:t,layouts:n,cols:r}=this.props,a=(0,cG.getBreakpointFromWidth)(t,e),i=(0,cG.getColsFromBreakpoint)(a,r),o=!1===this.props.verticalCompact?null:this.props.compactType;return{layout:(0,cG.findOrGenerateResponsiveLayout)(n,t,a,a,i,o),breakpoint:a,cols:i}}static getDerivedStateFromProps(e,t){if(!(0,lG.deepEqual)(e.layouts,t.layouts)){const{breakpoint:n,cols:r}=t;return{layout:(0,cG.findOrGenerateResponsiveLayout)(e.layouts,e.breakpoints,n,n,r,e.compactType),layouts:e.layouts}}return null}componentDidUpdate(e){this.props.width==e.width&&this.props.breakpoint===e.breakpoint&&(0,lG.deepEqual)(this.props.breakpoints,e.breakpoints)&&(0,lG.deepEqual)(this.props.cols,e.cols)||this.onWidthChange(e)}onWidthChange(e){const{breakpoints:t,cols:n,layouts:r,compactType:a}=this.props,i=this.props.breakpoint||(0,cG.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),o=this.state.breakpoint,l=(0,cG.getColsFromBreakpoint)(i,n),s={...r};if(o!==i||e.breakpoints!==t||e.cols!==n){o in s||(s[o]=(0,sG.cloneLayout)(this.state.layout));let e=(0,cG.findOrGenerateResponsiveLayout)(s,t,i,o,l,a);e=(0,sG.synchronizeLayoutWithChildren)(e,this.props.children,l,a,this.props.allowOverlap),s[i]=e,this.props.onBreakpointChange(i,l),this.props.onLayoutChange(e,s),this.setState({breakpoint:i,layout:e,cols:l})}const c=mG(this.props.margin,i),d=mG(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,c,l,d)}render(){const{breakpoint:e,breakpoints:t,cols:n,layouts:r,margin:a,containerPadding:i,onBreakpointChange:o,onLayoutChange:l,onWidthChange:s,...c}=this.props;return iG.createElement(dG.default,uG({},c,{margin:mG(a,this.state.breakpoint),containerPadding:mG(i,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}}tG.default=vG,pG(vG,"propTypes",{breakpoint:oG.default.string,breakpoints:oG.default.object,allowOverlap:oG.default.bool,cols:oG.default.object,margin:oG.default.oneOfType([oG.default.array,oG.default.object]),containerPadding:oG.default.oneOfType([oG.default.array,oG.default.object]),layouts(e,t){if("[object Object]"!==fG(e[t]))throw new Error("Layout property must be an object. Received: "+fG(e[t]));Object.keys(e[t]).forEach(t=>{if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,sG.validateLayout)(e.layouts[t],"layouts."+t)})},width:oG.default.number.isRequired,onBreakpointChange:oG.default.func,onLayoutChange:oG.default.func,onWidthChange:oG.default.func}),pG(vG,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:sG.noop,onLayoutChange:sG.noop,onWidthChange:sG.noop});var gG={},bG=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var a=r[n];e.call(t,a[1],a[0])}},t}()}(),yG="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,wG="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),xG="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(wG):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var EG=["top","right","bottom","left","width","height","size","weight"],kG="undefined"!=typeof MutationObserver,CG=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,r=!1,a=0;function i(){n&&(n=!1,e()),r&&l()}function o(){xG(i)}function l(){var e=Date.now();if(n){if(e-a<2)return;r=!0}else n=!0,r=!1,setTimeout(o,t);a=e}return l}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){yG&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),kG?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){yG&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;EG.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),SG=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var a=r[n];Object.defineProperty(e,a,{value:t[a],enumerable:!1,writable:!1,configurable:!0})}return e},MG=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||wG},AG=IG(0,0,0,0);function _G(e){return parseFloat(e)||0}function OG(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+_G(e["border-"+n+"-width"])},0)}function NG(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return AG;var r=MG(e).getComputedStyle(e),a=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var a=r[n],i=e["padding-"+a];t[a]=_G(i)}return t}(r),i=a.left+a.right,o=a.top+a.bottom,l=_G(r.width),s=_G(r.height);if("border-box"===r.boxSizing&&(Math.round(l+i)!==t&&(l-=OG(r,"left","right")+i),Math.round(s+o)!==n&&(s-=OG(r,"top","bottom")+o)),!function(e){return e===MG(e).document.documentElement}(e)){var c=Math.round(l+i)-t,d=Math.round(s+o)-n;1!==Math.abs(c)&&(l-=c),1!==Math.abs(d)&&(s-=d)}return IG(a.left,a.top,l,s)}var ZG="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof MG(e).SVGGraphicsElement}:function(e){return e instanceof MG(e).SVGElement&&"function"==typeof e.getBBox};function DG(e){return yG?ZG(e)?function(e){var t=e.getBBox();return IG(0,0,t.width,t.height)}(e):NG(e):AG}function IG(e,t,n,r){return{x:e,y:t,width:n,height:r}}var HG=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=IG(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=DG(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),TG=function(e,t){var n=function(e){var t=e.x,n=e.y,r=e.width,a=e.height,i="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(i.prototype);return SG(o,{x:t,y:n,width:r,height:a,top:n,right:t+r,bottom:a+n,left:t}),o}(t);SG(this,{target:e,contentRect:n})},LG=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new bG,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof MG(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new HG(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof MG(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new TG(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),PG="undefined"!=typeof WeakMap?new WeakMap:new bG,VG=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=CG.getInstance(),r=new LG(t,n,this);PG.set(this,r)};["observe","unobserve","disconnect"].forEach(function(e){VG.prototype[e]=function(){var t;return(t=PG.get(this))[e].apply(t,arguments)}});var BG=void 0!==wG.ResizeObserver?wG.ResizeObserver:VG,jG=OI(Object.freeze({__proto__:null,default:BG}));Object.defineProperty(gG,"__esModule",{value:!0}),gG.default=function(e){var t;return t=class extends zG.Component{constructor(){super(...arguments),UG(this,"state",{width:1280}),UG(this,"elementRef",zG.createRef()),UG(this,"mounted",!1),UG(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new WG.default(e=>{if(this.elementRef.current instanceof HTMLElement){const t=e[0].contentRect.width;this.setState({width:t})}});const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.observe(e)}componentWillUnmount(){this.mounted=!1;const e=this.elementRef.current;e instanceof HTMLElement&&this.resizeObserver.unobserve(e),this.resizeObserver.disconnect()}render(){const{measureBeforeMount:t,...n}=this.props;return t&&!this.mounted?zG.createElement("div",{className:(0,FG.default)(this.props.className,GG),style:this.props.style,ref:this.elementRef}):zG.createElement(e,YG({innerRef:this.elementRef},n,this.state))}},UG(t,"defaultProps",{measureBeforeMount:!1}),UG(t,"propTypes",{measureBeforeMount:RG.default.bool}),t};var zG=function(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return function(e,t){if(!t&&e&&e.__esModule)return e;var a,i,o={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return o;if(a=t?r:n){if(a.has(e))return a.get(e);a.set(e,o)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(o,t,i):o[t]=e[t]);return o}(e,t)}(f.default),RG=qG(NI.exports),WG=qG(jG),FG=qG(bq.exports);function qG(e){return e&&e.__esModule?e:{default:e}}function YG(){return YG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},YG.apply(null,arguments)}function UG(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const GG="react-grid-layout";function XG(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}var KG;function JG(){}function QG(e){return!!(e||"").match(/\d/)}function $G(e){return null==e}function eX(e){return $G(e)||function(e){return"number"==typeof e&&isNaN(e)}(e)||"number"==typeof e&&!isFinite(e)}function tX(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function nX(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:n,addNegation:r}}function rX(e,t,n){for(var r="",a=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||a;return r}function aX(e,t){return Array(t+1).join(e)}function iX(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],i=r[1];if(!(i=Number(i)))return n+a;var o=1+i,l=(a=a.replace(".","")).length;return o<0?a="0."+aX("0",Math.abs(o))+a:o>=l?a+=aX("0",o-l):a=(a.substring(0,o)||"0")+"."+a.substring(o),n+a}function oX(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,a=nX(e),i=a.beforeDecimal,o=a.afterDecimal,l=a.hasNegation,s=parseFloat("0."+(o||"0")),c=(o.length<=t?"0."+o:s.toFixed(t)).split("."),d=i;return i&&Number(c[0])&&(d=i.split("").reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},c[0])),""+(l?"-":"")+d+(r?".":"")+rX(c[1]||"",t,n)}function lX(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}!function(e){e.exports=FF.default,e.exports.utils=xq,e.exports.calculateUtils=tY,e.exports.Responsive=tG.default,e.exports.Responsive.utils=nG,e.exports.WidthProvider=gG.default}(WF),function(e){e.event="event",e.props="prop"}(KG||(KG={}));var sX=function(e){var t,n=void 0;return function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r))}}(function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:i-r}}});function cX(e){return Math.max(e.selectionStart,e.selectionEnd)}function dX(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function hX(e,t,n,r){var a=e.length;if(t=function(e,t,n){return Math.min(Math.max(e,t),n)}(t,0,a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return-1===t&&(t=a),t}function uX(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=Boolean(QG(e[n])||QG(e[n-1]));return t}function pX(t,n,r,a,i,o){void 0===o&&(o=JG);var l=function(t){var n=e.useRef(t);n.current=t;var r=e.useRef(function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n.current.apply(n,e)});return r.current}(function(e,t){var n,r;return eX(e)?(r="",n=""):"number"==typeof e||t?(r="number"==typeof e?iX(e):e,n=a(r)):(r=i(e,void 0),n=a(r)),{formattedValue:n,numAsString:r}}),s=e.useState(function(){return l($G(t)?n:t,r)}),c=s[0],d=s[1],h=t,u=r;$G(t)&&(h=c.numAsString,u=!0);var p=l(h,u);return e.useMemo(function(){d(p)},[p.formattedValue]),[c,function(e,t){e.formattedValue!==c.formattedValue&&d({formattedValue:e.formattedValue,numAsString:e.value}),o(e,t)}]}function fX(e){return e.replace(/[^0-9]/g,"")}function mX(e){return e}function vX(t){var n=t.type;void 0===n&&(n="text");var r=t.displayType;void 0===r&&(r="input");var a=t.customInput,i=t.renderText,o=t.getInputRef,l=t.format;void 0===l&&(l=mX);var s=t.removeFormatting;void 0===s&&(s=fX);var c=t.defaultValue,d=t.valueIsNumericString,h=t.onValueChange,u=t.isAllowed,p=t.onChange;void 0===p&&(p=JG);var m=t.onKeyDown;void 0===m&&(m=JG);var v=t.onMouseUp;void 0===v&&(v=JG);var g=t.onFocus;void 0===g&&(g=JG);var b=t.onBlur;void 0===b&&(b=JG);var y=t.value,w=t.getCaretBoundary;void 0===w&&(w=uX);var x=t.isValidInputCharacter;void 0===x&&(x=QG);var E=t.isCharacterSame,k=XG(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),C=pX(y,c,Boolean(d),l,s,h),S=C[0],M=S.formattedValue,A=S.numAsString,_=C[1],O=e.useRef(),N=e.useRef({formattedValue:M,numAsString:A}),Z=function(e,t){N.current={formattedValue:e.formattedValue,numAsString:e.value},_(e,t)},D=e.useState(!1),I=D[0],H=D[1],T=e.useRef(null),L=e.useRef({setCaretTimeout:null,focusTimeout:null});e.useEffect(function(){return H(!0),function(){clearTimeout(L.current.setCaretTimeout),clearTimeout(L.current.focusTimeout)}},[]);var P=l,V=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},B=function(e,t,n){0===e.selectionStart&&e.selectionEnd===e.value.length||(lX(e,t),L.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&lX(e,t)},0))},j=function(e,t,n){return hX(e,t,w(e),n)},z=function(e,t,n){var r=w(t),a=function(e,t,n,r,a,i,o){void 0===o&&(o=dX);var l=a.findIndex(function(e){return e}),s=e.slice(0,l);t||n.startsWith(s)||(t=s,n=s+n,r+=s.length);for(var c=n.length,d=e.length,h={},u=new Array(c),p=0;p<c;p++){u[p]=-1;for(var f=0,m=d;f<m;f++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:f})&&!0!==h[f]){u[p]=f,h[f]=!0;break}}for(var v=r;v<c&&(-1===u[v]||!i(n[v]));)v++;var g=v===c||-1===u[v]?d:u[v];for(v=r-1;v>0&&-1===u[v];)v--;var b=-1===v||-1===u[v]?0:u[v]+1;return b>g?g:r-b<g-r?b:g}(t,M,e,n,r,x,E);return a=hX(t,a,r)};e.useEffect(function(){var e=N.current,t=e.formattedValue,n=e.numAsString;M===t&&A===n||Z(V(M,A),{event:void 0,source:KG.props})},[M,A]);var R=T.current?cX(T.current):void 0;("undefined"!=typeof window?e.useLayoutEffect:e.useEffect)(function(){var e=T.current;if(M!==N.current.formattedValue&&e){var t=z(N.current.formattedValue,M,R);e.value=M,B(e,t,M)}},[M]);var W=function(e,t,n){var r=t.target,a=O.current?function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}}(O.current,r.selectionEnd):sX(M,e),i=Object.assign(Object.assign({},a),{lastValue:M}),o=s(e,i),l=P(o);if(o=s(l,void 0),u&&!u(V(l,o))){var c=t.target,d=cX(c),h=z(e,M,d);return c.value=M,B(c,h,M),!1}return function(e){var t=e.formattedValue;void 0===t&&(t="");var n,r=e.input,a=e.source,i=e.event,o=e.numAsString;if(r){var l=e.inputValue||r.value,s=cX(r);r.value=t,void 0!==(n=z(l,t,s))&&B(r,n,t)}t!==M&&Z(V(t,o),{event:i,source:a})}({formattedValue:l,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},F=function(e,t){void 0===t&&(t=0);var n=e.selectionStart,r=e.selectionEnd;O.current={selectionStart:n,selectionEnd:r+t}},q=!I||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",Y=Object.assign({inputMode:q},k,{type:n,value:M,onChange:function(e){var t=e.target.value;W(t,e,KG.event)&&p(e),O.current=void 0},onKeyDown:function(e){var t,n=e.target,r=e.key,a=n.selectionStart,i=n.selectionEnd,o=n.value;void 0===o&&(o=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(a-1,0):"ArrowRight"===r?t=Math.min(a+1,o.length):"Delete"===r&&(t=a);var l=0;"Delete"===r&&a===i&&(l=1);var s="ArrowLeft"===r||"ArrowRight"===r;if(void 0===t||a!==i&&!s)return m(e),void F(n,l);var c=t;s?(c=j(o,t,"ArrowLeft"===r?"left":"right"))!==t&&e.preventDefault():"Delete"!==r||x(o[t])?"Backspace"!==r||x(o[t])||(c=j(o,t,"left")):c=j(o,t,"right");c!==t&&B(n,c,o),m(e),F(n,l)},onMouseUp:function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(void 0===r&&(r=""),e===n){var a=j(r,e);a!==e&&B(t,a,r)}};n(),requestAnimationFrame(function(){n()}),v(e),F(t)},onFocus:function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;T.current=t,L.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,a=t.selectionEnd,i=t.value;void 0===i&&(i="");var o=j(i,r);o===r||0===r&&a===i.length||B(t,o,i),g(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},onBlur:function(e){T.current=null,clearTimeout(L.current.focusTimeout),clearTimeout(L.current.setCaretTimeout),b(e)}});if("text"===r)return i?f.default.createElement(f.default.Fragment,null,i(M,k)||null):f.default.createElement("span",Object.assign({},k,{ref:o}),M);if(a){var U=a;return f.default.createElement(U,Object.assign({},Y,{ref:o}))}return f.default.createElement("input",Object.assign({},Y,{ref:o}))}function gX(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix;void 0===a&&(a="");var i=t.suffix;void 0===i&&(i="");var o=t.allowNegative,l=t.thousandsGroupStyle;if(void 0===l&&(l="thousand"),""===e||"-"===e)return e;var s=bX(t),c=s.thousandSeparator,d=s.decimalSeparator,h=0!==n&&-1!==e.indexOf(".")||n&&r,u=nX(e,o),p=u.beforeDecimal,f=u.afterDecimal,m=u.addNegation;return void 0!==n&&(f=rX(f,n,!!r)),c&&(p=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}(p,c,l)),a&&(p=a+p),i&&(f+=i),m&&(p="-"+p),e=p+(h&&d||"")+f}function bX(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function yX(e,t,n){var r;void 0===t&&(t=function(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}(e));var a=n.allowNegative,i=n.prefix;void 0===i&&(i="");var o=n.suffix;void 0===o&&(o="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,h=c.end,u=bX(n),p=u.allowedDecimalSeparators,f=u.decimalSeparator,m=e[h]===f;if(QG(e)&&(e===i||e===o)&&""===t.lastValue)return e;if(h-d===1&&-1!==p.indexOf(e[d])){var v=0===l?"":f;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var g=function(e,t,n){var r=!1,a=!1;i.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,a=!0):o.startsWith("-")&&e.length===o.length?r=!1:"-"===e[0]&&(r=!0);var l=r?1:0;return a&&(l=2),l&&(e=e.substring(l),t-=l,n-=l),{value:e,start:t,end:n,hasNegation:r}},b=g(e,d,h),y=b.hasNegation;e=(r=b).value,d=r.start,h=r.end;var w=g(t.lastValue,s.start,s.end),x=w.start,E=w.end,k=w.value,C=e.substring(d,h);!(e.length&&k.length&&(x>k.length-o.length||E<i.length))||C&&o.startsWith(C)||(e=k);var S=0;e.startsWith(i)?S+=i.length:d<i.length&&(S=d),h-=S;var M=(e=e.substring(S)).length,A=e.length-o.length;e.endsWith(o)?M=A:(h>A||h>e.length-o.length)&&(M=h),e=e.substring(0,M),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}(y?"-"+e:e,a),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+tX(e),t?"g":void 0)}(f,!0))||[]).join("");var _=e.indexOf(f);e=e.replace(new RegExp(tX(f),"g"),function(e,t){return t===_?".":""});var O=nX(e,a),N=O.beforeDecimal,Z=O.afterDecimal,D=O.addNegation;return c.end-c.start<s.end-s.start&&""===N&&m&&!parseFloat(Z)&&(e=D?"-":""),e}function wX(e){e=function(e){var t=bX(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix;void 0===a&&(a="");var i=e.allowNegative;if(void 0===i&&(i=!0),n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");return a.startsWith("-")&&i&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+a+"\n allowNegative: "+i+"\n "),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown;void 0===a&&(a=JG);var i=e.onBlur;void 0===i&&(i=JG);var o=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;void 0===c&&(c="");var d=e.defaultValue,h=e.value,u=e.valueIsNumericString,p=e.onValueChange,f=XG(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=bX(e),v=m.decimalSeparator,g=m.allowedDecimalSeparators,b=function(t){return gX(t,e)},y=function(t,n){return yX(t,n,e)},w=$G(h)?d:h,x=null!=u?u:function(e,t,n){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==n?void 0:n.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(w,c,t);$G(h)?$G(d)||(x=x||"number"==typeof d):x=x||"number"==typeof h;var E=function(e){return eX(e)?e:("number"==typeof e&&(e=iX(e)),x&&"number"==typeof l?oX(e,l,Boolean(s)):e)},k=pX(E(h),E(d),Boolean(x),b,y,p),C=k[0],S=C.numAsString,M=C.formattedValue,A=k[1];return Object.assign(Object.assign({},f),{value:M,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===v||QG(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,a=e.currentValueIndex,i=e.formattedValueIndex,o=t[a],d=r[i],u=sX(n,t).to,p=function(e){return y(e).indexOf(".")+c.length};return!(0===h&&s&&l&&t[u.start]===v&&p(t)<a&&p(r)>i)&&(!!(a>=u.start&&a<u.end&&g&&g.includes(o)&&d===v)||o===d)},onValueChange:A,format:b,removeFormatting:y,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i="-"===e[0];a.fill(!1,0,n.length+(i?1:0));var o=e.length;return a.fill(!1,o-r.length+1,o+1),a}(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,i=t.selectionStart,d=t.selectionEnd,h=t.value;if(void 0===h&&(h=""),("Backspace"===r||"Delete"===r)&&d<c.length)e.preventDefault();else if(i===d){"Backspace"===r&&"-"===h[0]&&i===c.length+1&&n&&lX(t,1),l&&s&&("Backspace"===r&&h[i-1]===v?(lX(t,i-1),e.preventDefault()):"Delete"===r&&h[i]===v&&e.preventDefault()),(null==g?void 0:g.includes(r))&&h[i]===v&&lX(t,i+1);var u=!0===o?",":o;"Backspace"===r&&h[i-1]===u&&lX(t,i-1),"Delete"===r&&h[i]===u&&lX(t,i+1),a(e)}else a(e)},onBlur:function(t){var n=S;if(n.match(/\d/g)||(n=""),r||(n=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}(n)),s&&l&&(n=oX(n,l,s)),n!==S){var a=gX(n,e);A({formattedValue:a,value:n,floatValue:parseFloat(n)},{event:t,source:KG.event})}i(t)}})}function xX(e){var t=wX(e);return f.default.createElement(vX,Object.assign({},t))}function EX(e){function t(e,r,s,c,u){for(var p,f,m,v,w,E=0,k=0,C=0,S=0,M=0,D=0,H=m=p=0,L=0,P=0,V=0,B=0,j=s.length,z=j-1,R="",W="",F="",q="";L<j;){if(f=s.charCodeAt(L),L===z&&0!==k+S+C+E&&(0!==k&&(f=47===k?10:47),S=C=E=0,j++,z++),0===k+S+C+E){if(L===z&&(0<P&&(R=R.replace(h,"")),0<R.trim().length)){switch(f){case 32:case 9:case 59:case 13:case 10:break;default:R+=s.charAt(L)}f=59}switch(f){case 123:for(p=(R=R.trim()).charCodeAt(0),m=1,B=++L;L<j;){switch(f=s.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(f=s.charCodeAt(L+1)){case 42:case 47:e:{for(H=L+1;H<z;++H)switch(s.charCodeAt(H)){case 47:if(42===f&&42===s.charCodeAt(H-1)&&L+2!==H){L=H+1;break e}break;case 10:if(47===f){L=H+1;break e}}L=H}}break;case 91:f++;case 40:f++;case 34:case 39:for(;L++<z&&s.charCodeAt(L)!==f;);}if(0===m)break;L++}if(m=s.substring(B,L),0===p&&(p=(R=R.replace(d,"").trim()).charCodeAt(0)),64===p){switch(0<P&&(R=R.replace(h,"")),f=R.charCodeAt(1)){case 100:case 109:case 115:case 45:P=r;break;default:P=Z}if(B=(m=t(r,P,m,f,u+1)).length,0<I&&(w=l(3,m,P=n(Z,R,V),r,_,A,B,f,u,c),R=P.join(""),void 0!==w&&0===(B=(m=w.trim()).length)&&(f=0,m="")),0<B)switch(f){case 115:R=R.replace(x,o);case 100:case 109:case 45:m=R+"{"+m+"}";break;case 107:m=(R=R.replace(g,"$1 $2"))+"{"+m+"}",m=1===N||2===N&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=R+m,112===c&&(W+=m,m="")}else m=""}else m=t(r,n(r,R,V),m,c,u+1);F+=m,m=V=P=H=p=0,R="",f=s.charCodeAt(++L);break;case 125:case 59:if(1<(B=(R=(0<P?R.replace(h,""):R).trim()).length))switch(0===H&&(p=R.charCodeAt(0),45===p||96<p&&123>p)&&(B=(R=R.replace(" ",":")).length),0<I&&void 0!==(w=l(1,R,r,e,_,A,W.length,c,u,c))&&0===(B=(R=w.trim()).length)&&(R="\0\0"),p=R.charCodeAt(0),f=R.charCodeAt(1),p){case 0:break;case 64:if(105===f||99===f){q+=R+s.charAt(L);break}default:58!==R.charCodeAt(B-1)&&(W+=a(R,p,f,R.charCodeAt(2)))}V=P=H=p=0,R="",f=s.charCodeAt(++L)}}switch(f){case 13:case 10:47===k?k=0:0===1+p&&107!==c&&0<R.length&&(P=1,R+="\0"),0<I*T&&l(0,R,r,e,_,A,W.length,c,u,c),A=1,_++;break;case 59:case 125:if(0===k+S+C+E){A++;break}default:switch(A++,v=s.charAt(L),f){case 9:case 32:if(0===S+E+k)switch(M){case 44:case 58:case 9:case 32:v="";break;default:32!==f&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===S+k+E&&(P=V=1,v="\f"+v);break;case 108:if(0===S+k+E+O&&0<H)switch(L-H){case 2:112===M&&58===s.charCodeAt(L-3)&&(O=M);case 8:111===D&&(O=D)}break;case 58:0===S+k+E&&(H=L);break;case 44:0===k+C+S+E&&(P=1,v+="\r");break;case 34:case 39:0===k&&(S=S===f?0:0===S?f:S);break;case 91:0===S+k+C&&E++;break;case 93:0===S+k+C&&E--;break;case 41:0===S+k+E&&C--;break;case 40:if(0===S+k+E){if(0===p)if(2*M+3*D==533);else p=1;C++}break;case 64:0===k+C+S+E+H+m&&(m=1);break;case 42:case 47:if(!(0<S+E+C))switch(k){case 0:switch(2*f+3*s.charCodeAt(L+1)){case 235:k=47;break;case 220:B=L,k=42}break;case 42:47===f&&42===M&&B+2!==L&&(33===s.charCodeAt(B+2)&&(W+=s.substring(B,L+1)),v="",k=0)}}0===k&&(R+=v)}D=M,M=f,L++}if(0<(B=W.length)){if(P=r,0<I&&(void 0!==(w=l(2,W,P,e,_,A,B,c,u,c))&&0===(W=w).length))return q+W+F;if(W=P.join(",")+"{"+W+"}",0!==N*O){switch(2!==N||i(W,2)||(O=0),O){case 111:W=W.replace(y,":-moz-$1")+W;break;case 112:W=W.replace(b,"::-webkit-input-$1")+W.replace(b,"::-moz-$1")+W.replace(b,":-ms-input-$1")+W}O=0}}return q+W+F}function n(e,t,n){var a=t.trim().split(m);t=a;var i=a.length,o=e.length;switch(o){case 0:case 1:var l=0;for(e=0===o?"":e[0]+" ";l<i;++l)t[l]=r(e,t[l],n).trim();break;default:var s=l=0;for(t=[];l<i;++l)for(var c=0;c<o;++c)t[s++]=r(e[c]+" ",a[l],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function a(e,t,n,r){var o=e+";",l=2*t+3*n+4*r;if(944===l){e=o.indexOf(":",9)+1;var s=o.substring(e,o.length-1).trim();return s=o.substring(0,e).trim()+s+";",1===N||2===N&&i(s,1)?"-webkit-"+s+s:s}if(0===N||2===N&&!i(o,1))return o;switch(l){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(M,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(s=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+s+o;case 1005:return p.test(o)?o.replace(u,":-webkit-")+o.replace(u,":-moz-")+o:o;case 1e3:switch(t=(s=o.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=o.replace(w,"tb");break;case 232:s=o.replace(w,"tb-rl");break;case 220:s=o.replace(w,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+s+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,l=(s=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:o=o.replace(s,"-webkit-"+s)+";"+o;break;case 207:case 102:o=o.replace(s,"-webkit-"+(102<l?"inline-":"")+"box")+";"+o.replace(s,"-webkit-"+s)+";"+o.replace(s,"-ms-"+s+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return s=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+s+"-ms-flex-"+s+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(k,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(k,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===S.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?a(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):o.replace(s,"-webkit-"+s)+o.replace(s,"-moz-"+s.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===n+r&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(f,"$1-webkit-$2")+o}return o}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),H(2!==t?r:r.replace(C,"$1"),n,t)}function o(e,t){var n=a(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(E," or ($1)").substring(4):"("+t+")"}function l(e,t,n,r,a,i,o,l,s,d){for(var h,u=0,p=t;u<I;++u)switch(h=D[u].call(c,e,p,n,r,a,i,o,l,s,d)){case void 0:case!1:case!0:case null:break;default:p=h}if(p!==t)return p}function s(e){return void 0!==(e=e.prefix)&&(H=null,e?"function"!=typeof e?N=1:(N=2,H=e):N=0),s}function c(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<I){var a=l(-1,n,r,r,_,A,0,0,0,0);void 0!==a&&"string"==typeof a&&(n=a)}var i=t(Z,r,n,0,0);return 0<I&&(void 0!==(a=l(-2,i,r,r,_,A,i.length,0,0,0))&&(i=a)),O=0,A=_=1,i}var d=/^\0+/g,h=/[\0\r\f]/g,u=/: */g,p=/zoo|gra/,f=/([,: ])(transform)/g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,y=/:(read-only)/g,w=/[svh]\w+-[tblr]{2}/,x=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,k=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,S=/stretch|:\s*\w+\-(?:conte|avail)/,M=/([^-])(image-set\()/,A=1,_=1,O=0,N=1,Z=[],D=[],I=0,H=null,T=0;return c.use=function e(t){switch(t){case void 0:case null:I=D.length=0;break;default:if("function"==typeof t)D[I++]=t;else if("object"==typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else T=0|!!t}return e},c.set=s,void 0!==e&&s(e),c}var kX={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function CX(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var SX=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,MX=CX(function(e){return SX.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),AX=ZI.exports,_X={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},OX={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},NX={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ZX={};function DX(e){return AX.isMemo(e)?NX:ZX[e.$$typeof]||_X}ZX[AX.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ZX[AX.Memo]=NX;var IX=Object.defineProperty,HX=Object.getOwnPropertyNames,TX=Object.getOwnPropertySymbols,LX=Object.getOwnPropertyDescriptor,PX=Object.getPrototypeOf,VX=Object.prototype;var BX=function e(t,n,r){if("string"!=typeof n){if(VX){var a=PX(n);a&&a!==VX&&e(t,a,r)}var i=HX(n);TX&&(i=i.concat(TX(n)));for(var o=DX(t),l=DX(n),s=0;s<i.length;++s){var c=i[s];if(!(OX[c]||r&&r[c]||l&&l[c]||o&&o[c])){var d=LX(n,c);try{IX(t,c,d)}catch(e){}}}}return t};function jX(){return(jX=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var zX=function(e,t){for(var n=[e[0]],r=0,a=t.length;r<a;r+=1)n.push(t[r],e[r+1]);return n},RX=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!ZI.exports.typeOf(e)},WX=Object.freeze([]),FX=Object.freeze({});function qX(e){return"function"==typeof e}function YX(e){return"production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function UX(e){return e&&"string"==typeof e.styledComponentId}var GX="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",XX="undefined"!=typeof window&&"HTMLElement"in window,KX=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&(void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV)),JX="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n"}:{};function QX(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n<r;n+=1)t.push(n<0||arguments.length<=n?void 0:arguments[n]);return t.forEach(function(t){e=e.replace(/%[a-z]/,t)}),e}function $X(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw"production"===process.env.NODE_ENV?new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):"")):new Error(QX.apply(void 0,[JX[e]].concat(n)).trim())}var eK=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,a=r;e>=a;)(a<<=1)<0&&$X(16,""+e);this.groupSizes=new Uint32Array(a),this.groupSizes.set(n),this.length=a;for(var i=r;i<a;i++)this.groupSizes[i]=0}for(var o=this.indexOfGroup(e+1),l=0,s=t.length;l<s;l++)this.tag.insertRule(o,t[l])&&(this.groupSizes[e]++,o++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var a=n;a<r;a++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),a=r+n,i=r;i<a;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),tK=new Map,nK=new Map,rK=1,aK=function(e){if(tK.has(e))return tK.get(e);for(;nK.has(rK);)rK++;var t=rK++;return"production"!==process.env.NODE_ENV&&((0|t)<0||t>1<<30)&&$X(16,""+t),tK.set(e,t),nK.set(t,e),t},iK=function(e){return nK.get(e)},oK=function(e,t){t>=rK&&(rK=t+1),tK.set(e,t),nK.set(t,e)},lK="style["+GX+'][data-styled-version="5.3.11"]',sK=new RegExp("^"+GX+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),cK=function(e,t,n){for(var r,a=n.split(","),i=0,o=a.length;i<o;i++)(r=a[i])&&e.registerName(t,r)},dK=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],a=0,i=n.length;a<i;a++){var o=n[a].trim();if(o){var l=o.match(sK);if(l){var s=0|parseInt(l[1],10),c=l[2];0!==s&&(oK(c,s),cK(e,c,l[3]),e.getTag().insertRules(s,r)),r.length=0}else r.push(o)}}},hK=function(e){var t=document.head,n=e||t,r=document.createElement("style"),a=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(GX))return r}}(n),i=void 0!==a?a.nextSibling:null;r.setAttribute(GX,"active"),r.setAttribute("data-styled-version","5.3.11");var o="undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null;return o&&r.setAttribute("nonce",o),n.insertBefore(r,i),r},uK=function(){function e(e){var t=this.element=hK(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var a=t[n];if(a.ownerNode===e)return a}$X(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),pK=function(){function e(e){var t=this.element=hK(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),fK=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),mK=XX,vK={isServer:!XX,useCSSOMInjection:!KX},gK=function(){function e(e,t,n){void 0===e&&(e=FX),void 0===t&&(t={}),this.options=jX({},vK,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&XX&&mK&&(mK=!1,function(e){for(var t=document.querySelectorAll(lK),n=0,r=t.length;n<r;n++){var a=t[n];a&&"active"!==a.getAttribute(GX)&&(dK(e,a),a.parentNode&&a.parentNode.removeChild(a))}}(this))}e.registerId=function(e){return aK(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(jX({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,a=t.target,e=n?new fK(a):r?new uK(a):new pK(a),new eK(e)));var e,t,n,r,a},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(aK(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(aK(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(aK(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",a=0;a<n;a++){var i=iK(a);if(void 0!==i){var o=e.names.get(i),l=t.getGroup(a);if(o&&l&&o.size){var s=GX+".g"+a+'[id="'+i+'"]',c="";void 0!==o&&o.forEach(function(e){e.length>0&&(c+=e+",")}),r+=""+l+s+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),bK=/(a)(d)/gi,yK=function(e){return String.fromCharCode(e+(e>25?39:97))};function wK(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=yK(t%52)+n;return(yK(t%52)+n).replace(bK,"$1-$2")}var xK=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},EK=function(e){return xK(5381,e)};var kK=EK("5.3.11"),CK=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&function(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(qX(n)&&!UX(n))return!1}return!0}(e),this.componentId=t,this.baseHash=xK(kK,t),this.baseStyle=n,gK.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,a=[];if(this.baseStyle&&a.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))a.push(this.staticRulesId);else{var i=VK(this.rules,e,t,n).join(""),o=wK(xK(this.baseHash,i)>>>0);if(!t.hasNameForId(r,o)){var l=n(i,"."+o,void 0,r);t.insertRules(r,o,l)}a.push(o),this.staticRulesId=o}else{for(var s=this.rules.length,c=xK(this.baseHash,n.hash),d="",h=0;h<s;h++){var u=this.rules[h];if("string"==typeof u)d+=u,"production"!==process.env.NODE_ENV&&(c=xK(c,u+h));else if(u){var p=VK(u,e,t,n),f=Array.isArray(p)?p.join(""):p;c=xK(c,f+h),d+=f}}if(d){var m=wK(c>>>0);if(!t.hasNameForId(r,m)){var v=n(d,"."+m,void 0,r);t.insertRules(r,m,v)}a.push(m)}}return a.join(" ")},e}(),SK=/^\s*\/\/.*$/gm,MK=[":","[",".","#"];var AK=f.default.createContext();AK.Consumer;var _K=f.default.createContext(),OK=(_K.Consumer,new gK),NK=function(e){var t,n,r,a,i=void 0===e?FX:e,o=i.options,l=void 0===o?FX:o,s=i.plugins,c=void 0===s?WX:s,d=new EX(l),h=[],u=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,a,i,o,l,s,c,d,h){switch(n){case 1:if(0===d&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(a[0]+r),"";default:return r+(0===h?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}(function(e){h.push(e)}),p=function(e,r,i){return 0===r&&-1!==MK.indexOf(i[n.length])||i.match(a)?e:"."+t};function f(e,i,o,l){void 0===l&&(l="&");var s=e.replace(SK,""),c=i&&o?o+" "+i+" { "+s+" }":s;return t=l,n=i,r=new RegExp("\\"+n+"\\b","g"),a=new RegExp("(\\"+n+"\\b){2,}"),d(o||!i?"":i,c)}return d.use([].concat(c,[function(e,t,a){2===e&&a.length&&a[0].lastIndexOf(n)>0&&(a[0]=a[0].replace(r,p))},u,function(e){if(-2===e){var t=h;return h=[],t}}])),f.hash=c.length?c.reduce(function(e,t){return t.name||$X(15),xK(e,t.name)},5381).toString():"",f}();var ZK=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=NK);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return $X(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=NK),this.name+e.hash},e}(),DK=/([A-Z])/,IK=/([A-Z])/g,HK=/^ms-/,TK=function(e){return"-"+e.toLowerCase()};function LK(e){return DK.test(e)?e.replace(IK,TK).replace(HK,"-ms-"):e}var PK=function(e){return null==e||!1===e||""===e};function VK(e,t,n,r){if(Array.isArray(e)){for(var a,i=[],o=0,l=e.length;o<l;o+=1)""!==(a=VK(e[o],t,n,r))&&(Array.isArray(a)?i.push.apply(i,a):i.push(a));return i}if(PK(e))return"";if(UX(e))return"."+e.styledComponentId;if(qX(e)){if("function"!=typeof(c=e)||c.prototype&&c.prototype.isReactComponent||!t)return e;var s=e(t);return"production"!==process.env.NODE_ENV&&ZI.exports.isElement(s)&&console.warn(YX(e)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),VK(s,t,n,r)}var c;return e instanceof ZK?n?(e.inject(n,r),e.getName(r)):e:RX(e)?function e(t,n){var r,a,i=[];for(var o in t)t.hasOwnProperty(o)&&!PK(t[o])&&(Array.isArray(t[o])&&t[o].isCss||qX(t[o])?i.push(LK(o)+":",t[o],";"):RX(t[o])?i.push.apply(i,e(t[o],o)):i.push(LK(o)+": "+(r=o,(null==(a=t[o])||"boolean"==typeof a||""===a?"":"number"!=typeof a||0===a||r in kX||r.startsWith("--")?String(a).trim():a+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString()}var BK=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function jK(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return qX(e)||RX(e)?BK(VK(zX(WX,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:BK(VK(zX(e,n)))}var zK=/invalid hook call/i,RK=new Set,WK=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,FK=/(^-|-$)/g;function qK(e){return e.replace(WK,"-").replace(FK,"")}function YK(e){return"string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var UK=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},GK=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function XK(e,t,n){var r=e[n];UK(t)&&UK(r)?KK(r,t):e[n]=t}function KK(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a];if(UK(o))for(var l in o)GK(l)&&XK(e,o[l],l)}return e}var JK=f.default.createContext();JK.Consumer;var QK={};function $K(t,n,r){var a=UX(t),i=!YK(t),o=n.attrs,l=void 0===o?WX:o,s=n.componentId,c=void 0===s?function(e,t){var n="string"!=typeof e?"sc":qK(e);QK[n]=(QK[n]||0)+1;var r=n+"-"+function(e){return wK(EK(e)>>>0)}("5.3.11"+n+QK[n]);return t?t+"-"+r:r}(n.displayName,n.parentComponentId):s,d=n.displayName,h=void 0===d?function(e){return YK(e)?"styled."+e:"Styled("+YX(e)+")"}(t):d,u=n.displayName&&n.componentId?qK(n.displayName)+"-"+n.componentId:n.componentId||c,p=a&&t.attrs?Array.prototype.concat(t.attrs,l).filter(Boolean):l,m=n.shouldForwardProp;a&&t.shouldForwardProp&&(m=n.shouldForwardProp?function(e,r,a){return t.shouldForwardProp(e,r,a)&&n.shouldForwardProp(e,r,a)}:t.shouldForwardProp);var v,g=new CK(r,u,a?t.componentStyle:void 0),b=g.isStatic&&0===l.length,y=function(t,n){return function(t,n,r,a){var i=t.attrs,o=t.componentStyle,l=t.defaultProps,s=t.foldedComponentIds,c=t.shouldForwardProp,d=t.styledComponentId,h=t.target,u=function(e,t,n){void 0===e&&(e=FX);var r=jX({},t,{theme:e}),a={};return n.forEach(function(e){var t,n,i,o=e;for(t in qX(o)&&(o=o(r)),o)r[t]=a[t]="className"===t?(n=a[t],i=o[t],n&&i?n+" "+i:n||i):o[t]}),[r,a]}(function(e,t,n){return void 0===n&&(n=FX),e.theme!==n.theme&&e.theme||t||n.theme}(n,e.useContext(JK),l)||FX,n,i),p=u[0],f=u[1],m=function(t,n,r,a){var i=e.useContext(AK)||OK,o=e.useContext(_K)||NK,l=n?t.generateAndInjectStyles(FX,i,o):t.generateAndInjectStyles(r,i,o);return"production"!==process.env.NODE_ENV&&!n&&a&&a(l),l}(o,a,p,"production"!==process.env.NODE_ENV?t.warnTooManyClasses:void 0),v=r,g=f.$as||n.$as||f.as||n.as||h,b=YK(g),y=f!==n?jX({},n,{},f):n,w={};for(var x in y)"$"!==x[0]&&"as"!==x&&("forwardedAs"===x?w.as=y[x]:(c?c(x,MX,g):!b||MX(x))&&(w[x]=y[x]));return n.style&&f.style!==n.style&&(w.style=jX({},n.style,{},f.style)),w.className=Array.prototype.concat(s,d,m!==d?m:null,n.className,f.className).filter(Boolean).join(" "),w.ref=v,e.createElement(g,w)}(v,t,n,b)};return y.displayName=h,(v=f.default.forwardRef(y)).attrs=p,v.componentStyle=g,v.displayName=h,v.shouldForwardProp=m,v.foldedComponentIds=a?Array.prototype.concat(t.foldedComponentIds,t.styledComponentId):WX,v.styledComponentId=u,v.target=a?t.target:t,v.withComponent=function(e){var t=n.componentId,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(n,["componentId"]),i=t&&t+"-"+(YK(e)?e:qK(YX(e)));return $K(e,jX({},a,{attrs:p,componentId:i}),r)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=a?KK({},t.defaultProps,e):e}}),"production"!==process.env.NODE_ENV&&(function(t,n){if("production"!==process.env.NODE_ENV){var r="The component "+t+(n?' with the id of "'+n+'"':"")+" has been created dynamically.\nYou may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",a=console.error;try{var i=!0;console.error=function(e){if(zK.test(e))i=!1,RK.delete(r);else{for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];a.apply(void 0,[e].concat(n))}},e.useRef(),i&&!RK.has(r)&&(console.warn(r),RK.add(r))}catch(t){zK.test(t.message)&&RK.delete(r)}finally{console.error=a}}}(h,u),v.warnTooManyClasses=function(e,t){var n={},r=!1;return function(a){if(!r&&(n[a]=!0,Object.keys(n).length>=200)){var i=t?' with the id of "'+t+'"':"";console.warn("Over 200 classes were generated for component "+e+i+".\nConsider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=!0,n={}}}}(h,u)),Object.defineProperty(v,"toString",{value:function(){return"."+v.styledComponentId}}),i&&BX(v,t,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var eJ=function(e){return function e(t,n,r){if(void 0===r&&(r=FX),!ZI.exports.isValidElementType(n))return $X(1,String(n));var a=function(){return t(n,r,jK.apply(void 0,arguments))};return a.withConfig=function(a){return e(t,n,jX({},r,{},a))},a.attrs=function(a){return e(t,n,jX({},r,{attrs:Array.prototype.concat(r.attrs,a).filter(Boolean)}))},a}($K,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){eJ[e]=eJ(e)}),"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native"),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,1===window["__styled-components-init__"]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window["__styled-components-init__"]+=1);var tJ=eJ;const nJ=tJ.span`
|
|
176
92
|
|
|
177
93
|
font-size: ${e=>e.fontSize?`${e.fontSize}px`:"14px"};
|
|
178
94
|
font-weight: ${e=>e.bold?"bold":"400"};
|
|
@@ -187,7 +103,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
187
103
|
border-width: ${e=>(e.isActive,"1px")};
|
|
188
104
|
border-style: ${e=>(e.isActive,"solid")};;
|
|
189
105
|
//border-color: ${e=>e.isActive?"red":void 0};
|
|
190
|
-
`;
|
|
106
|
+
`;tJ.div`
|
|
191
107
|
display: flex;
|
|
192
108
|
align-items: center;
|
|
193
109
|
position: relative;
|
|
@@ -210,7 +126,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
210
126
|
}
|
|
211
127
|
}
|
|
212
128
|
|
|
213
|
-
`;const
|
|
129
|
+
`;const rJ=tJ.span`
|
|
214
130
|
|
|
215
131
|
font-size: ${e=>e.fontSize?`${e.fontSize}px`:"14px"};
|
|
216
132
|
font-weight: ${e=>e.bold?"bold":"400"};
|
|
@@ -227,7 +143,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
227
143
|
//border-color: ${e=>e.isActive?"red":void 0};
|
|
228
144
|
//flex: 1;
|
|
229
145
|
//line-height: 1.5;
|
|
230
|
-
`,
|
|
146
|
+
`,aJ=tJ.div`
|
|
231
147
|
|
|
232
148
|
.grid-layout {
|
|
233
149
|
.react-grid-item {
|
|
@@ -241,7 +157,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
241
157
|
}
|
|
242
158
|
}
|
|
243
159
|
|
|
244
|
-
`,
|
|
160
|
+
`,iJ=tJ.div`
|
|
245
161
|
|
|
246
162
|
// Todo Application css starts
|
|
247
163
|
&.edit-template-application {
|
|
@@ -399,7 +315,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
399
315
|
}
|
|
400
316
|
|
|
401
317
|
|
|
402
|
-
`,
|
|
318
|
+
`,oJ=tJ.div`
|
|
403
319
|
|
|
404
320
|
&::before {
|
|
405
321
|
//content: "";
|
|
@@ -481,7 +397,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
481
397
|
|
|
482
398
|
}
|
|
483
399
|
|
|
484
|
-
`,
|
|
400
|
+
`,lJ=e.memo(t=>{const{dataItem:n,sectionData:a,width:i,typeEdit:o,pageSize:l,rows:s,content:c,active:d,selected:h,styles:u,currentItem:p,pageSetting:f,pixelRate:m,onClick:v,itemClick:g,formatNumber:b,onLayoutChange:y}=t,w=e.useRef(null),[x,E]=e.useState(!1),[k,C]=e.useState(void 0),[S,M]=e.useState(!1),[A,_]=e.useState(null);uj(w,()=>{E(!1)}),e.useEffect(()=>{if(p){const e=c?.flat().find(e=>e.id===p.id);e&&_(e)}},[p]),e.useEffect(()=>{const e=(e=>{const t=[];let n=0;return e.forEach(e=>{let r=0;e.forEach(e=>{t.push({w:e.width?e.width:12,h:e.rows??1,max:12,x:r,y:n,i:e.id}),r+=e.width}),n++}),t})(c??[]);C({lg:e,md:e,sm:e,xs:e,xxs:e})},[c]);const O=e=>{if("image"===e.type)return N(e.imageSetting);if(e.type&&"data"!==e.type||!e.field)return"template"===e.type&&(e.children?.length??0)>0?e.children?.map((e,t)=>r.jsxs("span",{children:[0!==t&&" "," ",O(e)]},`${e.id}-${t}`)):(e.type,e.headerDisplay);{const t=n[e.field];if("number"===e.dataType){const n={thousandSeparator:ey(b?.thousandSeparator??".",b?.decimalSeparator??","),decimalSeparator:ty(b?.thousandSeparator??".",b?.decimalSeparator??","),prefix:b?.prefixNegative,suffix:b?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(t)?gX(t?.toString(),n):0}return"date"===e.dataType?gF(t,e.format):t}},N=e=>r.jsx("img",{src:e?.url??"",style:{height:e?.height??0,width:e?.width??0}});return r.jsx(e.Fragment,{children:r.jsx(aJ,{style:{minHeight:"section"===o?23*s:"unset"},className:"h-100",children:r.jsx("div",{ref:w,className:"h-100",onClick:()=>{E(!0),v?.()},children:k&&c&&c.flat().length>0?r.jsx(WF.exports.Responsive,{className:sj({[`${a.border??"none"}-border`]:a.border}),style:{minHeight:"100%",backgroundColor:h?"#eb461912":void 0,borderColor:d||h?"#eb4619 ":"transparent",borderWidth:1,borderStyle:d||h?"dashed":"solid"},width:(l.width*m-(f.marginLeft+f.marginRight)*m)*i/12-2,layouts:k,isDraggable:x&&h,isResizable:x&&h,rowHeight:23,margin:[0,0],containerPadding:[0,0],compactType:"vertical",autoSize:!0,verticalCompact:!0,breakpoints:{lg:1200,md:1200,sm:1200,xs:1200,xxs:0},cols:{lg:12,md:12,sm:12,xs:12,xxs:12},onDragStart:()=>{M(!0)},onResizeStop:e=>{AF(e,k.lg)||y(e)},onDragStop:e=>{M(!1),AF(e,k.lg)||y(e)},children:c?.flat().map(e=>r.jsx("div",{id:e.id,children:r.jsxs("div",{className:sj("grid-item h-100",{isDrag:S}),style:{textAlign:a.align},children:[((!e.type||"data"===e.type)&&e.field||"template"===e.type)&&(e.headerDisplay.length>0||e.headerText.length>0)&&r.jsx(rJ,{color:u?.color??"#000",fontSize:TF(u?.fontSize??11),underline:!1,bold:!1,fontFamily:u?.fontFamily??"Times New Roman",italic:!1,onClick:()=>{h&&(g?.(e),_(e))},children:e.headerDisplay?`${e.headerDisplay}:`:""}),r.jsx(nJ,{color:e.style?.color??u?.color??"#000",fontSize:TF(e.style?.fontSize??u?.fontSize??11),underline:e.style?.underline??u?.underline??!1,bold:e.style?.bold??u?.bold??!1,fontFamily:e.style?.fontFamily??u?.fontFamily??"Times New Roman",italic:e.style?.italic??u?.italic??!1,isActive:h&&A&&A?.id===e.id,textAlign:e.type&&"data"!==e.type&&a.align?a.align:"left",onClick:()=>{"section"===o&&(g?.(e),_(e))},style:{padding:e.type&&"data"!==e.type||!e.field?"":"0 5px"},children:O(e)})]})},e.id))}):r.jsx("div",{ref:w,onClick:()=>{E(!0)},className:"h-100",style:{height:"100%",backgroundColor:h?"#eb461912":void 0,borderColor:d||h?"#eb4619 ":"transparent",borderWidth:1,borderStyle:d||h?"dashed":"solid"}})})})})}),sJ=tJ.div`
|
|
485
401
|
|
|
486
402
|
.drag-handle {
|
|
487
403
|
display: none;
|
|
@@ -498,7 +414,91 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
498
414
|
}
|
|
499
415
|
}
|
|
500
416
|
}
|
|
501
|
-
`,SJ=t=>{const{layout:n,active:a,selected:i,styles:o,pixelRate:l,pageSetting:s,onClick:c,itemClick:d,onLayoutChange:h,pageSize:u}=t,p=e.useRef(null),f=30,[m,v]=e.useState(!1),[g,b]=e.useState(!1),[y,w]=e.useState(null),[x,E]=e.useState(void 0);return uj(p,()=>{v(!1)}),e.useEffect(()=>{const e=n.signature?.setting?.detail?.map((e,t)=>({x:t*(f/(n.signature?.setting?.detail?.length??0)),y:0,w:f/(n.signature?.setting?.detail?.length??0),h:1,minW:1,minH:1,maxW:12,i:e.code}));E({lg:e,md:e,sm:e,xs:e,xxs:e})},[n.signature?.setting?.detail]),r.jsx(e.Fragment,{children:r.jsx("div",{ref:p,onClick:()=>{v(!0),c?.()},style:{backgroundColor:i?"#eb461912":void 0,borderColor:a||i?"#eb4619":"transparent",borderWidth:1,borderStyle:a||i?"dashed":"solid",minHeight:23},children:x&&n.signature?.setting?.detail&&(n.signature?.setting?.detail?.length??0)>0&&r.jsx(pU.exports.Responsive,{className:"layout grid-layout",style:{},width:u.width*l-(s.marginLeft+s.marginRight)*l,layouts:x,maxRows:1,rowHeight:161,isDraggable:m&&i,isResizable:!1,autoSize:!0,breakpoints:{lg:1200,md:992,sm:768,xs:640,xxs:0},cols:{lg:f,md:f,sm:f,xs:f,xxs:f},margin:[2,2],compactType:"horizontal",containerPadding:[0,0],verticalCompact:!0,onDragStart:()=>{b(!0),v(!0)},onDragStop:e=>{b(!1),h?.(e)},children:n.signature?.setting?.detail?.map(e=>r.jsx("div",{id:e.code,onClick:e=>{e.preventDefault()},children:r.jsxs(CJ,{className:sj("",{active:i,isDrag:g}),onClick:()=>{d?.(e),w(e)},style:{display:"flex",flexDirection:"column",textAlign:"center",justifyContent:"space-between",height:"100%"},children:[r.jsxs("div",{children:[r.jsx(yJ,{color:n.signature?.style?.color??o?.color??"#000",fontSize:TF(n.signature?.style?.fontSize??o?.fontSize??11),underline:n.signature?.style?.underline??o?.underline??!1,bold:n.signature?.style?.bold??o?.bold??!1,fontFamily:n.signature?.style?.fontFamily??o?.fontFamily??"Times New Roman",italic:n.signature?.style?.italic??o?.italic??!1,textAlign:"center",isActive:i&&y&&y?.code===e.code,children:e.title}),r.jsx("br",{}),r.jsx(yJ,{color:n.signature?.style?.color??o?.color??"#000",fontSize:TF(o?.fontSize??11),underline:!1,bold:!1,fontFamily:o?.fontFamily,italic:!0,textAlign:"center",children:"(Ký, họ tên)"})]}),r.jsx("div",{children:r.jsx("p",{style:{margin:0,textAlign:"center"}})})]})},e.code))})})})};function MJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}var AJ;function _J(){}function OJ(e){return!!(e||"").match(/\d/)}function NJ(e){return null==e}function ZJ(e){return NJ(e)||function(e){return"number"==typeof e&&isNaN(e)}(e)||"number"==typeof e&&!isFinite(e)}function DJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function IJ(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:n,addNegation:r}}function HJ(e,t,n){for(var r="",a=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||a;return r}function TJ(e,t){return Array(t+1).join(e)}function LJ(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],i=r[1];if(!(i=Number(i)))return n+a;var o=1+i,l=(a=a.replace(".","")).length;return o<0?a="0."+TJ("0",Math.abs(o))+a:o>=l?a+=TJ("0",o-l):a=(a.substring(0,o)||"0")+"."+a.substring(o),n+a}function PJ(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,a=IJ(e),i=a.beforeDecimal,o=a.afterDecimal,l=a.hasNegation,s=parseFloat("0."+(o||"0")),c=(o.length<=t?"0."+o:s.toFixed(t)).split("."),d=i;return i&&Number(c[0])&&(d=i.split("").reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},c[0])),""+(l?"-":"")+d+(r?".":"")+HJ(c[1]||"",t,n)}function VJ(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}!function(e){e.event="event",e.props="prop"}(AJ||(AJ={}));var BJ=function(e){var t,n=void 0;return function(){for(var r=[],a=arguments.length;a--;)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r))}}(function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:i-r}}});function jJ(e){return Math.max(e.selectionStart,e.selectionEnd)}function zJ(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function RJ(e,t,n,r){var a=e.length;if(t=function(e,t,n){return Math.min(Math.max(e,t),n)}(t,0,a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return-1===t&&(t=a),t}function WJ(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=Boolean(OJ(e[n])||OJ(e[n-1]));return t}function FJ(t,n,r,a,i,o){void 0===o&&(o=_J);var l=function(t){var n=e.useRef(t);n.current=t;var r=e.useRef(function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return n.current.apply(n,e)});return r.current}(function(e,t){var n,r;return ZJ(e)?(r="",n=""):"number"==typeof e||t?(r="number"==typeof e?LJ(e):e,n=a(r)):(r=i(e,void 0),n=a(r)),{formattedValue:n,numAsString:r}}),s=e.useState(function(){return l(NJ(t)?n:t,r)}),c=s[0],d=s[1],h=t,u=r;NJ(t)&&(h=c.numAsString,u=!0);var p=l(h,u);return e.useMemo(function(){d(p)},[p.formattedValue]),[c,function(e,t){e.formattedValue!==c.formattedValue&&d({formattedValue:e.formattedValue,numAsString:e.value}),o(e,t)}]}function qJ(e){return e.replace(/[^0-9]/g,"")}function YJ(e){return e}function UJ(t){var n=t.type;void 0===n&&(n="text");var r=t.displayType;void 0===r&&(r="input");var a=t.customInput,i=t.renderText,o=t.getInputRef,l=t.format;void 0===l&&(l=YJ);var s=t.removeFormatting;void 0===s&&(s=qJ);var c=t.defaultValue,d=t.valueIsNumericString,h=t.onValueChange,u=t.isAllowed,p=t.onChange;void 0===p&&(p=_J);var m=t.onKeyDown;void 0===m&&(m=_J);var v=t.onMouseUp;void 0===v&&(v=_J);var g=t.onFocus;void 0===g&&(g=_J);var b=t.onBlur;void 0===b&&(b=_J);var y=t.value,w=t.getCaretBoundary;void 0===w&&(w=WJ);var x=t.isValidInputCharacter;void 0===x&&(x=OJ);var E=t.isCharacterSame,k=MJ(t,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame"]),C=FJ(y,c,Boolean(d),l,s,h),S=C[0],M=S.formattedValue,A=S.numAsString,_=C[1],O=e.useRef(),N=e.useRef({formattedValue:M,numAsString:A}),Z=function(e,t){N.current={formattedValue:e.formattedValue,numAsString:e.value},_(e,t)},D=e.useState(!1),I=D[0],H=D[1],T=e.useRef(null),L=e.useRef({setCaretTimeout:null,focusTimeout:null});e.useEffect(function(){return H(!0),function(){clearTimeout(L.current.setCaretTimeout),clearTimeout(L.current.focusTimeout)}},[]);var P=l,V=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},B=function(e,t,n){0===e.selectionStart&&e.selectionEnd===e.value.length||(VJ(e,t),L.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&VJ(e,t)},0))},j=function(e,t,n){return RJ(e,t,w(e),n)},z=function(e,t,n){var r=w(t),a=function(e,t,n,r,a,i,o){void 0===o&&(o=zJ);var l=a.findIndex(function(e){return e}),s=e.slice(0,l);t||n.startsWith(s)||(t=s,n=s+n,r+=s.length);for(var c=n.length,d=e.length,h={},u=new Array(c),p=0;p<c;p++){u[p]=-1;for(var f=0,m=d;f<m;f++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:f})&&!0!==h[f]){u[p]=f,h[f]=!0;break}}for(var v=r;v<c&&(-1===u[v]||!i(n[v]));)v++;var g=v===c||-1===u[v]?d:u[v];for(v=r-1;v>0&&-1===u[v];)v--;var b=-1===v||-1===u[v]?0:u[v]+1;return b>g?g:r-b<g-r?b:g}(t,M,e,n,r,x,E);return a=RJ(t,a,r)};e.useEffect(function(){var e=N.current,t=e.formattedValue,n=e.numAsString;M===t&&A===n||Z(V(M,A),{event:void 0,source:AJ.props})},[M,A]);var R=T.current?jJ(T.current):void 0;("undefined"!=typeof window?e.useLayoutEffect:e.useEffect)(function(){var e=T.current;if(M!==N.current.formattedValue&&e){var t=z(N.current.formattedValue,M,R);e.value=M,B(e,t,M)}},[M]);var W=function(e,t,n){var r=t.target,a=O.current?function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}}(O.current,r.selectionEnd):BJ(M,e),i=Object.assign(Object.assign({},a),{lastValue:M}),o=s(e,i),l=P(o);if(o=s(l,void 0),u&&!u(V(l,o))){var c=t.target,d=jJ(c),h=z(e,M,d);return c.value=M,B(c,h,M),!1}return function(e){var t=e.formattedValue;void 0===t&&(t="");var n,r=e.input,a=e.source,i=e.event,o=e.numAsString;if(r){var l=e.inputValue||r.value,s=jJ(r);r.value=t,void 0!==(n=z(l,t,s))&&B(r,n,t)}t!==M&&Z(V(t,o),{event:i,source:a})}({formattedValue:l,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},F=function(e,t){void 0===t&&(t=0);var n=e.selectionStart,r=e.selectionEnd;O.current={selectionStart:n,selectionEnd:r+t}},q=!I||"undefined"==typeof navigator||navigator.platform&&/iPhone|iPod/.test(navigator.platform)?void 0:"numeric",Y=Object.assign({inputMode:q},k,{type:n,value:M,onChange:function(e){var t=e.target.value;W(t,e,AJ.event)&&p(e),O.current=void 0},onKeyDown:function(e){var t,n=e.target,r=e.key,a=n.selectionStart,i=n.selectionEnd,o=n.value;void 0===o&&(o=""),"ArrowLeft"===r||"Backspace"===r?t=Math.max(a-1,0):"ArrowRight"===r?t=Math.min(a+1,o.length):"Delete"===r&&(t=a);var l=0;"Delete"===r&&a===i&&(l=1);var s="ArrowLeft"===r||"ArrowRight"===r;if(void 0===t||a!==i&&!s)return m(e),void F(n,l);var c=t;s?(c=j(o,t,"ArrowLeft"===r?"left":"right"))!==t&&e.preventDefault():"Delete"!==r||x(o[t])?"Backspace"!==r||x(o[t])||(c=j(o,t,"left")):c=j(o,t,"right");c!==t&&B(n,c,o),m(e),F(n,l)},onMouseUp:function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(void 0===r&&(r=""),e===n){var a=j(r,e);a!==e&&B(t,a,r)}};n(),requestAnimationFrame(function(){n()}),v(e),F(t)},onFocus:function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;T.current=t,L.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,a=t.selectionEnd,i=t.value;void 0===i&&(i="");var o=j(i,r);o===r||0===r&&a===i.length||B(t,o,i),g(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},onBlur:function(e){T.current=null,clearTimeout(L.current.focusTimeout),clearTimeout(L.current.setCaretTimeout),b(e)}});if("text"===r)return i?f.default.createElement(f.default.Fragment,null,i(M,k)||null):f.default.createElement("span",Object.assign({},k,{ref:o}),M);if(a){var U=a;return f.default.createElement(U,Object.assign({},Y,{ref:o}))}return f.default.createElement("input",Object.assign({},Y,{ref:o}))}function GJ(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix;void 0===a&&(a="");var i=t.suffix;void 0===i&&(i="");var o=t.allowNegative,l=t.thousandsGroupStyle;if(void 0===l&&(l="thousand"),""===e||"-"===e)return e;var s=XJ(t),c=s.thousandSeparator,d=s.decimalSeparator,h=0!==n&&-1!==e.indexOf(".")||n&&r,u=IJ(e,o),p=u.beforeDecimal,f=u.afterDecimal,m=u.addNegation;return void 0!==n&&(f=HJ(f,n,!!r)),c&&(p=function(e,t,n){var r=function(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}(n),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}(p,c,l)),a&&(p=a+p),i&&(f+=i),m&&(p="-"+p),e=p+(h&&d||"")+f}function XJ(e){var t=e.decimalSeparator;void 0===t&&(t=".");var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return!0===n&&(n=","),r||(r=[t,"."]),{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function KJ(e,t,n){var r;void 0===t&&(t=function(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}(e));var a=n.allowNegative,i=n.prefix;void 0===i&&(i="");var o=n.suffix;void 0===o&&(o="");var l=n.decimalScale,s=t.from,c=t.to,d=c.start,h=c.end,u=XJ(n),p=u.allowedDecimalSeparators,f=u.decimalSeparator,m=e[h]===f;if(OJ(e)&&(e===i||e===o)&&""===t.lastValue)return e;if(h-d===1&&-1!==p.indexOf(e[d])){var v=0===l?"":f;e=e.substring(0,d)+v+e.substring(d+1,e.length)}var g=function(e,t,n){var r=!1,a=!1;i.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,a=!0):o.startsWith("-")&&e.length===o.length?r=!1:"-"===e[0]&&(r=!0);var l=r?1:0;return a&&(l=2),l&&(e=e.substring(l),t-=l,n-=l),{value:e,start:t,end:n,hasNegation:r}},b=g(e,d,h),y=b.hasNegation;e=(r=b).value,d=r.start,h=r.end;var w=g(t.lastValue,s.start,s.end),x=w.start,E=w.end,k=w.value,C=e.substring(d,h);!(e.length&&k.length&&(x>k.length-o.length||E<i.length))||C&&o.startsWith(C)||(e=k);var S=0;e.startsWith(i)?S+=i.length:d<i.length&&(S=d),h-=S;var M=(e=e.substring(S)).length,A=e.length-o.length;e.endsWith(o)?M=A:(h>A||h>e.length-o.length)&&(M=h),e=e.substring(0,M),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-"+e),e}(y?"-"+e:e,a),e=(e.match(function(e,t){return new RegExp("(^-)|[0-9]|"+DJ(e),t?"g":void 0)}(f,!0))||[]).join("");var _=e.indexOf(f);e=e.replace(new RegExp(DJ(f),"g"),function(e,t){return t===_?".":""});var O=IJ(e,a),N=O.beforeDecimal,Z=O.afterDecimal,D=O.addNegation;return c.end-c.start<s.end-s.start&&""===N&&m&&!parseFloat(Z)&&(e=D?"-":""),e}function JJ(e){e=function(e){var t=XJ(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix;void 0===a&&(a="");var i=e.allowNegative;if(void 0===i&&(i=!0),n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: "+n+' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: '+r+" (default value for decimalSeparator is .)\n ");return a.startsWith("-")&&i&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: "+a+"\n allowNegative: "+i+"\n "),i=!1),Object.assign(Object.assign({},e),{allowNegative:i})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown;void 0===a&&(a=_J);var i=e.onBlur;void 0===i&&(i=_J);var o=e.thousandSeparator,l=e.decimalScale,s=e.fixedDecimalScale,c=e.prefix;void 0===c&&(c="");var d=e.defaultValue,h=e.value,u=e.valueIsNumericString,p=e.onValueChange,f=MJ(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),m=XJ(e),v=m.decimalSeparator,g=m.allowedDecimalSeparators,b=function(t){return GJ(t,e)},y=function(t,n){return KJ(t,n,e)},w=NJ(h)?d:h,x=null!=u?u:function(e,t,n){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==n?void 0:n.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(w,c,t);NJ(h)?NJ(d)||(x=x||"number"==typeof d):x=x||"number"==typeof h;var E=function(e){return ZJ(e)?e:("number"==typeof e&&(e=LJ(e)),x&&"number"==typeof l?PJ(e,l,Boolean(s)):e)},k=FJ(E(h),E(d),Boolean(x),b,y,p),C=k[0],S=C.numAsString,M=C.formattedValue,A=k[1];return Object.assign(Object.assign({},f),{value:M,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===v||OJ(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,a=e.currentValueIndex,i=e.formattedValueIndex,o=t[a],d=r[i],u=BJ(n,t).to,p=function(e){return y(e).indexOf(".")+c.length};return!(0===h&&s&&l&&t[u.start]===v&&p(t)<a&&p(r)>i)&&(!!(a>=u.start&&a<u.end&&g&&g.includes(o)&&d===v)||o===d)},onValueChange:A,format:b,removeFormatting:y,getCaretBoundary:function(t){return function(e,t){var n=t.prefix;void 0===n&&(n="");var r=t.suffix;void 0===r&&(r="");var a=Array.from({length:e.length+1}).map(function(){return!0}),i="-"===e[0];a.fill(!1,0,n.length+(i?1:0));var o=e.length;return a.fill(!1,o-r.length+1,o+1),a}(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,i=t.selectionStart,d=t.selectionEnd,h=t.value;if(void 0===h&&(h=""),("Backspace"===r||"Delete"===r)&&d<c.length)e.preventDefault();else if(i===d){"Backspace"===r&&"-"===h[0]&&i===c.length+1&&n&&VJ(t,1),l&&s&&("Backspace"===r&&h[i-1]===v?(VJ(t,i-1),e.preventDefault()):"Delete"===r&&h[i]===v&&e.preventDefault()),(null==g?void 0:g.includes(r))&&h[i]===v&&VJ(t,i+1);var u=!0===o?",":o;"Backspace"===r&&h[i-1]===u&&VJ(t,i-1),"Delete"===r&&h[i]===u&&VJ(t,i+1),a(e)}else a(e)},onBlur:function(t){var n=S;if(n.match(/\d/g)||(n=""),r||(n=function(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return(t?"-":"")+r+(a?"."+a:"")}(n)),s&&l&&(n=PJ(n,l,s)),n!==S){var a=GJ(n,e);A({formattedValue:a,value:n,floatValue:parseFloat(n)},{event:t,source:AJ.event})}i(t)}})}function QJ(e){var t=JJ(e);return f.default.createElement(UJ,Object.assign({},t))}const $J=e.memo(t=>{const{dataItem:n,sectionData:a,width:i,typeEdit:o,pageSize:l,rows:s,content:c,active:d,selected:h,styles:u,currentItem:p,pageSetting:f,pixelRate:m,onClick:v,itemClick:g,formatNumber:b,onLayoutChange:y,organization:w}=t,x=e.useRef(null),[E,k]=e.useState(!1),[C,S]=e.useState(void 0),[M,A]=e.useState(!1),[_,O]=e.useState(null);uj(x,()=>{k(!1)}),e.useEffect(()=>{if(p){const e=c?.flat().find(e=>e.id===p.id);e&&O(e)}},[p]),e.useEffect(()=>{const e=(e=>{const t=[];let n=0;return e.forEach(e=>{let r=0;e.forEach(e=>{t.push({w:e.width?e.width:12,h:e.rows??1,max:12,x:r,y:n,i:e.id}),r+=e.width}),n++}),t})(c??[]);S({lg:e,md:e,sm:e,xs:e,xxs:e})},[c]);const N=e=>{if("image"===e.type)return Z(e.imageSetting);if((!e.type||"data"===e.type)&&e.field){const t=n[e.field];if("number"===e.dataType){const n={thousandSeparator:ey(b?.thousandSeparator??".",b?.decimalSeparator??","),decimalSeparator:ty(b?.thousandSeparator??".",b?.decimalSeparator??","),prefix:b?.prefixNegative,suffix:b?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(t)?GJ(t?.toString(),n):0}return"date"===e.dataType?gF(t,e.format):t}if("template"===e.type&&(e.children?.length??0)>0)return e.children?.map((e,t)=>r.jsxs("span",{children:[0!==t&&" "," ",N(e)]},`${e.id}-${t}`));switch(e.type){case"currentDate":return gF(new Date,e.format);case"companyName":return w.name;case"companyAddress":return w.address;default:return e.headerDisplay}},Z=e=>r.jsx("img",{src:e?.url??"",style:{height:e?.height??0,width:e?.width??0}});return r.jsx(e.Fragment,{children:r.jsx(xJ,{style:{minHeight:"section"===o?23*s:"unset"},className:"h-100",children:r.jsx("div",{ref:x,className:"h-100",onClick:()=>{k(!0),v?.()},children:C&&c&&c.flat().length>0?r.jsx(pU.exports.Responsive,{className:sj({[`${a.border??"none"}-border`]:a.border}),style:{minHeight:"100%",backgroundColor:h?"#eb461912":void 0,borderColor:d||h?"#eb4619 ":"transparent",borderWidth:1,borderStyle:d||h?"dashed":"solid"},width:(l.width*m-(f.marginLeft+f.marginRight)*m)*i/12-2,layouts:C,isDraggable:E&&h,isResizable:E&&h,rowHeight:23,margin:[0,0],containerPadding:[0,0],compactType:"vertical",autoSize:!0,verticalCompact:!0,breakpoints:{lg:1200,md:1200,sm:1200,xs:1200,xxs:0},cols:{lg:12,md:12,sm:12,xs:12,xxs:12},onDragStart:()=>{A(!0)},onResizeStop:e=>{AF(e,C.lg)||y(e)},onDragStop:e=>{A(!1),AF(e,C.lg)||y(e)},children:c?.flat().map(e=>r.jsx("div",{id:e.id,children:r.jsxs("div",{className:sj("grid-item h-100",{isDrag:M}),style:{textAlign:a.align},children:[((!e.type||"data"===e.type)&&e.field||"template"===e.type)&&(e.headerDisplay.length>0||e.headerText.length>0)&&r.jsx(wJ,{color:u?.color??"#000",fontSize:TF(u?.fontSize??11),underline:!1,bold:!1,fontFamily:u?.fontFamily??"Times New Roman",italic:!1,onClick:()=>{h&&(g?.(e),O(e))},children:e.headerDisplay?`${e.headerDisplay}:`:""}),r.jsx(yJ,{color:e.style?.color??u?.color??"#000",fontSize:TF(e.style?.fontSize??u?.fontSize??11),underline:e.style?.underline??u?.underline??!1,bold:e.style?.bold??u?.bold??!1,fontFamily:e.style?.fontFamily??u?.fontFamily??"Times New Roman",italic:e.style?.italic??u?.italic??!1,isActive:h&&_&&_?.id===e.id,textAlign:e.type&&"data"!==e.type&&a.align?a.align:"left",onClick:()=>{"section"===o&&(g?.(e),O(e))},style:{padding:e.type&&"data"!==e.type||!e.field?"":"0 5px"},children:N(e)})]})},e.id))}):r.jsx("div",{ref:x,onClick:()=>{k(!0)},className:"h-100",style:{height:"100%",backgroundColor:h?"#eb461912":void 0,borderColor:d||h?"#eb4619 ":"transparent",borderWidth:1,borderStyle:d||h?"dashed":"solid"}})})})})}),eQ=t=>{const{pageSize:n,setting:a,setSetting:i,dataItem:o,currentLayout:l,setCurrentLayout:s,onSetConfig:c,formatNumber:d,currentItem:h,setCurrentItem:u,organization:p}=t,{t:f}=dc(),m=37.7,v=e=>{c(l?.table?.[e])},g=(e,t)=>{u(e),c(e?.style,t)};return r.jsx(e.Fragment,{children:r.jsx("div",{className:"layout grid-layout align-content-start",style:{minHeight:(n.height-a.pageSetting.marginTop-a.pageSetting.marginBottom)*m,zIndex:2,position:"relative"},children:a?.layout?.map((e,t)=>r.jsx(uP,{className:"m-0",style:{minHeight:23,paddingBottom:a.pageSetting?.spaceLayout??0},children:e.map(e=>"table"===e.type?r.jsx(xP,{id:`${t+1}`,className:sj("p-0",{}),children:r.jsx(uU,{typeEdit:"section",layout:e,styles:a?.style,dataTable:o[e.table?.field??""]??[],onClick:()=>s(e),currentLayout:l,onSectionClick:v,formatNumber:d,t:f,currentItem:h,setCurrentItem:u})},e.id):"signature"===e.type?r.jsx("div",{id:`${t+1}`,className:sj("p-0",{}),children:r.jsx(SJ,{pixelRate:m,pageSize:n,pageSetting:a.pageSetting,layout:e,styles:a?.style,active:!1,onClick:()=>{s(e)},itemClick:t=>g(t,e),selected:l?.id===e.id,onLayoutChange:t=>{const n=((e,t)=>{const n=e.reduce((e,t)=>(e[t.i]=t,e),{});return t.sort((e,t)=>{const r=n[e.code],a=n[t.code];return r.y===a.y?r.x-a.x:r.y-a.y})})(t,e.signature?.setting.detail??[]);(e=>{const t=LF([...a.layout],e),n={...a,layout:t};i({...n})})({...e,signature:{...e.signature,setting:{...e.signature?.setting,detail:n}}})}})},e.id):r.jsx(xP,{id:e.id,className:sj("p-0",{}),xs:e.width,children:r.jsx($J,{sectionData:e,typeEdit:"section",width:e.width,pageSize:n,rows:e.rows??1,pageSetting:a.pageSetting,pixelRate:m,dataItem:o,content:e.children??[],styles:a?.style,formatNumber:d,currentItem:h,active:!1,selected:l?.id===e.id,onClick:()=>{s(e)},organization:p,itemClick:t=>g(t,e),onLayoutChange:t=>{const n=_F(t).sort((e,t)=>e[0].y-t[0].y),r=((e,t)=>{const n=t.flat();return e.map(e=>(e.length>1?e?.sort((e,t)=>e.x-t.x):e).map(e=>{const t=n.find(t=>t&&t.id===e.i);return t?{...t,id:e.i,width:e.w,rows:e.h,...t.align?{align:t.align}:{}}:{width:e.w,type:"blank",children:[[{headerText:"",headerDisplay:"",field:"",type:"text",style:{fontSize:12,bold:!1}}]],id:e.i,i:e.i,rows:e.h}}))})(n,e.children??[]),o={...e,rows:Math.max(...r.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:r},l=LF([...a.layout],o),s={...a,layout:l};i({...s})}})},e.id))},`${e.id}-${t}`))})})},tQ=t=>{const{pageSize:n,setting:a,layouts:i,setLayouts:o,setSetting:l,dataItem:s,currentLayout:c,setCurrentLayout:d,onSetConfig:h,formatNumber:u,currentLayoutHover:p,currentItem:f,setCurrentLayoutHover:m,currentDimensions:v,organization:g}=t,{t:b}=dc(),y=37.7,w=e=>{h(c?.table?.[e])},x=e=>{const t=i.lg.filter(t=>t.i!==e.id);if(0===t.length){const e=mF();t.push({id:e,i:e,max:12,x:0,y:1,static:!0,h:1,w:12,type:"content",rows:1,children:[]})}const n=PF(_F(t),a.layout),r={...a,layout:n};l({...r});const s=DF(n??[]);o({lg:s,md:s,sm:s,xs:s,xxs:s})};return r.jsx(e.Fragment,{children:r.jsx(pU.exports.Responsive,{className:"layout grid-layout d-flex flex-wrap align-content-start",style:{minHeight:(n.height-a.pageSetting.marginTop-a.pageSetting.marginBottom)*y,height:"auto",zIndex:2,position:"relative"},width:n.width*y-(a.pageSetting.marginLeft+a.pageSetting.marginRight)*y,layouts:i,isDraggable:!0,isResizable:!0,rowHeight:23,margin:[0,(a.pageSetting?.spaceLayout??0)/2],compactType:"vertical",containerPadding:[0,0],verticalCompact:!0,autoSize:!1,breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:12,sm:12,xs:12,xxs:12},isBounded:!0,isDroppable:!0,onDrop:(e,t)=>((e,t)=>{const n=[...a.layout],r=mF(),s=i.lg.map(e=>({...e,y:e.y>=t.y?e.y+1:e.y})),c=_F(s.concat({...t,w:v.w,i:r})).sort((e,t)=>e[0].y-t[0].y),d=function(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(t.push(r),n>0){const a=r[0].y,i=e[n-1],o=a-(i[0].y+i[0].h);if(o>0)for(let e=0;e<o;e++)t.splice(n+e,0,[])}}return t}(c),h={id:r,i:r,width:12,w:12,type:v.type,rows:1,children:[]};"table"===v.type?h.table={columns:[],header:{},content:{},summary:{},fieldSums:[]}:"signature"===v.type&&(h.signature={setting:"",reportSigning:1,loginSigning:1,detail:[]});const u=[...n,[h]];o({lg:d.flat(),md:d.flat(),sm:d.flat(),xs:d.flat(),xxs:d.flat()});const p=PF(d,u),f={...a,layout:p};l(f)})(0,t),onDragStart:()=>{},onResizeStop:(e,t,n)=>{if(!AF(e,i.lg)){const t=e.map(e=>({...e,h:e.y===n.y?n.h:e.h}));o({lg:t,md:t,sm:t,xs:t,xxs:t})}},onDragStop:e=>{if(!AF(e,i.lg)){const t=_F(e).sort((e,t)=>e[0].y-t[0].y);o({lg:t.flat(),md:t.flat(),sm:t.flat(),xs:t.flat(),xxs:t.flat()}),l({...a,layout:PF(t,a.layout)})}},children:a?.layout.flat().map((e,t)=>"table"===e.type?r.jsxs("div",{id:`${t+1}`,className:sj("",{}),children:[r.jsx(uU,{typeEdit:"layout",layout:e,styles:a?.style,dataTable:s[e.table?.field??""]??[],onClick:()=>{d(e)},currentLayout:c,onSectionClick:w,formatNumber:u,currentItem:f,setCurrentItem:()=>{},t:b}),r.jsx("div",{className:sj("remove",{}),onClick:()=>x(e),children:r.jsx(ud,{fontSize:14,color:"red"})})]},`${e.id}`):"signature"===e.type?r.jsxs("div",{id:`${t+1}`,children:[r.jsx(SJ,{pixelRate:y,pageSetting:a.pageSetting,pageSize:n,layout:e,styles:a?.style,active:!0,onClick:()=>{d(e)},selected:!1}),r.jsx("div",{className:sj("remove",{}),onClick:()=>x(e),children:r.jsx(ud,{fontSize:14,color:"red"})})]},e.id):r.jsxs("div",{id:e.id,children:[r.jsx($J,{sectionData:e,typeEdit:"layout",width:e.width,pageSize:n,rows:e.rows,pageSetting:a.pageSetting,pixelRate:y,dataItem:s,content:e.children,styles:a?.style,currentItem:f,formatNumber:u,onLayoutChange:()=>{},organization:g,active:!0,selected:!1,onClick:()=>{h({textAlign:e.align}),d(e)}}),r.jsx("div",{className:sj("remove",{}),onClick:()=>x(e),onMouseEnter:()=>{e.id!==p?.id&&m(e)},onMouseLeave:()=>{m(null)},children:r.jsx(ud,{fontSize:14,color:"red"})})]},e.id))})})};RF(".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}");const nQ=t=>{const{iconName:n,size:a}=t;if(""===n)return null;{const t=""===n?"":pd[n];return r.jsx(e.Fragment,{children:""===n?"":r.jsx(t,{fontSize:a})})}},rQ=t=>{const{item:n,currentItem:a,currentLayout:i,handleUpdateLayout:o}=t,{innerWidth:l}=window,{t:s}=dc(),c=e=>{if((!i?.children||!a?.id)&&o)return void o(e);const t=OF(i.children,a.id,"format",e),n={...a,children:t};o(n)};return r.jsx(e.Fragment,{children:r.jsxs(ej,{tag:"div",children:[r.jsx($P,{tag:"div",children:r.jsx(Bc,{fontSize:18,className:"ms-50 cursor-pointer text-primary"})}),r.jsxs(XP,{className:"formula-dropdown icon-dropdown p-50",style:{width:400,maxWidth:l>1280?1280:l,borderRadius:8},children:[r.jsx(yB,{id:`input-${n.id}`,defaultValue:n.format??"",onBlur:e=>{c(e.target.value)}}),r.jsxs("div",{className:"border my-25 d-flex text-primary rounded",children:[r.jsxs("div",{className:"ps-50",style:{flex:1},children:[r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("dd/MM/yyyy")},children:"dd/MM/yyyy"})]}),r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("dd/MM/yyyy HH:mm")},children:"dd/MM/yyyy HH:mm"})]}),r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("Ngày dd Tháng MM Năm yyyy")},children:"Ngày dd Tháng MM Năm yyyy"})]})]}),r.jsxs("ul",{style:{width:140},className:"me-50 mb-0 border-start",children:[r.jsxs("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:["dd: ",s("Day")]}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"MM: Tháng"}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"yyyy: Năm"}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"HH: Giờ"}),r.jsx("li",{className:"ps-25 ms-50 mb-0 fw-bold",children:"mm: Phút"})]})]})]})]})})},aQ=t=>{const{options:n,currentItem:a,currentLayout:i,handleUpdateLayout:o,formatNumber:l,organization:s,dataItem:c}=t,{innerHeight:d}=window,[h,u]=e.useState(!1),[p,f]=e.useState([]),{t:m}=dc();e.useEffect(()=>{h&&(a?.children&&(a.children=[]),f(a.children))},[h]);const v=e=>{if((!e.type||"data"===e.type)&&e.field){const t=c[e.field];if("number"===e.dataType){const n={thousandSeparator:bF(l?.thousandSeparator??".",l?.decimalSeparator??","),decimalSeparator:yF(l?.thousandSeparator??".",l?.decimalSeparator??","),prefix:l?.prefixNegative,suffix:l?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(t)?GJ(t?.toString(),n):0}return"date"===e.dataType?gF(t,e.format):t}switch(e.type){case"currentDate":return gF(new Date,e.format);case"companyName":return s.name;case"companyAddress":return s.address;default:return e.headerDisplay}};return r.jsxs(e.Fragment,{children:[r.jsx(Bc,{fontSize:20,className:"ms-50 cursor-pointer text-primary",onClick:()=>u(!0)}),r.jsxs(eB,{className:"modal-dialog-centered modal-md",toggle:()=>{u(!1)},isOpen:h,children:[r.jsx(jF,{typeModal:"Edit",handleModal:()=>u(!1),title:"Chỉnh sửa khối văn bản",className:"mb-50 py-50"}),r.jsx(x.default,{autoHeight:!0,autoHeightMax:d-120,children:r.jsx(aB,{children:r.jsxs("div",{className:"box form-box__border d-flex flex-column rounded",children:[r.jsx("div",{className:"box form-box__border d-flex flex-column mb-1 rounded",children:r.jsx("span",{children:p.map((e,t)=>r.jsxs("span",{children:[0!==t&&" "," ",v(e)]},`${e.id}-${t}`))})}),r.jsxs("div",{className:"d-flex align-items-center px-25",children:[r.jsx("div",{className:"d-flex gap-75",style:{flex:1},children:r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"})}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40}})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:p??[],handle:".drag-icon",className:"",setList:e=>{f(e)},children:p.map((e,t)=>r.jsxs("div",{className:sj("sortable-item d-flex align-items-center py-50",{}),children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,flex:1,backgroundColor:"#f4f5f8"},children:e.headerText}),r.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[("date"===e.dataType||"currentDate"===e.type)&&r.jsx(r.Fragment,{children:r.jsx(rQ,{item:e,handleUpdateLayout:t=>((e,t)=>{const n=p.find(t=>t.id===e.id);n&&(n.format=t,f([...p]))})(e,t)})}),("text"===e.type||!e.type)&&r.jsx(yB,{value:e.headerDisplay,style:{fontSize:13},onChange:t=>((e,t)=>{const n=p.find(t=>t.id===e.id);n&&(n.headerDisplay=t,f([...p]))})(e,t.target.value)})]})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>{var t;t=e,f(p.filter(e=>e.id!==t.id))},fontSize:16,color:"red"})})]},`${e.id}-${t}`))}),r.jsx("div",{style:{fontSize:13,marginTop:10},children:r.jsx(dy,{options:n,value:void 0,placeholder:"Chọn thêm thông tin",fieldLabel:"headerText",onChange:e=>{(e=>{let t,n="";"companyName"===e.type?n=s.name:"companyAddress"===e.type?n=s.address:"image"===e.type?t={height:20,url:"",width:20}:e.type&&"data"!==e.type||(n=e.headerText),f([...p,{id:mF(),headerText:e.headerText,headerDisplay:n,imageSetting:t,field:e.field,format:e.format,dataType:e.dataType,rows:1,type:e.type??"data",style:{fontSize:12,bold:!1}}])})(e)}})})]})})}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",onClick:()=>{if(!i?.children)return;if(!a?.id)return;const e=OF(i.children,a.id,"children",p),t={...a,children:e};o(t),u(!1)},className:"me-1",children:m("Save")}),r.jsx(_P,{color:"secondary",onClick:()=>u(!1),outline:!0,className:"me-1",children:m("Close")})]})]})]})},iQ=t=>{const{min:n,max:a,errors:i,disabled:o,placeholder:l,onChange:s,fractionCurrency:c,thousandSeparator:d,decimalSeparator:h,value:u,unitString:p,style:f,allowNegative:m}=t;let v=parseFloat(u?.toString());const g={value:cj(u)?"":u,thousandSeparator:bF(d,h),decimalSeparator:yF(d,h),allowNegative:m??!1,decimalScale:c??0,fixedDecimalScale:!1};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"d-flex align-items-center",children:[r.jsx(QJ,{...g,style:f,className:sj("form-control text-right",{"is-invalid":i}),onValueChange:e=>{v=e?.floatValue;const t=e?.value.split(".")[1];s(t?parseFloat(e?.value).toFixed(t.length):e?.floatValue)},onFocus:e=>{e.target.setSelectionRange(0,e.target.innerText.length-1)},onBlur:()=>{s(a&&v>a?a:n&&v<n?n:v??0)},placeholder:l,disabled:o}),r.jsx("span",{className:"ms-25 fs-5",children:p})]})})},oQ=kY.div`
|
|
417
|
+
`,cJ=t=>{const{layout:n,active:a,dataItem:i,selected:o,styles:l,pixelRate:s,pageSetting:c,onClick:d,itemClick:h,onLayoutChange:u,pageSize:p}=t,f=e.useRef(null),m=30,[v,g]=e.useState(!1),[b,y]=e.useState(!1),[w,x]=e.useState(null),[E,k]=e.useState(void 0);return uj(f,()=>{g(!1)}),e.useEffect(()=>{const e=n.signature?.setting?.detail?.map((e,t)=>({x:t*(m/(n.signature?.setting?.detail?.length??0)),y:0,w:m/(n.signature?.setting?.detail?.length??0),h:1,minW:1,minH:1,maxW:12,i:e.code}));k({lg:e,md:e,sm:e,xs:e,xxs:e})},[n.signature?.setting?.detail]),r.jsx(e.Fragment,{children:r.jsx("div",{ref:f,onClick:()=>{g(!0),d?.()},style:{backgroundColor:o?"#eb461912":void 0,borderColor:a||o?"#eb4619":"transparent",borderWidth:1,borderStyle:a||o?"dashed":"solid",minHeight:23},children:E&&n.signature?.setting?.detail&&(n.signature?.setting?.detail?.length??0)>0&&r.jsx(WF.exports.Responsive,{className:"layout grid-layout",style:{},width:p.width*s-(c.marginLeft+c.marginRight)*s,layouts:E,maxRows:1,rowHeight:161,isDraggable:v&&o,isResizable:!1,autoSize:!0,breakpoints:{lg:1200,md:992,sm:768,xs:640,xxs:0},cols:{lg:m,md:m,sm:m,xs:m,xxs:m},margin:[2,2],compactType:"horizontal",containerPadding:[0,0],verticalCompact:!0,onDragStart:()=>{y(!0),g(!0)},onDragStop:e=>{y(!1),u?.(e)},children:n.signature?.setting?.detail?.map(e=>r.jsx("div",{id:e.code,onClick:e=>{e.preventDefault()},children:r.jsxs(sJ,{className:sj("",{active:o,isDrag:b}),onClick:()=>{h?.(e),x(e)},style:{display:"flex",flexDirection:"column",textAlign:"center",justifyContent:"space-between",height:"100%"},children:[r.jsxs("div",{children:[r.jsx(nJ,{color:n.signature?.style?.color??l?.color??"#000",fontSize:TF(n.signature?.style?.fontSize??l?.fontSize??11),underline:n.signature?.style?.underline??l?.underline??!1,bold:n.signature?.style?.bold??l?.bold??!1,fontFamily:n.signature?.style?.fontFamily??l?.fontFamily??"Times New Roman",italic:n.signature?.style?.italic??l?.italic??!1,textAlign:"center",isActive:o&&w&&w?.code===e.code,children:e.title}),r.jsx("br",{}),r.jsx(nJ,{color:n.signature?.style?.color??l?.color??"#000",fontSize:TF(l?.fontSize??11),underline:!1,bold:!1,fontFamily:l?.fontFamily,italic:!0,textAlign:"center",children:"Director"===e.code?"(Ký, họ tên, đóng dấu)":"(Ký, họ tên)"})]}),r.jsx("div",{children:r.jsx(nJ,{color:n.signature?.style?.color??l?.color??"#000",fontSize:TF(n.signature?.style?.fontSize??l?.fontSize??11),underline:n.signature?.style?.underline??l?.underline??!1,bold:n.signature?.style?.bold??l?.bold??!1,fontFamily:n.signature?.style?.fontFamily??l?.fontFamily??"Times New Roman",italic:n.signature?.style?.italic??l?.italic??!1,textAlign:"center",isActive:o&&w&&w?.code===e.code,children:e.isSignForm?i[e.code]:e.name})})]})},e.code))})})})};var dJ,hJ={};Object.defineProperty(hJ,"__esModule",{value:!0});var uJ=f.default;var pJ,fJ=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(uJ),mJ=function(){return mJ=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},mJ.apply(this,arguments)};function vJ(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}function gJ(){}function bJ(e){var t,n=void 0;return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})?n:(t=r,n=e.apply(void 0,r))}}function yJ(e){return!!(e||"").match(/\d/)}function wJ(e){return null==e}function xJ(e){return"number"==typeof e&&isNaN(e)}function EJ(e){return wJ(e)||xJ(e)||"number"==typeof e&&!isFinite(e)}function kJ(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,"\\$&")}function CJ(e){switch(e){case"lakh":return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case"wan":return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function SJ(e,t,n){var r=CJ(n),a=e.search(/[1-9]/);return a=-1===a?e.length:a,e.substring(0,a)+e.substring(a,e.length).replace(r,"$1"+t)}function MJ(e){var t=uJ.useRef(e);t.current=e;var n=uJ.useRef(function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.current.apply(t,e)});return n.current}function AJ(e,t){void 0===t&&(t=!0);var n="-"===e[0],r=n&&t,a=(e=e.replace("-","")).split(".");return{beforeDecimal:a[0],afterDecimal:a[1]||"",hasNegation:n,addNegation:r}}function _J(e){if(!e)return e;var t="-"===e[0];t&&(e=e.substring(1,e.length));var n=e.split("."),r=n[0].replace(/^0+/,"")||"0",a=n[1]||"";return"".concat(t?"-":"").concat(r).concat(a?".".concat(a):"")}function OJ(e,t,n){for(var r="",a=n?"0":"",i=0;i<=t-1;i++)r+=e[i]||a;return r}function NJ(e,t){return Array(t+1).join(e)}function ZJ(e){var t=e+"",n="-"===t[0]?"-":"";n&&(t=t.substring(1));var r=t.split(/[eE]/g),a=r[0],i=r[1];if(!(i=Number(i)))return n+a;var o=1+i,l=(a=a.replace(".","")).length;return o<0?a="0."+NJ("0",Math.abs(o))+a:o>=l?a+=NJ("0",o-l):a=(a.substring(0,o)||"0")+"."+a.substring(o),n+a}function DJ(e,t,n){if(-1!==["","-"].indexOf(e))return e;var r=(-1!==e.indexOf(".")||n)&&t,a=AJ(e),i=a.beforeDecimal,o=a.afterDecimal,l=a.hasNegation,s=parseFloat("0.".concat(o||"0")),c=(o.length<=t?"0.".concat(o):s.toFixed(t)).split("."),d=i;i&&Number(c[0])&&(d=i.split("").reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},c[0]));var h=OJ(c[1]||"",t,n),u=r?".":"";return"".concat(l?"-":"").concat(d).concat(u).concat(h)}function IJ(e,t){if(e.value=e.value,null!==e){if(e.createTextRange){var n=e.createTextRange();return n.move("character",t),n.select(),!0}return e.selectionStart||0===e.selectionStart?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.event="event",e.props="prop"}(pJ||(pJ={}));var HJ=bJ(function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{from:{start:n,end:a-r},to:{start:n,end:i-r}}});function TJ(e,t,n){return Math.min(Math.max(e,t),n)}function LJ(e){return Math.max(e.selectionStart,e.selectionEnd)}function PJ(){return"undefined"!=typeof navigator&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function VJ(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:""}}function BJ(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,a=e.formattedValueIndex;return t[r]===n[a]}function jJ(e,t,n,r,a,i,o){void 0===o&&(o=BJ);var l=a.findIndex(function(e){return e}),s=e.slice(0,l);t||n.startsWith(s)||(t=s,n=s+n,r+=s.length);for(var c=n.length,d=e.length,h={},u=new Array(c),p=0;p<c;p++){u[p]=-1;for(var f=0,m=d;f<m;f++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:f})&&!0!==h[f]){u[p]=f,h[f]=!0;break}}for(var v=r;v<c&&(-1===u[v]||!i(n[v]));)v++;var g=v===c||-1===u[v]?d:u[v];for(v=r-1;v>0&&-1===u[v];)v--;var b=-1===v||-1===u[v]?0:u[v]+1;return b>g?g:r-b<g-r?b:g}function zJ(e,t,n,r){var a=e.length;if(t=TJ(t,0,a),"left"===r){for(;t>=0&&!n[t];)t--;-1===t&&(t=n.indexOf(!0))}else{for(;t<=a&&!n[t];)t++;t>a&&(t=n.lastIndexOf(!0))}return-1===t&&(t=a),t}function RJ(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=Boolean(yJ(e[n])||yJ(e[n-1]));return t}function WJ(e,t,n,r,a,i){void 0===i&&(i=gJ);var o=MJ(function(e,t){var n,i;return EJ(e)?(i="",n=""):"number"==typeof e||t?(i="number"==typeof e?ZJ(e):e,n=r(i)):(i=a(e,void 0),n=r(i)),{formattedValue:n,numAsString:i}}),l=uJ.useState(function(){return o(wJ(e)?t:e,n)}),s=l[0],c=l[1],d=e,h=n;wJ(e)&&(d=s.numAsString,h=!0);var u=o(d,h);return uJ.useMemo(function(){c(u)},[u.formattedValue]),[s,function(e,t){e.formattedValue!==s.formattedValue&&c({formattedValue:e.formattedValue,numAsString:e.value}),i(e,t)}]}function FJ(e){return e.replace(/[^0-9]/g,"")}function qJ(e){return e}function YJ(e){var t=e.type,n=void 0===t?"text":t,r=e.displayType,a=void 0===r?"input":r,i=e.customInput,o=e.renderText,l=e.getInputRef,s=e.format,c=void 0===s?qJ:s,d=e.removeFormatting,h=void 0===d?FJ:d,u=e.defaultValue,p=e.valueIsNumericString,f=e.onValueChange,m=e.isAllowed,v=e.onChange,g=void 0===v?gJ:v,b=e.onKeyDown,y=void 0===b?gJ:b,w=e.onMouseUp,x=void 0===w?gJ:w,E=e.onFocus,k=void 0===E?gJ:E,C=e.onBlur,S=void 0===C?gJ:C,M=e.value,A=e.getCaretBoundary,_=void 0===A?RJ:A,O=e.isValidInputCharacter,N=void 0===O?yJ:O,Z=e.isCharacterSame,D=e.min,I=e.max,H=e.placeholder,T=e.autoFocus,L=vJ(e,["type","displayType","customInput","renderText","getInputRef","format","removeFormatting","defaultValue","valueIsNumericString","onValueChange","isAllowed","onChange","onKeyDown","onMouseUp","onFocus","onBlur","value","getCaretBoundary","isValidInputCharacter","isCharacterSame","min","max","placeholder","autoFocus"]),P=WJ(M,u,Boolean(p),c,h,f),V=P[0],B=V.formattedValue,j=V.numAsString,z=P[1],R=uJ.useRef({formattedValue:B,numAsString:j}),W=function(e,t){R.current={formattedValue:e.formattedValue,numAsString:e.value},z(e,t)},F=uJ.useState(!1),q=F[0],Y=F[1],U=uJ.useRef(null),G=uJ.useRef({setCaretTimeout:null,focusTimeout:null});uJ.useEffect(function(){return Y(!0),function(){clearTimeout(G.current.setCaretTimeout),clearTimeout(G.current.focusTimeout)}},[]);var X=c,K=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},J=function(e,t,n){0===e.selectionStart&&e.selectionEnd===e.value.length||(IJ(e,t),G.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&IJ(e,t)},0))},Q=function(e,t,n){return zJ(e,t,_(e),n)},$=function(e,t,n){var r=_(t),a=jJ(t,B,e,n,r,N,Z);return zJ(t,a,r)};uJ.useEffect(function(){var e=R.current,t=e.formattedValue,n=e.numAsString;B===t||B===j&&t===n||W(K(B,j),{event:void 0,source:pJ.props})},[B,j]);var ee=U.current?LJ(U.current):void 0;("undefined"!=typeof window?uJ.useLayoutEffect:uJ.useEffect)(function(){var e=U.current;if(B!==R.current.formattedValue&&e){var t=$(R.current.formattedValue,B,ee);e.value=B,J(e,t,B)}},[B]);var te=q&&PJ()?"numeric":void 0,ne=Object.assign({inputMode:te},L,{type:n,placeholder:H,autoFocus:T,value:B,onChange:function(e){(function(e,t,n){var r=HJ(B,e),a=mJ(mJ({},r),{lastValue:B}),i=h(e,a),o=X(i);if(i=h(o,void 0),m&&!m(K(o,i))){var l=t.target,s=LJ(l),c=$(e,B,s);return l.value=B,J(l,c,B),!1}return function(e){var t,n=e.formattedValue,r=void 0===n?"":n,a=e.input,i=e.source,o=e.event,l=e.numAsString;if(a){var s=e.inputValue||a.value,c=LJ(a);a.value=r,void 0!==(t=$(s,r,c))&&J(a,t,r)}r!==B&&W(K(r,l),{event:o,source:i})}({formattedValue:o,numAsString:i,inputValue:e,event:t,source:n,input:t.target}),!0})(e.target.value,e,pJ.event)&&g(e)},onKeyDown:function(e){var t,n=e.target,r=e.key,a=n.selectionStart,i=n.selectionEnd,o=n.value,l=void 0===o?"":o;if("ArrowLeft"===r||"Backspace"===r?t=Math.max(a-1,0):"ArrowRight"===r?t=Math.min(a+1,l.length):"Delete"===r&&(t=a),void 0!==t&&a===i){var s=t;"ArrowLeft"===r||"ArrowRight"===r?(s=Q(l,t,"ArrowLeft"===r?"left":"right"))!==t&&e.preventDefault():"Delete"!==r||N(l[t])?"Backspace"!==r||N(l[t])||(s=Q(l,t,"left")):s=Q(l,t,"right"),s!==t&&J(n,s,l),e.isUnitTestRun&&J(n,s,l),y(e)}else y(e)},onMouseUp:function(e){var t=e.target,n=t.selectionStart,r=t.selectionEnd,a=t.value,i=void 0===a?"":a;if(n===r){var o=Q(i,n);o!==n&&J(t,o,i)}x(e)},onFocus:function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;U.current=t,G.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,a=t.selectionEnd,i=t.value,o=void 0===i?"":i,l=Q(o,r);l===r||0===r&&a===o.length||J(t,l,o),k(mJ(mJ({},e),{currentTarget:n}))},0)},onBlur:function(e){U.current=null,clearTimeout(G.current.focusTimeout),clearTimeout(G.current.setCaretTimeout);var t=HJ(B,e.target.value),n=mJ(mJ({},t),{lastValue:B}),r=h(e.target.value,n);(D||0===D||I||0===I)&&""!==e.target.value?((D||0===D)&&Number(r)<=D&&(e.target.value=D.toString(),S(e)),(I||0===I)&&Number(r)>=I&&(e.target.value=I.toString(),S(e))):S(e)}});if("text"===a)return o?fJ.default.createElement(fJ.default.Fragment,null,o(B,L)||null):fJ.default.createElement("span",mJ({},L,{ref:l}),B);if(i){var re=i;return fJ.default.createElement(re,mJ({},ne,{ref:l}))}return fJ.default.createElement("input",mJ({},ne,{ref:l}))}function UJ(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,a=t.prefix,i=void 0===a?"":a,o=t.suffix,l=void 0===o?"":o,s=t.allowNegative,c=t.thousandsGroupStyle,d=void 0===c?"thousand":c;if(""===e||"-"===e)return e;var h=GJ(t),u=h.thousandSeparator,p=h.decimalSeparator,f=0!==n&&-1!==e.indexOf(".")||n&&r,m=AJ(e,s),v=m.beforeDecimal,g=m.afterDecimal,b=m.addNegation;return void 0!==n&&(g=OJ(g,n,!!r)),u&&(v=SJ(v,u,d)),i&&(v=i+v),l&&(g+=l),b&&(v="-".concat(v)),v+(f&&p||"")+g}function GJ(e){var t=e.decimalSeparator,n=void 0===t?".":t,r=e.thousandSeparator,a=e.allowedDecimalSeparators;return!0===r&&(r=","),a||(a=[n,"."]),{decimalSeparator:n,thousandSeparator:r,allowedDecimalSeparators:a}}function XJ(e,t,n){void 0===t&&(t=VJ(e));var r=n.allowNegative,a=n.prefix,i=void 0===a?"":a,o=n.suffix,l=void 0===o?"":o,s=n.decimalScale,c=t.from,d=t.to,h=d.start,u=d.end,p=GJ(n),f=p.allowedDecimalSeparators,m=p.decimalSeparator,v=e[u]===m;if(yJ(e)&&(e===i||e===l)&&""===t.lastValue)return e;if(u-h==1&&-1!==f.indexOf(e[h])){var g=0===s?"":m;e=e.substring(0,h)+g+e.substring(h+1,e.length)}var b=function(e,t,n){var r=!1,a=!1;i.startsWith("-")?r=!1:e.startsWith("--")?(r=!1,a=!0):l.startsWith("-")&&e.length===l.length?r=!1:"-"===e[0]&&(r=!0);var o=r?1:0;return a&&(o=2),o&&(e=e.substring(o),t-=o,n-=o),{value:e,start:t,end:n,hasNegation:r}},y=b(e,h,u),w=y.hasNegation;e=y.value,h=y.start,u=y.end;var x=b(t.lastValue,c.start,c.end),E=x.start,k=x.end,C=x.value,S=e.substring(h,u);!(e.length&&C.length&&(E>C.length-l.length||k<i.length))||S&&l.startsWith(S)||(e=C);var M=0;e.startsWith(i)?M+=i.length:h<i.length&&(M=h),u-=M;var A=(e=e.substring(M)).length,_=e.length-l.length;e.endsWith(l)?A=_:(u>_||u>e.length-l.length)&&(A=u),e=e.substring(0,A),e=function(e,t){void 0===e&&(e="");var n=new RegExp("(-)"),r=new RegExp("(-)(.)*(-)"),a=n.test(e),i=r.test(e);return e=e.replace(/-/g,""),a&&!i&&t&&(e="-".concat(e)),e}(w?"-".concat(e):e,r);var O=(e=(e.match(function(e){return new RegExp("(^-)|[0-9]|".concat(kJ(e)),"g")}(m))||[]).join("")).indexOf(m),N=AJ(e=e.replace(new RegExp(kJ(m),"g"),function(e,t){return t===O?".":""}),r),Z=N.beforeDecimal,D=N.afterDecimal,I=N.addNegation;return d.end-d.start<c.end-c.start&&""===Z&&v&&!parseFloat(D)&&(e=I?"-":""),e}function KJ(e,t){var n=t.prefix,r=void 0===n?"":n,a=t.suffix,i=void 0===a?"":a,o=Array.from({length:e.length+1}).map(function(){return!0}),l="-"===e[0];o.fill(!1,0,r.length+(l?1:0));var s=e.length;return o.fill(!1,s-i.length+1,s+1),o}function JJ(e){e=function(e){var t=GJ(e),n=t.thousandSeparator,r=t.decimalSeparator,a=e.prefix,i=void 0===a?"":a,o=e.allowNegative,l=void 0===o||o;if(n===r)throw new Error("\n Decimal separator can't be same as thousand separator.\n thousandSeparator: ".concat(n,' (thousandSeparator = {true} is same as thousandSeparator = ",")\n decimalSeparator: ').concat(r," (default value for decimalSeparator is .)\n "));return i.startsWith("-")&&l&&(console.error("\n Prefix can't start with '-' when allowNegative is true.\n prefix: ".concat(i,"\n allowNegative: ").concat(l,"\n ")),l=!1),mJ(mJ({},e),{allowNegative:l})}(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,a=e.onKeyDown,i=void 0===a?gJ:a,o=e.onBlur,l=void 0===o?gJ:o,s=e.thousandSeparator,c=e.decimalScale,d=e.fixedDecimalScale,h=e.prefix,u=void 0===h?"":h,p=e.defaultValue,f=e.value,m=e.valueIsNumericString,v=e.onValueChange,g=vJ(e,["decimalSeparator","allowedDecimalSeparators","thousandsGroupStyle","suffix","allowNegative","allowLeadingZeros","onKeyDown","onBlur","thousandSeparator","decimalScale","fixedDecimalScale","prefix","defaultValue","value","valueIsNumericString","onValueChange"]),b=GJ(e),y=b.decimalSeparator,w=b.allowedDecimalSeparators,x=function(t){return UJ(t,e)},E=function(t,n){return XJ(t,n,e)},k=wJ(f)?p:f,C=null!=m?m:function(e,t,n){return""===e||!(null==t?void 0:t.match(/\d/))&&!(null==n?void 0:n.match(/\d/))&&"string"==typeof e&&!isNaN(Number(e))}(k,u,t);wJ(f)?wJ(p)||(C=C||"number"==typeof p):C=C||"number"==typeof f;var S=function(e){return EJ(e)?e:("number"==typeof e&&(e=ZJ(e)),C&&"number"==typeof c?DJ(e,c,Boolean(d)):e)},M=WJ(S(f),S(p),Boolean(C),x,E,v),A=M[0],_=A.numAsString,O=A.formattedValue,N=M[1];return mJ(mJ({},g),{value:O,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===y||yJ(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,a=e.currentValueIndex,i=e.formattedValueIndex,o=t[a],l=r[i],s=HJ(n,t).to;return!!(a>=s.start&&a<s.end&&w&&w.includes(o)&&l===y)||o===l},onValueChange:N,format:x,removeFormatting:E,getCaretBoundary:function(t){return KJ(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,o=t.selectionEnd,l=t.value,h=void 0===l?"":l;if(a===o){"Backspace"===r&&"-"===h[0]&&a===u.length+1&&n&&IJ(t,1),c&&d&&("Backspace"===r&&h[a-1]===y?(IJ(t,a-1),e.preventDefault()):"Delete"===r&&h[a]===y&&e.preventDefault()),(null==w?void 0:w.includes(r))&&h[a]===y&&IJ(t,a+1);var p=!0===s?",":s;"Backspace"===r&&h[a-1]===p&&IJ(t,a-1),"Delete"===r&&h[a]===p&&IJ(t,a+1),i(e)}else i(e)},onBlur:function(t){var n=_;if(n.match(/\d/g)||(n=""),r||(n=_J(n)),d&&c&&(n=DJ(n,c,d)),n!==_){var a=UJ(n,e);N({formattedValue:a,value:n,floatValue:parseFloat(n)},{event:t,source:pJ.event})}l(t)}})}hJ.NumberFormatBase=YJ,hJ.NumericFormat=function(e){var t=JJ(e);return fJ.default.createElement(YJ,mJ({},t))},hJ.addInputMode=PJ,hJ.applyThousandSeparator=SJ,hJ.caretUnknownFormatBoundary=RJ,hJ.charIsNumber=yJ,hJ.clamp=TJ,hJ.escapeRegExp=kJ,hJ.findChangeRange=HJ,hJ.findChangedIndex=function(e,t){for(var n=0,r=0,a=e.length,i=t.length;e[n]===t[n]&&n<a;)n++;for(;e[a-1-r]===t[i-1-r]&&i-r>n&&a-r>n;)r++;return{start:n,end:a-r}},hJ.fixLeadingZero=_J,hJ.geInputCaretPosition=LJ,hJ.getCaretPosInBoundary=zJ,hJ.getCaretPosition=jJ,hJ.getDefaultChangeMeta=VJ,hJ.getMaskAtIndex=function(e,t){return void 0===e&&(e=" "),"string"==typeof e?e:e[t]||" "},hJ.getNumericCaretBoundary=KJ,hJ.getThousandsGroupRegex=CJ,hJ.isNanValue=xJ,hJ.isNil=wJ,hJ.isNotValidValue=EJ,hJ.limitToScale=OJ,hJ.memoizeOnce=bJ,hJ.noop=gJ,dJ=hJ.numericFormatter=UJ,hJ.removeNumericFormat=XJ,hJ.returnTrue=function(){return!0},hJ.roundToPrecision=DJ,hJ.setCaretPosition=IJ,hJ.splitDecimal=AJ,hJ.toNumericString=ZJ,hJ.useInternalValues=WJ,hJ.useNumericFormat=JJ,hJ.usePersistentCallback=MJ;const QJ=tJ.table`
|
|
418
|
+
thead {
|
|
419
|
+
th.header-cell {
|
|
420
|
+
line-height: normal;
|
|
421
|
+
&.header-selected {
|
|
422
|
+
background-color: #eb461912;
|
|
423
|
+
}
|
|
424
|
+
&.header-first-top {
|
|
425
|
+
//border-top-color: #000 !important;
|
|
426
|
+
border-top-color: #eb4619 !important;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
&.header-first-left {
|
|
431
|
+
border-inline-start-color: #eb4619 !important;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
&.header-last-bottom {
|
|
435
|
+
border-bottom-color: #eb4619 !important;
|
|
436
|
+
}
|
|
437
|
+
&.header-last-right {
|
|
438
|
+
border-inline-end-color: #eb4619 !important;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
&.header-content-selected {
|
|
442
|
+
border-bottom-color: #eb4619 !important;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
tbody {
|
|
448
|
+
td.td-cell {
|
|
449
|
+
overflow: hidden;
|
|
450
|
+
white-space: nowrap;
|
|
451
|
+
text-overflow: ellipsis;
|
|
452
|
+
|
|
453
|
+
&.td-selected {
|
|
454
|
+
background-color: #eb461912;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
&.td-first-top {
|
|
458
|
+
border-top: 1px solid #eb4619 !important;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
&.td-first-left {
|
|
462
|
+
border-inline-start-color: #eb4619 !important;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
&.td-last-bottom {
|
|
466
|
+
border-bottom-color: #eb4619 !important;
|
|
467
|
+
}
|
|
468
|
+
&.td-last-right {
|
|
469
|
+
border-inline-end-color: #eb4619 !important;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
&.footer-select {
|
|
473
|
+
border-bottom-color: #eb4619 !important;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
tfoot {
|
|
479
|
+
td.td-cell {
|
|
480
|
+
&.td-selected {
|
|
481
|
+
background-color: #eb461912;
|
|
482
|
+
}
|
|
483
|
+
&.td-first-top {
|
|
484
|
+
border-top: 1px solid #eb4619 !important;
|
|
485
|
+
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
&.td-first-left {
|
|
489
|
+
border-inline-start-color: #eb4619 !important;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
&.td-last-bottom {
|
|
493
|
+
border-bottom-color: #eb4619 !important;
|
|
494
|
+
}
|
|
495
|
+
&.td-last-right {
|
|
496
|
+
border-inline-end-color: #eb4619 !important;
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
`,$J=t=>{const{t:n,typeEdit:a,currentLayout:i,layout:o,dataTable:l,formatNumber:s,onClick:c,onSectionClick:d,styles:h,currentItem:u,setCurrentItem:p}=t,f=xF(o.table?.columns??[]).findIndex(e=>o.table?.fieldSums.includes(e.field)),m=e=>{p(e),d?.(e)},v=(e,t,n)=>{const r=t[e.field??""]?.toString();if("stt"===e.field)return n+1;if("number"===e.dataType){const t={thousandSeparator:bF(s?.thousandSeparator??".",s?.decimalSeparator??","),decimalSeparator:yF(s?.thousandSeparator??".",s?.decimalSeparator??","),prefix:s?.prefixNegative,suffix:s?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(r)?dJ(r,t):0}return"date"===e.dataType?e.format?gF(r,e.format):gF(r,"dd/MM/yyyy HH:mm"):r},g=(t,n)=>r.jsx(e.Fragment,{children:r.jsx("td",{className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"summary"===u}),style:{textAlign:"right",color:o.table?.summary?.color??h?.color??"#000",fontFamily:o.table?.summary.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.summary.fontSize??h?.fontSize??11),fontWeight:o.table?.summary.bold??h?.bold?"bold":"normal",fontStyle:o.table?.summary.italic??h?.italic?"italic":"normal",textDecoration:o.table?.summary.underline??h?.underline?"underline":"none",padding:"0 0.5rem",lineHeight:"1.5",borderInlineEnd:"1px solid",borderInlineStart:0===n?"1px solid":"",borderBottom:"1px solid",borderColor:h?.color??"#000"},children:o.table?.fieldSums.includes(t.field??"")&&(()=>{const e=(n=l,r=t.field??"",n&&n.length>0?n.reduce((e,t)=>e+("number"!=typeof t[r]&&isNaN(t[r])?0:Number(t[r])),0):0);var n,r;const a=(e=>null==e||""===e)(e)?"0":parseFloat(Number(e).toFixed(t.fraction??2)).toString(),i={thousandSeparator:bF(s?.thousandSeparator??".",s?.decimalSeparator??","),decimalSeparator:yF(s?.thousandSeparator??".",s?.decimalSeparator??","),prefix:s?.prefixNegative,suffix:s?.suffixNegative,decimalScale:t.fraction??2,fixedDecimalScale:!!t.fraction};return"number"===t.dataType?dJ(a,i):0})()})},`summary-cell-${n}`);return r.jsx(e.Fragment,{children:r.jsx("div",{className:sj("h-100 grid-item-container grid-item-table align-items-center",{active:"layout"===a,selected:"section"===a&&i?.id===o.id}),style:{minHeight:23*(o.rows??1)},onClick:c,children:r.jsxs(QJ,{style:{width:"100%",minWidth:"100%"},children:[r.jsx("thead",{className:"",children:kF(o.table?.columns??[]).map((e,t)=>r.jsx("tr",{children:e.map((l,s)=>r.jsx("th",{className:sj("header-cell",{"header-selected":i&&i.id===o.id&&"header"===u,"header-first-top":i&&i.id===o.id&&"header"===u&&0===t,"header-last-bottom":i&&i.id===o.id&&"header"===u&&(!l.children||t===kF(o.table?.columns??[]).length-1),"header-first-left":i&&i.id===o.id&&"header"===u&&0===s,"header-last-right":i&&i.id===o.id&&"header"===u&&0===t&&s===e.length-1,"header-content-selected":i&&i.id===o.id&&"content"===u&&(!l.children||t===kF(o.table?.columns??[]).length-1)}),onClick:e=>{"section"===a?m("header"):e.preventDefault()},style:{textAlign:"center",color:o.table?.header?.color??h?.color??"#000",fontFamily:o.table?.header.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.header.fontSize??h?.fontSize??11),fontWeight:o.table?.header.bold??h?.bold?"bold":"normal",fontStyle:o.table?.header.italic??h?.italic?"italic":"normal",textDecoration:o.table?.header.underline??h?.underline?"underline":"none",width:l.width,height:23,borderInlineEnd:"1px solid #000",borderInlineStart:0===s?"1px solid #000":void 0,borderBottom:"1px solid #000",borderTop:0===t?"1px solid #000":void 0,maxHeight:23,borderColor:h?.color??"#000"},scope:"col",rowSpan:l.rowspan,colSpan:l.colspan,children:n(l.headerDisplay??l.headerText??"")},s))},t))}),r.jsx("tbody",{className:"be-table-tbody",children:(o.table?.isTotalTable&&o.table?.fieldTotalTable?.length>0?NF(l,o.table?.columns?.map(e=>e.field??"")??[],o.table?.fieldTotalTable??[]):l)?.map((e,t)=>r.jsx("tr",{className:"be-table-row",children:xF(o.table?.columns??[]).map((n,s)=>r.jsx("td",{onClick:e=>{"section"===a?m("content"):e.preventDefault()},className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"content"===u,"td-first-top":i&&i.id===o.id&&"content"===u&&0===t,"td-last-bottom":i&&i.id===o.id&&"content"===u&&t===l.length-1,"td-first-left":i&&i.id===o.id&&"content"===u&&0===s,"td-last-right":i&&i.id===o.id&&"content"===u&&s===xF(o.table?.columns??[]).length-1,"footer-select":i&&i.id===o.id&&"summary"===u&&t===l.length-1}),style:{textAlign:"stt"===n.field?"center":"number"===n.dataType?"right":"left",color:o.table?.content?.color??h?.color??"#000",fontFamily:o.table?.content.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.content.fontSize??h?.fontSize??11),fontWeight:o.table?.content.bold??h?.bold?"bold":"normal",fontStyle:o.table?.content.italic??h?.italic?"italic":"normal",textDecoration:o.table?.content.underline??h?.underline?"underline":"none",padding:"0 0.5rem",maxWidth:n.width,width:n.width,height:23,borderInlineEnd:"1px solid #000",borderInlineStart:0===s?"1px solid #000":void 0,borderBottom:"1px solid #000",borderColor:h?.color??"#000"},children:v(n,e,t)},`col-${t}-${s}`))},`row-${t}`))}),(f??0)>0&&r.jsx("tfoot",{className:"be-table-tfoot",children:r.jsxs("tr",{onClick:e=>{"section"===a?m("summary"):e.preventDefault()},className:"be-table-row be-table-row-level-0",children:[r.jsx("td",{className:sj("td-cell",{"td-selected":i&&i.id===o.id&&"summary"===u,"td-first-top":i&&i.id===o.id&&"summary"===u,"td-last-bottom":i&&i.id===o.id&&"summary"===u,"td-first-left":i&&i.id===o.id&&"summary"===u,"td-last-right":!1}),style:{textAlign:"left",color:o.table?.summary?.color??h?.color??"#000",fontFamily:o.table?.summary.fontFamily??h?.fontFamily??"Times New Roman",fontSize:TF(o.table?.summary.fontSize??h?.fontSize??11),fontWeight:o.table?.summary.bold??h?.bold?"bold":"normal",fontStyle:o.table?.summary.italic??h?.italic?"italic":"normal",textDecoration:o.table?.summary.underline??h?.underline?"underline":"none",padding:"0 0.5rem",lineHeight:"1.5",height:23,borderInlineEnd:"1px solid #000",borderInlineStart:"1px solid #000",borderBottom:"1px solid #000",borderColor:h?.color??"#000"},colSpan:f??0,children:o.table?.headerSum?o.table?.headerSum:"Tổng"}),xF(o.table?.columns??[]).slice(f??0).map((e,t)=>g(e,t))]})})]})})})},eQ=t=>{const{pageSize:n,setting:a,setSetting:i,dataItem:o,currentLayout:l,setCurrentLayout:s,onSetConfig:c,formatNumber:d,currentItem:h,setCurrentItem:u}=t,{t:p}=dc(),f=37.7,m=e=>{c(l?.table?.[e])},v=(e,t)=>{u(e),c(e?.style,t)};return r.jsx(e.Fragment,{children:r.jsx("div",{className:"layout grid-layout align-content-start",style:{minHeight:(n.height-a.pageSetting.marginTop-a.pageSetting.marginBottom)*f,zIndex:2,position:"relative"},children:a?.layout?.map((e,t)=>r.jsx(uP,{className:"m-0",style:{minHeight:23,paddingBottom:a.pageSetting?.spaceLayout??0},children:e.map(e=>"table"===e.type?r.jsx(xP,{id:`${t+1}`,className:sj("p-0",{}),children:r.jsx($J,{typeEdit:"section",layout:e,styles:a?.style,dataTable:o[e.table?.field??""]??[],onClick:()=>s(e),currentLayout:l,onSectionClick:m,formatNumber:d,t:p,currentItem:h,setCurrentItem:u})},e.id):"signature"===e.type?r.jsx("div",{id:`${t+1}`,className:sj("p-0",{}),children:r.jsx(cJ,{pixelRate:f,pageSize:n,pageSetting:a.pageSetting,dataItem:o,layout:e,styles:a?.style,active:!1,onClick:()=>{s(e)},itemClick:t=>v(t,e),selected:l?.id===e.id,onLayoutChange:t=>{const n=((e,t)=>{const n=e.reduce((e,t)=>(e[t.i]=t,e),{});return t.sort((e,t)=>{const r=n[e.code],a=n[t.code];return r.y===a.y?r.x-a.x:r.y-a.y})})(t,e.signature?.setting.detail??[]);(e=>{const t=LF([...a.layout],e),n={...a,layout:t};i({...n})})({...e,signature:{...e.signature,setting:{...e.signature?.setting,detail:n}}})}})},e.id):r.jsx(xP,{id:e.id,className:sj("p-0",{}),xs:e.width,children:r.jsx(lJ,{sectionData:e,typeEdit:"section",width:e.width,pageSize:n,rows:e.rows??1,pageSetting:a.pageSetting,pixelRate:f,dataItem:o,content:e.children??[],styles:a?.style,formatNumber:d,currentItem:h,active:!1,selected:l?.id===e.id,onClick:()=>{s(e)},itemClick:t=>v(t,e),onLayoutChange:t=>{const n=_F(t).sort((e,t)=>e[0].y-t[0].y),r=((e,t)=>{const n=t.flat();return e.map(e=>(e.length>1?e?.sort((e,t)=>e.x-t.x):e).map(e=>{const t=n.find(t=>t&&t.id===e.i);return t?{...t,id:e.i,width:e.w,rows:e.h,...t.align?{align:t.align}:{}}:{width:e.w,type:"blank",children:[[{headerText:"",headerDisplay:"",field:"",type:"text",style:{fontSize:12,bold:!1}}]],id:e.i,i:e.i,rows:e.h}}))})(n,e.children??[]),o={...e,rows:Math.max(...r.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:r},l=LF([...a.layout],o),s={...a,layout:l};i({...s})}})},e.id))},`${e.id}-${t}`))})})},tQ=t=>{const{pageSize:n,setting:a,layouts:i,setLayouts:o,setSetting:l,dataItem:s,currentLayout:c,setCurrentLayout:d,onSetConfig:h,formatNumber:u,currentLayoutHover:p,currentItem:f,setCurrentLayoutHover:m,currentDimensions:v}=t,{t:g}=dc(),b=37.7,y=e=>{h(c?.table?.[e])},w=e=>{const t=i.lg.filter(t=>t.i!==e.id);if(0===t.length){const e=mF();t.push({id:e,i:e,max:12,x:0,y:1,static:!0,h:1,w:12,type:"content",rows:1,children:[]})}const n=PF(_F(t),a.layout),r={...a,layout:n};l({...r});const s=DF(n??[]);o({lg:s,md:s,sm:s,xs:s,xxs:s})};return r.jsx(e.Fragment,{children:r.jsx(WF.exports.Responsive,{className:"layout grid-layout d-flex flex-wrap align-content-start",style:{minHeight:(n.height-a.pageSetting.marginTop-a.pageSetting.marginBottom)*b,height:"auto",zIndex:2,position:"relative"},width:n.width*b-(a.pageSetting.marginLeft+a.pageSetting.marginRight)*b,layouts:i,isDraggable:!0,isResizable:!0,rowHeight:23,margin:[0,(a.pageSetting?.spaceLayout??0)/2],compactType:"vertical",containerPadding:[0,0],verticalCompact:!0,autoSize:!1,breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:12,sm:12,xs:12,xxs:12},isBounded:!0,isDroppable:!0,onDrop:(e,t)=>((e,t)=>{const n=[...a.layout],r=mF(),s=i.lg.map(e=>({...e,y:e.y>=t.y?e.y+1:e.y})),c=_F(s.concat({...t,w:v.w,i:r})).sort((e,t)=>e[0].y-t[0].y),d=function(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(t.push(r),n>0){const a=r[0].y,i=e[n-1],o=a-(i[0].y+i[0].h);if(o>0)for(let e=0;e<o;e++)t.splice(n+e,0,[])}}return t}(c),h={id:r,i:r,width:12,w:12,type:v.type,rows:1,children:[]};"table"===v.type?h.table={columns:[],header:{},content:{},summary:{},fieldSums:[]}:"signature"===v.type&&(h.signature={setting:"",reportSigning:1,loginSigning:1,detail:[]});const u=[...n,[h]];o({lg:d.flat(),md:d.flat(),sm:d.flat(),xs:d.flat(),xxs:d.flat()});const p=PF(d,u),f={...a,layout:p};l(f)})(0,t),onDragStart:()=>{},onResizeStop:(e,t,n)=>{if(!AF(e,i.lg)){const t=e.map(e=>({...e,h:e.y===n.y?n.h:e.h}));o({lg:t,md:t,sm:t,xs:t,xxs:t})}},onDragStop:e=>{if(!AF(e,i.lg)){const t=_F(e).sort((e,t)=>e[0].y-t[0].y);o({lg:t.flat(),md:t.flat(),sm:t.flat(),xs:t.flat(),xxs:t.flat()}),l({...a,layout:PF(t,a.layout)})}},children:a?.layout.flat().map((e,t)=>"table"===e.type?r.jsxs("div",{id:`${t+1}`,className:sj("",{}),children:[r.jsx($J,{typeEdit:"layout",layout:e,styles:a?.style,dataTable:s[e.table?.field??""]??[],onClick:()=>{d(e)},currentLayout:c,onSectionClick:y,formatNumber:u,currentItem:f,setCurrentItem:()=>{},t:g}),r.jsx("div",{className:sj("remove",{}),onClick:()=>w(e),children:r.jsx(ud,{fontSize:14,color:"red"})})]},`${e.id}`):"signature"===e.type?r.jsxs("div",{id:`${t+1}`,children:[r.jsx(cJ,{pixelRate:b,pageSetting:a.pageSetting,pageSize:n,dataItem:s,layout:e,styles:a?.style,active:!0,onClick:()=>{d(e)},selected:!1}),r.jsx("div",{className:sj("remove",{}),onClick:()=>w(e),children:r.jsx(ud,{fontSize:14,color:"red"})})]},e.id):r.jsxs("div",{id:e.id,children:[r.jsx(lJ,{sectionData:e,typeEdit:"layout",width:e.width,pageSize:n,rows:e.rows,pageSetting:a.pageSetting,pixelRate:b,dataItem:s,content:e.children,styles:a?.style,currentItem:f,formatNumber:u,onLayoutChange:()=>{},active:!0,selected:!1,onClick:()=>{h({textAlign:e.align}),d(e)}}),r.jsx("div",{className:sj("remove",{}),onClick:()=>w(e),onMouseEnter:()=>{e.id!==p?.id&&m(e)},onMouseLeave:()=>{m(null)},children:r.jsx(ud,{fontSize:14,color:"red"})})]},e.id))})})};RF(".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}");const nQ=t=>{const{iconName:n,size:a}=t;if(""===n)return null;{const t=""===n?"":pd[n];return r.jsx(e.Fragment,{children:""===n?"":r.jsx(t,{fontSize:a})})}},rQ=t=>{const{item:n,currentItem:a,currentLayout:i,handleUpdateLayout:o}=t,{innerWidth:l}=window,{t:s}=dc(),c=e=>{if((!i?.children||!a?.id)&&o)return void o(e);const t=OF(i.children,a.id,"format",e),n={...a,children:t};o(n)};return r.jsx(e.Fragment,{children:r.jsxs(ej,{tag:"div",children:[r.jsx($P,{tag:"div",children:r.jsx(Bc,{fontSize:18,className:"ms-50 cursor-pointer text-primary"})}),r.jsxs(XP,{className:"formula-dropdown icon-dropdown p-50",style:{width:400,maxWidth:l>1280?1280:l,borderRadius:8},children:[r.jsx(yB,{id:`input-${n.id}`,defaultValue:n.format??"",onBlur:e=>{c(e.target.value)}}),r.jsxs("div",{className:"border my-25 d-flex text-primary rounded",children:[r.jsxs("div",{className:"ps-50",style:{flex:1},children:[r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("dd/MM/yyyy")},children:"dd/MM/yyyy"})]}),r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("dd/MM/yyyy HH:mm")},children:"dd/MM/yyyy HH:mm"})]}),r.jsxs("div",{children:[" ",r.jsx(_P,{color:"primary",className:"rounded my-50 p-25",onClick:()=>{c("Ngày dd Tháng MM Năm yyyy")},children:"Ngày dd Tháng MM Năm yyyy"})]})]}),r.jsxs("ul",{style:{width:140},className:"me-50 mb-0 border-start",children:[r.jsxs("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:["dd: ",s("Day")]}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"MM: Tháng"}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"yyyy: Năm"}),r.jsx("li",{className:"ps-25 ms-50 mb-25 fw-bold",children:"HH: Giờ"}),r.jsx("li",{className:"ps-25 ms-50 mb-0 fw-bold",children:"mm: Phút"})]})]})]})]})})},aQ=t=>{const{options:n,currentItem:a,currentLayout:i,handleUpdateLayout:o,formatNumber:l,dataItem:s}=t,{innerHeight:c}=window,[d,h]=e.useState(!1),[u,p]=e.useState([]),{t:f}=dc();e.useEffect(()=>{d&&(a?.children&&(a.children=[]),p(a.children))},[d]);const m=e=>{if(e.type&&"data"!==e.type||!e.field)return e.type,e.headerDisplay;{const t=s[e.field];if("number"===e.dataType){const n={thousandSeparator:bF(l?.thousandSeparator??".",l?.decimalSeparator??","),decimalSeparator:yF(l?.thousandSeparator??".",l?.decimalSeparator??","),prefix:l?.prefixNegative,suffix:l?.suffixNegative,decimalScale:e.fraction??2,fixedDecimalScale:!!e.fraction};return wF(t)?gX(t?.toString(),n):0}return"date"===e.dataType?gF(t,e.format):t}};return r.jsxs(e.Fragment,{children:[r.jsx(Bc,{fontSize:20,className:"ms-50 cursor-pointer text-primary",onClick:()=>h(!0)}),r.jsxs(eB,{className:"modal-dialog-centered modal-md",toggle:()=>{h(!1)},isOpen:d,children:[r.jsx(jF,{typeModal:"Edit",handleModal:()=>h(!1),title:"Chỉnh sửa khối văn bản",className:"mb-50 py-50"}),r.jsx(x.default,{autoHeight:!0,autoHeightMax:c-120,children:r.jsx(aB,{children:r.jsxs("div",{className:"box form-box__border d-flex flex-column rounded",children:[r.jsx("div",{className:"box form-box__border d-flex flex-column mb-1 rounded",children:r.jsx("span",{children:u.map((e,t)=>r.jsxs("span",{children:[0!==t&&" "," ",m(e)]},`${e.id}-${t}`))})}),r.jsxs("div",{className:"d-flex align-items-center px-25",children:[r.jsx("div",{className:"d-flex gap-75",style:{flex:1},children:r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"})}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40}})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:u??[],handle:".drag-icon",className:"",setList:e=>{p(e)},children:u.map((e,t)=>r.jsxs("div",{className:sj("sortable-item d-flex align-items-center py-50",{}),children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,flex:1,backgroundColor:"#f4f5f8"},children:e.headerText}),r.jsxs("div",{style:{display:"flex",alignItems:"center"},children:["date"===e.dataType&&r.jsx(r.Fragment,{children:r.jsx(rQ,{item:e,handleUpdateLayout:t=>((e,t)=>{const n=u.find(t=>t.id===e.id);n&&(n.format=t,p([...u]))})(e,t)})}),("text"===e.type||!e.type)&&r.jsx(yB,{value:e.headerDisplay,style:{fontSize:13},onChange:t=>((e,t)=>{const n=u.find(t=>t.id===e.id);n&&(n.headerDisplay=t,p([...u]))})(e,t.target.value)})]})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>{var t;t=e,p(u.filter(e=>e.id!==t.id))},fontSize:16,color:"red"})})]},`${e.id}-${t}`))}),r.jsx("div",{style:{fontSize:13,marginTop:10},children:r.jsx(dy,{options:n,value:void 0,placeholder:"Chọn thêm thông tin",fieldLabel:"headerText",onChange:e=>{(e=>{let t,n="";"image"===e.type?t={height:20,url:"",width:20}:e.type&&"data"!==e.type||(n=e.headerText),p([...u,{id:mF(),headerText:e.headerText,headerDisplay:n,imageSetting:t,field:e.field,format:e.format,dataType:e.dataType,rows:1,type:e.type??"data",style:{fontSize:12,bold:!1}}])})(e)}})})]})})}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",onClick:()=>{if(!i?.children)return;if(!a?.id)return;const e=OF(i.children,a.id,"children",u),t={...a,children:e};o(t),h(!1)},className:"me-1",children:f("Save")}),r.jsx(_P,{color:"secondary",onClick:()=>h(!1),outline:!0,className:"me-1",children:f("Close")})]})]})]})},iQ=t=>{const{min:n,max:a,errors:i,disabled:o,placeholder:l,onChange:s,fractionCurrency:c,thousandSeparator:d,decimalSeparator:h,value:u,unitString:p,style:f,allowNegative:m}=t;let v=parseFloat(u?.toString());const g={value:cj(u)?"":u,thousandSeparator:bF(d,h),decimalSeparator:yF(d,h),allowNegative:m??!1,decimalScale:c??0,fixedDecimalScale:!1};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"d-flex align-items-center",children:[r.jsx(xX,{...g,style:f,className:sj("form-control text-right",{"is-invalid":i}),onValueChange:e=>{v=e?.floatValue;const t=e?.value.split(".")[1];s(t?parseFloat(e?.value).toFixed(t.length):e?.floatValue)},onFocus:e=>{e.target.setSelectionRange(0,e.target.innerText.length-1)},onBlur:()=>{s(a&&v>a?a:n&&v<n?n:v??0)},placeholder:l,disabled:o}),r.jsx("span",{className:"ms-25 fs-5",children:p})]})})},oQ=tJ.div`
|
|
502
502
|
.box-image-preview{
|
|
503
503
|
position: relative;
|
|
504
504
|
.action-reset {
|
|
@@ -518,7 +518,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
518
518
|
padding: 0;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
`,lQ=
|
|
521
|
+
`,lQ=tJ.div`
|
|
522
522
|
display: flex;
|
|
523
523
|
align-items: center;
|
|
524
524
|
position: relative;
|
|
@@ -541,7 +541,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
`,sQ=({height:t,width:n,onChange:a,onUploadFail:i,image:o,className:l,disable:s,defaultImage:c,uploadFileApi:d,CDN_URL_VIEW:h,link:u,setLink:p,openModalLink:f,handleModalLink:m})=>{const{t:v}=dc(),g=e.useRef(null);return r.jsx(oQ,{className:l,children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"box-image-preview me-1 p-25 rounded border border-1 d-flex justify-content-center align-items-center",style:{width:n,height:t},children:[r.jsx(e.Fragment,{children:r.jsx("img",{className:"rounded",alt:"Generic placeholder image",style:{maxHeight:"100%",maxWidth:"100%"},src:o&&""!==o?o.startsWith("http")?o:`${h}/${o}`:c})}),r.jsx("div",{className:(!0===s?"d-none":"")+" action-reset",children:r.jsx(_P,{className:"btn-reset btn btn-primary",color:"primary",size:"sm",outline:!0,onClick:()=>{a("");const e=g.current?.filesData;e&&e.length>0&&g?.current?.remove(e[0],!1,!0)},children:r.jsx(ud,{fontSize:12})})})]}),r.jsx("div",{className:(!0===s?"d-none":"")+" d-flex flex-column justify-content-center",children:r.jsxs(lQ,{children:[r.jsxs(_P,{outline:!0,tag:"label",className:"me-75 rounded",size:"sm",color:"primary",children:[r.jsx(dd,{fontSize:13}),r.jsx(yB,{type:"file",onChange:e=>(e=>{const t=new FormData;t.append("file",e),d(t).then(e=>{e?.infoFiles?.length>0&&a(e?.infoFiles[0]?.path)}).catch(e=>{i&&i(e)})})(e.target.files[0]),hidden:!0,accept:"image/*"})]}),r.jsx(_P,{className:"rounded",color:"primary",size:"sm",onClick:m,children:r.jsx(Xc,{fontSize:13})})]})}),r.jsxs(eB,{isOpen:f,backdrop:"static",className:"modal-dialog-centered modal-lg",contentClassName:"p-0",onOpened:()=>{},onClosed:()=>{},keyboard:!1,onClick:e=>e.stopPropagation(),children:[r.jsx(jF,{handleModal:m,typeModal:"Add",title:"AddLinkImage"}),r.jsx(aB,{className:"p-1",children:r.jsx(yB,{value:u,onChange:e=>{p&&p(e.target.value)},placeholder:v("VD: https://hinh-anh.jpg")})}),r.jsx("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsxs(e.Fragment,{children:[r.jsx(_P,{onClick:()=>{a(u),m()},color:"primary",className:"add-todo-item me-1",children:v("Save")}),r.jsx(_P,{color:"secondary",onClick:()=>{m()},outline:!0,children:v("Close")})]})})]})]})})},cQ=t=>{const{item:n,currentItem:a,currentLayout:i,handleUpdateLayout:o,formatNumber:l,CDN_URL_VIEW:s,uploadFileApi:c}=t,{innerWidth:d}=window,{t:h}=dc(),u=(e,t)=>{if(!i?.children)return;if(!a?.id)return;const r={...n.imageSetting,[e]:t},l=OF(i.children,a.id,"imageSetting",r),s={...a,children:l};o(s)},[p,f]=e.useState(!1),[m,v]=e.useState("");return r.jsx(e.Fragment,{children:r.jsxs(ej,{className:"w-100",children:[r.jsx($P,{tag:"div",className:"w-100",children:r.jsx("div",{className:"input-disable w-100 cursor-pointer text-primary",style:{fontSize:13},children:"Nhấn để sửa thông tin ảnh"})}),r.jsx(XP,{className:"formula-dropdown icon-dropdown p-0",style:{width:400,maxWidth:d>1280?1280:d,borderRadius:8},children:r.jsxs("div",{className:"d-flex p-1",children:[r.jsx("div",{className:"w-50",children:r.jsx(sQ,{image:n.imageSetting?.url,height:60,width:60,uploadFileApi:c,CDN_URL_VIEW:s,link:m,setLink:v,openModalLink:p,handleModalLink:()=>{v(""),f(!p)},onChange:e=>u("url",e?`${s}/${e}`:void 0)})}),r.jsxs("div",{className:"w-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsxs("p",{className:"m-0 ",style:{fontSize:"13px"},children:[h("Height"),":"]}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,onChange:e=>{u("height",e)},unitString:"cm",value:n.imageSetting?.height??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsxs("p",{className:"m-0 ",style:{fontSize:"13px"},children:[h("Width"),":"]}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("width",e)},value:n.imageSetting?.width??0})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Lề trên:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("top",e)},value:n.imageSetting?.top??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Lề trái:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("left",e)},value:n.imageSetting?.left??0})]})]})]})]})})]})})},dQ=t=>{const{dataItem:n,list:a,activeItem:i,options:o,blankOption:l,onItemClick:s,organization:c,currentLayout:d,setCurrentLayout:h,setting:u,setSetting:p,setLayouts:f,setCurrentItem:m,currentItem:v,handleUpdateLayout:g,formatNumber:b,CDN_URL_VIEW:y,uploadFileApi:w}=t,x=e=>{if(!d?.children)return;const t=((e,t)=>EF(e).map(e=>e.filter(e=>e.id!==t)).filter(e=>e.length>0))(d.children,e.id??""),r={...d,rows:Math.max(...t.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:t};h(r),m(d.children[0][0]);const a=LF([...u.layout],r),i=DF(ZF(a,n)??[]);f({lg:i,md:i,sm:i,xs:i,xxs:i}),p({...u,layout:ZF(a,n)})};return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25",children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"}),r.jsx("div",{style:{flex:1},children:r.jsx("span",{style:{fontSize:13},children:"Nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40}})]}),a.map((e,t)=>r.jsxs("div",{onClick:()=>s(e),className:sj("sortable-item d-flex align-items-center py-50",{active:i&&i.id===e.id}),children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:200,backgroundColor:"#f4f5f8"},children:e.headerText}),r.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center"},children:["image"===e.type?r.jsx(r.Fragment,{children:r.jsx(cQ,{item:e,CDN_URL_VIEW:y,uploadFileApi:w,currentItem:v,formatNumber:b,currentLayout:d,handleUpdateLayout:g})}):r.jsx(r.Fragment,{children:"companyName"===e.type||"companyAddress"===e.type||"currentDate"===e.type?r.jsx(r.Fragment,{children:r.jsx("div",{className:"input-disable",style:{fontSize:13},children:e.headerDisplay})}):r.jsx(r.Fragment,{children:r.jsx(yB,{value:e.headerDisplay,style:{fontSize:13},onFocus:()=>s(e),onChange:e=>((e,t)=>{if(!d?.children)return;if(!v?.id)return;const n=OF(d.children,v.id,"headerDisplay",t),r={...v,children:n};g(r)})(0,e.target.value)})})}),("date"===e.dataType||"currentDate"===e.type)&&r.jsx(r.Fragment,{children:r.jsx(rQ,{item:e,currentItem:v,currentLayout:d,handleUpdateLayout:g})}),"template"===e.type&&r.jsx(r.Fragment,{children:r.jsx(aQ,{options:[...l?.filter(e=>"image"!==e.type&&"template"!==e.type)??[],...o],currentItem:v,currentLayout:d,handleUpdateLayout:g,formatNumber:b,organization:c,dataItem:n})})]})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>x(e),fontSize:16,color:"red"})})]},`${e.id}-${t}`)),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:[...l??[],...o],value:void 0,placeholder:"Chọn thêm thông tin",fieldLabel:"headerText",onChange:e=>{(e=>{if(!d?.children)return;const t=[...d.children];let n,r="";"companyName"===e.type?r=c.name:"companyAddress"===e.type?r=c.address:"image"===e.type?n={height:20,url:"",width:20}:e.type&&"data"!==e.type||(r=e.headerText);const a=[...t,[{id:mF(),headerText:e.headerText,headerDisplay:r,imageSetting:n,field:e.field,format:e.format,dataType:e.dataType,rows:1,type:e.type??"data",children:"template"===e.type?[]:void 0,style:{fontSize:12,bold:!1}}]],i={...d,rows:Math.max(...a.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:a};h(i);const o=LF([...u.layout],i),l=DF(LF([...u.layout],i));f({lg:l,md:l,sm:l,xs:l,xxs:l}),p({...u,layout:o})})(e)}})})]})},hQ=t=>{const{listCurrent:n,activeItem:a,options:i,setList:o,onItemClick:l}=t;return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25",style:{fontSize:13},children:[r.jsx("div",{style:{width:30},children:" "}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"}),r.jsx("div",{className:"w-50",children:r.jsx("span",{children:"Tên nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:" "})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:n,handle:".drag-icon",className:"",setList:e=>o(e),children:n.map((e,t)=>r.jsxs("div",{onClick:()=>l(e),className:sj("sortable-item d-flex align-items-center py-50",{active:a&&a.code===e.code}),children:[r.jsx("div",{style:{width:30},children:r.jsx(Vc,{fontSize:12,className:"drag-icon cursor-move",style:{marginLeft:5}})}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:200,backgroundColor:"#f4f5f8"},children:e.position}),r.jsx("div",{style:{flex:1},children:r.jsx(yB,{value:e.title,style:{fontSize:13},onFocus:()=>l(e),onChange:t=>((e,t)=>{const r={...e,title:t};o(CF(n,r,"code"))})(e,t.target.value)})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>(e=>{o(n.filter(t=>t.code!==e.code))})(e),fontSize:16,color:"red"})})]},`${e.id}-${t}`))}),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:vF(i,n,"code"),value:void 0,fieldLabel:"position",placeholder:"Chọn thêm thông tin",onChange:e=>{(e=>{o([...n,e])})(e)}})})]})},uQ=e=>{const{activeItem:t,indent:n,index:a,item:i,setActiveItem:o,t:l,setListTable:s,list:c,position:d,options:h}=e;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{onClick:()=>o(i),style:{paddingLeft:25*n},className:sj("sortable-item d-flex align-items-center py-50",{active:t&&t.field===i.field}),children:[r.jsx("div",{style:{width:30},children:r.jsx(Vc,{fontSize:12,className:"drag-icon cursor-move",style:{marginLeft:5}})}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:200,backgroundColor:"#f4f5f8"},children:i.headerText}),r.jsx("div",{style:{flex:1},children:r.jsx(yB,{value:i.headerDisplay,style:{fontSize:13},onChange:e=>((e,t,n)=>{let r=c;const a=d.split("_").map(e=>parseInt(e,10));for(let e=0;e<a.length-1;e++){const t=a[e];r[t].children||(r[t].children=[]),r=r[t].children??[]}r[n]={...e,headerDisplay:t},s([...c])})(i,e.target.value,a)})})]}),r.jsx("div",{className:sj("d-flex justify-content-center",{"d-none":"text"!==i.type}),style:{width:20},children:r.jsx(td,{className:"cursor-pointer",onClick:()=>{},fontSize:16,color:"red"})}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:20},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>(e=>{let t=c;const n=d.split("_").map(e=>parseInt(e,10));for(let e=0;e<n.length-1;e++){const r=n[e];t[r].children||(t[r].children=[]),t=t[r].children??[]}t.splice(e,1),s([...c])})(a),fontSize:16,color:"red"})})]},a),i.children?.length>0&&i.children.map((e,a)=>r.jsx(uQ,{position:`${d}_${a}`,index:a,setActiveItem:o,list:c,setListTable:s,activeItem:t,item:e,indent:n+1,options:h,t:l})),"text"===i.type&&r.jsx("div",{style:{fontSize:13,paddingLeft:30*(n+1),paddingRight:5},children:r.jsx(dy,{options:[{headerText:"Nội dung",type:"text"},...vF(h,[...i.children??[],{field:"stt"}],"field")],value:void 0,noHeader:!0,columns:[{headerText:"",field:"headerText",template:e=>l(e.headerText)}],placeholder:"Chọn thêm thông tin",onChange:e=>{(e=>{let t=c;const n=d.split("_").map(e=>parseInt(e,10));n.forEach(e=>{t[e].children||(t[e].children=[]),t=t[e].children??[]}),t.push({...e,headerText:l(e.headerText),headerDisplay:l(e.headerDisplay)}),s([...c])})(e)}})})]})},pQ=t=>{const{list:n,setListTable:a,options:i,optionTableFields:o,currentLayout:l}=t,{t:s}=dc(),[c,d]=e.useState(null),h=e.useMemo(()=>xF(n),[n]);return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"mb-1 p-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường thông tin bảng:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",options:o,value:o.find(e=>e.field===(l?.table?.field??"")),onChange:e=>{return t=e.field,void a([{headerText:"STT",headerDisplay:"STT",field:"stt",width:40}],{field:t});var t}})})]}),r.jsxs("div",{className:"d-flex mt-50",children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường cộng tổng:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",isMulti:!0,options:h.filter(e=>"number"===e.dataType),formatOptionLabel:e=>s(e.headerText),columns:[{headerText:"Tên cột",field:"headerText",template:e=>s(e.headerText)}],value:l?.table?.fieldSums?h.filter(e=>"number"===e.dataType).filter(e=>l?.table?.fieldSums.includes(e.field)):[],onChange:e=>{return t=e.map(e=>e.field),void a(void 0,{fieldSums:t});var t}})})]}),r.jsxs("div",{className:"d-flex mt-50",style:{height:27},children:[r.jsxs("div",{style:{width:200},children:[s("Là bảng gộp")," "]}),r.jsx("div",{style:{width:30},children:r.jsx(yB,{type:"checkbox",checked:l?.table?.isTotalTable??!1,onChange:e=>{return t=e.target.checked,void a(void 0,{isTotalTable:t});var t}})})]}),r.jsxs("div",{className:sj("d-flex mt-50",{"d-none":!l?.table?.isTotalTable}),children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường cộng gộp:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",isMulti:!0,formatOptionLabel:e=>s(e.headerText),columns:[{headerText:"Tên cột",field:"headerText",template:e=>s(e.headerText)}],options:h.filter(e=>"number"===e.dataType),value:l?.table?.fieldTotalTable?h.filter(e=>"number"===e.dataType).filter(e=>l?.table?.fieldTotalTable.includes(e.field)):[],onChange:e=>{return t=e.map(e=>e.field),void a(void 0,{fieldTotalTable:t});var t}})})]})]}),r.jsx("hr",{}),r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25 ",style:{fontSize:13},children:[r.jsx("div",{style:{width:30},children:" "}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"}),r.jsx("div",{className:"w-50",children:r.jsx("span",{children:"Nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:" "})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:n,handle:".drag-icon",className:"",setList:e=>a(e),children:n.map((e,t)=>r.jsx(uQ,{index:t,position:`${t}`,list:n,setListTable:a,setActiveItem:d,activeItem:c,item:e,indent:0,options:i,t:s}))}),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:[{headerText:"Nội dung",type:"text"},...vF(i,n,"field")],value:void 0,noHeader:!0,columns:[{headerText:"",field:"headerText",template:e=>s(e.headerText)}],placeholder:"Chọn thêm thông tin",onChange:e=>{(e=>{a([...n,{...e,headerText:s(e.headerText),headerDisplay:s(e.headerDisplay)}])})(e)}})})]})},fQ=[{value:1,label:"Times New Roman"},{value:2,label:"Arial"},{value:3,label:"Arial Black"},{value:4,label:"Calibri"},{value:5,label:"Cambria"},{value:6,label:"Candara"},{value:7,label:"Comic Sans MS"},{value:8,label:"Consolas"},{value:9,label:"Courier New"},{value:10,label:"Georgia"},{value:11,label:"Impact"},{value:12,label:"Lucida Console"},{value:13,label:"Lucida Sans Unicode"},{value:14,label:"Palatino Linotype"},{value:15,label:"Segoe UI"},{value:16,label:"Tahoma"},{value:17,label:"Trebuchet MS"},{value:18,label:"Verdana"},{value:19,label:"Book Antiqua"},{value:20,label:"Garamond"},{value:21,label:"Gill Sans"},{value:22,label:"Helvetica"},{value:23,label:"Franklin Gothic Medium"},{value:24,label:"Futura"},{value:25,label:"Baskerville"},{value:26,label:"Brush Script MT"},{value:27,label:"Rockwell"},{value:28,label:"Century Gothic"},{value:29,label:"Perpetua"},{value:30,label:"Didot"},{value:31,label:"Arial Narrow"},{value:32,label:"Arial Rounded MT Bold"},{value:33,label:"Calibri Light"},{value:34,label:"Cambria Math"},{value:35,label:"Century"},{value:36,label:"Charter"},{value:37,label:"Cochin"},{value:40,label:"Frank Ruhl"},{value:43,label:"Lucida Bright"},{value:44,label:"Lucida Handwriting"},{value:45,label:"Mongolian Baiti"},{value:46,label:"Miriam"},{value:47,label:"MS Gothic"},{value:48,label:"MS Mincho"},{value:49,label:"MS PMincho"},{value:50,label:"MS PGothic"},{value:51,label:"MT Extra"},{value:52,label:"Palatino"},{value:53,label:"Tisa"},{value:54,label:"Vivaldi"},{value:55,label:"WST_Gothic"},{value:56,label:"Andalus"},{value:57,label:"Angsana New"},{value:58,label:"Arabic Typesetting"},{value:59,label:"Avenir"},{value:60,label:"Browallia New"},{value:63,label:"Iris"},{value:64,label:"Jasmine"},{value:65,label:"Mistral"},{value:66,label:"Myriad Pro"},{value:68,label:"Vladimir Script"},{value:69,label:"Algerian"},{value:70,label:"Berlin Sans FB"},{value:71,label:"Bodoni MT"},{value:72,label:"Bookman Old Style"},{value:73,label:"Copperplate Gothic"},{value:74,label:"Elephant"},{value:75,label:"FangSong"},{value:76,label:"Garamond Premr"},{value:77,label:"Jokerman"},{value:78,label:"Kaiti"},{value:79,label:"MingLiU"},{value:80,label:"Myriad"},{value:81,label:"Oklahoma"},{value:82,label:"Papyrus"},{value:83,label:"Perpetua Titling MT"},{value:84,label:"Rockwell Extra Bold"},{value:85,label:"Script MT Bold"},{value:86,label:"Snap ITC"},{value:88,label:"Viner Hand ITC"},{value:89,label:"Wingdings"},{value:90,label:"Zapf Dingbats"},{value:91,label:"Apple Chancery"},{value:92,label:"Avant Garde"},{value:93,label:"Big Caslon"},{value:94,label:"Bodoni 72"},{value:95,label:"Caslon"},{value:96,label:"Chaparral Pro"},{value:97,label:"Clarendon"},{value:98,label:"Coolvetica"},{value:99,label:"Doulos SIL"},{value:100,label:"Fira Sans"},{value:101,label:"Frutiger"},{value:102,label:"Georgia Pro"},{value:103,label:"Goudy Old Style"},{value:104,label:"ITC Garamond"},{value:105,label:"ITC Officina Sans"},{value:106,label:"Janson Text"},{value:108,label:"Kabel"},{value:109,label:"Lato"},{value:110,label:"Lora"},{value:111,label:"Mangal"},{value:112,label:"Marlett"},{value:113,label:"Minion Pro"},{value:114,label:"Modern No. 20"},{value:115,label:"Neutraface"},{value:116,label:"Noto Sans"},{value:117,label:"Open Sans"},{value:118,label:"Orator"},{value:119,label:"Oswald"},{value:120,label:"Playfair Display"},{value:121,label:"Quicksand"},{value:122,label:"Roboto"},{value:124,label:"Sabon"},{value:125,label:"Segoe Print"},{value:126,label:"Segoe Script"},{value:128,label:"TeX Gyre Adventor"},{value:129,label:"TeX Gyre Bonum"},{value:130,label:"TeX Gyre Chorus"},{value:131,label:"TeX Gyre Cursor"},{value:132,label:"TeX Gyre Heros"},{value:133,label:"TeX Gyre Pagella"},{value:134,label:"TeX Gyre Schola"},{value:135,label:"TeX Gyre Termes"},{value:136,label:"Trajan Pro"},{value:137,label:"Univers"},{value:138,label:"Verdana Pro"},{value:140,label:"Zapf Calligraphic"},{value:141,label:"Zapf Chancery"},{value:143,label:"Abadi MT Condensed"},{value:144,label:"Albertus"},{value:146,label:"Aldine"},{value:147,label:"American Typewriter"},{value:148,label:"Andale Mono"},{value:149,label:"Apple Gothic"},{value:150,label:"Apple Symbols"},{value:151,label:"Arial Unicode MS"},{value:153,label:"Bernhard Fashion"},{value:154,label:"Bernhard Gothic"},{value:155,label:"Bernhard Modern"},{value:157,label:"Blackadder ITC"},{value:158,label:"Bodoni MT Condensed"},{value:160,label:"Bookman"},{value:162,label:"Bradley Hand ITC"},{value:163,label:"Brush Script Std"},{value:164,label:"Calisto MT"},{value:165,label:"Castle"},{value:166,label:"Chalkboard SE"},{value:167,label:"Chalkduster"},{value:168,label:"Cheltenham"},{value:170,label:"Copperplate"},{value:171,label:"Courier"},{value:172,label:"Creepster"},{value:173,label:"Crimson Text"},{value:177,label:"Freestyle Script"},{value:180,label:"Gill Sans MT"},{value:181,label:"Gotham"},{value:182,label:"Harlow Solid Italic"},{value:183,label:"Harrington"},{value:184,label:"Hobo Std"},{value:185,label:"Hoefler Text"},{value:186,label:"Humin"},{value:187,label:"Inconsolata"},{value:189,label:"Kaiti SC"},{value:190,label:"Klavika"},{value:191,label:"Kozuka Gothic"},{value:192,label:"Kozuka Mincho"},{value:193,label:"Lucida Grande"},{value:194,label:"Lucida Sans"},{value:195,label:"Lucida Sans Typewriter"},{value:196,label:"Merryweather"},{value:198,label:"Monaco"},{value:200,label:"Noto Serif"},{value:201,label:"Odin Rounded"},{value:202,label:"Open Sans Condensed"},{value:203,label:"Optima"},{value:205,label:"Parchment"},{value:208,label:"PT Serif"},{value:210,label:"Ravie"},{value:212,label:"Ruge Boogie"},{value:214,label:"Segoe MDL2 Assets"},{value:217,label:"Shonar Bangla"},{value:218,label:"Simplified Arabic"},{value:219,label:"Sitka"},{value:220,label:"Stencil"},{value:221,label:"Swis721 BT"},{value:230,label:"Adobe Caslon Pro"},{value:231,label:"Adobe Garamond Pro"},{value:232,label:"Avenir Next"},{value:233,label:"Baskerville Old Face"},{value:234,label:"Bebas Neue"},{value:235,label:"Bembo"},{value:238,label:"Bodoni MT Poster Compressed"},{value:239,label:"Braggadocio"},{value:241,label:"Castellar"},{value:242,label:"Chiller"},{value:244,label:"Edwardian Script ITC"},{value:245,label:"Exo"},{value:246,label:"Fira Code"},{value:251,label:"Helvetica Neue"},{value:252,label:"Karla"},{value:254,label:"Merriweather"},{value:255,label:"Montserrat"},{value:257,label:"Old English Text MT"},{value:258,label:"Oxygen"},{value:261,label:"Roboto Condensed"},{value:262,label:"Source Sans Pro"},{value:263,label:"Space Mono"},{value:264,label:"Spectral"},{value:265,label:"Titan One"},{value:266,label:"Ubuntu"},{value:267,label:"Ubuntu Condensed"},{value:268,label:"Varela Round"}],mQ=t=>{const{setting:n,setSetting:a,formatNumber:i,CDN_URL_VIEW:o,uploadFileApi:l}=t,{t:s}=dc(),c=(e,t,r)=>{const i=[...n.pageSetting.images??[]];i.length>r&&(i[r][e]=t,a({...n,pageSetting:{...n.pageSetting,images:i}}))},[d,h]=e.useState(!1),[u,p]=e.useState(""),f=()=>{p(""),h(!d)};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Ảnh"),": "]}),r.jsxs("div",{style:{flex:1},children:[n.pageSetting.images?.map((e,t)=>r.jsxs(pV,{className:"p-1",style:{position:"relative"},children:[r.jsx(_P,{className:"btn-reset-image",color:"primary",size:"sm",outline:!0,onClick:()=>(e=>{const t=[...n.pageSetting.images??[]];t.length>0&&t.splice(e,1),a({...n,pageSetting:{...n.pageSetting,images:t}})})(t),children:r.jsx(ud,{fontSize:14})}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50",children:[r.jsx(sQ,{image:e.url,height:60,width:60,uploadFileApi:l,CDN_URL_VIEW:o,onChange:e=>c("url",e?`${o}/${e}`:void 0,t),link:u,setLink:p,openModalLink:d,handleModalLink:f}),r.jsxs("div",{className:"d-flex mt-1",children:[r.jsx("div",{style:{width:30},children:r.jsx(yB,{type:"checkbox",checked:e.behindText??!1,onChange:e=>{c("behindText",e.target.checked,t)}})}),r.jsxs("div",{style:{flex:1},children:[s("Behind on text")," "]})]})]}),r.jsxs("div",{className:"w-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Chiều cao:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{c("height",e,t)},unitString:"cm",value:e.height??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Chiều rộng:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("width",e,t)},value:e.height??0})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Lề trên:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("top",e,t)},value:e.top??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Lề trái:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("left",e,t)},value:e.left??0})]})]})]})]})]},`image-${t}`)),r.jsx(_P,{className:"btn-add-image",color:"primary",size:"sm",outline:!0,onClick:()=>(()=>{const e=[...n.pageSetting.images??[]];e.push({url:"",height:20,width:20,top:0,left:0}),a({...n,pageSetting:{...n.pageSetting,images:e}})})(),children:"Thêm ảnh"})]})]})})},vQ=t=>{const{setting:n,setSetting:a,formatNumber:i,CDN_URL_VIEW:o,uploadFileApi:l}=t,{t:s}=dc(),[c,d]=e.useState(0),h=[{value:"A4",label:s("A4")},{value:"A4R",label:s("A4 horizontal")},{value:"A3",label:s("A3")},{value:"A3R",label:s("A3 horizontal")},{value:"A5",label:s("A5")},{value:"A5R",label:s("A5 horizontal")}],u=e=>{a({...n,pageSetting:{...n.pageSetting,background:e}})};let p;const f=e=>{let t=c+e;const n=document.getElementById("scroll-background"),r=document.getElementById("list-background");n&&r&&r?.offsetWidth-n?.offsetWidth-t>-200&&(t<0&&(t=0),d(t),n.scrollLeft=t)};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"p-1 d-flex flex-column gap-1",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Font"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{options:fQ,noHeader:!0,value:fQ.find(e=>e.label===(n?.style?.fontFamily??dj)),onChange:e=>{var t;t=e.label,a({...n,style:{...n.style,fontFamily:t}})},fieldValue:"label",columns:[{field:"label",headerText:"",template:e=>r.jsx("div",{style:{fontFamily:e.label},children:e.label})}],formatOptionLabel:e=>r.jsx("p",{style:{paddingLeft:3,borderRadius:2,fontFamily:n?.style?.fontFamily??dj},children:e.label})})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Paper size"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{options:h,noHeader:!0,value:h.find(e=>e.value===(n.pageSetting.pageSize??"A4")),onChange:e=>{var t;t=e.value,a({...n,pageSetting:{...n.pageSetting,pageSize:t}})}})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"d-flex w-50",children:[r.jsxs("div",{style:{width:100},children:[s("Text color"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsxs(_P,{tag:"label",color:"none",className:sj("btn-input-style"),children:[r.jsx(sd,{stroke:n?.style?.color??"#000000",fontSize:18}),r.jsx("input",{type:"color",id:"color",value:n?.style?.color??"#000000",style:{color:"#FFF",border:"none",height:0,width:0,outline:"none",padding:0},onChange:e=>{(e=>{clearTimeout(p),p=setTimeout(()=>{a({...n,style:{...n.style,color:e}})},100)})(e.target.value)}})]})})]}),r.jsxs("div",{className:"d-flex w-50",children:[r.jsxs("div",{style:{width:150},children:[s("Khoảng cách"),": "]}),r.jsx("div",{className:"mx-50",children:r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,spaceLayout:e}})},unitString:"px",value:n?.pageSetting?.spaceLayout??0})})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsx("div",{style:{width:100},children:r.jsxs("p",{className:"m-0",children:[s("Margin"),":"]})}),r.jsx("div",{style:{flex:1},children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Top")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginTop:e}})},unitString:"cm",value:n.pageSetting.marginTop})]}),r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Bottom")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginBottom:e}})},unitString:"cm",value:n.pageSetting.marginBottom})]}),r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Left")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginLeft:e}})},unitString:"cm",value:n.pageSetting.marginLeft})]}),r.jsxs("div",{className:"w-25",children:[r.jsx("p",{style:{marginBottom:0},children:s("Right")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginRight:e}})},unitString:"cm",value:n.pageSetting.marginRight})]})]})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Background"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsxs("div",{className:sj("select-background"),style:{width:"100%"},children:[r.jsx("div",{onClick:()=>f(-60),className:sj("btn-scroll"),children:r.jsx(Hc,{})}),r.jsx("div",{id:"scroll-background",className:"list-background",children:r.jsx("div",{id:"list-background",children:hj.map((e,t)=>e.url?r.jsx("div",{onClick:()=>u(e.url),className:sj("background-item",{active:e.url===n.pageSetting.background}),style:{backgroundImage:`url(${e.url})`}},t):r.jsx("div",{onClick:()=>u(e.url),className:sj("background-item",{active:!n.pageSetting.background})},t))})}),r.jsx("div",{onClick:()=>f(60),className:sj("btn-scroll"),children:r.jsx(Tc,{})})]})})]}),r.jsx(mQ,{uploadFileApi:l,setSetting:a,setting:n,CDN_URL_VIEW:o,formatNumber:i})]})})},gQ=t=>{const{setActiveTab:n,activeTab:a,setCurrentDimensions:i,currentLayout:o,currentItem:l,setCurrentItem:s,setting:c,setSetting:d,setCurrentLayout:h,setLayouts:u,handleUpdateLayout:p,dataFields:f,tableFields:m,organization:v,dataItem:g,signatures:b,formatNumber:y,CDN_URL_VIEW:w,uploadFileApi:x}=t,{t:E}=dc(),k=[{name:E("Content"),type:"content",icon:"FileText",w:12,h:1},{name:E("Table"),type:"table",icon:"ListView",w:12,h:5},{name:E("Signature"),type:"signature",icon:"PenTool",w:12,h:5}],C=[{value:0,label:E("Layout")},{value:1,label:E("Nội dung")},{value:2,label:E("Thiết kế trang")}];return r.jsx(e.Fragment,{children:r.jsx("div",{className:"sidebar",children:r.jsx("div",{className:"sidebar-content todo-sidebar",style:{width:600},children:r.jsxs("div",{className:"todo-app-menu",children:[r.jsx("div",{className:"r-tab-custom d-flex cursor-pointer justify-content-center",style:{marginTop:20},children:C.map((e,t)=>r.jsx("div",{onClick:()=>n(e.value),className:sj("r-tab-item",{active:e.value===a}),children:e.label},t))}),r.jsxs(PB,{activeTab:a,style:{overflow:"auto",height:"calc(100% - 46px)",borderTop:"1px solid #eb4619"},children:[r.jsx(jB,{tabId:0,children:r.jsx("div",{className:"droppable-container",children:k.map((e,t)=>r.jsxs("div",{className:"droppable-element drop-content",draggable:!0,unselectable:"on",onDragStart:t=>{t.dataTransfer.setData("text/plain",""),i(e)},onDragEnd:()=>{i(null)},children:[e.icon&&r.jsx(nQ,{iconName:e.icon,size:18,style:{marginRight:"8px",color:"#EB4619"}}),r.jsx("span",{style:{fontWeight:"bold",fontSize:"16px",display:"inline-block"},children:e.name})]},t))})}),r.jsx(jB,{tabId:1,children:r.jsxs("div",{className:"p-1",children:[o&&(!o?.type||"content"===o?.type)&&r.jsx(dQ,{list:o?.children?o.children.flat():[],activeItem:l,setList:()=>{},dataItem:g,options:f,blankOption:[{type:"text",headerText:"Văn bản",default:!0,w:12,width:12,h:1},{type:"template",headerText:"Khối văn bản",default:!0,w:12,width:12,h:1},{type:"companyName",headerText:"Tên công ty",default:!0,w:12,width:12,h:1},{type:"companyAddress",headerText:"Địa chỉ Công ty",default:!0,w:12,width:12,h:1},{type:"image",headerText:"Ảnh",default:!0,w:12,width:12,h:1},{type:"currentDate",headerText:"Ngày hiện tại",default:!0,w:12,width:12,h:1}],onItemClick:e=>{s(e)},CDN_URL_VIEW:w,uploadFileApi:x,formatNumber:y,organization:v,currentLayout:o,setCurrentLayout:h,setting:c,setSetting:d,setLayouts:u,setCurrentItem:s,currentItem:l,handleUpdateLayout:p}),"table"===o?.type&&r.jsx(r.Fragment,{children:r.jsx(pQ,{list:o.table?.columns??[],setListTable:(e,t)=>{if(o.table&&(t||e)){const n={...o,table:{...o.table,columns:e?SF(e,o.table?.columns??[]):o.table.columns,field:t?.field?t?.field:o.table.field,isTotalTable:void 0!==t?.isTotalTable?t?.isTotalTable:o.table.isTotalTable,fieldTotalTable:t?.fieldTotalTable?t?.fieldTotalTable:o.table.fieldTotalTable,fieldSums:t?.fieldSums?t?.fieldSums:o.table.fieldSums}};t&&(n.rows=1+(g[n.table?.field??""]?.length??0)+((n.table?.fieldSums?.length??0)>0?1:0)),h(n),p(n)}},formatNumber:y,currentLayout:o,optionTableFields:m,setCurrentLayout:h,options:m.find(e=>e.field===o.table?.field)?.columns??[]})}),"signature"===o?.type&&r.jsx(hQ,{onItemClick:()=>{},listCurrent:o.signature?.setting?.detail??[],setList:e=>{if(o.signature||(o.signature={setting:{detail:[],loginSigning:1,reportSigning:1,title:""}}),t=e,n=o.signature?.setting?.detail??[],(t?.length??0)!==(n?.length??0)||!t.every((e,t)=>e===n[t])){const t=SF(e,o.signature?.setting?.detail??[]),n={...o,signature:{...o.signature,setting:{...o.signature.setting,detail:t}}};h(n),p(n)}var t,n},options:b,activeItem:l})]})}),r.jsx(jB,{tabId:2,children:r.jsx(vQ,{CDN_URL_VIEW:w,uploadFileApi:x,setSetting:d,setting:c,formatNumber:y})})]})]})})})})},bQ=kY.div`
|
|
544
|
+
`,sQ=({height:t,width:n,onChange:a,onUploadFail:i,image:o,className:l,disable:s,defaultImage:c,uploadFileApi:d,CDN_URL_VIEW:h,link:u,setLink:p,openModalLink:f,handleModalLink:m})=>{const{t:v}=dc(),g=e.useRef(null);return r.jsx(oQ,{className:l,children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"box-image-preview me-1 p-25 rounded border border-1 d-flex justify-content-center align-items-center",style:{width:n,height:t},children:[r.jsx(e.Fragment,{children:r.jsx("img",{className:"rounded",alt:"Generic placeholder image",style:{maxHeight:"100%",maxWidth:"100%"},src:o&&""!==o?o.startsWith("http")?o:`${h}/${o}`:c})}),r.jsx("div",{className:(!0===s?"d-none":"")+" action-reset",children:r.jsx(_P,{className:"btn-reset btn btn-primary",color:"primary",size:"sm",outline:!0,onClick:()=>{a("");const e=g.current?.filesData;e&&e.length>0&&g?.current?.remove(e[0],!1,!0)},children:r.jsx(ud,{fontSize:12})})})]}),r.jsx("div",{className:(!0===s?"d-none":"")+" d-flex flex-column justify-content-center",children:r.jsxs(lQ,{children:[r.jsxs(_P,{outline:!0,tag:"label",className:"me-75 rounded",size:"sm",color:"primary",children:[r.jsx(dd,{fontSize:13}),r.jsx(yB,{type:"file",onChange:e=>(e=>{const t=new FormData;t.append("file",e),d(t).then(e=>{e?.infoFiles?.length>0&&a(e?.infoFiles[0]?.path)}).catch(e=>{i&&i(e)})})(e.target.files[0]),hidden:!0,accept:"image/*"})]}),r.jsx(_P,{className:"rounded",color:"primary",size:"sm",onClick:m,children:r.jsx(Xc,{fontSize:13})})]})}),r.jsxs(eB,{isOpen:f,backdrop:"static",className:"modal-dialog-centered modal-lg",contentClassName:"p-0",onOpened:()=>{},onClosed:()=>{},keyboard:!1,onClick:e=>e.stopPropagation(),children:[r.jsx(jF,{handleModal:m,typeModal:"Add",title:"AddLinkImage"}),r.jsx(aB,{className:"p-1",children:r.jsx(yB,{value:u,onChange:e=>{p&&p(e.target.value)},placeholder:v("VD: https://hinh-anh.jpg")})}),r.jsx("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsxs(e.Fragment,{children:[r.jsx(_P,{onClick:()=>{a(u),m()},color:"primary",className:"add-todo-item me-1",children:v("Save")}),r.jsx(_P,{color:"secondary",onClick:()=>{m()},outline:!0,children:v("Close")})]})})]})]})})},cQ=t=>{const{item:n,currentItem:a,currentLayout:i,handleUpdateLayout:o,formatNumber:l,CDN_URL_VIEW:s,uploadFileApi:c}=t,{innerWidth:d}=window,{t:h}=dc(),u=(e,t)=>{if(!i?.children)return;if(!a?.id)return;const r={...n.imageSetting,[e]:t},l=OF(i.children,a.id,"imageSetting",r),s={...a,children:l};o(s)},[p,f]=e.useState(!1),[m,v]=e.useState("");return r.jsx(e.Fragment,{children:r.jsxs(ej,{className:"w-100",children:[r.jsx($P,{tag:"div",className:"w-100",children:r.jsx("div",{className:"input-disable w-100 cursor-pointer text-primary",style:{fontSize:13},children:"Nhấn để sửa thông tin ảnh"})}),r.jsx(XP,{className:"formula-dropdown icon-dropdown p-0",style:{width:400,maxWidth:d>1280?1280:d,borderRadius:8},children:r.jsxs("div",{className:"d-flex p-1",children:[r.jsx("div",{className:"w-50",children:r.jsx(sQ,{image:n.imageSetting?.url,height:60,width:60,uploadFileApi:c,CDN_URL_VIEW:s,link:m,setLink:v,openModalLink:p,handleModalLink:()=>{v(""),f(!p)},onChange:e=>u("url",e?`${s}/${e}`:void 0)})}),r.jsxs("div",{className:"w-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsxs("p",{className:"m-0 ",style:{fontSize:"13px"},children:[h("Height"),":"]}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,onChange:e=>{u("height",e)},unitString:"cm",value:n.imageSetting?.height??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsxs("p",{className:"m-0 ",style:{fontSize:"13px"},children:[h("Width"),":"]}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("width",e)},value:n.imageSetting?.width??0})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Lề trên:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("top",e)},value:n.imageSetting?.top??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Lề trái:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:l?.decimalSeparator,thousandSeparator:l?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{u("left",e)},value:n.imageSetting?.left??0})]})]})]})]})})]})})},dQ=t=>{const{dataItem:n,list:a,activeItem:i,options:o,blankOption:l,onItemClick:s,currentLayout:c,setCurrentLayout:d,setting:h,setSetting:u,setLayouts:p,setCurrentItem:f,currentItem:m,handleUpdateLayout:v,formatNumber:g,CDN_URL_VIEW:b,uploadFileApi:y}=t,w=e=>{if(!c?.children)return;const t=((e,t)=>EF(e).map(e=>e.filter(e=>e.id!==t)).filter(e=>e.length>0))(c.children,e.id??""),r={...c,rows:Math.max(...t.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:t};d(r),f(c.children[0][0]);const a=LF([...h.layout],r),i=DF(ZF(a,n)??[]);p({lg:i,md:i,sm:i,xs:i,xxs:i}),u({...h,layout:ZF(a,n)})};return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25",children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"}),r.jsx("div",{style:{flex:1},children:r.jsx("span",{style:{fontSize:13},children:"Nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40}})]}),a.map((e,t)=>r.jsxs("div",{onClick:()=>s(e),className:sj("sortable-item d-flex align-items-center py-50",{active:i&&i.id===e.id}),children:[r.jsxs("div",{className:"d-flex gap-75",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:200,backgroundColor:"#f4f5f8"},children:e.headerText}),r.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center"},children:["image"===e.type?r.jsx(r.Fragment,{children:r.jsx(cQ,{item:e,CDN_URL_VIEW:b,uploadFileApi:y,currentItem:m,formatNumber:g,currentLayout:c,handleUpdateLayout:v})}):r.jsx(r.Fragment,{children:r.jsx(yB,{value:e.headerDisplay,style:{fontSize:13},onFocus:()=>s(e),onChange:e=>((e,t)=>{if(!c?.children)return;if(!m?.id)return;const n=OF(c.children,m.id,"headerDisplay",t),r={...m,children:n};v(r)})(0,e.target.value)})}),"date"===e.dataType&&r.jsx(r.Fragment,{children:r.jsx(rQ,{item:e,currentItem:m,currentLayout:c,handleUpdateLayout:v})}),"template"===e.type&&r.jsx(r.Fragment,{children:r.jsx(aQ,{options:[...l?.filter(e=>"image"!==e.type&&"template"!==e.type)??[],...o],currentItem:m,currentLayout:c,handleUpdateLayout:v,formatNumber:g,dataItem:n})})]})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>w(e),fontSize:16,color:"red"})})]},`${e.id}-${t}`)),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:[...l??[],...o],value:void 0,placeholder:"Chọn thêm thông tin",fieldLabel:"headerText",onChange:e=>{(e=>{if(!c?.children)return;const t=[...c.children];let n,r="";"image"===e.type?n={height:20,url:"",width:20}:e.type&&"data"!==e.type||(r=e.headerText);const a=[...t,[{id:mF(),headerText:e.headerText,headerDisplay:r,imageSetting:n,field:e.field,format:e.format,dataType:e.dataType,rows:1,type:e.type??"data",children:"template"===e.type?[]:void 0,style:{fontSize:12,bold:!1}}]],i={...c,rows:Math.max(...a.map(e=>e.reduce((e,t)=>e+(t.rows??0),0))),children:a};d(i);const o=LF([...h.layout],i),l=DF(LF([...h.layout],i));p({lg:l,md:l,sm:l,xs:l,xxs:l}),u({...h,layout:o})})(e)}})})]})},hQ=t=>{const{listCurrent:n,activeItem:a,options:i,setList:o,onItemClick:l,optionsData:s}=t,c=e=>{o([...n,e]),n.find(t=>t.code===e.code)||o([...n,e])},d=(e,t,r)=>{o(CF(n,{...e,[r]:t},"code","code"===r?e.code:void 0))};return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25",style:{fontSize:13},children:[r.jsx("div",{style:{width:30},children:" "}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:150},children:"Tên nhãn dữ liệu"}),r.jsx("div",{className:"w-50",children:r.jsx("span",{children:"Tên nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:" "})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:n,handle:".drag-icon",className:"",setList:e=>o(e),children:n.map((e,t)=>r.jsxs("div",{onClick:()=>l(e),className:sj("sortable-item d-flex align-items-center py-50",{active:a&&a.code===e.code}),children:[r.jsx("div",{style:{width:30},children:r.jsx(Vc,{fontSize:12,className:"drag-icon cursor-move",style:{marginLeft:5}})}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:150,backgroundColor:"#f4f5f8"},children:e.position}),r.jsx("div",{style:{flex:1},children:r.jsx(yB,{value:e.title,style:{fontSize:13},onFocus:()=>l(e),onChange:t=>d(e,t.target.value,"title")})})]}),e.isSignForm&&r.jsx("div",{className:"d-flex justify-content-center ms-50",style:{width:100},children:r.jsx(dy,{options:s,value:s.find(t=>t.field===e.code),fieldValue:"field",fieldLabel:"headerText",menuWidth:300,onChange:t=>{d(e,t.field,"code")}})}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>(e=>{o(n.filter(t=>t.id!==e.id))})(e),fontSize:16,color:"red"})})]},`${e.id}-${t}`))}),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:vF(i,n,"code"),value:void 0,fieldLabel:"position",placeholder:"Chọn thêm thông tin",allowCreate:!0,onChange:e=>{e.isCreatedItem?c({code:e.position,position:e.position,isSignForm:!0,name:"",title:e.position}):c(e)}})})]})},uQ=e=>{const{activeItem:t,indent:n,index:a,item:i,setActiveItem:o,t:l,setListTable:s,list:c,position:d,options:h}=e,u=(e,t,n,r)=>{let a=c;const i=d.split("_").map(e=>parseInt(e,10));for(let e=0;e<i.length-1;e++){const t=i[e];a[t].children||(a[t].children=[]),a=a[t].children??[]}a[r]={...e,[t]:n},s([...c])};return r.jsxs(r.Fragment,{children:[r.jsxs("div",{onClick:()=>o(i),style:{paddingLeft:25*n},className:sj("sortable-item d-flex align-items-center py-50",{active:t&&t.field===i.field}),children:[r.jsx("div",{style:{width:30},children:r.jsx(Vc,{fontSize:12,className:"drag-icon cursor-move",style:{marginLeft:5}})}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("div",{className:"input-disable",style:{fontSize:13,width:200,backgroundColor:"#f4f5f8"},children:i.headerText}),r.jsx("div",{style:{flex:1},children:r.jsx(yB,{value:i.headerDisplay,style:{fontSize:13},onChange:e=>u(i,"headerDisplay",e.target.value,a)})})]}),r.jsx("div",{className:sj("d-flex justify-content-center",{"d-none":"text"!==i.type}),style:{width:20},children:r.jsx(td,{className:"cursor-pointer",onClick:()=>{},fontSize:16,color:"red"})}),0===(i.children?.length??0)&&r.jsx("div",{className:"d-flex justify-content-center ms-50",style:{width:45},children:r.jsx(iQ,{value:i.width,style:{fontSize:13},onChange:e=>u(i,"width",e,a)})}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:20},children:r.jsx(od,{className:"cursor-pointer",onClick:()=>(e=>{let t=c;const n=d.split("_").map(e=>parseInt(e,10));for(let e=0;e<n.length-1;e++){const r=n[e];t[r].children||(t[r].children=[]),t=t[r].children??[]}t.splice(e,1),s([...c])})(a),fontSize:16,color:"red"})})]},a),i.children?.length>0&&i.children.map((e,a)=>r.jsx(uQ,{position:`${d}_${a}`,index:a,setActiveItem:o,list:c,setListTable:s,activeItem:t,item:e,indent:n+1,options:h,t:l})),"text"===i.type&&r.jsx("div",{style:{fontSize:13,paddingLeft:30*(n+1),paddingRight:5},children:r.jsx(dy,{options:[{headerText:"Nội dung",type:"text"},...vF(h,[...i.children??[],{field:"stt"}],"field")],value:void 0,noHeader:!0,columns:[{headerText:"",field:"headerText",template:e=>l(e.headerText)}],placeholder:"Chọn thêm thông tin",onChange:e=>{(e=>{let t=c;const n=d.split("_").map(e=>parseInt(e,10));n.forEach(e=>{t[e].children||(t[e].children=[]),t=t[e].children??[]}),t.push({...e,headerText:l(e.headerText),headerDisplay:l(e.headerDisplay)}),s([...c])})(e)}})})]})},pQ=t=>{const{list:n,setListTable:a,options:i,optionTableFields:o,currentLayout:l}=t,{t:s}=dc(),[c,d]=e.useState(null),h=e.useMemo(()=>xF(n),[n]);return r.jsxs(e.Fragment,{children:[r.jsxs("div",{className:"mb-1 p-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường thông tin bảng:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",options:o,value:o.find(e=>e.field===(l?.table?.field??"")),onChange:e=>{return t=e.field,void a([{headerText:"STT",headerDisplay:"STT",field:"stt",width:40}],{field:t});var t}})})]}),r.jsxs("div",{className:"d-flex mt-50",children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường cộng tổng:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",isMulti:!0,options:h.filter(e=>"number"===e.dataType),formatOptionLabel:e=>s(e.headerText),columns:[{headerText:"Tên cột",field:"headerText",template:e=>s(e.headerText)}],value:l?.table?.fieldSums?h.filter(e=>"number"===e.dataType).filter(e=>l?.table?.fieldSums.includes(e.field)):[],onChange:e=>{return t=e.map(e=>e.field),void a(void 0,{fieldSums:t});var t}})})]}),r.jsxs("div",{className:sj("d-flex mt-50",{"d-none":!l?.table?.fieldSums?.length}),children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Tiêu đề hàng tổng:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(yB,{value:l?.table?.headerSum,onChange:e=>{return t=e.target.value,void a(void 0,{headerSum:t});var t}})})]}),r.jsxs("div",{className:"d-flex mt-50",style:{height:27},children:[r.jsxs("div",{style:{width:200},children:[s("Là bảng gộp")," "]}),r.jsx("div",{style:{width:30},children:r.jsx(yB,{type:"checkbox",checked:l?.table?.isTotalTable??!1,onChange:e=>{return t=e.target.checked,void a(void 0,{isTotalTable:t});var t}})})]}),r.jsxs("div",{className:sj("d-flex mt-50",{"d-none":!l?.table?.isTotalTable}),children:[r.jsx("div",{style:{width:200},children:r.jsx("p",{className:"m-0",children:"Trường cộng gộp:"})}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{fieldValue:"field",fieldLabel:"headerText",isMulti:!0,formatOptionLabel:e=>s(e.headerText),columns:[{headerText:"Tên cột",field:"headerText",template:e=>s(e.headerText)}],options:h.filter(e=>"number"===e.dataType),value:l?.table?.fieldTotalTable?h.filter(e=>"number"===e.dataType).filter(e=>l?.table?.fieldTotalTable.includes(e.field)):[],onChange:e=>{return t=e.map(e=>e.field),void a(void 0,{fieldTotalTable:t});var t}})})]})]}),r.jsx("hr",{}),r.jsxs("div",{className:"d-flex align-items-center mb-75 px-25 ",style:{fontSize:13},children:[r.jsx("div",{style:{width:30},children:" "}),r.jsxs("div",{className:"d-flex gap-1",style:{flex:1},children:[r.jsx("span",{style:{fontSize:13,width:200},children:"Tên nhãn dữ liệu"}),r.jsx("div",{className:"w-50",children:r.jsx("span",{children:"Nhãn trên giao diện"})})]}),r.jsx("div",{className:"d-flex justify-content-center",style:{width:40},children:" "})]}),r.jsx(yc.exports.ReactSortable,{tag:"div",list:n,handle:".drag-icon",className:"",setList:e=>a(e),children:n.map((e,t)=>r.jsx(uQ,{index:t,position:`${t}`,list:n,setListTable:a,setActiveItem:d,activeItem:c,item:e,indent:0,options:i,t:s}))}),r.jsx("div",{style:{fontSize:13},children:r.jsx(dy,{options:[{headerText:"Nội dung",type:"text"},...vF(i,n,"field")],value:void 0,noHeader:!0,columns:[{headerText:"",field:"headerText",template:e=>s(e.headerText)}],placeholder:"Chọn thêm thông tin",onChange:e=>{(e=>{a([...n,{...e,headerText:s(e.headerText),headerDisplay:s(e.headerDisplay)}])})(e)}})})]})},fQ=[{value:1,label:"Times New Roman"},{value:2,label:"Arial"},{value:3,label:"Arial Black"},{value:4,label:"Calibri"},{value:5,label:"Cambria"},{value:6,label:"Candara"},{value:7,label:"Comic Sans MS"},{value:8,label:"Consolas"},{value:9,label:"Courier New"},{value:10,label:"Georgia"},{value:11,label:"Impact"},{value:12,label:"Lucida Console"},{value:13,label:"Lucida Sans Unicode"},{value:14,label:"Palatino Linotype"},{value:15,label:"Segoe UI"},{value:16,label:"Tahoma"},{value:17,label:"Trebuchet MS"},{value:18,label:"Verdana"},{value:19,label:"Book Antiqua"},{value:20,label:"Garamond"},{value:21,label:"Gill Sans"},{value:22,label:"Helvetica"},{value:23,label:"Franklin Gothic Medium"},{value:24,label:"Futura"},{value:25,label:"Baskerville"},{value:26,label:"Brush Script MT"},{value:27,label:"Rockwell"},{value:28,label:"Century Gothic"},{value:29,label:"Perpetua"},{value:30,label:"Didot"},{value:31,label:"Arial Narrow"},{value:32,label:"Arial Rounded MT Bold"},{value:33,label:"Calibri Light"},{value:34,label:"Cambria Math"},{value:35,label:"Century"},{value:36,label:"Charter"},{value:37,label:"Cochin"},{value:40,label:"Frank Ruhl"},{value:43,label:"Lucida Bright"},{value:44,label:"Lucida Handwriting"},{value:45,label:"Mongolian Baiti"},{value:46,label:"Miriam"},{value:47,label:"MS Gothic"},{value:48,label:"MS Mincho"},{value:49,label:"MS PMincho"},{value:50,label:"MS PGothic"},{value:51,label:"MT Extra"},{value:52,label:"Palatino"},{value:53,label:"Tisa"},{value:54,label:"Vivaldi"},{value:55,label:"WST_Gothic"},{value:56,label:"Andalus"},{value:57,label:"Angsana New"},{value:58,label:"Arabic Typesetting"},{value:59,label:"Avenir"},{value:60,label:"Browallia New"},{value:63,label:"Iris"},{value:64,label:"Jasmine"},{value:65,label:"Mistral"},{value:66,label:"Myriad Pro"},{value:68,label:"Vladimir Script"},{value:69,label:"Algerian"},{value:70,label:"Berlin Sans FB"},{value:71,label:"Bodoni MT"},{value:72,label:"Bookman Old Style"},{value:73,label:"Copperplate Gothic"},{value:74,label:"Elephant"},{value:75,label:"FangSong"},{value:76,label:"Garamond Premr"},{value:77,label:"Jokerman"},{value:78,label:"Kaiti"},{value:79,label:"MingLiU"},{value:80,label:"Myriad"},{value:81,label:"Oklahoma"},{value:82,label:"Papyrus"},{value:83,label:"Perpetua Titling MT"},{value:84,label:"Rockwell Extra Bold"},{value:85,label:"Script MT Bold"},{value:86,label:"Snap ITC"},{value:88,label:"Viner Hand ITC"},{value:89,label:"Wingdings"},{value:90,label:"Zapf Dingbats"},{value:91,label:"Apple Chancery"},{value:92,label:"Avant Garde"},{value:93,label:"Big Caslon"},{value:94,label:"Bodoni 72"},{value:95,label:"Caslon"},{value:96,label:"Chaparral Pro"},{value:97,label:"Clarendon"},{value:98,label:"Coolvetica"},{value:99,label:"Doulos SIL"},{value:100,label:"Fira Sans"},{value:101,label:"Frutiger"},{value:102,label:"Georgia Pro"},{value:103,label:"Goudy Old Style"},{value:104,label:"ITC Garamond"},{value:105,label:"ITC Officina Sans"},{value:106,label:"Janson Text"},{value:108,label:"Kabel"},{value:109,label:"Lato"},{value:110,label:"Lora"},{value:111,label:"Mangal"},{value:112,label:"Marlett"},{value:113,label:"Minion Pro"},{value:114,label:"Modern No. 20"},{value:115,label:"Neutraface"},{value:116,label:"Noto Sans"},{value:117,label:"Open Sans"},{value:118,label:"Orator"},{value:119,label:"Oswald"},{value:120,label:"Playfair Display"},{value:121,label:"Quicksand"},{value:122,label:"Roboto"},{value:124,label:"Sabon"},{value:125,label:"Segoe Print"},{value:126,label:"Segoe Script"},{value:128,label:"TeX Gyre Adventor"},{value:129,label:"TeX Gyre Bonum"},{value:130,label:"TeX Gyre Chorus"},{value:131,label:"TeX Gyre Cursor"},{value:132,label:"TeX Gyre Heros"},{value:133,label:"TeX Gyre Pagella"},{value:134,label:"TeX Gyre Schola"},{value:135,label:"TeX Gyre Termes"},{value:136,label:"Trajan Pro"},{value:137,label:"Univers"},{value:138,label:"Verdana Pro"},{value:140,label:"Zapf Calligraphic"},{value:141,label:"Zapf Chancery"},{value:143,label:"Abadi MT Condensed"},{value:144,label:"Albertus"},{value:146,label:"Aldine"},{value:147,label:"American Typewriter"},{value:148,label:"Andale Mono"},{value:149,label:"Apple Gothic"},{value:150,label:"Apple Symbols"},{value:151,label:"Arial Unicode MS"},{value:153,label:"Bernhard Fashion"},{value:154,label:"Bernhard Gothic"},{value:155,label:"Bernhard Modern"},{value:157,label:"Blackadder ITC"},{value:158,label:"Bodoni MT Condensed"},{value:160,label:"Bookman"},{value:162,label:"Bradley Hand ITC"},{value:163,label:"Brush Script Std"},{value:164,label:"Calisto MT"},{value:165,label:"Castle"},{value:166,label:"Chalkboard SE"},{value:167,label:"Chalkduster"},{value:168,label:"Cheltenham"},{value:170,label:"Copperplate"},{value:171,label:"Courier"},{value:172,label:"Creepster"},{value:173,label:"Crimson Text"},{value:177,label:"Freestyle Script"},{value:180,label:"Gill Sans MT"},{value:181,label:"Gotham"},{value:182,label:"Harlow Solid Italic"},{value:183,label:"Harrington"},{value:184,label:"Hobo Std"},{value:185,label:"Hoefler Text"},{value:186,label:"Humin"},{value:187,label:"Inconsolata"},{value:189,label:"Kaiti SC"},{value:190,label:"Klavika"},{value:191,label:"Kozuka Gothic"},{value:192,label:"Kozuka Mincho"},{value:193,label:"Lucida Grande"},{value:194,label:"Lucida Sans"},{value:195,label:"Lucida Sans Typewriter"},{value:196,label:"Merryweather"},{value:198,label:"Monaco"},{value:200,label:"Noto Serif"},{value:201,label:"Odin Rounded"},{value:202,label:"Open Sans Condensed"},{value:203,label:"Optima"},{value:205,label:"Parchment"},{value:208,label:"PT Serif"},{value:210,label:"Ravie"},{value:212,label:"Ruge Boogie"},{value:214,label:"Segoe MDL2 Assets"},{value:217,label:"Shonar Bangla"},{value:218,label:"Simplified Arabic"},{value:219,label:"Sitka"},{value:220,label:"Stencil"},{value:221,label:"Swis721 BT"},{value:230,label:"Adobe Caslon Pro"},{value:231,label:"Adobe Garamond Pro"},{value:232,label:"Avenir Next"},{value:233,label:"Baskerville Old Face"},{value:234,label:"Bebas Neue"},{value:235,label:"Bembo"},{value:238,label:"Bodoni MT Poster Compressed"},{value:239,label:"Braggadocio"},{value:241,label:"Castellar"},{value:242,label:"Chiller"},{value:244,label:"Edwardian Script ITC"},{value:245,label:"Exo"},{value:246,label:"Fira Code"},{value:251,label:"Helvetica Neue"},{value:252,label:"Karla"},{value:254,label:"Merriweather"},{value:255,label:"Montserrat"},{value:257,label:"Old English Text MT"},{value:258,label:"Oxygen"},{value:261,label:"Roboto Condensed"},{value:262,label:"Source Sans Pro"},{value:263,label:"Space Mono"},{value:264,label:"Spectral"},{value:265,label:"Titan One"},{value:266,label:"Ubuntu"},{value:267,label:"Ubuntu Condensed"},{value:268,label:"Varela Round"}],mQ=t=>{const{setting:n,setSetting:a,formatNumber:i,CDN_URL_VIEW:o,uploadFileApi:l}=t,{t:s}=dc(),c=(e,t,r)=>{const i=[...n.pageSetting.images??[]];i.length>r&&(i[r][e]=t,a({...n,pageSetting:{...n.pageSetting,images:i}}))},[d,h]=e.useState(!1),[u,p]=e.useState(""),f=()=>{p(""),h(!d)};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Ảnh"),": "]}),r.jsxs("div",{style:{flex:1},children:[n.pageSetting.images?.map((e,t)=>r.jsxs(pV,{className:"p-1",style:{position:"relative"},children:[r.jsx(_P,{className:"btn-reset-image",color:"primary",size:"sm",outline:!0,onClick:()=>(e=>{const t=[...n.pageSetting.images??[]];t.length>0&&t.splice(e,1),a({...n,pageSetting:{...n.pageSetting,images:t}})})(t),children:r.jsx(ud,{fontSize:14})}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50",children:[r.jsx(sQ,{image:e.url,height:60,width:60,uploadFileApi:l,CDN_URL_VIEW:o,onChange:e=>c("url",e?`${o}/${e}`:void 0,t),link:u,setLink:p,openModalLink:d,handleModalLink:f}),r.jsxs("div",{className:"d-flex mt-1",children:[r.jsx("div",{style:{width:30},children:r.jsx(yB,{type:"checkbox",checked:e.behindText??!1,onChange:e=>{c("behindText",e.target.checked,t)}})}),r.jsxs("div",{style:{flex:1},children:[s("Behind on text")," "]})]})]}),r.jsxs("div",{className:"w-50",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Chiều cao:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{c("height",e,t)},unitString:"cm",value:e.height??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Chiều rộng:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("width",e,t)},value:e.height??0})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-50 me-50",children:[r.jsx("p",{className:"m-0 ",style:{fontSize:"13px"},children:"Lề trên:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("top",e,t)},value:e.top??0})]}),r.jsxs("div",{className:"w-50 ms-50",children:[r.jsx("p",{className:"m-0",style:{fontSize:"13px"},children:"Lề trái:"}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,unitString:"cm",onChange:e=>{c("left",e,t)},value:e.left??0})]})]})]})]})]},`image-${t}`)),r.jsx(_P,{className:"btn-add-image",color:"primary",size:"sm",outline:!0,onClick:()=>(()=>{const e=[...n.pageSetting.images??[]];e.push({url:"",height:20,width:20,top:0,left:0}),a({...n,pageSetting:{...n.pageSetting,images:e}})})(),children:"Thêm ảnh"})]})]})})},vQ=t=>{const{setting:n,setSetting:a,formatNumber:i,CDN_URL_VIEW:o,uploadFileApi:l}=t,{t:s}=dc(),[c,d]=e.useState(0),h=[{value:"A4",label:s("A4")},{value:"A4R",label:s("A4 horizontal")},{value:"A3",label:s("A3")},{value:"A3R",label:s("A3 horizontal")},{value:"A5",label:s("A5")},{value:"A5R",label:s("A5 horizontal")}],u=e=>{a({...n,pageSetting:{...n.pageSetting,background:e}})};let p;const f=e=>{let t=c+e;const n=document.getElementById("scroll-background"),r=document.getElementById("list-background");n&&r&&r?.offsetWidth-n?.offsetWidth-t>-200&&(t<0&&(t=0),d(t),n.scrollLeft=t)};return r.jsx(e.Fragment,{children:r.jsxs("div",{className:"p-1 d-flex flex-column gap-1",children:[r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Font"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{options:fQ,noHeader:!0,value:fQ.find(e=>e.label===(n?.style?.fontFamily??dj)),onChange:e=>{var t;t=e.label,a({...n,style:{...n.style,fontFamily:t}})},fieldValue:"label",columns:[{field:"label",headerText:"",template:e=>r.jsx("div",{style:{fontFamily:e.label},children:e.label})}],formatOptionLabel:e=>r.jsx("p",{style:{paddingLeft:3,borderRadius:2,fontFamily:n?.style?.fontFamily??dj},children:e.label})})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Paper size"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsx(dy,{options:h,noHeader:!0,value:h.find(e=>e.value===(n.pageSetting.pageSize??"A4")),onChange:e=>{var t;t=e.value,a({...n,pageSetting:{...n.pageSetting,pageSize:t}})}})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"d-flex w-50",children:[r.jsxs("div",{style:{width:100},children:[s("Text color"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsxs(_P,{tag:"label",color:"none",className:sj("btn-input-style"),children:[r.jsx(sd,{stroke:n?.style?.color??"#000000",fontSize:18}),r.jsx("input",{type:"color",id:"color",value:n?.style?.color??"#000000",style:{color:"#FFF",border:"none",height:0,width:0,outline:"none",padding:0},onChange:e=>{(e=>{clearTimeout(p),p=setTimeout(()=>{a({...n,style:{...n.style,color:e}})},100)})(e.target.value)}})]})})]}),r.jsxs("div",{className:"d-flex w-50",children:[r.jsxs("div",{style:{width:150},children:[s("Khoảng cách"),": "]}),r.jsx("div",{className:"mx-50",children:r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,spaceLayout:e}})},unitString:"px",value:n?.pageSetting?.spaceLayout??0})})]})]}),r.jsxs("div",{className:"d-flex",children:[r.jsx("div",{style:{width:100},children:r.jsxs("p",{className:"m-0",children:[s("Margin"),":"]})}),r.jsx("div",{style:{flex:1},children:r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Top")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginTop:e}})},unitString:"cm",value:n.pageSetting.marginTop})]}),r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Bottom")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginBottom:e}})},unitString:"cm",value:n.pageSetting.marginBottom})]}),r.jsxs("div",{className:"w-25 me-1",children:[r.jsx("p",{style:{marginBottom:0},children:s("Left")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginLeft:e}})},unitString:"cm",value:n.pageSetting.marginLeft})]}),r.jsxs("div",{className:"w-25",children:[r.jsx("p",{style:{marginBottom:0},children:s("Right")}),r.jsx(iQ,{allowNegative:!0,decimalSeparator:i?.decimalSeparator,thousandSeparator:i?.thousandSeparator,fractionCurrency:2,onChange:e=>{a({...n,pageSetting:{...n.pageSetting,marginRight:e}})},unitString:"cm",value:n.pageSetting.marginRight})]})]})})]}),r.jsxs("div",{className:"d-flex",children:[r.jsxs("div",{style:{width:100},children:[s("Background"),": "]}),r.jsx("div",{style:{flex:1},children:r.jsxs("div",{className:sj("select-background"),style:{width:"100%"},children:[r.jsx("div",{onClick:()=>f(-60),className:sj("btn-scroll"),children:r.jsx(Hc,{})}),r.jsx("div",{id:"scroll-background",className:"list-background",children:r.jsx("div",{id:"list-background",children:hj.map((e,t)=>e.url?r.jsx("div",{onClick:()=>u(e.url),className:sj("background-item",{active:e.url===n.pageSetting.background}),style:{backgroundImage:`url(${e.url})`}},t):r.jsx("div",{onClick:()=>u(e.url),className:sj("background-item",{active:!n.pageSetting.background})},t))})}),r.jsx("div",{onClick:()=>f(60),className:sj("btn-scroll"),children:r.jsx(Tc,{})})]})})]}),r.jsx(mQ,{uploadFileApi:l,setSetting:a,setting:n,CDN_URL_VIEW:o,formatNumber:i})]})})},gQ=t=>{const{setActiveTab:n,activeTab:a,setCurrentDimensions:i,currentLayout:o,currentItem:l,setCurrentItem:s,setting:c,setSetting:d,setCurrentLayout:h,setLayouts:u,handleUpdateLayout:p,dataFields:f,tableFields:m,dataItem:v,signatures:g,formatNumber:b,CDN_URL_VIEW:y,uploadFileApi:w}=t,{t:x}=dc(),E=[{name:x("Content"),type:"content",icon:"FileText",w:12,h:1},{name:x("Table"),type:"table",icon:"ListView",w:12,h:5},{name:x("Signature"),type:"signature",icon:"PenTool",w:12,h:5}],k=[{value:0,label:x("Layout")},{value:1,label:x("Nội dung")},{value:2,label:x("Thiết kế trang")}];return r.jsx(e.Fragment,{children:r.jsx("div",{className:"sidebar",children:r.jsx("div",{className:"sidebar-content todo-sidebar",style:{width:600},children:r.jsxs("div",{className:"todo-app-menu",children:[r.jsx("div",{className:"r-tab-custom d-flex cursor-pointer justify-content-center",style:{marginTop:20},children:k.map((e,t)=>r.jsx("div",{onClick:()=>n(e.value),className:sj("r-tab-item",{active:e.value===a}),children:e.label},t))}),r.jsxs(PB,{activeTab:a,style:{overflow:"auto",height:"calc(100% - 46px)",borderTop:"1px solid #eb4619"},children:[r.jsx(jB,{tabId:0,children:r.jsx("div",{className:"droppable-container",children:E.map((e,t)=>r.jsxs("div",{className:"droppable-element drop-content",draggable:!0,unselectable:"on",onDragStart:t=>{t.dataTransfer.setData("text/plain",""),i(e)},onDragEnd:()=>{i(null)},children:[e.icon&&r.jsx(nQ,{iconName:e.icon,size:18,style:{marginRight:"8px",color:"#EB4619"}}),r.jsx("span",{style:{fontWeight:"bold",fontSize:"16px",display:"inline-block"},children:e.name})]},t))})}),r.jsx(jB,{tabId:1,children:r.jsxs("div",{className:"p-1",children:[o&&(!o?.type||"content"===o?.type)&&r.jsx(dQ,{list:o?.children?o.children.flat():[],activeItem:l,setList:()=>{},dataItem:v,options:f,blankOption:[{type:"text",headerText:"Văn bản",default:!0,w:12,width:12,h:1},{type:"template",headerText:"Khối văn bản",default:!0,w:12,width:12,h:1},{type:"image",headerText:"Ảnh",default:!0,w:12,width:12,h:1}],onItemClick:e=>{s(e)},CDN_URL_VIEW:y,uploadFileApi:w,formatNumber:b,currentLayout:o,setCurrentLayout:h,setting:c,setSetting:d,setLayouts:u,setCurrentItem:s,currentItem:l,handleUpdateLayout:p}),"table"===o?.type&&r.jsx(r.Fragment,{children:r.jsx(pQ,{list:o.table?.columns??[],setListTable:(e,t)=>{if(o.table&&(t||e)){const n={...o,table:{...o.table,columns:e?SF(e,o.table?.columns??[]):o.table.columns,field:t?.field?t?.field:o.table.field,headerSum:t?.headerSum||""===t?.headerSum?t?.headerSum:o.table.headerSum,isTotalTable:void 0!==t?.isTotalTable?t?.isTotalTable:o.table.isTotalTable,fieldTotalTable:t?.fieldTotalTable?t?.fieldTotalTable:o.table.fieldTotalTable,fieldSums:t?.fieldSums?t?.fieldSums:o.table.fieldSums}};t&&(n.rows=1+(v[n.table?.field??""]?.length??0)+((n.table?.fieldSums?.length??0)>0?1:0)),h(n),p(n)}},formatNumber:b,currentLayout:o,optionTableFields:m,setCurrentLayout:h,options:m.find(e=>e.field===o.table?.field)?.columns??[]})}),"signature"===o?.type&&r.jsx(hQ,{onItemClick:()=>{},listCurrent:o.signature?.setting?.detail??[],setList:e=>{if(o.signature||(o.signature={setting:{detail:[],loginSigning:1,reportSigning:1,title:""}}),t=e,n=o.signature?.setting?.detail??[],(t?.length??0)!==(n?.length??0)||!t.every((e,t)=>e===n[t])){const t=SF(e,o.signature?.setting?.detail??[]),n={...o,signature:{...o.signature,setting:{...o.signature.setting,detail:t}}};h(n),p(n)}var t,n},optionsData:f,options:g,activeItem:l})]})}),r.jsx(jB,{tabId:2,children:r.jsx(vQ,{CDN_URL_VIEW:y,uploadFileApi:w,setSetting:d,setting:c,formatNumber:b})})]})]})})})})},bQ=tJ.div`
|
|
545
545
|
cursor: pointer;
|
|
546
546
|
|
|
547
547
|
width: 25px;
|
|
@@ -551,7 +551,7 @@ function pj(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.lengt
|
|
|
551
551
|
background-color: #f0f0f0;
|
|
552
552
|
}
|
|
553
553
|
|
|
554
|
-
`,yQ=t=>{const{setFontFamily:n,fontFamily:a,handleUpdateLayout:i,currentLayout:o,textAlign:l,setTextAlign:s,border:c,setBorder:d,fontStyle:h,setFontStyle:u,fontWeight:p,setFontWeight:f,currentItem:m,fontSize:v,setFontSize:g,textDecoration:b,setTextDecoration:y,handleMainSidebar:w,onSave:x,activeTab:E,showButtonSave:k,setting:C,nameTemplate:S,handleChangeName:M,color:A,setColor:_,isNewTem:O}=t,{t:N}=dc();let Z;const D=(e,t)=>{o&&(clearTimeout(Z),Z=setTimeout(()=>{const n={...o};"table"===o.type&&m&&"string"==typeof m?(n.table[m][t]=e,i(n)):"signature"===o.type?(n?.signature?.style?n.signature.style[t]=e:n.signature={style:{field:e}},i(n)):o.children&&m?.id&&(n.children=OF(o.children,m.id,t,e),i(n)),"color"===t&&_(e)},300))},I=e=>{o&&o.children&&"table"!==o.type&&"signature"!==o.type&&(s(e),i({...o,align:e}))},H=e=>{o&&o.children&&"table"!==o.type&&"signature"!==o.type&&(d(e),i({...o,border:e}))};return r.jsx(e.Fragment,{children:r.jsx("div",{style:{height:50,backgroundColor:"#fff",position:"relative",width:"100%",boxShadow:"0 4px 24px 0 rgba(34, 41, 47, 0.1)",zIndex:5},children:r.jsxs("div",{className:"edit-toolbar d-flex gap-50 px-1 align-items-center h-100 w-100",children:[r.jsx("div",{className:"sidebar-toggle cursor-pointer d-block d-lg-none ",onClick:w,children:r.jsx(Jc,{fontSize:21})}),r.jsxs("div",{className:"d-flex justify-content-between ",style:{flex:1},children:[r.jsxs("div",{className:"d-flex gap-50",style:{height:28},children:[0!==E&&m&&o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{width:200},className:sj({"d-none":!m}),children:r.jsx(dy,{options:fQ,noHeader:!0,value:a?fQ.find(e=>e.label===a):null,onChange:e=>{D(e.label,"fontFamily"),n(e.label)},fieldValue:"label",columns:[{field:"label",headerText:"",template:e=>r.jsx("div",{style:{fontFamily:e.label},children:e.label})}],formatOptionLabel:e=>r.jsx("p",{style:{paddingLeft:3,borderRadius:2,fontFamily:a,fontWeight:p?"bold":"normal",fontStyle:h?"italic":"normal",textDecoration:!0===b?"underline":""},children:e.label})})}),r.jsx("div",{className:sj("ms-25",{"d-none":!m}),style:{width:60},children:r.jsx(dy,{options:Array.from({length:100},(e,t)=>({value:t+1,label:t+1})),noHeader:!0,value:v?{value:v,label:v}:null,onChange:e=>{D(e.value,"fontSize"),g(e.value)}})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":p},{"d-none":!m}),onClick:()=>{D(!p,"bold"),f(!p)},children:r.jsx(Zc,{fontSize:18})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":h},{"d-none":!m}),onClick:()=>{D(!h,"italic"),u(!h)},children:r.jsx(Uc,{fontSize:18})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":b},{"d-none":!m}),onClick:()=>{D(!b,"underline"),y(!b)},children:r.jsx(cd,{fontSize:18})}),r.jsxs(_P,{tag:"label",color:"none",className:sj("btn-input-style"),children:[r.jsx(sd,{stroke:A??"#000000",fontSize:18}),r.jsx("input",{type:"color",id:"color",value:A,style:{color:"#FFF",border:"none",height:0,width:0,outline:"none",padding:0},onChange:e=>{D(e.target.value,"color")}})]})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"left"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("left"),children:r.jsx(_c,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"center"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("center"),children:r.jsx(Ac,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"right"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("right"),children:r.jsx(Oc,{fontSize:18})}),r.jsxs(ej,{tag:"div",children:[r.jsxs($P,{tag:"div",className:"d-flex align-items-center pt-50",children:["none"===c&&r.jsx(Qc,{fontSize:18}),"top"===c&&r.jsx(id,{fontSize:18}),"bottom"===c&&r.jsx(Dc,{fontSize:18}),"left"===c&&r.jsx(Gc,{fontSize:18}),"right"===c&&r.jsx(ad,{fontSize:18}),"vertical"===c&&r.jsx(hd,{fontSize:18}),"horizontal"===c&&r.jsx(Fc,{fontSize:18}),"inside"===c&&r.jsx(Yc,{fontSize:18}),"outside"===c&&r.jsx($c,{fontSize:18}),"full"===c&&r.jsx(Wc,{fontSize:18})]}),r.jsxs(XP,{className:"formula-dropdown icon-dropdown p-50 d-flex",style:{maxWidth:innerWidth>1280?1280:innerWidth,borderRadius:8},children:[r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"none"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("none"),children:r.jsx(Qc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"top"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("top"),children:r.jsx(id,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"bottom"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("bottom"),children:r.jsx(Dc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"left"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("left"),children:r.jsx(Gc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"right"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("right"),children:r.jsx(ad,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"outside"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("outside"),children:r.jsx($c,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"inside"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("inside"),children:r.jsx(Yc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"vertical"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("vertical"),children:r.jsx(hd,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"horizontal"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("horizontal"),children:r.jsx(Fc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"full"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("full"),children:r.jsx(Wc,{fontSize:18})})]})]})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"d-flex justify-content-center",children:[r.jsx("div",{style:{width:100,padding:"5px 7px"},children:" Tên mẫu in: "}),r.jsx("div",{style:{flex:1},children:O?r.jsx(r.Fragment,{children:r.jsx("div",{style:{fontSize:14,padding:"5px 7px",fontWeight:600},children:N(S)})}):r.jsx(r.Fragment,{children:r.jsx(yB,{value:S,style:{fontSize:13},width:200,onChange:e=>M(e.target.value)})})})]}),k&&r.jsx(_P,{color:"primary",onClick:()=>x(C),children:N?N("Save"):"Save"})]})]})]})})})},wQ=e.forwardRef((t,n)=>{const{data:a,height:i,organization:o,printSetting:l,formatNumber:s,dataFields:c,signatures:d,tableFields:h,showButtonSave:u,nameTemplate:p,isNewTem:f,onSaveData:m,handleChangeName:v,CDN_URL_VIEW:g,uploadFileApi:b}=t;e.useImperativeHandle(n,()=>({onSave:te}));const y=37.7,w={A4:{width:21,height:29.7},A4R:{width:29.7,height:21},A3:{width:29.7,height:42},A3R:{width:42,height:29.7},A5:{width:14.8,height:21},A5R:{width:21,height:14.8}},[x,E]=e.useState(!1),[k,C]=e.useState(0),[S,M]=e.useState(dj),[A,_]=e.useState(14),[O,N]=e.useState(!1),[Z,D]=e.useState(!1),[I,H]=e.useState(!1),[T,L]=e.useState("left"),[P,V]=e.useState("none"),[B,j]=e.useState("#000"),[z,R]=e.useState(null),[W,F]=e.useState(w.A4),[q,Y]=e.useState(void 0),[U,G]=e.useState({...l}),[X,K]=e.useState(null),[J,Q]=e.useState(null),[$,ee]=e.useState(null);e.useEffect(()=>{if(l&&!MF(l)){const e={layout:ZF(l.layout,a),style:{...l.style},pageSetting:{...l.pageSetting,images:l.pageSetting.images?.map(e=>({...e}))}};G(e);const t=DF(e.layout??[]);Y({lg:t,md:t,sm:t,xs:t,xxs:t})}},[l]),e.useEffect(()=>{U&&!MF(U)&&F(w[U.pageSetting?.pageSize??"A4"])},[U]);const te=()=>{m({...U})},ne=()=>E(!x),re=e=>{const t=LF([...U.layout],e);G({...U,layout:t})},ae=(e,t)=>{const n=e?.fontSize?e?.fontSize:14;n!==A&&_(n);const r=e?.fontFamily?e?.fontFamily:dj;r!==S&&M(r);const a=!!e?.bold;a!==O&&N(a);const i=!!e?.italic;i!==Z&&D(i);const o=!!e?.underline;o!==I&&H(o);const l=e?.color;l!==B&&j(l);const s=t&&t.align?t.align:e?.textAlign?e?.textAlign:"left";s!==T&&L(s);const c=t&&t.align?t.align:e?.border?e?.border:"none";c!==T&&L(c)};return r.jsx(EJ,{height:i,className:"edit-template-application",children:r.jsxs("div",{className:"template-content-area-wrapper",children:[r.jsx("div",{className:sj("sidebar-left",{show:x}),children:r.jsx(gQ,{setActiveTab:C,activeTab:k,setCurrentDimensions:R,currentItem:$,setCurrentItem:ee,setting:U,dataItem:a,formatNumber:s,setSetting:G,currentLayout:X,setCurrentLayout:K,setLayouts:Y,handleUpdateLayout:re,dataFields:c,signatures:d,tableFields:h,organization:o,CDN_URL_VIEW:g,uploadFileApi:b})}),r.jsxs("div",{className:"content-right",children:[r.jsx("div",{className:sj("body-content-overlay",{show:x}),onClick:ne}),r.jsx(yQ,{setFontFamily:M,fontFamily:S,handleUpdateLayout:re,currentLayout:X,textAlign:T,setTextAlign:L,border:P,setBorder:V,fontStyle:Z,setFontStyle:D,fontWeight:O,setFontWeight:N,currentItem:$,fontSize:A,setFontSize:_,color:B,setColor:j,textDecoration:I,setTextDecoration:H,handleMainSidebar:ne,onSave:te,setting:U,activeTab:k,showButtonSave:u,nameTemplate:p,handleChangeName:v,isNewTem:f}),r.jsx("div",{className:"",style:{backgroundColor:"#e0e0e0",height:"calc(100% - 50px)",width:"100%",padding:"1rem",overflow:"auto"},children:r.jsx("div",{className:" d-flex justify-content-center",style:{minWidth:W.width*y},children:r.jsx("div",{style:{width:W.width*y,minWidth:W.width*y,minHeight:W.height*y,height:"auto",backgroundColor:"#fff",overflow:"hidden"},children:r.jsxs(kJ,{type:0===k?"layout":"section",className:"h-100",style:{position:"relative",paddingTop:(U.pageSetting.marginTop??1)*y,paddingBottom:(U.pageSetting.marginBottom??1)*y,paddingLeft:(U.pageSetting.marginLeft??1)*y,paddingRight:(U.pageSetting.marginRight??1)*y},children:[r.jsx("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundImage:`url(${U.pageSetting.background})`,backgroundSize:"100% 100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",opacity:U.pageSetting.opacity||0===U.pageSetting.opacity?U.pageSetting.opacity:1,zIndex:1}}),U.pageSetting.images?.map((e,t)=>r.jsx("img",{src:e.url,alt:"",width:e.width,height:e.height,style:{position:"absolute",top:e.top,left:e.left,zIndex:e.behindText?1:3}},`image-${t}`)),q&&U.layout&&U.layout.flat().length>0&&0===k&&r.jsx(tQ,{pageSize:W,setting:U,layouts:q,setLayouts:Y,setSetting:G,dataItem:a,currentLayout:X,setCurrentLayout:K,onSetConfig:ae,formatNumber:s,currentItem:$,currentLayoutHover:J,setCurrentLayoutHover:Q,currentDimensions:z,organization:o}),q&&U.layout&&U.layout.length>0&&0!==k&&r.jsx(eQ,{pageSize:W,setting:U,setSetting:G,dataItem:a,currentLayout:X,setCurrentLayout:K,onSetConfig:ae,formatNumber:s,currentItem:$,setCurrentItem:ee,setLayouts:Y,organization:o})]})})})})]})]})})}),xQ={layout:[[{width:12,children:[],type:"content"}]],pageSetting:{marginBottom:.5,marginLeft:1,marginRight:1,marginTop:.5},style:{}},EQ=t=>{const{openModal:n,handleModal:a,typeModal:i,windowSize:o,dataSetting:l,dataSource:s,onSaveData:c,organization:d,signatures:h,formatNumber:u,CDN_URL_VIEW:p,uploadFileApi:f,updateGeneralSettingApi:m}=t,{t:v}=dc(),g=e.useRef(null),[b,y]=e.useState({...xQ}),[w,x]=e.useState(""),E=()=>{a()};return r.jsxs(eB,{isOpen:n,toggle:a,className:"modal-dialog-centered",contentClassName:"p-0",fullscreen:!0,onOpened:async()=>{let e=l.setting;e&&("Add"===i&&(e={...xQ}),e.layout.forEach(e=>{e.filter(e=>"signature"===e.type).forEach(e=>{e.signature?.setting.detail.forEach(e=>{const t=h?.detail?.find(t=>t.code===e.code);t&&(e.name=t.name,e.title||(e.title=t.title))})})}),y(e)),x("Edit"===i?l.name:"")},onClosed:()=>{},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{typeModal:i,handleModal:a,title:"Tùy chọn in",className:"mb-0"}),r.jsx(wQ,{ref:g,nameTemplate:w,isNewTem:l?.isDefault&&"Edit"===i,organization:{...d},handleChangeName:e=>{x(e)},onSaveData:e=>{w?m({id:"Edit"===i?l.id:void 0,name:w,organizationId:d.id,resourceCode:l.resourceCode,type:"PrintDocument",category:"EditTemplate",value:JSON.stringify({type:l.type,setting:e})}).then(e=>{e.isValid?(c(w),E(),XN(v("Edit"===i?"UpdateSuccessful":"AddSuccessful"))):BF(e,v)}).catch(()=>{UN(v,"Edit"===i?"UpdateFail":"AddFail")}):UN(v,"Vui lòng nhập tên mẫu in!")},dataFields:l?.dataFields??[],tableFields:l?.tableFields??[],signatures:h?.detail??[],printSetting:b,height:o.innerHeight-102+"px",data:s,CDN_URL_VIEW:p,uploadFileApi:f,formatNumber:{decimalSeparator:u.decimalSeparator,thousandSeparator:u.thousandSeparator,colorNegative:u.colorNegative,prefixNegative:u.prefixNegative,suffixNegative:u.suffixNegative}}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",className:"me-1",onClick:()=>{g.current&&g.current?.onSave()},children:v("Save")}),r.jsx(_P,{color:"secondary",onClick:E,outline:!0,className:"me-1",children:v("Close")})]})]})};var kQ=e=>"checkbox"===e.type,CQ=e=>e instanceof Date,SQ=e=>null==e;const MQ=e=>"object"==typeof e;var AQ=e=>!SQ(e)&&!Array.isArray(e)&&MQ(e)&&!CQ(e),_Q=e=>AQ(e)&&e.target?kQ(e.target)?e.target.checked:e.target.value:e,OQ=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),NQ="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function ZQ(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(NQ&&(e instanceof Blob||e instanceof FileList)||!n&&!AQ(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return AQ(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=ZQ(e[n]);else t=e}return t}var DQ=e=>Array.isArray(e)?e.filter(Boolean):[],IQ=e=>void 0===e,HQ=(e,t,n)=>{if(!t||!AQ(e))return n;const r=DQ(t.split(/[,[\].]+?/)).reduce((e,t)=>SQ(e)?e:e[t],e);return IQ(r)||r===e?IQ(e[t])?n:e[t]:r};const TQ="blur",LQ="focusout",PQ="change",VQ="onBlur",BQ="onChange",jQ="onSubmit",zQ="onTouched",RQ="all",WQ="max",FQ="min",qQ="maxLength",YQ="minLength",UQ="pattern",GQ="required",XQ="validate",KQ=f.default.createContext(null),JQ=()=>f.default.useContext(KQ);var QQ=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const a=i;return t._proxyFormState[a]!==RQ&&(t._proxyFormState[a]=!r||RQ),n&&(n[a]=!0),e[a]}});return a},$Q=e=>AQ(e)&&!Object.keys(e).length,e$=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return $Q(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||RQ))},t$=e=>Array.isArray(e)?e:[e],n$=(e,t,n)=>n&&t?e===t:!e||!t||e===t||t$(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function r$(e){const t=f.default.useRef(e);t.current=e,f.default.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var a$=e=>"string"==typeof e,i$=(e,t,n,r,a)=>a$(e)?(r&&t.watch.add(e),HQ(n,e,a)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),HQ(n,e))):(r&&(t.watchAll=!0),n);var o$=e=>/^\w*$/.test(e),l$=e=>DQ(e.replace(/["|']|\]/g,"").split(/\.|\[/));function s$(e,t,n){let r=-1;const a=o$(t)?[t]:l$(t),i=a.length,o=i-1;for(;++r<i;){const t=a[r];let i=n;if(r!==o){const n=e[t];i=AQ(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=i,e=e[t]}return e}function c$(e){const t=JQ(),{name:n,control:r=t.control,shouldUnregister:a}=e,i=OQ(r._names.array,n),o=function(e){const t=JQ(),{control:n=t.control,name:r,defaultValue:a,disabled:i,exact:o}=e||{},l=f.default.useRef(r);l.current=r,r$({disabled:i,subject:n._subjects.values,next:e=>{n$(l.current,e.name,o)&&c(ZQ(i$(l.current,n._names,e.values||n._formValues,!1,a)))}});const[s,c]=f.default.useState(n._getWatch(r,a));return f.default.useEffect(()=>n._removeUnmounted()),s}({control:r,name:n,defaultValue:HQ(r._formValues,n,HQ(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=JQ(),{control:n=t.control,disabled:r,name:a,exact:i}=e||{},[o,l]=f.default.useState(n._formState),s=f.default.useRef(!0),c=f.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=f.default.useRef(a);return d.current=a,r$({disabled:r,next:e=>s.current&&n$(d.current,e.name,i)&&e$(e,c.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),f.default.useEffect(()=>(s.current=!0,c.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),QQ(o,n,c.current,!1)}({control:r,name:n}),s=f.default.useRef(r.register(n,{...e.rules,value:o}));return f.default.useEffect(()=>{const e=r._options.shouldUnregister||a,t=(e,t)=>{const n=HQ(r._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=ZQ(HQ(r._options.defaultValues,n));s$(r._defaultValues,n,e),IQ(HQ(r._formValues,n))&&s$(r._formValues,n,e)}return()=>{(i?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,i,a]),{field:{name:n,value:o,onChange:f.default.useCallback(e=>s.current.onChange({target:{value:_Q(e),name:n},type:PQ}),[n]),onBlur:f.default.useCallback(()=>s.current.onBlur({target:{value:HQ(r._formValues,n),name:n},type:TQ}),[n,r]),ref:e=>{const t=HQ(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!HQ(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!HQ(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!HQ(l.touchedFields,n)},error:{enumerable:!0,get:()=>HQ(l.errors,n)}})}}const d$=e=>e.render(c$(e));var h$=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{};const u$=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=HQ(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else AQ(r)&&u$(r,t)}}};var p$=e=>({isOnSubmit:!e||e===jQ,isOnBlur:e===VQ,isOnChange:e===BQ,isOnAll:e===RQ,isOnTouch:e===zQ}),f$=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),m$=(e,t,n)=>{const r=DQ(HQ(e,n));return s$(r,"root",t[n]),s$(e,n,r),e},v$=e=>"boolean"==typeof e,g$=e=>"file"===e.type,b$=e=>"function"==typeof e,y$=e=>{if(!NQ)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},w$=e=>a$(e),x$=e=>"radio"===e.type,E$=e=>e instanceof RegExp;const k$={value:!1,isValid:!1},C$={value:!0,isValid:!0};var S$=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!IQ(e[0].attributes.value)?IQ(e[0].value)||""===e[0].value?C$:{value:e[0].value,isValid:!0}:C$:k$}return k$};const M$={isValid:!1,value:null};var A$=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,M$):M$;function _$(e,t,n="validate"){if(w$(e)||Array.isArray(e)&&e.every(w$)||v$(e)&&!e)return{type:n,message:w$(e)?e:"",ref:t}}var O$=e=>AQ(e)&&!E$(e)?e:{value:e,message:""},N$=async(e,t,n,r,a)=>{const{ref:i,refs:o,required:l,maxLength:s,minLength:c,min:d,max:h,pattern:u,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,b=HQ(t,f);if(!v||g)return{};const y=o?o[0]:i,w=e=>{r&&y.reportValidity&&(y.setCustomValidity(v$(e)?"":e||""),y.reportValidity())},x={},E=x$(i),k=kQ(i),C=E||k,S=(m||g$(i))&&IQ(i.value)&&IQ(b)||y$(i)&&""===i.value||""===b||Array.isArray(b)&&!b.length,M=h$.bind(null,f,n,x),A=(e,t,n,r=qQ,a=YQ)=>{const o=e?t:n;x[f]={type:e?r:a,message:o,ref:i,...M(e?r:a,o)}};if(a?!Array.isArray(b)||!b.length:l&&(!C&&(S||SQ(b))||v$(b)&&!b||k&&!S$(o).isValid||E&&!A$(o).isValid)){const{value:e,message:t}=w$(l)?{value:!!l,message:l}:O$(l);if(e&&(x[f]={type:GQ,message:t,ref:y,...M(GQ,t)},!n))return w(t),x}if(!(S||SQ(d)&&SQ(h))){let e,t;const r=O$(h),a=O$(d);if(SQ(b)||isNaN(b)){const n=i.valueAsDate||new Date(b),o=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,s="week"==i.type;a$(r.value)&&b&&(e=l?o(b)>o(r.value):s?b>r.value:n>new Date(r.value)),a$(a.value)&&b&&(t=l?o(b)<o(a.value):s?b<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(b?+b:b);SQ(r.value)||(e=n>r.value),SQ(a.value)||(t=n<a.value)}if((e||t)&&(A(!!e,r.message,a.message,WQ,FQ),!n))return w(x[f].message),x}if((s||c)&&!S&&(a$(b)||a&&Array.isArray(b))){const e=O$(s),t=O$(c),r=!SQ(e.value)&&b.length>+e.value,a=!SQ(t.value)&&b.length<+t.value;if((r||a)&&(A(r,e.message,t.message),!n))return w(x[f].message),x}if(u&&!S&&a$(b)){const{value:e,message:t}=O$(u);if(E$(e)&&!b.match(e)&&(x[f]={type:UQ,message:t,ref:i,...M(UQ,t)},!n))return w(t),x}if(p)if(b$(p)){const e=_$(await p(b,t),y);if(e&&(x[f]={...e,...M(XQ,e.message)},!n))return w(e.message),x}else if(AQ(p)){let e={};for(const r in p){if(!$Q(e)&&!n)break;const a=_$(await p[r](b,t),y,r);a&&(e={...a,...M(r,a.message)},w(a.message),n&&(x[f]=e))}if(!$Q(e)&&(x[f]={ref:y,...e},!n))return x}return w(!0),x};function Z$(e,t){const n=Array.isArray(t)?t:o$(t)?[t]:l$(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=IQ(e)?r++:e[t[r++]];return e}(e,n),a=n.length-1,i=n[a];return r&&delete r[i],0!==a&&(AQ(r)&&$Q(r)||Array.isArray(r)&&function(e){for(const t in e)if(!IQ(e[t]))return!1;return!0}(r))&&Z$(e,n.slice(0,-1)),e}function D$(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var I$=e=>SQ(e)||!MQ(e);function H$(e,t){if(I$(e)||I$(t))return e===t;if(CQ(e)&&CQ(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(CQ(n)&&CQ(e)||AQ(n)&&AQ(e)||Array.isArray(n)&&Array.isArray(e)?!H$(n,e):n!==e)return!1}}return!0}var T$=e=>"select-multiple"===e.type,L$=e=>y$(e)&&e.isConnected,P$=e=>{for(const t in e)if(b$(e[t]))return!0;return!1};function V$(e,t={}){const n=Array.isArray(e);if(AQ(e)||n)for(const n in e)Array.isArray(e[n])||AQ(e[n])&&!P$(e[n])?(t[n]=Array.isArray(e[n])?[]:{},V$(e[n],t[n])):SQ(e[n])||(t[n]=!0);return t}function B$(e,t,n){const r=Array.isArray(e);if(AQ(e)||r)for(const r in e)Array.isArray(e[r])||AQ(e[r])&&!P$(e[r])?IQ(t)||I$(n[r])?n[r]=Array.isArray(e[r])?V$(e[r],[]):{...V$(e[r])}:B$(e[r],SQ(t)?{}:t[r],n[r]):n[r]=!H$(e[r],t[r]);return n}var j$=(e,t)=>B$(e,t,V$(t)),z$=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>IQ(e)?e:t?""===e?NaN:e?+e:e:n&&a$(e)?new Date(e):r?r(e):e;function R$(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return g$(t)?t.files:x$(t)?A$(e.refs).value:T$(t)?[...t.selectedOptions].map(({value:e})=>e):kQ(t)?S$(e.refs).value:z$(IQ(t.value)?e.ref.value:t.value,e)}var W$=e=>IQ(e)?e:E$(e)?e.source:AQ(e)?E$(e.value)?e.value.source:e.value:e;function F$(e,t,n){const r=HQ(e,n);if(r||o$(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),i=HQ(t,r),o=HQ(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};a.pop()}return{name:n}}const q$={mode:jQ,reValidateMode:BQ,shouldFocusError:!0};function Y$(e={},t){let n,r={...q$,...e},a={submitCount:0,isDirty:!1,isLoading:b$(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=(AQ(r.defaultValues)||AQ(r.values))&&ZQ(r.defaultValues||r.values)||{},l=r.shouldUnregister?{}:ZQ(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:D$(),array:D$(),state:D$()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,f=p$(r.mode),m=p$(r.reValidateMode),v=r.criteriaMode===RQ,g=async e=>{if(h.isValid||e){const e=r.resolver?$Q((await E()).errors):await k(i,!0);e!==a.isValid&&u.state.next({isValid:e})}},b=e=>h.isValidating&&u.state.next({isValidating:e}),y=(e,t,n,r)=>{const a=HQ(i,e);if(a){const i=HQ(l,e,IQ(n)?HQ(o,e):n);IQ(i)||r&&r.defaultChecked||t?s$(l,e,t?i:R$(a._f)):M(e,i),s.mount&&g()}},w=(e,t,n,r,i)=>{let l=!1,s=!1;const c={name:e};if(!n||r){h.isDirty&&(s=a.isDirty,a.isDirty=c.isDirty=C(),l=s!==c.isDirty);const n=H$(HQ(o,e),t);s=HQ(a.dirtyFields,e),n?Z$(a.dirtyFields,e):s$(a.dirtyFields,e,!0),c.dirtyFields=a.dirtyFields,l=l||h.dirtyFields&&s!==!n}if(n){const t=HQ(a.touchedFields,e);t||(s$(a.touchedFields,e,n),c.touchedFields=a.touchedFields,l=l||h.touchedFields&&t!==n)}return l&&i&&u.state.next(c),l?c:{}},x=(t,r,i,o)=>{const l=HQ(a.errors,t),s=h.isValid&&v$(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{s$(a.errors,e,t),u.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(d),d=setTimeout(c,e)},n(e.delayError)):(clearTimeout(d),n=null,i?s$(a.errors,t,i):Z$(a.errors,t)),(i?!H$(l,i):l)||!$Q(o)||s){const e={...o,...s&&v$(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},u.state.next(e)}b(!1)},E=async e=>r.resolver(l,r.context,((e,t,n,r)=>{const a={};for(const n of e){const e=HQ(t,n);e&&s$(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}})(e||c.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),k=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=c.array.has(e.name),s=await N$(o,l,v,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(HQ(s,e.name)?i?m$(a.errors,s,e.name):s$(a.errors,e.name,s[e.name]):Z$(a.errors,e.name))}i&&await k(i,t,n)}}return n.valid},C=(e,t)=>(e&&t&&s$(l,e,t),!H$(Z(),o)),S=(e,t,n)=>i$(e,c,{...s.mount?l:IQ(t)?o:a$(e)?{[e]:t}:t},n,t),M=(e,t,n={})=>{const r=HQ(i,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&s$(l,e,z$(t,n)),a=y$(n.ref)&&SQ(t)?"":t,T$(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?kQ(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(e=>e.checked=e.value===a):g$(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||u.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&w(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&N(e)},A=(e,t,n)=>{for(const r in t){const a=t[r],o=`${e}.${r}`,l=HQ(i,o);!c.array.has(e)&&I$(a)&&(!l||l._f)||CQ(a)?M(o,a,n):A(o,a,n)}},_=(e,n,r={})=>{const d=HQ(i,e),p=c.array.has(e),f=ZQ(n);s$(l,e,f),p?(u.array.next({name:e,values:{...l}}),(h.isDirty||h.dirtyFields)&&r.shouldDirty&&u.state.next({name:e,dirtyFields:j$(o,l),isDirty:C(e,f)})):!d||d._f||SQ(f)?M(e,f,r):A(e,f,r),f$(e,c)&&u.state.next({...a}),u.values.next({name:e,values:{...l}}),!s.mount&&t()},O=async e=>{const t=e.target;let o=t.name,s=!0;const d=HQ(i,o);if(d){let y,C;const S=t.type?R$(d._f):_Q(e),M=e.type===TQ||e.type===LQ,A=!((p=d._f).mount&&(p.required||p.min||p.max||p.maxLength||p.minLength||p.pattern||p.validate)||r.resolver||HQ(a.errors,o)||d._f.deps)||((e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e))(M,HQ(a.touchedFields,o),a.isSubmitted,m,f),_=f$(o,c,M);s$(l,o,S),M?(d._f.onBlur&&d._f.onBlur(e),n&&n(0)):d._f.onChange&&d._f.onChange(e);const O=w(o,S,M,!1),Z=!$Q(O)||_;if(!M&&u.values.next({name:o,type:e.type,values:{...l}}),A)return h.isValid&&g(),Z&&u.state.next({name:o,..._?{}:O});if(!M&&_&&u.state.next({...a}),b(!0),r.resolver){const{errors:e}=await E([o]),t=F$(a.errors,i,o),n=F$(e,i,t.name||o);y=n.error,o=n.name,C=$Q(e)}else y=(await N$(d,l,v,r.shouldUseNativeValidation))[o],s=isNaN(S)||S===HQ(l,o,S),s&&(y?C=!1:h.isValid&&(C=await k(i,!0)));s&&(d._f.deps&&N(d._f.deps),x(o,C,y,O))}var p},N=async(e,t={})=>{let n,o;const l=t$(e);if(b(!0),r.resolver){const t=await(async e=>{const{errors:t}=await E();if(e)for(const n of e){const e=HQ(t,n);e?s$(a.errors,n,e):Z$(a.errors,n)}else a.errors=t;return t})(IQ(e)?e:l);n=$Q(t),o=e?!l.some(e=>HQ(t,e)):n}else e?(o=(await Promise.all(l.map(async e=>{const t=HQ(i,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||a.isValid)&&g()):o=n=await k(i);return u.state.next({...!a$(e)||h.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!o&&u$(i,e=>e&&HQ(a.errors,e),e?l:c.mount),o},Z=e=>{const t={...o,...s.mount?l:{}};return IQ(e)?t:a$(e)?HQ(t,e):e.map(e=>HQ(t,e))},D=(e,t)=>({invalid:!!HQ((t||a).errors,e),isDirty:!!HQ((t||a).dirtyFields,e),isTouched:!!HQ((t||a).touchedFields,e),error:HQ((t||a).errors,e)}),I=(e,t={})=>{for(const n of e?t$(e):c.mount)c.mount.delete(n),c.array.delete(n),t.keepValue||(Z$(i,n),Z$(l,n)),!t.keepError&&Z$(a.errors,n),!t.keepDirty&&Z$(a.dirtyFields,n),!t.keepTouched&&Z$(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&Z$(o,n);u.values.next({values:{...l}}),u.state.next({...a,...t.keepDirty?{isDirty:C()}:{}}),!t.keepIsValid&&g()},H=(e,t={})=>{let n=HQ(i,e);const a=v$(t.disabled);return s$(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),n?a&&s$(l,e,t.disabled?void 0:HQ(l,e,R$(n._f))):y(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:W$(t.min),max:W$(t.max),minLength:W$(t.minLength),maxLength:W$(t.maxLength),pattern:W$(t.pattern)}:{},name:e,onChange:O,onBlur:O,ref:a=>{if(a){H(e,t),n=HQ(i,e);const r=IQ(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,l=(e=>x$(e)||kQ(e))(r),s=n._f.refs||[];if(l?s.find(e=>e===r):r===n._f.ref)return;s$(i,e,{_f:{...n._f,...l?{refs:[...s.filter(L$),r,...Array.isArray(HQ(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=HQ(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!OQ(c.array,e)||!s.action)&&c.unMount.add(e)}}},T=()=>r.shouldFocusError&&u$(i,e=>e&&HQ(a.errors,e),c.mount),L=(n,r={})=>{const d=n||o,f=ZQ(d),m=n&&!$Q(n)?f:o;if(r.keepDefaultValues||(o=d),!r.keepValues){if(r.keepDirtyValues||p)for(const e of c.mount)HQ(a.dirtyFields,e)?s$(m,e,HQ(l,e)):_(e,HQ(m,e));else{if(NQ&&IQ(n))for(const e of c.mount){const t=HQ(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(y$(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}l=e.shouldUnregister?r.keepDefaultValues?ZQ(o):{}:f,u.array.next({values:{...m}}),u.values.next({values:{...m}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!h.isValid||!!r.keepIsValid,s.watch=!!e.shouldUnregister,u.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||H$(n,o)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?j$(o,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},P=(e,t)=>L(b$(e)?e(l):e,t);return{control:{register:H,unregister:I,getFieldState:D,_executeSchema:E,_getWatch:S,_getDirty:C,_updateValid:g,_removeUnmounted:()=>{for(const e of c.unMount){const t=HQ(i,e);t&&(t._f.refs?t._f.refs.every(e=>!L$(e)):!L$(t._f.ref))&&I(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,r,c=!0,d=!0)=>{if(r&&n){if(s.action=!0,d&&Array.isArray(HQ(i,e))){const t=n(HQ(i,e),r.argA,r.argB);c&&s$(i,e,t)}if(d&&Array.isArray(HQ(a.errors,e))){const t=n(HQ(a.errors,e),r.argA,r.argB);c&&s$(a.errors,e,t),((e,t)=>{!DQ(HQ(e,t)).length&&Z$(e,t)})(a.errors,e)}if(h.touchedFields&&d&&Array.isArray(HQ(a.touchedFields,e))){const t=n(HQ(a.touchedFields,e),r.argA,r.argB);c&&s$(a.touchedFields,e,t)}h.dirtyFields&&(a.dirtyFields=j$(o,l)),u.state.next({name:e,isDirty:C(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else s$(l,e,t)},_getFieldArray:t=>DQ(HQ(s.mount?l:o,t,e.shouldUnregister?HQ(o,t,[]):[])),_reset:L,_resetDefaultValues:()=>b$(r.defaultValues)&&r.defaultValues().then(e=>{P(e,r.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:e=>{a={...a,...e}},_subjects:u,_proxyFormState:h,get _fields(){return i},get _formValues(){return l},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:N,register:H,handleSubmit:(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let o=ZQ(l);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await E();a.errors=e,o=t}else await k(i);Z$(a.errors,"root"),$Q(a.errors)?(u.state.next({errors:{}}),await e(o,n)):(t&&await t({...a.errors},n),T(),setTimeout(T)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$Q(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>b$(e)?u.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:_,getValues:Z,reset:P,resetField:(e,t={})=>{HQ(i,e)&&(IQ(t.defaultValue)?_(e,HQ(o,e)):(_(e,t.defaultValue),s$(o,e,t.defaultValue)),t.keepTouched||Z$(a.touchedFields,e),t.keepDirty||(Z$(a.dirtyFields,e),a.isDirty=t.defaultValue?C(e,HQ(o,e)):C()),t.keepError||(Z$(a.errors,e),h.isValid&&g()),u.state.next({...a}))},clearErrors:e=>{e&&t$(e).forEach(e=>Z$(a.errors,e)),u.state.next({errors:e?a.errors:{}})},unregister:I,setError:(e,t,n)=>{const r=(HQ(i,e,{_f:{}})._f||{}).ref;s$(a.errors,e,{...t,ref:r}),u.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{const n=HQ(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}var U$,G$,X$=function(e,t,n){if(e&&"reportValidity"in e){var r=HQ(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},K$=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?X$(r.ref,n,e):r.refs&&r.refs.forEach(function(t){return X$(t,n,e)})};for(var r in t.fields)n(r)},J$=function(e,t){t.shouldUseNativeValidation&&K$(e,t);var n={};for(var r in e){var a=HQ(t.fields,r);s$(n,r,Object.assign(e[r],{ref:a&&a.ref}))}return n},Q$=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(r,a,i){try{return Promise.resolve(function(o,l){try{var s=(t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:a}))).then(function(e){return i.shouldUseNativeValidation&&K$({},i),{values:n.rawValues?r:e,errors:{}}}))}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(0,function(e){if(!e.inner)throw e;return{values:{},errors:J$((t=e,n=!i.shouldUseNativeValidation&&"all"===i.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,a=r&&r[t.type];e[t.path]=h$(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},{})),i)};var t,n}))}catch(e){return Promise.reject(e)}}};try{U$=Map}catch(qNe){}try{G$=Set}catch(qNe){}function $$(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(e0);if(U$&&e instanceof U$)return new Map(Array.from(e.entries()));if(G$&&e instanceof G$)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var a in n.push(r),e){var i=t.findIndex(function(t){return t===e[a]});r[a]=i>-1?n[i]:$$(e[a],t,n)}return r}return e}function e0(e){return $$(e,[],[])}const t0=Object.prototype.toString,n0=Error.prototype.toString,r0=RegExp.prototype.toString,a0="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",i0=/^Symbol\((.*)\)(.*)$/;function o0(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return a0.call(e).replace(i0,"Symbol($1)");const r=t0.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+n0.call(e)+"]":"RegExp"===r?r0.call(e):null}function l0(e,t){let n=o0(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=o0(this[e],t);return null!==r?r:n},2)}let s0={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let a=null!=r&&r!==n,i=`${e} must be a \`${t}\` type, but the final value was: \`${l0(n,!0)}\``+(a?` (cast from the value \`${l0(r,!0)}\`).`:".");return null===n&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},c0={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},d0={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},h0={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:s0,string:c0,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:d0,object:h0,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});var u0=Object.prototype.hasOwnProperty;var p0=function(e,t){return null!=e&&u0.call(e,t)},f0=Array.isArray,m0="object"==typeof _I&&_I&&_I.Object===Object&&_I,v0=m0,g0="object"==typeof self&&self&&self.Object===Object&&self,b0=v0||g0||Function("return this")(),y0=b0.Symbol,w0=y0,x0=Object.prototype,E0=x0.hasOwnProperty,k0=x0.toString,C0=w0?w0.toStringTag:void 0;var S0=function(e){var t=E0.call(e,C0),n=e[C0];try{e[C0]=void 0;var r=!0}catch(e){}var a=k0.call(e);return r&&(t?e[C0]=n:delete e[C0]),a},M0=Object.prototype.toString;var A0=S0,_0=function(e){return M0.call(e)},O0=y0?y0.toStringTag:void 0;var N0=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O0&&O0 in Object(e)?A0(e):_0(e)};var Z0=function(e){return null!=e&&"object"==typeof e},D0=N0,I0=Z0;var H0=function(e){return"symbol"==typeof e||I0(e)&&"[object Symbol]"==D0(e)},T0=f0,L0=H0,P0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V0=/^\w*$/;var B0=function(e,t){if(T0(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!L0(e))||(V0.test(e)||!P0.test(e)||null!=t&&e in Object(t))};var j0=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},z0=N0,R0=j0;var W0=function(e){if(!R0(e))return!1;var t=z0(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},F0=b0["__core-js_shared__"],q0=function(){var e=/[^.]+$/.exec(F0&&F0.keys&&F0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var Y0=function(e){return!!q0&&q0 in e},U0=Function.prototype.toString;var G0=function(e){if(null!=e){try{return U0.call(e)}catch(e){}try{return e+""}catch(e){}}return""},X0=W0,K0=Y0,J0=j0,Q0=G0,$0=/^\[object .+?Constructor\]$/,e1=Function.prototype,t1=Object.prototype,n1=e1.toString,r1=t1.hasOwnProperty,a1=RegExp("^"+n1.call(r1).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var i1=function(e,t){return null==e?void 0:e[t]},o1=function(e){return!(!J0(e)||K0(e))&&(X0(e)?a1:$0).test(Q0(e))},l1=i1;var s1=function(e,t){var n=l1(e,t);return o1(n)?n:void 0},c1=s1(Object,"create"),d1=c1;var h1=function(){this.__data__=d1?d1(null):{},this.size=0};var u1=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p1=c1,f1=Object.prototype.hasOwnProperty;var m1=function(e){var t=this.__data__;if(p1){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return f1.call(t,e)?t[e]:void 0},v1=c1,g1=Object.prototype.hasOwnProperty;var b1=c1;var y1=h1,w1=u1,x1=m1,E1=function(e){var t=this.__data__;return v1?void 0!==t[e]:g1.call(t,e)},k1=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=b1&&void 0===t?"__lodash_hash_undefined__":t,this};function C1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}C1.prototype.clear=y1,C1.prototype.delete=w1,C1.prototype.get=x1,C1.prototype.has=E1,C1.prototype.set=k1;var S1=C1;var M1=function(){this.__data__=[],this.size=0};var A1=function(e,t){return e===t||e!=e&&t!=t},_1=A1;var O1=function(e,t){for(var n=e.length;n--;)if(_1(e[n][0],t))return n;return-1},N1=O1,Z1=Array.prototype.splice;var D1=function(e){var t=this.__data__,n=N1(t,e);return!(n<0)&&(n==t.length-1?t.pop():Z1.call(t,n,1),--this.size,!0)},I1=O1;var H1=function(e){var t=this.__data__,n=I1(t,e);return n<0?void 0:t[n][1]},T1=O1;var L1=O1;var P1=function(e,t){var n=this.__data__,r=L1(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},V1=M1,B1=D1,j1=H1,z1=function(e){return T1(this.__data__,e)>-1},R1=P1;function W1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}W1.prototype.clear=V1,W1.prototype.delete=B1,W1.prototype.get=j1,W1.prototype.has=z1,W1.prototype.set=R1;var F1=W1,q1=s1(b0,"Map"),Y1=S1,U1=F1,G1=q1;var X1=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},K1=X1;var J1=function(e,t){var n=e.__data__;return K1(t)?n["string"==typeof t?"string":"hash"]:n.map},Q1=J1;var $1=J1;var e2=J1;var t2=J1;var n2=function(){this.size=0,this.__data__={hash:new Y1,map:new(G1||U1),string:new Y1}},r2=function(e){var t=Q1(this,e).delete(e);return this.size-=t?1:0,t},a2=function(e){return $1(this,e).get(e)},i2=function(e){return e2(this,e).has(e)},o2=function(e,t){var n=t2(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function l2(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l2.prototype.clear=n2,l2.prototype.delete=r2,l2.prototype.get=a2,l2.prototype.has=i2,l2.prototype.set=o2;var s2=l2,c2=s2;function d2(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(d2.Cache||c2),n}d2.Cache=c2;var h2=d2;var u2=function(e){var t=h2(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t},p2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f2=/\\(\\)?/g,m2=u2(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(p2,function(e,n,r,a){t.push(r?a.replace(f2,"$1"):n||e)}),t}),v2=m2;var g2=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},b2=g2,y2=f0,w2=H0,x2=y0?y0.prototype:void 0,E2=x2?x2.toString:void 0;var k2=function e(t){if("string"==typeof t)return t;if(y2(t))return b2(t,e)+"";if(w2(t))return E2?E2.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},C2=k2;var S2=function(e){return null==e?"":C2(e)},M2=f0,A2=B0,_2=v2,O2=S2;var N2=function(e,t){return M2(e)?e:A2(e,t)?[e]:_2(O2(e))},Z2=N0,D2=Z0;var I2=function(e){return D2(e)&&"[object Arguments]"==Z2(e)},H2=Z0,T2=Object.prototype,L2=T2.hasOwnProperty,P2=T2.propertyIsEnumerable,V2=I2(function(){return arguments}())?I2:function(e){return H2(e)&&L2.call(e,"callee")&&!P2.call(e,"callee")},B2=/^(?:0|[1-9]\d*)$/;var j2=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&B2.test(e))&&e>-1&&e%1==0&&e<t};var z2=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},R2=H0;var W2=function(e){if("string"==typeof e||R2(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},F2=N2,q2=V2,Y2=f0,U2=j2,G2=z2,X2=W2;var K2=function(e,t,n){for(var r=-1,a=(t=F2(t,e)).length,i=!1;++r<a;){var o=X2(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=a?i:!!(a=null==e?0:e.length)&&G2(a)&&U2(o,a)&&(Y2(e)||q2(e))},J2=p0,Q2=K2;var $2=function(e,t){return null!=e&&Q2(e,t,J2)};const e5=e=>e&&e.__isYupSchema__;class t5{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!$2(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=t,i="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=i(...e)?r:a;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!e5(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function n5(e){return null==e?[]:[].concat(e)}function r5(){return r5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r5.apply(this,arguments)}let a5=/\$\{\s*(\w+)\s*\}/g;class i5 extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=r5({},t,{path:n})),"string"==typeof e?e.replace(a5,(e,n)=>l0(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],n5(e).forEach(e=>{i5.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,i5)}}function o5(e,t){let{endEarly:n,tests:r,args:a,value:i,errors:o,sort:l,path:s}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),d=r.length;const h=[];if(o=o||[],!d)return o.length?c(new i5(o,i,s)):c(null,i);for(let e=0;e<r.length;e++){(0,r[e])(a,function(e){if(e){if(!i5.isError(e))return c(e,i);if(n)return e.value=i,c(e,i);h.push(e)}if(--d<=0){if(h.length&&(l&&h.sort(l),o.length&&h.push(...o),o=h),o.length)return void c(new i5(o,i,s),i);c(null,i)}})}}var l5=s1,s5=function(){try{var e=l5(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var c5=function(e,t,n){"__proto__"==t&&s5?s5(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var d5=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===n(i[s],s,i))break}return t}},h5=d5();var u5=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},p5={exports:{}};var f5=function(){return!1};!function(e,t){var n=b0,r=f5,a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?n.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l}(p5,p5.exports);var m5=N0,v5=z2,g5=Z0,b5={};b5["[object Float32Array]"]=b5["[object Float64Array]"]=b5["[object Int8Array]"]=b5["[object Int16Array]"]=b5["[object Int32Array]"]=b5["[object Uint8Array]"]=b5["[object Uint8ClampedArray]"]=b5["[object Uint16Array]"]=b5["[object Uint32Array]"]=!0,b5["[object Arguments]"]=b5["[object Array]"]=b5["[object ArrayBuffer]"]=b5["[object Boolean]"]=b5["[object DataView]"]=b5["[object Date]"]=b5["[object Error]"]=b5["[object Function]"]=b5["[object Map]"]=b5["[object Number]"]=b5["[object Object]"]=b5["[object RegExp]"]=b5["[object Set]"]=b5["[object String]"]=b5["[object WeakMap]"]=!1;var y5=function(e){return g5(e)&&v5(e.length)&&!!b5[m5(e)]};var w5=function(e){return function(t){return e(t)}},x5={exports:{}};!function(e,t){var n=m0,r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,i=a&&a.exports===r&&n.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(x5,x5.exports);var E5=y5,k5=w5,C5=x5.exports,S5=C5&&C5.isTypedArray,M5=S5?k5(S5):E5,A5=u5,_5=V2,O5=f0,N5=p5.exports,Z5=j2,D5=M5,I5=Object.prototype.hasOwnProperty;var H5=function(e,t){var n=O5(e),r=!n&&_5(e),a=!n&&!r&&N5(e),i=!n&&!r&&!a&&D5(e),o=n||r||a||i,l=o?A5(e.length,String):[],s=l.length;for(var c in e)!t&&!I5.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Z5(c,s))||l.push(c);return l},T5=Object.prototype;var L5=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T5)};var P5=function(e,t){return function(n){return e(t(n))}},V5=P5(Object.keys,Object),B5=L5,j5=V5,z5=Object.prototype.hasOwnProperty;var R5=function(e){if(!B5(e))return j5(e);var t=[];for(var n in Object(e))z5.call(e,n)&&"constructor"!=n&&t.push(n);return t},W5=W0,F5=z2;var q5=H5,Y5=R5,U5=function(e){return null!=e&&F5(e.length)&&!W5(e)};var G5=function(e){return U5(e)?q5(e):Y5(e)},X5=h5,K5=G5;var J5=function(e,t){return e&&X5(e,t,K5)},Q5=F1;var $5=F1,e3=q1,t3=s2;var n3=F1,r3=function(){this.__data__=new Q5,this.size=0},a3=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},i3=function(e){return this.__data__.get(e)},o3=function(e){return this.__data__.has(e)},l3=function(e,t){var n=this.__data__;if(n instanceof $5){var r=n.__data__;if(!e3||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new t3(r)}return n.set(e,t),this.size=n.size,this};function s3(e){var t=this.__data__=new n3(e);this.size=t.size}s3.prototype.clear=r3,s3.prototype.delete=a3,s3.prototype.get=i3,s3.prototype.has=o3,s3.prototype.set=l3;var c3=s3;var d3=s2,h3=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},u3=function(e){return this.__data__.has(e)};function p3(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new d3;++t<n;)this.add(e[t])}p3.prototype.add=p3.prototype.push=h3,p3.prototype.has=u3;var f3=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var m3=function(e,t){return e.has(t)},v3=p3,g3=f3,b3=m3;var y3=function(e,t,n,r,a,i){var o=1&n,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,p=2&n?new v3:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var f=e[h],m=t[h];if(r)var v=o?r(m,f,h,t,e,i):r(f,m,h,e,t,i);if(void 0!==v){if(v)continue;u=!1;break}if(p){if(!g3(t,function(e,t){if(!b3(p,t)&&(f===e||a(f,e,n,r,i)))return p.push(t)})){u=!1;break}}else if(f!==m&&!a(f,m,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u};var w3=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var x3=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},E3=b0.Uint8Array,k3=A1,C3=y3,S3=w3,M3=x3,A3=y0?y0.prototype:void 0,_3=A3?A3.valueOf:void 0;var O3=function(e,t,n,r,a,i,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new E3(e),new E3(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return k3(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=S3;case"[object Set]":var s=1&r;if(l||(l=M3),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var d=C3(l(e),l(t),r,a,i,o);return o.delete(e),d;case"[object Symbol]":if(_3)return _3.call(e)==_3.call(t)}return!1};var N3=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Z3=N3,D3=f0;var I3=function(e,t,n){var r=t(e);return D3(e)?r:Z3(r,n(e))};var H3=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i};var T3=H3,L3=function(){return[]},P3=Object.prototype.propertyIsEnumerable,V3=Object.getOwnPropertySymbols,B3=V3?function(e){return null==e?[]:(e=Object(e),T3(V3(e),function(t){return P3.call(e,t)}))}:L3,j3=I3,z3=B3,R3=G5;var W3=function(e){return j3(e,R3,z3)},F3=W3,q3=Object.prototype.hasOwnProperty;var Y3=function(e,t,n,r,a,i){var o=1&n,l=F3(e),s=l.length;if(s!=F3(t).length&&!o)return!1;for(var c=s;c--;){var d=l[c];if(!(o?d in t:q3.call(t,d)))return!1}var h=i.get(e),u=i.get(t);if(h&&u)return h==t&&u==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=o;++c<s;){var m=e[d=l[c]],v=t[d];if(r)var g=o?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(!(void 0===g?m===v||a(m,v,n,r,i):g)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(e),i.delete(t),p},U3=s1(b0,"DataView"),G3=q1,X3=s1(b0,"Promise"),K3=s1(b0,"Set"),J3=s1(b0,"WeakMap"),Q3=N0,$3=G0,e4="[object Map]",t4="[object Promise]",n4="[object Set]",r4="[object WeakMap]",a4="[object DataView]",i4=$3(U3),o4=$3(G3),l4=$3(X3),s4=$3(K3),c4=$3(J3),d4=Q3;(U3&&d4(new U3(new ArrayBuffer(1)))!=a4||G3&&d4(new G3)!=e4||X3&&d4(X3.resolve())!=t4||K3&&d4(new K3)!=n4||J3&&d4(new J3)!=r4)&&(d4=function(e){var t=Q3(e),n="[object Object]"==t?e.constructor:void 0,r=n?$3(n):"";if(r)switch(r){case i4:return a4;case o4:return e4;case l4:return t4;case s4:return n4;case c4:return r4}return t});var h4=c3,u4=y3,p4=O3,f4=Y3,m4=d4,v4=f0,g4=p5.exports,b4=M5,y4="[object Arguments]",w4="[object Array]",x4="[object Object]",E4=Object.prototype.hasOwnProperty;var k4=function(e,t,n,r,a,i){var o=v4(e),l=v4(t),s=o?w4:m4(e),c=l?w4:m4(t),d=(s=s==y4?x4:s)==x4,h=(c=c==y4?x4:c)==x4,u=s==c;if(u&&g4(e)){if(!g4(t))return!1;o=!0,d=!1}if(u&&!d)return i||(i=new h4),o||b4(e)?u4(e,t,n,r,a,i):p4(e,t,s,n,r,a,i);if(!(1&n)){var p=d&&E4.call(e,"__wrapped__"),f=h&&E4.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return i||(i=new h4),a(m,v,n,r,i)}}return!!u&&(i||(i=new h4),f4(e,t,n,r,a,i))},C4=k4,S4=Z0;var M4=function e(t,n,r,a,i){return t===n||(null==t||null==n||!S4(t)&&!S4(n)?t!=t&&n!=n:C4(t,n,r,a,e,i))},A4=c3,_4=M4;var O4=function(e,t,n,r){var a=n.length,i=a,o=!r;if(null==e)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){var s=(l=n[a])[0],c=e[s],d=l[1];if(o&&l[2]){if(void 0===c&&!(s in e))return!1}else{var h=new A4;if(r)var u=r(c,d,s,e,t,h);if(!(void 0===u?_4(d,c,3,r,h):u))return!1}}return!0},N4=j0;var Z4=function(e){return e==e&&!N4(e)},D4=Z4,I4=G5;var H4=function(e){for(var t=I4(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,D4(a)]}return t};var T4=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},L4=O4,P4=H4,V4=T4;var B4=function(e){var t=P4(e);return 1==t.length&&t[0][2]?V4(t[0][0],t[0][1]):function(n){return n===e||L4(n,e,t)}},j4=N2,z4=W2;var R4=function(e,t){for(var n=0,r=(t=j4(t,e)).length;null!=e&&n<r;)e=e[z4(t[n++])];return n&&n==r?e:void 0},W4=R4;var F4=function(e,t,n){var r=null==e?void 0:W4(e,t);return void 0===r?n:r};var q4=function(e,t){return null!=e&&t in Object(e)},Y4=q4,U4=K2;var G4=function(e,t){return null!=e&&U4(e,t,Y4)},X4=M4,K4=F4,J4=G4,Q4=B0,$4=Z4,e7=T4,t7=W2;var n7=function(e,t){return Q4(e)&&$4(t)?e7(t7(e),t):function(n){var r=K4(n,e);return void 0===r&&r===t?J4(n,e):X4(t,r,3)}};var r7=function(e){return function(t){return null==t?void 0:t[e]}},a7=R4;var i7=function(e){return function(t){return a7(t,e)}},o7=r7,l7=i7,s7=B0,c7=W2;var d7=B4,h7=n7,u7=function(e){return e},p7=f0,f7=function(e){return s7(e)?o7(c7(e)):l7(e)};var m7=function(e){return"function"==typeof e?e:null==e?u7:"object"==typeof e?p7(e)?h7(e[0],e[1]):d7(e):f7(e)},v7=c5,g7=J5,b7=m7;var y7=function(e,t){var n={};return t=b7(t),g7(e,function(e,r,a){v7(n,r,t(e,r,a))}),n};function w7(e){this._maxSize=e,this.clear()}w7.prototype.clear=function(){this._size=0,this._values=Object.create(null)},w7.prototype.get=function(e){return this._values[e]},w7.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var x7=/[^.^\]^[]+|(?=\[\]|\.\.)/g,E7=/^\d+$/,k7=/^\d/,C7=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,S7=/^\s*(['"]?)(.*?)(\1)\s*$/,M7=new w7(512),A7=new w7(512),_7=new w7(512),O7={Cache:w7,split:Z7,normalizePath:N7,setter:function(e){var t=N7(e);return A7.get(e)||A7.set(e,function(e,n){for(var r=0,a=t.length,i=e;r<a-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;i=i[t[r++]]}i[t[r]]=n})},getter:function(e,t){var n=N7(e);return _7.get(e)||_7.set(e,function(e){for(var r=0,a=n.length;r<a;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(D7(t)||E7.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,a,i,o,l=e.length;for(a=0;a<l;a++)(r=e[a])&&(I7(r)&&(r='"'+r+'"'),i=!(o=D7(r))&&/^\d+$/.test(r),t.call(n,r,o,i,a,e))}(Array.isArray(e)?e:Z7(e),t,n)}};function N7(e){return M7.get(e)||M7.set(e,Z7(e).map(function(e){return e.replace(S7,"$2")}))}function Z7(e){return e.match(x7)||[""]}function D7(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function I7(e){return!D7(e)&&(function(e){return e.match(k7)&&!e.match(E7)}(e)||function(e){return C7.test(e)}(e))}const H7="$",T7=".";class L7{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===H7,this.isValue=this.key[0]===T7,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?H7:this.isValue?T7:"";this.path=this.key.slice(n.length),this.getter=this.path&&O7.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function P7(){return P7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P7.apply(this,arguments)}function V7(e){function t(t,n){let{value:r,path:a="",label:i,options:o,originalValue:l,sync:s}=t,c=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:h,params:u,message:p}=e;let{parent:f,context:m}=o;function v(e){return L7.isRef(e)?e.getValue(r,f,m):e}function g(e={}){const t=y7(P7({value:r,originalValue:l,label:i,path:e.path||a},u,e.params),v),n=new i5(i5.formatError(e.message||p,t),r,t.path,e.type||d);return n.params=t,n}let b,y=P7({path:a,parent:f,type:d,createError:g,resolve:v,options:o,originalValue:l},c);if(s){try{var w;if(b=h.call(y,r,y),"function"==typeof(null==(w=b)?void 0:w.then))throw new Error(`Validation test of type: "${y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}i5.isError(b)?n(b):b?n(null,b):n(g())}else try{Promise.resolve(h.call(y,r,y)).then(e=>{i5.isError(e)?n(e):e?n(null,e):n(g())}).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}L7.prototype.__isYupRef=!0;function B7(e,t,n,r=n){let a,i,o;return t?(O7.forEach(t,(l,s,c)=>{let d=s?(e=>e.substr(0,e.length-1).substr(1))(l):l;if((e=e.resolve({context:r,parent:a,value:n})).innerType){let r=c?parseInt(d,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[r],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);a=n,n=n&&n[d],e=e.fields[d]}i=d,o=s?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class j7{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(L7.isRef(n)?e(n):n),[])}add(e){L7.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){L7.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new j7;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function z7(){return z7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z7.apply(this,arguments)}class R7{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new j7,this._blacklist=new j7,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(s0.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=z7({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=z7({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=e0(z7({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=z7({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(z7({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let a=l0(e),i=l0(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${a} \n`+(i!==a?`result of cast: ${i}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:a,from:i=[],originalValue:o=e,strict:l=this.spec.strict,abortEarly:s=this.spec.abortEarly}=t,c=e;l||(c=this._cast(c,z7({assert:!1},t)));let d={value:c,path:a,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:i},h=[];this._typeError&&h.push(this._typeError);let u=[];this._whitelistError&&u.push(this._whitelistError),this._blacklistError&&u.push(this._blacklistError),o5({args:d,value:c,path:a,sync:r,tests:h,endEarly:s},e=>{e?n(e,c):o5({tests:this.tests.concat(u),args:d,path:a,sync:r,value:c,endEarly:s},n)})}validate(e,t,n){let r=this.resolve(z7({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,a)=>r._validate(e,t,(e,t)=>{e?a(e):n(t)}))}validateSync(e,t){let n;return this.resolve(z7({},t,{value:e}))._validate(e,z7({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(i5.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(i5.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):e0(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=s0.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=s0.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=s0.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=V7(t),a=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(a)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=n5(e).map(e=>new L7(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new t5(r,t)),n}typeError(e){let t=this.clone();return t._typeError=V7({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=s0.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=V7({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=s0.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=V7({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}R7.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])R7.prototype[`${e}At`]=function(t,n,r={}){const{parent:a,parentPath:i,schema:o}=B7(this,t,n,r.context);return o[e](a&&a[i],z7({},r,{parent:a,path:t}))};for(const e of["equals","is"])R7.prototype[e]=R7.prototype.oneOf;for(const e of["not","nope"])R7.prototype[e]=R7.prototype.notOneOf;R7.prototype.optional=R7.prototype.notRequired;R7.prototype;const W7=e=>null==e;let F7=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,q7=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Y7=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,U7=e=>W7(e)||e===e.trim(),G7={}.toString();function X7(){return new K7}class K7 extends R7{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===G7?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=c0.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return W7(t)||t.length===this.resolve(e)}})}min(e,t=c0.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return W7(t)||t.length>=this.resolve(e)}})}max(e,t=c0.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return W7(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,a=!1;return t&&("object"==typeof t?({excludeEmptyString:a=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||c0.matches,params:{regex:e},test:t=>W7(t)||""===t&&a||-1!==t.search(e)})}email(e=c0.email){return this.matches(F7,{name:"email",message:e,excludeEmptyString:!0})}url(e=c0.url){return this.matches(q7,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=c0.uuid){return this.matches(Y7,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=c0.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:U7})}lowercase(e=c0.lowercase){return this.transform(e=>W7(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W7(e)||e===e.toLowerCase()})}uppercase(e=c0.uppercase){return this.transform(e=>W7(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W7(e)||e===e.toUpperCase()})}}X7.prototype=K7.prototype;var J7=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Q7=new Date("");class $7 extends R7{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],a=0;if(n=J7.exec(e)){for(var i,o=0;i=r[o];++o)n[i]=+n[i]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?Q7:new Date(e))})})}_typeCheck(e){return(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(L7.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=d0.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return W7(e)||e>=this.resolve(n)}})}max(e,t=d0.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return W7(e)||e<=this.resolve(n)}})}}$7.INVALID_DATE=Q7,$7.prototype;var e6=function(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n};var t6=function(e){return function(t){return null==e?void 0:e[t]}},n6=t6({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),r6=S2,a6=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i6=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var o6=function(e){return(e=r6(e))&&e.replace(a6,n6).replace(i6,"")},l6=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var s6=function(e){return e.match(l6)||[]},c6=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var d6=function(e){return c6.test(e)},h6="\\ud800-\\udfff",u6="\\u2700-\\u27bf",p6="a-z\\xdf-\\xf6\\xf8-\\xff",f6="A-Z\\xc0-\\xd6\\xd8-\\xde",m6="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",v6="["+m6+"]",g6="\\d+",b6="["+u6+"]",y6="["+p6+"]",w6="[^"+h6+m6+g6+u6+p6+f6+"]",x6="(?:\\ud83c[\\udde6-\\uddff]){2}",E6="[\\ud800-\\udbff][\\udc00-\\udfff]",k6="["+f6+"]",C6="(?:"+y6+"|"+w6+")",S6="(?:"+k6+"|"+w6+")",M6="(?:['’](?:d|ll|m|re|s|t|ve))?",A6="(?:['’](?:D|LL|M|RE|S|T|VE))?",_6="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O6="[\\ufe0e\\ufe0f]?",N6=O6+_6+("(?:\\u200d(?:"+["[^"+h6+"]",x6,E6].join("|")+")"+O6+_6+")*"),Z6="(?:"+[b6,x6,E6].join("|")+")"+N6,D6=RegExp([k6+"?"+y6+"+"+M6+"(?="+[v6,k6,"$"].join("|")+")",S6+"+"+A6+"(?="+[v6,k6+C6,"$"].join("|")+")",k6+"?"+C6+"+"+M6,k6+"+"+A6,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",g6,Z6].join("|"),"g");var I6=function(e){return e.match(D6)||[]},H6=s6,T6=d6,L6=S2,P6=I6;var V6=function(e,t,n){return e=L6(e),void 0===(t=n?void 0:t)?T6(e)?P6(e):H6(e):e.match(t)||[]},B6=e6,j6=o6,z6=V6,R6=RegExp("['’]","g");var W6=function(e){return function(t){return B6(z6(j6(t).replace(R6,"")),e,"")}},F6=W6(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q6=F6;var Y6=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i},U6=Y6;var G6=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:U6(e,t,n)},X6=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var K6=function(e){return X6.test(e)};var J6=function(e){return e.split("")},Q6="\\ud800-\\udfff",$6="["+Q6+"]",e8="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",t8="\\ud83c[\\udffb-\\udfff]",n8="[^"+Q6+"]",r8="(?:\\ud83c[\\udde6-\\uddff]){2}",a8="[\\ud800-\\udbff][\\udc00-\\udfff]",i8="(?:"+e8+"|"+t8+")"+"?",o8="[\\ufe0e\\ufe0f]?",l8=o8+i8+("(?:\\u200d(?:"+[n8,r8,a8].join("|")+")"+o8+i8+")*"),s8="(?:"+[n8+e8+"?",e8,r8,a8,$6].join("|")+")",c8=RegExp(t8+"(?="+t8+")|"+s8+l8,"g");var d8=function(e){return e.match(c8)||[]},h8=J6,u8=K6,p8=d8;var f8=function(e){return u8(e)?p8(e):h8(e)},m8=G6,v8=K6,g8=f8,b8=S2;var y8=function(e){return function(t){t=b8(t);var n=v8(t)?g8(t):void 0,r=n?n[0]:t.charAt(0),a=n?m8(n,1).join(""):t.slice(1);return r[e]()+a}},w8=y8("toUpperCase"),x8=S2,E8=w8;var k8=function(e){return E8(x8(e).toLowerCase())},C8=k8,S8=W6(function(e,t,n){return t=t.toLowerCase(),e+(n?C8(t):t)}),M8=S8,A8=c5,_8=J5,O8=m7;var N8=function(e,t){var n={};return t=O8(t),_8(e,function(e,r,a){A8(n,t(e,r,a),e)}),n},Z8={exports:{}};function D8(e,t){var n=e.length,r=new Array(n),a={},i=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=e[n];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}(t),l=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!l.has(e[0])||!l.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||s(e[i],i,new Set);return r;function s(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!a[t]){a[t]=!0;var d=o.get(e)||new Set;if(t=(d=Array.from(d)).length){i.add(e);do{var h=d[--t];s(h,l.get(h),i)}while(t);i.delete(e)}r[--n]=e}}}Z8.exports=function(e){return D8(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var a=e[n];t.add(a[0]),t.add(a[1])}return Array.from(t)}(e),e)},Z8.exports.array=D8;var I8=Z8.exports;function H8(e,t){let n=1/0;return e.some((e,r)=>{var a;if(-1!==(null==(a=t.path)?void 0:a.indexOf(e)))return n=r,!0}),n}function T8(e){return(t,n)=>H8(e,t)-H8(e,n)}function L8(){return L8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L8.apply(this,arguments)}let P8=e=>"[object Object]"===Object.prototype.toString.call(e);const V8=T8([]);class B8 extends R7{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=V8,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return P8(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),l={},s=L8({},t,{parent:l,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=a[e],o=$2(r,e);if(n){let a,i=r[e];s.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:l});let o="spec"in n?n.spec:void 0,d=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}a=t.__validating&&d?r[e]:n.cast(r[e],s),void 0!==a&&(l[e]=a)}else o&&!i&&(l[e]=r[e]);l[e]!==r[e]&&(c=!0)}return c?l:r}_validate(e,t={},n){let r=[],{sync:a,from:i=[],originalValue:o=e,abortEarly:l=this.spec.abortEarly,recursive:s=this.spec.recursive}=t;i=[{schema:this,value:o},...i],t.__validating=!0,t.originalValue=o,t.from=i,super._validate(e,t,(e,c)=>{if(e){if(!i5.isError(e)||l)return void n(e,c);r.push(e)}if(!s||!P8(c))return void n(r[0]||null,c);o=o||c;let d=this._nodes.map(e=>(n,r)=>{let a=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,l=this.fields[e];l&&"validate"in l?l.validate(c[e],L8({},t,{path:a,from:i,strict:!0,parent:c,originalValue:o[e]}),r):r(null)});o5({sync:a,tests:d,value:c,errors:r,endEarly:l,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=L8({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof R7&&t instanceof R7&&(n[e]=t.concat(r))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=T8(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([e,t])=>`${e}-${t}`));function i(e,t){let i=O7.split(e)[0];r.add(i),a.has(`${t}-${i}`)||n.push([t,i])}for(const t in e)if($2(e,t)){let n=e[t];r.add(t),L7.isRef(n)&&n.isSibling?i(n.path,t):e5(n)&&"deps"in n&&n.deps.forEach(e=>i(e,t))}return I8.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=O7.getter(e,!0);return this.transform(a=>{if(null==a)return a;let i=a;return $2(a,e)&&(i=L8({},a),n||delete i[e],i[t]=r(a)),i})}noUnknown(e=!0,t=h0.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=h0.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&N8(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(M8)}snakeCase(){return this.transformKeys(q6)}constantCase(){return this.transformKeys(e=>q6(e).toUpperCase())}describe(){let e=super.describe();return e.fields=y7(this.fields,e=>e.describe()),e}}function j8(e){return new B8(e)}j8.prototype=B8.prototype;const z8=t=>{const{open:n,children:a,toggleSidebar:i,width:o,keyboard:l,hiddenBackground:s,hiddenFullScreenButton:c}=t,[d,h]=e.useState(!1),[u,p]=e.useState(n);e.useEffect(()=>{n!==u&&(n?p(n):setTimeout(()=>{p(n)},50))},[n]);const f=()=>{p(!1),setTimeout(()=>{i()},400)};return r.jsxs("div",{tabIndex:0,className:sj({"d-none":!n}),onKeyDown:e=>{!l&&"Escape"===e.code&&u&&(f(),e.stopPropagation(),e.preventDefault())},children:[r.jsx("div",{className:sj("offcanvas-backdrop fade",{"d-none":!u||s,show:u}),style:{zIndex:1055},onClick:f}),r.jsxs("div",{className:sj("customizer d-md-block ",`customizer-${o??600}`,{open:u,fullscreen:d}),style:{zIndex:1055},children:[r.jsxs("div",{style:{position:"fixed",top:"50%",transform:"translate(-50%, -50%)",background:"#FFF",filter:"drop-shadow(0.9px 0.9px 1.5px)",height:50,display:"flex",alignItems:"center",borderRadius:"0px 5px 5px 0px",cursor:"pointer",zIndex:9,marginLeft:7},className:sj({"d-none":c}),onClick:()=>{h(!d)},children:[r.jsx(Hc,{className:""+(d?"d-none":""),fontSize:16}),r.jsx(Tc,{className:""+(d?"":"d-none"),fontSize:15})]}),a]})]})},R8=t=>{const{openModal:n,handleModal:a,windowSize:i,selected:o,optionTypePrint:s}=t,[c,d]=e.useState(),{t:h}=dc();return e.useEffect(()=>{n&&d(s.find(e=>e.value===o))},[n]),r.jsxs(z8,{open:n,toggleSidebar:a,width:1e3,children:[r.jsx(jF,{typeModal:"Print",handleModal:a,title:"List of data fields",component:()=>r.jsx(r.Fragment,{children:r.jsx("div",{className:"d-flex align-items-center ps-1 ms-50 border-start",children:r.jsx(dy,{options:s,value:c,placeholder:h("Select"),onChange:e=>{d(e)}})})})}),r.jsx(l.Scrollbars,{autoHide:!0,autoHeight:!0,autoHeightMin:i.innerHeight-120,autoHeightMax:i.innerHeight-120,children:r.jsx(aB,{style:{minHeight:500},children:r.jsxs(uP,{children:[r.jsx(xP,{lg:6,md:6,sm:12,children:r.jsxs("div",{className:"box form-box__border d-flex flex-column h-100",children:[r.jsx("h5",{className:"m-0 form-box__border--title",children:h("General information")}),r.jsx(PD,{dataSource:c?.dataFields??[],addDisable:!0,editDisable:!0,columns:[{field:"field",headerText:"Field data",width:150},{field:"headerText",headerText:"Description",width:150}],maxHeight:i.innerHeight-180},"TableFields")]})}),r.jsx(xP,{lg:6,md:6,sm:12,children:c?.tableFields?.map((e,t)=>r.jsxs("div",{className:"box form-box__border d-flex flex-column mt-b h-100",children:[r.jsx("h5",{className:"m-0 form-box__border--title",children:`${h(e.headerText)}: ${e.field}`}),r.jsx(PD,{dataSource:e?.columns??[],addDisable:!0,editDisable:!0,columns:[{field:"field",headerText:"Field data",width:150},{field:"headerText",headerText:"Description",template:e=>h(e.headerText),width:150}],maxHeight:i.innerHeight-180},"TableFields")]},t))})]})})}),r.jsx("div",{className:"d-flex justify-content-end p-1 ",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsx(_P,{color:"secondary",onClick:a,outline:!0,children:h("Close")})})]})},W8=t=>{const{watch:n,uploadFileApi:a,setValue:i}=t,[o,l]=e.useState(!1),{t:s}=dc(),c=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?l(!0):"dragleave"===e.type&&l(!1)},d=async e=>{const t=new FormData;t.append("files",e,e.name);const n=await a(t).catch(()=>GN(s("UploadFail")));n.status&&i("file",{...n,name:e.name})};return r.jsx("div",{className:"rounded d-flex flex-column align-items-center justify-content-center "+(o?"dragging-file":"no-dragging-file"),style:{minHeight:"220px"},draggable:!0,onDragEnter:c,onDragLeave:c,onDragOver:c,onDrop:e=>{e.preventDefault(),e.stopPropagation(),l(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&d(e.dataTransfer.files[0])},children:n("file")?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mb-1 fs-5",children:n("file")?.name}),r.jsxs(_P,{tag:AB,outline:!0,className:"me-75",size:"md",color:"primary",children:[r.jsx(Nc,{fontSize:18,className:"me-50"}),s("Select other file"),r.jsx(yB,{type:"file",hidden:!0,onChange:e=>{const t=e.target.files?.[0];t&&d(t),e.target.value=""},accept:"\r\n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, \r\n application/vnd.ms-excel,\r\n application/msword, \r\n application/vnd.openxmlformats-officedocument.wordprocessingml.document\r\n "})]})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fs-4 bolder",children:s("Drag and drop files here")}),r.jsx("div",{className:"my-50",children:s("or")}),r.jsxs(_P,{tag:AB,outline:!0,className:"me-75",size:"md",color:"primary",children:[r.jsx(Nc,{fontSize:18,className:"me-50"}),s("Select file"),r.jsx(yB,{type:"file",hidden:!0,onChange:e=>{const t=e.target.files?.[0];t&&d(t),e.target.value=""},accept:"\r\n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, \r\n application/vnd.ms-excel,\r\n application/msword, \r\n application/vnd.openxmlformats-officedocument.wordprocessingml.document\r\n "})]}),r.jsx("div",{className:"mt-1",children:s("Accepts .xls, .xlsx, .doc, .docx files")})]})})},F8=t=>{const{t:n}=dc(),{openModal:a,windowSize:i,organization:o,optionPrintType:l,optionCurrentPrintTemplate:s,onSaveData:c,handleModal:d,uploadFileApi:h,updateGeneralSettingApi:u}=t,[p,m]=e.useState(!1),[v,g]=e.useState(!1),[b,y]=e.useState([]),w=j8().shape({name:X7().required(`${n("Template name")} ${n("is required")}`),type:X7().required(`${n("Template name")} ${n("is required")}`)}),x={name:"",resourceCode:"",type:l[0]?.value},{control:E,watch:k,handleSubmit:C,setValue:S,reset:M,formState:{errors:A}}=function(e={}){const t=f.default.useRef(),[n,r]=f.default.useState({isDirty:!1,isValidating:!1,isLoading:b$(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:b$(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Y$(e,()=>r(e=>({...e}))),formState:n});const a=t.current.control;return a._options=e,r$({subject:a._subjects.state,next:e=>{e$(e,a._proxyFormState,a._updateFormState,!0)&&r({...a._formState})}}),f.default.useEffect(()=>{e.values&&!H$(e.values,a._defaultValues)?a._reset(e.values,a._options.resetOptions):a._resetDefaultValues()},[e.values,a]),f.default.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=QQ(n,a),t.current}({mode:"onChange",defaultValues:x,resolver:Q$(w)}),_=()=>{d(),M()};return r.jsxs(eB,{isOpen:a,toggle:d,className:"modal-dialog-centered modal-lg-1",contentClassName:"p-0",onOpened:async()=>{const e=l[0];e&&(S("type",e.value),S("resourceCode",e.resourceCode)),y(s.filter(e=>e.file))},onClosed:()=>{},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{handleModal:d,title:"Tùy chọn in",className:"mb-0",component:()=>r.jsx("div",{className:"d-flex align-items-center ps-1 ms-1 border-start",children:r.jsx(dy,{options:l,onChange:e=>{S("type",e.value),S("resourceCode",e.resourceCode)},value:l.find(e=>e.value===k("type")),placeholder:n("Select")})})}),r.jsxs(dB,{id:"form-modal-globalzone",className:"todo-modal",onSubmit:C(e=>{e.file?u({name:e.name,organizationId:o?.id,resourceCode:e.resourceCode,type:"PrintDocument",category:"FileTemplate",value:JSON.stringify({file:e.file,type:e.type})}).then(t=>{t.isValid?(_(),c(e.name),XN(n("AddSuccessful"))):UN(n,"AddFail")}).catch(()=>{UN(n,"AddFail")}):UN(n,"Please select a template file!")}),children:[r.jsxs(aB,{children:[r.jsxs("p",{className:"lh-base",children:["Mẫu Word/Excel là mẫu do khách hàng tự ",r.jsx("strong",{children:"Thiết kế trên Word/Excel"})," theo yêu cầu công ty, dựa trên các thông tin dữ liệu do chương trình cung cấp ",r.jsx("br",{})," Tự tạo mẫu đơn giản theo các bước bên dưới:"]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"1"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsx("span",{className:"fw-bold",children:"Chuẩn bị tệp mẫu chứng từ mà bạn đang in (định dạng .xls, .xlsx, .doc, .docx)"})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"2"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsxs(uP,{children:[r.jsxs(xP,{children:[r.jsx("p",{className:"fw-bold m-0",children:"Danh sách các trường tại đây"}),r.jsx("p",{className:"fst-italic m-0",style:{fontSize:"0.85rem"},children:"Các trường dùng để hiển thị thông tin tên chứng từ"})]}),r.jsx(xP,{className:"text-end p-0 mt-50",children:r.jsxs(_P,{color:"link",onClick:()=>m(!0),children:[r.jsx(zc,{fontSize:14,className:"me-50"}),n("View list of data fields")]})})]})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"3"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsxs(uP,{children:[r.jsx(xP,{children:r.jsx("span",{className:"fw-bold",children:"Thực hiện tạo file mẫu dựa trên file danh sách các trường"})}),r.jsx(xP,{className:"text-end p-0",children:r.jsxs(_P,{color:"link",onClick:()=>{},children:[r.jsx(Pc,{fontSize:14,className:"me-50"}),n("Download sample file for reference")]})})]})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"4"})}),r.jsxs(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:[r.jsx("span",{className:"fw-bold",children:"Tải lên tệp mẫu đã được tạo ở bước 3 và nhập tên cho mẫu mới"}),r.jsx("div",{className:"mt-1",children:r.jsx(W8,{watch:k,setValue:S,uploadFileApi:h})}),r.jsxs("div",{className:"mt-1",children:[r.jsx("div",{className:"form-row-inline"}),r.jsxs(AB,{className:"d-flex",children:[n("Template name"),r.jsx("span",{className:"text-danger",children:"*"}),r.jsx(AB,{className:"ms-1 me-50",children:"Cập nhật mẫu in cũ"}),r.jsx(yB,{checked:v,type:"checkbox",onChange:e=>{g(e.target.checked),S("name","")},invalid:A.name&&!0})]}),r.jsx("div",{className:"form-input-content",children:r.jsx(d$,{name:"name",control:E,render:({field:{value:e,onChange:t}})=>r.jsxs(r.Fragment,{children:[v?r.jsx(dy,{value:b.find(t=>t.name===e),options:b,onChange:e=>{t(e.name)},fieldLabel:"name",fieldValue:"name",placeholder:n("Select"),invalid:A.name&&!0}):r.jsx(yB,{value:cj(e)?"":`${e}`,onChange:e=>{t(e.target.value)},placeholder:n("Name the new print template"),invalid:A.name&&!0}),A.name&&r.jsx(mB,{style:{zIndex:1e3},children:A.name?.message})]})})})]})]})]})]}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",className:"me-1",children:n("Create template")}),r.jsx(_P,{color:"secondary",onClick:_,outline:!0,className:"me-1",children:n("Close")})]})]}),r.jsx(R8,{windowSize:i,openModal:p,optionTypePrint:l,selected:k("type"),handleModal:()=>m(!1)})]})},q8=e.forwardRef((t,n)=>{const{windowSize:a,exportApi:i,printApi:o,isDisabled:l,isLoadOnInit:s,defaultNameTemplate:c,defaultOptionTypePrint:d,organization:h,showTitle:u=!0,uploadFileApi:p,formatNumber:f,optionalFields:m,signatures:v,CDN_URL_VIEW:g,DOCUMENT_URL_VIEW:b,containerDropDown:y,deleteGeneralSettingApi:w,handlGetDataPrint:x,updateGeneralSettingApi:E,getListBoxGeneralSettingApi:k}=t,{t:C}=dc(),[S,M]=e.useState(c),[A,_]=e.useState([]),[O,N]=e.useState({}),[Z,D]=e.useState(),[I,H]=e.useState(),[T,L]=e.useState({modal:!1,modalBatch:!1,modalEdit:!1,modalOption:!1}),P=(e="modal",t)=>{t&&(T[t]=!T[t]),T[e]=!T[e],L(e=>({...e}))};e.useImperativeHandle(n,()=>({getListTemplate:B})),e.useEffect(()=>{s&&B()},[s]);const V=(e,t)=>{e&&M(e);const n=A.find(t=>t.name===(e??S));n?.type&&x(n?.type,e??S).then(e=>{N({...e,listId:t}),P()})},B=(e,t)=>{k({$organizationId:h.id,$resourceCodes:d.map(e=>e.resourceCode).join(","),$type:"PrintDocument"}).then(n=>{const r=d.map(e=>({...e}));n?.forEach(e=>{const t=JSON.parse(e.value),n=r.findIndex(n=>n.type===t.type&&n.name===e.name);if(n>-1)r[n].id=e.id,r[n].setting=t.setting;else{const n=d.find(e=>e.type===t.type);n&&r.push({...e,file:t.file,type:t.type,setting:t.setting,dataFields:n.dataFields,tableFields:n.tableFields,resourceCode:e.resourceCode})}}),_(r),e&&t&&e(void 0,r,t)}).catch(()=>{_([...d]),GN(C("GetFail"))})},j=e=>{M(c),B(V,e)};return r.jsxs("div",{children:[r.jsxs("div",{className:"d-flex align-items-center pe-50 me-50 border-end "+(l?"opacity-50 pointer-events-none":""),children:[r.jsx(rd,{className:"cursor-pointer",fontSize:20,color:l?"#BFBFBF":"#7F7F7F",onClick:()=>!l&&V()}),u&&r.jsx("span",{className:"cursor-pointer mx-50",onClick:()=>!l&&V(),children:C(S)}),r.jsxs(ej,{className:"nav-item",children:[r.jsx($P,{tag:"div",className:"me-0 d-flex "+(l?"disabled":""),children:r.jsx(Ic,{fontSize:15,className:"cursor-pointer",color:l?"#BFBFBF":"#7F7F7F"})}),!l&&r.jsxs(XP,{container:y,className:"mt-0 p-0",end:!0,children:[A.map((e,t)=>r.jsx(FP,{tag:"div",onClick:()=>V(e.name),children:r.jsxs(r.Fragment,{children:[e.file&&(".doc"===e.file.type||".docx"===e.file.type?r.jsx(Rc,{className:"me-50",fontSize:15}):r.jsx(jc,{className:"me-50",fontSize:15})),C(e.name)," "]})},t)),r.jsx("hr",{className:"my-0"}),r.jsx(FP,{tag:"div",onClick:()=>P("modalOption"),children:C("Print Options")})]})]})]}),r.jsx(zF,{openModal:T.modal,handleModal:e=>{P("modal",e)},setTypeModal:D,namePrint:S,setNamePrint:M,dataSource:O,windowSize:a,organization:h,optionTypePrint:A,handleGetTemplate:B,defaultNameTemplate:"WarehouseIn",dataSetting:I,setDataSetting:H,printApi:o,exportApi:i,DOCUMENT_URL_VIEW:b,CDN_URL_VIEW:g,deleteGeneralSettingApi:w,optionalFields:m}),r.jsx(F8,{openModal:T.modalOption,handleModal:()=>P("modalOption"),windowSize:a,organization:h,uploadFileApi:p,optionCurrentPrintTemplate:A,updateGeneralSettingApi:E,optionPrintType:d.map(e=>({value:e.type,resourceCode:e.resourceCode,label:C(e.name),dataFields:e.dataFields,tableFields:e.tableFields})),onSaveData:j}),r.jsx(EQ,{openModal:T.modalEdit,handleModal:()=>{P("modalEdit","modal")},typeModal:Z,windowSize:a,dataSource:O,dataSetting:I,organization:h,formatNumber:f,signatures:v,onSaveData:j,uploadFileApi:p,CDN_URL_VIEW:g,updateGeneralSettingApi:E})]})});var Y8=e=>"checkbox"===e.type,U8=e=>e instanceof Date,G8=e=>null==e;const X8=e=>"object"==typeof e;var K8=e=>!G8(e)&&!Array.isArray(e)&&X8(e)&&!U8(e),J8=e=>K8(e)&&e.target?Y8(e.target)?e.target.checked:e.target.value:e,Q8=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),$8="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function e9(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if($8&&(e instanceof Blob||e instanceof FileList)||!n&&!K8(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return K8(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=e9(e[n]);else t=e}return t}var t9=e=>Array.isArray(e)?e.filter(Boolean):[],n9=e=>void 0===e,r9=(e,t,n)=>{if(!t||!K8(e))return n;const r=t9(t.split(/[,[\].]+?/)).reduce((e,t)=>G8(e)?e:e[t],e);return n9(r)||r===e?n9(e[t])?n:e[t]:r};const a9="blur",i9="focusout",o9="change",l9="onBlur",s9="onChange",c9="onSubmit",d9="onTouched",h9="all",u9="max",p9="min",f9="maxLength",m9="minLength",v9="pattern",g9="required",b9="validate",y9=f.default.createContext(null),w9=()=>f.default.useContext(y9);var x9=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const a=i;return t._proxyFormState[a]!==h9&&(t._proxyFormState[a]=!r||h9),n&&(n[a]=!0),e[a]}});return a},E9=e=>K8(e)&&!Object.keys(e).length,k9=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return E9(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||h9))},C9=e=>Array.isArray(e)?e:[e],S9=(e,t,n)=>n&&t?e===t:!e||!t||e===t||C9(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function M9(e){const t=f.default.useRef(e);t.current=e,f.default.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var A9=e=>"string"==typeof e,_9=(e,t,n,r,a)=>A9(e)?(r&&t.watch.add(e),r9(n,e,a)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),r9(n,e))):(r&&(t.watchAll=!0),n);var O9=e=>/^\w*$/.test(e),N9=e=>t9(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Z9(e,t,n){let r=-1;const a=O9(t)?[t]:N9(t),i=a.length,o=i-1;for(;++r<i;){const t=a[r];let i=n;if(r!==o){const n=e[t];i=K8(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=i,e=e[t]}return e}function D9(e){const t=w9(),{name:n,control:r=t.control,shouldUnregister:a}=e,i=Q8(r._names.array,n),o=function(e){const t=w9(),{control:n=t.control,name:r,defaultValue:a,disabled:i,exact:o}=e||{},l=f.default.useRef(r);l.current=r,M9({disabled:i,subject:n._subjects.values,next:e=>{S9(l.current,e.name,o)&&c(e9(_9(l.current,n._names,e.values||n._formValues,!1,a)))}});const[s,c]=f.default.useState(n._getWatch(r,a));return f.default.useEffect(()=>n._removeUnmounted()),s}({control:r,name:n,defaultValue:r9(r._formValues,n,r9(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=w9(),{control:n=t.control,disabled:r,name:a,exact:i}=e||{},[o,l]=f.default.useState(n._formState),s=f.default.useRef(!0),c=f.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=f.default.useRef(a);return d.current=a,M9({disabled:r,next:e=>s.current&&S9(d.current,e.name,i)&&k9(e,c.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),f.default.useEffect(()=>(s.current=!0,c.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),x9(o,n,c.current,!1)}({control:r,name:n}),s=f.default.useRef(r.register(n,{...e.rules,value:o}));return f.default.useEffect(()=>{const e=r._options.shouldUnregister||a,t=(e,t)=>{const n=r9(r._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=e9(r9(r._options.defaultValues,n));Z9(r._defaultValues,n,e),n9(r9(r._formValues,n))&&Z9(r._formValues,n,e)}return()=>{(i?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,i,a]),{field:{name:n,value:o,onChange:f.default.useCallback(e=>s.current.onChange({target:{value:J8(e),name:n},type:o9}),[n]),onBlur:f.default.useCallback(()=>s.current.onBlur({target:{value:r9(r._formValues,n),name:n},type:a9}),[n,r]),ref:e=>{const t=r9(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!r9(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!r9(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!r9(l.touchedFields,n)},error:{enumerable:!0,get:()=>r9(l.errors,n)}})}}const I9=e=>e.render(D9(e));var H9=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{};const T9=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=r9(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else K8(r)&&T9(r,t)}}};var L9=e=>({isOnSubmit:!e||e===c9,isOnBlur:e===l9,isOnChange:e===s9,isOnAll:e===h9,isOnTouch:e===d9}),P9=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),V9=(e,t,n)=>{const r=t9(r9(e,n));return Z9(r,"root",t[n]),Z9(e,n,r),e},B9=e=>"boolean"==typeof e,j9=e=>"file"===e.type,z9=e=>"function"==typeof e,R9=e=>{if(!$8)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},W9=e=>A9(e),F9=e=>"radio"===e.type,q9=e=>e instanceof RegExp;const Y9={value:!1,isValid:!1},U9={value:!0,isValid:!0};var G9=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!n9(e[0].attributes.value)?n9(e[0].value)||""===e[0].value?U9:{value:e[0].value,isValid:!0}:U9:Y9}return Y9};const X9={isValid:!1,value:null};var K9=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,X9):X9;function J9(e,t,n="validate"){if(W9(e)||Array.isArray(e)&&e.every(W9)||B9(e)&&!e)return{type:n,message:W9(e)?e:"",ref:t}}var Q9=e=>K8(e)&&!q9(e)?e:{value:e,message:""},$9=async(e,t,n,r,a)=>{const{ref:i,refs:o,required:l,maxLength:s,minLength:c,min:d,max:h,pattern:u,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,b=r9(t,f);if(!v||g)return{};const y=o?o[0]:i,w=e=>{r&&y.reportValidity&&(y.setCustomValidity(B9(e)?"":e||""),y.reportValidity())},x={},E=F9(i),k=Y8(i),C=E||k,S=(m||j9(i))&&n9(i.value)&&n9(b)||R9(i)&&""===i.value||""===b||Array.isArray(b)&&!b.length,M=H9.bind(null,f,n,x),A=(e,t,n,r=f9,a=m9)=>{const o=e?t:n;x[f]={type:e?r:a,message:o,ref:i,...M(e?r:a,o)}};if(a?!Array.isArray(b)||!b.length:l&&(!C&&(S||G8(b))||B9(b)&&!b||k&&!G9(o).isValid||E&&!K9(o).isValid)){const{value:e,message:t}=W9(l)?{value:!!l,message:l}:Q9(l);if(e&&(x[f]={type:g9,message:t,ref:y,...M(g9,t)},!n))return w(t),x}if(!(S||G8(d)&&G8(h))){let e,t;const r=Q9(h),a=Q9(d);if(G8(b)||isNaN(b)){const n=i.valueAsDate||new Date(b),o=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,s="week"==i.type;A9(r.value)&&b&&(e=l?o(b)>o(r.value):s?b>r.value:n>new Date(r.value)),A9(a.value)&&b&&(t=l?o(b)<o(a.value):s?b<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(b?+b:b);G8(r.value)||(e=n>r.value),G8(a.value)||(t=n<a.value)}if((e||t)&&(A(!!e,r.message,a.message,u9,p9),!n))return w(x[f].message),x}if((s||c)&&!S&&(A9(b)||a&&Array.isArray(b))){const e=Q9(s),t=Q9(c),r=!G8(e.value)&&b.length>+e.value,a=!G8(t.value)&&b.length<+t.value;if((r||a)&&(A(r,e.message,t.message),!n))return w(x[f].message),x}if(u&&!S&&A9(b)){const{value:e,message:t}=Q9(u);if(q9(e)&&!b.match(e)&&(x[f]={type:v9,message:t,ref:i,...M(v9,t)},!n))return w(t),x}if(p)if(z9(p)){const e=J9(await p(b,t),y);if(e&&(x[f]={...e,...M(b9,e.message)},!n))return w(e.message),x}else if(K8(p)){let e={};for(const r in p){if(!E9(e)&&!n)break;const a=J9(await p[r](b,t),y,r);a&&(e={...a,...M(r,a.message)},w(a.message),n&&(x[f]=e))}if(!E9(e)&&(x[f]={ref:y,...e},!n))return x}return w(!0),x};function eee(e,t){const n=Array.isArray(t)?t:O9(t)?[t]:N9(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=n9(e)?r++:e[t[r++]];return e}(e,n),a=n.length-1,i=n[a];return r&&delete r[i],0!==a&&(K8(r)&&E9(r)||Array.isArray(r)&&function(e){for(const t in e)if(!n9(e[t]))return!1;return!0}(r))&&eee(e,n.slice(0,-1)),e}function tee(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var nee=e=>G8(e)||!X8(e);function ree(e,t){if(nee(e)||nee(t))return e===t;if(U8(e)&&U8(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(U8(n)&&U8(e)||K8(n)&&K8(e)||Array.isArray(n)&&Array.isArray(e)?!ree(n,e):n!==e)return!1}}return!0}var aee=e=>"select-multiple"===e.type,iee=e=>R9(e)&&e.isConnected,oee=e=>{for(const t in e)if(z9(e[t]))return!0;return!1};function lee(e,t={}){const n=Array.isArray(e);if(K8(e)||n)for(const n in e)Array.isArray(e[n])||K8(e[n])&&!oee(e[n])?(t[n]=Array.isArray(e[n])?[]:{},lee(e[n],t[n])):G8(e[n])||(t[n]=!0);return t}function see(e,t,n){const r=Array.isArray(e);if(K8(e)||r)for(const r in e)Array.isArray(e[r])||K8(e[r])&&!oee(e[r])?n9(t)||nee(n[r])?n[r]=Array.isArray(e[r])?lee(e[r],[]):{...lee(e[r])}:see(e[r],G8(t)?{}:t[r],n[r]):n[r]=!ree(e[r],t[r]);return n}var cee=(e,t)=>see(e,t,lee(t)),dee=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>n9(e)?e:t?""===e?NaN:e?+e:e:n&&A9(e)?new Date(e):r?r(e):e;function hee(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return j9(t)?t.files:F9(t)?K9(e.refs).value:aee(t)?[...t.selectedOptions].map(({value:e})=>e):Y8(t)?G9(e.refs).value:dee(n9(t.value)?e.ref.value:t.value,e)}var uee=e=>n9(e)?e:q9(e)?e.source:K8(e)?q9(e.value)?e.value.source:e.value:e;function pee(e,t,n){const r=r9(e,n);if(r||O9(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),i=r9(t,r),o=r9(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};a.pop()}return{name:n}}const fee={mode:c9,reValidateMode:s9,shouldFocusError:!0};function mee(e={},t){let n,r={...fee,...e},a={submitCount:0,isDirty:!1,isLoading:z9(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=(K8(r.defaultValues)||K8(r.values))&&e9(r.defaultValues||r.values)||{},l=r.shouldUnregister?{}:e9(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:tee(),array:tee(),state:tee()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,f=L9(r.mode),m=L9(r.reValidateMode),v=r.criteriaMode===h9,g=async e=>{if(h.isValid||e){const e=r.resolver?E9((await E()).errors):await k(i,!0);e!==a.isValid&&u.state.next({isValid:e})}},b=e=>h.isValidating&&u.state.next({isValidating:e}),y=(e,t,n,r)=>{const a=r9(i,e);if(a){const i=r9(l,e,n9(n)?r9(o,e):n);n9(i)||r&&r.defaultChecked||t?Z9(l,e,t?i:hee(a._f)):M(e,i),s.mount&&g()}},w=(e,t,n,r,i)=>{let l=!1,s=!1;const c={name:e};if(!n||r){h.isDirty&&(s=a.isDirty,a.isDirty=c.isDirty=C(),l=s!==c.isDirty);const n=ree(r9(o,e),t);s=r9(a.dirtyFields,e),n?eee(a.dirtyFields,e):Z9(a.dirtyFields,e,!0),c.dirtyFields=a.dirtyFields,l=l||h.dirtyFields&&s!==!n}if(n){const t=r9(a.touchedFields,e);t||(Z9(a.touchedFields,e,n),c.touchedFields=a.touchedFields,l=l||h.touchedFields&&t!==n)}return l&&i&&u.state.next(c),l?c:{}},x=(t,r,i,o)=>{const l=r9(a.errors,t),s=h.isValid&&B9(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{Z9(a.errors,e,t),u.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(d),d=setTimeout(c,e)},n(e.delayError)):(clearTimeout(d),n=null,i?Z9(a.errors,t,i):eee(a.errors,t)),(i?!ree(l,i):l)||!E9(o)||s){const e={...o,...s&&B9(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},u.state.next(e)}b(!1)},E=async e=>r.resolver(l,r.context,((e,t,n,r)=>{const a={};for(const n of e){const e=r9(t,n);e&&Z9(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}})(e||c.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),k=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=c.array.has(e.name),s=await $9(o,l,v,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(r9(s,e.name)?i?V9(a.errors,s,e.name):Z9(a.errors,e.name,s[e.name]):eee(a.errors,e.name))}i&&await k(i,t,n)}}return n.valid},C=(e,t)=>(e&&t&&Z9(l,e,t),!ree(Z(),o)),S=(e,t,n)=>_9(e,c,{...s.mount?l:n9(t)?o:A9(e)?{[e]:t}:t},n,t),M=(e,t,n={})=>{const r=r9(i,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&Z9(l,e,dee(t,n)),a=R9(n.ref)&&G8(t)?"":t,aee(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?Y8(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(e=>e.checked=e.value===a):j9(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||u.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&w(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&N(e)},A=(e,t,n)=>{for(const r in t){const a=t[r],o=`${e}.${r}`,l=r9(i,o);!c.array.has(e)&&nee(a)&&(!l||l._f)||U8(a)?M(o,a,n):A(o,a,n)}},_=(e,n,r={})=>{const d=r9(i,e),p=c.array.has(e),f=e9(n);Z9(l,e,f),p?(u.array.next({name:e,values:{...l}}),(h.isDirty||h.dirtyFields)&&r.shouldDirty&&u.state.next({name:e,dirtyFields:cee(o,l),isDirty:C(e,f)})):!d||d._f||G8(f)?M(e,f,r):A(e,f,r),P9(e,c)&&u.state.next({...a}),u.values.next({name:e,values:{...l}}),!s.mount&&t()},O=async e=>{const t=e.target;let o=t.name,s=!0;const d=r9(i,o);if(d){let y,C;const S=t.type?hee(d._f):J8(e),M=e.type===a9||e.type===i9,A=!((p=d._f).mount&&(p.required||p.min||p.max||p.maxLength||p.minLength||p.pattern||p.validate)||r.resolver||r9(a.errors,o)||d._f.deps)||((e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e))(M,r9(a.touchedFields,o),a.isSubmitted,m,f),_=P9(o,c,M);Z9(l,o,S),M?(d._f.onBlur&&d._f.onBlur(e),n&&n(0)):d._f.onChange&&d._f.onChange(e);const O=w(o,S,M,!1),Z=!E9(O)||_;if(!M&&u.values.next({name:o,type:e.type,values:{...l}}),A)return h.isValid&&g(),Z&&u.state.next({name:o,..._?{}:O});if(!M&&_&&u.state.next({...a}),b(!0),r.resolver){const{errors:e}=await E([o]),t=pee(a.errors,i,o),n=pee(e,i,t.name||o);y=n.error,o=n.name,C=E9(e)}else y=(await $9(d,l,v,r.shouldUseNativeValidation))[o],s=isNaN(S)||S===r9(l,o,S),s&&(y?C=!1:h.isValid&&(C=await k(i,!0)));s&&(d._f.deps&&N(d._f.deps),x(o,C,y,O))}var p},N=async(e,t={})=>{let n,o;const l=C9(e);if(b(!0),r.resolver){const t=await(async e=>{const{errors:t}=await E();if(e)for(const n of e){const e=r9(t,n);e?Z9(a.errors,n,e):eee(a.errors,n)}else a.errors=t;return t})(n9(e)?e:l);n=E9(t),o=e?!l.some(e=>r9(t,e)):n}else e?(o=(await Promise.all(l.map(async e=>{const t=r9(i,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||a.isValid)&&g()):o=n=await k(i);return u.state.next({...!A9(e)||h.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!o&&T9(i,e=>e&&r9(a.errors,e),e?l:c.mount),o},Z=e=>{const t={...o,...s.mount?l:{}};return n9(e)?t:A9(e)?r9(t,e):e.map(e=>r9(t,e))},D=(e,t)=>({invalid:!!r9((t||a).errors,e),isDirty:!!r9((t||a).dirtyFields,e),isTouched:!!r9((t||a).touchedFields,e),error:r9((t||a).errors,e)}),I=(e,t={})=>{for(const n of e?C9(e):c.mount)c.mount.delete(n),c.array.delete(n),t.keepValue||(eee(i,n),eee(l,n)),!t.keepError&&eee(a.errors,n),!t.keepDirty&&eee(a.dirtyFields,n),!t.keepTouched&&eee(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&eee(o,n);u.values.next({values:{...l}}),u.state.next({...a,...t.keepDirty?{isDirty:C()}:{}}),!t.keepIsValid&&g()},H=(e,t={})=>{let n=r9(i,e);const a=B9(t.disabled);return Z9(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),n?a&&Z9(l,e,t.disabled?void 0:r9(l,e,hee(n._f))):y(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:uee(t.min),max:uee(t.max),minLength:uee(t.minLength),maxLength:uee(t.maxLength),pattern:uee(t.pattern)}:{},name:e,onChange:O,onBlur:O,ref:a=>{if(a){H(e,t),n=r9(i,e);const r=n9(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,l=(e=>F9(e)||Y8(e))(r),s=n._f.refs||[];if(l?s.find(e=>e===r):r===n._f.ref)return;Z9(i,e,{_f:{...n._f,...l?{refs:[...s.filter(iee),r,...Array.isArray(r9(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=r9(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Q8(c.array,e)||!s.action)&&c.unMount.add(e)}}},T=()=>r.shouldFocusError&&T9(i,e=>e&&r9(a.errors,e),c.mount),L=(n,r={})=>{const d=n||o,f=e9(d),m=n&&!E9(n)?f:o;if(r.keepDefaultValues||(o=d),!r.keepValues){if(r.keepDirtyValues||p)for(const e of c.mount)r9(a.dirtyFields,e)?Z9(m,e,r9(l,e)):_(e,r9(m,e));else{if($8&&n9(n))for(const e of c.mount){const t=r9(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(R9(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}l=e.shouldUnregister?r.keepDefaultValues?e9(o):{}:f,u.array.next({values:{...m}}),u.values.next({values:{...m}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!h.isValid||!!r.keepIsValid,s.watch=!!e.shouldUnregister,u.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||ree(n,o)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?cee(o,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},P=(e,t)=>L(z9(e)?e(l):e,t);return{control:{register:H,unregister:I,getFieldState:D,_executeSchema:E,_getWatch:S,_getDirty:C,_updateValid:g,_removeUnmounted:()=>{for(const e of c.unMount){const t=r9(i,e);t&&(t._f.refs?t._f.refs.every(e=>!iee(e)):!iee(t._f.ref))&&I(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,r,c=!0,d=!0)=>{if(r&&n){if(s.action=!0,d&&Array.isArray(r9(i,e))){const t=n(r9(i,e),r.argA,r.argB);c&&Z9(i,e,t)}if(d&&Array.isArray(r9(a.errors,e))){const t=n(r9(a.errors,e),r.argA,r.argB);c&&Z9(a.errors,e,t),((e,t)=>{!t9(r9(e,t)).length&&eee(e,t)})(a.errors,e)}if(h.touchedFields&&d&&Array.isArray(r9(a.touchedFields,e))){const t=n(r9(a.touchedFields,e),r.argA,r.argB);c&&Z9(a.touchedFields,e,t)}h.dirtyFields&&(a.dirtyFields=cee(o,l)),u.state.next({name:e,isDirty:C(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else Z9(l,e,t)},_getFieldArray:t=>t9(r9(s.mount?l:o,t,e.shouldUnregister?r9(o,t,[]):[])),_reset:L,_resetDefaultValues:()=>z9(r.defaultValues)&&r.defaultValues().then(e=>{P(e,r.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:e=>{a={...a,...e}},_subjects:u,_proxyFormState:h,get _fields(){return i},get _formValues(){return l},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:N,register:H,handleSubmit:(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let o=e9(l);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await E();a.errors=e,o=t}else await k(i);eee(a.errors,"root"),E9(a.errors)?(u.state.next({errors:{}}),await e(o,n)):(t&&await t({...a.errors},n),T(),setTimeout(T)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:E9(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>z9(e)?u.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:_,getValues:Z,reset:P,resetField:(e,t={})=>{r9(i,e)&&(n9(t.defaultValue)?_(e,r9(o,e)):(_(e,t.defaultValue),Z9(o,e,t.defaultValue)),t.keepTouched||eee(a.touchedFields,e),t.keepDirty||(eee(a.dirtyFields,e),a.isDirty=t.defaultValue?C(e,r9(o,e)):C()),t.keepError||(eee(a.errors,e),h.isValid&&g()),u.state.next({...a}))},clearErrors:e=>{e&&C9(e).forEach(e=>eee(a.errors,e)),u.state.next({errors:e?a.errors:{}})},unregister:I,setError:(e,t,n)=>{const r=(r9(i,e,{_f:{}})._f||{}).ref;Z9(a.errors,e,{...t,ref:r}),u.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{const n=r9(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}var vee,gee,bee=function(e,t,n){if(e&&"reportValidity"in e){var r=r9(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},yee=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?bee(r.ref,n,e):r.refs&&r.refs.forEach(function(t){return bee(t,n,e)})};for(var r in t.fields)n(r)},wee=function(e,t){t.shouldUseNativeValidation&&yee(e,t);var n={};for(var r in e){var a=r9(t.fields,r);Z9(n,r,Object.assign(e[r],{ref:a&&a.ref}))}return n},xee=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(r,a,i){try{return Promise.resolve(function(o,l){try{var s=(t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:a}))).then(function(e){return i.shouldUseNativeValidation&&yee({},i),{values:n.rawValues?r:e,errors:{}}}))}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(0,function(e){if(!e.inner)throw e;return{values:{},errors:wee((t=e,n=!i.shouldUseNativeValidation&&"all"===i.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,a=r&&r[t.type];e[t.path]=H9(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},{})),i)};var t,n}))}catch(e){return Promise.reject(e)}}};try{vee=Map}catch(qNe){}try{gee=Set}catch(qNe){}function Eee(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(kee);if(vee&&e instanceof vee)return new Map(Array.from(e.entries()));if(gee&&e instanceof gee)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var a in n.push(r),e){var i=t.findIndex(function(t){return t===e[a]});r[a]=i>-1?n[i]:Eee(e[a],t,n)}return r}return e}function kee(e){return Eee(e,[],[])}const Cee=Object.prototype.toString,See=Error.prototype.toString,Mee=RegExp.prototype.toString,Aee="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",_ee=/^Symbol\((.*)\)(.*)$/;function Oee(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Aee.call(e).replace(_ee,"Symbol($1)");const r=Cee.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+See.call(e)+"]":"RegExp"===r?Mee.call(e):null}function Nee(e,t){let n=Oee(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Oee(this[e],t);return null!==r?r:n},2)}let Zee={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let a=null!=r&&r!==n,i=`${e} must be a \`${t}\` type, but the final value was: \`${Nee(n,!0)}\``+(a?` (cast from the value \`${Nee(r,!0)}\`).`:".");return null===n&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},Dee={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Iee={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Hee={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:Zee,string:Dee,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Iee,object:Hee,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});var Tee=Object.prototype.hasOwnProperty;var Lee=function(e,t){return null!=e&&Tee.call(e,t)},Pee=Array.isArray,Vee="object"==typeof N&&N&&N.Object===Object&&N,Bee=Vee,jee="object"==typeof self&&self&&self.Object===Object&&self,zee=Bee||jee||Function("return this")(),Ree=zee.Symbol,Wee=Ree,Fee=Object.prototype,qee=Fee.hasOwnProperty,Yee=Fee.toString,Uee=Wee?Wee.toStringTag:void 0;var Gee=function(e){var t=qee.call(e,Uee),n=e[Uee];try{e[Uee]=void 0;var r=!0}catch(e){}var a=Yee.call(e);return r&&(t?e[Uee]=n:delete e[Uee]),a},Xee=Object.prototype.toString;var Kee=Gee,Jee=function(e){return Xee.call(e)},Qee=Ree?Ree.toStringTag:void 0;var $ee=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Qee&&Qee in Object(e)?Kee(e):Jee(e)};var ete=function(e){return null!=e&&"object"==typeof e},tte=$ee,nte=ete;var rte=function(e){return"symbol"==typeof e||nte(e)&&"[object Symbol]"==tte(e)},ate=Pee,ite=rte,ote=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lte=/^\w*$/;var ste=function(e,t){if(ate(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ite(e))||(lte.test(e)||!ote.test(e)||null!=t&&e in Object(t))};var cte=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},dte=$ee,hte=cte;var ute=function(e){if(!hte(e))return!1;var t=dte(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},pte=zee["__core-js_shared__"],fte=function(){var e=/[^.]+$/.exec(pte&&pte.keys&&pte.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var mte=function(e){return!!fte&&fte in e},vte=Function.prototype.toString;var gte=function(e){if(null!=e){try{return vte.call(e)}catch(e){}try{return e+""}catch(e){}}return""},bte=ute,yte=mte,wte=cte,xte=gte,Ete=/^\[object .+?Constructor\]$/,kte=Function.prototype,Cte=Object.prototype,Ste=kte.toString,Mte=Cte.hasOwnProperty,Ate=RegExp("^"+Ste.call(Mte).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var _te=function(e,t){return null==e?void 0:e[t]},Ote=function(e){return!(!wte(e)||yte(e))&&(bte(e)?Ate:Ete).test(xte(e))},Nte=_te;var Zte=function(e,t){var n=Nte(e,t);return Ote(n)?n:void 0},Dte=Zte(Object,"create"),Ite=Dte;var Hte=function(){this.__data__=Ite?Ite(null):{},this.size=0};var Tte=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Lte=Dte,Pte=Object.prototype.hasOwnProperty;var Vte=function(e){var t=this.__data__;if(Lte){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Pte.call(t,e)?t[e]:void 0},Bte=Dte,jte=Object.prototype.hasOwnProperty;var zte=Dte;var Rte=Hte,Wte=Tte,Fte=Vte,qte=function(e){var t=this.__data__;return Bte?void 0!==t[e]:jte.call(t,e)},Yte=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zte&&void 0===t?"__lodash_hash_undefined__":t,this};function Ute(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ute.prototype.clear=Rte,Ute.prototype.delete=Wte,Ute.prototype.get=Fte,Ute.prototype.has=qte,Ute.prototype.set=Yte;var Gte=Ute;var Xte=function(){this.__data__=[],this.size=0};var Kte=function(e,t){return e===t||e!=e&&t!=t},Jte=Kte;var Qte=function(e,t){for(var n=e.length;n--;)if(Jte(e[n][0],t))return n;return-1},$te=Qte,ene=Array.prototype.splice;var tne=function(e){var t=this.__data__,n=$te(t,e);return!(n<0)&&(n==t.length-1?t.pop():ene.call(t,n,1),--this.size,!0)},nne=Qte;var rne=function(e){var t=this.__data__,n=nne(t,e);return n<0?void 0:t[n][1]},ane=Qte;var ine=Qte;var one=function(e,t){var n=this.__data__,r=ine(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},lne=Xte,sne=tne,cne=rne,dne=function(e){return ane(this.__data__,e)>-1},hne=one;function une(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}une.prototype.clear=lne,une.prototype.delete=sne,une.prototype.get=cne,une.prototype.has=dne,une.prototype.set=hne;var pne=une,fne=Zte(zee,"Map"),mne=Gte,vne=pne,gne=fne;var bne=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yne=bne;var wne=function(e,t){var n=e.__data__;return yne(t)?n["string"==typeof t?"string":"hash"]:n.map},xne=wne;var Ene=wne;var kne=wne;var Cne=wne;var Sne=function(){this.size=0,this.__data__={hash:new mne,map:new(gne||vne),string:new mne}},Mne=function(e){var t=xne(this,e).delete(e);return this.size-=t?1:0,t},Ane=function(e){return Ene(this,e).get(e)},_ne=function(e){return kne(this,e).has(e)},One=function(e,t){var n=Cne(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Nne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nne.prototype.clear=Sne,Nne.prototype.delete=Mne,Nne.prototype.get=Ane,Nne.prototype.has=_ne,Nne.prototype.set=One;var Zne=Nne,Dne=Zne;function Ine(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(Ine.Cache||Dne),n}Ine.Cache=Dne;var Hne=Ine;var Tne=function(e){var t=Hne(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t},Lne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pne=/\\(\\)?/g,Vne=Tne(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Lne,function(e,n,r,a){t.push(r?a.replace(Pne,"$1"):n||e)}),t}),Bne=Vne;var jne=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},zne=jne,Rne=Pee,Wne=rte,Fne=Ree?Ree.prototype:void 0,qne=Fne?Fne.toString:void 0;var Yne=function e(t){if("string"==typeof t)return t;if(Rne(t))return zne(t,e)+"";if(Wne(t))return qne?qne.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Une=Yne;var Gne=function(e){return null==e?"":Une(e)},Xne=Pee,Kne=ste,Jne=Bne,Qne=Gne;var $ne=function(e,t){return Xne(e)?e:Kne(e,t)?[e]:Jne(Qne(e))},ere=$ee,tre=ete;var nre=function(e){return tre(e)&&"[object Arguments]"==ere(e)},rre=ete,are=Object.prototype,ire=are.hasOwnProperty,ore=are.propertyIsEnumerable,lre=nre(function(){return arguments}())?nre:function(e){return rre(e)&&ire.call(e,"callee")&&!ore.call(e,"callee")},sre=/^(?:0|[1-9]\d*)$/;var cre=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&sre.test(e))&&e>-1&&e%1==0&&e<t};var dre=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},hre=rte;var ure=function(e){if("string"==typeof e||hre(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},pre=$ne,fre=lre,mre=Pee,vre=cre,gre=dre,bre=ure;var yre=function(e,t,n){for(var r=-1,a=(t=pre(t,e)).length,i=!1;++r<a;){var o=bre(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=a?i:!!(a=null==e?0:e.length)&&gre(a)&&vre(o,a)&&(mre(e)||fre(e))},wre=Lee,xre=yre;var Ere=function(e,t){return null!=e&&xre(e,t,wre)};const kre=e=>e&&e.__isYupSchema__;class Cre{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!Ere(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=t,i="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=i(...e)?r:a;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!kre(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function Sre(e){return null==e?[]:[].concat(e)}function Mre(){return Mre=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mre.apply(this,arguments)}let Are=/\$\{\s*(\w+)\s*\}/g;class _re extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=Mre({},t,{path:n})),"string"==typeof e?e.replace(Are,(e,n)=>Nee(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Sre(e).forEach(e=>{_re.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,_re)}}function Ore(e,t){let{endEarly:n,tests:r,args:a,value:i,errors:o,sort:l,path:s}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),d=r.length;const h=[];if(o=o||[],!d)return o.length?c(new _re(o,i,s)):c(null,i);for(let e=0;e<r.length;e++){(0,r[e])(a,function(e){if(e){if(!_re.isError(e))return c(e,i);if(n)return e.value=i,c(e,i);h.push(e)}if(--d<=0){if(h.length&&(l&&h.sort(l),o.length&&h.push(...o),o=h),o.length)return void c(new _re(o,i,s),i);c(null,i)}})}}var Nre=Zte,Zre=function(){try{var e=Nre(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Dre=function(e,t,n){"__proto__"==t&&Zre?Zre(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Ire=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===n(i[s],s,i))break}return t}},Hre=Ire();var Tre=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Lre={exports:{}};var Pre=function(){return!1};!function(e,t){var n=zee,r=Pre,a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?n.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l}(Lre,Lre.exports);var Vre=$ee,Bre=dre,jre=ete,zre={};zre["[object Float32Array]"]=zre["[object Float64Array]"]=zre["[object Int8Array]"]=zre["[object Int16Array]"]=zre["[object Int32Array]"]=zre["[object Uint8Array]"]=zre["[object Uint8ClampedArray]"]=zre["[object Uint16Array]"]=zre["[object Uint32Array]"]=!0,zre["[object Arguments]"]=zre["[object Array]"]=zre["[object ArrayBuffer]"]=zre["[object Boolean]"]=zre["[object DataView]"]=zre["[object Date]"]=zre["[object Error]"]=zre["[object Function]"]=zre["[object Map]"]=zre["[object Number]"]=zre["[object Object]"]=zre["[object RegExp]"]=zre["[object Set]"]=zre["[object String]"]=zre["[object WeakMap]"]=!1;var Rre=function(e){return jre(e)&&Bre(e.length)&&!!zre[Vre(e)]};var Wre=function(e){return function(t){return e(t)}},Fre={exports:{}};!function(e,t){var n=Vee,r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,i=a&&a.exports===r&&n.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(Fre,Fre.exports);var qre=Rre,Yre=Wre,Ure=Fre.exports,Gre=Ure&&Ure.isTypedArray,Xre=Gre?Yre(Gre):qre,Kre=Tre,Jre=lre,Qre=Pee,$re=Lre.exports,eae=cre,tae=Xre,nae=Object.prototype.hasOwnProperty;var rae=function(e,t){var n=Qre(e),r=!n&&Jre(e),a=!n&&!r&&$re(e),i=!n&&!r&&!a&&tae(e),o=n||r||a||i,l=o?Kre(e.length,String):[],s=l.length;for(var c in e)!t&&!nae.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||eae(c,s))||l.push(c);return l},aae=Object.prototype;var iae=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||aae)};var oae=function(e,t){return function(n){return e(t(n))}},lae=oae(Object.keys,Object),sae=iae,cae=lae,dae=Object.prototype.hasOwnProperty;var hae=function(e){if(!sae(e))return cae(e);var t=[];for(var n in Object(e))dae.call(e,n)&&"constructor"!=n&&t.push(n);return t},uae=ute,pae=dre;var fae=rae,mae=hae,vae=function(e){return null!=e&&pae(e.length)&&!uae(e)};var gae=function(e){return vae(e)?fae(e):mae(e)},bae=Hre,yae=gae;var wae=function(e,t){return e&&bae(e,t,yae)},xae=pne;var Eae=pne,kae=fne,Cae=Zne;var Sae=pne,Mae=function(){this.__data__=new xae,this.size=0},Aae=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_ae=function(e){return this.__data__.get(e)},Oae=function(e){return this.__data__.has(e)},Nae=function(e,t){var n=this.__data__;if(n instanceof Eae){var r=n.__data__;if(!kae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cae(r)}return n.set(e,t),this.size=n.size,this};function Zae(e){var t=this.__data__=new Sae(e);this.size=t.size}Zae.prototype.clear=Mae,Zae.prototype.delete=Aae,Zae.prototype.get=_ae,Zae.prototype.has=Oae,Zae.prototype.set=Nae;var Dae=Zae;var Iae=Zne,Hae=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Tae=function(e){return this.__data__.has(e)};function Lae(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Iae;++t<n;)this.add(e[t])}Lae.prototype.add=Lae.prototype.push=Hae,Lae.prototype.has=Tae;var Pae=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Vae=function(e,t){return e.has(t)},Bae=Lae,jae=Pae,zae=Vae;var Rae=function(e,t,n,r,a,i){var o=1&n,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,p=2&n?new Bae:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var f=e[h],m=t[h];if(r)var v=o?r(m,f,h,t,e,i):r(f,m,h,e,t,i);if(void 0!==v){if(v)continue;u=!1;break}if(p){if(!jae(t,function(e,t){if(!zae(p,t)&&(f===e||a(f,e,n,r,i)))return p.push(t)})){u=!1;break}}else if(f!==m&&!a(f,m,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u};var Wae=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var Fae=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},qae=zee.Uint8Array,Yae=Kte,Uae=Rae,Gae=Wae,Xae=Fae,Kae=Ree?Ree.prototype:void 0,Jae=Kae?Kae.valueOf:void 0;var Qae=function(e,t,n,r,a,i,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new qae(e),new qae(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yae(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Gae;case"[object Set]":var s=1&r;if(l||(l=Xae),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var d=Uae(l(e),l(t),r,a,i,o);return o.delete(e),d;case"[object Symbol]":if(Jae)return Jae.call(e)==Jae.call(t)}return!1};var $ae=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},eie=$ae,tie=Pee;var nie=function(e,t,n){var r=t(e);return tie(e)?r:eie(r,n(e))};var rie=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i};var aie=rie,iie=function(){return[]},oie=Object.prototype.propertyIsEnumerable,lie=Object.getOwnPropertySymbols,sie=lie?function(e){return null==e?[]:(e=Object(e),aie(lie(e),function(t){return oie.call(e,t)}))}:iie,cie=nie,die=sie,hie=gae;var uie=function(e){return cie(e,hie,die)},pie=uie,fie=Object.prototype.hasOwnProperty;var mie=function(e,t,n,r,a,i){var o=1&n,l=pie(e),s=l.length;if(s!=pie(t).length&&!o)return!1;for(var c=s;c--;){var d=l[c];if(!(o?d in t:fie.call(t,d)))return!1}var h=i.get(e),u=i.get(t);if(h&&u)return h==t&&u==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=o;++c<s;){var m=e[d=l[c]],v=t[d];if(r)var g=o?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(!(void 0===g?m===v||a(m,v,n,r,i):g)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(e),i.delete(t),p},vie=Zte(zee,"DataView"),gie=fne,bie=Zte(zee,"Promise"),yie=Zte(zee,"Set"),wie=Zte(zee,"WeakMap"),xie=$ee,Eie=gte,kie="[object Map]",Cie="[object Promise]",Sie="[object Set]",Mie="[object WeakMap]",Aie="[object DataView]",_ie=Eie(vie),Oie=Eie(gie),Nie=Eie(bie),Zie=Eie(yie),Die=Eie(wie),Iie=xie;(vie&&Iie(new vie(new ArrayBuffer(1)))!=Aie||gie&&Iie(new gie)!=kie||bie&&Iie(bie.resolve())!=Cie||yie&&Iie(new yie)!=Sie||wie&&Iie(new wie)!=Mie)&&(Iie=function(e){var t=xie(e),n="[object Object]"==t?e.constructor:void 0,r=n?Eie(n):"";if(r)switch(r){case _ie:return Aie;case Oie:return kie;case Nie:return Cie;case Zie:return Sie;case Die:return Mie}return t});var Hie=Dae,Tie=Rae,Lie=Qae,Pie=mie,Vie=Iie,Bie=Pee,jie=Lre.exports,zie=Xre,Rie="[object Arguments]",Wie="[object Array]",Fie="[object Object]",qie=Object.prototype.hasOwnProperty;var Yie=function(e,t,n,r,a,i){var o=Bie(e),l=Bie(t),s=o?Wie:Vie(e),c=l?Wie:Vie(t),d=(s=s==Rie?Fie:s)==Fie,h=(c=c==Rie?Fie:c)==Fie,u=s==c;if(u&&jie(e)){if(!jie(t))return!1;o=!0,d=!1}if(u&&!d)return i||(i=new Hie),o||zie(e)?Tie(e,t,n,r,a,i):Lie(e,t,s,n,r,a,i);if(!(1&n)){var p=d&&qie.call(e,"__wrapped__"),f=h&&qie.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return i||(i=new Hie),a(m,v,n,r,i)}}return!!u&&(i||(i=new Hie),Pie(e,t,n,r,a,i))},Uie=Yie,Gie=ete;var Xie=function e(t,n,r,a,i){return t===n||(null==t||null==n||!Gie(t)&&!Gie(n)?t!=t&&n!=n:Uie(t,n,r,a,e,i))},Kie=Dae,Jie=Xie;var Qie=function(e,t,n,r){var a=n.length,i=a,o=!r;if(null==e)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){var s=(l=n[a])[0],c=e[s],d=l[1];if(o&&l[2]){if(void 0===c&&!(s in e))return!1}else{var h=new Kie;if(r)var u=r(c,d,s,e,t,h);if(!(void 0===u?Jie(d,c,3,r,h):u))return!1}}return!0},$ie=cte;var eoe=function(e){return e==e&&!$ie(e)},toe=eoe,noe=gae;var roe=function(e){for(var t=noe(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,toe(a)]}return t};var aoe=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},ioe=Qie,ooe=roe,loe=aoe;var soe=function(e){var t=ooe(e);return 1==t.length&&t[0][2]?loe(t[0][0],t[0][1]):function(n){return n===e||ioe(n,e,t)}},coe=$ne,doe=ure;var hoe=function(e,t){for(var n=0,r=(t=coe(t,e)).length;null!=e&&n<r;)e=e[doe(t[n++])];return n&&n==r?e:void 0},uoe=hoe;var poe=function(e,t,n){var r=null==e?void 0:uoe(e,t);return void 0===r?n:r};var foe=function(e,t){return null!=e&&t in Object(e)},moe=foe,voe=yre;var goe=function(e,t){return null!=e&&voe(e,t,moe)},boe=Xie,yoe=poe,woe=goe,xoe=ste,Eoe=eoe,koe=aoe,Coe=ure;var Soe=function(e,t){return xoe(e)&&Eoe(t)?koe(Coe(e),t):function(n){var r=yoe(n,e);return void 0===r&&r===t?woe(n,e):boe(t,r,3)}};var Moe=function(e){return function(t){return null==t?void 0:t[e]}},Aoe=hoe;var _oe=function(e){return function(t){return Aoe(t,e)}},Ooe=Moe,Noe=_oe,Zoe=ste,Doe=ure;var Ioe=soe,Hoe=Soe,Toe=function(e){return e},Loe=Pee,Poe=function(e){return Zoe(e)?Ooe(Doe(e)):Noe(e)};var Voe=function(e){return"function"==typeof e?e:null==e?Toe:"object"==typeof e?Loe(e)?Hoe(e[0],e[1]):Ioe(e):Poe(e)},Boe=Dre,joe=wae,zoe=Voe;var Roe=function(e,t){var n={};return t=zoe(t),joe(e,function(e,r,a){Boe(n,r,t(e,r,a))}),n};function Woe(e){this._maxSize=e,this.clear()}Woe.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Woe.prototype.get=function(e){return this._values[e]},Woe.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Foe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,qoe=/^\d+$/,Yoe=/^\d/,Uoe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Goe=/^\s*(['"]?)(.*?)(\1)\s*$/,Xoe=new Woe(512),Koe=new Woe(512),Joe=new Woe(512),Qoe={Cache:Woe,split:ele,normalizePath:$oe,setter:function(e){var t=$oe(e);return Koe.get(e)||Koe.set(e,function(e,n){for(var r=0,a=t.length,i=e;r<a-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;i=i[t[r++]]}i[t[r]]=n})},getter:function(e,t){var n=$oe(e);return Joe.get(e)||Joe.set(e,function(e){for(var r=0,a=n.length;r<a;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(tle(t)||qoe.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,a,i,o,l=e.length;for(a=0;a<l;a++)(r=e[a])&&(nle(r)&&(r='"'+r+'"'),i=!(o=tle(r))&&/^\d+$/.test(r),t.call(n,r,o,i,a,e))}(Array.isArray(e)?e:ele(e),t,n)}};function $oe(e){return Xoe.get(e)||Xoe.set(e,ele(e).map(function(e){return e.replace(Goe,"$2")}))}function ele(e){return e.match(Foe)||[""]}function tle(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function nle(e){return!tle(e)&&(function(e){return e.match(Yoe)&&!e.match(qoe)}(e)||function(e){return Uoe.test(e)}(e))}const rle="$",ale=".";class ile{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===rle,this.isValue=this.key[0]===ale,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?rle:this.isValue?ale:"";this.path=this.key.slice(n.length),this.getter=this.path&&Qoe.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function ole(){return ole=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ole.apply(this,arguments)}function lle(e){function t(t,n){let{value:r,path:a="",label:i,options:o,originalValue:l,sync:s}=t,c=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:h,params:u,message:p}=e;let{parent:f,context:m}=o;function v(e){return ile.isRef(e)?e.getValue(r,f,m):e}function g(e={}){const t=Roe(ole({value:r,originalValue:l,label:i,path:e.path||a},u,e.params),v),n=new _re(_re.formatError(e.message||p,t),r,t.path,e.type||d);return n.params=t,n}let b,y=ole({path:a,parent:f,type:d,createError:g,resolve:v,options:o,originalValue:l},c);if(s){try{var w;if(b=h.call(y,r,y),"function"==typeof(null==(w=b)?void 0:w.then))throw new Error(`Validation test of type: "${y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}_re.isError(b)?n(b):b?n(null,b):n(g())}else try{Promise.resolve(h.call(y,r,y)).then(e=>{_re.isError(e)?n(e):e?n(null,e):n(g())}).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}ile.prototype.__isYupRef=!0;function sle(e,t,n,r=n){let a,i,o;return t?(Qoe.forEach(t,(l,s,c)=>{let d=s?(e=>e.substr(0,e.length-1).substr(1))(l):l;if((e=e.resolve({context:r,parent:a,value:n})).innerType){let r=c?parseInt(d,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[r],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);a=n,n=n&&n[d],e=e.fields[d]}i=d,o=s?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class cle{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(ile.isRef(n)?e(n):n),[])}add(e){ile.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){ile.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new cle;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function dle(){return dle=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dle.apply(this,arguments)}class hle{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new cle,this._blacklist=new cle,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Zee.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=dle({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=dle({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=kee(dle({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=dle({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(dle({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let a=Nee(e),i=Nee(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${a} \n`+(i!==a?`result of cast: ${i}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:a,from:i=[],originalValue:o=e,strict:l=this.spec.strict,abortEarly:s=this.spec.abortEarly}=t,c=e;l||(c=this._cast(c,dle({assert:!1},t)));let d={value:c,path:a,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:i},h=[];this._typeError&&h.push(this._typeError);let u=[];this._whitelistError&&u.push(this._whitelistError),this._blacklistError&&u.push(this._blacklistError),Ore({args:d,value:c,path:a,sync:r,tests:h,endEarly:s},e=>{e?n(e,c):Ore({tests:this.tests.concat(u),args:d,path:a,sync:r,value:c,endEarly:s},n)})}validate(e,t,n){let r=this.resolve(dle({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,a)=>r._validate(e,t,(e,t)=>{e?a(e):n(t)}))}validateSync(e,t){let n;return this.resolve(dle({},t,{value:e}))._validate(e,dle({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(_re.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(_re.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):kee(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=Zee.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=Zee.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Zee.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=lle(t),a=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(a)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Sre(e).map(e=>new ile(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new Cre(r,t)),n}typeError(e){let t=this.clone();return t._typeError=lle({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=Zee.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=lle({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=Zee.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=lle({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}hle.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])hle.prototype[`${e}At`]=function(t,n,r={}){const{parent:a,parentPath:i,schema:o}=sle(this,t,n,r.context);return o[e](a&&a[i],dle({},r,{parent:a,path:t}))};for(const e of["equals","is"])hle.prototype[e]=hle.prototype.oneOf;for(const e of["not","nope"])hle.prototype[e]=hle.prototype.notOneOf;hle.prototype.optional=hle.prototype.notRequired;hle.prototype;const ule=e=>null==e;let ple=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,fle=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,mle=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,vle=e=>ule(e)||e===e.trim(),gle={}.toString();function ble(){return new yle}class yle extends hle{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===gle?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=Dee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ule(t)||t.length===this.resolve(e)}})}min(e,t=Dee.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ule(t)||t.length>=this.resolve(e)}})}max(e,t=Dee.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return ule(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,a=!1;return t&&("object"==typeof t?({excludeEmptyString:a=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Dee.matches,params:{regex:e},test:t=>ule(t)||""===t&&a||-1!==t.search(e)})}email(e=Dee.email){return this.matches(ple,{name:"email",message:e,excludeEmptyString:!0})}url(e=Dee.url){return this.matches(fle,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Dee.uuid){return this.matches(mle,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Dee.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:vle})}lowercase(e=Dee.lowercase){return this.transform(e=>ule(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>ule(e)||e===e.toLowerCase()})}uppercase(e=Dee.uppercase){return this.transform(e=>ule(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>ule(e)||e===e.toUpperCase()})}}ble.prototype=yle.prototype;var wle=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let xle=new Date("");class Ele extends hle{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],a=0;if(n=wle.exec(e)){for(var i,o=0;i=r[o];++o)n[i]=+n[i]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?xle:new Date(e))})})}_typeCheck(e){return(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(ile.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Iee.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return ule(e)||e>=this.resolve(n)}})}max(e,t=Iee.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return ule(e)||e<=this.resolve(n)}})}}Ele.INVALID_DATE=xle,Ele.prototype;var kle=function(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n};var Cle=function(e){return function(t){return null==e?void 0:e[t]}},Sle=Cle({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mle=Gne,Ale=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_le=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ole=function(e){return(e=Mle(e))&&e.replace(Ale,Sle).replace(_le,"")},Nle=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Zle=function(e){return e.match(Nle)||[]},Dle=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ile=function(e){return Dle.test(e)},Hle="\\ud800-\\udfff",Tle="\\u2700-\\u27bf",Lle="a-z\\xdf-\\xf6\\xf8-\\xff",Ple="A-Z\\xc0-\\xd6\\xd8-\\xde",Vle="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ble="["+Vle+"]",jle="\\d+",zle="["+Tle+"]",Rle="["+Lle+"]",Wle="[^"+Hle+Vle+jle+Tle+Lle+Ple+"]",Fle="(?:\\ud83c[\\udde6-\\uddff]){2}",qle="[\\ud800-\\udbff][\\udc00-\\udfff]",Yle="["+Ple+"]",Ule="(?:"+Rle+"|"+Wle+")",Gle="(?:"+Yle+"|"+Wle+")",Xle="(?:['’](?:d|ll|m|re|s|t|ve))?",Kle="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jle="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Qle="[\\ufe0e\\ufe0f]?",$le=Qle+Jle+("(?:\\u200d(?:"+["[^"+Hle+"]",Fle,qle].join("|")+")"+Qle+Jle+")*"),ese="(?:"+[zle,Fle,qle].join("|")+")"+$le,tse=RegExp([Yle+"?"+Rle+"+"+Xle+"(?="+[Ble,Yle,"$"].join("|")+")",Gle+"+"+Kle+"(?="+[Ble,Yle+Ule,"$"].join("|")+")",Yle+"?"+Ule+"+"+Xle,Yle+"+"+Kle,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jle,ese].join("|"),"g");var nse=function(e){return e.match(tse)||[]},rse=Zle,ase=Ile,ise=Gne,ose=nse;var lse=function(e,t,n){return e=ise(e),void 0===(t=n?void 0:t)?ase(e)?ose(e):rse(e):e.match(t)||[]},sse=kle,cse=Ole,dse=lse,hse=RegExp("['’]","g");var use=function(e){return function(t){return sse(dse(cse(t).replace(hse,"")),e,"")}},pse=use(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),fse=pse;var mse=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i},vse=mse;var gse=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:vse(e,t,n)},bse=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var yse=function(e){return bse.test(e)};var wse=function(e){return e.split("")},xse="\\ud800-\\udfff",Ese="["+xse+"]",kse="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Cse="\\ud83c[\\udffb-\\udfff]",Sse="[^"+xse+"]",Mse="(?:\\ud83c[\\udde6-\\uddff]){2}",Ase="[\\ud800-\\udbff][\\udc00-\\udfff]",_se="(?:"+kse+"|"+Cse+")"+"?",Ose="[\\ufe0e\\ufe0f]?",Nse=Ose+_se+("(?:\\u200d(?:"+[Sse,Mse,Ase].join("|")+")"+Ose+_se+")*"),Zse="(?:"+[Sse+kse+"?",kse,Mse,Ase,Ese].join("|")+")",Dse=RegExp(Cse+"(?="+Cse+")|"+Zse+Nse,"g");var Ise=function(e){return e.match(Dse)||[]},Hse=wse,Tse=yse,Lse=Ise;var Pse=function(e){return Tse(e)?Lse(e):Hse(e)},Vse=gse,Bse=yse,jse=Pse,zse=Gne;var Rse=function(e){return function(t){t=zse(t);var n=Bse(t)?jse(t):void 0,r=n?n[0]:t.charAt(0),a=n?Vse(n,1).join(""):t.slice(1);return r[e]()+a}},Wse=Rse("toUpperCase"),Fse=Gne,qse=Wse;var Yse=function(e){return qse(Fse(e).toLowerCase())},Use=Yse,Gse=use(function(e,t,n){return t=t.toLowerCase(),e+(n?Use(t):t)}),Xse=Gse,Kse=Dre,Jse=wae,Qse=Voe;var $se=function(e,t){var n={};return t=Qse(t),Jse(e,function(e,r,a){Kse(n,t(e,r,a),e)}),n},ece={exports:{}};function tce(e,t){var n=e.length,r=new Array(n),a={},i=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=e[n];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}(t),l=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!l.has(e[0])||!l.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||s(e[i],i,new Set);return r;function s(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!a[t]){a[t]=!0;var d=o.get(e)||new Set;if(t=(d=Array.from(d)).length){i.add(e);do{var h=d[--t];s(h,l.get(h),i)}while(t);i.delete(e)}r[--n]=e}}}ece.exports=function(e){return tce(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var a=e[n];t.add(a[0]),t.add(a[1])}return Array.from(t)}(e),e)},ece.exports.array=tce;var nce=ece.exports;function rce(e,t){let n=1/0;return e.some((e,r)=>{var a;if(-1!==(null==(a=t.path)?void 0:a.indexOf(e)))return n=r,!0}),n}function ace(e){return(t,n)=>rce(e,t)-rce(e,n)}function ice(){return ice=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ice.apply(this,arguments)}let oce=e=>"[object Object]"===Object.prototype.toString.call(e);const lce=ace([]);class sce extends hle{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=lce,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return oce(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),l={},s=ice({},t,{parent:l,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=a[e],o=Ere(r,e);if(n){let a,i=r[e];s.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:l});let o="spec"in n?n.spec:void 0,d=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}a=t.__validating&&d?r[e]:n.cast(r[e],s),void 0!==a&&(l[e]=a)}else o&&!i&&(l[e]=r[e]);l[e]!==r[e]&&(c=!0)}return c?l:r}_validate(e,t={},n){let r=[],{sync:a,from:i=[],originalValue:o=e,abortEarly:l=this.spec.abortEarly,recursive:s=this.spec.recursive}=t;i=[{schema:this,value:o},...i],t.__validating=!0,t.originalValue=o,t.from=i,super._validate(e,t,(e,c)=>{if(e){if(!_re.isError(e)||l)return void n(e,c);r.push(e)}if(!s||!oce(c))return void n(r[0]||null,c);o=o||c;let d=this._nodes.map(e=>(n,r)=>{let a=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,l=this.fields[e];l&&"validate"in l?l.validate(c[e],ice({},t,{path:a,from:i,strict:!0,parent:c,originalValue:o[e]}),r):r(null)});Ore({sync:a,tests:d,value:c,errors:r,endEarly:l,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=ice({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof hle&&t instanceof hle&&(n[e]=t.concat(r))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=ace(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([e,t])=>`${e}-${t}`));function i(e,t){let i=Qoe.split(e)[0];r.add(i),a.has(`${t}-${i}`)||n.push([t,i])}for(const t in e)if(Ere(e,t)){let n=e[t];r.add(t),ile.isRef(n)&&n.isSibling?i(n.path,t):kre(n)&&"deps"in n&&n.deps.forEach(e=>i(e,t))}return nce.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=Qoe.getter(e,!0);return this.transform(a=>{if(null==a)return a;let i=a;return Ere(a,e)&&(i=ice({},a),n||delete i[e],i[t]=r(a)),i})}noUnknown(e=!0,t=Hee.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Hee.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&$se(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(Xse)}snakeCase(){return this.transformKeys(fse)}constantCase(){return this.transformKeys(e=>fse(e).toUpperCase())}describe(){let e=super.describe();return e.fields=Roe(this.fields,e=>e.describe()),e}}function cce(e){return new sce(e)}
|
|
554
|
+
`,yQ=t=>{const{setFontFamily:n,fontFamily:a,handleUpdateLayout:i,currentLayout:o,textAlign:l,setTextAlign:s,border:c,setBorder:d,fontStyle:h,setFontStyle:u,fontWeight:p,setFontWeight:f,currentItem:m,fontSize:v,setFontSize:g,textDecoration:b,setTextDecoration:y,handleMainSidebar:w,onSave:x,activeTab:E,showButtonSave:k,setting:C,nameTemplate:S,handleChangeName:M,color:A,setColor:_,isNewTem:O}=t,{t:N}=dc();let Z;const D=(e,t)=>{o&&(clearTimeout(Z),Z=setTimeout(()=>{const n={...o};"table"===o.type&&m&&"string"==typeof m?(n.table[m][t]=e,i(n)):"signature"===o.type?(n?.signature?.style?n.signature.style[t]=e:n.signature={style:{field:e}},i(n)):o.children&&m?.id&&(n.children=OF(o.children,m.id,t,e),i(n)),"color"===t&&_(e)},300))},I=e=>{o&&o.children&&"table"!==o.type&&"signature"!==o.type&&(s(e),i({...o,align:e}))},H=e=>{o&&o.children&&"table"!==o.type&&"signature"!==o.type&&(d(e),i({...o,border:e}))};return r.jsx(e.Fragment,{children:r.jsx("div",{style:{height:50,backgroundColor:"#fff",position:"relative",width:"100%",boxShadow:"0 4px 24px 0 rgba(34, 41, 47, 0.1)",zIndex:5},children:r.jsxs("div",{className:"edit-toolbar d-flex gap-50 px-1 align-items-center h-100 w-100",children:[r.jsx("div",{className:"sidebar-toggle cursor-pointer d-block d-lg-none ",onClick:w,children:r.jsx(Jc,{fontSize:21})}),r.jsxs("div",{className:"d-flex justify-content-between ",style:{flex:1},children:[r.jsxs("div",{className:"d-flex gap-50",style:{height:28},children:[0!==E&&m&&o&&r.jsxs(r.Fragment,{children:[r.jsx("div",{style:{width:200},className:sj({"d-none":!m}),children:r.jsx(dy,{options:fQ,noHeader:!0,value:a?fQ.find(e=>e.label===a):null,onChange:e=>{D(e.label,"fontFamily"),n(e.label)},fieldValue:"label",columns:[{field:"label",headerText:"",template:e=>r.jsx("div",{style:{fontFamily:e.label},children:e.label})}],formatOptionLabel:e=>r.jsx("p",{style:{paddingLeft:3,borderRadius:2,fontFamily:a,fontWeight:p?"bold":"normal",fontStyle:h?"italic":"normal",textDecoration:!0===b?"underline":""},children:e.label})})}),r.jsx("div",{className:sj("ms-25",{"d-none":!m}),style:{width:60},children:r.jsx(dy,{options:Array.from({length:100},(e,t)=>({value:t+1,label:t+1})),noHeader:!0,value:v?{value:v,label:v}:null,onChange:e=>{D(e.value,"fontSize"),g(e.value)}})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":p},{"d-none":!m}),onClick:()=>{D(!p,"bold"),f(!p)},children:r.jsx(Zc,{fontSize:18})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":h},{"d-none":!m}),onClick:()=>{D(!h,"italic"),u(!h)},children:r.jsx(Uc,{fontSize:18})}),r.jsx("div",{className:sj("btn-input-style",{"active-custom":b},{"d-none":!m}),onClick:()=>{D(!b,"underline"),y(!b)},children:r.jsx(cd,{fontSize:18})}),r.jsxs(_P,{tag:"label",color:"none",className:sj("btn-input-style"),children:[r.jsx(sd,{stroke:A??"#000000",fontSize:18}),r.jsx("input",{type:"color",id:"color",value:A,style:{color:"#FFF",border:"none",height:0,width:0,outline:"none",padding:0},onChange:e=>{D(e.target.value,"color")}})]})]}),o&&r.jsxs(r.Fragment,{children:[r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"left"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("left"),children:r.jsx(_c,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"center"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("center"),children:r.jsx(Ac,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"right"===l,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>I("right"),children:r.jsx(Oc,{fontSize:18})}),r.jsxs(ej,{tag:"div",children:[r.jsxs($P,{tag:"div",className:"d-flex align-items-center pt-50",children:["none"===c&&r.jsx(Qc,{fontSize:18}),"top"===c&&r.jsx(id,{fontSize:18}),"bottom"===c&&r.jsx(Dc,{fontSize:18}),"left"===c&&r.jsx(Gc,{fontSize:18}),"right"===c&&r.jsx(ad,{fontSize:18}),"vertical"===c&&r.jsx(hd,{fontSize:18}),"horizontal"===c&&r.jsx(Fc,{fontSize:18}),"inside"===c&&r.jsx(Yc,{fontSize:18}),"outside"===c&&r.jsx($c,{fontSize:18}),"full"===c&&r.jsx(Wc,{fontSize:18})]}),r.jsxs(XP,{className:"formula-dropdown icon-dropdown p-50 d-flex",style:{maxWidth:innerWidth>1280?1280:innerWidth,borderRadius:8},children:[r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"none"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("none"),children:r.jsx(Qc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"top"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("top"),children:r.jsx(id,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"bottom"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("bottom"),children:r.jsx(Dc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"left"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("left"),children:r.jsx(Gc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"right"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("right"),children:r.jsx(ad,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"outside"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("outside"),children:r.jsx($c,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"inside"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("inside"),children:r.jsx(Yc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"vertical"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("vertical"),children:r.jsx(hd,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"horizontal"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("horizontal"),children:r.jsx(Fc,{fontSize:18})}),r.jsx(bQ,{className:sj("edit-toolbar-item cursor-pointer p-25",{active:"full"===c,"d-none":!o||"table"===o?.type||"signature"===o?.type}),onClick:()=>H("full"),children:r.jsx(Wc,{fontSize:18})})]})]})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"d-flex justify-content-center",children:[r.jsx("div",{style:{width:100,padding:"5px 7px"},children:" Tên mẫu in: "}),r.jsx("div",{style:{flex:1},children:O?r.jsx(r.Fragment,{children:r.jsx("div",{style:{fontSize:14,padding:"5px 7px",fontWeight:600},children:N(S)})}):r.jsx(r.Fragment,{children:r.jsx(yB,{value:S,style:{fontSize:13},width:200,onChange:e=>M(e.target.value)})})})]}),k&&r.jsx(_P,{color:"primary",onClick:()=>x(C),children:N?N("Save"):"Save"})]})]})]})})})},wQ=e.forwardRef((t,n)=>{const{data:a,height:i,printSetting:o,formatNumber:l,dataFields:s,signatures:c,tableFields:d,showButtonSave:h,nameTemplate:u,isNewTem:p,onSaveData:f,handleChangeName:m,CDN_URL_VIEW:v,uploadFileApi:g}=t;e.useImperativeHandle(n,()=>({onSave:ee}));const b=37.7,y={A4:{width:21,height:29.7},A4R:{width:29.7,height:21},A3:{width:29.7,height:42},A3R:{width:42,height:29.7},A5:{width:14.8,height:21},A5R:{width:21,height:14.8}},[w,x]=e.useState(!1),[E,k]=e.useState(0),[C,S]=e.useState(dj),[M,A]=e.useState(14),[_,O]=e.useState(!1),[N,Z]=e.useState(!1),[D,I]=e.useState(!1),[H,T]=e.useState("left"),[L,P]=e.useState("none"),[V,B]=e.useState("#000"),[j,z]=e.useState(null),[R,W]=e.useState(y.A4),[F,q]=e.useState(void 0),[Y,U]=e.useState({...o}),[G,X]=e.useState(null),[K,J]=e.useState(null),[Q,$]=e.useState(null);e.useEffect(()=>{if(o&&!MF(o)){const e={layout:ZF(o.layout,a),style:{...o.style},pageSetting:{...o.pageSetting,images:o.pageSetting.images?.map(e=>({...e}))}};U(e);const t=DF(e.layout??[]);q({lg:t,md:t,sm:t,xs:t,xxs:t})}},[o]),e.useEffect(()=>{Y&&!MF(Y)&&W(y[Y.pageSetting?.pageSize??"A4"])},[Y]);const ee=()=>{f({...Y})},te=()=>x(!w),ne=e=>{const t=LF([...Y.layout],e);U({...Y,layout:t})},re=(e,t)=>{const n=e?.fontSize?e?.fontSize:14;n!==M&&A(n);const r=e?.fontFamily?e?.fontFamily:dj;r!==C&&S(r);const a=!!e?.bold;a!==_&&O(a);const i=!!e?.italic;i!==N&&Z(i);const o=!!e?.underline;o!==D&&I(o);const l=e?.color;l!==V&&B(l);const s=t&&t.align?t.align:e?.textAlign?e?.textAlign:"left";s!==H&&T(s);const c=t&&t.align?t.align:e?.border?e?.border:"none";c!==H&&T(c)};return r.jsx(iJ,{height:i,className:"edit-template-application",children:r.jsxs("div",{className:"template-content-area-wrapper",children:[r.jsx("div",{className:sj("sidebar-left",{show:w}),children:r.jsx(gQ,{setActiveTab:k,activeTab:E,setCurrentDimensions:z,currentItem:Q,setCurrentItem:$,setting:Y,dataItem:a,formatNumber:l,setSetting:U,currentLayout:G,setCurrentLayout:X,setLayouts:q,handleUpdateLayout:ne,dataFields:s,signatures:c,tableFields:d,CDN_URL_VIEW:v,uploadFileApi:g})}),r.jsxs("div",{className:"content-right",children:[r.jsx("div",{className:sj("body-content-overlay",{show:w}),onClick:te}),r.jsx(yQ,{setFontFamily:S,fontFamily:C,handleUpdateLayout:ne,currentLayout:G,textAlign:H,setTextAlign:T,border:L,setBorder:P,fontStyle:N,setFontStyle:Z,fontWeight:_,setFontWeight:O,currentItem:Q,fontSize:M,setFontSize:A,color:V,setColor:B,textDecoration:D,setTextDecoration:I,handleMainSidebar:te,onSave:ee,setting:Y,activeTab:E,showButtonSave:h,nameTemplate:u,handleChangeName:m,isNewTem:p}),r.jsx("div",{className:"",style:{backgroundColor:"#e0e0e0",height:"calc(100% - 50px)",width:"100%",padding:"1rem",overflow:"auto"},children:r.jsx("div",{className:" d-flex justify-content-center",style:{minWidth:R.width*b},children:r.jsx("div",{style:{width:R.width*b,minWidth:R.width*b,minHeight:R.height*b,height:"auto",backgroundColor:"#fff",overflow:"hidden"},children:r.jsxs(oJ,{type:0===E?"layout":"section",className:"h-100",style:{position:"relative",paddingTop:(Y.pageSetting.marginTop??1)*b,paddingBottom:(Y.pageSetting.marginBottom??1)*b,paddingLeft:(Y.pageSetting.marginLeft??1)*b,paddingRight:(Y.pageSetting.marginRight??1)*b},children:[r.jsx("div",{style:{position:"absolute",width:"100%",height:"100%",backgroundImage:`url(${Y.pageSetting.background})`,backgroundSize:"100% 100%",top:"50%",left:"50%",transform:"translate(-50%, -50%)",opacity:Y.pageSetting.opacity||0===Y.pageSetting.opacity?Y.pageSetting.opacity:1,zIndex:1}}),Y.pageSetting.images?.map((e,t)=>r.jsx("img",{src:e.url,alt:"",width:e.width,height:e.height,style:{position:"absolute",top:e.top,left:e.left,zIndex:e.behindText?1:3}},`image-${t}`)),F&&Y.layout&&Y.layout.flat().length>0&&0===E&&r.jsx(tQ,{pageSize:R,setting:Y,layouts:F,setLayouts:q,setSetting:U,dataItem:a,currentLayout:G,setCurrentLayout:X,onSetConfig:re,formatNumber:l,currentItem:Q,currentLayoutHover:K,setCurrentLayoutHover:J,currentDimensions:j}),F&&Y.layout&&Y.layout.length>0&&0!==E&&r.jsx(eQ,{pageSize:R,setting:Y,setSetting:U,dataItem:a,currentLayout:G,setCurrentLayout:X,onSetConfig:re,formatNumber:l,currentItem:Q,setCurrentItem:$,setLayouts:q})]})})})})]})]})})}),xQ={layout:[[{width:12,children:[],type:"content"}]],pageSetting:{marginBottom:.5,marginLeft:1,marginRight:1,marginTop:.5},style:{}},EQ=t=>{const{openModal:n,handleModal:a,typeModal:i,windowSize:o,dataSetting:l,dataSource:s,onSaveData:c,organization:d,signatures:h,formatNumber:u,CDN_URL_VIEW:p,uploadFileApi:f,updateGeneralSettingApi:m}=t,{t:v}=dc(),g=e.useRef(null),[b,y]=e.useState({...xQ}),[w,x]=e.useState(""),E=()=>{a()};return r.jsxs(eB,{isOpen:n,toggle:a,className:"modal-dialog-centered",contentClassName:"p-0",fullscreen:!0,onOpened:async()=>{let e=l.setting;e&&("Add"===i&&(e={...xQ}),e.layout.forEach(e=>{e.filter(e=>"signature"===e.type).forEach(e=>{e.signature?.setting.detail.forEach(e=>{const t=h?.detail?.find(t=>t.code===e.code);t&&(e.name=t.name,e.title||(e.title=t.title))})})}),y(e)),x("Edit"===i?l.name:"")},onClosed:()=>{},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{typeModal:i,handleModal:a,title:"Tùy chọn in",className:"mb-0"}),r.jsx(wQ,{ref:g,nameTemplate:w,isNewTem:l?.isDefault&&"Edit"===i,handleChangeName:e=>{x(e)},onSaveData:e=>{w?m({id:"Edit"===i?l.id:void 0,name:w,organizationId:d.id,resourceCode:l.resourceCode,type:"PrintDocument",category:"EditTemplate",value:JSON.stringify({type:l.type,setting:e})}).then(e=>{e.isValid?(c(w),E(),XN(v("Edit"===i?"UpdateSuccessful":"AddSuccessful"))):BF(e,v)}).catch(()=>{UN(v,"Edit"===i?"UpdateFail":"AddFail")}):UN(v,"Vui lòng nhập tên mẫu in!")},dataFields:l?.dataFields??[],tableFields:l?.tableFields??[],signatures:h?.detail??[],printSetting:b,height:o.innerHeight-102+"px",data:s,CDN_URL_VIEW:p,uploadFileApi:f,formatNumber:{decimalSeparator:u.decimalSeparator,thousandSeparator:u.thousandSeparator,colorNegative:u.colorNegative,prefixNegative:u.prefixNegative,suffixNegative:u.suffixNegative}}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",className:"me-1",onClick:()=>{g.current&&g.current?.onSave()},children:v("Save")}),r.jsx(_P,{color:"secondary",onClick:E,outline:!0,className:"me-1",children:v("Close")})]})]})};var kQ=e=>"checkbox"===e.type,CQ=e=>e instanceof Date,SQ=e=>null==e;const MQ=e=>"object"==typeof e;var AQ=e=>!SQ(e)&&!Array.isArray(e)&&MQ(e)&&!CQ(e),_Q=e=>AQ(e)&&e.target?kQ(e.target)?e.target.checked:e.target.value:e,OQ=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),NQ="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function ZQ(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(NQ&&(e instanceof Blob||e instanceof FileList)||!n&&!AQ(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return AQ(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=ZQ(e[n]);else t=e}return t}var DQ=e=>Array.isArray(e)?e.filter(Boolean):[],IQ=e=>void 0===e,HQ=(e,t,n)=>{if(!t||!AQ(e))return n;const r=DQ(t.split(/[,[\].]+?/)).reduce((e,t)=>SQ(e)?e:e[t],e);return IQ(r)||r===e?IQ(e[t])?n:e[t]:r};const TQ="blur",LQ="focusout",PQ="change",VQ="onBlur",BQ="onChange",jQ="onSubmit",zQ="onTouched",RQ="all",WQ="max",FQ="min",qQ="maxLength",YQ="minLength",UQ="pattern",GQ="required",XQ="validate",KQ=f.default.createContext(null),JQ=()=>f.default.useContext(KQ);var QQ=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const a=i;return t._proxyFormState[a]!==RQ&&(t._proxyFormState[a]=!r||RQ),n&&(n[a]=!0),e[a]}});return a},$Q=e=>AQ(e)&&!Object.keys(e).length,e$=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return $Q(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||RQ))},t$=e=>Array.isArray(e)?e:[e],n$=(e,t,n)=>n&&t?e===t:!e||!t||e===t||t$(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function r$(e){const t=f.default.useRef(e);t.current=e,f.default.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var a$=e=>"string"==typeof e,i$=(e,t,n,r,a)=>a$(e)?(r&&t.watch.add(e),HQ(n,e,a)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),HQ(n,e))):(r&&(t.watchAll=!0),n);var o$=e=>/^\w*$/.test(e),l$=e=>DQ(e.replace(/["|']|\]/g,"").split(/\.|\[/));function s$(e,t,n){let r=-1;const a=o$(t)?[t]:l$(t),i=a.length,o=i-1;for(;++r<i;){const t=a[r];let i=n;if(r!==o){const n=e[t];i=AQ(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=i,e=e[t]}return e}function c$(e){const t=JQ(),{name:n,control:r=t.control,shouldUnregister:a}=e,i=OQ(r._names.array,n),o=function(e){const t=JQ(),{control:n=t.control,name:r,defaultValue:a,disabled:i,exact:o}=e||{},l=f.default.useRef(r);l.current=r,r$({disabled:i,subject:n._subjects.values,next:e=>{n$(l.current,e.name,o)&&c(ZQ(i$(l.current,n._names,e.values||n._formValues,!1,a)))}});const[s,c]=f.default.useState(n._getWatch(r,a));return f.default.useEffect(()=>n._removeUnmounted()),s}({control:r,name:n,defaultValue:HQ(r._formValues,n,HQ(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=JQ(),{control:n=t.control,disabled:r,name:a,exact:i}=e||{},[o,l]=f.default.useState(n._formState),s=f.default.useRef(!0),c=f.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=f.default.useRef(a);return d.current=a,r$({disabled:r,next:e=>s.current&&n$(d.current,e.name,i)&&e$(e,c.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),f.default.useEffect(()=>(s.current=!0,c.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),QQ(o,n,c.current,!1)}({control:r,name:n}),s=f.default.useRef(r.register(n,{...e.rules,value:o}));return f.default.useEffect(()=>{const e=r._options.shouldUnregister||a,t=(e,t)=>{const n=HQ(r._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=ZQ(HQ(r._options.defaultValues,n));s$(r._defaultValues,n,e),IQ(HQ(r._formValues,n))&&s$(r._formValues,n,e)}return()=>{(i?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,i,a]),{field:{name:n,value:o,onChange:f.default.useCallback(e=>s.current.onChange({target:{value:_Q(e),name:n},type:PQ}),[n]),onBlur:f.default.useCallback(()=>s.current.onBlur({target:{value:HQ(r._formValues,n),name:n},type:TQ}),[n,r]),ref:e=>{const t=HQ(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!HQ(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!HQ(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!HQ(l.touchedFields,n)},error:{enumerable:!0,get:()=>HQ(l.errors,n)}})}}const d$=e=>e.render(c$(e));var h$=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{};const u$=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=HQ(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else AQ(r)&&u$(r,t)}}};var p$=e=>({isOnSubmit:!e||e===jQ,isOnBlur:e===VQ,isOnChange:e===BQ,isOnAll:e===RQ,isOnTouch:e===zQ}),f$=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),m$=(e,t,n)=>{const r=DQ(HQ(e,n));return s$(r,"root",t[n]),s$(e,n,r),e},v$=e=>"boolean"==typeof e,g$=e=>"file"===e.type,b$=e=>"function"==typeof e,y$=e=>{if(!NQ)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},w$=e=>a$(e),x$=e=>"radio"===e.type,E$=e=>e instanceof RegExp;const k$={value:!1,isValid:!1},C$={value:!0,isValid:!0};var S$=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!IQ(e[0].attributes.value)?IQ(e[0].value)||""===e[0].value?C$:{value:e[0].value,isValid:!0}:C$:k$}return k$};const M$={isValid:!1,value:null};var A$=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,M$):M$;function _$(e,t,n="validate"){if(w$(e)||Array.isArray(e)&&e.every(w$)||v$(e)&&!e)return{type:n,message:w$(e)?e:"",ref:t}}var O$=e=>AQ(e)&&!E$(e)?e:{value:e,message:""},N$=async(e,t,n,r,a)=>{const{ref:i,refs:o,required:l,maxLength:s,minLength:c,min:d,max:h,pattern:u,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,b=HQ(t,f);if(!v||g)return{};const y=o?o[0]:i,w=e=>{r&&y.reportValidity&&(y.setCustomValidity(v$(e)?"":e||""),y.reportValidity())},x={},E=x$(i),k=kQ(i),C=E||k,S=(m||g$(i))&&IQ(i.value)&&IQ(b)||y$(i)&&""===i.value||""===b||Array.isArray(b)&&!b.length,M=h$.bind(null,f,n,x),A=(e,t,n,r=qQ,a=YQ)=>{const o=e?t:n;x[f]={type:e?r:a,message:o,ref:i,...M(e?r:a,o)}};if(a?!Array.isArray(b)||!b.length:l&&(!C&&(S||SQ(b))||v$(b)&&!b||k&&!S$(o).isValid||E&&!A$(o).isValid)){const{value:e,message:t}=w$(l)?{value:!!l,message:l}:O$(l);if(e&&(x[f]={type:GQ,message:t,ref:y,...M(GQ,t)},!n))return w(t),x}if(!(S||SQ(d)&&SQ(h))){let e,t;const r=O$(h),a=O$(d);if(SQ(b)||isNaN(b)){const n=i.valueAsDate||new Date(b),o=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,s="week"==i.type;a$(r.value)&&b&&(e=l?o(b)>o(r.value):s?b>r.value:n>new Date(r.value)),a$(a.value)&&b&&(t=l?o(b)<o(a.value):s?b<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(b?+b:b);SQ(r.value)||(e=n>r.value),SQ(a.value)||(t=n<a.value)}if((e||t)&&(A(!!e,r.message,a.message,WQ,FQ),!n))return w(x[f].message),x}if((s||c)&&!S&&(a$(b)||a&&Array.isArray(b))){const e=O$(s),t=O$(c),r=!SQ(e.value)&&b.length>+e.value,a=!SQ(t.value)&&b.length<+t.value;if((r||a)&&(A(r,e.message,t.message),!n))return w(x[f].message),x}if(u&&!S&&a$(b)){const{value:e,message:t}=O$(u);if(E$(e)&&!b.match(e)&&(x[f]={type:UQ,message:t,ref:i,...M(UQ,t)},!n))return w(t),x}if(p)if(b$(p)){const e=_$(await p(b,t),y);if(e&&(x[f]={...e,...M(XQ,e.message)},!n))return w(e.message),x}else if(AQ(p)){let e={};for(const r in p){if(!$Q(e)&&!n)break;const a=_$(await p[r](b,t),y,r);a&&(e={...a,...M(r,a.message)},w(a.message),n&&(x[f]=e))}if(!$Q(e)&&(x[f]={ref:y,...e},!n))return x}return w(!0),x};function Z$(e,t){const n=Array.isArray(t)?t:o$(t)?[t]:l$(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=IQ(e)?r++:e[t[r++]];return e}(e,n),a=n.length-1,i=n[a];return r&&delete r[i],0!==a&&(AQ(r)&&$Q(r)||Array.isArray(r)&&function(e){for(const t in e)if(!IQ(e[t]))return!1;return!0}(r))&&Z$(e,n.slice(0,-1)),e}function D$(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var I$=e=>SQ(e)||!MQ(e);function H$(e,t){if(I$(e)||I$(t))return e===t;if(CQ(e)&&CQ(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(CQ(n)&&CQ(e)||AQ(n)&&AQ(e)||Array.isArray(n)&&Array.isArray(e)?!H$(n,e):n!==e)return!1}}return!0}var T$=e=>"select-multiple"===e.type,L$=e=>y$(e)&&e.isConnected,P$=e=>{for(const t in e)if(b$(e[t]))return!0;return!1};function V$(e,t={}){const n=Array.isArray(e);if(AQ(e)||n)for(const n in e)Array.isArray(e[n])||AQ(e[n])&&!P$(e[n])?(t[n]=Array.isArray(e[n])?[]:{},V$(e[n],t[n])):SQ(e[n])||(t[n]=!0);return t}function B$(e,t,n){const r=Array.isArray(e);if(AQ(e)||r)for(const r in e)Array.isArray(e[r])||AQ(e[r])&&!P$(e[r])?IQ(t)||I$(n[r])?n[r]=Array.isArray(e[r])?V$(e[r],[]):{...V$(e[r])}:B$(e[r],SQ(t)?{}:t[r],n[r]):n[r]=!H$(e[r],t[r]);return n}var j$=(e,t)=>B$(e,t,V$(t)),z$=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>IQ(e)?e:t?""===e?NaN:e?+e:e:n&&a$(e)?new Date(e):r?r(e):e;function R$(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return g$(t)?t.files:x$(t)?A$(e.refs).value:T$(t)?[...t.selectedOptions].map(({value:e})=>e):kQ(t)?S$(e.refs).value:z$(IQ(t.value)?e.ref.value:t.value,e)}var W$=e=>IQ(e)?e:E$(e)?e.source:AQ(e)?E$(e.value)?e.value.source:e.value:e;function F$(e,t,n){const r=HQ(e,n);if(r||o$(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),i=HQ(t,r),o=HQ(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};a.pop()}return{name:n}}const q$={mode:jQ,reValidateMode:BQ,shouldFocusError:!0};function Y$(e={},t){let n,r={...q$,...e},a={submitCount:0,isDirty:!1,isLoading:b$(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=(AQ(r.defaultValues)||AQ(r.values))&&ZQ(r.defaultValues||r.values)||{},l=r.shouldUnregister?{}:ZQ(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:D$(),array:D$(),state:D$()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,f=p$(r.mode),m=p$(r.reValidateMode),v=r.criteriaMode===RQ,g=async e=>{if(h.isValid||e){const e=r.resolver?$Q((await E()).errors):await k(i,!0);e!==a.isValid&&u.state.next({isValid:e})}},b=e=>h.isValidating&&u.state.next({isValidating:e}),y=(e,t,n,r)=>{const a=HQ(i,e);if(a){const i=HQ(l,e,IQ(n)?HQ(o,e):n);IQ(i)||r&&r.defaultChecked||t?s$(l,e,t?i:R$(a._f)):M(e,i),s.mount&&g()}},w=(e,t,n,r,i)=>{let l=!1,s=!1;const c={name:e};if(!n||r){h.isDirty&&(s=a.isDirty,a.isDirty=c.isDirty=C(),l=s!==c.isDirty);const n=H$(HQ(o,e),t);s=HQ(a.dirtyFields,e),n?Z$(a.dirtyFields,e):s$(a.dirtyFields,e,!0),c.dirtyFields=a.dirtyFields,l=l||h.dirtyFields&&s!==!n}if(n){const t=HQ(a.touchedFields,e);t||(s$(a.touchedFields,e,n),c.touchedFields=a.touchedFields,l=l||h.touchedFields&&t!==n)}return l&&i&&u.state.next(c),l?c:{}},x=(t,r,i,o)=>{const l=HQ(a.errors,t),s=h.isValid&&v$(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{s$(a.errors,e,t),u.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(d),d=setTimeout(c,e)},n(e.delayError)):(clearTimeout(d),n=null,i?s$(a.errors,t,i):Z$(a.errors,t)),(i?!H$(l,i):l)||!$Q(o)||s){const e={...o,...s&&v$(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},u.state.next(e)}b(!1)},E=async e=>r.resolver(l,r.context,((e,t,n,r)=>{const a={};for(const n of e){const e=HQ(t,n);e&&s$(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}})(e||c.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),k=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=c.array.has(e.name),s=await N$(o,l,v,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(HQ(s,e.name)?i?m$(a.errors,s,e.name):s$(a.errors,e.name,s[e.name]):Z$(a.errors,e.name))}i&&await k(i,t,n)}}return n.valid},C=(e,t)=>(e&&t&&s$(l,e,t),!H$(Z(),o)),S=(e,t,n)=>i$(e,c,{...s.mount?l:IQ(t)?o:a$(e)?{[e]:t}:t},n,t),M=(e,t,n={})=>{const r=HQ(i,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&s$(l,e,z$(t,n)),a=y$(n.ref)&&SQ(t)?"":t,T$(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?kQ(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(e=>e.checked=e.value===a):g$(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||u.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&w(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&N(e)},A=(e,t,n)=>{for(const r in t){const a=t[r],o=`${e}.${r}`,l=HQ(i,o);!c.array.has(e)&&I$(a)&&(!l||l._f)||CQ(a)?M(o,a,n):A(o,a,n)}},_=(e,n,r={})=>{const d=HQ(i,e),p=c.array.has(e),f=ZQ(n);s$(l,e,f),p?(u.array.next({name:e,values:{...l}}),(h.isDirty||h.dirtyFields)&&r.shouldDirty&&u.state.next({name:e,dirtyFields:j$(o,l),isDirty:C(e,f)})):!d||d._f||SQ(f)?M(e,f,r):A(e,f,r),f$(e,c)&&u.state.next({...a}),u.values.next({name:e,values:{...l}}),!s.mount&&t()},O=async e=>{const t=e.target;let o=t.name,s=!0;const d=HQ(i,o);if(d){let y,C;const S=t.type?R$(d._f):_Q(e),M=e.type===TQ||e.type===LQ,A=!((p=d._f).mount&&(p.required||p.min||p.max||p.maxLength||p.minLength||p.pattern||p.validate)||r.resolver||HQ(a.errors,o)||d._f.deps)||((e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e))(M,HQ(a.touchedFields,o),a.isSubmitted,m,f),_=f$(o,c,M);s$(l,o,S),M?(d._f.onBlur&&d._f.onBlur(e),n&&n(0)):d._f.onChange&&d._f.onChange(e);const O=w(o,S,M,!1),Z=!$Q(O)||_;if(!M&&u.values.next({name:o,type:e.type,values:{...l}}),A)return h.isValid&&g(),Z&&u.state.next({name:o,..._?{}:O});if(!M&&_&&u.state.next({...a}),b(!0),r.resolver){const{errors:e}=await E([o]),t=F$(a.errors,i,o),n=F$(e,i,t.name||o);y=n.error,o=n.name,C=$Q(e)}else y=(await N$(d,l,v,r.shouldUseNativeValidation))[o],s=isNaN(S)||S===HQ(l,o,S),s&&(y?C=!1:h.isValid&&(C=await k(i,!0)));s&&(d._f.deps&&N(d._f.deps),x(o,C,y,O))}var p},N=async(e,t={})=>{let n,o;const l=t$(e);if(b(!0),r.resolver){const t=await(async e=>{const{errors:t}=await E();if(e)for(const n of e){const e=HQ(t,n);e?s$(a.errors,n,e):Z$(a.errors,n)}else a.errors=t;return t})(IQ(e)?e:l);n=$Q(t),o=e?!l.some(e=>HQ(t,e)):n}else e?(o=(await Promise.all(l.map(async e=>{const t=HQ(i,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||a.isValid)&&g()):o=n=await k(i);return u.state.next({...!a$(e)||h.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!o&&u$(i,e=>e&&HQ(a.errors,e),e?l:c.mount),o},Z=e=>{const t={...o,...s.mount?l:{}};return IQ(e)?t:a$(e)?HQ(t,e):e.map(e=>HQ(t,e))},D=(e,t)=>({invalid:!!HQ((t||a).errors,e),isDirty:!!HQ((t||a).dirtyFields,e),isTouched:!!HQ((t||a).touchedFields,e),error:HQ((t||a).errors,e)}),I=(e,t={})=>{for(const n of e?t$(e):c.mount)c.mount.delete(n),c.array.delete(n),t.keepValue||(Z$(i,n),Z$(l,n)),!t.keepError&&Z$(a.errors,n),!t.keepDirty&&Z$(a.dirtyFields,n),!t.keepTouched&&Z$(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&Z$(o,n);u.values.next({values:{...l}}),u.state.next({...a,...t.keepDirty?{isDirty:C()}:{}}),!t.keepIsValid&&g()},H=(e,t={})=>{let n=HQ(i,e);const a=v$(t.disabled);return s$(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),n?a&&s$(l,e,t.disabled?void 0:HQ(l,e,R$(n._f))):y(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:W$(t.min),max:W$(t.max),minLength:W$(t.minLength),maxLength:W$(t.maxLength),pattern:W$(t.pattern)}:{},name:e,onChange:O,onBlur:O,ref:a=>{if(a){H(e,t),n=HQ(i,e);const r=IQ(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,l=(e=>x$(e)||kQ(e))(r),s=n._f.refs||[];if(l?s.find(e=>e===r):r===n._f.ref)return;s$(i,e,{_f:{...n._f,...l?{refs:[...s.filter(L$),r,...Array.isArray(HQ(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=HQ(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!OQ(c.array,e)||!s.action)&&c.unMount.add(e)}}},T=()=>r.shouldFocusError&&u$(i,e=>e&&HQ(a.errors,e),c.mount),L=(n,r={})=>{const d=n||o,f=ZQ(d),m=n&&!$Q(n)?f:o;if(r.keepDefaultValues||(o=d),!r.keepValues){if(r.keepDirtyValues||p)for(const e of c.mount)HQ(a.dirtyFields,e)?s$(m,e,HQ(l,e)):_(e,HQ(m,e));else{if(NQ&&IQ(n))for(const e of c.mount){const t=HQ(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(y$(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}l=e.shouldUnregister?r.keepDefaultValues?ZQ(o):{}:f,u.array.next({values:{...m}}),u.values.next({values:{...m}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!h.isValid||!!r.keepIsValid,s.watch=!!e.shouldUnregister,u.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||H$(n,o)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?j$(o,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},P=(e,t)=>L(b$(e)?e(l):e,t);return{control:{register:H,unregister:I,getFieldState:D,_executeSchema:E,_getWatch:S,_getDirty:C,_updateValid:g,_removeUnmounted:()=>{for(const e of c.unMount){const t=HQ(i,e);t&&(t._f.refs?t._f.refs.every(e=>!L$(e)):!L$(t._f.ref))&&I(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,r,c=!0,d=!0)=>{if(r&&n){if(s.action=!0,d&&Array.isArray(HQ(i,e))){const t=n(HQ(i,e),r.argA,r.argB);c&&s$(i,e,t)}if(d&&Array.isArray(HQ(a.errors,e))){const t=n(HQ(a.errors,e),r.argA,r.argB);c&&s$(a.errors,e,t),((e,t)=>{!DQ(HQ(e,t)).length&&Z$(e,t)})(a.errors,e)}if(h.touchedFields&&d&&Array.isArray(HQ(a.touchedFields,e))){const t=n(HQ(a.touchedFields,e),r.argA,r.argB);c&&s$(a.touchedFields,e,t)}h.dirtyFields&&(a.dirtyFields=j$(o,l)),u.state.next({name:e,isDirty:C(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else s$(l,e,t)},_getFieldArray:t=>DQ(HQ(s.mount?l:o,t,e.shouldUnregister?HQ(o,t,[]):[])),_reset:L,_resetDefaultValues:()=>b$(r.defaultValues)&&r.defaultValues().then(e=>{P(e,r.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:e=>{a={...a,...e}},_subjects:u,_proxyFormState:h,get _fields(){return i},get _formValues(){return l},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:N,register:H,handleSubmit:(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let o=ZQ(l);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await E();a.errors=e,o=t}else await k(i);Z$(a.errors,"root"),$Q(a.errors)?(u.state.next({errors:{}}),await e(o,n)):(t&&await t({...a.errors},n),T(),setTimeout(T)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:$Q(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>b$(e)?u.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:_,getValues:Z,reset:P,resetField:(e,t={})=>{HQ(i,e)&&(IQ(t.defaultValue)?_(e,HQ(o,e)):(_(e,t.defaultValue),s$(o,e,t.defaultValue)),t.keepTouched||Z$(a.touchedFields,e),t.keepDirty||(Z$(a.dirtyFields,e),a.isDirty=t.defaultValue?C(e,HQ(o,e)):C()),t.keepError||(Z$(a.errors,e),h.isValid&&g()),u.state.next({...a}))},clearErrors:e=>{e&&t$(e).forEach(e=>Z$(a.errors,e)),u.state.next({errors:e?a.errors:{}})},unregister:I,setError:(e,t,n)=>{const r=(HQ(i,e,{_f:{}})._f||{}).ref;s$(a.errors,e,{...t,ref:r}),u.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{const n=HQ(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}var U$,G$,X$=function(e,t,n){if(e&&"reportValidity"in e){var r=HQ(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},K$=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?X$(r.ref,n,e):r.refs&&r.refs.forEach(function(t){return X$(t,n,e)})};for(var r in t.fields)n(r)},J$=function(e,t){t.shouldUseNativeValidation&&K$(e,t);var n={};for(var r in e){var a=HQ(t.fields,r);s$(n,r,Object.assign(e[r],{ref:a&&a.ref}))}return n},Q$=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(r,a,i){try{return Promise.resolve(function(o,l){try{var s=(t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:a}))).then(function(e){return i.shouldUseNativeValidation&&K$({},i),{values:n.rawValues?r:e,errors:{}}}))}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(0,function(e){if(!e.inner)throw e;return{values:{},errors:J$((t=e,n=!i.shouldUseNativeValidation&&"all"===i.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,a=r&&r[t.type];e[t.path]=h$(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},{})),i)};var t,n}))}catch(e){return Promise.reject(e)}}};try{U$=Map}catch(qNe){}try{G$=Set}catch(qNe){}function $$(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(e0);if(U$&&e instanceof U$)return new Map(Array.from(e.entries()));if(G$&&e instanceof G$)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var a in n.push(r),e){var i=t.findIndex(function(t){return t===e[a]});r[a]=i>-1?n[i]:$$(e[a],t,n)}return r}return e}function e0(e){return $$(e,[],[])}const t0=Object.prototype.toString,n0=Error.prototype.toString,r0=RegExp.prototype.toString,a0="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",i0=/^Symbol\((.*)\)(.*)$/;function o0(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return a0.call(e).replace(i0,"Symbol($1)");const r=t0.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+n0.call(e)+"]":"RegExp"===r?r0.call(e):null}function l0(e,t){let n=o0(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=o0(this[e],t);return null!==r?r:n},2)}let s0={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let a=null!=r&&r!==n,i=`${e} must be a \`${t}\` type, but the final value was: \`${l0(n,!0)}\``+(a?` (cast from the value \`${l0(r,!0)}\`).`:".");return null===n&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},c0={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},d0={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},h0={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:s0,string:c0,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:d0,object:h0,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});var u0=Object.prototype.hasOwnProperty;var p0=function(e,t){return null!=e&&u0.call(e,t)},f0=Array.isArray,m0="object"==typeof _I&&_I&&_I.Object===Object&&_I,v0=m0,g0="object"==typeof self&&self&&self.Object===Object&&self,b0=v0||g0||Function("return this")(),y0=b0.Symbol,w0=y0,x0=Object.prototype,E0=x0.hasOwnProperty,k0=x0.toString,C0=w0?w0.toStringTag:void 0;var S0=function(e){var t=E0.call(e,C0),n=e[C0];try{e[C0]=void 0;var r=!0}catch(e){}var a=k0.call(e);return r&&(t?e[C0]=n:delete e[C0]),a},M0=Object.prototype.toString;var A0=S0,_0=function(e){return M0.call(e)},O0=y0?y0.toStringTag:void 0;var N0=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O0&&O0 in Object(e)?A0(e):_0(e)};var Z0=function(e){return null!=e&&"object"==typeof e},D0=N0,I0=Z0;var H0=function(e){return"symbol"==typeof e||I0(e)&&"[object Symbol]"==D0(e)},T0=f0,L0=H0,P0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V0=/^\w*$/;var B0=function(e,t){if(T0(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!L0(e))||(V0.test(e)||!P0.test(e)||null!=t&&e in Object(t))};var j0=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},z0=N0,R0=j0;var W0=function(e){if(!R0(e))return!1;var t=z0(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},F0=b0["__core-js_shared__"],q0=function(){var e=/[^.]+$/.exec(F0&&F0.keys&&F0.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var Y0=function(e){return!!q0&&q0 in e},U0=Function.prototype.toString;var G0=function(e){if(null!=e){try{return U0.call(e)}catch(e){}try{return e+""}catch(e){}}return""},X0=W0,K0=Y0,J0=j0,Q0=G0,$0=/^\[object .+?Constructor\]$/,e1=Function.prototype,t1=Object.prototype,n1=e1.toString,r1=t1.hasOwnProperty,a1=RegExp("^"+n1.call(r1).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var i1=function(e,t){return null==e?void 0:e[t]},o1=function(e){return!(!J0(e)||K0(e))&&(X0(e)?a1:$0).test(Q0(e))},l1=i1;var s1=function(e,t){var n=l1(e,t);return o1(n)?n:void 0},c1=s1(Object,"create"),d1=c1;var h1=function(){this.__data__=d1?d1(null):{},this.size=0};var u1=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},p1=c1,f1=Object.prototype.hasOwnProperty;var m1=function(e){var t=this.__data__;if(p1){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return f1.call(t,e)?t[e]:void 0},v1=c1,g1=Object.prototype.hasOwnProperty;var b1=c1;var y1=h1,w1=u1,x1=m1,E1=function(e){var t=this.__data__;return v1?void 0!==t[e]:g1.call(t,e)},k1=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=b1&&void 0===t?"__lodash_hash_undefined__":t,this};function C1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}C1.prototype.clear=y1,C1.prototype.delete=w1,C1.prototype.get=x1,C1.prototype.has=E1,C1.prototype.set=k1;var S1=C1;var M1=function(){this.__data__=[],this.size=0};var A1=function(e,t){return e===t||e!=e&&t!=t},_1=A1;var O1=function(e,t){for(var n=e.length;n--;)if(_1(e[n][0],t))return n;return-1},N1=O1,Z1=Array.prototype.splice;var D1=function(e){var t=this.__data__,n=N1(t,e);return!(n<0)&&(n==t.length-1?t.pop():Z1.call(t,n,1),--this.size,!0)},I1=O1;var H1=function(e){var t=this.__data__,n=I1(t,e);return n<0?void 0:t[n][1]},T1=O1;var L1=O1;var P1=function(e,t){var n=this.__data__,r=L1(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},V1=M1,B1=D1,j1=H1,z1=function(e){return T1(this.__data__,e)>-1},R1=P1;function W1(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}W1.prototype.clear=V1,W1.prototype.delete=B1,W1.prototype.get=j1,W1.prototype.has=z1,W1.prototype.set=R1;var F1=W1,q1=s1(b0,"Map"),Y1=S1,U1=F1,G1=q1;var X1=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},K1=X1;var J1=function(e,t){var n=e.__data__;return K1(t)?n["string"==typeof t?"string":"hash"]:n.map},Q1=J1;var $1=J1;var e2=J1;var t2=J1;var n2=function(){this.size=0,this.__data__={hash:new Y1,map:new(G1||U1),string:new Y1}},r2=function(e){var t=Q1(this,e).delete(e);return this.size-=t?1:0,t},a2=function(e){return $1(this,e).get(e)},i2=function(e){return e2(this,e).has(e)},o2=function(e,t){var n=t2(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function l2(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l2.prototype.clear=n2,l2.prototype.delete=r2,l2.prototype.get=a2,l2.prototype.has=i2,l2.prototype.set=o2;var s2=l2,c2=s2;function d2(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(d2.Cache||c2),n}d2.Cache=c2;var h2=d2;var u2=function(e){var t=h2(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t},p2=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f2=/\\(\\)?/g,m2=u2(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(p2,function(e,n,r,a){t.push(r?a.replace(f2,"$1"):n||e)}),t}),v2=m2;var g2=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},b2=g2,y2=f0,w2=H0,x2=y0?y0.prototype:void 0,E2=x2?x2.toString:void 0;var k2=function e(t){if("string"==typeof t)return t;if(y2(t))return b2(t,e)+"";if(w2(t))return E2?E2.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},C2=k2;var S2=function(e){return null==e?"":C2(e)},M2=f0,A2=B0,_2=v2,O2=S2;var N2=function(e,t){return M2(e)?e:A2(e,t)?[e]:_2(O2(e))},Z2=N0,D2=Z0;var I2=function(e){return D2(e)&&"[object Arguments]"==Z2(e)},H2=Z0,T2=Object.prototype,L2=T2.hasOwnProperty,P2=T2.propertyIsEnumerable,V2=I2(function(){return arguments}())?I2:function(e){return H2(e)&&L2.call(e,"callee")&&!P2.call(e,"callee")},B2=/^(?:0|[1-9]\d*)$/;var j2=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&B2.test(e))&&e>-1&&e%1==0&&e<t};var z2=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},R2=H0;var W2=function(e){if("string"==typeof e||R2(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},F2=N2,q2=V2,Y2=f0,U2=j2,G2=z2,X2=W2;var K2=function(e,t,n){for(var r=-1,a=(t=F2(t,e)).length,i=!1;++r<a;){var o=X2(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=a?i:!!(a=null==e?0:e.length)&&G2(a)&&U2(o,a)&&(Y2(e)||q2(e))},J2=p0,Q2=K2;var $2=function(e,t){return null!=e&&Q2(e,t,J2)};const e5=e=>e&&e.__isYupSchema__;class t5{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!$2(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=t,i="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=i(...e)?r:a;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!e5(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function n5(e){return null==e?[]:[].concat(e)}function r5(){return r5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r5.apply(this,arguments)}let a5=/\$\{\s*(\w+)\s*\}/g;class i5 extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=r5({},t,{path:n})),"string"==typeof e?e.replace(a5,(e,n)=>l0(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],n5(e).forEach(e=>{i5.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,i5)}}function o5(e,t){let{endEarly:n,tests:r,args:a,value:i,errors:o,sort:l,path:s}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),d=r.length;const h=[];if(o=o||[],!d)return o.length?c(new i5(o,i,s)):c(null,i);for(let e=0;e<r.length;e++){(0,r[e])(a,function(e){if(e){if(!i5.isError(e))return c(e,i);if(n)return e.value=i,c(e,i);h.push(e)}if(--d<=0){if(h.length&&(l&&h.sort(l),o.length&&h.push(...o),o=h),o.length)return void c(new i5(o,i,s),i);c(null,i)}})}}var l5=s1,s5=function(){try{var e=l5(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var c5=function(e,t,n){"__proto__"==t&&s5?s5(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var d5=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===n(i[s],s,i))break}return t}},h5=d5();var u5=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},p5={exports:{}};var f5=function(){return!1};!function(e,t){var n=b0,r=f5,a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?n.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l}(p5,p5.exports);var m5=N0,v5=z2,g5=Z0,b5={};b5["[object Float32Array]"]=b5["[object Float64Array]"]=b5["[object Int8Array]"]=b5["[object Int16Array]"]=b5["[object Int32Array]"]=b5["[object Uint8Array]"]=b5["[object Uint8ClampedArray]"]=b5["[object Uint16Array]"]=b5["[object Uint32Array]"]=!0,b5["[object Arguments]"]=b5["[object Array]"]=b5["[object ArrayBuffer]"]=b5["[object Boolean]"]=b5["[object DataView]"]=b5["[object Date]"]=b5["[object Error]"]=b5["[object Function]"]=b5["[object Map]"]=b5["[object Number]"]=b5["[object Object]"]=b5["[object RegExp]"]=b5["[object Set]"]=b5["[object String]"]=b5["[object WeakMap]"]=!1;var y5=function(e){return g5(e)&&v5(e.length)&&!!b5[m5(e)]};var w5=function(e){return function(t){return e(t)}},x5={exports:{}};!function(e,t){var n=m0,r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,i=a&&a.exports===r&&n.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(x5,x5.exports);var E5=y5,k5=w5,C5=x5.exports,S5=C5&&C5.isTypedArray,M5=S5?k5(S5):E5,A5=u5,_5=V2,O5=f0,N5=p5.exports,Z5=j2,D5=M5,I5=Object.prototype.hasOwnProperty;var H5=function(e,t){var n=O5(e),r=!n&&_5(e),a=!n&&!r&&N5(e),i=!n&&!r&&!a&&D5(e),o=n||r||a||i,l=o?A5(e.length,String):[],s=l.length;for(var c in e)!t&&!I5.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Z5(c,s))||l.push(c);return l},T5=Object.prototype;var L5=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T5)};var P5=function(e,t){return function(n){return e(t(n))}},V5=P5(Object.keys,Object),B5=L5,j5=V5,z5=Object.prototype.hasOwnProperty;var R5=function(e){if(!B5(e))return j5(e);var t=[];for(var n in Object(e))z5.call(e,n)&&"constructor"!=n&&t.push(n);return t},W5=W0,F5=z2;var q5=H5,Y5=R5,U5=function(e){return null!=e&&F5(e.length)&&!W5(e)};var G5=function(e){return U5(e)?q5(e):Y5(e)},X5=h5,K5=G5;var J5=function(e,t){return e&&X5(e,t,K5)},Q5=F1;var $5=F1,e3=q1,t3=s2;var n3=F1,r3=function(){this.__data__=new Q5,this.size=0},a3=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},i3=function(e){return this.__data__.get(e)},o3=function(e){return this.__data__.has(e)},l3=function(e,t){var n=this.__data__;if(n instanceof $5){var r=n.__data__;if(!e3||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new t3(r)}return n.set(e,t),this.size=n.size,this};function s3(e){var t=this.__data__=new n3(e);this.size=t.size}s3.prototype.clear=r3,s3.prototype.delete=a3,s3.prototype.get=i3,s3.prototype.has=o3,s3.prototype.set=l3;var c3=s3;var d3=s2,h3=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},u3=function(e){return this.__data__.has(e)};function p3(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new d3;++t<n;)this.add(e[t])}p3.prototype.add=p3.prototype.push=h3,p3.prototype.has=u3;var f3=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var m3=function(e,t){return e.has(t)},v3=p3,g3=f3,b3=m3;var y3=function(e,t,n,r,a,i){var o=1&n,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,p=2&n?new v3:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var f=e[h],m=t[h];if(r)var v=o?r(m,f,h,t,e,i):r(f,m,h,e,t,i);if(void 0!==v){if(v)continue;u=!1;break}if(p){if(!g3(t,function(e,t){if(!b3(p,t)&&(f===e||a(f,e,n,r,i)))return p.push(t)})){u=!1;break}}else if(f!==m&&!a(f,m,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u};var w3=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var x3=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},E3=b0.Uint8Array,k3=A1,C3=y3,S3=w3,M3=x3,A3=y0?y0.prototype:void 0,_3=A3?A3.valueOf:void 0;var O3=function(e,t,n,r,a,i,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new E3(e),new E3(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return k3(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=S3;case"[object Set]":var s=1&r;if(l||(l=M3),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var d=C3(l(e),l(t),r,a,i,o);return o.delete(e),d;case"[object Symbol]":if(_3)return _3.call(e)==_3.call(t)}return!1};var N3=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Z3=N3,D3=f0;var I3=function(e,t,n){var r=t(e);return D3(e)?r:Z3(r,n(e))};var H3=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i};var T3=H3,L3=function(){return[]},P3=Object.prototype.propertyIsEnumerable,V3=Object.getOwnPropertySymbols,B3=V3?function(e){return null==e?[]:(e=Object(e),T3(V3(e),function(t){return P3.call(e,t)}))}:L3,j3=I3,z3=B3,R3=G5;var W3=function(e){return j3(e,R3,z3)},F3=W3,q3=Object.prototype.hasOwnProperty;var Y3=function(e,t,n,r,a,i){var o=1&n,l=F3(e),s=l.length;if(s!=F3(t).length&&!o)return!1;for(var c=s;c--;){var d=l[c];if(!(o?d in t:q3.call(t,d)))return!1}var h=i.get(e),u=i.get(t);if(h&&u)return h==t&&u==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=o;++c<s;){var m=e[d=l[c]],v=t[d];if(r)var g=o?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(!(void 0===g?m===v||a(m,v,n,r,i):g)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(e),i.delete(t),p},U3=s1(b0,"DataView"),G3=q1,X3=s1(b0,"Promise"),K3=s1(b0,"Set"),J3=s1(b0,"WeakMap"),Q3=N0,$3=G0,e4="[object Map]",t4="[object Promise]",n4="[object Set]",r4="[object WeakMap]",a4="[object DataView]",i4=$3(U3),o4=$3(G3),l4=$3(X3),s4=$3(K3),c4=$3(J3),d4=Q3;(U3&&d4(new U3(new ArrayBuffer(1)))!=a4||G3&&d4(new G3)!=e4||X3&&d4(X3.resolve())!=t4||K3&&d4(new K3)!=n4||J3&&d4(new J3)!=r4)&&(d4=function(e){var t=Q3(e),n="[object Object]"==t?e.constructor:void 0,r=n?$3(n):"";if(r)switch(r){case i4:return a4;case o4:return e4;case l4:return t4;case s4:return n4;case c4:return r4}return t});var h4=c3,u4=y3,p4=O3,f4=Y3,m4=d4,v4=f0,g4=p5.exports,b4=M5,y4="[object Arguments]",w4="[object Array]",x4="[object Object]",E4=Object.prototype.hasOwnProperty;var k4=function(e,t,n,r,a,i){var o=v4(e),l=v4(t),s=o?w4:m4(e),c=l?w4:m4(t),d=(s=s==y4?x4:s)==x4,h=(c=c==y4?x4:c)==x4,u=s==c;if(u&&g4(e)){if(!g4(t))return!1;o=!0,d=!1}if(u&&!d)return i||(i=new h4),o||b4(e)?u4(e,t,n,r,a,i):p4(e,t,s,n,r,a,i);if(!(1&n)){var p=d&&E4.call(e,"__wrapped__"),f=h&&E4.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return i||(i=new h4),a(m,v,n,r,i)}}return!!u&&(i||(i=new h4),f4(e,t,n,r,a,i))},C4=k4,S4=Z0;var M4=function e(t,n,r,a,i){return t===n||(null==t||null==n||!S4(t)&&!S4(n)?t!=t&&n!=n:C4(t,n,r,a,e,i))},A4=c3,_4=M4;var O4=function(e,t,n,r){var a=n.length,i=a,o=!r;if(null==e)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){var s=(l=n[a])[0],c=e[s],d=l[1];if(o&&l[2]){if(void 0===c&&!(s in e))return!1}else{var h=new A4;if(r)var u=r(c,d,s,e,t,h);if(!(void 0===u?_4(d,c,3,r,h):u))return!1}}return!0},N4=j0;var Z4=function(e){return e==e&&!N4(e)},D4=Z4,I4=G5;var H4=function(e){for(var t=I4(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,D4(a)]}return t};var T4=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},L4=O4,P4=H4,V4=T4;var B4=function(e){var t=P4(e);return 1==t.length&&t[0][2]?V4(t[0][0],t[0][1]):function(n){return n===e||L4(n,e,t)}},j4=N2,z4=W2;var R4=function(e,t){for(var n=0,r=(t=j4(t,e)).length;null!=e&&n<r;)e=e[z4(t[n++])];return n&&n==r?e:void 0},W4=R4;var F4=function(e,t,n){var r=null==e?void 0:W4(e,t);return void 0===r?n:r};var q4=function(e,t){return null!=e&&t in Object(e)},Y4=q4,U4=K2;var G4=function(e,t){return null!=e&&U4(e,t,Y4)},X4=M4,K4=F4,J4=G4,Q4=B0,$4=Z4,e7=T4,t7=W2;var n7=function(e,t){return Q4(e)&&$4(t)?e7(t7(e),t):function(n){var r=K4(n,e);return void 0===r&&r===t?J4(n,e):X4(t,r,3)}};var r7=function(e){return function(t){return null==t?void 0:t[e]}},a7=R4;var i7=function(e){return function(t){return a7(t,e)}},o7=r7,l7=i7,s7=B0,c7=W2;var d7=B4,h7=n7,u7=function(e){return e},p7=f0,f7=function(e){return s7(e)?o7(c7(e)):l7(e)};var m7=function(e){return"function"==typeof e?e:null==e?u7:"object"==typeof e?p7(e)?h7(e[0],e[1]):d7(e):f7(e)},v7=c5,g7=J5,b7=m7;var y7=function(e,t){var n={};return t=b7(t),g7(e,function(e,r,a){v7(n,r,t(e,r,a))}),n};function w7(e){this._maxSize=e,this.clear()}w7.prototype.clear=function(){this._size=0,this._values=Object.create(null)},w7.prototype.get=function(e){return this._values[e]},w7.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var x7=/[^.^\]^[]+|(?=\[\]|\.\.)/g,E7=/^\d+$/,k7=/^\d/,C7=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,S7=/^\s*(['"]?)(.*?)(\1)\s*$/,M7=new w7(512),A7=new w7(512),_7=new w7(512),O7={Cache:w7,split:Z7,normalizePath:N7,setter:function(e){var t=N7(e);return A7.get(e)||A7.set(e,function(e,n){for(var r=0,a=t.length,i=e;r<a-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;i=i[t[r++]]}i[t[r]]=n})},getter:function(e,t){var n=N7(e);return _7.get(e)||_7.set(e,function(e){for(var r=0,a=n.length;r<a;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(D7(t)||E7.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,a,i,o,l=e.length;for(a=0;a<l;a++)(r=e[a])&&(I7(r)&&(r='"'+r+'"'),i=!(o=D7(r))&&/^\d+$/.test(r),t.call(n,r,o,i,a,e))}(Array.isArray(e)?e:Z7(e),t,n)}};function N7(e){return M7.get(e)||M7.set(e,Z7(e).map(function(e){return e.replace(S7,"$2")}))}function Z7(e){return e.match(x7)||[""]}function D7(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function I7(e){return!D7(e)&&(function(e){return e.match(k7)&&!e.match(E7)}(e)||function(e){return C7.test(e)}(e))}const H7="$",T7=".";class L7{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===H7,this.isValue=this.key[0]===T7,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?H7:this.isValue?T7:"";this.path=this.key.slice(n.length),this.getter=this.path&&O7.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function P7(){return P7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P7.apply(this,arguments)}function V7(e){function t(t,n){let{value:r,path:a="",label:i,options:o,originalValue:l,sync:s}=t,c=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:h,params:u,message:p}=e;let{parent:f,context:m}=o;function v(e){return L7.isRef(e)?e.getValue(r,f,m):e}function g(e={}){const t=y7(P7({value:r,originalValue:l,label:i,path:e.path||a},u,e.params),v),n=new i5(i5.formatError(e.message||p,t),r,t.path,e.type||d);return n.params=t,n}let b,y=P7({path:a,parent:f,type:d,createError:g,resolve:v,options:o,originalValue:l},c);if(s){try{var w;if(b=h.call(y,r,y),"function"==typeof(null==(w=b)?void 0:w.then))throw new Error(`Validation test of type: "${y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}i5.isError(b)?n(b):b?n(null,b):n(g())}else try{Promise.resolve(h.call(y,r,y)).then(e=>{i5.isError(e)?n(e):e?n(null,e):n(g())}).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}L7.prototype.__isYupRef=!0;function B7(e,t,n,r=n){let a,i,o;return t?(O7.forEach(t,(l,s,c)=>{let d=s?(e=>e.substr(0,e.length-1).substr(1))(l):l;if((e=e.resolve({context:r,parent:a,value:n})).innerType){let r=c?parseInt(d,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[r],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);a=n,n=n&&n[d],e=e.fields[d]}i=d,o=s?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class j7{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(L7.isRef(n)?e(n):n),[])}add(e){L7.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){L7.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new j7;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function z7(){return z7=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},z7.apply(this,arguments)}class R7{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new j7,this._blacklist=new j7,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(s0.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=z7({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=z7({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=e0(z7({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=z7({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(z7({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let a=l0(e),i=l0(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${a} \n`+(i!==a?`result of cast: ${i}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:a,from:i=[],originalValue:o=e,strict:l=this.spec.strict,abortEarly:s=this.spec.abortEarly}=t,c=e;l||(c=this._cast(c,z7({assert:!1},t)));let d={value:c,path:a,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:i},h=[];this._typeError&&h.push(this._typeError);let u=[];this._whitelistError&&u.push(this._whitelistError),this._blacklistError&&u.push(this._blacklistError),o5({args:d,value:c,path:a,sync:r,tests:h,endEarly:s},e=>{e?n(e,c):o5({tests:this.tests.concat(u),args:d,path:a,sync:r,value:c,endEarly:s},n)})}validate(e,t,n){let r=this.resolve(z7({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,a)=>r._validate(e,t,(e,t)=>{e?a(e):n(t)}))}validateSync(e,t){let n;return this.resolve(z7({},t,{value:e}))._validate(e,z7({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(i5.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(i5.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):e0(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=s0.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=s0.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=s0.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=V7(t),a=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(a)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=n5(e).map(e=>new L7(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new t5(r,t)),n}typeError(e){let t=this.clone();return t._typeError=V7({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=s0.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=V7({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=s0.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=V7({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}R7.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])R7.prototype[`${e}At`]=function(t,n,r={}){const{parent:a,parentPath:i,schema:o}=B7(this,t,n,r.context);return o[e](a&&a[i],z7({},r,{parent:a,path:t}))};for(const e of["equals","is"])R7.prototype[e]=R7.prototype.oneOf;for(const e of["not","nope"])R7.prototype[e]=R7.prototype.notOneOf;R7.prototype.optional=R7.prototype.notRequired;R7.prototype;const W7=e=>null==e;let F7=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,q7=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Y7=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,U7=e=>W7(e)||e===e.trim(),G7={}.toString();function X7(){return new K7}class K7 extends R7{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===G7?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=c0.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return W7(t)||t.length===this.resolve(e)}})}min(e,t=c0.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return W7(t)||t.length>=this.resolve(e)}})}max(e,t=c0.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return W7(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,a=!1;return t&&("object"==typeof t?({excludeEmptyString:a=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||c0.matches,params:{regex:e},test:t=>W7(t)||""===t&&a||-1!==t.search(e)})}email(e=c0.email){return this.matches(F7,{name:"email",message:e,excludeEmptyString:!0})}url(e=c0.url){return this.matches(q7,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=c0.uuid){return this.matches(Y7,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=c0.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:U7})}lowercase(e=c0.lowercase){return this.transform(e=>W7(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W7(e)||e===e.toLowerCase()})}uppercase(e=c0.uppercase){return this.transform(e=>W7(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>W7(e)||e===e.toUpperCase()})}}X7.prototype=K7.prototype;var J7=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let Q7=new Date("");class $7 extends R7{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],a=0;if(n=J7.exec(e)){for(var i,o=0;i=r[o];++o)n[i]=+n[i]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?Q7:new Date(e))})})}_typeCheck(e){return(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(L7.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=d0.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return W7(e)||e>=this.resolve(n)}})}max(e,t=d0.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return W7(e)||e<=this.resolve(n)}})}}$7.INVALID_DATE=Q7,$7.prototype;var e6=function(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n};var t6=function(e){return function(t){return null==e?void 0:e[t]}},n6=t6({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),r6=S2,a6=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,i6=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var o6=function(e){return(e=r6(e))&&e.replace(a6,n6).replace(i6,"")},l6=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var s6=function(e){return e.match(l6)||[]},c6=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var d6=function(e){return c6.test(e)},h6="\\ud800-\\udfff",u6="\\u2700-\\u27bf",p6="a-z\\xdf-\\xf6\\xf8-\\xff",f6="A-Z\\xc0-\\xd6\\xd8-\\xde",m6="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",v6="["+m6+"]",g6="\\d+",b6="["+u6+"]",y6="["+p6+"]",w6="[^"+h6+m6+g6+u6+p6+f6+"]",x6="(?:\\ud83c[\\udde6-\\uddff]){2}",E6="[\\ud800-\\udbff][\\udc00-\\udfff]",k6="["+f6+"]",C6="(?:"+y6+"|"+w6+")",S6="(?:"+k6+"|"+w6+")",M6="(?:['’](?:d|ll|m|re|s|t|ve))?",A6="(?:['’](?:D|LL|M|RE|S|T|VE))?",_6="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",O6="[\\ufe0e\\ufe0f]?",N6=O6+_6+("(?:\\u200d(?:"+["[^"+h6+"]",x6,E6].join("|")+")"+O6+_6+")*"),Z6="(?:"+[b6,x6,E6].join("|")+")"+N6,D6=RegExp([k6+"?"+y6+"+"+M6+"(?="+[v6,k6,"$"].join("|")+")",S6+"+"+A6+"(?="+[v6,k6+C6,"$"].join("|")+")",k6+"?"+C6+"+"+M6,k6+"+"+A6,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",g6,Z6].join("|"),"g");var I6=function(e){return e.match(D6)||[]},H6=s6,T6=d6,L6=S2,P6=I6;var V6=function(e,t,n){return e=L6(e),void 0===(t=n?void 0:t)?T6(e)?P6(e):H6(e):e.match(t)||[]},B6=e6,j6=o6,z6=V6,R6=RegExp("['’]","g");var W6=function(e){return function(t){return B6(z6(j6(t).replace(R6,"")),e,"")}},F6=W6(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),q6=F6;var Y6=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i},U6=Y6;var G6=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:U6(e,t,n)},X6=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var K6=function(e){return X6.test(e)};var J6=function(e){return e.split("")},Q6="\\ud800-\\udfff",$6="["+Q6+"]",e8="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",t8="\\ud83c[\\udffb-\\udfff]",n8="[^"+Q6+"]",r8="(?:\\ud83c[\\udde6-\\uddff]){2}",a8="[\\ud800-\\udbff][\\udc00-\\udfff]",i8="(?:"+e8+"|"+t8+")"+"?",o8="[\\ufe0e\\ufe0f]?",l8=o8+i8+("(?:\\u200d(?:"+[n8,r8,a8].join("|")+")"+o8+i8+")*"),s8="(?:"+[n8+e8+"?",e8,r8,a8,$6].join("|")+")",c8=RegExp(t8+"(?="+t8+")|"+s8+l8,"g");var d8=function(e){return e.match(c8)||[]},h8=J6,u8=K6,p8=d8;var f8=function(e){return u8(e)?p8(e):h8(e)},m8=G6,v8=K6,g8=f8,b8=S2;var y8=function(e){return function(t){t=b8(t);var n=v8(t)?g8(t):void 0,r=n?n[0]:t.charAt(0),a=n?m8(n,1).join(""):t.slice(1);return r[e]()+a}},w8=y8("toUpperCase"),x8=S2,E8=w8;var k8=function(e){return E8(x8(e).toLowerCase())},C8=k8,S8=W6(function(e,t,n){return t=t.toLowerCase(),e+(n?C8(t):t)}),M8=S8,A8=c5,_8=J5,O8=m7;var N8=function(e,t){var n={};return t=O8(t),_8(e,function(e,r,a){A8(n,t(e,r,a),e)}),n},Z8={exports:{}};function D8(e,t){var n=e.length,r=new Array(n),a={},i=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=e[n];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}(t),l=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!l.has(e[0])||!l.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||s(e[i],i,new Set);return r;function s(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!a[t]){a[t]=!0;var d=o.get(e)||new Set;if(t=(d=Array.from(d)).length){i.add(e);do{var h=d[--t];s(h,l.get(h),i)}while(t);i.delete(e)}r[--n]=e}}}Z8.exports=function(e){return D8(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var a=e[n];t.add(a[0]),t.add(a[1])}return Array.from(t)}(e),e)},Z8.exports.array=D8;var I8=Z8.exports;function H8(e,t){let n=1/0;return e.some((e,r)=>{var a;if(-1!==(null==(a=t.path)?void 0:a.indexOf(e)))return n=r,!0}),n}function T8(e){return(t,n)=>H8(e,t)-H8(e,n)}function L8(){return L8=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L8.apply(this,arguments)}let P8=e=>"[object Object]"===Object.prototype.toString.call(e);const V8=T8([]);class B8 extends R7{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=V8,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return P8(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),l={},s=L8({},t,{parent:l,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=a[e],o=$2(r,e);if(n){let a,i=r[e];s.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:l});let o="spec"in n?n.spec:void 0,d=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}a=t.__validating&&d?r[e]:n.cast(r[e],s),void 0!==a&&(l[e]=a)}else o&&!i&&(l[e]=r[e]);l[e]!==r[e]&&(c=!0)}return c?l:r}_validate(e,t={},n){let r=[],{sync:a,from:i=[],originalValue:o=e,abortEarly:l=this.spec.abortEarly,recursive:s=this.spec.recursive}=t;i=[{schema:this,value:o},...i],t.__validating=!0,t.originalValue=o,t.from=i,super._validate(e,t,(e,c)=>{if(e){if(!i5.isError(e)||l)return void n(e,c);r.push(e)}if(!s||!P8(c))return void n(r[0]||null,c);o=o||c;let d=this._nodes.map(e=>(n,r)=>{let a=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,l=this.fields[e];l&&"validate"in l?l.validate(c[e],L8({},t,{path:a,from:i,strict:!0,parent:c,originalValue:o[e]}),r):r(null)});o5({sync:a,tests:d,value:c,errors:r,endEarly:l,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=L8({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof R7&&t instanceof R7&&(n[e]=t.concat(r))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=T8(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([e,t])=>`${e}-${t}`));function i(e,t){let i=O7.split(e)[0];r.add(i),a.has(`${t}-${i}`)||n.push([t,i])}for(const t in e)if($2(e,t)){let n=e[t];r.add(t),L7.isRef(n)&&n.isSibling?i(n.path,t):e5(n)&&"deps"in n&&n.deps.forEach(e=>i(e,t))}return I8.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=O7.getter(e,!0);return this.transform(a=>{if(null==a)return a;let i=a;return $2(a,e)&&(i=L8({},a),n||delete i[e],i[t]=r(a)),i})}noUnknown(e=!0,t=h0.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=h0.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&N8(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(M8)}snakeCase(){return this.transformKeys(q6)}constantCase(){return this.transformKeys(e=>q6(e).toUpperCase())}describe(){let e=super.describe();return e.fields=y7(this.fields,e=>e.describe()),e}}function j8(e){return new B8(e)}j8.prototype=B8.prototype;const z8=t=>{const{open:n,children:a,toggleSidebar:i,width:o,keyboard:l,hiddenBackground:s,hiddenFullScreenButton:c}=t,[d,h]=e.useState(!1),[u,p]=e.useState(n);e.useEffect(()=>{n!==u&&(n?p(n):setTimeout(()=>{p(n)},50))},[n]);const f=()=>{p(!1),setTimeout(()=>{i()},400)};return r.jsxs("div",{tabIndex:0,className:sj({"d-none":!n}),onKeyDown:e=>{!l&&"Escape"===e.code&&u&&(f(),e.stopPropagation(),e.preventDefault())},children:[r.jsx("div",{className:sj("offcanvas-backdrop fade",{"d-none":!u||s,show:u}),style:{zIndex:1055},onClick:f}),r.jsxs("div",{className:sj("customizer d-md-block ",`customizer-${o??600}`,{open:u,fullscreen:d}),style:{zIndex:1055},children:[r.jsxs("div",{style:{position:"fixed",top:"50%",transform:"translate(-50%, -50%)",background:"#FFF",filter:"drop-shadow(0.9px 0.9px 1.5px)",height:50,display:"flex",alignItems:"center",borderRadius:"0px 5px 5px 0px",cursor:"pointer",zIndex:9,marginLeft:7},className:sj({"d-none":c}),onClick:()=>{h(!d)},children:[r.jsx(Hc,{className:""+(d?"d-none":""),fontSize:16}),r.jsx(Tc,{className:""+(d?"":"d-none"),fontSize:15})]}),a]})]})},R8=t=>{const{openModal:n,handleModal:a,windowSize:i,selected:o,optionTypePrint:s}=t,[c,d]=e.useState(),{t:h}=dc();return e.useEffect(()=>{n&&d(s.find(e=>e.value===o))},[n]),r.jsxs(z8,{open:n,toggleSidebar:a,width:1e3,children:[r.jsx(jF,{typeModal:"Print",handleModal:a,title:"List of data fields",component:()=>r.jsx(r.Fragment,{children:r.jsx("div",{className:"d-flex align-items-center ps-1 ms-50 border-start",children:r.jsx(dy,{options:s,value:c,placeholder:h("Select"),onChange:e=>{d(e)}})})})}),r.jsx(l.Scrollbars,{autoHide:!0,autoHeight:!0,autoHeightMin:i.innerHeight-120,autoHeightMax:i.innerHeight-120,children:r.jsx(aB,{style:{minHeight:500},children:r.jsxs(uP,{children:[r.jsx(xP,{lg:6,md:6,sm:12,children:r.jsxs("div",{className:"box form-box__border d-flex flex-column h-100",children:[r.jsx("h5",{className:"m-0 form-box__border--title",children:h("General information")}),r.jsx(PD,{dataSource:c?.dataFields??[],addDisable:!0,editDisable:!0,columns:[{field:"field",headerText:"Field data",width:150},{field:"headerText",headerText:"Description",width:150}],maxHeight:i.innerHeight-180},"TableFields")]})}),r.jsx(xP,{lg:6,md:6,sm:12,children:c?.tableFields?.map((e,t)=>r.jsxs("div",{className:"box form-box__border d-flex flex-column mt-b h-100",children:[r.jsx("h5",{className:"m-0 form-box__border--title",children:`${h(e.headerText)}: ${e.field}`}),r.jsx(PD,{dataSource:e?.columns??[],addDisable:!0,editDisable:!0,columns:[{field:"field",headerText:"Field data",width:150},{field:"headerText",headerText:"Description",template:e=>h(e.headerText),width:150}],maxHeight:i.innerHeight-180},"TableFields")]},t))})]})})}),r.jsx("div",{className:"d-flex justify-content-end p-1 ",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:r.jsx(_P,{color:"secondary",onClick:a,outline:!0,children:h("Close")})})]})},W8=t=>{const{watch:n,uploadFileApi:a,setValue:i}=t,[o,l]=e.useState(!1),{t:s}=dc(),c=e=>{e.preventDefault(),e.stopPropagation(),"dragenter"===e.type||"dragover"===e.type?l(!0):"dragleave"===e.type&&l(!1)},d=async e=>{const t=new FormData;t.append("files",e,e.name);const n=await a(t).catch(()=>GN(s("UploadFail")));n.status&&i("file",{...n,name:e.name})};return r.jsx("div",{className:"rounded d-flex flex-column align-items-center justify-content-center "+(o?"dragging-file":"no-dragging-file"),style:{minHeight:"220px"},draggable:!0,onDragEnter:c,onDragLeave:c,onDragOver:c,onDrop:e=>{e.preventDefault(),e.stopPropagation(),l(!1),e.dataTransfer.files&&e.dataTransfer.files[0]&&d(e.dataTransfer.files[0])},children:n("file")?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"mb-1 fs-5",children:n("file")?.name}),r.jsxs(_P,{tag:AB,outline:!0,className:"me-75",size:"md",color:"primary",children:[r.jsx(Nc,{fontSize:18,className:"me-50"}),s("Select other file"),r.jsx(yB,{type:"file",hidden:!0,onChange:e=>{const t=e.target.files?.[0];t&&d(t),e.target.value=""},accept:"\r\n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, \r\n application/vnd.ms-excel,\r\n application/msword, \r\n application/vnd.openxmlformats-officedocument.wordprocessingml.document\r\n "})]})]}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"fs-4 bolder",children:s("Drag and drop files here")}),r.jsx("div",{className:"my-50",children:s("or")}),r.jsxs(_P,{tag:AB,outline:!0,className:"me-75",size:"md",color:"primary",children:[r.jsx(Nc,{fontSize:18,className:"me-50"}),s("Select file"),r.jsx(yB,{type:"file",hidden:!0,onChange:e=>{const t=e.target.files?.[0];t&&d(t),e.target.value=""},accept:"\r\n application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, \r\n application/vnd.ms-excel,\r\n application/msword, \r\n application/vnd.openxmlformats-officedocument.wordprocessingml.document\r\n "})]}),r.jsx("div",{className:"mt-1",children:s("Accepts .xls, .xlsx, .doc, .docx files")})]})})},F8=t=>{const{t:n}=dc(),{openModal:a,windowSize:i,organization:o,optionPrintType:l,optionCurrentPrintTemplate:s,onSaveData:c,handleModal:d,uploadFileApi:h,updateGeneralSettingApi:u}=t,[p,m]=e.useState(!1),[v,g]=e.useState(!1),[b,y]=e.useState([]),w=j8().shape({name:X7().required(`${n("Template name")} ${n("is required")}`),type:X7().required(`${n("Template name")} ${n("is required")}`)}),x={name:"",resourceCode:"",type:l[0]?.value},{control:E,watch:k,handleSubmit:C,setValue:S,reset:M,formState:{errors:A}}=function(e={}){const t=f.default.useRef(),[n,r]=f.default.useState({isDirty:!1,isValidating:!1,isLoading:b$(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:b$(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Y$(e,()=>r(e=>({...e}))),formState:n});const a=t.current.control;return a._options=e,r$({subject:a._subjects.state,next:e=>{e$(e,a._proxyFormState,a._updateFormState,!0)&&r({...a._formState})}}),f.default.useEffect(()=>{e.values&&!H$(e.values,a._defaultValues)?a._reset(e.values,a._options.resetOptions):a._resetDefaultValues()},[e.values,a]),f.default.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=QQ(n,a),t.current}({mode:"onChange",defaultValues:x,resolver:Q$(w)}),_=()=>{d(),M()};return r.jsxs(eB,{isOpen:a,toggle:d,className:"modal-dialog-centered modal-lg-1",contentClassName:"p-0",onOpened:async()=>{const e=l[0];e&&(S("type",e.value),S("resourceCode",e.resourceCode)),y(s.filter(e=>e.file))},onClosed:()=>{},backdrop:"static",keyboard:!1,children:[r.jsx(jF,{handleModal:d,title:"Tùy chọn in",className:"mb-0",component:()=>r.jsx("div",{className:"d-flex align-items-center ps-1 ms-1 border-start",children:r.jsx(dy,{options:l,onChange:e=>{S("type",e.value),S("resourceCode",e.resourceCode)},value:l.find(e=>e.value===k("type")),placeholder:n("Select")})})}),r.jsxs(dB,{id:"form-modal-globalzone",className:"todo-modal",onSubmit:C(e=>{e.file?u({name:e.name,organizationId:o?.id,resourceCode:e.resourceCode,type:"PrintDocument",category:"FileTemplate",value:JSON.stringify({file:e.file,type:e.type})}).then(t=>{t.isValid?(_(),c(e.name),XN(n("AddSuccessful"))):UN(n,"AddFail")}).catch(()=>{UN(n,"AddFail")}):UN(n,"Please select a template file!")}),children:[r.jsxs(aB,{children:[r.jsxs("p",{className:"lh-base",children:["Mẫu Word/Excel là mẫu do khách hàng tự ",r.jsx("strong",{children:"Thiết kế trên Word/Excel"})," theo yêu cầu công ty, dựa trên các thông tin dữ liệu do chương trình cung cấp ",r.jsx("br",{})," Tự tạo mẫu đơn giản theo các bước bên dưới:"]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"1"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsx("span",{className:"fw-bold",children:"Chuẩn bị tệp mẫu chứng từ mà bạn đang in (định dạng .xls, .xlsx, .doc, .docx)"})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"2"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsxs(uP,{children:[r.jsxs(xP,{children:[r.jsx("p",{className:"fw-bold m-0",children:"Danh sách các trường tại đây"}),r.jsx("p",{className:"fst-italic m-0",style:{fontSize:"0.85rem"},children:"Các trường dùng để hiển thị thông tin tên chứng từ"})]}),r.jsx(xP,{className:"text-end p-0 mt-50",children:r.jsxs(_P,{color:"link",onClick:()=>m(!0),children:[r.jsx(zc,{fontSize:14,className:"me-50"}),n("View list of data fields")]})})]})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"3"})}),r.jsx(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:r.jsxs(uP,{children:[r.jsx(xP,{children:r.jsx("span",{className:"fw-bold",children:"Thực hiện tạo file mẫu dựa trên file danh sách các trường"})}),r.jsx(xP,{className:"text-end p-0",children:r.jsxs(_P,{color:"link",onClick:()=>{},children:[r.jsx(Pc,{fontSize:14,className:"me-50"}),n("Download sample file for reference")]})})]})})]}),r.jsxs("div",{className:"w-100 d-flex mb-1",children:[r.jsx("div",{style:{width:50},children:r.jsx("span",{style:{height:30,width:30},className:"rounded-circle fs-5 d-flex justify-content-center align-items-center fw-bold bg-primary text-white",children:"4"})}),r.jsxs(pV,{style:{flexGrow:1},className:"table-bar bar__query px-1 py-50",children:[r.jsx("span",{className:"fw-bold",children:"Tải lên tệp mẫu đã được tạo ở bước 3 và nhập tên cho mẫu mới"}),r.jsx("div",{className:"mt-1",children:r.jsx(W8,{watch:k,setValue:S,uploadFileApi:h})}),r.jsxs("div",{className:"mt-1",children:[r.jsx("div",{className:"form-row-inline"}),r.jsxs(AB,{className:"d-flex",children:[n("Template name"),r.jsx("span",{className:"text-danger",children:"*"}),r.jsx(AB,{className:"ms-1 me-50",children:"Cập nhật mẫu in cũ"}),r.jsx(yB,{checked:v,type:"checkbox",onChange:e=>{g(e.target.checked),S("name","")},invalid:A.name&&!0})]}),r.jsx("div",{className:"form-input-content",children:r.jsx(d$,{name:"name",control:E,render:({field:{value:e,onChange:t}})=>r.jsxs(r.Fragment,{children:[v?r.jsx(dy,{value:b.find(t=>t.name===e),options:b,onChange:e=>{t(e.name)},fieldLabel:"name",fieldValue:"name",placeholder:n("Select"),invalid:A.name&&!0}):r.jsx(yB,{value:cj(e)?"":`${e}`,onChange:e=>{t(e.target.value)},placeholder:n("Name the new print template"),invalid:A.name&&!0}),A.name&&r.jsx(mB,{style:{zIndex:1e3},children:A.name?.message})]})})})]})]})]})]}),r.jsxs("div",{className:"d-flex justify-content-end p-1",style:{boxShadow:"0 4px 24px 0 rgb(34 41 47 / 10%)"},children:[r.jsx(_P,{color:"primary",className:"me-1",children:n("Create template")}),r.jsx(_P,{color:"secondary",onClick:_,outline:!0,className:"me-1",children:n("Close")})]})]}),r.jsx(R8,{windowSize:i,openModal:p,optionTypePrint:l,selected:k("type"),handleModal:()=>m(!1)})]})},q8=e.forwardRef((t,n)=>{const{windowSize:a,exportApi:i,printApi:o,isDisabled:l,isLoadOnInit:s,defaultNameTemplate:c,defaultOptionTypePrint:d,organization:h,showTitle:u=!0,uploadFileApi:p,formatNumber:f,optionalFields:m,signatures:v,CDN_URL_VIEW:g,DOCUMENT_URL_VIEW:b,containerDropDown:y,deleteGeneralSettingApi:w,handlGetDataPrint:x,updateGeneralSettingApi:E,getListBoxGeneralSettingApi:k}=t,{t:C}=dc(),[S,M]=e.useState(c),[A,_]=e.useState([]),[O,N]=e.useState({}),[Z,D]=e.useState(),[I,H]=e.useState(),[T,L]=e.useState({modal:!1,modalBatch:!1,modalEdit:!1,modalOption:!1}),P=(e="modal",t)=>{t&&(T[t]=!T[t]),T[e]=!T[e],L(e=>({...e}))};e.useImperativeHandle(n,()=>({getListTemplate:B})),e.useEffect(()=>{s&&B()},[s]),e.useEffect(()=>{d.length>0&&d.forEach(e=>{e.dataFields=[{field:"organizationName",headerDisplay:"",headerText:"Tên công ty"},{field:"organizationAddress",headerDisplay:"",headerText:"Địa chỉ công ty"},{field:"currentDate",headerDisplay:"",headerText:"Ngày hiện tại"},...e.dataFields??[]]})},[d]);const V=(e,t)=>{e&&M(e);const n=A.find(t=>t.name===(e??S));n?.type&&x(n?.type,e??S).then(e=>{e.organizationName=h.name,e.organizationAddress=h.address,e.currentDate=new Date,N({...e,listId:t}),P()})},B=(e,t)=>{k({$organizationId:h.id,$resourceCodes:d.map(e=>e.resourceCode).join(","),$type:"PrintDocument"}).then(n=>{const r=d.map(e=>({...e}));n?.forEach(e=>{const t=JSON.parse(e.value),n=r.findIndex(n=>n.type===t.type&&n.name===e.name);if(n>-1)r[n].id=e.id,r[n].setting=t.setting;else{const n=d.find(e=>e.type===t.type);n&&r.push({...e,file:t.file,type:t.type,setting:t.setting,dataFields:n.dataFields,tableFields:n.tableFields,resourceCode:e.resourceCode})}}),_(r),e&&t&&e(void 0,r,t)}).catch(()=>{_([...d]),GN(C("GetFail"))})},j=e=>{M(c),B(V,e)};return r.jsxs("div",{children:[r.jsxs("div",{className:"d-flex align-items-center pe-50 me-50 border-end "+(l?"opacity-50 pointer-events-none":""),children:[r.jsx(rd,{className:"cursor-pointer",fontSize:20,color:l?"#BFBFBF":"#7F7F7F",onClick:()=>!l&&V()}),u&&r.jsx("span",{className:"cursor-pointer mx-50",onClick:()=>!l&&V(),children:C(S)}),r.jsxs(ej,{className:"nav-item",children:[r.jsx($P,{tag:"div",className:"me-0 d-flex "+(l?"disabled":""),children:r.jsx(Ic,{fontSize:15,className:"cursor-pointer",color:l?"#BFBFBF":"#7F7F7F"})}),!l&&r.jsxs(XP,{container:y,className:"mt-0 p-0",end:!0,children:[A.map((e,t)=>r.jsx(FP,{tag:"div",onClick:()=>V(e.name),children:r.jsxs(r.Fragment,{children:[e.file&&(".doc"===e.file.type||".docx"===e.file.type?r.jsx(Rc,{className:"me-50",fontSize:15}):r.jsx(jc,{className:"me-50",fontSize:15})),C(e.name)," "]})},t)),r.jsx("hr",{className:"my-0"}),r.jsx(FP,{tag:"div",onClick:()=>P("modalOption"),children:C("Print Options")})]})]})]}),r.jsx(zF,{openModal:T.modal,handleModal:e=>{P("modal",e)},setTypeModal:D,namePrint:S,setNamePrint:M,dataSource:O,windowSize:a,organization:h,optionTypePrint:A,handleGetTemplate:B,defaultNameTemplate:"WarehouseIn",dataSetting:I,setDataSetting:H,printApi:o,exportApi:i,DOCUMENT_URL_VIEW:b,CDN_URL_VIEW:g,deleteGeneralSettingApi:w,optionalFields:m}),r.jsx(F8,{openModal:T.modalOption,handleModal:()=>P("modalOption"),windowSize:a,organization:h,uploadFileApi:p,optionCurrentPrintTemplate:A,updateGeneralSettingApi:E,optionPrintType:d.map(e=>({value:e.type,resourceCode:e.resourceCode,label:C(e.name),dataFields:e.dataFields,tableFields:e.tableFields})),onSaveData:j}),r.jsx(EQ,{openModal:T.modalEdit,handleModal:()=>{P("modalEdit","modal")},typeModal:Z,windowSize:a,dataSource:O,dataSetting:I,organization:h,formatNumber:f,signatures:v,onSaveData:j,uploadFileApi:p,CDN_URL_VIEW:g,updateGeneralSettingApi:E})]})});var Y8=e=>"checkbox"===e.type,U8=e=>e instanceof Date,G8=e=>null==e;const X8=e=>"object"==typeof e;var K8=e=>!G8(e)&&!Array.isArray(e)&&X8(e)&&!U8(e),J8=e=>K8(e)&&e.target?Y8(e.target)?e.target.checked:e.target.value:e,Q8=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),$8="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function e9(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if($8&&(e instanceof Blob||e instanceof FileList)||!n&&!K8(e))return e;if(t=n?[]:{},Array.isArray(e)||(e=>{const t=e.constructor&&e.constructor.prototype;return K8(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const n in e)t[n]=e9(e[n]);else t=e}return t}var t9=e=>Array.isArray(e)?e.filter(Boolean):[],n9=e=>void 0===e,r9=(e,t,n)=>{if(!t||!K8(e))return n;const r=t9(t.split(/[,[\].]+?/)).reduce((e,t)=>G8(e)?e:e[t],e);return n9(r)||r===e?n9(e[t])?n:e[t]:r};const a9="blur",i9="focusout",o9="change",l9="onBlur",s9="onChange",c9="onSubmit",d9="onTouched",h9="all",u9="max",p9="min",f9="maxLength",m9="minLength",v9="pattern",g9="required",b9="validate",y9=f.default.createContext(null),w9=()=>f.default.useContext(y9);var x9=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(a,i,{get:()=>{const a=i;return t._proxyFormState[a]!==h9&&(t._proxyFormState[a]=!r||h9),n&&(n[a]=!0),e[a]}});return a},E9=e=>K8(e)&&!Object.keys(e).length,k9=(e,t,n,r)=>{n(e);const{name:a,...i}=e;return E9(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!r||h9))},C9=e=>Array.isArray(e)?e:[e],S9=(e,t,n)=>n&&t?e===t:!e||!t||e===t||C9(e).some(e=>e&&(e.startsWith(t)||t.startsWith(e)));function M9(e){const t=f.default.useRef(e);t.current=e,f.default.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var A9=e=>"string"==typeof e,_9=(e,t,n,r,a)=>A9(e)?(r&&t.watch.add(e),r9(n,e,a)):Array.isArray(e)?e.map(e=>(r&&t.watch.add(e),r9(n,e))):(r&&(t.watchAll=!0),n);var O9=e=>/^\w*$/.test(e),N9=e=>t9(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Z9(e,t,n){let r=-1;const a=O9(t)?[t]:N9(t),i=a.length,o=i-1;for(;++r<i;){const t=a[r];let i=n;if(r!==o){const n=e[t];i=K8(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=i,e=e[t]}return e}function D9(e){const t=w9(),{name:n,control:r=t.control,shouldUnregister:a}=e,i=Q8(r._names.array,n),o=function(e){const t=w9(),{control:n=t.control,name:r,defaultValue:a,disabled:i,exact:o}=e||{},l=f.default.useRef(r);l.current=r,M9({disabled:i,subject:n._subjects.values,next:e=>{S9(l.current,e.name,o)&&c(e9(_9(l.current,n._names,e.values||n._formValues,!1,a)))}});const[s,c]=f.default.useState(n._getWatch(r,a));return f.default.useEffect(()=>n._removeUnmounted()),s}({control:r,name:n,defaultValue:r9(r._formValues,n,r9(r._defaultValues,n,e.defaultValue)),exact:!0}),l=function(e){const t=w9(),{control:n=t.control,disabled:r,name:a,exact:i}=e||{},[o,l]=f.default.useState(n._formState),s=f.default.useRef(!0),c=f.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=f.default.useRef(a);return d.current=a,M9({disabled:r,next:e=>s.current&&S9(d.current,e.name,i)&&k9(e,c.current,n._updateFormState)&&l({...n._formState,...e}),subject:n._subjects.state}),f.default.useEffect(()=>(s.current=!0,c.current.isValid&&n._updateValid(!0),()=>{s.current=!1}),[n]),x9(o,n,c.current,!1)}({control:r,name:n}),s=f.default.useRef(r.register(n,{...e.rules,value:o}));return f.default.useEffect(()=>{const e=r._options.shouldUnregister||a,t=(e,t)=>{const n=r9(r._fields,e);n&&(n._f.mount=t)};if(t(n,!0),e){const e=e9(r9(r._options.defaultValues,n));Z9(r._defaultValues,n,e),n9(r9(r._formValues,n))&&Z9(r._formValues,n,e)}return()=>{(i?e&&!r._state.action:e)?r.unregister(n):t(n,!1)}},[n,r,i,a]),{field:{name:n,value:o,onChange:f.default.useCallback(e=>s.current.onChange({target:{value:J8(e),name:n},type:o9}),[n]),onBlur:f.default.useCallback(()=>s.current.onBlur({target:{value:r9(r._formValues,n),name:n},type:a9}),[n,r]),ref:e=>{const t=r9(r._fields,n);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!r9(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!r9(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!r9(l.touchedFields,n)},error:{enumerable:!0,get:()=>r9(l.errors,n)}})}}const I9=e=>e.render(D9(e));var H9=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{};const T9=(e,t,n)=>{for(const r of n||Object.keys(e)){const n=r9(e,r);if(n){const{_f:e,...r}=n;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else K8(r)&&T9(r,t)}}};var L9=e=>({isOnSubmit:!e||e===c9,isOnBlur:e===l9,isOnChange:e===s9,isOnAll:e===h9,isOnTouch:e===d9}),P9=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))),V9=(e,t,n)=>{const r=t9(r9(e,n));return Z9(r,"root",t[n]),Z9(e,n,r),e},B9=e=>"boolean"==typeof e,j9=e=>"file"===e.type,z9=e=>"function"==typeof e,R9=e=>{if(!$8)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},W9=e=>A9(e),F9=e=>"radio"===e.type,q9=e=>e instanceof RegExp;const Y9={value:!1,isValid:!1},U9={value:!0,isValid:!0};var G9=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!n9(e[0].attributes.value)?n9(e[0].value)||""===e[0].value?U9:{value:e[0].value,isValid:!0}:U9:Y9}return Y9};const X9={isValid:!1,value:null};var K9=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,X9):X9;function J9(e,t,n="validate"){if(W9(e)||Array.isArray(e)&&e.every(W9)||B9(e)&&!e)return{type:n,message:W9(e)?e:"",ref:t}}var Q9=e=>K8(e)&&!q9(e)?e:{value:e,message:""},$9=async(e,t,n,r,a)=>{const{ref:i,refs:o,required:l,maxLength:s,minLength:c,min:d,max:h,pattern:u,validate:p,name:f,valueAsNumber:m,mount:v,disabled:g}=e._f,b=r9(t,f);if(!v||g)return{};const y=o?o[0]:i,w=e=>{r&&y.reportValidity&&(y.setCustomValidity(B9(e)?"":e||""),y.reportValidity())},x={},E=F9(i),k=Y8(i),C=E||k,S=(m||j9(i))&&n9(i.value)&&n9(b)||R9(i)&&""===i.value||""===b||Array.isArray(b)&&!b.length,M=H9.bind(null,f,n,x),A=(e,t,n,r=f9,a=m9)=>{const o=e?t:n;x[f]={type:e?r:a,message:o,ref:i,...M(e?r:a,o)}};if(a?!Array.isArray(b)||!b.length:l&&(!C&&(S||G8(b))||B9(b)&&!b||k&&!G9(o).isValid||E&&!K9(o).isValid)){const{value:e,message:t}=W9(l)?{value:!!l,message:l}:Q9(l);if(e&&(x[f]={type:g9,message:t,ref:y,...M(g9,t)},!n))return w(t),x}if(!(S||G8(d)&&G8(h))){let e,t;const r=Q9(h),a=Q9(d);if(G8(b)||isNaN(b)){const n=i.valueAsDate||new Date(b),o=e=>new Date((new Date).toDateString()+" "+e),l="time"==i.type,s="week"==i.type;A9(r.value)&&b&&(e=l?o(b)>o(r.value):s?b>r.value:n>new Date(r.value)),A9(a.value)&&b&&(t=l?o(b)<o(a.value):s?b<a.value:n<new Date(a.value))}else{const n=i.valueAsNumber||(b?+b:b);G8(r.value)||(e=n>r.value),G8(a.value)||(t=n<a.value)}if((e||t)&&(A(!!e,r.message,a.message,u9,p9),!n))return w(x[f].message),x}if((s||c)&&!S&&(A9(b)||a&&Array.isArray(b))){const e=Q9(s),t=Q9(c),r=!G8(e.value)&&b.length>+e.value,a=!G8(t.value)&&b.length<+t.value;if((r||a)&&(A(r,e.message,t.message),!n))return w(x[f].message),x}if(u&&!S&&A9(b)){const{value:e,message:t}=Q9(u);if(q9(e)&&!b.match(e)&&(x[f]={type:v9,message:t,ref:i,...M(v9,t)},!n))return w(t),x}if(p)if(z9(p)){const e=J9(await p(b,t),y);if(e&&(x[f]={...e,...M(b9,e.message)},!n))return w(e.message),x}else if(K8(p)){let e={};for(const r in p){if(!E9(e)&&!n)break;const a=J9(await p[r](b,t),y,r);a&&(e={...a,...M(r,a.message)},w(a.message),n&&(x[f]=e))}if(!E9(e)&&(x[f]={ref:y,...e},!n))return x}return w(!0),x};function eee(e,t){const n=Array.isArray(t)?t:O9(t)?[t]:N9(t),r=1===n.length?e:function(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=n9(e)?r++:e[t[r++]];return e}(e,n),a=n.length-1,i=n[a];return r&&delete r[i],0!==a&&(K8(r)&&E9(r)||Array.isArray(r)&&function(e){for(const t in e)if(!n9(e[t]))return!1;return!0}(r))&&eee(e,n.slice(0,-1)),e}function tee(){let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}}var nee=e=>G8(e)||!X8(e);function ree(e,t){if(nee(e)||nee(t))return e===t;if(U8(e)&&U8(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(U8(n)&&U8(e)||K8(n)&&K8(e)||Array.isArray(n)&&Array.isArray(e)?!ree(n,e):n!==e)return!1}}return!0}var aee=e=>"select-multiple"===e.type,iee=e=>R9(e)&&e.isConnected,oee=e=>{for(const t in e)if(z9(e[t]))return!0;return!1};function lee(e,t={}){const n=Array.isArray(e);if(K8(e)||n)for(const n in e)Array.isArray(e[n])||K8(e[n])&&!oee(e[n])?(t[n]=Array.isArray(e[n])?[]:{},lee(e[n],t[n])):G8(e[n])||(t[n]=!0);return t}function see(e,t,n){const r=Array.isArray(e);if(K8(e)||r)for(const r in e)Array.isArray(e[r])||K8(e[r])&&!oee(e[r])?n9(t)||nee(n[r])?n[r]=Array.isArray(e[r])?lee(e[r],[]):{...lee(e[r])}:see(e[r],G8(t)?{}:t[r],n[r]):n[r]=!ree(e[r],t[r]);return n}var cee=(e,t)=>see(e,t,lee(t)),dee=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>n9(e)?e:t?""===e?NaN:e?+e:e:n&&A9(e)?new Date(e):r?r(e):e;function hee(e){const t=e.ref;if(!(e.refs?e.refs.every(e=>e.disabled):t.disabled))return j9(t)?t.files:F9(t)?K9(e.refs).value:aee(t)?[...t.selectedOptions].map(({value:e})=>e):Y8(t)?G9(e.refs).value:dee(n9(t.value)?e.ref.value:t.value,e)}var uee=e=>n9(e)?e:q9(e)?e.source:K8(e)?q9(e.value)?e.value.source:e.value:e;function pee(e,t,n){const r=r9(e,n);if(r||O9(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),i=r9(t,r),o=r9(e,r);if(i&&!Array.isArray(i)&&n!==r)return{name:n};if(o&&o.type)return{name:r,error:o};a.pop()}return{name:n}}const fee={mode:c9,reValidateMode:s9,shouldFocusError:!0};function mee(e={},t){let n,r={...fee,...e},a={submitCount:0,isDirty:!1,isLoading:z9(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},i={},o=(K8(r.defaultValues)||K8(r.values))&&e9(r.defaultValues||r.values)||{},l=r.shouldUnregister?{}:e9(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},d=0;const h={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},u={values:tee(),array:tee(),state:tee()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,f=L9(r.mode),m=L9(r.reValidateMode),v=r.criteriaMode===h9,g=async e=>{if(h.isValid||e){const e=r.resolver?E9((await E()).errors):await k(i,!0);e!==a.isValid&&u.state.next({isValid:e})}},b=e=>h.isValidating&&u.state.next({isValidating:e}),y=(e,t,n,r)=>{const a=r9(i,e);if(a){const i=r9(l,e,n9(n)?r9(o,e):n);n9(i)||r&&r.defaultChecked||t?Z9(l,e,t?i:hee(a._f)):M(e,i),s.mount&&g()}},w=(e,t,n,r,i)=>{let l=!1,s=!1;const c={name:e};if(!n||r){h.isDirty&&(s=a.isDirty,a.isDirty=c.isDirty=C(),l=s!==c.isDirty);const n=ree(r9(o,e),t);s=r9(a.dirtyFields,e),n?eee(a.dirtyFields,e):Z9(a.dirtyFields,e,!0),c.dirtyFields=a.dirtyFields,l=l||h.dirtyFields&&s!==!n}if(n){const t=r9(a.touchedFields,e);t||(Z9(a.touchedFields,e,n),c.touchedFields=a.touchedFields,l=l||h.touchedFields&&t!==n)}return l&&i&&u.state.next(c),l?c:{}},x=(t,r,i,o)=>{const l=r9(a.errors,t),s=h.isValid&&B9(r)&&a.isValid!==r;var c;if(e.delayError&&i?(c=()=>((e,t)=>{Z9(a.errors,e,t),u.state.next({errors:a.errors})})(t,i),n=e=>{clearTimeout(d),d=setTimeout(c,e)},n(e.delayError)):(clearTimeout(d),n=null,i?Z9(a.errors,t,i):eee(a.errors,t)),(i?!ree(l,i):l)||!E9(o)||s){const e={...o,...s&&B9(r)?{isValid:r}:{},errors:a.errors,name:t};a={...a,...e},u.state.next(e)}b(!1)},E=async e=>r.resolver(l,r.context,((e,t,n,r)=>{const a={};for(const n of e){const e=r9(t,n);e&&Z9(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}})(e||c.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),k=async(e,t,n={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=c.array.has(e.name),s=await $9(o,l,v,r.shouldUseNativeValidation&&!t,i);if(s[e.name]&&(n.valid=!1,t))break;!t&&(r9(s,e.name)?i?V9(a.errors,s,e.name):Z9(a.errors,e.name,s[e.name]):eee(a.errors,e.name))}i&&await k(i,t,n)}}return n.valid},C=(e,t)=>(e&&t&&Z9(l,e,t),!ree(Z(),o)),S=(e,t,n)=>_9(e,c,{...s.mount?l:n9(t)?o:A9(e)?{[e]:t}:t},n,t),M=(e,t,n={})=>{const r=r9(i,e);let a=t;if(r){const n=r._f;n&&(!n.disabled&&Z9(l,e,dee(t,n)),a=R9(n.ref)&&G8(t)?"":t,aee(n.ref)?[...n.ref.options].forEach(e=>e.selected=a.includes(e.value)):n.refs?Y8(n.ref)?n.refs.length>1?n.refs.forEach(e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find(t=>t===e.value):a===e.value)):n.refs[0]&&(n.refs[0].checked=!!a):n.refs.forEach(e=>e.checked=e.value===a):j9(n.ref)?n.ref.value="":(n.ref.value=a,n.ref.type||u.values.next({name:e,values:{...l}})))}(n.shouldDirty||n.shouldTouch)&&w(e,a,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&N(e)},A=(e,t,n)=>{for(const r in t){const a=t[r],o=`${e}.${r}`,l=r9(i,o);!c.array.has(e)&&nee(a)&&(!l||l._f)||U8(a)?M(o,a,n):A(o,a,n)}},_=(e,n,r={})=>{const d=r9(i,e),p=c.array.has(e),f=e9(n);Z9(l,e,f),p?(u.array.next({name:e,values:{...l}}),(h.isDirty||h.dirtyFields)&&r.shouldDirty&&u.state.next({name:e,dirtyFields:cee(o,l),isDirty:C(e,f)})):!d||d._f||G8(f)?M(e,f,r):A(e,f,r),P9(e,c)&&u.state.next({...a}),u.values.next({name:e,values:{...l}}),!s.mount&&t()},O=async e=>{const t=e.target;let o=t.name,s=!0;const d=r9(i,o);if(d){let y,C;const S=t.type?hee(d._f):J8(e),M=e.type===a9||e.type===i9,A=!((p=d._f).mount&&(p.required||p.min||p.max||p.maxLength||p.minLength||p.pattern||p.validate)||r.resolver||r9(a.errors,o)||d._f.deps)||((e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e))(M,r9(a.touchedFields,o),a.isSubmitted,m,f),_=P9(o,c,M);Z9(l,o,S),M?(d._f.onBlur&&d._f.onBlur(e),n&&n(0)):d._f.onChange&&d._f.onChange(e);const O=w(o,S,M,!1),Z=!E9(O)||_;if(!M&&u.values.next({name:o,type:e.type,values:{...l}}),A)return h.isValid&&g(),Z&&u.state.next({name:o,..._?{}:O});if(!M&&_&&u.state.next({...a}),b(!0),r.resolver){const{errors:e}=await E([o]),t=pee(a.errors,i,o),n=pee(e,i,t.name||o);y=n.error,o=n.name,C=E9(e)}else y=(await $9(d,l,v,r.shouldUseNativeValidation))[o],s=isNaN(S)||S===r9(l,o,S),s&&(y?C=!1:h.isValid&&(C=await k(i,!0)));s&&(d._f.deps&&N(d._f.deps),x(o,C,y,O))}var p},N=async(e,t={})=>{let n,o;const l=C9(e);if(b(!0),r.resolver){const t=await(async e=>{const{errors:t}=await E();if(e)for(const n of e){const e=r9(t,n);e?Z9(a.errors,n,e):eee(a.errors,n)}else a.errors=t;return t})(n9(e)?e:l);n=E9(t),o=e?!l.some(e=>r9(t,e)):n}else e?(o=(await Promise.all(l.map(async e=>{const t=r9(i,e);return await k(t&&t._f?{[e]:t}:t)}))).every(Boolean),(o||a.isValid)&&g()):o=n=await k(i);return u.state.next({...!A9(e)||h.isValid&&n!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:n}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!o&&T9(i,e=>e&&r9(a.errors,e),e?l:c.mount),o},Z=e=>{const t={...o,...s.mount?l:{}};return n9(e)?t:A9(e)?r9(t,e):e.map(e=>r9(t,e))},D=(e,t)=>({invalid:!!r9((t||a).errors,e),isDirty:!!r9((t||a).dirtyFields,e),isTouched:!!r9((t||a).touchedFields,e),error:r9((t||a).errors,e)}),I=(e,t={})=>{for(const n of e?C9(e):c.mount)c.mount.delete(n),c.array.delete(n),t.keepValue||(eee(i,n),eee(l,n)),!t.keepError&&eee(a.errors,n),!t.keepDirty&&eee(a.dirtyFields,n),!t.keepTouched&&eee(a.touchedFields,n),!r.shouldUnregister&&!t.keepDefaultValue&&eee(o,n);u.values.next({values:{...l}}),u.state.next({...a,...t.keepDirty?{isDirty:C()}:{}}),!t.keepIsValid&&g()},H=(e,t={})=>{let n=r9(i,e);const a=B9(t.disabled);return Z9(i,e,{...n||{},_f:{...n&&n._f?n._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),n?a&&Z9(l,e,t.disabled?void 0:r9(l,e,hee(n._f))):y(e,!0,t.value),{...a?{disabled:t.disabled}:{},...r.shouldUseNativeValidation?{required:!!t.required,min:uee(t.min),max:uee(t.max),minLength:uee(t.minLength),maxLength:uee(t.maxLength),pattern:uee(t.pattern)}:{},name:e,onChange:O,onBlur:O,ref:a=>{if(a){H(e,t),n=r9(i,e);const r=n9(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,l=(e=>F9(e)||Y8(e))(r),s=n._f.refs||[];if(l?s.find(e=>e===r):r===n._f.ref)return;Z9(i,e,{_f:{...n._f,...l?{refs:[...s.filter(iee),r,...Array.isArray(r9(o,e))?[{}]:[]],ref:{type:r.type,name:e}}:{ref:r}}}),y(e,!1,void 0,r)}else n=r9(i,e,{}),n._f&&(n._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(!Q8(c.array,e)||!s.action)&&c.unMount.add(e)}}},T=()=>r.shouldFocusError&&T9(i,e=>e&&r9(a.errors,e),c.mount),L=(n,r={})=>{const d=n||o,f=e9(d),m=n&&!E9(n)?f:o;if(r.keepDefaultValues||(o=d),!r.keepValues){if(r.keepDirtyValues||p)for(const e of c.mount)r9(a.dirtyFields,e)?Z9(m,e,r9(l,e)):_(e,r9(m,e));else{if($8&&n9(n))for(const e of c.mount){const t=r9(i,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(R9(e)){const t=e.closest("form");if(t){t.reset();break}}}}i={}}l=e.shouldUnregister?r.keepDefaultValues?e9(o):{}:f,u.array.next({values:{...m}}),u.values.next({values:{...m}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!h.isValid||!!r.keepIsValid,s.watch=!!e.shouldUnregister,u.state.next({submitCount:r.keepSubmitCount?a.submitCount:0,isDirty:r.keepDirty?a.isDirty:!(!r.keepDefaultValues||ree(n,o)),isSubmitted:!!r.keepIsSubmitted&&a.isSubmitted,dirtyFields:r.keepDirtyValues?a.dirtyFields:r.keepDefaultValues&&n?cee(o,n):{},touchedFields:r.keepTouched?a.touchedFields:{},errors:r.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},P=(e,t)=>L(z9(e)?e(l):e,t);return{control:{register:H,unregister:I,getFieldState:D,_executeSchema:E,_getWatch:S,_getDirty:C,_updateValid:g,_removeUnmounted:()=>{for(const e of c.unMount){const t=r9(i,e);t&&(t._f.refs?t._f.refs.every(e=>!iee(e)):!iee(t._f.ref))&&I(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,r,c=!0,d=!0)=>{if(r&&n){if(s.action=!0,d&&Array.isArray(r9(i,e))){const t=n(r9(i,e),r.argA,r.argB);c&&Z9(i,e,t)}if(d&&Array.isArray(r9(a.errors,e))){const t=n(r9(a.errors,e),r.argA,r.argB);c&&Z9(a.errors,e,t),((e,t)=>{!t9(r9(e,t)).length&&eee(e,t)})(a.errors,e)}if(h.touchedFields&&d&&Array.isArray(r9(a.touchedFields,e))){const t=n(r9(a.touchedFields,e),r.argA,r.argB);c&&Z9(a.touchedFields,e,t)}h.dirtyFields&&(a.dirtyFields=cee(o,l)),u.state.next({name:e,isDirty:C(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else Z9(l,e,t)},_getFieldArray:t=>t9(r9(s.mount?l:o,t,e.shouldUnregister?r9(o,t,[]):[])),_reset:L,_resetDefaultValues:()=>z9(r.defaultValues)&&r.defaultValues().then(e=>{P(e,r.resetOptions),u.state.next({isLoading:!1})}),_updateFormState:e=>{a={...a,...e}},_subjects:u,_proxyFormState:h,get _fields(){return i},get _formValues(){return l},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return a},set _formState(e){a=e},get _options(){return r},set _options(e){r={...r,...e}}},trigger:N,register:H,handleSubmit:(e,t)=>async n=>{n&&(n.preventDefault&&n.preventDefault(),n.persist&&n.persist());let o=e9(l);if(u.state.next({isSubmitting:!0}),r.resolver){const{errors:e,values:t}=await E();a.errors=e,o=t}else await k(i);eee(a.errors,"root"),E9(a.errors)?(u.state.next({errors:{}}),await e(o,n)):(t&&await t({...a.errors},n),T(),setTimeout(T)),u.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:E9(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>z9(e)?u.values.subscribe({next:n=>e(S(void 0,t),n)}):S(e,t,!0),setValue:_,getValues:Z,reset:P,resetField:(e,t={})=>{r9(i,e)&&(n9(t.defaultValue)?_(e,r9(o,e)):(_(e,t.defaultValue),Z9(o,e,t.defaultValue)),t.keepTouched||eee(a.touchedFields,e),t.keepDirty||(eee(a.dirtyFields,e),a.isDirty=t.defaultValue?C(e,r9(o,e)):C()),t.keepError||(eee(a.errors,e),h.isValid&&g()),u.state.next({...a}))},clearErrors:e=>{e&&C9(e).forEach(e=>eee(a.errors,e)),u.state.next({errors:e?a.errors:{}})},unregister:I,setError:(e,t,n)=>{const r=(r9(i,e,{_f:{}})._f||{}).ref;Z9(a.errors,e,{...t,ref:r}),u.state.next({name:e,errors:a.errors,isValid:!1}),n&&n.shouldFocus&&r&&r.focus&&r.focus()},setFocus:(e,t={})=>{const n=r9(i,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:D}}var vee,gee,bee=function(e,t,n){if(e&&"reportValidity"in e){var r=r9(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},yee=function(e,t){var n=function(n){var r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?bee(r.ref,n,e):r.refs&&r.refs.forEach(function(t){return bee(t,n,e)})};for(var r in t.fields)n(r)},wee=function(e,t){t.shouldUseNativeValidation&&yee(e,t);var n={};for(var r in e){var a=r9(t.fields,r);Z9(n,r,Object.assign(e[r],{ref:a&&a.ref}))}return n},xee=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),function(r,a,i){try{return Promise.resolve(function(o,l){try{var s=(t.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e["sync"===n.mode?"validateSync":"validate"](r,Object.assign({abortEarly:!1},t,{context:a}))).then(function(e){return i.shouldUseNativeValidation&&yee({},i),{values:n.rawValues?r:e,errors:{}}}))}catch(e){return l(e)}return s&&s.then?s.then(void 0,l):s}(0,function(e){if(!e.inner)throw e;return{values:{},errors:wee((t=e,n=!i.shouldUseNativeValidation&&"all"===i.criteriaMode,(t.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var r=e[t.path].types,a=r&&r[t.type];e[t.path]=H9(t.path,n,e,t.type,a?[].concat(a,t.message):t.message)}return e},{})),i)};var t,n}))}catch(e){return Promise.reject(e)}}};try{vee=Map}catch(qNe){}try{gee=Set}catch(qNe){}function Eee(e,t,n){if(!e||"object"!=typeof e||"function"==typeof e)return e;if(e.nodeType&&"cloneNode"in e)return e.cloneNode(!0);if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);if(Array.isArray(e))return e.map(kee);if(vee&&e instanceof vee)return new Map(Array.from(e.entries()));if(gee&&e instanceof gee)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var r=Object.create(e);for(var a in n.push(r),e){var i=t.findIndex(function(t){return t===e[a]});r[a]=i>-1?n[i]:Eee(e[a],t,n)}return r}return e}function kee(e){return Eee(e,[],[])}const Cee=Object.prototype.toString,See=Error.prototype.toString,Mee=RegExp.prototype.toString,Aee="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",_ee=/^Symbol\((.*)\)(.*)$/;function Oee(e,t=!1){if(null==e||!0===e||!1===e)return""+e;const n=typeof e;if("number"===n)return function(e){return e!=+e?"NaN":0===e&&1/e<0?"-0":""+e}(e);if("string"===n)return t?`"${e}"`:e;if("function"===n)return"[Function "+(e.name||"anonymous")+"]";if("symbol"===n)return Aee.call(e).replace(_ee,"Symbol($1)");const r=Cee.call(e).slice(8,-1);return"Date"===r?isNaN(e.getTime())?""+e:e.toISOString(e):"Error"===r||e instanceof Error?"["+See.call(e)+"]":"RegExp"===r?Mee.call(e):null}function Nee(e,t){let n=Oee(e,t);return null!==n?n:JSON.stringify(e,function(e,n){let r=Oee(this[e],t);return null!==r?r:n},2)}let Zee={default:"${path} is invalid",required:"${path} is a required field",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{let a=null!=r&&r!==n,i=`${e} must be a \`${t}\` type, but the final value was: \`${Nee(n,!0)}\``+(a?` (cast from the value \`${Nee(r,!0)}\`).`:".");return null===n&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},Dee={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Iee={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Hee={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:Zee,string:Dee,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:Iee,object:Hee,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});var Tee=Object.prototype.hasOwnProperty;var Lee=function(e,t){return null!=e&&Tee.call(e,t)},Pee=Array.isArray,Vee="object"==typeof N&&N&&N.Object===Object&&N,Bee=Vee,jee="object"==typeof self&&self&&self.Object===Object&&self,zee=Bee||jee||Function("return this")(),Ree=zee.Symbol,Wee=Ree,Fee=Object.prototype,qee=Fee.hasOwnProperty,Yee=Fee.toString,Uee=Wee?Wee.toStringTag:void 0;var Gee=function(e){var t=qee.call(e,Uee),n=e[Uee];try{e[Uee]=void 0;var r=!0}catch(e){}var a=Yee.call(e);return r&&(t?e[Uee]=n:delete e[Uee]),a},Xee=Object.prototype.toString;var Kee=Gee,Jee=function(e){return Xee.call(e)},Qee=Ree?Ree.toStringTag:void 0;var $ee=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Qee&&Qee in Object(e)?Kee(e):Jee(e)};var ete=function(e){return null!=e&&"object"==typeof e},tte=$ee,nte=ete;var rte=function(e){return"symbol"==typeof e||nte(e)&&"[object Symbol]"==tte(e)},ate=Pee,ite=rte,ote=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lte=/^\w*$/;var ste=function(e,t){if(ate(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!ite(e))||(lte.test(e)||!ote.test(e)||null!=t&&e in Object(t))};var cte=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},dte=$ee,hte=cte;var ute=function(e){if(!hte(e))return!1;var t=dte(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},pte=zee["__core-js_shared__"],fte=function(){var e=/[^.]+$/.exec(pte&&pte.keys&&pte.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var mte=function(e){return!!fte&&fte in e},vte=Function.prototype.toString;var gte=function(e){if(null!=e){try{return vte.call(e)}catch(e){}try{return e+""}catch(e){}}return""},bte=ute,yte=mte,wte=cte,xte=gte,Ete=/^\[object .+?Constructor\]$/,kte=Function.prototype,Cte=Object.prototype,Ste=kte.toString,Mte=Cte.hasOwnProperty,Ate=RegExp("^"+Ste.call(Mte).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var _te=function(e,t){return null==e?void 0:e[t]},Ote=function(e){return!(!wte(e)||yte(e))&&(bte(e)?Ate:Ete).test(xte(e))},Nte=_te;var Zte=function(e,t){var n=Nte(e,t);return Ote(n)?n:void 0},Dte=Zte(Object,"create"),Ite=Dte;var Hte=function(){this.__data__=Ite?Ite(null):{},this.size=0};var Tte=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Lte=Dte,Pte=Object.prototype.hasOwnProperty;var Vte=function(e){var t=this.__data__;if(Lte){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Pte.call(t,e)?t[e]:void 0},Bte=Dte,jte=Object.prototype.hasOwnProperty;var zte=Dte;var Rte=Hte,Wte=Tte,Fte=Vte,qte=function(e){var t=this.__data__;return Bte?void 0!==t[e]:jte.call(t,e)},Yte=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=zte&&void 0===t?"__lodash_hash_undefined__":t,this};function Ute(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ute.prototype.clear=Rte,Ute.prototype.delete=Wte,Ute.prototype.get=Fte,Ute.prototype.has=qte,Ute.prototype.set=Yte;var Gte=Ute;var Xte=function(){this.__data__=[],this.size=0};var Kte=function(e,t){return e===t||e!=e&&t!=t},Jte=Kte;var Qte=function(e,t){for(var n=e.length;n--;)if(Jte(e[n][0],t))return n;return-1},$te=Qte,ene=Array.prototype.splice;var tne=function(e){var t=this.__data__,n=$te(t,e);return!(n<0)&&(n==t.length-1?t.pop():ene.call(t,n,1),--this.size,!0)},nne=Qte;var rne=function(e){var t=this.__data__,n=nne(t,e);return n<0?void 0:t[n][1]},ane=Qte;var ine=Qte;var one=function(e,t){var n=this.__data__,r=ine(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},lne=Xte,sne=tne,cne=rne,dne=function(e){return ane(this.__data__,e)>-1},hne=one;function une(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}une.prototype.clear=lne,une.prototype.delete=sne,une.prototype.get=cne,une.prototype.has=dne,une.prototype.set=hne;var pne=une,fne=Zte(zee,"Map"),mne=Gte,vne=pne,gne=fne;var bne=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e},yne=bne;var wne=function(e,t){var n=e.__data__;return yne(t)?n["string"==typeof t?"string":"hash"]:n.map},xne=wne;var Ene=wne;var kne=wne;var Cne=wne;var Sne=function(){this.size=0,this.__data__={hash:new mne,map:new(gne||vne),string:new mne}},Mne=function(e){var t=xne(this,e).delete(e);return this.size-=t?1:0,t},Ane=function(e){return Ene(this,e).get(e)},_ne=function(e){return kne(this,e).has(e)},One=function(e,t){var n=Cne(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Nne(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Nne.prototype.clear=Sne,Nne.prototype.delete=Mne,Nne.prototype.get=Ane,Nne.prototype.has=_ne,Nne.prototype.set=One;var Zne=Nne,Dne=Zne;function Ine(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var o=e.apply(this,r);return n.cache=i.set(a,o)||i,o};return n.cache=new(Ine.Cache||Dne),n}Ine.Cache=Dne;var Hne=Ine;var Tne=function(e){var t=Hne(e,function(e){return 500===n.size&&n.clear(),e}),n=t.cache;return t},Lne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pne=/\\(\\)?/g,Vne=Tne(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Lne,function(e,n,r,a){t.push(r?a.replace(Pne,"$1"):n||e)}),t}),Bne=Vne;var jne=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},zne=jne,Rne=Pee,Wne=rte,Fne=Ree?Ree.prototype:void 0,qne=Fne?Fne.toString:void 0;var Yne=function e(t){if("string"==typeof t)return t;if(Rne(t))return zne(t,e)+"";if(Wne(t))return qne?qne.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Une=Yne;var Gne=function(e){return null==e?"":Une(e)},Xne=Pee,Kne=ste,Jne=Bne,Qne=Gne;var $ne=function(e,t){return Xne(e)?e:Kne(e,t)?[e]:Jne(Qne(e))},ere=$ee,tre=ete;var nre=function(e){return tre(e)&&"[object Arguments]"==ere(e)},rre=ete,are=Object.prototype,ire=are.hasOwnProperty,ore=are.propertyIsEnumerable,lre=nre(function(){return arguments}())?nre:function(e){return rre(e)&&ire.call(e,"callee")&&!ore.call(e,"callee")},sre=/^(?:0|[1-9]\d*)$/;var cre=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&sre.test(e))&&e>-1&&e%1==0&&e<t};var dre=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},hre=rte;var ure=function(e){if("string"==typeof e||hre(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},pre=$ne,fre=lre,mre=Pee,vre=cre,gre=dre,bre=ure;var yre=function(e,t,n){for(var r=-1,a=(t=pre(t,e)).length,i=!1;++r<a;){var o=bre(t[r]);if(!(i=null!=e&&n(e,o)))break;e=e[o]}return i||++r!=a?i:!!(a=null==e?0:e.length)&&gre(a)&&vre(o,a)&&(mre(e)||fre(e))},wre=Lee,xre=yre;var Ere=function(e,t){return null!=e&&xre(e,t,wre)};const kre=e=>e&&e.__isYupSchema__;class Cre{constructor(e,t){if(this.fn=void 0,this.refs=e,this.refs=e,"function"==typeof t)return void(this.fn=t);if(!Ere(t,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!t.then&&!t.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=t,i="function"==typeof n?n:(...e)=>e.every(e=>e===n);this.fn=function(...e){let t=e.pop(),n=e.pop(),o=i(...e)?r:a;if(o)return"function"==typeof o?o(n):n.concat(o.resolve(t))}}resolve(e,t){let n=this.refs.map(e=>e.getValue(null==t?void 0:t.value,null==t?void 0:t.parent,null==t?void 0:t.context)),r=this.fn.apply(e,n.concat(e,t));if(void 0===r||r===e)return e;if(!kre(r))throw new TypeError("conditions must return a schema object");return r.resolve(t)}}function Sre(e){return null==e?[]:[].concat(e)}function Mre(){return Mre=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mre.apply(this,arguments)}let Are=/\$\{\s*(\w+)\s*\}/g;class _re extends Error{static formatError(e,t){const n=t.label||t.path||"this";return n!==t.path&&(t=Mre({},t,{path:n})),"string"==typeof e?e.replace(Are,(e,n)=>Nee(t[n])):"function"==typeof e?e(t):e}static isError(e){return e&&"ValidationError"===e.name}constructor(e,t,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=t,this.path=n,this.type=r,this.errors=[],this.inner=[],Sre(e).forEach(e=>{_re.isError(e)?(this.errors.push(...e.errors),this.inner=this.inner.concat(e.inner.length?e.inner:e)):this.errors.push(e)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,_re)}}function Ore(e,t){let{endEarly:n,tests:r,args:a,value:i,errors:o,sort:l,path:s}=e,c=(e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}})(t),d=r.length;const h=[];if(o=o||[],!d)return o.length?c(new _re(o,i,s)):c(null,i);for(let e=0;e<r.length;e++){(0,r[e])(a,function(e){if(e){if(!_re.isError(e))return c(e,i);if(n)return e.value=i,c(e,i);h.push(e)}if(--d<=0){if(h.length&&(l&&h.sort(l),o.length&&h.push(...o),o=h),o.length)return void c(new _re(o,i,s),i);c(null,i)}})}}var Nre=Zte,Zre=function(){try{var e=Nre(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var Dre=function(e,t,n){"__proto__"==t&&Zre?Zre(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var Ire=function(e){return function(t,n,r){for(var a=-1,i=Object(t),o=r(t),l=o.length;l--;){var s=o[e?l:++a];if(!1===n(i[s],s,i))break}return t}},Hre=Ire();var Tre=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Lre={exports:{}};var Pre=function(){return!1};!function(e,t){var n=zee,r=Pre,a=t&&!t.nodeType&&t,i=a&&e&&!e.nodeType&&e,o=i&&i.exports===a?n.Buffer:void 0,l=(o?o.isBuffer:void 0)||r;e.exports=l}(Lre,Lre.exports);var Vre=$ee,Bre=dre,jre=ete,zre={};zre["[object Float32Array]"]=zre["[object Float64Array]"]=zre["[object Int8Array]"]=zre["[object Int16Array]"]=zre["[object Int32Array]"]=zre["[object Uint8Array]"]=zre["[object Uint8ClampedArray]"]=zre["[object Uint16Array]"]=zre["[object Uint32Array]"]=!0,zre["[object Arguments]"]=zre["[object Array]"]=zre["[object ArrayBuffer]"]=zre["[object Boolean]"]=zre["[object DataView]"]=zre["[object Date]"]=zre["[object Error]"]=zre["[object Function]"]=zre["[object Map]"]=zre["[object Number]"]=zre["[object Object]"]=zre["[object RegExp]"]=zre["[object Set]"]=zre["[object String]"]=zre["[object WeakMap]"]=!1;var Rre=function(e){return jre(e)&&Bre(e.length)&&!!zre[Vre(e)]};var Wre=function(e){return function(t){return e(t)}},Fre={exports:{}};!function(e,t){var n=Vee,r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,i=a&&a.exports===r&&n.process,o=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=o}(Fre,Fre.exports);var qre=Rre,Yre=Wre,Ure=Fre.exports,Gre=Ure&&Ure.isTypedArray,Xre=Gre?Yre(Gre):qre,Kre=Tre,Jre=lre,Qre=Pee,$re=Lre.exports,eae=cre,tae=Xre,nae=Object.prototype.hasOwnProperty;var rae=function(e,t){var n=Qre(e),r=!n&&Jre(e),a=!n&&!r&&$re(e),i=!n&&!r&&!a&&tae(e),o=n||r||a||i,l=o?Kre(e.length,String):[],s=l.length;for(var c in e)!t&&!nae.call(e,c)||o&&("length"==c||a&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||eae(c,s))||l.push(c);return l},aae=Object.prototype;var iae=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||aae)};var oae=function(e,t){return function(n){return e(t(n))}},lae=oae(Object.keys,Object),sae=iae,cae=lae,dae=Object.prototype.hasOwnProperty;var hae=function(e){if(!sae(e))return cae(e);var t=[];for(var n in Object(e))dae.call(e,n)&&"constructor"!=n&&t.push(n);return t},uae=ute,pae=dre;var fae=rae,mae=hae,vae=function(e){return null!=e&&pae(e.length)&&!uae(e)};var gae=function(e){return vae(e)?fae(e):mae(e)},bae=Hre,yae=gae;var wae=function(e,t){return e&&bae(e,t,yae)},xae=pne;var Eae=pne,kae=fne,Cae=Zne;var Sae=pne,Mae=function(){this.__data__=new xae,this.size=0},Aae=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},_ae=function(e){return this.__data__.get(e)},Oae=function(e){return this.__data__.has(e)},Nae=function(e,t){var n=this.__data__;if(n instanceof Eae){var r=n.__data__;if(!kae||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Cae(r)}return n.set(e,t),this.size=n.size,this};function Zae(e){var t=this.__data__=new Sae(e);this.size=t.size}Zae.prototype.clear=Mae,Zae.prototype.delete=Aae,Zae.prototype.get=_ae,Zae.prototype.has=Oae,Zae.prototype.set=Nae;var Dae=Zae;var Iae=Zne,Hae=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Tae=function(e){return this.__data__.has(e)};function Lae(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Iae;++t<n;)this.add(e[t])}Lae.prototype.add=Lae.prototype.push=Hae,Lae.prototype.has=Tae;var Pae=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Vae=function(e,t){return e.has(t)},Bae=Lae,jae=Pae,zae=Vae;var Rae=function(e,t,n,r,a,i){var o=1&n,l=e.length,s=t.length;if(l!=s&&!(o&&s>l))return!1;var c=i.get(e),d=i.get(t);if(c&&d)return c==t&&d==e;var h=-1,u=!0,p=2&n?new Bae:void 0;for(i.set(e,t),i.set(t,e);++h<l;){var f=e[h],m=t[h];if(r)var v=o?r(m,f,h,t,e,i):r(f,m,h,e,t,i);if(void 0!==v){if(v)continue;u=!1;break}if(p){if(!jae(t,function(e,t){if(!zae(p,t)&&(f===e||a(f,e,n,r,i)))return p.push(t)})){u=!1;break}}else if(f!==m&&!a(f,m,n,r,i)){u=!1;break}}return i.delete(e),i.delete(t),u};var Wae=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n};var Fae=function(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n},qae=zee.Uint8Array,Yae=Kte,Uae=Rae,Gae=Wae,Xae=Fae,Kae=Ree?Ree.prototype:void 0,Jae=Kae?Kae.valueOf:void 0;var Qae=function(e,t,n,r,a,i,o){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new qae(e),new qae(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yae(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Gae;case"[object Set]":var s=1&r;if(l||(l=Xae),e.size!=t.size&&!s)return!1;var c=o.get(e);if(c)return c==t;r|=2,o.set(e,t);var d=Uae(l(e),l(t),r,a,i,o);return o.delete(e),d;case"[object Symbol]":if(Jae)return Jae.call(e)==Jae.call(t)}return!1};var $ae=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},eie=$ae,tie=Pee;var nie=function(e,t,n){var r=t(e);return tie(e)?r:eie(r,n(e))};var rie=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,i=[];++n<r;){var o=e[n];t(o,n,e)&&(i[a++]=o)}return i};var aie=rie,iie=function(){return[]},oie=Object.prototype.propertyIsEnumerable,lie=Object.getOwnPropertySymbols,sie=lie?function(e){return null==e?[]:(e=Object(e),aie(lie(e),function(t){return oie.call(e,t)}))}:iie,cie=nie,die=sie,hie=gae;var uie=function(e){return cie(e,hie,die)},pie=uie,fie=Object.prototype.hasOwnProperty;var mie=function(e,t,n,r,a,i){var o=1&n,l=pie(e),s=l.length;if(s!=pie(t).length&&!o)return!1;for(var c=s;c--;){var d=l[c];if(!(o?d in t:fie.call(t,d)))return!1}var h=i.get(e),u=i.get(t);if(h&&u)return h==t&&u==e;var p=!0;i.set(e,t),i.set(t,e);for(var f=o;++c<s;){var m=e[d=l[c]],v=t[d];if(r)var g=o?r(v,m,d,t,e,i):r(m,v,d,e,t,i);if(!(void 0===g?m===v||a(m,v,n,r,i):g)){p=!1;break}f||(f="constructor"==d)}if(p&&!f){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return i.delete(e),i.delete(t),p},vie=Zte(zee,"DataView"),gie=fne,bie=Zte(zee,"Promise"),yie=Zte(zee,"Set"),wie=Zte(zee,"WeakMap"),xie=$ee,Eie=gte,kie="[object Map]",Cie="[object Promise]",Sie="[object Set]",Mie="[object WeakMap]",Aie="[object DataView]",_ie=Eie(vie),Oie=Eie(gie),Nie=Eie(bie),Zie=Eie(yie),Die=Eie(wie),Iie=xie;(vie&&Iie(new vie(new ArrayBuffer(1)))!=Aie||gie&&Iie(new gie)!=kie||bie&&Iie(bie.resolve())!=Cie||yie&&Iie(new yie)!=Sie||wie&&Iie(new wie)!=Mie)&&(Iie=function(e){var t=xie(e),n="[object Object]"==t?e.constructor:void 0,r=n?Eie(n):"";if(r)switch(r){case _ie:return Aie;case Oie:return kie;case Nie:return Cie;case Zie:return Sie;case Die:return Mie}return t});var Hie=Dae,Tie=Rae,Lie=Qae,Pie=mie,Vie=Iie,Bie=Pee,jie=Lre.exports,zie=Xre,Rie="[object Arguments]",Wie="[object Array]",Fie="[object Object]",qie=Object.prototype.hasOwnProperty;var Yie=function(e,t,n,r,a,i){var o=Bie(e),l=Bie(t),s=o?Wie:Vie(e),c=l?Wie:Vie(t),d=(s=s==Rie?Fie:s)==Fie,h=(c=c==Rie?Fie:c)==Fie,u=s==c;if(u&&jie(e)){if(!jie(t))return!1;o=!0,d=!1}if(u&&!d)return i||(i=new Hie),o||zie(e)?Tie(e,t,n,r,a,i):Lie(e,t,s,n,r,a,i);if(!(1&n)){var p=d&&qie.call(e,"__wrapped__"),f=h&&qie.call(t,"__wrapped__");if(p||f){var m=p?e.value():e,v=f?t.value():t;return i||(i=new Hie),a(m,v,n,r,i)}}return!!u&&(i||(i=new Hie),Pie(e,t,n,r,a,i))},Uie=Yie,Gie=ete;var Xie=function e(t,n,r,a,i){return t===n||(null==t||null==n||!Gie(t)&&!Gie(n)?t!=t&&n!=n:Uie(t,n,r,a,e,i))},Kie=Dae,Jie=Xie;var Qie=function(e,t,n,r){var a=n.length,i=a,o=!r;if(null==e)return!i;for(e=Object(e);a--;){var l=n[a];if(o&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++a<i;){var s=(l=n[a])[0],c=e[s],d=l[1];if(o&&l[2]){if(void 0===c&&!(s in e))return!1}else{var h=new Kie;if(r)var u=r(c,d,s,e,t,h);if(!(void 0===u?Jie(d,c,3,r,h):u))return!1}}return!0},$ie=cte;var eoe=function(e){return e==e&&!$ie(e)},toe=eoe,noe=gae;var roe=function(e){for(var t=noe(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,toe(a)]}return t};var aoe=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},ioe=Qie,ooe=roe,loe=aoe;var soe=function(e){var t=ooe(e);return 1==t.length&&t[0][2]?loe(t[0][0],t[0][1]):function(n){return n===e||ioe(n,e,t)}},coe=$ne,doe=ure;var hoe=function(e,t){for(var n=0,r=(t=coe(t,e)).length;null!=e&&n<r;)e=e[doe(t[n++])];return n&&n==r?e:void 0},uoe=hoe;var poe=function(e,t,n){var r=null==e?void 0:uoe(e,t);return void 0===r?n:r};var foe=function(e,t){return null!=e&&t in Object(e)},moe=foe,voe=yre;var goe=function(e,t){return null!=e&&voe(e,t,moe)},boe=Xie,yoe=poe,woe=goe,xoe=ste,Eoe=eoe,koe=aoe,Coe=ure;var Soe=function(e,t){return xoe(e)&&Eoe(t)?koe(Coe(e),t):function(n){var r=yoe(n,e);return void 0===r&&r===t?woe(n,e):boe(t,r,3)}};var Moe=function(e){return function(t){return null==t?void 0:t[e]}},Aoe=hoe;var _oe=function(e){return function(t){return Aoe(t,e)}},Ooe=Moe,Noe=_oe,Zoe=ste,Doe=ure;var Ioe=soe,Hoe=Soe,Toe=function(e){return e},Loe=Pee,Poe=function(e){return Zoe(e)?Ooe(Doe(e)):Noe(e)};var Voe=function(e){return"function"==typeof e?e:null==e?Toe:"object"==typeof e?Loe(e)?Hoe(e[0],e[1]):Ioe(e):Poe(e)},Boe=Dre,joe=wae,zoe=Voe;var Roe=function(e,t){var n={};return t=zoe(t),joe(e,function(e,r,a){Boe(n,r,t(e,r,a))}),n};function Woe(e){this._maxSize=e,this.clear()}Woe.prototype.clear=function(){this._size=0,this._values=Object.create(null)},Woe.prototype.get=function(e){return this._values[e]},Woe.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Foe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,qoe=/^\d+$/,Yoe=/^\d/,Uoe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Goe=/^\s*(['"]?)(.*?)(\1)\s*$/,Xoe=new Woe(512),Koe=new Woe(512),Joe=new Woe(512),Qoe={Cache:Woe,split:ele,normalizePath:$oe,setter:function(e){var t=$oe(e);return Koe.get(e)||Koe.set(e,function(e,n){for(var r=0,a=t.length,i=e;r<a-1;){var o=t[r];if("__proto__"===o||"constructor"===o||"prototype"===o)return e;i=i[t[r++]]}i[t[r]]=n})},getter:function(e,t){var n=$oe(e);return Joe.get(e)||Joe.set(e,function(e){for(var r=0,a=n.length;r<a;){if(null==e&&t)return;e=e[n[r++]]}return e})},join:function(e){return e.reduce(function(e,t){return e+(tle(t)||qoe.test(t)?"["+t+"]":(e?".":"")+t)},"")},forEach:function(e,t,n){!function(e,t,n){var r,a,i,o,l=e.length;for(a=0;a<l;a++)(r=e[a])&&(nle(r)&&(r='"'+r+'"'),i=!(o=tle(r))&&/^\d+$/.test(r),t.call(n,r,o,i,a,e))}(Array.isArray(e)?e:ele(e),t,n)}};function $oe(e){return Xoe.get(e)||Xoe.set(e,ele(e).map(function(e){return e.replace(Goe,"$2")}))}function ele(e){return e.match(Foe)||[""]}function tle(e){return"string"==typeof e&&e&&-1!==["'",'"'].indexOf(e.charAt(0))}function nle(e){return!tle(e)&&(function(e){return e.match(Yoe)&&!e.match(qoe)}(e)||function(e){return Uoe.test(e)}(e))}const rle="$",ale=".";class ile{constructor(e,t={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof e)throw new TypeError("ref must be a string, got: "+e);if(this.key=e.trim(),""===e)throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===rle,this.isValue=this.key[0]===ale,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?rle:this.isValue?ale:"";this.path=this.key.slice(n.length),this.getter=this.path&&Qoe.getter(this.path,!0),this.map=t.map}getValue(e,t,n){let r=this.isContext?n:this.isValue?e:t;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(e,t){return this.getValue(e,null==t?void 0:t.parent,null==t?void 0:t.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(e){return e&&e.__isYupRef}}function ole(){return ole=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ole.apply(this,arguments)}function lle(e){function t(t,n){let{value:r,path:a="",label:i,options:o,originalValue:l,sync:s}=t,c=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(t,["value","path","label","options","originalValue","sync"]);const{name:d,test:h,params:u,message:p}=e;let{parent:f,context:m}=o;function v(e){return ile.isRef(e)?e.getValue(r,f,m):e}function g(e={}){const t=Roe(ole({value:r,originalValue:l,label:i,path:e.path||a},u,e.params),v),n=new _re(_re.formatError(e.message||p,t),r,t.path,e.type||d);return n.params=t,n}let b,y=ole({path:a,parent:f,type:d,createError:g,resolve:v,options:o,originalValue:l},c);if(s){try{var w;if(b=h.call(y,r,y),"function"==typeof(null==(w=b)?void 0:w.then))throw new Error(`Validation test of type: "${y.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(e){return void n(e)}_re.isError(b)?n(b):b?n(null,b):n(g())}else try{Promise.resolve(h.call(y,r,y)).then(e=>{_re.isError(e)?n(e):e?n(null,e):n(g())}).catch(n)}catch(e){n(e)}}return t.OPTIONS=e,t}ile.prototype.__isYupRef=!0;function sle(e,t,n,r=n){let a,i,o;return t?(Qoe.forEach(t,(l,s,c)=>{let d=s?(e=>e.substr(0,e.length-1).substr(1))(l):l;if((e=e.resolve({context:r,parent:a,value:n})).innerType){let r=c?parseInt(d,10):0;if(n&&r>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${l}, in the path: ${t}. because there is no value at that index. `);a=n,n=n&&n[r],e=e.innerType}if(!c){if(!e.fields||!e.fields[d])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);a=n,n=n&&n[d],e=e.fields[d]}i=d,o=s?"["+l+"]":"."+l}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class cle{constructor(){this.list=void 0,this.refs=void 0,this.list=new Set,this.refs=new Map}get size(){return this.list.size+this.refs.size}describe(){const e=[];for(const t of this.list)e.push(t);for(const[,t]of this.refs)e.push(t.describe());return e}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(e){return this.toArray().reduce((t,n)=>t.concat(ile.isRef(n)?e(n):n),[])}add(e){ile.isRef(e)?this.refs.set(e.key,e):this.list.add(e)}delete(e){ile.isRef(e)?this.refs.delete(e.key):this.list.delete(e)}clone(){const e=new cle;return e.list=new Set(this.list),e.refs=new Map(this.refs),e}merge(e,t){const n=this.clone();return e.list.forEach(e=>n.add(e)),e.refs.forEach(e=>n.add(e)),t.list.forEach(e=>n.delete(e)),t.refs.forEach(e=>n.delete(e)),n}}function dle(){return dle=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dle.apply(this,arguments)}class hle{constructor(e){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new cle,this._blacklist=new cle,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Zee.notType)}),this.type=(null==e?void 0:e.type)||"mixed",this.spec=dle({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},null==e?void 0:e.spec)}get _type(){return this.type}_typeCheck(e){return!0}clone(e){if(this._mutate)return e&&Object.assign(this.spec,e),this;const t=Object.create(Object.getPrototypeOf(this));return t.type=this.type,t._typeError=this._typeError,t._whitelistError=this._whitelistError,t._blacklistError=this._blacklistError,t._whitelist=this._whitelist.clone(),t._blacklist=this._blacklist.clone(),t.exclusiveTests=dle({},this.exclusiveTests),t.deps=[...this.deps],t.conditions=[...this.conditions],t.tests=[...this.tests],t.transforms=[...this.transforms],t.spec=kee(dle({},this.spec,e)),t}label(e){let t=this.clone();return t.spec.label=e,t}meta(...e){if(0===e.length)return this.spec.meta;let t=this.clone();return t.spec.meta=Object.assign(t.spec.meta||{},e[0]),t}withMutation(e){let t=this._mutate;this._mutate=!0;let n=e(this);return this._mutate=t,n}concat(e){if(!e||e===this)return this;if(e.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${e.type}`);let t=this,n=e.clone();const r=dle({},t.spec,n.spec);return n.spec=r,n._typeError||(n._typeError=t._typeError),n._whitelistError||(n._whitelistError=t._whitelistError),n._blacklistError||(n._blacklistError=t._blacklistError),n._whitelist=t._whitelist.merge(e._whitelist,e._blacklist),n._blacklist=t._blacklist.merge(e._blacklist,e._whitelist),n.tests=t.tests,n.exclusiveTests=t.exclusiveTests,n.withMutation(t=>{e.tests.forEach(e=>{t.test(e.OPTIONS)})}),n.transforms=[...t.transforms,...n.transforms],n}isType(e){return!(!this.spec.nullable||null!==e)||this._typeCheck(e)}resolve(e){let t=this;if(t.conditions.length){let n=t.conditions;t=t.clone(),t.conditions=[],t=n.reduce((t,n)=>n.resolve(t,e),t),t=t.resolve(e)}return t}cast(e,t={}){let n=this.resolve(dle({value:e},t)),r=n._cast(e,t);if(void 0!==e&&!1!==t.assert&&!0!==n.isType(r)){let a=Nee(e),i=Nee(r);throw new TypeError(`The value of ${t.path||"field"} could not be cast to a value that satisfies the schema type: "${n._type}". \n\nattempted value: ${a} \n`+(i!==a?`result of cast: ${i}`:""))}return r}_cast(e,t){let n=void 0===e?e:this.transforms.reduce((t,n)=>n.call(this,t,e,this),e);return void 0===n&&(n=this.getDefault()),n}_validate(e,t={},n){let{sync:r,path:a,from:i=[],originalValue:o=e,strict:l=this.spec.strict,abortEarly:s=this.spec.abortEarly}=t,c=e;l||(c=this._cast(c,dle({assert:!1},t)));let d={value:c,path:a,options:t,originalValue:o,schema:this,label:this.spec.label,sync:r,from:i},h=[];this._typeError&&h.push(this._typeError);let u=[];this._whitelistError&&u.push(this._whitelistError),this._blacklistError&&u.push(this._blacklistError),Ore({args:d,value:c,path:a,sync:r,tests:h,endEarly:s},e=>{e?n(e,c):Ore({tests:this.tests.concat(u),args:d,path:a,sync:r,value:c,endEarly:s},n)})}validate(e,t,n){let r=this.resolve(dle({},t,{value:e}));return"function"==typeof n?r._validate(e,t,n):new Promise((n,a)=>r._validate(e,t,(e,t)=>{e?a(e):n(t)}))}validateSync(e,t){let n;return this.resolve(dle({},t,{value:e}))._validate(e,dle({},t,{sync:!0}),(e,t)=>{if(e)throw e;n=t}),n}isValid(e,t){return this.validate(e,t).then(()=>!0,e=>{if(_re.isError(e))return!1;throw e})}isValidSync(e,t){try{return this.validateSync(e,t),!0}catch(e){if(_re.isError(e))return!1;throw e}}_getDefault(){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this):kee(e)}getDefault(e){return this.resolve(e||{})._getDefault()}default(e){if(0===arguments.length)return this._getDefault();return this.clone({default:e})}strict(e=!0){let t=this.clone();return t.spec.strict=e,t}_isPresent(e){return null!=e}defined(e=Zee.defined){return this.test({message:e,name:"defined",exclusive:!0,test:e=>void 0!==e})}required(e=Zee.required){return this.clone({presence:"required"}).withMutation(t=>t.test({message:e,name:"required",exclusive:!0,test(e){return this.schema._isPresent(e)}}))}notRequired(){let e=this.clone({presence:"optional"});return e.tests=e.tests.filter(e=>"required"!==e.OPTIONS.name),e}nullable(e=!0){return this.clone({nullable:!1!==e})}transform(e){let t=this.clone();return t.transforms.push(e),t}test(...e){let t;if(t=1===e.length?"function"==typeof e[0]?{test:e[0]}:e[0]:2===e.length?{name:e[0],test:e[1]}:{name:e[0],message:e[1],test:e[2]},void 0===t.message&&(t.message=Zee.default),"function"!=typeof t.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=lle(t),a=t.exclusive||t.name&&!0===n.exclusiveTests[t.name];if(t.exclusive&&!t.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return t.name&&(n.exclusiveTests[t.name]=!!t.exclusive),n.tests=n.tests.filter(e=>{if(e.OPTIONS.name===t.name){if(a)return!1;if(e.OPTIONS.test===r.OPTIONS.test)return!1}return!0}),n.tests.push(r),n}when(e,t){Array.isArray(e)||"string"==typeof e||(t=e,e=".");let n=this.clone(),r=Sre(e).map(e=>new ile(e));return r.forEach(e=>{e.isSibling&&n.deps.push(e.key)}),n.conditions.push(new Cre(r,t)),n}typeError(e){let t=this.clone();return t._typeError=lle({message:e,name:"typeError",test(e){return!(void 0!==e&&!this.schema.isType(e))||this.createError({params:{type:this.schema._type}})}}),t}oneOf(e,t=Zee.oneOf){let n=this.clone();return e.forEach(e=>{n._whitelist.add(e),n._blacklist.delete(e)}),n._whitelistError=lle({message:t,name:"oneOf",test(e){if(void 0===e)return!0;let t=this.schema._whitelist,n=t.resolveAll(this.resolve);return!!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}notOneOf(e,t=Zee.notOneOf){let n=this.clone();return e.forEach(e=>{n._blacklist.add(e),n._whitelist.delete(e)}),n._blacklistError=lle({message:t,name:"notOneOf",test(e){let t=this.schema._blacklist,n=t.resolveAll(this.resolve);return!n.includes(e)||this.createError({params:{values:t.toArray().join(", "),resolved:n}})}}),n}strip(e=!0){let t=this.clone();return t.spec.strip=e,t}describe(){const e=this.clone(),{label:t,meta:n}=e.spec,r={meta:n,label:t,type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(e=>({name:e.OPTIONS.name,params:e.OPTIONS.params})).filter((e,t,n)=>n.findIndex(t=>t.name===e.name)===t)};return r}}hle.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])hle.prototype[`${e}At`]=function(t,n,r={}){const{parent:a,parentPath:i,schema:o}=sle(this,t,n,r.context);return o[e](a&&a[i],dle({},r,{parent:a,path:t}))};for(const e of["equals","is"])hle.prototype[e]=hle.prototype.oneOf;for(const e of["not","nope"])hle.prototype[e]=hle.prototype.notOneOf;hle.prototype.optional=hle.prototype.notRequired;hle.prototype;const ule=e=>null==e;let ple=/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,fle=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,mle=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,vle=e=>ule(e)||e===e.trim(),gle={}.toString();function ble(){return new yle}class yle extends hle{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(e){if(this.isType(e))return e;if(Array.isArray(e))return e;const t=null!=e&&e.toString?e.toString():e;return t===gle?e:t})})}_typeCheck(e){return e instanceof String&&(e=e.valueOf()),"string"==typeof e}_isPresent(e){return super._isPresent(e)&&!!e.length}length(e,t=Dee.length){return this.test({message:t,name:"length",exclusive:!0,params:{length:e},test(t){return ule(t)||t.length===this.resolve(e)}})}min(e,t=Dee.min){return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(t){return ule(t)||t.length>=this.resolve(e)}})}max(e,t=Dee.max){return this.test({name:"max",exclusive:!0,message:t,params:{max:e},test(t){return ule(t)||t.length<=this.resolve(e)}})}matches(e,t){let n,r,a=!1;return t&&("object"==typeof t?({excludeEmptyString:a=!1,message:n,name:r}=t):n=t),this.test({name:r||"matches",message:n||Dee.matches,params:{regex:e},test:t=>ule(t)||""===t&&a||-1!==t.search(e)})}email(e=Dee.email){return this.matches(ple,{name:"email",message:e,excludeEmptyString:!0})}url(e=Dee.url){return this.matches(fle,{name:"url",message:e,excludeEmptyString:!0})}uuid(e=Dee.uuid){return this.matches(mle,{name:"uuid",message:e,excludeEmptyString:!1})}ensure(){return this.default("").transform(e=>null===e?"":e)}trim(e=Dee.trim){return this.transform(e=>null!=e?e.trim():e).test({message:e,name:"trim",test:vle})}lowercase(e=Dee.lowercase){return this.transform(e=>ule(e)?e:e.toLowerCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>ule(e)||e===e.toLowerCase()})}uppercase(e=Dee.uppercase){return this.transform(e=>ule(e)?e:e.toUpperCase()).test({message:e,name:"string_case",exclusive:!0,test:e=>ule(e)||e===e.toUpperCase()})}}ble.prototype=yle.prototype;var wle=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;let xle=new Date("");class Ele extends hle{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(e){return this.isType(e)?e:(e=function(e){var t,n,r=[1,4,5,6,7,10,11],a=0;if(n=wle.exec(e)){for(var i,o=0;i=r[o];++o)n[i]=+n[i]||0;n[2]=(+n[2]||1)-1,n[3]=+n[3]||1,n[7]=n[7]?String(n[7]).substr(0,3):0,void 0!==n[8]&&""!==n[8]||void 0!==n[9]&&""!==n[9]?("Z"!==n[8]&&void 0!==n[9]&&(a=60*n[10]+n[11],"+"===n[9]&&(a=0-a)),t=Date.UTC(n[1],n[2],n[3],n[4],n[5]+a,n[6],n[7])):t=+new Date(n[1],n[2],n[3],n[4],n[5],n[6],n[7])}else t=Date.parse?Date.parse(e):NaN;return t}(e),isNaN(e)?xle:new Date(e))})})}_typeCheck(e){return(e=>"[object Date]"===Object.prototype.toString.call(e))(e)&&!isNaN(e.getTime())}prepareParam(e,t){let n;if(ile.isRef(e))n=e;else{let r=this.cast(e);if(!this._typeCheck(r))throw new TypeError(`\`${t}\` must be a Date or a value that can be \`cast()\` to a Date`);n=r}return n}min(e,t=Iee.min){let n=this.prepareParam(e,"min");return this.test({message:t,name:"min",exclusive:!0,params:{min:e},test(e){return ule(e)||e>=this.resolve(n)}})}max(e,t=Iee.max){let n=this.prepareParam(e,"max");return this.test({message:t,name:"max",exclusive:!0,params:{max:e},test(e){return ule(e)||e<=this.resolve(n)}})}}Ele.INVALID_DATE=xle,Ele.prototype;var kle=function(e,t,n,r){var a=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++a]);++a<i;)n=t(n,e[a],a,e);return n};var Cle=function(e){return function(t){return null==e?void 0:e[t]}},Sle=Cle({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mle=Gne,Ale=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_le=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Ole=function(e){return(e=Mle(e))&&e.replace(Ale,Sle).replace(_le,"")},Nle=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Zle=function(e){return e.match(Nle)||[]},Dle=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ile=function(e){return Dle.test(e)},Hle="\\ud800-\\udfff",Tle="\\u2700-\\u27bf",Lle="a-z\\xdf-\\xf6\\xf8-\\xff",Ple="A-Z\\xc0-\\xd6\\xd8-\\xde",Vle="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ble="["+Vle+"]",jle="\\d+",zle="["+Tle+"]",Rle="["+Lle+"]",Wle="[^"+Hle+Vle+jle+Tle+Lle+Ple+"]",Fle="(?:\\ud83c[\\udde6-\\uddff]){2}",qle="[\\ud800-\\udbff][\\udc00-\\udfff]",Yle="["+Ple+"]",Ule="(?:"+Rle+"|"+Wle+")",Gle="(?:"+Yle+"|"+Wle+")",Xle="(?:['’](?:d|ll|m|re|s|t|ve))?",Kle="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jle="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Qle="[\\ufe0e\\ufe0f]?",$le=Qle+Jle+("(?:\\u200d(?:"+["[^"+Hle+"]",Fle,qle].join("|")+")"+Qle+Jle+")*"),ese="(?:"+[zle,Fle,qle].join("|")+")"+$le,tse=RegExp([Yle+"?"+Rle+"+"+Xle+"(?="+[Ble,Yle,"$"].join("|")+")",Gle+"+"+Kle+"(?="+[Ble,Yle+Ule,"$"].join("|")+")",Yle+"?"+Ule+"+"+Xle,Yle+"+"+Kle,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jle,ese].join("|"),"g");var nse=function(e){return e.match(tse)||[]},rse=Zle,ase=Ile,ise=Gne,ose=nse;var lse=function(e,t,n){return e=ise(e),void 0===(t=n?void 0:t)?ase(e)?ose(e):rse(e):e.match(t)||[]},sse=kle,cse=Ole,dse=lse,hse=RegExp("['’]","g");var use=function(e){return function(t){return sse(dse(cse(t).replace(hse,"")),e,"")}},pse=use(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),fse=pse;var mse=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(a);++r<a;)i[r]=e[r+t];return i},vse=mse;var gse=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:vse(e,t,n)},bse=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var yse=function(e){return bse.test(e)};var wse=function(e){return e.split("")},xse="\\ud800-\\udfff",Ese="["+xse+"]",kse="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Cse="\\ud83c[\\udffb-\\udfff]",Sse="[^"+xse+"]",Mse="(?:\\ud83c[\\udde6-\\uddff]){2}",Ase="[\\ud800-\\udbff][\\udc00-\\udfff]",_se="(?:"+kse+"|"+Cse+")"+"?",Ose="[\\ufe0e\\ufe0f]?",Nse=Ose+_se+("(?:\\u200d(?:"+[Sse,Mse,Ase].join("|")+")"+Ose+_se+")*"),Zse="(?:"+[Sse+kse+"?",kse,Mse,Ase,Ese].join("|")+")",Dse=RegExp(Cse+"(?="+Cse+")|"+Zse+Nse,"g");var Ise=function(e){return e.match(Dse)||[]},Hse=wse,Tse=yse,Lse=Ise;var Pse=function(e){return Tse(e)?Lse(e):Hse(e)},Vse=gse,Bse=yse,jse=Pse,zse=Gne;var Rse=function(e){return function(t){t=zse(t);var n=Bse(t)?jse(t):void 0,r=n?n[0]:t.charAt(0),a=n?Vse(n,1).join(""):t.slice(1);return r[e]()+a}},Wse=Rse("toUpperCase"),Fse=Gne,qse=Wse;var Yse=function(e){return qse(Fse(e).toLowerCase())},Use=Yse,Gse=use(function(e,t,n){return t=t.toLowerCase(),e+(n?Use(t):t)}),Xse=Gse,Kse=Dre,Jse=wae,Qse=Voe;var $se=function(e,t){var n={};return t=Qse(t),Jse(e,function(e,r,a){Kse(n,t(e,r,a),e)}),n},ece={exports:{}};function tce(e,t){var n=e.length,r=new Array(n),a={},i=n,o=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++){var a=e[n];t.has(a[0])||t.set(a[0],new Set),t.has(a[1])||t.set(a[1],new Set),t.get(a[0]).add(a[1])}return t}(t),l=function(e){for(var t=new Map,n=0,r=e.length;n<r;n++)t.set(e[n],n);return t}(e);for(t.forEach(function(e){if(!l.has(e[0])||!l.has(e[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||s(e[i],i,new Set);return r;function s(e,t,i){if(i.has(e)){var c;try{c=", node was:"+JSON.stringify(e)}catch(e){c=""}throw new Error("Cyclic dependency"+c)}if(!l.has(e))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(e));if(!a[t]){a[t]=!0;var d=o.get(e)||new Set;if(t=(d=Array.from(d)).length){i.add(e);do{var h=d[--t];s(h,l.get(h),i)}while(t);i.delete(e)}r[--n]=e}}}ece.exports=function(e){return tce(function(e){for(var t=new Set,n=0,r=e.length;n<r;n++){var a=e[n];t.add(a[0]),t.add(a[1])}return Array.from(t)}(e),e)},ece.exports.array=tce;var nce=ece.exports;function rce(e,t){let n=1/0;return e.some((e,r)=>{var a;if(-1!==(null==(a=t.path)?void 0:a.indexOf(e)))return n=r,!0}),n}function ace(e){return(t,n)=>rce(e,t)-rce(e,n)}function ice(){return ice=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ice.apply(this,arguments)}let oce=e=>"[object Object]"===Object.prototype.toString.call(e);const lce=ace([]);class sce extends hle{constructor(e){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=lce,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(t){e=null}return this.isType(e)?e:null}),e&&this.shape(e)})}_typeCheck(e){return oce(e)||"function"==typeof e}_cast(e,t={}){var n;let r=super._cast(e,t);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,i=null!=(n=t.stripUnknown)?n:this.spec.noUnknown,o=this._nodes.concat(Object.keys(r).filter(e=>-1===this._nodes.indexOf(e))),l={},s=ice({},t,{parent:l,__validating:t.__validating||!1}),c=!1;for(const e of o){let n=a[e],o=Ere(r,e);if(n){let a,i=r[e];s.path=(t.path?`${t.path}.`:"")+e,n=n.resolve({value:i,context:t.context,parent:l});let o="spec"in n?n.spec:void 0,d=null==o?void 0:o.strict;if(null==o?void 0:o.strip){c=c||e in r;continue}a=t.__validating&&d?r[e]:n.cast(r[e],s),void 0!==a&&(l[e]=a)}else o&&!i&&(l[e]=r[e]);l[e]!==r[e]&&(c=!0)}return c?l:r}_validate(e,t={},n){let r=[],{sync:a,from:i=[],originalValue:o=e,abortEarly:l=this.spec.abortEarly,recursive:s=this.spec.recursive}=t;i=[{schema:this,value:o},...i],t.__validating=!0,t.originalValue=o,t.from=i,super._validate(e,t,(e,c)=>{if(e){if(!_re.isError(e)||l)return void n(e,c);r.push(e)}if(!s||!oce(c))return void n(r[0]||null,c);o=o||c;let d=this._nodes.map(e=>(n,r)=>{let a=-1===e.indexOf(".")?(t.path?`${t.path}.`:"")+e:`${t.path||""}["${e}"]`,l=this.fields[e];l&&"validate"in l?l.validate(c[e],ice({},t,{path:a,from:i,strict:!0,parent:c,originalValue:o[e]}),r):r(null)});Ore({sync:a,tests:d,value:c,errors:r,endEarly:l,sort:this._sortErrors,path:t.path},n)})}clone(e){const t=super.clone(e);return t.fields=ice({},this.fields),t._nodes=this._nodes,t._excludedEdges=this._excludedEdges,t._sortErrors=this._sortErrors,t}concat(e){let t=super.concat(e),n=t.fields;for(let[e,t]of Object.entries(this.fields)){const r=n[e];void 0===r?n[e]=t:r instanceof hle&&t instanceof hle&&(n[e]=t.concat(r))}return t.withMutation(()=>t.shape(n,this._excludedEdges))}getDefaultFromShape(){let e={};return this._nodes.forEach(t=>{const n=this.fields[t];e[t]="default"in n?n.getDefault():void 0}),e}_getDefault(){return"default"in this.spec?super._getDefault():this._nodes.length?this.getDefaultFromShape():void 0}shape(e,t=[]){let n=this.clone(),r=Object.assign(n.fields,e);return n.fields=r,n._sortErrors=ace(Object.keys(r)),t.length&&(Array.isArray(t[0])||(t=[t]),n._excludedEdges=[...n._excludedEdges,...t]),n._nodes=function(e,t=[]){let n=[],r=new Set,a=new Set(t.map(([e,t])=>`${e}-${t}`));function i(e,t){let i=Qoe.split(e)[0];r.add(i),a.has(`${t}-${i}`)||n.push([t,i])}for(const t in e)if(Ere(e,t)){let n=e[t];r.add(t),ile.isRef(n)&&n.isSibling?i(n.path,t):kre(n)&&"deps"in n&&n.deps.forEach(e=>i(e,t))}return nce.array(Array.from(r),n).reverse()}(r,n._excludedEdges),n}pick(e){const t={};for(const n of e)this.fields[n]&&(t[n]=this.fields[n]);return this.clone().withMutation(e=>(e.fields={},e.shape(t)))}omit(e){const t=this.clone(),n=t.fields;t.fields={};for(const t of e)delete n[t];return t.withMutation(()=>t.shape(n))}from(e,t,n){let r=Qoe.getter(e,!0);return this.transform(a=>{if(null==a)return a;let i=a;return Ere(a,e)&&(i=ice({},a),n||delete i[e],i[t]=r(a)),i})}noUnknown(e=!0,t=Hee.noUnknown){"string"==typeof e&&(t=e,e=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:t,test(t){if(null==t)return!0;const n=function(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(e=>-1===n.indexOf(e))}(this.schema,t);return!e||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=e,n}unknown(e=!0,t=Hee.noUnknown){return this.noUnknown(!e,t)}transformKeys(e){return this.transform(t=>t&&$se(t,(t,n)=>e(n)))}camelCase(){return this.transformKeys(Xse)}snakeCase(){return this.transformKeys(fse)}constantCase(){return this.transformKeys(e=>fse(e).toUpperCase())}describe(){let e=super.describe();return e.fields=Roe(this.fields,e=>e.describe()),e}}function cce(e){return new sce(e)}
|
|
555
555
|
/*!
|
|
556
556
|
* sweetalert2 v11.22.2
|
|
557
557
|
* Released under the MIT License.
|