Files
Ergo/dist/assets/index.195268fe.js
T
2025-07-02 15:02:43 +01:00

369 lines
3.2 MiB
Plaintext

var RU=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var SDe=RU((CDe,Fg)=>{function sL(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(a){if(a!=="default"&&!(a in e)){var r=Object.getOwnPropertyDescriptor(n,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:function(){return n[a]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const jU=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))a(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerpolicy&&(i.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?i.credentials="include":r.crossorigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function a(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}};jU();var sn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function zU(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M_(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach(function(n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}),t}function iL(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var h={exports:{}},cn={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Fp=Symbol.for("react.element"),FU=Symbol.for("react.portal"),$U=Symbol.for("react.fragment"),BU=Symbol.for("react.strict_mode"),HU=Symbol.for("react.profiler"),UU=Symbol.for("react.provider"),VU=Symbol.for("react.context"),WU=Symbol.for("react.forward_ref"),YU=Symbol.for("react.suspense"),GU=Symbol.for("react.memo"),qU=Symbol.for("react.lazy"),Nk=Symbol.iterator;function ZU(e){return e===null||typeof e!="object"?null:(e=Nk&&e[Nk]||e["@@iterator"],typeof e=="function"?e:null)}var oL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},lL=Object.assign,cL={};function Zu(e,t,n){this.props=e,this.context=t,this.refs=cL,this.updater=n||oL}Zu.prototype.isReactComponent={};Zu.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Zu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dL(){}dL.prototype=Zu.prototype;function A_(e,t,n){this.props=e,this.context=t,this.refs=cL,this.updater=n||oL}var I_=A_.prototype=new dL;I_.constructor=A_;lL(I_,Zu.prototype);I_.isPureReactComponent=!0;var Sk=Array.isArray,uL=Object.prototype.hasOwnProperty,O_={current:null},fL={key:!0,ref:!0,__self:!0,__source:!0};function mL(e,t,n){var a,r={},i=null,o=null;if(t!=null)for(a in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)uL.call(t,a)&&!fL.hasOwnProperty(a)&&(r[a]=t[a]);var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){for(var l=Array(c),d=0;d<c;d++)l[d]=arguments[d+2];r.children=l}if(e&&e.defaultProps)for(a in c=e.defaultProps,c)r[a]===void 0&&(r[a]=c[a]);return{$$typeof:Fp,type:e,key:i,ref:o,props:r,_owner:O_.current}}function QU(e,t){return{$$typeof:Fp,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function P_(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fp}function JU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var kk=/\/+/g;function t2(e,t){return typeof e=="object"&&e!==null&&e.key!=null?JU(""+e.key):t.toString(36)}function lg(e,t,n,a,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case Fp:case FU:o=!0}}if(o)return o=e,r=r(o),e=a===""?"."+t2(o,0):a,Sk(r)?(n="",e!=null&&(n=e.replace(kk,"$&/")+"/"),lg(r,t,n,"",function(d){return d})):r!=null&&(P_(r)&&(r=QU(r,n+(!r.key||o&&o.key===r.key?"":(""+r.key).replace(kk,"$&/")+"/")+e)),t.push(r)),1;if(o=0,a=a===""?".":a+":",Sk(e))for(var c=0;c<e.length;c++){i=e[c];var l=a+t2(i,c);o+=lg(i,t,n,l,r)}else if(l=ZU(e),typeof l=="function")for(e=l.call(e),c=0;!(i=e.next()).done;)i=i.value,l=a+t2(i,c++),o+=lg(i,t,n,l,r);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Zh(e,t,n){if(e==null)return e;var a=[],r=0;return lg(e,a,"","",function(i){return t.call(n,i,r++)}),a}function KU(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Cr={current:null},cg={transition:null},XU={ReactCurrentDispatcher:Cr,ReactCurrentBatchConfig:cg,ReactCurrentOwner:O_};function pL(){throw Error("act(...) is not supported in production builds of React.")}cn.Children={map:Zh,forEach:function(e,t,n){Zh(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Zh(e,function(){t++}),t},toArray:function(e){return Zh(e,function(t){return t})||[]},only:function(e){if(!P_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};cn.Component=Zu;cn.Fragment=$U;cn.Profiler=HU;cn.PureComponent=A_;cn.StrictMode=BU;cn.Suspense=YU;cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=XU;cn.act=pL;cn.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var a=lL({},e.props),r=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=O_.current),t.key!==void 0&&(r=""+t.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in t)uL.call(t,l)&&!fL.hasOwnProperty(l)&&(a[l]=t[l]===void 0&&c!==void 0?c[l]:t[l])}var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){c=Array(l);for(var d=0;d<l;d++)c[d]=arguments[d+2];a.children=c}return{$$typeof:Fp,type:e.type,key:r,ref:i,props:a,_owner:o}};cn.createContext=function(e){return e={$$typeof:VU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:UU,_context:e},e.Consumer=e};cn.createElement=mL;cn.createFactory=function(e){var t=mL.bind(null,e);return t.type=e,t};cn.createRef=function(){return{current:null}};cn.forwardRef=function(e){return{$$typeof:WU,render:e}};cn.isValidElement=P_;cn.lazy=function(e){return{$$typeof:qU,_payload:{_status:-1,_result:e},_init:KU}};cn.memo=function(e,t){return{$$typeof:GU,type:e,compare:t===void 0?null:t}};cn.startTransition=function(e){var t=cg.transition;cg.transition={};try{e()}finally{cg.transition=t}};cn.unstable_act=pL;cn.useCallback=function(e,t){return Cr.current.useCallback(e,t)};cn.useContext=function(e){return Cr.current.useContext(e)};cn.useDebugValue=function(){};cn.useDeferredValue=function(e){return Cr.current.useDeferredValue(e)};cn.useEffect=function(e,t){return Cr.current.useEffect(e,t)};cn.useId=function(){return Cr.current.useId()};cn.useImperativeHandle=function(e,t,n){return Cr.current.useImperativeHandle(e,t,n)};cn.useInsertionEffect=function(e,t){return Cr.current.useInsertionEffect(e,t)};cn.useLayoutEffect=function(e,t){return Cr.current.useLayoutEffect(e,t)};cn.useMemo=function(e,t){return Cr.current.useMemo(e,t)};cn.useReducer=function(e,t,n){return Cr.current.useReducer(e,t,n)};cn.useRef=function(e){return Cr.current.useRef(e)};cn.useState=function(e){return Cr.current.useState(e)};cn.useSyncExternalStore=function(e,t,n){return Cr.current.useSyncExternalStore(e,t,n)};cn.useTransition=function(){return Cr.current.useTransition()};cn.version="18.3.1";h.exports=cn;var R=h.exports,Ll=sL({__proto__:null,default:R},[h.exports]),Gv={},Rl={exports:{}},rs={},hL={exports:{}},gL={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(j,I){var B=j.length;j.push(I);e:for(;0<B;){var Y=B-1>>>1,U=j[Y];if(0<r(U,I))j[Y]=I,j[B]=U,B=Y;else break e}}function n(j){return j.length===0?null:j[0]}function a(j){if(j.length===0)return null;var I=j[0],B=j.pop();if(B!==I){j[0]=B;e:for(var Y=0,U=j.length,W=U>>>1;Y<W;){var V=2*(Y+1)-1,X=j[V],ne=V+1,oe=j[ne];if(0>r(X,B))ne<U&&0>r(oe,X)?(j[Y]=oe,j[ne]=B,Y=ne):(j[Y]=X,j[V]=B,Y=V);else if(ne<U&&0>r(oe,B))j[Y]=oe,j[ne]=B,Y=ne;else break e}}return I}function r(j,I){var B=j.sortIndex-I.sortIndex;return B!==0?B:j.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,c=o.now();e.unstable_now=function(){return o.now()-c}}var l=[],d=[],u=1,g=null,y=3,w=!1,v=!1,S=!1,m=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var I=n(d);I!==null;){if(I.callback===null)a(d);else if(I.startTime<=j)a(d),I.sortIndex=I.expirationTime,t(l,I);else break;I=n(d)}}function k(j){if(S=!1,x(j),!v)if(n(l)!==null)v=!0,H(N);else{var I=n(d);I!==null&&A(k,I.startTime-j)}}function N(j,I){v=!1,S&&(S=!1,p(E),E=-1),w=!0;var B=y;try{for(x(I),g=n(l);g!==null&&(!(g.expirationTime>I)||j&&!P());){var Y=g.callback;if(typeof Y=="function"){g.callback=null,y=g.priorityLevel;var U=Y(g.expirationTime<=I);I=e.unstable_now(),typeof U=="function"?g.callback=U:g===n(l)&&a(l),x(I)}else a(l);g=n(l)}if(g!==null)var W=!0;else{var V=n(d);V!==null&&A(k,V.startTime-I),W=!1}return W}finally{g=null,y=B,w=!1}}var _=!1,C=null,E=-1,T=5,D=-1;function P(){return!(e.unstable_now()-D<T)}function M(){if(C!==null){var j=e.unstable_now();D=j;var I=!0;try{I=C(!0,j)}finally{I?O():(_=!1,C=null)}}else _=!1}var O;if(typeof b=="function")O=function(){b(M)};else if(typeof MessageChannel!="undefined"){var F=new MessageChannel,z=F.port2;F.port1.onmessage=M,O=function(){z.postMessage(null)}}else O=function(){m(M,0)};function H(j){C=j,_||(_=!0,O())}function A(j,I){E=m(function(){j(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){v||w||(v=!0,H(N))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(y){case 1:case 2:case 3:var I=3;break;default:I=y}var B=y;y=I;try{return j()}finally{y=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,I){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var B=y;y=j;try{return I()}finally{y=B}},e.unstable_scheduleCallback=function(j,I,B){var Y=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Y+B:Y):B=Y,j){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=B+U,j={id:u++,callback:I,priorityLevel:j,startTime:B,expirationTime:U,sortIndex:-1},B>Y?(j.sortIndex=B,t(d,j),n(l)===null&&j===n(d)&&(S?(p(E),E=-1):S=!0,A(k,B-Y))):(j.sortIndex=U,t(l,j),v||w||(v=!0,H(N))),j},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(j){var I=y;return function(){var B=y;y=I;try{return j.apply(this,arguments)}finally{y=B}}}})(gL);hL.exports=gL;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var eV=h.exports,ts=hL.exports;function Ke(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var bL=new Set,Ym={};function zc(e,t){Nu(e,t),Nu(e+"Capture",t)}function Nu(e,t){for(Ym[e]=t,e=0;e<t.length;e++)bL.add(t[e])}var go=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),qv=Object.prototype.hasOwnProperty,tV=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ck={},Ek={};function nV(e){return qv.call(Ek,e)?!0:qv.call(Ck,e)?!1:tV.test(e)?Ek[e]=!0:(Ck[e]=!0,!1)}function aV(e,t,n,a){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function rV(e,t,n,a){if(t===null||typeof t=="undefined"||aV(e,t,n,a))return!0;if(a)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Er(e,t,n,a,r,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=r,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Qa={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qa[e]=new Er(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qa[t]=new Er(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qa[e]=new Er(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qa[e]=new Er(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Qa[e]=new Er(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qa[e]=new Er(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qa[e]=new Er(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qa[e]=new Er(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qa[e]=new Er(e,5,!1,e.toLowerCase(),null,!1,!1)});var R_=/[\-:]([a-z])/g;function j_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(R_,j_);Qa[t]=new Er(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(R_,j_);Qa[t]=new Er(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(R_,j_);Qa[t]=new Er(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qa[e]=new Er(e,1,!1,e.toLowerCase(),null,!1,!1)});Qa.xlinkHref=new Er("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qa[e]=new Er(e,1,!1,e.toLowerCase(),null,!0,!0)});function z_(e,t,n,a){var r=Qa.hasOwnProperty(t)?Qa[t]:null;(r!==null?r.type!==0:a||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(rV(t,n,r,a)&&(n=null),a||r===null?nV(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):r.mustUseProperty?e[r.propertyName]=n===null?r.type===3?!1:"":n:(t=r.attributeName,a=r.attributeNamespace,n===null?e.removeAttribute(t):(r=r.type,n=r===3||r===4&&n===!0?"":""+n,a?e.setAttributeNS(a,t,n):e.setAttribute(t,n))))}var ko=eV.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Qh=Symbol.for("react.element"),$d=Symbol.for("react.portal"),Bd=Symbol.for("react.fragment"),F_=Symbol.for("react.strict_mode"),Zv=Symbol.for("react.profiler"),yL=Symbol.for("react.provider"),xL=Symbol.for("react.context"),$_=Symbol.for("react.forward_ref"),Qv=Symbol.for("react.suspense"),Jv=Symbol.for("react.suspense_list"),B_=Symbol.for("react.memo"),Xo=Symbol.for("react.lazy"),wL=Symbol.for("react.offscreen"),Tk=Symbol.iterator;function Rf(e){return e===null||typeof e!="object"?null:(e=Tk&&e[Tk]||e["@@iterator"],typeof e=="function"?e:null)}var la=Object.assign,n2;function gm(e){if(n2===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);n2=t&&t[1]||""}return`
`+n2+e}var a2=!1;function r2(e,t){if(!e||a2)return"";a2=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var a=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){a=d}e.call(t.prototype)}else{try{throw Error()}catch(d){a=d}e()}}catch(d){if(d&&a&&typeof d.stack=="string"){for(var r=d.stack.split(`
`),i=a.stack.split(`
`),o=r.length-1,c=i.length-1;1<=o&&0<=c&&r[o]!==i[c];)c--;for(;1<=o&&0<=c;o--,c--)if(r[o]!==i[c]){if(o!==1||c!==1)do if(o--,c--,0>c||r[o]!==i[c]){var l=`
`+r[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=c);break}}}finally{a2=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?gm(e):""}function sV(e){switch(e.tag){case 5:return gm(e.type);case 16:return gm("Lazy");case 13:return gm("Suspense");case 19:return gm("SuspenseList");case 0:case 2:case 15:return e=r2(e.type,!1),e;case 11:return e=r2(e.type.render,!1),e;case 1:return e=r2(e.type,!0),e;default:return""}}function Kv(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Bd:return"Fragment";case $d:return"Portal";case Zv:return"Profiler";case F_:return"StrictMode";case Qv:return"Suspense";case Jv:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case xL:return(e.displayName||"Context")+".Consumer";case yL:return(e._context.displayName||"Context")+".Provider";case $_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B_:return t=e.displayName||null,t!==null?t:Kv(e.type)||"Memo";case Xo:t=e._payload,e=e._init;try{return Kv(e(t))}catch{}}return null}function iV(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Kv(t);case 8:return t===F_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Dl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vL(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function oV(e){var t=vL(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jh(e){e._valueTracker||(e._valueTracker=oV(e))}function _L(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=vL(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function $g(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch{return e.body}}function Xv(e,t){var n=t.checked;return la({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Lk(e,t){var n=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;n=Dl(t.value!=null?t.value:n),e._wrapperState={initialChecked:a,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NL(e,t){t=t.checked,t!=null&&z_(e,"checked",t,!1)}function e3(e,t){NL(e,t);var n=Dl(t.value),a=t.type;if(n!=null)a==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?t3(e,t.type,n):t.hasOwnProperty("defaultValue")&&t3(e,t.type,Dl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Dk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function t3(e,t,n){(t!=="number"||$g(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bm=Array.isArray;function iu(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Dl(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function n3(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ke(91));return la({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Mk(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(Ke(92));if(bm(n)){if(1<n.length)throw Error(Ke(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Dl(n)}}function SL(e,t){var n=Dl(t.value),a=Dl(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),a!=null&&(e.defaultValue=""+a)}function Ak(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function kL(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function a3(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?kL(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Kh,CL=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,a,r){MSApp.execUnsafeLocalFunction(function(){return e(t,n,a,r)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Kh=Kh||document.createElement("div"),Kh.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Kh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gm(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Sm={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lV=["Webkit","ms","Moz","O"];Object.keys(Sm).forEach(function(e){lV.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Sm[t]=Sm[e]})});function EL(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Sm.hasOwnProperty(e)&&Sm[e]?(""+t).trim():t+"px"}function TL(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var a=n.indexOf("--")===0,r=EL(n,t[n],a);n==="float"&&(n="cssFloat"),a?e.setProperty(n,r):e[n]=r}}var cV=la({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function r3(e,t){if(t){if(cV[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ke(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ke(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ke(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ke(62))}}function s3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var i3=null;function H_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var o3=null,ou=null,lu=null;function Ik(e){if(e=Hp(e)){if(typeof o3!="function")throw Error(Ke(280));var t=e.stateNode;t&&(t=Vb(t),o3(e.stateNode,e.type,t))}}function LL(e){ou?lu?lu.push(e):lu=[e]:ou=e}function DL(){if(ou){var e=ou,t=lu;if(lu=ou=null,Ik(e),t)for(e=0;e<t.length;e++)Ik(t[e])}}function ML(e,t){return e(t)}function AL(){}var s2=!1;function IL(e,t,n){if(s2)return e(t,n);s2=!0;try{return ML(e,t,n)}finally{s2=!1,(ou!==null||lu!==null)&&(AL(),DL())}}function qm(e,t){var n=e.stateNode;if(n===null)return null;var a=Vb(n);if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Ke(231,t,typeof n));return n}var l3=!1;if(go)try{var jf={};Object.defineProperty(jf,"passive",{get:function(){l3=!0}}),window.addEventListener("test",jf,jf),window.removeEventListener("test",jf,jf)}catch{l3=!1}function dV(e,t,n,a,r,i,o,c,l){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(u){this.onError(u)}}var km=!1,Bg=null,Hg=!1,c3=null,uV={onError:function(e){km=!0,Bg=e}};function fV(e,t,n,a,r,i,o,c,l){km=!1,Bg=null,dV.apply(uV,arguments)}function mV(e,t,n,a,r,i,o,c,l){if(fV.apply(this,arguments),km){if(km){var d=Bg;km=!1,Bg=null}else throw Error(Ke(198));Hg||(Hg=!0,c3=d)}}function Fc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function OL(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Ok(e){if(Fc(e)!==e)throw Error(Ke(188))}function pV(e){var t=e.alternate;if(!t){if(t=Fc(e),t===null)throw Error(Ke(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return Ok(r),e;if(i===a)return Ok(r),t;i=i.sibling}throw Error(Ke(188))}if(n.return!==a.return)n=r,a=i;else{for(var o=!1,c=r.child;c;){if(c===n){o=!0,n=r,a=i;break}if(c===a){o=!0,a=r,n=i;break}c=c.sibling}if(!o){for(c=i.child;c;){if(c===n){o=!0,n=i,a=r;break}if(c===a){o=!0,a=i,n=r;break}c=c.sibling}if(!o)throw Error(Ke(189))}}if(n.alternate!==a)throw Error(Ke(190))}if(n.tag!==3)throw Error(Ke(188));return n.stateNode.current===n?e:t}function PL(e){return e=pV(e),e!==null?RL(e):null}function RL(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=RL(e);if(t!==null)return t;e=e.sibling}return null}var jL=ts.unstable_scheduleCallback,Pk=ts.unstable_cancelCallback,hV=ts.unstable_shouldYield,gV=ts.unstable_requestPaint,ga=ts.unstable_now,bV=ts.unstable_getCurrentPriorityLevel,U_=ts.unstable_ImmediatePriority,zL=ts.unstable_UserBlockingPriority,Ug=ts.unstable_NormalPriority,yV=ts.unstable_LowPriority,FL=ts.unstable_IdlePriority,$b=null,Si=null;function xV(e){if(Si&&typeof Si.onCommitFiberRoot=="function")try{Si.onCommitFiberRoot($b,e,void 0,(e.current.flags&128)===128)}catch{}}var Zs=Math.clz32?Math.clz32:_V,wV=Math.log,vV=Math.LN2;function _V(e){return e>>>=0,e===0?32:31-(wV(e)/vV|0)|0}var Xh=64,e0=4194304;function ym(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vg(e,t){var n=e.pendingLanes;if(n===0)return 0;var a=0,r=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var c=o&~r;c!==0?a=ym(c):(i&=o,i!==0&&(a=ym(i)))}else o=n&~r,o!==0?a=ym(o):i!==0&&(a=ym(i));if(a===0)return 0;if(t!==0&&t!==a&&(t&r)===0&&(r=a&-a,i=t&-t,r>=i||r===16&&(i&4194240)!==0))return t;if((a&4)!==0&&(a|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=a;0<t;)n=31-Zs(t),r=1<<n,a|=e[n],t&=~r;return a}function NV(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function SV(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Zs(i),c=1<<o,l=r[o];l===-1?((c&n)===0||(c&a)!==0)&&(r[o]=NV(c,t)):l<=t&&(e.expiredLanes|=c),i&=~c}}function d3(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $L(){var e=Xh;return Xh<<=1,(Xh&4194240)===0&&(Xh=64),e}function i2(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $p(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zs(t),e[t]=n}function kV(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var a=e.eventTimes;for(e=e.expirationTimes;0<n;){var r=31-Zs(n),i=1<<r;t[r]=0,a[r]=-1,e[r]=-1,n&=~i}}function V_(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Zs(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}var Mn=0;function BL(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var HL,W_,UL,VL,WL,u3=!1,t0=[],gl=null,bl=null,yl=null,Zm=new Map,Qm=new Map,al=[],CV="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Rk(e,t){switch(e){case"focusin":case"focusout":gl=null;break;case"dragenter":case"dragleave":bl=null;break;case"mouseover":case"mouseout":yl=null;break;case"pointerover":case"pointerout":Zm.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qm.delete(t.pointerId)}}function zf(e,t,n,a,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[r]},t!==null&&(t=Hp(t),t!==null&&W_(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function EV(e,t,n,a,r){switch(t){case"focusin":return gl=zf(gl,e,t,n,a,r),!0;case"dragenter":return bl=zf(bl,e,t,n,a,r),!0;case"mouseover":return yl=zf(yl,e,t,n,a,r),!0;case"pointerover":var i=r.pointerId;return Zm.set(i,zf(Zm.get(i)||null,e,t,n,a,r)),!0;case"gotpointercapture":return i=r.pointerId,Qm.set(i,zf(Qm.get(i)||null,e,t,n,a,r)),!0}return!1}function YL(e){var t=uc(e.target);if(t!==null){var n=Fc(t);if(n!==null){if(t=n.tag,t===13){if(t=OL(n),t!==null){e.blockedOn=t,WL(e.priority,function(){UL(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function dg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=f3(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);i3=a,n.target.dispatchEvent(a),i3=null}else return t=Hp(n),t!==null&&W_(t),e.blockedOn=n,!1;t.shift()}return!0}function jk(e,t,n){dg(e)&&n.delete(t)}function TV(){u3=!1,gl!==null&&dg(gl)&&(gl=null),bl!==null&&dg(bl)&&(bl=null),yl!==null&&dg(yl)&&(yl=null),Zm.forEach(jk),Qm.forEach(jk)}function Ff(e,t){e.blockedOn===t&&(e.blockedOn=null,u3||(u3=!0,ts.unstable_scheduleCallback(ts.unstable_NormalPriority,TV)))}function Jm(e){function t(r){return Ff(r,e)}if(0<t0.length){Ff(t0[0],e);for(var n=1;n<t0.length;n++){var a=t0[n];a.blockedOn===e&&(a.blockedOn=null)}}for(gl!==null&&Ff(gl,e),bl!==null&&Ff(bl,e),yl!==null&&Ff(yl,e),Zm.forEach(t),Qm.forEach(t),n=0;n<al.length;n++)a=al[n],a.blockedOn===e&&(a.blockedOn=null);for(;0<al.length&&(n=al[0],n.blockedOn===null);)YL(n),n.blockedOn===null&&al.shift()}var cu=ko.ReactCurrentBatchConfig,Wg=!0;function LV(e,t,n,a){var r=Mn,i=cu.transition;cu.transition=null;try{Mn=1,Y_(e,t,n,a)}finally{Mn=r,cu.transition=i}}function DV(e,t,n,a){var r=Mn,i=cu.transition;cu.transition=null;try{Mn=4,Y_(e,t,n,a)}finally{Mn=r,cu.transition=i}}function Y_(e,t,n,a){if(Wg){var r=f3(e,t,n,a);if(r===null)g2(e,t,a,Yg,n),Rk(e,a);else if(EV(r,e,t,n,a))a.stopPropagation();else if(Rk(e,a),t&4&&-1<CV.indexOf(e)){for(;r!==null;){var i=Hp(r);if(i!==null&&HL(i),i=f3(e,t,n,a),i===null&&g2(e,t,a,Yg,n),i===r)break;r=i}r!==null&&a.stopPropagation()}else g2(e,t,a,null,n)}}var Yg=null;function f3(e,t,n,a){if(Yg=null,e=H_(a),e=uc(e),e!==null)if(t=Fc(e),t===null)e=null;else if(n=t.tag,n===13){if(e=OL(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yg=e,null}function GL(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(bV()){case U_:return 1;case zL:return 4;case Ug:case yV:return 16;case FL:return 536870912;default:return 16}default:return 16}}var il=null,G_=null,ug=null;function qL(){if(ug)return ug;var e,t=G_,n=t.length,a,r="value"in il?il.value:il.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===r[i-a];a++);return ug=r.slice(e,1<a?1-a:void 0)}function fg(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function n0(){return!0}function zk(){return!1}function ss(e){function t(n,a,r,i,o){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?n0:zk,this.isPropagationStopped=zk,this}return la(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=n0)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=n0)},persist:function(){},isPersistent:n0}),t}var Qu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},q_=ss(Qu),Bp=la({},Qu,{view:0,detail:0}),MV=ss(Bp),o2,l2,$f,Bb=la({},Bp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Z_,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==$f&&($f&&e.type==="mousemove"?(o2=e.screenX-$f.screenX,l2=e.screenY-$f.screenY):l2=o2=0,$f=e),o2)},movementY:function(e){return"movementY"in e?e.movementY:l2}}),Fk=ss(Bb),AV=la({},Bb,{dataTransfer:0}),IV=ss(AV),OV=la({},Bp,{relatedTarget:0}),c2=ss(OV),PV=la({},Qu,{animationName:0,elapsedTime:0,pseudoElement:0}),RV=ss(PV),jV=la({},Qu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zV=ss(jV),FV=la({},Qu,{data:0}),$k=ss(FV),$V={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},BV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},HV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function UV(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=HV[e])?!!t[e]:!1}function Z_(){return UV}var VV=la({},Bp,{key:function(e){if(e.key){var t=$V[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?BV[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Z_,charCode:function(e){return e.type==="keypress"?fg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),WV=ss(VV),YV=la({},Bb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bk=ss(YV),GV=la({},Bp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Z_}),qV=ss(GV),ZV=la({},Qu,{propertyName:0,elapsedTime:0,pseudoElement:0}),QV=ss(ZV),JV=la({},Bb,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),KV=ss(JV),XV=[9,13,27,32],Q_=go&&"CompositionEvent"in window,Cm=null;go&&"documentMode"in document&&(Cm=document.documentMode);var eW=go&&"TextEvent"in window&&!Cm,ZL=go&&(!Q_||Cm&&8<Cm&&11>=Cm),Hk=String.fromCharCode(32),Uk=!1;function QL(e,t){switch(e){case"keyup":return XV.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function JL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hd=!1;function tW(e,t){switch(e){case"compositionend":return JL(t);case"keypress":return t.which!==32?null:(Uk=!0,Hk);case"textInput":return e=t.data,e===Hk&&Uk?null:e;default:return null}}function nW(e,t){if(Hd)return e==="compositionend"||!Q_&&QL(e,t)?(e=qL(),ug=G_=il=null,Hd=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ZL&&t.locale!=="ko"?null:t.data;default:return null}}var aW={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Vk(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!aW[e.type]:t==="textarea"}function KL(e,t,n,a){LL(a),t=Gg(t,"onChange"),0<t.length&&(n=new q_("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Em=null,Km=null;function rW(e){cD(e,0)}function Hb(e){var t=Wd(e);if(_L(t))return e}function sW(e,t){if(e==="change")return t}var XL=!1;if(go){var d2;if(go){var u2="oninput"in document;if(!u2){var Wk=document.createElement("div");Wk.setAttribute("oninput","return;"),u2=typeof Wk.oninput=="function"}d2=u2}else d2=!1;XL=d2&&(!document.documentMode||9<document.documentMode)}function Yk(){Em&&(Em.detachEvent("onpropertychange",eD),Km=Em=null)}function eD(e){if(e.propertyName==="value"&&Hb(Km)){var t=[];KL(t,Km,e,H_(e)),IL(rW,t)}}function iW(e,t,n){e==="focusin"?(Yk(),Em=t,Km=n,Em.attachEvent("onpropertychange",eD)):e==="focusout"&&Yk()}function oW(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hb(Km)}function lW(e,t){if(e==="click")return Hb(t)}function cW(e,t){if(e==="input"||e==="change")return Hb(t)}function dW(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ni=typeof Object.is=="function"?Object.is:dW;function Xm(e,t){if(ni(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!qv.call(t,r)||!ni(e[r],t[r]))return!1}return!0}function Gk(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qk(e,t){var n=Gk(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gk(n)}}function tD(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?tD(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function nD(){for(var e=window,t=$g();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$g(e.document)}return t}function J_(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function uW(e){var t=nD(),n=e.focusedElem,a=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&tD(n.ownerDocument.documentElement,n)){if(a!==null&&J_(n)){if(t=a.start,e=a.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var r=n.textContent.length,i=Math.min(a.start,r);a=a.end===void 0?i:Math.min(a.end,r),!e.extend&&i>a&&(r=a,a=i,i=r),r=qk(n,i);var o=qk(n,a);r&&o&&(e.rangeCount!==1||e.anchorNode!==r.node||e.anchorOffset!==r.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(r.node,r.offset),e.removeAllRanges(),i>a?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fW=go&&"documentMode"in document&&11>=document.documentMode,Ud=null,m3=null,Tm=null,p3=!1;function Zk(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;p3||Ud==null||Ud!==$g(a)||(a=Ud,"selectionStart"in a&&J_(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Tm&&Xm(Tm,a)||(Tm=a,a=Gg(m3,"onSelect"),0<a.length&&(t=new q_("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Ud)))}function a0(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vd={animationend:a0("Animation","AnimationEnd"),animationiteration:a0("Animation","AnimationIteration"),animationstart:a0("Animation","AnimationStart"),transitionend:a0("Transition","TransitionEnd")},f2={},aD={};go&&(aD=document.createElement("div").style,"AnimationEvent"in window||(delete Vd.animationend.animation,delete Vd.animationiteration.animation,delete Vd.animationstart.animation),"TransitionEvent"in window||delete Vd.transitionend.transition);function Ub(e){if(f2[e])return f2[e];if(!Vd[e])return e;var t=Vd[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in aD)return f2[e]=t[n];return e}var rD=Ub("animationend"),sD=Ub("animationiteration"),iD=Ub("animationstart"),oD=Ub("transitionend"),lD=new Map,Qk="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function jl(e,t){lD.set(e,t),zc(t,[e])}for(var m2=0;m2<Qk.length;m2++){var p2=Qk[m2],mW=p2.toLowerCase(),pW=p2[0].toUpperCase()+p2.slice(1);jl(mW,"on"+pW)}jl(rD,"onAnimationEnd");jl(sD,"onAnimationIteration");jl(iD,"onAnimationStart");jl("dblclick","onDoubleClick");jl("focusin","onFocus");jl("focusout","onBlur");jl(oD,"onTransitionEnd");Nu("onMouseEnter",["mouseout","mouseover"]);Nu("onMouseLeave",["mouseout","mouseover"]);Nu("onPointerEnter",["pointerout","pointerover"]);Nu("onPointerLeave",["pointerout","pointerover"]);zc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));zc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));zc("onBeforeInput",["compositionend","keypress","textInput","paste"]);zc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));zc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));zc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xm="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),hW=new Set("cancel close invalid load scroll toggle".split(" ").concat(xm));function Jk(e,t,n){var a=e.type||"unknown-event";e.currentTarget=n,mV(a,t,void 0,e),e.currentTarget=null}function cD(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var c=a[o],l=c.instance,d=c.currentTarget;if(c=c.listener,l!==i&&r.isPropagationStopped())break e;Jk(r,c,d),i=l}else for(o=0;o<a.length;o++){if(c=a[o],l=c.instance,d=c.currentTarget,c=c.listener,l!==i&&r.isPropagationStopped())break e;Jk(r,c,d),i=l}}}if(Hg)throw e=c3,Hg=!1,c3=null,e}function Yn(e,t){var n=t[x3];n===void 0&&(n=t[x3]=new Set);var a=e+"__bubble";n.has(a)||(dD(t,e,2,!1),n.add(a))}function h2(e,t,n){var a=0;t&&(a|=4),dD(n,e,a,t)}var r0="_reactListening"+Math.random().toString(36).slice(2);function ep(e){if(!e[r0]){e[r0]=!0,bL.forEach(function(n){n!=="selectionchange"&&(hW.has(n)||h2(n,!1,e),h2(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[r0]||(t[r0]=!0,h2("selectionchange",!1,t))}}function dD(e,t,n,a){switch(GL(t)){case 1:var r=LV;break;case 4:r=DV;break;default:r=Y_}n=r.bind(null,t,n,e),r=void 0,!l3||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function g2(e,t,n,a,r){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var c=a.stateNode.containerInfo;if(c===r||c.nodeType===8&&c.parentNode===r)break;if(o===4)for(o=a.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===r||l.nodeType===8&&l.parentNode===r))return;o=o.return}for(;c!==null;){if(o=uc(c),o===null)return;if(l=o.tag,l===5||l===6){a=i=o;continue e}c=c.parentNode}}a=a.return}IL(function(){var d=i,u=H_(n),g=[];e:{var y=lD.get(e);if(y!==void 0){var w=q_,v=e;switch(e){case"keypress":if(fg(n)===0)break e;case"keydown":case"keyup":w=WV;break;case"focusin":v="focus",w=c2;break;case"focusout":v="blur",w=c2;break;case"beforeblur":case"afterblur":w=c2;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":w=Fk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":w=IV;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":w=qV;break;case rD:case sD:case iD:w=RV;break;case oD:w=QV;break;case"scroll":w=MV;break;case"wheel":w=KV;break;case"copy":case"cut":case"paste":w=zV;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":w=Bk}var S=(t&4)!==0,m=!S&&e==="scroll",p=S?y!==null?y+"Capture":null:y;S=[];for(var b=d,x;b!==null;){x=b;var k=x.stateNode;if(x.tag===5&&k!==null&&(x=k,p!==null&&(k=qm(b,p),k!=null&&S.push(tp(b,k,x)))),m)break;b=b.return}0<S.length&&(y=new w(y,v,null,n,u),g.push({event:y,listeners:S}))}}if((t&7)===0){e:{if(y=e==="mouseover"||e==="pointerover",w=e==="mouseout"||e==="pointerout",y&&n!==i3&&(v=n.relatedTarget||n.fromElement)&&(uc(v)||v[bo]))break e;if((w||y)&&(y=u.window===u?u:(y=u.ownerDocument)?y.defaultView||y.parentWindow:window,w?(v=n.relatedTarget||n.toElement,w=d,v=v?uc(v):null,v!==null&&(m=Fc(v),v!==m||v.tag!==5&&v.tag!==6)&&(v=null)):(w=null,v=d),w!==v)){if(S=Fk,k="onMouseLeave",p="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(S=Bk,k="onPointerLeave",p="onPointerEnter",b="pointer"),m=w==null?y:Wd(w),x=v==null?y:Wd(v),y=new S(k,b+"leave",w,n,u),y.target=m,y.relatedTarget=x,k=null,uc(u)===d&&(S=new S(p,b+"enter",v,n,u),S.target=x,S.relatedTarget=m,k=S),m=k,w&&v)t:{for(S=w,p=v,b=0,x=S;x;x=dd(x))b++;for(x=0,k=p;k;k=dd(k))x++;for(;0<b-x;)S=dd(S),b--;for(;0<x-b;)p=dd(p),x--;for(;b--;){if(S===p||p!==null&&S===p.alternate)break t;S=dd(S),p=dd(p)}S=null}else S=null;w!==null&&Kk(g,y,w,S,!1),v!==null&&m!==null&&Kk(g,m,v,S,!0)}}e:{if(y=d?Wd(d):window,w=y.nodeName&&y.nodeName.toLowerCase(),w==="select"||w==="input"&&y.type==="file")var N=sW;else if(Vk(y))if(XL)N=cW;else{N=oW;var _=iW}else(w=y.nodeName)&&w.toLowerCase()==="input"&&(y.type==="checkbox"||y.type==="radio")&&(N=lW);if(N&&(N=N(e,d))){KL(g,N,n,u);break e}_&&_(e,y,d),e==="focusout"&&(_=y._wrapperState)&&_.controlled&&y.type==="number"&&t3(y,"number",y.value)}switch(_=d?Wd(d):window,e){case"focusin":(Vk(_)||_.contentEditable==="true")&&(Ud=_,m3=d,Tm=null);break;case"focusout":Tm=m3=Ud=null;break;case"mousedown":p3=!0;break;case"contextmenu":case"mouseup":case"dragend":p3=!1,Zk(g,n,u);break;case"selectionchange":if(fW)break;case"keydown":case"keyup":Zk(g,n,u)}var C;if(Q_)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else Hd?QL(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(ZL&&n.locale!=="ko"&&(Hd||E!=="onCompositionStart"?E==="onCompositionEnd"&&Hd&&(C=qL()):(il=u,G_="value"in il?il.value:il.textContent,Hd=!0)),_=Gg(d,E),0<_.length&&(E=new $k(E,e,null,n,u),g.push({event:E,listeners:_}),C?E.data=C:(C=JL(n),C!==null&&(E.data=C)))),(C=eW?tW(e,n):nW(e,n))&&(d=Gg(d,"onBeforeInput"),0<d.length&&(u=new $k("onBeforeInput","beforeinput",null,n,u),g.push({event:u,listeners:d}),u.data=C))}cD(g,t)})}function tp(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Gg(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,i=r.stateNode;r.tag===5&&i!==null&&(r=i,i=qm(e,n),i!=null&&a.unshift(tp(e,i,r)),i=qm(e,t),i!=null&&a.push(tp(e,i,r))),e=e.return}return a}function dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Kk(e,t,n,a,r){for(var i=t._reactName,o=[];n!==null&&n!==a;){var c=n,l=c.alternate,d=c.stateNode;if(l!==null&&l===a)break;c.tag===5&&d!==null&&(c=d,r?(l=qm(n,i),l!=null&&o.unshift(tp(n,l,c))):r||(l=qm(n,i),l!=null&&o.push(tp(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var gW=/\r\n?/g,bW=/\u0000|\uFFFD/g;function Xk(e){return(typeof e=="string"?e:""+e).replace(gW,`
`).replace(bW,"")}function s0(e,t,n){if(t=Xk(t),Xk(e)!==t&&n)throw Error(Ke(425))}function qg(){}var h3=null,g3=null;function b3(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var y3=typeof setTimeout=="function"?setTimeout:void 0,yW=typeof clearTimeout=="function"?clearTimeout:void 0,eC=typeof Promise=="function"?Promise:void 0,xW=typeof queueMicrotask=="function"?queueMicrotask:typeof eC!="undefined"?function(e){return eC.resolve(null).then(e).catch(wW)}:y3;function wW(e){setTimeout(function(){throw e})}function b2(e,t){var n=t,a=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(a===0){e.removeChild(r),Jm(t);return}a--}else n!=="$"&&n!=="$?"&&n!=="$!"||a++;n=r}while(n);Jm(t)}function xl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function tC(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ju=Math.random().toString(36).slice(2),yi="__reactFiber$"+Ju,np="__reactProps$"+Ju,bo="__reactContainer$"+Ju,x3="__reactEvents$"+Ju,vW="__reactListeners$"+Ju,_W="__reactHandles$"+Ju;function uc(e){var t=e[yi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[bo]||n[yi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=tC(e);e!==null;){if(n=e[yi])return n;e=tC(e)}return t}e=n,n=e.parentNode}return null}function Hp(e){return e=e[yi]||e[bo],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wd(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ke(33))}function Vb(e){return e[np]||null}var w3=[],Yd=-1;function zl(e){return{current:e}}function Zn(e){0>Yd||(e.current=w3[Yd],w3[Yd]=null,Yd--)}function Un(e,t){Yd++,w3[Yd]=e.current,e.current=t}var Ml={},or=zl(Ml),Ir=zl(!1),Cc=Ml;function Su(e,t){var n=e.type.contextTypes;if(!n)return Ml;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var r={},i;for(i in n)r[i]=t[i];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=r),r}function Or(e){return e=e.childContextTypes,e!=null}function Zg(){Zn(Ir),Zn(or)}function nC(e,t,n){if(or.current!==Ml)throw Error(Ke(168));Un(or,t),Un(Ir,n)}function uD(e,t,n){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return n;a=a.getChildContext();for(var r in a)if(!(r in t))throw Error(Ke(108,iV(e)||"Unknown",r));return la({},n,a)}function Qg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ml,Cc=or.current,Un(or,e),Un(Ir,Ir.current),!0}function aC(e,t,n){var a=e.stateNode;if(!a)throw Error(Ke(169));n?(e=uD(e,t,Cc),a.__reactInternalMemoizedMergedChildContext=e,Zn(Ir),Zn(or),Un(or,e)):Zn(Ir),Un(Ir,n)}var Xi=null,Wb=!1,y2=!1;function fD(e){Xi===null?Xi=[e]:Xi.push(e)}function NW(e){Wb=!0,fD(e)}function Fl(){if(!y2&&Xi!==null){y2=!0;var e=0,t=Mn;try{var n=Xi;for(Mn=1;e<n.length;e++){var a=n[e];do a=a(!0);while(a!==null)}Xi=null,Wb=!1}catch(r){throw Xi!==null&&(Xi=Xi.slice(e+1)),jL(U_,Fl),r}finally{Mn=t,y2=!1}}return null}var Gd=[],qd=0,Jg=null,Kg=0,ys=[],xs=0,Ec=null,ao=1,ro="";function rc(e,t){Gd[qd++]=Kg,Gd[qd++]=Jg,Jg=e,Kg=t}function mD(e,t,n){ys[xs++]=ao,ys[xs++]=ro,ys[xs++]=Ec,Ec=e;var a=ao;e=ro;var r=32-Zs(a)-1;a&=~(1<<r),n+=1;var i=32-Zs(t)+r;if(30<i){var o=r-r%5;i=(a&(1<<o)-1).toString(32),a>>=o,r-=o,ao=1<<32-Zs(t)+r|n<<r|a,ro=i+e}else ao=1<<i|n<<r|a,ro=e}function K_(e){e.return!==null&&(rc(e,1),mD(e,1,0))}function X_(e){for(;e===Jg;)Jg=Gd[--qd],Gd[qd]=null,Kg=Gd[--qd],Gd[qd]=null;for(;e===Ec;)Ec=ys[--xs],ys[xs]=null,ro=ys[--xs],ys[xs]=null,ao=ys[--xs],ys[xs]=null}var Xr=null,qr=null,ta=!1,Ws=null;function pD(e,t){var n=Ns(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function rC(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Xr=e,qr=xl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Xr=e,qr=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ec!==null?{id:ao,overflow:ro}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ns(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Xr=e,qr=null,!0):!1;default:return!1}}function v3(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _3(e){if(ta){var t=qr;if(t){var n=t;if(!rC(e,t)){if(v3(e))throw Error(Ke(418));t=xl(n.nextSibling);var a=Xr;t&&rC(e,t)?pD(a,n):(e.flags=e.flags&-4097|2,ta=!1,Xr=e)}}else{if(v3(e))throw Error(Ke(418));e.flags=e.flags&-4097|2,ta=!1,Xr=e}}}function sC(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Xr=e}function i0(e){if(e!==Xr)return!1;if(!ta)return sC(e),ta=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!b3(e.type,e.memoizedProps)),t&&(t=qr)){if(v3(e))throw hD(),Error(Ke(418));for(;t;)pD(e,t),t=xl(t.nextSibling)}if(sC(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ke(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){qr=xl(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}qr=null}}else qr=Xr?xl(e.stateNode.nextSibling):null;return!0}function hD(){for(var e=qr;e;)e=xl(e.nextSibling)}function ku(){qr=Xr=null,ta=!1}function e6(e){Ws===null?Ws=[e]:Ws.push(e)}var SW=ko.ReactCurrentBatchConfig;function Bf(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ke(309));var a=n.stateNode}if(!a)throw Error(Ke(147,e));var r=a,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var c=r.refs;o===null?delete c[i]:c[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(Ke(284));if(!n._owner)throw Error(Ke(290,e))}return e}function o0(e,t){throw e=Object.prototype.toString.call(t),Error(Ke(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function iC(e){var t=e._init;return t(e._payload)}function gD(e){function t(p,b){if(e){var x=p.deletions;x===null?(p.deletions=[b],p.flags|=16):x.push(b)}}function n(p,b){if(!e)return null;for(;b!==null;)t(p,b),b=b.sibling;return null}function a(p,b){for(p=new Map;b!==null;)b.key!==null?p.set(b.key,b):p.set(b.index,b),b=b.sibling;return p}function r(p,b){return p=Nl(p,b),p.index=0,p.sibling=null,p}function i(p,b,x){return p.index=x,e?(x=p.alternate,x!==null?(x=x.index,x<b?(p.flags|=2,b):x):(p.flags|=2,b)):(p.flags|=1048576,b)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function c(p,b,x,k){return b===null||b.tag!==6?(b=k2(x,p.mode,k),b.return=p,b):(b=r(b,x),b.return=p,b)}function l(p,b,x,k){var N=x.type;return N===Bd?u(p,b,x.props.children,k,x.key):b!==null&&(b.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Xo&&iC(N)===b.type)?(k=r(b,x.props),k.ref=Bf(p,b,x),k.return=p,k):(k=xg(x.type,x.key,x.props,null,p.mode,k),k.ref=Bf(p,b,x),k.return=p,k)}function d(p,b,x,k){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=C2(x,p.mode,k),b.return=p,b):(b=r(b,x.children||[]),b.return=p,b)}function u(p,b,x,k,N){return b===null||b.tag!==7?(b=vc(x,p.mode,k,N),b.return=p,b):(b=r(b,x),b.return=p,b)}function g(p,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=k2(""+b,p.mode,x),b.return=p,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Qh:return x=xg(b.type,b.key,b.props,null,p.mode,x),x.ref=Bf(p,null,b),x.return=p,x;case $d:return b=C2(b,p.mode,x),b.return=p,b;case Xo:var k=b._init;return g(p,k(b._payload),x)}if(bm(b)||Rf(b))return b=vc(b,p.mode,x,null),b.return=p,b;o0(p,b)}return null}function y(p,b,x,k){var N=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return N!==null?null:c(p,b,""+x,k);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Qh:return x.key===N?l(p,b,x,k):null;case $d:return x.key===N?d(p,b,x,k):null;case Xo:return N=x._init,y(p,b,N(x._payload),k)}if(bm(x)||Rf(x))return N!==null?null:u(p,b,x,k,null);o0(p,x)}return null}function w(p,b,x,k,N){if(typeof k=="string"&&k!==""||typeof k=="number")return p=p.get(x)||null,c(b,p,""+k,N);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Qh:return p=p.get(k.key===null?x:k.key)||null,l(b,p,k,N);case $d:return p=p.get(k.key===null?x:k.key)||null,d(b,p,k,N);case Xo:var _=k._init;return w(p,b,x,_(k._payload),N)}if(bm(k)||Rf(k))return p=p.get(x)||null,u(b,p,k,N,null);o0(b,k)}return null}function v(p,b,x,k){for(var N=null,_=null,C=b,E=b=0,T=null;C!==null&&E<x.length;E++){C.index>E?(T=C,C=null):T=C.sibling;var D=y(p,C,x[E],k);if(D===null){C===null&&(C=T);break}e&&C&&D.alternate===null&&t(p,C),b=i(D,b,E),_===null?N=D:_.sibling=D,_=D,C=T}if(E===x.length)return n(p,C),ta&&rc(p,E),N;if(C===null){for(;E<x.length;E++)C=g(p,x[E],k),C!==null&&(b=i(C,b,E),_===null?N=C:_.sibling=C,_=C);return ta&&rc(p,E),N}for(C=a(p,C);E<x.length;E++)T=w(C,p,E,x[E],k),T!==null&&(e&&T.alternate!==null&&C.delete(T.key===null?E:T.key),b=i(T,b,E),_===null?N=T:_.sibling=T,_=T);return e&&C.forEach(function(P){return t(p,P)}),ta&&rc(p,E),N}function S(p,b,x,k){var N=Rf(x);if(typeof N!="function")throw Error(Ke(150));if(x=N.call(x),x==null)throw Error(Ke(151));for(var _=N=null,C=b,E=b=0,T=null,D=x.next();C!==null&&!D.done;E++,D=x.next()){C.index>E?(T=C,C=null):T=C.sibling;var P=y(p,C,D.value,k);if(P===null){C===null&&(C=T);break}e&&C&&P.alternate===null&&t(p,C),b=i(P,b,E),_===null?N=P:_.sibling=P,_=P,C=T}if(D.done)return n(p,C),ta&&rc(p,E),N;if(C===null){for(;!D.done;E++,D=x.next())D=g(p,D.value,k),D!==null&&(b=i(D,b,E),_===null?N=D:_.sibling=D,_=D);return ta&&rc(p,E),N}for(C=a(p,C);!D.done;E++,D=x.next())D=w(C,p,E,D.value,k),D!==null&&(e&&D.alternate!==null&&C.delete(D.key===null?E:D.key),b=i(D,b,E),_===null?N=D:_.sibling=D,_=D);return e&&C.forEach(function(M){return t(p,M)}),ta&&rc(p,E),N}function m(p,b,x,k){if(typeof x=="object"&&x!==null&&x.type===Bd&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Qh:e:{for(var N=x.key,_=b;_!==null;){if(_.key===N){if(N=x.type,N===Bd){if(_.tag===7){n(p,_.sibling),b=r(_,x.props.children),b.return=p,p=b;break e}}else if(_.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Xo&&iC(N)===_.type){n(p,_.sibling),b=r(_,x.props),b.ref=Bf(p,_,x),b.return=p,p=b;break e}n(p,_);break}else t(p,_);_=_.sibling}x.type===Bd?(b=vc(x.props.children,p.mode,k,x.key),b.return=p,p=b):(k=xg(x.type,x.key,x.props,null,p.mode,k),k.ref=Bf(p,b,x),k.return=p,p=k)}return o(p);case $d:e:{for(_=x.key;b!==null;){if(b.key===_)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(p,b.sibling),b=r(b,x.children||[]),b.return=p,p=b;break e}else{n(p,b);break}else t(p,b);b=b.sibling}b=C2(x,p.mode,k),b.return=p,p=b}return o(p);case Xo:return _=x._init,m(p,b,_(x._payload),k)}if(bm(x))return v(p,b,x,k);if(Rf(x))return S(p,b,x,k);o0(p,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(p,b.sibling),b=r(b,x),b.return=p,p=b):(n(p,b),b=k2(x,p.mode,k),b.return=p,p=b),o(p)):n(p,b)}return m}var Cu=gD(!0),bD=gD(!1),Xg=zl(null),e1=null,Zd=null,t6=null;function n6(){t6=Zd=e1=null}function a6(e){var t=Xg.current;Zn(Xg),e._currentValue=t}function N3(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function du(e,t){e1=e,t6=Zd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ar=!0),e.firstContext=null)}function Es(e){var t=e._currentValue;if(t6!==e)if(e={context:e,memoizedValue:t,next:null},Zd===null){if(e1===null)throw Error(Ke(308));Zd=e,e1.dependencies={lanes:0,firstContext:e}}else Zd=Zd.next=e;return t}var fc=null;function r6(e){fc===null?fc=[e]:fc.push(e)}function yD(e,t,n,a){var r=t.interleaved;return r===null?(n.next=n,r6(t)):(n.next=r.next,r.next=n),t.interleaved=n,yo(e,a)}function yo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var el=!1;function s6(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xD(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wl(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(wn&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,yo(e,n)}return r=a.interleaved,r===null?(t.next=t,r6(a)):(t.next=r.next,r.next=t),a.interleaved=t,yo(e,n)}function mg(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,V_(e,n)}}function oC(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?r=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:a.shared,effects:a.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function t1(e,t,n,a){var r=e.updateQueue;el=!1;var i=r.firstBaseUpdate,o=r.lastBaseUpdate,c=r.shared.pending;if(c!==null){r.shared.pending=null;var l=c,d=l.next;l.next=null,o===null?i=d:o.next=d,o=l;var u=e.alternate;u!==null&&(u=u.updateQueue,c=u.lastBaseUpdate,c!==o&&(c===null?u.firstBaseUpdate=d:c.next=d,u.lastBaseUpdate=l))}if(i!==null){var g=r.baseState;o=0,u=d=l=null,c=i;do{var y=c.lane,w=c.eventTime;if((a&y)===y){u!==null&&(u=u.next={eventTime:w,lane:0,tag:c.tag,payload:c.payload,callback:c.callback,next:null});e:{var v=e,S=c;switch(y=t,w=n,S.tag){case 1:if(v=S.payload,typeof v=="function"){g=v.call(w,g,y);break e}g=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=S.payload,y=typeof v=="function"?v.call(w,g,y):v,y==null)break e;g=la({},g,y);break e;case 2:el=!0}}c.callback!==null&&c.lane!==0&&(e.flags|=64,y=r.effects,y===null?r.effects=[c]:y.push(c))}else w={eventTime:w,lane:y,tag:c.tag,payload:c.payload,callback:c.callback,next:null},u===null?(d=u=w,l=g):u=u.next=w,o|=y;if(c=c.next,c===null){if(c=r.shared.pending,c===null)break;y=c,c=y.next,y.next=null,r.lastBaseUpdate=y,r.shared.pending=null}}while(1);if(u===null&&(l=g),r.baseState=l,r.firstBaseUpdate=d,r.lastBaseUpdate=u,t=r.shared.interleaved,t!==null){r=t;do o|=r.lane,r=r.next;while(r!==t)}else i===null&&(r.shared.lanes=0);Lc|=o,e.lanes=o,e.memoizedState=g}}function lC(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var a=e[t],r=a.callback;if(r!==null){if(a.callback=null,a=n,typeof r!="function")throw Error(Ke(191,r));r.call(a)}}}var Up={},ki=zl(Up),ap=zl(Up),rp=zl(Up);function mc(e){if(e===Up)throw Error(Ke(174));return e}function i6(e,t){switch(Un(rp,t),Un(ap,e),Un(ki,Up),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:a3(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=a3(t,e)}Zn(ki),Un(ki,t)}function Eu(){Zn(ki),Zn(ap),Zn(rp)}function wD(e){mc(rp.current);var t=mc(ki.current),n=a3(t,e.type);t!==n&&(Un(ap,e),Un(ki,n))}function o6(e){ap.current===e&&(Zn(ki),Zn(ap))}var sa=zl(0);function n1(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var x2=[];function l6(){for(var e=0;e<x2.length;e++)x2[e]._workInProgressVersionPrimary=null;x2.length=0}var pg=ko.ReactCurrentDispatcher,w2=ko.ReactCurrentBatchConfig,Tc=0,ia=null,La=null,Ra=null,a1=!1,Lm=!1,sp=0,kW=0;function er(){throw Error(Ke(321))}function c6(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ni(e[n],t[n]))return!1;return!0}function d6(e,t,n,a,r,i){if(Tc=i,ia=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pg.current=e===null||e.memoizedState===null?LW:DW,e=n(a,r),Lm){i=0;do{if(Lm=!1,sp=0,25<=i)throw Error(Ke(301));i+=1,Ra=La=null,t.updateQueue=null,pg.current=MW,e=n(a,r)}while(Lm)}if(pg.current=r1,t=La!==null&&La.next!==null,Tc=0,Ra=La=ia=null,a1=!1,t)throw Error(Ke(300));return e}function u6(){var e=sp!==0;return sp=0,e}function pi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ra===null?ia.memoizedState=Ra=e:Ra=Ra.next=e,Ra}function Ts(){if(La===null){var e=ia.alternate;e=e!==null?e.memoizedState:null}else e=La.next;var t=Ra===null?ia.memoizedState:Ra.next;if(t!==null)Ra=t,La=e;else{if(e===null)throw Error(Ke(310));La=e,e={memoizedState:La.memoizedState,baseState:La.baseState,baseQueue:La.baseQueue,queue:La.queue,next:null},Ra===null?ia.memoizedState=Ra=e:Ra=Ra.next=e}return Ra}function ip(e,t){return typeof t=="function"?t(e):t}function v2(e){var t=Ts(),n=t.queue;if(n===null)throw Error(Ke(311));n.lastRenderedReducer=e;var a=La,r=a.baseQueue,i=n.pending;if(i!==null){if(r!==null){var o=r.next;r.next=i.next,i.next=o}a.baseQueue=r=i,n.pending=null}if(r!==null){i=r.next,a=a.baseState;var c=o=null,l=null,d=i;do{var u=d.lane;if((Tc&u)===u)l!==null&&(l=l.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),a=d.hasEagerState?d.eagerState:e(a,d.action);else{var g={lane:u,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};l===null?(c=l=g,o=a):l=l.next=g,ia.lanes|=u,Lc|=u}d=d.next}while(d!==null&&d!==i);l===null?o=a:l.next=c,ni(a,t.memoizedState)||(Ar=!0),t.memoizedState=a,t.baseState=o,t.baseQueue=l,n.lastRenderedState=a}if(e=n.interleaved,e!==null){r=e;do i=r.lane,ia.lanes|=i,Lc|=i,r=r.next;while(r!==e)}else r===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _2(e){var t=Ts(),n=t.queue;if(n===null)throw Error(Ke(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do i=e(i,o.action),o=o.next;while(o!==r);ni(i,t.memoizedState)||(Ar=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function vD(){}function _D(e,t){var n=ia,a=Ts(),r=t(),i=!ni(a.memoizedState,r);if(i&&(a.memoizedState=r,Ar=!0),a=a.queue,f6(kD.bind(null,n,a,e),[e]),a.getSnapshot!==t||i||Ra!==null&&Ra.memoizedState.tag&1){if(n.flags|=2048,op(9,SD.bind(null,n,a,r,t),void 0,null),Ba===null)throw Error(Ke(349));(Tc&30)!==0||ND(n,t,r)}return r}function ND(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ia.updateQueue,t===null?(t={lastEffect:null,stores:null},ia.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function SD(e,t,n,a){t.value=n,t.getSnapshot=a,CD(t)&&ED(e)}function kD(e,t,n){return n(function(){CD(t)&&ED(e)})}function CD(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ni(e,n)}catch{return!0}}function ED(e){var t=yo(e,1);t!==null&&Qs(t,e,1,-1)}function cC(e){var t=pi();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ip,lastRenderedState:e},t.queue=e,e=e.dispatch=TW.bind(null,ia,e),[t.memoizedState,e]}function op(e,t,n,a){return e={tag:e,create:t,destroy:n,deps:a,next:null},t=ia.updateQueue,t===null?(t={lastEffect:null,stores:null},ia.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e)),e}function TD(){return Ts().memoizedState}function hg(e,t,n,a){var r=pi();ia.flags|=e,r.memoizedState=op(1|t,n,void 0,a===void 0?null:a)}function Yb(e,t,n,a){var r=Ts();a=a===void 0?null:a;var i=void 0;if(La!==null){var o=La.memoizedState;if(i=o.destroy,a!==null&&c6(a,o.deps)){r.memoizedState=op(t,n,i,a);return}}ia.flags|=e,r.memoizedState=op(1|t,n,i,a)}function dC(e,t){return hg(8390656,8,e,t)}function f6(e,t){return Yb(2048,8,e,t)}function LD(e,t){return Yb(4,2,e,t)}function DD(e,t){return Yb(4,4,e,t)}function MD(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function AD(e,t,n){return n=n!=null?n.concat([e]):null,Yb(4,4,MD.bind(null,t,e),n)}function m6(){}function ID(e,t){var n=Ts();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&c6(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function OD(e,t){var n=Ts();t=t===void 0?null:t;var a=n.memoizedState;return a!==null&&t!==null&&c6(t,a[1])?a[0]:(e=e(),n.memoizedState=[e,t],e)}function PD(e,t,n){return(Tc&21)===0?(e.baseState&&(e.baseState=!1,Ar=!0),e.memoizedState=n):(ni(n,t)||(n=$L(),ia.lanes|=n,Lc|=n,e.baseState=!0),t)}function CW(e,t){var n=Mn;Mn=n!==0&&4>n?n:4,e(!0);var a=w2.transition;w2.transition={};try{e(!1),t()}finally{Mn=n,w2.transition=a}}function RD(){return Ts().memoizedState}function EW(e,t,n){var a=_l(e);if(n={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null},jD(e))zD(t,n);else if(n=yD(e,t,n,a),n!==null){var r=_r();Qs(n,e,a,r),FD(n,t,a)}}function TW(e,t,n){var a=_l(e),r={lane:a,action:n,hasEagerState:!1,eagerState:null,next:null};if(jD(e))zD(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,c=i(o,n);if(r.hasEagerState=!0,r.eagerState=c,ni(c,o)){var l=t.interleaved;l===null?(r.next=r,r6(t)):(r.next=l.next,l.next=r),t.interleaved=r;return}}catch{}finally{}n=yD(e,t,r,a),n!==null&&(r=_r(),Qs(n,e,a,r),FD(n,t,a))}}function jD(e){var t=e.alternate;return e===ia||t!==null&&t===ia}function zD(e,t){Lm=a1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function FD(e,t,n){if((n&4194240)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,V_(e,n)}}var r1={readContext:Es,useCallback:er,useContext:er,useEffect:er,useImperativeHandle:er,useInsertionEffect:er,useLayoutEffect:er,useMemo:er,useReducer:er,useRef:er,useState:er,useDebugValue:er,useDeferredValue:er,useTransition:er,useMutableSource:er,useSyncExternalStore:er,useId:er,unstable_isNewReconciler:!1},LW={readContext:Es,useCallback:function(e,t){return pi().memoizedState=[e,t===void 0?null:t],e},useContext:Es,useEffect:dC,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hg(4194308,4,MD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hg(4194308,4,e,t)},useInsertionEffect:function(e,t){return hg(4,2,e,t)},useMemo:function(e,t){var n=pi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var a=pi();return t=n!==void 0?n(t):t,a.memoizedState=a.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},a.queue=e,e=e.dispatch=EW.bind(null,ia,e),[a.memoizedState,e]},useRef:function(e){var t=pi();return e={current:e},t.memoizedState=e},useState:cC,useDebugValue:m6,useDeferredValue:function(e){return pi().memoizedState=e},useTransition:function(){var e=cC(!1),t=e[0];return e=CW.bind(null,e[1]),pi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var a=ia,r=pi();if(ta){if(n===void 0)throw Error(Ke(407));n=n()}else{if(n=t(),Ba===null)throw Error(Ke(349));(Tc&30)!==0||ND(a,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,dC(kD.bind(null,a,i,e),[e]),a.flags|=2048,op(9,SD.bind(null,a,i,n,t),void 0,null),n},useId:function(){var e=pi(),t=Ba.identifierPrefix;if(ta){var n=ro,a=ao;n=(a&~(1<<32-Zs(a)-1)).toString(32)+n,t=":"+t+"R"+n,n=sp++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=kW++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},DW={readContext:Es,useCallback:ID,useContext:Es,useEffect:f6,useImperativeHandle:AD,useInsertionEffect:LD,useLayoutEffect:DD,useMemo:OD,useReducer:v2,useRef:TD,useState:function(){return v2(ip)},useDebugValue:m6,useDeferredValue:function(e){var t=Ts();return PD(t,La.memoizedState,e)},useTransition:function(){var e=v2(ip)[0],t=Ts().memoizedState;return[e,t]},useMutableSource:vD,useSyncExternalStore:_D,useId:RD,unstable_isNewReconciler:!1},MW={readContext:Es,useCallback:ID,useContext:Es,useEffect:f6,useImperativeHandle:AD,useInsertionEffect:LD,useLayoutEffect:DD,useMemo:OD,useReducer:_2,useRef:TD,useState:function(){return _2(ip)},useDebugValue:m6,useDeferredValue:function(e){var t=Ts();return La===null?t.memoizedState=e:PD(t,La.memoizedState,e)},useTransition:function(){var e=_2(ip)[0],t=Ts().memoizedState;return[e,t]},useMutableSource:vD,useSyncExternalStore:_D,useId:RD,unstable_isNewReconciler:!1};function Us(e,t){if(e&&e.defaultProps){t=la({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function S3(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:la({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gb={isMounted:function(e){return(e=e._reactInternals)?Fc(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var a=_r(),r=_l(e),i=uo(a,r);i.payload=t,n!=null&&(i.callback=n),t=wl(e,i,r),t!==null&&(Qs(t,e,r,a),mg(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=_r(),r=_l(e),i=uo(a,r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wl(e,i,r),t!==null&&(Qs(t,e,r,a),mg(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_r(),a=_l(e),r=uo(n,a);r.tag=2,t!=null&&(r.callback=t),t=wl(e,r,a),t!==null&&(Qs(t,e,a,n),mg(t,e,a))}};function uC(e,t,n,a,r,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!Xm(n,a)||!Xm(r,i):!0}function $D(e,t,n){var a=!1,r=Ml,i=t.contextType;return typeof i=="object"&&i!==null?i=Es(i):(r=Or(t)?Cc:or.current,a=t.contextTypes,i=(a=a!=null)?Su(e,r):Ml),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gb,e.stateNode=t,t._reactInternals=e,a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=r,e.__reactInternalMemoizedMaskedChildContext=i),t}function fC(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Gb.enqueueReplaceState(t,t.state,null)}function k3(e,t,n,a){var r=e.stateNode;r.props=n,r.state=e.memoizedState,r.refs={},s6(e);var i=t.contextType;typeof i=="object"&&i!==null?r.context=Es(i):(i=Or(t)?Cc:or.current,r.context=Su(e,i)),r.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(S3(e,t,i,n),r.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(t=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),t!==r.state&&Gb.enqueueReplaceState(r,r.state,null),t1(e,n,r,a),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308)}function Tu(e,t){try{var n="",a=t;do n+=sV(a),a=a.return;while(a);var r=n}catch(i){r=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:r,digest:null}}function N2(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function C3(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var AW=typeof WeakMap=="function"?WeakMap:Map;function BD(e,t,n){n=uo(-1,n),n.tag=3,n.payload={element:null};var a=t.value;return n.callback=function(){i1||(i1=!0,R3=a),C3(e,t)},n}function HD(e,t,n){n=uo(-1,n),n.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var r=t.value;n.payload=function(){return a(r)},n.callback=function(){C3(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){C3(e,t),typeof a!="function"&&(vl===null?vl=new Set([this]):vl.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function mC(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new AW;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(r.add(n),e=YW.bind(null,e,t,n),t.then(e,e))}function pC(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function hC(e,t,n,a,r){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uo(-1,1),t.tag=2,wl(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=r,e)}var IW=ko.ReactCurrentOwner,Ar=!1;function br(e,t,n,a){t.child=e===null?bD(t,null,n,a):Cu(t,e.child,n,a)}function gC(e,t,n,a,r){n=n.render;var i=t.ref;return du(t,r),a=d6(e,t,n,a,i,r),n=u6(),e!==null&&!Ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,xo(e,t,r)):(ta&&n&&K_(t),t.flags|=1,br(e,t,a,r),t.child)}function bC(e,t,n,a,r){if(e===null){var i=n.type;return typeof i=="function"&&!v6(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,UD(e,t,i,a,r)):(e=xg(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&r)===0){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xm,n(o,a)&&e.ref===t.ref)return xo(e,t,r)}return t.flags|=1,e=Nl(i,a),e.ref=t.ref,e.return=t,t.child=e}function UD(e,t,n,a,r){if(e!==null){var i=e.memoizedProps;if(Xm(i,a)&&e.ref===t.ref)if(Ar=!1,t.pendingProps=a=i,(e.lanes&r)!==0)(e.flags&131072)!==0&&(Ar=!0);else return t.lanes=e.lanes,xo(e,t,r)}return E3(e,t,n,a,r)}function VD(e,t,n){var a=t.pendingProps,r=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Un(Jd,Wr),Wr|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Un(Jd,Wr),Wr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=i!==null?i.baseLanes:n,Un(Jd,Wr),Wr|=a}else i!==null?(a=i.baseLanes|n,t.memoizedState=null):a=n,Un(Jd,Wr),Wr|=a;return br(e,t,r,n),t.child}function WD(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function E3(e,t,n,a,r){var i=Or(n)?Cc:or.current;return i=Su(t,i),du(t,r),n=d6(e,t,n,a,i,r),a=u6(),e!==null&&!Ar?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r,xo(e,t,r)):(ta&&a&&K_(t),t.flags|=1,br(e,t,n,r),t.child)}function yC(e,t,n,a,r){if(Or(n)){var i=!0;Qg(t)}else i=!1;if(du(t,r),t.stateNode===null)gg(e,t),$D(t,n,a),k3(t,n,a,r),a=!0;else if(e===null){var o=t.stateNode,c=t.memoizedProps;o.props=c;var l=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Es(d):(d=Or(n)?Cc:or.current,d=Su(t,d));var u=n.getDerivedStateFromProps,g=typeof u=="function"||typeof o.getSnapshotBeforeUpdate=="function";g||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(c!==a||l!==d)&&fC(t,o,a,d),el=!1;var y=t.memoizedState;o.state=y,t1(t,a,o,r),l=t.memoizedState,c!==a||y!==l||Ir.current||el?(typeof u=="function"&&(S3(t,n,u,a),l=t.memoizedState),(c=el||uC(t,n,c,a,y,l,d))?(g||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=l),o.props=a,o.state=l,o.context=d,a=c):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,xD(e,t),c=t.memoizedProps,d=t.type===t.elementType?c:Us(t.type,c),o.props=d,g=t.pendingProps,y=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=Es(l):(l=Or(n)?Cc:or.current,l=Su(t,l));var w=n.getDerivedStateFromProps;(u=typeof w=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(c!==g||y!==l)&&fC(t,o,a,l),el=!1,y=t.memoizedState,o.state=y,t1(t,a,o,r);var v=t.memoizedState;c!==g||y!==v||Ir.current||el?(typeof w=="function"&&(S3(t,n,w,a),v=t.memoizedState),(d=el||uC(t,n,d,a,y,v,l)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,v,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,v,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=v),o.props=a,o.state=v,o.context=l,a=d):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&y===e.memoizedState||(t.flags|=1024),a=!1)}return T3(e,t,n,a,i,r)}function T3(e,t,n,a,r,i){WD(e,t);var o=(t.flags&128)!==0;if(!a&&!o)return r&&aC(t,n,!1),xo(e,t,i);a=t.stateNode,IW.current=t;var c=o&&typeof n.getDerivedStateFromError!="function"?null:a.render();return t.flags|=1,e!==null&&o?(t.child=Cu(t,e.child,null,i),t.child=Cu(t,null,c,i)):br(e,t,c,i),t.memoizedState=a.state,r&&aC(t,n,!0),t.child}function YD(e){var t=e.stateNode;t.pendingContext?nC(e,t.pendingContext,t.pendingContext!==t.context):t.context&&nC(e,t.context,!1),i6(e,t.containerInfo)}function xC(e,t,n,a,r){return ku(),e6(r),t.flags|=256,br(e,t,n,a),t.child}var L3={dehydrated:null,treeContext:null,retryLane:0};function D3(e){return{baseLanes:e,cachePool:null,transitions:null}}function GD(e,t,n){var a=t.pendingProps,r=sa.current,i=!1,o=(t.flags&128)!==0,c;if((c=o)||(c=e!==null&&e.memoizedState===null?!1:(r&2)!==0),c?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(r|=1),Un(sa,r&1),e===null)return _3(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(o=a.children,e=a.fallback,i?(a=t.mode,i=t.child,o={mode:"hidden",children:o},(a&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Qb(o,a,0,null),e=vc(e,a,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=D3(n),t.memoizedState=L3,e):p6(t,o));if(r=e.memoizedState,r!==null&&(c=r.dehydrated,c!==null))return OW(e,t,o,a,c,r,n);if(i){i=a.fallback,o=t.mode,r=e.child,c=r.sibling;var l={mode:"hidden",children:a.children};return(o&1)===0&&t.child!==r?(a=t.child,a.childLanes=0,a.pendingProps=l,t.deletions=null):(a=Nl(r,l),a.subtreeFlags=r.subtreeFlags&14680064),c!==null?i=Nl(c,i):(i=vc(i,o,n,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,a=i,i=t.child,o=e.child.memoizedState,o=o===null?D3(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=L3,a}return i=e.child,e=i.sibling,a=Nl(i,{mode:"visible",children:a.children}),(t.mode&1)===0&&(a.lanes=n),a.return=t,a.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=a,t.memoizedState=null,a}function p6(e,t){return t=Qb({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function l0(e,t,n,a){return a!==null&&e6(a),Cu(t,e.child,null,n),e=p6(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function OW(e,t,n,a,r,i,o){if(n)return t.flags&256?(t.flags&=-257,a=N2(Error(Ke(422))),l0(e,t,o,a)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=a.fallback,r=t.mode,a=Qb({mode:"visible",children:a.children},r,0,null),i=vc(i,r,o,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,(t.mode&1)!==0&&Cu(t,e.child,null,o),t.child.memoizedState=D3(o),t.memoizedState=L3,i);if((t.mode&1)===0)return l0(e,t,o,null);if(r.data==="$!"){if(a=r.nextSibling&&r.nextSibling.dataset,a)var c=a.dgst;return a=c,i=Error(Ke(419)),a=N2(i,a,void 0),l0(e,t,o,a)}if(c=(o&e.childLanes)!==0,Ar||c){if(a=Ba,a!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=(r&(a.suspendedLanes|o))!==0?0:r,r!==0&&r!==i.retryLane&&(i.retryLane=r,yo(e,r),Qs(a,e,r,-1))}return w6(),a=N2(Error(Ke(421))),l0(e,t,o,a)}return r.data==="$?"?(t.flags|=128,t.child=e.child,t=GW.bind(null,e),r._reactRetry=t,null):(e=i.treeContext,qr=xl(r.nextSibling),Xr=t,ta=!0,Ws=null,e!==null&&(ys[xs++]=ao,ys[xs++]=ro,ys[xs++]=Ec,ao=e.id,ro=e.overflow,Ec=t),t=p6(t,a.children),t.flags|=4096,t)}function wC(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),N3(e.return,t,n)}function S2(e,t,n,a,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=r)}function qD(e,t,n){var a=t.pendingProps,r=a.revealOrder,i=a.tail;if(br(e,t,a.children,n),a=sa.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wC(e,n,t);else if(e.tag===19)wC(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}if(Un(sa,a),(t.mode&1)===0)t.memoizedState=null;else switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&n1(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),S2(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&n1(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}S2(t,!0,n,null,i);break;case"together":S2(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gg(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xo(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Lc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ke(153));if(t.child!==null){for(e=t.child,n=Nl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Nl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function PW(e,t,n){switch(t.tag){case 3:YD(t),ku();break;case 5:wD(t);break;case 1:Or(t.type)&&Qg(t);break;case 4:i6(t,t.stateNode.containerInfo);break;case 10:var a=t.type._context,r=t.memoizedProps.value;Un(Xg,a._currentValue),a._currentValue=r;break;case 13:if(a=t.memoizedState,a!==null)return a.dehydrated!==null?(Un(sa,sa.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?GD(e,t,n):(Un(sa,sa.current&1),e=xo(e,t,n),e!==null?e.sibling:null);Un(sa,sa.current&1);break;case 19:if(a=(n&t.childLanes)!==0,(e.flags&128)!==0){if(a)return qD(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Un(sa,sa.current),a)break;return null;case 22:case 23:return t.lanes=0,VD(e,t,n)}return xo(e,t,n)}var ZD,M3,QD,JD;ZD=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};M3=function(){};QD=function(e,t,n,a){var r=e.memoizedProps;if(r!==a){e=t.stateNode,mc(ki.current);var i=null;switch(n){case"input":r=Xv(e,r),a=Xv(e,a),i=[];break;case"select":r=la({},r,{value:void 0}),a=la({},a,{value:void 0}),i=[];break;case"textarea":r=n3(e,r),a=n3(e,a),i=[];break;default:typeof r.onClick!="function"&&typeof a.onClick=="function"&&(e.onclick=qg)}r3(n,a);var o;n=null;for(d in r)if(!a.hasOwnProperty(d)&&r.hasOwnProperty(d)&&r[d]!=null)if(d==="style"){var c=r[d];for(o in c)c.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Ym.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in a){var l=a[d];if(c=r!=null?r[d]:void 0,a.hasOwnProperty(d)&&l!==c&&(l!=null||c!=null))if(d==="style")if(c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(d,n)),n=l;else d==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(i=i||[]).push(d,l)):d==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(d,""+l):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Ym.hasOwnProperty(d)?(l!=null&&d==="onScroll"&&Yn("scroll",e),i||c===l||(i=[])):(i=i||[]).push(d,l))}n&&(i=i||[]).push("style",n);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};JD=function(e,t,n,a){n!==a&&(t.flags|=4)};function Hf(e,t){if(!ta)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function tr(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&14680064,a|=r.flags&14680064,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function RW(e,t,n){var a=t.pendingProps;switch(X_(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return tr(t),null;case 1:return Or(t.type)&&Zg(),tr(t),null;case 3:return a=t.stateNode,Eu(),Zn(Ir),Zn(or),l6(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(i0(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ws!==null&&(F3(Ws),Ws=null))),M3(e,t),tr(t),null;case 5:o6(t);var r=mc(rp.current);if(n=t.type,e!==null&&t.stateNode!=null)QD(e,t,n,a,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!a){if(t.stateNode===null)throw Error(Ke(166));return tr(t),null}if(e=mc(ki.current),i0(t)){a=t.stateNode,n=t.type;var i=t.memoizedProps;switch(a[yi]=t,a[np]=i,e=(t.mode&1)!==0,n){case"dialog":Yn("cancel",a),Yn("close",a);break;case"iframe":case"object":case"embed":Yn("load",a);break;case"video":case"audio":for(r=0;r<xm.length;r++)Yn(xm[r],a);break;case"source":Yn("error",a);break;case"img":case"image":case"link":Yn("error",a),Yn("load",a);break;case"details":Yn("toggle",a);break;case"input":Lk(a,i),Yn("invalid",a);break;case"select":a._wrapperState={wasMultiple:!!i.multiple},Yn("invalid",a);break;case"textarea":Mk(a,i),Yn("invalid",a)}r3(n,i),r=null;for(var o in i)if(i.hasOwnProperty(o)){var c=i[o];o==="children"?typeof c=="string"?a.textContent!==c&&(i.suppressHydrationWarning!==!0&&s0(a.textContent,c,e),r=["children",c]):typeof c=="number"&&a.textContent!==""+c&&(i.suppressHydrationWarning!==!0&&s0(a.textContent,c,e),r=["children",""+c]):Ym.hasOwnProperty(o)&&c!=null&&o==="onScroll"&&Yn("scroll",a)}switch(n){case"input":Jh(a),Dk(a,i,!0);break;case"textarea":Jh(a),Ak(a);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(a.onclick=qg)}a=r,t.updateQueue=a,a!==null&&(t.flags|=4)}else{o=r.nodeType===9?r:r.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=kL(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof a.is=="string"?e=o.createElement(n,{is:a.is}):(e=o.createElement(n),n==="select"&&(o=e,a.multiple?o.multiple=!0:a.size&&(o.size=a.size))):e=o.createElementNS(e,n),e[yi]=t,e[np]=a,ZD(e,t,!1,!1),t.stateNode=e;e:{switch(o=s3(n,a),n){case"dialog":Yn("cancel",e),Yn("close",e),r=a;break;case"iframe":case"object":case"embed":Yn("load",e),r=a;break;case"video":case"audio":for(r=0;r<xm.length;r++)Yn(xm[r],e);r=a;break;case"source":Yn("error",e),r=a;break;case"img":case"image":case"link":Yn("error",e),Yn("load",e),r=a;break;case"details":Yn("toggle",e),r=a;break;case"input":Lk(e,a),r=Xv(e,a),Yn("invalid",e);break;case"option":r=a;break;case"select":e._wrapperState={wasMultiple:!!a.multiple},r=la({},a,{value:void 0}),Yn("invalid",e);break;case"textarea":Mk(e,a),r=n3(e,a),Yn("invalid",e);break;default:r=a}r3(n,r),c=r;for(i in c)if(c.hasOwnProperty(i)){var l=c[i];i==="style"?TL(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&CL(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Gm(e,l):typeof l=="number"&&Gm(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ym.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Yn("scroll",e):l!=null&&z_(e,i,l,o))}switch(n){case"input":Jh(e),Dk(e,a,!1);break;case"textarea":Jh(e),Ak(e);break;case"option":a.value!=null&&e.setAttribute("value",""+Dl(a.value));break;case"select":e.multiple=!!a.multiple,i=a.value,i!=null?iu(e,!!a.multiple,i,!1):a.defaultValue!=null&&iu(e,!!a.multiple,a.defaultValue,!0);break;default:typeof r.onClick=="function"&&(e.onclick=qg)}switch(n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}}a&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return tr(t),null;case 6:if(e&&t.stateNode!=null)JD(e,t,e.memoizedProps,a);else{if(typeof a!="string"&&t.stateNode===null)throw Error(Ke(166));if(n=mc(rp.current),mc(ki.current),i0(t)){if(a=t.stateNode,n=t.memoizedProps,a[yi]=t,(i=a.nodeValue!==n)&&(e=Xr,e!==null))switch(e.tag){case 3:s0(a.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&s0(a.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else a=(n.nodeType===9?n:n.ownerDocument).createTextNode(a),a[yi]=t,t.stateNode=a}return tr(t),null;case 13:if(Zn(sa),a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ta&&qr!==null&&(t.mode&1)!==0&&(t.flags&128)===0)hD(),ku(),t.flags|=98560,i=!1;else if(i=i0(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(Ke(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(Ke(317));i[yi]=t}else ku(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;tr(t),i=!1}else Ws!==null&&(F3(Ws),Ws=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(a=a!==null,a!==(e!==null&&e.memoizedState!==null)&&a&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(sa.current&1)!==0?Da===0&&(Da=3):w6())),t.updateQueue!==null&&(t.flags|=4),tr(t),null);case 4:return Eu(),M3(e,t),e===null&&ep(t.stateNode.containerInfo),tr(t),null;case 10:return a6(t.type._context),tr(t),null;case 17:return Or(t.type)&&Zg(),tr(t),null;case 19:if(Zn(sa),i=t.memoizedState,i===null)return tr(t),null;if(a=(t.flags&128)!==0,o=i.rendering,o===null)if(a)Hf(i,!1);else{if(Da!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=n1(e),o!==null){for(t.flags|=128,Hf(i,!1),a=o.updateQueue,a!==null&&(t.updateQueue=a,t.flags|=4),t.subtreeFlags=0,a=n,n=t.child;n!==null;)i=n,e=a,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Un(sa,sa.current&1|2),t.child}e=e.sibling}i.tail!==null&&ga()>Lu&&(t.flags|=128,a=!0,Hf(i,!1),t.lanes=4194304)}else{if(!a)if(e=n1(o),e!==null){if(t.flags|=128,a=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Hf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ta)return tr(t),null}else 2*ga()-i.renderingStartTime>Lu&&n!==1073741824&&(t.flags|=128,a=!0,Hf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ga(),t.sibling=null,n=sa.current,Un(sa,a?n&1|2:n&1),t):(tr(t),null);case 22:case 23:return x6(),a=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==a&&(t.flags|=8192),a&&(t.mode&1)!==0?(Wr&1073741824)!==0&&(tr(t),t.subtreeFlags&6&&(t.flags|=8192)):tr(t),null;case 24:return null;case 25:return null}throw Error(Ke(156,t.tag))}function jW(e,t){switch(X_(t),t.tag){case 1:return Or(t.type)&&Zg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Eu(),Zn(Ir),Zn(or),l6(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return o6(t),null;case 13:if(Zn(sa),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ke(340));ku()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Zn(sa),null;case 4:return Eu(),null;case 10:return a6(t.type._context),null;case 22:case 23:return x6(),null;case 24:return null;default:return null}}var c0=!1,nr=!1,zW=typeof WeakSet=="function"?WeakSet:Set,xt=null;function Qd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(a){ua(e,t,a)}else n.current=null}function A3(e,t,n){try{n()}catch(a){ua(e,t,a)}}var vC=!1;function FW(e,t){if(h3=Wg,e=nD(),J_(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,c=-1,l=-1,d=0,u=0,g=e,y=null;t:for(;;){for(var w;g!==n||r!==0&&g.nodeType!==3||(c=o+r),g!==i||a!==0&&g.nodeType!==3||(l=o+a),g.nodeType===3&&(o+=g.nodeValue.length),(w=g.firstChild)!==null;)y=g,g=w;for(;;){if(g===e)break t;if(y===n&&++d===r&&(c=o),y===i&&++u===a&&(l=o),(w=g.nextSibling)!==null)break;g=y,y=g.parentNode}g=w}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(g3={focusedElem:e,selectionRange:n},Wg=!1,xt=t;xt!==null;)if(t=xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,xt=e;else for(;xt!==null;){t=xt;try{var v=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var S=v.memoizedProps,m=v.memoizedState,p=t.stateNode,b=p.getSnapshotBeforeUpdate(t.elementType===t.type?S:Us(t.type,S),m);p.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ke(163))}}catch(k){ua(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,xt=e;break}xt=t.return}return v=vC,vC=!1,v}function Dm(e,t,n){var a=t.updateQueue;if(a=a!==null?a.lastEffect:null,a!==null){var r=a=a.next;do{if((r.tag&e)===e){var i=r.destroy;r.destroy=void 0,i!==void 0&&A3(t,n,i)}r=r.next}while(r!==a)}}function qb(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var a=n.create;n.destroy=a()}n=n.next}while(n!==t)}}function I3(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function KD(e){var t=e.alternate;t!==null&&(e.alternate=null,KD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[yi],delete t[np],delete t[x3],delete t[vW],delete t[_W])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XD(e){return e.tag===5||e.tag===3||e.tag===4}function _C(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XD(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function O3(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qg));else if(a!==4&&(e=e.child,e!==null))for(O3(e,t,n),e=e.sibling;e!==null;)O3(e,t,n),e=e.sibling}function P3(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(e=e.child,e!==null))for(P3(e,t,n),e=e.sibling;e!==null;)P3(e,t,n),e=e.sibling}var Ya=null,Vs=!1;function $o(e,t,n){for(n=n.child;n!==null;)eM(e,t,n),n=n.sibling}function eM(e,t,n){if(Si&&typeof Si.onCommitFiberUnmount=="function")try{Si.onCommitFiberUnmount($b,n)}catch{}switch(n.tag){case 5:nr||Qd(n,t);case 6:var a=Ya,r=Vs;Ya=null,$o(e,t,n),Ya=a,Vs=r,Ya!==null&&(Vs?(e=Ya,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ya.removeChild(n.stateNode));break;case 18:Ya!==null&&(Vs?(e=Ya,n=n.stateNode,e.nodeType===8?b2(e.parentNode,n):e.nodeType===1&&b2(e,n),Jm(e)):b2(Ya,n.stateNode));break;case 4:a=Ya,r=Vs,Ya=n.stateNode.containerInfo,Vs=!0,$o(e,t,n),Ya=a,Vs=r;break;case 0:case 11:case 14:case 15:if(!nr&&(a=n.updateQueue,a!==null&&(a=a.lastEffect,a!==null))){r=a=a.next;do{var i=r,o=i.destroy;i=i.tag,o!==void 0&&((i&2)!==0||(i&4)!==0)&&A3(n,t,o),r=r.next}while(r!==a)}$o(e,t,n);break;case 1:if(!nr&&(Qd(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"))try{a.props=n.memoizedProps,a.state=n.memoizedState,a.componentWillUnmount()}catch(c){ua(n,t,c)}$o(e,t,n);break;case 21:$o(e,t,n);break;case 22:n.mode&1?(nr=(a=nr)||n.memoizedState!==null,$o(e,t,n),nr=a):$o(e,t,n);break;default:$o(e,t,n)}}function NC(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new zW),t.forEach(function(a){var r=qW.bind(null,e,a);n.has(a)||(n.add(a),a.then(r,r))})}}function zs(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a];try{var i=e,o=t,c=o;e:for(;c!==null;){switch(c.tag){case 5:Ya=c.stateNode,Vs=!1;break e;case 3:Ya=c.stateNode.containerInfo,Vs=!0;break e;case 4:Ya=c.stateNode.containerInfo,Vs=!0;break e}c=c.return}if(Ya===null)throw Error(Ke(160));eM(i,o,r),Ya=null,Vs=!1;var l=r.alternate;l!==null&&(l.return=null),r.return=null}catch(d){ua(r,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)tM(t,e),t=t.sibling}function tM(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(zs(t,e),ui(e),a&4){try{Dm(3,e,e.return),qb(3,e)}catch(S){ua(e,e.return,S)}try{Dm(5,e,e.return)}catch(S){ua(e,e.return,S)}}break;case 1:zs(t,e),ui(e),a&512&&n!==null&&Qd(n,n.return);break;case 5:if(zs(t,e),ui(e),a&512&&n!==null&&Qd(n,n.return),e.flags&32){var r=e.stateNode;try{Gm(r,"")}catch(S){ua(e,e.return,S)}}if(a&4&&(r=e.stateNode,r!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c==="input"&&i.type==="radio"&&i.name!=null&&NL(r,i),s3(c,o);var d=s3(c,i);for(o=0;o<l.length;o+=2){var u=l[o],g=l[o+1];u==="style"?TL(r,g):u==="dangerouslySetInnerHTML"?CL(r,g):u==="children"?Gm(r,g):z_(r,u,g,d)}switch(c){case"input":e3(r,i);break;case"textarea":SL(r,i);break;case"select":var y=r._wrapperState.wasMultiple;r._wrapperState.wasMultiple=!!i.multiple;var w=i.value;w!=null?iu(r,!!i.multiple,w,!1):y!==!!i.multiple&&(i.defaultValue!=null?iu(r,!!i.multiple,i.defaultValue,!0):iu(r,!!i.multiple,i.multiple?[]:"",!1))}r[np]=i}catch(S){ua(e,e.return,S)}}break;case 6:if(zs(t,e),ui(e),a&4){if(e.stateNode===null)throw Error(Ke(162));r=e.stateNode,i=e.memoizedProps;try{r.nodeValue=i}catch(S){ua(e,e.return,S)}}break;case 3:if(zs(t,e),ui(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Jm(t.containerInfo)}catch(S){ua(e,e.return,S)}break;case 4:zs(t,e),ui(e);break;case 13:zs(t,e),ui(e),r=e.child,r.flags&8192&&(i=r.memoizedState!==null,r.stateNode.isHidden=i,!i||r.alternate!==null&&r.alternate.memoizedState!==null||(b6=ga())),a&4&&NC(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(nr=(d=nr)||u,zs(t,e),nr=d):zs(t,e),ui(e),a&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!u&&(e.mode&1)!==0)for(xt=e,u=e.child;u!==null;){for(g=xt=u;xt!==null;){switch(y=xt,w=y.child,y.tag){case 0:case 11:case 14:case 15:Dm(4,y,y.return);break;case 1:Qd(y,y.return);var v=y.stateNode;if(typeof v.componentWillUnmount=="function"){a=y,n=y.return;try{t=a,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(S){ua(a,n,S)}}break;case 5:Qd(y,y.return);break;case 22:if(y.memoizedState!==null){kC(g);continue}}w!==null?(w.return=y,xt=w):kC(g)}u=u.sibling}e:for(u=null,g=e;;){if(g.tag===5){if(u===null){u=g;try{r=g.stateNode,d?(i=r.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(c=g.stateNode,l=g.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,c.style.display=EL("display",o))}catch(S){ua(e,e.return,S)}}}else if(g.tag===6){if(u===null)try{g.stateNode.nodeValue=d?"":g.memoizedProps}catch(S){ua(e,e.return,S)}}else if((g.tag!==22&&g.tag!==23||g.memoizedState===null||g===e)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===e)break e;for(;g.sibling===null;){if(g.return===null||g.return===e)break e;u===g&&(u=null),g=g.return}u===g&&(u=null),g.sibling.return=g.return,g=g.sibling}}break;case 19:zs(t,e),ui(e),a&4&&NC(e);break;case 21:break;default:zs(t,e),ui(e)}}function ui(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(XD(n)){var a=n;break e}n=n.return}throw Error(Ke(160))}switch(a.tag){case 5:var r=a.stateNode;a.flags&32&&(Gm(r,""),a.flags&=-33);var i=_C(e);P3(e,i,r);break;case 3:case 4:var o=a.stateNode.containerInfo,c=_C(e);O3(e,c,o);break;default:throw Error(Ke(161))}}catch(l){ua(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $W(e,t,n){xt=e,nM(e)}function nM(e,t,n){for(var a=(e.mode&1)!==0;xt!==null;){var r=xt,i=r.child;if(r.tag===22&&a){var o=r.memoizedState!==null||c0;if(!o){var c=r.alternate,l=c!==null&&c.memoizedState!==null||nr;c=c0;var d=nr;if(c0=o,(nr=l)&&!d)for(xt=r;xt!==null;)o=xt,l=o.child,o.tag===22&&o.memoizedState!==null?CC(r):l!==null?(l.return=o,xt=l):CC(r);for(;i!==null;)xt=i,nM(i),i=i.sibling;xt=r,c0=c,nr=d}SC(e)}else(r.subtreeFlags&8772)!==0&&i!==null?(i.return=r,xt=i):SC(e)}}function SC(e){for(;xt!==null;){var t=xt;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:nr||qb(5,t);break;case 1:var a=t.stateNode;if(t.flags&4&&!nr)if(n===null)a.componentDidMount();else{var r=t.elementType===t.type?n.memoizedProps:Us(t.type,n.memoizedProps);a.componentDidUpdate(r,n.memoizedState,a.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&lC(t,i,a);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}lC(t,o,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var u=d.memoizedState;if(u!==null){var g=u.dehydrated;g!==null&&Jm(g)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ke(163))}nr||t.flags&512&&I3(t)}catch(y){ua(t,t.return,y)}}if(t===e){xt=null;break}if(n=t.sibling,n!==null){n.return=t.return,xt=n;break}xt=t.return}}function kC(e){for(;xt!==null;){var t=xt;if(t===e){xt=null;break}var n=t.sibling;if(n!==null){n.return=t.return,xt=n;break}xt=t.return}}function CC(e){for(;xt!==null;){var t=xt;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{qb(4,t)}catch(l){ua(t,n,l)}break;case 1:var a=t.stateNode;if(typeof a.componentDidMount=="function"){var r=t.return;try{a.componentDidMount()}catch(l){ua(t,r,l)}}var i=t.return;try{I3(t)}catch(l){ua(t,i,l)}break;case 5:var o=t.return;try{I3(t)}catch(l){ua(t,o,l)}}}catch(l){ua(t,t.return,l)}if(t===e){xt=null;break}var c=t.sibling;if(c!==null){c.return=t.return,xt=c;break}xt=t.return}}var BW=Math.ceil,s1=ko.ReactCurrentDispatcher,h6=ko.ReactCurrentOwner,ks=ko.ReactCurrentBatchConfig,wn=0,Ba=null,ya=null,qa=0,Wr=0,Jd=zl(0),Da=0,lp=null,Lc=0,Zb=0,g6=0,Mm=null,Mr=null,b6=0,Lu=1/0,Ji=null,i1=!1,R3=null,vl=null,d0=!1,ol=null,o1=0,Am=0,j3=null,bg=-1,yg=0;function _r(){return(wn&6)!==0?ga():bg!==-1?bg:bg=ga()}function _l(e){return(e.mode&1)===0?1:(wn&2)!==0&&qa!==0?qa&-qa:SW.transition!==null?(yg===0&&(yg=$L()),yg):(e=Mn,e!==0||(e=window.event,e=e===void 0?16:GL(e.type)),e)}function Qs(e,t,n,a){if(50<Am)throw Am=0,j3=null,Error(Ke(185));$p(e,n,a),((wn&2)===0||e!==Ba)&&(e===Ba&&((wn&2)===0&&(Zb|=n),Da===4&&rl(e,qa)),Pr(e,a),n===1&&wn===0&&(t.mode&1)===0&&(Lu=ga()+500,Wb&&Fl()))}function Pr(e,t){var n=e.callbackNode;SV(e,t);var a=Vg(e,e===Ba?qa:0);if(a===0)n!==null&&Pk(n),e.callbackNode=null,e.callbackPriority=0;else if(t=a&-a,e.callbackPriority!==t){if(n!=null&&Pk(n),t===1)e.tag===0?NW(EC.bind(null,e)):fD(EC.bind(null,e)),xW(function(){(wn&6)===0&&Fl()}),n=null;else{switch(BL(a)){case 1:n=U_;break;case 4:n=zL;break;case 16:n=Ug;break;case 536870912:n=FL;break;default:n=Ug}n=dM(n,aM.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function aM(e,t){if(bg=-1,yg=0,(wn&6)!==0)throw Error(Ke(327));var n=e.callbackNode;if(uu()&&e.callbackNode!==n)return null;var a=Vg(e,e===Ba?qa:0);if(a===0)return null;if((a&30)!==0||(a&e.expiredLanes)!==0||t)t=l1(e,a);else{t=a;var r=wn;wn|=2;var i=sM();(Ba!==e||qa!==t)&&(Ji=null,Lu=ga()+500,wc(e,t));do try{VW();break}catch(c){rM(e,c)}while(1);n6(),s1.current=i,wn=r,ya!==null?t=0:(Ba=null,qa=0,t=Da)}if(t!==0){if(t===2&&(r=d3(e),r!==0&&(a=r,t=z3(e,r))),t===1)throw n=lp,wc(e,0),rl(e,a),Pr(e,ga()),n;if(t===6)rl(e,a);else{if(r=e.current.alternate,(a&30)===0&&!HW(r)&&(t=l1(e,a),t===2&&(i=d3(e),i!==0&&(a=i,t=z3(e,i))),t===1))throw n=lp,wc(e,0),rl(e,a),Pr(e,ga()),n;switch(e.finishedWork=r,e.finishedLanes=a,t){case 0:case 1:throw Error(Ke(345));case 2:sc(e,Mr,Ji);break;case 3:if(rl(e,a),(a&130023424)===a&&(t=b6+500-ga(),10<t)){if(Vg(e,0)!==0)break;if(r=e.suspendedLanes,(r&a)!==a){_r(),e.pingedLanes|=e.suspendedLanes&r;break}e.timeoutHandle=y3(sc.bind(null,e,Mr,Ji),t);break}sc(e,Mr,Ji);break;case 4:if(rl(e,a),(a&4194240)===a)break;for(t=e.eventTimes,r=-1;0<a;){var o=31-Zs(a);i=1<<o,o=t[o],o>r&&(r=o),a&=~i}if(a=r,a=ga()-a,a=(120>a?120:480>a?480:1080>a?1080:1920>a?1920:3e3>a?3e3:4320>a?4320:1960*BW(a/1960))-a,10<a){e.timeoutHandle=y3(sc.bind(null,e,Mr,Ji),a);break}sc(e,Mr,Ji);break;case 5:sc(e,Mr,Ji);break;default:throw Error(Ke(329))}}}return Pr(e,ga()),e.callbackNode===n?aM.bind(null,e):null}function z3(e,t){var n=Mm;return e.current.memoizedState.isDehydrated&&(wc(e,t).flags|=256),e=l1(e,t),e!==2&&(t=Mr,Mr=n,t!==null&&F3(t)),e}function F3(e){Mr===null?Mr=e:Mr.push.apply(Mr,e)}function HW(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var a=0;a<n.length;a++){var r=n[a],i=r.getSnapshot;r=r.value;try{if(!ni(i(),r))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function rl(e,t){for(t&=~g6,t&=~Zb,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Zs(t),a=1<<n;e[n]=-1,t&=~a}}function EC(e){if((wn&6)!==0)throw Error(Ke(327));uu();var t=Vg(e,0);if((t&1)===0)return Pr(e,ga()),null;var n=l1(e,t);if(e.tag!==0&&n===2){var a=d3(e);a!==0&&(t=a,n=z3(e,a))}if(n===1)throw n=lp,wc(e,0),rl(e,t),Pr(e,ga()),n;if(n===6)throw Error(Ke(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,sc(e,Mr,Ji),Pr(e,ga()),null}function y6(e,t){var n=wn;wn|=1;try{return e(t)}finally{wn=n,wn===0&&(Lu=ga()+500,Wb&&Fl())}}function Dc(e){ol!==null&&ol.tag===0&&(wn&6)===0&&uu();var t=wn;wn|=1;var n=ks.transition,a=Mn;try{if(ks.transition=null,Mn=1,e)return e()}finally{Mn=a,ks.transition=n,wn=t,(wn&6)===0&&Fl()}}function x6(){Wr=Jd.current,Zn(Jd)}function wc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yW(n)),ya!==null)for(n=ya.return;n!==null;){var a=n;switch(X_(a),a.tag){case 1:a=a.type.childContextTypes,a!=null&&Zg();break;case 3:Eu(),Zn(Ir),Zn(or),l6();break;case 5:o6(a);break;case 4:Eu();break;case 13:Zn(sa);break;case 19:Zn(sa);break;case 10:a6(a.type._context);break;case 22:case 23:x6()}n=n.return}if(Ba=e,ya=e=Nl(e.current,null),qa=Wr=t,Da=0,lp=null,g6=Zb=Lc=0,Mr=Mm=null,fc!==null){for(t=0;t<fc.length;t++)if(n=fc[t],a=n.interleaved,a!==null){n.interleaved=null;var r=a.next,i=n.pending;if(i!==null){var o=i.next;i.next=r,a.next=o}n.pending=a}fc=null}return e}function rM(e,t){do{var n=ya;try{if(n6(),pg.current=r1,a1){for(var a=ia.memoizedState;a!==null;){var r=a.queue;r!==null&&(r.pending=null),a=a.next}a1=!1}if(Tc=0,Ra=La=ia=null,Lm=!1,sp=0,h6.current=null,n===null||n.return===null){Da=1,lp=t,ya=null;break}e:{var i=e,o=n.return,c=n,l=t;if(t=qa,c.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=l,u=c,g=u.tag;if((u.mode&1)===0&&(g===0||g===11||g===15)){var y=u.alternate;y?(u.updateQueue=y.updateQueue,u.memoizedState=y.memoizedState,u.lanes=y.lanes):(u.updateQueue=null,u.memoizedState=null)}var w=pC(o);if(w!==null){w.flags&=-257,hC(w,o,c,i,t),w.mode&1&&mC(i,d,t),t=w,l=d;var v=t.updateQueue;if(v===null){var S=new Set;S.add(l),t.updateQueue=S}else v.add(l);break e}else{if((t&1)===0){mC(i,d,t),w6();break e}l=Error(Ke(426))}}else if(ta&&c.mode&1){var m=pC(o);if(m!==null){(m.flags&65536)===0&&(m.flags|=256),hC(m,o,c,i,t),e6(Tu(l,c));break e}}i=l=Tu(l,c),Da!==4&&(Da=2),Mm===null?Mm=[i]:Mm.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=BD(i,l,t);oC(i,p);break e;case 1:c=l;var b=i.type,x=i.stateNode;if((i.flags&128)===0&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(vl===null||!vl.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=HD(i,c,t);oC(i,k);break e}}i=i.return}while(i!==null)}oM(n)}catch(N){t=N,ya===n&&n!==null&&(ya=n=n.return);continue}break}while(1)}function sM(){var e=s1.current;return s1.current=r1,e===null?r1:e}function w6(){(Da===0||Da===3||Da===2)&&(Da=4),Ba===null||(Lc&268435455)===0&&(Zb&268435455)===0||rl(Ba,qa)}function l1(e,t){var n=wn;wn|=2;var a=sM();(Ba!==e||qa!==t)&&(Ji=null,wc(e,t));do try{UW();break}catch(r){rM(e,r)}while(1);if(n6(),wn=n,s1.current=a,ya!==null)throw Error(Ke(261));return Ba=null,qa=0,Da}function UW(){for(;ya!==null;)iM(ya)}function VW(){for(;ya!==null&&!hV();)iM(ya)}function iM(e){var t=cM(e.alternate,e,Wr);e.memoizedProps=e.pendingProps,t===null?oM(e):ya=t,h6.current=null}function oM(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=RW(n,t,Wr),n!==null){ya=n;return}}else{if(n=jW(n,t),n!==null){n.flags&=32767,ya=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Da=6,ya=null;return}}if(t=t.sibling,t!==null){ya=t;return}ya=t=e}while(t!==null);Da===0&&(Da=5)}function sc(e,t,n){var a=Mn,r=ks.transition;try{ks.transition=null,Mn=1,WW(e,t,n,a)}finally{ks.transition=r,Mn=a}return null}function WW(e,t,n,a){do uu();while(ol!==null);if((wn&6)!==0)throw Error(Ke(327));n=e.finishedWork;var r=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(Ke(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(kV(e,i),e===Ba&&(ya=Ba=null,qa=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||d0||(d0=!0,dM(Ug,function(){return uu(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=ks.transition,ks.transition=null;var o=Mn;Mn=1;var c=wn;wn|=4,h6.current=null,FW(e,n),tM(n,e),uW(g3),Wg=!!h3,g3=h3=null,e.current=n,$W(n),gV(),wn=c,Mn=o,ks.transition=i}else e.current=n;if(d0&&(d0=!1,ol=e,o1=r),i=e.pendingLanes,i===0&&(vl=null),xV(n.stateNode),Pr(e,ga()),t!==null)for(a=e.onRecoverableError,n=0;n<t.length;n++)r=t[n],a(r.value,{componentStack:r.stack,digest:r.digest});if(i1)throw i1=!1,e=R3,R3=null,e;return(o1&1)!==0&&e.tag!==0&&uu(),i=e.pendingLanes,(i&1)!==0?e===j3?Am++:(Am=0,j3=e):Am=0,Fl(),null}function uu(){if(ol!==null){var e=BL(o1),t=ks.transition,n=Mn;try{if(ks.transition=null,Mn=16>e?16:e,ol===null)var a=!1;else{if(e=ol,ol=null,o1=0,(wn&6)!==0)throw Error(Ke(331));var r=wn;for(wn|=4,xt=e.current;xt!==null;){var i=xt,o=i.child;if((xt.flags&16)!==0){var c=i.deletions;if(c!==null){for(var l=0;l<c.length;l++){var d=c[l];for(xt=d;xt!==null;){var u=xt;switch(u.tag){case 0:case 11:case 15:Dm(8,u,i)}var g=u.child;if(g!==null)g.return=u,xt=g;else for(;xt!==null;){u=xt;var y=u.sibling,w=u.return;if(KD(u),u===d){xt=null;break}if(y!==null){y.return=w,xt=y;break}xt=w}}}var v=i.alternate;if(v!==null){var S=v.child;if(S!==null){v.child=null;do{var m=S.sibling;S.sibling=null,S=m}while(S!==null)}}xt=i}}if((i.subtreeFlags&2064)!==0&&o!==null)o.return=i,xt=o;else e:for(;xt!==null;){if(i=xt,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Dm(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,xt=p;break e}xt=i.return}}var b=e.current;for(xt=b;xt!==null;){o=xt;var x=o.child;if((o.subtreeFlags&2064)!==0&&x!==null)x.return=o,xt=x;else e:for(o=b;xt!==null;){if(c=xt,(c.flags&2048)!==0)try{switch(c.tag){case 0:case 11:case 15:qb(9,c)}}catch(N){ua(c,c.return,N)}if(c===o){xt=null;break e}var k=c.sibling;if(k!==null){k.return=c.return,xt=k;break e}xt=c.return}}if(wn=r,Fl(),Si&&typeof Si.onPostCommitFiberRoot=="function")try{Si.onPostCommitFiberRoot($b,e)}catch{}a=!0}return a}finally{Mn=n,ks.transition=t}}return!1}function TC(e,t,n){t=Tu(n,t),t=BD(e,t,1),e=wl(e,t,1),t=_r(),e!==null&&($p(e,1,t),Pr(e,t))}function ua(e,t,n){if(e.tag===3)TC(e,e,n);else for(;t!==null;){if(t.tag===3){TC(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(vl===null||!vl.has(a))){e=Tu(n,e),e=HD(t,e,1),t=wl(t,e,1),e=_r(),t!==null&&($p(t,1,e),Pr(t,e));break}}t=t.return}}function YW(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),t=_r(),e.pingedLanes|=e.suspendedLanes&n,Ba===e&&(qa&n)===n&&(Da===4||Da===3&&(qa&130023424)===qa&&500>ga()-b6?wc(e,0):g6|=n),Pr(e,t)}function lM(e,t){t===0&&((e.mode&1)===0?t=1:(t=e0,e0<<=1,(e0&130023424)===0&&(e0=4194304)));var n=_r();e=yo(e,t),e!==null&&($p(e,t,n),Pr(e,n))}function GW(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lM(e,n)}function qW(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;default:throw Error(Ke(314))}a!==null&&a.delete(t),lM(e,n)}var cM;cM=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ir.current)Ar=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ar=!1,PW(e,t,n);Ar=(e.flags&131072)!==0}else Ar=!1,ta&&(t.flags&1048576)!==0&&mD(t,Kg,t.index);switch(t.lanes=0,t.tag){case 2:var a=t.type;gg(e,t),e=t.pendingProps;var r=Su(t,or.current);du(t,n),r=d6(null,t,a,e,r,n);var i=u6();return t.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Or(a)?(i=!0,Qg(t)):i=!1,t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,s6(t),r.updater=Gb,t.stateNode=r,r._reactInternals=t,k3(t,a,e,n),t=T3(null,t,a,!0,i,n)):(t.tag=0,ta&&i&&K_(t),br(null,t,r,n),t=t.child),t;case 16:a=t.elementType;e:{switch(gg(e,t),e=t.pendingProps,r=a._init,a=r(a._payload),t.type=a,r=t.tag=QW(a),e=Us(a,e),r){case 0:t=E3(null,t,a,e,n);break e;case 1:t=yC(null,t,a,e,n);break e;case 11:t=gC(null,t,a,e,n);break e;case 14:t=bC(null,t,a,Us(a.type,e),n);break e}throw Error(Ke(306,a,""))}return t;case 0:return a=t.type,r=t.pendingProps,r=t.elementType===a?r:Us(a,r),E3(e,t,a,r,n);case 1:return a=t.type,r=t.pendingProps,r=t.elementType===a?r:Us(a,r),yC(e,t,a,r,n);case 3:e:{if(YD(t),e===null)throw Error(Ke(387));a=t.pendingProps,i=t.memoizedState,r=i.element,xD(e,t),t1(t,a,null,n);var o=t.memoizedState;if(a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){r=Tu(Error(Ke(423)),t),t=xC(e,t,a,n,r);break e}else if(a!==r){r=Tu(Error(Ke(424)),t),t=xC(e,t,a,n,r);break e}else for(qr=xl(t.stateNode.containerInfo.firstChild),Xr=t,ta=!0,Ws=null,n=bD(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ku(),a===r){t=xo(e,t,n);break e}br(e,t,a,n)}t=t.child}return t;case 5:return wD(t),e===null&&_3(t),a=t.type,r=t.pendingProps,i=e!==null?e.memoizedProps:null,o=r.children,b3(a,r)?o=null:i!==null&&b3(a,i)&&(t.flags|=32),WD(e,t),br(e,t,o,n),t.child;case 6:return e===null&&_3(t),null;case 13:return GD(e,t,n);case 4:return i6(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Cu(t,null,a,n):br(e,t,a,n),t.child;case 11:return a=t.type,r=t.pendingProps,r=t.elementType===a?r:Us(a,r),gC(e,t,a,r,n);case 7:return br(e,t,t.pendingProps,n),t.child;case 8:return br(e,t,t.pendingProps.children,n),t.child;case 12:return br(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(a=t.type._context,r=t.pendingProps,i=t.memoizedProps,o=r.value,Un(Xg,a._currentValue),a._currentValue=o,i!==null)if(ni(i.value,o)){if(i.children===r.children&&!Ir.current){t=xo(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var c=i.dependencies;if(c!==null){o=i.child;for(var l=c.firstContext;l!==null;){if(l.context===a){if(i.tag===1){l=uo(-1,n&-n),l.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var u=d.pending;u===null?l.next=l:(l.next=u.next,u.next=l),d.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),N3(i.return,n,t),c.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(Ke(341));o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),N3(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}br(e,t,r.children,n),t=t.child}return t;case 9:return r=t.type,a=t.pendingProps.children,du(t,n),r=Es(r),a=a(r),t.flags|=1,br(e,t,a,n),t.child;case 14:return a=t.type,r=Us(a,t.pendingProps),r=Us(a.type,r),bC(e,t,a,r,n);case 15:return UD(e,t,t.type,t.pendingProps,n);case 17:return a=t.type,r=t.pendingProps,r=t.elementType===a?r:Us(a,r),gg(e,t),t.tag=1,Or(a)?(e=!0,Qg(t)):e=!1,du(t,n),$D(t,a,r),k3(t,a,r,n),T3(null,t,a,!0,e,n);case 19:return qD(e,t,n);case 22:return VD(e,t,n)}throw Error(Ke(156,t.tag))};function dM(e,t){return jL(e,t)}function ZW(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ns(e,t,n,a){return new ZW(e,t,n,a)}function v6(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QW(e){if(typeof e=="function")return v6(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$_)return 11;if(e===B_)return 14}return 2}function Nl(e,t){var n=e.alternate;return n===null?(n=Ns(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function xg(e,t,n,a,r,i){var o=2;if(a=e,typeof e=="function")v6(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Bd:return vc(n.children,r,i,t);case F_:o=8,r|=8;break;case Zv:return e=Ns(12,n,t,r|2),e.elementType=Zv,e.lanes=i,e;case Qv:return e=Ns(13,n,t,r),e.elementType=Qv,e.lanes=i,e;case Jv:return e=Ns(19,n,t,r),e.elementType=Jv,e.lanes=i,e;case wL:return Qb(n,r,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case yL:o=10;break e;case xL:o=9;break e;case $_:o=11;break e;case B_:o=14;break e;case Xo:o=16,a=null;break e}throw Error(Ke(130,e==null?e:typeof e,""))}return t=Ns(o,n,t,r),t.elementType=e,t.type=a,t.lanes=i,t}function vc(e,t,n,a){return e=Ns(7,e,a,t),e.lanes=n,e}function Qb(e,t,n,a){return e=Ns(22,e,a,t),e.elementType=wL,e.lanes=n,e.stateNode={isHidden:!1},e}function k2(e,t,n){return e=Ns(6,e,null,t),e.lanes=n,e}function C2(e,t,n){return t=Ns(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function JW(e,t,n,a,r){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=i2(0),this.expirationTimes=i2(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=i2(0),this.identifierPrefix=a,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function _6(e,t,n,a,r,i,o,c,l){return e=new JW(e,t,n,c,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ns(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:a,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},s6(i),e}function KW(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$d,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}function uM(e){if(!e)return Ml;e=e._reactInternals;e:{if(Fc(e)!==e||e.tag!==1)throw Error(Ke(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Or(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ke(171))}if(e.tag===1){var n=e.type;if(Or(n))return uD(e,n,t)}return t}function fM(e,t,n,a,r,i,o,c,l){return e=_6(n,a,!0,e,r,i,o,c,l),e.context=uM(null),n=e.current,a=_r(),r=_l(n),i=uo(a,r),i.callback=t!=null?t:null,wl(n,i,r),e.current.lanes=r,$p(e,r,a),Pr(e,a),e}function Jb(e,t,n,a){var r=t.current,i=_r(),o=_l(r);return n=uM(n),t.context===null?t.context=n:t.pendingContext=n,t=uo(i,o),t.payload={element:e},a=a===void 0?null:a,a!==null&&(t.callback=a),e=wl(r,t,o),e!==null&&(Qs(e,r,o,i),mg(e,r,o)),o}function c1(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function LC(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function N6(e,t){LC(e,t),(e=e.alternate)&&LC(e,t)}function XW(){return null}var mM=typeof reportError=="function"?reportError:function(e){console.error(e)};function S6(e){this._internalRoot=e}Kb.prototype.render=S6.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ke(409));Jb(e,t,null,null)};Kb.prototype.unmount=S6.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dc(function(){Jb(null,e,null,null)}),t[bo]=null}};function Kb(e){this._internalRoot=e}Kb.prototype.unstable_scheduleHydration=function(e){if(e){var t=VL();e={blockedOn:null,target:e,priority:t};for(var n=0;n<al.length&&t!==0&&t<al[n].priority;n++);al.splice(n,0,e),n===0&&YL(e)}};function k6(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xb(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function DC(){}function eY(e,t,n,a,r){if(r){if(typeof a=="function"){var i=a;a=function(){var d=c1(o);i.call(d)}}var o=fM(t,a,e,0,null,!1,!1,"",DC);return e._reactRootContainer=o,e[bo]=o.current,ep(e.nodeType===8?e.parentNode:e),Dc(),o}for(;r=e.lastChild;)e.removeChild(r);if(typeof a=="function"){var c=a;a=function(){var d=c1(l);c.call(d)}}var l=_6(e,0,!1,null,null,!1,!1,"",DC);return e._reactRootContainer=l,e[bo]=l.current,ep(e.nodeType===8?e.parentNode:e),Dc(function(){Jb(t,l,n,a)}),l}function ey(e,t,n,a,r){var i=n._reactRootContainer;if(i){var o=i;if(typeof r=="function"){var c=r;r=function(){var l=c1(o);c.call(l)}}Jb(t,o,e,r)}else o=eY(n,t,e,r,a);return c1(o)}HL=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ym(t.pendingLanes);n!==0&&(V_(t,n|1),Pr(t,ga()),(wn&6)===0&&(Lu=ga()+500,Fl()))}break;case 13:Dc(function(){var a=yo(e,1);if(a!==null){var r=_r();Qs(a,e,1,r)}}),N6(e,1)}};W_=function(e){if(e.tag===13){var t=yo(e,134217728);if(t!==null){var n=_r();Qs(t,e,134217728,n)}N6(e,134217728)}};UL=function(e){if(e.tag===13){var t=_l(e),n=yo(e,t);if(n!==null){var a=_r();Qs(n,e,t,a)}N6(e,t)}};VL=function(){return Mn};WL=function(e,t){var n=Mn;try{return Mn=e,t()}finally{Mn=n}};o3=function(e,t,n){switch(t){case"input":if(e3(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=Vb(a);if(!r)throw Error(Ke(90));_L(a),e3(a,r)}}}break;case"textarea":SL(e,n);break;case"select":t=n.value,t!=null&&iu(e,!!n.multiple,t,!1)}};ML=y6;AL=Dc;var tY={usingClientEntryPoint:!1,Events:[Hp,Wd,Vb,LL,DL,y6]},Uf={findFiberByHostInstance:uc,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},nY={bundleType:Uf.bundleType,version:Uf.version,rendererPackageName:Uf.rendererPackageName,rendererConfig:Uf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ko.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=PL(e),e===null?null:e.stateNode},findFiberByHostInstance:Uf.findFiberByHostInstance||XW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var u0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!u0.isDisabled&&u0.supportsFiber)try{$b=u0.inject(nY),Si=u0}catch{}}rs.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tY;rs.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!k6(t))throw Error(Ke(200));return KW(e,t,null,n)};rs.createRoot=function(e,t){if(!k6(e))throw Error(Ke(299));var n=!1,a="",r=mM;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=_6(e,1,!1,null,null,n,!1,a,r),e[bo]=t.current,ep(e.nodeType===8?e.parentNode:e),new S6(t)};rs.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ke(188)):(e=Object.keys(e).join(","),Error(Ke(268,e)));return e=PL(t),e=e===null?null:e.stateNode,e};rs.flushSync=function(e){return Dc(e)};rs.hydrate=function(e,t,n){if(!Xb(t))throw Error(Ke(200));return ey(null,e,t,!0,n)};rs.hydrateRoot=function(e,t,n){if(!k6(e))throw Error(Ke(405));var a=n!=null&&n.hydratedSources||null,r=!1,i="",o=mM;if(n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=fM(t,null,e,1,n!=null?n:null,r,!1,i,o),e[bo]=t.current,ep(e),a)for(e=0;e<a.length;e++)n=a[e],r=n._getVersion,r=r(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,r]:t.mutableSourceEagerHydrationData.push(n,r);return new Kb(t)};rs.render=function(e,t,n){if(!Xb(t))throw Error(Ke(200));return ey(null,e,t,!1,n)};rs.unmountComponentAtNode=function(e){if(!Xb(e))throw Error(Ke(40));return e._reactRootContainer?(Dc(function(){ey(null,null,e,!1,function(){e._reactRootContainer=null,e[bo]=null})}),!0):!1};rs.unstable_batchedUpdates=y6;rs.unstable_renderSubtreeIntoContainer=function(e,t,n,a){if(!Xb(n))throw Error(Ke(200));if(e==null||e._reactInternals===void 0)throw Error(Ke(38));return ey(e,t,n,!1,a)};rs.version="18.3.1-next-f1338f8080-20240426";function pM(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pM)}catch(e){console.error(e)}}pM(),Rl.exports=rs;var wm=Rl.exports,aY=sL({__proto__:null,default:wm},[Rl.exports]),MC=Rl.exports;Gv.createRoot=MC.createRoot,Gv.hydrateRoot=MC.hydrateRoot;let f0;const rY=new Uint8Array(16);function sY(){if(!f0&&(f0=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!f0))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return f0(rY)}const Wa=[];for(let e=0;e<256;++e)Wa.push((e+256).toString(16).slice(1));function iY(e,t=0){return Wa[e[t+0]]+Wa[e[t+1]]+Wa[e[t+2]]+Wa[e[t+3]]+"-"+Wa[e[t+4]]+Wa[e[t+5]]+"-"+Wa[e[t+6]]+Wa[e[t+7]]+"-"+Wa[e[t+8]]+Wa[e[t+9]]+"-"+Wa[e[t+10]]+Wa[e[t+11]]+Wa[e[t+12]]+Wa[e[t+13]]+Wa[e[t+14]]+Wa[e[t+15]]}const oY=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var AC={randomUUID:oY};function lY(e,t,n){if(AC.randomUUID&&!t&&!e)return AC.randomUUID();e=e||{};const a=e.random||(e.rng||sY)();if(a[6]=a[6]&15|64,a[8]=a[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=a[r];return t}return iY(a)}function _e(){this._baseurl="https://ergo.mkdlabs.com",this._project_id="ergo",this._secret="k5go4l548ch4qk5918x2uljuv8rqqp2as",this._table="",this._custom="",this._method="";const e=this._project_id+":"+this._secret;let t=btoa(e);return this.login=async function(n,a,r){localStorage.getItem("device-uid")||Vf();const i=await fetch(this._baseurl+"/v2/api/lambda/login",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({email:n,password:a,role:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.oauthLoginApi=async function(n,a){localStorage.getItem("device-uid")||Vf(),localStorage.setItem("originalRole","customer");const r=await fetch(`${this._baseurl}/v2/api/lambda/${n}/login?role=${a}`,{method:"GET",headers:{"x-project":t}}),i=await r.text();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.setUUId=async function(){var n;await fetch(this._baseurl+"/v3/api/custom/ergo/device",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({uid:(n=localStorage.getItem("device-uid"))!=null?n:Vf()})})},this.customLogin=async function(n){const a=await fetch(this._baseurl+"/v3/api/ergo/login",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({...n,is_refresh:!0,uid:Vf()})}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.loginTwoFa=async function(n,a,r){const i=await fetch(this._baseurl+"/v2/api/lambda/2fa/login",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({email:n,password:a,role:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.getHeader=function(){return{Authorization:"Bearer "+localStorage.getItem("token"),"x-project":t}},this.baseUrl=function(){return this._baseurl},this.uploadUrl=function(){return this._baseurl+"/v2/api/lambda/upload"},this.upload=function(n){},this.getProfile=async function(){const n=await fetch(this._baseurl+"/v2/api/lambda/profile",{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.getProfileCustom=async function(){const n=await this.fetchJoinTwoTables("user","profile","id","user_id","user.*, profile.dob, profile.about, profile.address_line_1, profile.address_line_2, profile.city, profile.country, profile.settings, profile.getting_started",[`user.id = ${localStorage.getItem("user")}`]);if(!Array.isArray(n.list)&&n.list.length>0)throw new Error("Failed to get user");this.setTable("id_verification");const a=await this.callRestAPI({payload:{user_id:localStorage.getItem("user")},limit:1,page:1,sortId:"id",direction:"DESC"},"PAGINATE");let r={};return Array.isArray(a.list)&&a.list.length>0&&(r.verificationStatus=a.list[0].status,r.verificationType=a.list[0].type,r.verificationImageFront=a.list[0].image_front,r.verificationImageBack=a.list[0].image_back,r.verificationExpiry=a.list[0].expiry_date,r.verificationId=a.list[0].id),{...n.list[0],...r}},this.editProfile=async function(n,a){const r=await fetch(this._baseurl+"/v2/api/lambda/profile",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({payload:{first_name:n,last_name:a}})}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.check=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/check",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({role:n})}),r=await a.json();if(a.status===401)throw new Error(r.message);return r},this.getProfilePreference=async function(){const n=await fetch(this._baseurl+"/v2/api/lambda/preference",{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.updateEmail=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/update/email",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({email:n})}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.updatePassword=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/update/password",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.updateEmailByAdmin=async function(n,a){const r=await fetch(this._baseurl+"/v2/api/lambda/admin/update/email",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({email:n,id:a})}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.updatePasswordByAdmin=async function(n,a){const r=await fetch(this._baseurl+"/v2/api/lambda/admin/update/password",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({password:n,id:a})}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.sendEmail=async function(n,a,r){const i=await fetch(this._baseurl+"/v2/api/lambda/mail/send",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({to:n,from:"info@mkd.com",subject:a,body:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.sendEmailVerification=function(){},this.updateEmailVerification=function(){},this.setTable=function(n){this._table=n},this.getProjectId=function(){return this._project_id},this.logout=async function(){const n=await fetch(this._baseurl+"/v3/api/ergo/logout",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token"),uid:localStorage.getItem("device-uid")},body:JSON.stringify({uid:localStorage.getItem("device-uid")})}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.register=async function(n,a,r){localStorage.getItem("device-uid")||Vf();const i=await fetch(this._baseurl+"/v2/api/lambda/register-email",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({email:n,password:a,role:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.verifyEmail=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/verify-email?token="+n,{method:"get",headers:{"Content-Type":"application/json","x-project":t}}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.forgot=async function(n,a){const r=await fetch(this._baseurl+"/v2/api/lambda/forgot",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({email:n,role:a})}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.reset=async function(n,a,r){const i=await fetch(this._baseurl+"/v2/api/lambda/reset",{method:"post",headers:{"Content-Type":"application/json","x-project":t},body:JSON.stringify({token:n,code:a,password:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.fetchImage=async function(n){return await fetch(this._baseurl+`/v2/api/custom/ergo/s3proxy/${n}`,{method:"GET",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}})},this.callRestAPI=async function(n,a,r){const i={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")};switch(a){case"GET":const o=await fetch(this._baseurl+`/v1/api/rest/${this._table}/GET`,{method:"post",headers:i,body:JSON.stringify(n),signal:r}),c=await o.json();if(o.status===401)throw new Error(c.message);if(o.status===403)throw new Error(c.message);return c;case"POST":const l=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),d=await l.json();if(l.status===401)throw new Error(d.message);if(l.status===403)throw new Error(d.message);return d;case"PUT":const u=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),g=await u.json();if(u.status===401)throw new Error(g.message);if(u.status===403)throw new Error(g.message);return g;case"PUTWHERE":const y=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),w=await y.json();if(y.status===401)throw new Error(w.message);return w;case"DELETE":const v=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),S=await v.json();if(v.status===401)throw new Error(S.message);if(v.status===403)throw new Error(S.message);return S;case"DELETEALL":const m=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),p=await m.json();if(m.status===401)throw new Error(p.message);if(m.status===403)throw new Error(p.message);return p;case"GETALL":const b=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),x=await b.json();if(b.status===401)throw new Error(x.message);if(b.status===403)throw new Error(x.message);return x;case"PAGINATE":n.page||(n.page=1),n.limit||(n.limit=10);const k=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),N=await k.json();if(k.status===401)throw new Error(N.message);if(k.status===403)throw new Error(N.message);return N;case"AUTOCOMPLETE":const _=await fetch(this._baseurl+`/v1/api/rest/${this._table}/${a}`,{method:"post",headers:i,body:JSON.stringify(n)}),C=await _.json();if(_.status===401)throw new Error(C.message);if(_.status===403)throw new Error(C.message);return C}},this.callRawAPI=async function(n,a,r,i){const o={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token"),uid:localStorage.getItem("device-uid")},c=await fetch(this._baseurl+n,{method:r,headers:o,body:JSON.stringify(a),signal:i}),l=await c.json();if(c.status===401)throw new Error(l.message);if(c.status===403)throw new Error(l.message);return l},this.fetchJoinTwoTables=async function(n,a,r,i,o="",c=[1],l="GETALL",d=1,u=1e4){const g={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},y={tables:[n,a],join_id_1:r,join_id_2:i,select:o,where:c,page:d,limit:u},w=await fetch(this._baseurl+`/v1/api/join/${n}/${a}/${l}`,{method:"post",headers:g,body:JSON.stringify(y)}),v=await w.json();if(w.status===401)throw new Error(v.message);if(w.status===403)throw new Error(v.message);return v},this.callMultiJoinRestAPI=async function(n,a,r,i,o,c,l){const d={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")};o||(o=1),c||(c=10);const u=await fetch(this._baseurl+`/v1/api/multi-join/${l}`,{method:"post",headers:d,body:JSON.stringify({tables:n,joinIds:a,selectStr:r,where:i,page:o,limit:c})}),g=await u.json();if(u.status===401)throw new Error(g.message);if(u.status===403)throw new Error(g.message);return g},this.subscribe=function(n){},this.subscribeChannel=function(n,a){},this.subscribeListen=function(n){},this.unSubscribeChannel=function(n,a){},this.broadcast=function(n){},this.exportCSV=async function(){const n={"content-type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},a=await fetch(this._baseurl+`/v1/api/rest/${this._table}/EXPORT`,{method:"post",headers:n}),r=await a.text();let i=document.createElement("a");if(i.href="data:text/csv;charset=utf-8,"+encodeURI(r),i.target="_blank",i.download=this._table+".csv",i.click(),a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message)},this.cmsAdd=async function(n,a,r,i){const o={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},c=await fetch(this._baseurl+"/v2/api/lambda/cms",{method:"post",headers:o,body:JSON.stringify({page:n,key:a,type:r,value:i})}),l=await c.json();if(c.status===401)throw new Error(l.message);if(c.status===403)throw new Error(l.message);return l},this.cmsEdit=async function(n,a,r,i,o){const c={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},l=await fetch(this._baseurl+"/v2/api/lambda/cms/"+n,{method:"put",headers:c,body:JSON.stringify({page:a,key:r,type:i,value:o})}),d=await l.json();if(l.status===401)throw new Error(d.message);if(l.status===403)throw new Error(d.message);return d},this.getToken=function(){return window.localStorage.getItem("token")},this.getChatId=async function(n){const a=await fetch(this._baseurl+`/v2/api/lambda/room?room_id=${n}`,{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.getChats=async function(n,a,r){const i=await fetch(this._baseurl+"/v2/api/lambda/chat",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({room_id:n,chat_id:a,date:r})}),o=await i.json();if(i.status===401)throw new Error(o.message);if(i.status===403)throw new Error(o.message);return o},this.restoreChat=async function(n){await fetch(this._baseurl+`/v2/api/lambda/v2/api/lambda/room/poll?room=${n}`,{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}})},this.postMessage=async function(n){const a=await fetch(this._baseurl+"/v3/api/lambda/realtime/send",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.uploadImage=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/s3/upload",{method:"post",headers:{"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:n}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.createRoom=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/room",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.getAllUsers=async function(){const n=await fetch(this._baseurl+"/v1/api/rest/user/GETALL",{method:"GET",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.startPooling=async function(n,a){const r=await fetch(this._baseurl+`/v3/api/lambda/realtime/room/poll?user_id=${n}`,{method:"GET",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},signal:a}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.addStripeProduct=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/product",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.getStripeProducts=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n),o=new URLSearchParams(a),c=await fetch(this._baseurl+`/v2/api/lambda/stripe/products?${i}&${o}`,{method:"get",headers:r}),l=await c.json();if([401,403,500].includes(c.status))throw new Error(l.message);return l},this.getStripeProduct=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+`/v2/api/lambda/stripe/product/${n}`,{method:"get",headers:a}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.updateStripeProduct=async function(n,a){const r={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=await fetch(this._baseurl+`/v2/api/lambda/stripe/product/${n}`,{method:"put",headers:r,body:JSON.stringify(a)}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.addStripePrice=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/price",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.getStripePrices=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n),o=new URLSearchParams(a),c=await fetch(this._baseurl+`/v2/api/lambda/stripe/prices?${i}&${o}`,{method:"get",headers:r}),l=await c.json();if([401,403,500].includes(c.status))throw new Error(l.message);return l},this.getStripePrice=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+`/v2/api/lambda/stripe/price/${n}`,{method:"get",headers:a}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.updateStripePrice=async function(n,a){const r={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=await fetch(this._baseurl+`/v2/api/lambda/stripe/price/${n}`,{method:"put",headers:r,body:JSON.stringify(a)}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.getStripeSubscriptions=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n),o=new URLSearchParams(a),c=await fetch(this._baseurl+`/v2/api/lambda/stripe/subscriptions?${i}&${o}`,{method:"get",headers:r}),l=await c.json();if([401,403,500].includes(c.status))throw new Error(l.message);return l},this.adminCancelStripeSubscription=async function(n,a){const r=await fetch(this._baseurl+`/v2/api/lambda/stripe/subscription/${n}`,{method:"delete",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(a)}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.adminCreateUsageCharge=async function(n,a){const r=await fetch(this._baseurl+"/v2/api/lambda/stripe/subscription/usage-charge",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({subId:n,quantity:a})}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.getStripeInvoices=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n);new URLSearchParams(a);const o=await fetch(this._baseurl+`/v2/api/lambda/stripe/invoices?${i}`,{method:"get",headers:r}),c=await o.json();if([401,403,500].includes(o.status))throw new Error(c.message);return c},this.getStripeInvoicesV2=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n);new URLSearchParams(a);const o=await fetch(this._baseurl+`/v2/api/lambda/stripe/invoices-v2?${i}`,{method:"get",headers:r}),c=await o.json();if([401,403,500].includes(o.status))throw new Error(c.message);return c},this.getStripeOrders=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n),o=new URLSearchParams(a),c=await fetch(this._baseurl+`/v2/api/lambda/stripe/orders?${i}&${o}`,{method:"get",headers:r}),l=await c.json();if([401,403,500].includes(c.status))throw new Error(l.message);return l},this.initCheckoutSession=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/checkout",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.registerAndSubscribe=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer/register-subscribe",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.createStripeCustomer=async function(n){const a={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer",{method:"post",headers:a,body:JSON.stringify(n)}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.createCustomerStripeCard=async function(n,a){const r={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer/card",{method:"post",headers:r,body:JSON.stringify(n),signal:a}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.createStripeSubscription=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer/subscription",{method:"post",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.getCustomerStripeSubscription=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer/subscription",{method:"get",headers:a}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.getCustomerStripeSubscriptions=async function(n,a){const r={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},i=new URLSearchParams(n),o=new URLSearchParams(a),c=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/subscriptions?${i}&${o}`,{method:"get",headers:r}),l=await c.json();if([401,403,500].includes(c.status))throw new Error(l.message);return l},this.changeStripeSubscription=async function(n){const a=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer/subscription",{method:"put",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.cancelStripeSubscription=async function(n,a){const r=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/subscription/${n}`,{method:"delete",headers:{"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(a)}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.getCustomerStripeDetails=async function(){const n={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},a=await fetch(this._baseurl+"/v2/api/lambda/stripe/customer",{method:"get",headers:n}),r=await a.json();if([401,403,500].includes(a.status))throw new Error(r.message);return r},this.getCustomerStripeCards=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=new URLSearchParams(n),i=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/cards?${r}`,{method:"get",headers:a}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.getCustomerStripeInvoices=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=new URLSearchParams(n),i=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/invoices?${r}`,{method:"get",headers:a}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.getCustomerStripeCharges=async function(n){const a={"x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=new URLSearchParams(n),i=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/charges?${r}`,{method:"get",headers:a}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.getCustomerStripeOrders=async function(n){const a={Authorization:"Bearer "+localStorage.getItem("token"),"x-project":t},r=new URLSearchParams(n),i=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/orders?${r}`,{method:"get",headers:a}),o=await i.json();if([401,403,500].includes(i.status))throw new Error(o.message);return o},this.setStripeCustomerDefaultCard=async function(n){const a={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/card/${n}/set-default`,{method:"put",headers:a}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.deleteCustomerStripeCard=async function(n){const a={"content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},r=await fetch(this._baseurl+`/v2/api/lambda/stripe/customer/card/${n}`,{method:"delete",headers:a}),i=await r.json();if([401,403,500].includes(r.status))throw new Error(i.message);return i},this.getMyRoom=async function(){const n=await fetch(this._baseurl+"/v3/api/lambda/realtime/room/my",{method:"GET",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.getChatId=async function(n){const a=await fetch(this._baseurl+`/v2/api/lambda/room?room_id=${n}`,{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.getChats=async function(n,a){const r=await fetch(this._baseurl+"/v3/api/lambda/realtime/chat",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({room_id:n,date:a})}),i=await r.json();if(r.status===401)throw new Error(i.message);if(r.status===403)throw new Error(i.message);return i},this.restoreChat=async function(n){await fetch(this._baseurl+`/v2/api/lambda/v2/api/lambda/room/poll?room=${n}`,{method:"get",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}})},this.postMessage=async function(n){const a=await fetch(this._baseurl+"/v3/api/lambda/realtime/send",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.createRoom=async function(n){const a=await fetch(this._baseurl+"/v3/api/lambda/realtime/room",{method:"post",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify(n)}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return r},this.getAllUsers=async function(){const n=await fetch(this._baseurl+"/v1/api/rest/user/GETALL",{method:"POST",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")}}),a=await n.json();if(n.status===401)throw new Error(a.message);if(n.status===403)throw new Error(a.message);return a},this.getEmailTemplate=async function(n){const a=await fetch(this._baseurl+"/v2/api/custom/ergo/email/PAGINATE",{method:"POST",headers:{"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},body:JSON.stringify({page:1,limit:1,where:[`slug LIKE '%${n}%'`]})}),r=await a.json();if(a.status===401)throw new Error(r.message);if(a.status===403)throw new Error(r.message);return Array.isArray(r.list)&&r.list.length>0?r.list[0]:{}},this}function Vf(){const e=lY();return localStorage.setItem("device-uid",e),e}var ty={exports:{}},ny={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var cY=h.exports,dY=Symbol.for("react.element"),uY=Symbol.for("react.fragment"),fY=Object.prototype.hasOwnProperty,mY=cY.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pY={key:!0,ref:!0,__self:!0,__source:!0};function hM(e,t,n){var a,r={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(a in t)fY.call(t,a)&&!pY.hasOwnProperty(a)&&(r[a]=t[a]);if(e&&e.defaultProps)for(a in t=e.defaultProps,t)r[a]===void 0&&(r[a]=t[a]);return{$$typeof:dY,type:e,key:i,ref:o,props:r,_owner:mY.current}}ny.Fragment=uY;ny.jsx=hM;ny.jsxs=hM;ty.exports=ny;const s=ty.exports.jsx,f=ty.exports.jsxs,Se=ty.exports.Fragment,Ee=R.createContext({state:{}}),hY={isAuthenticated:!1,user:null,token:null,role:null,originalRole:null,sessionExpired:!1,allowCheckVerification:!1},gY=(e,t)=>{var n;switch(t.type){case"LOGIN":return localStorage.setItem("user",Number(t.payload.user_id)),localStorage.setItem("token",(n=t.payload.token)!=null?n:t.payload.access_token),localStorage.setItem("role",t.payload.role),localStorage.setItem("originalRole",t.payload.originalRole===void 0||t.payload.originalRole==="undefined"?"customer":t.payload.originalRole),{...e,isAuthenticated:!0,user:Number(localStorage.getItem("user")),token:localStorage.getItem("token"),role:localStorage.getItem("role"),originalRole:localStorage.getItem("originalRole")};case"LOGOUT":return localStorage.removeItem("user"),localStorage.removeItem("token"),{...e,isAuthenticated:!1,user:null,sessionExpired:!1,role:null,originalRole:null};case"SESSION_EXPIRED":return{...e,sessionExpired:!0};case"SWITCH_TO_HOST":return localStorage.setItem("role","host"),{...e,role:"host"};case"SWITCH_TO_CUSTOMER":return localStorage.setItem("role","customer"),{...e,role:"customer"};case"SWITCH_TO_ADMIN":return localStorage.setItem("role","admin"),{...e,role:"admin"};case"ALLOW_CHECK_VERIFICATION":return{...e,allowCheckVerification:!0};case"DISALLOW_CHECK_VERIFICATION":return{...e,allowCheckVerification:!1};default:return e}};let bY=new _e;const me=(e,t)=>{localStorage.getItem("role"),t==="TOKEN_EXPIRED"&&e({type:"SESSION_EXPIRED"})},yY=({children:e})=>{const[t,n]=h.exports.useReducer(gY,hY),[a,r]=h.exports.useState(!0);return R.useEffect(()=>{const i=localStorage.getItem("user"),o=localStorage.getItem("token"),c=localStorage.getItem("role"),l=localStorage.getItem("originalRole");if(!o){r(!1);return}(async function(){r(!0);try{await bY.check(l),n({type:"LOGIN",payload:{user_id:i,token:o,role:c,originalRole:l}})}catch{c?(n({type:"LOGOUT"}),window.location.href="/"+c+"/login"):(n({type:"LOGOUT"}),window.location.href="/")}r(!1)})()},[]),a?s("div",{className:"popup-container flex items-center justify-center",children:s("div",{className:"",children:s("svg",{style:{margin:"auto",background:"transparent",display:" block",shapeRendering:"auto"},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",className:"md:w-[100px] md:h-[100px] w-[80px] h-[80px]",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"6",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(0.8)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.882051282051282s",keyTimes:"0;1",values:"0;256.58892822265625"})})})})}):s(Ee.Provider,{value:{state:t,dispatch:n},children:e})},we=R.createContext({}),xY={globalMessage:"",globalMessageType:"",isOpen:!0,show:!1,path:"",location:"",saveChanges:!1,deleted:!1,loading:!1,error:!1,errorHeading:"",errorMsg:"",confirmation:!1,confirmationHeading:"",confirmationMsg:"",confirmationCloseFn:void 0,adminNotificationCount:0,unreadMessages:0,isLocationSet:!1,userLocationData:{},user:{},spaceCategories:[],notVerifiedModal:!1,menuIconOpen:!1,addPaymentMethodModal:!1,addPayoutMethodModal:!1,tourOpen:!1},wY=(e,t)=>{var n;switch(t.type){case"SNACKBAR":return{...e,globalMessage:t.payload.message,globalMessageType:t.payload.type};case"SETPATH":return{...e,path:t.payload.path};case"SETLOCATION":let a=t.payload.location;return t.payload.location.includes("undefined")&&(a=t.payload.location.split(",")[0].trim()),{...e,location:a};case"OPEN_SIDEBAR":return{...e,isOpen:t.payload.isOpen};case"SHOWMODAL":return{...e,showModal:t.payload.showModal,modalShowMessage:t.payload.modalShowMessage,modalBtnText:t.payload.modalBtnText,modalShowTitle:t.payload.modalShowTitle,type:t.payload.type,itemId:t.payload.itemId,itemId2:t.payload.itemId2,table1:t.payload.table1,table2:t.payload.table2,backTo:t.payload.backTo};case"SAVE_CHANGES":return{...e,saveChanges:t.payload.saveChanges};case"DELETED":return{...e,deleted:t.payload.deleted};case"SHOW_REVIEW":return{...e,review:t.payload.review,showReview:t.payload.showReview};case"START_LOADING":return{...e,loading:!0};case"STOP_LOADING":return{...e,loading:!1};case"SHOW_ERROR":if(t.payload.message=="TOKEN_EXPIRED"){const r=(n=localStorage.getItem("role"))!=null?n:"customer";return localStorage.clear(),location.href="/"+r+"/login",e}return{...e,error:!0,errorHeading:t.payload.heading,errorMsg:t.payload.message};case"CLOSE_ERROR":return{...e,error:!1,errorHeading:"",errorMsg:""};case"SHOW_CONFIRMATION":return{...e,confirmation:!0,confirmationHeading:t.payload.heading,confirmationMsg:t.payload.message,confirmationBtn:t.payload.btn,confirmationCloseFn:t.payload.onClose};case"CLOSE_CONFIRMATION":return{...e,confirmation:!1,confirmationHeading:"",confirmationMsg:"",confirmationBtn:"",confirmationCloseFn:void 0};case"SET_NOTIFICATION_COUNT":return{...e,adminNotificationCount:t.payload};case"SET_USER_CURRENT_LOCATION":return{...e,isLocationSet:!0,userLocationData:t.payload};case"SET_UNREAD_MESSAGES_COUNT":return{...e,unreadMessages:t.payload};case"SET_USER_DATA":return{...e,user:t.payload};case"CLEAR_USER_DATA":return{...e,user:{}};case"SET_SPACE_CATEGORIES":return{...e,spaceCategories:t.payload};case"OPEN_NOT_VERIFIED_MODAL":return{...e,notVerifiedModal:!0};case"CLOSE_NOT_VERIFIED_MODAL":return{...e,notVerifiedModal:!1};case"OPEN_MENU_ICON":return{...e,menuIconOpen:!0};case"CLOSE_MENU_ICON":return{...e,menuIconOpen:!1};case"OPEN_ADD_PAYMENT_METHOD":return{...e,addPaymentMethodModal:!0};case"CLOSE_ADD_PAYMENT_METHOD":return{...e,addPaymentMethodModal:!1};case"START_TOUR":return{...e,tourOpen:!0};case"END_TOUR":return{...e,tourOpen:!1};default:return e}},pe=(e,t,n=3e3,a)=>{e({type:"SNACKBAR",payload:{type:a,message:t}}),setTimeout(()=>{e({type:"SNACKBAR",payload:{type:"",message:""}})},n)},vY=({children:e})=>{const[t,n]=h.exports.useReducer(wY,xY);return s(we.Provider,{value:{state:t,dispatch:n},children:e})};/**
* @remix-run/router v1.16.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function cp(){return cp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},cp.apply(this,arguments)}var ll;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ll||(ll={}));const IC="popstate";function _Y(e){e===void 0&&(e={});function t(a,r){let{pathname:i,search:o,hash:c}=a.location;return $3("",{pathname:i,search:o,hash:c},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(a,r){return typeof r=="string"?r:d1(r)}return SY(t,n,null,e)}function na(e,t){if(e===!1||e===null||typeof e=="undefined")throw new Error(t)}function gM(e,t){if(!e){typeof console!="undefined"&&console.warn(t);try{throw new Error(t)}catch{}}}function NY(){return Math.random().toString(36).substr(2,8)}function OC(e,t){return{usr:e.state,key:e.key,idx:t}}function $3(e,t,n,a){return n===void 0&&(n=null),cp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ku(t):t,{state:n,key:t&&t.key||a||NY()})}function d1(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function Ku(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function SY(e,t,n,a){a===void 0&&(a={});let{window:r=document.defaultView,v5Compat:i=!1}=a,o=r.history,c=ll.Pop,l=null,d=u();d==null&&(d=0,o.replaceState(cp({},o.state,{idx:d}),""));function u(){return(o.state||{idx:null}).idx}function g(){c=ll.Pop;let m=u(),p=m==null?null:m-d;d=m,l&&l({action:c,location:S.location,delta:p})}function y(m,p){c=ll.Push;let b=$3(S.location,m,p);n&&n(b,m),d=u()+1;let x=OC(b,d),k=S.createHref(b);try{o.pushState(x,"",k)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;r.location.assign(k)}i&&l&&l({action:c,location:S.location,delta:1})}function w(m,p){c=ll.Replace;let b=$3(S.location,m,p);n&&n(b,m),d=u();let x=OC(b,d),k=S.createHref(b);o.replaceState(x,"",k),i&&l&&l({action:c,location:S.location,delta:0})}function v(m){let p=r.location.origin!=="null"?r.location.origin:r.location.href,b=typeof m=="string"?m:d1(m);return b=b.replace(/ $/,"%20"),na(p,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,p)}let S={get action(){return c},get location(){return e(r,o)},listen(m){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(IC,g),l=m,()=>{r.removeEventListener(IC,g),l=null}},createHref(m){return t(r,m)},createURL:v,encodeLocation(m){let p=v(m);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:y,replace:w,go(m){return o.go(m)}};return S}var PC;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(PC||(PC={}));function kY(e,t,n){n===void 0&&(n="/");let a=typeof t=="string"?Ku(t):t,r=Du(a.pathname||"/",n);if(r==null)return null;let i=bM(e);CY(i);let o=null;for(let c=0;o==null&&c<i.length;++c){let l=jY(r);o=PY(i[c],l)}return o}function bM(e,t,n,a){t===void 0&&(t=[]),n===void 0&&(n=[]),a===void 0&&(a="");let r=(i,o,c)=>{let l={relativePath:c===void 0?i.path||"":c,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(na(l.relativePath.startsWith(a),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(a.length));let d=Sl([a,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(na(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),bM(i.children,t,u,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:IY(d,i.index),routesMeta:u})};return e.forEach((i,o)=>{var c;if(i.path===""||!((c=i.path)!=null&&c.includes("?")))r(i,o);else for(let l of yM(i.path))r(i,o,l)}),t}function yM(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,r=n.endsWith("?"),i=n.replace(/\?$/,"");if(a.length===0)return r?[i,""]:[i];let o=yM(a.join("/")),c=[];return c.push(...o.map(l=>l===""?i:[i,l].join("/"))),r&&c.push(...o),c.map(l=>e.startsWith("/")&&l===""?"/":l)}function CY(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:OY(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}const EY=/^:[\w-]+$/,TY=3,LY=2,DY=1,MY=10,AY=-2,RC=e=>e==="*";function IY(e,t){let n=e.split("/"),a=n.length;return n.some(RC)&&(a+=AY),t&&(a+=LY),n.filter(r=>!RC(r)).reduce((r,i)=>r+(EY.test(i)?TY:i===""?DY:MY),a)}function OY(e,t){return e.length===t.length&&e.slice(0,-1).every((a,r)=>a===t[r])?e[e.length-1]-t[t.length-1]:0}function PY(e,t){let{routesMeta:n}=e,a={},r="/",i=[];for(let o=0;o<n.length;++o){let c=n[o],l=o===n.length-1,d=r==="/"?t:t.slice(r.length)||"/",u=u1({path:c.relativePath,caseSensitive:c.caseSensitive,end:l},d);if(!u)return null;Object.assign(a,u.params);let g=c.route;i.push({params:a,pathname:Sl([r,u.pathname]),pathnameBase:BY(Sl([r,u.pathnameBase])),route:g}),u.pathnameBase!=="/"&&(r=Sl([r,u.pathnameBase]))}return i}function u1(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=RY(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let i=r[0],o=i.replace(/(.)\/+$/,"$1"),c=r.slice(1);return{params:a.reduce((d,u,g)=>{let{paramName:y,isOptional:w}=u;if(y==="*"){let S=c[g]||"";o=i.slice(0,i.length-S.length).replace(/(.)\/+$/,"$1")}const v=c[g];return w&&!v?d[y]=void 0:d[y]=(v||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:o,pattern:e}}function RY(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),gM(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,c,l)=>(a.push({paramName:c,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),a]}function jY(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gM(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Du(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function zY(e,t){t===void 0&&(t="/");let{pathname:n,search:a="",hash:r=""}=typeof e=="string"?Ku(e):e;return{pathname:n?n.startsWith("/")?n:FY(n,t):t,search:HY(a),hash:UY(r)}}function FY(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function E2(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function $Y(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function C6(e,t){let n=$Y(e);return t?n.map((a,r)=>r===e.length-1?a.pathname:a.pathnameBase):n.map(a=>a.pathnameBase)}function E6(e,t,n,a){a===void 0&&(a=!1);let r;typeof e=="string"?r=Ku(e):(r=cp({},e),na(!r.pathname||!r.pathname.includes("?"),E2("?","pathname","search",r)),na(!r.pathname||!r.pathname.includes("#"),E2("#","pathname","hash",r)),na(!r.search||!r.search.includes("#"),E2("#","search","hash",r)));let i=e===""||r.pathname==="",o=i?"/":r.pathname,c;if(o==null)c=n;else{let g=t.length-1;if(!a&&o.startsWith("..")){let y=o.split("/");for(;y[0]==="..";)y.shift(),g-=1;r.pathname=y.join("/")}c=g>=0?t[g]:"/"}let l=zY(r,c),d=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||u)&&(l.pathname+="/"),l}const Sl=e=>e.join("/").replace(/\/\/+/g,"/"),BY=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HY=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,UY=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function VY(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const WY=["post","put","patch","delete"];[...WY];/**
* React Router v6.23.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function dp(){return dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},dp.apply(this,arguments)}const ay=h.exports.createContext(null),xM=h.exports.createContext(null),Co=h.exports.createContext(null),ry=h.exports.createContext(null),Ai=h.exports.createContext({outlet:null,matches:[],isDataRoute:!1}),wM=h.exports.createContext(null);function YY(e,t){let{relative:n}=t===void 0?{}:t;$c()||na(!1);let{basename:a,navigator:r}=h.exports.useContext(Co),{hash:i,pathname:o,search:c}=sy(e,{relative:n}),l=o;return a!=="/"&&(l=o==="/"?a:Sl([a,o])),r.createHref({pathname:l,search:c,hash:i})}function $c(){return h.exports.useContext(ry)!=null}function An(){return $c()||na(!1),h.exports.useContext(ry).location}function GY(e){$c()||na(!1);let{pathname:t}=An();return h.exports.useMemo(()=>u1(e,t),[t,e])}function vM(e){h.exports.useContext(Co).static||h.exports.useLayoutEffect(e)}function je(){let{isDataRoute:e}=h.exports.useContext(Ai);return e?oG():qY()}function qY(){$c()||na(!1);let e=h.exports.useContext(ay),{basename:t,future:n,navigator:a}=h.exports.useContext(Co),{matches:r}=h.exports.useContext(Ai),{pathname:i}=An(),o=JSON.stringify(C6(r,n.v7_relativeSplatPath)),c=h.exports.useRef(!1);return vM(()=>{c.current=!0}),h.exports.useCallback(function(d,u){if(u===void 0&&(u={}),!c.current)return;if(typeof d=="number"){a.go(d);return}let g=E6(d,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:Sl([t,g.pathname])),(u.replace?a.replace:a.push)(g,u.state,u)},[t,a,o,i,e])}const _M=h.exports.createContext(null);function Mu(){return h.exports.useContext(_M)}function ZY(e){let t=h.exports.useContext(Ai).outlet;return t&&h.exports.createElement(_M.Provider,{value:e},t)}function Mt(){let{matches:e}=h.exports.useContext(Ai),t=e[e.length-1];return t?t.params:{}}function sy(e,t){let{relative:n}=t===void 0?{}:t,{future:a}=h.exports.useContext(Co),{matches:r}=h.exports.useContext(Ai),{pathname:i}=An(),o=JSON.stringify(C6(r,a.v7_relativeSplatPath));return h.exports.useMemo(()=>E6(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function QY(e,t){return JY(e,t)}function JY(e,t,n,a){$c()||na(!1);let{navigator:r}=h.exports.useContext(Co),{matches:i}=h.exports.useContext(Ai),o=i[i.length-1],c=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let d=An(),u;if(t){var g;let m=typeof t=="string"?Ku(t):t;l==="/"||((g=m.pathname)==null?void 0:g.startsWith(l))||na(!1),u=m}else u=d;let y=u.pathname||"/",w=y;if(l!=="/"){let m=l.replace(/^\//,"").split("/"),p=y.replace(/^\//,"").split("/");w="/"+p.slice(m.length).join("/")}let v=kY(e,{pathname:w}),S=nG(v&&v.map(m=>Object.assign({},m,{params:Object.assign({},c,m.params),pathname:Sl([l,r.encodeLocation?r.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?l:Sl([l,r.encodeLocation?r.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),i,n,a);return t&&S?h.exports.createElement(ry.Provider,{value:{location:dp({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:ll.Pop}},S):S}function KY(){let e=iG(),t=VY(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return h.exports.createElement(h.exports.Fragment,null,h.exports.createElement("h2",null,"Unexpected Application Error!"),h.exports.createElement("h3",{style:{fontStyle:"italic"}},t),n?h.exports.createElement("pre",{style:r},n):null,i)}const XY=h.exports.createElement(KY,null);class eG extends h.exports.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?h.exports.createElement(Ai.Provider,{value:this.props.routeContext},h.exports.createElement(wM.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tG(e){let{routeContext:t,match:n,children:a}=e,r=h.exports.useContext(ay);return r&&r.static&&r.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=n.route.id),h.exports.createElement(Ai.Provider,{value:t},a)}function nG(e,t,n,a){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),a===void 0&&(a=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let o=e,c=(r=n)==null?void 0:r.errors;if(c!=null){let u=o.findIndex(g=>g.route.id&&(c==null?void 0:c[g.route.id])!==void 0);u>=0||na(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,d=-1;if(n&&a&&a.v7_partialHydration)for(let u=0;u<o.length;u++){let g=o[u];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(d=u),g.route.id){let{loaderData:y,errors:w}=n,v=g.route.loader&&y[g.route.id]===void 0&&(!w||w[g.route.id]===void 0);if(g.route.lazy||v){l=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((u,g,y)=>{let w,v=!1,S=null,m=null;n&&(w=c&&g.route.id?c[g.route.id]:void 0,S=g.route.errorElement||XY,l&&(d<0&&y===0?(lG("route-fallback",!1),v=!0,m=null):d===y&&(v=!0,m=g.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,y+1)),b=()=>{let x;return w?x=S:v?x=m:g.route.Component?x=h.exports.createElement(g.route.Component,null):g.route.element?x=g.route.element:x=u,h.exports.createElement(tG,{match:g,routeContext:{outlet:u,matches:p,isDataRoute:n!=null},children:x})};return n&&(g.route.ErrorBoundary||g.route.errorElement||y===0)?h.exports.createElement(eG,{location:n.location,revalidation:n.revalidation,component:S,error:w,children:b(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):b()},null)}var NM=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(NM||{}),f1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(f1||{});function aG(e){let t=h.exports.useContext(ay);return t||na(!1),t}function rG(e){let t=h.exports.useContext(xM);return t||na(!1),t}function sG(e){let t=h.exports.useContext(Ai);return t||na(!1),t}function SM(e){let t=sG(),n=t.matches[t.matches.length-1];return n.route.id||na(!1),n.route.id}function iG(){var e;let t=h.exports.useContext(wM),n=rG(f1.UseRouteError),a=SM(f1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[a]}function oG(){let{router:e}=aG(NM.UseNavigateStable),t=SM(f1.UseNavigateStable),n=h.exports.useRef(!1);return vM(()=>{n.current=!0}),h.exports.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r=="number"?e.navigate(r):e.navigate(r,dp({fromRouteId:t},i)))},[e,t])}const jC={};function lG(e,t,n){!t&&!jC[e]&&(jC[e]=!0)}const cG="startTransition";Ll[cG];function wr(e){let{to:t,replace:n,state:a,relative:r}=e;$c()||na(!1);let{future:i,static:o}=h.exports.useContext(Co),{matches:c}=h.exports.useContext(Ai),{pathname:l}=An(),d=je(),u=E6(t,C6(c,i.v7_relativeSplatPath),l,r==="path"),g=JSON.stringify(u);return h.exports.useEffect(()=>d(JSON.parse(g),{replace:n,state:a,relative:r}),[d,g,r,n,a]),null}function Xu(e){return ZY(e.context)}function xe(e){na(!1)}function dG(e){let{basename:t="/",children:n=null,location:a,navigationType:r=ll.Pop,navigator:i,static:o=!1,future:c}=e;$c()&&na(!1);let l=t.replace(/^\/*/,"/"),d=h.exports.useMemo(()=>({basename:l,navigator:i,static:o,future:dp({v7_relativeSplatPath:!1},c)}),[l,c,i,o]);typeof a=="string"&&(a=Ku(a));let{pathname:u="/",search:g="",hash:y="",state:w=null,key:v="default"}=a,S=h.exports.useMemo(()=>{let m=Du(u,l);return m==null?null:{location:{pathname:m,search:g,hash:y,state:w,key:v},navigationType:r}},[l,u,g,y,w,v,r]);return S==null?null:h.exports.createElement(Co.Provider,{value:d},h.exports.createElement(ry.Provider,{children:n,value:S}))}function m0(e){let{children:t,location:n}=e;return QY(B3(t),n)}new Promise(()=>{});function B3(e,t){t===void 0&&(t=[]);let n=[];return h.exports.Children.forEach(e,(a,r)=>{if(!h.exports.isValidElement(a))return;let i=[...t,r];if(a.type===h.exports.Fragment){n.push.apply(n,B3(a.props.children,i));return}a.type!==xe&&na(!1),!a.props.index||!a.props.children||na(!1);let o={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(o.children=B3(a.props.children,i)),n.push(o)}),n}/**
* React Router DOM v6.23.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function m1(){return m1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},m1.apply(this,arguments)}function kM(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,i;for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function uG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function fG(e,t){return e.button===0&&(!t||t==="_self")&&!uG(e)}function Au(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(r=>[n,r]):[[n,a]])},[]))}function mG(e,t){let n=Au(e);return t&&t.forEach((a,r)=>{n.has(r)||t.getAll(r).forEach(i=>{n.append(r,i)})}),n}const pG=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],hG=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],gG="6";try{window.__reactRouterVersion=gG}catch{}const bG=h.exports.createContext({isTransitioning:!1}),yG="startTransition",zC=Ll[yG],xG="flushSync";aY[xG];const wG="useId";Ll[wG];function vG(e){let{basename:t,children:n,future:a,window:r}=e,i=h.exports.useRef();i.current==null&&(i.current=_Y({window:r,v5Compat:!0}));let o=i.current,[c,l]=h.exports.useState({action:o.action,location:o.location}),{v7_startTransition:d}=a||{},u=h.exports.useCallback(g=>{d&&zC?zC(()=>l(g)):l(g)},[l,d]);return h.exports.useLayoutEffect(()=>o.listen(u),[o,u]),h.exports.createElement(dG,{basename:t,children:n,location:c.location,navigationType:c.action,navigator:o,future:a})}const _G=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",NG=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$e=h.exports.forwardRef(function(t,n){let{onClick:a,relative:r,reloadDocument:i,replace:o,state:c,target:l,to:d,preventScrollReset:u,unstable_viewTransition:g}=t,y=kM(t,pG),{basename:w}=h.exports.useContext(Co),v,S=!1;if(typeof d=="string"&&NG.test(d)&&(v=d,_G))try{let x=new URL(window.location.href),k=d.startsWith("//")?new URL(x.protocol+d):new URL(d),N=Du(k.pathname,w);k.origin===x.origin&&N!=null?d=N+k.search+k.hash:S=!0}catch{}let m=YY(d,{relative:r}),p=kG(d,{replace:o,state:c,target:l,preventScrollReset:u,relative:r,unstable_viewTransition:g});function b(x){a&&a(x),x.defaultPrevented||p(x)}return h.exports.createElement("a",m1({},y,{href:v||m,onClick:S||i?a:b,ref:n,target:l}))}),Kd=h.exports.forwardRef(function(t,n){let{"aria-current":a="page",caseSensitive:r=!1,className:i="",end:o=!1,style:c,to:l,unstable_viewTransition:d,children:u}=t,g=kM(t,hG),y=sy(l,{relative:g.relative}),w=An(),v=h.exports.useContext(xM),{navigator:S,basename:m}=h.exports.useContext(Co),p=v!=null&&CG(y)&&d===!0,b=S.encodeLocation?S.encodeLocation(y).pathname:y.pathname,x=w.pathname,k=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;r||(x=x.toLowerCase(),k=k?k.toLowerCase():null,b=b.toLowerCase()),k&&m&&(k=Du(k,m)||k);const N=b!=="/"&&b.endsWith("/")?b.length-1:b.length;let _=x===b||!o&&x.startsWith(b)&&x.charAt(N)==="/",C=k!=null&&(k===b||!o&&k.startsWith(b)&&k.charAt(b.length)==="/"),E={isActive:_,isPending:C,isTransitioning:p},T=_?a:void 0,D;typeof i=="function"?D=i(E):D=[i,_?"active":null,C?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let P=typeof c=="function"?c(E):c;return h.exports.createElement($e,m1({},g,{"aria-current":T,className:D,ref:n,style:P,to:l,unstable_viewTransition:d}),typeof u=="function"?u(E):u)});var H3;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(H3||(H3={}));var FC;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(FC||(FC={}));function SG(e){let t=h.exports.useContext(ay);return t||na(!1),t}function kG(e,t){let{target:n,replace:a,state:r,preventScrollReset:i,relative:o,unstable_viewTransition:c}=t===void 0?{}:t,l=je(),d=An(),u=sy(e,{relative:o});return h.exports.useCallback(g=>{if(fG(g,n)){g.preventDefault();let y=a!==void 0?a:d1(d)===d1(u);l(e,{replace:y,state:r,preventScrollReset:i,relative:o,unstable_viewTransition:c})}},[d,l,u,a,r,n,e,i,o,c])}function lt(e){let t=h.exports.useRef(Au(e)),n=h.exports.useRef(!1),a=An(),r=h.exports.useMemo(()=>mG(a.search,n.current?null:t.current),[a.search]),i=je(),o=h.exports.useCallback((c,l)=>{const d=Au(typeof c=="function"?c(r):c);n.current=!0,i("?"+d,l)},[i,r]);return[r,o]}function CG(e,t){t===void 0&&(t={});let n=h.exports.useContext(bG);n==null&&na(!1);let{basename:a}=SG(H3.useViewTransitionState),r=sy(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Du(n.currentLocation.pathname,a)||n.currentLocation.pathname,o=Du(n.nextLocation.pathname,a)||n.nextLocation.pathname;return u1(r.pathname,o)!=null||u1(r.pathname,i)!=null}const EG=()=>{const{state:e,dispatch:t}=R.useContext(we);return e.globalMessage.length>0?f("div",{id:"mkd-toast",className:`toast-animation border-l-8 fixed ${e.globalMessageType=="ERROR"?"border-red-500 text-red-600":"border-green-600"} shadow-xl absolute top-5 right-5 flex items-center w-full max-w-xs p-4 text-gray-500 bg-white rounded-lg dark:text-gray-400`,role:"alert",style:{zIndex:"200"},children:[s("div",{className:"text-sm font-normal",children:e.globalMessage}),s("div",{className:"flex items-center ml-auto space-x-2",children:f("button",{type:"button",className:"bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:hover:bg-gray-700","aria-label":"Close",onClick:()=>{t({type:"SNACKBAR",payload:{message:"",type:""}})},children:[s("span",{className:"sr-only",children:"Close"}),s("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:s("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})]}):null};/*! @license DOMPurify 3.1.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.5/LICENSE */const{entries:CM,setPrototypeOf:$C,isFrozen:TG,getPrototypeOf:LG,getOwnPropertyDescriptor:DG}=Object;let{freeze:kr,seal:Ls,create:EM}=Object,{apply:U3,construct:V3}=typeof Reflect!="undefined"&&Reflect;kr||(kr=function(t){return t});Ls||(Ls=function(t){return t});U3||(U3=function(t,n,a){return t.apply(n,a)});V3||(V3=function(t,n){return new t(...n)});const p0=ns(Array.prototype.forEach),BC=ns(Array.prototype.pop),Wf=ns(Array.prototype.push),wg=ns(String.prototype.toLowerCase),T2=ns(String.prototype.toString),HC=ns(String.prototype.match),Yf=ns(String.prototype.replace),MG=ns(String.prototype.indexOf),AG=ns(String.prototype.trim),Hs=ns(Object.prototype.hasOwnProperty),pr=ns(RegExp.prototype.test),Gf=IG(TypeError);function ns(e){return function(t){for(var n=arguments.length,a=new Array(n>1?n-1:0),r=1;r<n;r++)a[r-1]=arguments[r];return U3(e,t,a)}}function IG(e){return function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return V3(e,n)}}function an(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wg;$C&&$C(e,null);let a=t.length;for(;a--;){let r=t[a];if(typeof r=="string"){const i=n(r);i!==r&&(TG(t)||(t[a]=i),r=i)}e[r]=!0}return e}function OG(e){for(let t=0;t<e.length;t++)Hs(e,t)||(e[t]=null);return e}function ic(e){const t=EM(null);for(const[n,a]of CM(e))Hs(e,n)&&(Array.isArray(a)?t[n]=OG(a):a&&typeof a=="object"&&a.constructor===Object?t[n]=ic(a):t[n]=a);return t}function h0(e,t){for(;e!==null;){const a=DG(e,t);if(a){if(a.get)return ns(a.get);if(typeof a.value=="function")return ns(a.value)}e=LG(e)}function n(){return null}return n}const UC=kr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),L2=kr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),D2=kr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),PG=kr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),M2=kr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),RG=kr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),VC=kr(["#text"]),WC=kr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),A2=kr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),YC=kr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),g0=kr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),jG=Ls(/\{\{[\w\W]*|[\w\W]*\}\}/gm),zG=Ls(/<%[\w\W]*|[\w\W]*%>/gm),FG=Ls(/\${[\w\W]*}/gm),$G=Ls(/^data-[\-\w.\u00B7-\uFFFF]/),BG=Ls(/^aria-[\-\w]+$/),TM=Ls(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),HG=Ls(/^(?:\w+script|data):/i),UG=Ls(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),LM=Ls(/^html$/i),VG=Ls(/^[a-z][.\w]*(-[.\w]+)+$/i);var GC=Object.freeze({__proto__:null,MUSTACHE_EXPR:jG,ERB_EXPR:zG,TMPLIT_EXPR:FG,DATA_ATTR:$G,ARIA_ATTR:BG,IS_ALLOWED_URI:TM,IS_SCRIPT_OR_DATA:HG,ATTR_WHITESPACE:UG,DOCTYPE_NAME:LM,CUSTOM_ELEMENT:VG});const qf={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},WG=function(){return typeof window=="undefined"?null:window},YG=function(t,n){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let a=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(a=n.getAttribute(r));const i="dompurify"+(a?"#"+a:"");try{return t.createPolicy(i,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+i+" could not be created."),null}};function DM(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:WG();const t=qe=>DM(qe);if(t.version="3.1.5",t.removed=[],!e||!e.document||e.document.nodeType!==qf.document)return t.isSupported=!1,t;let{document:n}=e;const a=n,r=a.currentScript,{DocumentFragment:i,HTMLTemplateElement:o,Node:c,Element:l,NodeFilter:d,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:g,DOMParser:y,trustedTypes:w}=e,v=l.prototype,S=h0(v,"cloneNode"),m=h0(v,"nextSibling"),p=h0(v,"childNodes"),b=h0(v,"parentNode");if(typeof o=="function"){const qe=n.createElement("template");qe.content&&qe.content.ownerDocument&&(n=qe.content.ownerDocument)}let x,k="";const{implementation:N,createNodeIterator:_,createDocumentFragment:C,getElementsByTagName:E}=n,{importNode:T}=a;let D={};t.isSupported=typeof CM=="function"&&typeof b=="function"&&N&&N.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:P,ERB_EXPR:M,TMPLIT_EXPR:O,DATA_ATTR:F,ARIA_ATTR:z,IS_SCRIPT_OR_DATA:H,ATTR_WHITESPACE:A,CUSTOM_ELEMENT:j}=GC;let{IS_ALLOWED_URI:I}=GC,B=null;const Y=an({},[...UC,...L2,...D2,...M2,...VC]);let U=null;const W=an({},[...WC,...A2,...YC,...g0]);let V=Object.seal(EM(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),X=null,ne=null,oe=!0,q=!0,te=!1,G=!0,J=!1,K=!0,Q=!1,Z=!1,se=!1,ce=!1,le=!1,ae=!1,ie=!0,de=!1;const fe="user-content-";let be=!0,he=!1,ve={},Ce=null;const nt=an({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Ae=null;const Je=an({},["audio","video","img","source","image","track"]);let ze=null;const We=an({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),bt="http://www.w3.org/1998/Math/MathML",Et="http://www.w3.org/2000/svg",wt="http://www.w3.org/1999/xhtml";let At=wt,Yt=!1,xn=null;const Bn=an({},[bt,Et,wt],T2);let zn=null;const Kn=["application/xhtml+xml","text/html"],ca="text/html";let ht=null,Ht=null;const Dt=n.createElement("form"),Lt=function(ye){return ye instanceof RegExp||ye instanceof Function},Le=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ht&&Ht===ye)){if((!ye||typeof ye!="object")&&(ye={}),ye=ic(ye),zn=Kn.indexOf(ye.PARSER_MEDIA_TYPE)===-1?ca:ye.PARSER_MEDIA_TYPE,ht=zn==="application/xhtml+xml"?T2:wg,B=Hs(ye,"ALLOWED_TAGS")?an({},ye.ALLOWED_TAGS,ht):Y,U=Hs(ye,"ALLOWED_ATTR")?an({},ye.ALLOWED_ATTR,ht):W,xn=Hs(ye,"ALLOWED_NAMESPACES")?an({},ye.ALLOWED_NAMESPACES,T2):Bn,ze=Hs(ye,"ADD_URI_SAFE_ATTR")?an(ic(We),ye.ADD_URI_SAFE_ATTR,ht):We,Ae=Hs(ye,"ADD_DATA_URI_TAGS")?an(ic(Je),ye.ADD_DATA_URI_TAGS,ht):Je,Ce=Hs(ye,"FORBID_CONTENTS")?an({},ye.FORBID_CONTENTS,ht):nt,X=Hs(ye,"FORBID_TAGS")?an({},ye.FORBID_TAGS,ht):{},ne=Hs(ye,"FORBID_ATTR")?an({},ye.FORBID_ATTR,ht):{},ve=Hs(ye,"USE_PROFILES")?ye.USE_PROFILES:!1,oe=ye.ALLOW_ARIA_ATTR!==!1,q=ye.ALLOW_DATA_ATTR!==!1,te=ye.ALLOW_UNKNOWN_PROTOCOLS||!1,G=ye.ALLOW_SELF_CLOSE_IN_ATTR!==!1,J=ye.SAFE_FOR_TEMPLATES||!1,K=ye.SAFE_FOR_XML!==!1,Q=ye.WHOLE_DOCUMENT||!1,ce=ye.RETURN_DOM||!1,le=ye.RETURN_DOM_FRAGMENT||!1,ae=ye.RETURN_TRUSTED_TYPE||!1,se=ye.FORCE_BODY||!1,ie=ye.SANITIZE_DOM!==!1,de=ye.SANITIZE_NAMED_PROPS||!1,be=ye.KEEP_CONTENT!==!1,he=ye.IN_PLACE||!1,I=ye.ALLOWED_URI_REGEXP||TM,At=ye.NAMESPACE||wt,V=ye.CUSTOM_ELEMENT_HANDLING||{},ye.CUSTOM_ELEMENT_HANDLING&&Lt(ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(V.tagNameCheck=ye.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&Lt(ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(V.attributeNameCheck=ye.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ye.CUSTOM_ELEMENT_HANDLING&&typeof ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(V.allowCustomizedBuiltInElements=ye.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),J&&(q=!1),le&&(ce=!0),ve&&(B=an({},VC),U=[],ve.html===!0&&(an(B,UC),an(U,WC)),ve.svg===!0&&(an(B,L2),an(U,A2),an(U,g0)),ve.svgFilters===!0&&(an(B,D2),an(U,A2),an(U,g0)),ve.mathMl===!0&&(an(B,M2),an(U,YC),an(U,g0))),ye.ADD_TAGS&&(B===Y&&(B=ic(B)),an(B,ye.ADD_TAGS,ht)),ye.ADD_ATTR&&(U===W&&(U=ic(U)),an(U,ye.ADD_ATTR,ht)),ye.ADD_URI_SAFE_ATTR&&an(ze,ye.ADD_URI_SAFE_ATTR,ht),ye.FORBID_CONTENTS&&(Ce===nt&&(Ce=ic(Ce)),an(Ce,ye.FORBID_CONTENTS,ht)),be&&(B["#text"]=!0),Q&&an(B,["html","head","body"]),B.table&&(an(B,["tbody"]),delete X.tbody),ye.TRUSTED_TYPES_POLICY){if(typeof ye.TRUSTED_TYPES_POLICY.createHTML!="function")throw Gf('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ye.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Gf('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');x=ye.TRUSTED_TYPES_POLICY,k=x.createHTML("")}else x===void 0&&(x=YG(w,r)),x!==null&&typeof k=="string"&&(k=x.createHTML(""));kr&&kr(ye),Ht=ye}},Ze=an({},["mi","mo","mn","ms","mtext"]),It=an({},["foreignobject","annotation-xml"]),un=an({},["title","style","font","a","script"]),Ye=an({},[...L2,...D2,...PG]),Ge=an({},[...M2,...RG]),kt=function(ye){let Fe=b(ye);(!Fe||!Fe.tagName)&&(Fe={namespaceURI:At,tagName:"template"});const ot=wg(ye.tagName),Nt=wg(Fe.tagName);return xn[ye.namespaceURI]?ye.namespaceURI===Et?Fe.namespaceURI===wt?ot==="svg":Fe.namespaceURI===bt?ot==="svg"&&(Nt==="annotation-xml"||Ze[Nt]):Boolean(Ye[ot]):ye.namespaceURI===bt?Fe.namespaceURI===wt?ot==="math":Fe.namespaceURI===Et?ot==="math"&&It[Nt]:Boolean(Ge[ot]):ye.namespaceURI===wt?Fe.namespaceURI===Et&&!It[Nt]||Fe.namespaceURI===bt&&!Ze[Nt]?!1:!Ge[ot]&&(un[ot]||!Ye[ot]):!!(zn==="application/xhtml+xml"&&xn[ye.namespaceURI]):!1},vt=function(ye){Wf(t.removed,{element:ye});try{ye.parentNode.removeChild(ye)}catch{ye.remove()}},pn=function(ye,Fe){try{Wf(t.removed,{attribute:Fe.getAttributeNode(ye),from:Fe})}catch{Wf(t.removed,{attribute:null,from:Fe})}if(Fe.removeAttribute(ye),ye==="is"&&!U[ye])if(ce||le)try{vt(Fe)}catch{}else try{Fe.setAttribute(ye,"")}catch{}},da=function(ye){let Fe=null,ot=null;if(se)ye="<remove></remove>"+ye;else{const Cn=HC(ye,/^[\r\n\t ]+/);ot=Cn&&Cn[0]}zn==="application/xhtml+xml"&&At===wt&&(ye='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ye+"</body></html>");const Nt=x?x.createHTML(ye):ye;if(At===wt)try{Fe=new y().parseFromString(Nt,zn)}catch{}if(!Fe||!Fe.documentElement){Fe=N.createDocument(At,"template",null);try{Fe.documentElement.innerHTML=Yt?k:Nt}catch{}}const Kt=Fe.body||Fe.documentElement;return ye&&ot&&Kt.insertBefore(n.createTextNode(ot),Kt.childNodes[0]||null),At===wt?E.call(Fe,Q?"html":"body")[0]:Q?Fe.documentElement:Kt},Vn=function(ye){return _.call(ye.ownerDocument||ye,ye,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT|d.SHOW_PROCESSING_INSTRUCTION|d.SHOW_CDATA_SECTION,null)},Me=function(ye){return ye instanceof g&&(typeof ye.nodeName!="string"||typeof ye.textContent!="string"||typeof ye.removeChild!="function"||!(ye.attributes instanceof u)||typeof ye.removeAttribute!="function"||typeof ye.setAttribute!="function"||typeof ye.namespaceURI!="string"||typeof ye.insertBefore!="function"||typeof ye.hasChildNodes!="function")},Ve=function(ye){return typeof c=="function"&&ye instanceof c},He=function(ye,Fe,ot){!D[ye]||p0(D[ye],Nt=>{Nt.call(t,Fe,ot,Ht)})},at=function(ye){let Fe=null;if(He("beforeSanitizeElements",ye,null),Me(ye))return vt(ye),!0;const ot=ht(ye.nodeName);if(He("uponSanitizeElement",ye,{tagName:ot,allowedTags:B}),ye.hasChildNodes()&&!Ve(ye.firstElementChild)&&pr(/<[/\w]/g,ye.innerHTML)&&pr(/<[/\w]/g,ye.textContent)||ye.nodeType===qf.progressingInstruction||K&&ye.nodeType===qf.comment&&pr(/<[/\w]/g,ye.data))return vt(ye),!0;if(!B[ot]||X[ot]){if(!X[ot]&&Gt(ot)&&(V.tagNameCheck instanceof RegExp&&pr(V.tagNameCheck,ot)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ot)))return!1;if(be&&!Ce[ot]){const Nt=b(ye)||ye.parentNode,Kt=p(ye)||ye.childNodes;if(Kt&&Nt){const Cn=Kt.length;for(let Ea=Cn-1;Ea>=0;--Ea){const fr=S(Kt[Ea],!0);fr.__removalCount=(ye.__removalCount||0)+1,Nt.insertBefore(fr,m(ye))}}}return vt(ye),!0}return ye instanceof l&&!kt(ye)||(ot==="noscript"||ot==="noembed"||ot==="noframes")&&pr(/<\/no(script|embed|frames)/i,ye.innerHTML)?(vt(ye),!0):(J&&ye.nodeType===qf.text&&(Fe=ye.textContent,p0([P,M,O],Nt=>{Fe=Yf(Fe,Nt," ")}),ye.textContent!==Fe&&(Wf(t.removed,{element:ye.cloneNode()}),ye.textContent=Fe)),He("afterSanitizeElements",ye,null),!1)},Tt=function(ye,Fe,ot){if(ie&&(Fe==="id"||Fe==="name")&&(ot in n||ot in Dt))return!1;if(!(q&&!ne[Fe]&&pr(F,Fe))){if(!(oe&&pr(z,Fe))){if(!U[Fe]||ne[Fe]){if(!(Gt(ye)&&(V.tagNameCheck instanceof RegExp&&pr(V.tagNameCheck,ye)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ye))&&(V.attributeNameCheck instanceof RegExp&&pr(V.attributeNameCheck,Fe)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(Fe))||Fe==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&pr(V.tagNameCheck,ot)||V.tagNameCheck instanceof Function&&V.tagNameCheck(ot))))return!1}else if(!ze[Fe]){if(!pr(I,Yf(ot,A,""))){if(!((Fe==="src"||Fe==="xlink:href"||Fe==="href")&&ye!=="script"&&MG(ot,"data:")===0&&Ae[ye])){if(!(te&&!pr(H,Yf(ot,A,"")))){if(ot)return!1}}}}}}return!0},Gt=function(ye){return ye!=="annotation-xml"&&HC(ye,j)},ft=function(ye){He("beforeSanitizeAttributes",ye,null);const{attributes:Fe}=ye;if(!Fe)return;const ot={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:U};let Nt=Fe.length;for(;Nt--;){const Kt=Fe[Nt],{name:Cn,namespaceURI:Ea,value:fr}=Kt,di=ht(Cn);let nn=Cn==="value"?fr:AG(fr);if(ot.attrName=di,ot.attrValue=nn,ot.keepAttr=!0,ot.forceKeepAttr=void 0,He("uponSanitizeAttribute",ye,ot),nn=ot.attrValue,ot.forceKeepAttr||(pn(Cn,ye),!ot.keepAttr))continue;if(!G&&pr(/\/>/i,nn)){pn(Cn,ye);continue}if(K&&pr(/((--!?|])>)|<\/(style|title)/i,nn)){pn(Cn,ye);continue}J&&p0([P,M,O],jh=>{nn=Yf(nn,jh," ")});const rd=ht(ye.nodeName);if(!!Tt(rd,di,nn)){if(de&&(di==="id"||di==="name")&&(pn(Cn,ye),nn=fe+nn),x&&typeof w=="object"&&typeof w.getAttributeType=="function"&&!Ea)switch(w.getAttributeType(rd,di)){case"TrustedHTML":{nn=x.createHTML(nn);break}case"TrustedScriptURL":{nn=x.createScriptURL(nn);break}}try{Ea?ye.setAttributeNS(Ea,Cn,nn):ye.setAttribute(Cn,nn),Me(ye)?vt(ye):BC(t.removed)}catch{}}}He("afterSanitizeAttributes",ye,null)},qt=function qe(ye){let Fe=null;const ot=Vn(ye);for(He("beforeSanitizeShadowDOM",ye,null);Fe=ot.nextNode();)He("uponSanitizeShadowNode",Fe,null),!at(Fe)&&(Fe.content instanceof i&&qe(Fe.content),ft(Fe));He("afterSanitizeShadowDOM",ye,null)};return t.sanitize=function(qe){let ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=null,ot=null,Nt=null,Kt=null;if(Yt=!qe,Yt&&(qe="<!-->"),typeof qe!="string"&&!Ve(qe))if(typeof qe.toString=="function"){if(qe=qe.toString(),typeof qe!="string")throw Gf("dirty is not a string, aborting")}else throw Gf("toString is not a function");if(!t.isSupported)return qe;if(Z||Le(ye),t.removed=[],typeof qe=="string"&&(he=!1),he){if(qe.nodeName){const fr=ht(qe.nodeName);if(!B[fr]||X[fr])throw Gf("root node is forbidden and cannot be sanitized in-place")}}else if(qe instanceof c)Fe=da("<!---->"),ot=Fe.ownerDocument.importNode(qe,!0),ot.nodeType===qf.element&&ot.nodeName==="BODY"||ot.nodeName==="HTML"?Fe=ot:Fe.appendChild(ot);else{if(!ce&&!J&&!Q&&qe.indexOf("<")===-1)return x&&ae?x.createHTML(qe):qe;if(Fe=da(qe),!Fe)return ce?null:ae?k:""}Fe&&se&&vt(Fe.firstChild);const Cn=Vn(he?qe:Fe);for(;Nt=Cn.nextNode();)at(Nt)||(Nt.content instanceof i&&qt(Nt.content),ft(Nt));if(he)return qe;if(ce){if(le)for(Kt=C.call(Fe.ownerDocument);Fe.firstChild;)Kt.appendChild(Fe.firstChild);else Kt=Fe;return(U.shadowroot||U.shadowrootmode)&&(Kt=T.call(a,Kt,!0)),Kt}let Ea=Q?Fe.outerHTML:Fe.innerHTML;return Q&&B["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&&pr(LM,Fe.ownerDocument.doctype.name)&&(Ea="<!DOCTYPE "+Fe.ownerDocument.doctype.name+`>
`+Ea),J&&p0([P,M,O],fr=>{Ea=Yf(Ea,fr," ")}),x&&ae?x.createHTML(Ea):Ea},t.setConfig=function(){let qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Le(qe),Z=!0},t.clearConfig=function(){Ht=null,Z=!1},t.isValidAttribute=function(qe,ye,Fe){Ht||Le({});const ot=ht(qe),Nt=ht(ye);return Tt(ot,Nt,Fe)},t.addHook=function(qe,ye){typeof ye=="function"&&(D[qe]=D[qe]||[],Wf(D[qe],ye))},t.removeHook=function(qe){if(D[qe])return BC(D[qe])},t.removeHooks=function(qe){D[qe]&&(D[qe]=[])},t.removeAllHooks=function(){D={}},t}var GG=DM();let I2;function Fs(e){return e===""||e===null||e===void 0||e==="undefined"}const qG=(e,t=500)=>{I2||(I2=setTimeout(()=>{e(),I2=void 0},t))},MM=(e,t)=>{let a=t.getTime()+60*60*1e3*e;return new Date(a)},iy=e=>{e=Number(e);let t=Math.floor(e/3600);return t>0?t+(t==1?" hr":" hrs"):""};function Ue(e){let t={};return[...e].forEach(([n,a])=>{typeof a=="string"?t[n]=a||void 0:t[n]=a}),t}function Pt(e,t){[...e].forEach(([n,a])=>{e.delete(n)}),t(e)}function p1(e){const t=document.getElementById(e);if(!t)return!0;const n=t.getBoundingClientRect();return!(n.top>=0&&n.left>=0&&n.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&n.right<=(window.innerWidth||document.documentElement.clientWidth))}function on(e,t){if(typeof e=="object"||Array.isArray(e))return e;if(typeof e!="string")return t;try{return JSON.parse(e)}catch(n){return console.log("err",e,n),t}}function AM(e){return new Promise(t=>setTimeout(t,e))}function En(e){if(!e)return!1;let t=new Date(e);return!isNaN(t)}const IM=(e,t)=>{const n=GG.sanitize(e);return n.substring(0,t)+(n.length>t?"...":"")},h1=e=>{let t=e;const n=new Date(t),a=n.getFullYear(),r=n.getMonth()+1,i=n.getDate();return`${a}-${r.toString().padStart(2,"0")}-${i.toString().padStart(2,"0")}`},qC=e=>{let t=e;const n=new Date(t),a=n.getFullYear(),r=n.getMonth()+1,i=n.getDate();return`${a}-${r.toString().padStart(2,"0")}-${i.toString().padStart(2,"0")}`},ZG=e=>{const t=e,n=new Date(t);return n==null||n.setHours((n==null?void 0:n.getHours())-1),`${(n.getMonth()+1).toString().padStart(2,"0")}/${n.getDate().toString().padStart(2,"0")}/${n.getFullYear()} ${n.getHours().toString().padStart(2,"0")}:${n.getMinutes().toString().padStart(2,"0")}:${n.getSeconds().toString().padStart(2,"0")} ${n.getHours()>=12?"PM":"AM"}`},QG=e=>{const t=new Date(e),n=t.getFullYear().toString().slice(-2),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getDate().toString().padStart(2,"0");return`${a}/${r}/${n}`};function W3(e){const t=/(.+),\s*(.+),\s*(.+)/,n=/(.+),\s*(.+)/,a=e.match(t),r=e.match(n);if(a){const i=a[1],o=a[3];return[i,o]}else if(r){const i=r[1],o=r[2];return[i,o]}else return[e]}const oy=({fill:e})=>s("svg",{width:"69",height:"20",viewBox:"0 0 69 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M8.4 15.03C6.888 15.03 5.56267 14.75 4.424 14.19C3.28533 13.63 2.39867 12.8087 1.764 11.726C1.148 10.6433 0.84 9.33667 0.84 7.806C0.84 6.35 1.148 5.08067 1.764 3.998C2.39867 2.91533 3.276 2.07533 4.396 1.478C5.516 0.861999 6.832 0.553999 8.344 0.553999C9.78133 0.553999 11.0413 0.815332 12.124 1.338C13.2253 1.842 14.0747 2.58867 14.672 3.578C15.288 4.54867 15.596 5.74333 15.596 7.162C15.596 7.40467 15.5867 7.638 15.568 7.862C15.5493 8.06733 15.5213 8.27267 15.484 8.478H2.772V6.798H13.496L12.712 7.834C12.7307 7.64733 12.74 7.47 12.74 7.302C12.74 7.11533 12.74 6.92867 12.74 6.742C12.74 5.454 12.3667 4.502 11.62 3.886C10.892 3.25133 9.78133 2.934 8.288 2.934C6.62667 2.934 5.44133 3.31667 4.732 4.082C4.02267 4.84733 3.668 5.94867 3.668 7.386V8.114C3.668 9.57 4.02267 10.6807 4.732 11.446C5.44133 12.2113 6.636 12.594 8.316 12.594C9.772 12.594 10.8173 12.37 11.452 11.922C12.1053 11.4553 12.432 10.8113 12.432 9.99V9.766H15.456V10.018C15.456 11.0073 15.148 11.8847 14.532 12.65C13.9347 13.3967 13.104 13.9847 12.04 14.414C10.9947 14.8247 9.78133 15.03 8.4 15.03ZM22.2849 14.75H19.2609V0.834H22.0329V4.782L22.2849 4.922V14.75ZM22.2849 6.938H21.6129V4.586H22.2289C22.3596 3.82067 22.6209 3.13933 23.0129 2.542C23.4049 1.926 23.9276 1.44067 24.5809 1.086C25.2529 0.731332 26.0649 0.553999 27.0169 0.553999C28.0809 0.553999 28.9489 0.777999 29.6209 1.226C30.2929 1.674 30.7783 2.27133 31.0769 3.018C31.3943 3.76467 31.5529 4.57667 31.5529 5.454V7.274H28.5569V6.042C28.5569 5.034 28.3329 4.29667 27.8849 3.83C27.4369 3.36333 26.6903 3.13 25.6449 3.13C24.4503 3.13 23.5916 3.45667 23.0689 4.11C22.5463 4.76333 22.2849 5.706 22.2849 6.938ZM42.1603 19.79C40.779 19.79 39.5657 19.5753 38.5203 19.146C37.475 18.7353 36.6537 18.138 36.0563 17.354C35.4777 16.57 35.1883 15.618 35.1883 14.498H38.1843C38.1843 15.17 38.3243 15.7113 38.6043 16.122C38.8843 16.5327 39.323 16.822 39.9203 16.99C40.5363 17.1767 41.339 17.27 42.3283 17.27C43.3923 17.27 44.2323 17.1487 44.8483 16.906C45.483 16.682 45.9403 16.2807 46.2203 15.702C46.5003 15.1233 46.6403 14.3207 46.6403 13.294V5.146L46.8643 4.95V0.834H49.6363V13.126C49.6363 14.6753 49.3283 15.9353 48.7123 16.906C48.0963 17.8953 47.2283 18.6233 46.1083 19.09C44.9883 19.5567 43.6723 19.79 42.1603 19.79ZM40.9003 13.49C39.519 13.49 38.3337 13.2193 37.3443 12.678C36.3737 12.1367 35.6177 11.3807 35.0763 10.41C34.5537 9.43933 34.2923 8.31 34.2923 7.022C34.2923 5.734 34.563 4.60467 35.1043 3.634C35.6643 2.66333 36.4483 1.90733 37.4563 1.366C38.483 0.824666 39.6963 0.553999 41.0963 0.553999C42.5523 0.553999 43.7843 0.880666 44.7923 1.534C45.819 2.16867 46.4537 3.09267 46.6963 4.306H47.3403L47.1723 6.742H46.6403C46.6403 5.958 46.4537 5.30467 46.0803 4.782C45.707 4.24067 45.175 3.83933 44.4843 3.578C43.7937 3.31667 42.9537 3.186 41.9643 3.186C41.0123 3.186 40.1817 3.30733 39.4723 3.55C38.7817 3.79267 38.2497 4.194 37.8763 4.754C37.5217 5.29533 37.3443 6.05133 37.3443 7.022C37.3443 7.974 37.5217 8.73 37.8763 9.29C38.231 9.85 38.7443 10.2607 39.4163 10.522C40.107 10.7647 40.9283 10.886 41.8803 10.886C43.411 10.886 44.587 10.5687 45.4083 9.934C46.2297 9.29933 46.6403 8.366 46.6403 7.134H47.1723V9.878H46.4443C46.2017 10.942 45.6137 11.81 44.6803 12.482C43.747 13.154 42.487 13.49 40.9003 13.49ZM60.9464 15.03C59.4157 15.03 58.0624 14.7313 56.8864 14.134C55.729 13.518 54.8237 12.6687 54.1704 11.586C53.5357 10.4847 53.2184 9.22467 53.2184 7.806C53.2184 6.35 53.5357 5.08067 54.1704 3.998C54.8237 2.91533 55.729 2.07533 56.8864 1.478C58.0624 0.861999 59.4157 0.553999 60.9464 0.553999C62.5144 0.553999 63.877 0.861999 65.0344 1.478C66.1917 2.07533 67.0877 2.91533 67.7224 3.998C68.3757 5.08067 68.7024 6.35 68.7024 7.806C68.7024 9.22467 68.3757 10.4847 67.7224 11.586C67.0877 12.6687 66.1917 13.518 65.0344 14.134C63.877 14.7313 62.5144 15.03 60.9464 15.03ZM60.9464 12.342C62.645 12.342 63.8677 11.9593 64.6144 11.194C65.361 10.41 65.7344 9.28067 65.7344 7.806C65.7344 6.33133 65.361 5.202 64.6144 4.418C63.8677 3.61533 62.645 3.214 60.9464 3.214C59.2664 3.214 58.053 3.61533 57.3064 4.418C56.5597 5.202 56.1864 6.33133 56.1864 7.806C56.1864 9.28067 56.5597 10.41 57.3064 11.194C58.053 11.9593 59.2664 12.342 60.9464 12.342Z",fill:e!=null?e:"#FCFCFD"})}),OM=({stroke:e,className:t})=>s("svg",{className:t!=null?t:"",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.75 14.75L10.25 10.25M11.75 6.5C11.75 9.39949 9.39949 11.75 6.5 11.75C3.60051 11.75 1.25 9.39949 1.25 6.5C1.25 3.60051 3.60051 1.25 6.5 1.25C9.39949 1.25 11.75 3.60051 11.75 6.5Z",stroke:e!=null?e:"#FCFCFD",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});var PM={exports:{}},Na={};/**
* @license React
* react-dom-test-utils.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ef=h.exports,T6=Rl.exports;function RM(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ZC(e){if(RM(e)!==e)throw Error("Unable to find node on an unmounted component.")}function JG(e){var t=e.alternate;if(!t){if(t=RM(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return ZC(r),e;if(i===a)return ZC(r),t;i=i.sibling}throw Error("Unable to find node on an unmounted component.")}if(n.return!==a.return)n=r,a=i;else{for(var o=!1,c=r.child;c;){if(c===n){o=!0,n=r,a=i;break}if(c===a){o=!0,a=r,n=i;break}c=c.sibling}if(!o){for(c=i.child;c;){if(c===n){o=!0,n=i,a=r;break}if(c===a){o=!0,a=i,n=r;break}c=c.sibling}if(!o)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(n.alternate!==a)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(n.tag!==3)throw Error("Unable to find node on an unmounted component.");return n.stateNode.current===n?e:t}var jr=Object.assign;function O2(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function b0(){return!0}function QC(){return!1}function is(e){function t(n,a,r,i,o){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var c in e)e.hasOwnProperty(c)&&(n=e[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?b0:QC,this.isPropagationStopped=QC,this}return jr(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=b0)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=b0)},persist:function(){},isPersistent:b0}),t}var tf={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},KG=is(tf),Vp=jr({},tf,{view:0,detail:0});is(Vp);var P2,R2,Zf,ly=jr({},Vp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:L6,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Zf&&(Zf&&e.type==="mousemove"?(P2=e.screenX-Zf.screenX,R2=e.screenY-Zf.screenY):R2=P2=0,Zf=e),P2)},movementY:function(e){return"movementY"in e?e.movementY:R2}});is(ly);var XG=jr({},ly,{dataTransfer:0});is(XG);var eq=jr({},Vp,{relatedTarget:0});is(eq);var tq=jr({},tf,{animationName:0,elapsedTime:0,pseudoElement:0});is(tq);var nq=jr({},tf,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}});is(nq);var aq=jr({},tf,{data:0});is(aq);var rq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sq={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},iq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function oq(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iq[e])?!!t[e]:!1}function L6(){return oq}var lq=jr({},Vp,{key:function(e){if(e.key){var t=rq[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=O2(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sq[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:L6,charCode:function(e){return e.type==="keypress"?O2(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?O2(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}});is(lq);var cq=jr({},ly,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});is(cq);var dq=jr({},Vp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:L6});is(dq);var uq=jr({},tf,{propertyName:0,elapsedTime:0,pseudoElement:0});is(uq);var fq=jr({},ly,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0});is(fq);function mq(e,t,n,a,r,i,o,c,l){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(u){this.onError(u)}}var Im=!1,g1=null,b1=!1,Y3=null,pq={onError:function(e){Im=!0,g1=e}};function hq(e,t,n,a,r,i,o,c,l){Im=!1,g1=null,mq.apply(pq,arguments)}function gq(e,t,n,a,r,i,o,c,l){if(hq.apply(this,arguments),Im){if(Im){var d=g1;Im=!1,g1=null}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");b1||(b1=!0,Y3=d)}}var D6=Array.isArray,Wp=T6.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,bq=Wp[0],yq=Wp[1],xq=Wp[2],wq=Wp[3],vq=Wp[4],_q=ef.unstable_act;function Nq(){}function Sq(e,t){if(!e)return[];if(e=JG(e),!e)return[];for(var n=e,a=[];;){if(n.tag===5||n.tag===6||n.tag===1||n.tag===0){var r=n.stateNode;t(r)&&a.push(r)}if(n.child)n.child.return=n,n=n.child;else{if(n===e)return a;for(;!n.sibling;){if(!n.return||n.return===e)return a;n=n.return}n.sibling.return=n.return,n=n.sibling}}}function Bc(e,t){if(e&&!e._reactInternals){var n=String(e);throw e=D6(e)?"an array":e&&e.nodeType===1&&e.tagName?"a DOM node":n==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":n,Error(t+"(...): the first argument must be a React class instance. Instead received: "+(e+"."))}}function cy(e){return!(!e||e.nodeType!==1||!e.tagName)}function M6(e){return cy(e)?!1:e!=null&&typeof e.render=="function"&&typeof e.setState=="function"}function jM(e,t){return M6(e)?e._reactInternals.type===t:!1}function dy(e,t){return Bc(e,"findAllInRenderedTree"),e?Sq(e._reactInternals,t):[]}function zM(e,t){return Bc(e,"scryRenderedDOMComponentsWithClass"),dy(e,function(n){if(cy(n)){var a=n.className;typeof a!="string"&&(a=n.getAttribute("class")||"");var r=a.split(/\s+/);if(!D6(t)){if(t===void 0)throw Error("TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.");t=t.split(/\s+/)}return t.every(function(i){return r.indexOf(i)!==-1})}return!1})}function FM(e,t){return Bc(e,"scryRenderedDOMComponentsWithTag"),dy(e,function(n){return cy(n)&&n.tagName.toUpperCase()===t.toUpperCase()})}function $M(e,t){return Bc(e,"scryRenderedComponentsWithType"),dy(e,function(n){return jM(n,t)})}function JC(e,t,n){var a=e.type||"unknown-event";e.currentTarget=yq(n),gq(a,t,void 0,e),e.currentTarget=null}function BM(e,t,n){for(var a=[];e;){a.push(e);do e=e.return;while(e&&e.tag!==5);e=e||null}for(e=a.length;0<e--;)t(a[e],"captured",n);for(e=0;e<a.length;e++)t(a[e],"bubbled",n)}function HM(e,t){var n=e.stateNode;if(!n)return null;var a=xq(n);if(!a)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}function kq(e,t,n){e&&n&&n._reactName&&(t=HM(e,n._reactName))&&(n._dispatchListeners==null&&(n._dispatchListeners=[]),n._dispatchInstances==null&&(n._dispatchInstances=[]),n._dispatchListeners.push(t),n._dispatchInstances.push(e))}function Cq(e,t,n){var a=n._reactName;t==="captured"&&(a+="Capture"),(t=HM(e,a))&&(n._dispatchListeners==null&&(n._dispatchListeners=[]),n._dispatchInstances==null&&(n._dispatchInstances=[]),n._dispatchListeners.push(t),n._dispatchInstances.push(e))}var UM={},Eq=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]);function Tq(e){return function(t,n){if(ef.isValidElement(t))throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering.");if(M6(t))throw Error("TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead.");var a="on"+e[0].toUpperCase()+e.slice(1),r=new Nq;r.target=t,r.type=e.toLowerCase();var i=bq(t),o=new KG(a,r.type,i,r,t);o.persist(),jr(o,n),Eq.has(e)?o&&o._reactName&&kq(o._targetInst,null,o):o&&o._reactName&&BM(o._targetInst,Cq,o),T6.unstable_batchedUpdates(function(){if(wq(t),o){var c=o._dispatchListeners,l=o._dispatchInstances;if(D6(c))for(var d=0;d<c.length&&!o.isPropagationStopped();d++)JC(o,c[d],l[d]);else c&&JC(o,c,l);o._dispatchListeners=null,o._dispatchInstances=null,o.isPersistent()||o.constructor.release(o)}if(b1)throw c=Y3,b1=!1,Y3=null,c}),vq()}}"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset resize seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach(function(e){UM[e]=Tq(e)});Na.Simulate=UM;Na.act=_q;Na.findAllInRenderedTree=dy;Na.findRenderedComponentWithType=function(e,t){if(Bc(e,"findRenderedComponentWithType"),e=$M(e,t),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for componentType:"+t);return e[0]};Na.findRenderedDOMComponentWithClass=function(e,t){if(Bc(e,"findRenderedDOMComponentWithClass"),e=zM(e,t),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for class:"+t);return e[0]};Na.findRenderedDOMComponentWithTag=function(e,t){if(Bc(e,"findRenderedDOMComponentWithTag"),e=FM(e,t),e.length!==1)throw Error("Did not find exactly one match (found: "+e.length+") for tag:"+t);return e[0]};Na.isCompositeComponent=M6;Na.isCompositeComponentWithType=jM;Na.isDOMComponent=cy;Na.isDOMComponentElement=function(e){return!!(e&&ef.isValidElement(e)&&e.tagName)};Na.isElement=function(e){return ef.isValidElement(e)};Na.isElementOfType=function(e,t){return ef.isValidElement(e)&&e.type===t};Na.mockComponent=function(e,t){return t=t||e.mockTagName||"div",e.prototype.render.mockImplementation(function(){return ef.createElement(t,null,this.props.children)}),this};Na.nativeTouchData=function(e,t){return{touches:[{pageX:e,pageY:t}]}};Na.renderIntoDocument=function(e){var t=document.createElement("div");return T6.render(e,t)};Na.scryRenderedComponentsWithType=$M;Na.scryRenderedDOMComponentsWithClass=zM;Na.scryRenderedDOMComponentsWithTag=FM;Na.traverseTwoPhase=BM;PM.exports=Na;var VM=PM.exports,Yp=e=>e.type==="checkbox",Xd=e=>e instanceof Date,yr=e=>e==null;const WM=e=>typeof e=="object";var Aa=e=>!yr(e)&&!Array.isArray(e)&&WM(e)&&!Xd(e),YM=e=>Aa(e)&&e.target?Yp(e.target)?e.target.checked:e.target.value:e,Lq=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,GM=(e,t)=>e.has(Lq(t)),Dq=e=>{const t=e.constructor&&e.constructor.prototype;return Aa(t)&&t.hasOwnProperty("isPrototypeOf")},A6=typeof window!="undefined"&&typeof window.HTMLElement!="undefined"&&typeof document!="undefined";function Ta(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(!(A6&&(e instanceof Blob||e instanceof FileList))&&(n||Aa(e)))if(t=n?[]:{},!n&&!Dq(e))t=e;else for(const a in e)e.hasOwnProperty(a)&&(t[a]=Ta(e[a]));else return e;return t}var nf=e=>Array.isArray(e)?e.filter(Boolean):[],Hn=e=>e===void 0,st=(e,t,n)=>{if(!t||!Aa(e))return n;const a=nf(t.split(/[,[\].]+?/)).reduce((r,i)=>yr(r)?r:r[i],e);return Hn(a)||a===e?Hn(e[t])?n:e[t]:a},xi=e=>typeof e=="boolean",I6=e=>/^\w*$/.test(e),qM=e=>nf(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Dn=(e,t,n)=>{let a=-1;const r=I6(t)?[t]:qM(t),i=r.length,o=i-1;for(;++a<i;){const c=r[a];let l=n;if(a!==o){const d=e[c];l=Aa(d)||Array.isArray(d)?d:isNaN(+r[a+1])?{}:[]}if(c==="__proto__")return;e[c]=l,e=e[c]}return e};const y1={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},_s={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Vi={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Mq=R.createContext(null),uy=()=>R.useContext(Mq);var ZM=(e,t,n,a=!0)=>{const r={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(r,i,{get:()=>{const o=i;return t._proxyFormState[o]!==_s.all&&(t._proxyFormState[o]=!a||_s.all),n&&(n[o]=!0),e[o]}});return r},Dr=e=>Aa(e)&&!Object.keys(e).length,QM=(e,t,n,a)=>{n(e);const{name:r,...i}=e;return Dr(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!a||_s.all))},Zr=e=>Array.isArray(e)?e:[e],JM=(e,t,n)=>!e||!t||e===t||Zr(e).some(a=>a&&(n?a===t:a.startsWith(t)||t.startsWith(a)));function fy(e){const t=R.useRef(e);t.current=e,R.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function Aq(e){const t=uy(),{control:n=t.control,disabled:a,name:r,exact:i}=e||{},[o,c]=R.useState(n._formState),l=R.useRef(!0),d=R.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=R.useRef(r);return u.current=r,fy({disabled:a,next:g=>l.current&&JM(u.current,g.name,i)&&QM(g,d.current,n._updateFormState)&&c({...n._formState,...g}),subject:n._subjects.state}),R.useEffect(()=>(l.current=!0,d.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),ZM(o,n,d.current,!1)}var Ni=e=>typeof e=="string",KM=(e,t,n,a,r)=>Ni(e)?(a&&t.watch.add(e),st(n,e,r)):Array.isArray(e)?e.map(i=>(a&&t.watch.add(i),st(n,i))):(a&&(t.watchAll=!0),n);function Iq(e){const t=uy(),{control:n=t.control,name:a,defaultValue:r,disabled:i,exact:o}=e||{},c=R.useRef(a);c.current=a,fy({disabled:i,subject:n._subjects.values,next:u=>{JM(c.current,u.name,o)&&d(Ta(KM(c.current,n._names,u.values||n._formValues,!1,r)))}});const[l,d]=R.useState(n._getWatch(a,r));return R.useEffect(()=>n._removeUnmounted()),l}function Ii(e){const t=uy(),{name:n,disabled:a,control:r=t.control,shouldUnregister:i}=e,o=GM(r._names.array,n),c=Iq({control:r,name:n,defaultValue:st(r._formValues,n,st(r._defaultValues,n,e.defaultValue)),exact:!0}),l=Aq({control:r,name:n}),d=R.useRef(r.register(n,{...e.rules,value:c,...xi(e.disabled)?{disabled:e.disabled}:{}}));return R.useEffect(()=>{const u=r._options.shouldUnregister||i,g=(y,w)=>{const v=st(r._fields,y);v&&v._f&&(v._f.mount=w)};if(g(n,!0),u){const y=Ta(st(r._options.defaultValues,n));Dn(r._defaultValues,n,y),Hn(st(r._formValues,n))&&Dn(r._formValues,n,y)}return()=>{(o?u&&!r._state.action:u)?r.unregister(n):g(n,!1)}},[n,r,o,i]),R.useEffect(()=>{st(r._fields,n)&&r._updateDisabledField({disabled:a,fields:r._fields,name:n,value:st(r._fields,n)._f.value})},[a,n,r]),{field:{name:n,value:c,...xi(a)||l.disabled?{disabled:l.disabled||a}:{},onChange:R.useCallback(u=>d.current.onChange({target:{value:YM(u),name:n},type:y1.CHANGE}),[n]),onBlur:R.useCallback(()=>d.current.onBlur({target:{value:st(r._formValues,n),name:n},type:y1.BLUR}),[n,r]),ref:u=>{const g=st(r._fields,n);g&&u&&(g._f.ref={focus:()=>u.focus(),select:()=>u.select(),setCustomValidity:y=>u.setCustomValidity(y),reportValidity:()=>u.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!st(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!st(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!st(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!st(l.validatingFields,n)},error:{enumerable:!0,get:()=>st(l.errors,n)}})}}const XM=e=>e.render(Ii(e));var eA=(e,t,n,a,r)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[a]:r||!0}}:{},Bo=()=>{const e=typeof performance=="undefined"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},j2=(e,t,n={})=>n.shouldFocus||Hn(n.shouldFocus)?n.focusName||`${e}.${Hn(n.focusIndex)?t:n.focusIndex}.`:"",Om=e=>({isOnSubmit:!e||e===_s.onSubmit,isOnBlur:e===_s.onBlur,isOnChange:e===_s.onChange,isOnAll:e===_s.all,isOnTouch:e===_s.onTouched}),G3=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(a=>e.startsWith(a)&&/^\.\w+/.test(e.slice(a.length))));const fu=(e,t,n,a)=>{for(const r of n||Object.keys(e)){const i=st(e,r);if(i){const{_f:o,...c}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],r)&&!a)break;if(o.ref&&t(o.ref,o.name)&&!a)break;fu(c,t)}else Aa(c)&&fu(c,t)}}};var tA=(e,t,n)=>{const a=nf(st(e,n));return Dn(a,"root",t[n]),Dn(e,n,a),e},O6=e=>e.type==="file",cl=e=>typeof e=="function",x1=e=>{if(!A6)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},vg=e=>Ni(e),P6=e=>e.type==="radio",w1=e=>e instanceof RegExp;const KC={value:!1,isValid:!1},XC={value:!0,isValid:!0};var nA=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Hn(e[0].attributes.value)?Hn(e[0].value)||e[0].value===""?XC:{value:e[0].value,isValid:!0}:XC:KC}return KC};const e9={isValid:!1,value:null};var aA=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,e9):e9;function t9(e,t,n="validate"){if(vg(e)||Array.isArray(e)&&e.every(vg)||xi(e)&&!e)return{type:n,message:vg(e)?e:"",ref:t}}var ud=e=>Aa(e)&&!w1(e)?e:{value:e,message:""},q3=async(e,t,n,a,r)=>{const{ref:i,refs:o,required:c,maxLength:l,minLength:d,min:u,max:g,pattern:y,validate:w,name:v,valueAsNumber:S,mount:m,disabled:p}=e._f,b=st(t,v);if(!m||p)return{};const x=o?o[0]:i,k=M=>{a&&x.reportValidity&&(x.setCustomValidity(xi(M)?"":M||""),x.reportValidity())},N={},_=P6(i),C=Yp(i),E=_||C,T=(S||O6(i))&&Hn(i.value)&&Hn(b)||x1(i)&&i.value===""||b===""||Array.isArray(b)&&!b.length,D=eA.bind(null,v,n,N),P=(M,O,F,z=Vi.maxLength,H=Vi.minLength)=>{const A=M?O:F;N[v]={type:M?z:H,message:A,ref:i,...D(M?z:H,A)}};if(r?!Array.isArray(b)||!b.length:c&&(!E&&(T||yr(b))||xi(b)&&!b||C&&!nA(o).isValid||_&&!aA(o).isValid)){const{value:M,message:O}=vg(c)?{value:!!c,message:c}:ud(c);if(M&&(N[v]={type:Vi.required,message:O,ref:x,...D(Vi.required,O)},!n))return k(O),N}if(!T&&(!yr(u)||!yr(g))){let M,O;const F=ud(g),z=ud(u);if(!yr(b)&&!isNaN(b)){const H=i.valueAsNumber||b&&+b;yr(F.value)||(M=H>F.value),yr(z.value)||(O=H<z.value)}else{const H=i.valueAsDate||new Date(b),A=B=>new Date(new Date().toDateString()+" "+B),j=i.type=="time",I=i.type=="week";Ni(F.value)&&b&&(M=j?A(b)>A(F.value):I?b>F.value:H>new Date(F.value)),Ni(z.value)&&b&&(O=j?A(b)<A(z.value):I?b<z.value:H<new Date(z.value))}if((M||O)&&(P(!!M,F.message,z.message,Vi.max,Vi.min),!n))return k(N[v].message),N}if((l||d)&&!T&&(Ni(b)||r&&Array.isArray(b))){const M=ud(l),O=ud(d),F=!yr(M.value)&&b.length>+M.value,z=!yr(O.value)&&b.length<+O.value;if((F||z)&&(P(F,M.message,O.message),!n))return k(N[v].message),N}if(y&&!T&&Ni(b)){const{value:M,message:O}=ud(y);if(w1(M)&&!b.match(M)&&(N[v]={type:Vi.pattern,message:O,ref:i,...D(Vi.pattern,O)},!n))return k(O),N}if(w){if(cl(w)){const M=await w(b,t),O=t9(M,x);if(O&&(N[v]={...O,...D(Vi.validate,O.message)},!n))return k(O.message),N}else if(Aa(w)){let M={};for(const O in w){if(!Dr(M)&&!n)break;const F=t9(await w[O](b,t),x,O);F&&(M={...F,...D(O,F.message)},k(F.message),n&&(N[v]=M))}if(!Dr(M)&&(N[v]={ref:x,...M},!n))return N}}return k(!0),N},z2=(e,t)=>[...e,...Zr(t)],F2=e=>Array.isArray(e)?e.map(()=>{}):void 0;function $2(e,t,n){return[...e.slice(0,t),...Zr(n),...e.slice(t)]}var B2=(e,t,n)=>Array.isArray(e)?(Hn(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],H2=(e,t)=>[...Zr(t),...Zr(e)];function Oq(e,t){let n=0;const a=[...e];for(const r of t)a.splice(r-n,1),n++;return nf(a).length?a:[]}var U2=(e,t)=>Hn(t)?[]:Oq(e,Zr(t).sort((n,a)=>n-a)),V2=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function Pq(e,t){const n=t.slice(0,-1).length;let a=0;for(;a<n;)e=Hn(e)?a++:e[t[a++]];return e}function Rq(e){for(const t in e)if(e.hasOwnProperty(t)&&!Hn(e[t]))return!1;return!0}function ba(e,t){const n=Array.isArray(t)?t:I6(t)?[t]:qM(t),a=n.length===1?e:Pq(e,n),r=n.length-1,i=n[r];return a&&delete a[i],r!==0&&(Aa(a)&&Dr(a)||Array.isArray(a)&&Rq(a))&&ba(e,n.slice(0,-1)),e}var n9=(e,t,n)=>(e[t]=n,e);function af(e){const t=uy(),{control:n=t.control,name:a,keyName:r="id",shouldUnregister:i}=e,[o,c]=R.useState(n._getFieldArray(a)),l=R.useRef(n._getFieldArray(a).map(Bo)),d=R.useRef(o),u=R.useRef(a),g=R.useRef(!1);u.current=a,d.current=o,n._names.array.add(a),e.rules&&n.register(a,e.rules),fy({next:({values:N,name:_})=>{if(_===u.current||!_){const C=st(N,u.current);Array.isArray(C)&&(c(C),l.current=C.map(Bo))}},subject:n._subjects.array});const y=R.useCallback(N=>{g.current=!0,n._updateFieldArray(a,N)},[n,a]),w=(N,_)=>{const C=Zr(Ta(N)),E=z2(n._getFieldArray(a),C);n._names.focus=j2(a,E.length-1,_),l.current=z2(l.current,C.map(Bo)),y(E),c(E),n._updateFieldArray(a,E,z2,{argA:F2(N)})},v=(N,_)=>{const C=Zr(Ta(N)),E=H2(n._getFieldArray(a),C);n._names.focus=j2(a,0,_),l.current=H2(l.current,C.map(Bo)),y(E),c(E),n._updateFieldArray(a,E,H2,{argA:F2(N)})},S=N=>{const _=U2(n._getFieldArray(a),N);l.current=U2(l.current,N),y(_),c(_),n._updateFieldArray(a,_,U2,{argA:N})},m=(N,_,C)=>{const E=Zr(Ta(_)),T=$2(n._getFieldArray(a),N,E);n._names.focus=j2(a,N,C),l.current=$2(l.current,N,E.map(Bo)),y(T),c(T),n._updateFieldArray(a,T,$2,{argA:N,argB:F2(_)})},p=(N,_)=>{const C=n._getFieldArray(a);V2(C,N,_),V2(l.current,N,_),y(C),c(C),n._updateFieldArray(a,C,V2,{argA:N,argB:_},!1)},b=(N,_)=>{const C=n._getFieldArray(a);B2(C,N,_),B2(l.current,N,_),y(C),c(C),n._updateFieldArray(a,C,B2,{argA:N,argB:_},!1)},x=(N,_)=>{const C=Ta(_),E=n9(n._getFieldArray(a),N,C);l.current=[...E].map((T,D)=>!T||D===N?Bo():l.current[D]),y(E),c([...E]),n._updateFieldArray(a,E,n9,{argA:N,argB:C},!0,!1)},k=N=>{const _=Zr(Ta(N));l.current=_.map(Bo),y([..._]),c([..._]),n._updateFieldArray(a,[..._],C=>C,{},!0,!1)};return R.useEffect(()=>{if(n._state.action=!1,G3(a,n._names)&&n._subjects.state.next({...n._formState}),g.current&&(!Om(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([a]).then(N=>{const _=st(N.errors,a),C=st(n._formState.errors,a);(C?!_&&C.type||_&&(C.type!==_.type||C.message!==_.message):_&&_.type)&&(_?Dn(n._formState.errors,a,_):ba(n._formState.errors,a),n._subjects.state.next({errors:n._formState.errors}))});else{const N=st(n._fields,a);N&&N._f&&!(Om(n._options.reValidateMode).isOnSubmit&&Om(n._options.mode).isOnSubmit)&&q3(N,n._formValues,n._options.criteriaMode===_s.all,n._options.shouldUseNativeValidation,!0).then(_=>!Dr(_)&&n._subjects.state.next({errors:tA(n._formState.errors,_,a)}))}n._subjects.values.next({name:a,values:{...n._formValues}}),n._names.focus&&fu(n._fields,(N,_)=>{if(n._names.focus&&_.startsWith(n._names.focus)&&N.focus)return N.focus(),1}),n._names.focus="",n._updateValid(),g.current=!1},[o,a,n]),R.useEffect(()=>(!st(n._formValues,a)&&n._updateFieldArray(a),()=>{(n._options.shouldUnregister||i)&&n.unregister(a)}),[a,n,r,i]),{swap:R.useCallback(p,[y,a,n]),move:R.useCallback(b,[y,a,n]),prepend:R.useCallback(v,[y,a,n]),append:R.useCallback(w,[y,a,n]),remove:R.useCallback(S,[y,a,n]),insert:R.useCallback(m,[y,a,n]),update:R.useCallback(x,[y,a,n]),replace:R.useCallback(k,[y,a,n]),fields:R.useMemo(()=>o.map((N,_)=>({...N,[r]:l.current[_]||Bo()})),[o,r])}}var W2=()=>{let e=[];return{get observers(){return e},next:r=>{for(const i of e)i.next&&i.next(r)},subscribe:r=>(e.push(r),{unsubscribe:()=>{e=e.filter(i=>i!==r)}}),unsubscribe:()=>{e=[]}}},v1=e=>yr(e)||!WM(e);function pc(e,t){if(v1(e)||v1(t))return e===t;if(Xd(e)&&Xd(t))return e.getTime()===t.getTime();const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(const r of n){const i=e[r];if(!a.includes(r))return!1;if(r!=="ref"){const o=t[r];if(Xd(i)&&Xd(o)||Aa(i)&&Aa(o)||Array.isArray(i)&&Array.isArray(o)?!pc(i,o):i!==o)return!1}}return!0}var rA=e=>e.type==="select-multiple",jq=e=>P6(e)||Yp(e),Y2=e=>x1(e)&&e.isConnected,sA=e=>{for(const t in e)if(cl(e[t]))return!0;return!1};function _1(e,t={}){const n=Array.isArray(e);if(Aa(e)||n)for(const a in e)Array.isArray(e[a])||Aa(e[a])&&!sA(e[a])?(t[a]=Array.isArray(e[a])?[]:{},_1(e[a],t[a])):yr(e[a])||(t[a]=!0);return t}function iA(e,t,n){const a=Array.isArray(e);if(Aa(e)||a)for(const r in e)Array.isArray(e[r])||Aa(e[r])&&!sA(e[r])?Hn(t)||v1(n[r])?n[r]=Array.isArray(e[r])?_1(e[r],[]):{..._1(e[r])}:iA(e[r],yr(t)?{}:t[r],n[r]):n[r]=!pc(e[r],t[r]);return n}var y0=(e,t)=>iA(e,t,_1(t)),oA=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:a})=>Hn(e)?e:t?e===""?NaN:e&&+e:n&&Ni(e)?new Date(e):a?a(e):e;function G2(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return O6(t)?t.files:P6(t)?aA(e.refs).value:rA(t)?[...t.selectedOptions].map(({value:n})=>n):Yp(t)?nA(e.refs).value:oA(Hn(t.value)?e.ref.value:t.value,e)}var zq=(e,t,n,a)=>{const r={};for(const i of e){const o=st(t,i);o&&Dn(r,i,o._f)}return{criteriaMode:n,names:[...e],fields:r,shouldUseNativeValidation:a}},Qf=e=>Hn(e)?e:w1(e)?e.source:Aa(e)?w1(e.value)?e.value.source:e.value:e,Fq=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function a9(e,t,n){const a=st(e,n);if(a||I6(n))return{error:a,name:n};const r=n.split(".");for(;r.length;){const i=r.join("."),o=st(t,i),c=st(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(c&&c.type)return{name:i,error:c};r.pop()}return{name:n}}var $q=(e,t,n,a,r)=>r.isOnAll?!1:!n&&r.isOnTouch?!(t||e):(n?a.isOnBlur:r.isOnBlur)?!e:(n?a.isOnChange:r.isOnChange)?e:!0,Bq=(e,t)=>!nf(st(e,t)).length&&ba(e,t);const Hq={mode:_s.onSubmit,reValidateMode:_s.onChange,shouldFocusError:!0};function Uq(e={}){let t={...Hq,...e},n={submitCount:0,isDirty:!1,isLoading:cl(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},a={},r=Aa(t.defaultValues)||Aa(t.values)?Ta(t.defaultValues||t.values)||{}:{},i=t.shouldUnregister?{}:Ta(r),o={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},g={values:W2(),array:W2(),state:W2()},y=Om(t.mode),w=Om(t.reValidateMode),v=t.criteriaMode===_s.all,S=ae=>ie=>{clearTimeout(d),d=setTimeout(ae,ie)},m=async ae=>{if(u.isValid||ae){const ie=t.resolver?Dr((await E()).errors):await D(a,!0);ie!==n.isValid&&g.state.next({isValid:ie})}},p=(ae,ie)=>{(u.isValidating||u.validatingFields)&&((ae||Array.from(c.mount)).forEach(de=>{de&&(ie?Dn(n.validatingFields,de,ie):ba(n.validatingFields,de))}),g.state.next({validatingFields:n.validatingFields,isValidating:!Dr(n.validatingFields)}))},b=(ae,ie=[],de,fe,be=!0,he=!0)=>{if(fe&&de){if(o.action=!0,he&&Array.isArray(st(a,ae))){const ve=de(st(a,ae),fe.argA,fe.argB);be&&Dn(a,ae,ve)}if(he&&Array.isArray(st(n.errors,ae))){const ve=de(st(n.errors,ae),fe.argA,fe.argB);be&&Dn(n.errors,ae,ve),Bq(n.errors,ae)}if(u.touchedFields&&he&&Array.isArray(st(n.touchedFields,ae))){const ve=de(st(n.touchedFields,ae),fe.argA,fe.argB);be&&Dn(n.touchedFields,ae,ve)}u.dirtyFields&&(n.dirtyFields=y0(r,i)),g.state.next({name:ae,isDirty:M(ae,ie),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Dn(i,ae,ie)},x=(ae,ie)=>{Dn(n.errors,ae,ie),g.state.next({errors:n.errors})},k=ae=>{n.errors=ae,g.state.next({errors:n.errors,isValid:!1})},N=(ae,ie,de,fe)=>{const be=st(a,ae);if(be){const he=st(i,ae,Hn(de)?st(r,ae):de);Hn(he)||fe&&fe.defaultChecked||ie?Dn(i,ae,ie?he:G2(be._f)):z(ae,he),o.mount&&m()}},_=(ae,ie,de,fe,be)=>{let he=!1,ve=!1;const Ce={name:ae},nt=!!(st(a,ae)&&st(a,ae)._f&&st(a,ae)._f.disabled);if(!de||fe){u.isDirty&&(ve=n.isDirty,n.isDirty=Ce.isDirty=M(),he=ve!==Ce.isDirty);const Ae=nt||pc(st(r,ae),ie);ve=!!(!nt&&st(n.dirtyFields,ae)),Ae||nt?ba(n.dirtyFields,ae):Dn(n.dirtyFields,ae,!0),Ce.dirtyFields=n.dirtyFields,he=he||u.dirtyFields&&ve!==!Ae}if(de){const Ae=st(n.touchedFields,ae);Ae||(Dn(n.touchedFields,ae,de),Ce.touchedFields=n.touchedFields,he=he||u.touchedFields&&Ae!==de)}return he&&be&&g.state.next(Ce),he?Ce:{}},C=(ae,ie,de,fe)=>{const be=st(n.errors,ae),he=u.isValid&&xi(ie)&&n.isValid!==ie;if(e.delayError&&de?(l=S(()=>x(ae,de)),l(e.delayError)):(clearTimeout(d),l=null,de?Dn(n.errors,ae,de):ba(n.errors,ae)),(de?!pc(be,de):be)||!Dr(fe)||he){const ve={...fe,...he&&xi(ie)?{isValid:ie}:{},errors:n.errors,name:ae};n={...n,...ve},g.state.next(ve)}},E=async ae=>{p(ae,!0);const ie=await t.resolver(i,t.context,zq(ae||c.mount,a,t.criteriaMode,t.shouldUseNativeValidation));return p(ae),ie},T=async ae=>{const{errors:ie}=await E(ae);if(ae)for(const de of ae){const fe=st(ie,de);fe?Dn(n.errors,de,fe):ba(n.errors,de)}else n.errors=ie;return ie},D=async(ae,ie,de={valid:!0})=>{for(const fe in ae){const be=ae[fe];if(be){const{_f:he,...ve}=be;if(he){const Ce=c.array.has(he.name);p([fe],!0);const nt=await q3(be,i,v,t.shouldUseNativeValidation&&!ie,Ce);if(p([fe]),nt[he.name]&&(de.valid=!1,ie))break;!ie&&(st(nt,he.name)?Ce?tA(n.errors,nt,he.name):Dn(n.errors,he.name,nt[he.name]):ba(n.errors,he.name))}ve&&await D(ve,ie,de)}}return de.valid},P=()=>{for(const ae of c.unMount){const ie=st(a,ae);ie&&(ie._f.refs?ie._f.refs.every(de=>!Y2(de)):!Y2(ie._f.ref))&&ne(ae)}c.unMount=new Set},M=(ae,ie)=>(ae&&ie&&Dn(i,ae,ie),!pc(Y(),r)),O=(ae,ie,de)=>KM(ae,c,{...o.mount?i:Hn(ie)?r:Ni(ae)?{[ae]:ie}:ie},de,ie),F=ae=>nf(st(o.mount?i:r,ae,e.shouldUnregister?st(r,ae,[]):[])),z=(ae,ie,de={})=>{const fe=st(a,ae);let be=ie;if(fe){const he=fe._f;he&&(!he.disabled&&Dn(i,ae,oA(ie,he)),be=x1(he.ref)&&yr(ie)?"":ie,rA(he.ref)?[...he.ref.options].forEach(ve=>ve.selected=be.includes(ve.value)):he.refs?Yp(he.ref)?he.refs.length>1?he.refs.forEach(ve=>(!ve.defaultChecked||!ve.disabled)&&(ve.checked=Array.isArray(be)?!!be.find(Ce=>Ce===ve.value):be===ve.value)):he.refs[0]&&(he.refs[0].checked=!!be):he.refs.forEach(ve=>ve.checked=ve.value===be):O6(he.ref)?he.ref.value="":(he.ref.value=be,he.ref.type||g.values.next({name:ae,values:{...i}})))}(de.shouldDirty||de.shouldTouch)&&_(ae,be,de.shouldTouch,de.shouldDirty,!0),de.shouldValidate&&B(ae)},H=(ae,ie,de)=>{for(const fe in ie){const be=ie[fe],he=`${ae}.${fe}`,ve=st(a,he);(c.array.has(ae)||!v1(be)||ve&&!ve._f)&&!Xd(be)?H(he,be,de):z(he,be,de)}},A=(ae,ie,de={})=>{const fe=st(a,ae),be=c.array.has(ae),he=Ta(ie);Dn(i,ae,he),be?(g.array.next({name:ae,values:{...i}}),(u.isDirty||u.dirtyFields)&&de.shouldDirty&&g.state.next({name:ae,dirtyFields:y0(r,i),isDirty:M(ae,he)})):fe&&!fe._f&&!yr(he)?H(ae,he,de):z(ae,he,de),G3(ae,c)&&g.state.next({...n}),g.values.next({name:o.mount?ae:void 0,values:{...i}})},j=async ae=>{o.mount=!0;const ie=ae.target;let de=ie.name,fe=!0;const be=st(a,de),he=()=>ie.type?G2(be._f):YM(ae),ve=Ce=>{fe=Number.isNaN(Ce)||Ce===st(i,de,Ce)};if(be){let Ce,nt;const Ae=he(),Je=ae.type===y1.BLUR||ae.type===y1.FOCUS_OUT,ze=!Fq(be._f)&&!t.resolver&&!st(n.errors,de)&&!be._f.deps||$q(Je,st(n.touchedFields,de),n.isSubmitted,w,y),We=G3(de,c,Je);Dn(i,de,Ae),Je?(be._f.onBlur&&be._f.onBlur(ae),l&&l(0)):be._f.onChange&&be._f.onChange(ae);const bt=_(de,Ae,Je,!1),Et=!Dr(bt)||We;if(!Je&&g.values.next({name:de,type:ae.type,values:{...i}}),ze)return u.isValid&&m(),Et&&g.state.next({name:de,...We?{}:bt});if(!Je&&We&&g.state.next({...n}),t.resolver){const{errors:wt}=await E([de]);if(ve(Ae),fe){const At=a9(n.errors,a,de),Yt=a9(wt,a,At.name||de);Ce=Yt.error,de=Yt.name,nt=Dr(wt)}}else p([de],!0),Ce=(await q3(be,i,v,t.shouldUseNativeValidation))[de],p([de]),ve(Ae),fe&&(Ce?nt=!1:u.isValid&&(nt=await D(a,!0)));fe&&(be._f.deps&&B(be._f.deps),C(de,nt,Ce,bt))}},I=(ae,ie)=>{if(st(n.errors,ie)&&ae.focus)return ae.focus(),1},B=async(ae,ie={})=>{let de,fe;const be=Zr(ae);if(t.resolver){const he=await T(Hn(ae)?ae:be);de=Dr(he),fe=ae?!be.some(ve=>st(he,ve)):de}else ae?(fe=(await Promise.all(be.map(async he=>{const ve=st(a,he);return await D(ve&&ve._f?{[he]:ve}:ve)}))).every(Boolean),!(!fe&&!n.isValid)&&m()):fe=de=await D(a);return g.state.next({...!Ni(ae)||u.isValid&&de!==n.isValid?{}:{name:ae},...t.resolver||!ae?{isValid:de}:{},errors:n.errors}),ie.shouldFocus&&!fe&&fu(a,I,ae?be:c.mount),fe},Y=ae=>{const ie={...o.mount?i:r};return Hn(ae)?ie:Ni(ae)?st(ie,ae):ae.map(de=>st(ie,de))},U=(ae,ie)=>({invalid:!!st((ie||n).errors,ae),isDirty:!!st((ie||n).dirtyFields,ae),error:st((ie||n).errors,ae),isValidating:!!st(n.validatingFields,ae),isTouched:!!st((ie||n).touchedFields,ae)}),W=ae=>{ae&&Zr(ae).forEach(ie=>ba(n.errors,ie)),g.state.next({errors:ae?n.errors:{}})},V=(ae,ie,de)=>{const fe=(st(a,ae,{_f:{}})._f||{}).ref,be=st(n.errors,ae)||{},{ref:he,message:ve,type:Ce,...nt}=be;Dn(n.errors,ae,{...nt,...ie,ref:fe}),g.state.next({name:ae,errors:n.errors,isValid:!1}),de&&de.shouldFocus&&fe&&fe.focus&&fe.focus()},X=(ae,ie)=>cl(ae)?g.values.subscribe({next:de=>ae(O(void 0,ie),de)}):O(ae,ie,!0),ne=(ae,ie={})=>{for(const de of ae?Zr(ae):c.mount)c.mount.delete(de),c.array.delete(de),ie.keepValue||(ba(a,de),ba(i,de)),!ie.keepError&&ba(n.errors,de),!ie.keepDirty&&ba(n.dirtyFields,de),!ie.keepTouched&&ba(n.touchedFields,de),!ie.keepIsValidating&&ba(n.validatingFields,de),!t.shouldUnregister&&!ie.keepDefaultValue&&ba(r,de);g.values.next({values:{...i}}),g.state.next({...n,...ie.keepDirty?{isDirty:M()}:{}}),!ie.keepIsValid&&m()},oe=({disabled:ae,name:ie,field:de,fields:fe,value:be})=>{if(xi(ae)&&o.mount||!!ae){const he=ae?void 0:Hn(be)?G2(de?de._f:st(fe,ie)._f):be;Dn(i,ie,he),_(ie,he,!1,!1,!0)}},q=(ae,ie={})=>{let de=st(a,ae);const fe=xi(ie.disabled);return Dn(a,ae,{...de||{},_f:{...de&&de._f?de._f:{ref:{name:ae}},name:ae,mount:!0,...ie}}),c.mount.add(ae),de?oe({field:de,disabled:ie.disabled,name:ae,value:ie.value}):N(ae,!0,ie.value),{...fe?{disabled:ie.disabled}:{},...t.progressive?{required:!!ie.required,min:Qf(ie.min),max:Qf(ie.max),minLength:Qf(ie.minLength),maxLength:Qf(ie.maxLength),pattern:Qf(ie.pattern)}:{},name:ae,onChange:j,onBlur:j,ref:be=>{if(be){q(ae,ie),de=st(a,ae);const he=Hn(be.value)&&be.querySelectorAll&&be.querySelectorAll("input,select,textarea")[0]||be,ve=jq(he),Ce=de._f.refs||[];if(ve?Ce.find(nt=>nt===he):he===de._f.ref)return;Dn(a,ae,{_f:{...de._f,...ve?{refs:[...Ce.filter(Y2),he,...Array.isArray(st(r,ae))?[{}]:[]],ref:{type:he.type,name:ae}}:{ref:he}}}),N(ae,!1,void 0,he)}else de=st(a,ae,{}),de._f&&(de._f.mount=!1),(t.shouldUnregister||ie.shouldUnregister)&&!(GM(c.array,ae)&&o.action)&&c.unMount.add(ae)}}},te=()=>t.shouldFocusError&&fu(a,I,c.mount),G=ae=>{xi(ae)&&(g.state.next({disabled:ae}),fu(a,(ie,de)=>{const fe=st(a,de);fe&&(ie.disabled=fe._f.disabled||ae,Array.isArray(fe._f.refs)&&fe._f.refs.forEach(be=>{be.disabled=fe._f.disabled||ae}))},0,!1))},J=(ae,ie)=>async de=>{let fe;de&&(de.preventDefault&&de.preventDefault(),de.persist&&de.persist());let be=Ta(i);if(g.state.next({isSubmitting:!0}),t.resolver){const{errors:he,values:ve}=await E();n.errors=he,be=ve}else await D(a);if(ba(n.errors,"root"),Dr(n.errors)){g.state.next({errors:{}});try{await ae(be,de)}catch(he){fe=he}}else ie&&await ie({...n.errors},de),te(),setTimeout(te);if(g.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Dr(n.errors)&&!fe,submitCount:n.submitCount+1,errors:n.errors}),fe)throw fe},K=(ae,ie={})=>{st(a,ae)&&(Hn(ie.defaultValue)?A(ae,Ta(st(r,ae))):(A(ae,ie.defaultValue),Dn(r,ae,Ta(ie.defaultValue))),ie.keepTouched||ba(n.touchedFields,ae),ie.keepDirty||(ba(n.dirtyFields,ae),n.isDirty=ie.defaultValue?M(ae,Ta(st(r,ae))):M()),ie.keepError||(ba(n.errors,ae),u.isValid&&m()),g.state.next({...n}))},Q=(ae,ie={})=>{const de=ae?Ta(ae):r,fe=Ta(de),be=Dr(ae),he=be?r:fe;if(ie.keepDefaultValues||(r=de),!ie.keepValues){if(ie.keepDirtyValues)for(const ve of c.mount)st(n.dirtyFields,ve)?Dn(he,ve,st(i,ve)):A(ve,st(he,ve));else{if(A6&&Hn(ae))for(const ve of c.mount){const Ce=st(a,ve);if(Ce&&Ce._f){const nt=Array.isArray(Ce._f.refs)?Ce._f.refs[0]:Ce._f.ref;if(x1(nt)){const Ae=nt.closest("form");if(Ae){Ae.reset();break}}}}a={}}i=e.shouldUnregister?ie.keepDefaultValues?Ta(r):{}:Ta(he),g.array.next({values:{...he}}),g.values.next({values:{...he}})}c={mount:ie.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!u.isValid||!!ie.keepIsValid||!!ie.keepDirtyValues,o.watch=!!e.shouldUnregister,g.state.next({submitCount:ie.keepSubmitCount?n.submitCount:0,isDirty:be?!1:ie.keepDirty?n.isDirty:!!(ie.keepDefaultValues&&!pc(ae,r)),isSubmitted:ie.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:be?[]:ie.keepDirtyValues?ie.keepDefaultValues&&i?y0(r,i):n.dirtyFields:ie.keepDefaultValues&&ae?y0(r,ae):ie.keepDirty?n.dirtyFields:{},touchedFields:ie.keepTouched?n.touchedFields:{},errors:ie.keepErrors?n.errors:{},isSubmitSuccessful:ie.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Z=(ae,ie)=>Q(cl(ae)?ae(i):ae,ie);return{control:{register:q,unregister:ne,getFieldState:U,handleSubmit:J,setError:V,_executeSchema:E,_getWatch:O,_getDirty:M,_updateValid:m,_removeUnmounted:P,_updateFieldArray:b,_updateDisabledField:oe,_getFieldArray:F,_reset:Q,_resetDefaultValues:()=>cl(t.defaultValues)&&t.defaultValues().then(ae=>{Z(ae,t.resetOptions),g.state.next({isLoading:!1})}),_updateFormState:ae=>{n={...n,...ae}},_disableForm:G,_subjects:g,_proxyFormState:u,_setErrors:k,get _fields(){return a},get _formValues(){return i},get _state(){return o},set _state(ae){o=ae},get _defaultValues(){return r},get _names(){return c},set _names(ae){c=ae},get _formState(){return n},set _formState(ae){n=ae},get _options(){return t},set _options(ae){t={...t,...ae}}},trigger:B,register:q,handleSubmit:J,watch:X,setValue:A,getValues:Y,reset:Z,resetField:K,clearErrors:W,unregister:ne,setError:V,setFocus:(ae,ie={})=>{const de=st(a,ae),fe=de&&de._f;if(fe){const be=fe.refs?fe.refs[0]:fe.ref;be.focus&&(be.focus(),ie.shouldSelect&&be.select())}},getFieldState:U}}function Oe(e={}){const t=R.useRef(),n=R.useRef(),[a,r]=R.useState({isDirty:!1,isValidating:!1,isLoading:cl(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:cl(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Uq(e),formState:a});const i=t.current.control;return i._options=e,fy({subject:i._subjects.state,next:o=>{QM(o,i._proxyFormState,i._updateFormState,!0)&&r({...i._formState})}}),R.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),R.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==a.isDirty&&i._subjects.state.next({isDirty:o})}},[i,a.isDirty]),R.useEffect(()=>{e.values&&!pc(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,r(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),R.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),R.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),R.useEffect(()=>{e.shouldUnregister&&i._subjects.values.next({values:i._getWatch()})},[e.shouldUnregister,i]),t.current.formState=ZM(a,i),t.current}function Jf(e,t,n){var i;let a=(i=n.initialDeps)!=null?i:[],r;return()=>{var o,c,l,d;let u;n.key&&((o=n.debug)==null?void 0:o.call(n))&&(u=Date.now());const g=e();if(!(g.length!==a.length||g.some((v,S)=>a[S]!==v)))return r;a=g;let w;if(n.key&&((c=n.debug)==null?void 0:c.call(n))&&(w=Date.now()),r=t(...g),n.key&&((l=n.debug)==null?void 0:l.call(n))){const v=Math.round((Date.now()-u)*100)/100,S=Math.round((Date.now()-w)*100)/100,m=S/16,p=(b,x)=>{for(b=String(b);b.length<x;)b=" "+b;return b};console.info(`%c\u23F1 ${p(S,5)} /${p(v,5)} ms`,`
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,n==null?void 0:n.key)}return(d=n==null?void 0:n.onChange)==null||d.call(n,r),r}}function q2(e,t){if(e===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return e}const Vq=(e,t)=>Math.abs(e-t)<1,Wq=(e,t,n)=>{let a;return function(...r){e.clearTimeout(a),a=e.setTimeout(()=>t.apply(this,r),n)}},Yq=e=>e,Gq=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),a=[];for(let r=t;r<=n;r++)a.push(r);return a},qq=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;const r=o=>{const{width:c,height:l}=o;t({width:Math.round(c),height:Math.round(l)})};if(r(n.getBoundingClientRect()),!a.ResizeObserver)return()=>{};const i=new a.ResizeObserver(o=>{const c=o[0];if(c!=null&&c.borderBoxSize){const l=c.borderBoxSize[0];if(l){r({width:l.inlineSize,height:l.blockSize});return}}r(n.getBoundingClientRect())});return i.observe(n,{box:"border-box"}),()=>{i.unobserve(n)}},r9={passive:!0},Zq=typeof window=="undefined"?!0:"onscrollend"in window,Qq=(e,t)=>{const n=e.scrollElement;if(!n)return;const a=e.targetWindow;if(!a)return;let r=0;const i=Zq?()=>{}:Wq(a,()=>{t(r,!1)},e.options.isScrollingResetDelay),o=d=>()=>{r=n[e.options.horizontal?"scrollLeft":"scrollTop"],i(),t(r,d)},c=o(!0),l=o(!1);return l(),n.addEventListener("scroll",c,r9),n.addEventListener("scrollend",l,r9),()=>{n.removeEventListener("scroll",c),n.removeEventListener("scrollend",l)}},Jq=(e,t,n)=>{if(t!=null&&t.borderBoxSize){const a=t.borderBoxSize[0];if(a)return Math.round(a[n.options.horizontal?"inlineSize":"blockSize"])}return Math.round(e.getBoundingClientRect()[n.options.horizontal?"width":"height"])},Kq=(e,{adjustments:t=0,behavior:n},a)=>{var r,i;const o=e+t;(i=(r=a.scrollElement)==null?void 0:r.scrollTo)==null||i.call(r,{[a.options.horizontal?"left":"top"]:o,behavior:n})};class Xq{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollDirection=null,this.scrollAdjustments=0,this.measureElementCache=new Map,this.observer=(()=>{let n=null;const a=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(r=>{r.forEach(i=>{this._measureElement(i.target,i)})}));return{disconnect:()=>{var r;return(r=a())==null?void 0:r.disconnect()},observe:r=>{var i;return(i=a())==null?void 0:i.observe(r,{box:"border-box"})},unobserve:r=>{var i;return(i=a())==null?void 0:i.unobserve(r)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([a,r])=>{typeof r=="undefined"&&delete n[a]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Yq,rangeExtractor:Gq,onChange:()=>{},measureElement:Jq,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,...n}},this.notify=(n,a)=>{var d;var r,i;const{startIndex:o,endIndex:c}=(d=this.range)!=null?d:{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(n||o!==(l==null?void 0:l.startIndex)||c!==(l==null?void 0:l.endIndex))&&((i=(r=this.options).onChange)==null||i.call(r,this,a))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.scrollElement=null},this._didMount=()=>(this.measureElementCache.forEach(this.observer.observe),()=>{this.observer.disconnect(),this.cleanup()}),this._willUpdate=()=>{var r;var n;const a=this.options.getScrollElement();this.scrollElement!==a&&(this.cleanup(),this.scrollElement=a,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(r=(n=this.scrollElement)==null?void 0:n.window)!=null?r:null,this._scrollToOffset(this.scrollOffset,{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(i,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.scrollOffset<i?"forward":"backward":null,this.scrollOffset=i;const c=this.isScrolling;this.isScrolling=o,this.notify(c!==o,o)})))},this.getSize=()=>this.scrollRect[this.options.horizontal?"width":"height"],this.getMeasurementOptions=Jf(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey],(n,a,r,i)=>(this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:a,scrollMargin:r,getItemKey:i}),{key:!1}),this.getFurthestMeasurement=(n,a)=>{const r=new Map,i=new Map;for(let o=a-1;o>=0;o--){const c=n[o];if(r.has(c.lane))continue;const l=i.get(c.lane);if(l==null||c.end>l.end?i.set(c.lane,c):c.end<l.end&&r.set(c.lane,!0),r.size===this.options.lanes)break}return i.size===this.options.lanes?Array.from(i.values()).sort((o,c)=>o.end===c.end?o.index-c.index:o.end-c.end)[0]:void 0},this.getMeasurements=Jf(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:a,scrollMargin:r,getItemKey:i},o)=>{const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const l=this.measurementsCache.slice(0,c);for(let d=c;d<n;d++){const u=i(d),g=this.options.lanes===1?l[d-1]:this.getFurthestMeasurement(l,d),y=g?g.end+this.options.gap:a+r,w=o.get(u),v=typeof w=="number"?w:this.options.estimateSize(d),S=y+v,m=g?g.lane:d%this.options.lanes;l[d]={index:d,start:y,size:v,end:S,key:u,lane:m}}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=Jf(()=>[this.getMeasurements(),this.getSize(),this.scrollOffset],(n,a,r)=>this.range=n.length>0&&a>0?eZ({measurements:n,outerSize:a,scrollOffset:r}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=Jf(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(n,a,r,i)=>a===null?[]:n({startIndex:a.startIndex,endIndex:a.endIndex,overscan:r,count:i}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const a=this.options.indexAttribute,r=n.getAttribute(a);return r?parseInt(r,10):(console.warn(`Missing attribute name '${a}={index}' on measured element.`),-1)},this._measureElement=(n,a)=>{const r=this.measurementsCache[this.indexFromElement(n)];if(!r||!n.isConnected){this.measureElementCache.forEach((c,l)=>{c===n&&(this.observer.unobserve(n),this.measureElementCache.delete(l))});return}const i=this.measureElementCache.get(r.key);i!==n&&(i&&this.observer.unobserve(i),this.observer.observe(n),this.measureElementCache.set(r.key,n));const o=this.options.measureElement(n,a,this);this.resizeItem(r,o)},this.resizeItem=(n,a)=>{var o;const r=(o=this.itemSizeCache.get(n.key))!=null?o:n.size,i=a-r;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(n,i,this):n.start<this.scrollOffset+this.scrollAdjustments)&&this._scrollToOffset(this.scrollOffset,{adjustments:this.scrollAdjustments+=i,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(n.index),this.itemSizeCache=new Map(this.itemSizeCache.set(n.key,a)),this.notify(!0,!1))},this.measureElement=n=>{!n||this._measureElement(n,void 0)},this.getVirtualItems=Jf(()=>[this.getIndexes(),this.getMeasurements()],(n,a)=>{const r=[];for(let i=0,o=n.length;i<o;i++){const c=n[i],l=a[c];r.push(l)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const a=this.getMeasurements();return q2(a[lA(0,a.length-1,r=>q2(a[r]).start,n)])},this.getOffsetForAlignment=(n,a)=>{const r=this.getSize();a==="auto"&&(n<=this.scrollOffset?a="start":n>=this.scrollOffset+r?a="end":a="start"),a==="start"?n=n:a==="end"?n=n-r:a==="center"&&(n=n-r/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",c=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-this.getSize();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,a="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const r=q2(this.getMeasurements()[n]);if(a==="auto")if(r.end>=this.scrollOffset+this.getSize()-this.options.scrollPaddingEnd)a="end";else if(r.start<=this.scrollOffset+this.options.scrollPaddingStart)a="start";else return[this.scrollOffset,a];const i=a==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,a),a]},this.isDynamicMode=()=>this.measureElementCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(n,{align:a="start",behavior:r}={})=>{this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(n,a),{adjustments:void 0,behavior:r})},this.scrollToIndex=(n,{align:a="auto",behavior:r}={})=>{n=Math.max(0,Math.min(n,this.options.count-1)),this.cancelScrollToIndex(),r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const[i,o]=this.getOffsetForIndex(n,a);this._scrollToOffset(i,{adjustments:void 0,behavior:r}),r!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.measureElementCache.has(this.options.getItemKey(n))){const[l]=this.getOffsetForIndex(n,o);Vq(l,this.scrollOffset)||this.scrollToIndex(n,{align:o,behavior:r})}else this.scrollToIndex(n,{align:o,behavior:r})}))},this.scrollBy=(n,{behavior:a}={})=>{this.cancelScrollToIndex(),a==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.scrollOffset+n,{adjustments:void 0,behavior:a})},this.getTotalSize=()=>{var i;var n;const a=this.getMeasurements();let r;return a.length===0?r=this.options.paddingStart:r=this.options.lanes===1?(i=(n=a[a.length-1])==null?void 0:n.end)!=null?i:0:Math.max(...a.slice(-this.options.lanes).map(o=>o.end)),r-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(n,{adjustments:a,behavior:r})=>{this.options.scrollToFn(n,{behavior:r,adjustments:a},this)},this.measure=()=>{var n,a;this.itemSizeCache=new Map,(a=(n=this.options).onChange)==null||a.call(n,this,!1)},this.setOptions(t),this.scrollRect=this.options.initialRect,this.scrollOffset=typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset,this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(n=>{this.itemSizeCache.set(n.key,n.size)}),this.notify(!1,!1)}}const lA=(e,t,n,a)=>{for(;e<=t;){const r=(e+t)/2|0,i=n(r);if(i<a)e=r+1;else if(i>a)t=r-1;else return r}return e>0?e-1:0};function eZ({measurements:e,outerSize:t,scrollOffset:n}){const a=e.length-1,i=lA(0,a,c=>e[c].start,n);let o=i;for(;o<a&&e[o].end<n+t;)o++;return{startIndex:i,endIndex:o}}const tZ=typeof document!="undefined"?h.exports.useLayoutEffect:h.exports.useEffect;function nZ(e){const t=h.exports.useReducer(()=>({}),{})[1],n={...e,onChange:(r,i)=>{var o;i?Rl.exports.flushSync(t):t(),(o=e.onChange)==null||o.call(e,r,i)}},[a]=h.exports.useState(()=>new Xq(n));return a.setOptions(n),h.exports.useEffect(()=>a._didMount(),[]),tZ(()=>a._willUpdate()),a}function aZ(e){return nZ({observeElementRect:qq,observeElementOffset:Qq,scrollToFn:Kq,...e})}var rZ=Object.defineProperty,sZ=(e,t,n)=>t in e?rZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z2=(e,t,n)=>(sZ(e,typeof t!="symbol"?t+"":t,n),n);class iZ{constructor(){Z2(this,"current",this.detect()),Z2(this,"handoffState","pending"),Z2(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window=="undefined"||typeof document=="undefined"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}}let fo=new iZ,en=(e,t)=>{fo.isServer?h.exports.useEffect(e,t):h.exports.useLayoutEffect(e,t)};function $a(e){let t=h.exports.useRef(e);return en(()=>{t.current=e},[e]),t}function Gp(e,t){let[n,a]=h.exports.useState(e),r=$a(e);return en(()=>a(r.current),[r,a,...t]),n}let Be=function(e){let t=$a(e);return R.useCallback((...n)=>t.current(...n),[t])};function R6(e,t,n){let[a,r]=h.exports.useState(n),i=e!==void 0,o=h.exports.useRef(i),c=h.exports.useRef(!1),l=h.exports.useRef(!1);return i&&!o.current&&!c.current?(c.current=!0,o.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!i&&o.current&&!l.current&&(l.current=!0,o.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[i?e:a,Be(d=>(i||r(d),t==null?void 0:t(d)))]}function qp(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function lr(){let e=[],t={addEventListener(n,a,r,i){return n.addEventListener(a,r,i),t.add(()=>n.removeEventListener(a,r,i))},requestAnimationFrame(...n){let a=requestAnimationFrame(...n);return t.add(()=>cancelAnimationFrame(a))},nextFrame(...n){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...n))},setTimeout(...n){let a=setTimeout(...n);return t.add(()=>clearTimeout(a))},microTask(...n){let a={current:!0};return qp(()=>{a.current&&n[0]()}),t.add(()=>{a.current=!1})},style(n,a,r){let i=n.style.getPropertyValue(a);return Object.assign(n.style,{[a]:r}),this.add(()=>{Object.assign(n.style,{[a]:i})})},group(n){let a=lr();return n(a),this.add(()=>a.dispose())},add(n){return e.push(n),()=>{let a=e.indexOf(n);if(a>=0)for(let r of e.splice(a,1))r()}},dispose(){for(let n of e.splice(0))n()}};return t}function as(){let[e]=h.exports.useState(lr);return h.exports.useEffect(()=>()=>e.dispose(),[e]),e}function oZ(){let e=typeof document=="undefined";return"useSyncExternalStore"in Ll?(t=>t.useSyncExternalStore)(Ll)(()=>()=>{},()=>!1,()=>!e):!1}function rf(){let e=oZ(),[t,n]=h.exports.useState(fo.isHandoffComplete);return t&&fo.isHandoffComplete===!1&&n(!1),h.exports.useEffect(()=>{t!==!0&&n(!0)},[t]),h.exports.useEffect(()=>fo.handoff(),[]),e?!1:t}var s9;let Tn=(s9=R.useId)!=null?s9:function(){let e=rf(),[t,n]=R.useState(e?()=>fo.nextId():null);return en(()=>{t===null&&n(fo.nextId())},[t]),t!=null?""+t:void 0};function Rt(e,t,...n){if(e in t){let r=t[e];return typeof r=="function"?r(...n):r}let a=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,Rt),a}function $l(e){return fo.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Z3=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var $n=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))($n||{}),so=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(so||{}),lZ=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(lZ||{});function Zp(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Z3)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Qp=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Qp||{});function Jp(e,t=0){var n;return e===((n=$l(e))==null?void 0:n.body)?!1:Rt(t,{[0](){return e.matches(Z3)},[1](){let a=e;for(;a!==null;){if(a.matches(Z3))return!0;a=a.parentElement}return!1}})}function cA(e){let t=$l(e);lr().nextFrame(()=>{t&&!Jp(t.activeElement,0)&&kl(e)})}var cZ=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(cZ||{});typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function kl(e){e==null||e.focus({preventScroll:!0})}let dZ=["textarea","input"].join(",");function uZ(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,dZ))!=null?n:!1}function io(e,t=n=>n){return e.slice().sort((n,a)=>{let r=t(n),i=t(a);if(r===null||i===null)return 0;let o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function fZ(e,t){return Fa(Zp(),t,{relativeTo:e})}function Fa(e,t,{sorted:n=!0,relativeTo:a=null,skipElements:r=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?io(e):e:Zp(e);r.length>0&&o.length>1&&(o=o.filter(w=>!r.includes(w))),a=a!=null?a:i.activeElement;let c=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(a))-1;if(t&4)return Math.max(0,o.indexOf(a))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},u=0,g=o.length,y;do{if(u>=g||u+g<=0)return 0;let w=l+u;if(t&16)w=(w+g)%g;else{if(w<0)return 3;if(w>=g)return 1}y=o[w],y==null||y.focus(d),u+=c}while(y!==i.activeElement);return t&6&&uZ(y)&&y.select(),2}function dA(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function mZ(){return/Android/gi.test(window.navigator.userAgent)}function uA(){return dA()||mZ()}function x0(e,t,n){let a=$a(t);h.exports.useEffect(()=>{function r(i){a.current(i)}return document.addEventListener(e,r,n),()=>document.removeEventListener(e,r,n)},[e,n])}function fA(e,t,n){let a=$a(t);h.exports.useEffect(()=>{function r(i){a.current(i)}return window.addEventListener(e,r,n),()=>window.removeEventListener(e,r,n)},[e,n])}function Kp(e,t,n=!0){let a=h.exports.useRef(!1);h.exports.useEffect(()=>{requestAnimationFrame(()=>{a.current=n})},[n]);function r(o,c){if(!a.current||o.defaultPrevented)return;let l=c(o);if(l===null||!l.getRootNode().contains(l)||!l.isConnected)return;let d=function u(g){return typeof g=="function"?u(g()):Array.isArray(g)||g instanceof Set?g:[g]}(e);for(let u of d){if(u===null)continue;let g=u instanceof HTMLElement?u:u.current;if(g!=null&&g.contains(l)||o.composed&&o.composedPath().includes(g))return}return!Jp(l,Qp.Loose)&&l.tabIndex!==-1&&o.preventDefault(),t(o,l)}let i=h.exports.useRef(null);x0("pointerdown",o=>{var c,l;a.current&&(i.current=((l=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:l[0])||o.target)},!0),x0("mousedown",o=>{var c,l;a.current&&(i.current=((l=(c=o.composedPath)==null?void 0:c.call(o))==null?void 0:l[0])||o.target)},!0),x0("click",o=>{uA()||i.current&&(r(o,()=>i.current),i.current=null)},!0),x0("touchend",o=>r(o,()=>o.target instanceof HTMLElement?o.target:null),!0),fA("blur",o=>r(o,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Oi(...e){return h.exports.useMemo(()=>$l(...e),[...e])}function i9(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Hc(e,t){let[n,a]=h.exports.useState(()=>i9(e));return en(()=>{a(i9(e))},[e.type,e.as]),en(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&a("button")},[n,t]),n}let mA=Symbol();function j6(e,t=!0){return Object.assign(e,{[mA]:t})}function Qt(...e){let t=h.exports.useRef(e);h.exports.useEffect(()=>{t.current=e},[e]);let n=Be(a=>{for(let r of t.current)r!=null&&(typeof r=="function"?r(a):r.current=a)});return e.every(a=>a==null||(a==null?void 0:a[mA]))?void 0:n}function o9(e){return[e.screenX,e.screenY]}function z6(){let e=h.exports.useRef([-1,-1]);return{wasMoved(t){let n=o9(t);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(t){e.current=o9(t)}}}function pA({container:e,accept:t,walk:n,enabled:a=!0}){let r=h.exports.useRef(t),i=h.exports.useRef(n);h.exports.useEffect(()=>{r.current=t,i.current=n},[t,n]),en(()=>{if(!e||!a)return;let o=$l(e);if(!o)return;let c=r.current,l=i.current,d=Object.assign(g=>c(g),{acceptNode:c}),u=o.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,d,!1);for(;u.nextNode();)l(u.currentNode)},[e,a,r,i])}function up(e,t){let n=h.exports.useRef([]),a=Be(e);h.exports.useEffect(()=>{let r=[...n.current];for(let[i,o]of t.entries())if(n.current[i]!==o){let c=a(t,r);return n.current=t,c}},[a,...t])}function N1(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var Ha=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Ha||{}),dl=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(dl||{});function $t({ourProps:e,theirProps:t,slot:n,defaultTag:a,features:r,visible:i=!0,name:o,mergeRefs:c}){c=c!=null?c:pZ;let l=hA(t,e);if(i)return w0(l,n,a,o,c);let d=r!=null?r:0;if(d&2){let{static:u=!1,...g}=l;if(u)return w0(g,n,a,o,c)}if(d&1){let{unmount:u=!0,...g}=l;return Rt(u?0:1,{[0](){return null},[1](){return w0({...g,hidden:!0,style:{display:"none"}},n,a,o,c)}})}return w0(l,n,a,o,c)}function w0(e,t={},n,a,r){let{as:i=n,children:o,refName:c="ref",...l}=Q2(e,["unmount","static"]),d=e.ref!==void 0?{[c]:e.ref}:{},u=typeof o=="function"?o(t):o;"className"in l&&l.className&&typeof l.className=="function"&&(l.className=l.className(t));let g={};if(t){let y=!1,w=[];for(let[v,S]of Object.entries(t))typeof S=="boolean"&&(y=!0),S===!0&&w.push(v);y&&(g["data-headlessui-state"]=w.join(" "))}if(i===h.exports.Fragment&&Object.keys(fp(l)).length>0){if(!h.exports.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${a} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map(S=>` - ${S}`).join(`
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(S=>` - ${S}`).join(`
`)].join(`
`));let y=u.props,w=typeof(y==null?void 0:y.className)=="function"?(...S)=>N1(y==null?void 0:y.className(...S),l.className):N1(y==null?void 0:y.className,l.className),v=w?{className:w}:{};return h.exports.cloneElement(u,Object.assign({},hA(u.props,fp(Q2(l,["ref"]))),g,d,{ref:r(u.ref,d.ref)},v))}return h.exports.createElement(i,Object.assign({},Q2(l,["ref"]),i!==h.exports.Fragment&&d,i!==h.exports.Fragment&&g),u)}function F6(){let e=h.exports.useRef([]),t=h.exports.useCallback(n=>{for(let a of e.current)a!=null&&(typeof a=="function"?a(n):a.current=n)},[]);return(...n)=>{if(!n.every(a=>a==null))return e.current=n,t}}function pZ(...e){return e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}function hA(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let a of e)for(let r in a)r.startsWith("on")&&typeof a[r]=="function"?(n[r]!=null||(n[r]=[]),n[r].push(a[r])):t[r]=a[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(a=>[a,void 0])));for(let a in n)Object.assign(t,{[a](r,...i){let o=n[a];for(let c of o){if((r instanceof Event||(r==null?void 0:r.nativeEvent)instanceof Event)&&r.defaultPrevented)return;c(r,...i)}}});return t}function Bt(e){var t;return Object.assign(h.exports.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function fp(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function Q2(e,t=[]){let n=Object.assign({},e);for(let a of t)a in n&&delete n[a];return n}let hZ="div";var Ds=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Ds||{});function gZ(e,t){var n;let{features:a=1,...r}=e,i={ref:t,"aria-hidden":(a&2)===2?!0:(n=r["aria-hidden"])!=null?n:void 0,hidden:(a&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(a&4)===4&&(a&2)!==2&&{display:"none"}}};return $t({ourProps:i,theirProps:r,slot:{},defaultTag:hZ,name:"Hidden"})}let Ms=Bt(gZ),$6=h.exports.createContext(null);$6.displayName="OpenClosedContext";var gn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(gn||{});function Eo(){return h.exports.useContext($6)}function sf({value:e,children:t}){return R.createElement($6.Provider,{value:e},t)}function bZ(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window!="undefined"&&typeof document!="undefined"&&(document.addEventListener("DOMContentLoaded",t),t())}let wi=[];bZ(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&wi[0]!==t.target&&(wi.unshift(t.target),wi=wi.filter(n=>n!=null&&n.isConnected),wi.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Bl(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let a=(t==null?void 0:t.getAttribute("disabled"))==="";return a&&yZ(n)?!1:a}function yZ(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function xZ(e){throw new Error("Unexpected object: "+e)}var Wt=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(Wt||{});function S1(e,t){let n=t.resolveItems();if(n.length<=0)return null;let a=t.resolveActiveIndex(),r=a!=null?a:-1;switch(e.focus){case 0:{for(let i=0;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 1:{for(let i=r-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 2:{for(let i=r+1;i<n.length;++i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 3:{for(let i=n.length-1;i>=0;--i)if(!t.resolveDisabled(n[i],i,n))return i;return a}case 4:{for(let i=0;i<n.length;++i)if(t.resolveId(n[i],i,n)===e.id)return i;return a}case 5:return null;default:xZ(e)}}function B6(e={},t=null,n=[]){for(let[a,r]of Object.entries(e))bA(n,gA(t,a),r);return n}function gA(e,t){return e?e+"["+t+"]":t}function bA(e,t,n){if(Array.isArray(n))for(let[a,r]of n.entries())bA(e,gA(t,a.toString()),r);else n instanceof Date?e.push([t,n.toISOString()]):typeof n=="boolean"?e.push([t,n?"1":"0"]):typeof n=="string"?e.push([t,n]):typeof n=="number"?e.push([t,`${n}`]):n==null?e.push([t,""]):B6(n,t,e)}function wZ(e){var t,n;let a=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(a){for(let r of a.elements)if(r!==e&&(r.tagName==="INPUT"&&r.type==="submit"||r.tagName==="BUTTON"&&r.type==="submit"||r.nodeName==="INPUT"&&r.type==="image")){r.click();return}(n=a.requestSubmit)==null||n.call(a)}}var pt=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(pt||{}),vZ=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(vZ||{}),_Z=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(_Z||{}),NZ=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(NZ||{}),SZ=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.RegisterOption=3]="RegisterOption",e[e.UnregisterOption=4]="UnregisterOption",e[e.RegisterLabel=5]="RegisterLabel",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualOptions=7]="UpdateVirtualOptions",e))(SZ||{});function J2(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,a=t(e.options.slice()),r=a.length>0&&a[0].dataRef.current.order!==null?a.sort((o,c)=>o.dataRef.current.order-c.dataRef.current.order):io(a,o=>o.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return i===-1&&(i=null),{options:r,activeOptionIndex:i}}let kZ={[1](e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1}},[0](e){var t,n;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((n=e.dataRef.current)!=null&&n.value){let a=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(a!==-1)return{...e,activeOptionIndex:a,comboboxState:0}}return{...e,comboboxState:0}},[2](e,t){var n,a,r,i,o;if((n=e.dataRef.current)!=null&&n.disabled||(a=e.dataRef.current)!=null&&a.optionsRef.current&&!((r=e.dataRef.current)!=null&&r.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let u=t.focus===Wt.Specific?t.idx:S1(t,{resolveItems:()=>e.virtual.options,resolveActiveIndex:()=>{var y,w;return(w=(y=e.activeOptionIndex)!=null?y:e.virtual.options.findIndex(v=>!e.virtual.disabled(v)))!=null?w:null},resolveDisabled:e.virtual.disabled,resolveId(){throw new Error("Function not implemented.")}}),g=(i=t.trigger)!=null?i:2;return e.activeOptionIndex===u&&e.activationTrigger===g?e:{...e,activeOptionIndex:u,activationTrigger:g}}let c=J2(e);if(c.activeOptionIndex===null){let u=c.options.findIndex(g=>!g.dataRef.current.disabled);u!==-1&&(c.activeOptionIndex=u)}let l=t.focus===Wt.Specific?t.idx:S1(t,{resolveItems:()=>c.options,resolveActiveIndex:()=>c.activeOptionIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled}),d=(o=t.trigger)!=null?o:2;return e.activeOptionIndex===l&&e.activationTrigger===d?e:{...e,...c,activeOptionIndex:l,activationTrigger:d}},[3]:(e,t)=>{var n,a,r;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:[...e.options,t.payload]};let i=t.payload,o=J2(e,l=>(l.push(i),l));e.activeOptionIndex===null&&(a=e.dataRef.current)!=null&&a.isSelected(t.payload.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(i));let c={...e,...o,activationTrigger:2};return(r=e.dataRef.current)!=null&&r.__demoMode&&e.dataRef.current.value===void 0&&(c.activeOptionIndex=0),c},[4]:(e,t)=>{var n;if((n=e.dataRef.current)!=null&&n.virtual)return{...e,options:e.options.filter(r=>r.id!==t.id)};let a=J2(e,r=>{let i=r.findIndex(o=>o.id===t.id);return i!==-1&&r.splice(i,1),r});return{...e,...a,activationTrigger:2}},[5]:(e,t)=>e.labelId===t.id?e:{...e,labelId:t.id},[6]:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},[7]:(e,t)=>{var n;if(((n=e.virtual)==null?void 0:n.options)===t.options)return e;let a=e.activeOptionIndex;if(e.activeOptionIndex!==null){let r=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);r!==-1?a=r:a=null}return{...e,activeOptionIndex:a,virtual:Object.assign({},e.virtual,{options:t.options})}}},H6=h.exports.createContext(null);H6.displayName="ComboboxActionsContext";function Xp(e){let t=h.exports.useContext(H6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Xp),n}return t}let yA=h.exports.createContext(null);function CZ(e){var t;let n=Uc("VirtualProvider"),[a,r]=h.exports.useMemo(()=>{let l=n.optionsRef.current;if(!l)return[0,0];let d=window.getComputedStyle(l);return[parseFloat(d.paddingBlockStart||d.paddingTop),parseFloat(d.paddingBlockEnd||d.paddingBottom)]},[n.optionsRef.current]),i=aZ({scrollPaddingStart:a,scrollPaddingEnd:r,count:n.virtual.options.length,estimateSize(){return 40},getScrollElement(){var l;return(l=n.optionsRef.current)!=null?l:null},overscan:12}),[o,c]=h.exports.useState(0);return en(()=>{c(l=>l+1)},[(t=n.virtual)==null?void 0:t.options]),R.createElement(yA.Provider,{value:i},R.createElement("div",{style:{position:"relative",width:"100%",height:`${i.getTotalSize()}px`},ref:l=>{if(l){if(typeof process!="undefined"&&{}.JEST_WORKER_ID!==void 0||n.activationTrigger===0)return;n.activeOptionIndex!==null&&n.virtual.options.length>n.activeOptionIndex&&i.scrollToIndex(n.activeOptionIndex)}}},i.getVirtualItems().map(l=>{var d;return R.createElement(h.exports.Fragment,{key:l.key},R.cloneElement((d=e.children)==null?void 0:d.call(e,{option:n.virtual.options[l.index],open:n.comboboxState===0}),{key:`${o}-${l.key}`,"data-index":l.index,"aria-setsize":n.virtual.options.length,"aria-posinset":l.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${l.start}px)`,overflowAnchor:"none"}}))})))}let U6=h.exports.createContext(null);U6.displayName="ComboboxDataContext";function Uc(e){let t=h.exports.useContext(U6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Combobox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Uc),n}return t}function EZ(e,t){return Rt(t.type,kZ,e,t)}let TZ=h.exports.Fragment;function LZ(e,t){let{value:n,defaultValue:a,onChange:r,form:i,name:o,by:c=null,disabled:l=!1,__demoMode:d=!1,nullable:u=!1,multiple:g=!1,immediate:y=!1,virtual:w=null,...v}=e,S=!1,m=null,[p=g?[]:void 0,b]=R6(n,r,a),[x,k]=h.exports.useReducer(EZ,{dataRef:h.exports.createRef(),comboboxState:d?0:1,options:[],virtual:null,activeOptionIndex:null,activationTrigger:2,labelId:null}),N=h.exports.useRef(!1),_=h.exports.useRef({static:!1,hold:!1}),C=h.exports.useRef(null),E=h.exports.useRef(null),T=h.exports.useRef(null),D=h.exports.useRef(null),P=Be(typeof c=="string"?(te,G)=>{let J=c;return(te==null?void 0:te[J])===(G==null?void 0:G[J])}:c!=null?c:(te,G)=>te===G),M=Be(te=>x.options.findIndex(G=>P(G.dataRef.current.value,te))),O=h.exports.useCallback(te=>Rt(z.mode,{[1]:()=>p.some(G=>P(G,te)),[0]:()=>P(p,te)}),[p]),F=Be(te=>x.activeOptionIndex===M(te)),z=h.exports.useMemo(()=>({...x,immediate:S,optionsPropsRef:_,labelRef:C,inputRef:E,buttonRef:T,optionsRef:D,value:p,defaultValue:a,disabled:l,mode:g?1:0,virtual:x.virtual,get activeOptionIndex(){if(N.current&&x.activeOptionIndex===null&&x.options.length>0){let te=x.options.findIndex(G=>!G.dataRef.current.disabled);if(te!==-1)return te}return x.activeOptionIndex},calculateIndex:M,compare:P,isSelected:O,isActive:F,nullable:u,__demoMode:d}),[p,a,l,g,u,d,x,m]);en(()=>{},[m,void 0]),en(()=>{x.dataRef.current=z},[z]),Kp([z.buttonRef,z.inputRef,z.optionsRef],()=>X.closeCombobox(),z.comboboxState===0);let H=h.exports.useMemo(()=>{var te,G,J;return{open:z.comboboxState===0,disabled:l,activeIndex:z.activeOptionIndex,activeOption:z.activeOptionIndex===null?null:z.virtual?z.virtual.options[(te=z.activeOptionIndex)!=null?te:0]:(J=(G=z.options[z.activeOptionIndex])==null?void 0:G.dataRef.current.value)!=null?J:null,value:p}},[z,l,p]),A=Be(()=>{if(z.activeOptionIndex!==null){if(z.virtual)W(z.virtual.options[z.activeOptionIndex]);else{let{dataRef:te}=z.options[z.activeOptionIndex];W(te.current.value)}X.goToOption(Wt.Specific,z.activeOptionIndex)}}),j=Be(()=>{k({type:0}),N.current=!0}),I=Be(()=>{k({type:1}),N.current=!1}),B=Be((te,G,J)=>(N.current=!1,te===Wt.Specific?k({type:2,focus:Wt.Specific,idx:G,trigger:J}):k({type:2,focus:te,trigger:J}))),Y=Be((te,G)=>(k({type:3,payload:{id:te,dataRef:G}}),()=>{z.isActive(G.current.value)&&(N.current=!0),k({type:4,id:te})})),U=Be(te=>(k({type:5,id:te}),()=>k({type:5,id:null}))),W=Be(te=>Rt(z.mode,{[0](){return b==null?void 0:b(te)},[1](){let G=z.value.slice(),J=G.findIndex(K=>P(K,te));return J===-1?G.push(te):G.splice(J,1),b==null?void 0:b(G)}})),V=Be(te=>{k({type:6,trigger:te})}),X=h.exports.useMemo(()=>({onChange:W,registerOption:Y,registerLabel:U,goToOption:B,closeCombobox:I,openCombobox:j,setActivationTrigger:V,selectActiveOption:A}),[]),ne=t===null?{}:{ref:t},oe=h.exports.useRef(null),q=as();return h.exports.useEffect(()=>{oe.current&&a!==void 0&&q.addEventListener(oe.current,"reset",()=>{b==null||b(a)})},[oe,b]),R.createElement(H6.Provider,{value:X},R.createElement(U6.Provider,{value:z},R.createElement(sf,{value:Rt(z.comboboxState,{[0]:gn.Open,[1]:gn.Closed})},o!=null&&p!=null&&B6({[o]:p}).map(([te,G],J)=>R.createElement(Ms,{features:Ds.Hidden,ref:J===0?K=>{var Q;oe.current=(Q=K==null?void 0:K.closest("form"))!=null?Q:null}:void 0,...fp({key:te,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:i,disabled:l,name:te,value:G})})),$t({ourProps:ne,theirProps:v,slot:H,defaultTag:TZ,name:"Combobox"}))))}let DZ="input";function MZ(e,t){var n,a,r,i,o;let c=Tn(),{id:l=`headlessui-combobox-input-${c}`,onChange:d,displayValue:u,type:g="text",...y}=e,w=Uc("Combobox.Input"),v=Xp("Combobox.Input"),S=Qt(w.inputRef,t),m=Oi(w.inputRef),p=h.exports.useRef(!1),b=as(),x=Be(()=>{v.onChange(null),w.optionsRef.current&&(w.optionsRef.current.scrollTop=0),v.goToOption(Wt.Nothing)}),k=function(){var z;return typeof u=="function"&&w.value!==void 0?(z=u(w.value))!=null?z:"":typeof w.value=="string"?w.value:""}();up(([z,H],[A,j])=>{if(p.current)return;let I=w.inputRef.current;I&&((j===0&&H===1||z!==A)&&(I.value=z),requestAnimationFrame(()=>{if(p.current||!I||(m==null?void 0:m.activeElement)!==I)return;let{selectionStart:B,selectionEnd:Y}=I;Math.abs((Y!=null?Y:0)-(B!=null?B:0))===0&&B===0&&I.setSelectionRange(I.value.length,I.value.length)}))},[k,w.comboboxState,m]),up(([z],[H])=>{if(z===0&&H===1){if(p.current)return;let A=w.inputRef.current;if(!A)return;let j=A.value,{selectionStart:I,selectionEnd:B,selectionDirection:Y}=A;A.value="",A.value=j,Y!==null?A.setSelectionRange(I,B,Y):A.setSelectionRange(I,B)}},[w.comboboxState]);let N=h.exports.useRef(!1),_=Be(()=>{N.current=!0}),C=Be(()=>{b.nextFrame(()=>{N.current=!1})}),E=Be(z=>{switch(p.current=!0,z.key){case pt.Enter:if(p.current=!1,w.comboboxState!==0||N.current)return;if(z.preventDefault(),z.stopPropagation(),w.activeOptionIndex===null){v.closeCombobox();return}v.selectActiveOption(),w.mode===0&&v.closeCombobox();break;case pt.ArrowDown:return p.current=!1,z.preventDefault(),z.stopPropagation(),Rt(w.comboboxState,{[0]:()=>v.goToOption(Wt.Next),[1]:()=>v.openCombobox()});case pt.ArrowUp:return p.current=!1,z.preventDefault(),z.stopPropagation(),Rt(w.comboboxState,{[0]:()=>v.goToOption(Wt.Previous),[1]:()=>{v.openCombobox(),b.nextFrame(()=>{w.value||v.goToOption(Wt.Last)})}});case pt.Home:if(z.shiftKey)break;return p.current=!1,z.preventDefault(),z.stopPropagation(),v.goToOption(Wt.First);case pt.PageUp:return p.current=!1,z.preventDefault(),z.stopPropagation(),v.goToOption(Wt.First);case pt.End:if(z.shiftKey)break;return p.current=!1,z.preventDefault(),z.stopPropagation(),v.goToOption(Wt.Last);case pt.PageDown:return p.current=!1,z.preventDefault(),z.stopPropagation(),v.goToOption(Wt.Last);case pt.Escape:return p.current=!1,w.comboboxState!==0?void 0:(z.preventDefault(),w.optionsRef.current&&!w.optionsPropsRef.current.static&&z.stopPropagation(),w.nullable&&w.mode===0&&w.value===null&&x(),v.closeCombobox());case pt.Tab:if(p.current=!1,w.comboboxState!==0)return;w.mode===0&&w.activationTrigger!==1&&v.selectActiveOption(),v.closeCombobox();break}}),T=Be(z=>{d==null||d(z),w.nullable&&w.mode===0&&z.target.value===""&&x(),v.openCombobox()}),D=Be(z=>{var H,A,j;let I=(H=z.relatedTarget)!=null?H:wi.find(B=>B!==z.currentTarget);if(p.current=!1,!((A=w.optionsRef.current)!=null&&A.contains(I))&&!((j=w.buttonRef.current)!=null&&j.contains(I))&&w.comboboxState===0)return z.preventDefault(),w.mode===0&&(w.nullable&&w.value===null?x():w.activationTrigger!==1&&v.selectActiveOption()),v.closeCombobox()}),P=Be(z=>{var H,A,j;let I=(H=z.relatedTarget)!=null?H:wi.find(B=>B!==z.currentTarget);(A=w.buttonRef.current)!=null&&A.contains(I)||(j=w.optionsRef.current)!=null&&j.contains(I)||w.disabled||w.immediate&&w.comboboxState!==0&&(v.openCombobox(),b.nextFrame(()=>{v.setActivationTrigger(1)}))}),M=Gp(()=>{if(w.labelId)return[w.labelId].join(" ")},[w.labelId]),O=h.exports.useMemo(()=>({open:w.comboboxState===0,disabled:w.disabled}),[w]),F={ref:S,id:l,role:"combobox",type:g,"aria-controls":(n=w.optionsRef.current)==null?void 0:n.id,"aria-expanded":w.comboboxState===0,"aria-activedescendant":w.activeOptionIndex===null?void 0:w.virtual?(a=w.options.find(z=>{var H;return!((H=w.virtual)!=null&&H.disabled(z.dataRef.current.value))&&w.compare(z.dataRef.current.value,w.virtual.options[w.activeOptionIndex])}))==null?void 0:a.id:(r=w.options[w.activeOptionIndex])==null?void 0:r.id,"aria-labelledby":M,"aria-autocomplete":"list",defaultValue:(o=(i=e.defaultValue)!=null?i:w.defaultValue!==void 0?u==null?void 0:u(w.defaultValue):null)!=null?o:w.defaultValue,disabled:w.disabled,onCompositionStart:_,onCompositionEnd:C,onKeyDown:E,onChange:T,onFocus:P,onBlur:D};return $t({ourProps:F,theirProps:y,slot:O,defaultTag:DZ,name:"Combobox.Input"})}let AZ="button";function IZ(e,t){var n;let a=Uc("Combobox.Button"),r=Xp("Combobox.Button"),i=Qt(a.buttonRef,t),o=Tn(),{id:c=`headlessui-combobox-button-${o}`,...l}=e,d=as(),u=Be(S=>{switch(S.key){case pt.ArrowDown:return S.preventDefault(),S.stopPropagation(),a.comboboxState===1&&r.openCombobox(),d.nextFrame(()=>{var m;return(m=a.inputRef.current)==null?void 0:m.focus({preventScroll:!0})});case pt.ArrowUp:return S.preventDefault(),S.stopPropagation(),a.comboboxState===1&&(r.openCombobox(),d.nextFrame(()=>{a.value||r.goToOption(Wt.Last)})),d.nextFrame(()=>{var m;return(m=a.inputRef.current)==null?void 0:m.focus({preventScroll:!0})});case pt.Escape:return a.comboboxState!==0?void 0:(S.preventDefault(),a.optionsRef.current&&!a.optionsPropsRef.current.static&&S.stopPropagation(),r.closeCombobox(),d.nextFrame(()=>{var m;return(m=a.inputRef.current)==null?void 0:m.focus({preventScroll:!0})}));default:return}}),g=Be(S=>{if(Bl(S.currentTarget))return S.preventDefault();a.comboboxState===0?r.closeCombobox():(S.preventDefault(),r.openCombobox()),d.nextFrame(()=>{var m;return(m=a.inputRef.current)==null?void 0:m.focus({preventScroll:!0})})}),y=Gp(()=>{if(a.labelId)return[a.labelId,c].join(" ")},[a.labelId,c]),w=h.exports.useMemo(()=>({open:a.comboboxState===0,disabled:a.disabled,value:a.value}),[a]),v={ref:i,id:c,type:Hc(e,a.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(n=a.optionsRef.current)==null?void 0:n.id,"aria-expanded":a.comboboxState===0,"aria-labelledby":y,disabled:a.disabled,onClick:g,onKeyDown:u};return $t({ourProps:v,theirProps:l,slot:w,defaultTag:AZ,name:"Combobox.Button"})}let OZ="label";function PZ(e,t){let n=Tn(),{id:a=`headlessui-combobox-label-${n}`,...r}=e,i=Uc("Combobox.Label"),o=Xp("Combobox.Label"),c=Qt(i.labelRef,t);en(()=>o.registerLabel(a),[a]);let l=Be(()=>{var u;return(u=i.inputRef.current)==null?void 0:u.focus({preventScroll:!0})}),d=h.exports.useMemo(()=>({open:i.comboboxState===0,disabled:i.disabled}),[i]);return $t({ourProps:{ref:c,id:a,onClick:l},theirProps:r,slot:d,defaultTag:OZ,name:"Combobox.Label"})}let RZ="ul",jZ=Ha.RenderStrategy|Ha.Static;function zZ(e,t){let n=Tn(),{id:a=`headlessui-combobox-options-${n}`,hold:r=!1,...i}=e,o=Uc("Combobox.Options"),c=Qt(o.optionsRef,t),l=Eo(),d=(()=>l!==null?(l&gn.Open)===gn.Open:o.comboboxState===0)();en(()=>{var w;o.optionsPropsRef.current.static=(w=e.static)!=null?w:!1},[o.optionsPropsRef,e.static]),en(()=>{o.optionsPropsRef.current.hold=r},[o.optionsPropsRef,r]),pA({container:o.optionsRef.current,enabled:o.comboboxState===0,accept(w){return w.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:w.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(w){w.setAttribute("role","none")}});let u=Gp(()=>{var w,v;return(v=o.labelId)!=null?v:(w=o.buttonRef.current)==null?void 0:w.id},[o.labelId,o.buttonRef.current]),g=h.exports.useMemo(()=>({open:o.comboboxState===0,option:void 0}),[o]),y={"aria-labelledby":u,role:"listbox","aria-multiselectable":o.mode===1?!0:void 0,id:a,ref:c};return o.virtual&&o.comboboxState===0&&Object.assign(i,{children:R.createElement(CZ,null,i.children)}),$t({ourProps:y,theirProps:i,slot:g,defaultTag:RZ,features:jZ,visible:d,name:"Combobox.Options"})}let FZ="li";function $Z(e,t){var n;let a=Tn(),{id:r=`headlessui-combobox-option-${a}`,disabled:i=!1,value:o,order:c=null,...l}=e,d=Uc("Combobox.Option"),u=Xp("Combobox.Option"),g=d.virtual?d.activeOptionIndex===d.calculateIndex(o):d.activeOptionIndex===null?!1:((n=d.options[d.activeOptionIndex])==null?void 0:n.id)===r,y=d.isSelected(o),w=h.exports.useRef(null),v=$a({disabled:i,value:o,domRef:w,order:c}),S=h.exports.useContext(yA),m=Qt(t,w,S?S.measureElement:null),p=Be(()=>u.onChange(o));en(()=>u.registerOption(r,v),[v,r]);let b=h.exports.useRef(!(d.virtual||d.__demoMode));en(()=>{if(!d.virtual||!d.__demoMode)return;let D=lr();return D.requestAnimationFrame(()=>{b.current=!0}),D.dispose},[d.virtual,d.__demoMode]),en(()=>{if(!b.current||d.comboboxState!==0||!g||d.activationTrigger===0)return;let D=lr();return D.requestAnimationFrame(()=>{var P,M;(M=(P=w.current)==null?void 0:P.scrollIntoView)==null||M.call(P,{block:"nearest"})}),D.dispose},[w,g,d.comboboxState,d.activationTrigger,d.activeOptionIndex]);let x=Be(D=>{var P;if(i||(P=d.virtual)!=null&&P.disabled(o))return D.preventDefault();p(),uA()||requestAnimationFrame(()=>{var M;return(M=d.inputRef.current)==null?void 0:M.focus({preventScroll:!0})}),d.mode===0&&requestAnimationFrame(()=>u.closeCombobox())}),k=Be(()=>{var D;if(i||(D=d.virtual)!=null&&D.disabled(o))return u.goToOption(Wt.Nothing);let P=d.calculateIndex(o);u.goToOption(Wt.Specific,P)}),N=z6(),_=Be(D=>N.update(D)),C=Be(D=>{var P;if(!N.wasMoved(D)||i||(P=d.virtual)!=null&&P.disabled(o)||g)return;let M=d.calculateIndex(o);u.goToOption(Wt.Specific,M,0)}),E=Be(D=>{var P;N.wasMoved(D)&&(i||(P=d.virtual)!=null&&P.disabled(o)||g&&(d.optionsPropsRef.current.hold||u.goToOption(Wt.Nothing)))}),T=h.exports.useMemo(()=>({active:g,selected:y,disabled:i}),[g,y,i]);return $t({ourProps:{id:r,ref:m,role:"option",tabIndex:i===!0?void 0:-1,"aria-disabled":i===!0?!0:void 0,"aria-selected":y,disabled:void 0,onClick:x,onFocus:k,onPointerEnter:_,onMouseEnter:_,onPointerMove:C,onMouseMove:C,onPointerLeave:E,onMouseLeave:E},theirProps:l,slot:T,defaultTag:FZ,name:"Combobox.Option"})}let BZ=Bt(LZ),HZ=Bt(IZ),UZ=Bt(MZ),VZ=Bt(PZ),WZ=Bt(zZ),YZ=Bt($Z),Rn=Object.assign(BZ,{Input:UZ,Button:HZ,Label:VZ,Options:WZ,Option:YZ});function V6(e,t,n,a){let r=$a(n);h.exports.useEffect(()=>{e=e!=null?e:window;function i(o){r.current(o)}return e.addEventListener(t,i,a),()=>e.removeEventListener(t,i,a)},[e,t,a])}function of(){let e=h.exports.useRef(!1);return en(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function xA(e){let t=Be(e),n=h.exports.useRef(!1);h.exports.useEffect(()=>(n.current=!1,()=>{n.current=!0,qp(()=>{n.current&&t()})}),[t])}var Qr=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Qr||{});function W6(){let e=h.exports.useRef(0);return fA("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function wA(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.current)n.current instanceof HTMLElement&&t.add(n.current);return t}let GZ="div";var vA=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(vA||{});function qZ(e,t){let n=h.exports.useRef(null),a=Qt(n,t),{initialFocus:r,containers:i,features:o=30,...c}=e;rf()||(o=1);let l=Oi(n);JZ({ownerDocument:l},Boolean(o&16));let d=KZ({ownerDocument:l,container:n,initialFocus:r},Boolean(o&2));XZ({ownerDocument:l,container:n,containers:i,previousActiveElement:d},Boolean(o&8));let u=W6(),g=Be(S=>{let m=n.current;!m||(p=>p())(()=>{Rt(u.current,{[Qr.Forwards]:()=>{Fa(m,$n.First,{skipElements:[S.relatedTarget]})},[Qr.Backwards]:()=>{Fa(m,$n.Last,{skipElements:[S.relatedTarget]})}})})}),y=as(),w=h.exports.useRef(!1),v={ref:a,onKeyDown(S){S.key=="Tab"&&(w.current=!0,y.requestAnimationFrame(()=>{w.current=!1}))},onBlur(S){let m=wA(i);n.current instanceof HTMLElement&&m.add(n.current);let p=S.relatedTarget;p instanceof HTMLElement&&p.dataset.headlessuiFocusGuard!=="true"&&(_A(m,p)||(w.current?Fa(n.current,Rt(u.current,{[Qr.Forwards]:()=>$n.Next,[Qr.Backwards]:()=>$n.Previous})|$n.WrapAround,{relativeTo:S.target}):S.target instanceof HTMLElement&&kl(S.target)))}};return R.createElement(R.Fragment,null,Boolean(o&4)&&R.createElement(Ms,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ds.Focusable}),$t({ourProps:v,theirProps:c,defaultTag:GZ,name:"FocusTrap"}),Boolean(o&4)&&R.createElement(Ms,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:g,features:Ds.Focusable}))}let ZZ=Bt(qZ),Kf=Object.assign(ZZ,{features:vA});function QZ(e=!0){let t=h.exports.useRef(wi.slice());return up(([n],[a])=>{a===!0&&n===!1&&qp(()=>{t.current.splice(0)}),a===!1&&n===!0&&(t.current=wi.slice())},[e,wi,t]),Be(()=>{var n;return(n=t.current.find(a=>a!=null&&a.isConnected))!=null?n:null})}function JZ({ownerDocument:e},t){let n=QZ(t);up(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&kl(n())},[t]),xA(()=>{t&&kl(n())})}function KZ({ownerDocument:e,container:t,initialFocus:n},a){let r=h.exports.useRef(null),i=of();return up(()=>{if(!a)return;let o=t.current;o&&qp(()=>{if(!i.current)return;let c=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===c){r.current=c;return}}else if(o.contains(c)){r.current=c;return}n!=null&&n.current?kl(n.current):Fa(o,$n.First)===so.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),r.current=e==null?void 0:e.activeElement})},[a]),r}function XZ({ownerDocument:e,container:t,containers:n,previousActiveElement:a},r){let i=of();V6(e==null?void 0:e.defaultView,"focus",o=>{if(!r||!i.current)return;let c=wA(n);t.current instanceof HTMLElement&&c.add(t.current);let l=a.current;if(!l)return;let d=o.target;d&&d instanceof HTMLElement?_A(c,d)?(a.current=d,kl(d)):(o.preventDefault(),o.stopPropagation(),kl(l)):kl(a.current)},!0)}function _A(e,t){for(let n of e)if(n.contains(t))return!0;return!1}let NA=h.exports.createContext(!1);function eQ(){return h.exports.useContext(NA)}function Q3(e){return R.createElement(NA.Provider,{value:e.force},e.children)}function tQ(e){let t=eQ(),n=h.exports.useContext(SA),a=Oi(e),[r,i]=h.exports.useState(()=>{if(!t&&n!==null||fo.isServer)return null;let o=a==null?void 0:a.getElementById("headlessui-portal-root");if(o)return o;if(a===null)return null;let c=a.createElement("div");return c.setAttribute("id","headlessui-portal-root"),a.body.appendChild(c)});return h.exports.useEffect(()=>{r!==null&&(a!=null&&a.body.contains(r)||a==null||a.body.appendChild(r))},[r,a]),h.exports.useEffect(()=>{t||n!==null&&i(n.current)},[n,i,t]),r}let nQ=h.exports.Fragment;function aQ(e,t){let n=e,a=h.exports.useRef(null),r=Qt(j6(u=>{a.current=u}),t),i=Oi(a),o=tQ(a),[c]=h.exports.useState(()=>{var u;return fo.isServer?null:(u=i==null?void 0:i.createElement("div"))!=null?u:null}),l=h.exports.useContext(J3),d=rf();return en(()=>{!o||!c||o.contains(c)||(c.setAttribute("data-headlessui-portal",""),o.appendChild(c))},[o,c]),en(()=>{if(c&&l)return l.register(c)},[l,c]),xA(()=>{var u;!o||!c||(c instanceof Node&&o.contains(c)&&o.removeChild(c),o.childNodes.length<=0&&((u=o.parentElement)==null||u.removeChild(o)))}),d?!o||!c?null:Rl.exports.createPortal($t({ourProps:{ref:r},theirProps:n,defaultTag:nQ,name:"Portal"}),c):null}let rQ=h.exports.Fragment,SA=h.exports.createContext(null);function sQ(e,t){let{target:n,...a}=e,r={ref:Qt(t)};return R.createElement(SA.Provider,{value:n},$t({ourProps:r,theirProps:a,defaultTag:rQ,name:"Popover.Group"}))}let J3=h.exports.createContext(null);function kA(){let e=h.exports.useContext(J3),t=h.exports.useRef([]),n=Be(i=>(t.current.push(i),e&&e.register(i),()=>a(i))),a=Be(i=>{let o=t.current.indexOf(i);o!==-1&&t.current.splice(o,1),e&&e.unregister(i)}),r=h.exports.useMemo(()=>({register:n,unregister:a,portals:t}),[n,a,t]);return[t,h.exports.useMemo(()=>function({children:i}){return R.createElement(J3.Provider,{value:r},i)},[r])]}let iQ=Bt(aQ),oQ=Bt(sQ),K3=Object.assign(iQ,{Group:oQ});function lQ(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const cQ=typeof Object.is=="function"?Object.is:lQ,{useState:dQ,useEffect:uQ,useLayoutEffect:fQ,useDebugValue:mQ}=Ll;function pQ(e,t,n){const a=t(),[{inst:r},i]=dQ({inst:{value:a,getSnapshot:t}});return fQ(()=>{r.value=a,r.getSnapshot=t,K2(r)&&i({inst:r})},[e,a,t]),uQ(()=>(K2(r)&&i({inst:r}),e(()=>{K2(r)&&i({inst:r})})),[e]),mQ(a),a}function K2(e){const t=e.getSnapshot,n=e.value;try{const a=t();return!cQ(n,a)}catch{return!0}}function hQ(e,t,n){return t()}const gQ=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",bQ=!gQ,yQ=bQ?hQ:pQ,xQ="useSyncExternalStore"in Ll?(e=>e.useSyncExternalStore)(Ll):yQ;function wQ(e){return xQ(e.subscribe,e.getSnapshot,e.getSnapshot)}function vQ(e,t){let n=e(),a=new Set;return{getSnapshot(){return n},subscribe(r){return a.add(r),()=>a.delete(r)},dispatch(r,...i){let o=t[r].call(n,...i);o&&(n=o,a.forEach(c=>c()))}}}function _Q(){let e;return{before({doc:t}){var n;let a=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-a.clientWidth},after({doc:t,d:n}){let a=t.documentElement,r=a.clientWidth-a.offsetWidth,i=e-r;n.style(a,"paddingRight",`${i}px`)}}}function NQ(){return dA()?{before({doc:e,d:t,meta:n}){function a(r){return n.containers.flatMap(i=>i()).some(i=>i.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let c=lr();c.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>c.dispose()))}let i=(r=window.scrollY)!=null?r:window.pageYOffset,o=null;t.addEventListener(e,"click",c=>{if(c.target instanceof HTMLElement)try{let l=c.target.closest("a");if(!l)return;let{hash:d}=new URL(l.href),u=e.querySelector(d);u&&!a(u)&&(o=u)}catch{}},!0),t.addEventListener(e,"touchstart",c=>{if(c.target instanceof HTMLElement)if(a(c.target)){let l=c.target;for(;l.parentElement&&a(l.parentElement);)l=l.parentElement;t.style(l,"overscrollBehavior","contain")}else t.style(c.target,"touchAction","none")}),t.addEventListener(e,"touchmove",c=>{if(c.target instanceof HTMLElement)if(a(c.target)){let l=c.target;for(;l.parentElement&&l.dataset.headlessuiPortal!==""&&!(l.scrollHeight>l.clientHeight||l.scrollWidth>l.clientWidth);)l=l.parentElement;l.dataset.headlessuiPortal===""&&c.preventDefault()}else c.preventDefault()},{passive:!1}),t.add(()=>{var c;let l=(c=window.scrollY)!=null?c:window.pageYOffset;i!==l&&window.scrollTo(0,i),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)})})}}:{}}function SQ(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function kQ(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let hc=vQ(()=>new Map,{PUSH(e,t){var n;let a=(n=this.get(e))!=null?n:{doc:e,count:0,d:lr(),meta:new Set};return a.count++,a.meta.add(t),this.set(e,a),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let a={doc:e,d:t,meta:kQ(n)},r=[NQ(),_Q(),SQ()];r.forEach(({before:i})=>i==null?void 0:i(a)),r.forEach(({after:i})=>i==null?void 0:i(a))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});hc.subscribe(()=>{let e=hc.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let a=t.get(n.doc)==="hidden",r=n.count!==0;(r&&!a||!r&&a)&&hc.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&hc.dispatch("TEARDOWN",n)}});function CQ(e,t,n){let a=wQ(hc),r=e?a.get(e):void 0,i=r?r.count>0:!1;return en(()=>{if(!(!e||!t))return hc.dispatch("PUSH",e,n),()=>hc.dispatch("POP",e,n)},[t,e]),i}let X2=new Map,Xf=new Map;function l9(e,t=!0){en(()=>{var n;if(!t)return;let a=typeof e=="function"?e():e.current;if(!a)return;function r(){var o;if(!a)return;let c=(o=Xf.get(a))!=null?o:1;if(c===1?Xf.delete(a):Xf.set(a,c-1),c!==1)return;let l=X2.get(a);l&&(l["aria-hidden"]===null?a.removeAttribute("aria-hidden"):a.setAttribute("aria-hidden",l["aria-hidden"]),a.inert=l.inert,X2.delete(a))}let i=(n=Xf.get(a))!=null?n:0;return Xf.set(a,i+1),i!==0||(X2.set(a,{"aria-hidden":a.getAttribute("aria-hidden"),inert:a.inert}),a.setAttribute("aria-hidden","true"),a.inert=!0),r},[e,t])}function CA({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){var a;let r=h.exports.useRef((a=n==null?void 0:n.current)!=null?a:null),i=Oi(r),o=Be(()=>{var c,l,d;let u=[];for(let g of e)g!==null&&(g instanceof HTMLElement?u.push(g):"current"in g&&g.current instanceof HTMLElement&&u.push(g.current));if(t!=null&&t.current)for(let g of t.current)u.push(g);for(let g of(c=i==null?void 0:i.querySelectorAll("html > *, body > *"))!=null?c:[])g!==document.body&&g!==document.head&&g instanceof HTMLElement&&g.id!=="headlessui-portal-root"&&(g.contains(r.current)||g.contains((d=(l=r.current)==null?void 0:l.getRootNode())==null?void 0:d.host)||u.some(y=>g.contains(y))||u.push(g));return u});return{resolveContainers:o,contains:Be(c=>o().some(l=>l.contains(c))),mainTreeNodeRef:r,MainTreeNode:h.exports.useMemo(()=>function(){return n!=null?null:R.createElement(Ms,{features:Ds.Hidden,ref:r})},[r,n])}}function EQ(){let e=h.exports.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:h.exports.useMemo(()=>function(){return R.createElement(Ms,{features:Ds.Hidden,ref:e})},[e])}}let Y6=h.exports.createContext(()=>{});Y6.displayName="StackContext";var X3=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(X3||{});function TQ(){return h.exports.useContext(Y6)}function LQ({children:e,onUpdate:t,type:n,element:a,enabled:r}){let i=TQ(),o=Be((...c)=>{t==null||t(...c),i(...c)});return en(()=>{let c=r===void 0||r===!0;return c&&o(0,n,a),()=>{c&&o(1,n,a)}},[o,n,a,r]),R.createElement(Y6.Provider,{value:o},e)}let EA=h.exports.createContext(null);function TA(){let e=h.exports.useContext(EA);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,TA),t}return e}function LA(){let[e,t]=h.exports.useState([]);return[e.length>0?e.join(" "):void 0,h.exports.useMemo(()=>function(n){let a=Be(i=>(t(o=>[...o,i]),()=>t(o=>{let c=o.slice(),l=c.indexOf(i);return l!==-1&&c.splice(l,1),c}))),r=h.exports.useMemo(()=>({register:a,slot:n.slot,name:n.name,props:n.props}),[a,n.slot,n.name,n.props]);return R.createElement(EA.Provider,{value:r},n.children)},[t])]}let DQ="p";function MQ(e,t){let n=Tn(),{id:a=`headlessui-description-${n}`,...r}=e,i=TA(),o=Qt(t);en(()=>i.register(a),[a,i.register]);let c={ref:o,...i.props,id:a};return $t({ourProps:c,theirProps:r,slot:i.slot||{},defaultTag:DQ,name:i.name||"Description"})}let AQ=Bt(MQ),DA=Object.assign(AQ,{});var IQ=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(IQ||{}),OQ=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(OQ||{});let PQ={[0](e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},k1=h.exports.createContext(null);k1.displayName="DialogContext";function eh(e){let t=h.exports.useContext(k1);if(t===null){let n=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,eh),n}return t}function RQ(e,t,n=()=>[document.body]){CQ(e,t,a=>{var r;return{containers:[...(r=a.containers)!=null?r:[],n]}})}function jQ(e,t){return Rt(t.type,PQ,e,t)}let zQ="div",FQ=Ha.RenderStrategy|Ha.Static;function $Q(e,t){let n=Tn(),{id:a=`headlessui-dialog-${n}`,open:r,onClose:i,initialFocus:o,role:c="dialog",__demoMode:l=!1,...d}=e,[u,g]=h.exports.useState(0),y=h.exports.useRef(!1);c=function(){return c==="dialog"||c==="alertdialog"?c:(y.current||(y.current=!0,console.warn(`Invalid role [${c}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let w=Eo();r===void 0&&w!==null&&(r=(w&gn.Open)===gn.Open);let v=h.exports.useRef(null),S=Qt(v,t),m=Oi(v),p=e.hasOwnProperty("open")||w!==null,b=e.hasOwnProperty("onClose");if(!p&&!b)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!p)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!b)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof r!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r}`);if(typeof i!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let x=r?0:1,[k,N]=h.exports.useReducer(jQ,{titleId:null,descriptionId:null,panelRef:h.exports.createRef()}),_=Be(()=>i(!1)),C=Be(J=>N({type:0,id:J})),E=rf()?l?!1:x===0:!1,T=u>1,D=h.exports.useContext(k1)!==null,[P,M]=kA(),O={get current(){var J;return(J=k.panelRef.current)!=null?J:v.current}},{resolveContainers:F,mainTreeNodeRef:z,MainTreeNode:H}=CA({portals:P,defaultContainers:[O]}),A=T?"parent":"leaf",j=w!==null?(w&gn.Closing)===gn.Closing:!1,I=(()=>D||j?!1:E)(),B=h.exports.useCallback(()=>{var J,K;return(K=Array.from((J=m==null?void 0:m.querySelectorAll("body > *"))!=null?J:[]).find(Q=>Q.id==="headlessui-portal-root"?!1:Q.contains(z.current)&&Q instanceof HTMLElement))!=null?K:null},[z]);l9(B,I);let Y=(()=>T?!0:E)(),U=h.exports.useCallback(()=>{var J,K;return(K=Array.from((J=m==null?void 0:m.querySelectorAll("[data-headlessui-portal]"))!=null?J:[]).find(Q=>Q.contains(z.current)&&Q instanceof HTMLElement))!=null?K:null},[z]);l9(U,Y);let W=(()=>!(!E||T))();Kp(F,J=>{J.preventDefault(),_()},W);let V=(()=>!(T||x!==0))();V6(m==null?void 0:m.defaultView,"keydown",J=>{V&&(J.defaultPrevented||J.key===pt.Escape&&(J.preventDefault(),J.stopPropagation(),_()))});let X=(()=>!(j||x!==0||D))();RQ(m,X,F),h.exports.useEffect(()=>{if(x!==0||!v.current)return;let J=new ResizeObserver(K=>{for(let Q of K){let Z=Q.target.getBoundingClientRect();Z.x===0&&Z.y===0&&Z.width===0&&Z.height===0&&_()}});return J.observe(v.current),()=>J.disconnect()},[x,v,_]);let[ne,oe]=LA(),q=h.exports.useMemo(()=>[{dialogState:x,close:_,setTitleId:C},k],[x,k,_,C]),te=h.exports.useMemo(()=>({open:x===0}),[x]),G={ref:S,id:a,role:c,"aria-modal":x===0?!0:void 0,"aria-labelledby":k.titleId,"aria-describedby":ne};return R.createElement(LQ,{type:"Dialog",enabled:x===0,element:v,onUpdate:Be((J,K)=>{K==="Dialog"&&Rt(J,{[X3.Add]:()=>g(Q=>Q+1),[X3.Remove]:()=>g(Q=>Q-1)})})},R.createElement(Q3,{force:!0},R.createElement(K3,null,R.createElement(k1.Provider,{value:q},R.createElement(K3.Group,{target:v},R.createElement(Q3,{force:!1},R.createElement(oe,{slot:te,name:"Dialog.Description"},R.createElement(Kf,{initialFocus:o,containers:F,features:E?Rt(A,{parent:Kf.features.RestoreFocus,leaf:Kf.features.All&~Kf.features.FocusLock}):Kf.features.None},R.createElement(M,null,$t({ourProps:G,theirProps:d,slot:te,defaultTag:zQ,features:FQ,visible:x===0,name:"Dialog"}))))))))),R.createElement(H,null))}let BQ="div";function HQ(e,t){let n=Tn(),{id:a=`headlessui-dialog-overlay-${n}`,...r}=e,[{dialogState:i,close:o}]=eh("Dialog.Overlay"),c=Qt(t),l=Be(u=>{if(u.target===u.currentTarget){if(Bl(u.currentTarget))return u.preventDefault();u.preventDefault(),u.stopPropagation(),o()}}),d=h.exports.useMemo(()=>({open:i===0}),[i]);return $t({ourProps:{ref:c,id:a,"aria-hidden":!0,onClick:l},theirProps:r,slot:d,defaultTag:BQ,name:"Dialog.Overlay"})}let UQ="div";function VQ(e,t){let n=Tn(),{id:a=`headlessui-dialog-backdrop-${n}`,...r}=e,[{dialogState:i},o]=eh("Dialog.Backdrop"),c=Qt(t);h.exports.useEffect(()=>{if(o.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[o.panelRef]);let l=h.exports.useMemo(()=>({open:i===0}),[i]);return R.createElement(Q3,{force:!0},R.createElement(K3,null,$t({ourProps:{ref:c,id:a,"aria-hidden":!0},theirProps:r,slot:l,defaultTag:UQ,name:"Dialog.Backdrop"})))}let WQ="div";function YQ(e,t){let n=Tn(),{id:a=`headlessui-dialog-panel-${n}`,...r}=e,[{dialogState:i},o]=eh("Dialog.Panel"),c=Qt(t,o.panelRef),l=h.exports.useMemo(()=>({open:i===0}),[i]),d=Be(u=>{u.stopPropagation()});return $t({ourProps:{ref:c,id:a,onClick:d},theirProps:r,slot:l,defaultTag:WQ,name:"Dialog.Panel"})}let GQ="h2";function qQ(e,t){let n=Tn(),{id:a=`headlessui-dialog-title-${n}`,...r}=e,[{dialogState:i,setTitleId:o}]=eh("Dialog.Title"),c=Qt(t);h.exports.useEffect(()=>(o(a),()=>o(null)),[a,o]);let l=h.exports.useMemo(()=>({open:i===0}),[i]);return $t({ourProps:{ref:c,id:a},theirProps:r,slot:l,defaultTag:GQ,name:"Dialog.Title"})}let ZQ=Bt($Q),QQ=Bt(VQ),JQ=Bt(YQ),KQ=Bt(HQ),XQ=Bt(qQ),De=Object.assign(ZQ,{Backdrop:QQ,Panel:JQ,Overlay:KQ,Title:XQ,Description:DA});var c9;let eJ=(c9=R.startTransition)!=null?c9:function(e){e()};var tJ=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(tJ||{}),nJ=(e=>(e[e.ToggleDisclosure=0]="ToggleDisclosure",e[e.CloseDisclosure=1]="CloseDisclosure",e[e.SetButtonId=2]="SetButtonId",e[e.SetPanelId=3]="SetPanelId",e[e.LinkPanel=4]="LinkPanel",e[e.UnlinkPanel=5]="UnlinkPanel",e))(nJ||{});let aJ={[0]:e=>({...e,disclosureState:Rt(e.disclosureState,{[0]:1,[1]:0})}),[1]:e=>e.disclosureState===1?e:{...e,disclosureState:1},[4](e){return e.linkedPanel===!0?e:{...e,linkedPanel:!0}},[5](e){return e.linkedPanel===!1?e:{...e,linkedPanel:!1}},[2](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[3](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},G6=h.exports.createContext(null);G6.displayName="DisclosureContext";function q6(e){let t=h.exports.useContext(G6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,q6),n}return t}let Z6=h.exports.createContext(null);Z6.displayName="DisclosureAPIContext";function MA(e){let t=h.exports.useContext(Z6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,MA),n}return t}let Q6=h.exports.createContext(null);Q6.displayName="DisclosurePanelContext";function rJ(){return h.exports.useContext(Q6)}function sJ(e,t){return Rt(t.type,aJ,e,t)}let iJ=h.exports.Fragment;function oJ(e,t){let{defaultOpen:n=!1,...a}=e,r=h.exports.useRef(null),i=Qt(t,j6(m=>{r.current=m},e.as===void 0||e.as===h.exports.Fragment)),o=h.exports.useRef(null),c=h.exports.useRef(null),l=h.exports.useReducer(sJ,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:c,panelRef:o,buttonId:null,panelId:null}),[{disclosureState:d,buttonId:u},g]=l,y=Be(m=>{g({type:1});let p=$l(r);if(!p||!u)return;let b=(()=>m?m instanceof HTMLElement?m:m.current instanceof HTMLElement?m.current:p.getElementById(u):p.getElementById(u))();b==null||b.focus()}),w=h.exports.useMemo(()=>({close:y}),[y]),v=h.exports.useMemo(()=>({open:d===0,close:y}),[d,y]),S={ref:i};return R.createElement(G6.Provider,{value:l},R.createElement(Z6.Provider,{value:w},R.createElement(sf,{value:Rt(d,{[0]:gn.Open,[1]:gn.Closed})},$t({ourProps:S,theirProps:a,slot:v,defaultTag:iJ,name:"Disclosure"}))))}let lJ="button";function cJ(e,t){let n=Tn(),{id:a=`headlessui-disclosure-button-${n}`,...r}=e,[i,o]=q6("Disclosure.Button"),c=rJ(),l=c===null?!1:c===i.panelId,d=h.exports.useRef(null),u=Qt(d,t,l?null:i.buttonRef),g=F6();h.exports.useEffect(()=>{if(!l)return o({type:2,buttonId:a}),()=>{o({type:2,buttonId:null})}},[a,o,l]);let y=Be(b=>{var x;if(l){if(i.disclosureState===1)return;switch(b.key){case pt.Space:case pt.Enter:b.preventDefault(),b.stopPropagation(),o({type:0}),(x=i.buttonRef.current)==null||x.focus();break}}else switch(b.key){case pt.Space:case pt.Enter:b.preventDefault(),b.stopPropagation(),o({type:0});break}}),w=Be(b=>{switch(b.key){case pt.Space:b.preventDefault();break}}),v=Be(b=>{var x;Bl(b.currentTarget)||e.disabled||(l?(o({type:0}),(x=i.buttonRef.current)==null||x.focus()):o({type:0}))}),S=h.exports.useMemo(()=>({open:i.disclosureState===0}),[i]),m=Hc(e,d),p=l?{ref:u,type:m,onKeyDown:y,onClick:v}:{ref:u,id:a,type:m,"aria-expanded":i.disclosureState===0,"aria-controls":i.linkedPanel?i.panelId:void 0,onKeyDown:y,onKeyUp:w,onClick:v};return $t({mergeRefs:g,ourProps:p,theirProps:r,slot:S,defaultTag:lJ,name:"Disclosure.Button"})}let dJ="div",uJ=Ha.RenderStrategy|Ha.Static;function fJ(e,t){let n=Tn(),{id:a=`headlessui-disclosure-panel-${n}`,...r}=e,[i,o]=q6("Disclosure.Panel"),{close:c}=MA("Disclosure.Panel"),l=F6(),d=Qt(t,i.panelRef,v=>{eJ(()=>o({type:v?4:5}))});h.exports.useEffect(()=>(o({type:3,panelId:a}),()=>{o({type:3,panelId:null})}),[a,o]);let u=Eo(),g=(()=>u!==null?(u&gn.Open)===gn.Open:i.disclosureState===0)(),y=h.exports.useMemo(()=>({open:i.disclosureState===0,close:c}),[i,c]),w={ref:d,id:a};return R.createElement(Q6.Provider,{value:i.panelId},$t({mergeRefs:l,ourProps:w,theirProps:r,slot:y,defaultTag:dJ,features:uJ,visible:g,name:"Disclosure.Panel"}))}let mJ=Bt(oJ),pJ=Bt(cJ),hJ=Bt(fJ),mu=Object.assign(mJ,{Button:pJ,Panel:hJ}),d9=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function u9(e){var t,n;let a=(t=e.innerText)!=null?t:"",r=e.cloneNode(!0);if(!(r instanceof HTMLElement))return a;let i=!1;for(let c of r.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))c.remove(),i=!0;let o=i?(n=r.innerText)!=null?n:"":a;return d9.test(o)&&(o=o.replace(d9,"")),o}function gJ(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(" ").map(r=>{let i=document.getElementById(r);if(i){let o=i.getAttribute("aria-label");return typeof o=="string"?o.trim():u9(i).trim()}return null}).filter(Boolean);if(a.length>0)return a.join(", ")}return u9(e).trim()}function AA(e){let t=h.exports.useRef(""),n=h.exports.useRef("");return Be(()=>{let a=e.current;if(!a)return"";let r=a.innerText;if(t.current===r)return n.current;let i=gJ(a).trim().toLowerCase();return t.current=r,n.current=i,i})}var bJ=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(bJ||{}),yJ=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(yJ||{}),xJ=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(xJ||{}),wJ=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.RegisterLabel=7]="RegisterLabel",e))(wJ||{});function ew(e,t=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,a=io(t(e.options.slice()),i=>i.dataRef.current.domRef.current),r=n?a.indexOf(n):null;return r===-1&&(r=null),{options:a,activeOptionIndex:r}}let vJ={[1](e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},[0](e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,a=e.options.findIndex(r=>n(r.dataRef.current.value));return a!==-1&&(t=a),{...e,listboxState:0,activeOptionIndex:t}},[2](e,t){var n;if(e.dataRef.current.disabled||e.listboxState===1)return e;let a=ew(e),r=S1(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...a,searchQuery:"",activeOptionIndex:r,activationTrigger:(n=t.trigger)!=null?n:1}},[3]:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=e.searchQuery!==""?0:1,a=e.searchQuery+t.value.toLowerCase(),r=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(o=>{var c;return!o.dataRef.current.disabled&&((c=o.dataRef.current.textValue)==null?void 0:c.startsWith(a))}),i=r?e.options.indexOf(r):-1;return i===-1||i===e.activeOptionIndex?{...e,searchQuery:a}:{...e,searchQuery:a,activeOptionIndex:i,activationTrigger:1}},[4](e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},[5]:(e,t)=>{let n={id:t.id,dataRef:t.dataRef},a=ew(e,r=>[...r,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(n)),{...e,...a}},[6]:(e,t)=>{let n=ew(e,a=>{let r=a.findIndex(i=>i.id===t.id);return r!==-1&&a.splice(r,1),a});return{...e,...n,activationTrigger:1}},[7]:(e,t)=>({...e,labelId:t.id})},J6=h.exports.createContext(null);J6.displayName="ListboxActionsContext";function th(e){let t=h.exports.useContext(J6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,th),n}return t}let K6=h.exports.createContext(null);K6.displayName="ListboxDataContext";function nh(e){let t=h.exports.useContext(K6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,nh),n}return t}function _J(e,t){return Rt(t.type,vJ,e,t)}let NJ=h.exports.Fragment;function SJ(e,t){let{value:n,defaultValue:a,form:r,name:i,onChange:o,by:c=(V,X)=>V===X,disabled:l=!1,horizontal:d=!1,multiple:u=!1,...g}=e;const y=d?"horizontal":"vertical";let w=Qt(t),[v=u?[]:void 0,S]=R6(n,o,a),[m,p]=h.exports.useReducer(_J,{dataRef:h.exports.createRef(),listboxState:1,options:[],searchQuery:"",labelId:null,activeOptionIndex:null,activationTrigger:1}),b=h.exports.useRef({static:!1,hold:!1}),x=h.exports.useRef(null),k=h.exports.useRef(null),N=h.exports.useRef(null),_=Be(typeof c=="string"?(V,X)=>{let ne=c;return(V==null?void 0:V[ne])===(X==null?void 0:X[ne])}:c),C=h.exports.useCallback(V=>Rt(E.mode,{[1]:()=>v.some(X=>_(X,V)),[0]:()=>_(v,V)}),[v]),E=h.exports.useMemo(()=>({...m,value:v,disabled:l,mode:u?1:0,orientation:y,compare:_,isSelected:C,optionsPropsRef:b,labelRef:x,buttonRef:k,optionsRef:N}),[v,l,u,m]);en(()=>{m.dataRef.current=E},[E]),Kp([E.buttonRef,E.optionsRef],(V,X)=>{var ne;p({type:1}),Jp(X,Qp.Loose)||(V.preventDefault(),(ne=E.buttonRef.current)==null||ne.focus())},E.listboxState===0);let T=h.exports.useMemo(()=>({open:E.listboxState===0,disabled:l,value:v}),[E,l,v]),D=Be(V=>{let X=E.options.find(ne=>ne.id===V);X&&A(X.dataRef.current.value)}),P=Be(()=>{if(E.activeOptionIndex!==null){let{dataRef:V,id:X}=E.options[E.activeOptionIndex];A(V.current.value),p({type:2,focus:Wt.Specific,id:X})}}),M=Be(()=>p({type:0})),O=Be(()=>p({type:1})),F=Be((V,X,ne)=>V===Wt.Specific?p({type:2,focus:Wt.Specific,id:X,trigger:ne}):p({type:2,focus:V,trigger:ne})),z=Be((V,X)=>(p({type:5,id:V,dataRef:X}),()=>p({type:6,id:V}))),H=Be(V=>(p({type:7,id:V}),()=>p({type:7,id:null}))),A=Be(V=>Rt(E.mode,{[0](){return S==null?void 0:S(V)},[1](){let X=E.value.slice(),ne=X.findIndex(oe=>_(oe,V));return ne===-1?X.push(V):X.splice(ne,1),S==null?void 0:S(X)}})),j=Be(V=>p({type:3,value:V})),I=Be(()=>p({type:4})),B=h.exports.useMemo(()=>({onChange:A,registerOption:z,registerLabel:H,goToOption:F,closeListbox:O,openListbox:M,selectActiveOption:P,selectOption:D,search:j,clearSearch:I}),[]),Y={ref:w},U=h.exports.useRef(null),W=as();return h.exports.useEffect(()=>{U.current&&a!==void 0&&W.addEventListener(U.current,"reset",()=>{S==null||S(a)})},[U,S]),R.createElement(J6.Provider,{value:B},R.createElement(K6.Provider,{value:E},R.createElement(sf,{value:Rt(E.listboxState,{[0]:gn.Open,[1]:gn.Closed})},i!=null&&v!=null&&B6({[i]:v}).map(([V,X],ne)=>R.createElement(Ms,{features:Ds.Hidden,ref:ne===0?oe=>{var q;U.current=(q=oe==null?void 0:oe.closest("form"))!=null?q:null}:void 0,...fp({key:V,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:r,disabled:l,name:V,value:X})})),$t({ourProps:Y,theirProps:g,slot:T,defaultTag:NJ,name:"Listbox"}))))}let kJ="button";function CJ(e,t){var n;let a=Tn(),{id:r=`headlessui-listbox-button-${a}`,...i}=e,o=nh("Listbox.Button"),c=th("Listbox.Button"),l=Qt(o.buttonRef,t),d=as(),u=Be(m=>{switch(m.key){case pt.Space:case pt.Enter:case pt.ArrowDown:m.preventDefault(),c.openListbox(),d.nextFrame(()=>{o.value||c.goToOption(Wt.First)});break;case pt.ArrowUp:m.preventDefault(),c.openListbox(),d.nextFrame(()=>{o.value||c.goToOption(Wt.Last)});break}}),g=Be(m=>{switch(m.key){case pt.Space:m.preventDefault();break}}),y=Be(m=>{if(Bl(m.currentTarget))return m.preventDefault();o.listboxState===0?(c.closeListbox(),d.nextFrame(()=>{var p;return(p=o.buttonRef.current)==null?void 0:p.focus({preventScroll:!0})})):(m.preventDefault(),c.openListbox())}),w=Gp(()=>{if(o.labelId)return[o.labelId,r].join(" ")},[o.labelId,r]),v=h.exports.useMemo(()=>({open:o.listboxState===0,disabled:o.disabled,value:o.value}),[o]),S={ref:l,id:r,type:Hc(e,o.buttonRef),"aria-haspopup":"listbox","aria-controls":(n=o.optionsRef.current)==null?void 0:n.id,"aria-expanded":o.listboxState===0,"aria-labelledby":w,disabled:o.disabled,onKeyDown:u,onKeyUp:g,onClick:y};return $t({ourProps:S,theirProps:i,slot:v,defaultTag:kJ,name:"Listbox.Button"})}let EJ="label";function TJ(e,t){let n=Tn(),{id:a=`headlessui-listbox-label-${n}`,...r}=e,i=nh("Listbox.Label"),o=th("Listbox.Label"),c=Qt(i.labelRef,t);en(()=>o.registerLabel(a),[a]);let l=Be(()=>{var u;return(u=i.buttonRef.current)==null?void 0:u.focus({preventScroll:!0})}),d=h.exports.useMemo(()=>({open:i.listboxState===0,disabled:i.disabled}),[i]);return $t({ourProps:{ref:c,id:a,onClick:l},theirProps:r,slot:d,defaultTag:EJ,name:"Listbox.Label"})}let LJ="ul",DJ=Ha.RenderStrategy|Ha.Static;function MJ(e,t){var n;let a=Tn(),{id:r=`headlessui-listbox-options-${a}`,...i}=e,o=nh("Listbox.Options"),c=th("Listbox.Options"),l=Qt(o.optionsRef,t),d=as(),u=as(),g=Eo(),y=(()=>g!==null?(g&gn.Open)===gn.Open:o.listboxState===0)();h.exports.useEffect(()=>{var p;let b=o.optionsRef.current;b&&o.listboxState===0&&b!==((p=$l(b))==null?void 0:p.activeElement)&&b.focus({preventScroll:!0})},[o.listboxState,o.optionsRef]);let w=Be(p=>{switch(u.dispose(),p.key){case pt.Space:if(o.searchQuery!=="")return p.preventDefault(),p.stopPropagation(),c.search(p.key);case pt.Enter:if(p.preventDefault(),p.stopPropagation(),o.activeOptionIndex!==null){let{dataRef:b}=o.options[o.activeOptionIndex];c.onChange(b.current.value)}o.mode===0&&(c.closeListbox(),lr().nextFrame(()=>{var b;return(b=o.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})}));break;case Rt(o.orientation,{vertical:pt.ArrowDown,horizontal:pt.ArrowRight}):return p.preventDefault(),p.stopPropagation(),c.goToOption(Wt.Next);case Rt(o.orientation,{vertical:pt.ArrowUp,horizontal:pt.ArrowLeft}):return p.preventDefault(),p.stopPropagation(),c.goToOption(Wt.Previous);case pt.Home:case pt.PageUp:return p.preventDefault(),p.stopPropagation(),c.goToOption(Wt.First);case pt.End:case pt.PageDown:return p.preventDefault(),p.stopPropagation(),c.goToOption(Wt.Last);case pt.Escape:return p.preventDefault(),p.stopPropagation(),c.closeListbox(),d.nextFrame(()=>{var b;return(b=o.buttonRef.current)==null?void 0:b.focus({preventScroll:!0})});case pt.Tab:p.preventDefault(),p.stopPropagation();break;default:p.key.length===1&&(c.search(p.key),u.setTimeout(()=>c.clearSearch(),350));break}}),v=Gp(()=>{var p;return(p=o.buttonRef.current)==null?void 0:p.id},[o.buttonRef.current]),S=h.exports.useMemo(()=>({open:o.listboxState===0}),[o]),m={"aria-activedescendant":o.activeOptionIndex===null||(n=o.options[o.activeOptionIndex])==null?void 0:n.id,"aria-multiselectable":o.mode===1?!0:void 0,"aria-labelledby":v,"aria-orientation":o.orientation,id:r,onKeyDown:w,role:"listbox",tabIndex:0,ref:l};return $t({ourProps:m,theirProps:i,slot:S,defaultTag:LJ,features:DJ,visible:y,name:"Listbox.Options"})}let AJ="li";function IJ(e,t){let n=Tn(),{id:a=`headlessui-listbox-option-${n}`,disabled:r=!1,value:i,...o}=e,c=nh("Listbox.Option"),l=th("Listbox.Option"),d=c.activeOptionIndex!==null?c.options[c.activeOptionIndex].id===a:!1,u=c.isSelected(i),g=h.exports.useRef(null),y=AA(g),w=$a({disabled:r,value:i,domRef:g,get textValue(){return y()}}),v=Qt(t,g);en(()=>{if(c.listboxState!==0||!d||c.activationTrigger===0)return;let _=lr();return _.requestAnimationFrame(()=>{var C,E;(E=(C=g.current)==null?void 0:C.scrollIntoView)==null||E.call(C,{block:"nearest"})}),_.dispose},[g,d,c.listboxState,c.activationTrigger,c.activeOptionIndex]),en(()=>l.registerOption(a,w),[w,a]);let S=Be(_=>{if(r)return _.preventDefault();l.onChange(i),c.mode===0&&(l.closeListbox(),lr().nextFrame(()=>{var C;return(C=c.buttonRef.current)==null?void 0:C.focus({preventScroll:!0})}))}),m=Be(()=>{if(r)return l.goToOption(Wt.Nothing);l.goToOption(Wt.Specific,a)}),p=z6(),b=Be(_=>p.update(_)),x=Be(_=>{p.wasMoved(_)&&(r||d||l.goToOption(Wt.Specific,a,0))}),k=Be(_=>{p.wasMoved(_)&&(r||d&&l.goToOption(Wt.Nothing))}),N=h.exports.useMemo(()=>({active:d,selected:u,disabled:r}),[d,u,r]);return $t({ourProps:{id:a,ref:v,role:"option",tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,"aria-selected":u,disabled:void 0,onClick:S,onFocus:m,onPointerEnter:b,onMouseEnter:b,onPointerMove:x,onMouseMove:x,onPointerLeave:k,onMouseLeave:k},theirProps:o,slot:N,defaultTag:AJ,name:"Listbox.Option"})}let OJ=Bt(SJ),PJ=Bt(CJ),RJ=Bt(TJ),jJ=Bt(MJ),zJ=Bt(IJ),no=Object.assign(OJ,{Button:PJ,Label:RJ,Options:jJ,Option:zJ});var FJ=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(FJ||{}),$J=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))($J||{}),BJ=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(BJ||{});function tw(e,t=n=>n){let n=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,a=io(t(e.items.slice()),i=>i.dataRef.current.domRef.current),r=n?a.indexOf(n):null;return r===-1&&(r=null),{items:a,activeItemIndex:r}}let HJ={[1](e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},[0](e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},[2]:(e,t)=>{var n;let a=tw(e),r=S1(t,{resolveItems:()=>a.items,resolveActiveIndex:()=>a.activeItemIndex,resolveId:i=>i.id,resolveDisabled:i=>i.dataRef.current.disabled});return{...e,...a,searchQuery:"",activeItemIndex:r,activationTrigger:(n=t.trigger)!=null?n:1}},[3]:(e,t)=>{let n=e.searchQuery!==""?0:1,a=e.searchQuery+t.value.toLowerCase(),r=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+n).concat(e.items.slice(0,e.activeItemIndex+n)):e.items).find(o=>{var c;return((c=o.dataRef.current.textValue)==null?void 0:c.startsWith(a))&&!o.dataRef.current.disabled}),i=r?e.items.indexOf(r):-1;return i===-1||i===e.activeItemIndex?{...e,searchQuery:a}:{...e,searchQuery:a,activeItemIndex:i,activationTrigger:1}},[4](e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},[5]:(e,t)=>{let n=tw(e,a=>[...a,{id:t.id,dataRef:t.dataRef}]);return{...e,...n}},[6]:(e,t)=>{let n=tw(e,a=>{let r=a.findIndex(i=>i.id===t.id);return r!==-1&&a.splice(r,1),a});return{...e,...n,activationTrigger:1}}},X6=h.exports.createContext(null);X6.displayName="MenuContext";function my(e){let t=h.exports.useContext(X6);if(t===null){let n=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,my),n}return t}function UJ(e,t){return Rt(t.type,HJ,e,t)}let VJ=h.exports.Fragment;function WJ(e,t){let{__demoMode:n=!1,...a}=e,r=h.exports.useReducer(UJ,{__demoMode:n,menuState:n?0:1,buttonRef:h.exports.createRef(),itemsRef:h.exports.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:i,itemsRef:o,buttonRef:c},l]=r,d=Qt(t);Kp([c,o],(w,v)=>{var S;l({type:1}),Jp(v,Qp.Loose)||(w.preventDefault(),(S=c.current)==null||S.focus())},i===0);let u=Be(()=>{l({type:1})}),g=h.exports.useMemo(()=>({open:i===0,close:u}),[i,u]),y={ref:d};return R.createElement(X6.Provider,{value:r},R.createElement(sf,{value:Rt(i,{[0]:gn.Open,[1]:gn.Closed})},$t({ourProps:y,theirProps:a,slot:g,defaultTag:VJ,name:"Menu"})))}let YJ="button";function GJ(e,t){var n;let a=Tn(),{id:r=`headlessui-menu-button-${a}`,...i}=e,[o,c]=my("Menu.Button"),l=Qt(o.buttonRef,t),d=as(),u=Be(S=>{switch(S.key){case pt.Space:case pt.Enter:case pt.ArrowDown:S.preventDefault(),S.stopPropagation(),c({type:0}),d.nextFrame(()=>c({type:2,focus:Wt.First}));break;case pt.ArrowUp:S.preventDefault(),S.stopPropagation(),c({type:0}),d.nextFrame(()=>c({type:2,focus:Wt.Last}));break}}),g=Be(S=>{switch(S.key){case pt.Space:S.preventDefault();break}}),y=Be(S=>{if(Bl(S.currentTarget))return S.preventDefault();e.disabled||(o.menuState===0?(c({type:1}),d.nextFrame(()=>{var m;return(m=o.buttonRef.current)==null?void 0:m.focus({preventScroll:!0})})):(S.preventDefault(),c({type:0})))}),w=h.exports.useMemo(()=>({open:o.menuState===0}),[o]),v={ref:l,id:r,type:Hc(e,o.buttonRef),"aria-haspopup":"menu","aria-controls":(n=o.itemsRef.current)==null?void 0:n.id,"aria-expanded":o.menuState===0,onKeyDown:u,onKeyUp:g,onClick:y};return $t({ourProps:v,theirProps:i,slot:w,defaultTag:YJ,name:"Menu.Button"})}let qJ="div",ZJ=Ha.RenderStrategy|Ha.Static;function QJ(e,t){var n,a;let r=Tn(),{id:i=`headlessui-menu-items-${r}`,...o}=e,[c,l]=my("Menu.Items"),d=Qt(c.itemsRef,t),u=Oi(c.itemsRef),g=as(),y=Eo(),w=(()=>y!==null?(y&gn.Open)===gn.Open:c.menuState===0)();h.exports.useEffect(()=>{let b=c.itemsRef.current;b&&c.menuState===0&&b!==(u==null?void 0:u.activeElement)&&b.focus({preventScroll:!0})},[c.menuState,c.itemsRef,u]),pA({container:c.itemsRef.current,enabled:c.menuState===0,accept(b){return b.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:b.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(b){b.setAttribute("role","none")}});let v=Be(b=>{var x,k;switch(g.dispose(),b.key){case pt.Space:if(c.searchQuery!=="")return b.preventDefault(),b.stopPropagation(),l({type:3,value:b.key});case pt.Enter:if(b.preventDefault(),b.stopPropagation(),l({type:1}),c.activeItemIndex!==null){let{dataRef:N}=c.items[c.activeItemIndex];(k=(x=N.current)==null?void 0:x.domRef.current)==null||k.click()}cA(c.buttonRef.current);break;case pt.ArrowDown:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:Wt.Next});case pt.ArrowUp:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:Wt.Previous});case pt.Home:case pt.PageUp:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:Wt.First});case pt.End:case pt.PageDown:return b.preventDefault(),b.stopPropagation(),l({type:2,focus:Wt.Last});case pt.Escape:b.preventDefault(),b.stopPropagation(),l({type:1}),lr().nextFrame(()=>{var N;return(N=c.buttonRef.current)==null?void 0:N.focus({preventScroll:!0})});break;case pt.Tab:b.preventDefault(),b.stopPropagation(),l({type:1}),lr().nextFrame(()=>{fZ(c.buttonRef.current,b.shiftKey?$n.Previous:$n.Next)});break;default:b.key.length===1&&(l({type:3,value:b.key}),g.setTimeout(()=>l({type:4}),350));break}}),S=Be(b=>{switch(b.key){case pt.Space:b.preventDefault();break}}),m=h.exports.useMemo(()=>({open:c.menuState===0}),[c]),p={"aria-activedescendant":c.activeItemIndex===null||(n=c.items[c.activeItemIndex])==null?void 0:n.id,"aria-labelledby":(a=c.buttonRef.current)==null?void 0:a.id,id:i,onKeyDown:v,onKeyUp:S,role:"menu",tabIndex:0,ref:d};return $t({ourProps:p,theirProps:o,slot:m,defaultTag:qJ,features:ZJ,visible:w,name:"Menu.Items"})}let JJ=h.exports.Fragment;function KJ(e,t){let n=Tn(),{id:a=`headlessui-menu-item-${n}`,disabled:r=!1,...i}=e,[o,c]=my("Menu.Item"),l=o.activeItemIndex!==null?o.items[o.activeItemIndex].id===a:!1,d=h.exports.useRef(null),u=Qt(t,d);en(()=>{if(o.__demoMode||o.menuState!==0||!l||o.activationTrigger===0)return;let N=lr();return N.requestAnimationFrame(()=>{var _,C;(C=(_=d.current)==null?void 0:_.scrollIntoView)==null||C.call(_,{block:"nearest"})}),N.dispose},[o.__demoMode,d,l,o.menuState,o.activationTrigger,o.activeItemIndex]);let g=AA(d),y=h.exports.useRef({disabled:r,domRef:d,get textValue(){return g()}});en(()=>{y.current.disabled=r},[y,r]),en(()=>(c({type:5,id:a,dataRef:y}),()=>c({type:6,id:a})),[y,a]);let w=Be(()=>{c({type:1})}),v=Be(N=>{if(r)return N.preventDefault();c({type:1}),cA(o.buttonRef.current)}),S=Be(()=>{if(r)return c({type:2,focus:Wt.Nothing});c({type:2,focus:Wt.Specific,id:a})}),m=z6(),p=Be(N=>m.update(N)),b=Be(N=>{m.wasMoved(N)&&(r||l||c({type:2,focus:Wt.Specific,id:a,trigger:0}))}),x=Be(N=>{m.wasMoved(N)&&(r||l&&c({type:2,focus:Wt.Nothing}))}),k=h.exports.useMemo(()=>({active:l,disabled:r,close:w}),[l,r,w]);return $t({ourProps:{id:a,ref:u,role:"menuitem",tabIndex:r===!0?void 0:-1,"aria-disabled":r===!0?!0:void 0,disabled:void 0,onClick:v,onFocus:S,onPointerEnter:p,onMouseEnter:p,onPointerMove:b,onMouseMove:b,onPointerLeave:x,onMouseLeave:x},theirProps:i,slot:k,defaultTag:JJ,name:"Menu.Item"})}let XJ=Bt(WJ),eK=Bt(GJ),tK=Bt(QJ),nK=Bt(KJ),jt=Object.assign(XJ,{Button:eK,Items:tK,Item:nK});var aK=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(aK||{}),rK=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(rK||{});let sK={[0]:e=>{let t={...e,popoverState:Rt(e.popoverState,{[0]:1,[1]:0})};return t.popoverState===0&&(t.__demoMode=!1),t},[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},eN=h.exports.createContext(null);eN.displayName="PopoverContext";function py(e){let t=h.exports.useContext(eN);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,py),n}return t}let tN=h.exports.createContext(null);tN.displayName="PopoverAPIContext";function nN(e){let t=h.exports.useContext(tN);if(t===null){let n=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,nN),n}return t}let aN=h.exports.createContext(null);aN.displayName="PopoverGroupContext";function IA(){return h.exports.useContext(aN)}let hy=h.exports.createContext(null);hy.displayName="PopoverPanelContext";function iK(){return h.exports.useContext(hy)}function oK(e,t){return Rt(t.type,sK,e,t)}let lK="div";function cK(e,t){var n;let{__demoMode:a=!1,...r}=e,i=h.exports.useRef(null),o=Qt(t,j6(H=>{i.current=H})),c=h.exports.useRef([]),l=h.exports.useReducer(oK,{__demoMode:a,popoverState:a?0:1,buttons:c,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:h.exports.createRef(),afterPanelSentinel:h.exports.createRef()}),[{popoverState:d,button:u,buttonId:g,panel:y,panelId:w,beforePanelSentinel:v,afterPanelSentinel:S},m]=l,p=Oi((n=i.current)!=null?n:u),b=h.exports.useMemo(()=>{if(!u||!y)return!1;for(let U of document.querySelectorAll("body > *"))if(Number(U==null?void 0:U.contains(u))^Number(U==null?void 0:U.contains(y)))return!0;let H=Zp(),A=H.indexOf(u),j=(A+H.length-1)%H.length,I=(A+1)%H.length,B=H[j],Y=H[I];return!y.contains(B)&&!y.contains(Y)},[u,y]),x=$a(g),k=$a(w),N=h.exports.useMemo(()=>({buttonId:x,panelId:k,close:()=>m({type:1})}),[x,k,m]),_=IA(),C=_==null?void 0:_.registerPopover,E=Be(()=>{var H;return(H=_==null?void 0:_.isFocusWithinPopoverGroup())!=null?H:(p==null?void 0:p.activeElement)&&((u==null?void 0:u.contains(p.activeElement))||(y==null?void 0:y.contains(p.activeElement)))});h.exports.useEffect(()=>C==null?void 0:C(N),[C,N]);let[T,D]=kA(),P=CA({mainTreeNodeRef:_==null?void 0:_.mainTreeNodeRef,portals:T,defaultContainers:[u,y]});V6(p==null?void 0:p.defaultView,"focus",H=>{var A,j,I,B;H.target!==window&&H.target instanceof HTMLElement&&d===0&&(E()||u&&y&&(P.contains(H.target)||(j=(A=v.current)==null?void 0:A.contains)!=null&&j.call(A,H.target)||(B=(I=S.current)==null?void 0:I.contains)!=null&&B.call(I,H.target)||m({type:1})))},!0),Kp(P.resolveContainers,(H,A)=>{m({type:1}),Jp(A,Qp.Loose)||(H.preventDefault(),u==null||u.focus())},d===0);let M=Be(H=>{m({type:1});let A=(()=>H?H instanceof HTMLElement?H:"current"in H&&H.current instanceof HTMLElement?H.current:u:u)();A==null||A.focus()}),O=h.exports.useMemo(()=>({close:M,isPortalled:b}),[M,b]),F=h.exports.useMemo(()=>({open:d===0,close:M}),[d,M]),z={ref:o};return R.createElement(hy.Provider,{value:null},R.createElement(eN.Provider,{value:l},R.createElement(tN.Provider,{value:O},R.createElement(sf,{value:Rt(d,{[0]:gn.Open,[1]:gn.Closed})},R.createElement(D,null,$t({ourProps:z,theirProps:r,slot:F,defaultTag:lK,name:"Popover"}),R.createElement(P.MainTreeNode,null))))))}let dK="button";function uK(e,t){let n=Tn(),{id:a=`headlessui-popover-button-${n}`,...r}=e,[i,o]=py("Popover.Button"),{isPortalled:c}=nN("Popover.Button"),l=h.exports.useRef(null),d=`headlessui-focus-sentinel-${Tn()}`,u=IA(),g=u==null?void 0:u.closeOthers,y=iK()!==null;h.exports.useEffect(()=>{if(!y)return o({type:3,buttonId:a}),()=>{o({type:3,buttonId:null})}},[y,a,o]);let[w]=h.exports.useState(()=>Symbol()),v=Qt(l,t,y?null:P=>{if(P)i.buttons.current.push(w);else{let M=i.buttons.current.indexOf(w);M!==-1&&i.buttons.current.splice(M,1)}i.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),P&&o({type:2,button:P})}),S=Qt(l,t),m=Oi(l),p=Be(P=>{var M,O,F;if(y){if(i.popoverState===1)return;switch(P.key){case pt.Space:case pt.Enter:P.preventDefault(),(O=(M=P.target).click)==null||O.call(M),o({type:1}),(F=i.button)==null||F.focus();break}}else switch(P.key){case pt.Space:case pt.Enter:P.preventDefault(),P.stopPropagation(),i.popoverState===1&&(g==null||g(i.buttonId)),o({type:0});break;case pt.Escape:if(i.popoverState!==0)return g==null?void 0:g(i.buttonId);if(!l.current||m!=null&&m.activeElement&&!l.current.contains(m.activeElement))return;P.preventDefault(),P.stopPropagation(),o({type:1});break}}),b=Be(P=>{y||P.key===pt.Space&&P.preventDefault()}),x=Be(P=>{var M,O;Bl(P.currentTarget)||e.disabled||(y?(o({type:1}),(M=i.button)==null||M.focus()):(P.preventDefault(),P.stopPropagation(),i.popoverState===1&&(g==null||g(i.buttonId)),o({type:0}),(O=i.button)==null||O.focus()))}),k=Be(P=>{P.preventDefault(),P.stopPropagation()}),N=i.popoverState===0,_=h.exports.useMemo(()=>({open:N}),[N]),C=Hc(e,l),E=y?{ref:S,type:C,onKeyDown:p,onClick:x}:{ref:v,id:i.buttonId,type:C,"aria-expanded":i.popoverState===0,"aria-controls":i.panel?i.panelId:void 0,onKeyDown:p,onKeyUp:b,onClick:x,onMouseDown:k},T=W6(),D=Be(()=>{let P=i.panel;if(!P)return;function M(){Rt(T.current,{[Qr.Forwards]:()=>Fa(P,$n.First),[Qr.Backwards]:()=>Fa(P,$n.Last)})===so.Error&&Fa(Zp().filter(O=>O.dataset.headlessuiFocusGuard!=="true"),Rt(T.current,{[Qr.Forwards]:$n.Next,[Qr.Backwards]:$n.Previous}),{relativeTo:i.button})}M()});return R.createElement(R.Fragment,null,$t({ourProps:E,theirProps:r,slot:_,defaultTag:dK,name:"Popover.Button"}),N&&!y&&c&&R.createElement(Ms,{id:d,features:Ds.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:D}))}let fK="div",mK=Ha.RenderStrategy|Ha.Static;function pK(e,t){let n=Tn(),{id:a=`headlessui-popover-overlay-${n}`,...r}=e,[{popoverState:i},o]=py("Popover.Overlay"),c=Qt(t),l=Eo(),d=(()=>l!==null?(l&gn.Open)===gn.Open:i===0)(),u=Be(y=>{if(Bl(y.currentTarget))return y.preventDefault();o({type:1})}),g=h.exports.useMemo(()=>({open:i===0}),[i]);return $t({ourProps:{ref:c,id:a,"aria-hidden":!0,onClick:u},theirProps:r,slot:g,defaultTag:fK,features:mK,visible:d,name:"Popover.Overlay"})}let hK="div",gK=Ha.RenderStrategy|Ha.Static;function bK(e,t){let n=Tn(),{id:a=`headlessui-popover-panel-${n}`,focus:r=!1,...i}=e,[o,c]=py("Popover.Panel"),{close:l,isPortalled:d}=nN("Popover.Panel"),u=`headlessui-focus-sentinel-before-${Tn()}`,g=`headlessui-focus-sentinel-after-${Tn()}`,y=h.exports.useRef(null),w=Qt(y,t,E=>{c({type:4,panel:E})}),v=Oi(y),S=F6();en(()=>(c({type:5,panelId:a}),()=>{c({type:5,panelId:null})}),[a,c]);let m=Eo(),p=(()=>m!==null?(m&gn.Open)===gn.Open:o.popoverState===0)(),b=Be(E=>{var T;switch(E.key){case pt.Escape:if(o.popoverState!==0||!y.current||v!=null&&v.activeElement&&!y.current.contains(v.activeElement))return;E.preventDefault(),E.stopPropagation(),c({type:1}),(T=o.button)==null||T.focus();break}});h.exports.useEffect(()=>{var E;e.static||o.popoverState===1&&((E=e.unmount)==null||E)&&c({type:4,panel:null})},[o.popoverState,e.unmount,e.static,c]),h.exports.useEffect(()=>{if(o.__demoMode||!r||o.popoverState!==0||!y.current)return;let E=v==null?void 0:v.activeElement;y.current.contains(E)||Fa(y.current,$n.First)},[o.__demoMode,r,y,o.popoverState]);let x=h.exports.useMemo(()=>({open:o.popoverState===0,close:l}),[o,l]),k={ref:w,id:a,onKeyDown:b,onBlur:r&&o.popoverState===0?E=>{var T,D,P,M,O;let F=E.relatedTarget;F&&y.current&&((T=y.current)!=null&&T.contains(F)||(c({type:1}),((P=(D=o.beforePanelSentinel.current)==null?void 0:D.contains)!=null&&P.call(D,F)||(O=(M=o.afterPanelSentinel.current)==null?void 0:M.contains)!=null&&O.call(M,F))&&F.focus({preventScroll:!0})))}:void 0,tabIndex:-1},N=W6(),_=Be(()=>{let E=y.current;if(!E)return;function T(){Rt(N.current,{[Qr.Forwards]:()=>{var D;Fa(E,$n.First)===so.Error&&((D=o.afterPanelSentinel.current)==null||D.focus())},[Qr.Backwards]:()=>{var D;(D=o.button)==null||D.focus({preventScroll:!0})}})}T()}),C=Be(()=>{let E=y.current;if(!E)return;function T(){Rt(N.current,{[Qr.Forwards]:()=>{var D;if(!o.button)return;let P=Zp(),M=P.indexOf(o.button),O=P.slice(0,M+1),F=[...P.slice(M+1),...O];for(let z of F.slice())if(z.dataset.headlessuiFocusGuard==="true"||(D=o.panel)!=null&&D.contains(z)){let H=F.indexOf(z);H!==-1&&F.splice(H,1)}Fa(F,$n.First,{sorted:!1})},[Qr.Backwards]:()=>{var D;Fa(E,$n.Previous)===so.Error&&((D=o.button)==null||D.focus())}})}T()});return R.createElement(hy.Provider,{value:a},p&&d&&R.createElement(Ms,{id:u,ref:o.beforePanelSentinel,features:Ds.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:_}),$t({mergeRefs:S,ourProps:k,theirProps:i,slot:x,defaultTag:hK,features:gK,visible:p,name:"Popover.Panel"}),p&&d&&R.createElement(Ms,{id:g,ref:o.afterPanelSentinel,features:Ds.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:C}))}let yK="div";function xK(e,t){let n=h.exports.useRef(null),a=Qt(n,t),[r,i]=h.exports.useState([]),o=EQ(),c=Be(S=>{i(m=>{let p=m.indexOf(S);if(p!==-1){let b=m.slice();return b.splice(p,1),b}return m})}),l=Be(S=>(i(m=>[...m,S]),()=>c(S))),d=Be(()=>{var S;let m=$l(n);if(!m)return!1;let p=m.activeElement;return(S=n.current)!=null&&S.contains(p)?!0:r.some(b=>{var x,k;return((x=m.getElementById(b.buttonId.current))==null?void 0:x.contains(p))||((k=m.getElementById(b.panelId.current))==null?void 0:k.contains(p))})}),u=Be(S=>{for(let m of r)m.buttonId.current!==S&&m.close()}),g=h.exports.useMemo(()=>({registerPopover:l,unregisterPopover:c,isFocusWithinPopoverGroup:d,closeOthers:u,mainTreeNodeRef:o.mainTreeNodeRef}),[l,c,d,u,o.mainTreeNodeRef]),y=h.exports.useMemo(()=>({}),[]),w=e,v={ref:a};return R.createElement(aN.Provider,{value:g},$t({ourProps:v,theirProps:w,slot:y,defaultTag:yK,name:"Popover.Group"}),R.createElement(o.MainTreeNode,null))}let wK=Bt(cK),vK=Bt(uK),_K=Bt(pK),NK=Bt(bK),SK=Bt(xK),nw=Object.assign(wK,{Button:vK,Overlay:_K,Panel:NK,Group:SK}),OA=h.exports.createContext(null);function PA(){let e=h.exports.useContext(OA);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,PA),t}return e}function kK(){let[e,t]=h.exports.useState([]);return[e.length>0?e.join(" "):void 0,h.exports.useMemo(()=>function(n){let a=Be(i=>(t(o=>[...o,i]),()=>t(o=>{let c=o.slice(),l=c.indexOf(i);return l!==-1&&c.splice(l,1),c}))),r=h.exports.useMemo(()=>({register:a,slot:n.slot,name:n.name,props:n.props}),[a,n.slot,n.name,n.props]);return R.createElement(OA.Provider,{value:r},n.children)},[t])]}let CK="label";function EK(e,t){let n=Tn(),{id:a=`headlessui-label-${n}`,passive:r=!1,...i}=e,o=PA(),c=Qt(t);en(()=>o.register(a),[a,o.register]);let l={ref:c,...o.props,id:a};return r&&("onClick"in l&&(delete l.htmlFor,delete l.onClick),"onClick"in i&&delete i.onClick),$t({ourProps:l,theirProps:i,slot:o.slot||{},defaultTag:CK,name:o.name||"Label"})}let TK=Bt(EK),LK=Object.assign(TK,{});function DK(e=0){let[t,n]=h.exports.useState(e),a=of(),r=h.exports.useCallback(l=>{a.current&&n(d=>d|l)},[t,a]),i=h.exports.useCallback(l=>Boolean(t&l),[t]),o=h.exports.useCallback(l=>{a.current&&n(d=>d&~l)},[n,a]),c=h.exports.useCallback(l=>{a.current&&n(d=>d^l)},[n]);return{flags:t,addFlag:r,hasFlag:i,removeFlag:o,toggleFlag:c}}let rN=h.exports.createContext(null);rN.displayName="GroupContext";let MK=h.exports.Fragment;function AK(e){var t;let[n,a]=h.exports.useState(null),[r,i]=kK(),[o,c]=LA(),l=h.exports.useMemo(()=>({switch:n,setSwitch:a,labelledby:r,describedby:o}),[n,a,r,o]),d={},u=e;return R.createElement(c,{name:"Switch.Description"},R.createElement(i,{name:"Switch.Label",props:{htmlFor:(t=l.switch)==null?void 0:t.id,onClick(g){n&&(g.currentTarget.tagName==="LABEL"&&g.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},R.createElement(rN.Provider,{value:l},$t({ourProps:d,theirProps:u,defaultTag:MK,name:"Switch.Group"}))))}let IK="button";function OK(e,t){var n;let a=Tn(),{id:r=`headlessui-switch-${a}`,checked:i,defaultChecked:o=!1,onChange:c,disabled:l=!1,name:d,value:u,form:g,...y}=e,w=h.exports.useContext(rN),v=h.exports.useRef(null),S=Qt(v,t,w===null?null:w.setSwitch),[m,p]=R6(i,c,o),b=Be(()=>p==null?void 0:p(!m)),x=Be(T=>{if(Bl(T.currentTarget))return T.preventDefault();T.preventDefault(),b()}),k=Be(T=>{T.key===pt.Space?(T.preventDefault(),b()):T.key===pt.Enter&&wZ(T.currentTarget)}),N=Be(T=>T.preventDefault()),_=h.exports.useMemo(()=>({checked:m}),[m]),C={id:r,ref:S,role:"switch",type:Hc(e,v),tabIndex:e.tabIndex===-1?0:(n=e.tabIndex)!=null?n:0,"aria-checked":m,"aria-labelledby":w==null?void 0:w.labelledby,"aria-describedby":w==null?void 0:w.describedby,disabled:l,onClick:x,onKeyUp:k,onKeyPress:N},E=as();return h.exports.useEffect(()=>{var T;let D=(T=v.current)==null?void 0:T.closest("form");D&&o!==void 0&&E.addEventListener(D,"reset",()=>{p(o)})},[v,p]),R.createElement(R.Fragment,null,d!=null&&m&&R.createElement(Ms,{features:Ds.Hidden,...fp({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:l,form:g,checked:m,name:d,value:u})}),$t({ourProps:C,theirProps:y,slot:_,defaultTag:IK,name:"Switch"}))}let PK=Bt(OK),RK=AK,Tr=Object.assign(PK,{Group:RK,Label:LK,Description:DA});function jK({onFocus:e}){let[t,n]=h.exports.useState(!0),a=of();return t?R.createElement(Ms,{as:"button",type:"button",features:Ds.Focusable,onFocus:r=>{r.preventDefault();let i,o=50;function c(){if(o--<=0){i&&cancelAnimationFrame(i);return}if(e()){if(cancelAnimationFrame(i),!a.current)return;n(!1);return}i=requestAnimationFrame(c)}i=requestAnimationFrame(c)}}):null}const RA=h.exports.createContext(null);function zK(){return{groups:new Map,get(e,t){var n;let a=this.groups.get(e);a||(a=new Map,this.groups.set(e,a));let r=(n=a.get(t))!=null?n:0;a.set(t,r+1);let i=Array.from(a.keys()).indexOf(t);function o(){let c=a.get(t);c>1?a.set(t,c-1):a.delete(t)}return[i,o]}}}function FK({children:e}){let t=h.exports.useRef(zK());return h.exports.createElement(RA.Provider,{value:t},e)}function jA(e){let t=h.exports.useContext(RA);if(!t)throw new Error("You must wrap your component in a <StableCollection>");let n=$K(),[a,r]=t.current.get(e,n);return h.exports.useEffect(()=>r,[]),a}function $K(){var e,t,n;let a=(n=(t=(e=h.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null?void 0:e.ReactCurrentOwner)==null?void 0:t.current)!=null?n:null;if(!a)return Symbol();let r=[],i=a;for(;i;)r.push(i.index),i=i.return;return"$."+r.join(".")}var BK=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(BK||{}),HK=(e=>(e[e.Less=-1]="Less",e[e.Equal=0]="Equal",e[e.Greater=1]="Greater",e))(HK||{}),UK=(e=>(e[e.SetSelectedIndex=0]="SetSelectedIndex",e[e.RegisterTab=1]="RegisterTab",e[e.UnregisterTab=2]="UnregisterTab",e[e.RegisterPanel=3]="RegisterPanel",e[e.UnregisterPanel=4]="UnregisterPanel",e))(UK||{});let VK={[0](e,t){var n;let a=io(e.tabs,u=>u.current),r=io(e.panels,u=>u.current),i=a.filter(u=>{var g;return!((g=u.current)!=null&&g.hasAttribute("disabled"))}),o={...e,tabs:a,panels:r};if(t.index<0||t.index>a.length-1){let u=Rt(Math.sign(t.index-e.selectedIndex),{[-1]:()=>1,[0]:()=>Rt(Math.sign(t.index),{[-1]:()=>0,[0]:()=>0,[1]:()=>1}),[1]:()=>0});if(i.length===0)return o;let g=Rt(u,{[0]:()=>a.indexOf(i[0]),[1]:()=>a.indexOf(i[i.length-1])});return{...o,selectedIndex:g===-1?e.selectedIndex:g}}let c=a.slice(0,t.index),l=[...a.slice(t.index),...c].find(u=>i.includes(u));if(!l)return o;let d=(n=a.indexOf(l))!=null?n:e.selectedIndex;return d===-1&&(d=e.selectedIndex),{...o,selectedIndex:d}},[1](e,t){if(e.tabs.includes(t.tab))return e;let n=e.tabs[e.selectedIndex],a=io([...e.tabs,t.tab],i=>i.current),r=e.selectedIndex;return e.info.current.isControlled||(r=a.indexOf(n),r===-1&&(r=e.selectedIndex)),{...e,tabs:a,selectedIndex:r}},[2](e,t){return{...e,tabs:e.tabs.filter(n=>n!==t.tab)}},[3](e,t){return e.panels.includes(t.panel)?e:{...e,panels:io([...e.panels,t.panel],n=>n.current)}},[4](e,t){return{...e,panels:e.panels.filter(n=>n!==t.panel)}}},sN=h.exports.createContext(null);sN.displayName="TabsDataContext";function Iu(e){let t=h.exports.useContext(sN);if(t===null){let n=new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Iu),n}return t}let iN=h.exports.createContext(null);iN.displayName="TabsActionsContext";function oN(e){let t=h.exports.useContext(iN);if(t===null){let n=new Error(`<${e} /> is missing a parent <Tab.Group /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,oN),n}return t}function WK(e,t){return Rt(t.type,VK,e,t)}let YK=h.exports.Fragment;function GK(e,t){let{defaultIndex:n=0,vertical:a=!1,manual:r=!1,onChange:i,selectedIndex:o=null,...c}=e;const l=a?"vertical":"horizontal",d=r?"manual":"auto";let u=o!==null,g=$a({isControlled:u}),y=Qt(t),[w,v]=h.exports.useReducer(WK,{info:g,selectedIndex:o!=null?o:n,tabs:[],panels:[]}),S=h.exports.useMemo(()=>({selectedIndex:w.selectedIndex}),[w.selectedIndex]),m=$a(i||(()=>{})),p=$a(w.tabs),b=h.exports.useMemo(()=>({orientation:l,activation:d,...w}),[l,d,w]),x=Be(T=>(v({type:1,tab:T}),()=>v({type:2,tab:T}))),k=Be(T=>(v({type:3,panel:T}),()=>v({type:4,panel:T}))),N=Be(T=>{_.current!==T&&m.current(T),u||v({type:0,index:T})}),_=$a(u?e.selectedIndex:w.selectedIndex),C=h.exports.useMemo(()=>({registerTab:x,registerPanel:k,change:N}),[]);en(()=>{v({type:0,index:o!=null?o:n})},[o]),en(()=>{if(_.current===void 0||w.tabs.length<=0)return;let T=io(w.tabs,D=>D.current);T.some((D,P)=>w.tabs[P]!==D)&&N(T.indexOf(w.tabs[_.current]))});let E={ref:y};return R.createElement(FK,null,R.createElement(iN.Provider,{value:C},R.createElement(sN.Provider,{value:b},b.tabs.length<=0&&R.createElement(jK,{onFocus:()=>{var T,D;for(let P of p.current)if(((T=P.current)==null?void 0:T.tabIndex)===0)return(D=P.current)==null||D.focus(),!0;return!1}}),$t({ourProps:E,theirProps:c,slot:S,defaultTag:YK,name:"Tabs"}))))}let qK="div";function ZK(e,t){let{orientation:n,selectedIndex:a}=Iu("Tab.List"),r=Qt(t);return $t({ourProps:{ref:r,role:"tablist","aria-orientation":n},theirProps:e,slot:{selectedIndex:a},defaultTag:qK,name:"Tabs.List"})}let QK="button";function JK(e,t){var n,a;let r=Tn(),{id:i=`headlessui-tabs-tab-${r}`,...o}=e,{orientation:c,activation:l,selectedIndex:d,tabs:u,panels:g}=Iu("Tab"),y=oN("Tab"),w=Iu("Tab"),v=h.exports.useRef(null),S=Qt(v,t);en(()=>y.registerTab(v),[y,v]);let m=jA("tabs"),p=u.indexOf(v);p===-1&&(p=m);let b=p===d,x=Be(D=>{var P;let M=D();if(M===so.Success&&l==="auto"){let O=(P=$l(v))==null?void 0:P.activeElement,F=w.tabs.findIndex(z=>z.current===O);F!==-1&&y.change(F)}return M}),k=Be(D=>{let P=u.map(M=>M.current).filter(Boolean);if(D.key===pt.Space||D.key===pt.Enter){D.preventDefault(),D.stopPropagation(),y.change(p);return}switch(D.key){case pt.Home:case pt.PageUp:return D.preventDefault(),D.stopPropagation(),x(()=>Fa(P,$n.First));case pt.End:case pt.PageDown:return D.preventDefault(),D.stopPropagation(),x(()=>Fa(P,$n.Last))}if(x(()=>Rt(c,{vertical(){return D.key===pt.ArrowUp?Fa(P,$n.Previous|$n.WrapAround):D.key===pt.ArrowDown?Fa(P,$n.Next|$n.WrapAround):so.Error},horizontal(){return D.key===pt.ArrowLeft?Fa(P,$n.Previous|$n.WrapAround):D.key===pt.ArrowRight?Fa(P,$n.Next|$n.WrapAround):so.Error}}))===so.Success)return D.preventDefault()}),N=h.exports.useRef(!1),_=Be(()=>{var D;N.current||(N.current=!0,(D=v.current)==null||D.focus({preventScroll:!0}),y.change(p),qp(()=>{N.current=!1}))}),C=Be(D=>{D.preventDefault()}),E=h.exports.useMemo(()=>{var D;return{selected:b,disabled:(D=e.disabled)!=null?D:!1}},[b,e.disabled]),T={ref:S,onKeyDown:k,onMouseDown:C,onClick:_,id:i,role:"tab",type:Hc(e,v),"aria-controls":(a=(n=g[p])==null?void 0:n.current)==null?void 0:a.id,"aria-selected":b,tabIndex:b?0:-1};return $t({ourProps:T,theirProps:o,slot:E,defaultTag:QK,name:"Tabs.Tab"})}let KK="div";function XK(e,t){let{selectedIndex:n}=Iu("Tab.Panels"),a=Qt(t),r=h.exports.useMemo(()=>({selectedIndex:n}),[n]);return $t({ourProps:{ref:a},theirProps:e,slot:r,defaultTag:KK,name:"Tabs.Panels"})}let eX="div",tX=Ha.RenderStrategy|Ha.Static;function nX(e,t){var n,a,r,i;let o=Tn(),{id:c=`headlessui-tabs-panel-${o}`,tabIndex:l=0,...d}=e,{selectedIndex:u,tabs:g,panels:y}=Iu("Tab.Panel"),w=oN("Tab.Panel"),v=h.exports.useRef(null),S=Qt(v,t);en(()=>w.registerPanel(v),[w,v,c]);let m=jA("panels"),p=y.indexOf(v);p===-1&&(p=m);let b=p===u,x=h.exports.useMemo(()=>({selected:b}),[b]),k={ref:S,id:c,role:"tabpanel","aria-labelledby":(a=(n=g[p])==null?void 0:n.current)==null?void 0:a.id,tabIndex:b?l:-1};return!b&&((r=d.unmount)==null||r)&&!((i=d.static)!=null&&i)?R.createElement(Ms,{as:"span","aria-hidden":"true",...k}):$t({ourProps:k,theirProps:d,slot:x,defaultTag:eX,features:tX,visible:b,name:"Tabs.Panel"})}let aX=Bt(JK),rX=Bt(GK),sX=Bt(ZK),iX=Bt(XK),oX=Bt(nX),On=Object.assign(aX,{Group:rX,List:sX,Panels:iX,Panel:oX});function lX(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function aw(e,...t){e&&t.length>0&&e.classList.add(...t)}function rw(e,...t){e&&t.length>0&&e.classList.remove(...t)}function cX(e,t){let n=lr();if(!e)return n.dispose;let{transitionDuration:a,transitionDelay:r}=getComputedStyle(e),[i,o]=[a,r].map(l=>{let[d=0]=l.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,g)=>g-u);return d}),c=i+o;if(c!==0){n.group(d=>{d.setTimeout(()=>{t(),d.dispose()},c),d.addEventListener(e,"transitionrun",u=>{u.target===u.currentTarget&&d.dispose()})});let l=n.addEventListener(e,"transitionend",d=>{d.target===d.currentTarget&&(t(),l())})}else t();return n.add(()=>t()),n.dispose}function dX(e,t,n,a){let r=n?"enter":"leave",i=lr(),o=a!==void 0?lX(a):()=>{};r==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let c=Rt(r,{enter:()=>t.enter,leave:()=>t.leave}),l=Rt(r,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),d=Rt(r,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return rw(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),aw(e,...t.base,...c,...d),i.nextFrame(()=>{rw(e,...t.base,...c,...d),aw(e,...t.base,...c,...l),cX(e,()=>(rw(e,...t.base,...c),aw(e,...t.base,...t.entered),o()))}),i.dispose}function uX({immediate:e,container:t,direction:n,classes:a,onStart:r,onStop:i}){let o=of(),c=as(),l=$a(n);en(()=>{e&&(l.current="enter")},[e]),en(()=>{let d=lr();c.add(d.dispose);let u=t.current;if(u&&l.current!=="idle"&&o.current)return d.dispose(),r.current(l.current),d.add(dX(u,a.current,l.current==="enter",()=>{d.dispose(),i.current(l.current)})),d.dispose},[n])}function Ho(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let gy=h.exports.createContext(null);gy.displayName="TransitionContext";var fX=(e=>(e.Visible="visible",e.Hidden="hidden",e))(fX||{});function mX(){let e=h.exports.useContext(gy);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function pX(){let e=h.exports.useContext(by);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let by=h.exports.createContext(null);by.displayName="NestingContext";function yy(e){return"children"in e?yy(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function zA(e,t){let n=$a(e),a=h.exports.useRef([]),r=of(),i=as(),o=Be((w,v=dl.Hidden)=>{let S=a.current.findIndex(({el:m})=>m===w);S!==-1&&(Rt(v,{[dl.Unmount](){a.current.splice(S,1)},[dl.Hidden](){a.current[S].state="hidden"}}),i.microTask(()=>{var m;!yy(a)&&r.current&&((m=n.current)==null||m.call(n))}))}),c=Be(w=>{let v=a.current.find(({el:S})=>S===w);return v?v.state!=="visible"&&(v.state="visible"):a.current.push({el:w,state:"visible"}),()=>o(w,dl.Unmount)}),l=h.exports.useRef([]),d=h.exports.useRef(Promise.resolve()),u=h.exports.useRef({enter:[],leave:[],idle:[]}),g=Be((w,v,S)=>{l.current.splice(0),t&&(t.chains.current[v]=t.chains.current[v].filter(([m])=>m!==w)),t==null||t.chains.current[v].push([w,new Promise(m=>{l.current.push(m)})]),t==null||t.chains.current[v].push([w,new Promise(m=>{Promise.all(u.current[v].map(([p,b])=>b)).then(()=>m())})]),v==="enter"?d.current=d.current.then(()=>t==null?void 0:t.wait.current).then(()=>S(v)):S(v)}),y=Be((w,v,S)=>{Promise.all(u.current[v].splice(0).map(([m,p])=>p)).then(()=>{var m;(m=l.current.shift())==null||m()}).then(()=>S(v))});return h.exports.useMemo(()=>({children:a,register:c,unregister:o,onStart:g,onStop:y,wait:d,chains:u}),[c,o,a,g,y,u,d])}function hX(){}let gX=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function f9(e){var t;let n={};for(let a of gX)n[a]=(t=e[a])!=null?t:hX;return n}function bX(e){let t=h.exports.useRef(f9(e));return h.exports.useEffect(()=>{t.current=f9(e)},[e]),t}let yX="div",FA=Ha.RenderStrategy;function xX(e,t){var n,a;let{beforeEnter:r,afterEnter:i,beforeLeave:o,afterLeave:c,enter:l,enterFrom:d,enterTo:u,entered:g,leave:y,leaveFrom:w,leaveTo:v,...S}=e,m=h.exports.useRef(null),p=Qt(m,t),b=(n=S.unmount)==null||n?dl.Unmount:dl.Hidden,{show:x,appear:k,initial:N}=mX(),[_,C]=h.exports.useState(x?"visible":"hidden"),E=pX(),{register:T,unregister:D}=E;h.exports.useEffect(()=>T(m),[T,m]),h.exports.useEffect(()=>{if(b===dl.Hidden&&m.current){if(x&&_!=="visible"){C("visible");return}return Rt(_,{hidden:()=>D(m),visible:()=>T(m)})}},[_,m,T,D,x,b]);let P=$a({base:Ho(S.className),enter:Ho(l),enterFrom:Ho(d),enterTo:Ho(u),entered:Ho(g),leave:Ho(y),leaveFrom:Ho(w),leaveTo:Ho(v)}),M=bX({beforeEnter:r,afterEnter:i,beforeLeave:o,afterLeave:c}),O=rf();h.exports.useEffect(()=>{if(O&&_==="visible"&&m.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[m,_,O]);let F=N&&!k,z=k&&x&&N,H=(()=>!O||F?"idle":x?"enter":"leave")(),A=DK(0),j=Be(V=>Rt(V,{enter:()=>{A.addFlag(gn.Opening),M.current.beforeEnter()},leave:()=>{A.addFlag(gn.Closing),M.current.beforeLeave()},idle:()=>{}})),I=Be(V=>Rt(V,{enter:()=>{A.removeFlag(gn.Opening),M.current.afterEnter()},leave:()=>{A.removeFlag(gn.Closing),M.current.afterLeave()},idle:()=>{}})),B=zA(()=>{C("hidden"),D(m)},E),Y=h.exports.useRef(!1);uX({immediate:z,container:m,classes:P,direction:H,onStart:$a(V=>{Y.current=!0,B.onStart(m,V,j)}),onStop:$a(V=>{Y.current=!1,B.onStop(m,V,I),V==="leave"&&!yy(B)&&(C("hidden"),D(m))})});let U=S,W={ref:p};return z?U={...U,className:N1(S.className,...P.current.enter,...P.current.enterFrom)}:Y.current&&(U.className=N1(S.className,(a=m.current)==null?void 0:a.className),U.className===""&&delete U.className),R.createElement(by.Provider,{value:B},R.createElement(sf,{value:Rt(_,{visible:gn.Open,hidden:gn.Closed})|A.flags},$t({ourProps:W,theirProps:U,defaultTag:yX,features:FA,visible:_==="visible",name:"Transition.Child"})))}function wX(e,t){let{show:n,appear:a=!1,unmount:r=!0,...i}=e,o=h.exports.useRef(null),c=Qt(o,t);rf();let l=Eo();if(n===void 0&&l!==null&&(n=(l&gn.Open)===gn.Open),![!0,!1].includes(n))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[d,u]=h.exports.useState(n?"visible":"hidden"),g=zA(()=>{u("hidden")}),[y,w]=h.exports.useState(!0),v=h.exports.useRef([n]);en(()=>{y!==!1&&v.current[v.current.length-1]!==n&&(v.current.push(n),w(!1))},[v,n]);let S=h.exports.useMemo(()=>({show:n,appear:a,initial:y}),[n,a,y]);h.exports.useEffect(()=>{if(n)u("visible");else if(!yy(g))u("hidden");else{let x=o.current;if(!x)return;let k=x.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&u("hidden")}},[n,g]);let m={unmount:r},p=Be(()=>{var x;y&&w(!1),(x=e.beforeEnter)==null||x.call(e)}),b=Be(()=>{var x;y&&w(!1),(x=e.beforeLeave)==null||x.call(e)});return R.createElement(by.Provider,{value:g},R.createElement(gy.Provider,{value:S},$t({ourProps:{...m,as:h.exports.Fragment,children:R.createElement($A,{ref:c,...m,...i,beforeEnter:p,beforeLeave:b})},theirProps:{},defaultTag:h.exports.Fragment,features:FA,visible:d==="visible",name:"Transition"})))}function vX(e,t){let n=h.exports.useContext(gy)!==null,a=Eo()!==null;return R.createElement(R.Fragment,null,!n&&a?R.createElement(e4,{ref:t,...e}):R.createElement($A,{ref:t,...e}))}let e4=Bt(wX),$A=Bt(xX),_X=Bt(vX),ke=Object.assign(e4,{Child:_X,Root:e4});function BA({control:e,name:t,setValue:n,containerClassName:a,valueField:r,labelField:i,items:o,...c}){const{field:l,fieldState:d,formState:u}=Ii({control:e,name:t}),g=l.value===""?o:o.filter(y=>y[i].toLowerCase().replace(/\s+/g,"").includes(l.value.toLowerCase().replace(/\s+/g,""))).sort((y,w)=>y[i].toLowerCase().indexOf(l.value.toLowerCase())>w[i].toLowerCase().indexOf(l.value.toLowerCase())?1:y[i].toLowerCase().indexOf(l.value.toLowerCase())<w[i].toLowerCase().indexOf(l.value.toLowerCase())?-1:y[i]>w[i]?1:-1);return f(Rn,{as:"div",className:`${a!=null?a:""}`,value:l.value,onChange:n,children:[s(Rn.Input,{...c,...l,autoComplete:"off"}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(Rn.Options,{className:`tiny-scroll absolute left-0 right-0 top-full z-50 mt-2 max-h-60 w-full origin-top cursor-pointer divide-y divide-gray-100 overflow-y-auto rounded-xl bg-white ring-black ring-opacity-5 focus:outline-none ${g.length>0?"py-2 shadow-lg ring-1":""}`,children:g.map((y,w)=>s(Rn.Option,{className:"flex w-full items-center truncate rounded-pill px-3 py-3 pr-5 text-sm ui-active:bg-gray-100 ui-active:text-black ui-not-active:text-gray-800",value:y[r],children:y[i]},w))})})]})}function NX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{d:"M18.75 12.75h1.5a.75.75 0 0 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5ZM12 6a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 12 6ZM12 18a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 12 18ZM3.75 6.75h1.5a.75.75 0 1 0 0-1.5h-1.5a.75.75 0 0 0 0 1.5ZM5.25 18.75h-1.5a.75.75 0 0 1 0-1.5h1.5a.75.75 0 0 1 0 1.5ZM3 12a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 3 12ZM9 3.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5ZM12.75 12a2.25 2.25 0 1 1 4.5 0 2.25 2.25 0 0 1-4.5 0ZM9 15.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"}))}const SX=h.exports.forwardRef(NX);var lf=SX;function kX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M12.53 16.28a.75.75 0 0 1-1.06 0l-7.5-7.5a.75.75 0 0 1 1.06-1.06L12 14.69l6.97-6.97a.75.75 0 1 1 1.06 1.06l-7.5 7.5Z",clipRule:"evenodd"}))}const CX=h.exports.forwardRef(kX);var EX=CX;function TX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M11.47 4.72a.75.75 0 0 1 1.06 0l3.75 3.75a.75.75 0 0 1-1.06 1.06L12 6.31 8.78 9.53a.75.75 0 0 1-1.06-1.06l3.75-3.75Zm-3.75 9.75a.75.75 0 0 1 1.06 0L12 17.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-3.75 3.75a.75.75 0 0 1-1.06 0l-3.75-3.75a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const LX=h.exports.forwardRef(TX);var DX=LX;function MX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M10.5 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm0 6a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z",clipRule:"evenodd"}))}const AX=h.exports.forwardRef(MX);var t4=AX;function IX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))}const OX=h.exports.forwardRef(IX);var PX=OX;function RX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z",clipRule:"evenodd"}))}const jX=h.exports.forwardRef(RX);var zX=jX;function FX({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{fillRule:"evenodd",d:"M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z",clipRule:"evenodd"}))}const $X=h.exports.forwardRef(FX);var BX=$X,HA={},HX="Expected a function",m9=0/0,UX="[object Symbol]",VX=/^\s+|\s+$/g,WX=/^[-+]0x[0-9a-f]+$/i,YX=/^0b[01]+$/i,GX=/^0o[0-7]+$/i,qX=parseInt,ZX=typeof sn=="object"&&sn&&sn.Object===Object&&sn,QX=typeof self=="object"&&self&&self.Object===Object&&self,JX=ZX||QX||Function("return this")(),KX=Object.prototype,XX=KX.toString,eee=Math.max,tee=Math.min,sw=function(){return JX.Date.now()};function nee(e,t,n){var a,r,i,o,c,l,d=0,u=!1,g=!1,y=!0;if(typeof e!="function")throw new TypeError(HX);t=p9(t)||0,n4(n)&&(u=!!n.leading,g="maxWait"in n,i=g?eee(p9(n.maxWait)||0,t):i,y="trailing"in n?!!n.trailing:y);function w(_){var C=a,E=r;return a=r=void 0,d=_,o=e.apply(E,C),o}function v(_){return d=_,c=setTimeout(p,t),u?w(_):o}function S(_){var C=_-l,E=_-d,T=t-C;return g?tee(T,i-E):T}function m(_){var C=_-l,E=_-d;return l===void 0||C>=t||C<0||g&&E>=i}function p(){var _=sw();if(m(_))return b(_);c=setTimeout(p,S(_))}function b(_){return c=void 0,y&&a?w(_):(a=r=void 0,o)}function x(){c!==void 0&&clearTimeout(c),d=0,a=l=r=c=void 0}function k(){return c===void 0?o:b(sw())}function N(){var _=sw(),C=m(_);if(a=arguments,r=this,l=_,C){if(c===void 0)return v(l);if(g)return c=setTimeout(p,t),w(l)}return c===void 0&&(c=setTimeout(p,t)),o}return N.cancel=x,N.flush=k,N}function n4(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function aee(e){return!!e&&typeof e=="object"}function ree(e){return typeof e=="symbol"||aee(e)&&XX.call(e)==UX}function p9(e){if(typeof e=="number")return e;if(ree(e))return m9;if(n4(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=n4(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(VX,"");var n=YX.test(e);return n||GX.test(e)?qX(e.slice(2),n?2:8):WX.test(e)?m9:+e}var see=nee,Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.loadGoogleMapScript=Ou.isBrowser=void 0;var UA=typeof window!="undefined"&&window.document;Ou.isBrowser=UA;var iee=function(t,n){if(!UA||typeof google!="undefined"&&google.maps&&google.maps.api)return Promise.resolve();var a=document.querySelectorAll('script[src*="'.concat(t,'"]'));if(a&&a.length)return new Promise(function(o){if(typeof google!="undefined")return o();a[0].addEventListener("load",function(){return o()})});var r=new URL(n);r.searchParams.set("callback","__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__");var i=document.createElement("script");return i.src=r.toString(),new Promise(function(o){window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__=o,document.body.appendChild(i)})};Ou.loadGoogleMapScript=iee;var xy={};Object.defineProperty(xy,"__esModule",{value:!0});xy.GOOGLE_MAP_SCRIPT_BASE_URL=void 0;var oee="https://maps.googleapis.com/maps/api/js";xy.GOOGLE_MAP_SCRIPT_BASE_URL=oee;Object.defineProperty(HA,"__esModule",{value:!0});var lN=HA.default=hee,Ur=h.exports,h9=cee(see),g9=Ou,lee=xy;function cee(e){return e&&e.__esModule?e:{default:e}}function b9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b9(Object(n),!0).forEach(function(a){dee(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b9(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function dee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function md(e,t){return pee(e)||mee(e,t)||fee(e,t)||uee()}function uee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function fee(e,t){if(!!e){if(typeof e=="string")return y9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y9(e,t)}}function y9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function mee(e,t){var n=e&&(typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var a=[],r=!0,i=!1,o,c;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!(t&&a.length===t));r=!0);}catch(l){i=!0,c=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw c}}return a}}function pee(e){if(Array.isArray(e))return e}function hee(e){var t=e.apiKey,n=e.libraries,a=n===void 0?"places":n,r=e.googleMapsScriptBaseUrl,i=r===void 0?lee.GOOGLE_MAP_SCRIPT_BASE_URL:r,o=e.debounce,c=o===void 0?300:o,l=e.options,d=l===void 0?{}:l,u=e.sessionToken,g=e.language,y=g?"&language=".concat(g):"",w="".concat(i,"?key=").concat(t,"&libraries=").concat(a).concat(y),v=(0,Ur.useState)([]),S=md(v,2),m=S[0],p=S[1],b=(0,Ur.useState)(!1),x=md(b,2),k=x[0],N=x[1],_=(0,Ur.useState)(null),C=md(_,2),E=C[0],T=C[1],D=(0,Ur.useState)(!1),P=md(D,2),M=P[0],O=P[1],F=(0,Ur.useState)(!1),z=md(F,2),H=z[0],A=z[1],j=(0,Ur.useState)([]),I=md(j,2),B=I[0],Y=I[1],U=(0,Ur.useRef)(null),W=(0,Ur.useRef)(null),V=(0,Ur.useRef)(null),X=(0,Ur.useCallback)(function(){return(0,g9.loadGoogleMapScript)(i,w)},[i,w]),ne=(0,Ur.useCallback)((0,h9.default)(function(q){U.current&&q.input&&U.current.getPlacePredictions(fd(fd(fd({},u&&V.current?{sessionToken:V.current}:{}),d),q),function(te){N(!1),p(te||[])})},c),[c]),oe=(0,Ur.useCallback)((0,h9.default)(function(q){U.current&&q.input&&U.current.getQueryPredictions(fd(fd(fd({},u&&V.current?{sessionToken:V.current}:{}),d),q),function(te){O(!1),Y(te||[])})},c),[c]);return(0,Ur.useEffect)(function(){if(!!g9.isBrowser){var q=function(){if(!google)return console.error("Google has not been found. Make sure your provide apiKey prop.");U.current=new google.maps.places.AutocompleteService,W.current=new google.maps.places.PlacesService(document.createElement("div")),u&&(V.current=new google.maps.places.AutocompleteSessionToken)};t?X().then(function(){return q()}):q()}},[]),{placesService:W.current,autocompleteSessionToken:V.current,placesAutocompleteService:U.current,placePredictions:E?m:[],isPlacePredictionsLoading:k,getPlacePredictions:function(te){if(te.input){T(te.input),N(!0),ne(te);return}p([]),T(null),ne(te),N(!1)},queryPredictions:H?B:[],isQueryPredictionsLoading:M,getQueryPredictions:function(te){if(te.input){A(te.input),O(!0),oe(te);return}Y([]),A(null),oe(te),O(!1)},refreshSessionToken:function(){V.current=new google.maps.places.AutocompleteSessionToken}}}const cN=()=>f("svg",{width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M8.99996 10.9166C10.5187 10.9166 11.75 9.68537 11.75 8.16658C11.75 6.6478 10.5187 5.41659 8.99996 5.41659C7.48118 5.41659 6.24996 6.6478 6.24996 8.16658C6.24996 9.68537 7.48118 10.9166 8.99996 10.9166Z",stroke:"#98A2B3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),s("path",{d:"M8.99996 19.1666C12.6666 15.4999 16.3333 12.2167 16.3333 8.16658C16.3333 4.1165 13.05 0.833252 8.99996 0.833252C4.94987 0.833252 1.66663 4.1165 1.66663 8.16658C1.66663 12.2167 5.33329 15.4999 8.99996 19.1666Z",stroke:"#98A2B3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});function dN({type:e,control:t,name:n,setValue:a,onClear:r,className:i,containerClassName:o,hideIcons:c,suggestionType:l,...d}){const{dispatch:u,state:g}=h.exports.useContext(we),[y,w]=h.exports.useState(g.location),{placePredictions:v,getPlacePredictions:S,isPlacePredictionsLoading:m}=lN({apiKey:"AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70",options:{types:l!=null?l:["(region)"]},debounce:200});return f(Rn,{as:"div",className:`z-100 relative w-full normal-case ${o!=null?o:""}`,value:y,children:[!c&&s(cN,{}),s(Rn.Input,{...d,autoComplete:"off",className:`w-full truncate text-black ${i!=null?i:""}`,value:y,onChange:p=>{w(p.target.value),S({input:p.target.value})}}),!c&&g.location&&s("button",{type:"button",onClick:()=>{a(""),w(""),r&&r()},children:"\u2715"}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:m?s("div",{className:"absolute left-0 right-0 top-full z-50 mt-2 flex w-full origin-top justify-center rounded-xl border bg-white py-8",children:s("svg",{style:{margin:"auto",background:"none",display:"block",shapeRendering:"auto"},width:"36px",height:"36px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"10",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(1)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.6666666666666667s",keyTimes:"0;1",values:"0;256.58892822265625"})})})}):s(Rn.Options,{className:`${v.length>0?"py-2 shadow-lg ring-1":""} absolute left-0 right-0 top-full z-50 mt-2 w-full origin-top cursor-pointer divide-y divide-gray-100 rounded-xl bg-white ring-black ring-opacity-5 focus:outline-none`,children:v.map((p,b)=>{var x,k,N;return s(Rn.Option,{className:"flex w-full items-center truncate rounded-pill px-3 py-3 pr-5 text-sm ui-active:bg-gray-100 ui-active:text-black ui-not-active:text-gray-800",value:p.structured_formatting.main_text,onClick:()=>{var _;return a((p==null?void 0:p.structured_formatting.main_text)+", "+((_=p.structured_formatting)==null?void 0:_.secondary_text))},children:s("span",{children:`${p.structured_formatting.main_text} ${(x=p.structured_formatting)!=null&&x.secondary_text?",":""} ${(k=p.structured_formatting)!=null&&k.secondary_text?(N=p.structured_formatting)==null?void 0:N.secondary_text:""}`})},b)})})})]})}const Pu=({className:e})=>{const t=je(),n=GY("/search"),[a,r]=lt(),[i,o]=h.exports.useState(p1("search-bar")),{pathname:c}=An(),{state:l,dispatch:d}=h.exports.useContext(we),u=l.spaceCategories,{handleSubmit:g,control:y,setValue:w}=Oe({defaultValues:{category:"",location:l.location}});h.exports.useEffect(()=>{const S=()=>{o(p1("search-bar"))};return window.addEventListener("scroll",S),()=>{window.removeEventListener("scroll",S)}},[]),h.exports.useEffect(()=>{o(!1)},[c]);const v=async S=>{var p,b;const m=document.getElementById("search-bar");if(n&&m){S.category&&a.set("category",selected.category),l.location&&a.set("location",location),r(a),await AM(500),VM.Simulate.submit(m);return}t({pathname:"/search",search:Au({location:(p=l.location)!=null?p:"",category:(b=S.category)!=null?b:""}).toString()})};return!i||!["/search","/"].includes(c)?null:s("div",{className:e,children:f("form",{className:"my-shadow2 flex w-full max-w-xl items-center rounded-lg rounded-r-pill border bg-white pl-1 md:rounded-r-lg md:pl-4 xl:ml-16 xl:max-w-3xl",onSubmit:g(v),autoComplete:"off",id:"top-header-search-bar",children:[s(BA,{control:y,name:"category",labelField:"category",valueField:"category",setValue:S=>w("category",S),items:u,containerClassName:"relative hidden h-[40px] items-center md:flex md:w-[500px]",className:"w-full truncate border-0 text-black focus:outline-none",placeholder:"Search by category"}),s(dN,{containerClassName:"flex h-[40px] w-full items-center gap-2 rounded-t-md bg-white px-2 pr-1 md:h-[unset] lg:max-w-[331px] lg:rounded-none lg:py-0",placeholder:"Search by city or zip code",className:"border-0 focus:outline-none",type:"static",setValue:S=>d({type:"SETLOCATION",payload:{location:S}}),suggestionType:["(regions)"]}),f("button",{type:"submit",className:"login-btn-gradient hidden w-1/2 items-center justify-center gap-2 rounded-md rounded-bl-none rounded-tl-none py-3 tracking-wide text-white outline-none focus:outline-none md:flex md:w-[unset] md:px-4 lg:w-[unset]",children:[s(OM,{className:"md:w-[50px]"}),s("span",{className:"hidden md:inline",children:"Search"})]}),f("button",{className:"login-btn-gradient flex h-10 w-11 items-center justify-center rounded-circle md:hidden",children:[" ",s(zX,{className:"h-5 w-5 font-semibold text-white"})]})]})})},x9=e=>{if(e.startsWith("/account")||e.startsWith("/property")||e.startsWith("/help"))return"light";switch(e){case"/contact-us":case"/faq":return"white";case"/search":case"/explore":case"/favorites":case"/reset-password":case"/check-verification":return"light";default:return"transparent"}},a4=()=>{je();const{pathname:e}=An(),[t,n]=h.exports.useState(x9(e)),[a,r]=h.exports.useState(!1);return h.exports.useEffect(()=>{const i=()=>{e=="/"&&(window.scrollY>10?n("white"):n("transparent")),r(p1("search-bar"))};return window.addEventListener("scroll",i),r(p1("search-bar")),()=>{window.removeEventListener("scroll",i)}},[e]),h.exports.useEffect(()=>{n(x9(e))},[e]),e.includes("/login")||e.includes("/signup")?null:f("header",{className:`fixed top-0 left-0 z-50 flex w-screen flex-wrap items-center justify-between py-4 px-4 text-sm duration-500 md:rounded-br-[32px] md:rounded-bl-[32px] md:px-12 lg:flex-nowrap header-${t}`,children:[s("nav",{className:`lg:flex ${a?"hidden":"flex"} gap-6`,children:s($e,{to:"/",children:s(oy,{fill:t=="transparent"||t=="light"?void 0:"#101828"})})}),s("div",{className:"hidden lg:block",children:a&&(e=="/search"||e=="/")&&s(Pu,{})}),f("nav",{className:"hidden items-center gap-6 lg:flex",children:[s($e,{to:"/login",className:`rounded-md border px-6 py-[5px] pb-[7px] my-border-${t} whitespace-nowrap`,children:s("span",{children:"Login"})}),s($e,{to:"/signup/select-role",className:`rounded-md border px-6 py-[5px] pb-[7px] my-border-${t} whitespace-nowrap`,children:s("span",{children:"Sign up"})})]}),f("nav",{className:`lg:hidden ${a?"hidden":"flex"} items-center gap-4`,children:[s($e,{to:"/login",className:`rounded-md border px-6 py-[5px] pb-[7px] my-border-${t}`,children:s("span",{children:"Login"})}),s($e,{to:"/signup/select-role",className:`rounded-md border px-6 py-[5px] pb-[7px] my-border-${t}`,children:s("span",{children:"Sign up"})})]}),s("div",{className:`${a&&(e=="/search"||e=="/")?"py-4":""} flex w-full justify-center lg:hidden`,children:a&&(e=="/search"||e=="/")&&s(Pu,{className:"flex w-full justify-center py-4 md:hidden"})})]})},w9=()=>{const{state:e,dispatch:t}=R.useContext(we);let{isOpen:n}=e,a=r=>t({type:"OPEN_SIDEBAR",payload:{isOpen:r}});return s("div",{className:"page-header block lg:hidden shadow",children:s("span",{onClick:()=>a(!n),children:n?s("svg",{className:"block h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}):s("svg",{className:"block h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})})},Nn={PROPERTY_SPACE:0,IMAGES:1,SCHEDULING:2,COMPLETED:3,UNSET:null},mt={USER:"U-",HOST:"H-",CUSTOMER:"C-",PROPERTY:"P-",PROPERTY_SPACE:"PS-",SPACE_CATEGORY:"SC-",ADDON_CATEGORY:"AOC-",AMENITY_CATEGORY:"AMC-",PROPERTY_SPACE_IMAGES:"PSI-",PROPERTY_SPACE_AMENITIES:"PSA-",PROPERTY_SPACE_FAQS:"PSF-",PROPERTY_ADDON:"PA-",BOOKINGS:"BK-",BOOKING_ADDON:"BKA-",PAYOUT:"PY-",HASHTAGS:"H-",REVIEWS:"R-",FAQS:"F-",EMAIL:"E-",SETTING:"S-",ID_VERIFICATION:"IDV-",NOTIFICATION:"N-",DEVICE:"D-",PAYMENT_METHOD:"PM-"},ut={PENDING:0,UPCOMING:1,ONGOING:2,COMPLETED:3,DECLINED:4,CANCELLED:5,DELETED:6},Pm={NOT_PAID:0,SUCCESSFUL:1,PENDING:2,FAILED:3},wo={UNDER_REVIEW:0,APPROVED:1,DECLINED:2},Ti={HIDDEN:0,VISIBLE:1},tl={NOT_ARCHIVE:0,IS_ARCHIVE:1},ws={SMALL:0,MEDIUM:1,LARGE:2,X_LARGE:3,UNSET:null},rn={IN_REVIEW:0,APPROVED:1,NOT_APPROVED:2},rr={NOT_ADDRESSED:0,ADDRESSED:1},za={CREATE_SPACE:0,CREATE_PROPERTY_SPACE_IMAGE:1,EDIT_USER_PICTURE:2,EDIT_PROPERTY_SPACE:3,ADD_REVIEW:4,ADD_PAYOUT:5,NEW_ID_VERIFICATION:6},Rm={PENDING:0,VERIFIED:1,REJECTED:2},C1=()=>s("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M10 6V10M10 10V14M10 10H6M10 10H14M5.8 19H14.2C15.8802 19 16.7202 19 17.362 18.673C17.9265 18.3854 18.3854 17.9265 18.673 17.362C19 16.7202 19 15.8802 19 14.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V14.2C1 15.8802 1 16.7202 1.32698 17.362C1.6146 17.9265 2.07354 18.3854 2.63803 18.673C3.27976 19 4.11984 19 5.8 19Z",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),VA=()=>s("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M3.18717 12.3543H12.8809L9.87884 8.34391L7.28926 11.6897L5.45592 9.32933L3.18717 12.3543ZM1.85801 15.7918C1.39967 15.7918 1.01009 15.6314 0.689258 15.3106C0.368425 14.9897 0.208008 14.6002 0.208008 14.1418V1.8585C0.208008 1.40016 0.368425 1.01058 0.689258 0.689746C1.01009 0.368913 1.39967 0.208496 1.85801 0.208496H14.1413C14.5997 0.208496 14.9893 0.368913 15.3101 0.689746C15.6309 1.01058 15.7913 1.40016 15.7913 1.8585V14.1418C15.7913 14.6002 15.6309 14.9897 15.3101 15.3106C14.9893 15.6314 14.5997 15.7918 14.1413 15.7918H1.85801ZM1.85801 14.4168H14.1413C14.2025 14.4168 14.2636 14.3863 14.3247 14.3252C14.3858 14.2641 14.4163 14.2029 14.4163 14.1418V1.8585C14.4163 1.79739 14.3858 1.73627 14.3247 1.67516C14.2636 1.61405 14.2025 1.5835 14.1413 1.5835H1.85801C1.7969 1.5835 1.73579 1.61405 1.67467 1.67516C1.61356 1.73627 1.58301 1.79739 1.58301 1.8585V14.1418C1.58301 14.2029 1.61356 14.2641 1.67467 14.3252C1.73579 14.3863 1.7969 14.4168 1.85801 14.4168ZM1.58301 1.5835C1.58301 1.5835 1.58301 1.61038 1.58301 1.66416C1.58301 1.71733 1.58301 1.78211 1.58301 1.8585V14.1418C1.58301 14.2182 1.58301 14.2833 1.58301 14.3371C1.58301 14.3902 1.58301 14.4168 1.58301 14.4168C1.58301 14.4168 1.58301 14.3902 1.58301 14.3371C1.58301 14.2833 1.58301 14.2182 1.58301 14.1418V1.8585C1.58301 1.78211 1.58301 1.71733 1.58301 1.66416C1.58301 1.61038 1.58301 1.5835 1.58301 1.5835Z",fill:"#8E8E93"})});function gee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m20.25 7.5-.625 10.632a2.25 2.25 0 0 1-2.247 2.118H6.622a2.25 2.25 0 0 1-2.247-2.118L3.75 7.5m6 4.125 2.25 2.25m0 0 2.25 2.25M12 13.875l2.25-2.25M12 13.875l-2.25 2.25M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125Z"}))}const bee=h.exports.forwardRef(gee);var yee=bee;function xee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 9V5.25A2.25 2.25 0 0 0 13.5 3h-6a2.25 2.25 0 0 0-2.25 2.25v13.5A2.25 2.25 0 0 0 7.5 21h6a2.25 2.25 0 0 0 2.25-2.25V15M12 9l-3 3m0 0 3 3m-3-3h12.75"}))}const wee=h.exports.forwardRef(xee);var vee=wee;function _ee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"}))}const Nee=h.exports.forwardRef(_ee);var cf=Nee;function See({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))}const kee=h.exports.forwardRef(See);var Cee=kee;function Eee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"}))}const Tee=h.exports.forwardRef(Eee);var v9=Tee;function Lee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 18.75a60.07 60.07 0 0 1 15.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 0 1 3 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 0 0-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 0 1-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 0 0 3 15h-.75M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm3 0h.008v.008H18V10.5Zm-12 0h.008v.008H6V10.5Z"}))}const Dee=h.exports.forwardRef(Lee);var _9=Dee;function Mee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0M3.124 7.5A8.969 8.969 0 0 1 5.292 3m13.416 0a8.969 8.969 0 0 1 2.168 4.5"}))}const Aee=h.exports.forwardRef(Mee);var Iee=Aee;function Oee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6.042A8.967 8.967 0 0 0 6 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 0 1 6 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 0 1 6-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0 0 18 18a8.967 8.967 0 0 0-6 2.292m0-14.25v14.25"}))}const Pee=h.exports.forwardRef(Oee);var Ree=Pee;function jee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 21v-8.25M15.75 21v-8.25M8.25 21v-8.25M3 9l9-6 9 6m-1.5 12V10.332A48.36 48.36 0 0 0 12 9.75c-2.551 0-5.056.2-7.5.582V21M3 21h18M12 6.75h.008v.008H12V6.75Z"}))}const zee=h.exports.forwardRef(jee);var Fee=zee;function $ee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Zm0 3h.008v.008h-.008v-.008Z"}))}const Bee=h.exports.forwardRef($ee);var Hee=Bee;function Uee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21"}))}const Vee=h.exports.forwardRef(Uee);var N9=Vee;function Wee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"}))}const Yee=h.exports.forwardRef(Wee);var Gee=Yee;function qee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Zee=h.exports.forwardRef(qee);var Qee=Zee;function Jee({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"}))}const Kee=h.exports.forwardRef(Jee);var Xee=Kee;function ete({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25ZM6.75 12h.008v.008H6.75V12Zm0 3h.008v.008H6.75V15Zm0 3h.008v.008H6.75V18Z"}))}const tte=h.exports.forwardRef(ete);var nte=tte;function ate({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"}))}const rte=h.exports.forwardRef(ate);var ste=rte;function ite({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const ote=h.exports.forwardRef(ite);var E1=ote;function lte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.343 3.94c.09-.542.56-.94 1.11-.94h1.093c.55 0 1.02.398 1.11.94l.149.894c.07.424.384.764.78.93.398.164.855.142 1.205-.108l.737-.527a1.125 1.125 0 0 1 1.45.12l.773.774c.39.389.44 1.002.12 1.45l-.527.737c-.25.35-.272.806-.107 1.204.165.397.505.71.93.78l.893.15c.543.09.94.559.94 1.109v1.094c0 .55-.397 1.02-.94 1.11l-.894.149c-.424.07-.764.383-.929.78-.165.398-.143.854.107 1.204l.527.738c.32.447.269 1.06-.12 1.45l-.774.773a1.125 1.125 0 0 1-1.449.12l-.738-.527c-.35-.25-.806-.272-1.203-.107-.398.165-.71.505-.781.929l-.149.894c-.09.542-.56.94-1.11.94h-1.094c-.55 0-1.019-.398-1.11-.94l-.148-.894c-.071-.424-.384-.764-.781-.93-.398-.164-.854-.142-1.204.108l-.738.527c-.447.32-1.06.269-1.45-.12l-.773-.774a1.125 1.125 0 0 1-.12-1.45l.527-.737c.25-.35.272-.806.108-1.204-.165-.397-.506-.71-.93-.78l-.894-.15c-.542-.09-.94-.56-.94-1.109v-1.094c0-.55.398-1.02.94-1.11l.894-.149c.424-.07.765-.383.93-.78.165-.398.143-.854-.108-1.204l-.526-.738a1.125 1.125 0 0 1 .12-1.45l.773-.773a1.125 1.125 0 0 1 1.45-.12l.737.527c.35.25.807.272 1.204.107.397-.165.71-.505.78-.929l.15-.894Z"}),h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const cte=h.exports.forwardRef(lte);var dte=cte;function ute({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 8.25h19.5M2.25 9h19.5m-16.5 5.25h6m-6 2.25h3m-3.75 3h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Z"}))}const fte=h.exports.forwardRef(ute);var mte=fte;function pte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5h3m-6.75 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-15a2.25 2.25 0 0 0-2.25-2.25H6.75A2.25 2.25 0 0 0 4.5 4.5v15a2.25 2.25 0 0 0 2.25 2.25Z"}))}const hte=h.exports.forwardRef(pte);var S9=hte;function gte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75"}))}const bte=h.exports.forwardRef(gte);var yte=bte;function xte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z"}))}const wte=h.exports.forwardRef(xte);var WA=wte;function vte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5.25 8.25h15m-16.5 7.5h15m-1.8-13.5-3.9 19.5m-2.1-19.5-3.9 19.5"}))}const _te=h.exports.forwardRef(vte);var k9=_te;function Nte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 12 8.954-8.955c.44-.439 1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"}))}const Ste=h.exports.forwardRef(Nte);var iw=Ste;function kte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 0 0 2.25-2.25V6.75A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25v10.5A2.25 2.25 0 0 0 4.5 19.5Zm6-10.125a1.875 1.875 0 1 1-3.75 0 1.875 1.875 0 0 1 3.75 0Zm1.294 6.336a6.721 6.721 0 0 1-3.17.789 6.721 6.721 0 0 1-3.168-.789 3.376 3.376 0 0 1 6.338 0Z"}))}const Cte=h.exports.forwardRef(kte);var Ete=Cte;function Tte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 12 3.269 3.125A59.769 59.769 0 0 1 21.485 12 59.768 59.768 0 0 1 3.27 20.875L5.999 12Zm0 0h7.5"}))}const Lte=h.exports.forwardRef(Tte);var Dte=Lte;function Mte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m16.862 4.487 1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L6.832 19.82a4.5 4.5 0 0 1-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 0 1 1.13-1.897L16.863 4.487Zm0 0L19.5 7.125"}))}const Ate=h.exports.forwardRef(Mte);var Ite=Ate;function Ote({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const Pte=h.exports.forwardRef(Ote);var Rte=Pte;function jte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))}const zte=h.exports.forwardRef(jte);var pu=zte;function Fte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.25 6.087c0-.355.186-.676.401-.959.221-.29.349-.634.349-1.003 0-1.036-1.007-1.875-2.25-1.875s-2.25.84-2.25 1.875c0 .369.128.713.349 1.003.215.283.401.604.401.959v0a.64.64 0 0 1-.657.643 48.39 48.39 0 0 1-4.163-.3c.186 1.613.293 3.25.315 4.907a.656.656 0 0 1-.658.663v0c-.355 0-.676-.186-.959-.401a1.647 1.647 0 0 0-1.003-.349c-1.036 0-1.875 1.007-1.875 2.25s.84 2.25 1.875 2.25c.369 0 .713-.128 1.003-.349.283-.215.604-.401.959-.401v0c.31 0 .555.26.532.57a48.039 48.039 0 0 1-.642 5.056c1.518.19 3.058.309 4.616.354a.64.64 0 0 0 .657-.643v0c0-.355-.186-.676-.401-.959a1.647 1.647 0 0 1-.349-1.003c0-1.035 1.008-1.875 2.25-1.875 1.243 0 2.25.84 2.25 1.875 0 .369-.128.713-.349 1.003-.215.283-.4.604-.4.959v0c0 .333.277.599.61.58a48.1 48.1 0 0 0 5.427-.63 48.05 48.05 0 0 0 .582-4.717.532.532 0 0 0-.533-.57v0c-.355 0-.676.186-.959.401-.29.221-.634.349-1.003.349-1.035 0-1.875-1.007-1.875-2.25s.84-2.25 1.875-2.25c.37 0 .713.128 1.003.349.283.215.604.401.96.401v0a.656.656 0 0 0 .658-.663 48.422 48.422 0 0 0-.37-5.36c-1.886.342-3.81.574-5.766.689a.578.578 0 0 1-.61-.58v0Z"}))}const $te=h.exports.forwardRef(Fte);var ow=$te;function Bte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z"}))}const Hte=h.exports.forwardRef(Bte);var lw=Hte;function Ute({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 0 1 0 3.75H5.625a1.875 1.875 0 0 1 0-3.75Z"}))}const Vte=h.exports.forwardRef(Ute);var Wte=Vte;function Yte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"}))}const Gte=h.exports.forwardRef(Yte);var qte=Gte;function Zte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.429 9.75 2.25 12l4.179 2.25m0-4.5 5.571 3 5.571-3m-11.142 0L2.25 7.5 12 2.25l9.75 5.25-4.179 2.25m0 0L21.75 12l-4.179 2.25m0 0 4.179 2.25L12 21.75 2.25 16.5l4.179-2.25m11.142 0-5.571 3-5.571-3"}))}const Qte=h.exports.forwardRef(Zte);var Jte=Qte;function Kte({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25A2.25 2.25 0 0 1 13.5 18v-2.25Z"}))}const Xte=h.exports.forwardRef(Kte);var ene=Xte;function tne({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z"}))}const nne=h.exports.forwardRef(tne);var ane=nne;function rne({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const sne=h.exports.forwardRef(rne);var Ru=sne;function ine({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}const one=h.exports.forwardRef(ine);var lne=one;function cne({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M18 18.72a9.094 9.094 0 0 0 3.741-.479 3 3 0 0 0-4.682-2.72m.94 3.198.001.031c0 .225-.012.447-.037.666A11.944 11.944 0 0 1 12 21c-2.17 0-4.207-.576-5.963-1.584A6.062 6.062 0 0 1 6 18.719m12 0a5.971 5.971 0 0 0-.941-3.197m0 0A5.995 5.995 0 0 0 12 12.75a5.995 5.995 0 0 0-5.058 2.772m0 0a3 3 0 0 0-4.681 2.72 8.986 8.986 0 0 0 3.74.477m.94-3.197a5.971 5.971 0 0 0-.94 3.197M15 6.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Zm6 3a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Zm-13.5 0a2.25 2.25 0 1 1-4.5 0 2.25 2.25 0 0 1 4.5 0Z"}))}const dne=h.exports.forwardRef(cne);var C9=dne;function une({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const fne=h.exports.forwardRef(une);var mne=fne;function pne({title:e,titleId:t,...n},a){return h.exports.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":t},n),e?h.exports.createElement("title",{id:t},e):null,h.exports.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const hne=h.exports.forwardRef(pne);var gne=hne;const bne=[{title:"Dashboard",path:"dashboard",icon:s(ene,{className:"h-6 w-6"})},{title:"Users",path:"user",icon:s(C9,{className:"h-6 w-6"}),sub_categories:[{title:"Hosts",path:"host",icon:s(Fee,{className:"h-6 w-6"})},{title:"Customers",path:"customer",icon:s(lne,{className:"h-6 w-6"})}]},{title:"Devices",path:"device",icon:s(S9,{className:"h-6 w-6"})},{title:"ID Verification",path:"id_verification",icon:s(Ete,{className:"h-6 w-6"})},{title:"Properties",path:"property",icon:s(Hee,{className:"h-6 w-6"}),sub_categories:[{title:"Add-on",path:"property_add_on",icon:s(ow,{className:"h-6 w-6"})}]},{title:"Categories",path:"spaces",icon:s(Jte,{className:"h-6 w-6"}),sub_categories:[{title:"Space",path:"spaces",icon:s(iw,{className:"h-6 w-6"})},{title:"Add-on",path:"add_on",icon:s(ow,{className:"h-6 w-6"})},{title:"Amenity",path:"amenity",icon:s(pu,{className:"h-6 w-6"})}]},{title:"Property Spaces",path:"property_spaces",icon:s(iw,{className:"h-6 w-6"}),sub_categories:[{title:"Images",path:"property_spaces_images",icon:s(Rte,{className:"h-6 w-6"})},{title:"Amenities",path:"property_spaces_amenitites",icon:s(pu,{className:"h-6 w-6"})},{title:"Faqs",path:"property_spaces_faq",icon:s(lw,{className:"h-6 w-6"})}]},{title:"Bookings",path:"booking",icon:s(Ree,{className:"h-6 w-6"}),sub_categories:[{title:"Add-ons",path:"booking_addons",icon:s(ow,{className:"h-6 w-6"})}]},{title:"Payout",path:"payout",icon:s(_9,{className:"h-6 w-6"})},{title:"Payout methods",path:"payout_method",icon:s(mte,{className:"h-6 w-6"})},{title:"Hashtags",path:"hashtag",icon:s(k9,{className:"h-6 w-6"})},{title:"Review",path:"review",icon:s(ane,{className:"h-6 w-6"})},{title:"FAQ",path:"faq",icon:s(lw,{className:"h-6 w-6"})},{title:"Reports",path:"reports",icon:s(Gee,{className:"h-6 w-6"})},{title:"Email",path:"email",icon:s(yte,{className:"h-6 w-6"})},{title:"Notifications",path:"notification",icon:s(Iee,{className:"h-6 w-6"})},{title:"CMS",path:"privacy",icon:s(ste,{className:"h-6 w-6"}),sub_categories:[{title:"Privacy policy",path:"privacy",icon:s(Xee,{className:"h-6 w-6"})},{id:24,title:"Terms & Conditions",path:"terms_and_conditions",icon:s(nte,{className:"h-6 w-6"})},{id:25,title:"Cancellation Policy",path:"cancellation_policy",icon:s(yee,{className:"h-6 w-6"})}]},{title:"Settings",path:"settings",icon:s(dte,{className:"h-6 w-6"})},{title:"Profile",path:"profile",icon:s(mne,{className:"h-6 w-6"})},{title:"Recycle bin",path:"recycle_bin_users",icon:s(Ru,{className:"h-6 w-6"}),sub_categories:[{title:"Users",path:"recycle_bin_users",icon:s(C9,{className:"h-6 w-6"})},{title:"Devices",path:"recycle_bin_devices",icon:s(S9,{className:"h-6 w-6"})},{title:"Properties",path:"recycle_bin_properties",icon:s(N9,{className:"h-6 w-6"})},{title:"Property Addons",path:"recycle_bin_properties_addon",icon:s(C1,{className:"h-6 w-6"})},{title:"Bookings",path:"recycle_bin_booking",icon:s(N9,{className:"h-6 w-6"})},{title:"Booking Addons",path:"recycle_bin_booking_addon",icon:s(C1,{className:"h-6 w-6"})},{title:"Property Spaces",path:"recycle_bin_properties_spaces",icon:s(iw,{className:"h-6 w-6"})},{title:"Space Images",path:"recycle_bin_properties_space_images",icon:s(VA,{className:"h-6 w-6"})},{title:"Space Amenities",path:"recycle_bin_properties_space_amenities",icon:s(pu,{className:"h-6 w-6"})},{title:"Spaces Faqs",path:"recycle_bin_properties_space_faq",icon:s(Wte,{className:"h-6 w-6"})},{title:"Spaces",path:"recycle_bin_spaces",icon:s(qte,{className:"h-6 w-6"})},{title:"Faqs",path:"recycle_bin_faqs",icon:s(lw,{className:"h-6 w-6"})},{title:"Hashtags",path:"recycle_bin_hashtag",icon:s(k9,{className:"h-6 w-6"})},{title:"Payout",path:"recycle_bin_payout",icon:s(_9,{className:"h-6 w-6"})}]}];function yne({fill:e}){return f("svg",{width:"69",height:"25",viewBox:"0 0 69 25",fill:e!=null?e:"black",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M7.95426 19.1764C6.3634 19.1764 4.96896 18.8828 3.77091 18.2957C2.57286 17.7086 1.63995 16.8476 0.972187 15.7125C0.324062 14.5775 0 13.2076 0 11.6029C0 10.0764 0.324062 8.74567 0.972187 7.61063C1.63995 6.47558 2.56304 5.59494 3.74145 4.9687C4.91986 4.3229 6.30448 4 7.89534 4C9.40763 4 10.7333 4.27398 11.8725 4.82193C13.0312 5.35032 13.9249 6.13311 14.5533 7.1703C15.2015 8.18793 15.5255 9.4404 15.5255 10.9277C15.5255 11.1821 15.5157 11.4267 15.4961 11.6616C15.4764 11.8768 15.447 12.0921 15.4077 12.3074H2.03275V10.5461H13.316L12.4911 11.6322C12.5108 11.4365 12.5206 11.2506 12.5206 11.0745C12.5206 10.8788 12.5206 10.6831 12.5206 10.4874C12.5206 9.13707 12.1278 8.13901 11.3422 7.49321C10.5762 6.82783 9.40763 6.49515 7.83642 6.49515C6.08844 6.49515 4.84129 6.89633 4.09497 7.69869C3.34864 8.50105 2.97548 9.65567 2.97548 11.1625V11.9258C2.97548 13.4522 3.34864 14.6166 4.09497 15.419C4.84129 16.2213 6.09826 16.6225 7.86588 16.6225C9.39781 16.6225 10.4977 16.3877 11.1654 15.918C11.8528 15.4288 12.1965 14.7536 12.1965 13.8925V13.6577H15.3782V13.9219C15.3782 14.9591 15.0542 15.8789 14.406 16.6812C13.7776 17.464 12.9036 18.0805 11.7841 18.5306C10.6842 18.9611 9.40763 19.1764 7.95426 19.1764Z"}),s("path",{d:"M21.6795 18.8828H18.4978V4.29355H21.4143V8.43256L21.6795 8.57933V18.8828ZM21.6795 10.6929H20.9724V8.22707H21.6206C21.7581 7.42471 22.033 6.71042 22.4455 6.08418C22.8579 5.43838 23.4078 4.92957 24.0952 4.55774C24.8023 4.18591 25.6566 4 26.6583 4C27.7778 4 28.691 4.23484 29.3981 4.70451C30.1051 5.17419 30.6158 5.80042 30.93 6.58321C31.2639 7.366 31.4308 8.21729 31.4308 9.13707V11.0451H28.2786V9.75352C28.2786 8.69675 28.0429 7.92374 27.5715 7.4345C27.1002 6.94525 26.3146 6.70063 25.2147 6.70063C23.9577 6.70063 23.0543 7.0431 22.5044 7.72804C21.9545 8.41299 21.6795 9.40126 21.6795 10.6929Z"}),s("path",{d:"M41.7076 24.1667C40.2542 24.1667 38.9776 23.9416 37.8778 23.4915C36.7779 23.061 35.9138 22.4347 35.2853 21.6128C34.6764 20.7909 34.372 19.7928 34.372 18.6186H37.5243C37.5243 19.3231 37.6716 19.8907 37.9662 20.3212C38.2608 20.7517 38.7223 21.0551 39.3508 21.2312C39.9989 21.4269 40.8434 21.5247 41.8844 21.5247C43.0038 21.5247 43.8877 21.3975 44.5358 21.1431C45.2035 20.9083 45.6847 20.4875 45.9793 19.8809C46.2739 19.2742 46.4212 18.4327 46.4212 17.3564V8.81417L46.6569 8.60868V4.29355H49.5735V17.1803C49.5735 18.8045 49.2494 20.1255 48.6013 21.1431C47.9532 22.1803 47.0399 22.9436 45.8615 23.4328C44.6831 23.922 43.2984 24.1667 41.7076 24.1667ZM40.3819 17.5619C38.9285 17.5619 37.6814 17.2781 36.6404 16.7106C35.6192 16.1431 34.8237 15.3505 34.2542 14.3328C33.7042 13.3152 33.4293 12.1312 33.4293 10.7809C33.4293 9.43062 33.7141 8.24664 34.2836 7.22901C34.8728 6.21139 35.6977 5.41881 36.7583 4.85129C37.8385 4.28376 39.1151 4 40.5881 4C42.12 4 43.4163 4.34247 44.4769 5.02741C45.5571 5.69279 46.2248 6.66149 46.4802 7.93353H47.1577L46.981 10.4874H46.4212C46.4212 9.66545 46.2248 8.98051 45.832 8.43256C45.4392 7.86503 44.8795 7.44428 44.1528 7.1703C43.4261 6.89633 42.5423 6.75934 41.5014 6.75934C40.4997 6.75934 39.6257 6.88654 38.8794 7.14095C38.1527 7.39536 37.593 7.81611 37.2002 8.4032C36.827 8.97073 36.6404 9.7633 36.6404 10.7809C36.6404 11.779 36.827 12.5716 37.2002 13.1587C37.5733 13.7458 38.1135 14.1763 38.8205 14.4503C39.5472 14.7047 40.4113 14.8319 41.413 14.8319C43.0235 14.8319 44.2608 14.4992 45.125 13.8338C45.9891 13.1684 46.4212 12.19 46.4212 10.8983H46.981V13.7751H46.215C45.9597 14.8906 45.341 15.8006 44.359 16.5051C43.377 17.2096 42.0513 17.5619 40.3819 17.5619Z"}),s("path",{d:"M60.5895 19.1764C58.979 19.1764 57.5551 18.8633 56.3178 18.237C55.1001 17.5912 54.1476 16.7008 53.4601 15.5657C52.7924 14.4111 52.4585 13.0902 52.4585 11.6029C52.4585 10.0764 52.7924 8.74567 53.4601 7.61063C54.1476 6.47558 55.1001 5.59494 56.3178 4.9687C57.5551 4.3229 58.979 4 60.5895 4C62.2393 4 63.673 4.3229 64.8907 4.9687C66.1084 5.59494 67.0511 6.47558 67.7189 7.61063C68.4063 8.74567 68.75 10.0764 68.75 11.6029C68.75 13.0902 68.4063 14.4111 67.7189 15.5657C67.0511 16.7008 66.1084 17.5912 64.8907 18.237C63.673 18.8633 62.2393 19.1764 60.5895 19.1764ZM60.5895 16.3583C62.3768 16.3583 63.6632 15.9571 64.4488 15.1548C65.2344 14.3328 65.6272 13.1489 65.6272 11.6029C65.6272 10.0568 65.2344 8.87288 64.4488 8.05095C63.6632 7.20944 62.3768 6.78869 60.5895 6.78869C58.8219 6.78869 57.5453 7.20944 56.7597 8.05095C55.9741 8.87288 55.5813 10.0568 55.5813 11.6029C55.5813 13.1489 55.9741 14.3328 56.7597 15.1548C57.5453 15.9571 58.8219 16.3583 60.5895 16.3583Z"})]})}const xne=()=>{const{state:e,dispatch:t}=R.useContext(we),{dispatch:n,state:a}=h.exports.useContext(Ee),r=je();async function i(){var d;const l=new _e;l.setTable("notification");try{const u=await l.callRestAPI({payload:{status:rr.NOT_ADDRESSED}},"GETALL"),g=(d=u==null?void 0:u.list)==null?void 0:d.filter(y=>Number(y==null?void 0:y.status)==0);t({type:"SET_NOTIFICATION_COUNT",payload:g.length})}catch(u){pe(t,u.message),me(n,u.message)}}function o(){n({type:"SWITCH_TO_HOST"}),t({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a host",btn:"Ok got it"}}),r("/")}function c(){n({type:"SWITCH_TO_CUSTOMER"}),t({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a customer",btn:"Ok got it"}}),r("/")}return h.exports.useEffect(()=>{let l=setInterval(()=>{i()},1e4);return()=>clearInterval(l)},[]),s(Se,{children:s("div",{className:`sidebar-holder overflow-y-auto border-r-4 border-gray-100 ${e.isOpen?"":"open-nav"}`,children:f("div",{className:"sticky top-0 h-fit pb-8",children:[s("div",{className:"mt-4 w-full p-4",children:s("div",{className:"mx-auto w-10/12 text-center text-2xl font-bold text-black",children:s(yne,{fill:"#1D2939"})})}),s("div",{className:"sidebar-list w-full",children:f("ul",{className:"flex flex-wrap",children:[bne.map(l=>l.sub_categories?f("li",{style:{display:"relative"},className:`super-nav relative mx-auto my-auto block w-10/12 list-none justify-between rounded-lg ${l.sub_categories.length>7?"larger":""} ${l.sub_categories.length>2?"large":""} ${l.sub_categories.length<2?"small":""}`,onClick:d=>d.currentTarget.classList.toggle("open"),children:[f(Kd,{to:`/admin/${l.path}`,className:`flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white ${e.path==l.path?"bg-[#1D2939] stroke-white text-white":""}`,children:[s("span",{className:"mr-3",children:l.icon}),s("span",{children:l.title}),s("span",{className:"flex flex-grow justify-end",children:s(EX,{className:"h-4 w-4"})})]}),s("div",{className:"nav-item-dropdown absolute w-full",children:l.sub_categories.map((d,u)=>s("div",{className:"group mx-auto my-auto block w-10/12 list-none justify-between truncate rounded-lg",onClick:g=>g.stopPropagation(),children:f(Kd,{to:`/admin/${d.path}`,className:`flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white ${e.path==d.path?"bg-[#1D2939] stroke-white text-white":""}`,children:[s("span",{className:"mr-3",children:d.icon}),s("span",{children:d.title})]})},u))})]},l.path):l.path=="notification"?s("li",{className:"group relative mx-auto my-auto block w-10/12 list-none justify-between rounded-lg",children:f(Kd,{to:`/admin/${l.path}`,className:`flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white ${e.path==l.path?"bg-[#1D2939] stroke-white text-white":""}`,children:[s("span",{className:"mr-3",children:l.icon}),s("strong",{className:`${e.adminNotificationCount>0?"inline":"hidden"} absolute right-1 flex h-8 w-8 items-center justify-center rounded-full border bg-red-400 px-2 text-xs text-white`,children:e.adminNotificationCount}),s("span",{children:l.title})]})},l.path):s("li",{className:"group mx-auto my-auto block w-10/12 list-none justify-between rounded-lg",children:f(Kd,{to:`/admin/${l.path}`,className:`flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white ${e.path==l.path?"bg-[#1D2939] stroke-white text-white":""}`,children:[s("span",{className:"mr-3",children:l.icon}),s("span",{children:l.title})]})},l.path)),s("li",{className:"group group mx-auto w-10/12 !cursor-pointer list-none rounded-lg",children:f("a",{className:"flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white",onClick:()=>{t({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Are you sure?",modalShowMessage:"You are about to log out.",modalBtnText:"Yes, Log Out"}})},children:[s("span",{className:"mr-3",children:s(vee,{className:"h-6 w-6"})}),s("span",{children:"Logout"})]})}),s("li",{className:"group group mx-auto w-10/12 !cursor-pointer list-none rounded-lg",children:f("a",{className:"flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white",onClick:c,children:[s("span",{className:"mr-3",children:s(v9,{className:"h-6 w-6"})}),s("span",{children:"Switch to customer"})]})}),s("li",{className:"group group mx-auto w-10/12 !cursor-pointer list-none rounded-lg",children:f("a",{className:"flex items-center rounded-lg group-hover:bg-[#1D2939] group-hover:text-white",onClick:o,children:[s("span",{className:"mr-3",children:s(v9,{className:"h-6 w-6"})}),s("span",{children:"Switch to Host"})]})})]})})]})})})},wne=e=>h.exports.createElement("svg",{width:69,height:25,viewBox:"0 0 69 25",fill:" none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M7.95426 19.1764C6.3634 19.1764 4.96896 18.8828 3.77091 18.2957C2.57286 17.7086 1.63995 16.8476 0.972187 15.7125C0.324062 14.5775 0 13.2076 0 11.6029C0 10.0764 0.324062 8.74567 0.972187 7.61063C1.63995 6.47558 2.56304 5.59494 3.74145 4.9687C4.91986 4.3229 6.30448 4 7.89534 4C9.40763 4 10.7333 4.27398 11.8725 4.82193C13.0312 5.35032 13.9249 6.13311 14.5533 7.1703C15.2015 8.18793 15.5255 9.4404 15.5255 10.9277C15.5255 11.1821 15.5157 11.4267 15.4961 11.6616C15.4764 11.8768 15.447 12.0921 15.4077 12.3074H2.03275V10.5461H13.316L12.4911 11.6322C12.5108 11.4365 12.5206 11.2506 12.5206 11.0745C12.5206 10.8788 12.5206 10.6831 12.5206 10.4874C12.5206 9.13707 12.1278 8.13901 11.3422 7.49321C10.5762 6.82783 9.40763 6.49515 7.83642 6.49515C6.08844 6.49515 4.84129 6.89633 4.09497 7.69869C3.34864 8.50105 2.97548 9.65567 2.97548 11.1625V11.9258C2.97548 13.4522 3.34864 14.6166 4.09497 15.419C4.84129 16.2213 6.09826 16.6225 7.86588 16.6225C9.39781 16.6225 10.4977 16.3877 11.1654 15.918C11.8528 15.4288 12.1965 14.7536 12.1965 13.8925V13.6577H15.3782V13.9219C15.3782 14.9591 15.0542 15.8789 14.406 16.6812C13.7776 17.464 12.9036 18.0805 11.7841 18.5306C10.6842 18.9611 9.40763 19.1764 7.95426 19.1764Z"}),h.exports.createElement("path",{d:"M21.6795 18.8828H18.4978V4.29355H21.4143V8.43256L21.6795 8.57933V18.8828ZM21.6795 10.6929H20.9724V8.22707H21.6206C21.7581 7.42471 22.033 6.71042 22.4455 6.08418C22.8579 5.43838 23.4078 4.92957 24.0952 4.55774C24.8023 4.18591 25.6566 4 26.6583 4C27.7778 4 28.691 4.23484 29.3981 4.70451C30.1051 5.17419 30.6158 5.80042 30.93 6.58321C31.2639 7.366 31.4308 8.21729 31.4308 9.13707V11.0451H28.2786V9.75352C28.2786 8.69675 28.0429 7.92374 27.5715 7.4345C27.1002 6.94525 26.3146 6.70063 25.2147 6.70063C23.9577 6.70063 23.0543 7.0431 22.5044 7.72804C21.9545 8.41299 21.6795 9.40126 21.6795 10.6929Z"}),h.exports.createElement("path",{d:"M41.7076 24.1667C40.2542 24.1667 38.9776 23.9416 37.8778 23.4915C36.7779 23.061 35.9138 22.4347 35.2853 21.6128C34.6764 20.7909 34.372 19.7928 34.372 18.6186H37.5243C37.5243 19.3231 37.6716 19.8907 37.9662 20.3212C38.2608 20.7517 38.7223 21.0551 39.3508 21.2312C39.9989 21.4269 40.8434 21.5247 41.8844 21.5247C43.0038 21.5247 43.8877 21.3975 44.5358 21.1431C45.2035 20.9083 45.6847 20.4875 45.9793 19.8809C46.2739 19.2742 46.4212 18.4327 46.4212 17.3564V8.81417L46.6569 8.60868V4.29355H49.5735V17.1803C49.5735 18.8045 49.2494 20.1255 48.6013 21.1431C47.9532 22.1803 47.0399 22.9436 45.8615 23.4328C44.6831 23.922 43.2984 24.1667 41.7076 24.1667ZM40.3819 17.5619C38.9285 17.5619 37.6814 17.2781 36.6404 16.7106C35.6192 16.1431 34.8237 15.3505 34.2542 14.3328C33.7042 13.3152 33.4293 12.1312 33.4293 10.7809C33.4293 9.43062 33.7141 8.24664 34.2836 7.22901C34.8728 6.21139 35.6977 5.41881 36.7583 4.85129C37.8385 4.28376 39.1151 4 40.5881 4C42.12 4 43.4163 4.34247 44.4769 5.02741C45.5571 5.69279 46.2248 6.66149 46.4802 7.93353H47.1577L46.981 10.4874H46.4212C46.4212 9.66545 46.2248 8.98051 45.832 8.43256C45.4392 7.86503 44.8795 7.44428 44.1528 7.1703C43.4261 6.89633 42.5423 6.75934 41.5014 6.75934C40.4997 6.75934 39.6257 6.88654 38.8794 7.14095C38.1527 7.39536 37.593 7.81611 37.2002 8.4032C36.827 8.97073 36.6404 9.7633 36.6404 10.7809C36.6404 11.779 36.827 12.5716 37.2002 13.1587C37.5733 13.7458 38.1135 14.1763 38.8205 14.4503C39.5472 14.7047 40.4113 14.8319 41.413 14.8319C43.0235 14.8319 44.2608 14.4992 45.125 13.8338C45.9891 13.1684 46.4212 12.19 46.4212 10.8983H46.981V13.7751H46.215C45.9597 14.8906 45.341 15.8006 44.359 16.5051C43.377 17.2096 42.0513 17.5619 40.3819 17.5619Z"}),h.exports.createElement("path",{d:"M60.5895 19.1764C58.979 19.1764 57.5551 18.8633 56.3178 18.237C55.1001 17.5912 54.1476 16.7008 53.4601 15.5657C52.7924 14.4111 52.4585 13.0902 52.4585 11.6029C52.4585 10.0764 52.7924 8.74567 53.4601 7.61063C54.1476 6.47558 55.1001 5.59494 56.3178 4.9687C57.5551 4.3229 58.979 4 60.5895 4C62.2393 4 63.673 4.3229 64.8907 4.9687C66.1084 5.59494 67.0511 6.47558 67.7189 7.61063C68.4063 8.74567 68.75 10.0764 68.75 11.6029C68.75 13.0902 68.4063 14.4111 67.7189 15.5657C67.0511 16.7008 66.1084 17.5912 64.8907 18.237C63.673 18.8633 62.2393 19.1764 60.5895 19.1764ZM60.5895 16.3583C62.3768 16.3583 63.6632 15.9571 64.4488 15.1548C65.2344 14.3328 65.6272 13.1489 65.6272 11.6029C65.6272 10.0568 65.2344 8.87288 64.4488 8.05095C63.6632 7.20944 62.3768 6.78869 60.5895 6.78869C58.8219 6.78869 57.5453 7.20944 56.7597 8.05095C55.9741 8.87288 55.5813 10.0568 55.5813 11.6029C55.5813 13.1489 55.9741 14.3328 56.7597 15.1548C57.5453 15.9571 58.8219 16.3583 60.5895 16.3583Z"})),vne=({className:e="",fill:t,id:n,onClick:a,onKeyUp:r})=>s(wne,{id:n,className:`${e||""} ${t||""}`,onClick:a,onKeyUp:r}),_ne=e=>h.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M12.3333 13.1667L16.5 9M16.5 9L12.3333 4.83333M16.5 9H6.5M6.5 1.5H5.5C4.09987 1.5 3.3998 1.5 2.86502 1.77248C2.39462 2.01217 2.01217 2.39462 1.77248 2.86502C1.5 3.3998 1.5 4.09987 1.5 5.5V12.5C1.5 13.9001 1.5 14.6002 1.77248 15.135C2.01217 15.6054 2.39462 15.9878 2.86502 16.2275C3.3998 16.5 4.09987 16.5 5.5 16.5H6.5",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Nne=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(_ne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),Sne=e=>h.exports.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M19 10V14.2C19 15.8802 19 16.7202 18.673 17.362C18.3854 17.9265 17.9265 18.3854 17.362 18.673C16.7202 19 15.8802 19 14.2 19H5.8C4.11984 19 3.27976 19 2.63803 18.673C2.07354 18.3854 1.6146 17.9265 1.32698 17.362C1 16.7202 1 15.8802 1 14.2V10M14 5L10 1M10 1L6 5M10 1V13",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),kne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"one":return s(Sne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Cne=e=>h.exports.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M8.4 3H4.6C4.03995 3 3.75992 3 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3 3.75992 3 4.03995 3 4.6V8.4C3 8.96005 3 9.24008 3.10899 9.45399C3.20487 9.64215 3.35785 9.79513 3.54601 9.89101C3.75992 10 4.03995 10 4.6 10H8.4C8.96005 10 9.24008 10 9.45399 9.89101C9.64215 9.79513 9.79513 9.64215 9.89101 9.45399C10 9.24008 10 8.96005 10 8.4V4.6C10 4.03995 10 3.75992 9.89101 3.54601C9.79513 3.35785 9.64215 3.20487 9.45399 3.10899C9.24008 3 8.96005 3 8.4 3Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M19.4 3H15.6C15.0399 3 14.7599 3 14.546 3.10899C14.3578 3.20487 14.2049 3.35785 14.109 3.54601C14 3.75992 14 4.03995 14 4.6V8.4C14 8.96005 14 9.24008 14.109 9.45399C14.2049 9.64215 14.3578 9.79513 14.546 9.89101C14.7599 10 15.0399 10 15.6 10H19.4C19.9601 10 20.2401 10 20.454 9.89101C20.6422 9.79513 20.7951 9.64215 20.891 9.45399C21 9.24008 21 8.96005 21 8.4V4.6C21 4.03995 21 3.75992 20.891 3.54601C20.7951 3.35785 20.6422 3.20487 20.454 3.10899C20.2401 3 19.9601 3 19.4 3Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M19.4 14H15.6C15.0399 14 14.7599 14 14.546 14.109C14.3578 14.2049 14.2049 14.3578 14.109 14.546C14 14.7599 14 15.0399 14 15.6V19.4C14 19.9601 14 20.2401 14.109 20.454C14.2049 20.6422 14.3578 20.7951 14.546 20.891C14.7599 21 15.0399 21 15.6 21H19.4C19.9601 21 20.2401 21 20.454 20.891C20.6422 20.7951 20.7951 20.6422 20.891 20.454C21 20.2401 21 19.9601 21 19.4V15.6C21 15.0399 21 14.7599 20.891 14.546C20.7951 14.3578 20.6422 14.2049 20.454 14.109C20.2401 14 19.9601 14 19.4 14Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M8.4 14H4.6C4.03995 14 3.75992 14 3.54601 14.109C3.35785 14.2049 3.20487 14.3578 3.10899 14.546C3 14.7599 3 15.0399 3 15.6V19.4C3 19.9601 3 20.2401 3.10899 20.454C3.20487 20.6422 3.35785 20.7951 3.54601 20.891C3.75992 21 4.03995 21 4.6 21H8.4C8.96005 21 9.24008 21 9.45399 20.891C9.64215 20.7951 9.79513 20.6422 9.89101 20.454C10 20.2401 10 19.9601 10 19.4V15.6C10 15.0399 10 14.7599 9.89101 14.546C9.79513 14.3578 9.64215 14.2049 9.45399 14.109C9.24008 14 8.96005 14 8.4 14Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ene=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"one":return s(Cne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Tne=e=>h.exports.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M3.00002 20.8174C3.6026 21 4.41649 21 5.8 21H16.2C17.5835 21 18.3974 21 19 20.8174M3.00002 20.8174C2.87082 20.7783 2.75133 20.7308 2.63803 20.673C2.07354 20.3854 1.6146 19.9265 1.32698 19.362C1 18.7202 1 17.8802 1 16.2V5.8C1 4.11984 1 3.27976 1.32698 2.63803C1.6146 2.07354 2.07354 1.6146 2.63803 1.32698C3.27976 1 4.11984 1 5.8 1H16.2C17.8802 1 18.7202 1 19.362 1.32698C19.9265 1.6146 20.3854 2.07354 20.673 2.63803C21 3.27976 21 4.11984 21 5.8V16.2C21 17.8802 21 18.7202 20.673 19.362C20.3854 19.9265 19.9265 20.3854 19.362 20.673C19.2487 20.7308 19.1292 20.7783 19 20.8174M3.00002 20.8174C3.00035 20.0081 3.00521 19.5799 3.07686 19.2196C3.39249 17.6329 4.63288 16.3925 6.21964 16.0769C6.60603 16 7.07069 16 8 16H14C14.9293 16 15.394 16 15.7804 16.0769C17.3671 16.3925 18.6075 17.6329 18.9231 19.2196C18.9948 19.5799 18.9996 20.0081 19 20.8174M15 8.5C15 10.7091 13.2091 12.5 11 12.5C8.79086 12.5 7 10.7091 7 8.5C7 6.29086 8.79086 4.5 11 4.5C13.2091 4.5 15 6.29086 15 8.5Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Lne=e=>h.exports.createElement("svg",{width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M4.3163 18.4384C4.92462 17.0052 6.34492 16 8 16H14C15.6551 16 17.0754 17.0052 17.6837 18.4384M15 8.5C15 10.7091 13.2091 12.5 11 12.5C8.79086 12.5 7 10.7091 7 8.5C7 6.29086 8.79086 4.5 11 4.5C13.2091 4.5 15 6.29086 15 8.5ZM21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Dne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"square":return s(Tne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"circle":return s(Lne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Mne=e=>h.exports.createElement("svg",{width:22,height:20,viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M3.27209 18.7279L9.86863 12.1314C10.2646 11.7354 10.4627 11.5373 10.691 11.4632C10.8918 11.3979 11.1082 11.3979 11.309 11.4632C11.5373 11.5373 11.7354 11.7354 12.1314 12.1314L18.6839 18.6839M13 13L15.8686 10.1314C16.2646 9.73535 16.4627 9.53735 16.691 9.46316C16.8918 9.3979 17.1082 9.3979 17.309 9.46316C17.5373 9.53735 17.7354 9.73535 18.1314 10.1314L21 13M9 7C9 8.10457 8.10457 9 7 9C5.89543 9 5 8.10457 5 7C5 5.89543 5.89543 5 7 5C8.10457 5 9 5.89543 9 7ZM5.8 19H16.2C17.8802 19 18.7202 19 19.362 18.673C19.9265 18.3854 20.3854 17.9265 20.673 17.362C21 16.7202 21 15.8802 21 14.2V5.8C21 4.11984 21 3.27976 20.673 2.63803C20.3854 2.07354 19.9265 1.6146 19.362 1.32698C18.7202 1 17.8802 1 16.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V14.2C1 15.8802 1 16.7202 1.32698 17.362C1.6146 17.9265 2.07354 18.3854 2.63803 18.673C3.27976 19 4.11984 19 5.8 19Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Ane=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"three":return s(Mne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Ine=e=>h.exports.createElement("svg",{width:22,height:18,viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M5 8V12M17 6V10M16 1C18.4487 1 19.7731 1.37476 20.4321 1.66544C20.5199 1.70415 20.5638 1.72351 20.6904 1.84437C20.7663 1.91682 20.9049 2.12939 20.9405 2.22809C21 2.39274 21 2.48274 21 2.66274V13.4111C21 14.3199 21 14.7743 20.8637 15.0079C20.7251 15.2454 20.5914 15.3559 20.3319 15.4472C20.0769 15.5369 19.562 15.438 18.5322 15.2401C17.8114 15.1017 16.9565 15 16 15C13 15 10 17 6 17C3.55129 17 2.22687 16.6252 1.56788 16.3346C1.48012 16.2958 1.43624 16.2765 1.3096 16.1556C1.23369 16.0832 1.09512 15.8706 1.05947 15.7719C1 15.6073 1 15.5173 1 15.3373L1 4.58885C1 3.68009 1 3.2257 1.13628 2.99214C1.2749 2.75456 1.40859 2.64412 1.66806 2.55281C1.92314 2.46305 2.43803 2.56198 3.46783 2.75985C4.18862 2.89834 5.04348 3 6 3C9 3 12 1 16 1ZM13.5 9C13.5 10.3807 12.3807 11.5 11 11.5C9.61929 11.5 8.5 10.3807 8.5 9C8.5 7.61929 9.61929 6.5 11 6.5C12.3807 6.5 13.5 7.61929 13.5 9Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),One=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"one":return s(Ine,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Pne=e=>h.exports.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M13 19V13.6C13 13.0399 13 12.7599 12.891 12.546C12.7951 12.3578 12.6422 12.2049 12.454 12.109C12.2401 12 11.9601 12 11.4 12H8.6C8.03995 12 7.75992 12 7.54601 12.109C7.35785 12.2049 7.20487 12.3578 7.10899 12.546C7 12.7599 7 13.0399 7 13.6V19M17 19V4.2C17 3.0799 17 2.51984 16.782 2.09202C16.5903 1.71569 16.2843 1.40973 15.908 1.21799C15.4802 1 14.9201 1 13.8 1H6.2C5.07989 1 4.51984 1 4.09202 1.21799C3.71569 1.40973 3.40973 1.71569 3.21799 2.09202C3 2.51984 3 3.0799 3 4.2V19M19 19H1M7.5 6H7.51M12.5 6H12.51M8 6C8 6.27614 7.77614 6.5 7.5 6.5C7.22386 6.5 7 6.27614 7 6C7 5.72386 7.22386 5.5 7.5 5.5C7.77614 5.5 8 5.72386 8 6ZM13 6C13 6.27614 12.7761 6.5 12.5 6.5C12.2239 6.5 12 6.27614 12 6C12 5.72386 12.2239 5.5 12.5 5.5C12.7761 5.5 13 5.72386 13 6Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Rne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"one":return s(Pne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},jne=e=>h.exports.createElement("svg",{width:22,height:20,viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M21 19V17C21 15.1362 19.7252 13.5701 18 13.126M14.5 1.29076C15.9659 1.88415 17 3.32131 17 5C17 6.67869 15.9659 8.11585 14.5 8.70924M16 19C16 17.1362 16 16.2044 15.6955 15.4693C15.2895 14.4892 14.5108 13.7105 13.5307 13.3045C12.7956 13 11.8638 13 10 13H7C5.13623 13 4.20435 13 3.46927 13.3045C2.48915 13.7105 1.71046 14.4892 1.30448 15.4693C1 16.2044 1 17.1362 1 19M12.5 5C12.5 7.20914 10.7091 9 8.5 9C6.29086 9 4.5 7.20914 4.5 5C4.5 2.79086 6.29086 1 8.5 1C10.7091 1 12.5 2.79086 12.5 5Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),zne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"one":return s(jne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Fne=e=>h.exports.createElement("svg",{width:22,height:21,viewBox:"0 0 22 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M8 20V12.6C8 12.0399 8 11.7599 8.109 11.546C8.20487 11.3578 8.35785 11.2049 8.54601 11.109C8.75993 11 9.03995 11 9.6 11H12.4C12.9601 11 13.2401 11 13.454 11.109C13.6422 11.2049 13.7951 11.3578 13.891 11.546C14 11.7599 14 12.0399 14 12.6V20M1 8.5L10.04 1.72C10.3843 1.46181 10.5564 1.33271 10.7454 1.28294C10.9123 1.23902 11.0877 1.23902 11.2546 1.28295C11.4436 1.33271 11.6157 1.46181 11.96 1.72L21 8.5M3 7V16.8C3 17.9201 3 18.4802 3.21799 18.908C3.40974 19.2843 3.7157 19.5903 4.09202 19.782C4.51985 20 5.0799 20 6.2 20H15.8C16.9201 20 17.4802 20 17.908 19.782C18.2843 19.5903 18.5903 19.2843 18.782 18.908C19 18.4802 19 17.9201 19 16.8V7L12.92 2.44C12.2315 1.92361 11.8872 1.66542 11.5091 1.56589C11.1754 1.47804 10.8246 1.47804 10.4909 1.56589C10.1128 1.66542 9.76852 1.92361 9.08 2.44L3 7Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),$ne=e=>h.exports.createElement("svg",{width:20,height:21,viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M6 16H14M9.0177 1.764L2.23539 7.03912C1.78202 7.39175 1.55534 7.56806 1.39203 7.78886C1.24737 7.98444 1.1396 8.20478 1.07403 8.43905C1 8.70352 1 8.9907 1 9.56505V16.8C1 17.9201 1 18.4801 1.21799 18.908C1.40973 19.2843 1.71569 19.5903 2.09202 19.782C2.51984 20 3.07989 20 4.2 20H15.8C16.9201 20 17.4802 20 17.908 19.782C18.2843 19.5903 18.5903 19.2843 18.782 18.908C19 18.4801 19 17.9201 19 16.8V9.56505C19 8.9907 19 8.70352 18.926 8.43905C18.8604 8.20478 18.7526 7.98444 18.608 7.78886C18.4447 7.56806 18.218 7.39175 17.7646 7.03913L10.9823 1.764C10.631 1.49075 10.4553 1.35412 10.2613 1.3016C10.0902 1.25526 9.9098 1.25526 9.73865 1.3016C9.54468 1.35412 9.36902 1.49075 9.0177 1.764Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Bne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"three":return s(Fne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"line":return s($ne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Hne=e=>h.exports.createElement("svg",{width:18,height:22,viewBox:"0 0 18 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M11 1.26953V5.40007C11 5.96012 11 6.24015 11.109 6.45406C11.2049 6.64222 11.3578 6.7952 11.546 6.89108C11.7599 7.00007 12.0399 7.00007 12.6 7.00007H16.7305M6 15L8 17L12.5 12.5M11 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21H12.2C13.8802 21 14.7202 21 15.362 20.673C15.9265 20.3854 16.3854 19.9265 16.673 19.362C17 18.7202 17 17.8802 17 16.2V7L11 1Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Une=e=>h.exports.createElement("svg",{width:18,height:22,viewBox:"0 0 18 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M11 1.26953V5.40007C11 5.96012 11 6.24015 11.109 6.45406C11.2049 6.64222 11.3578 6.7952 11.546 6.89108C11.7599 7.00007 12.0399 7.00007 12.6 7.00007H16.7305M9 17V11M6 14H12M11 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21H12.2C13.8802 21 14.7202 21 15.362 20.673C15.9265 20.3854 16.3854 19.9265 16.673 19.362C17 18.7202 17 17.8802 17 16.2V7L11 1Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Vne=e=>h.exports.createElement("svg",{width:18,height:22,viewBox:"0 0 18 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M11 1.26953V5.40007C11 5.96012 11 6.24015 11.109 6.45406C11.2049 6.64222 11.3578 6.7952 11.546 6.89108C11.7599 7.00007 12.0399 7.00007 12.6 7.00007H16.7305M6.84998 11.0022C7.02617 10.5014 7.37395 10.079 7.83171 9.80998C8.28947 9.54095 8.82767 9.4426 9.35099 9.53237C9.87431 9.62213 10.349 9.89421 10.6909 10.3004C11.0329 10.7066 11.22 11.2207 11.2192 11.7517C11.2192 13.2506 8.97089 14 8.97089 14M9 17H9.01M11 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21H12.2C13.8802 21 14.7202 21 15.362 20.673C15.9265 20.3854 16.3854 19.9265 16.673 19.362C17 18.7202 17 17.8802 17 16.2V7L11 1Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Wne=e=>h.exports.createElement("svg",{width:20,height:22,viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M17 9.5V5.8C17 4.11984 17 3.27976 16.673 2.63803C16.3854 2.07354 15.9265 1.6146 15.362 1.32698C14.7202 1 13.8802 1 12.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21H8.5M19 21L17.5 19.5M18.5 17C18.5 18.933 16.933 20.5 15 20.5C13.067 20.5 11.5 18.933 11.5 17C11.5 15.067 13.067 13.5 15 13.5C16.933 13.5 18.5 15.067 18.5 17Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Yne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"check-three":return s(Hne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"plus-three":return s(Une,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"question-three":return s(Vne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"search-one":return s(Wne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Gne=e=>h.exports.createElement("svg",{width:20,height:22,viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M19 9H1M14 1V5M6 1V5M5.8 21H14.2C15.8802 21 16.7202 21 17.362 20.673C17.9265 20.3854 18.3854 19.9265 18.673 19.362C19 18.7202 19 17.8802 19 16.2V7.8C19 6.11984 19 5.27976 18.673 4.63803C18.3854 4.07354 17.9265 3.6146 17.362 3.32698C16.7202 3 15.8802 3 14.2 3H5.8C4.11984 3 3.27976 3 2.63803 3.32698C2.07354 3.6146 1.6146 4.07354 1.32698 4.63803C1 5.27976 1 6.11984 1 7.8V16.2C1 17.8802 1 18.7202 1.32698 19.362C1.6146 19.9265 2.07354 20.3854 2.63803 20.673C3.27976 21 4.11984 21 5.8 21Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),qne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){default:return s(Gne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Zne=e=>h.exports.createElement("svg",{width:16,height:18,viewBox:"0 0 16 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M1.33325 5.5C1.33325 4.09987 1.33325 3.3998 1.60574 2.86502C1.84542 2.39462 2.22787 2.01217 2.69828 1.77248C3.23306 1.5 3.93312 1.5 5.33325 1.5H10.6666C12.0667 1.5 12.7668 1.5 13.3016 1.77248C13.772 2.01217 14.1544 2.39462 14.3941 2.86502C14.6666 3.3998 14.6666 4.09987 14.6666 5.5V16.5L12.3749 14.8333L10.2916 16.5L7.99992 14.8333L5.70825 16.5L3.62492 14.8333L1.33325 16.5V5.5Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Qne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"booking":return s(Zne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Jne=e=>h.exports.createElement("svg",{width:22,height:18,viewBox:"0 0 22 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M1 4L9.16492 9.71544C9.82609 10.1783 10.1567 10.4097 10.5163 10.4993C10.8339 10.5785 11.1661 10.5785 11.4837 10.4993C11.8433 10.4097 12.1739 10.1783 12.8351 9.71544L21 4M5.8 17H16.2C17.8802 17 18.7202 17 19.362 16.673C19.9265 16.3854 20.3854 15.9265 20.673 15.362C21 14.7202 21 13.8802 21 12.2V5.8C21 4.11984 21 3.27976 20.673 2.63803C20.3854 2.07354 19.9265 1.6146 19.362 1.32698C18.7202 1 17.8802 1 16.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V12.2C1 13.8802 1 14.7202 1.32698 15.362C1.6146 15.9265 2.07354 16.3854 2.63803 16.673C3.27976 17 4.11984 17 5.8 17Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),Kne=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){default:return s(Jne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},Xne=e=>h.exports.createElement("svg",{width:21,height:22,viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M11.0005 14C12.6573 14 14.0005 12.6569 14.0005 11C14.0005 9.34315 12.6573 8 11.0005 8C9.34363 8 8.00049 9.34315 8.00049 11C8.00049 12.6569 9.34363 14 11.0005 14Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M8.28957 18.3711L8.87402 19.6856C9.04776 20.0768 9.3313 20.4093 9.69024 20.6426C10.0492 20.8759 10.4681 21.0001 10.8962 21C11.3244 21.0001 11.7433 20.8759 12.1022 20.6426C12.4612 20.4093 12.7447 20.0768 12.9185 19.6856L13.5029 18.3711C13.711 17.9047 14.0609 17.5159 14.5029 17.26C14.9477 17.0034 15.4622 16.8941 15.9729 16.9478L17.4029 17.1C17.8286 17.145 18.2582 17.0656 18.6396 16.8713C19.021 16.6771 19.3379 16.3763 19.5518 16.0056C19.766 15.635 19.868 15.2103 19.8455 14.7829C19.823 14.3555 19.677 13.9438 19.4251 13.5978L18.5785 12.4344C18.277 12.0171 18.1159 11.5148 18.1185 11C18.1184 10.4866 18.281 9.98635 18.5829 9.57111L19.4296 8.40778C19.6814 8.06175 19.8275 7.65007 19.85 7.22267C19.8725 6.79528 19.7704 6.37054 19.5562 6C19.3423 5.62923 19.0255 5.32849 18.644 5.13423C18.2626 4.93997 17.833 4.86053 17.4074 4.90556L15.9774 5.05778C15.4667 5.11141 14.9521 5.00212 14.5074 4.74556C14.0645 4.48825 13.7144 4.09736 13.5074 3.62889L12.9185 2.31444C12.7447 1.92317 12.4612 1.59072 12.1022 1.3574C11.7433 1.12408 11.3244 0.99993 10.8962 1C10.4681 0.99993 10.0492 1.12408 9.69024 1.3574C9.3313 1.59072 9.04776 1.92317 8.87402 2.31444L8.28957 3.62889C8.0825 4.09736 7.73245 4.48825 7.28957 4.74556C6.84479 5.00212 6.33024 5.11141 5.81957 5.05778L4.38513 4.90556C3.95946 4.86053 3.52987 4.93997 3.14844 5.13423C2.76702 5.32849 2.45014 5.62923 2.23624 6C2.02206 6.37054 1.92002 6.79528 1.94251 7.22267C1.96499 7.65007 2.11103 8.06175 2.36291 8.40778L3.20957 9.57111C3.51151 9.98635 3.67411 10.4866 3.67402 11C3.67411 11.5134 3.51151 12.0137 3.20957 12.4289L2.36291 13.5922C2.11103 13.9382 1.96499 14.3499 1.94251 14.7773C1.92002 15.2047 2.02206 15.6295 2.23624 16C2.45036 16.3706 2.76727 16.6712 3.14864 16.8654C3.53001 17.0596 3.95949 17.1392 4.38513 17.0944L5.81513 16.9422C6.3258 16.8886 6.84034 16.9979 7.28513 17.2544C7.72966 17.511 8.08134 17.902 8.28957 18.3711Z",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),eae=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"two":return s(Xne,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},tae=e=>h.exports.createElement("svg",{width:18,height:14,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M17 7H1M1 7L7 13M1 7L7 1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),nae=e=>h.exports.createElement("svg",{width:18,height:14,viewBox:"0 0 18 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M1 7H17M17 7L11 1M17 7L11 13",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),aae=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"narrow-right":return s(nae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a});case"narrow-left":return s(tae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},rae=e=>h.exports.createElement("svg",{width:14,height:8,viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M1 1L7 7L13 1",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),sae=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"down":return s(rae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},iae=e=>h.exports.createElement("svg",{width:18,height:20,viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M12.3333 5.00008V4.33341C12.3333 3.39999 12.3333 2.93328 12.1517 2.57676C11.9919 2.26316 11.7369 2.00819 11.4233 1.8484C11.0668 1.66675 10.6001 1.66675 9.66667 1.66675H8.33333C7.39991 1.66675 6.9332 1.66675 6.57668 1.8484C6.26308 2.00819 6.00811 2.26316 5.84832 2.57676C5.66667 2.93328 5.66667 3.39999 5.66667 4.33341V5.00008M1.5 5.00008H16.5M14.8333 5.00008V14.3334C14.8333 15.7335 14.8333 16.4336 14.5608 16.9684C14.3212 17.4388 13.9387 17.8212 13.4683 18.0609C12.9335 18.3334 12.2335 18.3334 10.8333 18.3334H7.16667C5.76654 18.3334 5.06647 18.3334 4.53169 18.0609C4.06129 17.8212 3.67883 17.4388 3.43915 16.9684C3.16667 16.4336 3.16667 15.7335 3.16667 14.3334V5.00008",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),oae=({className:e="",id:t,onClick:n,onKeyUp:a,variant:r})=>{switch(r){case"two":return s(iae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a})}},lae=e=>h.exports.createElement("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M11.332 2.00004C11.5071 1.82494 11.715 1.68605 11.9438 1.59129C12.1725 1.49653 12.4177 1.44775 12.6654 1.44775C12.913 1.44775 13.1582 1.49653 13.387 1.59129C13.6157 1.68605 13.8236 1.82494 13.9987 2.00004C14.1738 2.17513 14.3127 2.383 14.4074 2.61178C14.5022 2.84055 14.551 3.08575 14.551 3.33337C14.551 3.58099 14.5022 3.82619 14.4074 4.05497C14.3127 4.28374 14.1738 4.49161 13.9987 4.66671L4.9987 13.6667L1.33203 14.6667L2.33203 11L11.332 2.00004Z",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round"})),cae=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(lae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),dae=e=>h.exports.createElement("svg",{width:17,height:16,viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M8.5 1V15M1.5 8H15.5",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),uae=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(dae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),fae=e=>h.exports.createElement("svg",{width:17,height:2,viewBox:"0 0 17 2",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M1.5 1H15.5",stroke:"black",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),mae=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(fae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),pae=e=>h.exports.createElement("svg",{width:19,height:4,viewBox:"0 0 19 4",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M9.5 3C10.0523 3 10.5 2.55228 10.5 2C10.5 1.44772 10.0523 1 9.5 1C8.94772 1 8.5 1.44772 8.5 2C8.5 2.55228 8.94772 3 9.5 3Z",stroke:"#98A2B3",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M16.5 3C17.0523 3 17.5 2.55228 17.5 2C17.5 1.44772 17.0523 1 16.5 1C15.9477 1 15.5 1.44772 15.5 2C15.5 2.55228 15.9477 3 16.5 3Z",stroke:"#98A2B3",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"}),h.exports.createElement("path",{d:"M2.5 3C3.05228 3 3.5 2.55228 3.5 2C3.5 1.44772 3.05228 1 2.5 1C1.94772 1 1.5 1.44772 1.5 2C1.5 2.55228 1.94772 3 2.5 3Z",stroke:"#98A2B3",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),hae=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(pae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),gae=e=>h.exports.createElement("svg",{width:18,height:18,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},h.exports.createElement("path",{d:"M14.5305 16.3677L14.0759 16.1595C14.0235 16.274 13.9536 16.3632 13.8657 16.4344C13.7965 16.4905 13.717 16.524 13.6123 16.5331C13.5358 16.5398 13.4554 16.5237 13.3567 16.4582L13.3568 16.4581L13.3463 16.4515L9.19625 13.8473L8.93049 13.6805L8.66473 13.8473L4.51473 16.4515L4.51464 16.4513L4.50423 16.4582C4.40555 16.5237 4.32514 16.5398 4.24873 16.5331C4.14394 16.524 4.06449 16.4905 3.99524 16.4344C3.90747 16.3633 3.83772 16.2743 3.7853 16.16C3.75378 16.0908 3.7385 15.9998 3.76856 15.8638C3.76859 15.8636 3.76862 15.8635 3.76865 15.8634L4.86845 10.9424L4.9322 10.6572L4.71496 10.4617L1.04419 7.15819C0.945727 7.06488 0.900968 6.97672 0.883143 6.89047L0.883147 6.89047L0.882745 6.88857C0.859403 6.7778 0.86615 6.67532 0.902553 6.57104C0.945215 6.44883 1.0025 6.3661 1.06731 6.30703C1.10669 6.27113 1.1849 6.22473 1.34132 6.19965L6.17594 5.75835L6.47965 5.73062L6.59401 5.44791L8.46901 0.812492L8.46973 0.810696C8.51654 0.693678 8.57769 0.628401 8.64887 0.586111L8.64959 0.585682C8.75552 0.522513 8.84694 0.5 8.93049 0.5C9.01398 0.5 9.10586 0.522488 9.21263 0.585824C9.28315 0.627946 9.34427 0.693252 9.39125 0.810696L9.39197 0.81249L11.267 5.44791L11.3813 5.73062L11.685 5.75835L16.5197 6.19965C16.6761 6.22473 16.7543 6.27113 16.7937 6.30703C16.8585 6.3661 16.9158 6.44883 16.9584 6.57105C16.995 6.67572 17.0019 6.7786 16.979 6.88955C16.9607 6.97634 16.9153 7.06483 16.8168 7.15818L13.146 10.4617L12.9288 10.6572L12.9925 10.9424L14.0923 15.8634C14.0924 15.8635 14.0924 15.8636 14.0924 15.8637C14.1225 15.9999 14.1072 16.0909 14.0756 16.1602L14.5305 16.3677ZM14.5305 16.3677C14.6138 16.1851 14.6305 15.9809 14.5805 15.7552L3.33049 16.3677C3.41382 16.5497 3.53049 16.7014 3.68049 16.8229C3.83049 16.9444 4.00549 17.0139 4.20549 17.0312C4.40549 17.0486 4.59716 16.9965 4.78049 16.875L8.93049 14.2708L13.0805 16.875C13.2638 16.9965 13.4555 17.0486 13.6555 17.0312C13.8555 17.0139 14.0305 16.9444 14.1805 16.8229C14.3305 16.7014 14.4472 16.5497 14.5305 16.3677Z"})),bae=({className:e="",id:t,onClick:n,onKeyUp:a})=>s(gae,{id:t,className:`${e||""}`,onClick:n,onKeyUp:a}),yae=(e,t,n,a,r,i,o)=>({logo:s(vne,{onClick:r,onKeyUp:i,className:t,fill:a}),logout:s(Nne,{onClick:r,onKeyUp:i,className:t}),pencil:s(cae,{onClick:r,onKeyUp:i,className:t}),share:s(kne,{onClick:r,onKeyUp:i,className:t,variant:o}),grid:s(Ene,{onClick:r,onKeyUp:i,className:t,variant:o}),user:s(Dne,{onClick:r,onKeyUp:i,className:t,variant:o}),image:s(Ane,{onClick:r,onKeyUp:i,className:t,variant:o}),banknote:s(One,{onClick:r,onKeyUp:i,className:t,variant:o}),building:s(Rne,{onClick:r,onKeyUp:i,className:t,variant:o}),users:s(zne,{onClick:r,onKeyUp:i,className:t,variant:o}),home:s(Bne,{onClick:r,onKeyUp:i,className:t,variant:o}),file:s(Yne,{onClick:r,onKeyUp:i,className:t,variant:o}),calender:s(qne,{onClick:r,onKeyUp:i,className:t,variant:o}),receipt:s(Qne,{onClick:r,onKeyUp:i,className:t,variant:o}),mail:s(Kne,{onClick:r,onKeyUp:i,className:t,variant:o}),settings:s(eae,{onClick:r,onKeyUp:i,className:t,variant:o}),arrow:s(aae,{onClick:r,onKeyUp:i,className:t,variant:o}),chevron:s(sae,{onClick:r,onKeyUp:i,className:t,variant:o}),trash:s(oae,{onClick:r,onKeyUp:i,className:t,variant:o}),plus:s(uae,{onClick:r,onKeyUp:i,className:t}),minus:s(mae,{onClick:r,onKeyUp:i,className:t}),dots:s(hae,{onClick:r,onKeyUp:i,className:t}),star:s(bae,{onClick:r,onKeyUp:i,className:t})})[e]||null,ln=({className:e,id:t,fill:n="",onClick:a,onKeyUp:r,type:i,variant:o})=>{const[c,l]=h.exports.useState(null);return h.exports.useEffect(()=>{if(i){const d=i.toLocaleLowerCase().replace(/\s+/g,"");l(yae(d,e,t,n,a,r,o))}},[i,e]),c};function Ft({loading:e,loadingEl:t,children:n,...a}){return s("button",{...a,style:{pointerEvents:e?"none":void 0,cursor:e?"not-allowed":void 0},children:e?t!=null?t:s("div",{className:"flex justify-center",children:s("svg",{style:{margin:"auto",background:"none",display:"block",shapeRendering:"auto"},width:"36px",height:"36px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"10",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(1)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.6666666666666667s",keyTimes:"0;1",values:"0;256.58892822265625"})})})}):s("span",{children:n})})}function xae({modalOpen:e,closeModal:t}){const{dispatch:n}=h.exports.useContext(Ee),[a,r]=h.exports.useState(!1),i=je();async function o(){r(!0);const c=new _e;try{await c.logout(),n({type:"LOGOUT"}),i("/"),t()}catch(l){l.message=="TOKEN_EXPIRED"&&(n({type:"LOGOUT"}),i("/"),t())}r(!1)}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Are you sure"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"Are you sure you want to sign out?"})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:a,type:"button",className:`inline-flex justify-center rounded-md ${a?"py-1 px-6":"py-2 px-4"} login-btn-gradient text-sm font-medium text-white`,onClick:o,children:"Proceed"})]})]})})})})]})})}var wae={attributes:!0,characterData:!0,subtree:!0,childList:!0};function vae(e,t,n=wae){h.exports.useEffect(()=>{if(e.current){const a=new MutationObserver(t);return a.observe(e.current,n),()=>{a.disconnect()}}},[t,n])}var YA=function(){if(typeof Map!="undefined")return Map;function e(t,n){var a=-1;return t.some(function(r,i){return r[0]===n?(a=i,!0):!1}),a}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(n){var a=e(this.__entries__,n),r=this.__entries__[a];return r&&r[1]},t.prototype.set=function(n,a){var r=e(this.__entries__,n);~r?this.__entries__[r][1]=a:this.__entries__.push([n,a])},t.prototype.delete=function(n){var a=this.__entries__,r=e(a,n);~r&&a.splice(r,1)},t.prototype.has=function(n){return!!~e(this.__entries__,n)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(n,a){a===void 0&&(a=null);for(var r=0,i=this.__entries__;r<i.length;r++){var o=i[r];n.call(a,o[1],o[0])}},t}()}(),r4=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,T1=function(){return typeof global!="undefined"&&global.Math===Math?global:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_ae=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(T1):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),Nae=2;function Sae(e,t){var n=!1,a=!1,r=0;function i(){n&&(n=!1,e()),a&&c()}function o(){_ae(i)}function c(){var l=Date.now();if(n){if(l-r<Nae)return;a=!0}else n=!0,a=!1,setTimeout(o,t);r=l}return c}var kae=20,Cae=["top","right","bottom","left","width","height","size","weight"],Eae=typeof MutationObserver!="undefined",Tae=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=Sae(this.refresh.bind(this),kae)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var n=this.observers_,a=n.indexOf(t);~a&&n.splice(a,1),!n.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(n){return n.gatherActive(),n.hasActive()});return t.forEach(function(n){return n.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!r4||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Eae?(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(){!r4||!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(t){var n=t.propertyName,a=n===void 0?"":n,r=Cae.some(function(i){return!!~a.indexOf(i)});r&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),GA=function(e,t){for(var n=0,a=Object.keys(t);n<a.length;n++){var r=a[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},ju=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||T1},qA=wy(0,0,0,0);function L1(e){return parseFloat(e)||0}function E9(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(a,r){var i=e["border-"+r+"-width"];return a+L1(i)},0)}function Lae(e){for(var t=["top","right","bottom","left"],n={},a=0,r=t;a<r.length;a++){var i=r[a],o=e["padding-"+i];n[i]=L1(o)}return n}function Dae(e){var t=e.getBBox();return wy(0,0,t.width,t.height)}function Mae(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return qA;var a=ju(e).getComputedStyle(e),r=Lae(a),i=r.left+r.right,o=r.top+r.bottom,c=L1(a.width),l=L1(a.height);if(a.boxSizing==="border-box"&&(Math.round(c+i)!==t&&(c-=E9(a,"left","right")+i),Math.round(l+o)!==n&&(l-=E9(a,"top","bottom")+o)),!Iae(e)){var d=Math.round(c+i)-t,u=Math.round(l+o)-n;Math.abs(d)!==1&&(c-=d),Math.abs(u)!==1&&(l-=u)}return wy(r.left,r.top,c,l)}var Aae=function(){return typeof SVGGraphicsElement!="undefined"?function(e){return e instanceof ju(e).SVGGraphicsElement}:function(e){return e instanceof ju(e).SVGElement&&typeof e.getBBox=="function"}}();function Iae(e){return e===ju(e).document.documentElement}function Oae(e){return r4?Aae(e)?Dae(e):Mae(e):qA}function Pae(e){var t=e.x,n=e.y,a=e.width,r=e.height,i=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,o=Object.create(i.prototype);return GA(o,{x:t,y:n,width:a,height:r,top:n,right:t+a,bottom:r+n,left:t}),o}function wy(e,t,n,a){return{x:e,y:t,width:n,height:a}}var Rae=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=wy(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=Oae(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),jae=function(){function e(t,n){var a=Pae(n);GA(this,{target:t,contentRect:a})}return e}(),zae=function(){function e(t,n,a){if(this.activeObservations_=[],this.observations_=new YA,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=n,this.callbackCtx_=a}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ju(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(t)||(n.set(t,new Rae(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(t instanceof ju(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;!n.has(t)||(n.delete(t),n.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&t.activeObservations_.push(n)})},e.prototype.broadcastActive=function(){if(!!this.hasActive()){var t=this.callbackCtx_,n=this.activeObservations_.map(function(a){return new jae(a.target,a.broadcastRect())});this.callback_.call(t,n,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),ZA=typeof WeakMap!="undefined"?new WeakMap:new YA,QA=function(){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=Tae.getInstance(),a=new zae(t,n,this);ZA.set(this,a)}return e}();["observe","unobserve","disconnect"].forEach(function(e){QA.prototype[e]=function(){var t;return(t=ZA.get(this))[e].apply(t,arguments)}});var Fae=function(){return typeof T1.ResizeObserver!="undefined"?T1.ResizeObserver:QA}(),$ae=({mutationObservables:e,resizeObservables:t,refresh:n})=>{const[a,r]=h.exports.useState(0),i=h.exports.useRef(document.documentElement||document.body);function o(l){const d=Array.from(l);for(const u of d)if(e){if(!u.attributes)continue;e.find(y=>u.matches(y))&&n(!0)}}function c(l){const d=Array.from(l);for(const u of d)if(t){if(!u.attributes)continue;t.find(y=>u.matches(y))&&r(a+1)}}return vae(i,l=>{for(const d of l)d.addedNodes.length!==0&&(o(d.addedNodes),c(d.addedNodes)),d.removedNodes.length!==0&&(o(d.removedNodes),c(d.removedNodes))},{childList:!0,subtree:!0}),h.exports.useEffect(()=>{if(!t)return;const l=new Fae(()=>{n()});for(const d of t){const u=document.querySelector(d);u&&l.observe(u)}return()=>{l.disconnect()}},[t,a]),null},Bae=$ae;function _g(e){let t=JA;return e&&(t=e.getBoundingClientRect()),t}function Hae(e,t){const[n,a]=h.exports.useState(JA),r=h.exports.useCallback(()=>{!(e!=null&&e.current)||a(_g(e==null?void 0:e.current))},[e==null?void 0:e.current]);return h.exports.useEffect(()=>(r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)),[e==null?void 0:e.current,t]),n}var JA={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0};function Uae(e,t){return new Promise(n=>{if(!(e instanceof Element))throw new TypeError("Argument 1 must be an Element");let a=0,r=null;const i=Object.assign({behavior:"smooth"},t);e.scrollIntoView(i),requestAnimationFrame(o);function o(){const c=e==null?void 0:e.getBoundingClientRect().top;if(c===r){if(a++>2)return n(null)}else a=0,r=c;requestAnimationFrame(o)}})}function v0(e){return e<0?0:e}function Vae(e){return typeof e=="object"&&e!==null?{thresholdX:e.x||0,thresholdY:e.y||0}:{thresholdX:e||0,thresholdY:e||0}}function vy(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);return{w:e,h:t}}function Wae({top:e,right:t,bottom:n,left:a,threshold:r}){const{w:i,h:o}=vy(),{thresholdX:c,thresholdY:l}=Vae(r);return e<0&&n-e>o?!0:e>=0+l&&a>=0+c&&n<=o-l&&t<=i-c}var T9=(e,t)=>e>t,L9=(e,t)=>e>t;function Yae(e,t=[]){const n=(a,r)=>t.includes(a)?1:t.includes(r)?-1:0;return Object.keys(e).map(a=>({position:a,value:e[a]})).sort((a,r)=>r.value-a.value).sort((a,r)=>n(a.position,r.position)).filter(a=>a.value>0).map(a=>a.position)}var cw=10;function s4(e=cw){return Array.isArray(e)?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[1],e[0],e[1],e[0]]:e.length===3?[e[0],e[1],e[2],e[1]]:e.length>3?[e[0],e[1],e[2],e[3]]:[cw,cw]:[e,e,e,e]}var Gae={maskWrapper:()=>({opacity:.7,left:0,top:0,position:"fixed",zIndex:99999,pointerEvents:"none",color:"#000"}),svgWrapper:({windowWidth:e,windowHeight:t,wpt:n,wpl:a})=>({width:e,height:t,left:Number(a),top:Number(n),position:"fixed"}),maskArea:({x:e,y:t,width:n,height:a})=>({x:e,y:t,width:n,height:a,fill:"black",rx:0}),maskRect:({windowWidth:e,windowHeight:t,maskID:n})=>({x:0,y:0,width:e,height:t,fill:"currentColor",mask:`url(#${n})`}),clickArea:({windowWidth:e,windowHeight:t,clipID:n})=>({x:0,y:0,width:e,height:t,fill:"currentcolor",pointerEvents:"auto",clipPath:`url(#${n})`}),highlightedArea:({x:e,y:t,width:n,height:a})=>({x:e,y:t,width:n,height:a,pointerEvents:"auto",fill:"transparent",display:"none"})};function qae(e){return(t,n)=>{const a=Gae[t](n),r=e[t];return r?r(a,n):a}}var Zae=({padding:e=10,wrapperPadding:t=0,onClick:n,onClickHighlighted:a,styles:r={},sizes:i,className:o,highlightedAreaClassName:c,maskId:l,clipId:d})=>{const u=l||D9("mask__"),g=d||D9("clip__"),y=qae(r),[w,v,S,m]=s4(e),[p,b,x,k]=s4(t),{w:N,h:_}=vy(),C=v0((i==null?void 0:i.width)+m+v),E=v0((i==null?void 0:i.height)+w+S),T=v0((i==null?void 0:i.top)-w-p),D=v0((i==null?void 0:i.left)-m-k),P=N-k-b,M=_-p-x,O=y("maskArea",{x:D,y:T,width:C,height:E}),F=y("highlightedArea",{x:D,y:T,width:C,height:E});return R.createElement("div",{style:y("maskWrapper",{}),onClick:n,className:o},R.createElement("svg",{width:P,height:M,xmlns:"http://www.w3.org/2000/svg",style:y("svgWrapper",{windowWidth:P,windowHeight:M,wpt:p,wpl:k})},R.createElement("defs",null,R.createElement("mask",{id:u},R.createElement("rect",{x:0,y:0,width:P,height:M,fill:"white"}),R.createElement("rect",{style:O,rx:O.rx?1:void 0})),R.createElement("clipPath",{id:g},R.createElement("polygon",{points:`0 0, 0 ${M}, ${D} ${M}, ${D} ${T}, ${D+C} ${T}, ${D+C} ${T+E}, ${D} ${T+E}, ${D} ${M}, ${P} ${M}, ${P} 0`}))),R.createElement("rect",{style:y("maskRect",{windowWidth:P,windowHeight:M,maskID:u})}),R.createElement("rect",{style:y("clickArea",{windowWidth:P,windowHeight:M,top:T,left:D,width:C,height:E,clipID:g})}),R.createElement("rect",{style:F,className:c,onClick:a,rx:F.rx?1:void 0})))},Qae=Zae;function D9(e){return e+Math.random().toString(36).substring(2,16)}var Jae=Object.defineProperty,D1=Object.getOwnPropertySymbols,KA=Object.prototype.hasOwnProperty,XA=Object.prototype.propertyIsEnumerable,M9=(e,t,n)=>t in e?Jae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A9=(e,t)=>{for(var n in t||(t={}))KA.call(t,n)&&M9(e,n,t[n]);if(D1)for(var n of D1(t))XA.call(t,n)&&M9(e,n,t[n]);return e},Kae=(e,t)=>{var n={};for(var a in e)KA.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&D1)for(var a of D1(e))t.indexOf(a)<0&&XA.call(e,a)&&(n[a]=e[a]);return n},Xae={popover:()=>({position:"fixed",maxWidth:353,backgroundColor:"#fff",padding:"24px 30px",boxShadow:"0 0.5em 3em rgba(0, 0, 0, 0.3)",color:"inherit",zIndex:1e5,transition:"transform 0.3s",top:0,left:0})};function ere(e){return(t,n)=>{const a=Xae[t](n),r=e[t];return r?r(a,n):a}}var tre=e=>{var t=e,{children:n,position:a="bottom",padding:r=10,styles:i={},sizes:o,refresher:c}=t,l=Kae(t,["children","position","padding","styles","sizes","refresher"]);const d=h.exports.useRef(null),u=h.exports.useRef(""),g=h.exports.useRef(""),y=h.exports.useRef(""),{w,h:v}=vy(),S=ere(i),m=Hae(d,c),{width:p,height:b}=m,[x,k,N,_]=s4(r),C=(o==null?void 0:o.left)-_,E=(o==null?void 0:o.top)-x,T=(o==null?void 0:o.right)+k,D=(o==null?void 0:o.bottom)+N,P=a&&typeof a=="function"?a({width:p,height:b,windowWidth:w,windowHeight:v,top:E,left:C,right:T,bottom:D,x:o.x,y:o.y},m):a,M={left:C,right:w-T,top:E,bottom:v-D},O=(A,j,I)=>{switch(A){case"top":return M.top>b+N;case"right":return j?!1:M.right>p+_;case"bottom":return I?!1:M.bottom>b+x;case"left":return M.left>p+k;default:return!1}},F=(A,j,I)=>{const B=Yae(M,I?["right","left"]:j?["top","bottom"]:[]);for(let Y=0;Y<B.length;Y++)if(O(B[Y],j,I))return u.current=B[Y],A[B[Y]];return u.current="center",A.center},H=(A=>{if(Array.isArray(A)){const W=T9(A[0],w),V=L9(A[1],v);return u.current="custom",[W?w/2-p/2:A[0],V?v/2-b/2:A[1]]}const j=T9(C+p,w),I=L9(D+b,v),B=j?Math.min(C,w-p):Math.max(C,0),Y=I?b>M.bottom?Math.max(D-b,0):Math.max(E,0):E;I&&b>M.bottom?g.current="bottom":g.current="top",j?y.current="left":y.current="right";const U={top:[B-_,E-b-N],right:[T+_,Y-x],bottom:[B-_,D+x],left:[C-p-k,Y-x],center:[w/2-p/2,v/2-b/2]};return A==="center"||O(A,j,I)&&!j&&!I?(u.current=A,U[A]):F(U,j,I)})(P);return s("div",{...A9({className:"reactour__popover",style:A9({transform:`translate(${Math.round(H[0])}px, ${Math.round(H[1])}px)`},S("popover",{position:u.current,verticalAlign:g.current,horizontalAlign:y.current,helperRect:m,targetRect:o})),ref:d},l),children:n})},nre=tre,are=Object.defineProperty,rre=Object.defineProperties,sre=Object.getOwnPropertyDescriptors,M1=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,I9=(e,t,n)=>t in e?are(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ar=(e,t)=>{for(var n in t||(t={}))eI.call(t,n)&&I9(e,n,t[n]);if(M1)for(var n of M1(t))tI.call(t,n)&&I9(e,n,t[n]);return e},uN=(e,t)=>rre(e,sre(t)),mp=(e,t)=>{var n={};for(var a in e)eI.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&M1)for(var a of M1(e))t.indexOf(a)<0&&tI.call(e,a)&&(n[a]=e[a]);return n},ire={bottom:0,height:0,left:0,right:0,top:0,width:0,windowWidth:0,windowHeight:0,x:0,y:0};function ore(e,t={block:"center",behavior:"smooth",inViewThreshold:0}){const[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(!1),[o,c]=h.exports.useState(!1),[l,d]=h.exports.useState(null),[u,g]=h.exports.useState(ire),y=(e==null?void 0:e.selector)instanceof Element?e==null?void 0:e.selector:document.querySelector(e==null?void 0:e.selector),w=h.exports.useCallback(()=>{const S=O9(y,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),m=mp(S,["hasHighligtedElems"]);Object.entries(u).some(([p,b])=>m[p]!==b)&&g(m)},[y,e==null?void 0:e.highlightedSelectors,u]);h.exports.useEffect(()=>(w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)),[y,e==null?void 0:e.highlightedSelectors,l]),h.exports.useEffect(()=>{!Wae(uN(ar({},u),{threshold:t.inViewThreshold}))&&y&&(a(!0),Uae(y,t).then(()=>{r||d(Date.now())}).finally(()=>{a(!1)}))},[u]);const v=h.exports.useCallback(()=>{i(!0);const S=O9(y,e==null?void 0:e.highlightedSelectors,e==null?void 0:e.bypassElem),{hasHighligtedElems:m}=S,p=mp(S,["hasHighligtedElems"]);c(m),g(p),i(!1)},[y,e==null?void 0:e.highlightedSelectors,u]);return{sizes:u,transition:n,target:y,observableRefresher:v,isHighlightingObserved:o}}function O9(e,t=[],n=!0){let a=!1;const{w:r,h:i}=vy();if(!t)return uN(ar({},_g(e)),{windowWidth:r,windowHeight:i,hasHighligtedElems:!1});let o=_g(e),c={bottom:0,height:0,left:r,right:0,top:i,width:0};for(const d of t){const u=document.querySelector(d);if(!u||u.style.display==="none"||u.style.visibility==="hidden")continue;const g=_g(u);a=!0,n||!e?(g.top<c.top&&(c.top=g.top),g.right>c.right&&(c.right=g.right),g.bottom>c.bottom&&(c.bottom=g.bottom),g.left<c.left&&(c.left=g.left),c.width=c.right-c.left,c.height=c.bottom-c.top):(g.top<o.top&&(o.top=g.top),g.right>o.right&&(o.right=g.right),g.bottom>o.bottom&&(o.bottom=g.bottom),g.left<o.left&&(o.left=g.left),o.width=o.right-o.left,o.height=o.bottom-o.top)}const l=n||!e?c.width>0&&c.height>0:!1;return{left:(l?c:o).left,top:(l?c:o).top,right:(l?c:o).right,bottom:(l?c:o).bottom,width:(l?c:o).width,height:(l?c:o).height,windowWidth:r,windowHeight:i,hasHighligtedElems:a,x:o.x,y:o.y}}var lre=({disableKeyboardNavigation:e,setCurrentStep:t,currentStep:n,setIsOpen:a,stepsLength:r,disable:i,rtl:o,clickProps:c,keyboardHandler:l})=>{function d(u){if(u.stopPropagation(),e===!0||i)return;let g,y,w;e&&(g=e.includes("esc"),y=e.includes("right"),w=e.includes("left"));function v(){t(Math.min(n+1,r-1))}function S(){t(Math.max(n-1,0))}l&&typeof l=="function"?l(u,c,{isEscDisabled:g,isRightDisabled:y,isLeftDisabled:w}):(u.keyCode===27&&!g&&(u.preventDefault(),a(!1)),u.keyCode===39&&!y&&(u.preventDefault(),o?S():v()),u.keyCode===37&&!w&&(u.preventDefault(),o?v():S()))}return h.exports.useEffect(()=>(window.addEventListener("keydown",d,!1),()=>{window.removeEventListener("keydown",d)}),[i,t,n]),null},cre=lre,dre={badge:()=>({position:"absolute",fontFamily:"monospace",background:"var(--reactour-accent,#007aff)",height:"1.875em",lineHeight:2,paddingLeft:"0.8125em",paddingRight:"0.8125em",fontSize:"1em",borderRadius:"1.625em",color:"white",textAlign:"center",boxShadow:"0 0.25em 0.5em rgba(0, 0, 0, 0.3)",top:"-0.8125em",left:"-0.8125em"}),controls:()=>({display:"flex",marginTop:24,alignItems:"center",justifyContent:"space-between"}),navigation:()=>({counterReset:"dot",display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"}),button:({disabled:e})=>({display:"block",padding:0,border:0,background:"none",cursor:e?"not-allowed":"pointer"}),arrow:({disabled:e})=>({color:e?"#caccce":"#646464",width:16,height:12,flex:"0 0 16px"}),dot:({current:e,disabled:t,showNumber:n})=>({counterIncrement:"dot",width:8,height:8,border:e?"0":"1px solid #caccce",borderRadius:"100%",padding:0,display:"block",margin:4,transition:"opacity 0.3s, transform 0.3s",cursor:t?"not-allowed":"pointer",transform:`scale(${e?1.25:1})`,color:e?"var(--reactour-accent, #007aff)":"#caccce",background:e?"var(--reactour-accent, #007aff)":"none"}),close:({disabled:e})=>({position:"absolute",top:22,right:22,width:9,height:9,"--rt-close-btn":e?"#caccce":"#5e5e5e","--rt-close-btn-disabled":e?"#caccce":"#000"}),svg:()=>({display:"block"})};function _y(e){return(t,n)=>{const a=dre[t](n),r=e[t];return r?r(a,n):a}}var ure=({styles:e={},children:t})=>{const n=_y(e);return R.createElement("span",{style:n("badge",{})},t)},fre=ure,mre=e=>{var t=e,{styles:n={},onClick:a,disabled:r}=t,i=mp(t,["styles","onClick","disabled"]);const o=_y(n);return R.createElement("button",ar({className:"reactour__close-button",style:ar(ar({},o("button",{})),o("close",{disabled:r})),onClick:a},i),R.createElement("svg",{viewBox:"0 0 9.1 9.1","aria-hidden":!0,role:"presentation",style:ar({},o("svg",{}))},R.createElement("path",{fill:"currentColor",d:"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z"})))},pre=mre,hre=({content:e,setCurrentStep:t,transition:n,isHighlightingObserved:a,currentStep:r,setIsOpen:i})=>typeof e=="function"?e({setCurrentStep:t,transition:n,isHighlightingObserved:a,currentStep:r,setIsOpen:i}):e,gre=hre,bre=({styles:e={},steps:t,setCurrentStep:n,currentStep:a,setIsOpen:r,nextButton:i,prevButton:o,disableDots:c,hideDots:l,hideButtons:d,disableAll:u,rtl:g,Arrow:y=nI})=>{const w=t.length,v=_y(e),S=({onClick:m,kind:p="next",children:b,hideArrow:x})=>{function k(){u||(m&&typeof m=="function"?m():n(p==="next"?Math.min(a+1,w-1):Math.max(a-1,0)))}return R.createElement("button",{style:v("button",{kind:p,disabled:u||(p==="next"?w-1===a:a===0)}),onClick:k,"aria-label":`Go to ${p} step`},x?null:R.createElement(y,{styles:e,inverted:g?p==="prev":p==="next",disabled:u||(p==="next"?w-1===a:a===0)}),b)};return R.createElement("div",{style:v("controls",{}),dir:g?"rtl":"ltr"},d?null:o&&typeof o=="function"?o({Button:S,setCurrentStep:n,currentStep:a,stepsLength:w,setIsOpen:r,steps:t}):R.createElement(S,{kind:"prev"}),l?null:R.createElement("div",{style:v("navigation",{})},Array.from({length:w},(m,p)=>p).map(m=>{var p;return R.createElement("button",{style:v("dot",{current:m===a,disabled:c||u}),onClick:()=>{!c&&!u&&n(m)},key:`navigation_dot_${m}`,"aria-label":((p=t[m])==null?void 0:p.navDotAriaLabel)||`Go to step ${m+1}`})})),d?null:i&&typeof i=="function"?i({Button:S,setCurrentStep:n,currentStep:a,stepsLength:w,setIsOpen:r,steps:t}):R.createElement(S,null))},yre=bre,nI=({styles:e={},inverted:t=!1,disabled:n})=>{const a=_y(e);return R.createElement("svg",{viewBox:"0 0 18.4 14.4",style:a("arrow",{inverted:t,disabled:n})},R.createElement("path",{d:t?"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2":"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeMiterlimit:"10"}))},xre={Badge:fre,Close:pre,Content:gre,Navigation:yre,Arrow:nI},wre=e=>ar(ar({},xre),e),vre=({styles:e,components:t={},badgeContent:n,accessibilityOptions:a,disabledActions:r,onClickClose:i,steps:o,setCurrentStep:c,currentStep:l,transition:d,isHighlightingObserved:u,setIsOpen:g,nextButton:y,prevButton:w,disableDotsNavigation:v,rtl:S,showPrevNextButtons:m=!0,showCloseButton:p=!0,showNavigation:b=!0,showBadge:x=!0,showDots:k=!0,meta:N,setMeta:_,setSteps:C})=>{const E=o[l],{Badge:T,Close:D,Content:P,Navigation:M,Arrow:O}=wre(t),F=n&&typeof n=="function"?n({currentStep:l,totalSteps:o.length,transition:d}):l+1;function z(){r||(i&&typeof i=="function"?i({setCurrentStep:c,setIsOpen:g,currentStep:l,steps:o,meta:N,setMeta:_,setSteps:C}):g(!1))}return R.createElement(R.Fragment,null,x?R.createElement(T,{styles:e},F):null,p?R.createElement(D,{styles:e,"aria-label":a==null?void 0:a.closeButtonAriaLabel,disabled:r,onClick:z}):null,R.createElement(P,{content:E==null?void 0:E.content,setCurrentStep:c,currentStep:l,transition:d,isHighlightingObserved:u,setIsOpen:g}),b?R.createElement(M,{setCurrentStep:c,currentStep:l,setIsOpen:g,steps:o,styles:e,"aria-hidden":!(a!=null&&a.showNavigationScreenReaders),nextButton:y,prevButton:w,disableDots:v,hideButtons:!m,hideDots:!k,disableAll:r,rtl:S,Arrow:O}):null)},_re=vre,Nre=e=>{var t=e,{currentStep:n,setCurrentStep:a,setIsOpen:r,steps:i=[],setSteps:o,styles:c={},scrollSmooth:l,afterOpen:d,beforeClose:u,padding:g=10,position:y,onClickMask:w,onClickHighlighted:v,keyboardHandler:S,className:m="reactour__popover",maskClassName:p="reactour__mask",highlightedMaskClassName:b,clipId:x,maskId:k,disableInteraction:N,disableKeyboardNavigation:_,inViewThreshold:C,disabledActions:E,setDisabledActions:T,disableWhenSelectorFalsy:D,rtl:P,accessibilityOptions:M={closeButtonAriaLabel:"Close Tour",showNavigationScreenReaders:!0},ContentComponent:O,Wrapper:F,meta:z,setMeta:H,onTransition:A=()=>"center"}=t,j=mp(t,["currentStep","setCurrentStep","setIsOpen","steps","setSteps","styles","scrollSmooth","afterOpen","beforeClose","padding","position","onClickMask","onClickHighlighted","keyboardHandler","className","maskClassName","highlightedMaskClassName","clipId","maskId","disableInteraction","disableKeyboardNavigation","inViewThreshold","disabledActions","setDisabledActions","disableWhenSelectorFalsy","rtl","accessibilityOptions","ContentComponent","Wrapper","meta","setMeta","onTransition"]),I;const B=i[n],Y=ar(ar({},c),B==null?void 0:B.styles),{sizes:U,transition:W,observableRefresher:V,isHighlightingObserved:X,target:ne}=ore(B,{block:"center",behavior:l?"smooth":"auto",inViewThreshold:C});h.exports.useEffect(()=>(d&&typeof d=="function"&&d(ne),()=>{u&&typeof u=="function"&&u(ne)}),[]);const{maskPadding:oe,popoverPadding:q,wrapperPadding:te}=kre((I=B==null?void 0:B.padding)!=null?I:g),G={setCurrentStep:a,setIsOpen:r,currentStep:n,setSteps:o,steps:i,setMeta:H,meta:z};function J(){E||(w&&typeof w=="function"?w(G):r(!1))}const K=typeof(B==null?void 0:B.stepInteraction)=="boolean"?!(B!=null&&B.stepInteraction):N?typeof N=="boolean"?N:N(G):!1;h.exports.useEffect(()=>((B==null?void 0:B.action)&&typeof(B==null?void 0:B.action)=="function"&&(B==null||B.action(ne)),(B==null?void 0:B.disableActions)!==void 0&&T(B==null?void 0:B.disableActions),()=>{(B==null?void 0:B.actionAfter)&&typeof(B==null?void 0:B.actionAfter)=="function"&&(B==null||B.actionAfter(ne))}),[B]);const Q=W?A:B!=null&&B.position?B==null?void 0:B.position:y,Z=F||React.Fragment;return B?f(Z,{children:[s(Bae,{mutationObservables:B==null?void 0:B.mutationObservables,resizeObservables:B==null?void 0:B.resizeObservables,refresh:V}),s(cre,{setCurrentStep:a,currentStep:n,setIsOpen:r,stepsLength:i.length,disableKeyboardNavigation:_,disable:E,rtl:P,clickProps:G,keyboardHandler:S}),(!D||ne)&&s(Qae,{sizes:W?Cre:U,onClick:J,styles:ar({highlightedArea:se=>uN(ar({},se),{display:K?"block":"none"})},Y),padding:W?0:oe,highlightedAreaClassName:b,className:p,onClickHighlighted:se=>{se.preventDefault(),se.stopPropagation(),v&&v(se,G)},wrapperPadding:te,clipId:x,maskId:k}),(!D||ne)&&s(nre,{sizes:U,styles:Y,position:Q,padding:q,"aria-labelledby":M==null?void 0:M.ariaLabelledBy,className:m,refresher:n,children:O?s(O,{...ar({styles:Y,setCurrentStep:a,currentStep:n,setIsOpen:r,steps:i,accessibilityOptions:M,disabledActions:E,transition:W,isHighlightingObserved:X,rtl:P},j)}):s(_re,{...ar({styles:Y,setCurrentStep:a,currentStep:n,setIsOpen:r,steps:i,setSteps:o,accessibilityOptions:M,disabledActions:E,transition:W,isHighlightingObserved:X,rtl:P,meta:z,setMeta:H},j)})})]}):null},Sre=Nre;function kre(e){return typeof e=="object"&&e!==null?{maskPadding:e.mask,popoverPadding:e.popover,wrapperPadding:e.wrapper}:{maskPadding:e,popoverPadding:e,wrapperPadding:0}}var Cre={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0},Ere={isOpen:!1,setIsOpen:()=>!1,currentStep:0,setCurrentStep:()=>0,steps:[],setSteps:()=>[],setMeta:()=>"",disabledActions:!1,setDisabledActions:()=>!1,components:{}},aI=R.createContext(Ere),P9=e=>{var t=e,{children:n,defaultOpen:a=!1,startAt:r=0,steps:i,setCurrentStep:o,currentStep:c}=t,l=mp(t,["children","defaultOpen","startAt","steps","setCurrentStep","currentStep"]);const[d,u]=h.exports.useState(a),[g,y]=h.exports.useState(r),[w,v]=h.exports.useState(i),[S,m]=h.exports.useState(""),[p,b]=h.exports.useState(!1),x=ar({isOpen:d,setIsOpen:u,currentStep:c||g,setCurrentStep:o&&typeof o=="function"?o:y,steps:w,setSteps:v,disabledActions:p,setDisabledActions:b,meta:S,setMeta:m},l);return R.createElement(aI.Provider,{value:x},n,d?R.createElement(Sre,ar({},x)):null)};function fN(){return h.exports.useContext(aI)}const Tre=new _e;function i4({variant:e}){var k,N;const{state:t,dispatch:n}=h.exports.useContext(we),{state:a,dispatch:r}=h.exports.useContext(Ee),[i,o]=h.exports.useState(t.unreadMessages),[c,l]=h.exports.useState(window.innerHeight),d=je(),u=h.exports.useRef(null);function g(){r({type:"SWITCH_TO_HOST"}),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a host",btn:"Ok got it"}}),d("/")}function y(){r({type:"SWITCH_TO_ADMIN"}),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as an admin",btn:"Ok got it"}}),d("/admin/dashboard")}function w(){r({type:"SWITCH_TO_CUSTOMER"}),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a customer",btn:"Ok got it"}}),d("/")}async function v(){try{const _=await Tre.getMyRoom();Array.isArray(_.messages)&&n({type:"SET_UNREAD_MESSAGES_COUNT",payload:_.messages.filter(C=>{const E=JSON.parse(C.chat).user_id;return Number(E)!=Number(a.user)}).length}),o(_.messages.filter(C=>{const E=JSON.parse(C.chat).user_id;return Number(E)!=Number(a.user)}).length)}catch(_){me(r,_.message)}}h.exports.useEffect(()=>{v()},[]),h.exports.useEffect(()=>{const _=()=>{l(window.innerHeight)};return window.addEventListener("resize",_),()=>{window.removeEventListener("resize",_)}},[]);const[S,m]=h.exports.useState(!1);function p(_){switch(_){case Rm.PENDING:return"";case Rm.VERIFIED:return"text-green-600";case Rm.REJECTED:return"text-red-600";default:return"text-red-600"}}const{setIsOpen:b}=fN(),x=["Pending Verification","Verified","Not Verified"];return f(Se,{children:[s("div",{className:"z-10 text-black",children:f(jt,{as:"div",className:"relative inline-block text-left",ref:u,children:[s("div",{children:s(jt.Button,{className:"eighth-step pointer-events-auto relative h-[36px] w-[36px] overflow-hidden rounded-full",id:"menu-btn",children:s(ln,{type:"user",fill:"",variant:"circle",className:"my-stroke-"+e})})}),s(ke,{as:h.exports.Fragment,show:t.menuIconOpen||void 0,className:"overflow-y-auto",enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:f(jt.Items,{className:`absolute hidden-scrollbar ${c<720&&c>560&&"max-h-[500px]"} ${c<560&&"max-h-[400px]"} overflow-y-auto right-0 mt-2 w-80 max-w-screen-sm origin-top-right rounded-3xl border bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none`,children:[f("div",{className:"flex flex-col items-center border-b p-4",children:[s("img",{src:t.user.is_photo_approved==rn.APPROVED&&(k=t.user.photo)!=null?k:"/default.png",className:"mb-3 h-[36px] w-[36px] rounded-full object-cover"}),f("h3",{className:"mb-1 font-semibold",children:[t.user.first_name," ",t.user.last_name]}),f("p",{className:"font-thin",children:["You are signed in as ",a.role]}),s("span",{className:p(t.user.verificationStatus),children:(N=x[t.user.verificationStatus])!=null?N:"Not verified"})]}),s(jt.Item,{children:f(Se,{children:[s("div",{className:"block border-b px-4 py-2 md:hidden",children:s("button",{onClick:()=>d("/account/profile"),className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Account & profile"})}),s("div",{className:"px-4 py-2 md:hidden block",children:f($e,{to:"/account/messages",className:"relative -mx-3 flex w-full justify-between items-center rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:["Messages"," ",t.unreadMessages>0&&s("strong",{className:"login-btn-gradient flex h-[23px] w-[23px] items-center justify-center rounded-full border p-2 text-xs text-white",children:t.unreadMessages})]})})]})}),s("div",{className:"hidden border-b px-4 py-2 md:block",children:s(jt.Item,{children:f(Se,{children:[s($e,{to:"/account/my-bookings",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"My bookings"}),f($e,{to:"/account/messages",className:"relative -mx-3 flex w-full justify-between items-center rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:["Messages"," ",t.unreadMessages>0&&s("strong",{className:"login-btn-gradient flex h-[23px] w-[23px] items-center justify-center rounded-full border p-2 text-xs text-white",children:t.unreadMessages})]}),s($e,{to:"/account/reviews",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Reviews"}),a.role=="host"&&s($e,{to:"/account/my-spaces","data-tour":"first-step-2",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"My Spaces"}),s($e,{to:"/account/profile","data-tour":"first-step",className:"first-step -mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Profile"}),s($e,{to:"/account/payments",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Payment"}),s($e,{to:"/account/billing",className:"ninth-step -mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Billing"})]})})}),f("div",{className:"border-t px-4 pt-2 pb-2",children:[s(jt.Item,{children:s("button",{className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",onClick:()=>{n({type:"START_TOUR"}),b(!0)},children:"Help me get started"})}),s(jt.Item,{children:s($e,{to:"/faq",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"FAQs"})}),s(jt.Item,{children:s($e,{to:"/favorites",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Favorites"})}),s(jt.Item,{children:a.role=="customer"?s(Se,{children:a.originalRole!="customer"?s("button",{onClick:g,className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Sign in as host"}):s($e,{to:"/become-a-host",className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Become a host"})}):s("button",{onClick:w,className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Sign in as customer"})}),["superadmin","admin"].includes(a.originalRole)&&s(jt.Item,{children:s("button",{onClick:y,className:"-mx-3 flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",children:"Sign in as admin"})})]}),s("div",{className:"p-1",children:s(jt.Item,{children:s("button",{className:"flex w-full justify-start rounded-pill p-2 px-3 duration-200 hover:bg-gray-200",onClick:()=>m(!0),children:"Sign out"})})})]})})]})}),s(xae,{modalOpen:S,closeModal:()=>m(!1)})]})}const R9=e=>{if(e.startsWith("/account")||e.startsWith("/property")||e.startsWith("/spaces")||e.startsWith("/help"))return"light";switch(e){case"/contact-us":case"/faq":return"white";case"/search":case"/explore":case"/favorites":case"/reset-password":return"light";default:return"transparent"}},Lre=()=>{const{pathname:e}=An(),[t,n]=h.exports.useState(R9(e)),{dispatch:a}=h.exports.useContext(we),{dispatch:r}=h.exports.useContext(Ee),i=je();async function o(){const l=new _e;try{const d=await l.getProfileCustom();a({type:"SET_USER_DATA",payload:d})}catch(d){pe(a,d.message,4e3,"ERROR"),me(r,d.message)}}h.exports.useEffect(()=>{const l=()=>{e=="/"&&(window.scrollY>10?n("white"):n("transparent"))};return window.addEventListener("scroll",l),o(),()=>{window.removeEventListener("scroll",l)}},[e]),h.exports.useEffect(()=>{n(R9(e))},[e]);const c=()=>{console.log("clicked");const l=document.getElementById("save-as-draft");l&&VM.Simulate.click(l)};return e.includes("/login")||e.includes("/signup")?null:f("header",{className:`fixed top-0 left-0 z-50 flex w-screen flex-wrap items-center justify-between py-4 px-4 text-sm duration-500 md:flex-nowrap md:rounded-br-[32px] md:rounded-bl-[32px] md:px-12 header-${t}`,children:[s("nav",{className:"flex gap-6",children:s($e,{to:"/",className:"",children:s(oy,{fill:t=="transparent"||t=="light"?void 0:"#101828"})})}),s(Pu,{className:"hidden md:block"}),f("div",{className:"flex",children:[f("nav",{className:"z-50 inline ",children:[" ",e.startsWith("/account")&&s("button",{className:`self-stretch rounded-sm border px-6 py-[5px] pb-[7px] ${t=="transparent"?"":"border-white"}`,onClick:()=>i("/search?location=&booking_start_time=&max_capacity=&capacity=&size="),children:s("span",{children:"Explore Spaces"})})]}),s("nav",{className:"hidden items-center gap-6 md:flex",children:["/spaces/add/4","/spaces/add/5"].includes(e)||!e.startsWith("/spaces")?f(Se,{children:[" ",s($e,{to:"/contact-us",className:`self-stretch rounded-md px-6 py-[5px] pb-[7px] font-normal my-border-${t}`,children:s("span",{children:"Support"})}),s(i4,{variant:t})]}):s("button",{className:`self-stretch rounded-sm border px-6 py-[5px] pb-[7px] ${t=="transparent"?"":"border-white"}`,onClick:c,children:s("span",{children:"Save as draft"})})})]}),f("nav",{className:"z-50 inline md:hidden",children:[" ",e.startsWith("/spaces")&&e!="/spaces/add/5"&&e!="/spaces/add/4"?s("button",{className:`self-stretch rounded-sm border px-6 py-[5px] pb-[7px] ${t=="transparent"?"":"border-white"}`,onClick:c,children:s("span",{children:"Save as draft"})}):s(i4,{variant:t})]}),s(Pu,{className:"flex w-full justify-center py-4 md:hidden"})]})};function rI(e,t){return function(){return e.apply(t,arguments)}}const{toString:Dre}=Object.prototype,{getPrototypeOf:mN}=Object,Ny=(e=>t=>{const n=Dre.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ii=e=>(e=e.toLowerCase(),t=>Ny(t)===e),Sy=e=>t=>typeof t===e,{isArray:df}=Array,pp=Sy("undefined");function Mre(e){return e!==null&&!pp(e)&&e.constructor!==null&&!pp(e.constructor)&&Cs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const sI=ii("ArrayBuffer");function Are(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&sI(e.buffer),t}const Ire=Sy("string"),Cs=Sy("function"),iI=Sy("number"),ky=e=>e!==null&&typeof e=="object",Ore=e=>e===!0||e===!1,Ng=e=>{if(Ny(e)!=="object")return!1;const t=mN(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Pre=ii("Date"),Rre=ii("File"),jre=ii("Blob"),zre=ii("FileList"),Fre=e=>ky(e)&&Cs(e.pipe),$re=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Cs(e.append)&&((t=Ny(e))==="formdata"||t==="object"&&Cs(e.toString)&&e.toString()==="[object FormData]"))},Bre=ii("URLSearchParams"),[Hre,Ure,Vre,Wre]=["ReadableStream","Request","Response","Headers"].map(ii),Yre=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ah(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let a,r;if(typeof e!="object"&&(e=[e]),df(e))for(a=0,r=e.length;a<r;a++)t.call(null,e[a],a,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let c;for(a=0;a<o;a++)c=i[a],t.call(null,e[c],c,e)}}function oI(e,t){t=t.toLowerCase();const n=Object.keys(e);let a=n.length,r;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const lI=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),cI=e=>!pp(e)&&e!==lI;function o4(){const{caseless:e}=cI(this)&&this||{},t={},n=(a,r)=>{const i=e&&oI(t,r)||r;Ng(t[i])&&Ng(a)?t[i]=o4(t[i],a):Ng(a)?t[i]=o4({},a):df(a)?t[i]=a.slice():t[i]=a};for(let a=0,r=arguments.length;a<r;a++)arguments[a]&&ah(arguments[a],n);return t}const Gre=(e,t,n,{allOwnKeys:a}={})=>(ah(t,(r,i)=>{n&&Cs(r)?e[i]=rI(r,n):e[i]=r},{allOwnKeys:a}),e),qre=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zre=(e,t,n,a)=>{e.prototype=Object.create(t.prototype,a),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Qre=(e,t,n,a)=>{let r,i,o;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!a||a(o,e,t))&&!c[o]&&(t[o]=e[o],c[o]=!0);e=n!==!1&&mN(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jre=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const a=e.indexOf(t,n);return a!==-1&&a===n},Kre=e=>{if(!e)return null;if(df(e))return e;let t=e.length;if(!iI(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Xre=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&mN(Uint8Array)),ese=(e,t)=>{const a=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=a.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},tse=(e,t)=>{let n;const a=[];for(;(n=e.exec(t))!==null;)a.push(n);return a},nse=ii("HTMLFormElement"),ase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,a,r){return a.toUpperCase()+r}),j9=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rse=ii("RegExp"),dI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),a={};ah(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(a[i]=o||r)}),Object.defineProperties(e,a)},sse=e=>{dI(e,(t,n)=>{if(Cs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const a=e[n];if(!!Cs(a)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ise=(e,t)=>{const n={},a=r=>{r.forEach(i=>{n[i]=!0})};return df(e)?a(e):a(String(e).split(t)),n},ose=()=>{},lse=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,dw="abcdefghijklmnopqrstuvwxyz",z9="0123456789",uI={DIGIT:z9,ALPHA:dw,ALPHA_DIGIT:dw+dw.toUpperCase()+z9},cse=(e=16,t=uI.ALPHA_DIGIT)=>{let n="";const{length:a}=t;for(;e--;)n+=t[Math.random()*a|0];return n};function dse(e){return!!(e&&Cs(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const use=e=>{const t=new Array(10),n=(a,r)=>{if(ky(a)){if(t.indexOf(a)>=0)return;if(!("toJSON"in a)){t[r]=a;const i=df(a)?[]:{};return ah(a,(o,c)=>{const l=n(o,r+1);!pp(l)&&(i[c]=l)}),t[r]=void 0,i}}return a};return n(e,0)},fse=ii("AsyncFunction"),mse=e=>e&&(ky(e)||Cs(e))&&Cs(e.then)&&Cs(e.catch);var Re={isArray:df,isArrayBuffer:sI,isBuffer:Mre,isFormData:$re,isArrayBufferView:Are,isString:Ire,isNumber:iI,isBoolean:Ore,isObject:ky,isPlainObject:Ng,isReadableStream:Hre,isRequest:Ure,isResponse:Vre,isHeaders:Wre,isUndefined:pp,isDate:Pre,isFile:Rre,isBlob:jre,isRegExp:rse,isFunction:Cs,isStream:Fre,isURLSearchParams:Bre,isTypedArray:Xre,isFileList:zre,forEach:ah,merge:o4,extend:Gre,trim:Yre,stripBOM:qre,inherits:Zre,toFlatObject:Qre,kindOf:Ny,kindOfTest:ii,endsWith:Jre,toArray:Kre,forEachEntry:ese,matchAll:tse,isHTMLForm:nse,hasOwnProperty:j9,hasOwnProp:j9,reduceDescriptors:dI,freezeMethods:sse,toObjectSet:ise,toCamelCase:ase,noop:ose,toFiniteNumber:lse,findKey:oI,global:lI,isContextDefined:cI,ALPHABET:uI,generateString:cse,isSpecCompliantForm:dse,toJSONObject:use,isAsyncFn:fse,isThenable:mse};function Vt(e,t,n,a,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),a&&(this.request=a),r&&(this.response=r)}Re.inherits(Vt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Re.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const fI=Vt.prototype,mI={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{mI[e]={value:e}});Object.defineProperties(Vt,mI);Object.defineProperty(fI,"isAxiosError",{value:!0});Vt.from=(e,t,n,a,r,i)=>{const o=Object.create(fI);return Re.toFlatObject(e,o,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),Vt.call(o,e.message,t,n,a,r),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};var pse=null;function l4(e){return Re.isPlainObject(e)||Re.isArray(e)}function pI(e){return Re.endsWith(e,"[]")?e.slice(0,-2):e}function F9(e,t,n){return e?e.concat(t).map(function(r,i){return r=pI(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function hse(e){return Re.isArray(e)&&!e.some(l4)}const gse=Re.toFlatObject(Re,{},null,function(t){return/^is[A-Z]/.test(t)});function Cy(e,t,n){if(!Re.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Re.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,m){return!Re.isUndefined(m[S])});const a=n.metaTokens,r=n.visitor||u,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&Re.isSpecCompliantForm(t);if(!Re.isFunction(r))throw new TypeError("visitor must be a function");function d(v){if(v===null)return"";if(Re.isDate(v))return v.toISOString();if(!l&&Re.isBlob(v))throw new Vt("Blob is not supported. Use a Buffer instead.");return Re.isArrayBuffer(v)||Re.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,S,m){let p=v;if(v&&!m&&typeof v=="object"){if(Re.endsWith(S,"{}"))S=a?S:S.slice(0,-2),v=JSON.stringify(v);else if(Re.isArray(v)&&hse(v)||(Re.isFileList(v)||Re.endsWith(S,"[]"))&&(p=Re.toArray(v)))return S=pI(S),p.forEach(function(x,k){!(Re.isUndefined(x)||x===null)&&t.append(o===!0?F9([S],k,i):o===null?S:S+"[]",d(x))}),!1}return l4(v)?!0:(t.append(F9(m,S,i),d(v)),!1)}const g=[],y=Object.assign(gse,{defaultVisitor:u,convertValue:d,isVisitable:l4});function w(v,S){if(!Re.isUndefined(v)){if(g.indexOf(v)!==-1)throw Error("Circular reference detected in "+S.join("."));g.push(v),Re.forEach(v,function(p,b){(!(Re.isUndefined(p)||p===null)&&r.call(t,p,Re.isString(b)?b.trim():b,S,y))===!0&&w(p,S?S.concat(b):[b])}),g.pop()}}if(!Re.isObject(e))throw new TypeError("data must be an object");return w(e),t}function $9(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(a){return t[a]})}function pN(e,t){this._pairs=[],e&&Cy(e,this,t)}const hI=pN.prototype;hI.append=function(t,n){this._pairs.push([t,n])};hI.toString=function(t){const n=t?function(a){return t.call(this,a,$9)}:$9;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function bse(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gI(e,t,n){if(!t)return e;const a=n&&n.encode||bse,r=n&&n.serialize;let i;if(r?i=r(t,n):i=Re.isURLSearchParams(t)?t.toString():new pN(t,n).toString(a),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class yse{constructor(){this.handlers=[]}use(t,n,a){return this.handlers.push({fulfilled:t,rejected:n,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Re.forEach(this.handlers,function(a){a!==null&&t(a)})}}var B9=yse,bI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xse=typeof URLSearchParams!="undefined"?URLSearchParams:pN,wse=typeof FormData!="undefined"?FormData:null,vse=typeof Blob!="undefined"?Blob:null,_se={isBrowser:!0,classes:{URLSearchParams:xse,FormData:wse,Blob:vse},protocols:["http","https","file","blob","url","data"]};const hN=typeof window!="undefined"&&typeof document!="undefined",Nse=(e=>hN&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator!="undefined"&&navigator.product),Sse=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),kse=hN&&window.location.href||"http://localhost";var Cse=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hN,hasStandardBrowserWebWorkerEnv:Sse,hasStandardBrowserEnv:Nse,origin:kse},Symbol.toStringTag,{value:"Module"})),Js={...Cse,..._se};function Ese(e,t){return Cy(e,new Js.classes.URLSearchParams,Object.assign({visitor:function(n,a,r,i){return Js.isNode&&Re.isBuffer(n)?(this.append(a,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Tse(e){return Re.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Lse(e){const t={},n=Object.keys(e);let a;const r=n.length;let i;for(a=0;a<r;a++)i=n[a],t[i]=e[i];return t}function yI(e){function t(n,a,r,i){let o=n[i++];if(o==="__proto__")return!0;const c=Number.isFinite(+o),l=i>=n.length;return o=!o&&Re.isArray(r)?r.length:o,l?(Re.hasOwnProp(r,o)?r[o]=[r[o],a]:r[o]=a,!c):((!r[o]||!Re.isObject(r[o]))&&(r[o]=[]),t(n,a,r[o],i)&&Re.isArray(r[o])&&(r[o]=Lse(r[o])),!c)}if(Re.isFormData(e)&&Re.isFunction(e.entries)){const n={};return Re.forEachEntry(e,(a,r)=>{t(Tse(a),r,n,0)}),n}return null}function Dse(e,t,n){if(Re.isString(e))try{return(t||JSON.parse)(e),Re.trim(e)}catch(a){if(a.name!=="SyntaxError")throw a}return(n||JSON.stringify)(e)}const gN={transitional:bI,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const a=n.getContentType()||"",r=a.indexOf("application/json")>-1,i=Re.isObject(t);if(i&&Re.isHTMLForm(t)&&(t=new FormData(t)),Re.isFormData(t))return r?JSON.stringify(yI(t)):t;if(Re.isArrayBuffer(t)||Re.isBuffer(t)||Re.isStream(t)||Re.isFile(t)||Re.isBlob(t)||Re.isReadableStream(t))return t;if(Re.isArrayBufferView(t))return t.buffer;if(Re.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Ese(t,this.formSerializer).toString();if((c=Re.isFileList(t))||a.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Cy(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),Dse(t)):t}],transformResponse:[function(t){const n=this.transitional||gN.transitional,a=n&&n.forcedJSONParsing,r=this.responseType==="json";if(Re.isResponse(t)||Re.isReadableStream(t))return t;if(t&&Re.isString(t)&&(a&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(o)throw c.name==="SyntaxError"?Vt.from(c,Vt.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Js.classes.FormData,Blob:Js.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Re.forEach(["delete","get","head","post","put","patch"],e=>{gN.headers[e]={}});var bN=gN;const Mse=Re.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var Ase=e=>{const t={};let n,a,r;return e&&e.split(`
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),a=o.substring(r+1).trim(),!(!n||t[n]&&Mse[n])&&(n==="set-cookie"?t[n]?t[n].push(a):t[n]=[a]:t[n]=t[n]?t[n]+", "+a:a)}),t};const H9=Symbol("internals");function em(e){return e&&String(e).trim().toLowerCase()}function Sg(e){return e===!1||e==null?e:Re.isArray(e)?e.map(Sg):String(e)}function Ise(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=n.exec(e);)t[a[1]]=a[2];return t}const Ose=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uw(e,t,n,a,r){if(Re.isFunction(a))return a.call(this,t,n);if(r&&(t=n),!!Re.isString(t)){if(Re.isString(a))return t.indexOf(a)!==-1;if(Re.isRegExp(a))return a.test(t)}}function Pse(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,a)=>n.toUpperCase()+a)}function Rse(e,t){const n=Re.toCamelCase(" "+t);["get","set","has"].forEach(a=>{Object.defineProperty(e,a+n,{value:function(r,i,o){return this[a].call(this,t,r,i,o)},configurable:!0})})}class Ey{constructor(t){t&&this.set(t)}set(t,n,a){const r=this;function i(c,l,d){const u=em(l);if(!u)throw new Error("header name must be a non-empty string");const g=Re.findKey(r,u);(!g||r[g]===void 0||d===!0||d===void 0&&r[g]!==!1)&&(r[g||l]=Sg(c))}const o=(c,l)=>Re.forEach(c,(d,u)=>i(d,u,l));if(Re.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Re.isString(t)&&(t=t.trim())&&!Ose(t))o(Ase(t),n);else if(Re.isHeaders(t))for(const[c,l]of t.entries())i(l,c,a);else t!=null&&i(n,t,a);return this}get(t,n){if(t=em(t),t){const a=Re.findKey(this,t);if(a){const r=this[a];if(!n)return r;if(n===!0)return Ise(r);if(Re.isFunction(n))return n.call(this,r,a);if(Re.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=em(t),t){const a=Re.findKey(this,t);return!!(a&&this[a]!==void 0&&(!n||uw(this,this[a],a,n)))}return!1}delete(t,n){const a=this;let r=!1;function i(o){if(o=em(o),o){const c=Re.findKey(a,o);c&&(!n||uw(a,a[c],c,n))&&(delete a[c],r=!0)}}return Re.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let a=n.length,r=!1;for(;a--;){const i=n[a];(!t||uw(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,a={};return Re.forEach(this,(r,i)=>{const o=Re.findKey(a,i);if(o){n[o]=Sg(r),delete n[i];return}const c=t?Pse(i):String(i).trim();c!==i&&delete n[i],n[c]=Sg(r),a[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Re.forEach(this,(a,r)=>{a!=null&&a!==!1&&(n[r]=t&&Re.isArray(a)?a.join(", "):a)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const a=new this(t);return n.forEach(r=>a.set(r)),a}static accessor(t){const a=(this[H9]=this[H9]={accessors:{}}).accessors,r=this.prototype;function i(o){const c=em(o);a[c]||(Rse(r,o),a[c]=!0)}return Re.isArray(t)?t.forEach(i):i(t),this}}Ey.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Re.reduceDescriptors(Ey.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(a){this[n]=a}}});Re.freezeMethods(Ey);var Ks=Ey;function fw(e,t){const n=this||bN,a=t||n,r=Ks.from(a.headers);let i=a.data;return Re.forEach(e,function(c){i=c.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function xI(e){return!!(e&&e.__CANCEL__)}function uf(e,t,n){Vt.call(this,e==null?"canceled":e,Vt.ERR_CANCELED,t,n),this.name="CanceledError"}Re.inherits(uf,Vt,{__CANCEL__:!0});function wI(e,t,n){const a=n.config.validateStatus;!n.status||!a||a(n.status)?e(n):t(new Vt("Request failed with status code "+n.status,[Vt.ERR_BAD_REQUEST,Vt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function jse(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function zse(e,t){e=e||10;const n=new Array(e),a=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const d=Date.now(),u=a[i];o||(o=d),n[r]=l,a[r]=d;let g=i,y=0;for(;g!==r;)y+=n[g++],g=g%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-o<t)return;const w=u&&d-u;return w?Math.round(y*1e3/w):void 0}}function Fse(e,t){let n=0;const a=1e3/t;let r=null;return function(){const o=this===!0,c=Date.now();if(o||c-n>a)return r&&(clearTimeout(r),r=null),n=c,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,n=Date.now(),e.apply(null,arguments)),a-(c-n)))}}var A1=(e,t,n=3)=>{let a=0;const r=zse(50,250);return Fse(i=>{const o=i.loaded,c=i.lengthComputable?i.total:void 0,l=o-a,d=r(l),u=o<=c;a=o;const g={loaded:o,total:c,progress:c?o/c:void 0,bytes:l,rate:d||void 0,estimated:d&&c&&u?(c-o)/d:void 0,event:i,lengthComputable:c!=null};g[t?"download":"upload"]=!0,e(g)},n)},$se=Js.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let a;function r(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return a=r(window.location.href),function(o){const c=Re.isString(o)?r(o):o;return c.protocol===a.protocol&&c.host===a.host}}():function(){return function(){return!0}}(),Bse=Js.hasStandardBrowserEnv?{write(e,t,n,a,r,i){const o=[e+"="+encodeURIComponent(t)];Re.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Re.isString(a)&&o.push("path="+a),Re.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Hse(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Use(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function vI(e,t){return e&&!Hse(t)?Use(e,t):t}const U9=e=>e instanceof Ks?{...e}:e;function Mc(e,t){t=t||{};const n={};function a(d,u,g){return Re.isPlainObject(d)&&Re.isPlainObject(u)?Re.merge.call({caseless:g},d,u):Re.isPlainObject(u)?Re.merge({},u):Re.isArray(u)?u.slice():u}function r(d,u,g){if(Re.isUndefined(u)){if(!Re.isUndefined(d))return a(void 0,d,g)}else return a(d,u,g)}function i(d,u){if(!Re.isUndefined(u))return a(void 0,u)}function o(d,u){if(Re.isUndefined(u)){if(!Re.isUndefined(d))return a(void 0,d)}else return a(void 0,u)}function c(d,u,g){if(g in t)return a(d,u);if(g in e)return a(void 0,d)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:c,headers:(d,u)=>r(U9(d),U9(u),!0)};return Re.forEach(Object.keys(Object.assign({},e,t)),function(u){const g=l[u]||r,y=g(e[u],t[u],u);Re.isUndefined(y)&&g!==c||(n[u]=y)}),n}var _I=e=>{const t=Mc({},e);let{data:n,withXSRFToken:a,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:c}=t;t.headers=o=Ks.from(o),t.url=gI(vI(t.baseURL,t.url),e.params,e.paramsSerializer),c&&o.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(Re.isFormData(n)){if(Js.hasStandardBrowserEnv||Js.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[d,...u]=l?l.split(";").map(g=>g.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...u].join("; "))}}if(Js.hasStandardBrowserEnv&&(a&&Re.isFunction(a)&&(a=a(t)),a||a!==!1&&$se(t.url))){const d=r&&i&&Bse.read(i);d&&o.set(r,d)}return t};const Vse=typeof XMLHttpRequest!="undefined";var Wse=Vse&&function(e){return new Promise(function(n,a){const r=_I(e);let i=r.data;const o=Ks.from(r.headers).normalize();let{responseType:c}=r,l;function d(){r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener("abort",l)}let u=new XMLHttpRequest;u.open(r.method.toUpperCase(),r.url,!0),u.timeout=r.timeout;function g(){if(!u)return;const w=Ks.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),S={data:!c||c==="text"||c==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:w,config:e,request:u};wI(function(p){n(p),d()},function(p){a(p),d()},S),u=null}"onloadend"in u?u.onloadend=g:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(g)},u.onabort=function(){!u||(a(new Vt("Request aborted",Vt.ECONNABORTED,r,u)),u=null)},u.onerror=function(){a(new Vt("Network Error",Vt.ERR_NETWORK,r,u)),u=null},u.ontimeout=function(){let v=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const S=r.transitional||bI;r.timeoutErrorMessage&&(v=r.timeoutErrorMessage),a(new Vt(v,S.clarifyTimeoutError?Vt.ETIMEDOUT:Vt.ECONNABORTED,r,u)),u=null},i===void 0&&o.setContentType(null),"setRequestHeader"in u&&Re.forEach(o.toJSON(),function(v,S){u.setRequestHeader(S,v)}),Re.isUndefined(r.withCredentials)||(u.withCredentials=!!r.withCredentials),c&&c!=="json"&&(u.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&u.addEventListener("progress",A1(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",A1(r.onUploadProgress)),(r.cancelToken||r.signal)&&(l=w=>{!u||(a(!w||w.type?new uf(null,e,u):w),u.abort(),u=null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener("abort",l)));const y=jse(r.url);if(y&&Js.protocols.indexOf(y)===-1){a(new Vt("Unsupported protocol "+y+":",Vt.ERR_BAD_REQUEST,e));return}u.send(i||null)})};const Yse=(e,t)=>{let n=new AbortController,a;const r=function(l){if(!a){a=!0,o();const d=l instanceof Error?l:this.reason;n.abort(d instanceof Vt?d:new uf(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{r(new Vt(`timeout ${t} of ms exceeded`,Vt.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l&&(l.removeEventListener?l.removeEventListener("abort",r):l.unsubscribe(r))}),e=null)};e.forEach(l=>l&&l.addEventListener&&l.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=o,[c,()=>{i&&clearTimeout(i),i=null}]};var Gse=Yse;const qse=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let a=0,r;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},Zse=async function*(e,t,n){for await(const a of e)yield*qse(ArrayBuffer.isView(a)?a:await n(String(a)),t)},V9=(e,t,n,a,r)=>{const i=Zse(e,t,r);let o=0;return new ReadableStream({type:"bytes",async pull(c){const{done:l,value:d}=await i.next();if(l){c.close(),a();return}let u=d.byteLength;n&&n(o+=u),c.enqueue(new Uint8Array(d))},cancel(c){return a(c),i.return()}},{highWaterMark:2})},W9=(e,t)=>{const n=e!=null;return a=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:a}))},Ty=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",NI=Ty&&typeof ReadableStream=="function",c4=Ty&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Qse=NI&&(()=>{let e=!1;const t=new Request(Js.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Y9=64*1024,d4=NI&&!!(()=>{try{return Re.isReadableStream(new Response("").body)}catch{}})(),I1={stream:d4&&(e=>e.body)};Ty&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!I1[t]&&(I1[t]=Re.isFunction(e[t])?n=>n[t]():(n,a)=>{throw new Vt(`Response type '${t}' is not supported`,Vt.ERR_NOT_SUPPORT,a)})})})(new Response);const Jse=async e=>{if(e==null)return 0;if(Re.isBlob(e))return e.size;if(Re.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Re.isArrayBufferView(e))return e.byteLength;if(Re.isURLSearchParams(e)&&(e=e+""),Re.isString(e))return(await c4(e)).byteLength},Kse=async(e,t)=>{const n=Re.toFiniteNumber(e.getContentLength());return n==null?Jse(t):n};var Xse=Ty&&(async e=>{let{url:t,method:n,data:a,signal:r,cancelToken:i,timeout:o,onDownloadProgress:c,onUploadProgress:l,responseType:d,headers:u,withCredentials:g="same-origin",fetchOptions:y}=_I(e);d=d?(d+"").toLowerCase():"text";let[w,v]=r||i||o?Gse([r,i],o):[],S,m;const p=()=>{!S&&setTimeout(()=>{w&&w.unsubscribe()}),S=!0};let b;try{if(l&&Qse&&n!=="get"&&n!=="head"&&(b=await Kse(u,a))!==0){let _=new Request(t,{method:"POST",body:a,duplex:"half"}),C;Re.isFormData(a)&&(C=_.headers.get("content-type"))&&u.setContentType(C),_.body&&(a=V9(_.body,Y9,W9(b,A1(l)),null,c4))}Re.isString(g)||(g=g?"cors":"omit"),m=new Request(t,{...y,signal:w,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:a,duplex:"half",withCredentials:g});let x=await fetch(m);const k=d4&&(d==="stream"||d==="response");if(d4&&(c||k)){const _={};["status","statusText","headers"].forEach(E=>{_[E]=x[E]});const C=Re.toFiniteNumber(x.headers.get("content-length"));x=new Response(V9(x.body,Y9,c&&W9(C,A1(c,!0)),k&&p,c4),_)}d=d||"text";let N=await I1[Re.findKey(I1,d)||"text"](x,e);return!k&&p(),v&&v(),await new Promise((_,C)=>{wI(_,C,{data:N,headers:Ks.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(x){throw p(),x&&x.name==="TypeError"&&/fetch/i.test(x.message)?Object.assign(new Vt("Network Error",Vt.ERR_NETWORK,e,m),{cause:x.cause||x}):Vt.from(x,x&&x.code,e,m)}});const u4={http:pse,xhr:Wse,fetch:Xse};Re.forEach(u4,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const G9=e=>`- ${e}`,eie=e=>Re.isFunction(e)||e===null||e===!1;var SI={getAdapter:e=>{e=Re.isArray(e)?e:[e];const{length:t}=e;let n,a;const r={};for(let i=0;i<t;i++){n=e[i];let o;if(a=n,!eie(n)&&(a=u4[(o=String(n)).toLowerCase()],a===void 0))throw new Vt(`Unknown adapter '${o}'`);if(a)break;r[o||"#"+i]=a}if(!a){const i=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since :
`+i.map(G9).join(`
`):" "+G9(i[0]):"as no adapter specified";throw new Vt("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return a},adapters:u4};function mw(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new uf(null,e)}function q9(e){return mw(e),e.headers=Ks.from(e.headers),e.data=fw.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),SI.getAdapter(e.adapter||bN.adapter)(e).then(function(a){return mw(e),a.data=fw.call(e,e.transformResponse,a),a.headers=Ks.from(a.headers),a},function(a){return xI(a)||(mw(e),a&&a.response&&(a.response.data=fw.call(e,e.transformResponse,a.response),a.response.headers=Ks.from(a.response.headers))),Promise.reject(a)})}const kI="1.7.2",yN={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{yN[e]=function(a){return typeof a===e||"a"+(t<1?"n ":" ")+e}});const Z9={};yN.transitional=function(t,n,a){function r(i,o){return"[Axios v"+kI+"] Transitional option '"+i+"'"+o+(a?". "+a:"")}return(i,o,c)=>{if(t===!1)throw new Vt(r(o," has been removed"+(n?" in "+n:"")),Vt.ERR_DEPRECATED);return n&&!Z9[o]&&(Z9[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,c):!0}};function tie(e,t,n){if(typeof e!="object")throw new Vt("options must be an object",Vt.ERR_BAD_OPTION_VALUE);const a=Object.keys(e);let r=a.length;for(;r-- >0;){const i=a[r],o=t[i];if(o){const c=e[i],l=c===void 0||o(c,i,e);if(l!==!0)throw new Vt("option "+i+" must be "+l,Vt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Vt("Unknown option "+i,Vt.ERR_BAD_OPTION)}}var f4={assertOptions:tie,validators:yN};const Uo=f4.validators;class O1{constructor(t){this.defaults=t,this.interceptors={request:new B9,response:new B9}}async request(t,n){try{return await this._request(t,n)}catch(a){if(a instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{a.stack?i&&!String(a.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(a.stack+=`
`+i):a.stack=i}catch{}}throw a}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Mc(this.defaults,n);const{transitional:a,paramsSerializer:r,headers:i}=n;a!==void 0&&f4.assertOptions(a,{silentJSONParsing:Uo.transitional(Uo.boolean),forcedJSONParsing:Uo.transitional(Uo.boolean),clarifyTimeoutError:Uo.transitional(Uo.boolean)},!1),r!=null&&(Re.isFunction(r)?n.paramsSerializer={serialize:r}:f4.assertOptions(r,{encode:Uo.function,serialize:Uo.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Re.merge(i.common,i[n.method]);i&&Re.forEach(["delete","get","head","post","put","patch","common"],v=>{delete i[v]}),n.headers=Ks.concat(o,i);const c=[];let l=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(l=l&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const d=[];this.interceptors.response.forEach(function(S){d.push(S.fulfilled,S.rejected)});let u,g=0,y;if(!l){const v=[q9.bind(this),void 0];for(v.unshift.apply(v,c),v.push.apply(v,d),y=v.length,u=Promise.resolve(n);g<y;)u=u.then(v[g++],v[g++]);return u}y=c.length;let w=n;for(g=0;g<y;){const v=c[g++],S=c[g++];try{w=v(w)}catch(m){S.call(this,m);break}}try{u=q9.call(this,w)}catch(v){return Promise.reject(v)}for(g=0,y=d.length;g<y;)u=u.then(d[g++],d[g++]);return u}getUri(t){t=Mc(this.defaults,t);const n=vI(t.baseURL,t.url);return gI(n,t.params,t.paramsSerializer)}}Re.forEach(["delete","get","head","options"],function(t){O1.prototype[t]=function(n,a){return this.request(Mc(a||{},{method:t,url:n,data:(a||{}).data}))}});Re.forEach(["post","put","patch"],function(t){function n(a){return function(i,o,c){return this.request(Mc(c||{},{method:t,headers:a?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}O1.prototype[t]=n(),O1.prototype[t+"Form"]=n(!0)});var kg=O1;class xN{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const a=this;this.promise.then(r=>{if(!a._listeners)return;let i=a._listeners.length;for(;i-- >0;)a._listeners[i](r);a._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(c=>{a.subscribe(c),i=c}).then(r);return o.cancel=function(){a.unsubscribe(i)},o},t(function(i,o,c){a.reason||(a.reason=new uf(i,o,c),n(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new xN(function(r){t=r}),cancel:t}}}var nie=xN;function aie(e){return function(n){return e.apply(null,n)}}function rie(e){return Re.isObject(e)&&e.isAxiosError===!0}const m4={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(m4).forEach(([e,t])=>{m4[t]=e});var sie=m4;function CI(e){const t=new kg(e),n=rI(kg.prototype.request,t);return Re.extend(n,kg.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return CI(Mc(e,r))},n}const wa=CI(bN);wa.Axios=kg;wa.CanceledError=uf;wa.CancelToken=nie;wa.isCancel=xI;wa.VERSION=kI;wa.toFormData=Cy;wa.AxiosError=Vt;wa.Cancel=wa.CanceledError;wa.all=function(t){return Promise.all(t)};wa.spread=aie;wa.isAxiosError=rie;wa.mergeConfig=Mc;wa.AxiosHeaders=Ks;wa.formToJSON=e=>yI(Re.isHTMLForm(e)?new FormData(e):e);wa.getAdapter=SI.getAdapter;wa.HttpStatusCode=sie;wa.default=wa;var Ac=wa;async function _t(e,t,n,a="NONE",r,i){var o,c,l,d,u;try{const g=await Ac({method:t,url:`https://ergo.mkdlabs.com/${i!=null?i:"v2"}/api/custom/ergo/${e}/${a}`,data:n,headers:{"X-Project":"ZXJnbzprNWdvNGw1NDhjaDRxazU5MTh4MnVsanV2OHJxcXAyYXM=",Authorization:`Bearer ${r!=null?r:localStorage.getItem("token")}`,uid:localStorage.getItem("device-uid")}});if((o=g.data)!=null&&o.error)throw new Error(g.data.error||"An Error Occurred");switch(a){case"PAGINATE":return g.data;default:return g.data}}catch(g){throw console.log(`CUSTOM ERROR(${e}): `,g),((l=(c=g.response)==null?void 0:c.data)==null?void 0:l.message)==="TOKEN_EXPIRED"&&(localStorage.clear(),location.href="/login"),new Error(((u=(d=g.response)==null?void 0:d.data)==null?void 0:u.message)||"An Error Occurred")}}async function pw(e,t){return Ac.get(`https://ergo.mkdlabs.com/v2/api/lambda/${e}/login?role=${t}`,{headers:{"x-project":"ZXJnbzprNWdvNGw1NDhjaDRxazU5MTh4MnVsanV2OHJxcXAyYXM"}})}const Q9=e=>{if(e.startsWith("/account")||e.startsWith("/property")||e.startsWith("/help"))return"light";switch(e){case"/contact-us":case"/faq":return"white";case"/search":case"/explore":case"/favorites":case"/become-a-host":case"/reset-password":return"light";default:return"transparent"}},iie=()=>{const{state:e,dispatch:t}=R.useContext(Ee),{state:n,dispatch:a}=R.useContext(we),r=je(),{pathname:i}=An(),[o,c]=h.exports.useState(Q9(i));async function l(){const g=new _e;try{const y=await g.getProfileCustom();a({type:"SET_USER_DATA",payload:y})}catch(y){pe(a,y.message,4e3,"ERROR"),me(t,y.message)}}h.exports.useEffect(()=>{const g=()=>{i=="/"&&(window.scrollY>10?c("white"):c("transparent"))};return window.addEventListener("scroll",g),l(),()=>{window.removeEventListener("scroll",g)}},[i]),h.exports.useEffect(()=>{c(Q9(i))},[i]);async function d(){if(!(n.verificationType&&n.dob&&n.city&&n.country&&n.about)){r("/become-a-host");return}try{await _t("edit-self","post",{user:{role:"host"}},""),t({type:"SWITCH_TO_HOST"}),a({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a host",btn:"Ok got it"}})}catch{}}function u(){t({type:"SWITCH_TO_HOST"}),a({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a host",btn:"Ok got it"}}),r("/")}return i.includes("/login")||i.includes("/signup")?null:s(Se,{children:f("header",{className:`fixed top-0 left-0 z-50 flex w-screen flex-wrap items-center justify-between py-4 px-4 text-sm duration-500 md:flex-nowrap md:rounded-br-[32px] md:rounded-bl-[32px] md:px-12 header-${o}`,children:[s("nav",{className:"gap-6",children:s($e,{to:"/",className:"",children:s(oy,{fill:o=="transparent"||o=="light"?void 0:"#101828"})})}),s(Pu,{className:"hidden lg:block"}),f("div",{className:"flex gap-4 space-x-4",children:[f("nav",{className:"z-50 inline ",children:[" ",i.startsWith("/account")&&s("button",{className:`self-stretch rounded-md border px-6 py-[5px] pb-[7px] my-border-${o} ${o=="transparent"?"":"border-white"}`,onClick:()=>r("/search?location=&booking_start_time=&max_capacity=&capacity=&size="),children:s("span",{children:"Explore Spaces"})})]}),f("nav",{className:"z-50 flex items-center gap-6",children:[e.originalRole!="customer"?s("button",{onClick:u,className:`self-stretch rounded-md border px-6 py-[5px] pb-[7px] my-border-${o} hidden whitespace-nowrap md:inline`,children:s("span",{children:"Join as host"})}):s("button",{onClick:d,className:`self-stretch rounded-md border px-6 py-[5px] pb-[7px] my-border-${o} hidden whitespace-nowrap md:inline`,children:s("span",{children:"Become a host"})}),s(i4,{variant:o})]})]}),s(Pu,{className:"flex w-full justify-center py-4 md:hidden"})]})})};//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
var EI;function Te(){return EI.apply(null,arguments)}function oie(e){EI=e}function ai(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function _c(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function Sn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function wN(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(Sn(e,t))return!1;return!0}function Lr(e){return e===void 0}function vo(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function rh(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function TI(e,t){var n=[],a,r=e.length;for(a=0;a<r;++a)n.push(t(e[a],a));return n}function ul(e,t){for(var n in t)Sn(t,n)&&(e[n]=t[n]);return Sn(t,"toString")&&(e.toString=t.toString),Sn(t,"valueOf")&&(e.valueOf=t.valueOf),e}function Pi(e,t,n,a){return JI(e,t,n,a,!0).utc()}function lie(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Zt(e){return e._pf==null&&(e._pf=lie()),e._pf}var p4;Array.prototype.some?p4=Array.prototype.some:p4=function(e){var t=Object(this),n=t.length>>>0,a;for(a=0;a<n;a++)if(a in t&&e.call(this,t[a],a,t))return!0;return!1};function vN(e){var t=null,n=!1,a=e._d&&!isNaN(e._d.getTime());if(a&&(t=Zt(e),n=p4.call(t.parsedDateParts,function(r){return r!=null}),a=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(a=a&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=a;else return a;return e._isValid}function Ly(e){var t=Pi(NaN);return e!=null?ul(Zt(t),e):Zt(t).userInvalidated=!0,t}var J9=Te.momentProperties=[],hw=!1;function _N(e,t){var n,a,r,i=J9.length;if(Lr(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),Lr(t._i)||(e._i=t._i),Lr(t._f)||(e._f=t._f),Lr(t._l)||(e._l=t._l),Lr(t._strict)||(e._strict=t._strict),Lr(t._tzm)||(e._tzm=t._tzm),Lr(t._isUTC)||(e._isUTC=t._isUTC),Lr(t._offset)||(e._offset=t._offset),Lr(t._pf)||(e._pf=Zt(t)),Lr(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)a=J9[n],r=t[a],Lr(r)||(e[a]=r);return e}function sh(e){_N(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),hw===!1&&(hw=!0,Te.updateOffset(this),hw=!1)}function ri(e){return e instanceof sh||e!=null&&e._isAMomentObject!=null}function LI(e){Te.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+e)}function Is(e,t){var n=!0;return ul(function(){if(Te.deprecationHandler!=null&&Te.deprecationHandler(null,e),n){var a=[],r,i,o,c=arguments.length;for(i=0;i<c;i++){if(r="",typeof arguments[i]=="object"){r+=`
[`+i+"] ";for(o in arguments[0])Sn(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}LI(e+`
Arguments: `+Array.prototype.slice.call(a).join("")+`
`+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var K9={};function DI(e,t){Te.deprecationHandler!=null&&Te.deprecationHandler(e,t),K9[e]||(LI(t),K9[e]=!0)}Te.suppressDeprecationWarnings=!1;Te.deprecationHandler=null;function Ri(e){return typeof Function!="undefined"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function cie(e){var t,n;for(n in e)Sn(e,n)&&(t=e[n],Ri(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function h4(e,t){var n=ul({},e),a;for(a in t)Sn(t,a)&&(_c(e[a])&&_c(t[a])?(n[a]={},ul(n[a],e[a]),ul(n[a],t[a])):t[a]!=null?n[a]=t[a]:delete n[a]);for(a in e)Sn(e,a)&&!Sn(t,a)&&_c(e[a])&&(n[a]=ul({},n[a]));return n}function NN(e){e!=null&&this.set(e)}var g4;Object.keys?g4=Object.keys:g4=function(e){var t,n=[];for(t in e)Sn(e,t)&&n.push(t);return n};var die={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function uie(e,t,n){var a=this._calendar[e]||this._calendar.sameElse;return Ri(a)?a.call(t,n):a}function Li(e,t,n){var a=""+Math.abs(e),r=t-a.length,i=e>=0;return(i?n?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+a}var SN=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,_0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,gw={},hu={};function Ct(e,t,n,a){var r=a;typeof a=="string"&&(r=function(){return this[a]()}),e&&(hu[e]=r),t&&(hu[t[0]]=function(){return Li(r.apply(this,arguments),t[1],t[2])}),n&&(hu[n]=function(){return this.localeData().ordinal(r.apply(this,arguments),e)})}function fie(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function mie(e){var t=e.match(SN),n,a;for(n=0,a=t.length;n<a;n++)hu[t[n]]?t[n]=hu[t[n]]:t[n]=fie(t[n]);return function(r){var i="",o;for(o=0;o<a;o++)i+=Ri(t[o])?t[o].call(r,e):t[o];return i}}function Cg(e,t){return e.isValid()?(t=MI(t,e.localeData()),gw[t]=gw[t]||mie(t),gw[t](e)):e.localeData().invalidDate()}function MI(e,t){var n=5;function a(r){return t.longDateFormat(r)||r}for(_0.lastIndex=0;n>=0&&_0.test(e);)e=e.replace(_0,a),_0.lastIndex=0,n-=1;return e}var pie={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function hie(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(SN).map(function(a){return a==="MMMM"||a==="MM"||a==="DD"||a==="dddd"?a.slice(1):a}).join(""),this._longDateFormat[e])}var gie="Invalid date";function bie(){return this._invalidDate}var yie="%d",xie=/\d{1,2}/;function wie(e){return this._ordinal.replace("%d",e)}var vie={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function _ie(e,t,n,a){var r=this._relativeTime[n];return Ri(r)?r(e,t,n,a):r.replace(/%d/i,e)}function Nie(e,t){var n=this._relativeTime[e>0?"future":"past"];return Ri(n)?n(t):n.replace(/%s/i,t)}var X9={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Os(e){return typeof e=="string"?X9[e]||X9[e.toLowerCase()]:void 0}function kN(e){var t={},n,a;for(a in e)Sn(e,a)&&(n=Os(a),n&&(t[n]=e[a]));return t}var Sie={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function kie(e){var t=[],n;for(n in e)Sn(e,n)&&t.push({unit:n,priority:Sie[n]});return t.sort(function(a,r){return a.priority-r.priority}),t}var AI=/\d/,os=/\d\d/,II=/\d{3}/,CN=/\d{4}/,Dy=/[+-]?\d{6}/,Jn=/\d\d?/,OI=/\d\d\d\d?/,PI=/\d\d\d\d\d\d?/,My=/\d{1,3}/,EN=/\d{1,4}/,Ay=/[+-]?\d{1,6}/,ff=/\d+/,Iy=/[+-]?\d+/,Cie=/Z|[+-]\d\d:?\d\d/gi,Oy=/Z|[+-]\d\d(?::?\d\d)?/gi,Eie=/[+-]?\d+(\.\d{1,3})?/,ih=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,mf=/^[1-9]\d?/,TN=/^([1-9]\d|\d)/,P1;P1={};function yt(e,t,n){P1[e]=Ri(t)?t:function(a,r){return a&&n?n:t}}function Tie(e,t){return Sn(P1,e)?P1[e](t._strict,t._locale):new RegExp(Lie(e))}function Lie(e){return mo(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,a,r,i){return n||a||r||i}))}function mo(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function vs(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function fn(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=vs(t)),n}var b4={};function jn(e,t){var n,a=t,r;for(typeof e=="string"&&(e=[e]),vo(t)&&(a=function(i,o){o[t]=fn(i)}),r=e.length,n=0;n<r;n++)b4[e[n]]=a}function oh(e,t){jn(e,function(n,a,r,i){r._w=r._w||{},t(n,r._w,r,i)})}function Die(e,t,n){t!=null&&Sn(b4,e)&&b4[e](t,n._a,n,e)}function Py(e){return e%4===0&&e%100!==0||e%400===0}var ir=0,oo=1,vi=2,Ma=3,Gs=4,lo=5,gc=6,Mie=7,Aie=8;Ct("Y",0,0,function(){var e=this.year();return e<=9999?Li(e,4):"+"+e});Ct(0,["YY",2],0,function(){return this.year()%100});Ct(0,["YYYY",4],0,"year");Ct(0,["YYYYY",5],0,"year");Ct(0,["YYYYYY",6,!0],0,"year");yt("Y",Iy);yt("YY",Jn,os);yt("YYYY",EN,CN);yt("YYYYY",Ay,Dy);yt("YYYYYY",Ay,Dy);jn(["YYYYY","YYYYYY"],ir);jn("YYYY",function(e,t){t[ir]=e.length===2?Te.parseTwoDigitYear(e):fn(e)});jn("YY",function(e,t){t[ir]=Te.parseTwoDigitYear(e)});jn("Y",function(e,t){t[ir]=parseInt(e,10)});function jm(e){return Py(e)?366:365}Te.parseTwoDigitYear=function(e){return fn(e)+(fn(e)>68?1900:2e3)};var RI=pf("FullYear",!0);function Iie(){return Py(this.year())}function pf(e,t){return function(n){return n!=null?(jI(this,e,n),Te.updateOffset(this,t),this):hp(this,e)}}function hp(e,t){if(!e.isValid())return NaN;var n=e._d,a=e._isUTC;switch(t){case"Milliseconds":return a?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return a?n.getUTCSeconds():n.getSeconds();case"Minutes":return a?n.getUTCMinutes():n.getMinutes();case"Hours":return a?n.getUTCHours():n.getHours();case"Date":return a?n.getUTCDate():n.getDate();case"Day":return a?n.getUTCDay():n.getDay();case"Month":return a?n.getUTCMonth():n.getMonth();case"FullYear":return a?n.getUTCFullYear():n.getFullYear();default:return NaN}}function jI(e,t,n){var a,r,i,o,c;if(!(!e.isValid()||isNaN(n))){switch(a=e._d,r=e._isUTC,t){case"Milliseconds":return void(r?a.setUTCMilliseconds(n):a.setMilliseconds(n));case"Seconds":return void(r?a.setUTCSeconds(n):a.setSeconds(n));case"Minutes":return void(r?a.setUTCMinutes(n):a.setMinutes(n));case"Hours":return void(r?a.setUTCHours(n):a.setHours(n));case"Date":return void(r?a.setUTCDate(n):a.setDate(n));case"FullYear":break;default:return}i=n,o=e.month(),c=e.date(),c=c===29&&o===1&&!Py(i)?28:c,r?a.setUTCFullYear(i,o,c):a.setFullYear(i,o,c)}}function Oie(e){return e=Os(e),Ri(this[e])?this[e]():this}function Pie(e,t){if(typeof e=="object"){e=kN(e);var n=kie(e),a,r=n.length;for(a=0;a<r;a++)this[n[a].unit](e[n[a].unit])}else if(e=Os(e),Ri(this[e]))return this[e](t);return this}function Rie(e,t){return(e%t+t)%t}var ha;Array.prototype.indexOf?ha=Array.prototype.indexOf:ha=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function LN(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=Rie(t,12);return e+=(t-n)/12,n===1?Py(e)?29:28:31-n%7%2}Ct("M",["MM",2],"Mo",function(){return this.month()+1});Ct("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Ct("MMMM",0,0,function(e){return this.localeData().months(this,e)});yt("M",Jn,mf);yt("MM",Jn,os);yt("MMM",function(e,t){return t.monthsShortRegex(e)});yt("MMMM",function(e,t){return t.monthsRegex(e)});jn(["M","MM"],function(e,t){t[oo]=fn(e)-1});jn(["MMM","MMMM"],function(e,t,n,a){var r=n._locale.monthsParse(e,a,n._strict);r!=null?t[oo]=r:Zt(n).invalidMonth=e});var jie="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),zI="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),FI=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,zie=ih,Fie=ih;function $ie(e,t){return e?ai(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||FI).test(t)?"format":"standalone"][e.month()]:ai(this._months)?this._months:this._months.standalone}function Bie(e,t){return e?ai(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[FI.test(t)?"format":"standalone"][e.month()]:ai(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Hie(e,t,n){var a,r,i,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],a=0;a<12;++a)i=Pi([2e3,a]),this._shortMonthsParse[a]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[a]=this.months(i,"").toLocaleLowerCase();return n?t==="MMM"?(r=ha.call(this._shortMonthsParse,o),r!==-1?r:null):(r=ha.call(this._longMonthsParse,o),r!==-1?r:null):t==="MMM"?(r=ha.call(this._shortMonthsParse,o),r!==-1?r:(r=ha.call(this._longMonthsParse,o),r!==-1?r:null)):(r=ha.call(this._longMonthsParse,o),r!==-1?r:(r=ha.call(this._shortMonthsParse,o),r!==-1?r:null))}function Uie(e,t,n){var a,r,i;if(this._monthsParseExact)return Hie.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),a=0;a<12;a++){if(r=Pi([2e3,a]),n&&!this._longMonthsParse[a]&&(this._longMonthsParse[a]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[a]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!n&&!this._monthsParse[a]&&(i="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[a]=new RegExp(i.replace(".",""),"i")),n&&t==="MMMM"&&this._longMonthsParse[a].test(e))return a;if(n&&t==="MMM"&&this._shortMonthsParse[a].test(e))return a;if(!n&&this._monthsParse[a].test(e))return a}}function $I(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=fn(t);else if(t=e.localeData().monthsParse(t),!vo(t))return e}var n=t,a=e.date();return a=a<29?a:Math.min(a,LN(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,a):e._d.setMonth(n,a),e}function BI(e){return e!=null?($I(this,e),Te.updateOffset(this,!0),this):hp(this,"Month")}function Vie(){return LN(this.year(),this.month())}function Wie(e){return this._monthsParseExact?(Sn(this,"_monthsRegex")||HI.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(Sn(this,"_monthsShortRegex")||(this._monthsShortRegex=zie),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Yie(e){return this._monthsParseExact?(Sn(this,"_monthsRegex")||HI.call(this),e?this._monthsStrictRegex:this._monthsRegex):(Sn(this,"_monthsRegex")||(this._monthsRegex=Fie),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function HI(){function e(l,d){return d.length-l.length}var t=[],n=[],a=[],r,i,o,c;for(r=0;r<12;r++)i=Pi([2e3,r]),o=mo(this.monthsShort(i,"")),c=mo(this.months(i,"")),t.push(o),n.push(c),a.push(c),a.push(o);t.sort(e),n.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function Gie(e,t,n,a,r,i,o){var c;return e<100&&e>=0?(c=new Date(e+400,t,n,a,r,i,o),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,a,r,i,o),c}function gp(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function R1(e,t,n){var a=7+t-n,r=(7+gp(e,0,a).getUTCDay()-t)%7;return-r+a-1}function UI(e,t,n,a,r){var i=(7+n-a)%7,o=R1(e,a,r),c=1+7*(t-1)+i+o,l,d;return c<=0?(l=e-1,d=jm(l)+c):c>jm(e)?(l=e+1,d=c-jm(e)):(l=e,d=c),{year:l,dayOfYear:d}}function bp(e,t,n){var a=R1(e.year(),t,n),r=Math.floor((e.dayOfYear()-a-1)/7)+1,i,o;return r<1?(o=e.year()-1,i=r+po(o,t,n)):r>po(e.year(),t,n)?(i=r-po(e.year(),t,n),o=e.year()+1):(o=e.year(),i=r),{week:i,year:o}}function po(e,t,n){var a=R1(e,t,n),r=R1(e+1,t,n);return(jm(e)-a+r)/7}Ct("w",["ww",2],"wo","week");Ct("W",["WW",2],"Wo","isoWeek");yt("w",Jn,mf);yt("ww",Jn,os);yt("W",Jn,mf);yt("WW",Jn,os);oh(["w","ww","W","WW"],function(e,t,n,a){t[a.substr(0,1)]=fn(e)});function qie(e){return bp(e,this._week.dow,this._week.doy).week}var Zie={dow:0,doy:6};function Qie(){return this._week.dow}function Jie(){return this._week.doy}function Kie(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Xie(e){var t=bp(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Ct("d",0,"do","day");Ct("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Ct("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Ct("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Ct("e",0,0,"weekday");Ct("E",0,0,"isoWeekday");yt("d",Jn);yt("e",Jn);yt("E",Jn);yt("dd",function(e,t){return t.weekdaysMinRegex(e)});yt("ddd",function(e,t){return t.weekdaysShortRegex(e)});yt("dddd",function(e,t){return t.weekdaysRegex(e)});oh(["dd","ddd","dddd"],function(e,t,n,a){var r=n._locale.weekdaysParse(e,a,n._strict);r!=null?t.d=r:Zt(n).invalidWeekday=e});oh(["d","e","E"],function(e,t,n,a){t[a]=fn(e)});function eoe(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function toe(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function DN(e,t){return e.slice(t,7).concat(e.slice(0,t))}var noe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),VI="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),aoe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),roe=ih,soe=ih,ioe=ih;function ooe(e,t){var n=ai(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?DN(n,this._week.dow):e?n[e.day()]:n}function loe(e){return e===!0?DN(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function coe(e){return e===!0?DN(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function doe(e,t,n){var a,r,i,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],a=0;a<7;++a)i=Pi([2e3,1]).day(a),this._minWeekdaysParse[a]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[a]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[a]=this.weekdays(i,"").toLocaleLowerCase();return n?t==="dddd"?(r=ha.call(this._weekdaysParse,o),r!==-1?r:null):t==="ddd"?(r=ha.call(this._shortWeekdaysParse,o),r!==-1?r:null):(r=ha.call(this._minWeekdaysParse,o),r!==-1?r:null):t==="dddd"?(r=ha.call(this._weekdaysParse,o),r!==-1||(r=ha.call(this._shortWeekdaysParse,o),r!==-1)?r:(r=ha.call(this._minWeekdaysParse,o),r!==-1?r:null)):t==="ddd"?(r=ha.call(this._shortWeekdaysParse,o),r!==-1||(r=ha.call(this._weekdaysParse,o),r!==-1)?r:(r=ha.call(this._minWeekdaysParse,o),r!==-1?r:null)):(r=ha.call(this._minWeekdaysParse,o),r!==-1||(r=ha.call(this._weekdaysParse,o),r!==-1)?r:(r=ha.call(this._shortWeekdaysParse,o),r!==-1?r:null))}function uoe(e,t,n){var a,r,i;if(this._weekdaysParseExact)return doe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),a=0;a<7;a++){if(r=Pi([2e3,1]).day(a),n&&!this._fullWeekdaysParse[a]&&(this._fullWeekdaysParse[a]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[a]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[a]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[a]||(i="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[a]=new RegExp(i.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[a].test(e))return a;if(n&&t==="ddd"&&this._shortWeekdaysParse[a].test(e))return a;if(n&&t==="dd"&&this._minWeekdaysParse[a].test(e))return a;if(!n&&this._weekdaysParse[a].test(e))return a}}function foe(e){if(!this.isValid())return e!=null?this:NaN;var t=hp(this,"Day");return e!=null?(e=eoe(e,this.localeData()),this.add(e-t,"d")):t}function moe(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function poe(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=toe(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function hoe(e){return this._weekdaysParseExact?(Sn(this,"_weekdaysRegex")||MN.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(Sn(this,"_weekdaysRegex")||(this._weekdaysRegex=roe),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function goe(e){return this._weekdaysParseExact?(Sn(this,"_weekdaysRegex")||MN.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Sn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=soe),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function boe(e){return this._weekdaysParseExact?(Sn(this,"_weekdaysRegex")||MN.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Sn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ioe),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function MN(){function e(u,g){return g.length-u.length}var t=[],n=[],a=[],r=[],i,o,c,l,d;for(i=0;i<7;i++)o=Pi([2e3,1]).day(i),c=mo(this.weekdaysMin(o,"")),l=mo(this.weekdaysShort(o,"")),d=mo(this.weekdays(o,"")),t.push(c),n.push(l),a.push(d),r.push(c),r.push(l),r.push(d);t.sort(e),n.sort(e),a.sort(e),r.sort(e),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function AN(){return this.hours()%12||12}function yoe(){return this.hours()||24}Ct("H",["HH",2],0,"hour");Ct("h",["hh",2],0,AN);Ct("k",["kk",2],0,yoe);Ct("hmm",0,0,function(){return""+AN.apply(this)+Li(this.minutes(),2)});Ct("hmmss",0,0,function(){return""+AN.apply(this)+Li(this.minutes(),2)+Li(this.seconds(),2)});Ct("Hmm",0,0,function(){return""+this.hours()+Li(this.minutes(),2)});Ct("Hmmss",0,0,function(){return""+this.hours()+Li(this.minutes(),2)+Li(this.seconds(),2)});function WI(e,t){Ct(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}WI("a",!0);WI("A",!1);function YI(e,t){return t._meridiemParse}yt("a",YI);yt("A",YI);yt("H",Jn,TN);yt("h",Jn,mf);yt("k",Jn,mf);yt("HH",Jn,os);yt("hh",Jn,os);yt("kk",Jn,os);yt("hmm",OI);yt("hmmss",PI);yt("Hmm",OI);yt("Hmmss",PI);jn(["H","HH"],Ma);jn(["k","kk"],function(e,t,n){var a=fn(e);t[Ma]=a===24?0:a});jn(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});jn(["h","hh"],function(e,t,n){t[Ma]=fn(e),Zt(n).bigHour=!0});jn("hmm",function(e,t,n){var a=e.length-2;t[Ma]=fn(e.substr(0,a)),t[Gs]=fn(e.substr(a)),Zt(n).bigHour=!0});jn("hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[Ma]=fn(e.substr(0,a)),t[Gs]=fn(e.substr(a,2)),t[lo]=fn(e.substr(r)),Zt(n).bigHour=!0});jn("Hmm",function(e,t,n){var a=e.length-2;t[Ma]=fn(e.substr(0,a)),t[Gs]=fn(e.substr(a))});jn("Hmmss",function(e,t,n){var a=e.length-4,r=e.length-2;t[Ma]=fn(e.substr(0,a)),t[Gs]=fn(e.substr(a,2)),t[lo]=fn(e.substr(r))});function xoe(e){return(e+"").toLowerCase().charAt(0)==="p"}var woe=/[ap]\.?m?\.?/i,voe=pf("Hours",!0);function _oe(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var GI={calendar:die,longDateFormat:pie,invalidDate:gie,ordinal:yie,dayOfMonthOrdinalParse:xie,relativeTime:vie,months:jie,monthsShort:zI,week:Zie,weekdays:noe,weekdaysMin:aoe,weekdaysShort:VI,meridiemParse:woe},ea={},tm={},yp;function Noe(e,t){var n,a=Math.min(e.length,t.length);for(n=0;n<a;n+=1)if(e[n]!==t[n])return n;return a}function e7(e){return e&&e.toLowerCase().replace("_","-")}function Soe(e){for(var t=0,n,a,r,i;t<e.length;){for(i=e7(e[t]).split("-"),n=i.length,a=e7(e[t+1]),a=a?a.split("-"):null;n>0;){if(r=Ry(i.slice(0,n).join("-")),r)return r;if(a&&a.length>=n&&Noe(i,a)>=n-1)break;n--}t++}return yp}function koe(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ry(e){var t=null,n;if(ea[e]===void 0&&typeof Fg!="undefined"&&Fg&&Fg.exports&&koe(e))try{t=yp._abbr,n=require,n("./locale/"+e),Cl(t)}catch{ea[e]=null}return ea[e]}function Cl(e,t){var n;return e&&(Lr(t)?n=To(e):n=IN(e,t),n?yp=n:typeof console!="undefined"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),yp._abbr}function IN(e,t){if(t!==null){var n,a=GI;if(t.abbr=e,ea[e]!=null)DI("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),a=ea[e]._config;else if(t.parentLocale!=null)if(ea[t.parentLocale]!=null)a=ea[t.parentLocale]._config;else if(n=Ry(t.parentLocale),n!=null)a=n._config;else return tm[t.parentLocale]||(tm[t.parentLocale]=[]),tm[t.parentLocale].push({name:e,config:t}),null;return ea[e]=new NN(h4(a,t)),tm[e]&&tm[e].forEach(function(r){IN(r.name,r.config)}),Cl(e),ea[e]}else return delete ea[e],null}function Coe(e,t){if(t!=null){var n,a,r=GI;ea[e]!=null&&ea[e].parentLocale!=null?ea[e].set(h4(ea[e]._config,t)):(a=Ry(e),a!=null&&(r=a._config),t=h4(r,t),a==null&&(t.abbr=e),n=new NN(t),n.parentLocale=ea[e],ea[e]=n),Cl(e)}else ea[e]!=null&&(ea[e].parentLocale!=null?(ea[e]=ea[e].parentLocale,e===Cl()&&Cl(e)):ea[e]!=null&&delete ea[e]);return ea[e]}function To(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return yp;if(!ai(e)){if(t=Ry(e),t)return t;e=[e]}return Soe(e)}function Eoe(){return g4(ea)}function ON(e){var t,n=e._a;return n&&Zt(e).overflow===-2&&(t=n[oo]<0||n[oo]>11?oo:n[vi]<1||n[vi]>LN(n[ir],n[oo])?vi:n[Ma]<0||n[Ma]>24||n[Ma]===24&&(n[Gs]!==0||n[lo]!==0||n[gc]!==0)?Ma:n[Gs]<0||n[Gs]>59?Gs:n[lo]<0||n[lo]>59?lo:n[gc]<0||n[gc]>999?gc:-1,Zt(e)._overflowDayOfYear&&(t<ir||t>vi)&&(t=vi),Zt(e)._overflowWeeks&&t===-1&&(t=Mie),Zt(e)._overflowWeekday&&t===-1&&(t=Aie),Zt(e).overflow=t),e}var Toe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Loe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Doe=/Z|[+-]\d\d(?::?\d\d)?/,N0=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],bw=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Moe=/^\/?Date\((-?\d+)/i,Aoe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ioe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function qI(e){var t,n,a=e._i,r=Toe.exec(a)||Loe.exec(a),i,o,c,l,d=N0.length,u=bw.length;if(r){for(Zt(e).iso=!0,t=0,n=d;t<n;t++)if(N0[t][1].exec(r[1])){o=N0[t][0],i=N0[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(r[3]){for(t=0,n=u;t<n;t++)if(bw[t][1].exec(r[3])){c=(r[2]||" ")+bw[t][0];break}if(c==null){e._isValid=!1;return}}if(!i&&c!=null){e._isValid=!1;return}if(r[4])if(Doe.exec(r[4]))l="Z";else{e._isValid=!1;return}e._f=o+(c||"")+(l||""),RN(e)}else e._isValid=!1}function Ooe(e,t,n,a,r,i){var o=[Poe(e),zI.indexOf(t),parseInt(n,10),parseInt(a,10),parseInt(r,10)];return i&&o.push(parseInt(i,10)),o}function Poe(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Roe(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function joe(e,t,n){if(e){var a=VI.indexOf(e),r=new Date(t[0],t[1],t[2]).getDay();if(a!==r)return Zt(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function zoe(e,t,n){if(e)return Ioe[e];if(t)return 0;var a=parseInt(n,10),r=a%100,i=(a-r)/100;return i*60+r}function ZI(e){var t=Aoe.exec(Roe(e._i)),n;if(t){if(n=Ooe(t[4],t[3],t[2],t[5],t[6],t[7]),!joe(t[1],n,e))return;e._a=n,e._tzm=zoe(t[8],t[9],t[10]),e._d=gp.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Zt(e).rfc2822=!0}else e._isValid=!1}function Foe(e){var t=Moe.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(qI(e),e._isValid===!1)delete e._isValid;else return;if(ZI(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Te.createFromInputFallback(e)}Te.createFromInputFallback=Is("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Pd(e,t,n){return e!=null?e:t!=null?t:n}function $oe(e){var t=new Date(Te.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function PN(e){var t,n,a=[],r,i,o;if(!e._d){for(r=$oe(e),e._w&&e._a[vi]==null&&e._a[oo]==null&&Boe(e),e._dayOfYear!=null&&(o=Pd(e._a[ir],r[ir]),(e._dayOfYear>jm(o)||e._dayOfYear===0)&&(Zt(e)._overflowDayOfYear=!0),n=gp(o,0,e._dayOfYear),e._a[oo]=n.getUTCMonth(),e._a[vi]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[Ma]===24&&e._a[Gs]===0&&e._a[lo]===0&&e._a[gc]===0&&(e._nextDay=!0,e._a[Ma]=0),e._d=(e._useUTC?gp:Gie).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ma]=24),e._w&&typeof e._w.d!="undefined"&&e._w.d!==i&&(Zt(e).weekdayMismatch=!0)}}function Boe(e){var t,n,a,r,i,o,c,l,d;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,o=4,n=Pd(t.GG,e._a[ir],bp(Qn(),1,4).year),a=Pd(t.W,1),r=Pd(t.E,1),(r<1||r>7)&&(l=!0)):(i=e._locale._week.dow,o=e._locale._week.doy,d=bp(Qn(),i,o),n=Pd(t.gg,e._a[ir],d.year),a=Pd(t.w,d.week),t.d!=null?(r=t.d,(r<0||r>6)&&(l=!0)):t.e!=null?(r=t.e+i,(t.e<0||t.e>6)&&(l=!0)):r=i),a<1||a>po(n,i,o)?Zt(e)._overflowWeeks=!0:l!=null?Zt(e)._overflowWeekday=!0:(c=UI(n,a,r,i,o),e._a[ir]=c.year,e._dayOfYear=c.dayOfYear)}Te.ISO_8601=function(){};Te.RFC_2822=function(){};function RN(e){if(e._f===Te.ISO_8601){qI(e);return}if(e._f===Te.RFC_2822){ZI(e);return}e._a=[],Zt(e).empty=!0;var t=""+e._i,n,a,r,i,o,c=t.length,l=0,d,u;for(r=MI(e._f,e._locale).match(SN)||[],u=r.length,n=0;n<u;n++)i=r[n],a=(t.match(Tie(i,e))||[])[0],a&&(o=t.substr(0,t.indexOf(a)),o.length>0&&Zt(e).unusedInput.push(o),t=t.slice(t.indexOf(a)+a.length),l+=a.length),hu[i]?(a?Zt(e).empty=!1:Zt(e).unusedTokens.push(i),Die(i,a,e)):e._strict&&!a&&Zt(e).unusedTokens.push(i);Zt(e).charsLeftOver=c-l,t.length>0&&Zt(e).unusedInput.push(t),e._a[Ma]<=12&&Zt(e).bigHour===!0&&e._a[Ma]>0&&(Zt(e).bigHour=void 0),Zt(e).parsedDateParts=e._a.slice(0),Zt(e).meridiem=e._meridiem,e._a[Ma]=Hoe(e._locale,e._a[Ma],e._meridiem),d=Zt(e).era,d!==null&&(e._a[ir]=e._locale.erasConvertYear(d,e._a[ir])),PN(e),ON(e)}function Hoe(e,t,n){var a;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(a=e.isPM(n),a&&t<12&&(t+=12),!a&&t===12&&(t=0)),t)}function Uoe(e){var t,n,a,r,i,o,c=!1,l=e._f.length;if(l===0){Zt(e).invalidFormat=!0,e._d=new Date(NaN);return}for(r=0;r<l;r++)i=0,o=!1,t=_N({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[r],RN(t),vN(t)&&(o=!0),i+=Zt(t).charsLeftOver,i+=Zt(t).unusedTokens.length*10,Zt(t).score=i,c?i<a&&(a=i,n=t):(a==null||i<a||o)&&(a=i,n=t,o&&(c=!0));ul(e,n||t)}function Voe(e){if(!e._d){var t=kN(e._i),n=t.day===void 0?t.date:t.day;e._a=TI([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(a){return a&&parseInt(a,10)}),PN(e)}}function Woe(e){var t=new sh(ON(QI(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function QI(e){var t=e._i,n=e._f;return e._locale=e._locale||To(e._l),t===null||n===void 0&&t===""?Ly({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ri(t)?new sh(ON(t)):(rh(t)?e._d=t:ai(n)?Uoe(e):n?RN(e):Yoe(e),vN(e)||(e._d=null),e))}function Yoe(e){var t=e._i;Lr(t)?e._d=new Date(Te.now()):rh(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Foe(e):ai(t)?(e._a=TI(t.slice(0),function(n){return parseInt(n,10)}),PN(e)):_c(t)?Voe(e):vo(t)?e._d=new Date(t):Te.createFromInputFallback(e)}function JI(e,t,n,a,r){var i={};return(t===!0||t===!1)&&(a=t,t=void 0),(n===!0||n===!1)&&(a=n,n=void 0),(_c(e)&&wN(e)||ai(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=r,i._l=n,i._i=e,i._f=t,i._strict=a,Woe(i)}function Qn(e,t,n,a){return JI(e,t,n,a,!1)}var Goe=Is("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Qn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:Ly()}),qoe=Is("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Qn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:Ly()});function KI(e,t){var n,a;if(t.length===1&&ai(t[0])&&(t=t[0]),!t.length)return Qn();for(n=t[0],a=1;a<t.length;++a)(!t[a].isValid()||t[a][e](n))&&(n=t[a]);return n}function Zoe(){var e=[].slice.call(arguments,0);return KI("isBefore",e)}function Qoe(){var e=[].slice.call(arguments,0);return KI("isAfter",e)}var Joe=function(){return Date.now?Date.now():+new Date},nm=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Koe(e){var t,n=!1,a,r=nm.length;for(t in e)if(Sn(e,t)&&!(ha.call(nm,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(a=0;a<r;++a)if(e[nm[a]]){if(n)return!1;parseFloat(e[nm[a]])!==fn(e[nm[a]])&&(n=!0)}return!0}function Xoe(){return this._isValid}function ele(){return oi(NaN)}function jy(e){var t=kN(e),n=t.year||0,a=t.quarter||0,r=t.month||0,i=t.week||t.isoWeek||0,o=t.day||0,c=t.hour||0,l=t.minute||0,d=t.second||0,u=t.millisecond||0;this._isValid=Koe(t),this._milliseconds=+u+d*1e3+l*6e4+c*1e3*60*60,this._days=+o+i*7,this._months=+r+a*3+n*12,this._data={},this._locale=To(),this._bubble()}function Eg(e){return e instanceof jy}function y4(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function tle(e,t,n){var a=Math.min(e.length,t.length),r=Math.abs(e.length-t.length),i=0,o;for(o=0;o<a;o++)(n&&e[o]!==t[o]||!n&&fn(e[o])!==fn(t[o]))&&i++;return i+r}function XI(e,t){Ct(e,0,0,function(){var n=this.utcOffset(),a="+";return n<0&&(n=-n,a="-"),a+Li(~~(n/60),2)+t+Li(~~n%60,2)})}XI("Z",":");XI("ZZ","");yt("Z",Oy);yt("ZZ",Oy);jn(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=jN(Oy,e)});var nle=/([\+\-]|\d\d)/gi;function jN(e,t){var n=(t||"").match(e),a,r,i;return n===null?null:(a=n[n.length-1]||[],r=(a+"").match(nle)||["-",0,0],i=+(r[1]*60)+fn(r[2]),i===0?0:r[0]==="+"?i:-i)}function zN(e,t){var n,a;return t._isUTC?(n=t.clone(),a=(ri(e)||rh(e)?e.valueOf():Qn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+a),Te.updateOffset(n,!1),n):Qn(e).local()}function x4(e){return-Math.round(e._d.getTimezoneOffset())}Te.updateOffset=function(){};function ale(e,t,n){var a=this._offset||0,r;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=jN(Oy,e),e===null)return this}else Math.abs(e)<16&&!n&&(e=e*60);return!this._isUTC&&t&&(r=x4(this)),this._offset=e,this._isUTC=!0,r!=null&&this.add(r,"m"),a!==e&&(!t||this._changeInProgress?nO(this,oi(e-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Te.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?a:x4(this)}function rle(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function sle(e){return this.utcOffset(0,e)}function ile(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(x4(this),"m")),this}function ole(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=jN(Cie,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function lle(e){return this.isValid()?(e=e?Qn(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function cle(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function dle(){if(!Lr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return _N(e,this),e=QI(e),e._a?(t=e._isUTC?Pi(e._a):Qn(e._a),this._isDSTShifted=this.isValid()&&tle(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ule(){return this.isValid()?!this._isUTC:!1}function fle(){return this.isValid()?this._isUTC:!1}function eO(){return this.isValid()?this._isUTC&&this._offset===0:!1}var mle=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ple=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function oi(e,t){var n=e,a=null,r,i,o;return Eg(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:vo(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(a=mle.exec(e))?(r=a[1]==="-"?-1:1,n={y:0,d:fn(a[vi])*r,h:fn(a[Ma])*r,m:fn(a[Gs])*r,s:fn(a[lo])*r,ms:fn(y4(a[gc]*1e3))*r}):(a=ple.exec(e))?(r=a[1]==="-"?-1:1,n={y:ec(a[2],r),M:ec(a[3],r),w:ec(a[4],r),d:ec(a[5],r),h:ec(a[6],r),m:ec(a[7],r),s:ec(a[8],r)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=hle(Qn(n.from),Qn(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),i=new jy(n),Eg(e)&&Sn(e,"_locale")&&(i._locale=e._locale),Eg(e)&&Sn(e,"_isValid")&&(i._isValid=e._isValid),i}oi.fn=jy.prototype;oi.invalid=ele;function ec(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function t7(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function hle(e,t){var n;return e.isValid()&&t.isValid()?(t=zN(t,e),e.isBefore(t)?n=t7(e,t):(n=t7(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function tO(e,t){return function(n,a){var r,i;return a!==null&&!isNaN(+a)&&(DI(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=a,a=i),r=oi(n,a),nO(this,r,e),this}}function nO(e,t,n,a){var r=t._milliseconds,i=y4(t._days),o=y4(t._months);!e.isValid()||(a=a==null?!0:a,o&&$I(e,hp(e,"Month")+o*n),i&&jI(e,"Date",hp(e,"Date")+i*n),r&&e._d.setTime(e._d.valueOf()+r*n),a&&Te.updateOffset(e,i||o))}var gle=tO(1,"add"),ble=tO(-1,"subtract");function aO(e){return typeof e=="string"||e instanceof String}function yle(e){return ri(e)||rh(e)||aO(e)||vo(e)||wle(e)||xle(e)||e===null||e===void 0}function xle(e){var t=_c(e)&&!wN(e),n=!1,a=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,i,o=a.length;for(r=0;r<o;r+=1)i=a[r],n=n||Sn(e,i);return t&&n}function wle(e){var t=ai(e),n=!1;return t&&(n=e.filter(function(a){return!vo(a)&&aO(e)}).length===0),t&&n}function vle(e){var t=_c(e)&&!wN(e),n=!1,a=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,i;for(r=0;r<a.length;r+=1)i=a[r],n=n||Sn(e,i);return t&&n}function _le(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Nle(e,t){arguments.length===1&&(arguments[0]?yle(arguments[0])?(e=arguments[0],t=void 0):vle(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Qn(),a=zN(n,this).startOf("day"),r=Te.calendarFormat(this,a)||"sameElse",i=t&&(Ri(t[r])?t[r].call(this,n):t[r]);return this.format(i||this.localeData().calendar(r,this,Qn(n)))}function Sle(){return new sh(this)}function kle(e,t){var n=ri(e)?e:Qn(e);return this.isValid()&&n.isValid()?(t=Os(t)||"millisecond",t==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function Cle(e,t){var n=ri(e)?e:Qn(e);return this.isValid()&&n.isValid()?(t=Os(t)||"millisecond",t==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function Ele(e,t,n,a){var r=ri(e)?e:Qn(e),i=ri(t)?t:Qn(t);return this.isValid()&&r.isValid()&&i.isValid()?(a=a||"()",(a[0]==="("?this.isAfter(r,n):!this.isBefore(r,n))&&(a[1]===")"?this.isBefore(i,n):!this.isAfter(i,n))):!1}function Tle(e,t){var n=ri(e)?e:Qn(e),a;return this.isValid()&&n.isValid()?(t=Os(t)||"millisecond",t==="millisecond"?this.valueOf()===n.valueOf():(a=n.valueOf(),this.clone().startOf(t).valueOf()<=a&&a<=this.clone().endOf(t).valueOf())):!1}function Lle(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Dle(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Mle(e,t,n){var a,r,i;if(!this.isValid())return NaN;if(a=zN(e,this),!a.isValid())return NaN;switch(r=(a.utcOffset()-this.utcOffset())*6e4,t=Os(t),t){case"year":i=Tg(this,a)/12;break;case"month":i=Tg(this,a);break;case"quarter":i=Tg(this,a)/3;break;case"second":i=(this-a)/1e3;break;case"minute":i=(this-a)/6e4;break;case"hour":i=(this-a)/36e5;break;case"day":i=(this-a-r)/864e5;break;case"week":i=(this-a-r)/6048e5;break;default:i=this-a}return n?i:vs(i)}function Tg(e,t){if(e.date()<t.date())return-Tg(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),a=e.clone().add(n,"months"),r,i;return t-a<0?(r=e.clone().add(n-1,"months"),i=(t-a)/(a-r)):(r=e.clone().add(n+1,"months"),i=(t-a)/(r-a)),-(n+i)||0}Te.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Te.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Ale(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Ile(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?Cg(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Ri(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Cg(n,"Z")):Cg(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Ole(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,a,r,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',a=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(n+a+r+i)}function Ple(e){e||(e=this.isUtc()?Te.defaultFormatUtc:Te.defaultFormat);var t=Cg(this,e);return this.localeData().postformat(t)}function Rle(e,t){return this.isValid()&&(ri(e)&&e.isValid()||Qn(e).isValid())?oi({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function jle(e){return this.from(Qn(),e)}function zle(e,t){return this.isValid()&&(ri(e)&&e.isValid()||Qn(e).isValid())?oi({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Fle(e){return this.to(Qn(),e)}function rO(e){var t;return e===void 0?this._locale._abbr:(t=To(e),t!=null&&(this._locale=t),this)}var sO=Is("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function iO(){return this._locale}var j1=1e3,gu=60*j1,z1=60*gu,oO=(365*400+97)*24*z1;function bu(e,t){return(e%t+t)%t}function lO(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-oO:new Date(e,t,n).valueOf()}function cO(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-oO:Date.UTC(e,t,n)}function $le(e){var t,n;if(e=Os(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?cO:lO,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=bu(t+(this._isUTC?0:this.utcOffset()*gu),z1);break;case"minute":t=this._d.valueOf(),t-=bu(t,gu);break;case"second":t=this._d.valueOf(),t-=bu(t,j1);break}return this._d.setTime(t),Te.updateOffset(this,!0),this}function Ble(e){var t,n;if(e=Os(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?cO:lO,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=z1-bu(t+(this._isUTC?0:this.utcOffset()*gu),z1)-1;break;case"minute":t=this._d.valueOf(),t+=gu-bu(t,gu)-1;break;case"second":t=this._d.valueOf(),t+=j1-bu(t,j1)-1;break}return this._d.setTime(t),Te.updateOffset(this,!0),this}function Hle(){return this._d.valueOf()-(this._offset||0)*6e4}function Ule(){return Math.floor(this.valueOf()/1e3)}function Vle(){return new Date(this.valueOf())}function Wle(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Yle(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Gle(){return this.isValid()?this.toISOString():null}function qle(){return vN(this)}function Zle(){return ul({},Zt(this))}function Qle(){return Zt(this).overflow}function Jle(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ct("N",0,0,"eraAbbr");Ct("NN",0,0,"eraAbbr");Ct("NNN",0,0,"eraAbbr");Ct("NNNN",0,0,"eraName");Ct("NNNNN",0,0,"eraNarrow");Ct("y",["y",1],"yo","eraYear");Ct("y",["yy",2],0,"eraYear");Ct("y",["yyy",3],0,"eraYear");Ct("y",["yyyy",4],0,"eraYear");yt("N",FN);yt("NN",FN);yt("NNN",FN);yt("NNNN",lce);yt("NNNNN",cce);jn(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,a){var r=n._locale.erasParse(e,a,n._strict);r?Zt(n).era=r:Zt(n).invalidEra=e});yt("y",ff);yt("yy",ff);yt("yyy",ff);yt("yyyy",ff);yt("yo",dce);jn(["y","yy","yyy","yyyy"],ir);jn(["yo"],function(e,t,n,a){var r;n._locale._eraYearOrdinalRegex&&(r=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ir]=n._locale.eraYearOrdinalParse(e,r):t[ir]=parseInt(e,10)});function Kle(e,t){var n,a,r,i=this._eras||To("en")._eras;for(n=0,a=i.length;n<a;++n){switch(typeof i[n].since){case"string":r=Te(i[n].since).startOf("day"),i[n].since=r.valueOf();break}switch(typeof i[n].until){case"undefined":i[n].until=1/0;break;case"string":r=Te(i[n].until).startOf("day").valueOf(),i[n].until=r.valueOf();break}}return i}function Xle(e,t,n){var a,r,i=this.eras(),o,c,l;for(e=e.toUpperCase(),a=0,r=i.length;a<r;++a)if(o=i[a].name.toUpperCase(),c=i[a].abbr.toUpperCase(),l=i[a].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(c===e)return i[a];break;case"NNNN":if(o===e)return i[a];break;case"NNNNN":if(l===e)return i[a];break}else if([o,c,l].indexOf(e)>=0)return i[a]}function ece(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Te(e.since).year():Te(e.since).year()+(t-e.offset)*n}function tce(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].name;return""}function nce(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].narrow;return""}function ace(){var e,t,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return a[e].abbr;return""}function rce(){var e,t,n,a,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=r[e].since<=r[e].until?1:-1,a=this.clone().startOf("day").valueOf(),r[e].since<=a&&a<=r[e].until||r[e].until<=a&&a<=r[e].since)return(this.year()-Te(r[e].since).year())*n+r[e].offset;return this.year()}function sce(e){return Sn(this,"_erasNameRegex")||$N.call(this),e?this._erasNameRegex:this._erasRegex}function ice(e){return Sn(this,"_erasAbbrRegex")||$N.call(this),e?this._erasAbbrRegex:this._erasRegex}function oce(e){return Sn(this,"_erasNarrowRegex")||$N.call(this),e?this._erasNarrowRegex:this._erasRegex}function FN(e,t){return t.erasAbbrRegex(e)}function lce(e,t){return t.erasNameRegex(e)}function cce(e,t){return t.erasNarrowRegex(e)}function dce(e,t){return t._eraYearOrdinalRegex||ff}function $N(){var e=[],t=[],n=[],a=[],r,i,o,c,l,d=this.eras();for(r=0,i=d.length;r<i;++r)o=mo(d[r].name),c=mo(d[r].abbr),l=mo(d[r].narrow),t.push(o),e.push(c),n.push(l),a.push(o),a.push(c),a.push(l);this._erasRegex=new RegExp("^("+a.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}Ct(0,["gg",2],0,function(){return this.weekYear()%100});Ct(0,["GG",2],0,function(){return this.isoWeekYear()%100});function zy(e,t){Ct(0,[e,e.length],0,t)}zy("gggg","weekYear");zy("ggggg","weekYear");zy("GGGG","isoWeekYear");zy("GGGGG","isoWeekYear");yt("G",Iy);yt("g",Iy);yt("GG",Jn,os);yt("gg",Jn,os);yt("GGGG",EN,CN);yt("gggg",EN,CN);yt("GGGGG",Ay,Dy);yt("ggggg",Ay,Dy);oh(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,a){t[a.substr(0,2)]=fn(e)});oh(["gg","GG"],function(e,t,n,a){t[a]=Te.parseTwoDigitYear(e)});function uce(e){return dO.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function fce(e){return dO.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function mce(){return po(this.year(),1,4)}function pce(){return po(this.isoWeekYear(),1,4)}function hce(){var e=this.localeData()._week;return po(this.year(),e.dow,e.doy)}function gce(){var e=this.localeData()._week;return po(this.weekYear(),e.dow,e.doy)}function dO(e,t,n,a,r){var i;return e==null?bp(this,a,r).year:(i=po(e,a,r),t>i&&(t=i),bce.call(this,e,t,n,a,r))}function bce(e,t,n,a,r){var i=UI(e,t,n,a,r),o=gp(i.year,0,i.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}Ct("Q",0,"Qo","quarter");yt("Q",AI);jn("Q",function(e,t){t[oo]=(fn(e)-1)*3});function yce(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Ct("D",["DD",2],"Do","date");yt("D",Jn,mf);yt("DD",Jn,os);yt("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});jn(["D","DD"],vi);jn("Do",function(e,t){t[vi]=fn(e.match(Jn)[0])});var uO=pf("Date",!0);Ct("DDD",["DDDD",3],"DDDo","dayOfYear");yt("DDD",My);yt("DDDD",II);jn(["DDD","DDDD"],function(e,t,n){n._dayOfYear=fn(e)});function xce(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Ct("m",["mm",2],0,"minute");yt("m",Jn,TN);yt("mm",Jn,os);jn(["m","mm"],Gs);var wce=pf("Minutes",!1);Ct("s",["ss",2],0,"second");yt("s",Jn,TN);yt("ss",Jn,os);jn(["s","ss"],lo);var vce=pf("Seconds",!1);Ct("S",0,0,function(){return~~(this.millisecond()/100)});Ct(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Ct(0,["SSS",3],0,"millisecond");Ct(0,["SSSS",4],0,function(){return this.millisecond()*10});Ct(0,["SSSSS",5],0,function(){return this.millisecond()*100});Ct(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Ct(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Ct(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Ct(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});yt("S",My,AI);yt("SS",My,os);yt("SSS",My,II);var fl,fO;for(fl="SSSS";fl.length<=9;fl+="S")yt(fl,ff);function _ce(e,t){t[gc]=fn(("0."+e)*1e3)}for(fl="S";fl.length<=9;fl+="S")jn(fl,_ce);fO=pf("Milliseconds",!1);Ct("z",0,0,"zoneAbbr");Ct("zz",0,0,"zoneName");function Nce(){return this._isUTC?"UTC":""}function Sce(){return this._isUTC?"Coordinated Universal Time":""}var tt=sh.prototype;tt.add=gle;tt.calendar=Nle;tt.clone=Sle;tt.diff=Mle;tt.endOf=Ble;tt.format=Ple;tt.from=Rle;tt.fromNow=jle;tt.to=zle;tt.toNow=Fle;tt.get=Oie;tt.invalidAt=Qle;tt.isAfter=kle;tt.isBefore=Cle;tt.isBetween=Ele;tt.isSame=Tle;tt.isSameOrAfter=Lle;tt.isSameOrBefore=Dle;tt.isValid=qle;tt.lang=sO;tt.locale=rO;tt.localeData=iO;tt.max=qoe;tt.min=Goe;tt.parsingFlags=Zle;tt.set=Pie;tt.startOf=$le;tt.subtract=ble;tt.toArray=Wle;tt.toObject=Yle;tt.toDate=Vle;tt.toISOString=Ile;tt.inspect=Ole;typeof Symbol!="undefined"&&Symbol.for!=null&&(tt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});tt.toJSON=Gle;tt.toString=Ale;tt.unix=Ule;tt.valueOf=Hle;tt.creationData=Jle;tt.eraName=tce;tt.eraNarrow=nce;tt.eraAbbr=ace;tt.eraYear=rce;tt.year=RI;tt.isLeapYear=Iie;tt.weekYear=uce;tt.isoWeekYear=fce;tt.quarter=tt.quarters=yce;tt.month=BI;tt.daysInMonth=Vie;tt.week=tt.weeks=Kie;tt.isoWeek=tt.isoWeeks=Xie;tt.weeksInYear=hce;tt.weeksInWeekYear=gce;tt.isoWeeksInYear=mce;tt.isoWeeksInISOWeekYear=pce;tt.date=uO;tt.day=tt.days=foe;tt.weekday=moe;tt.isoWeekday=poe;tt.dayOfYear=xce;tt.hour=tt.hours=voe;tt.minute=tt.minutes=wce;tt.second=tt.seconds=vce;tt.millisecond=tt.milliseconds=fO;tt.utcOffset=ale;tt.utc=sle;tt.local=ile;tt.parseZone=ole;tt.hasAlignedHourOffset=lle;tt.isDST=cle;tt.isLocal=ule;tt.isUtcOffset=fle;tt.isUtc=eO;tt.isUTC=eO;tt.zoneAbbr=Nce;tt.zoneName=Sce;tt.dates=Is("dates accessor is deprecated. Use date instead.",uO);tt.months=Is("months accessor is deprecated. Use month instead",BI);tt.years=Is("years accessor is deprecated. Use year instead",RI);tt.zone=Is("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",rle);tt.isDSTShifted=Is("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",dle);function kce(e){return Qn(e*1e3)}function Cce(){return Qn.apply(null,arguments).parseZone()}function mO(e){return e}var kn=NN.prototype;kn.calendar=uie;kn.longDateFormat=hie;kn.invalidDate=bie;kn.ordinal=wie;kn.preparse=mO;kn.postformat=mO;kn.relativeTime=_ie;kn.pastFuture=Nie;kn.set=cie;kn.eras=Kle;kn.erasParse=Xle;kn.erasConvertYear=ece;kn.erasAbbrRegex=ice;kn.erasNameRegex=sce;kn.erasNarrowRegex=oce;kn.months=$ie;kn.monthsShort=Bie;kn.monthsParse=Uie;kn.monthsRegex=Yie;kn.monthsShortRegex=Wie;kn.week=qie;kn.firstDayOfYear=Jie;kn.firstDayOfWeek=Qie;kn.weekdays=ooe;kn.weekdaysMin=coe;kn.weekdaysShort=loe;kn.weekdaysParse=uoe;kn.weekdaysRegex=hoe;kn.weekdaysShortRegex=goe;kn.weekdaysMinRegex=boe;kn.isPM=xoe;kn.meridiem=_oe;function F1(e,t,n,a){var r=To(),i=Pi().set(a,t);return r[n](i,e)}function pO(e,t,n){if(vo(e)&&(t=e,e=void 0),e=e||"",t!=null)return F1(e,t,n,"month");var a,r=[];for(a=0;a<12;a++)r[a]=F1(e,a,n,"month");return r}function BN(e,t,n,a){typeof e=="boolean"?(vo(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,vo(t)&&(n=t,t=void 0),t=t||"");var r=To(),i=e?r._week.dow:0,o,c=[];if(n!=null)return F1(t,(n+i)%7,a,"day");for(o=0;o<7;o++)c[o]=F1(t,(o+i)%7,a,"day");return c}function Ece(e,t){return pO(e,t,"months")}function Tce(e,t){return pO(e,t,"monthsShort")}function Lce(e,t,n){return BN(e,t,n,"weekdays")}function Dce(e,t,n){return BN(e,t,n,"weekdaysShort")}function Mce(e,t,n){return BN(e,t,n,"weekdaysMin")}Cl("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=fn(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});Te.lang=Is("moment.lang is deprecated. Use moment.locale instead.",Cl);Te.langData=Is("moment.langData is deprecated. Use moment.localeData instead.",To);var Wi=Math.abs;function Ace(){var e=this._data;return this._milliseconds=Wi(this._milliseconds),this._days=Wi(this._days),this._months=Wi(this._months),e.milliseconds=Wi(e.milliseconds),e.seconds=Wi(e.seconds),e.minutes=Wi(e.minutes),e.hours=Wi(e.hours),e.months=Wi(e.months),e.years=Wi(e.years),this}function hO(e,t,n,a){var r=oi(t,n);return e._milliseconds+=a*r._milliseconds,e._days+=a*r._days,e._months+=a*r._months,e._bubble()}function Ice(e,t){return hO(this,e,t,1)}function Oce(e,t){return hO(this,e,t,-1)}function n7(e){return e<0?Math.floor(e):Math.ceil(e)}function Pce(){var e=this._milliseconds,t=this._days,n=this._months,a=this._data,r,i,o,c,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=n7(w4(n)+t)*864e5,t=0,n=0),a.milliseconds=e%1e3,r=vs(e/1e3),a.seconds=r%60,i=vs(r/60),a.minutes=i%60,o=vs(i/60),a.hours=o%24,t+=vs(o/24),l=vs(gO(t)),n+=l,t-=n7(w4(l)),c=vs(n/12),n%=12,a.days=t,a.months=n,a.years=c,this}function gO(e){return e*4800/146097}function w4(e){return e*146097/4800}function Rce(e){if(!this.isValid())return NaN;var t,n,a=this._milliseconds;if(e=Os(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+a/864e5,n=this._months+gO(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(w4(this._months)),e){case"week":return t/7+a/6048e5;case"day":return t+a/864e5;case"hour":return t*24+a/36e5;case"minute":return t*1440+a/6e4;case"second":return t*86400+a/1e3;case"millisecond":return Math.floor(t*864e5)+a;default:throw new Error("Unknown unit "+e)}}function Lo(e){return function(){return this.as(e)}}var bO=Lo("ms"),jce=Lo("s"),zce=Lo("m"),Fce=Lo("h"),$ce=Lo("d"),Bce=Lo("w"),Hce=Lo("M"),Uce=Lo("Q"),Vce=Lo("y"),Wce=bO;function Yce(){return oi(this)}function Gce(e){return e=Os(e),this.isValid()?this[e+"s"]():NaN}function Vc(e){return function(){return this.isValid()?this._data[e]:NaN}}var qce=Vc("milliseconds"),Zce=Vc("seconds"),Qce=Vc("minutes"),Jce=Vc("hours"),Kce=Vc("days"),Xce=Vc("months"),ede=Vc("years");function tde(){return vs(this.days()/7)}var Ki=Math.round,eu={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nde(e,t,n,a,r){return r.relativeTime(t||1,!!n,e,a)}function ade(e,t,n,a){var r=oi(e).abs(),i=Ki(r.as("s")),o=Ki(r.as("m")),c=Ki(r.as("h")),l=Ki(r.as("d")),d=Ki(r.as("M")),u=Ki(r.as("w")),g=Ki(r.as("y")),y=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||o<=1&&["m"]||o<n.m&&["mm",o]||c<=1&&["h"]||c<n.h&&["hh",c]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(y=y||u<=1&&["w"]||u<n.w&&["ww",u]),y=y||d<=1&&["M"]||d<n.M&&["MM",d]||g<=1&&["y"]||["yy",g],y[2]=t,y[3]=+e>0,y[4]=a,nde.apply(null,y)}function rde(e){return e===void 0?Ki:typeof e=="function"?(Ki=e,!0):!1}function sde(e,t){return eu[e]===void 0?!1:t===void 0?eu[e]:(eu[e]=t,e==="s"&&(eu.ss=t-1),!0)}function ide(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,a=eu,r,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(a=Object.assign({},eu,t),t.s!=null&&t.ss==null&&(a.ss=t.s-1)),r=this.localeData(),i=ade(this,!n,a,r),n&&(i=r.pastFuture(+this,i)),r.postformat(i)}var yw=Math.abs;function pd(e){return(e>0)-(e<0)||+e}function Fy(){if(!this.isValid())return this.localeData().invalidDate();var e=yw(this._milliseconds)/1e3,t=yw(this._days),n=yw(this._months),a,r,i,o,c=this.asSeconds(),l,d,u,g;return c?(a=vs(e/60),r=vs(a/60),e%=60,a%=60,i=vs(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,""):"",l=c<0?"-":"",d=pd(this._months)!==pd(c)?"-":"",u=pd(this._days)!==pd(c)?"-":"",g=pd(this._milliseconds)!==pd(c)?"-":"",l+"P"+(i?d+i+"Y":"")+(n?d+n+"M":"")+(t?u+t+"D":"")+(r||a||e?"T":"")+(r?g+r+"H":"")+(a?g+a+"M":"")+(e?g+o+"S":"")):"P0D"}var yn=jy.prototype;yn.isValid=Xoe;yn.abs=Ace;yn.add=Ice;yn.subtract=Oce;yn.as=Rce;yn.asMilliseconds=bO;yn.asSeconds=jce;yn.asMinutes=zce;yn.asHours=Fce;yn.asDays=$ce;yn.asWeeks=Bce;yn.asMonths=Hce;yn.asQuarters=Uce;yn.asYears=Vce;yn.valueOf=Wce;yn._bubble=Pce;yn.clone=Yce;yn.get=Gce;yn.milliseconds=qce;yn.seconds=Zce;yn.minutes=Qce;yn.hours=Jce;yn.days=Kce;yn.weeks=tde;yn.months=Xce;yn.years=ede;yn.humanize=ide;yn.toISOString=Fy;yn.toString=Fy;yn.toJSON=Fy;yn.locale=rO;yn.localeData=iO;yn.toIsoString=Is("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fy);yn.lang=sO;Ct("X",0,0,"unix");Ct("x",0,0,"valueOf");yt("x",Iy);yt("X",Eie);jn("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});jn("x",function(e,t,n){n._d=new Date(fn(e))});//! moment.js
Te.version="2.30.1";oie(Qn);Te.fn=tt;Te.min=Zoe;Te.max=Qoe;Te.now=Joe;Te.utc=Pi;Te.unix=kce;Te.months=Ece;Te.isDate=rh;Te.locale=Cl;Te.invalid=Ly;Te.duration=oi;Te.isMoment=ri;Te.weekdays=Lce;Te.parseZone=Cce;Te.localeData=To;Te.isDuration=Eg;Te.monthsShort=Tce;Te.weekdaysMin=Mce;Te.defineLocale=IN;Te.updateLocale=Coe;Te.locales=Eoe;Te.weekdaysShort=Dce;Te.normalizeUnits=Os;Te.relativeTimeRounding=rde;Te.relativeTimeThreshold=sde;Te.calendarFormat=_le;Te.prototype=tt;Te.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};let xw=new _e;function a7({showModal:e,modalShowTitle:t,modalShowMessage:n,type:a,modalBtnText:r,itemId:i,itemId2:o,table1:c,table2:l,backTo:d}){const{dispatch:u}=R.useContext(we),{dispatch:g}=R.useContext(Ee),y=je();return s(Se,{children:e?f(Se,{children:[s("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto overflow-x-hidden outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-auto max-w-3xl md:min-w-[35rem]",children:f("div",{className:"relative flex w-full flex-col rounded-lg border-0 bg-white shadow-lg outline-none focus:outline-none",children:[f("div",{className:"flex items-start justify-between rounded-t border-solid border-slate-200 px-5 pt-6",children:[s("h3",{className:"text-xl font-semibold",children:t}),s("button",{className:"float-right ml-auto border-0 bg-transparent p-1 text-3xl font-semibold leading-none text-black outline-none focus:outline-none",onClick:()=>u({type:"SHOWMODAL",payload:{showModal:!1,modalShowMessage:"",modalBtnText:""}}),children:s("span",{className:"block h-6 w-6 bg-transparent text-2xl text-black outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:"relative flex-auto px-6 py-2",children:s("p",{className:"text-lg my-2 normal-case leading-relaxed text-slate-500",children:n})}),f("div",{className:"flex items-center justify-end rounded-b border-solid border-slate-200 px-6 pb-6",children:[s("button",{className:"background-transparent mr-1 mb-1 rounded border border-[##98A2B3] px-6 py-2 text-sm font-bold text-[#667085] outline-none focus:outline-none",type:"button",onClick:()=>{u({type:"SHOWMODAL",payload:{showModal:!1,modalShowMessage:"",modalBtnText:""}}),a!=="Delete"&&u({type:"SHOWMODAL",payload:{showModal:!1,modalShowMessage:"You are about to log out."}})},children:"Cancel"}),s("button",{className:"ml-5 mb-1 rounded border border-[##98A2B3] !bg-gradient-to-r from-primary to-primary-dark px-6 py-2 text-sm font-medium text-white outline-none focus:outline-none",type:"button",onClick:async()=>{if(u({type:"SHOWMODAL",payload:{showModal:!1,modalShowMessage:"",modalBtnText:"",itemId:"",itemId2:"",table1:"",table2:""}}),a=="Delete"){try{await xw.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:i,entity:c,type:"delete"},"POST"),pe(u,"Successful"),u({type:"DELETED",payload:{deleted:!0}}),d&&y(d)}catch(w){pe(u,w.message,4e3,"ERROR")}return}if(a=="BaasDelete"){try{xw.setTable(c),await xw.callRestAPI({id:i,deleted_at:Te().format("yyyy-MM-DD HH:mm:ss")},"PUT"),pe(u,"Successful"),u({type:"DELETED",payload:{deleted:!0}}),d&&y(d)}catch(w){pe(u,w.message,4e3,"ERROR")}return}if(a==="Edit"){u({type:"SAVE_CHANGES",payload:{saveChanges:!0}});return}g({type:"LOGOUT"}),y("/admin/login")},children:r})]})]})})}),s("div",{className:"fixed inset-0 z-40 bg-black opacity-25"})]}):null})}function r7({showReview:e,review:t}){const{dispatch:n}=R.useContext(we),a=Array(5).fill(0),[r,i]=R.useState([]),[o,c]=R.useState(""),[l,d]=R.useState(!1),[u,g]=R.useState(!1);let y=new _e;async function w(p){y.setTable("review"),g(!0);try{(await y.callRestAPI({id:p,status:1},"PUT")).error||(pe(n,"Review accepted",4e3,"Success"),n({type:"SHOW_REVIEW",payload:{showReview:!1,review:""}}))}catch(b){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:b.message}})}g(!1)}async function v(p){var b;if(o.length<1)pe(n,"Please add a reason for declining review",4e3,"ERROR");else{y.setTable("review"),d(!0);try{(await y.callRestAPI({id:p.id,status:2},"PUT")).error||(pe(n,"Review declined",4e3,"Error"),n({type:"SHOW_REVIEW",payload:{showReview:!1,review:""}}),S(p.given_by==="host"?p.host_id:p.customer_id,(b=p==null?void 0:p.property_name)!=null?b:"property_name"))}catch(x){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:x.message}})}d(!1)}}async function S(p,b){var x;try{const k=await y.callRawAPI("/v2/api/custom/ergo/get-user",{id:p},"POST");if(!k.error){const N=await y.getEmailTemplate("customer-review-declined"),_=(x=N.html)==null?void 0:x.replace(new RegExp("{{{reason}}}","g"),o).replace(new RegExp("{{{property_name}}}"),b);await y.sendEmail(k.email,N.subject,_)}}catch(k){console.log("ERROR",k)}}async function m(){try{const p=await y.callRawAPI("/v2/api/custom/ergo/review/get-hashtag",{where:[`review_id=${t==null?void 0:t.id}`]},"POST");!p.error&&(p==null?void 0:p.list)&&i(p.list)}catch{}}return R.useEffect(()=>{m()},[t==null?void 0:t.id]),s(Se,{children:e?f(Se,{children:[s("div",{className:"justify-center items-center flex overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-[510px] max-w-[510px]",children:f("div",{className:"border-0 rounded-lg shadow-lg relative flex flex-col bg-white outline-none focus:outline-none",children:[f("div",{className:"flex w-11/12 mx-auto items-center justify-between pt-6 border-solid border-slate-200 rounded-t",children:[s("h3",{className:"text-md font-bold",children:"Review details"}),s("button",{className:"ml-auto bg-transparent border-0 text-black text-3xl leading-none font-semibold outline-none focus:outline-none",onClick:()=>n({type:"SHOW_REVIEW",payload:{showReview:!1,review:""}}),children:s("span",{className:"bg-transparent text-black h-6 w-6 text-2xl block outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:" w-11/12 my-3 mx-auto bg-gray-200 h-[1px]"}),f("div",{className:"relative px-6 py-2 flex-auto",children:[(t==null?void 0:t.type)==="received"&&f("p",{className:"text-[#475467] mb-[2px] text-sm font-medium",children:["Reviewed By: ",t==null?void 0:t.given_by]}),f("p",{className:"text-[#475467] my-[2px] text-sm font-medium",children:["Review posted on: ",t==null?void 0:t.create_at]}),f("p",{className:"text-[#475467] my-[2px] text-sm font-medium",children:["Space name: ",t==null?void 0:t.category]}),f("p",{className:"text-[#475467] my-[2px] text-sm font-medium",children:["Booking: #",t==null?void 0:t.booking_id,s($e,{className:"underline ml-1",to:`/admin/view-booking/${t==null?void 0:t.booking_id}`,onClick:()=>n({type:"SHOW_REVIEW",payload:{showReview:!1,review:""}}),children:"(view details)"})]}),s("p",{className:"text-lg font-bold mt-[14px]",children:"Rating"}),s("p",{className:"flex w-1/3 justify-between py-2",children:a.map((p,b)=>s(ln,{type:"star",className:(t==null?void 0:t.rating)>b?"stroke-[#FEC84B] fill-[#FEC84B]":"stroke-[#98A2B3]"},b))}),s("p",{className:"text-lg font-bold mt-[14px]",children:"Hashtags"}),s("div",{className:"flex py-2",children:r.map(p=>s("span",{className:"py-2 px-3 mr-2 rounded bg-[#EAECF0]",children:p.name},p.id))}),s("p",{className:"text-lg font-bold mt-[14px]",children:"Comment"}),s("p",{className:"mt-[2px] text-sm text-[#475467]",children:t==null?void 0:t.comment}),f("div",{className:"grid mt-3",children:[s("label",{className:"font-bold",children:"Reason (optional for declining)"}),s("input",{type:"text",maxLength:50,value:o,onChange:p=>c(p.target.value),required:!0,className:" border mt-2 rounded-lg mt-1 p-2 max-w-xs h-[200px]"})]})]}),f("div",{className:"text-center my-8 flex px-6 gap-4",children:[s(Ft,{type:"button",loading:u,className:"border-[#98A2B3] border-2 text-black tracking-wide outline-none focus:outline-none rounded py-2 mt-4 flex-grow",onClick:p=>{w(t==null?void 0:t.id)},children:"Accept"}),s(Ft,{type:"button",loading:l,className:"bg-[#D92D20] text-white tracking-wide outline-none focus:outline-none rounded py-2 mt-4 flex-grow",onClick:p=>{v(t)},children:"Decline"})]}),s("div",{className:"flex px-6 pb-6 border-solid border-slate-200 rounded-b",children:s("button",{className:"text-[#667085] background-transparent font-semibold flex-1 px-6 py-2 text-sm outline-none focus:outline-none mr-1 mb-1 border border-[##98A2B3] rounded",type:"button",onClick:()=>{n({type:"SHOW_REVIEW",payload:{showReview:!1,review:""}})},children:"Close"})})]})})}),s("div",{className:"opacity-25 fixed inset-0 z-40 bg-black"})]}):null})}var s7=function(e,t,n){if(e&&"reportValidity"in e){var a=st(n,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},yO=function(e,t){var n=function(r){var i=t.fields[r];i&&i.ref&&"reportValidity"in i.ref?s7(i.ref,r,e):i.refs&&i.refs.forEach(function(o){return s7(o,r,e)})};for(var a in t.fields)n(a)},ode=function(e,t){t.shouldUseNativeValidation&&yO(e,t);var n={};for(var a in e){var r=st(t.fields,a);Dn(n,a,Object.assign(e[a],{ref:r&&r.ref}))}return n},Xe=function(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),function(a,r,i){try{return Promise.resolve(function(o,c){try{var l=(t.context,Promise.resolve(e[n.mode==="sync"?"validateSync":"validate"](a,Object.assign({abortEarly:!1},t,{context:r}))).then(function(d){return i.shouldUseNativeValidation&&yO({},i),{values:n.rawValues?a:d,errors:{}}}))}catch(d){return c(d)}return l&&l.then?l.then(void 0,c):l}(0,function(o){if(!o.inner)throw o;return{values:{},errors:ode((c=o,l=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(c.inner||[]).reduce(function(d,u){if(d[u.path]||(d[u.path]={message:u.message,type:u.type}),l){var g=d[u.path].types,y=g&&g[u.type];d[u.path]=eA(u.path,l,d,u.type,y?[].concat(y,u.message):u.message)}return d},{})),i)};var c,l}))}catch(o){return Promise.reject(o)}}},v4;try{v4=Map}catch{}var _4;try{_4=Set}catch{}function xO(e,t,n){if(!e||typeof e!="object"||typeof e=="function")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(N4);if(v4&&e instanceof v4)return new Map(Array.from(e.entries()));if(_4&&e instanceof _4)return new Set(Array.from(e.values()));if(e instanceof Object){t.push(e);var a=Object.create(e);n.push(a);for(var r in e){var i=t.findIndex(function(o){return o===e[r]});a[r]=i>-1?n[i]:xO(e[r],t,n)}return a}return e}function N4(e){return xO(e,[],[])}const lde=Object.prototype.toString,cde=Error.prototype.toString,dde=RegExp.prototype.toString,ude=typeof Symbol!="undefined"?Symbol.prototype.toString:()=>"",fde=/^Symbol\((.*)\)(.*)$/;function mde(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function i7(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return mde(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return ude.call(e).replace(fde,"Symbol($1)");const a=lde.call(e).slice(8,-1);return a==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):a==="Error"||e instanceof Error?"["+cde.call(e)+"]":a==="RegExp"?dde.call(e):null}function xp(e,t){let n=i7(e,t);return n!==null?n:JSON.stringify(e,function(a,r){let i=i7(this[a],t);return i!==null?i:r},2)}let oc={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:a})=>{let r=a!=null&&a!==n,i=`${e} must be a \`${t}\` type, but the final value was: \`${xp(n,!0)}\``+(r?` (cast from the value \`${xp(a,!0)}\`).`:".");return n===null&&(i+='\n If "null" is intended as an empty value be sure to mark the schema as `.nullable()`'),i},defined:"${path} must be defined"},Bs={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"},Ko={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"},S4={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},pde={isValue:"${path} field must be ${value}"},k4={noUnknown:"${path} field has unspecified keys: ${unknown}"},hde={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"};Object.assign(Object.create(null),{mixed:oc,string:Bs,number:Ko,date:S4,object:k4,array:hde,boolean:pde});var gde=Object.prototype,bde=gde.hasOwnProperty;function yde(e,t){return e!=null&&bde.call(e,t)}var xde=yde,wde=Array.isArray,Hl=wde,vde=typeof sn=="object"&&sn&&sn.Object===Object&&sn,wO=vde,_de=wO,Nde=typeof self=="object"&&self&&self.Object===Object&&self,Sde=_de||Nde||Function("return this")(),Do=Sde,kde=Do,Cde=kde.Symbol,$y=Cde,o7=$y,vO=Object.prototype,Ede=vO.hasOwnProperty,Tde=vO.toString,am=o7?o7.toStringTag:void 0;function Lde(e){var t=Ede.call(e,am),n=e[am];try{e[am]=void 0;var a=!0}catch{}var r=Tde.call(e);return a&&(t?e[am]=n:delete e[am]),r}var Dde=Lde,Mde=Object.prototype,Ade=Mde.toString;function Ide(e){return Ade.call(e)}var Ode=Ide,l7=$y,Pde=Dde,Rde=Ode,jde="[object Null]",zde="[object Undefined]",c7=l7?l7.toStringTag:void 0;function Fde(e){return e==null?e===void 0?zde:jde:c7&&c7 in Object(e)?Pde(e):Rde(e)}var lh=Fde;function $de(e){return e!=null&&typeof e=="object"}var ch=$de,Bde=lh,Hde=ch,Ude="[object Symbol]";function Vde(e){return typeof e=="symbol"||Hde(e)&&Bde(e)==Ude}var HN=Vde,Wde=Hl,Yde=HN,Gde=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qde=/^\w*$/;function Zde(e,t){if(Wde(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Yde(e)?!0:qde.test(e)||!Gde.test(e)||t!=null&&e in Object(t)}var UN=Zde;function Qde(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var VN=Qde,Jde=lh,Kde=VN,Xde="[object AsyncFunction]",eue="[object Function]",tue="[object GeneratorFunction]",nue="[object Proxy]";function aue(e){if(!Kde(e))return!1;var t=Jde(e);return t==eue||t==tue||t==Xde||t==nue}var _O=aue,rue=Do,sue=rue["__core-js_shared__"],iue=sue,ww=iue,d7=function(){var e=/[^.]+$/.exec(ww&&ww.keys&&ww.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function oue(e){return!!d7&&d7 in e}var lue=oue,cue=Function.prototype,due=cue.toString;function uue(e){if(e!=null){try{return due.call(e)}catch{}try{return e+""}catch{}}return""}var NO=uue,fue=_O,mue=lue,pue=VN,hue=NO,gue=/[\\^$.*+?()[\]{}|]/g,bue=/^\[object .+?Constructor\]$/,yue=Function.prototype,xue=Object.prototype,wue=yue.toString,vue=xue.hasOwnProperty,_ue=RegExp("^"+wue.call(vue).replace(gue,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nue(e){if(!pue(e)||mue(e))return!1;var t=fue(e)?_ue:bue;return t.test(hue(e))}var Sue=Nue;function kue(e,t){return e==null?void 0:e[t]}var Cue=kue,Eue=Sue,Tue=Cue;function Lue(e,t){var n=Tue(e,t);return Eue(n)?n:void 0}var Wc=Lue,Due=Wc,Mue=Due(Object,"create"),By=Mue,u7=By;function Aue(){this.__data__=u7?u7(null):{},this.size=0}var Iue=Aue;function Oue(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Pue=Oue,Rue=By,jue="__lodash_hash_undefined__",zue=Object.prototype,Fue=zue.hasOwnProperty;function $ue(e){var t=this.__data__;if(Rue){var n=t[e];return n===jue?void 0:n}return Fue.call(t,e)?t[e]:void 0}var Bue=$ue,Hue=By,Uue=Object.prototype,Vue=Uue.hasOwnProperty;function Wue(e){var t=this.__data__;return Hue?t[e]!==void 0:Vue.call(t,e)}var Yue=Wue,Gue=By,que="__lodash_hash_undefined__";function Zue(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Gue&&t===void 0?que:t,this}var Que=Zue,Jue=Iue,Kue=Pue,Xue=Bue,efe=Yue,tfe=Que;function hf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}hf.prototype.clear=Jue;hf.prototype.delete=Kue;hf.prototype.get=Xue;hf.prototype.has=efe;hf.prototype.set=tfe;var nfe=hf;function afe(){this.__data__=[],this.size=0}var rfe=afe;function sfe(e,t){return e===t||e!==e&&t!==t}var SO=sfe,ife=SO;function ofe(e,t){for(var n=e.length;n--;)if(ife(e[n][0],t))return n;return-1}var Hy=ofe,lfe=Hy,cfe=Array.prototype,dfe=cfe.splice;function ufe(e){var t=this.__data__,n=lfe(t,e);if(n<0)return!1;var a=t.length-1;return n==a?t.pop():dfe.call(t,n,1),--this.size,!0}var ffe=ufe,mfe=Hy;function pfe(e){var t=this.__data__,n=mfe(t,e);return n<0?void 0:t[n][1]}var hfe=pfe,gfe=Hy;function bfe(e){return gfe(this.__data__,e)>-1}var yfe=bfe,xfe=Hy;function wfe(e,t){var n=this.__data__,a=xfe(n,e);return a<0?(++this.size,n.push([e,t])):n[a][1]=t,this}var vfe=wfe,_fe=rfe,Nfe=ffe,Sfe=hfe,kfe=yfe,Cfe=vfe;function gf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}gf.prototype.clear=_fe;gf.prototype.delete=Nfe;gf.prototype.get=Sfe;gf.prototype.has=kfe;gf.prototype.set=Cfe;var Uy=gf,Efe=Wc,Tfe=Do,Lfe=Efe(Tfe,"Map"),WN=Lfe,f7=nfe,Dfe=Uy,Mfe=WN;function Afe(){this.size=0,this.__data__={hash:new f7,map:new(Mfe||Dfe),string:new f7}}var Ife=Afe;function Ofe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Pfe=Ofe,Rfe=Pfe;function jfe(e,t){var n=e.__data__;return Rfe(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Vy=jfe,zfe=Vy;function Ffe(e){var t=zfe(this,e).delete(e);return this.size-=t?1:0,t}var $fe=Ffe,Bfe=Vy;function Hfe(e){return Bfe(this,e).get(e)}var Ufe=Hfe,Vfe=Vy;function Wfe(e){return Vfe(this,e).has(e)}var Yfe=Wfe,Gfe=Vy;function qfe(e,t){var n=Gfe(this,e),a=n.size;return n.set(e,t),this.size+=n.size==a?0:1,this}var Zfe=qfe,Qfe=Ife,Jfe=$fe,Kfe=Ufe,Xfe=Yfe,eme=Zfe;function bf(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var a=e[t];this.set(a[0],a[1])}}bf.prototype.clear=Qfe;bf.prototype.delete=Jfe;bf.prototype.get=Kfe;bf.prototype.has=Xfe;bf.prototype.set=eme;var YN=bf,kO=YN,tme="Expected a function";function GN(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(tme);var n=function(){var a=arguments,r=t?t.apply(this,a):a[0],i=n.cache;if(i.has(r))return i.get(r);var o=e.apply(this,a);return n.cache=i.set(r,o)||i,o};return n.cache=new(GN.Cache||kO),n}GN.Cache=kO;var nme=GN,ame=nme,rme=500;function sme(e){var t=ame(e,function(a){return n.size===rme&&n.clear(),a}),n=t.cache;return t}var ime=sme,ome=ime,lme=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cme=/\\(\\)?/g,dme=ome(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(lme,function(n,a,r,i){t.push(r?i.replace(cme,"$1"):a||n)}),t}),ume=dme;function fme(e,t){for(var n=-1,a=e==null?0:e.length,r=Array(a);++n<a;)r[n]=t(e[n],n,e);return r}var mme=fme,m7=$y,pme=mme,hme=Hl,gme=HN,bme=1/0,p7=m7?m7.prototype:void 0,h7=p7?p7.toString:void 0;function CO(e){if(typeof e=="string")return e;if(hme(e))return pme(e,CO)+"";if(gme(e))return h7?h7.call(e):"";var t=e+"";return t=="0"&&1/e==-bme?"-0":t}var yme=CO,xme=yme;function wme(e){return e==null?"":xme(e)}var dh=wme,vme=Hl,_me=UN,Nme=ume,Sme=dh;function kme(e,t){return vme(e)?e:_me(e,t)?[e]:Nme(Sme(e))}var EO=kme,Cme=lh,Eme=ch,Tme="[object Arguments]";function Lme(e){return Eme(e)&&Cme(e)==Tme}var Dme=Lme,g7=Dme,Mme=ch,TO=Object.prototype,Ame=TO.hasOwnProperty,Ime=TO.propertyIsEnumerable,Ome=g7(function(){return arguments}())?g7:function(e){return Mme(e)&&Ame.call(e,"callee")&&!Ime.call(e,"callee")},LO=Ome,Pme=9007199254740991,Rme=/^(?:0|[1-9]\d*)$/;function jme(e,t){var n=typeof e;return t=t==null?Pme:t,!!t&&(n=="number"||n!="symbol"&&Rme.test(e))&&e>-1&&e%1==0&&e<t}var DO=jme,zme=9007199254740991;function Fme(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zme}var qN=Fme,$me=HN,Bme=1/0;function Hme(e){if(typeof e=="string"||$me(e))return e;var t=e+"";return t=="0"&&1/e==-Bme?"-0":t}var Wy=Hme,Ume=EO,Vme=LO,Wme=Hl,Yme=DO,Gme=qN,qme=Wy;function Zme(e,t,n){t=Ume(t,e);for(var a=-1,r=t.length,i=!1;++a<r;){var o=qme(t[a]);if(!(i=e!=null&&n(e,o)))break;e=e[o]}return i||++a!=r?i:(r=e==null?0:e.length,!!r&&Gme(r)&&Yme(o,r)&&(Wme(e)||Vme(e)))}var MO=Zme,Qme=xde,Jme=MO;function Kme(e,t){return e!=null&&Jme(e,t,Qme)}var $1=Kme;const AO=e=>e&&e.__isYupSchema__;class Xme{constructor(t,n){if(this.fn=void 0,this.refs=t,this.refs=t,typeof n=="function"){this.fn=n;return}if(!$1(n,"is"))throw new TypeError("`is:` is required for `when()` conditions");if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:a,then:r,otherwise:i}=n,o=typeof a=="function"?a:(...c)=>c.every(l=>l===a);this.fn=function(...c){let l=c.pop(),d=c.pop(),u=o(...c)?r:i;if(!!u)return typeof u=="function"?u(d):d.concat(u.resolve(l))}}resolve(t,n){let a=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),r=this.fn.apply(t,a.concat(t,n));if(r===void 0||r===t)return t;if(!AO(r))throw new TypeError("conditions must return a schema object");return r.resolve(n)}}function IO(e){return e==null?[]:[].concat(e)}function C4(){return C4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},C4.apply(this,arguments)}let epe=/\$\{\s*(\w+)\s*\}/g;class Jr extends Error{static formatError(t,n){const a=n.label||n.path||"this";return a!==n.path&&(n=C4({},n,{path:a})),typeof t=="string"?t.replace(epe,(r,i)=>xp(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,a,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=n,this.path=a,this.type=r,this.errors=[],this.inner=[],IO(t).forEach(i=>{Jr.isError(i)?(this.errors.push(...i.errors),this.inner=this.inner.concat(i.inner.length?i.inner:i)):this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,Jr)}}const tpe=e=>{let t=!1;return(...n)=>{t||(t=!0,e(...n))}};function E4(e,t){let{endEarly:n,tests:a,args:r,value:i,errors:o,sort:c,path:l}=e,d=tpe(t),u=a.length;const g=[];if(o=o||[],!u)return o.length?d(new Jr(o,i,l)):d(null,i);for(let y=0;y<a.length;y++){const w=a[y];w(r,function(S){if(S){if(!Jr.isError(S))return d(S,i);if(n)return S.value=i,d(S,i);g.push(S)}if(--u<=0){if(g.length&&(c&&g.sort(c),o.length&&g.push(...o),o=g),o.length){d(new Jr(o,i,l),i);return}d(null,i)}})}}var npe=Wc,ape=function(){try{var e=npe(Object,"defineProperty");return e({},"",{}),e}catch{}}(),rpe=ape,b7=rpe;function spe(e,t,n){t=="__proto__"&&b7?b7(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var OO=spe;function ipe(e){return function(t,n,a){for(var r=-1,i=Object(t),o=a(t),c=o.length;c--;){var l=o[e?c:++r];if(n(i[l],l,i)===!1)break}return t}}var ope=ipe,lpe=ope,cpe=lpe(),dpe=cpe;function upe(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var fpe=upe,B1={exports:{}};function mpe(){return!1}var ppe=mpe;(function(e,t){var n=Do,a=ppe,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,c=o?n.Buffer:void 0,l=c?c.isBuffer:void 0,d=l||a;e.exports=d})(B1,B1.exports);var hpe=lh,gpe=qN,bpe=ch,ype="[object Arguments]",xpe="[object Array]",wpe="[object Boolean]",vpe="[object Date]",_pe="[object Error]",Npe="[object Function]",Spe="[object Map]",kpe="[object Number]",Cpe="[object Object]",Epe="[object RegExp]",Tpe="[object Set]",Lpe="[object String]",Dpe="[object WeakMap]",Mpe="[object ArrayBuffer]",Ape="[object DataView]",Ipe="[object Float32Array]",Ope="[object Float64Array]",Ppe="[object Int8Array]",Rpe="[object Int16Array]",jpe="[object Int32Array]",zpe="[object Uint8Array]",Fpe="[object Uint8ClampedArray]",$pe="[object Uint16Array]",Bpe="[object Uint32Array]",Gn={};Gn[Ipe]=Gn[Ope]=Gn[Ppe]=Gn[Rpe]=Gn[jpe]=Gn[zpe]=Gn[Fpe]=Gn[$pe]=Gn[Bpe]=!0;Gn[ype]=Gn[xpe]=Gn[Mpe]=Gn[wpe]=Gn[Ape]=Gn[vpe]=Gn[_pe]=Gn[Npe]=Gn[Spe]=Gn[kpe]=Gn[Cpe]=Gn[Epe]=Gn[Tpe]=Gn[Lpe]=Gn[Dpe]=!1;function Hpe(e){return bpe(e)&&gpe(e.length)&&!!Gn[hpe(e)]}var Upe=Hpe;function Vpe(e){return function(t){return e(t)}}var Wpe=Vpe,T4={exports:{}};(function(e,t){var n=wO,a=t&&!t.nodeType&&t,r=a&&!0&&e&&!e.nodeType&&e,i=r&&r.exports===a,o=i&&n.process,c=function(){try{var l=r&&r.require&&r.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=c})(T4,T4.exports);var Ype=Upe,Gpe=Wpe,y7=T4.exports,x7=y7&&y7.isTypedArray,qpe=x7?Gpe(x7):Ype,PO=qpe,Zpe=fpe,Qpe=LO,Jpe=Hl,Kpe=B1.exports,Xpe=DO,ehe=PO,the=Object.prototype,nhe=the.hasOwnProperty;function ahe(e,t){var n=Jpe(e),a=!n&&Qpe(e),r=!n&&!a&&Kpe(e),i=!n&&!a&&!r&&ehe(e),o=n||a||r||i,c=o?Zpe(e.length,String):[],l=c.length;for(var d in e)(t||nhe.call(e,d))&&!(o&&(d=="length"||r&&(d=="offset"||d=="parent")||i&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||Xpe(d,l)))&&c.push(d);return c}var rhe=ahe,she=Object.prototype;function ihe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||she;return e===n}var ohe=ihe;function lhe(e,t){return function(n){return e(t(n))}}var che=lhe,dhe=che,uhe=dhe(Object.keys,Object),fhe=uhe,mhe=ohe,phe=fhe,hhe=Object.prototype,ghe=hhe.hasOwnProperty;function bhe(e){if(!mhe(e))return phe(e);var t=[];for(var n in Object(e))ghe.call(e,n)&&n!="constructor"&&t.push(n);return t}var yhe=bhe,xhe=_O,whe=qN;function vhe(e){return e!=null&&whe(e.length)&&!xhe(e)}var _he=vhe,Nhe=rhe,She=yhe,khe=_he;function Che(e){return khe(e)?Nhe(e):She(e)}var ZN=Che,Ehe=dpe,The=ZN;function Lhe(e,t){return e&&Ehe(e,t,The)}var RO=Lhe,Dhe=Uy;function Mhe(){this.__data__=new Dhe,this.size=0}var Ahe=Mhe;function Ihe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Ohe=Ihe;function Phe(e){return this.__data__.get(e)}var Rhe=Phe;function jhe(e){return this.__data__.has(e)}var zhe=jhe,Fhe=Uy,$he=WN,Bhe=YN,Hhe=200;function Uhe(e,t){var n=this.__data__;if(n instanceof Fhe){var a=n.__data__;if(!$he||a.length<Hhe-1)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new Bhe(a)}return n.set(e,t),this.size=n.size,this}var Vhe=Uhe,Whe=Uy,Yhe=Ahe,Ghe=Ohe,qhe=Rhe,Zhe=zhe,Qhe=Vhe;function yf(e){var t=this.__data__=new Whe(e);this.size=t.size}yf.prototype.clear=Yhe;yf.prototype.delete=Ghe;yf.prototype.get=qhe;yf.prototype.has=Zhe;yf.prototype.set=Qhe;var jO=yf,Jhe="__lodash_hash_undefined__";function Khe(e){return this.__data__.set(e,Jhe),this}var Xhe=Khe;function e0e(e){return this.__data__.has(e)}var t0e=e0e,n0e=YN,a0e=Xhe,r0e=t0e;function H1(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new n0e;++t<n;)this.add(e[t])}H1.prototype.add=H1.prototype.push=a0e;H1.prototype.has=r0e;var s0e=H1;function i0e(e,t){for(var n=-1,a=e==null?0:e.length;++n<a;)if(t(e[n],n,e))return!0;return!1}var o0e=i0e;function l0e(e,t){return e.has(t)}var c0e=l0e,d0e=s0e,u0e=o0e,f0e=c0e,m0e=1,p0e=2;function h0e(e,t,n,a,r,i){var o=n&m0e,c=e.length,l=t.length;if(c!=l&&!(o&&l>c))return!1;var d=i.get(e),u=i.get(t);if(d&&u)return d==t&&u==e;var g=-1,y=!0,w=n&p0e?new d0e:void 0;for(i.set(e,t),i.set(t,e);++g<c;){var v=e[g],S=t[g];if(a)var m=o?a(S,v,g,t,e,i):a(v,S,g,e,t,i);if(m!==void 0){if(m)continue;y=!1;break}if(w){if(!u0e(t,function(p,b){if(!f0e(w,b)&&(v===p||r(v,p,n,a,i)))return w.push(b)})){y=!1;break}}else if(!(v===S||r(v,S,n,a,i))){y=!1;break}}return i.delete(e),i.delete(t),y}var zO=h0e,g0e=Do,b0e=g0e.Uint8Array,y0e=b0e;function x0e(e){var t=-1,n=Array(e.size);return e.forEach(function(a,r){n[++t]=[r,a]}),n}var w0e=x0e;function v0e(e){var t=-1,n=Array(e.size);return e.forEach(function(a){n[++t]=a}),n}var _0e=v0e,w7=$y,v7=y0e,N0e=SO,S0e=zO,k0e=w0e,C0e=_0e,E0e=1,T0e=2,L0e="[object Boolean]",D0e="[object Date]",M0e="[object Error]",A0e="[object Map]",I0e="[object Number]",O0e="[object RegExp]",P0e="[object Set]",R0e="[object String]",j0e="[object Symbol]",z0e="[object ArrayBuffer]",F0e="[object DataView]",_7=w7?w7.prototype:void 0,vw=_7?_7.valueOf:void 0;function $0e(e,t,n,a,r,i,o){switch(n){case F0e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case z0e:return!(e.byteLength!=t.byteLength||!i(new v7(e),new v7(t)));case L0e:case D0e:case I0e:return N0e(+e,+t);case M0e:return e.name==t.name&&e.message==t.message;case O0e:case R0e:return e==t+"";case A0e:var c=k0e;case P0e:var l=a&E0e;if(c||(c=C0e),e.size!=t.size&&!l)return!1;var d=o.get(e);if(d)return d==t;a|=T0e,o.set(e,t);var u=S0e(c(e),c(t),a,r,i,o);return o.delete(e),u;case j0e:if(vw)return vw.call(e)==vw.call(t)}return!1}var B0e=$0e;function H0e(e,t){for(var n=-1,a=t.length,r=e.length;++n<a;)e[r+n]=t[n];return e}var U0e=H0e,V0e=U0e,W0e=Hl;function Y0e(e,t,n){var a=t(e);return W0e(e)?a:V0e(a,n(e))}var G0e=Y0e;function q0e(e,t){for(var n=-1,a=e==null?0:e.length,r=0,i=[];++n<a;){var o=e[n];t(o,n,e)&&(i[r++]=o)}return i}var Z0e=q0e;function Q0e(){return[]}var J0e=Q0e,K0e=Z0e,X0e=J0e,ege=Object.prototype,tge=ege.propertyIsEnumerable,N7=Object.getOwnPropertySymbols,nge=N7?function(e){return e==null?[]:(e=Object(e),K0e(N7(e),function(t){return tge.call(e,t)}))}:X0e,age=nge,rge=G0e,sge=age,ige=ZN;function oge(e){return rge(e,ige,sge)}var lge=oge,S7=lge,cge=1,dge=Object.prototype,uge=dge.hasOwnProperty;function fge(e,t,n,a,r,i){var o=n&cge,c=S7(e),l=c.length,d=S7(t),u=d.length;if(l!=u&&!o)return!1;for(var g=l;g--;){var y=c[g];if(!(o?y in t:uge.call(t,y)))return!1}var w=i.get(e),v=i.get(t);if(w&&v)return w==t&&v==e;var S=!0;i.set(e,t),i.set(t,e);for(var m=o;++g<l;){y=c[g];var p=e[y],b=t[y];if(a)var x=o?a(b,p,y,t,e,i):a(p,b,y,e,t,i);if(!(x===void 0?p===b||r(p,b,n,a,i):x)){S=!1;break}m||(m=y=="constructor")}if(S&&!m){var k=e.constructor,N=t.constructor;k!=N&&"constructor"in e&&"constructor"in t&&!(typeof k=="function"&&k instanceof k&&typeof N=="function"&&N instanceof N)&&(S=!1)}return i.delete(e),i.delete(t),S}var mge=fge,pge=Wc,hge=Do,gge=pge(hge,"DataView"),bge=gge,yge=Wc,xge=Do,wge=yge(xge,"Promise"),vge=wge,_ge=Wc,Nge=Do,Sge=_ge(Nge,"Set"),kge=Sge,Cge=Wc,Ege=Do,Tge=Cge(Ege,"WeakMap"),Lge=Tge,L4=bge,D4=WN,M4=vge,A4=kge,I4=Lge,FO=lh,xf=NO,k7="[object Map]",Dge="[object Object]",C7="[object Promise]",E7="[object Set]",T7="[object WeakMap]",L7="[object DataView]",Mge=xf(L4),Age=xf(D4),Ige=xf(M4),Oge=xf(A4),Pge=xf(I4),lc=FO;(L4&&lc(new L4(new ArrayBuffer(1)))!=L7||D4&&lc(new D4)!=k7||M4&&lc(M4.resolve())!=C7||A4&&lc(new A4)!=E7||I4&&lc(new I4)!=T7)&&(lc=function(e){var t=FO(e),n=t==Dge?e.constructor:void 0,a=n?xf(n):"";if(a)switch(a){case Mge:return L7;case Age:return k7;case Ige:return C7;case Oge:return E7;case Pge:return T7}return t});var Rge=lc,_w=jO,jge=zO,zge=B0e,Fge=mge,D7=Rge,M7=Hl,A7=B1.exports,$ge=PO,Bge=1,I7="[object Arguments]",O7="[object Array]",S0="[object Object]",Hge=Object.prototype,P7=Hge.hasOwnProperty;function Uge(e,t,n,a,r,i){var o=M7(e),c=M7(t),l=o?O7:D7(e),d=c?O7:D7(t);l=l==I7?S0:l,d=d==I7?S0:d;var u=l==S0,g=d==S0,y=l==d;if(y&&A7(e)){if(!A7(t))return!1;o=!0,u=!1}if(y&&!u)return i||(i=new _w),o||$ge(e)?jge(e,t,n,a,r,i):zge(e,t,l,n,a,r,i);if(!(n&Bge)){var w=u&&P7.call(e,"__wrapped__"),v=g&&P7.call(t,"__wrapped__");if(w||v){var S=w?e.value():e,m=v?t.value():t;return i||(i=new _w),r(S,m,n,a,i)}}return y?(i||(i=new _w),Fge(e,t,n,a,r,i)):!1}var Vge=Uge,Wge=Vge,R7=ch;function $O(e,t,n,a,r){return e===t?!0:e==null||t==null||!R7(e)&&!R7(t)?e!==e&&t!==t:Wge(e,t,n,a,$O,r)}var BO=$O,Yge=jO,Gge=BO,qge=1,Zge=2;function Qge(e,t,n,a){var r=n.length,i=r,o=!a;if(e==null)return!i;for(e=Object(e);r--;){var c=n[r];if(o&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++r<i;){c=n[r];var l=c[0],d=e[l],u=c[1];if(o&&c[2]){if(d===void 0&&!(l in e))return!1}else{var g=new Yge;if(a)var y=a(d,u,l,e,t,g);if(!(y===void 0?Gge(u,d,qge|Zge,a,g):y))return!1}}return!0}var Jge=Qge,Kge=VN;function Xge(e){return e===e&&!Kge(e)}var HO=Xge,e1e=HO,t1e=ZN;function n1e(e){for(var t=t1e(e),n=t.length;n--;){var a=t[n],r=e[a];t[n]=[a,r,e1e(r)]}return t}var a1e=n1e;function r1e(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var UO=r1e,s1e=Jge,i1e=a1e,o1e=UO;function l1e(e){var t=i1e(e);return t.length==1&&t[0][2]?o1e(t[0][0],t[0][1]):function(n){return n===e||s1e(n,e,t)}}var c1e=l1e,d1e=EO,u1e=Wy;function f1e(e,t){t=d1e(t,e);for(var n=0,a=t.length;e!=null&&n<a;)e=e[u1e(t[n++])];return n&&n==a?e:void 0}var VO=f1e,m1e=VO;function p1e(e,t,n){var a=e==null?void 0:m1e(e,t);return a===void 0?n:a}var h1e=p1e;function g1e(e,t){return e!=null&&t in Object(e)}var b1e=g1e,y1e=b1e,x1e=MO;function w1e(e,t){return e!=null&&x1e(e,t,y1e)}var v1e=w1e,_1e=BO,N1e=h1e,S1e=v1e,k1e=UN,C1e=HO,E1e=UO,T1e=Wy,L1e=1,D1e=2;function M1e(e,t){return k1e(e)&&C1e(t)?E1e(T1e(e),t):function(n){var a=N1e(n,e);return a===void 0&&a===t?S1e(n,e):_1e(t,a,L1e|D1e)}}var A1e=M1e;function I1e(e){return e}var O1e=I1e;function P1e(e){return function(t){return t==null?void 0:t[e]}}var R1e=P1e,j1e=VO;function z1e(e){return function(t){return j1e(t,e)}}var F1e=z1e,$1e=R1e,B1e=F1e,H1e=UN,U1e=Wy;function V1e(e){return H1e(e)?$1e(U1e(e)):B1e(e)}var W1e=V1e,Y1e=c1e,G1e=A1e,q1e=O1e,Z1e=Hl,Q1e=W1e;function J1e(e){return typeof e=="function"?e:e==null?q1e:typeof e=="object"?Z1e(e)?G1e(e[0],e[1]):Y1e(e):Q1e(e)}var WO=J1e,K1e=OO,X1e=RO,ebe=WO;function tbe(e,t){var n={};return t=ebe(t),X1e(e,function(a,r,i){K1e(n,r,t(a,r,i))}),n}var YO=tbe;function Yc(e){this._maxSize=e,this.clear()}Yc.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Yc.prototype.get=function(e){return this._values[e]};Yc.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var nbe=/[^.^\]^[]+|(?=\[\]|\.\.)/g,GO=/^\d+$/,abe=/^\d/,rbe=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,sbe=/^\s*(['"]?)(.*?)(\1)\s*$/,QN=512,j7=new Yc(QN),z7=new Yc(QN),F7=new Yc(QN),Yy={Cache:Yc,split:O4,normalizePath:Nw,setter:function(e){var t=Nw(e);return z7.get(e)||z7.set(e,function(a,r){for(var i=0,o=t.length,c=a;i<o-1;){var l=t[i];if(l==="__proto__"||l==="constructor"||l==="prototype")return a;c=c[t[i++]]}c[t[i]]=r})},getter:function(e,t){var n=Nw(e);return F7.get(e)||F7.set(e,function(r){for(var i=0,o=n.length;i<o;)if(r!=null||!t)r=r[n[i++]];else return;return r})},join:function(e){return e.reduce(function(t,n){return t+(JN(n)||GO.test(n)?"["+n+"]":(t?".":"")+n)},"")},forEach:function(e,t,n){ibe(Array.isArray(e)?e:O4(e),t,n)}};function Nw(e){return j7.get(e)||j7.set(e,O4(e).map(function(t){return t.replace(sbe,"$2")}))}function O4(e){return e.match(nbe)||[""]}function ibe(e,t,n){var a=e.length,r,i,o,c;for(i=0;i<a;i++)r=e[i],r&&(cbe(r)&&(r='"'+r+'"'),c=JN(r),o=!c&&/^\d+$/.test(r),t.call(n,r,c,o,i,e))}function JN(e){return typeof e=="string"&&e&&["'",'"'].indexOf(e.charAt(0))!==-1}function obe(e){return e.match(abe)&&!e.match(GO)}function lbe(e){return rbe.test(e)}function cbe(e){return!JN(e)&&(obe(e)||lbe(e))}const k0={context:"$",value:"."};function zu(e,t){return new ho(e,t)}class ho{constructor(t,n={}){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,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===k0.context,this.isValue=this.key[0]===k0.value,this.isSibling=!this.isContext&&!this.isValue;let a=this.isContext?k0.context:this.isValue?k0.value:"";this.path=this.key.slice(a.length),this.getter=this.path&&Yy.getter(this.path,!0),this.map=n.map}getValue(t,n,a){let r=this.isContext?a:this.isValue?t:n;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}ho.prototype.__isYupRef=!0;function U1(){return U1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},U1.apply(this,arguments)}function dbe(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,i;for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function C0(e){function t(n,a){let{value:r,path:i="",label:o,options:c,originalValue:l,sync:d}=n,u=dbe(n,["value","path","label","options","originalValue","sync"]);const{name:g,test:y,params:w,message:v}=e;let{parent:S,context:m}=c;function p(_){return ho.isRef(_)?_.getValue(r,S,m):_}function b(_={}){const C=YO(U1({value:r,originalValue:l,label:o,path:_.path||i},w,_.params),p),E=new Jr(Jr.formatError(_.message||v,C),r,C.path,_.type||g);return E.params=C,E}let x=U1({path:i,parent:S,type:g,createError:b,resolve:p,options:c,originalValue:l},u);if(!d){try{Promise.resolve(y.call(x,r,x)).then(_=>{Jr.isError(_)?a(_):_?a(null,_):a(b())}).catch(a)}catch(_){a(_)}return}let k;try{var N;if(k=y.call(x,r,x),typeof((N=k)==null?void 0:N.then)=="function")throw new Error(`Validation test of type: "${x.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(_){a(_);return}Jr.isError(k)?a(k):k?a(null,k):a(b())}return t.OPTIONS=e,t}let ube=e=>e.substr(0,e.length-1).substr(1);function fbe(e,t,n,a=n){let r,i,o;return t?(Yy.forEach(t,(c,l,d)=>{let u=l?ube(c):c;if(e=e.resolve({context:a,parent:r,value:n}),e.innerType){let g=d?parseInt(u,10):0;if(n&&g>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${c}, in the path: ${t}. because there is no value at that index. `);r=n,n=n&&n[g],e=e.innerType}if(!d){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e._type}")`);r=n,n=n&&n[u],e=e.fields[u]}i=u,o=l?"["+c+"]":"."+c}),{schema:e,parent:r,parentPath:i}):{parent:r,parentPath:t,schema:e}}class V1{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 t=[];for(const n of this.list)t.push(n);for(const[,n]of this.refs)t.push(n.describe());return t}toArray(){return Array.from(this.list).concat(Array.from(this.refs.values()))}resolveAll(t){return this.toArray().reduce((n,a)=>n.concat(ho.isRef(a)?t(a):a),[])}add(t){ho.isRef(t)?this.refs.set(t.key,t):this.list.add(t)}delete(t){ho.isRef(t)?this.refs.delete(t.key):this.list.delete(t)}clone(){const t=new V1;return t.list=new Set(this.list),t.refs=new Map(this.refs),t}merge(t,n){const a=this.clone();return t.list.forEach(r=>a.add(r)),t.refs.forEach(r=>a.add(r)),n.list.forEach(r=>a.delete(r)),n.refs.forEach(r=>a.delete(r)),a}}function bs(){return bs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bs.apply(this,arguments)}class Nr{constructor(t){this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this._typeError=void 0,this._whitelist=new V1,this._blacklist=new V1,this.exclusiveTests=Object.create(null),this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(oc.notType)}),this.type=(t==null?void 0:t.type)||"mixed",this.spec=bs({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,presence:"optional"},t==null?void 0:t.spec)}get _type(){return this.type}_typeCheck(t){return!0}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeError=this._typeError,n._whitelistError=this._whitelistError,n._blacklistError=this._blacklistError,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.exclusiveTests=bs({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=N4(bs({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let a=t(this);return this._mutate=n,a}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,a=t.clone();const r=bs({},n.spec,a.spec);return a.spec=r,a._typeError||(a._typeError=n._typeError),a._whitelistError||(a._whitelistError=n._whitelistError),a._blacklistError||(a._blacklistError=n._blacklistError),a._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),a._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),a.tests=n.tests,a.exclusiveTests=n.exclusiveTests,a.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),a.transforms=[...n.transforms,...a.transforms],a}isType(t){return this.spec.nullable&&t===null?!0:this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let a=n.conditions;n=n.clone(),n.conditions=[],n=a.reduce((r,i)=>i.resolve(r,t),n),n=n.resolve(t)}return n}cast(t,n={}){let a=this.resolve(bs({value:t},n)),r=a._cast(t,n);if(t!==void 0&&n.assert!==!1&&a.isType(r)!==!0){let i=xp(t),o=xp(r);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${a._type}".
attempted value: ${i}
`+(o!==i?`result of cast: ${o}`:""))}return r}_cast(t,n){let a=t===void 0?t:this.transforms.reduce((r,i)=>i.call(this,r,t,this),t);return a===void 0&&(a=this.getDefault()),a}_validate(t,n={},a){let{sync:r,path:i,from:o=[],originalValue:c=t,strict:l=this.spec.strict,abortEarly:d=this.spec.abortEarly}=n,u=t;l||(u=this._cast(u,bs({assert:!1},n)));let g={value:u,path:i,options:n,originalValue:c,schema:this,label:this.spec.label,sync:r,from:o},y=[];this._typeError&&y.push(this._typeError);let w=[];this._whitelistError&&w.push(this._whitelistError),this._blacklistError&&w.push(this._blacklistError),E4({args:g,value:u,path:i,sync:r,tests:y,endEarly:d},v=>{if(v)return void a(v,u);E4({tests:this.tests.concat(w),args:g,path:i,sync:r,value:u,endEarly:d},a)})}validate(t,n,a){let r=this.resolve(bs({},n,{value:t}));return typeof a=="function"?r._validate(t,n,a):new Promise((i,o)=>r._validate(t,n,(c,l)=>{c?o(c):i(l)}))}validateSync(t,n){let a=this.resolve(bs({},n,{value:t})),r;return a._validate(t,bs({},n,{sync:!0}),(i,o)=>{if(i)throw i;r=o}),r}isValid(t,n){return this.validate(t,n).then(()=>!0,a=>{if(Jr.isError(a))return!1;throw a})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(a){if(Jr.isError(a))return!1;throw a}}_getDefault(){let t=this.spec.default;return t==null?t:typeof t=="function"?t.call(this):N4(t)}getDefault(t){return this.resolve(t||{})._getDefault()}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){let n=this.clone();return n.spec.strict=t,n}_isPresent(t){return t!=null}defined(t=oc.defined){return this.test({message:t,name:"defined",exclusive:!0,test(n){return n!==void 0}})}required(t=oc.required){return this.clone({presence:"required"}).withMutation(n=>n.test({message:t,name:"required",exclusive:!0,test(a){return this.schema._isPresent(a)}}))}notRequired(){let t=this.clone({presence:"optional"});return t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t}nullable(t=!0){return this.clone({nullable:t!==!1})}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=oc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let a=this.clone(),r=C0(n),i=n.exclusive||n.name&&a.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(a.exclusiveTests[n.name]=!!n.exclusive),a.tests=a.tests.filter(o=>!(o.OPTIONS.name===n.name&&(i||o.OPTIONS.test===r.OPTIONS.test))),a.tests.push(r),a}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let a=this.clone(),r=IO(t).map(i=>new ho(i));return r.forEach(i=>{i.isSibling&&a.deps.push(i.key)}),a.conditions.push(new Xme(r,n)),a}typeError(t){let n=this.clone();return n._typeError=C0({message:t,name:"typeError",test(a){return a!==void 0&&!this.schema.isType(a)?this.createError({params:{type:this.schema._type}}):!0}}),n}oneOf(t,n=oc.oneOf){let a=this.clone();return t.forEach(r=>{a._whitelist.add(r),a._blacklist.delete(r)}),a._whitelistError=C0({message:n,name:"oneOf",test(r){if(r===void 0)return!0;let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(r)?!0:this.createError({params:{values:i.toArray().join(", "),resolved:o}})}}),a}notOneOf(t,n=oc.notOneOf){let a=this.clone();return t.forEach(r=>{a._blacklist.add(r),a._whitelist.delete(r)}),a._blacklistError=C0({message:n,name:"notOneOf",test(r){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(r)?this.createError({params:{values:i.toArray().join(", "),resolved:o}}):!0}}),a}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(){const t=this.clone(),{label:n,meta:a}=t.spec;return{meta:a,label:n,type:t.type,oneOf:t._whitelist.describe(),notOneOf:t._blacklist.describe(),tests:t.tests.map(i=>({name:i.OPTIONS.name,params:i.OPTIONS.params})).filter((i,o,c)=>c.findIndex(l=>l.name===i.name)===o)}}}Nr.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Nr.prototype[`${e}At`]=function(t,n,a={}){const{parent:r,parentPath:i,schema:o}=fbe(this,t,n,a.context);return o[e](r&&r[i],bs({},a,{parent:r,path:t}))};for(const e of["equals","is"])Nr.prototype[e]=Nr.prototype.oneOf;for(const e of["not","nope"])Nr.prototype[e]=Nr.prototype.notOneOf;Nr.prototype.optional=Nr.prototype.notRequired;const mbe=Nr;mbe.prototype;const ja=e=>e==null;let pbe=/^((([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,hbe=/^((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,gbe=/^(?:[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,bbe=e=>ja(e)||e===e.trim(),ybe={}.toString();function ge(){return new qO}class qO extends Nr{constructor(){super({type:"string"}),this.withMutation(()=>{this.transform(function(t){if(this.isType(t)||Array.isArray(t))return t;const n=t!=null&&t.toString?t.toString():t;return n===ybe?t:n})})}_typeCheck(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}_isPresent(t){return super._isPresent(t)&&!!t.length}length(t,n=Bs.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},test(a){return ja(a)||a.length===this.resolve(t)}})}min(t,n=Bs.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(a){return ja(a)||a.length>=this.resolve(t)}})}max(t,n=Bs.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},test(a){return ja(a)||a.length<=this.resolve(t)}})}matches(t,n){let a=!1,r,i;return n&&(typeof n=="object"?{excludeEmptyString:a=!1,message:r,name:i}=n:r=n),this.test({name:i||"matches",message:r||Bs.matches,params:{regex:t},test:o=>ja(o)||o===""&&a||o.search(t)!==-1})}email(t=Bs.email){return this.matches(pbe,{name:"email",message:t,excludeEmptyString:!0})}url(t=Bs.url){return this.matches(hbe,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=Bs.uuid){return this.matches(gbe,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=Bs.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:bbe})}lowercase(t=Bs.lowercase){return this.transform(n=>ja(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,test:n=>ja(n)||n===n.toLowerCase()})}uppercase(t=Bs.uppercase){return this.transform(n=>ja(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,test:n=>ja(n)||n===n.toUpperCase()})}}ge.prototype=qO.prototype;let xbe=e=>e!=+e;function dt(){return new ZO}class ZO extends Nr{constructor(){super({type:"number"}),this.withMutation(()=>{this.transform(function(t){let n=t;if(typeof n=="string"){if(n=n.replace(/\s/g,""),n==="")return NaN;n=+n}return this.isType(n)?n:parseFloat(n)})})}_typeCheck(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!xbe(t)}min(t,n=Ko.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(a){return ja(a)||a>=this.resolve(t)}})}max(t,n=Ko.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},test(a){return ja(a)||a<=this.resolve(t)}})}lessThan(t,n=Ko.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},test(a){return ja(a)||a<this.resolve(t)}})}moreThan(t,n=Ko.moreThan){return this.test({message:n,name:"min",exclusive:!0,params:{more:t},test(a){return ja(a)||a>this.resolve(t)}})}positive(t=Ko.positive){return this.moreThan(0,t)}negative(t=Ko.negative){return this.lessThan(0,t)}integer(t=Ko.integer){return this.test({name:"integer",message:t,test:n=>ja(n)||Number.isInteger(n)})}truncate(){return this.transform(t=>ja(t)?t:t|0)}round(t){var n;let a=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(a.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+a.join(", "));return this.transform(r=>ja(r)?r:Math[t](r))}}dt.prototype=ZO.prototype;var wbe=/^(\d{4}|[+\-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,\.](\d{1,}))?)?(?:(Z)|([+\-])(\d{2})(?::?(\d{2}))?)?)?$/;function vbe(e){var t=[1,4,5,6,7,10,11],n=0,a,r;if(r=wbe.exec(e)){for(var i=0,o;o=t[i];++i)r[o]=+r[o]||0;r[2]=(+r[2]||1)-1,r[3]=+r[3]||1,r[7]=r[7]?String(r[7]).substr(0,3):0,(r[8]===void 0||r[8]==="")&&(r[9]===void 0||r[9]==="")?a=+new Date(r[1],r[2],r[3],r[4],r[5],r[6],r[7]):(r[8]!=="Z"&&r[9]!==void 0&&(n=r[10]*60+r[11],r[9]==="+"&&(n=0-n)),a=Date.UTC(r[1],r[2],r[3],r[4],r[5]+n,r[6],r[7]))}else a=Date.parse?Date.parse(e):NaN;return a}let KN=new Date(""),_be=e=>Object.prototype.toString.call(e)==="[object Date]";function XN(){return new e5}class e5 extends Nr{constructor(){super({type:"date"}),this.withMutation(()=>{this.transform(function(t){return this.isType(t)?t:(t=vbe(t),isNaN(t)?KN:new Date(t))})})}_typeCheck(t){return _be(t)&&!isNaN(t.getTime())}prepareParam(t,n){let a;if(ho.isRef(t))a=t;else{let r=this.cast(t);if(!this._typeCheck(r))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);a=r}return a}min(t,n=S4.min){let a=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},test(r){return ja(r)||r>=this.resolve(a)}})}max(t,n=S4.max){let a=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},test(r){return ja(r)||r<=this.resolve(a)}})}}e5.INVALID_DATE=KN;XN.prototype=e5.prototype;XN.INVALID_DATE=KN;function Nbe(e,t,n,a){var r=-1,i=e==null?0:e.length;for(a&&i&&(n=e[++r]);++r<i;)n=t(n,e[r],r,e);return n}var Sbe=Nbe;function kbe(e){return function(t){return e==null?void 0:e[t]}}var Cbe=kbe,Ebe=Cbe,Tbe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Lbe=Ebe(Tbe),Dbe=Lbe,Mbe=Dbe,Abe=dh,Ibe=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Obe="\\u0300-\\u036f",Pbe="\\ufe20-\\ufe2f",Rbe="\\u20d0-\\u20ff",jbe=Obe+Pbe+Rbe,zbe="["+jbe+"]",Fbe=RegExp(zbe,"g");function $be(e){return e=Abe(e),e&&e.replace(Ibe,Mbe).replace(Fbe,"")}var Bbe=$be,Hbe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ube(e){return e.match(Hbe)||[]}var Vbe=Ube,Wbe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ybe(e){return Wbe.test(e)}var Gbe=Ybe,QO="\\ud800-\\udfff",qbe="\\u0300-\\u036f",Zbe="\\ufe20-\\ufe2f",Qbe="\\u20d0-\\u20ff",Jbe=qbe+Zbe+Qbe,JO="\\u2700-\\u27bf",KO="a-z\\xdf-\\xf6\\xf8-\\xff",Kbe="\\xac\\xb1\\xd7\\xf7",Xbe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eye="\\u2000-\\u206f",tye=" \\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",XO="A-Z\\xc0-\\xd6\\xd8-\\xde",nye="\\ufe0e\\ufe0f",eP=Kbe+Xbe+eye+tye,tP="['\u2019]",$7="["+eP+"]",aye="["+Jbe+"]",nP="\\d+",rye="["+JO+"]",aP="["+KO+"]",rP="[^"+QO+eP+nP+JO+KO+XO+"]",sye="\\ud83c[\\udffb-\\udfff]",iye="(?:"+aye+"|"+sye+")",oye="[^"+QO+"]",sP="(?:\\ud83c[\\udde6-\\uddff]){2}",iP="[\\ud800-\\udbff][\\udc00-\\udfff]",Rd="["+XO+"]",lye="\\u200d",B7="(?:"+aP+"|"+rP+")",cye="(?:"+Rd+"|"+rP+")",H7="(?:"+tP+"(?:d|ll|m|re|s|t|ve))?",U7="(?:"+tP+"(?:D|LL|M|RE|S|T|VE))?",oP=iye+"?",lP="["+nye+"]?",dye="(?:"+lye+"(?:"+[oye,sP,iP].join("|")+")"+lP+oP+")*",uye="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",fye="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",mye=lP+oP+dye,pye="(?:"+[rye,sP,iP].join("|")+")"+mye,hye=RegExp([Rd+"?"+aP+"+"+H7+"(?="+[$7,Rd,"$"].join("|")+")",cye+"+"+U7+"(?="+[$7,Rd+B7,"$"].join("|")+")",Rd+"?"+B7+"+"+H7,Rd+"+"+U7,fye,uye,nP,pye].join("|"),"g");function gye(e){return e.match(hye)||[]}var bye=gye,yye=Vbe,xye=Gbe,wye=dh,vye=bye;function _ye(e,t,n){return e=wye(e),t=n?void 0:t,t===void 0?xye(e)?vye(e):yye(e):e.match(t)||[]}var Nye=_ye,Sye=Sbe,kye=Bbe,Cye=Nye,Eye="['\u2019]",Tye=RegExp(Eye,"g");function Lye(e){return function(t){return Sye(Cye(kye(t).replace(Tye,"")),e,"")}}var cP=Lye,Dye=cP,Mye=Dye(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}),V7=Mye;function Aye(e,t,n){var a=-1,r=e.length;t<0&&(t=-t>r?0:r+t),n=n>r?r:n,n<0&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(r);++a<r;)i[a]=e[a+t];return i}var Iye=Aye,Oye=Iye;function Pye(e,t,n){var a=e.length;return n=n===void 0?a:n,!t&&n>=a?e:Oye(e,t,n)}var Rye=Pye,jye="\\ud800-\\udfff",zye="\\u0300-\\u036f",Fye="\\ufe20-\\ufe2f",$ye="\\u20d0-\\u20ff",Bye=zye+Fye+$ye,Hye="\\ufe0e\\ufe0f",Uye="\\u200d",Vye=RegExp("["+Uye+jye+Bye+Hye+"]");function Wye(e){return Vye.test(e)}var dP=Wye;function Yye(e){return e.split("")}var Gye=Yye,uP="\\ud800-\\udfff",qye="\\u0300-\\u036f",Zye="\\ufe20-\\ufe2f",Qye="\\u20d0-\\u20ff",Jye=qye+Zye+Qye,Kye="\\ufe0e\\ufe0f",Xye="["+uP+"]",P4="["+Jye+"]",R4="\\ud83c[\\udffb-\\udfff]",exe="(?:"+P4+"|"+R4+")",fP="[^"+uP+"]",mP="(?:\\ud83c[\\udde6-\\uddff]){2}",pP="[\\ud800-\\udbff][\\udc00-\\udfff]",txe="\\u200d",hP=exe+"?",gP="["+Kye+"]?",nxe="(?:"+txe+"(?:"+[fP,mP,pP].join("|")+")"+gP+hP+")*",axe=gP+hP+nxe,rxe="(?:"+[fP+P4+"?",P4,mP,pP,Xye].join("|")+")",sxe=RegExp(R4+"(?="+R4+")|"+rxe+axe,"g");function ixe(e){return e.match(sxe)||[]}var oxe=ixe,lxe=Gye,cxe=dP,dxe=oxe;function uxe(e){return cxe(e)?dxe(e):lxe(e)}var fxe=uxe,mxe=Rye,pxe=dP,hxe=fxe,gxe=dh;function bxe(e){return function(t){t=gxe(t);var n=pxe(t)?hxe(t):void 0,a=n?n[0]:t.charAt(0),r=n?mxe(n,1).join(""):t.slice(1);return a[e]()+r}}var yxe=bxe,xxe=yxe,wxe=xxe("toUpperCase"),vxe=wxe,_xe=dh,Nxe=vxe;function Sxe(e){return Nxe(_xe(e).toLowerCase())}var kxe=Sxe,Cxe=kxe,Exe=cP,Txe=Exe(function(e,t,n){return t=t.toLowerCase(),e+(n?Cxe(t):t)}),Lxe=Txe,Dxe=OO,Mxe=RO,Axe=WO;function Ixe(e,t){var n={};return t=Axe(t),Mxe(e,function(a,r,i){Dxe(n,t(a,r,i),a)}),n}var Oxe=Ixe,t5={exports:{}};t5.exports=function(e){return bP(Pxe(e),e)};t5.exports.array=bP;function bP(e,t){var n=e.length,a=new Array(n),r={},i=n,o=Rxe(t),c=jxe(e);for(t.forEach(function(d){if(!c.has(d[0])||!c.has(d[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)r[i]||l(e[i],i,new Set);return a;function l(d,u,g){if(g.has(d)){var y;try{y=", node was:"+JSON.stringify(d)}catch{y=""}throw new Error("Cyclic dependency"+y)}if(!c.has(d))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(d));if(!r[u]){r[u]=!0;var w=o.get(d)||new Set;if(w=Array.from(w),u=w.length){g.add(d);do{var v=w[--u];l(v,c.get(v),g)}while(u);g.delete(d)}a[--n]=d}}}function Pxe(e){for(var t=new Set,n=0,a=e.length;n<a;n++){var r=e[n];t.add(r[0]),t.add(r[1])}return Array.from(t)}function Rxe(e){for(var t=new Map,n=0,a=e.length;n<a;n++){var r=e[n];t.has(r[0])||t.set(r[0],new Set),t.has(r[1])||t.set(r[1],new Set),t.get(r[0]).add(r[1])}return t}function jxe(e){for(var t=new Map,n=0,a=e.length;n<a;n++)t.set(e[n],n);return t}var zxe=t5.exports;function Fxe(e,t=[]){let n=[],a=new Set,r=new Set(t.map(([o,c])=>`${o}-${c}`));function i(o,c){let l=Yy.split(o)[0];a.add(l),r.has(`${c}-${l}`)||n.push([c,l])}for(const o in e)if($1(e,o)){let c=e[o];a.add(o),ho.isRef(c)&&c.isSibling?i(c.path,o):AO(c)&&"deps"in c&&c.deps.forEach(l=>i(l,o))}return zxe.array(Array.from(a),n).reverse()}function W7(e,t){let n=1/0;return e.some((a,r)=>{var i;if(((i=t.path)==null?void 0:i.indexOf(a))!==-1)return n=r,!0}),n}function yP(e){return(t,n)=>W7(e,t)-W7(e,n)}function tu(){return tu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},tu.apply(this,arguments)}let Y7=e=>Object.prototype.toString.call(e)==="[object Object]";function $xe(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(a=>n.indexOf(a)===-1)}const Bxe=yP([]);class xP extends Nr{constructor(t){super({type:"object"}),this.fields=Object.create(null),this._sortErrors=Bxe,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{this.transform(function(a){if(typeof a=="string")try{a=JSON.parse(a)}catch{a=null}return this.isType(a)?a:null}),t&&this.shape(t)})}_typeCheck(t){return Y7(t)||typeof t=="function"}_cast(t,n={}){var a;let r=super._cast(t,n);if(r===void 0)return this.getDefault();if(!this._typeCheck(r))return r;let i=this.fields,o=(a=n.stripUnknown)!=null?a:this.spec.noUnknown,c=this._nodes.concat(Object.keys(r).filter(g=>this._nodes.indexOf(g)===-1)),l={},d=tu({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const g of c){let y=i[g],w=$1(r,g);if(y){let v,S=r[g];d.path=(n.path?`${n.path}.`:"")+g,y=y.resolve({value:S,context:n.context,parent:l});let m="spec"in y?y.spec:void 0,p=m==null?void 0:m.strict;if(m!=null&&m.strip){u=u||g in r;continue}v=!n.__validating||!p?y.cast(r[g],d):r[g],v!==void 0&&(l[g]=v)}else w&&!o&&(l[g]=r[g]);l[g]!==r[g]&&(u=!0)}return u?l:r}_validate(t,n={},a){let r=[],{sync:i,from:o=[],originalValue:c=t,abortEarly:l=this.spec.abortEarly,recursive:d=this.spec.recursive}=n;o=[{schema:this,value:c},...o],n.__validating=!0,n.originalValue=c,n.from=o,super._validate(t,n,(u,g)=>{if(u){if(!Jr.isError(u)||l)return void a(u,g);r.push(u)}if(!d||!Y7(g)){a(r[0]||null,g);return}c=c||g;let y=this._nodes.map(w=>(v,S)=>{let m=w.indexOf(".")===-1?(n.path?`${n.path}.`:"")+w:`${n.path||""}["${w}"]`,p=this.fields[w];if(p&&"validate"in p){p.validate(g[w],tu({},n,{path:m,from:o,strict:!0,parent:g,originalValue:c[w]}),S);return}S(null)});E4({sync:i,tests:y,value:g,errors:r,endEarly:l,sort:this._sortErrors,path:n.path},a)})}clone(t){const n=super.clone(t);return n.fields=tu({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),a=n.fields;for(let[r,i]of Object.entries(this.fields)){const o=a[r];o===void 0?a[r]=i:o instanceof Nr&&i instanceof Nr&&(a[r]=i.concat(o))}return n.withMutation(()=>n.shape(a,this._excludedEdges))}getDefaultFromShape(){let t={};return this._nodes.forEach(n=>{const a=this.fields[n];t[n]="default"in a?a.getDefault():void 0}),t}_getDefault(){if("default"in this.spec)return super._getDefault();if(!!this._nodes.length)return this.getDefaultFromShape()}shape(t,n=[]){let a=this.clone(),r=Object.assign(a.fields,t);return a.fields=r,a._sortErrors=yP(Object.keys(r)),n.length&&(Array.isArray(n[0])||(n=[n]),a._excludedEdges=[...a._excludedEdges,...n]),a._nodes=Fxe(r,a._excludedEdges),a}pick(t){const n={};for(const a of t)this.fields[a]&&(n[a]=this.fields[a]);return this.clone().withMutation(a=>(a.fields={},a.shape(n)))}omit(t){const n=this.clone(),a=n.fields;n.fields={};for(const r of t)delete a[r];return n.withMutation(()=>n.shape(a))}from(t,n,a){let r=Yy.getter(t,!0);return this.transform(i=>{if(i==null)return i;let o=i;return $1(i,t)&&(o=tu({},i),a||delete o[t],o[n]=r(i)),o})}noUnknown(t=!0,n=k4.noUnknown){typeof t=="string"&&(n=t,t=!0);let a=this.test({name:"noUnknown",exclusive:!0,message:n,test(r){if(r==null)return!0;const i=$xe(this.schema,r);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return a.spec.noUnknown=t,a}unknown(t=!0,n=k4.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>n&&Oxe(n,(a,r)=>t(r)))}camelCase(){return this.transformKeys(Lxe)}snakeCase(){return this.transformKeys(V7)}constantCase(){return this.transformKeys(t=>V7(t).toUpperCase())}describe(){let t=super.describe();return t.fields=YO(this.fields,n=>n.describe()),t}}function Qe(e){return new xP(e)}Qe.prototype=xP.prototype;const Hxe=()=>{var l,d;const e=je(),t=Qe({email:ge().email().required()}).required(),{register:n,handleSubmit:a,setError:r,formState:{errors:i}}=Oe({resolver:Xe(t)}),{dispatch:o}=R.useContext(we);return s(Se,{children:f("div",{className:"w-full max-w-xs mx-auto",children:[f("form",{onSubmit:a(async u=>{let g=new _e;try{const y=await g.forgot(u.email);if(!y.error)pe(o,"Reset Code Sent"),localStorage.setItem("token",y.token),e("/admin/reset");else if(y.validation){const w=Object.keys(y.validation);for(let v=0;v<w.length;v++){const S=w[v];r(S,{type:"manual",message:y.validation[S]})}}}catch(y){console.log("Error",y),r("email",{type:"manual",message:y.message})}}),className:"bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8 ",children:[f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"email",children:"Email"}),s("input",{type:"email",placeholder:"Email",...n("email"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(l=i.email)!=null&&l.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(d=i.email)==null?void 0:d.message})]}),f("div",{className:"flex items-center justify-between",children:[s("input",{type:"submit",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",value:"Forgot Password"}),s($e,{className:"inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800",to:"/admin/login",children:"Login?"})]})]}),f("p",{className:"text-center text-gray-500 text-xs",children:["\xA9 ",new Date().getFullYear()," manaknightdigital inc. All rights reserved."]})]})})},Uxe=()=>{var u,g,y,w,v,S;R.useContext(Ee);const e=window.location.search;new URLSearchParams(e);const t=localStorage.getItem("token"),{dispatch:n}=R.useContext(we),a=Qe({code:ge().required(),password:ge().required(),confirmPassword:ge().oneOf([zu("password"),null],"Passwords must match")}).required(),r=je(),{register:i,handleSubmit:o,setError:c,formState:{errors:l}}=Oe({resolver:Xe(a)});return s(Se,{children:f("div",{className:"w-full max-w-xs mx-auto",children:[f("form",{onSubmit:o(async m=>{let p=new _e;try{const b=await p.reset(t,m.code,m.password);if(!b.error)pe(n,"Password Reset"),setTimeout(()=>{r("/admin/login")},2e3);else if(b.validation){const x=Object.keys(b.validation);for(let k=0;k<x.length;k++){const N=x[k];c(N,{type:"manual",message:b.validation[N]})}}}catch(b){console.log("Error",b),c("code",{type:"manual",message:b.message})}}),className:"bg-white shadow-md rounded px-8 pt-6 pb-8 mb-4 mt-8 ",children:[f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"code",children:"Code"}),s("input",{type:"text",placeholder:"Enter code sent to your email",...i("code"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(u=l.code)!=null&&u.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(g=l.code)==null?void 0:g.message})]}),f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"password",children:"Password"}),s("input",{type:"password",placeholder:"******************",...i("password"),className:`shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(y=l.password)!=null&&y.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(w=l.password)==null?void 0:w.message})]}),f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"confirmPassword",children:"Confirm Password"}),s("input",{type:"password",placeholder:"******************",...i("confirmPassword"),className:`shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(v=l.confirmPassword)!=null&&v.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(S=l.confirmPassword)==null?void 0:S.message})]}),f("div",{className:"flex items-center justify-between",children:[s("input",{type:"submit",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",value:"Reset Password"}),s($e,{className:"inline-block align-baseline font-bold text-sm text-blue-500 hover:text-blue-800",to:"/admin/login",children:"Login?"})]})]}),f("p",{className:"text-center text-gray-500 text-xs",children:["\xA9 ",new Date().getFullYear()," manaknightdigital inc. All rights reserved."]})]})})};function St(){this._baseurl="https://ergo.mkdlabs.com",this._project_id="ergo",this._secret="k5go4l548ch4qk5918x2uljuv8rqqp2as",this._table="";const e=this._project_id+":"+this._secret;let t=btoa(e);this.getHeader=function(){return{Authorization:"Bearer "+localStorage.getItem("token"),"x-project":t}},this.baseUrl=function(){return this._baseurl},this.getProjectId=function(){return this._project_id},this.treeBaseUrl=function(){return this._baseurl+"/v4/api/records"};function n(i={}){let o=i.hasOwnProperty("join"),c=i.join;o&&typeof c=="string"&&(c=c.split(","));let l="";return c.forEach(d=>{l+=`join=${d}&`}),[o,c,l]}function a(i){var l,d;let o=(l=i.order)!=null?l:"id",c=(d=i.direction)!=null?d:"desc";return`order=${o},${c}&`}function r(i){let o=i.hasOwnProperty("filter"),c=i.filter,l="";return o&&Array.isArray(c)&&c.forEach(d=>{l+=`filter=${d}&`}),[o,c,l]}return this.getOne=async function(i,o,c={}){if(Fs(i)||Fs(o))throw new Error("table and id is required.");let[l,d,u]=n(c);const g={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},y=await fetch(this.treeBaseUrl()+`/${i}/${o}?${u}`,{method:"get",headers:g}),w=await y.json();if(y.status===401)throw new Error(w.message);if(y.status===403)throw new Error(w.message);return w},this.getMany=async function(i,o,c={}){if(Fs(i)||Fs(o))throw new Error("table and id is required.");let[l,d,u]=n(c),g=Array.isArray(o)?o.join(","):o;const y={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},w=await fetch(this.treeBaseUrl()+`/${i}/${g}?${u}`,{method:"get",headers:y}),v=await w.json();if(w.status===401)throw new Error(v.message);if(w.status===403)throw new Error(v.message);return v},this.getList=async function(i,o={}){if(Fs(i))throw new Error("table and id is required.");let[c,l,d]=n(o),[u,g,y]=r(o),w=a(o),v=o.hasOwnProperty("size")?`size=${o.size}&`:"";const S={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token"),uid:localStorage.getItem("device-uid")},m=await fetch(this.treeBaseUrl()+`/${i}?${d}${w}${v}${y}`,{method:"get",headers:S}),p=await m.json();if(m.status===401)throw new Error(p.message);if(m.status===403)throw new Error(p.message);return p},this.getPaginate=async function(i,o={}){var x;if(Fs(i))throw new Error("table and id is required.");let[c,l,d]=n(o),[u,g,y]=r(o),w=a(o),v=(x=o.size)!=null?x:20,S=o.hasOwnProperty("page")?`page=${o.page},${v}&`:"page=1&";const m={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token"),uid:localStorage.getItem("device-uid")},p=await fetch(this.treeBaseUrl()+`/${i}?${d}${w}${S}${y}`,{method:"get",headers:m}),b=await p.json();if(p.status===401)throw new Error(b.message);if(p.status===403)throw new Error(b.message);return b},this.create=async function(i,o,c={}){if(Fs(i))throw new Error("table and id is required.");const l={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},d=await fetch(this.treeBaseUrl()+`/${i}}`,{method:"post",headers:l,body:JSON.stringify(o)}),u=await d.json();if(d.status===401)throw new Error(u.message);if(d.status===403)throw new Error(u.message);return u},this.update=async function(i,o,c){if(Fs(i)||Fs(o))throw new Error("table and id is required.");const l={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},d=await fetch(this.treeBaseUrl()+`/${i}/${o}`,{method:"put",headers:l,body:JSON.stringify(c)}),u=await d.json();if(d.status===401)throw new Error(u.message);if(d.status===403)throw new Error(u.message);return u},this.delete=async function(i,o,c){if(Fs(i)||Fs(o))throw new Error("table and id is required.");const l={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token")},d=await fetch(this.treeBaseUrl()+`/${i}/${o}`,{method:"delete",headers:l,body:JSON.stringify(c)}),u=await d.json();if(d.status===401)throw new Error(u.message);if(d.status===403)throw new Error(u.message);return u},this.callRawAPI=async function(i,o,c,l){const d={"Content-Type":"application/json","x-project":t,Authorization:"Bearer "+localStorage.getItem("token"),uid:localStorage.getItem("device-uid")},u=await fetch(this._baseurl+i,{method:c,headers:d,body:JSON.stringify(o),signal:l}),g=await u.json();if(u.status===401)throw new Error(g.message);if(u.status===403)throw new Error(g.message);return g},this}const G7=()=>{const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=h.exports.useState([]),[r,i]=h.exports.useState([]),o=new _e,c=new St;async function l(){try{const v=await c.getList("user",{filter:["deleted_at,is"],join:[]});Array.isArray(v.list)&&a(v.list)}catch(v){me(e,v.message),pe(t,v.message,4e3,"ERROR")}}async function d(){o.setTable("booking");try{const v=await o.callRestAPI({},"GETALL");Array.isArray(v.list)&&i(v.list)}catch(v){me(e,v.message),pe(t,v.message,4e3,"ERROR")}}h.exports.useEffect(()=>{t({type:"SETPATH",payload:{path:"dashboard"}}),(async()=>(await l(),await d()))()},[]);const u=n.reduce((v,S)=>v+(S.role=="host"?1:0),0),g=n.reduce((v,S)=>v+(S.role=="customer"?1:0),0),y=r.reduce((v,S)=>v+(S.status==ut.ONGOING?1:0),0),w=n.reduce((v,S)=>v+(S.status==ut.UPCOMING?1:0),0);return s(Se,{children:f("div",{className:"p-5",children:[s("h2",{className:"mb-12 text-3xl font-medium",children:"Stats"}),s("h4",{className:"mb-4 text-xl font-medium",children:"Users"}),f("div",{className:"mb-12 flex max-w-full flex-wrap gap-16",children:[f("div",{className:"w-80 border-2 border-black p-5 py-8",children:[s("h5",{className:"mb-8",children:"Hosts"}),s("h1",{className:"text-4xl font-semibold",children:s("span",{children:u})})]}),f("div",{className:"w-80 border-2 border-black p-5 py-8",children:[s("h5",{className:"mb-8",children:"Customers"}),s("h1",{className:"text-4xl font-semibold",children:s("span",{children:g})})]})]}),s("h4",{className:"mb-4 text-xl font-medium",children:"Bookings"}),f("div",{className:"mb-12 flex max-w-full flex-wrap gap-16",children:[f("div",{className:"w-80 border-2 border-black p-5 py-8",children:[s("h5",{className:"mb-8",children:"Active Bookings"}),s("h1",{className:"text-4xl font-semibold",children:s("span",{children:y})})]}),f("div",{className:"w-80 border-2 border-black p-5 py-8",children:[s("h5",{className:"mb-8",children:"Upcoming Bookings"}),s("h1",{className:"text-4xl font-semibold",children:s("span",{children:w})})]}),f("div",{className:"w-80 border-2 border-black p-5 py-8",children:[s("h5",{className:"mb-8",children:"Total Bookings"}),s("h1",{className:"text-4xl font-semibold",children:s("span",{children:r.length})})]})]})]})})};let Lg=new _e;const Vxe=()=>{const e=Qe({email:ge().email().required()}).required(),{dispatch:t,state:n}=R.useContext(Ee),[a,r]=h.exports.useState("");h.exports.useState();const[i,o]=h.exports.useState(),[c,l]=h.exports.useState(!1),[d,u]=h.exports.useState(0),{dispatch:g}=R.useContext(we),{register:y,handleSubmit:w,setError:v,setValue:S,formState:{errors:m}}=Oe({resolver:Xe(e)});R.useEffect(()=>{g({type:"SETPATH",payload:{path:"profile"}}),async function(){try{const x=await Lg.getProfile();o(x),S("email",x.email),S("first_name",x.first_name),S("last_name",x.last_name),r(x.email)}catch(x){console.log("Error",x),me(t,x.message)}}()},[]);const b=[{key:0,name:"Profile",component:c?s(Yxe,{register:y,handleSubmit:w,onSubmit:async x=>{try{Lg.setTable("user"),await Lg.callRestAPI({id:n.user,first_name:x.first_name,last_name:x.last_name,email:x.email},"PUT"),pe(g,"Profile updated Successfully"),o({...i,first_name:x.first_name,last_name:x.last_name,email:x.email})}catch(k){console.log("Error",k),v("email",{type:"manual",message:k.message}),me(g,k.message)}},errors:m,setEdit:l}):s(Wxe,{profileInfo:i,setEdit:l})},{key:1,name:"Password",component:s(Gxe,{})}];return s(Se,{children:s("main",{children:f("div",{className:" rounded bg-white mx-auto ",children:[s("div",{className:"border px-5 py-5",children:s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-bold",children:"Profile"})})}),s("div",{className:"text-sm font-medium text-center text-gray-500 border-t-0 border-b border-r border-l border-gray-200",children:s("ul",{className:"flex flex-wrap -mb-px",children:b.map(x=>s("li",{className:"mr-2",children:s("button",{onClick:()=>u(x.key),className:`inline-block p-4 ${d===x.key?"text-[#111827] border-[#111827] font-bold":" border-transparent hover:text-gray-600 hover:border-gray-300"} rounded-t-lg border-b-2 `,children:x.name})},x.key))})}),b[d].component]})})})},Wxe=({profileInfo:e,setEdit:t})=>s("div",{className:"p-5",children:f("div",{className:"w-full max-w-[413px]",children:[s("div",{className:"flex mb-5 px-5",children:s("div",{className:"flex-1",children:f("button",{className:"flex items-center bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent",onClick:()=>t(!0),children:[s(ln,{type:"pencil",className:"stroke-[#33D4B7]"}),s("span",{className:"ml-2",children:"Edit"})]})})}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-left mr-10",children:"First name"}),s("p",{className:"flex-1",children:e==null?void 0:e.first_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-left mr-10",children:"Last name"}),s("p",{className:"flex-1",children:e==null?void 0:e.last_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-left mr-10",children:"Email"}),s("p",{className:"flex-1 normal-case",children:e==null?void 0:e.email})]})]})}),Yxe=({register:e,onSubmit:t,handleSubmit:n,errors:a,setEdit:r})=>{var i,o,c;return f("div",{className:"p-5 border-t-0 border",children:[s("div",{className:"flex mb-5 px-5",children:s("div",{className:"flex-1",children:f("button",{type:"button",onClick:()=>r(!1),className:"font-semibold text-sm pr-5 text-center inline-flex items-center mr-2 mb-2",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"stroke-[#667085] h-4 w-4"})," ",s("span",{className:"ml-2",children:"Back"})]})})}),f("form",{onSubmit:n(t),className:"max-w-lg",children:[f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"First name"}),s("input",{className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"first_name",type:"test",placeholder:"First Name",name:"first_name",...e("first_name")}),s("p",{className:"text-red-500 text-xs italic",children:(i=a.first_name)==null?void 0:i.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Last name"}),s("input",{className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"last_name",type:"text",placeholder:"Last name",name:"last_name",...e("last_name")}),s("p",{className:"text-red-500 text-xs italic",children:(o=a.last_name)==null?void 0:o.message})]}),f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Email"}),s("input",{...e("email"),name:"email",className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"email",type:"email",placeholder:""}),s("p",{className:"text-red-500 text-xs italic",children:(c=a.email)==null?void 0:c.message})]}),s("div",{className:"flex justify-between",children:s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Update Details"})})]})]})},Gxe=()=>{var d,u,g;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we);je();const n=Qe({current_password:ge().required(),new_password:ge().required(),confirm_password:ge().oneOf([zu("new_password"),null],"Passwords must match")}).required(),{register:a,handleSubmit:r,setError:i,setValue:o,formState:{errors:c}}=Oe({resolver:Xe(n)});return f("div",{className:"p-5 border-t-0 border",children:[s("p",{className:"text-[#667085] text-sm mb-4",children:"Enter your current password to change your password."}),f("form",{onSubmit:r(async y=>{try{if(y.new_password.length>0&&y.current_password.length>0){const w=await Lg.updatePassword({currentPassword:y.current_password,password:y.new_password});if(!w.error)pe(t,"Password Updated",2e3);else if(w.validation){const v=Object.keys(w.validation);for(let S=0;S<v.length;S++){const m=v[S];i(m,{type:"manual",message:w.validation[m]})}}}}catch(w){console.log("Error",w),i("email",{type:"manual",message:w.message}),me(e,w.message)}}),className:"max-w-sm",children:[f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Current Password"}),s("input",{className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"current_password",type:"current_password",placeholder:"Current Password",name:"current_password",...a("current_password")}),s("p",{className:"text-red-500 text-xs italic",children:(d=c.current_password)==null?void 0:d.message})]}),s("div",{className:"h-[1px] mb-6 border border-b-0 border-[#EAECF0]"}),f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"New Password"}),s("input",{...a("new_password"),name:"new_password",className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"new_password",type:"password",placeholder:"New Password"}),s("p",{className:"text-red-500 text-xs italic",children:(u=c.new_password)==null?void 0:u.message})]}),f("div",{className:"mb-6",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Confirm Password"}),s("input",{...a("confirm_password"),name:"confirm_password",className:" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none",id:"confirm_password",type:"password",placeholder:"Confirm Password"}),s("p",{className:"text-red-500 text-xs italic",children:(g=c.confirm_password)==null?void 0:g.message})]}),s("div",{className:"flex justify-between",children:s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Update Password"})})]})]})},E0=()=>s("div",{className:"w-full flex justify-center items-center text-7xl h-[83vh] text-gray-700 ",children:"Not found"}),vn=({currentPage:e,pageSize:t,canPreviousPage:n,canNextPage:a,previousPage:r,nextPage:i,totalNumber:o,className:c})=>s(Se,{children:f("div",{className:`flex justify-between px-6 text-[#667085] font-medium py-2 items-center text-sm ${c!=null?c:""}`,children:[s("div",{className:"md:mt-2",children:f("span",{children:["Showing"," ",f("strong",{children:[o<1?0:e>1?(e-1)*t+1:e," - ",e*t<o?e*t:o," of ",o]})," "]})}),f("div",{className:"flex",children:[f("button",{type:"button",onClick:r,disabled:!n,className:"disabled:opacity-50 font-semibold text-sm md:px-5 px-3 py-2.5 text-center inline-flex items-center md:mr-2 md:mb-2",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"stroke-[#667085] h-4 w-4"})," ",s("span",{className:"ml-2",children:"Prev"})]}),f("button",{type:"button",onClick:i,disabled:!a,className:"disabled:opacity-50 font-semibold text-sm md:px-5 px-3 py-2.5 text-center inline-flex items-center mr-2 md:mb-2",children:[s("span",{className:"mr-2",children:"Next"}),s(ln,{type:"arrow",variant:"narrow-right",className:"stroke-[#667085] h-4 w-4"})]})]})]})}),ma=({link:e,text:t})=>s(Se,{children:f(Kd,{to:e,className:"ml-5 mb-1 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:[s(pu,{className:"h-6 w-6"}),s("span",{className:"ml-2",children:t||""})]})}),qxe=({data:e})=>{const[t,n]=h.exports.useState(!1),{dispatch:a}=h.exports.useContext(we),r=je();return f("div",{className:"w-full p-1",children:[f("div",{className:"flex justify-between",children:[s("div",{}),f("div",{children:[s("button",{className:"pr-2 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold border-r border-gray-200",onClick:()=>{r(`/admin/edit-faq/${e.id}`,{state:e})},children:"Edit"}),s("button",{className:"font-semibold text-sm py-2.5 text-center inline-flex items-center mr-2 mb-2",onClick:()=>{a({type:"SHOWMODAL",payload:{showModal:!0,modalShowMessage:"Are you sure you want to delete this question?",modalShowTitle:"Confirm Changes",type:"BaasDelete",modalBtnText:"Yes, Delete",itemId:e.id,table1:"faq",backTo:"/admin/faq"}})},children:s("span",{className:"ml-2",children:" Delete"})})]})]}),s("div",{className:"py-2 px-4 bg-white bg-opacity-60 border-[1px] border-gray-200",children:f("div",{className:"flex flex-wrap justify-between",children:[f("div",{className:"flex-1 p-2",children:[s("div",{className:`${t?" mb-4":""}`,children:s("h4",{className:"text-lg font-semibold leading-normal",children:e.question})}),t&&s("p",{className:"text-gray-600 font-medium sun-editor-editable",dangerouslySetInnerHTML:{__html:e.answer}})]}),s("div",{className:"w-auto p-2",children:t?s(ln,{type:"minus",className:"h-4 w-4 cursor-pointer",onClick:()=>n(!t)}):s(ln,{type:"plus",className:"h-4 w-4 cursor-pointer",onClick:()=>n(!t)})})]})})]})};new _e;let Zxe=new St;const Qxe=()=>{const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState(10),[c,l]=R.useState(0),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(!1),[S,m]=R.useState(!1),p=Qe({question:ge(),answer:ge()});Oe({resolver:Xe(p)});function b(_){(async function(){o(_),await N(0,_)})()}function x(){(async function(){await N(g-1>0?g-1:0,i)})()}function k(){(async function(){await N(g+1<=c?g+1:0,i)})()}async function N(_,C,E){try{let T=["deleted_at,is"];const D=await Zxe.getPaginate("faq",{join:[],filter:T,page:_||1,size:C,order:"update_at"}),{list:P,total:M,limit:O,num_pages:F,page:z}=D;r(P),o(O),l(F),y(z),u(M),v(z>1),m(z+1<=F)}catch(T){me(e,T.message),pe(t,T.message,4e3,"ERROR")}}return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"faq"}}),N(1,i)},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),N(g,i))},[n.deleted]),f(Se,{children:[s("div",{className:"rounded rounded-b-none border border-b-0 bg-white p-5 ",children:f("div",{className:" flex justify-between ",children:[s("h4",{className:"text-2xl font-medium",children:"FAQ"}),s(ma,{link:"/admin/add-faq",text:"Add New Question"})]})}),s("div",{className:"overflow-x-auto rounded border bg-white p-5",children:s("div",{className:"overflow-x-auto",children:a&&a.map(_=>s(qxe,{data:_},_.id))})}),s(vn,{currentPage:g,pageCount:c,pageSize:i,totalNumber:d,canPreviousPage:w,canNextPage:S,updatePageSize:b,previousPage:x,nextPage:k})]})},Sa=({title:e,backTo:t,children:n})=>{const a=je();return f("div",{className:" rounded bg-white mx-auto ",children:[f("div",{className:"border px-5 py-3",children:[s("div",{children:f("button",{type:"button",onClick:()=>a(`/admin/${t}`),className:"font-semibold text-sm pr-5 py-2.5 text-center inline-flex items-center mr-2 mb-2",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"stroke-[#667085] h-4 w-4"})," ",s("span",{className:"ml-2",children:"Back"})]})}),s("div",{className:"flex justify-between",children:f("h4",{className:"text-2xl font-bold",children:["Add New ",e]})})]}),s("div",{className:"border p-5 border-t-0",children:n})]})};var Gy={},n5={},wP={name:"blockquote",display:"command",add:function(e,t){const n=e.context;n.blockquote={targetButton:t,tag:e.util.createElement("BLOCKQUOTE")}},active:function(e){if(!e)this.util.removeClass(this.context.blockquote.targetButton,"active");else if(/blockquote/i.test(e.nodeName))return this.util.addClass(this.context.blockquote.targetButton,"active"),!0;return!1},action:function(){const e=this.util.getParentElement(this.getSelectionNode(),"blockquote");e?this.detachRangeFormatElement(e,null,null,!1,!1):this.applyRangeFormatElement(this.context.blockquote.tag.cloneNode(!1))}},vP={name:"align",display:"submenu",add:function(e,t){const n=e.icons,a=e.context;a.align={targetButton:t,_itemMenu:null,_alignList:null,currentAlign:"",defaultDir:e.options.rtl?"right":"left",icons:{justify:n.align_justify,left:n.align_left,right:n.align_right,center:n.align_center}};let r=this.setSubmenu(e),i=a.align._itemMenu=r.querySelector("ul");i.addEventListener("click",this.pickup.bind(e)),a.align._alignList=i.querySelectorAll("li button"),e.initMenuTarget(this.name,t,r),r=null,i=null},setSubmenu:function(e){const t=e.lang,n=e.icons,a=e.util.createElement("DIV"),r=e.options.alignItems;let i="";for(let o=0,c,l;o<r.length;o++)c=r[o],l=t.toolbar["align"+c.charAt(0).toUpperCase()+c.slice(1)],i+='<li><button type="button" class="se-btn-list se-btn-align" data-value="'+c+'" title="'+l+'" aria-label="'+l+'"><span class="se-list-icon">'+n["align_"+c]+"</span>"+l+"</button></li>";return a.className="se-submenu se-list-layer se-list-align",a.innerHTML='<div class="se-list-inner"><ul class="se-list-basic">'+i+"</ul></div>",a},active:function(e){const t=this.context.align,n=t.targetButton,a=n.firstElementChild;if(!e)this.util.changeElement(a,t.icons[t.defaultDir]),n.removeAttribute("data-focus");else if(this.util.isFormatElement(e)){const r=e.style.textAlign;if(r)return this.util.changeElement(a,t.icons[r]||t.icons[t.defaultDir]),n.setAttribute("data-focus",r),!0}return!1},on:function(){const e=this.context.align,t=e._alignList,n=e.targetButton.getAttribute("data-focus")||e.defaultDir;if(n!==e.currentAlign){for(let a=0,r=t.length;a<r;a++)n===t[a].getAttribute("data-value")?this.util.addClass(t[a],"active"):this.util.removeClass(t[a],"active");e.currentAlign=n}},exchangeDir:function(){const e=this.options.rtl?"right":"left";if(!this.context.align||this.context.align.defaultDir===e)return;this.context.align.defaultDir=e;let t=this.context.align._itemMenu,n=t.querySelector('[data-value="left"]'),a=t.querySelector('[data-value="right"]');if(n&&a){const r=n.parentElement,i=a.parentElement;r.appendChild(a),i.appendChild(n)}},pickup:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=null;for(;!n&&!/UL/i.test(t.tagName);)n=t.getAttribute("data-value"),t=t.parentNode;if(!n)return;const a=this.context.align.defaultDir,r=this.getSelectedElements();for(let i=0,o=r.length;i<o;i++)this.util.setStyle(r[i],"textAlign",n===a?"":n);this.effectNode=null,this.submenuOff(),this.focus(),this.history.push(!1)}},_P={name:"font",display:"submenu",add:function(e,t){const n=e.context;n.font={targetText:t.querySelector(".txt"),targetTooltip:t.parentNode.querySelector(".se-tooltip-text"),_fontList:null,currentFont:""};let a=this.setSubmenu(e);a.querySelector(".se-list-inner").addEventListener("click",this.pickup.bind(e)),n.font._fontList=a.querySelectorAll("ul li button"),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.lang,n=e.util.createElement("DIV");n.className="se-submenu se-list-layer se-list-font-family";let a,r,i,o,c=e.options.font,l='<div class="se-list-inner"><ul class="se-list-basic"><li><button type="button" class="default_value se-btn-list" title="'+t.toolbar.default+'" aria-label="'+t.toolbar.default+'">('+t.toolbar.default+")</button></li>";for(i=0,o=c.length;i<o;i++)a=c[i],r=a.split(",")[0],l+='<li><button type="button" class="se-btn-list" data-value="'+a+'" data-txt="'+r+'" title="'+r+'" aria-label="'+r+'" style="font-family:'+a+';">'+r+"</button></li>";return l+="</ul></div>",n.innerHTML=l,n},active:function(e){const t=this.context.font.targetText,n=this.context.font.targetTooltip;if(e){if(e.style&&e.style.fontFamily.length>0){const a=e.style.fontFamily.replace(/["']/g,"");return this.util.changeTxt(t,a),this.util.changeTxt(n,this.lang.toolbar.font+" ("+a+")"),!0}}else{const a=this.hasFocus?this.wwComputedStyle.fontFamily:this.lang.toolbar.font;this.util.changeTxt(t,a),this.util.changeTxt(n,this.hasFocus?this.lang.toolbar.font+(a?" ("+a+")":""):a)}return!1},on:function(){const e=this.context.font,t=e._fontList,n=e.targetText.textContent;if(n!==e.currentFont){for(let a=0,r=t.length;a<r;a++)n===(t[a].getAttribute("data-value")||"").replace(/'|"/g,"")?this.util.addClass(t[a],"active"):this.util.removeClass(t[a],"active");e.currentFont=n}},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();let t=e.target.getAttribute("data-value");if(t){const n=this.util.createElement("SPAN");/[\s\d\W]/.test(t)&&!/^['"].*['"]$/.test(t)&&(t='"'+t+'"'),n.style.fontFamily=t,this.nodeChange(n,["font-family"],null,null)}else this.nodeChange(null,["font-family"],["span"],!0);this.submenuOff()}},NP={name:"fontSize",display:"submenu",add:function(e,t){const n=e.context;n.fontSize={targetText:t.querySelector(".txt"),_sizeList:null,currentSize:""};let a=this.setSubmenu(e),r=a.querySelector("ul");r.addEventListener("click",this.pickup.bind(e)),n.fontSize._sizeList=r.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null,r=null},setSubmenu:function(e){const t=e.options,n=e.lang,a=e.util.createElement("DIV");a.className="se-submenu se-list-layer se-list-font-size";const r=t.fontSize?t.fontSize:[8,9,10,11,12,14,16,18,20,22,24,26,28,36,48,72];let i='<div class="se-list-inner"><ul class="se-list-basic"><li><button type="button" class="default_value se-btn-list" title="'+n.toolbar.default+'" aria-label="'+n.toolbar.default+'">('+n.toolbar.default+")</button></li>";for(let o=0,c=t.fontSizeUnit,l=r.length,d;o<l;o++)d=r[o],i+='<li><button type="button" class="se-btn-list" data-value="'+d+c+'" title="'+d+c+'" aria-label="'+d+c+'" style="font-size:'+d+c+';">'+d+"</button></li>";return i+="</ul></div>",a.innerHTML=i,a},active:function(e){if(!e)this.util.changeTxt(this.context.fontSize.targetText,this.hasFocus?this._convertFontSize.call(this,this.options.fontSizeUnit,this.wwComputedStyle.fontSize):this.lang.toolbar.fontSize);else if(e.style&&e.style.fontSize.length>0)return this.util.changeTxt(this.context.fontSize.targetText,this._convertFontSize.call(this,this.options.fontSizeUnit,e.style.fontSize)),!0;return!1},on:function(){const e=this.context.fontSize,t=e._sizeList,n=e.targetText.textContent;if(n!==e.currentSize){for(let a=0,r=t.length;a<r;a++)n===t[a].getAttribute("data-value")?this.util.addClass(t[a],"active"):this.util.removeClass(t[a],"active");e.currentSize=n}},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();const t=e.target.getAttribute("data-value");if(t){const n=this.util.createElement("SPAN");n.style.fontSize=t,this.nodeChange(n,["font-size"],null,null)}else this.nodeChange(null,["font-size"],["span"],!0);this.submenuOff()}},SP={name:"colorPicker",add:function(e){const t=e.context;t.colorPicker={colorListHTML:"",_colorInput:"",_defaultColor:"#000",_styleProperty:"color",_currentColor:"",_colorList:[]},t.colorPicker.colorListHTML=this.createColorList(e,this._makeColorList)},createColorList:function(e,t){const n=e.options,a=e.lang,r=!n.colorList||n.colorList.length===0?["#ff0000","#ff5e00","#ffe400","#abf200","#00d8ff","#0055ff","#6600ff","#ff00dd","#000000","#ffd8d8","#fae0d4","#faf4c0","#e4f7ba","#d4f4fa","#d9e5ff","#e8d9ff","#ffd9fa","#f1f1f1","#ffa7a7","#ffc19e","#faed7d","#cef279","#b2ebf4","#b2ccff","#d1b2ff","#ffb2f5","#bdbdbd","#f15f5f","#f29661","#e5d85c","#bce55c","#5cd1e5","#6699ff","#a366ff","#f261df","#8c8c8c","#980000","#993800","#998a00","#6b9900","#008299","#003399","#3d0099","#990085","#353535","#670000","#662500","#665c00","#476600","#005766","#002266","#290066","#660058","#222222"]:n.colorList;let i=[],o='<div class="se-list-inner">';for(let c=0,l=r.length,d;c<l;c++)d=r[c],d&&(typeof d=="string"&&(i.push(d),c<l-1)||(i.length>0&&(o+='<div class="se-selector-color">'+t(i)+"</div>",i=[]),typeof d=="object"&&(o+='<div class="se-selector-color">'+t(d)+"</div>")));return o+='<form class="se-form-group"><input type="text" maxlength="9" class="_se_color_picker_input se-color-input"/><button type="submit" class="se-btn-primary _se_color_picker_submit" title="'+a.dialogBox.submitButton+'" aria-label="'+a.dialogBox.submitButton+'">'+e.icons.checked+'</button><button type="button" class="se-btn _se_color_picker_remove" title="'+a.toolbar.removeFormat+'" aria-label="'+a.toolbar.removeFormat+'">'+e.icons.erase+"</button></form></div>",o},_makeColorList:function(e){let t="";t+='<ul class="se-color-pallet">';for(let n=0,a=e.length,r;n<a;n++)r=e[n],typeof r=="string"&&(t+='<li><button type="button" data-value="'+r+'" title="'+r+'" aria-label="'+r+'" style="background-color:'+r+';"></button></li>');return t+="</ul>",t},init:function(e,t){const n=this.plugins.colorPicker;let a=t||n.getColorInNode.call(this,e)||this.context.colorPicker._defaultColor;a=n.isHexColor(a)?a:n.rgb2hex(a)||a;const r=this.context.colorPicker._colorList;if(r)for(let i=0,o=r.length;i<o;i++)a.toLowerCase()===r[i].getAttribute("data-value").toLowerCase()?this.util.addClass(r[i],"active"):this.util.removeClass(r[i],"active");n.setInputText.call(this,n.colorName2hex.call(this,a))},setCurrentColor:function(e){this.context.colorPicker._currentColor=e,this.context.colorPicker._colorInput.style.borderColor=e},setInputText:function(e){e=/^#/.test(e)?e:"#"+e,this.context.colorPicker._colorInput.value=e,this.plugins.colorPicker.setCurrentColor.call(this,e)},getColorInNode:function(e){let t="";const n=this.context.colorPicker._styleProperty;for(;e&&!this.util.isWysiwygDiv(e)&&t.length===0;)e.nodeType===1&&e.style[n]&&(t=e.style[n]),e=e.parentNode;return t},isHexColor:function(e){return/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(e)},rgb2hex:function(e){const t=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);return t&&t.length===4?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""},colorName2hex:function(e){if(/^#/.test(e))return e;var t=this.util.createElement("div");t.style.display="none",t.style.color=e;var n=this._w.getComputedStyle(this._d.body.appendChild(t)).color.match(/\d+/g).map(function(a){return parseInt(a,10)});return this.util.removeItem(t),n.length>=3?"#"+((1<<24)+(n[0]<<16)+(n[1]<<8)+n[2]).toString(16).substr(1):!1}},kP={name:"fontColor",display:"submenu",add:function(e,t){e.addModule([SP]);const n=e.context;n.fontColor={previewEl:null,colorInput:null,colorList:null};let a=this.setSubmenu(e);n.fontColor.colorInput=a.querySelector("._se_color_picker_input"),n.fontColor.colorInput.addEventListener("keyup",this.onChangeInput.bind(e)),a.querySelector("._se_color_picker_submit").addEventListener("click",this.submit.bind(e)),a.querySelector("._se_color_picker_remove").addEventListener("click",this.remove.bind(e)),a.addEventListener("click",this.pickup.bind(e)),n.fontColor.colorList=a.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.context.colorPicker.colorListHTML,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML=t,n},on:function(){const e=this.context.colorPicker,t=this.context.fontColor;e._colorInput=t.colorInput;const n=this.wwComputedStyle.color;e._defaultColor=n?this.plugins.colorPicker.isHexColor(n)?n:this.plugins.colorPicker.rgb2hex(n):"#333333",e._styleProperty="color",e._colorList=t.colorList,this.plugins.colorPicker.init.call(this,this.getSelectionNode(),null)},onChangeInput:function(e){this.plugins.colorPicker.setCurrentColor.call(this,e.target.value)},submit:function(){this.plugins.fontColor.applyColor.call(this,this.context.colorPicker._currentColor)},pickup:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.fontColor.applyColor.call(this,e.target.getAttribute("data-value"))},remove:function(){this.nodeChange(null,["color"],["span"],!0),this.submenuOff()},applyColor:function(e){if(!e)return;const t=this.util.createElement("SPAN");t.style.color=e,this.nodeChange(t,["color"],null,null),this.submenuOff()}},CP={name:"hiliteColor",display:"submenu",add:function(e,t){e.addModule([SP]);const n=e.context;n.hiliteColor={previewEl:null,colorInput:null,colorList:null};let a=this.setSubmenu(e);n.hiliteColor.colorInput=a.querySelector("._se_color_picker_input"),n.hiliteColor.colorInput.addEventListener("keyup",this.onChangeInput.bind(e)),a.querySelector("._se_color_picker_submit").addEventListener("click",this.submit.bind(e)),a.querySelector("._se_color_picker_remove").addEventListener("click",this.remove.bind(e)),a.addEventListener("click",this.pickup.bind(e)),n.hiliteColor.colorList=a.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.context.colorPicker.colorListHTML,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML=t,n},on:function(){const e=this.context.colorPicker,t=this.context.hiliteColor;e._colorInput=t.colorInput;const n=this.wwComputedStyle.backgroundColor;e._defaultColor=n?this.plugins.colorPicker.isHexColor(n)?n:this.plugins.colorPicker.rgb2hex(n):"#ffffff",e._styleProperty="backgroundColor",e._colorList=t.colorList,this.plugins.colorPicker.init.call(this,this.getSelectionNode(),null)},onChangeInput:function(e){this.plugins.colorPicker.setCurrentColor.call(this,e.target.value)},submit:function(){this.plugins.hiliteColor.applyColor.call(this,this.context.colorPicker._currentColor)},pickup:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.hiliteColor.applyColor.call(this,e.target.getAttribute("data-value"))},remove:function(){this.nodeChange(null,["background-color"],["span"],!0),this.submenuOff()},applyColor:function(e){if(!e)return;const t=this.util.createElement("SPAN");t.style.backgroundColor=e,this.nodeChange(t,["background-color"],null,null),this.submenuOff()}},EP={name:"horizontalRule",display:"submenu",add:function(e,t){e.context.horizontalRule={currentHR:null};let n=this.setSubmenu(e);n.querySelector("ul").addEventListener("click",this.horizontalRulePick.bind(e)),e.initMenuTarget(this.name,t,n),n=null},setSubmenu:function(e){const t=e.lang,n=e.util.createElement("DIV"),a=e.options.hrItems||[{name:t.toolbar.hr_solid,class:"__se__solid"},{name:t.toolbar.hr_dashed,class:"__se__dashed"},{name:t.toolbar.hr_dotted,class:"__se__dotted"}];let r="";for(let i=0,o=a.length;i<o;i++)r+='<li><button type="button" class="se-btn-list btn_line" data-command="horizontalRule" data-value="'+a[i].class+'" title="'+a[i].name+'" aria-label="'+a[i].name+'"><hr'+(a[i].class?' class="'+a[i].class+'"':"")+(a[i].style?' style="'+a[i].style+'"':"")+"/></button></li>";return n.className="se-submenu se-list-layer se-list-line",n.innerHTML='<div class="se-list-inner"><ul class="se-list-basic">'+r+"</ul></div>",n},active:function(e){if(!e)this.util.hasClass(this.context.horizontalRule.currentHR,"on")&&this.controllersOff();else if(/HR/i.test(e.nodeName))return this.context.horizontalRule.currentHR=e,this.util.hasClass(e,"on")||(this.util.addClass(e,"on"),this.controllersOn("hr",this.util.removeClass.bind(this.util,e,"on"))),!0;return!1},appendHr:function(e){return this.focus(),this.insertComponent(e.cloneNode(!1),!1,!0,!1)},horizontalRulePick:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=t.getAttribute("data-command");for(;!n&&!/UL/i.test(t.tagName);)t=t.parentNode,n=t.getAttribute("data-command");if(!n)return;const a=this.plugins.horizontalRule.appendHr.call(this,t.firstElementChild);a&&(this.setRange(a,0,a,0),this.submenuOff())}},TP={name:"list",display:"submenu",add:function(e,t){const n=e.context;n.list={targetButton:t,_list:null,currentList:"",icons:{bullets:e.icons.list_bullets,number:e.icons.list_number}};let a=this.setSubmenu(e),r=a.querySelector("ul");r.addEventListener("click",this.pickup.bind(e)),n.list._list=r.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null,r=null},setSubmenu:function(e){const t=e.lang,n=e.util.createElement("DIV");return n.className="se-submenu se-list-layer",n.innerHTML='<div class="se-list-inner"><ul class="se-list-basic"><li><button type="button" class="se-btn-list se-tooltip" data-command="OL" title="'+t.toolbar.orderList+'" aria-label="'+t.toolbar.orderList+'">'+e.icons.list_number+'</button></li><li><button type="button" class="se-btn-list se-tooltip" data-command="UL" title="'+t.toolbar.unorderList+'" aria-label="'+t.toolbar.unorderList+'">'+e.icons.list_bullets+"</button></li></ul></div>",n},active:function(e){const t=this.context.list.targetButton,n=t.firstElementChild,a=this.util;if(a.isList(e)){const r=e.nodeName;return t.setAttribute("data-focus",r),a.addClass(t,"active"),/UL/i.test(r)?a.changeElement(n,this.context.list.icons.bullets):a.changeElement(n,this.context.list.icons.number),!0}else t.removeAttribute("data-focus"),a.changeElement(n,this.context.list.icons.number),a.removeClass(t,"active");return!1},on:function(){const e=this.context.list,t=e._list,n=e.targetButton.getAttribute("data-focus")||"";if(n!==e.currentList){for(let a=0,r=t.length;a<r;a++)n===t[a].getAttribute("data-command")?this.util.addClass(t[a],"active"):this.util.removeClass(t[a],"active");e.currentList=n}},editList:function(e,t,n){let a=this.getRange(),r=t||this.getSelectedElementsAndComponents(!1);if(r.length===0&&(t||(a=this.getRange_addLine(a,null),r=this.getSelectedElementsAndComponents(!1),r.length===0)))return;const i=this.util;i.sortByDepth(r,!0);let o=r[0],c=r[r.length-1],l=(i.isListCell(o)||i.isComponent(o))&&!o.previousElementSibling?o.parentNode.previousElementSibling:o.previousElementSibling,d=(i.isListCell(c)||i.isComponent(c))&&!c.nextElementSibling?c.parentNode.nextElementSibling:c.nextElementSibling;const u=a.collapsed,g={sc:a.startContainer,so:a.startContainer===a.endContainer&&i.onlyZeroWidthSpace(a.startContainer)&&a.startOffset===0&&a.endOffset===1?a.endOffset:a.startOffset,ec:a.endContainer,eo:a.endOffset};let y=null,w=!0;for(let v=0,S=r.length;v<S;v++)if(!i.isList(i.getRangeFormatElement(r[v],function(m){return this.getRangeFormatElement(m)&&m!==r[v]}.bind(i)))){w=!1;break}if(w&&(!l||o.tagName!==l.tagName||e!==l.tagName.toUpperCase())&&(!d||c.tagName!==d.tagName||e!==d.tagName.toUpperCase())){if(n){for(let x=0,k=r.length;x<k;x++)for(let N=x-1;N>=0;N--)if(r[N].contains(r[x])){r.splice(x,1),x--,k--;break}}const v=i.getRangeFormatElement(o),S=v&&v.tagName===e;let m,p;const b=function(x){return!this.isComponent(x)}.bind(i);S||(p=i.createElement(e));for(let x=0,k=r.length,N,_;x<k;x++)_=i.getRangeFormatElement(r[x],b),!(!_||!i.isList(_))&&(N?N!==_?(n&&i.isListCell(_.parentNode)?this.plugins.list._detachNested.call(this,m.f):y=this.detachRangeFormatElement(m.f[0].parentNode,m.f,p,!1,!0),_=r[x].parentNode,S||(p=i.createElement(e)),N=_,m={r:N,f:[i.getParentElement(r[x],"LI")]}):m.f.push(i.getParentElement(r[x],"LI")):(N=_,m={r:N,f:[i.getParentElement(r[x],"LI")]}),x===k-1&&(n&&i.isListCell(_.parentNode)?this.plugins.list._detachNested.call(this,m.f):y=this.detachRangeFormatElement(m.f[0].parentNode,m.f,p,!1,!0)))}else{const v=l&&l.parentNode,S=d&&d.parentNode;l=v&&!i.isWysiwygDiv(v)&&v.nodeName===e?v:l,d=S&&!i.isWysiwygDiv(S)&&S.nodeName===e?S:d;const m=l&&l.tagName===e,p=d&&d.tagName===e;let b=m?l:i.createElement(e),x=null,k=null,N=null;const _=function(C){return!this.isComponent(C)&&!this.isList(C)}.bind(i);for(let C=0,E=r.length,T,D,P,M,O,F,z,H,A;C<E;C++){if(D=r[C],D.childNodes.length===0&&!i._isIgnoreNodeChange(D)){i.removeItem(D);continue}if(M=r[C+1],O=D.parentNode,F=M?M.parentNode:null,P=i.isListCell(D),A=i.isRangeFormatElement(O)?O:null,z=P&&!i.isWysiwygDiv(O)?O.parentNode:O,H=P&&!i.isWysiwygDiv(O)?!M||i.isListCell(z)?O:O.nextSibling:D.nextSibling,T=i.createElement("LI"),i.copyFormatAttributes(T,D),C===0&&g.sc===D&&(g.sc=T),C===E-1&&g.ec===D&&(g.ec=T),i.isComponent(D)){const j=/^HR$/i.test(D.nodeName);j||(T.innerHTML="<br>"),T.innerHTML+=D.outerHTML,j&&(T.innerHTML+="<br>")}else{const j=D.childNodes;for(;j[0];)T.appendChild(j[0])}b.appendChild(T),(!M||z!==F||i.isRangeFormatElement(H))&&(x||(x=b),(!m||!M||z!==F)&&!(M&&i.isList(F)&&F===O)&&b.parentNode!==z&&z.insertBefore(b,H)),i.removeItem(D),m&&k===null&&(k=b.children.length-1),M&&(i.getRangeFormatElement(F,_)!==i.getRangeFormatElement(O,_)||i.isList(F)&&i.isList(O)&&i.getElementDepth(F)!==i.getElementDepth(O))&&(b=i.createElement(e)),A&&A.children.length===0&&i.removeItem(A)}k&&(x=x.children[k]),p&&(N=b.children.length-1,b.innerHTML+=d.innerHTML,b.children[N],i.removeItem(d))}return this.effectNode=null,u?y:g},_detachNested:function(e){const t=e[0],n=e[e.length-1],a=n.nextElementSibling,r=t.parentNode,i=r.parentNode.nextElementSibling,o=r.parentNode.parentNode;for(let l=0,d=e.length;l<d;l++)o.insertBefore(e[l],i);if(a&&r.children.length>0){const l=r.cloneNode(!1),d=r.childNodes,u=this.util.getPositionIndex(a);for(;d[u];)l.appendChild(d[u]);n.appendChild(l)}r.children.length===0&&this.util.removeItem(r),this.util.mergeSameTags(o);const c=this.util.getEdgeChildNodes(t,n);return{cc:t.parentNode,sc:c.sc,ec:c.ec}},editInsideList:function(e,t){t=t||this.getSelectedElements().filter(function(o){return this.isListCell(o)}.bind(this.util));const n=t.length;if(n===0||!e&&!this.util.isListCell(t[0].previousElementSibling)&&!this.util.isListCell(t[n-1].nextElementSibling))return{sc:t[0],so:0,ec:t[n-1],eo:1};let a=t[0].parentNode,r=t[n-1],i=null;if(e){if(a!==r.parentNode&&this.util.isList(r.parentNode.parentNode)&&r.nextElementSibling)for(r=r.nextElementSibling;r;)t.push(r),r=r.nextElementSibling;i=this.plugins.list.editList.call(this,a.nodeName.toUpperCase(),t,!0)}else{let o=this.util.createElement(a.nodeName),c=t[0].previousElementSibling,l=r.nextElementSibling;const d={s:null,e:null,sl:a,el:a};for(let y=0,w=n,v;y<w;y++)v=t[y],v.parentNode!==a&&(this.plugins.list._insiedList.call(this,a,o,c,l,d),a=v.parentNode,o=this.util.createElement(a.nodeName)),c=v.previousElementSibling,l=v.nextElementSibling,o.appendChild(v);this.plugins.list._insiedList.call(this,a,o,c,l,d);const u=this.util.getNodeFromPath(d.s,d.sl),g=this.util.getNodeFromPath(d.e,d.el);i={sc:u,so:0,ec:g,eo:g.textContent.length}}return i},_insiedList:function(e,t,n,a,r){let i=!1;if(n&&t.tagName===n.tagName){const o=t.children;for(;o[0];)n.appendChild(o[0]);t=n,i=!0}if(a&&t.tagName===a.tagName){const o=a.children;for(;o[0];)t.appendChild(o[0]);const c=a.nextElementSibling;a.parentNode.removeChild(a),a=c}if(!i){this.util.isListCell(n)&&(e=n,a=null),e.insertBefore(t,a),r.s||(r.s=this.util.getNodePath(t.firstElementChild.firstChild,e,null),r.sl=e);const o=e.contains(r.sl)?this.util.getNodePath(r.sl,e):null;r.e=this.util.getNodePath(t.lastElementChild.firstChild,e,null),r.el=e,this.util.mergeSameTags(e,[r.s,r.e,o],!1),this.util.mergeNestedTags(e),o&&(r.sl=this.util.getNodeFromPath(o,e))}return t},pickup:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n="";for(;!n&&!/^UL$/i.test(t.tagName);)n=t.getAttribute("data-command"),t=t.parentNode;if(!n)return;const a=this.plugins.list.editList.call(this,n,null,!1);a&&this.setRange(a.sc,a.so,a.ec,a.eo),this.submenuOff(),this.history.push(!1)}},LP={name:"table",display:"submenu",add:function(e,t){const n=e.context;let a=n.table={_element:null,_tdElement:null,_trElement:null,_trElements:null,_tableXY:[],_maxWidth:!0,_fixedColumn:!1,_rtl:e.options.rtl,cellControllerTop:e.options.tableCellControllerPosition==="top",resizeText:null,headerButton:null,mergeButton:null,splitButton:null,splitMenu:null,maxText:e.lang.controller.maxSize,minText:e.lang.controller.minSize,_physical_cellCnt:0,_logical_cellCnt:0,_rowCnt:0,_rowIndex:0,_physical_cellIndex:0,_logical_cellIndex:0,_current_colSpan:0,_current_rowSpan:0,icons:{expansion:e.icons.expansion,reduction:e.icons.reduction}},r=this.setSubmenu(e),i=r.querySelector(".se-controller-table-picker");a.tableHighlight=r.querySelector(".se-table-size-highlighted"),a.tableUnHighlight=r.querySelector(".se-table-size-unhighlighted"),a.tableDisplay=r.querySelector(".se-table-size-display"),e.options.rtl&&(a.tableHighlight.style.left=10*18-13+"px");let o=this.setController_table(e);a.tableController=o,a.resizeButton=o.querySelector("._se_table_resize"),a.resizeText=o.querySelector("._se_table_resize > span > span"),a.columnFixedButton=o.querySelector("._se_table_fixed_column"),a.headerButton=o.querySelector("._se_table_header");let c=this.setController_tableEditor(e,a.cellControllerTop);a.resizeDiv=c,a.splitMenu=c.querySelector(".se-btn-group-sub"),a.mergeButton=c.querySelector("._se_table_merge_button"),a.splitButton=c.querySelector("._se_table_split_button"),a.insertRowAboveButton=c.querySelector("._se_table_insert_row_a"),a.insertRowBelowButton=c.querySelector("._se_table_insert_row_b"),i.addEventListener("mousemove",this.onMouseMove_tablePicker.bind(e,a)),i.addEventListener("click",this.appendTable.bind(e)),c.addEventListener("click",this.onClick_tableController.bind(e)),o.addEventListener("click",this.onClick_tableController.bind(e)),e.initMenuTarget(this.name,t,r),n.element.relative.appendChild(c),n.element.relative.appendChild(o),r=null,i=null,c=null,o=null,a=null},setSubmenu:function(e){const t=e.util.createElement("DIV");return t.className="se-submenu se-selector-table",t.innerHTML='<div class="se-table-size"><div class="se-table-size-picker se-controller-table-picker"></div><div class="se-table-size-highlighted"></div><div class="se-table-size-unhighlighted"></div></div><div class="se-table-size-display">1 x 1</div>',t},setController_table:function(e){const t=e.lang,n=e.icons,a=e.util.createElement("DIV");return a.className="se-controller se-controller-table",a.innerHTML='<div><div class="se-btn-group"><button type="button" data-command="resize" class="se-btn se-tooltip _se_table_resize">'+n.expansion+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.maxSize+'</span></span></button><button type="button" data-command="layout" class="se-btn se-tooltip _se_table_fixed_column">'+n.fixed_column_width+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.fixedColumnWidth+'</span></span></button><button type="button" data-command="header" class="se-btn se-tooltip _se_table_header">'+n.table_header+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.tableHeader+'</span></span></button><button type="button" data-command="remove" class="se-btn se-tooltip">'+n.delete+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.remove+"</span></span></button></div></div>",a},setController_tableEditor:function(e,t){const n=e.lang,a=e.icons,r=e.util.createElement("DIV");return r.className="se-controller se-controller-table-cell",r.innerHTML=(t?"":'<div class="se-arrow se-arrow-up"></div>')+'<div class="se-btn-group"><button type="button" data-command="insert" data-value="row" data-option="up" class="se-btn se-tooltip _se_table_insert_row_a">'+a.insert_row_above+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.insertRowAbove+'</span></span></button><button type="button" data-command="insert" data-value="row" data-option="down" class="se-btn se-tooltip _se_table_insert_row_b">'+a.insert_row_below+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.insertRowBelow+'</span></span></button><button type="button" data-command="delete" data-value="row" class="se-btn se-tooltip">'+a.delete_row+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.deleteRow+'</span></span></button><button type="button" data-command="merge" class="_se_table_merge_button se-btn se-tooltip" disabled>'+a.merge_cell+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.mergeCells+'</span></span></button></div><div class="se-btn-group" style="padding-top: 0;"><button type="button" data-command="insert" data-value="cell" data-option="left" class="se-btn se-tooltip">'+a.insert_column_left+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.insertColumnBefore+'</span></span></button><button type="button" data-command="insert" data-value="cell" data-option="right" class="se-btn se-tooltip">'+a.insert_column_right+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.insertColumnAfter+'</span></span></button><button type="button" data-command="delete" data-value="cell" class="se-btn se-tooltip">'+a.delete_column+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.deleteColumn+'</span></span></button><button type="button" data-command="onsplit" class="_se_table_split_button se-btn se-tooltip">'+a.split_cell+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+n.controller.splitCells+'</span></span></button><div class="se-btn-group-sub sun-editor-common se-list-layer se-table-split"><div class="se-list-inner"><ul class="se-list-basic"><li class="se-btn-list" data-command="split" data-value="vertical" style="line-height:32px;" title="'+n.controller.VerticalSplit+'" aria-label="'+n.controller.VerticalSplit+'">'+n.controller.VerticalSplit+'</li><li class="se-btn-list" data-command="split" data-value="horizontal" style="line-height:32px;" title="'+n.controller.HorizontalSplit+'" aria-label="'+n.controller.HorizontalSplit+'">'+n.controller.HorizontalSplit+"</li></ul></div></div></div>",r},appendTable:function(){const e=this.util.createElement("TABLE"),t=this.plugins.table.createCells,n=this.context.table._tableXY[0];let a=this.context.table._tableXY[1],r="<tbody>";for(;a>0;)r+="<tr>"+t.call(this,"td",n)+"</tr>",--a;if(r+="</tbody>",e.innerHTML=r,this.insertComponent(e,!1,!0,!1)){const o=e.querySelector("td div");this.setRange(o,0,o,0),this.plugins.table.reset_table_picker.call(this)}},createCells:function(e,t,n){if(e=e.toLowerCase(),n){const a=this.util.createElement(e);return a.innerHTML="<div><br></div>",a}else{let a="";for(;t>0;)a+="<"+e+"><div><br></div></"+e+">",t--;return a}},onMouseMove_tablePicker:function(e,t){t.stopPropagation();let n=this._w.Math.ceil(t.offsetX/18),a=this._w.Math.ceil(t.offsetY/18);n=n<1?1:n,a=a<1?1:a,e._rtl&&(e.tableHighlight.style.left=n*18-13+"px",n=11-n),e.tableHighlight.style.width=n+"em",e.tableHighlight.style.height=a+"em",this.util.changeTxt(e.tableDisplay,n+" x "+a),e._tableXY=[n,a]},reset_table_picker:function(){if(!this.context.table.tableHighlight)return;const e=this.context.table.tableHighlight.style,t=this.context.table.tableUnHighlight.style;e.width="1em",e.height="1em",t.width="10em",t.height="10em",this.util.changeTxt(this.context.table.tableDisplay,"1 x 1"),this.submenuOff()},init:function(){const e=this.context.table,t=this.plugins.table;if(t._removeEvents.call(this),t._selectedTable){const n=t._selectedTable.querySelectorAll(".se-table-selected-cell");for(let a=0,r=n.length;a<r;a++)this.util.removeClass(n[a],"se-table-selected-cell")}t._toggleEditor.call(this,!0),e._element=null,e._tdElement=null,e._trElement=null,e._trElements=null,e._tableXY=[],e._maxWidth=!0,e._fixedColumn=!1,e._physical_cellCnt=0,e._logical_cellCnt=0,e._rowCnt=0,e._rowIndex=0,e._physical_cellIndex=0,e._logical_cellIndex=0,e._current_colSpan=0,e._current_rowSpan=0,t._shift=!1,t._selectedCells=null,t._selectedTable=null,t._ref=null,t._fixedCell=null,t._selectedCell=null,t._fixedCellName=null},call_controller_tableEdit:function(e){const t=this.plugins.table,n=this.context.table;if(!this.getSelection().isCollapsed&&!t._selectedCell){this.controllersOff(),this.util.removeClass(e,"se-table-selected-cell");return}const a=n._element||this.plugins.table._selectedTable||this.util.getParentElement(e,"TABLE");n._maxWidth=this.util.hasClass(a,"se-table-size-100")||a.style.width==="100%"||!a.style.width&&!this.util.hasClass(a,"se-table-size-auto"),n._fixedColumn=this.util.hasClass(a,"se-table-layout-fixed")||a.style.tableLayout==="fixed",t.setTableStyle.call(this,n._maxWidth?"width|column":"width"),t.setPositionControllerTop.call(this,a),t.setPositionControllerDiv.call(this,e,t._shift),t._shift||this.controllersOn(n.resizeDiv,n.tableController,t.init.bind(this),e,"table")},setPositionControllerTop:function(e){this.setControllerPosition(this.context.table.tableController,e,"top",{left:0,top:0})},setPositionControllerDiv:function(e,t){const n=this.context.table,a=n.resizeDiv;this.plugins.table.setCellInfo.call(this,e,t),n.cellControllerTop?this.setControllerPosition(a,n._element,"top",{left:n.tableController.offsetWidth,top:0}):this.setControllerPosition(a,e,"bottom",{left:0,top:0})},setCellInfo:function(e,t){const n=this.context.table,a=n._element=this.plugins.table._selectedTable||this.util.getParentElement(e,"TABLE");if(/THEAD/i.test(a.firstElementChild.nodeName)?this.util.addClass(n.headerButton,"active"):this.util.removeClass(n.headerButton,"active"),t||n._physical_cellCnt===0){n._tdElement!==e&&(n._tdElement=e,n._trElement=e.parentNode);const r=n._trElements=a.rows,i=e.cellIndex;let o=0;for(let u=0,g=r[0].cells,y=r[0].cells.length;u<y;u++)o+=g[u].colSpan;const c=n._rowIndex=n._trElement.rowIndex;n._rowCnt=r.length,n._physical_cellCnt=n._trElement.cells.length,n._logical_cellCnt=o,n._physical_cellIndex=i,n._current_colSpan=n._tdElement.colSpan-1,n._current_rowSpan-n._trElement.cells[i].rowSpan-1;let l=[],d=[];for(let u=0,g,y;u<=c;u++){g=r[u].cells,y=0;for(let w=0,v=g.length,S,m,p,b;w<v;w++){if(S=g[w],m=S.colSpan-1,p=S.rowSpan-1,b=w+y,d.length>0)for(let x=0,k;x<d.length;x++)k=d[x],!(k.row>u)&&(b>=k.index?(y+=k.cs,b+=k.cs,k.rs-=1,k.row=u+1,k.rs<1&&(d.splice(x,1),x--)):w===v-1&&(k.rs-=1,k.row=u+1,k.rs<1&&(d.splice(x,1),x--)));if(u===c&&w===i){n._logical_cellIndex=b;break}p>0&&l.push({index:b,cs:m+1,rs:p,row:-1}),y+=m}d=d.concat(l).sort(function(w,v){return w.index-v.index}),l=[]}l=null,d=null}},editTable:function(e,t){const n=this.plugins.table,a=this.context.table,r=a._element,i=e==="row";if(i){const o=a._trElement.parentNode;if(/^THEAD$/i.test(o.nodeName)){if(t==="up")return;if(!o.nextElementSibling||!/^TBODY$/i.test(o.nextElementSibling.nodeName)){r.innerHTML+="<tbody><tr>"+n.createCells.call(this,"td",a._logical_cellCnt,!1)+"</tr></tbody>";return}}}if(n._ref){const o=a._tdElement,c=n._selectedCells;if(i)if(t)n.setCellInfo.call(this,t==="up"?c[0]:c[c.length-1],!0),n.editRow.call(this,t,o);else{let l=c[0].parentNode;const d=[c[0]];for(let u=1,g=c.length,y;u<g;u++)y=c[u],l!==y.parentNode&&(d.push(y),l=y.parentNode);for(let u=0,g=d.length;u<g;u++)n.setCellInfo.call(this,d[u],!0),n.editRow.call(this,t)}else{const l=c[0].parentNode;if(t){let d=null;for(let u=0,g=c.length-1;u<g;u++)if(l!==c[u+1].parentNode){d=c[u];break}n.setCellInfo.call(this,t==="left"?c[0]:d||c[0],!0),n.editCell.call(this,t,o)}else{const d=[c[0]];for(let u=1,g=c.length,y;u<g&&(y=c[u],l===y.parentNode);u++)d.push(y);for(let u=0,g=d.length;u<g;u++)n.setCellInfo.call(this,d[u],!0),n.editCell.call(this,t)}}t||n.init.call(this)}else n[i?"editRow":"editCell"].call(this,t);if(!t){const o=r.children;for(let c=0;c<o.length;c++)o[c].children.length===0&&(this.util.removeItem(o[c]),c--);r.children.length===0&&this.util.removeItem(r)}},editRow:function(e,t){const n=this.context.table,a=!e,r=e==="up",i=n._rowIndex,o=a||r?i:i+n._current_rowSpan+1,c=a?-1:1,l=n._trElements;let d=n._logical_cellCnt;for(let u=0,g=i+(a?-1:0),y;u<=g;u++){if(y=l[u].cells,y.length===0)return;for(let w=0,v=y.length,S,m;w<v;w++)S=y[w].rowSpan,m=y[w].colSpan,!(S<2&&m<2)&&S+u>o&&o>u&&(y[w].rowSpan=S+c,d-=m)}if(a){const u=l[i+1];if(u){const g=[];let y=l[i].cells,w=0;for(let v=0,S=y.length,m,p;v<S;v++)m=y[v],p=v+w,w+=m.colSpan-1,m.rowSpan>1&&(m.rowSpan-=1,g.push({cell:m.cloneNode(!1),index:p}));if(g.length>0){let v=g.shift();y=u.cells,w=0;for(let S=0,m=y.length,p,b;S<m&&(p=y[S],b=S+w,w+=p.colSpan-1,!(b>=v.index&&(S--,w--,w+=v.cell.colSpan-1,u.insertBefore(v.cell,p),v=g.shift(),!v)));S++);if(v){u.appendChild(v.cell);for(let S=0,m=g.length;S<m;S++)u.appendChild(g[S].cell)}}}n._element.deleteRow(o)}else{const u=n._element.insertRow(o);u.innerHTML=this.plugins.table.createCells.call(this,"td",d,!1)}a?this.controllersOff():this.plugins.table.setPositionControllerDiv.call(this,t||n._tdElement,!0)},editCell:function(e,t){const n=this.context.table,a=this.util,r=!e,i=e==="left",o=n._current_colSpan,c=r||i?n._logical_cellIndex:n._logical_cellIndex+o+1,l=n._trElements;let d=[],u=[],g=0;const y=[],w=[];for(let v=0,S=n._rowCnt,m,p,b,x,k,N;v<S;v++){m=l[v],p=c,k=!1,b=m.cells,N=0;for(let _=0,C,E=b.length,T,D,P;_<E&&(C=b[_],!!C);_++)if(T=C.rowSpan-1,D=C.colSpan-1,r){if(P=_+N,u.length>0){const M=!b[_+1];for(let O=0,F;O<u.length;O++)F=u[O],!(F.row>v)&&(P>=F.index?(N+=F.cs,P=_+N,F.rs-=1,F.row=v+1,F.rs<1&&(u.splice(O,1),O--)):M&&(F.rs-=1,F.row=v+1,F.rs<1&&(u.splice(O,1),O--)))}T>0&&d.push({rs:T,cs:D+1,index:P,row:-1}),P>=p&&P+D<=p+o?y.push(C):P<=p+o&&P+D>=p?C.colSpan-=a.getOverlapRangeAtIndex(c,c+o,P,P+D):T>0&&(P<p||P+D>p+o)&&w.push({cell:C,i:v,rs:v+T}),N+=D}else{if(_>=p)break;if(D>0){if(g<1&&D+_>=p){C.colSpan+=1,p=null,g=T+1;break}p-=D}if(!k){for(let M=0,O;M<u.length;M++)O=u[M],p-=O.cs,O.rs-=1,O.rs<1&&(u.splice(M,1),M--);k=!0}}if(u=u.concat(d).sort(function(_,C){return _.index-C.index}),d=[],!r){if(g>0){g-=1;continue}p!==null&&b.length>0&&(x=this.plugins.table.createCells.call(this,b[0].nodeName,0,!0),x=m.insertBefore(x,b[p]))}}if(r){let v,S;for(let m=0,p=y.length,b;m<p;m++)b=y[m].parentNode,a.removeItem(y[m]),b.cells.length===0&&(v||(v=a.getArrayIndex(l,b)),S=a.getArrayIndex(l,b),a.removeItem(b));for(let m=0,p=w.length,b;m<p;m++)b=w[m],b.cell.rowSpan=a.getOverlapRangeAtIndex(v,S,b.i,b.rs);this.controllersOff()}else this.plugins.table.setPositionControllerDiv.call(this,t||n._tdElement,!0)},_closeSplitMenu:null,openSplitMenu:function(){this.util.addClass(this.context.table.splitButton,"on"),this.context.table.splitMenu.style.display="inline-table",this.plugins.table._closeSplitMenu=function(){this.util.removeClass(this.context.table.splitButton,"on"),this.context.table.splitMenu.style.display="none",this.removeDocEvent("click",this.plugins.table._closeSplitMenu),this.plugins.table._closeSplitMenu=null}.bind(this),this.addDocEvent("click",this.plugins.table._closeSplitMenu)},splitCells:function(e){const t=this.util,n=e==="vertical",a=this.context.table,r=a._tdElement,i=a._trElements,o=a._trElement,c=a._logical_cellIndex,l=a._rowIndex,d=this.plugins.table.createCells.call(this,r.nodeName,0,!0);if(n){const u=r.colSpan;if(d.rowSpan=r.rowSpan,u>1)d.colSpan=this._w.Math.floor(u/2),r.colSpan=u-d.colSpan,o.insertBefore(d,r.nextElementSibling);else{let g=[],y=[];for(let w=0,v=a._rowCnt,S,m;w<v;w++){S=i[w].cells,m=0;for(let p=0,b=S.length,x,k,N,_;p<b;p++){if(x=S[p],k=x.colSpan-1,N=x.rowSpan-1,_=p+m,y.length>0)for(let C=0,E;C<y.length;C++)E=y[C],!(E.row>w)&&(_>=E.index?(m+=E.cs,_+=E.cs,E.rs-=1,E.row=w+1,E.rs<1&&(y.splice(C,1),C--)):p===b-1&&(E.rs-=1,E.row=w+1,E.rs<1&&(y.splice(C,1),C--)));if(_<=c&&N>0&&g.push({index:_,cs:k+1,rs:N,row:-1}),x!==r&&_<=c&&_+k>=c+u-1){x.colSpan+=1;break}if(_>c)break;m+=k}y=y.concat(g).sort(function(p,b){return p.index-b.index}),g=[]}o.insertBefore(d,r.nextElementSibling)}}else{const u=r.rowSpan;if(d.colSpan=r.colSpan,u>1){d.rowSpan=this._w.Math.floor(u/2);const g=u-d.rowSpan,y=[],w=t.getArrayIndex(i,o)+g;for(let p=0,b,x;p<w;p++){b=i[p].cells,x=0;for(let k=0,N=b.length,_,C,E;k<N&&(E=k+x,!(E>=c));k++)_=b[k],C=_.rowSpan-1,C>0&&C+p>=w&&E<c&&y.push({index:E,cs:_.colSpan}),x+=_.colSpan-1}const v=i[w],S=v.cells;let m=y.shift();for(let p=0,b=S.length,x=0,k,N,_,C;p<b;p++){if(_=p+x,k=S[p],N=k.colSpan-1,C=_+N+1,m&&C>=m.index&&(x+=m.cs,C+=m.cs,m=y.shift()),C>=c||p===b-1){v.insertBefore(d,k.nextElementSibling);break}x+=N}r.rowSpan=g}else{d.rowSpan=r.rowSpan;const g=t.createElement("TR");g.appendChild(d);for(let v=0,S;v<l;v++){if(S=i[v].cells,S.length===0)return;for(let m=0,p=S.length;m<p;m++)v+S[m].rowSpan-1>=l&&(S[m].rowSpan+=1)}const y=a._physical_cellIndex,w=o.cells;for(let v=0,S=w.length;v<S;v++)v!==y&&(w[v].rowSpan+=1);o.parentNode.insertBefore(g,o.nextElementSibling)}}this.focusEdge(r),this.plugins.table.setPositionControllerDiv.call(this,r,!0)},mergeCells:function(){const e=this.plugins.table,t=this.context.table,n=this.util,a=e._ref,r=e._selectedCells,i=r[0];let o=null,c=null,l=a.ce-a.cs+1,d=a.re-a.rs+1,u="",g=null;for(let y=1,w=r.length,v,S;y<w;y++){v=r[y],g!==v.parentNode&&(g=v.parentNode),S=v.children;for(let m=0,p=S.length;m<p;m++)n.isFormatElement(S[m])&&n.onlyZeroWidthSpace(S[m].textContent)&&n.removeItem(S[m]);u+=v.innerHTML,n.removeItem(v),g.cells.length===0&&(o?c=g:o=g,d-=1)}if(o){const y=t._trElements,w=n.getArrayIndex(y,o),v=n.getArrayIndex(y,c||o),S=[];for(let m=0,p;m<=v;m++){if(p=y[m].cells,p.length===0){S.push(y[m]);continue}for(let b=0,x=p.length,k,N;b<x;b++)k=p[b],N=k.rowSpan-1,N>0&&m+N>=w&&(k.rowSpan-=n.getOverlapRangeAtIndex(w,v,m,m+N))}for(let m=0,p=S.length;m<p;m++)n.removeItem(S[m])}i.innerHTML+=u,i.colSpan=l,i.rowSpan=d,this.controllersOff(),e.setActiveButton.call(this,!0,!1),e.call_controller_tableEdit.call(this,i),n.addClass(i,"se-table-selected-cell"),this.focusEdge(i)},toggleHeader:function(){const e=this.util,t=this.context.table.headerButton,n=e.hasClass(t,"active"),a=this.context.table._element;if(n)e.removeItem(a.querySelector("thead"));else{const r=e.createElement("THEAD");r.innerHTML="<tr>"+this.plugins.table.createCells.call(this,"th",this.context.table._logical_cellCnt,!1)+"</tr>",a.insertBefore(r,a.firstElementChild)}e.toggleClass(t,"active"),/TH/i.test(this.context.table._tdElement.nodeName)?this.controllersOff():this.plugins.table.setPositionControllerDiv.call(this,this.context.table._tdElement,!1)},setTableStyle:function(e){const t=this.context.table,n=t._element;let a,r,i,o;e.indexOf("width")>-1&&(a=t.resizeButton.firstElementChild,r=t.resizeText,t._maxWidth?(i=t.icons.reduction,o=t.minText,t.columnFixedButton.style.display="block",this.util.removeClass(n,"se-table-size-auto"),this.util.addClass(n,"se-table-size-100")):(i=t.icons.expansion,o=t.maxText,t.columnFixedButton.style.display="none",this.util.removeClass(n,"se-table-size-100"),this.util.addClass(n,"se-table-size-auto")),this.util.changeElement(a,i),this.util.changeTxt(r,o)),e.indexOf("column")>-1&&(t._fixedColumn?(this.util.removeClass(n,"se-table-layout-auto"),this.util.addClass(n,"se-table-layout-fixed"),this.util.addClass(t.columnFixedButton,"active")):(this.util.removeClass(n,"se-table-layout-fixed"),this.util.addClass(n,"se-table-layout-auto"),this.util.removeClass(t.columnFixedButton,"active")))},setActiveButton:function(e,t){const n=this.context.table;/^TH$/i.test(e.nodeName)?(n.insertRowAboveButton.setAttribute("disabled",!0),n.insertRowBelowButton.setAttribute("disabled",!0)):(n.insertRowAboveButton.removeAttribute("disabled"),n.insertRowBelowButton.removeAttribute("disabled")),!t||e===t?(n.splitButton.removeAttribute("disabled"),n.mergeButton.setAttribute("disabled",!0)):(n.splitButton.setAttribute("disabled",!0),n.mergeButton.removeAttribute("disabled"))},_bindOnSelect:null,_bindOffSelect:null,_bindOffShift:null,_selectedCells:null,_shift:!1,_fixedCell:null,_fixedCellName:null,_selectedCell:null,_selectedTable:null,_ref:null,_toggleEditor:function(e){this.context.element.wysiwyg.setAttribute("contenteditable",e),e?this.util.removeClass(this.context.element.wysiwyg,"se-disabled"):this.util.addClass(this.context.element.wysiwyg,"se-disabled")},_offCellMultiSelect:function(e){e.stopPropagation();const t=this.plugins.table;t._shift?t._initBind&&(this._wd.removeEventListener("touchmove",t._initBind),t._initBind=null):(t._removeEvents.call(this),t._toggleEditor.call(this,!0)),!(!t._fixedCell||!t._selectedTable)&&(t.setActiveButton.call(this,t._fixedCell,t._selectedCell),t.call_controller_tableEdit.call(this,t._selectedCell||t._fixedCell),t._selectedCells=t._selectedTable.querySelectorAll(".se-table-selected-cell"),t._selectedCell&&t._fixedCell&&this.focusEdge(t._selectedCell),t._shift||(t._fixedCell=null,t._selectedCell=null,t._fixedCellName=null))},_onCellMultiSelect:function(e){this._antiBlur=!0;const t=this.plugins.table,n=this.util.getParentElement(e.target,this.util.isCell);if(t._shift)n===t._fixedCell?t._toggleEditor.call(this,!0):t._toggleEditor.call(this,!1);else if(!t._ref){if(n===t._fixedCell)return;t._toggleEditor.call(this,!1)}!n||n===t._selectedCell||t._fixedCellName!==n.nodeName||t._selectedTable!==this.util.getParentElement(n,"TABLE")||(t._selectedCell=n,t._setMultiCells.call(this,t._fixedCell,n))},_setMultiCells:function(e,t){const n=this.plugins.table,a=n._selectedTable.rows,r=this.util,i=n._selectedTable.querySelectorAll(".se-table-selected-cell");for(let u=0,g=i.length;u<g;u++)r.removeClass(i[u],"se-table-selected-cell");if(e===t&&(r.addClass(e,"se-table-selected-cell"),!n._shift))return;let o=!0,c=[],l=[];const d=n._ref={_i:0,cs:null,ce:null,rs:null,re:null};for(let u=0,g=a.length,y,w;u<g;u++){y=a[u].cells,w=0;for(let v=0,S=y.length,m,p,b,x;v<S;v++){if(m=y[v],b=m.colSpan-1,x=m.rowSpan-1,p=v+w,c.length>0)for(let k=0,N;k<c.length;k++)N=c[k],!(N.row>u)&&(p>=N.index?(w+=N.cs,p+=N.cs,N.rs-=1,N.row=u+1,N.rs<1&&(c.splice(k,1),k--)):v===S-1&&(N.rs-=1,N.row=u+1,N.rs<1&&(c.splice(k,1),k--)));if(o){if((m===e||m===t)&&(d.cs=d.cs!==null&&d.cs<p?d.cs:p,d.ce=d.ce!==null&&d.ce>p+b?d.ce:p+b,d.rs=d.rs!==null&&d.rs<u?d.rs:u,d.re=d.re!==null&&d.re>u+x?d.re:u+x,d._i+=1),d._i===2){o=!1,c=[],l=[],u=-1;break}}else if(r.getOverlapRangeAtIndex(d.cs,d.ce,p,p+b)&&r.getOverlapRangeAtIndex(d.rs,d.re,u,u+x)){const k=d.cs<p?d.cs:p,N=d.ce>p+b?d.ce:p+b,_=d.rs<u?d.rs:u,C=d.re>u+x?d.re:u+x;if(d.cs!==k||d.ce!==N||d.rs!==_||d.re!==C){d.cs=k,d.ce=N,d.rs=_,d.re=C,u=-1,c=[],l=[];break}r.addClass(m,"se-table-selected-cell")}x>0&&l.push({index:p,cs:b+1,rs:x,row:-1}),w+=m.colSpan-1}c=c.concat(l).sort(function(v,S){return v.index-S.index}),l=[]}},_removeEvents:function(){const e=this.plugins.table;e._initBind&&(this._wd.removeEventListener("touchmove",e._initBind),e._initBind=null),e._bindOnSelect&&(this._wd.removeEventListener("mousedown",e._bindOnSelect),this._wd.removeEventListener("mousemove",e._bindOnSelect),e._bindOnSelect=null),e._bindOffSelect&&(this._wd.removeEventListener("mouseup",e._bindOffSelect),e._bindOffSelect=null),e._bindOffShift&&(this._wd.removeEventListener("keyup",e._bindOffShift),e._bindOffShift=null)},_initBind:null,onTableCellMultiSelect:function(e,t){const n=this.plugins.table;n._removeEvents.call(this),this.controllersOff(),n._shift=t,n._fixedCell=e,n._fixedCellName=e.nodeName,n._selectedTable=this.util.getParentElement(e,"TABLE");const a=n._selectedTable.querySelectorAll(".se-table-selected-cell");for(let r=0,i=a.length;r<i;r++)this.util.removeClass(a[r],"se-table-selected-cell");this.util.addClass(e,"se-table-selected-cell"),n._bindOnSelect=n._onCellMultiSelect.bind(this),n._bindOffSelect=n._offCellMultiSelect.bind(this),t?(n._bindOffShift=function(){this.controllersOn(this.context.table.resizeDiv,this.context.table.tableController,this.plugins.table.init.bind(this),e,"table"),n._ref||this.controllersOff()}.bind(this),this._wd.addEventListener("keyup",n._bindOffShift,!1),this._wd.addEventListener("mousedown",n._bindOnSelect,!1)):this._wd.addEventListener("mousemove",n._bindOnSelect,!1),this._wd.addEventListener("mouseup",n._bindOffSelect,!1),n._initBind=n.init.bind(this),this._wd.addEventListener("touchmove",n._initBind,!1)},onClick_tableController:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")?e.target:e.target.parentNode;if(t.getAttribute("disabled"))return;const n=t.getAttribute("data-command"),a=t.getAttribute("data-value"),r=t.getAttribute("data-option"),i=this.plugins.table;if(typeof i._closeSplitMenu=="function"&&(i._closeSplitMenu(),n==="onsplit")||!n)return;e.preventDefault();const o=this.context.table;switch(n){case"insert":case"delete":i.editTable.call(this,a,r);break;case"header":i.toggleHeader.call(this);break;case"onsplit":i.openSplitMenu.call(this);break;case"split":i.splitCells.call(this,a);break;case"merge":i.mergeCells.call(this);break;case"resize":o._maxWidth=!o._maxWidth,i.setTableStyle.call(this,"width"),i.setPositionControllerTop.call(this,o._element),i.setPositionControllerDiv.call(this,o._tdElement,i._shift);break;case"layout":o._fixedColumn=!o._fixedColumn,i.setTableStyle.call(this,"column"),i.setPositionControllerTop.call(this,o._element),i.setPositionControllerDiv.call(this,o._tdElement,i._shift);break;case"remove":const c=o._element.parentNode;this.util.removeItem(o._element),this.controllersOff(),c!==this.context.element.wysiwyg&&this.util.removeItemAllParents(c,function(l){return l.childNodes.length===0},null),this.focus()}this.history.push(!1)}},DP={name:"formatBlock",display:"submenu",add:function(e,t){const n=e.context;n.formatBlock={targetText:t.querySelector(".txt"),targetTooltip:t.parentNode.querySelector(".se-tooltip-text"),_formatList:null,currentFormat:""};let a=this.setSubmenu(e);a.querySelector("ul").addEventListener("click",this.pickUp.bind(e)),n.formatBlock._formatList=a.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.options,n=e.lang.toolbar,a=e.util.createElement("DIV");a.className="se-submenu se-list-layer se-list-format";const r=["p","div","blockquote","pre","h1","h2","h3","h4","h5","h6"],i=!t.formats||t.formats.length===0?r:t.formats;let o='<div class="se-list-inner"><ul class="se-list-basic">';for(let c=0,l=i.length,d,u,g,y,w,v,S;c<l;c++)d=i[c],typeof d=="string"&&r.indexOf(d)>-1?(u=d.toLowerCase(),g=u==="blockquote"?"range":u==="pre"?"free":"replace",w=/^h/.test(u)?u.match(/\d+/)[0]:"",y=n["tag_"+(w?"h":u)]+w,S="",v=""):(u=d.tag.toLowerCase(),g=d.command,y=d.name||u,S=d.class,v=S?' class="'+S+'"':""),o+='<li><button type="button" class="se-btn-list" data-command="'+g+'" data-value="'+u+'" data-class="'+S+'" title="'+y+'" aria-label="'+y+'"><'+u+v+">"+y+"</"+u+"></button></li>";return o+="</ul></div>",a.innerHTML=o,a},active:function(e){let t=this.lang.toolbar.formats;const n=this.context.formatBlock.targetText;if(!e)this.util.changeTxt(n,t);else if(this.util.isFormatElement(e)){const r=this.context.formatBlock._formatList,i=e.nodeName.toLowerCase(),o=(e.className.match(/(\s|^)__se__format__[^\s]+/)||[""])[0].trim();for(let c=0,l=r.length,d;c<l;c++)if(d=r[c],i===d.getAttribute("data-value")&&o===d.getAttribute("data-class")){t=d.title;break}return this.util.changeTxt(n,t),n.setAttribute("data-value",i),n.setAttribute("data-class",o),!0}return!1},on:function(){const e=this.context.formatBlock,t=e._formatList,n=e.targetText,a=(n.getAttribute("data-value")||"")+(n.getAttribute("data-class")||"");if(a!==e.currentFormat){for(let r=0,i=t.length,o;r<i;r++)o=t[r],a===o.getAttribute("data-value")+o.getAttribute("data-class")?this.util.addClass(o,"active"):this.util.removeClass(o,"active");e.currentFormat=a}},pickUp:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=null,a=null,r=null,i="";for(;!n&&!/UL/i.test(t.tagName);){if(n=t.getAttribute("data-command"),a=t.getAttribute("data-value"),i=t.getAttribute("data-class"),n){r=t.firstChild;break}t=t.parentNode}if(!!n){if(n==="range"){const o=r.cloneNode(!1);this.applyRangeFormatElement(o)}else{let o=this.getRange(),c=this.getSelectedElementsAndComponents(!1);if(c.length===0&&(o=this.getRange_addLine(o,null),c=this.getSelectedElementsAndComponents(!1),c.length===0))return;const l=o.startOffset,d=o.endOffset,u=this.util;let g=c[0],y=c[c.length-1];const w=u.getNodePath(o.startContainer,g,null,null),v=u.getNodePath(o.endContainer,y,null,null),S=this.detachList(c,!1);S.sc&&(g=S.sc),S.ec&&(y=S.ec),this.setRange(u.getNodeFromPath(w,g),l,u.getNodeFromPath(v,y),d);const m=this.getSelectedElementsAndComponents(!1);if(n==="free"){const p=m.length-1;let b=m[p].parentNode,x=r.cloneNode(!1);const k=x;for(let N=p,_,C,E,T,D,P,M=!0;N>=0;N--)if(_=m[N],_!==(m[N+1]?m[N+1].parentNode:null)){if(P=u.isComponent(_),C=P?"":_.innerHTML.replace(/(?!>)\s+(?=<)|\n/g," "),E=u.getParentElement(_,function(O){return O.parentNode===b}),(b!==_.parentNode||P)&&(u.isFormatElement(b)?(b.parentNode.insertBefore(x,b.nextSibling),b=b.parentNode):(b.insertBefore(x,E?E.nextSibling:null),b=_.parentNode),T=x.nextSibling,T&&x.nodeName===T.nodeName&&u.isSameAttributes(x,T)&&(x.innerHTML+="<BR>"+T.innerHTML,u.removeItem(T)),x=r.cloneNode(!1),M=!0),D=x.innerHTML,x.innerHTML=(M||!C||!D||/<br>$/i.test(C)?C:C+"<BR>")+D,N===0){b.insertBefore(x,_),T=_.nextSibling,T&&x.nodeName===T.nodeName&&u.isSameAttributes(x,T)&&(x.innerHTML+="<BR>"+T.innerHTML,u.removeItem(T));const O=x.previousSibling;O&&x.nodeName===O.nodeName&&u.isSameAttributes(x,O)&&(O.innerHTML+="<BR>"+x.innerHTML,u.removeItem(x))}P||u.removeItem(_),C&&(M=!1)}this.setRange(k,0,k,0)}else{for(let p=0,b=m.length,x,k;p<b;p++)x=m[p],(x.nodeName.toLowerCase()!==a.toLowerCase()||(x.className.match(/(\s|^)__se__format__[^\s]+/)||[""])[0].trim()!==i)&&!u.isComponent(x)&&(k=r.cloneNode(!1),u.copyFormatAttributes(k,x),k.innerHTML=x.innerHTML,x.parentNode.replaceChild(k,x)),p===0&&(g=k||x),p===b-1&&(y=k||x),k=null;this.setRange(u.getNodeFromPath(w,g),l,u.getNodeFromPath(v,y),d)}this.history.push(!1)}this.submenuOff()}}},MP={name:"lineHeight",display:"submenu",add:function(e,t){const n=e.context;n.lineHeight={_sizeList:null,currentSize:-1};let a=this.setSubmenu(e),r=a.querySelector("ul");r.addEventListener("click",this.pickup.bind(e)),n.lineHeight._sizeList=r.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null,r=null},setSubmenu:function(e){const t=e.options,n=e.lang,a=e.util.createElement("DIV");a.className="se-submenu se-list-layer";const r=t.lineHeights?t.lineHeights:[{text:"1",value:1},{text:"1.15",value:1.15},{text:"1.5",value:1.5},{text:"2",value:2}];let i='<div class="se-list-inner"><ul class="se-list-basic"><li><button type="button" class="default_value se-btn-list" title="'+n.toolbar.default+'" aria-label="'+n.toolbar.default+'">('+n.toolbar.default+")</button></li>";for(let o=0,c=r.length,l;o<c;o++)l=r[o],i+='<li><button type="button" class="se-btn-list" data-value="'+l.value+'" title="'+l.text+'" aria-label="'+l.text+'">'+l.text+"</button></li>";return i+="</ul></div>",a.innerHTML=i,a},on:function(){const e=this.context.lineHeight,t=e._sizeList,n=this.util.getFormatElement(this.getSelectionNode()),a=n?n.style.lineHeight+"":"";if(a!==e.currentSize){for(let r=0,i=t.length;r<i;r++)a===t[r].getAttribute("data-value")?this.util.addClass(t[r],"active"):this.util.removeClass(t[r],"active");e.currentSize=a}},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();const t=e.target.getAttribute("data-value")||"",n=this.getSelectedElements();for(let a=0,r=n.length;a<r;a++)n[a].style.lineHeight=t;this.submenuOff(),this.history.push(!1)}},AP={name:"template",display:"submenu",add:function(e,t){const n=e.context;n.template={selectedIndex:-1};let a=this.setSubmenu(e);a.querySelector("ul").addEventListener("click",this.pickup.bind(e)),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.options.templates;if(!t||t.length===0)throw Error('[SUNEDITOR.plugins.template.fail] To use the "template" plugin, please define the "templates" option.');const n=e.util.createElement("DIV");n.className="se-list-layer";let a='<div class="se-submenu se-list-inner"><ul class="se-list-basic">';for(let r=0,i=t.length,o;r<i;r++)o=t[r],a+='<li><button type="button" class="se-btn-list" data-value="'+r+'" title="'+o.name+'" aria-label="'+o.name+'">'+o.name+"</button></li>";return a+="</ul></div>",n.innerHTML=a,n},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation(),this.context.template.selectedIndex=e.target.getAttribute("data-value")*1;const t=this.options.templates[this.context.template.selectedIndex];if(t.html)this.setContents(t.html);else throw this.submenuOff(),Error('[SUNEDITOR.template.fail] cause : "templates[i].html not found"');this.submenuOff()}},IP={name:"paragraphStyle",display:"submenu",add:function(e,t){const n=e.context;n.paragraphStyle={_classList:null};let a=this.setSubmenu(e);a.querySelector("ul").addEventListener("click",this.pickUp.bind(e)),n.paragraphStyle._classList=a.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null},setSubmenu:function(e){const t=e.options,n=e.util.createElement("DIV");n.className="se-submenu se-list-layer se-list-format";const a=e.lang.menu,r={spaced:{name:a.spaced,class:"__se__p-spaced",_class:""},bordered:{name:a.bordered,class:"__se__p-bordered",_class:""},neon:{name:a.neon,class:"__se__p-neon",_class:""}},i=!t.paragraphStyles||t.paragraphStyles.length===0?["spaced","bordered","neon"]:t.paragraphStyles;let o='<div class="se-list-inner"><ul class="se-list-basic">';for(let c=0,l=i.length,d,u,g,y;c<l;c++){if(d=i[c],typeof d=="string"){const w=r[d.toLowerCase()];if(!w)continue;d=w}u=d.name,g=d.class?' class="'+d.class+'"':"",y=d._class,o+='<li><button type="button" class="se-btn-list'+(y?" "+y:"")+'" data-value="'+d.class+'" title="'+u+'" aria-label="'+u+'"><div'+g+">"+u+"</div></button></li>"}return o+="</ul></div>",n.innerHTML=o,n},on:function(){const t=this.context.paragraphStyle._classList,n=this.util.getFormatElement(this.getSelectionNode());for(let a=0,r=t.length;a<r;a++)this.util.hasClass(n,t[a].getAttribute("data-value"))?this.util.addClass(t[a],"active"):this.util.removeClass(t[a],"active")},pickUp:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=null;for(;!/^UL$/i.test(t.tagName)&&(n=t.getAttribute("data-value"),!n);)t=t.parentNode;if(!n)return;let a=this.getSelectedElements();if(a.length===0&&(this.getRange_addLine(this.getRange(),null),a=this.getSelectedElements(),a.length===0))return;const r=this.util.hasClass(t,"active")?this.util.removeClass.bind(this.util):this.util.addClass.bind(this.util);for(let i=0,o=a.length;i<o;i++)r(a[i],n);this.submenuOff(),this.history.push(!1)}},OP={name:"textStyle",display:"submenu",add:function(e,t){const n=e.context;n.textStyle={_styleList:null};let a=this.setSubmenu(e),r=a.querySelector("ul");r.addEventListener("click",this.pickup.bind(e)),n.textStyle._styleList=a.querySelectorAll("li button"),e.initMenuTarget(this.name,t,a),a=null,r=null},setSubmenu:function(e){const t=e.options,n=e.util.createElement("DIV");n.className="se-submenu se-list-layer se-list-format";const a={code:{name:e.lang.menu.code,class:"__se__t-code",tag:"code"},translucent:{name:e.lang.menu.translucent,style:"opacity: 0.5;",tag:"span"},shadow:{name:e.lang.menu.shadow,class:"__se__t-shadow",tag:"span"}},r=t.textStyles?t.textStyles:e._w.Object.keys(a);let i='<div class="se-list-inner"><ul class="se-list-basic">';for(let o=0,c=r.length,l,d,u,g,y,w,v;o<c;o++){if(l=r[o],g="",w="",y=[],typeof l=="string"){const S=a[l.toLowerCase()];if(!S)continue;l=S}u=l.name,d=l.tag||"span",v=l._class,l.style&&(g+=' style="'+l.style+'"',w+=l.style.replace(/:[^;]+(;|$)\s*/g,","),y.push("style")),l.class&&(g+=' class="'+l.class+'"',w+="."+l.class.trim().replace(/\s+/g,",."),y.push("class")),w=w.replace(/,$/,""),i+='<li><button type="button" class="se-btn-list'+(v?" "+v:"")+'" data-command="'+d+'" data-value="'+w+'" title="'+u+'" aria-label="'+u+'"><'+d+g+">"+u+"</"+d+"></button></li>"}return i+="</ul></div>",n.innerHTML=i,n},on:function(){const e=this.util,n=this.context.textStyle._styleList,a=this.getSelectionNode();for(let r=0,i=n.length,o,c,l;r<i;r++){o=n[r],c=o.getAttribute("data-value").split(",");for(let d=0,u,g;d<c.length;d++){for(u=a,l=!1;u&&!e.isFormatElement(u)&&!e.isComponent(u);){if(u.nodeName.toLowerCase()===o.getAttribute("data-command").toLowerCase()&&(g=c[d],/^\./.test(g)?e.hasClass(u,g.replace(/^\./,"")):!!u.style[g])){l=!0;break}u=u.parentNode}if(!l)break}l?e.addClass(o,"active"):e.removeClass(o,"active")}},pickup:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,n=null,a=null;for(;!n&&!/UL/i.test(t.tagName);){if(n=t.getAttribute("data-command"),n){a=t.firstChild;break}t=t.parentNode}if(!n)return;const r=a.style.cssText.replace(/:.+(;|$)/g,",").split(",");r.pop();const i=a.classList;for(let l=0,d=i.length;l<d;l++)r.push("."+i[l]);const o=this.util.hasClass(t,"active")?null:a.cloneNode(!1),c=o?null:[a.nodeName];this.nodeChange(o,r,c,!0),this.submenuOff()}},PP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={name:"dialog",add:function(r){const i=r.context;i.dialog={kind:"",updateModal:!1,_closeSignal:!1};let o=r.util.createElement("DIV");o.className="se-dialog sun-editor-common";let c=r.util.createElement("DIV");c.className="se-dialog-back",c.style.display="none";let l=r.util.createElement("DIV");l.className="se-dialog-inner",l.style.display="none",o.appendChild(c),o.appendChild(l),i.dialog.modalArea=o,i.dialog.back=c,i.dialog.modal=l,i.dialog.modal.addEventListener("mousedown",this._onMouseDown_dialog.bind(r)),i.dialog.modal.addEventListener("click",this._onClick_dialog.bind(r)),i.element.relative.appendChild(o),o=null,c=null,l=null},_onMouseDown_dialog:function(r){/se-dialog-inner/.test(r.target.className)?this.context.dialog._closeSignal=!0:this.context.dialog._closeSignal=!1},_onClick_dialog:function(r){(/close/.test(r.target.getAttribute("data-command"))||this.context.dialog._closeSignal)&&this.plugins.dialog.close.call(this)},open:function(r,i){if(this.modalForm)return!1;this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.plugins.dialog._bindClose=function(c){!/27/.test(c.keyCode)||this.plugins.dialog.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.dialog._bindClose),this.context.dialog.updateModal=i,this.options.popupDisplay==="full"?this.context.dialog.modalArea.style.position="fixed":this.context.dialog.modalArea.style.position="absolute",this.context.dialog.kind=r,this.modalForm=this.context[r].modal;const o=this.context[r].focusElement;typeof this.plugins[r].on=="function"&&this.plugins[r].on.call(this,i),this.context.dialog.modalArea.style.display="block",this.context.dialog.back.style.display="block",this.context.dialog.modal.style.display="block",this.modalForm.style.display="block",o&&o.focus()},_bindClose:null,close:function(){this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null);const r=this.context.dialog.kind;this.modalForm.style.display="none",this.context.dialog.back.style.display="none",this.context.dialog.modalArea.style.display="none",this.context.dialog.updateModal=!1,typeof this.plugins[r].init=="function"&&this.plugins[r].init.call(this),this.context.dialog.kind="",this.modalForm=null,this.focus()}};return typeof n=="undefined"&&(t.SUNEDITOR_MODULES||Object.defineProperty(t,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_MODULES,"dialog",{enumerable:!0,writable:!1,configurable:!1,value:a})),a})})(PP);var uh=PP.exports,Jxe={name:"selectMenu",add:function(e){e.context.selectMenu={caller:{},callerContext:null}},setForm:function(){return'<div class="se-select-list"></div>'},createList:function(e,t,n){e.form.innerHTML="<ul>"+n+"</ul>",e.items=t,e.menus=e.form.querySelectorAll("li")},initEvent:function(e,t){const n=t.querySelector(".se-select-list"),a=this.context.selectMenu.caller[e]={form:n,items:[],menus:[],index:-1,item:null,clickMethod:null,callerName:e};n.addEventListener("mousedown",this.plugins.selectMenu.onMousedown_list),n.addEventListener("mousemove",this.plugins.selectMenu.onMouseMove_list.bind(this,a)),n.addEventListener("click",this.plugins.selectMenu.onClick_list.bind(this,a))},onMousedown_list:function(e){e.preventDefault(),e.stopPropagation()},onMouseMove_list:function(e,t){this.util.addClass(e.form,"__se_select-menu-mouse-move");const n=t.target.getAttribute("data-index");!n||(e.index=n*1)},onClick_list:function(e,t){const n=t.target.getAttribute("data-index");!n||e.clickMethod.call(this,e.items[n])},moveItem:function(e,t){this.util.removeClass(e.form,"__se_select-menu-mouse-move"),t=e.index+t;const n=e.menus,a=n.length,r=e.index=t>=a?0:t<0?a-1:t;for(let i=0;i<a;i++)i===r?this.util.addClass(n[i],"active"):this.util.removeClass(n[i],"active");e.item=e.items[r]},getItem:function(e,t){return t=!t||t<0?e.index:t,e.items[t]},on:function(e,t){const n=this.context.selectMenu.caller[e];this.context.selectMenu.callerContext=n,n.clickMethod=t,n.callerName=e},open:function(e,t){const n=e.form;n.style.visibility="hidden",n.style.display="block",t(n),n.style.visibility=""},close:function(e){e.form.style.display="none",e.items=[],e.menus=[],e.index=-1,e.item=null},init:function(e){!e||(e.items=[],e.menus=[],e.index=-1,e.item=null,e.callerName="",this.context.selectMenu.callerContext=null)}},RP={name:"anchor",add:function(e){e.addModule([Jxe]),e.context.anchor={caller:{},forms:this.setDialogForm(e),host:(e._w.location.origin+e._w.location.pathname).replace(/\/$/,""),callerContext:null}},setDialogForm:function(e){const t=e.lang,n=e.options.linkRel,a=(e.options.linkRelDefault.default||"").split(" "),r=e.icons,i=e.util.createElement("DIV");let o='<div class="se-dialog-body"><div class="se-dialog-form"><label>'+t.dialogBox.linkBox.url+'</label><div class="se-dialog-form-files"><input class="se-input-form se-input-url" type="text" placeholder="'+(e.options.protocol||"")+'" /><button type="button" class="se-btn se-dialog-files-edge-button _se_bookmark_button" title="'+t.dialogBox.linkBox.bookmark+'" aria-label="'+t.dialogBox.linkBox.bookmark+'">'+r.bookmark+"</button>"+e.plugins.selectMenu.setForm()+'</div><div class="se-anchor-preview-form"><span class="se-svg se-anchor-preview-icon _se_anchor_bookmark_icon">'+r.bookmark+'</span><span class="se-svg se-anchor-preview-icon _se_anchor_download_icon">'+r.download+'</span><pre class="se-link-preview"></pre></div></div><div class="se-dialog-form"><label>'+t.dialogBox.linkBox.text+'</label><input class="se-input-form _se_anchor_text" type="text" /></div><div class="se-dialog-form-footer"><label><input type="checkbox" class="se-dialog-btn-check _se_anchor_check" />&nbsp;'+t.dialogBox.linkBox.newWindowCheck+'</label><label><input type="checkbox" class="se-dialog-btn-check _se_anchor_download" />&nbsp;'+t.dialogBox.linkBox.downloadLinkCheck+"</label>";if(n.length>0){o+='<div class="se-anchor-rel"><button type="button" class="se-btn se-btn-select se-anchor-rel-btn">&lt;rel&gt;</button><div class="se-anchor-rel-wrapper"><pre class="se-link-preview se-anchor-rel-preview"></pre></div><div class="se-list-layer"><div class="se-list-inner"><ul class="se-list-basic se-list-checked">';for(let c=0,l=n.length,d;c<l;c++)d=n[c],o+='<li><button type="button" class="se-btn-list'+(a.indexOf(d)>-1?" se-checked":"")+'" data-command="'+d+'" title="'+d+'" aria-label="'+d+'"><span class="se-svg">'+r.checked+"</span>"+d+"</button></li>";o+="</ul></div></div></div>"}return o+="</div></div>",i.innerHTML=o,i},initEvent:function(e,t){const n=this.plugins.anchor,a=this.context.anchor.caller[e]={modal:t,urlInput:null,linkDefaultRel:this.options.linkRelDefault,defaultRel:this.options.linkRelDefault.default||"",currentRel:[],linkAnchor:null,linkValue:"",_change:!1,callerName:e};typeof a.linkDefaultRel.default=="string"&&(a.linkDefaultRel.default=a.linkDefaultRel.default.trim()),typeof a.linkDefaultRel.check_new_window=="string"&&(a.linkDefaultRel.check_new_window=a.linkDefaultRel.check_new_window.trim()),typeof a.linkDefaultRel.check_bookmark=="string"&&(a.linkDefaultRel.check_bookmark=a.linkDefaultRel.check_bookmark.trim()),a.urlInput=t.querySelector(".se-input-url"),a.anchorText=t.querySelector("._se_anchor_text"),a.newWindowCheck=t.querySelector("._se_anchor_check"),a.downloadCheck=t.querySelector("._se_anchor_download"),a.download=t.querySelector("._se_anchor_download_icon"),a.preview=t.querySelector(".se-link-preview"),a.bookmark=t.querySelector("._se_anchor_bookmark_icon"),a.bookmarkButton=t.querySelector("._se_bookmark_button"),this.plugins.selectMenu.initEvent.call(this,e,t);const r=this.context.selectMenu.caller[e];this.options.linkRel.length>0&&(a.relButton=t.querySelector(".se-anchor-rel-btn"),a.relList=t.querySelector(".se-list-layer"),a.relPreview=t.querySelector(".se-anchor-rel-preview"),a.relButton.addEventListener("click",n.onClick_relButton.bind(this,a)),a.relList.addEventListener("click",n.onClick_relList.bind(this,a))),a.newWindowCheck.addEventListener("change",n.onChange_newWindowCheck.bind(this,a)),a.downloadCheck.addEventListener("change",n.onChange_downloadCheck.bind(this,a)),a.anchorText.addEventListener("input",n.onChangeAnchorText.bind(this,a)),a.urlInput.addEventListener("input",n.onChangeUrlInput.bind(this,a)),a.urlInput.addEventListener("keydown",n.onKeyDownUrlInput.bind(this,r)),a.urlInput.addEventListener("focus",n.onFocusUrlInput.bind(this,a,r)),a.urlInput.addEventListener("blur",n.onBlurUrlInput.bind(this,r)),a.bookmarkButton.addEventListener("click",n.onClick_bookmarkButton.bind(this,a))},on:function(e,t){const n=this.plugins.anchor;if(!t)n.init.call(this,e),e.anchorText.value=this.getSelection().toString().trim(),e.newWindowCheck.checked=this.options.linkTargetNewWindow;else if(e.linkAnchor){this.context.dialog.updateModal=!0;const a=e.linkAnchor.getAttribute("href");e.linkValue=e.preview.textContent=e.urlInput.value=n.selfPathBookmark.call(this,a)?a.substr(a.lastIndexOf("#")):a,e.anchorText.value=e.linkAnchor.textContent,e.newWindowCheck.checked=!!/_blank/i.test(e.linkAnchor.target),e.downloadCheck.checked=e.linkAnchor.download}this.context.anchor.callerContext=e,n.setRel.call(this,e,t&&e.linkAnchor?e.linkAnchor.rel:e.defaultRel),n.setLinkPreview.call(this,e,e.linkValue),this.plugins.selectMenu.on.call(this,e.callerName,this.plugins.anchor.setHeaderBookmark)},selfPathBookmark:function(e){const t=this._w.location.href.replace(/\/$/,"");return e.indexOf("#")===0||e.indexOf(t)===0&&e.indexOf("#")===(t.indexOf("#")===-1?t.length:t.substr(0,t.indexOf("#")).length)},_closeRelMenu:null,toggleRelList:function(e,t){if(!t)this.plugins.anchor._closeRelMenu&&this.plugins.anchor._closeRelMenu();else{const n=e.relButton,a=e.relList;this.util.addClass(n,"active"),a.style.visibility="hidden",a.style.display="block",this.options.rtl?a.style.left=n.offsetLeft-a.offsetWidth-1+"px":a.style.left=n.offsetLeft+n.offsetWidth+1+"px",a.style.top=n.offsetTop+n.offsetHeight/2-a.offsetHeight/2+"px",a.style.visibility="",this.plugins.anchor._closeRelMenu=function(r,i,o){o&&(r.relButton.contains(o.target)||r.relList.contains(o.target))||(this.util.removeClass(i,"active"),r.relList.style.display="none",this.modalForm.removeEventListener("click",this.plugins.anchor._closeRelMenu),this.plugins.anchor._closeRelMenu=null)}.bind(this,e,n),this.modalForm.addEventListener("click",this.plugins.anchor._closeRelMenu)}},onClick_relButton:function(e,t){this.plugins.anchor.toggleRelList.call(this,e,!this.util.hasClass(t.target,"active"))},onClick_relList:function(e,t){const n=t.target,a=n.getAttribute("data-command");if(!a)return;const r=e.currentRel,i=this.util.toggleClass(n,"se-checked"),o=r.indexOf(a);i?o===-1&&r.push(a):o>-1&&r.splice(o,1),e.relPreview.title=e.relPreview.textContent=r.join(" ")},setRel:function(e,t){const n=e.relList,a=e.currentRel=t?t.split(" "):[];if(!n)return;const r=n.querySelectorAll("button");for(let i=0,o=r.length,c;i<o;i++)c=r[i].getAttribute("data-command"),a.indexOf(c)>-1?this.util.addClass(r[i],"se-checked"):this.util.removeClass(r[i],"se-checked");e.relPreview.title=e.relPreview.textContent=a.join(" ")},createHeaderList:function(e,t,n){const a=this.util.getListChildren(this.context.element.wysiwyg,function(c){return/h[1-6]/i.test(c.nodeName)});if(a.length===0)return;const r=new this._w.RegExp("^"+n.replace(/^#/,""),"i"),i=[];let o="";for(let c=0,l=a.length,d;c<l;c++)d=a[c],r.test(d.textContent)&&(i.push(d),o+='<li class="se-select-item" data-index="'+c+'">'+d.textContent+"</li>");i.length===0?this.plugins.selectMenu.close.call(this,t):(this.plugins.selectMenu.createList(t,i,o),this.plugins.selectMenu.open.call(this,t,this.plugins.anchor._setMenuListPosition.bind(this,e)))},_setMenuListPosition:function(e,t){t.style.top=e.urlInput.offsetHeight+1+"px"},onKeyDownUrlInput:function(e,t){switch(t.keyCode){case 38:t.preventDefault(),t.stopPropagation(),this.plugins.selectMenu.moveItem.call(this,e,-1);break;case 40:t.preventDefault(),t.stopPropagation(),this.plugins.selectMenu.moveItem.call(this,e,1);break;case 13:e.index>-1&&(t.preventDefault(),t.stopPropagation(),this.plugins.anchor.setHeaderBookmark.call(this,this.plugins.selectMenu.getItem(e,null)));break}},setHeaderBookmark:function(e){const t=this.context.anchor.callerContext,n=e.id||"h_"+this._w.Math.random().toString().replace(/.+\./,"");e.id=n,t.urlInput.value="#"+n,(!t.anchorText.value.trim()||!t._change)&&(t.anchorText.value=e.textContent),this.plugins.anchor.setLinkPreview.call(this,t,t.urlInput.value),this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext),this.context.anchor.callerContext.urlInput.focus()},onChangeAnchorText:function(e,t){e._change=!!t.target.value.trim()},onChangeUrlInput:function(e,t){const n=t.target.value.trim();this.plugins.anchor.setLinkPreview.call(this,e,n),this.plugins.anchor.selfPathBookmark.call(this,n)?this.plugins.anchor.createHeaderList.call(this,e,this.context.selectMenu.callerContext,n):this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext)},onFocusUrlInput:function(e,t){const n=e.urlInput.value;this.plugins.anchor.selfPathBookmark.call(this,n)&&this.plugins.anchor.createHeaderList.call(this,e,t,n)},onBlurUrlInput:function(e){this.plugins.selectMenu.close.call(this,e)},setLinkPreview:function(e,t){const n=e.preview,a=this.options.linkProtocol,r=this.options.linkNoPrefix,i=/^(mailto\:|tel\:|sms\:|https*\:\/\/|#)/.test(t)||t.indexOf(a)===0,o=a?this._w.RegExp("^"+this.util.escapeStringRegexp(t.substr(0,a.length))).test(a):!1;t=e.linkValue=n.textContent=t?r?t:a&&!i&&!o?a+t:i?t:/^www\./.test(t)?"http://"+t:this.context.anchor.host+(/^\//.test(t)?"":"/")+t:"",this.plugins.anchor.selfPathBookmark.call(this,t)?(e.bookmark.style.display="block",this.util.addClass(e.bookmarkButton,"active")):(e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active")),!this.plugins.anchor.selfPathBookmark.call(this,t)&&e.downloadCheck.checked?e.download.style.display="block":e.download.style.display="none"},setCtx:function(e,t){!e||(t.linkAnchor=e,t.linkValue=e.href,t.currentRel=e.rel.split(" "))},updateAnchor:function(e,t,n,a,r){!this.plugins.anchor.selfPathBookmark.call(this,t)&&a.downloadCheck.checked?e.setAttribute("download",n||t):e.removeAttribute("download"),a.newWindowCheck.checked?e.target="_blank":e.removeAttribute("target");const i=a.currentRel.join(" ");i?e.rel=i:e.removeAttribute("rel"),e.href=t,r?e.children.length===0&&(e.textContent=""):e.textContent=n},createAnchor:function(e,t){if(e.linkValue.length===0)return null;const n=e.linkValue,a=e.anchorText,r=a.value.length===0?n:a.value,i=e.linkAnchor||this.util.createElement("A");return this.plugins.anchor.updateAnchor.call(this,i,n,r,e,t),e.linkValue=e.preview.textContent=e.urlInput.value=e.anchorText.value="",i},onClick_bookmarkButton:function(e){let t=e.urlInput.value;this.plugins.anchor.selfPathBookmark.call(this,t)?(t=t.substr(1),e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active"),this.plugins.selectMenu.close.call(this,this.context.selectMenu.callerContext)):(t="#"+t,e.bookmark.style.display="block",this.util.addClass(e.bookmarkButton,"active"),e.downloadCheck.checked=!1,e.download.style.display="none",this.plugins.anchor.createHeaderList.call(this,e,this.context.selectMenu.callerContext,t)),e.urlInput.value=t,this.plugins.anchor.setLinkPreview.call(this,e,t),e.urlInput.focus()},onChange_newWindowCheck:function(e,t){typeof e.linkDefaultRel.check_new_window=="string"&&(t.target.checked?this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relMerge.call(this,e,e.linkDefaultRel.check_new_window)):this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relDelete.call(this,e,e.linkDefaultRel.check_new_window)))},onChange_downloadCheck:function(e,t){t.target.checked?(e.download.style.display="block",e.bookmark.style.display="none",this.util.removeClass(e.bookmarkButton,"active"),e.linkValue=e.preview.textContent=e.urlInput.value=e.urlInput.value.replace(/^\#+/,""),typeof e.linkDefaultRel.check_bookmark=="string"&&this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relMerge.call(this,e,e.linkDefaultRel.check_bookmark))):(e.download.style.display="none",typeof e.linkDefaultRel.check_bookmark=="string"&&this.plugins.anchor.setRel.call(this,e,this.plugins.anchor._relDelete.call(this,e,e.linkDefaultRel.check_bookmark)))},_relMerge:function(e,t){const n=e.currentRel;if(!t)return n.join(" ");if(/^only\:/.test(t))return t=t.replace(/^only\:/,"").trim(),e.currentRel=t.split(" "),t;const a=t.split(" ");for(let r=0,i=a.length,o;r<i;r++)o=n.indexOf(a[r]),o===-1&&n.push(a[r]);return n.join(" ")},_relDelete:function(e,t){if(!t)return e.currentRel.join(" ");/^only\:/.test(t)&&(t=t.replace(/^only\:/,"").trim());const n=e.currentRel.join(" ").replace(this._w.RegExp(t+"\\s*"),"");return e.currentRel=n.split(" "),n},init:function(e){e.linkAnchor=null,e.linkValue=e.preview.textContent=e.urlInput.value="",e.anchorText.value="",e.newWindowCheck.checked=!1,e.downloadCheck.checked=!1,e._change=!1,this.plugins.anchor.setRel.call(this,e,e.defaultRel),e.relList&&this.plugins.anchor.toggleRelList.call(this,e,!1),this.context.anchor.callerContext=null,this.plugins.selectMenu.init.call(this,this.context.selectMenu.callerContext)}},jP={name:"link",display:"dialog",add:function(e){e.addModule([uh,RP]);const t=e.context,n=t.link={focusElement:null,_linkAnchor:null,anchorCtx:null};let a=this.setDialog(e);n.modal=a;let r=this.setController_LinkButton(e);n.linkController=r,a.querySelector("form").addEventListener("submit",this.submit.bind(e)),r.addEventListener("click",this.onClick_linkController.bind(e)),t.dialog.modal.appendChild(a),t.element.relative.appendChild(r),e.plugins.anchor.initEvent.call(e,"link",a),n.focusElement=t.anchor.caller.link.urlInput,a=null,r=null},setDialog:function(e){const t=e.lang,n=e.util.createElement("DIV"),a=e.icons;n.className="se-dialog-content",n.style.display="none";let r='<form><div class="se-dialog-header"><button type="button" data-command="close" class="se-btn se-dialog-close" title="'+t.dialogBox.close+'" aria-label="'+t.dialogBox.close+'">'+a.cancel+'</button><span class="se-modal-title">'+t.dialogBox.linkBox.title+"</span></div>"+e.context.anchor.forms.innerHTML+'<div class="se-dialog-footer"><button type="submit" class="se-btn-primary" title="'+t.dialogBox.submitButton+'" aria-label="'+t.dialogBox.submitButton+'"><span>'+t.dialogBox.submitButton+"</span></button></div></form>";return n.innerHTML=r,n},setController_LinkButton:function(e){const t=e.lang,n=e.icons,a=e.util.createElement("DIV");return a.className="se-controller se-controller-link",a.innerHTML='<div class="se-arrow se-arrow-up"></div><div class="link-content"><span><a target="_blank" href=""></a>&nbsp;</span><div class="se-btn-group"><button type="button" data-command="update" tabindex="-1" class="se-btn se-tooltip">'+n.edit+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.edit+'</span></span></button><button type="button" data-command="unlink" tabindex="-1" class="se-btn se-tooltip">'+n.unlink+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.unlink+'</span></span></button><button type="button" data-command="delete" tabindex="-1" class="se-btn se-tooltip">'+n.delete+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.remove+"</span></span></button></div></div>",a},open:function(){this.plugins.dialog.open.call(this,"link",this.currentControllerName==="link")},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();try{const t=this.plugins.anchor.createAnchor.call(this,this.context.anchor.caller.link,!1);if(t===null)return;if(this.context.dialog.updateModal){const n=this.context.link._linkAnchor.childNodes[0];this.setRange(n,0,n,n.textContent.length)}else{const n=this.getSelectedElements();if(n.length>1){const a=this.util.createElement(n[0].nodeName);if(a.appendChild(t),!this.insertNode(a,null,!0))return}else if(!this.insertNode(t,null,!0))return;this.setRange(t.childNodes[0],0,t.childNodes[0],t.textContent.length)}}finally{this.plugins.dialog.close.call(this),this.closeLoading(),this.history.push(!1)}return!1},active:function(e){if(!e)this.controllerArray.indexOf(this.context.link.linkController)>-1&&this.controllersOff();else if(this.util.isAnchor(e)&&e.getAttribute("data-image-link")===null)return this.controllerArray.indexOf(this.context.link.linkController)<0&&this.plugins.link.call_controller.call(this,e),!0;return!1},on:function(e){this.plugins.anchor.on.call(this,this.context.anchor.caller.link,e)},call_controller:function(e){this.editLink=this.context.link._linkAnchor=this.context.anchor.caller.link.linkAnchor=e;const t=this.context.link.linkController,n=t.querySelector("a");n.href=e.href,n.title=e.textContent,n.textContent=e.textContent,this.util.addClass(e,"on"),this.setControllerPosition(t,e,"bottom",{left:0,top:0}),this.controllersOn(t,e,"link",this.util.removeClass.bind(this.util,this.context.link._linkAnchor,"on"))},onClick_linkController:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");if(!!t){if(e.preventDefault(),/update/.test(t))this.plugins.dialog.open.call(this,"link",!0);else if(/unlink/.test(t)){const n=this.util.getChildElement(this.context.link._linkAnchor,function(r){return r.childNodes.length===0||r.nodeType===3},!1),a=this.util.getChildElement(this.context.link._linkAnchor,function(r){return r.childNodes.length===0||r.nodeType===3},!0);this.setRange(n,0,a,a.textContent.length),this.nodeChange(null,null,["A"],!1)}else this.util.removeItem(this.context.link._linkAnchor),this.context.anchor.caller.link.linkAnchor=null,this.focus(),this.history.push(!1);this.controllersOff()}},init:function(){this.context.link.linkController.style.display="none",this.plugins.anchor.init.call(this,this.context.anchor.caller.link)}},zP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={name:"component",set_container:function(r,i){const o=this.util.createElement("DIV");return o.className="se-component "+i,o.appendChild(r),o},set_cover:function(r){const i=this.util.createElement("FIGURE");return i.appendChild(r),i},create_caption:function(){const r=this.util.createElement("FIGCAPTION");return r.innerHTML="<div>"+this.lang.dialogBox.caption+"</div>",r}};return typeof n=="undefined"&&(t.SUNEDITOR_MODULES||Object.defineProperty(t,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_MODULES,"component",{enumerable:!0,writable:!1,configurable:!1,value:a})),a})})(zP);var a5=zP.exports,FP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={name:"resizing",add:function(r){const i=r.icons,o=r.context;o.resizing={_resizeClientX:0,_resizeClientY:0,_resize_plugin:"",_resize_w:0,_resize_h:0,_origin_w:0,_origin_h:0,_rotateVertical:!1,_resize_direction:"",_move_path:null,_isChange:!1,alignIcons:{basic:i.align_justify,left:i.align_left,right:i.align_right,center:i.align_center}};let c=this.setController_resize(r);o.resizing.resizeContainer=c,o.resizing.resizeDiv=c.querySelector(".se-modal-resize"),o.resizing.resizeDot=c.querySelector(".se-resize-dot"),o.resizing.resizeDisplay=c.querySelector(".se-resize-display");let l=this.setController_button(r);o.resizing.resizeButton=l;let d=o.resizing.resizeHandles=o.resizing.resizeDot.querySelectorAll("span");o.resizing.resizeButtonGroup=l.querySelector("._se_resizing_btn_group"),o.resizing.rotationButtons=l.querySelectorAll("._se_resizing_btn_group ._se_rotation"),o.resizing.percentageButtons=l.querySelectorAll("._se_resizing_btn_group ._se_percentage"),o.resizing.alignMenu=l.querySelector(".se-resizing-align-list"),o.resizing.alignMenuList=o.resizing.alignMenu.querySelectorAll("button"),o.resizing.alignButton=l.querySelector("._se_resizing_align_button"),o.resizing.autoSizeButton=l.querySelector("._se_resizing_btn_group ._se_auto_size"),o.resizing.captionButton=l.querySelector("._se_resizing_caption_button"),c.addEventListener("mousedown",function(u){u.preventDefault()}),d[0].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[1].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[2].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[3].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[4].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[5].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[6].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),d[7].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(r)),l.addEventListener("click",this.onClick_resizeButton.bind(r)),o.element.relative.appendChild(c),o.element.relative.appendChild(l),c=null,l=null,d=null},setController_resize:function(r){const i=r.util.createElement("DIV");return i.className="se-controller se-resizing-container",i.style.display="none",i.innerHTML='<div class="se-modal-resize"></div><div class="se-resize-dot"><span class="tl"></span><span class="tr"></span><span class="bl"></span><span class="br"></span><span class="lw"></span><span class="th"></span><span class="rw"></span><span class="bh"></span><div class="se-resize-display"></div></div>',i},setController_button:function(r){const i=r.lang,o=r.icons,c=r.util.createElement("DIV");return c.className="se-controller se-controller-resizing",c.innerHTML='<div class="se-arrow se-arrow-up"></div><div class="se-btn-group _se_resizing_btn_group"><button type="button" data-command="percent" data-value="1" class="se-tooltip _se_percentage"><span>100%</span><span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.resize100+'</span></span></button><button type="button" data-command="percent" data-value="0.75" class="se-tooltip _se_percentage"><span>75%</span><span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.resize75+'</span></span></button><button type="button" data-command="percent" data-value="0.5" class="se-tooltip _se_percentage"><span>50%</span><span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.resize50+'</span></span></button><button type="button" data-command="auto" class="se-btn se-tooltip _se_auto_size">'+o.auto_size+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.autoSize+'</span></span></button><button type="button" data-command="rotate" data-value="-90" class="se-btn se-tooltip _se_rotation">'+o.rotate_left+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.rotateLeft+'</span></span></button><button type="button" data-command="rotate" data-value="90" class="se-btn se-tooltip _se_rotation">'+o.rotate_right+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.rotateRight+'</span></span></button></div><div class="se-btn-group" style="padding-top: 0;"><button type="button" data-command="mirror" data-value="h" class="se-btn se-tooltip">'+o.mirror_horizontal+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.mirrorHorizontal+'</span></span></button><button type="button" data-command="mirror" data-value="v" class="se-btn se-tooltip">'+o.mirror_vertical+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.mirrorVertical+'</span></span></button><button type="button" data-command="onalign" class="se-btn se-tooltip _se_resizing_align_button">'+o.align_justify+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.toolbar.align+'</span></span></button><div class="se-btn-group-sub sun-editor-common se-list-layer se-resizing-align-list"><div class="se-list-inner"><ul class="se-list-basic"><li><button type="button" class="se-btn-list se-tooltip" data-command="align" data-value="basic">'+o.align_justify+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.basic+'</span></span></button></li><li><button type="button" class="se-btn-list se-tooltip" data-command="align" data-value="left">'+o.align_left+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.left+'</span></span></button></li><li><button type="button" class="se-btn-list se-tooltip" data-command="align" data-value="center">'+o.align_center+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.center+'</span></span></button></li><li><button type="button" class="se-btn-list se-tooltip" data-command="align" data-value="right">'+o.align_right+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.right+'</span></span></button></li></ul></div></div><button type="button" data-command="caption" class="se-btn se-tooltip _se_resizing_caption_button">'+o.caption+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.caption+'</span></span></button><button type="button" data-command="revert" class="se-btn se-tooltip">'+o.revert+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.dialogBox.revertButton+'</span></span></button><button type="button" data-command="update" class="se-btn se-tooltip">'+o.modify+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.edit+'</span></span></button><button type="button" data-command="delete" class="se-btn se-tooltip">'+o.delete+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+i.controller.remove+"</span></span></button></div>",c},_module_getSizeX:function(r,i,o,c){return i||(i=r._element),o||(o=r._cover),c||(c=r._container),i?/%$/.test(i.style.width)?(c&&this.util.getNumber(c.style.width,2)||100)+"%":i.style.width:""},_module_getSizeY:function(r,i,o,c){return i||(i=r._element),o||(o=r._cover),c||(c=r._container),!c||!o?i&&i.style.height||"":this.util.getNumber(o.style.paddingBottom,0)>0&&!this.context.resizing._rotateVertical?o.style.height:!/%$/.test(i.style.height)||!/%$/.test(i.style.width)?i.style.height:(c&&this.util.getNumber(c.style.height,2)||100)+"%"},_module_setModifyInputSize:function(r,i){const o=r._onlyPercentage&&this.context.resizing._rotateVertical;r.proportion.checked=r._proportionChecked=r._element.getAttribute("data-proportion")!=="false";let c=o?"":this.plugins.resizing._module_getSizeX.call(this,r);if(c===r._defaultSizeX&&(c=""),r._onlyPercentage&&(c=this.util.getNumber(c,2)),r.inputX.value=c,i.setInputSize.call(this,"x"),!r._onlyPercentage){let l=o?"":this.plugins.resizing._module_getSizeY.call(this,r);l===r._defaultSizeY&&(l=""),r._onlyPercentage&&(l=this.util.getNumber(l,2)),r.inputY.value=l}r.inputX.disabled=!!o,r.inputY.disabled=!!o,r.proportion.disabled=!!o,i.setRatio.call(this)},_module_setInputSize:function(r,i){if(r._onlyPercentage){i==="x"&&r.inputX.value>100&&(r.inputX.value=100);return}if(r.proportion.checked&&r._ratio&&/\d/.test(r.inputX.value)&&/\d/.test(r.inputY.value)){const o=r.inputX.value.replace(/\d+|\./g,"")||r.sizeUnit,c=r.inputY.value.replace(/\d+|\./g,"")||r.sizeUnit;if(o!==c)return;const l=o==="%"?2:0;i==="x"?r.inputY.value=this.util.getNumber(r._ratioY*this.util.getNumber(r.inputX.value,l),l)+c:r.inputX.value=this.util.getNumber(r._ratioX*this.util.getNumber(r.inputY.value,l),l)+o}},_module_setRatio:function(r){const i=r.inputX.value,o=r.inputY.value;if(r.proportion.checked&&/\d+/.test(i)&&/\d+/.test(o)){const c=i.replace(/\d+|\./g,"")||r.sizeUnit,l=o.replace(/\d+|\./g,"")||r.sizeUnit;if(c!==l)r._ratio=!1;else if(!r._ratio){const d=this.util.getNumber(i,0),u=this.util.getNumber(o,0);r._ratio=!0,r._ratioX=d/u,r._ratioY=u/d}}else r._ratio=!1},_module_sizeRevert:function(r){r._onlyPercentage?r.inputX.value=r._origin_w>100?100:r._origin_w:(r.inputX.value=r._origin_w,r.inputY.value=r._origin_h)},_module_saveCurrentSize:function(r){const i=this.plugins.resizing._module_getSizeX.call(this,r),o=this.plugins.resizing._module_getSizeY.call(this,r);r._element.setAttribute("width",i.replace("px","")),r._element.setAttribute("height",o.replace("px","")),r._element.setAttribute("data-size",i+","+o),r._videoRatio&&(r._videoRatio=o)},call_controller_resize:function(r,i){const o=this.context.resizing,c=this.context[i];o._resize_plugin=i;const l=o.resizeContainer,d=o.resizeDiv,u=this.util.getOffset(r,this.context.element.wysiwygFrame),g=o._rotateVertical=/^(90|270)$/.test(Math.abs(r.getAttribute("data-rotate")).toString()),y=g?r.offsetHeight:r.offsetWidth,w=g?r.offsetWidth:r.offsetHeight,v=u.top,S=u.left-this.context.element.wysiwygFrame.scrollLeft;l.style.top=v+"px",l.style.left=S+"px",l.style.width=y+"px",l.style.height=w+"px",d.style.top="0px",d.style.left="0px",d.style.width=y+"px",d.style.height=w+"px";let m=r.getAttribute("data-align")||"basic";m=m==="none"?"basic":m;const p=this.util.getParentElement(r,this.util.isComponent),b=this.util.getParentElement(r,"FIGURE"),x=this.plugins.resizing._module_getSizeX.call(this,c,r,b,p)||"auto",k=c._onlyPercentage&&i==="image"?"":", "+(this.plugins.resizing._module_getSizeY.call(this,c,r,b,p)||"auto");this.util.changeTxt(o.resizeDisplay,this.lang.dialogBox[m]+" ("+x+k+")"),o.resizeButtonGroup.style.display=c._resizing?"":"none";const N=c._resizing&&!c._resizeDotHide&&!c._onlyPercentage?"flex":"none",_=o.resizeHandles;for(let M=0,O=_.length;M<O;M++)_[M].style.display=N;if(c._resizing){const M=o.rotationButtons;M[0].style.display=M[1].style.display=c._rotation?"":"none"}if(c._alignHide)o.alignButton.style.display="none";else{o.alignButton.style.display="";const M=o.alignMenuList;this.util.changeElement(o.alignButton.firstElementChild,o.alignIcons[m]);for(let O=0,F=M.length;O<F;O++)M[O].getAttribute("data-value")===m?this.util.addClass(M[O],"on"):this.util.removeClass(M[O],"on")}const C=o.percentageButtons,E=/%$/.test(r.style.width)&&/%$/.test(p.style.width)?this.util.getNumber(p.style.width,0)/100+"":"";for(let M=0,O=C.length;M<O;M++)C[M].getAttribute("data-value")===E?this.util.addClass(C[M],"active"):this.util.removeClass(C[M],"active");c._captionShow?(o.captionButton.style.display="",this.util.getChildElement(r.parentNode,"figcaption")?(this.util.addClass(o.captionButton,"active"),c._captionChecked=!0):(this.util.removeClass(o.captionButton,"active"),c._captionChecked=!1)):o.captionButton.style.display="none",l.style.display="block";const T={left:0,top:50};this.options.iframe&&(T.left-=this.context.element.wysiwygFrame.parentElement.offsetLeft,T.top-=this.context.element.wysiwygFrame.parentElement.offsetTop),this.setControllerPosition(o.resizeButton,l,"bottom",T);const D=function(){this.util.setDisabledButtons.call(this.util,!1,this.resizingDisabledButtons),this.history._resetCachingButton()};this.controllersOn(l,o.resizeButton,D.bind(this),r,i),this.util.setDisabledButtons(!0,this.resizingDisabledButtons),o._resize_w=y,o._resize_h=w;const P=(r.getAttribute("origin-size")||"").split(",");return o._origin_w=P[0]||r.naturalWidth,o._origin_h=P[1]||r.naturalHeight,{w:y,h:w,t:v,l:S}},_closeAlignMenu:null,openAlignMenu:function(){const r=this.context.resizing.alignButton;this.util.addClass(r,"on"),this.context.resizing.alignMenu.style.top=r.offsetTop+r.offsetHeight+"px",this.context.resizing.alignMenu.style.left=r.offsetLeft-r.offsetWidth/2+"px",this.context.resizing.alignMenu.style.display="block",this.plugins.resizing._closeAlignMenu=function(){this.util.removeClass(this.context.resizing.alignButton,"on"),this.context.resizing.alignMenu.style.display="none",this.removeDocEvent("click",this.plugins.resizing._closeAlignMenu),this.plugins.resizing._closeAlignMenu=null}.bind(this),this.addDocEvent("click",this.plugins.resizing._closeAlignMenu)},onClick_resizeButton:function(r){r.stopPropagation();const i=r.target,o=i.getAttribute("data-command")||i.parentNode.getAttribute("data-command");if(!o)return;const c=i.getAttribute("data-value")||i.parentNode.getAttribute("data-value"),l=this.context.resizing._resize_plugin,d=this.context[l],u=d._element,g=this.plugins[l];if(r.preventDefault(),!(typeof this.plugins.resizing._closeAlignMenu=="function"&&(this.plugins.resizing._closeAlignMenu(),o==="onalign"))){switch(o){case"auto":this.plugins.resizing.resetTransform.call(this,u),g.setAutoSize.call(this),this.selectComponent(u,l);break;case"percent":let y=this.plugins.resizing._module_getSizeY.call(this,d);if(this.context.resizing._rotateVertical){const N=u.getAttribute("data-percentage");N&&(y=N.split(",")[1])}this.plugins.resizing.resetTransform.call(this,u),g.setPercentSize.call(this,c*100,this.util.getNumber(y,0)===null||!/%$/.test(y)?"":y),this.selectComponent(u,l);break;case"mirror":const w=u.getAttribute("data-rotate")||"0";let v=u.getAttribute("data-rotateX")||"",S=u.getAttribute("data-rotateY")||"";c==="h"&&!this.context.resizing._rotateVertical||c==="v"&&this.context.resizing._rotateVertical?S=S?"":"180":v=v?"":"180",u.setAttribute("data-rotateX",v),u.setAttribute("data-rotateY",S),this.plugins.resizing._setTransForm(u,w,v,S);break;case"rotate":const m=this.context.resizing,p=u.getAttribute("data-rotate")*1+c*1,b=this._w.Math.abs(p)>=360?0:p;u.setAttribute("data-rotate",b),m._rotateVertical=/^(90|270)$/.test(this._w.Math.abs(b).toString()),this.plugins.resizing.setTransformSize.call(this,u,null,null),this.selectComponent(u,l);break;case"onalign":this.plugins.resizing.openAlignMenu.call(this);return;case"align":const x=c==="basic"?"none":c;g.setAlign.call(this,x,null,null,null),this.selectComponent(u,l);break;case"caption":const k=!d._captionChecked;if(g.openModify.call(this,!0),d._captionChecked=d.captionCheckEl.checked=k,g.update_image.call(this,!1,!1,!1),k){const N=this.util.getChildElement(d._caption,function(_){return _.nodeType===3});N?this.setRange(N,0,N,N.textContent.length):d._caption.focus(),this.controllersOff()}else this.selectComponent(u,l),g.openModify.call(this,!0);break;case"revert":g.setOriginSize.call(this),this.selectComponent(u,l);break;case"update":g.openModify.call(this),this.controllersOff();break;case"delete":g.destroy.call(this);break}this.history.push(!1)}},resetTransform:function(r){const i=(r.getAttribute("data-size")||r.getAttribute("data-origin")||"").split(",");this.context.resizing._rotateVertical=!1,r.style.maxWidth="",r.style.transform="",r.style.transformOrigin="",r.setAttribute("data-rotate",""),r.setAttribute("data-rotateX",""),r.setAttribute("data-rotateY",""),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,i[0]?i[0]:"auto",i[1]?i[1]:"",!0)},setTransformSize:function(r,i,o){let c=r.getAttribute("data-percentage");const l=this.context.resizing._rotateVertical,d=r.getAttribute("data-rotate")*1;let u="";if(c&&!l)c=c.split(","),c[0]==="auto"&&c[1]==="auto"?this.plugins[this.context.resizing._resize_plugin].setAutoSize.call(this):this.plugins[this.context.resizing._resize_plugin].setPercentSize.call(this,c[0],c[1]);else{const g=this.util.getParentElement(r,"FIGURE"),y=i||r.offsetWidth,w=o||r.offsetHeight,v=(l?w:y)+"px",S=(l?y:w)+"px";if(this.plugins[this.context.resizing._resize_plugin].cancelPercentAttr.call(this),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,y+"px",w+"px",!0),g.style.width=v,g.style.height=this.context[this.context.resizing._resize_plugin]._caption?"":S,l){let m=y/2+"px "+y/2+"px 0",p=w/2+"px "+w/2+"px 0";u=d===90||d===-270?p:m}}r.style.transformOrigin=u,this.plugins.resizing._setTransForm(r,d.toString(),r.getAttribute("data-rotateX")||"",r.getAttribute("data-rotateY")||""),l?r.style.maxWidth="none":r.style.maxWidth="",this.plugins.resizing.setCaptionPosition.call(this,r)},_setTransForm:function(r,i,o,c){let l=(r.offsetWidth-r.offsetHeight)*(/-/.test(i)?1:-1),d="";if(/[1-9]/.test(i)&&(o||c))switch(d=o?"Y":"X",i){case"90":d=o&&c?"X":c?d:"";break;case"270":l*=-1,d=o&&c?"Y":o?d:"";break;case"-90":d=o&&c?"Y":o?d:"";break;case"-270":l*=-1,d=o&&c?"X":c?d:"";break;default:d=""}i%180===0&&(r.style.maxWidth=""),r.style.transform="rotate("+i+"deg)"+(o?" rotateX("+o+"deg)":"")+(c?" rotateY("+c+"deg)":"")+(d?" translate"+d+"("+l+"px)":"")},setCaptionPosition:function(r){const i=this.util.getChildElement(this.util.getParentElement(r,"FIGURE"),"FIGCAPTION");i&&(i.style.marginTop=(this.context.resizing._rotateVertical?r.offsetWidth-r.offsetHeight:0)+"px")},onMouseDown_resize_handle:function(r){r.stopPropagation(),r.preventDefault();const i=this.context.resizing,o=i._resize_direction=r.target.classList[0];i._resizeClientX=r.clientX,i._resizeClientY=r.clientY,this.context.element.resizeBackground.style.display="block",i.resizeButton.style.display="none",i.resizeDiv.style.float=/l/.test(o)?"right":/r/.test(o)?"left":"none";const c=function(u){if(u.type==="keydown"&&u.keyCode!==27)return;const g=i._isChange;i._isChange=!1,this.removeDocEvent("mousemove",l),this.removeDocEvent("mouseup",c),this.removeDocEvent("keydown",c),u.type==="keydown"?(this.controllersOff(),this.context.element.resizeBackground.style.display="none",this.plugins[this.context.resizing._resize_plugin].init.call(this)):(this.plugins.resizing.cancel_controller_resize.call(this,o),g&&this.history.push(!1))}.bind(this),l=this.plugins.resizing.resizing_element.bind(this,i,o,this.context[i._resize_plugin]);this.addDocEvent("mousemove",l),this.addDocEvent("mouseup",c),this.addDocEvent("keydown",c)},resizing_element:function(r,i,o,c){const l=c.clientX,d=c.clientY;let u=o._element_w,g=o._element_h;const y=o._element_w+(/r/.test(i)?l-r._resizeClientX:r._resizeClientX-l),w=o._element_h+(/b/.test(i)?d-r._resizeClientY:r._resizeClientY-d),v=o._element_h/o._element_w*y;/t/.test(i)&&(r.resizeDiv.style.top=o._element_h-(/h/.test(i)?w:v)+"px"),/l/.test(i)&&(r.resizeDiv.style.left=o._element_w-y+"px"),/r|l/.test(i)&&(r.resizeDiv.style.width=y+"px",u=y),/^(t|b)[^h]$/.test(i)?(r.resizeDiv.style.height=v+"px",g=v):/^(t|b)h$/.test(i)&&(r.resizeDiv.style.height=w+"px",g=w),r._resize_w=u,r._resize_h=g,this.util.changeTxt(r.resizeDisplay,this._w.Math.round(u)+" x "+this._w.Math.round(g)),r._isChange=!0},cancel_controller_resize:function(r){const i=this.context.resizing._rotateVertical;this.controllersOff(),this.context.element.resizeBackground.style.display="none";let o=this._w.Math.round(i?this.context.resizing._resize_h:this.context.resizing._resize_w),c=this._w.Math.round(i?this.context.resizing._resize_w:this.context.resizing._resize_h);if(!i&&!/%$/.test(o)){const u=this.context.element.wysiwygFrame.clientWidth-32-2;this.util.getNumber(o,0)>u&&(c=this._w.Math.round(c/o*u),o=u)}const l=this.context.resizing._resize_plugin;this.plugins[l].setSize.call(this,o,c,!1,r),i&&this.plugins.resizing.setTransformSize.call(this,this.context[this.context.resizing._resize_plugin]._element,o,c),this.selectComponent(this.context[l]._element,l)}};return typeof n=="undefined"&&(t.SUNEDITOR_MODULES||Object.defineProperty(t,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_MODULES,"resizing",{enumerable:!0,writable:!1,configurable:!1,value:a})),a})})(FP);var $P=FP.exports,BP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={name:"fileManager",_xmlHttp:null,_checkMediaComponent:function(r){return/IMG/i.test(r)?!/FIGURE/i.test(r.parentElement.nodeName)||!/FIGURE/i.test(r.parentElement.parentElement.nodeName):!0},upload:function(r,i,o,c,l){this.showLoading();const d=this.plugins.fileManager,u=d._xmlHttp=this.util.getXMLHttpRequest();if(u.onreadystatechange=d._callBackUpload.bind(this,u,c,l),u.open("post",r,!0),i!==null&&typeof i=="object"&&this._w.Object.keys(i).length>0)for(let g in i)u.setRequestHeader(g,i[g]);u.send(o)},_callBackUpload:function(r,i,o){if(r.readyState===4)if(r.status===200)try{i(r)}catch(c){throw Error('[SUNEDITOR.fileManager.upload.callBack.fail] cause : "'+c.message+'"')}finally{this.closeLoading()}else{this.closeLoading();const c=r.responseText?JSON.parse(r.responseText):r;if(typeof o!="function"||o("",c,this)){const l="[SUNEDITOR.fileManager.upload.serverException] status: "+r.status+", response: "+(c.errorMessage||r.responseText);throw this.functions.noticeOpen(l),Error(l)}}},checkInfo:function(r,i,o,c,l){let d=[];for(let p=0,b=i.length;p<b;p++)d=d.concat([].slice.call(this.context.element.wysiwyg.querySelectorAll(i[p]+':not([data-se-embed="true"])')));const u=this.plugins.fileManager,g=this.context[r],y=g._infoList,w=u.setInfo.bind(this);if(d.length===y.length)if(this._componentsInfoReset){for(let p=0,b=d.length;p<b;p++)w(r,d[p],o,null,l);return}else{let p=!1;for(let b=0,x=y.length,k;b<x;b++)if(k=y[b],d.filter(function(N){return k.src===N.src&&k.index.toString()===N.getAttribute("data-index")}).length===0){p=!0;break}if(!p)return}const v=l?this.context.resizing._resize_plugin:"";l&&(this.context.resizing._resize_plugin=r);const S=[],m=[];for(let p=0,b=y.length;p<b;p++)m[p]=y[p].index;for(g.__updateTags=d;d.length>0;){const p=d.shift();!this.util.getParentElement(p,this.util.isMediaComponent)||!u._checkMediaComponent(p)?(S.push(g._infoIndex),c(p)):!p.getAttribute("data-index")||m.indexOf(p.getAttribute("data-index")*1)<0?(S.push(g._infoIndex),p.removeAttribute("data-index"),w(r,p,o,null,l)):S.push(p.getAttribute("data-index")*1)}for(let p=0,b;p<y.length;p++)b=y[p].index,!(S.indexOf(b)>-1)&&(y.splice(p,1),typeof o=="function"&&o(null,b,"delete",null,0,this),p--);l&&(this.context.resizing._resize_plugin=v)},setInfo:function(r,i,o,c,l){const d=l?this.context.resizing._resize_plugin:"";l&&(this.context.resizing._resize_plugin=r);const u=this.plugins[r],g=this.context[r],y=g._infoList;let w=i.getAttribute("data-index"),v=null,S="";if(c||(c={name:i.getAttribute("data-file-name")||(typeof i.src=="string"?i.src.split("/").pop():""),size:i.getAttribute("data-file-size")||0}),!w||this._componentsInfoInit)S="create",w=g._infoIndex++,i.setAttribute("data-index",w),i.setAttribute("data-file-name",c.name),i.setAttribute("data-file-size",c.size),v={src:i.src,index:w*1,name:c.name,size:c.size},y.push(v);else{S="update",w*=1;for(let m=0,p=y.length;m<p;m++)if(w===y[m].index){v=y[m];break}v||(w=g._infoIndex++,v={index:w},y.push(v)),v.src=i.src,v.name=i.getAttribute("data-file-name"),v.size=i.getAttribute("data-file-size")*1}if(v.element=i,v.delete=u.destroy.bind(this,i),v.select=function(m){m.scrollIntoView(!0),this._w.setTimeout(u.select.bind(this,m))}.bind(this,i),l){if(!i.getAttribute("origin-size")&&i.naturalWidth&&i.setAttribute("origin-size",i.naturalWidth+","+i.naturalHeight),!i.getAttribute("data-origin")){const m=this.util.getParentElement(i,this.util.isMediaComponent),p=this.util.getParentElement(i,"FIGURE"),b=this.plugins.resizing._module_getSizeX.call(this,g,i,p,m),x=this.plugins.resizing._module_getSizeY.call(this,g,i,p,m);i.setAttribute("data-origin",b+","+x),i.setAttribute("data-size",b+","+x)}if(!i.style.width){const m=(i.getAttribute("data-size")||i.getAttribute("data-origin")||"").split(",");u.onModifyMode.call(this,i,null),u.applySize.call(this,m[0],m[1])}this.context.resizing._resize_plugin=d}typeof o=="function"&&o(i,w,S,v,--g._uploadFileLength<0?0:g._uploadFileLength,this)},deleteInfo:function(r,i,o){if(i>=0){const c=this.context[r]._infoList;for(let l=0,d=c.length;l<d;l++)if(i===c[l].index){c.splice(l,1),typeof o=="function"&&o(null,i,"delete",null,0,this);return}}},resetInfo:function(r,i){const o=this.context[r];if(typeof i=="function"){const c=o._infoList;for(let l=0,d=c.length;l<d;l++)i(null,c[l].index,"delete",null,0,this)}o._infoList=[],o._infoIndex=0}};return typeof n=="undefined"&&(t.SUNEDITOR_MODULES||Object.defineProperty(t,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_MODULES,"fileManager",{enumerable:!0,writable:!1,configurable:!1,value:a})),a})})(BP);var r5=BP.exports,HP={name:"image",display:"dialog",add:function(e){e.addModule([uh,RP,a5,$P,r5]);const t=e.options,n=e.context,a=n.image={_infoList:[],_infoIndex:0,_uploadFileLength:0,focusElement:null,sizeUnit:t._imageSizeUnit,_linkElement:"",_altText:"",_align:"none",_floatClassRegExp:"__se__float\\-[a-z]+",_v_src:{_linkValue:""},svgDefaultSize:"30%",base64RenderIndex:0,_element:null,_cover:null,_container:null,inputX:null,inputY:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_defaultSizeX:"auto",_defaultSizeY:"auto",_origin_w:t.imageWidth==="auto"?"":t.imageWidth,_origin_h:t.imageHeight==="auto"?"":t.imageHeight,_proportionChecked:!0,_resizing:t.imageResizing,_resizeDotHide:!t.imageHeightShow,_rotation:t.imageRotation,_alignHide:!t.imageAlignShow,_onlyPercentage:t.imageSizeOnlyPercentage,_ratio:!1,_ratioX:1,_ratioY:1,_captionShow:!0,_captionChecked:!1,_caption:null,captionCheckEl:null};let r=this.setDialog(e);a.modal=r,a.imgInputFile=r.querySelector("._se_image_file"),a.imgUrlFile=r.querySelector("._se_image_url"),a.focusElement=a.imgInputFile||a.imgUrlFile,a.altText=r.querySelector("._se_image_alt"),a.captionCheckEl=r.querySelector("._se_image_check_caption"),a.previewSrc=r.querySelector("._se_tab_content_image .se-link-preview"),r.querySelector(".se-dialog-tabs").addEventListener("click",this.openTab.bind(e)),r.querySelector("form").addEventListener("submit",this.submit.bind(e)),a.imgInputFile&&r.querySelector(".se-file-remove").addEventListener("click",this._removeSelectedFiles.bind(a.imgInputFile,a.imgUrlFile,a.previewSrc)),a.imgUrlFile&&a.imgUrlFile.addEventListener("input",this._onLinkPreview.bind(a.previewSrc,a._v_src,t.linkProtocol)),a.imgInputFile&&a.imgUrlFile&&a.imgInputFile.addEventListener("change",this._fileInputChange.bind(a));const i=r.querySelector(".__se__gallery");i&&i.addEventListener("click",this._openGallery.bind(e)),a.proportion={},a.inputX={},a.inputY={},t.imageResizing&&(a.proportion=r.querySelector("._se_image_check_proportion"),a.inputX=r.querySelector("._se_image_size_x"),a.inputY=r.querySelector("._se_image_size_y"),a.inputX.value=t.imageWidth,a.inputY.value=t.imageHeight,a.inputX.addEventListener("keyup",this.setInputSize.bind(e,"x")),a.inputY.addEventListener("keyup",this.setInputSize.bind(e,"y")),a.inputX.addEventListener("change",this.setRatio.bind(e)),a.inputY.addEventListener("change",this.setRatio.bind(e)),a.proportion.addEventListener("change",this.setRatio.bind(e)),r.querySelector(".se-dialog-btn-revert").addEventListener("click",this.sizeRevert.bind(e))),n.dialog.modal.appendChild(r),e.plugins.anchor.initEvent.call(e,"image",r.querySelector("._se_tab_content_url")),a.anchorCtx=e.context.anchor.caller.image,r=null},setDialog:function(e){const t=e.options,n=e.lang,a=e.util.createElement("DIV");a.className="se-dialog-content se-dialog-image",a.style.display="none";let r='<div class="se-dialog-header"><button type="button" data-command="close" class="se-btn se-dialog-close" class="close" title="'+n.dialogBox.close+'" aria-label="'+n.dialogBox.close+'">'+e.icons.cancel+'</button><span class="se-modal-title">'+n.dialogBox.imageBox.title+'</span></div><div class="se-dialog-tabs"><button type="button" class="_se_tab_link active" data-tab-link="image">'+n.toolbar.image+'</button><button type="button" class="_se_tab_link" data-tab-link="url">'+n.toolbar.link+'</button></div><form method="post" enctype="multipart/form-data"><div class="_se_tab_content _se_tab_content_image"><div class="se-dialog-body"><div style="border-bottom: 1px dashed #ccc;">';if(t.imageFileInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.imageBox.file+'</label><div class="se-dialog-form-files"><input class="se-input-form _se_image_file" type="file" accept="'+t.imageAccept+'"'+(t.imageMultipleFile?' multiple="multiple"':"")+'/><button type="button" class="se-btn se-dialog-files-edge-button se-file-remove" title="'+n.controller.remove+'" aria-label="'+n.controller.remove+'">'+e.icons.cancel+"</button></div></div>"),t.imageUrlInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.imageBox.url+'</label><div class="se-dialog-form-files"><input class="se-input-form se-input-url _se_image_url" type="text" />'+(t.imageGalleryUrl&&e.plugins.imageGallery?'<button type="button" class="se-btn se-dialog-files-edge-button __se__gallery" title="'+n.toolbar.imageGallery+'" aria-label="'+n.toolbar.imageGallery+'">'+e.icons.image_gallery+"</button>":"")+'</div><pre class="se-link-preview"></pre></div>'),r+='</div><div class="se-dialog-form"><label>'+n.dialogBox.imageBox.altText+'</label><input class="se-input-form _se_image_alt" type="text" /></div>',t.imageResizing){const i=t.imageSizeOnlyPercentage,o=i?' style="display: none !important;"':"",c=t.imageHeightShow?"":' style="display: none !important;"';r+='<div class="se-dialog-form">',i||!t.imageHeightShow?r+='<div class="se-dialog-size-text"><label class="size-w">'+n.dialogBox.size+"</label></div>":r+='<div class="se-dialog-size-text"><label class="size-w">'+n.dialogBox.width+'</label><label class="se-dialog-size-x">&nbsp;</label><label class="size-h">'+n.dialogBox.height+"</label></div>",r+='<input class="se-input-control _se_image_size_x" placeholder="auto"'+(i?' type="number" min="1"':'type="text"')+(i?' max="100"':"")+' /><label class="se-dialog-size-x"'+c+">"+(i?"%":"x")+'</label><input type="text" class="se-input-control _se_image_size_y" placeholder="auto"'+o+(i?' max="100"':"")+c+"/><label"+o+c+'><input type="checkbox" class="se-dialog-btn-check _se_image_check_proportion" checked/>&nbsp;'+n.dialogBox.proportion+'</label><button type="button" title="'+n.dialogBox.revertButton+'" aria-label="'+n.dialogBox.revertButton+'" class="se-btn se-dialog-btn-revert" style="float: right;">'+e.icons.revert+"</button></div>"}return r+='<div class="se-dialog-form se-dialog-form-footer"><label><input type="checkbox" class="se-dialog-btn-check _se_image_check_caption" />&nbsp;'+n.dialogBox.caption+'</label></div></div></div><div class="_se_tab_content _se_tab_content_url" style="display: none">'+e.context.anchor.forms.innerHTML+'</div><div class="se-dialog-footer"><div'+(t.imageAlignShow?"":' style="display: none"')+'><label><input type="radio" name="suneditor_image_radio" class="se-dialog-btn-radio" value="none" checked>'+n.dialogBox.basic+'</label><label><input type="radio" name="suneditor_image_radio" class="se-dialog-btn-radio" value="left">'+n.dialogBox.left+'</label><label><input type="radio" name="suneditor_image_radio" class="se-dialog-btn-radio" value="center">'+n.dialogBox.center+'</label><label><input type="radio" name="suneditor_image_radio" class="se-dialog-btn-radio" value="right">'+n.dialogBox.right+'</label></div><button type="submit" class="se-btn-primary" title="'+n.dialogBox.submitButton+'" aria-label="'+n.dialogBox.submitButton+'"><span>'+n.dialogBox.submitButton+"</span></button></div></form>",a.innerHTML=r,a},_fileInputChange:function(){this.imgInputFile.value?(this.imgUrlFile.setAttribute("disabled",!0),this.previewSrc.style.textDecoration="line-through"):(this.imgUrlFile.removeAttribute("disabled"),this.previewSrc.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_openGallery:function(){this.callPlugin("imageGallery",this.plugins.imageGallery.open.bind(this,this.plugins.image._setUrlInput.bind(this.context.image)),null)},_setUrlInput:function(e){this.altText.value=e.alt,this._v_src._linkValue=this.previewSrc.textContent=this.imgUrlFile.value=e.getAttribute("data-value")||e.src,this.imgUrlFile.focus()},_onLinkPreview:function(e,t,n){const a=n.target.value.trim();e._linkValue=this.textContent=a?t&&a.indexOf("://")===-1&&a.indexOf("#")!==0?t+a:a.indexOf("://")===-1?"/"+a:a:""},fileTags:["img"],select:function(e){this.plugins.image.onModifyMode.call(this,e,this.plugins.resizing.call_controller_resize.call(this,e,"image"))},destroy:function(e){const t=e||this.context.image._element,n=this.util.getParentElement(t,this.util.isMediaComponent)||t,a=t.getAttribute("data-index")*1;if(typeof this.functions.onImageDeleteBefore=="function"&&this.functions.onImageDeleteBefore(t,n,a,this)===!1)return;let r=n.previousElementSibling||n.nextElementSibling;const i=n.parentNode;this.util.removeItem(n),this.plugins.image.init.call(this),this.controllersOff(),i!==this.context.element.wysiwyg&&this.util.removeItemAllParents(i,function(o){return o.childNodes.length===0},null),this.focusEdge(r),this.plugins.fileManager.deleteInfo.call(this,"image",a,this.functions.onImageUpload),this.history.push(!1)},on:function(e){const t=this.context.image;e?t.imgInputFile&&this.options.imageMultipleFile&&t.imgInputFile.removeAttribute("multiple"):(t.inputX.value=t._origin_w=this.options.imageWidth===t._defaultSizeX?"":this.options.imageWidth,t.inputY.value=t._origin_h=this.options.imageHeight===t._defaultSizeY?"":this.options.imageHeight,t.imgInputFile&&this.options.imageMultipleFile&&t.imgInputFile.setAttribute("multiple","multiple")),this.plugins.anchor.on.call(this,t.anchorCtx,e)},open:function(){this.plugins.dialog.open.call(this,"image",this.currentControllerName==="image")},openTab:function(e){const t=this.context.image.modal,n=e==="init"?t.querySelector("._se_tab_link"):e.target;if(!/^BUTTON$/i.test(n.tagName))return!1;const a=n.getAttribute("data-tab-link"),r="_se_tab_content";let i,o,c;for(o=t.getElementsByClassName(r),i=0;i<o.length;i++)o[i].style.display="none";for(c=t.getElementsByClassName("_se_tab_link"),i=0;i<c.length;i++)this.util.removeClass(c[i],"active");return t.querySelector("."+r+"_"+a).style.display="block",this.util.addClass(n,"active"),a==="image"&&this.context.image.focusElement?this.context.image.focusElement.focus():a==="url"&&this.context.anchor.caller.image.urlInput.focus(),!1},submit:function(e){const t=this.context.image,n=this.plugins.image;e.preventDefault(),e.stopPropagation(),t._altText=t.altText.value,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked,t._resizing&&(t._proportionChecked=t.proportion.checked);try{this.context.dialog.updateModal&&n.update_image.call(this,!1,!0,!1),t.imgInputFile&&t.imgInputFile.files.length>0?(this.showLoading(),n.submitAction.call(this,this.context.image.imgInputFile.files)):t.imgUrlFile&&t._v_src._linkValue.length>0&&(this.showLoading(),n.onRender_imgUrl.call(this,t._v_src._linkValue))}catch(a){throw this.closeLoading(),Error('[SUNEDITOR.image.submit.fail] cause : "'+a.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(e.length===0)return;let t=0,n=[];for(let c=0,l=e.length;c<l;c++)/image/i.test(e[c].type)&&(n.push(e[c]),t+=e[c].size);const a=this.options.imageUploadSizeLimit;if(a>0){let c=0;const l=this.context.image._infoList;for(let d=0,u=l.length;d<u;d++)c+=l[d].size*1;if(t+c>a){this.closeLoading();const d="[SUNEDITOR.imageUpload.fail] Size of uploadable total images: "+a/1e3+"KB";(typeof this.functions.onImageUploadError!="function"||this.functions.onImageUploadError(d,{limitSize:a,currentSize:c,uploadSize:t},this))&&this.functions.noticeOpen(d);return}}const r=this.context.image;r._uploadFileLength=n.length;const o={anchor:this.plugins.anchor.createAnchor.call(this,r.anchorCtx,!0),inputWidth:r.inputX.value,inputHeight:r.inputY.value,align:r._align,isUpdate:this.context.dialog.updateModal,alt:r._altText,element:r._element};if(typeof this.functions.onImageUploadBefore=="function"){const c=this.functions.onImageUploadBefore(n,o,this,function(l){l&&this._w.Array.isArray(l.result)?this.plugins.image.register.call(this,o,l):this.plugins.image.upload.call(this,o,l)}.bind(this));if(typeof c=="undefined")return;if(!c){this.closeLoading();return}this._w.Array.isArray(c)&&c.length>0&&(n=c)}this.plugins.image.upload.call(this,o,n)},error:function(e,t){if(this.closeLoading(),typeof this.functions.onImageUploadError!="function"||this.functions.onImageUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.image.error] response: "+e)},upload:function(e,t){if(!t){this.closeLoading();return}if(typeof t=="string"){this.plugins.image.error.call(this,t,null);return}const n=this.options.imageUploadUrl,a=this.context.dialog.updateModal?1:t.length;if(typeof n=="string"&&n.length>0){const r=new FormData;for(let i=0;i<a;i++)r.append("file-"+i,t[i]);this.plugins.fileManager.upload.call(this,n,this.options.imageUploadHeader,r,this.plugins.image.callBack_imgUpload.bind(this,e),this.functions.onImageUploadError)}else this.plugins.image.setup_reader.call(this,t,e.anchor,e.inputWidth,e.inputHeight,e.align,e.alt,a,e.isUpdate)},callBack_imgUpload:function(e,t){if(typeof this.functions.imageUploadHandler=="function")this.functions.imageUploadHandler(t,e,this);else{const n=JSON.parse(t.responseText);n.errorMessage?this.plugins.image.error.call(this,n.errorMessage,n):this.plugins.image.register.call(this,e,n)}},register:function(e,t){const n=t.result;for(let a=0,r=n.length,i;a<r;a++)if(i={name:n[a].name,size:n[a].size},e.isUpdate){this.plugins.image.update_src.call(this,n[a].url,e.element,i);break}else this.plugins.image.create_image.call(this,n[a].url,e.anchor,e.inputWidth,e.inputHeight,e.align,i,e.alt);this.closeLoading()},setup_reader:function(e,t,n,a,r,i,o,c){try{if(o===0){this.closeLoading(),console.warn("[SUNEDITOR.image.base64.fail] cause : No applicable files");return}this.context.image.base64RenderIndex=o;const l=this._w.FileReader,d=[o];this.context.image.inputX.value=n,this.context.image.inputY.value=a;for(let u=0,g,y;u<o;u++)g=new l,y=e[u],g.onload=function(w,v,S,m,p){d[p]={result:w.result,file:m},--this.context.image.base64RenderIndex===0&&(this.plugins.image.onRender_imgBase64.call(this,v,d,S,t,n,a,r,i),this.closeLoading())}.bind(this,g,c,this.context.image._element,y,u),g.readAsDataURL(y)}catch(l){throw this.closeLoading(),Error('[SUNEDITOR.image.setup_reader.fail] cause : "'+l.message+'"')}},onRender_imgBase64:function(e,t,n,a,r,i,o,c){const l=this.plugins.image.update_src,d=this.plugins.image.create_image;for(let u=0,g=t.length;u<g;u++)e?(this.context.image._element.setAttribute("data-file-name",t[u].file.name),this.context.image._element.setAttribute("data-file-size",t[u].file.size),l.call(this,t[u].result,n,t[u].file)):d.call(this,t[u].result,a,r,i,o,t[u].file,c)},onRender_imgUrl:function(e){if(e||(e=this.context.image._v_src._linkValue),!e)return!1;const t=this.context.image;try{const n={name:e.split("/").pop(),size:0};this.context.dialog.updateModal?this.plugins.image.update_src.call(this,e,t._element,n):this.plugins.image.create_image.call(this,e,this.plugins.anchor.createAnchor.call(this,t.anchorCtx,!0),t.inputX.value,t.inputY.value,t._align,n,t._altText)}catch(n){throw Error('[SUNEDITOR.image.URLRendering.fail] cause : "'+n.message+'"')}finally{this.closeLoading()}},onRender_link:function(e,t){return t?(t.setAttribute("data-image-link","image"),e.setAttribute("data-image-link",t.href),t.appendChild(e),t):e},setInputSize:function(e,t){if(t&&t.keyCode===32){t.preventDefault();return}this.plugins.resizing._module_setInputSize.call(this,this.context.image,e)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.image)},checkFileInfo:function(){const e=this.plugins.image,t=this.context.image,n=function(a){e.onModifyMode.call(this,a,null),e.openModify.call(this,!0),t.inputX.value=t._origin_w,t.inputY.value=t._origin_h;const r=this.util.getFormatElement(a);r&&(t._align=r.style.textAlign||r.style.float),this.util.isAnchor(a.parentNode)&&!t.anchorCtx.linkValue&&(t.anchorCtx.linkValue=" "),e.update_image.call(this,!0,!1,!0),e.init.call(this)}.bind(this);this.plugins.fileManager.checkInfo.call(this,"image",["img"],this.functions.onImageUpload,n,!0)},resetFileInfo:function(){this.plugins.fileManager.resetInfo.call(this,"image",this.functions.onImageUpload)},create_image:function(e,t,n,a,r,i,o){const c=this.plugins.image,l=this.context.image;this.context.resizing._resize_plugin="image";let d=this.util.createElement("IMG");d.src=e,d.alt=o,d.setAttribute("data-rotate","0"),t=c.onRender_link.call(this,d,t?t.cloneNode(!1):null),l._resizing&&d.setAttribute("data-proportion",l._proportionChecked);const u=this.plugins.component.set_cover.call(this,t),g=this.plugins.component.set_container.call(this,u,"se-image-container");l._captionChecked&&(l._caption=this.plugins.component.create_caption.call(this),u.appendChild(l._caption)),l._element=d,l._cover=u,l._container=g,c.applySize.call(this,n,a),c.setAlign.call(this,r,d,u,g),d.onload=c._image_create_onload.bind(this,d,l.svgDefaultSize,g),this.insertComponent(g,!0,!0,!0)&&this.plugins.fileManager.setInfo.call(this,"image",d,this.functions.onImageUpload,i,!0),this.context.resizing._resize_plugin=""},_image_create_onload:function(e,t,n){if(e.offsetWidth===0&&this.plugins.image.applySize.call(this,t,""),this.options.mediaAutoSelect)this.selectComponent(e,"image");else{const a=this.appendFormatTag(n,null);a&&this.setRange(a,0,a,0)}},update_image:function(e,t,n){const a=this.context.image;let r=a._element,i=a._cover,o=a._container,c=!1;i===null&&(c=!0,r=a._element.cloneNode(!0),i=this.plugins.component.set_cover.call(this,r)),o===null?(i=i.cloneNode(!0),r=i.querySelector("img"),c=!0,o=this.plugins.component.set_container.call(this,i,"se-image-container")):c&&(o.innerHTML="",o.appendChild(i),a._cover=i,a._element=r,c=!1);let l;const d=this.util.isNumber(a.inputX.value)?a.inputX.value+a.sizeUnit:a.inputX.value,u=this.util.isNumber(a.inputY.value)?a.inputY.value+a.sizeUnit:a.inputY.value;/%$/.test(r.style.width)?l=d!==o.style.width||u!==o.style.height:l=d!==r.style.width||u!==r.style.height,r.alt=a._altText;let g=!1;a._captionChecked?a._caption||(a._caption=this.plugins.component.create_caption.call(this),i.appendChild(a._caption),g=!0):a._caption&&(this.util.removeItem(a._caption),a._caption=null,g=!0);let y=null;const w=this.plugins.anchor.createAnchor.call(this,a.anchorCtx,!0);if(w)a._linkElement!==w||c&&!o.contains(w)?(a._linkElement=w.cloneNode(!1),i.insertBefore(this.plugins.image.onRender_link.call(this,r,a._linkElement),a._caption),y=a._element):a._linkElement.setAttribute("data-image-link","image");else if(a._linkElement!==null){const S=r;if(S.setAttribute("data-image-link",""),i.contains(a._linkElement)){const m=S.cloneNode(!0);i.removeChild(a._linkElement),i.insertBefore(m,a._caption),a._element=r=m}}let v=null;if(c){if(v=this.util.isRangeFormatElement(a._element.parentNode)||this.util.isWysiwygDiv(a._element.parentNode)?a._element:this.util.isAnchor(a._element.parentNode)?a._element.parentNode:this.util.getFormatElement(a._element)||a._element,this.util.getParentElement(a._element,this.util.isNotCheckingNode))v=y?w:a._element,v.parentNode.replaceChild(o,v);else if(this.util.isListCell(v)){const S=this.util.getParentElement(a._element,function(m){return m.parentNode===v});v.insertBefore(o,S),this.util.removeItem(a._element),this.util.removeEmptyNode(S,null,!0)}else if(this.util.isFormatElement(v)){const S=this.util.getParentElement(a._element,function(m){return m.parentNode===v});v=this.util.splitElement(v,S),v.parentNode.insertBefore(o,v),this.util.removeItem(a._element),this.util.removeEmptyNode(v,null,!0),v.children.length===0&&(v.innerHTML=this.util.htmlRemoveWhiteSpace(v.innerHTML))}else if(this.util.isFormatElement(v.parentNode)){const S=v.parentNode;S.parentNode.insertBefore(o,v.previousSibling?S.nextElementSibling:S),a.__updateTags.map(function(m){return v.contains(m)}).length===0&&this.util.removeItem(v)}else v=this.util.isFigures(v.parentNode)?v.parentNode:v,v.parentNode.replaceChild(o,v);r=o.querySelector("img"),a._element=r,a._cover=i,a._container=o}y&&(c?(this.util.removeItem(y),this.util.getListChildren(w,function(S){return/IMG/i.test(S.tagName)}).length===0&&this.util.removeItem(w)):this.util.removeItem(w)),(g||!a._onlyPercentage&&l)&&!e&&(/\d+/.test(r.style.height)||this.context.resizing._rotateVertical&&a._captionChecked)&&(/%$/.test(a.inputX.value)||/%$/.test(a.inputY.value)?this.plugins.resizing.resetTransform.call(this,r):this.plugins.resizing.setTransformSize.call(this,r,this.util.getNumber(a.inputX.value,0),this.util.getNumber(a.inputY.value,0))),a._resizing&&(r.setAttribute("data-proportion",a._proportionChecked),l&&this.plugins.image.applySize.call(this)),this.plugins.image.setAlign.call(this,null,r,null,null),e&&this.plugins.fileManager.setInfo.call(this,"image",r,this.functions.onImageUpload,null,!0),t&&this.selectComponent(r,"image"),n||this.history.push(!1)},update_src:function(e,t,n){t.src=e,this._w.setTimeout(this.plugins.fileManager.setInfo.bind(this,"image",t,this.functions.onImageUpload,n,!0)),this.selectComponent(t,"image")},onModifyMode:function(e,t){if(!e)return;const n=this.context.image;n._linkElement=n.anchorCtx.linkAnchor=this.util.isAnchor(e.parentNode)?e.parentNode:null,n._element=e,n._cover=this.util.getParentElement(e,"FIGURE"),n._container=this.util.getParentElement(e,this.util.isMediaComponent),n._caption=this.util.getChildElement(n._cover,"FIGCAPTION"),n._align=e.getAttribute("data-align")||e.style.float||"none",e.style.float="",this.plugins.anchor.setCtx(n._linkElement,n.anchorCtx),t&&(n._element_w=t.w,n._element_h=t.h,n._element_t=t.t,n._element_l=t.l);let a=n._element.getAttribute("data-size")||n._element.getAttribute("data-origin"),r,i;a?(a=a.split(","),r=a[0],i=a[1]):t&&(r=t.w,i=t.h),n._origin_w=r||e.style.width||e.width||"",n._origin_h=i||e.style.height||e.height||""},openModify:function(e){const t=this.context.image;t.imgUrlFile&&(t._v_src._linkValue=t.previewSrc.textContent=t.imgUrlFile.value=t._element.src),t._altText=t.altText.value=t._element.alt,(t.modal.querySelector('input[name="suneditor_image_radio"][value="'+t._align+'"]')||t.modal.querySelector('input[name="suneditor_image_radio"][value="none"]')).checked=!0,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked=!!t._caption,t._resizing&&this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.image),e||this.plugins.dialog.open.call(this,"image",!0)},applySize:function(e,t){const n=this.context.image;return e||(e=n.inputX.value||this.options.imageWidth),t||(t=n.inputY.value||this.options.imageHeight),n._onlyPercentage&&!!e||/%$/.test(e)?(this.plugins.image.setPercentSize.call(this,e,t),!0):((!e||e==="auto")&&(!t||t==="auto")?this.plugins.image.setAutoSize.call(this):this.plugins.image.setSize.call(this,e,t,!1),!1)},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.image)},setSize:function(e,t,n,a){const r=this.context.image,i=/^(rw|lw)$/.test(a)&&/\d+/.test(r._element.style.height);/^(th|bh)$/.test(a)&&/\d+/.test(r._element.style.width)||(r._element.style.width=this.util.isNumber(e)?e+r.sizeUnit:e,this.plugins.image.cancelPercentAttr.call(this)),i||(r._element.style.height=this.util.isNumber(t)?t+r.sizeUnit:/%$/.test(t)?"":t),r._align==="center"&&this.plugins.image.setAlign.call(this,null,null,null,null),n||r._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,r)},setAutoSize:function(){const e=this.context.image;e._caption&&(e._caption.style.marginTop=""),this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this),e._element.style.maxWidth="",e._element.style.width="",e._element.style.height="",e._cover.style.width="",e._cover.style.height="",this.plugins.image.setAlign.call(this,null,null,null,null),e._element.setAttribute("data-percentage","auto,auto"),this.plugins.resizing._module_saveCurrentSize.call(this,e)},setOriginSize:function(){const e=this.context.image;e._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this);const t=(e._element.getAttribute("data-origin")||"").split(","),n=t[0],a=t[1];t&&(e._onlyPercentage||/%$/.test(n)&&(/%$/.test(a)||!/\d/.test(a))?this.plugins.image.setPercentSize.call(this,n,a):this.plugins.image.setSize.call(this,n,a),this.plugins.resizing._module_saveCurrentSize.call(this,e))},setPercentSize:function(e,t){const n=this.context.image;t=!!t&&!/%$/.test(t)&&!this.util.getNumber(t,0)?this.util.isNumber(t)?t+"%":t:this.util.isNumber(t)?t+n.sizeUnit:t||"";const a=/%$/.test(t);n._container.style.width=this.util.isNumber(e)?e+"%":e,n._container.style.height="",n._cover.style.width="100%",n._cover.style.height=a?t:"",n._element.style.width="100%",n._element.style.height=a?"":t,n._element.style.maxWidth="",n._align==="center"&&this.plugins.image.setAlign.call(this,null,null,null,null),n._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing.setCaptionPosition.call(this,n._element),this.plugins.resizing._module_saveCurrentSize.call(this,n)},cancelPercentAttr:function(){const e=this.context.image;e._cover.style.width="",e._cover.style.height="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.image._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),e._align==="center"&&this.plugins.image.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,n,a){const r=this.context.image;e||(e=r._align),t||(t=r._element),n||(n=r._cover),a||(a=r._container),/%$/.test(t.style.width)&&e==="center"?(a.style.minWidth="100%",n.style.width=a.style.width):(a.style.minWidth="",n.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:!t.style.width||t.style.width==="auto"?"":t.style.width||"100%"),this.util.hasClass(a,"__se__float-"+e)||(this.util.removeClass(a,r._floatClassRegExp),this.util.addClass(a,"__se__float-"+e)),t.setAttribute("data-align",e)},init:function(){const e=this.context.image;e.imgInputFile&&(e.imgInputFile.value=""),e.imgUrlFile&&(e._v_src._linkValue=e.previewSrc.textContent=e.imgUrlFile.value=""),e.imgInputFile&&e.imgUrlFile&&(e.imgUrlFile.removeAttribute("disabled"),e.previewSrc.style.textDecoration=""),e.altText.value="",e.modal.querySelector('input[name="suneditor_image_radio"][value="none"]').checked=!0,e.captionCheckEl.checked=!1,e._element=null,this.plugins.image.openTab.call(this,"init"),e._resizing&&(e.inputX.value=this.options.imageWidth===e._defaultSizeX?"":this.options.imageWidth,e.inputY.value=this.options.imageHeight===e._defaultSizeY?"":this.options.imageHeight,e.proportion.checked=!0,e._ratio=!1,e._ratioX=1,e._ratioY=1),this.plugins.anchor.init.call(this,e.anchorCtx)}},UP={name:"video",display:"dialog",add:function(e){e.addModule([uh,a5,$P,r5]);const t=e.options,n=e.context,a=n.video={_infoList:[],_infoIndex:0,_uploadFileLength:0,focusElement:null,sizeUnit:t._videoSizeUnit,_align:"none",_floatClassRegExp:"__se__float\\-[a-z]+",_youtubeQuery:t.youtubeQuery,_videoRatio:t.videoRatio*100+"%",_defaultRatio:t.videoRatio*100+"%",_linkValue:"",_element:null,_cover:null,_container:null,inputX:null,inputY:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_defaultSizeX:"100%",_defaultSizeY:t.videoRatio*100+"%",_origin_w:t.videoWidth==="100%"?"":t.videoWidth,_origin_h:t.videoHeight==="56.25%"?"":t.videoHeight,_proportionChecked:!0,_resizing:t.videoResizing,_resizeDotHide:!t.videoHeightShow,_rotation:t.videoRotation,_alignHide:!t.videoAlignShow,_onlyPercentage:t.videoSizeOnlyPercentage,_ratio:!1,_ratioX:1,_ratioY:1,_captionShow:!1};let r=this.setDialog(e);a.modal=r,a.videoInputFile=r.querySelector("._se_video_file"),a.videoUrlFile=r.querySelector(".se-input-url"),a.focusElement=a.videoUrlFile||a.videoInputFile,a.preview=r.querySelector(".se-link-preview"),r.querySelector("form").addEventListener("submit",this.submit.bind(e)),a.videoInputFile&&r.querySelector(".se-dialog-files-edge-button").addEventListener("click",this._removeSelectedFiles.bind(a.videoInputFile,a.videoUrlFile,a.preview)),a.videoInputFile&&a.videoUrlFile&&a.videoInputFile.addEventListener("change",this._fileInputChange.bind(a)),a.videoUrlFile&&a.videoUrlFile.addEventListener("input",this._onLinkPreview.bind(a.preview,a,t.linkProtocol)),a.proportion={},a.videoRatioOption={},a.inputX={},a.inputY={},t.videoResizing&&(a.proportion=r.querySelector("._se_video_check_proportion"),a.videoRatioOption=r.querySelector(".se-video-ratio"),a.inputX=r.querySelector("._se_video_size_x"),a.inputY=r.querySelector("._se_video_size_y"),a.inputX.value=t.videoWidth,a.inputY.value=t.videoHeight,a.inputX.addEventListener("keyup",this.setInputSize.bind(e,"x")),a.inputY.addEventListener("keyup",this.setInputSize.bind(e,"y")),a.inputX.addEventListener("change",this.setRatio.bind(e)),a.inputY.addEventListener("change",this.setRatio.bind(e)),a.proportion.addEventListener("change",this.setRatio.bind(e)),a.videoRatioOption.addEventListener("change",this.setVideoRatio.bind(e)),r.querySelector(".se-dialog-btn-revert").addEventListener("click",this.sizeRevert.bind(e))),n.dialog.modal.appendChild(r),r=null},setDialog:function(e){const t=e.options,n=e.lang,a=e.util.createElement("DIV");a.className="se-dialog-content",a.style.display="none";let r='<form method="post" enctype="multipart/form-data"><div class="se-dialog-header"><button type="button" data-command="close" class="se-btn se-dialog-close" title="'+n.dialogBox.close+'" aria-label="'+n.dialogBox.close+'">'+e.icons.cancel+'</button><span class="se-modal-title">'+n.dialogBox.videoBox.title+'</span></div><div class="se-dialog-body">';if(t.videoFileInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.videoBox.file+'</label><div class="se-dialog-form-files"><input class="se-input-form _se_video_file" type="file" accept="'+t.videoAccept+'"'+(t.videoMultipleFile?' multiple="multiple"':"")+'/><button type="button" data-command="filesRemove" class="se-btn se-dialog-files-edge-button se-file-remove" title="'+n.controller.remove+'" aria-label="'+n.controller.remove+'">'+e.icons.cancel+"</button></div></div>"),t.videoUrlInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.videoBox.url+'</label><input class="se-input-form se-input-url" type="text" /><pre class="se-link-preview"></pre></div>'),t.videoResizing){const i=t.videoRatioList||[{name:"16:9",value:.5625},{name:"4:3",value:.75},{name:"21:9",value:.4285}],o=t.videoRatio,c=t.videoSizeOnlyPercentage,l=c?' style="display: none !important;"':"",d=t.videoHeightShow?"":' style="display: none !important;"',u=t.videoRatioShow?"":' style="display: none !important;"',g=!c&&!t.videoHeightShow&&!t.videoRatioShow?' style="display: none !important;"':"";r+='<div class="se-dialog-form"><div class="se-dialog-size-text"><label class="size-w">'+n.dialogBox.width+'</label><label class="se-dialog-size-x">&nbsp;</label><label class="size-h"'+d+">"+n.dialogBox.height+'</label><label class="size-h"'+u+">("+n.dialogBox.ratio+')</label></div><input class="se-input-control _se_video_size_x" placeholder="100%"'+(c?' type="number" min="1"':'type="text"')+(c?' max="100"':"")+'/><label class="se-dialog-size-x"'+g+">"+(c?"%":"x")+'</label><input class="se-input-control _se_video_size_y" placeholder="'+t.videoRatio*100+'%"'+(c?' type="number" min="1"':'type="text"')+(c?' max="100"':"")+d+'/><select class="se-input-select se-video-ratio" title="'+n.dialogBox.ratio+'" aria-label="'+n.dialogBox.ratio+'"'+u+">",d||(r+='<option value=""> - </option>');for(let y=0,w=i.length;y<w;y++)r+='<option value="'+i[y].value+'"'+(o.toString()===i[y].value.toString()?" selected":"")+">"+i[y].name+"</option>";r+='</select><button type="button" title="'+n.dialogBox.revertButton+'" aria-label="'+n.dialogBox.revertButton+'" class="se-btn se-dialog-btn-revert" style="float: right;">'+e.icons.revert+'</button></div><div class="se-dialog-form se-dialog-form-footer"'+l+g+'><label><input type="checkbox" class="se-dialog-btn-check _se_video_check_proportion" checked/>&nbsp;'+n.dialogBox.proportion+"</label></div>"}return r+='</div><div class="se-dialog-footer"><div'+(t.videoAlignShow?"":' style="display: none"')+'><label><input type="radio" name="suneditor_video_radio" class="se-dialog-btn-radio" value="none" checked>'+n.dialogBox.basic+'</label><label><input type="radio" name="suneditor_video_radio" class="se-dialog-btn-radio" value="left">'+n.dialogBox.left+'</label><label><input type="radio" name="suneditor_video_radio" class="se-dialog-btn-radio" value="center">'+n.dialogBox.center+'</label><label><input type="radio" name="suneditor_video_radio" class="se-dialog-btn-radio" value="right">'+n.dialogBox.right+'</label></div><button type="submit" class="se-btn-primary" title="'+n.dialogBox.submitButton+'" aria-label="'+n.dialogBox.submitButton+'"><span>'+n.dialogBox.submitButton+"</span></button></div></form>",a.innerHTML=r,a},_fileInputChange:function(){this.videoInputFile.value?(this.videoUrlFile.setAttribute("disabled",!0),this.preview.style.textDecoration="line-through"):(this.videoUrlFile.removeAttribute("disabled"),this.preview.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_onLinkPreview:function(e,t,n){const a=n.target.value.trim();/^<iframe.*\/iframe>$/.test(a)?(e._linkValue=a,this.textContent='<IFrame :src=".."></IFrame>'):e._linkValue=this.textContent=a?t&&a.indexOf("://")===-1&&a.indexOf("#")!==0?t+a:a.indexOf("://")===-1?"/"+a:a:""},_setTagAttrs:function(e){e.setAttribute("controls",!0);const t=this.options.videoTagAttrs;if(!!t)for(let n in t)!this.util.hasOwn(t,n)||e.setAttribute(n,t[n])},createVideoTag:function(){const e=this.util.createElement("VIDEO");return this.plugins.video._setTagAttrs.call(this,e),e},_setIframeAttrs:function(e){e.frameBorder="0",e.allowFullscreen=!0;const t=this.options.videoIframeAttrs;if(!!t)for(let n in t)!this.util.hasOwn(t,n)||e.setAttribute(n,t[n])},createIframeTag:function(){const e=this.util.createElement("IFRAME");return this.plugins.video._setIframeAttrs.call(this,e),e},fileTags:["iframe","video"],select:function(e){this.plugins.video.onModifyMode.call(this,e,this.plugins.resizing.call_controller_resize.call(this,e,"video"))},destroy:function(e){const t=e||this.context.video._element,n=this.context.video._container,a=t.getAttribute("data-index")*1;if(typeof this.functions.onVideoDeleteBefore=="function"&&this.functions.onVideoDeleteBefore(t,n,a,this)===!1)return;let r=n.previousElementSibling||n.nextElementSibling;const i=n.parentNode;this.util.removeItem(n),this.plugins.video.init.call(this),this.controllersOff(),i!==this.context.element.wysiwyg&&this.util.removeItemAllParents(i,function(o){return o.childNodes.length===0},null),this.focusEdge(r),this.plugins.fileManager.deleteInfo.call(this,"video",a,this.functions.onVideoUpload),this.history.push(!1)},on:function(e){const t=this.context.video;e?t.videoInputFile&&this.options.videoMultipleFile&&t.videoInputFile.removeAttribute("multiple"):(t.inputX.value=t._origin_w=this.options.videoWidth===t._defaultSizeX?"":this.options.videoWidth,t.inputY.value=t._origin_h=this.options.videoHeight===t._defaultSizeY?"":this.options.videoHeight,t.proportion.disabled=!0,t.videoInputFile&&this.options.videoMultipleFile&&t.videoInputFile.setAttribute("multiple","multiple")),t._resizing&&this.plugins.video.setVideoRatioSelect.call(this,t._origin_h||t._defaultRatio)},open:function(){this.plugins.dialog.open.call(this,"video",this.currentControllerName==="video")},setVideoRatio:function(e){const t=this.context.video,n=e.target.options[e.target.selectedIndex].value;t._defaultSizeY=t._videoRatio=n?n*100+"%":t._defaultSizeY,t.inputY.placeholder=n?n*100+"%":"",t.inputY.value=""},setInputSize:function(e,t){if(t&&t.keyCode===32){t.preventDefault();return}const n=this.context.video;this.plugins.resizing._module_setInputSize.call(this,n,e),e==="y"&&this.plugins.video.setVideoRatioSelect.call(this,t.target.value||n._defaultRatio)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.video)},submit:function(e){const t=this.context.video,n=this.plugins.video;e.preventDefault(),e.stopPropagation(),t._align=t.modal.querySelector('input[name="suneditor_video_radio"]:checked').value;try{t.videoInputFile&&t.videoInputFile.files.length>0?(this.showLoading(),n.submitAction.call(this,this.context.video.videoInputFile.files)):t.videoUrlFile&&t._linkValue.length>0&&(this.showLoading(),n.setup_url.call(this,t._linkValue))}catch(a){throw this.closeLoading(),Error('[SUNEDITOR.video.submit.fail] cause : "'+a.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(e.length===0)return;let t=0,n=[];for(let o=0,c=e.length;o<c;o++)/video/i.test(e[o].type)&&(n.push(e[o]),t+=e[o].size);const a=this.options.videoUploadSizeLimit;if(a>0){let o=0;const c=this.context.video._infoList;for(let l=0,d=c.length;l<d;l++)o+=c[l].size*1;if(t+o>a){this.closeLoading();const l="[SUNEDITOR.videoUpload.fail] Size of uploadable total videos: "+a/1e3+"KB";(typeof this.functions.onVideoUploadError!="function"||this.functions.onVideoUploadError(l,{limitSize:a,currentSize:o,uploadSize:t},this))&&this.functions.noticeOpen(l);return}}const r=this.context.video;r._uploadFileLength=n.length;const i={inputWidth:r.inputX.value,inputHeight:r.inputY.value,align:r._align,isUpdate:this.context.dialog.updateModal,element:r._element};if(typeof this.functions.onVideoUploadBefore=="function"){const o=this.functions.onVideoUploadBefore(n,i,this,function(c){c&&this._w.Array.isArray(c.result)?this.plugins.video.register.call(this,i,c):this.plugins.video.upload.call(this,i,c)}.bind(this));if(typeof o=="undefined")return;if(!o){this.closeLoading();return}typeof o=="object"&&o.length>0&&(n=o)}this.plugins.video.upload.call(this,i,n)},error:function(e,t){if(this.closeLoading(),typeof this.functions.onVideoUploadError!="function"||this.functions.onVideoUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.video.error] response: "+e)},upload:function(e,t){if(!t){this.closeLoading();return}if(typeof t=="string"){this.plugins.video.error.call(this,t,null);return}const n=this.options.videoUploadUrl,a=this.context.dialog.updateModal?1:t.length;if(typeof n=="string"&&n.length>0){const r=new FormData;for(let i=0;i<a;i++)r.append("file-"+i,t[i]);this.plugins.fileManager.upload.call(this,n,this.options.videoUploadHeader,r,this.plugins.video.callBack_videoUpload.bind(this,e),this.functions.onVideoUploadError)}else throw Error('[SUNEDITOR.videoUpload.fail] cause : There is no "videoUploadUrl" option.')},callBack_videoUpload:function(e,t){if(typeof this.functions.videoUploadHandler=="function")this.functions.videoUploadHandler(t,e,this);else{const n=JSON.parse(t.responseText);n.errorMessage?this.plugins.video.error.call(this,n.errorMessage,n):this.plugins.video.register.call(this,e,n)}},register:function(e,t){const n=t.result,a=this.plugins.video.createVideoTag.call(this);for(let r=0,i=n.length,o;r<i;r++)o={name:n[r].name,size:n[r].size},this.plugins.video.create_video.call(this,e.isUpdate?e.element:a.cloneNode(!1),n[r].url,e.inputWidth,e.inputHeight,e.align,o,e.isUpdate);this.closeLoading()},setup_url:function(e){try{const t=this.context.video;if(e||(e=t._linkValue),!e||/^<iframe.*\/iframe>$/.test(e)&&(e=new this._w.DOMParser().parseFromString(e,"text/html").querySelector("iframe").src,e.length===0))return!1;if(/youtu\.?be/.test(e)){if(/^http/.test(e)||(e="https://"+e),e=e.replace("watch?v=",""),/^\/\/.+\/embed\//.test(e)||(e=e.replace(e.match(/\/\/.+\//)[0],"//www.youtube.com/embed/").replace("&","?&")),t._youtubeQuery.length>0)if(/\?/.test(e)){const n=e.split("?");e=n[0]+"?"+t._youtubeQuery+"&"+n[1]}else e+="?"+t._youtubeQuery}else/vimeo\.com/.test(e)&&(e.endsWith("/")&&(e=e.slice(0,-1)),e="https://player.vimeo.com/video/"+e.slice(e.lastIndexOf("/")+1));this.plugins.video.create_video.call(this,this.plugins.video[!/embed|iframe|player|\/e\/|\.php|\.html?/.test(e)&&!/vimeo\.com/.test(e)?"createVideoTag":"createIframeTag"].call(this),e,t.inputX.value,t.inputY.value,t._align,null,this.context.dialog.updateModal)}catch(t){throw Error('[SUNEDITOR.video.upload.fail] cause : "'+t.message+'"')}finally{this.closeLoading()}},create_video:function(e,t,n,a,r,i,o){this.context.resizing._resize_plugin="video";const c=this.context.video;let l=null,d=null,u=!1;if(o){if(e=c._element,e.src!==t){u=!0;const S=/youtu\.?be/.test(t),m=/vimeo\.com/.test(t);if((S||m)&&!/^iframe$/i.test(e.nodeName)){const p=this.plugins.video.createIframeTag.call(this);p.src=t,e.parentNode.replaceChild(p,e),c._element=e=p}else if(!S&&!m&&!/^video$/i.test(e.nodeName)){const p=this.plugins.video.createVideoTag.call(this);p.src=t,e.parentNode.replaceChild(p,e),c._element=e=p}else e.src=t}d=c._container,l=this.util.getParentElement(e,"FIGURE")}else u=!0,e.src=t,c._element=e,l=this.plugins.component.set_cover.call(this,e),d=this.plugins.component.set_container.call(this,l,"se-video-container");c._cover=l,c._container=d;const g=this.plugins.resizing._module_getSizeX.call(this,c)!==(n||c._defaultSizeX)||this.plugins.resizing._module_getSizeY.call(this,c)!==(a||c._videoRatio),y=!o||g;c._resizing&&(this.context.video._proportionChecked=c.proportion.checked,e.setAttribute("data-proportion",c._proportionChecked));let w=!1;y&&(w=this.plugins.video.applySize.call(this)),w&&r==="center"||this.plugins.video.setAlign.call(this,null,e,l,d);let v=!0;if(o)c._resizing&&this.context.resizing._rotateVertical&&y&&this.plugins.resizing.setTransformSize.call(this,e,null,null);else if(v=this.insertComponent(d,!1,!0,!this.options.mediaAutoSelect),!this.options.mediaAutoSelect){const S=this.appendFormatTag(d,null);S&&this.setRange(S,0,S,0)}v&&(u&&this.plugins.fileManager.setInfo.call(this,"video",e,this.functions.onVideoUpload,i,!0),o&&(this.selectComponent(e,"video"),this.history.push(!1))),this.context.resizing._resize_plugin=""},_update_videoCover:function(e){if(!e)return;const t=this.context.video;/^video$/i.test(e.nodeName)?this.plugins.video._setTagAttrs.call(this,e):this.plugins.video._setIframeAttrs.call(this,e);let n=this.util.isRangeFormatElement(e.parentNode)||this.util.isWysiwygDiv(e.parentNode)?e:this.util.getFormatElement(e)||e;const a=e;t._element=e=e.cloneNode(!0);const r=t._cover=this.plugins.component.set_cover.call(this,e),i=t._container=this.plugins.component.set_container.call(this,r,"se-video-container");try{const o=n.querySelector("figcaption");let c=null;o&&(c=this.util.createElement("DIV"),c.innerHTML=o.innerHTML,this.util.removeItem(o));const l=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.plugins.video.applySize.call(this,l[0]||a.style.width||a.width||"",l[1]||a.style.height||a.height||"");const d=this.util.getFormatElement(a);if(d&&(t._align=d.style.textAlign||d.style.float),this.plugins.video.setAlign.call(this,null,e,r,i),this.util.getParentElement(a,this.util.isNotCheckingNode))a.parentNode.replaceChild(i,a);else if(this.util.isListCell(n)){const u=this.util.getParentElement(a,function(g){return g.parentNode===n});n.insertBefore(i,u),this.util.removeItem(a),this.util.removeEmptyNode(u,null,!0)}else if(this.util.isFormatElement(n)){const u=this.util.getParentElement(a,function(g){return g.parentNode===n});n=this.util.splitElement(n,u),n.parentNode.insertBefore(i,n),this.util.removeItem(a),this.util.removeEmptyNode(n,null,!0),n.children.length===0&&(n.innerHTML=this.util.htmlRemoveWhiteSpace(n.innerHTML))}else n.parentNode.replaceChild(i,n);c&&n.parentNode.insertBefore(c,i.nextElementSibling)}catch(o){console.warn("[SUNEDITOR.video.error] Maybe the video tag is nested.",o)}this.plugins.fileManager.setInfo.call(this,"video",e,this.functions.onVideoUpload,null,!0),this.plugins.video.init.call(this)},onModifyMode:function(e,t){const n=this.context.video;n._element=e,n._cover=this.util.getParentElement(e,"FIGURE"),n._container=this.util.getParentElement(e,this.util.isMediaComponent),n._align=e.style.float||e.getAttribute("data-align")||"none",e.style.float="",t&&(n._element_w=t.w,n._element_h=t.h,n._element_t=t.t,n._element_l=t.l);let a=n._element.getAttribute("data-size")||n._element.getAttribute("data-origin"),r,i;a?(a=a.split(","),r=a[0],i=a[1]):t&&(r=t.w,i=t.h),n._origin_w=r||e.style.width||e.width||"",n._origin_h=i||e.style.height||e.height||""},openModify:function(e){const t=this.context.video;if(t.videoUrlFile&&(t._linkValue=t.preview.textContent=t.videoUrlFile.value=t._element.src||(t._element.querySelector("source")||"").src||""),(t.modal.querySelector('input[name="suneditor_video_radio"][value="'+t._align+'"]')||t.modal.querySelector('input[name="suneditor_video_radio"][value="none"]')).checked=!0,t._resizing){this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.video);const n=t._videoRatio=this.plugins.resizing._module_getSizeY.call(this,t);this.plugins.video.setVideoRatioSelect.call(this,n)||(t.inputY.value=t._onlyPercentage?this.util.getNumber(n,2):n)}e||this.plugins.dialog.open.call(this,"video",!0)},setVideoRatioSelect:function(e){let t=!1;const n=this.context.video,a=n.videoRatioOption.options;/%$/.test(e)||n._onlyPercentage?e=this.util.getNumber(e,2)/100+"":(!this.util.isNumber(e)||e*1>=1)&&(e=""),n.inputY.placeholder="";for(let r=0,i=a.length;r<i;r++)a[r].value===e?(t=a[r].selected=!0,n.inputY.placeholder=e?e*100+"%":""):a[r].selected=!1;return t},checkFileInfo:function(){this.plugins.fileManager.checkInfo.call(this,"video",["iframe","video"],this.functions.onVideoUpload,this.plugins.video._update_videoCover.bind(this),!0)},resetFileInfo:function(){this.plugins.fileManager.resetInfo.call(this,"video",this.functions.onVideoUpload)},applySize:function(e,t){const n=this.context.video;return e||(e=n.inputX.value||this.options.videoWidth),t||(t=n.inputY.value||this.options.videoHeight),n._onlyPercentage||/%$/.test(e)||!e?(this.plugins.video.setPercentSize.call(this,e||"100%",t||(/%$/.test(n._videoRatio)?n._videoRatio:n._defaultRatio)),!0):((!e||e==="auto")&&(!t||t==="auto")?this.plugins.video.setAutoSize.call(this):this.plugins.video.setSize.call(this,e,t||n._videoRatio||n._defaultRatio,!1),!1)},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.video)},setSize:function(e,t,n,a){const r=this.context.video,i=/^(rw|lw)$/.test(a),o=/^(th|bh)$/.test(a);o||(e=this.util.getNumber(e,0)),i||(t=this.util.isNumber(t)?t+r.sizeUnit:t||""),e=e?e+r.sizeUnit:"",o||(r._element.style.width=e),i||(r._cover.style.paddingBottom=r._cover.style.height=t),!o&&!/%$/.test(e)&&(r._cover.style.width=e,r._container.style.width=""),!i&&!/%$/.test(t)?r._element.style.height=t:r._element.style.height="",n||r._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,r)},setAutoSize:function(){this.plugins.video.setPercentSize.call(this,100,this.context.video._defaultRatio)},setOriginSize:function(e){const t=this.context.video;t._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,t._element),this.plugins.video.cancelPercentAttr.call(this);const n=((e?t._element.getAttribute("data-size"):"")||t._element.getAttribute("data-origin")||"").split(",");if(n){const a=n[0],r=n[1];t._onlyPercentage||/%$/.test(a)&&(/%$/.test(r)||!/\d/.test(r))?this.plugins.video.setPercentSize.call(this,a,r):this.plugins.video.setSize.call(this,a,r),this.plugins.resizing._module_saveCurrentSize.call(this,t)}},setPercentSize:function(e,t){const n=this.context.video;t=!!t&&!/%$/.test(t)&&!this.util.getNumber(t,0)?this.util.isNumber(t)?t+"%":t:this.util.isNumber(t)?t+n.sizeUnit:t||n._defaultRatio,n._container.style.width=this.util.isNumber(e)?e+"%":e,n._container.style.height="",n._cover.style.width="100%",n._cover.style.height=t,n._cover.style.paddingBottom=t,n._element.style.width="100%",n._element.style.height="100%",n._element.style.maxWidth="",n._align==="center"&&this.plugins.video.setAlign.call(this,null,null,null,null),n._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing._module_saveCurrentSize.call(this,n)},cancelPercentAttr:function(){const e=this.context.video;e._cover.style.width="",e._cover.style.height="",e._cover.style.paddingBottom="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.video._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),e._align==="center"&&this.plugins.video.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,n,a){const r=this.context.video;e||(e=r._align),t||(t=r._element),n||(n=r._cover),a||(a=r._container),/%$/.test(t.style.width)&&e==="center"?(a.style.minWidth="100%",n.style.width=a.style.width,n.style.height=n.style.height,n.style.paddingBottom=/%$/.test(n.style.height)?this.util.getNumber(this.util.getNumber(n.style.height,2)/100*this.util.getNumber(n.style.width,2),2)+"%":n.style.height):(a.style.minWidth="",n.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:t.style.width||"100%",n.style.paddingBottom=n.style.height),this.util.hasClass(a,"__se__float-"+e)||(this.util.removeClass(a,r._floatClassRegExp),this.util.addClass(a,"__se__float-"+e)),t.setAttribute("data-align",e)},init:function(){const e=this.context.video;e.videoInputFile&&(e.videoInputFile.value=""),e.videoUrlFile&&(e._linkValue=e.preview.textContent=e.videoUrlFile.value=""),e.videoInputFile&&e.videoUrlFile&&(e.videoUrlFile.removeAttribute("disabled"),e.preview.style.textDecoration=""),e._origin_w=this.options.videoWidth,e._origin_h=this.options.videoHeight,e.modal.querySelector('input[name="suneditor_video_radio"][value="none"]').checked=!0,e._resizing&&(e.inputX.value=this.options.videoWidth===e._defaultSizeX?"":this.options.videoWidth,e.inputY.value=this.options.videoHeight===e._defaultSizeY?"":this.options.videoHeight,e.proportion.checked=!0,e.proportion.disabled=!0,this.plugins.video.setVideoRatioSelect.call(this,e._defaultRatio))}},VP={name:"audio",display:"dialog",add:function(e){e.addModule([uh,a5,r5]);const t=e.context,n=t.audio={_infoList:[],_infoIndex:0,_uploadFileLength:0,focusElement:null,targetSelect:null,_origin_w:e.options.audioWidth,_origin_h:e.options.audioHeight,_linkValue:"",_element:null,_cover:null,_container:null};let a=this.setDialog(e);n.modal=a,n.audioInputFile=a.querySelector("._se_audio_files"),n.audioUrlFile=a.querySelector(".se-input-url"),n.focusElement=n.audioInputFile||n.audioUrlFile,n.preview=a.querySelector(".se-link-preview");let r=this.setController(e);n.controller=r,a.querySelector("form").addEventListener("submit",this.submit.bind(e)),n.audioInputFile&&a.querySelector(".se-dialog-files-edge-button").addEventListener("click",this._removeSelectedFiles.bind(n.audioInputFile,n.audioUrlFile,n.preview)),n.audioInputFile&&n.audioUrlFile&&n.audioInputFile.addEventListener("change",this._fileInputChange.bind(n)),r.addEventListener("click",this.onClick_controller.bind(e)),n.audioUrlFile&&n.audioUrlFile.addEventListener("input",this._onLinkPreview.bind(n.preview,n,e.options.linkProtocol)),t.dialog.modal.appendChild(a),t.element.relative.appendChild(r),a=null,r=null},setDialog:function(e){const t=e.options,n=e.lang,a=e.util.createElement("DIV");a.className="se-dialog-content",a.style.display="none";let r='<form method="post" enctype="multipart/form-data"><div class="se-dialog-header"><button type="button" data-command="close" class="se-btn se-dialog-close" title="'+n.dialogBox.close+'" aria-label="'+n.dialogBox.close+'">'+e.icons.cancel+'</button><span class="se-modal-title">'+n.dialogBox.audioBox.title+'</span></div><div class="se-dialog-body">';return t.audioFileInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.audioBox.file+'</label><div class="se-dialog-form-files"><input class="se-input-form _se_audio_files" type="file" accept="'+t.audioAccept+'"'+(t.audioMultipleFile?' multiple="multiple"':"")+'/><button type="button" data-command="filesRemove" class="se-btn se-dialog-files-edge-button se-file-remove" title="'+n.controller.remove+'" aria-label="'+n.controller.remove+'">'+e.icons.cancel+"</button></div></div>"),t.audioUrlInput&&(r+='<div class="se-dialog-form"><label>'+n.dialogBox.audioBox.url+'</label><input class="se-input-form se-input-url" type="text" /><pre class="se-link-preview"></pre></div>'),r+='</div><div class="se-dialog-footer"><button type="submit" class="se-btn-primary" title="'+n.dialogBox.submitButton+'" aria-label="'+n.dialogBox.submitButton+'"><span>'+n.dialogBox.submitButton+"</span></button></div></form>",a.innerHTML=r,a},setController:function(e){const t=e.lang,n=e.icons,a=e.util.createElement("DIV");return a.className="se-controller se-controller-link",a.innerHTML='<div class="se-arrow se-arrow-up"></div><div class="link-content"><div class="se-btn-group"><button type="button" data-command="update" tabindex="-1" class="se-tooltip">'+n.edit+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.edit+'</span></span></button><button type="button" data-command="delete" tabindex="-1" class="se-tooltip">'+n.delete+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.remove+"</span></span></button></div></div>",a},_fileInputChange:function(){this.audioInputFile.value?(this.audioUrlFile.setAttribute("disabled",!0),this.preview.style.textDecoration="line-through"):(this.audioUrlFile.removeAttribute("disabled"),this.preview.style.textDecoration="")},_removeSelectedFiles:function(e,t){this.value="",e&&(e.removeAttribute("disabled"),t.style.textDecoration="")},_createAudioTag:function(){const e=this.util.createElement("AUDIO");this.plugins.audio._setTagAttrs.call(this,e);const t=this.context.audio._origin_w,n=this.context.audio._origin_h;return e.setAttribute("origin-size",t+","+n),e.style.cssText=(t?"width:"+t+"; ":"")+(n?"height:"+n+";":""),e},_setTagAttrs:function(e){e.setAttribute("controls",!0);const t=this.options.audioTagAttrs;if(!!t)for(let n in t)!this.util.hasOwn(t,n)||e.setAttribute(n,t[n])},_onLinkPreview:function(e,t,n){const a=n.target.value.trim();e._linkValue=this.textContent=a?t&&a.indexOf("://")===-1&&a.indexOf("#")!==0?t+a:a.indexOf("://")===-1?"/"+a:a:""},fileTags:["audio"],select:function(e){this.plugins.audio.onModifyMode.call(this,e)},destroy:function(e){e=e||this.context.audio._element;const t=this.util.getParentElement(e,this.util.isComponent)||e,n=e.getAttribute("data-index")*1;if(typeof this.functions.onAudioDeleteBefore=="function"&&this.functions.onAudioDeleteBefore(e,t,n,this)===!1)return;const a=t.previousElementSibling||t.nextElementSibling,r=t.parentNode;this.util.removeItem(t),this.plugins.audio.init.call(this),this.controllersOff(),r!==this.context.element.wysiwyg&&this.util.removeItemAllParents(r,function(i){return i.childNodes.length===0},null),this.focusEdge(a),this.plugins.fileManager.deleteInfo.call(this,"audio",n,this.functions.onAudioUpload),this.history.push(!1)},checkFileInfo:function(){this.plugins.fileManager.checkInfo.call(this,"audio",["audio"],this.functions.onAudioUpload,this.plugins.audio.updateCover.bind(this),!1)},resetFileInfo:function(){this.plugins.fileManager.resetInfo.call(this,"audio",this.functions.onAudioUpload)},on:function(e){const t=this.context.audio;e?t._element?(this.context.dialog.updateModal=!0,t._linkValue=t.preview.textContent=t.audioUrlFile.value=t._element.src,t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.removeAttribute("multiple")):t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.removeAttribute("multiple"):(this.plugins.audio.init.call(this),t.audioInputFile&&this.options.audioMultipleFile&&t.audioInputFile.setAttribute("multiple","multiple"))},open:function(){this.plugins.dialog.open.call(this,"audio",this.currentControllerName==="audio")},submit:function(e){const t=this.context.audio;e.preventDefault(),e.stopPropagation();try{t.audioInputFile&&t.audioInputFile.files.length>0?(this.showLoading(),this.plugins.audio.submitAction.call(this,t.audioInputFile.files)):t.audioUrlFile&&t._linkValue.length>0&&(this.showLoading(),this.plugins.audio.setupUrl.call(this,t._linkValue))}catch(n){throw this.closeLoading(),Error('[SUNEDITOR.audio.submit.fail] cause : "'+n.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},submitAction:function(e){if(e.length===0)return;let t=0,n=[];for(let o=0,c=e.length;o<c;o++)/audio/i.test(e[o].type)&&(n.push(e[o]),t+=e[o].size);const a=this.options.audioUploadSizeLimit;if(a>0){let o=0;const c=this.context.audio._infoList;for(let l=0,d=c.length;l<d;l++)o+=c[l].size*1;if(t+o>a){this.closeLoading();const l="[SUNEDITOR.audioUpload.fail] Size of uploadable total audios: "+a/1e3+"KB";(typeof this.functions.onAudioUploadError!="function"||this.functions.onAudioUploadError(l,{limitSize:a,currentSize:o,uploadSize:t},this))&&this.functions.noticeOpen(l);return}}const r=this.context.audio;r._uploadFileLength=n.length;const i={isUpdate:this.context.dialog.updateModal,element:r._element};if(typeof this.functions.onAudioUploadBefore=="function"){const o=this.functions.onAudioUploadBefore(n,i,this,function(c){c&&this._w.Array.isArray(c.result)?this.plugins.audio.register.call(this,i,c):this.plugins.audio.upload.call(this,i,c)}.bind(this));if(typeof o=="undefined")return;if(!o){this.closeLoading();return}typeof o=="object"&&o.length>0&&(n=o)}this.plugins.audio.upload.call(this,i,n)},error:function(e,t){if(this.closeLoading(),typeof this.functions.onAudioUploadError!="function"||this.functions.onAudioUploadError(e,t,this))throw this.functions.noticeOpen(e),Error("[SUNEDITOR.plugin.audio.exception] response: "+e)},upload:function(e,t){if(!t){this.closeLoading();return}if(typeof t=="string"){this.plugins.audio.error.call(this,t,null);return}const n=this.options.audioUploadUrl,a=this.context.dialog.updateModal?1:t.length,r=new FormData;for(let i=0;i<a;i++)r.append("file-"+i,t[i]);this.plugins.fileManager.upload.call(this,n,this.options.audioUploadHeader,r,this.plugins.audio.callBack_upload.bind(this,e),this.functions.onAudioUploadError)},callBack_upload:function(e,t){if(typeof this.functions.audioUploadHandler=="function")this.functions.audioUploadHandler(t,e,this);else{const n=JSON.parse(t.responseText);n.errorMessage?this.plugins.audio.error.call(this,n.errorMessage,n):this.plugins.audio.register.call(this,e,n)}},register:function(e,t){const n=t.result;for(let a=0,r=n.length,i,o;a<r;a++)e.isUpdate?o=e.element:o=this.plugins.audio._createAudioTag.call(this),i={name:n[a].name,size:n[a].size},this.plugins.audio.create_audio.call(this,o,n[a].url,i,e.isUpdate);this.closeLoading()},setupUrl:function(e){try{if(e.length===0)return!1;this.plugins.audio.create_audio.call(this,this.plugins.audio._createAudioTag.call(this),e,null,this.context.dialog.updateModal)}catch(t){throw Error('[SUNEDITOR.audio.audio.fail] cause : "'+t.message+'"')}finally{this.closeLoading()}},create_audio:function(e,t,n,a){const r=this.context.audio;if(a)if(r._element&&(e=r._element),e&&e.src!==t)e.src=t,this.selectComponent(e,"audio");else{this.selectComponent(e,"audio");return}else{e.src=t;const i=this.plugins.component.set_cover.call(this,e),o=this.plugins.component.set_container.call(this,i,"");if(!this.insertComponent(o,!1,!0,!this.options.mediaAutoSelect)){this.focus();return}if(!this.options.mediaAutoSelect){const c=this.appendFormatTag(o,null);c&&this.setRange(c,0,c,0)}}this.plugins.fileManager.setInfo.call(this,"audio",e,this.functions.onAudioUpload,n,!1),a&&this.history.push(!1)},updateCover:function(e){const t=this.context.audio;this.plugins.audio._setTagAttrs.call(this,e);let n=this.util.isRangeFormatElement(e.parentNode)||this.util.isWysiwygDiv(e.parentNode)?e:this.util.getFormatElement(e)||e;const a=e;t._element=e=e.cloneNode(!1);const r=this.plugins.component.set_cover.call(this,e),i=this.plugins.component.set_container.call(this,r,"se-audio-container");try{if(this.util.getParentElement(a,this.util.isNotCheckingNode))a.parentNode.replaceChild(i,a);else if(this.util.isListCell(n)){const o=this.util.getParentElement(a,function(c){return c.parentNode===n});n.insertBefore(i,o),this.util.removeItem(a),this.util.removeEmptyNode(o,null,!0)}else if(this.util.isFormatElement(n)){const o=this.util.getParentElement(a,function(c){return c.parentNode===n});n=this.util.splitElement(n,o),n.parentNode.insertBefore(i,n),this.util.removeItem(a),this.util.removeEmptyNode(n,null,!0),n.children.length===0&&(n.innerHTML=this.util.htmlRemoveWhiteSpace(n.innerHTML))}else n.parentNode.replaceChild(i,n)}catch(o){console.warn("[SUNEDITOR.audio.error] Maybe the audio tag is nested.",o)}this.plugins.fileManager.setInfo.call(this,"audio",e,this.functions.onAudioUpload,null,!1),this.plugins.audio.init.call(this)},onModifyMode:function(e){const t=this.context.audio;this.setControllerPosition(t.controller,e,"bottom",{left:0,top:0}),this.controllersOn(t.controller,e,this.plugins.audio.onControllerOff.bind(this,e),"audio"),this.util.addClass(e,"active"),t._element=e,t._cover=this.util.getParentElement(e,"FIGURE"),t._container=this.util.getParentElement(e,this.util.isComponent)},openModify:function(e){if(this.context.audio.audioUrlFile){const t=this.context.audio;t._linkValue=t.preview.textContent=t.audioUrlFile.value=t._element.src}e||this.plugins.dialog.open.call(this,"audio",!0)},onClick_controller:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command");!t||(e.preventDefault(),/update/.test(t)?this.plugins.audio.openModify.call(this,!1):this.plugins.audio.destroy.call(this,this.context.audio._element),this.controllersOff())},onControllerOff:function(e){this.util.removeClass(e,"active"),this.context.audio.controller.style.display="none"},init:function(){if(this.context.dialog.updateModal)return;const e=this.context.audio;e.audioInputFile&&(e.audioInputFile.value=""),e.audioUrlFile&&(e._linkValue=e.preview.textContent=e.audioUrlFile.value=""),e.audioInputFile&&e.audioUrlFile&&(e.audioUrlFile.removeAttribute("disabled"),e.preview.style.textDecoration=""),e._element=null}};const q7="https://katex.org/docs/supported.html";var WP={name:"math",display:"dialog",add:function(e){e.addModule([uh]);const t=e.context;t.math={focusElement:null,previewElement:null,fontSizeElement:null,defaultFontSize:"",_mathExp:null};let n=this.setDialog(e);t.math.modal=n,t.math.focusElement=n.querySelector(".se-math-exp"),t.math.previewElement=n.querySelector(".se-math-preview"),t.math.fontSizeElement=n.querySelector(".se-math-size"),t.math.focusElement.addEventListener(e.util.isIE?"textinput":"input",this._renderMathExp.bind(e,t.math),!1),t.math.fontSizeElement.addEventListener("change",function(r){this.fontSize=r.target.value}.bind(t.math.previewElement.style),!1);let a=this.setController_MathButton(e);t.math.mathController=a,t.math._mathExp=null,n.querySelector("form").addEventListener("submit",this.submit.bind(e),!1),a.addEventListener("click",this.onClick_mathController.bind(e)),t.math.previewElement.style.fontSize=t.math.defaultFontSize,t.dialog.modal.appendChild(n),t.element.relative.appendChild(a),n=null,a=null},setDialog:function(e){const t=e.lang,n=e.util.createElement("DIV"),a=e.options.mathFontSize;let r=a[0].value;n.className="se-dialog-content",n.style.display="none";let i='<form><div class="se-dialog-header"><button type="button" data-command="close" class="se-btn se-dialog-close" title="'+t.dialogBox.close+'" aria-label="'+t.dialogBox.close+'">'+e.icons.cancel+'</button><span class="se-modal-title">'+t.dialogBox.mathBox.title+'</span></div><div class="se-dialog-body"><div class="se-dialog-form"><label>'+t.dialogBox.mathBox.inputLabel+' (<a href="'+q7+'" target="_blank">KaTeX</a>)</label><textarea class="se-input-form se-math-exp" type="text"></textarea></div><div class="se-dialog-form"><label>'+t.dialogBox.mathBox.fontSizeLabel+'</label><select class="se-input-select se-math-size">';for(let o=0,c=a.length,l;o<c;o++)l=a[o],l.default&&(r=l.value),i+='<option value="'+l.value+'"'+(l.default?" selected":"")+">"+l.text+"</option>";return i+='</select></div><div class="se-dialog-form"><label>'+t.dialogBox.mathBox.previewLabel+'</label><p class="se-math-preview"></p></div></div><div class="se-dialog-footer"><button type="submit" class="se-btn-primary" title="'+t.dialogBox.submitButton+'" aria-label="'+t.dialogBox.submitButton+'"><span>'+t.dialogBox.submitButton+"</span></button></div></form>",e.context.math.defaultFontSize=r,n.innerHTML=i,n},setController_MathButton:function(e){const t=e.lang,n=e.util.createElement("DIV");return n.className="se-controller se-controller-link",n.innerHTML='<div class="se-arrow se-arrow-up"></div><div class="link-content"><div class="se-btn-group"><button type="button" data-command="update" tabindex="-1" class="se-btn se-tooltip">'+e.icons.edit+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.edit+'</span></span></button><button type="button" data-command="delete" tabindex="-1" class="se-btn se-tooltip">'+e.icons.delete+'<span class="se-tooltip-inner"><span class="se-tooltip-text">'+t.controller.remove+"</span></span></button></div></div>",n},open:function(){this.plugins.dialog.open.call(this,"math",this.currentControllerName==="math")},managedTags:function(){return{className:"katex",method:function(e){if(!e.getAttribute("data-exp")||!this.options.katex)return;const t=this._d.createRange().createContextualFragment(this.plugins.math._renderer.call(this,this.util.HTMLDecoder(e.getAttribute("data-exp"))));e.innerHTML=t.querySelector(".katex").innerHTML,e.setAttribute("contenteditable",!1)}}},_renderer:function(e){let t="";try{this.util.removeClass(this.context.math.focusElement,"se-error"),t=this.options.katex.src.renderToString(e,{throwOnError:!0,displayMode:!0})}catch(n){this.util.addClass(this.context.math.focusElement,"se-error"),t='<span class="se-math-katex-error">Katex syntax error. (Refer <a href="'+q7+'" target="_blank">KaTeX</a>)</span>',console.warn("[SUNEDITOR.math.Katex.error] ",n)}return t},_renderMathExp:function(e,t){e.previewElement.innerHTML=this.plugins.math._renderer.call(this,t.target.value)},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();const t=function(){if(this.context.math.focusElement.value.trim().length===0)return!1;const n=this.context.math,a=n.focusElement.value,r=n.previewElement.querySelector(".katex");if(!r)return!1;if(r.className="__se__katex "+r.className,r.setAttribute("contenteditable",!1),r.setAttribute("data-exp",this.util.HTMLEncoder(a)),r.setAttribute("data-font-size",n.fontSizeElement.value),r.style.fontSize=n.fontSizeElement.value,this.context.dialog.updateModal){const i=this.util.getParentElement(n._mathExp,".katex");i.parentNode.replaceChild(r,i),this.setRange(r,0,r,1)}else{const i=this.getSelectedElements();if(i.length>1){const c=this.util.createElement(i[0].nodeName);if(c.appendChild(r),!this.insertNode(c,null,!0))return!1}else if(!this.insertNode(r,null,!0))return!1;const o=this.util.createTextNode(this.util.zeroWidthSpace);r.parentNode.insertBefore(o,r.nextSibling),this.setRange(r,0,r,1)}return n.focusElement.value="",n.fontSizeElement.value="1em",n.previewElement.style.fontSize="1em",n.previewElement.innerHTML="",!0}.bind(this);try{t()&&(this.plugins.dialog.close.call(this),this.history.push(!1))}catch{this.plugins.dialog.close.call(this)}finally{this.closeLoading()}return!1},active:function(e){if(!e)this.controllerArray.indexOf(this.context.math.mathController)>-1&&this.controllersOff();else if(e.getAttribute("data-exp"))return this.controllerArray.indexOf(this.context.math.mathController)<0&&(this.setRange(e,0,e,1),this.plugins.math.call_controller.call(this,e)),!0;return!1},on:function(e){if(!e)this.plugins.math.init.call(this);else{const t=this.context.math;if(t._mathExp){const n=this.util.HTMLDecoder(t._mathExp.getAttribute("data-exp")),a=t._mathExp.getAttribute("data-font-size")||"1em";this.context.dialog.updateModal=!0,t.focusElement.value=n,t.fontSizeElement.value=a,t.previewElement.innerHTML=this.plugins.math._renderer.call(this,n),t.previewElement.style.fontSize=a}}},call_controller:function(e){this.context.math._mathExp=e;const t=this.context.math.mathController;this.setControllerPosition(t,e,"bottom",{left:0,top:0}),this.controllersOn(t,e,"math")},onClick_mathController:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");!t||(e.preventDefault(),/update/.test(t)?(this.context.math.focusElement.value=this.util.HTMLDecoder(this.context.math._mathExp.getAttribute("data-exp")),this.plugins.dialog.open.call(this,"math",!0)):(this.util.removeItem(this.context.math._mathExp),this.context.math._mathExp=null,this.focus(),this.history.push(!1)),this.controllersOff())},init:function(){const e=this.context.math;e.mathController.style.display="none",e._mathExp=null,e.focusElement.value="",e.previewElement.innerHTML=""}},YP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_MODULES a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={name:"fileBrowser",_xmlHttp:null,_loading:null,add:function(r){const i=r.context;i.fileBrowser={_closeSignal:!1,area:null,header:null,tagArea:null,body:null,list:null,tagElements:null,items:[],selectedTags:[],selectorHandler:null,contextPlugin:"",columnSize:4};let o=r.util.createElement("DIV");o.className="se-file-browser sun-editor-common";let c=r.util.createElement("DIV");c.className="se-file-browser-back";let l=r.util.createElement("DIV");l.className="se-file-browser-inner",l.innerHTML=this.set_browser(r),o.appendChild(c),o.appendChild(l),this._loading=o.querySelector(".se-loading-box"),i.fileBrowser.area=o,i.fileBrowser.header=l.querySelector(".se-file-browser-header"),i.fileBrowser.titleArea=l.querySelector(".se-file-browser-title"),i.fileBrowser.tagArea=l.querySelector(".se-file-browser-tags"),i.fileBrowser.body=l.querySelector(".se-file-browser-body"),i.fileBrowser.list=l.querySelector(".se-file-browser-list"),i.fileBrowser.tagArea.addEventListener("click",this.onClickTag.bind(r)),i.fileBrowser.list.addEventListener("click",this.onClickFile.bind(r)),l.addEventListener("mousedown",this._onMouseDown_browser.bind(r)),l.addEventListener("click",this._onClick_browser.bind(r)),i.element.relative.appendChild(o),o=null,c=null,l=null},set_browser:function(r){const i=r.lang;return'<div class="se-file-browser-content"><div class="se-file-browser-header"><button type="button" data-command="close" class="se-btn se-file-browser-close" class="close" title="'+i.dialogBox.close+'" aria-label="'+i.dialogBox.close+'">'+r.icons.cancel+'</button><span class="se-file-browser-title"></span><div class="se-file-browser-tags"></div></div><div class="se-file-browser-body"><div class="se-loading-box sun-editor-common"><div class="se-loading-effect"></div></div><div class="se-file-browser-list"></div></div></div>'},_onMouseDown_browser:function(r){/se-file-browser-inner/.test(r.target.className)?this.context.fileBrowser._closeSignal=!0:this.context.fileBrowser._closeSignal=!1},_onClick_browser:function(r){r.stopPropagation(),(/close/.test(r.target.getAttribute("data-command"))||this.context.fileBrowser._closeSignal)&&this.plugins.fileBrowser.close.call(this)},open:function(r,i){this.plugins.fileBrowser._bindClose&&(this._d.removeEventListener("keydown",this.plugins.fileBrowser._bindClose),this.plugins.fileBrowser._bindClose=null),this.plugins.fileBrowser._bindClose=function(d){!/27/.test(d.keyCode)||this.plugins.fileBrowser.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.fileBrowser._bindClose);const o=this.context.fileBrowser;o.contextPlugin=r,o.selectorHandler=i;const c=this.context[r],l=c.listClass;this.util.hasClass(o.list,l)||(o.list.className="se-file-browser-list "+l),this.options.popupDisplay==="full"?o.area.style.position="fixed":o.area.style.position="absolute",o.titleArea.textContent=c.title,o.area.style.display="block",this.plugins.fileBrowser._drawFileList.call(this,this.context[r].url,this.context[r].header)},_bindClose:null,close:function(){const r=this.plugins.fileBrowser;r._xmlHttp&&r._xmlHttp.abort(),r._bindClose&&(this._d.removeEventListener("keydown",r._bindClose),r._bindClose=null);const i=this.context.fileBrowser;i.area.style.display="none",i.selectorHandler=null,i.selectedTags=[],i.items=[],i.list.innerHTML=i.tagArea.innerHTML=i.titleArea.textContent="",typeof this.plugins[i.contextPlugin].init=="function"&&this.plugins[i.contextPlugin].init.call(this),i.contextPlugin=""},showBrowserLoading:function(){this._loading.style.display="block"},closeBrowserLoading:function(){this._loading.style.display="none"},_drawFileList:function(r,i){const o=this.plugins.fileBrowser,c=o._xmlHttp=this.util.getXMLHttpRequest();if(c.onreadystatechange=o._callBackGet.bind(this,c),c.open("get",r,!0),i!==null&&typeof i=="object"&&this._w.Object.keys(i).length>0)for(let l in i)c.setRequestHeader(l,i[l]);c.send(null),this.plugins.fileBrowser.showBrowserLoading()},_callBackGet:function(r){if(r.readyState===4){if(this.plugins.fileBrowser._xmlHttp=null,r.status===200)try{const i=JSON.parse(r.responseText);i.result.length>0?this.plugins.fileBrowser._drawListItem.call(this,i.result,!0):i.nullMessage&&(this.context.fileBrowser.list.innerHTML=i.nullMessage)}catch(i){throw Error('[SUNEDITOR.fileBrowser.drawList.fail] cause : "'+i.message+'"')}finally{this.plugins.fileBrowser.closeBrowserLoading(),this.context.fileBrowser.body.style.maxHeight=this._w.innerHeight-this.context.fileBrowser.header.offsetHeight-50+"px"}else if(this.plugins.fileBrowser.closeBrowserLoading(),r.status!==0){const i=r.responseText?JSON.parse(r.responseText):r,o="[SUNEDITOR.fileBrowser.get.serverException] status: "+r.status+", response: "+(i.errorMessage||r.responseText);throw Error(o)}}},_drawListItem:function(r,i){const o=this.context.fileBrowser,c=this.context[o.contextPlugin],l=[],d=r.length,u=c.columnSize||o.columnSize,g=u<=1?1:Math.round(d/u)||1,y=c.itemTemplateHandler;let w="",v='<div class="se-file-item-column">',S=1;for(let m=0,p,b;m<d;m++)if(p=r[m],b=p.tag?typeof p.tag=="string"?p.tag.split(","):p.tag:[],b=p.tag=b.map(function(x){return x.trim()}),v+=y(p),(m+1)%g===0&&S<u&&m+1<d&&(S++,v+='</div><div class="se-file-item-column">'),i&&b.length>0)for(let x=0,k=b.length,N;x<k;x++)N=b[x],N&&l.indexOf(N)===-1&&(l.push(N),w+='<a title="'+N+'" aria-label="'+N+'">'+N+"</a>");v+="</div>",o.list.innerHTML=v,i&&(o.items=r,o.tagArea.innerHTML=w,o.tagElements=o.tagArea.querySelectorAll("A"))},onClickTag:function(r){const i=r.target;if(!this.util.isAnchor(i))return;const o=i.textContent,c=this.plugins.fileBrowser,l=this.context.fileBrowser,d=l.tagArea.querySelector('a[title="'+o+'"]'),u=l.selectedTags,g=u.indexOf(o);g>-1?(u.splice(g,1),this.util.removeClass(d,"on")):(u.push(o),this.util.addClass(d,"on")),c._drawListItem.call(this,u.length===0?l.items:l.items.filter(function(y){return y.tag.some(function(w){return u.indexOf(w)>-1})}),!1)},onClickFile:function(r){r.preventDefault(),r.stopPropagation();const i=this.context.fileBrowser,o=i.list;let c=r.target,l=null;if(c===o)return;for(;o!==c.parentNode&&(l=c.getAttribute("data-command"),!l);)c=c.parentNode;if(!l)return;(i.selectorHandler||this.context[i.contextPlugin].selectorHandler)(c,c.parentNode.querySelector(".__se__img_name").textContent),this.plugins.fileBrowser.close.call(this)}};return typeof n=="undefined"&&(t.SUNEDITOR_MODULES||Object.defineProperty(t,"SUNEDITOR_MODULES",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_MODULES,"fileBrowser",{enumerable:!0,writable:!1,configurable:!1,value:a})),a})})(YP);var Kxe=YP.exports,GP={name:"imageGallery",add:function(e){e.addModule([Kxe]);const t=e.context;t.imageGallery={title:e.lang.toolbar.imageGallery,url:e.options.imageGalleryUrl,header:e.options.imageGalleryHeader,listClass:"se-image-list",itemTemplateHandler:this.drawItems,selectorHandler:this.setImage.bind(e),columnSize:4}},open:function(e){this.plugins.fileBrowser.open.call(this,"imageGallery",e)},drawItems:function(e){const t=e.src.split("/").pop();return'<div class="se-file-item-img"><img src="'+(e.thumbnail||e.src)+'" alt="'+(e.alt||t)+'" data-command="pick" data-value="'+(e.src||e.thumbnail)+'"><div class="se-file-img-name se-file-name-back"></div><div class="se-file-img-name __se__img_name">'+(e.name||t)+"</div></div>"},setImage:function(e,t){this.callPlugin("image",function(){const n={name:t,size:0};this.plugins.image.create_image.call(this,e.getAttribute("data-value"),null,this.context.image._origin_w,this.context.image._origin_h,"none",n,e.alt)}.bind(this),null)}},Xxe={blockquote:wP,align:vP,font:_P,fontSize:NP,fontColor:kP,hiliteColor:CP,horizontalRule:EP,list:TP,table:LP,formatBlock:DP,lineHeight:MP,template:AP,paragraphStyle:IP,textStyle:OP,link:jP,image:HP,video:UP,audio:VP,math:WP,imageGallery:GP},e2e=Object.freeze(Object.defineProperty({__proto__:null,blockquote:wP,align:vP,font:_P,fontSize:NP,fontColor:kP,hiliteColor:CP,horizontalRule:EP,list:TP,table:LP,formatBlock:DP,lineHeight:MP,template:AP,paragraphStyle:IP,textStyle:OP,link:jP,image:HP,video:UP,audio:VP,math:WP,imageGallery:GP,default:Xxe},Symbol.toStringTag,{value:"Module"})),t2e=M_(e2e),Z7={rtl:{italic:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.5 15.8" xml:space="preserve"><g><path d="M0.3,0.1c0.3,0,0.5,0,0.7,0c1,0.1,1.7,0.1,2.2,0.1H4L7.2,0l0.2,1.1H7c-0.5,0-1,0.1-1.5,0.3v0.4l0.3,1.9L6,4.4L6.3,6 l0.1,0.4l0.1,0.5c0.1,0.2,0.1,0.4,0.2,0.7s0.1,0.6,0.2,0.9L7,9.1l0.6,2.8l0.3,1.4c0.1,0.4,0.2,0.7,0.4,1c0.4,0.2,0.8,0.3,1.2,0.4 l0.8,0.2l0.2,0.9l-1.1,0c-0.9-0.1-1.5-0.1-1.8-0.1h-2c-0.9,0.1-1.4,0.2-1.5,0.2c-0.1,0-0.2,0-0.3,0H3.4c-0.1,0-0.2,0-0.2,0 l-0.1-0.4c0-0.2-0.1-0.4-0.1-0.6l0.7-0.1c0.4,0,0.8-0.1,1.2-0.2c0-0.1,0-0.2,0-0.3l-0.1-0.5l-0.4-2.4L4,9.6L3.4,6.4 C3.2,5.7,3,4.7,2.7,3.3c0-0.3-0.1-0.5-0.1-0.8C2.5,2.1,2.4,1.9,2.3,1.6C2,1.4,1.6,1.3,1.3,1.2C0.9,1.2,0.5,1.1,0.2,0.9L0,0.4L0,0 L0.3,0.1L0.3,0.1z"/></g></svg>',indent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 12.4" xml:space="preserve"><g><g><path d="M15.5,10.1L15.5,10.1c0.1,0,0.3,0.1,0.3,0.3v1.7c0,0.1,0,0.1-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1l-15.2,0 c-0.1,0-0.1,0-0.2-0.1C0,12.2,0,12.2,0,12.1l0-1.7c0-0.1,0-0.1,0.1-0.2c0.1-0.1,0.1-0.1,0.2-0.1C0.3,10.1,15.5,10.1,15.5,10.1z M9.8,6.7c0.1,0,0.1,0,0.2,0.1C10.1,6.9,10.1,7,10.1,7v1.7c0,0.1,0,0.2-0.1,0.2C10,9,9.9,9,9.8,9L0.3,9C0.2,9,0.1,9,0.1,8.9 C0,8.9,0,8.8,0,8.7V7C0,7,0,6.9,0.1,6.8c0.1-0.1,0.1-0.1,0.2-0.1C0.3,6.7,9.8,6.7,9.8,6.7z M0.3,3.4h9.6h0c0.1,0,0.3,0.1,0.3,0.3 v1.7v0c0,0.1-0.1,0.3-0.3,0.3H0.3c-0.1,0-0.1,0-0.2-0.1C0,5.5,0,5.4,0,5.3V3.6c0-0.1,0-0.1,0.1-0.2C0.1,3.4,0.2,3.4,0.3,3.4 L0.3,3.4z M0.3,0l15.2,0c0.1,0,0.1,0,0.2,0.1c0.1,0.1,0.1,0.1,0.1,0.2V2c0,0.1,0,0.2-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1H0.3 c-0.1,0-0.1,0-0.2-0.1C0,2.1,0,2,0,2l0-1.7c0-0.1,0-0.1,0.1-0.2C0.1,0,0.2,0,0.3,0z"/></g><path d="M13.1,3.5L15.7,6c0.1,0.1,0.1,0.3,0,0.4l-2.5,2.5C13.1,9,13,9,12.9,9c-0.1,0-0.1,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2V3.7 c0-0.1,0-0.2,0.1-0.2c0.1-0.1,0.1-0.1,0.2-0.1C13,3.4,13.1,3.4,13.1,3.5z"/></g></svg>',outdent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 12.4" xml:space="preserve"><g><g><path d="M15.5,10.1L15.5,10.1c0.1,0,0.3,0.1,0.3,0.3v1.7c0,0.1,0,0.1-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1l-15.2,0 c-0.1,0-0.1,0-0.2-0.1C0,12.2,0,12.2,0,12.1l0-1.7c0-0.1,0-0.1,0.1-0.2c0.1-0.1,0.1-0.1,0.2-0.1C0.3,10.1,15.5,10.1,15.5,10.1z M9.8,6.7c0.1,0,0.1,0,0.2,0.1C10.1,6.9,10.1,7,10.1,7v1.7c0,0.1,0,0.2-0.1,0.2C10,9,9.9,9,9.8,9L0.3,9C0.2,9,0.1,9,0.1,8.9 C0,8.9,0,8.8,0,8.7V7C0,7,0,6.9,0.1,6.8c0.1-0.1,0.1-0.1,0.2-0.1C0.3,6.7,9.8,6.7,9.8,6.7z M0.3,3.4h9.6h0c0.1,0,0.3,0.1,0.3,0.3 v1.7v0c0,0.1-0.1,0.3-0.3,0.3H0.3c-0.1,0-0.1,0-0.2-0.1C0,5.5,0,5.4,0,5.3V3.6c0-0.1,0-0.1,0.1-0.2C0.1,3.4,0.2,3.4,0.3,3.4 L0.3,3.4z M0.3,0l15.2,0c0.1,0,0.1,0,0.2,0.1c0.1,0.1,0.1,0.1,0.1,0.2V2c0,0.1,0,0.2-0.1,0.2c-0.1,0.1-0.1,0.1-0.2,0.1H0.3 c-0.1,0-0.1,0-0.2-0.1C0,2.1,0,2,0,2l0-1.7c0-0.1,0-0.1,0.1-0.2C0.1,0,0.2,0,0.3,0z"/></g><path d="M15.5,3.4c0.1,0,0.1,0,0.2,0.1c0.1,0.1,0.1,0.1,0.1,0.2v5.1c0,0.1,0,0.1-0.1,0.2C15.6,9,15.5,9,15.5,9 c-0.1,0-0.1,0-0.2-0.1l-2.5-2.5c-0.1-0.1-0.1-0.3,0-0.4l2.5-2.5C15.3,3.4,15.4,3.4,15.5,3.4z"/></g></svg>',list_bullets:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 12.4" xml:space="preserve"><g><path d="M12.4,10.7c0,0.9,0.8,1.7,1.7,1.7c0.9,0,1.7-0.8,1.7-1.7C15.7,9.8,15,9,14.1,9c-0.4,0-0.9,0.2-1.2,0.5 C12.5,9.8,12.4,10.2,12.4,10.7C12.4,10.7,12.4,10.7,12.4,10.7z M12.4,6.2c0,0.9,0.8,1.7,1.7,1.7c0.4,0,0.9-0.2,1.2-0.5 c0.3-0.3,0.4-0.7,0.4-1.1c0-0.9-0.7-1.7-1.6-1.7C13.1,4.6,12.4,5.3,12.4,6.2C12.4,6.2,12.4,6.2,12.4,6.2z M0,9.8v1.7 c0,0.1,0,0.1,0.1,0.2c0.1,0.1,0.1,0.1,0.2,0.1l10.7,0c0,0,0,0,0,0c0.1,0,0.3-0.1,0.3-0.3V9.8c0-0.1,0-0.1-0.1-0.2 C11.1,9.6,11,9.6,11,9.6l-10.7,0c-0.1,0-0.1,0-0.2,0.1C0,9.7,0,9.8,0,9.8L0,9.8z M12.9,2.9c0.3,0.3,0.7,0.5,1.2,0.5 c0.4,0,0.9-0.2,1.2-0.5c0.7-0.7,0.7-1.7,0-2.4C14.9,0.2,14.5,0,14.1,0c-0.4,0-0.9,0.2-1.2,0.5c-0.3,0.3-0.5,0.7-0.5,1.2 C12.4,2.1,12.5,2.6,12.9,2.9z M0,5.3V7c0,0.1,0,0.1,0.1,0.2c0.1,0.1,0.1,0.1,0.2,0.1H11c0.1,0,0.1,0,0.2-0.1 c0.1-0.1,0.1-0.1,0.1-0.2V5.3c0,0,0,0,0,0c0-0.1-0.1-0.3-0.3-0.3H0.3c-0.1,0-0.1,0-0.2,0.1C0,5.2,0,5.3,0,5.3L0,5.3z M0,0.8v1.7 c0,0.1,0,0.1,0.1,0.2c0.1,0.1,0.1,0.1,0.2,0.1h10.7c0.1,0,0.1,0,0.2-0.1c0,0,0.1-0.1,0.1-0.2V0.8c0-0.1,0-0.1-0.1-0.2 c0-0.1-0.1-0.1-0.2-0.1H0.3c-0.1,0-0.1,0-0.2,0.1C0,0.7,0,0.8,0,0.8L0,0.8z"/></g></svg>',list_number:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 15.7" xml:space="preserve"><g><path d="M0,11.5l0,1.7c0,0.1,0,0.1,0.1,0.2c0.1,0.1,0.1,0.1,0.2,0.1H11c0.1,0,0.2,0,0.2-0.1c0.1-0.1,0.1-0.1,0.1-0.2v-1.7 c0-0.1,0-0.1-0.1-0.2c-0.1-0.1-0.1-0.1-0.2-0.1H0.3c-0.1,0-0.2,0-0.2,0.1C0,11.4,0,11.4,0,11.5L0,11.5z M0,8.7c0,0.1,0,0.1,0.1,0.2 C0.1,8.9,0.2,9,0.3,9H11c0.1,0,0.2,0,0.2-0.1c0.1-0.1,0.1-0.1,0.1-0.2V7c0-0.1,0-0.1-0.1-0.2c-0.1-0.1-0.1-0.1-0.2-0.1l-10.7,0 c-0.1,0-0.2,0-0.2,0.1C0,6.8,0,6.9,0,7C0,7,0,8.7,0,8.7z M0,2.5v1.7c0,0.1,0,0.1,0.1,0.2c0,0,0.1,0.1,0.2,0.1l10.7,0 c0.1,0,0.2,0,0.2-0.1c0.1-0.1,0.1-0.1,0.1-0.2V2.4c0-0.1,0-0.1-0.1-0.2c-0.1,0-0.1,0-0.2,0H0.3c-0.1,0-0.1,0-0.2,0 C0,2.3,0,2.4,0,2.5L0,2.5z"/></g><path d="M15.6,14.2c0-0.3-0.1-0.6-0.3-0.8c-0.2-0.2-0.4-0.4-0.7-0.4l0.9-1v-0.8h-2.9v1.3h0.9v-0.5h0.9l0,0c-0.1,0.1-0.2,0.2-0.3,0.3 s-0.2,0.3-0.4,0.5l-0.3,0.3l0.2,0.5c0.6,0,0.9,0.1,0.9,0.5c0,0.1-0.1,0.3-0.2,0.4c-0.1,0.1-0.3,0.1-0.4,0.1c-0.3,0-0.7-0.1-0.9-0.3 l-0.5,0.8c0.4,0.4,0.9,0.6,1.5,0.6c0.4,0,0.9-0.1,1.2-0.4C15.5,15.1,15.6,14.7,15.6,14.2z"/><path d="M15.6,8.7h-0.9v0.5h-1.1c0-0.2,0.2-0.4,0.4-0.5c0.2-0.2,0.4-0.3,0.7-0.4c0.3-0.2,0.5-0.3,0.7-0.6c0.2-0.2,0.3-0.5,0.3-0.8 c0-0.4-0.2-0.8-0.5-1c-0.6-0.4-1.4-0.5-2-0.1c-0.3,0.2-0.5,0.4-0.6,0.7L13.3,7c0.1-0.3,0.4-0.5,0.7-0.5c0.1,0,0.3,0,0.3,0.1 c0.1,0.1,0.1,0.2,0.1,0.3c0,0.2-0.1,0.3-0.2,0.4c-0.2,0.1-0.3,0.3-0.5,0.4c-0.2,0.1-0.4,0.3-0.6,0.4c-0.2,0.2-0.4,0.4-0.5,0.6 c-0.1,0.2-0.2,0.5-0.2,0.8c0,0.2,0,0.3,0,0.5h3.2L15.6,8.7L15.6,8.7z"/><path d="M15.6,3.6h-1V0h-0.9l-1.2,1.1l0.6,0.7c0.2-0.1,0.3-0.3,0.4-0.5l0,0v2.2h-0.9v0.9h3L15.6,3.6L15.6,3.6z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 15.7" xml:space="preserve"><g><path d="M7.4,9.9l3.1,3.1c0.3,0.3,0.8,0.5,1.3,0.5c0.5,0,0.9-0.2,1.3-0.5c0,0,0,0,0,0c0.7-0.7,0.7-1.9,0-2.6L9.9,7.3 c0-0.1,0-0.2,0-0.3C9.9,7,10,7,10.1,7l2.2-0.2c0.1,0,0.1,0,0.2,0.1l2.1,2.1c0.4,0.4,0.7,0.8,0.9,1.3c0.2,0.5,0.3,1,0.3,1.5 c0,0.5-0.1,1-0.3,1.5c-0.8,2-3.2,3-5.2,2.2c-0.5-0.2-0.9-0.5-1.3-0.9l-2.1-2.1c-0.1,0-0.1-0.1-0.1-0.2L7,10.1C7,10,7,9.9,7.1,9.9 C7.2,9.8,7.3,9.9,7.4,9.9z M1.2,1.1C1.6,0.7,2,0.4,2.5,0.3c1-0.4,2.1-0.4,3.1,0C6,0.4,6.5,0.7,6.8,1.1L9,3.2C9,3.3,9.1,3.3,9,3.4 L8.8,5.6c0,0.1-0.1,0.2-0.2,0.2c-0.1,0.1-0.2,0.1-0.3,0L5.3,2.7C5,2.3,4.5,2.1,4,2.1c-0.5,0-0.9,0.2-1.3,0.5c0,0,0,0,0,0 C2,3.4,2,4.5,2.7,5.2l3.1,3.2c0.1,0.1,0.1,0.2,0,0.3c0,0.1-0.1,0.1-0.2,0.1L3.5,9C3.4,9,3.4,9,3.3,8.9L1.2,6.8c0,0,0,0,0,0 C-0.4,5.2-0.4,2.7,1.2,1.1L1.2,1.1z M14.3,6h-2.6c0,0,0,0,0,0c-0.1,0-0.2-0.1-0.2-0.2c0-0.1,0-0.2,0.1-0.3l2.5-0.7 c0.1,0,0.1,0,0.2,0c0.1,0,0.1,0.1,0.1,0.2l0.1,0.8c0,0.1,0,0.1-0.1,0.2C14.5,6,14.4,6,14.3,6L14.3,6z M10.2,4.1 c0,0.1-0.1,0.2-0.2,0.2l0,0c0,0,0,0,0,0C9.8,4.2,9.7,4.1,9.8,4L9.7,1.4c0-0.1,0-0.1,0.1-0.2c0.1,0,0.1,0,0.2,0h0.8 c0.1,0,0.1,0,0.2,0.1c0,0.1,0,0.1,0,0.2L10.2,4.1L10.2,4.1z M1.5,9.7h1.3h1.3c0.1,0,0.2,0.1,0.2,0.2c0,0.1,0,0.2-0.1,0.3l-2.5,0.6 H1.6c0,0-0.1,0-0.1,0c-0.1,0-0.1-0.1-0.1-0.2L1.2,9.9c0-0.1,0-0.1,0.1-0.2c0-0.1,0.1-0.1,0.2-0.1L1.5,9.7z M5.6,11.6 C5.6,11.6,5.6,11.6,5.6,11.6c0-0.1,0.1-0.2,0.3-0.1c0,0,0,0,0,0c0.1,0,0.2,0.1,0.2,0.2v2.6c0,0.1,0,0.1-0.1,0.2 c0,0-0.1,0.1-0.2,0.1L5,14.5c-0.1,0-0.1,0-0.2-0.1c0-0.1,0-0.1,0-0.2L5.6,11.6L5.6,11.6z"/></g></svg>',unlink:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 15.7" xml:space="preserve"><g><path d="M14.6,14.6c1.6-1.6,1.6-4.1,0-5.7l0,0l-3.1-3.1l-1.2,1.6l2.9,2.9c0.4,0.4,0.6,0.9,0.6,1.5c0,1.1-0.9,2.1-2.1,2.1l0,0 c-0.6,0-1.1-0.2-1.5-0.6l-0.4-0.4l-1.7,1l0.8,0.8C10.4,16.2,13,16.2,14.6,14.6L14.6,14.6L14.6,14.6z M3.6,6C3,5.9,2.6,5.5,2.3,5 S1.9,4,2.1,3.4C2.3,2.9,2.6,2.5,3,2.2C3.5,2,4.1,1.9,4.6,2l3.3,1.4l0.5-2L5.1,0.1C4-0.1,2.9,0,2,0.5C1.1,1.1,0.4,1.9,0.2,3 C-0.1,4,0,5.1,0.6,6C1.1,6.9,1.9,7.6,3,7.8l5.4,2l0.5-2L6.2,6.9L3.6,6z"/></g></svg>'},redo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M11.58,18.48a6.84,6.84,0,1,1,6.85-6.85s0,.26,0,.67a8,8,0,0,1-.22,1.44l.91-.55a.51.51,0,0,1,.36,0,.45.45,0,0,1,.29.22.47.47,0,0,1,.06.36.45.45,0,0,1-.22.29L17.42,15.3l-.12,0h-.25l-.12-.06-.09-.09-.06-.07,0-.06-.87-2.12a.43.43,0,0,1,0-.37.49.49,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26l.44,1.09a6.51,6.51,0,0,0,.24-1.36,4.58,4.58,0,0,0,0-.64,5.83,5.83,0,0,0-1.73-4.17,5.88,5.88,0,0,0-8.34,0,5.9,5.9,0,0,0,4.17,10.06.51.51,0,0,1,.33.15.48.48,0,0,1,0,.68.53.53,0,0,1-.33.12Z" transform="translate(-4.48 -4.54)"/></g></svg>',undo:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.59 14.18"><g><path d="M5,14a.43.43,0,0,1-.22-.29.46.46,0,0,1,.06-.36.43.43,0,0,1,.29-.22.56.56,0,0,1,.36,0l.91.55a8.27,8.27,0,0,1-.22-1.45,5.07,5.07,0,0,1,0-.67A6.85,6.85,0,1,1,13,18.47a.44.44,0,0,1-.33-.13.48.48,0,0,1,0-.68.51.51,0,0,1,.33-.15A5.89,5.89,0,0,0,17.15,7.45a5.88,5.88,0,0,0-8.33,0,5.84,5.84,0,0,0-1.73,4.17s0,.25,0,.65a6.49,6.49,0,0,0,.24,1.37l.44-1.09a.57.57,0,0,1,.27-.26.41.41,0,0,1,.36,0,.53.53,0,0,1,.27.26.43.43,0,0,1,0,.37L7.82,15l0,.09-.09.09-.1.07-.06,0H7.28l-.13,0-1.09-.63c-.65-.36-1-.57-1.1-.63Z" transform="translate(-4.49 -4.53)"/></g></svg>',bold:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.76 15.75"><g><path d="M6.4,3.76V19.5h6.76a5.55,5.55,0,0,0,2-.32,4.93,4.93,0,0,0,1.52-1,4.27,4.27,0,0,0,1.48-3.34,3.87,3.87,0,0,0-.69-2.37,5.74,5.74,0,0,0-.71-.83,3.44,3.44,0,0,0-1.1-.65,3.6,3.6,0,0,0,1.58-1.36,3.66,3.66,0,0,0,.53-1.93,3.7,3.7,0,0,0-1.21-2.87,4.65,4.65,0,0,0-3.25-1.1H6.4Zm2.46,6.65V5.57h3.52a4.91,4.91,0,0,1,1.36.15,2.3,2.3,0,0,1,.85.45,2.06,2.06,0,0,1,.74,1.71,2.3,2.3,0,0,1-.78,1.92,2.54,2.54,0,0,1-.86.46,4.7,4.7,0,0,1-1.32.15H8.86Zm0,7.27V12.15H12.7a4.56,4.56,0,0,1,1.38.17,3.43,3.43,0,0,1,.95.49,2.29,2.29,0,0,1,.92,2,2.73,2.73,0,0,1-.83,2.1,2.66,2.66,0,0,1-.83.58,3.25,3.25,0,0,1-1.26.2H8.86Z" transform="translate(-6.4 -3.75)"/></g></svg>',underline:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 9.78 15.74"><g><path d="M14.64,3.76h2.52v7.72a4.51,4.51,0,0,1-.59,2.31,3.76,3.76,0,0,1-1.71,1.53,6.12,6.12,0,0,1-2.64.53,5,5,0,0,1-3.57-1.18,4.17,4.17,0,0,1-1.27-3.24V3.76H9.9v7.3a3,3,0,0,0,.55,2,2.3,2.3,0,0,0,1.83.65,2.26,2.26,0,0,0,1.8-.65,3.09,3.09,0,0,0,.55-2V3.76Zm2.52,13.31V19.5H7.39V17.08h9.77Z" transform="translate(-7.38 -3.76)"/></g></svg>',italic:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10.49 15.76"><g><path d="M17.16,3.79l.37,0-.06.38-.14.52A10,10,0,0,1,16.21,5a9.37,9.37,0,0,0-1,.32,6.68,6.68,0,0,0-.25.89c-.06.31-.11.59-.14.85-.3,1.36-.52,2.41-.68,3.14l-.61,3.18L13.1,15l-.43,2.4-.12.46a.62.62,0,0,0,0,.28c.44.1.85.17,1.23.22l.68.11a4.51,4.51,0,0,1-.08.6l-.09.42a.92.92,0,0,0-.23,0l-.43,0a1.37,1.37,0,0,1-.29,0c-.13,0-.63-.08-1.49-.16l-2,0c-.28,0-.87,0-1.78.12L7,19.5l.17-.88.8-.2A6.61,6.61,0,0,0,9.19,18,2.62,2.62,0,0,0,9.61,17l.28-1.41.58-2.75.12-.66c.05-.3.11-.58.17-.86s.12-.51.17-.69l.12-.48.12-.43.31-1.6.15-.65.31-1.91V5.14a3.86,3.86,0,0,0-1.48-.29l-.38,0,.2-1.06,3.24.14.75,0c.45,0,1.18,0,2.18-.09.23,0,.46,0,.71,0Z" transform="translate(-7.04 -3.76)"/></g></svg>',strike:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.9"><g><path d="M12.94,13a4.27,4.27,0,0,1,1.32.58,1.46,1.46,0,0,1,.55,1.2,1.87,1.87,0,0,1-.88,1.64,4.17,4.17,0,0,1-2.35.59,4.44,4.44,0,0,1-2.74-.71,2.72,2.72,0,0,1-1-2.17H5.57a4.56,4.56,0,0,0,1.55,3.7,7,7,0,0,0,4.47,1.23,6,6,0,0,0,4.07-1.3,4.24,4.24,0,0,0,1.52-3.37,4,4,0,0,0-.26-1.4h-4ZM6.37,10.24A3.27,3.27,0,0,1,6,8.68a4,4,0,0,1,1.48-3.3,5.92,5.92,0,0,1,3.88-1.21,5.58,5.58,0,0,1,3.91,1.24,4.36,4.36,0,0,1,1.45,3.17H14.44a2.12,2.12,0,0,0-.91-1.81,4.45,4.45,0,0,0-2.44-.55,3.69,3.69,0,0,0-2,.51A1.64,1.64,0,0,0,8.3,8.22a1.3,1.3,0,0,0,.48,1.11,7,7,0,0,0,2.1.78l.28.06.28.08H6.37Zm13.09.68a.73.73,0,0,1,.49.21.66.66,0,0,1,.2.48.64.64,0,0,1-.2.48.71.71,0,0,1-.49.19H5.1a.67.67,0,0,1-.49-.19.66.66,0,0,1-.2-.48.64.64,0,0,1,.2-.48.73.73,0,0,1,.49-.21H19.46Z" transform="translate(-4.41 -4.17)"/></g></svg>',subscript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 14.61"><g><path d="M15.38,4.33H12.74L11.19,7c-.28.46-.51.87-.69,1.21L10.07,9h0l-.44-.8c-.22-.4-.45-.81-.71-1.23L7.34,4.33H4.68L8.26,10,4.4,16.08H7.1l1.69-2.83c.38-.63.72-1.22,1-1.78l.25-.46h0l.49.92c.24.45.48.89.74,1.32L13,16.08h2.61L11.84,10l1.77-2.84,1.77-2.85Zm4.77,13.75H17v-.15c0-.4.05-.64.16-.72a4.42,4.42,0,0,1,1.16-.31,3.3,3.3,0,0,0,1.54-.56A1.84,1.84,0,0,0,20.15,15a1.78,1.78,0,0,0-.44-1.41A2.8,2.8,0,0,0,18,13.25a2.71,2.71,0,0,0-1.69.37,1.83,1.83,0,0,0-.44,1.43v.23H17v-.23q0-.63.18-.78a1.62,1.62,0,0,1,.88-.15,1.59,1.59,0,0,1,.88.15q.18.15.18.75t-.18.75a3.58,3.58,0,0,1-1.18.33,3.33,3.33,0,0,0-1.52.51,1.57,1.57,0,0,0-.32,1.18v1.15h4.27v-.86Z" transform="translate(-4.4 -4.33)"/></g></svg>',superscript:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.42"><g><path d="M12,13.14l3.61-5.81H12.94L11.33,10c-.28.46-.51.88-.69,1.25l-.45.83h0l-.45-.85c-.22-.41-.45-.82-.71-1.24L7.4,7.33H4.68l3.66,5.81L4.4,19.33H7.14l1.74-2.87q.58-1,1-1.83l.25-.48h0l.51.94.75,1.37,1.72,2.87h2.67l-1.92-3.09c-1.12-1.8-1.76-2.83-1.92-3.1Zm4.84-4.41h0l0,.15h3.27v.86H15.77V8.58a1.66,1.66,0,0,1,.33-1.22,3.51,3.51,0,0,1,1.56-.51,3.68,3.68,0,0,0,1.21-.34c.13-.1.19-.36.19-.77S19,5.07,18.87,5A1.63,1.63,0,0,0,18,4.8a1.58,1.58,0,0,0-.91.17c-.13.11-.19.38-.19.8V6H15.78V5.76a1.87,1.87,0,0,1,.45-1.47A2.84,2.84,0,0,1,18,3.91a2.8,2.8,0,0,1,1.72.38,1.84,1.84,0,0,1,.45,1.44,1.91,1.91,0,0,1-.34,1.35,3.24,3.24,0,0,1-1.58.57A3.69,3.69,0,0,0,17,8c-.12.1-.17.35-.17.76Z" transform="translate(-4.4 -3.91)"/></g></svg>',erase:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.76"><g><path d="M13.69,17.2h6.46v1.31H8.56L4.41,14.37,14,4.75l6.06,6.06L16.89,14l-3.2,3.19Zm-4.61,0h2.77L14.09,15,9.88,10.75,6.25,14.38l1.41,1.41c.84.82,1.31,1.29,1.42,1.41Z" transform="translate(-4.41 -4.75)"/></g></svg>',indent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M4.68,14.45a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V9.1a.27.27,0,0,1,.08-.19.28.28,0,0,1,.2-.08.25.25,0,0,1,.19.07l2.54,2.54a.29.29,0,0,1,0,.4L4.88,14.36a.24.24,0,0,1-.2.09Zm15.19,1.12a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87Zm0-3.38a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm0-3.37a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm.2-3.29a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',outdent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.36"><g><path d="M19.87,15.57a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.25.25,0,0,1-.08-.19V15.84a.27.27,0,0,1,.27-.27H19.87ZM7.5,14.45a.25.25,0,0,1-.2-.09L4.76,11.84a.29.29,0,0,1,0-.4L7.3,8.9a.29.29,0,0,1,.4,0,.31.31,0,0,1,.07.2v5.06a.32.32,0,0,1-.08.21.26.26,0,0,1-.19.08ZM19.87,8.82a.27.27,0,0,1,.19.08.25.25,0,0,1,.08.19v1.69a.27.27,0,0,1-.08.19.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.27-.27V9.1a.27.27,0,0,1,.27-.27h9.56Zm0,3.37a.27.27,0,0,1,.19.08.28.28,0,0,1,.08.21v1.68a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H10.31a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V12.48a.32.32,0,0,1,.08-.21.24.24,0,0,1,.19-.08h9.56Zm.2-6.66a.28.28,0,0,1,.08.2V7.41a.32.32,0,0,1-.08.21.25.25,0,0,1-.19.08H4.68a.27.27,0,0,1-.19-.08.3.3,0,0,1-.08-.21V5.73a.32.32,0,0,1,.08-.21.25.25,0,0,1,.19-.08H19.87a.28.28,0,0,1,.2.09Z" transform="translate(-4.41 -5.44)"/></g></svg>',expansion:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M11.8,13.06l-5.1,5.1H9.51V19.5H4.41V14.4H5.75v2.81L8.3,14.66q2.25-2.23,2.55-2.55Zm8.35-9.3v5.1H18.81V6.05l-5.1,5.1-1-1,5.1-5.1H15.05V3.76Z" transform="translate(-4.41 -3.76)"/></g></svg>',reduction:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M14.91,10h2.87v1.38H12.55V6.12h1.38V9l5.24-5.24.48.49.49.48ZM6.77,11.92H12v5.23H10.62V14.26L5.37,19.5l-1-1L9.63,13.3H6.77Z" transform="translate(-4.4 -3.76)"/></g></svg>',code_view:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 11.8"><g><path d="M8.09,7.94a.76.76,0,0,1,.53.22.72.72,0,0,1,.21.52.76.76,0,0,1-.22.54L6.18,11.63l2.43,2.44a.69.69,0,0,1,.2.51.66.66,0,0,1-.21.51.75.75,0,0,1-.51.22.63.63,0,0,1-.51-.21h0L4.63,12.15a.7.7,0,0,1-.22-.53.67.67,0,0,1,.25-.55L7.57,8.16a.82.82,0,0,1,.52-.22Zm12.05,3.69a.7.7,0,0,1-.23.52L17,15.1h0a.66.66,0,0,1-.51.21.73.73,0,0,1-.51-.22.75.75,0,0,1-.22-.51.63.63,0,0,1,.21-.51l2.43-2.44L15.92,9.22a.73.73,0,0,1-.22-.53A.74.74,0,0,1,17,8.18h0l2.91,2.91a.67.67,0,0,1,.27.54Zm-5.9-5.9a.73.73,0,0,1,.61.32.71.71,0,0,1,.07.68L11,17a1,1,0,0,1-.22.32.6.6,0,0,1-.35.16.75.75,0,0,1-.69-.26.69.69,0,0,1-.12-.72L13.56,6.23a.75.75,0,0,1,.26-.35.74.74,0,0,1,.42-.15Z" transform="translate(-4.41 -5.73)"/></g></svg>',preview:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.65 15.66"><g><path d="M16.19,14.43l2.49,2.49a.73.73,0,0,1,.21.52.67.67,0,0,1-.22.51.7.7,0,0,1-.52.22.69.69,0,0,1-.51-.21l-2.49-2.48a5.17,5.17,0,0,1-1.34.69,4.64,4.64,0,0,1-1.48.24,4.78,4.78,0,1,1,0-9.56,4.79,4.79,0,0,1,1.84.36,4.9,4.9,0,0,1,1.56,1,4.77,4.77,0,0,1,.46,6.18ZM10,14a3.3,3.3,0,0,0,2.34.93A3.37,3.37,0,0,0,14.7,14a3.3,3.3,0,0,0-1.08-5.41,3.47,3.47,0,0,0-2.56,0A3,3,0,0,0,10,9.28,3.31,3.31,0,0,0,10,14ZM16,4a3.86,3.86,0,0,1,2.77,1.14A3.9,3.9,0,0,1,20,7.85v4a.77.77,0,0,1-.22.53.7.7,0,0,1-.52.21.72.72,0,0,1-.74-.74v-4a2.46,2.46,0,0,0-.72-1.73A2.37,2.37,0,0,0,16,5.45H8.53A2.42,2.42,0,0,0,6.08,7.89v7.52a2.41,2.41,0,0,0,.71,1.73,2.46,2.46,0,0,0,1.74.72h4.08a.73.73,0,0,1,0,1.46H8.53a3.85,3.85,0,0,1-2.78-1.14A3.93,3.93,0,0,1,4.6,15.4V7.87A3.94,3.94,0,0,1,5.76,5.09,3.88,3.88,0,0,1,8.54,4H16Z" transform="translate(-4.45 -3.8)"/></g></svg>',print:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.05 16.04"><g><path d="M19.76,15.84a1.29,1.29,0,0,0,.39-.92V8.35A2.05,2.05,0,0,0,19.57,7a1.93,1.93,0,0,0-1.38-.57H6.37a1.95,1.95,0,0,0-2,2v6.56a1.23,1.23,0,0,0,.38.92,1.35,1.35,0,0,0,.93.38h2V14.9l-2,0V8.35a.67.67,0,0,1,.18-.47.62.62,0,0,1,.48-.19H18.18a.6.6,0,0,1,.46.19.66.66,0,0,1,.18.47V14.9h-2v1.32h2A1.35,1.35,0,0,0,19.76,15.84ZM17.52,7.69V5.06a1.31,1.31,0,0,0-.38-.92,1.34,1.34,0,0,0-.94-.38H8.34A1.3,1.3,0,0,0,7,5.06V7.69H8.34V5.06h7.87V7.69h1.31ZM8.34,12.93h7.87l0,5.26H8.34V12.93Zm7.87,5.26v0Zm.65,1.31a.6.6,0,0,0,.46-.19.72.72,0,0,0,.2-.47V12.29a.74.74,0,0,0-.2-.47.6.6,0,0,0-.46-.19H7.68a.6.6,0,0,0-.46.19.72.72,0,0,0-.2.47v6.55a.74.74,0,0,0,.2.47.6.6,0,0,0,.46.19h9.18ZM16.67,9.28a.7.7,0,0,0-.94,0,.63.63,0,0,0-.18.46.67.67,0,0,0,.18.47.68.68,0,0,0,.94,0,.66.66,0,0,0,.18-.47A.58.58,0,0,0,16.67,9.28Z" transform="translate(-4.25 -3.61)"/></g></svg>',template:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.27 15.64"><g><path d="M18.18,19.16a1,1,0,0,0,1-1V5.73a1,1,0,0,0-1-1h-2v1h2V18.19H6.37V5.73h2v-1h-2A.94.94,0,0,0,5.68,5a1,1,0,0,0-.29.7V18.18a.94.94,0,0,0,.29.69,1,1,0,0,0,.69.29H18.18ZM9.82,10.31h4.92a.49.49,0,0,0,.35-.15.47.47,0,0,0,.15-.35.49.49,0,0,0-.15-.35.47.47,0,0,0-.35-.15H9.82a.49.49,0,0,0-.35.15.47.47,0,0,0-.15.35.49.49,0,0,0,.15.35.47.47,0,0,0,.35.15Zm5.9,4.92H8.83a.49.49,0,0,0-.35.15.47.47,0,0,0-.15.35.49.49,0,0,0,.15.35.47.47,0,0,0,.35.15h6.89a.49.49,0,0,0,.35-.15.47.47,0,0,0,.15-.35.51.51,0,0,0-.5-.5ZM7.36,12.77a.49.49,0,0,0,.15.35.47.47,0,0,0,.35.15h8.85a.49.49,0,0,0,.35-.15.47.47,0,0,0,.15-.35.49.49,0,0,0-.15-.35.47.47,0,0,0-.35-.15H7.85a.49.49,0,0,0-.35.15.52.52,0,0,0-.14.35Z" transform="translate(-5.14 -3.77)"/><path d="M14.24,6.71a1,1,0,0,0,1-1,1,1,0,0,0-1-1,1,1,0,0,0-1-1h-2a.94.94,0,0,0-.69.28,1,1,0,0,0-.29.7A.94.94,0,0,0,9.62,5a.91.91,0,0,0-.29.69,1,1,0,0,0,.29.7,1,1,0,0,0,.69.29h3.93Z" transform="translate(-5.14 -3.77)"/></g></svg>',line_height:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 13.56"><g><path d="M4.4,4.88V8.26a2,2,0,0,0,.5.39s.1,0,.18-.12a.62.62,0,0,0,.17-.28c.06-.19.13-.44.21-.74s.14-.52.19-.66a.58.58,0,0,1,.21-.3,2.41,2.41,0,0,1,.63-.21,3.83,3.83,0,0,1,.88-.12,9.15,9.15,0,0,1,1.31.06.16.16,0,0,1,.11,0,.26.26,0,0,1,.06.14,4,4,0,0,1,0,.49v2l.05,3.77c0,1.41,0,2.68-.05,3.81a1.79,1.79,0,0,1-.11.49,10.68,10.68,0,0,1-1.4.45,1.12,1.12,0,0,0-.69.43v.31l0,.22.61,0c.85-.08,1.54-.12,2.06-.12a19.76,19.76,0,0,1,2.09.08,15.08,15.08,0,0,0,1.64.08,1.4,1.4,0,0,0,.29,0,1.58,1.58,0,0,0,0-.26l-.05-.43a2.26,2.26,0,0,0-.43-.17l-.77-.22-.15,0a2.55,2.55,0,0,1-.78-.28,2.56,2.56,0,0,1-.11-.75l0-1.29,0-3.15V7.53a10.51,10.51,0,0,1,.06-1.2,3.83,3.83,0,0,1,.6,0l1.88,0a2.18,2.18,0,0,1,.38,0,.45.45,0,0,1,.23.17.9.9,0,0,1,.05.25c0,.16.06.35.1.58a3.33,3.33,0,0,0,.14.55A6.39,6.39,0,0,0,15,9a2.91,2.91,0,0,0,.6-.15,2.77,2.77,0,0,0,0-.46l0-.51,0-2.95-.25,0-.38,0L15,4.94a.71.71,0,0,1-.18.15.45.45,0,0,1-.25.07l-.29,0H8.75l-.15,0H7.45a17,17,0,0,1-1.86,0L5.36,5l-.25-.13ZM19.75,16.14h-.69v-9h.69A.4.4,0,0,0,20.13,7c.06-.11,0-.24-.1-.39L18.92,5.15a.52.52,0,0,0-.86,0L17,6.58c-.12.15-.16.28-.1.39s.18.16.38.16h.69v9h-.69a.4.4,0,0,0-.38.16c-.06.11,0,.24.1.39l1.11,1.43a.52.52,0,0,0,.86,0L20,16.69c.12-.15.16-.28.1-.39a.4.4,0,0,0-.38-.16Z" transform="translate(-4.4 -4.86)"/></g></svg>',paragraph_style:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.81 15.74"><g><path d="M18.18,3.76v2h-2V19.5h-2V5.73h-2V19.5h-2V11.63a3.94,3.94,0,0,1,0-7.87h7.87Z" transform="translate(-6.37 -3.76)"/></g></svg>',text_style:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.76 15.74"><g><path d="M17.68,6.71a2.22,2.22,0,0,0,1.06-.22.74.74,0,0,0,.42-.7.73.73,0,0,0-.08-.33.67.67,0,0,0-.17-.22,1,1,0,0,0-.31-.15L18.26,5l-.45-.09A15.27,15.27,0,0,0,13.26,5V4.74c0-.66-.63-1-1.92-1-.24,0-.43.15-.59.46a4,4,0,0,0-.36,1.14h0v0a26.45,26.45,0,0,1-3.5.35A2,2,0,0,0,5.77,6a.84.84,0,0,0-.37.79,2.14,2.14,0,0,0,.41,1.29,1.23,1.23,0,0,0,1.05.63,16.62,16.62,0,0,0,3.29-.45l-.34,3.35c-.16,1.61-.29,2.9-.37,3.86s-.12,1.66-.12,2.09l0,.65a5.15,5.15,0,0,0,.05.6,1.28,1.28,0,0,0,.16.54.34.34,0,0,0,.28.18,1.16,1.16,0,0,0,.79-.46,3.66,3.66,0,0,0,.68-1,22.08,22.08,0,0,0,1-4.33q.49-3.1.78-6.15a24.69,24.69,0,0,1,4.62-.84Z" transform="translate(-5.4 -3.76)"/></g></svg>',save:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M18.53,19.5l.2-.05A1.78,1.78,0,0,0,20.13,18l0-.09V7.14a2,2,0,0,0-.28-.64A3.18,3.18,0,0,0,19.43,6c-.5-.52-1-1-1.55-1.54A2.59,2.59,0,0,0,17.37,4a1.83,1.83,0,0,0-.61-.25H6l-.21,0a1.78,1.78,0,0,0-1.4,1.49l0,.1V17.87a2.49,2.49,0,0,0,.09.37,1.79,1.79,0,0,0,1.44,1.23l.09,0Zm-6.25-.6H6.92a.61.61,0,0,1-.68-.48.78.78,0,0,1,0-.22V12.3a.62.62,0,0,1,.69-.68H17.64a.62.62,0,0,1,.69.69V18.2a.64.64,0,0,1-.71.69H12.28ZM12,9.81H8.15a.63.63,0,0,1-.72-.71v-4a.64.64,0,0,1,.72-.72h7.66a.64.64,0,0,1,.72.72v4a.65.65,0,0,1-.74.72ZM13.5,5V9.18h1.78V5Z" transform="translate(-4.41 -3.76)"/></g></svg>',blockquote:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 475.082 475.081"><g><path d="M164.45,219.27h-63.954c-7.614,0-14.087-2.664-19.417-7.994c-5.327-5.33-7.994-11.801-7.994-19.417v-9.132c0-20.177,7.139-37.401,21.416-51.678c14.276-14.272,31.503-21.411,51.678-21.411h18.271c4.948,0,9.229-1.809,12.847-5.424c3.616-3.617,5.424-7.898,5.424-12.847V54.819c0-4.948-1.809-9.233-5.424-12.85c-3.617-3.612-7.898-5.424-12.847-5.424h-18.271c-19.797,0-38.684,3.858-56.673,11.563c-17.987,7.71-33.545,18.132-46.68,31.267c-13.134,13.129-23.553,28.688-31.262,46.677C3.855,144.039,0,162.931,0,182.726v200.991c0,15.235,5.327,28.171,15.986,38.834c10.66,10.657,23.606,15.985,38.832,15.985h109.639c15.225,0,28.167-5.328,38.828-15.985c10.657-10.663,15.987-23.599,15.987-38.834V274.088c0-15.232-5.33-28.168-15.994-38.832C192.622,224.6,179.675,219.27,164.45,219.27z"/><path d="M459.103,235.256c-10.656-10.656-23.599-15.986-38.828-15.986h-63.953c-7.61,0-14.089-2.664-19.41-7.994c-5.332-5.33-7.994-11.801-7.994-19.417v-9.132c0-20.177,7.139-37.401,21.409-51.678c14.271-14.272,31.497-21.411,51.682-21.411h18.267c4.949,0,9.233-1.809,12.848-5.424c3.613-3.617,5.428-7.898,5.428-12.847V54.819c0-4.948-1.814-9.233-5.428-12.85c-3.614-3.612-7.898-5.424-12.848-5.424h-18.267c-19.808,0-38.691,3.858-56.685,11.563c-17.984,7.71-33.537,18.132-46.672,31.267c-13.135,13.129-23.559,28.688-31.265,46.677c-7.707,17.987-11.567,36.879-11.567,56.674v200.991c0,15.235,5.332,28.171,15.988,38.834c10.657,10.657,23.6,15.985,38.828,15.985h109.633c15.229,0,28.171-5.328,38.827-15.985c10.664-10.663,15.985-23.599,15.985-38.834V274.088C475.082,258.855,469.76,245.92,459.103,235.256z"/></g></svg>',arrow_down:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 8.67"><g><path d="M18.79,7.52a.8.8,0,0,1,.56-.23.82.82,0,0,1,.79.79.8.8,0,0,1-.23.56l-7.07,7.07a.79.79,0,0,1-.57.25.77.77,0,0,1-.57-.25h0L4.64,8.65a.8.8,0,0,1-.23-.57.82.82,0,0,1,.79-.79.8.8,0,0,1,.56.23L12.28,14l3.26-3.26,3.25-3.26Z" transform="translate(-4.41 -7.29)"/></g></svg>',align_justify:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm0,5.9H20.15v-2H4.41v2Zm0,3.94H20.15v-2H4.41v2Zm0,3.93h7.87v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',align_left:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm11.8,3.94H4.41v2H16.22v-2Zm-11.8,5.9H18.18v-2H4.41v2Zm0,3.93h9.84v-2H4.41v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',align_right:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm3.93,5.9H20.15v-2H8.34v2Zm-2,3.94H20.14v-2H6.37v2Zm3.94,3.93h9.84v-2H10.31v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',align_center:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.77"><g><path d="M4.41,4.74v2H20.15v-2H4.41Zm2,3.94v2H18.18v-2H6.37Zm-1,5.9H19.16v-2H5.39v2Zm2,3.93H17.2v-2H7.36v2Z" transform="translate(-4.41 -4.74)"/></g></svg>',font_color:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.61"><g><path d="M18.5,15.57,14.28,4.32h-3.4L6.65,15.57h3l.8-2.26h4.23l.8,2.26h3ZM14,11.07H11.14L12.54,7,13.25,9c.41,1.18.64,1.86.7,2ZM4.41,16.69v2.24H20.15V16.69H4.41Z" transform="translate(-4.41 -4.32)"/></g></svg>',highlight_color:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.74"><g><path d="M12.32,9.31,13.38,13H11.21l.52-1.83q.46-1.61.54-1.83ZM4.44,3.76H20.1V19.5H4.44V3.76ZM14.71,17.32h2.63L13.7,6H10.89L7.26,17.32H9.89l.63-2.24h3.55l.32,1.12c.18.65.29,1,.32,1.12Z" transform="translate(-4.44 -3.76)"/></g></svg>',list_bullets:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 12.37"><g><path d="M7.77,16.12a1.59,1.59,0,0,0-.49-1.18,1.62,1.62,0,0,0-1.19-.49,1.68,1.68,0,1,0,0,3.36,1.67,1.67,0,0,0,1.68-1.69Zm0-4.48A1.67,1.67,0,0,0,6.09,10,1.68,1.68,0,0,0,4.9,12.82a1.62,1.62,0,0,0,1.19.49,1.67,1.67,0,0,0,1.68-1.67Zm12.38,3.64a.27.27,0,0,0-.08-.19.28.28,0,0,0-.2-.09H9.19a.28.28,0,0,0-.2.08.29.29,0,0,0-.08.19V17a.27.27,0,0,0,.28.28H19.87a.27.27,0,0,0,.19-.08.24.24,0,0,0,.08-.2V15.28ZM7.77,7.13a1.63,1.63,0,0,0-.49-1.2,1.61,1.61,0,0,0-1.19-.49,1.61,1.61,0,0,0-1.19.49,1.71,1.71,0,0,0,0,2.4,1.62,1.62,0,0,0,1.19.49,1.61,1.61,0,0,0,1.19-.49,1.63,1.63,0,0,0,.49-1.2Zm12.38,3.66a.28.28,0,0,0-.08-.2.29.29,0,0,0-.19-.08H9.19a.27.27,0,0,0-.28.28v1.69a.27.27,0,0,0,.08.19.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08.25.25,0,0,0,.08-.19V10.79Zm0-4.5a.27.27,0,0,0-.08-.19A.25.25,0,0,0,19.88,6H9.19A.28.28,0,0,0,9,6.1a.26.26,0,0,0-.08.19V8A.27.27,0,0,0,9,8.17a.24.24,0,0,0,.2.08H19.87a.27.27,0,0,0,.19-.08A.25.25,0,0,0,20.14,8V6.29Z" transform="translate(-4.41 -5.44)"/></g></svg>',list_number:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.69 15.74"><g><path d="M7.66,18a1.24,1.24,0,0,0-.26-.78,1.17,1.17,0,0,0-.72-.42l.85-1V15H4.58v1.34h.94v-.46l.85,0h0c-.11.11-.22.23-.32.35s-.23.27-.37.47L5.39,17l.23.51c.61-.05.92.11.92.49a.42.42,0,0,1-.18.37.79.79,0,0,1-.45.12A1.41,1.41,0,0,1,5,18.15l-.51.77A2.06,2.06,0,0,0,6,19.5a1.8,1.8,0,0,0,1.2-.41A1.38,1.38,0,0,0,7.66,18Zm0-5.54H6.75V13H5.63A.72.72,0,0,1,6,12.51a5.45,5.45,0,0,1,.66-.45,2.71,2.71,0,0,0,.67-.57,1.19,1.19,0,0,0,.31-.81,1.29,1.29,0,0,0-.45-1,1.86,1.86,0,0,0-2-.11,1.51,1.51,0,0,0-.62.7l.74.52A.87.87,0,0,1,6,10.28a.51.51,0,0,1,.35.12.42.42,0,0,1,.13.33.55.55,0,0,1-.21.4,3,3,0,0,1-.5.38c-.19.13-.39.27-.58.42a2,2,0,0,0-.5.6,1.63,1.63,0,0,0-.21.81,3.89,3.89,0,0,0,.05.48h3.2V12.44Zm12.45,2.82a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2V17a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V15.26ZM7.69,7.32h-1V3.76H5.8L4.6,4.88l.63.68a1.85,1.85,0,0,0,.43-.48h0l0,2.24H4.74V8.2h3V7.32Zm12.43,3.42a.27.27,0,0,0-.08-.19.28.28,0,0,0-.21-.08H9.1a.32.32,0,0,0-.21.08.24.24,0,0,0-.08.2v1.71a.27.27,0,0,0,.08.19.3.3,0,0,0,.21.08H19.83a.32.32,0,0,0,.21-.08.25.25,0,0,0,.08-.19V10.74Zm0-4.52A.27.27,0,0,0,20,6,.28.28,0,0,0,19.83,6H9.1A.32.32,0,0,0,8.89,6a.24.24,0,0,0-.08.19V7.93a.27.27,0,0,0,.08.19.32.32,0,0,0,.21.08H19.83A.32.32,0,0,0,20,8.12a.26.26,0,0,0,.08-.2V6.22Z" transform="translate(-4.43 -3.76)"/></g></svg>',table:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M4.41,8.05V3.76H8.7V8.05H4.41Zm5.71,0V3.76h4.3V8.05h-4.3Zm5.74-4.29h4.29V8.05H15.86V3.76Zm-11.45,10V9.48H8.7v4.3H4.41Zm5.71,0V9.48h4.3v4.3h-4.3Zm5.74,0V9.48h4.29v4.3H15.86ZM4.41,19.5V15.21H8.7V19.5H4.41Zm5.71,0V15.21h4.3V19.5h-4.3Zm5.74,0V15.21h4.29V19.5H15.86Z" transform="translate(-4.41 -3.76)"/></g></svg>',horizontal_rule:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 2.24"><g><path d="M20.15,12.75V10.51H4.41v2.24H20.15Z" transform="translate(-4.41 -10.51)"/></g></svg>',show_blocks:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.66 15.67"><g><path d="M19.72,5.58a1.64,1.64,0,0,0-1.64-1.64H6.23a1.62,1.62,0,0,0-1.16.48,1.63,1.63,0,0,0-.48,1.16V9.63a1.6,1.6,0,0,0,.48,1.16,1.62,1.62,0,0,0,1.16.47H18.09a1.67,1.67,0,0,0,1.16-.47,1.62,1.62,0,0,0,.48-1.16V5.58Zm-.94,4.05a.68.68,0,0,1-.7.7H6.23a.66.66,0,0,1-.48-.2.74.74,0,0,1-.21-.5V5.58a.66.66,0,0,1,.2-.48.71.71,0,0,1,.48-.21H18.08a.74.74,0,0,1,.5.21.66.66,0,0,1,.2.48ZM6.48,7.72a.21.21,0,0,0,.17-.07.22.22,0,0,0,.07-.17V7.06a1.27,1.27,0,0,1,.11-.52.37.37,0,0,1,.36-.23H8.77A.25.25,0,0,0,9,6.17a.19.19,0,0,0,0-.23.27.27,0,0,0-.2-.12H7.19a.88.88,0,0,0-.72.39,1.51,1.51,0,0,0-.23.85v.42a.24.24,0,0,0,.24.24Zm-.19.81a.21.21,0,0,0,.17-.07.26.26,0,0,0,.07-.17.24.24,0,0,0-.24-.24.2.2,0,0,0-.16.09.2.2,0,0,0-.07.16.22.22,0,0,0,.07.17.23.23,0,0,0,.16.06Zm8.46,5.1a1.63,1.63,0,0,0-.47-1.16A1.61,1.61,0,0,0,13.12,12H6.23a1.6,1.6,0,0,0-1.16.46,1.62,1.62,0,0,0-.48,1.16v4.05a1.64,1.64,0,0,0,1.64,1.64h6.89a1.6,1.6,0,0,0,1.16-.48,1.62,1.62,0,0,0,.47-1.16Zm-.94,4a.7.7,0,0,1-.2.49.65.65,0,0,1-.5.2H6.23a.66.66,0,0,1-.48-.2.75.75,0,0,1-.21-.49v-4a.74.74,0,0,1,.21-.5.66.66,0,0,1,.48-.2h6.89a.68.68,0,0,1,.7.7v4Zm6.15,0v-4a1.6,1.6,0,0,0-.48-1.16A1.67,1.67,0,0,0,18.32,12H17.1a1.63,1.63,0,0,0-1.16.47,1.61,1.61,0,0,0-.47,1.16v4a1.67,1.67,0,0,0,.47,1.16,1.62,1.62,0,0,0,1.16.48h1.22A1.64,1.64,0,0,0,20,17.68Zm-.94-4v4a.75.75,0,0,1-.21.49.62.62,0,0,1-.48.2H17.11a.69.69,0,0,1-.5-.2.7.7,0,0,1-.2-.49v-4a.68.68,0,0,1,.7-.7h1.22a.66.66,0,0,1,.48.2.72.72,0,0,1,.21.5Z" transform="translate(-4.44 -3.79)"/></g></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M14.15,11.63l5.61,5.61a1.29,1.29,0,0,1,.38.93,1.27,1.27,0,0,1-.4.93,1.25,1.25,0,0,1-.92.4,1.31,1.31,0,0,1-.94-.4l-5.61-5.61L6.67,19.1a1.31,1.31,0,0,1-.94.4,1.24,1.24,0,0,1-.92-.4,1.27,1.27,0,0,1-.4-.93,1.33,1.33,0,0,1,.38-.93l5.61-5.63L4.79,6a1.26,1.26,0,0,1-.38-.93,1.22,1.22,0,0,1,.4-.92,1.28,1.28,0,0,1,.92-.39,1.38,1.38,0,0,1,.94.38l5.61,5.61,5.61-5.61a1.33,1.33,0,0,1,.94-.38,1.26,1.26,0,0,1,.92.39,1.24,1.24,0,0,1,.4.92,1.29,1.29,0,0,1-.39.93L17,8.81l-2.8,2.82Z" transform="translate(-4.41 -3.76)"/></g></svg>',image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.77"><g><path d="M8.77,8.72a.88.88,0,0,1-.61-.27.82.82,0,0,1-.25-.61.89.89,0,0,1,.25-.62A.82.82,0,0,1,8.77,7a.81.81,0,0,1,.61.25.83.83,0,0,1,.27.62.81.81,0,0,1-.25.61.91.91,0,0,1-.63.27Zm9.62-5a1.74,1.74,0,0,1,1.76,1.76V17.76a1.74,1.74,0,0,1-1.76,1.76H6.16A1.74,1.74,0,0,1,4.4,17.76V5.51A1.74,1.74,0,0,1,6.16,3.75H18.39Zm0,1.75H6.16v8L8.53,11.8a.94.94,0,0,1,.54-.17.86.86,0,0,1,.54.2L11.09,13l3.64-4.55a.78.78,0,0,1,.34-.25.85.85,0,0,1,.42-.07.89.89,0,0,1,.39.12.78.78,0,0,1,.28.29l2.24,3.67V5.51Zm0,12.24V15.6L15.3,10.53,11.89,14.8a.89.89,0,0,1-.59.32.82.82,0,0,1-.64-.18L9,13.62,6.16,15.74v2Z" transform="translate(-4.4 -3.75)"/></g></svg>',video:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.55"><g><path d="M20.15,10.26V18.9l-3.94-1.57v1.2H4.41V10.66H16.22v1.23l2-.81,2-.82ZM14.64,17h0V12.54h0v-.31H6V17h8.67Zm3.94-.37v-4l-2.37,1v2l1.18.48,1.19.48ZM7.94,9.86A2.77,2.77,0,0,1,5.19,7.11a2.76,2.76,0,0,1,5.51,0A2.78,2.78,0,0,1,7.94,9.86Zm0-3.93a1.21,1.21,0,0,0-.83.35,1.15,1.15,0,0,0-.34.84A1.09,1.09,0,0,0,7.11,8,1.15,1.15,0,0,0,8,8.28,1.13,1.13,0,0,0,9.11,7.12,1.16,1.16,0,0,0,7.94,5.93Zm5.9,3.93a2.34,2.34,0,0,1-1.67-.68,2.3,2.3,0,0,1-.68-1.67,2.35,2.35,0,0,1,4-1.67,2.37,2.37,0,0,1,0,3.34,2.33,2.33,0,0,1-1.68.68Zm0-3.14a.75.75,0,1,0,.55.22.73.73,0,0,0-.55-.22Z" transform="translate(-4.41 -4.35)"/></g></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M13.05,13.63a.24.24,0,0,1,.15.22L13.42,16a.19.19,0,0,1-.08.18l-2.12,2.14a4.08,4.08,0,0,1-1.29.85A4,4,0,0,1,4.71,17a3.92,3.92,0,0,1-.3-1.52A4,4,0,0,1,4.71,14a3.91,3.91,0,0,1,.87-1.3L7.7,10.56a.25.25,0,0,1,.2-.06l2.17.22a.21.21,0,0,1,.19.15.24.24,0,0,1,0,.25L7.12,14.23a1.81,1.81,0,0,0,0,2.58,1.78,1.78,0,0,0,1.29.52,1.74,1.74,0,0,0,1.28-.52L12.8,13.7a.24.24,0,0,1,.25-.07ZM19,4.92a4,4,0,0,1,0,5.66L16.86,12.7a.25.25,0,0,1-.17.08l-2.2-.23a.21.21,0,0,1-.19-.15.22.22,0,0,1,0-.25L17.44,9a1.81,1.81,0,0,0,0-2.58,1.78,1.78,0,0,0-1.29-.52,1.74,1.74,0,0,0-1.28.52L11.76,9.57a.21.21,0,0,1-.25,0,.24.24,0,0,1-.16-.21l-.22-2.17a.19.19,0,0,1,.08-.18l2.12-2.14a4.08,4.08,0,0,1,1.29-.85,4.05,4.05,0,0,1,3.06,0,3.85,3.85,0,0,1,1.3.85ZM5.84,9.82a.25.25,0,0,1-.18-.08.19.19,0,0,1-.07-.19l.11-.77a.2.2,0,0,1,.11-.17.24.24,0,0,1,.2,0l2.5.72a.25.25,0,0,1,.15.27.22.22,0,0,1-.23.21l-2.59,0Zm4.12-2-.73-2.5a.27.27,0,0,1,0-.2A.21.21,0,0,1,9.41,5L10.19,5a.25.25,0,0,1,.19,0,.23.23,0,0,1,.08.18l-.05,2.61a.2.2,0,0,1-.19.23h0A.22.22,0,0,1,10,7.85Zm8.76,5.58a.25.25,0,0,1,.18.08.23.23,0,0,1,.06.2l-.11.77a.25.25,0,0,1-.11.17.21.21,0,0,1-.12,0l-.08,0L16,14a.25.25,0,0,1-.15-.27.22.22,0,0,1,.22-.21l1.29,0,1.33,0Zm-4.12,2,.74,2.51a.28.28,0,0,1,0,.2.23.23,0,0,1-.18.11l-.8.11a.23.23,0,0,1-.17-.07.25.25,0,0,1-.08-.18l0-2.61a.22.22,0,0,1,.22-.22.21.21,0,0,1,.26.15Z" transform="translate(-4.41 -3.77)"/></g></svg>',math:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.81 15.73"><g><path d="M17.19,5.73a1,1,0,0,0,.71-.29,1,1,0,0,0,.28-.7,1,1,0,0,0-1-1H7.35a1,1,0,0,0-1,1,.77.77,0,0,0,.13.47h0l4.58,6.43L6.68,17.81a1.25,1.25,0,0,0-.29.71.94.94,0,0,0,.28.7.92.92,0,0,0,.69.28H17.2a1,1,0,0,0,.71-.28,1,1,0,0,0,0-1.39.92.92,0,0,0-.71-.29H9.26l3.87-5.43a.86.86,0,0,0,0-.95L9.26,5.73h7.93Z" transform="translate(-6.38 -3.77)"/></g></svg>',unlink:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.72"><g><path d="M19,18.32a4,4,0,0,0,0-5.68L15.85,9.5l-1.17,1.55L17.57,14a2,2,0,0,1,.61,1.47,2.08,2.08,0,0,1-2.09,2.09,2,2,0,0,1-1.47-.61l-.38-.37-1.74,1,.8.78a4,4,0,0,0,5.68,0ZM8,9.77a2,2,0,0,1-1.27-1,1.89,1.89,0,0,1-.21-1.57A2.1,2.1,0,0,1,7.45,6,2,2,0,0,1,9,5.76L12.27,7.2l.49-2L9.48,3.9a4,4,0,0,0-3.06.41A3.82,3.82,0,0,0,4.56,6.73a3.8,3.8,0,0,0,.4,3A3.78,3.78,0,0,0,7.39,11.6l5.38,2,.49-2-2.64-.94L8,9.77Z" transform="translate(-4.41 -3.76)"/></g></svg>',table_header:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.74"><g><path d="M17,19.5v-.78H15.5v.78H17Zm-3,0v-.78H12.5v.78H14Zm-3,0v-.78H9.53v.78H11Zm-3,0v-.78H6.53v.78H8Zm10.55,0a1.73,1.73,0,0,0,.85-.35,1.67,1.67,0,0,0,.56-.76l-.71-.31a1.21,1.21,0,0,1-.35.4,1.34,1.34,0,0,1-.53.23l.08.38c.06.24.09.38.1.41Zm-13.7-.63.55-.55A.77.77,0,0,1,5.25,18a1.31,1.31,0,0,1-.06-.38v-.38H4.41v.38a2,2,0,0,0,.12.68,1.6,1.6,0,0,0,.35.57Zm15.27-2.12V15.26h-.78v1.49h.78Zm-15-1V14.23H4.41v1.49h.78Zm15-2V12.26h-.78v1.49h.78Zm-15-1V11.22H4.41v1.51h.78Zm15-2V9.26h-.78v1.51h.78Zm-15-1V8.17H4.41V9.74h.78Zm15-2V6.28h-.78V7.77h.78Zm-15-1.11V5.33L4.48,5.1a.77.77,0,0,0-.07.27,2.72,2.72,0,0,0,0,.28v1h.79ZM19.21,5l.63-.4A1.62,1.62,0,0,0,19.16,4a1.94,1.94,0,0,0-.91-.22v.78a1.31,1.31,0,0,1,.56.12.88.88,0,0,1,.4.36ZM6,4.54H7.78V3.76H6a.82.82,0,0,0-.28.06l.12.35c.07.21.1.33.11.36Zm10.8,0V3.76H15.28v.78h1.49Zm-3,0V3.76H12.28v.78h1.49Zm-3,0V3.76H9.28v.78h1.51ZM6,10.84h12.6V6.91H6Z" transform="translate(-4.4 -3.76)"/></g></svg>',merge_cell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 15.74"><g><path d="M18.92,13.5h1.23v4.15A1.84,1.84,0,0,1,18.3,19.5H14V18.27H18.3a.6.6,0,0,0,.44-.18.59.59,0,0,0,.18-.44V13.5ZM18.3,3.76a1.84,1.84,0,0,1,1.85,1.85V9.82H18.92V5.6a.6.6,0,0,0-.18-.44A.59.59,0,0,0,18.3,5H14V3.76H18.3Zm1.85,8.51H15.6L17.26,14l-.86.86-3.14-3.17L16.4,8.51l.86.86L15.62,11h4.54v1.24Zm-13.9,6h4.27V19.5H6.25A1.84,1.84,0,0,1,4.4,17.65V13.5H5.63v4.15a.61.61,0,0,0,.62.62Zm0-14.51h4.27V5H6.25a.6.6,0,0,0-.44.18.57.57,0,0,0-.17.43V9.81H4.41V5.6A1.83,1.83,0,0,1,6.25,3.76Zm5,7.9L8.15,14.83,7.3,14,9,12.27H4.41V11H8.94L7.3,9.38,7.73,9l.43-.43Z" transform="translate(-4.4 -3.76)"/></g></svg>',split_cell:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 15.74"><g><path d="M10.37,12.25H6.74L8.4,13.94l-.87.86L4.41,11.63,7.53,8.5l.87.86L6.74,11h3.62v1.23Zm9.78-.61L17,14.81,16.13,14l1.66-1.69H14.16V11h3.63L16.13,9.37l.43-.43A5.24,5.24,0,0,1,17,8.51ZM18.9,8.22V5.61a.57.57,0,0,0-.18-.43A.65.65,0,0,0,18.29,5H12.88V18.28h5.41a.7.7,0,0,0,.44-.18.57.57,0,0,0,.18-.43V15h1.23v2.64a1.84,1.84,0,0,1-1.85,1.83h-12A1.84,1.84,0,0,1,4.94,19a1.81,1.81,0,0,1-.54-1.29V15H5.63v2.64a.57.57,0,0,0,.18.43.67.67,0,0,0,.44.18h5.41V5H6.25a.7.7,0,0,0-.44.18.56.56,0,0,0-.17.43V8.22H4.41V5.61A1.8,1.8,0,0,1,5,4.31a1.91,1.91,0,0,1,1.31-.55h12a1.89,1.89,0,0,1,1.31.55,1.8,1.8,0,0,1,.54,1.3V8.23H18.9Z" transform="translate(-4.4 -3.76)"/></g></svg>',caption:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 13.79"><g><path d="M4.41,18.52H20.15v-2H4.41ZM20,4.73H18.07V6h.65v.65H20V4.73ZM17,6V4.73H14.55V6H17ZM13.49,6V4.73H11V6h2.47ZM10,6V4.73H7.5V6H10ZM5.79,6h.65V4.73H4.5V6.67H5.8V6ZM4.5,11.34H5.79V8.48H4.5ZM6.44,13.8H5.79v-.65H4.5v1.94H6.44ZM17,15.09V13.8H14.55v1.29H17Zm-3.52,0V13.8H11v1.29h2.47Zm-3.53,0V13.8H7.5v1.29H10ZM20,13.16H18.72v.65h-.65V15.1H20Zm-1.29-1.82H20V8.48h-1.3v2.86Z" transform="translate(-4.41 -4.73)"/></g></svg>',edit:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.73"><g><path d="M7.51,5.68h6l1.52-1.57H6.94a2.4,2.4,0,0,0-1.79.82A2.8,2.8,0,0,0,4.41,6.8V17a2.55,2.55,0,0,0,.75,1.8A2.48,2.48,0,0,0,7,19.5H17.22a2.57,2.57,0,0,0,1.83-.74,2.52,2.52,0,0,0,.77-1.8V8.83l-1.58,1.54v6a1.54,1.54,0,0,1-1.53,1.53H7.51A1.54,1.54,0,0,1,6,16.41V7.21A1.52,1.52,0,0,1,7.51,5.68Zm5.63,7.47h0L10.7,10.74l-1,3.38,1.71-.48,1.7-.49Zm.34-.34h0l5.36-5.32L16.4,5.08,11,10.4l1.23,1.21,1.21,1.2ZM19.93,6.4a.82.82,0,0,0,.22-.48A.54.54,0,0,0,20,5.47L18.45,4A.67.67,0,0,0,18,3.77a.7.7,0,0,0-.48.21l-.74.72,2.44,2.43.37-.37.35-.36Z" transform="translate(-4.41 -3.77)"/></g></svg>',delete:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 15.74"><g><path d="M19.16,6.71a.94.94,0,0,0,.69-.28.91.91,0,0,0,.29-.68A1,1,0,0,0,19.85,5a.93.93,0,0,0-.69-.3H14.24A.94.94,0,0,0,14,4.06a.92.92,0,0,0-.7-.3h-2a1,1,0,0,0-.7.3.93.93,0,0,0-.28.68H5.39A.92.92,0,0,0,4.7,5a1,1,0,0,0-.29.71.91.91,0,0,0,.29.68,1,1,0,0,0,.69.28H19.16Zm-12.79,1a1,1,0,0,0-.7.3.94.94,0,0,0-.28.69v8.85A1.88,1.88,0,0,0,6,18.93a1.9,1.9,0,0,0,1.39.57H17.2a1.87,1.87,0,0,0,1.39-.58,1.91,1.91,0,0,0,.58-1.39V8.68A1,1,0,0,0,18.88,8a.89.89,0,0,0-.7-.29,1,1,0,0,0-.69.29.92.92,0,0,0-.29.68v7.87a1,1,0,0,1-1,1H8.34a.94.94,0,0,1-.69-.28,1,1,0,0,1-.29-.71V8.68a1,1,0,0,0-1-1Z" transform="translate(-4.41 -3.76)"/></g></svg>',modify:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.7 15.74"><g><path d="M19.79,15.23a.66.66,0,0,1,.3.38.59.59,0,0,1-.07.48l-.8,1.38a.66.66,0,0,1-.38.3.59.59,0,0,1-.48-.07l-.68-.38a4.55,4.55,0,0,1-1.34.77v.78a.64.64,0,0,1-.18.45.61.61,0,0,1-.45.18h-1.6a.6.6,0,0,1-.44-.18.66.66,0,0,1-.19-.45v-.78a4.36,4.36,0,0,1-1.32-.77l-.69.38a.58.58,0,0,1-.48.07.66.66,0,0,1-.38-.3l-.38-.66h.83a1.77,1.77,0,0,0,1.23-.52,1.72,1.72,0,0,0,.51-1.23v-.18a3,3,0,0,0,.49-.28l.15.09a1.83,1.83,0,0,0,.88.23A1.75,1.75,0,0,0,15.84,14l.88-1.52a1.7,1.7,0,0,0,.17-1.32,1.66,1.66,0,0,0-.3-.61,1.84,1.84,0,0,0-.51-.45l-.15-.09,0-.29,0-.28.15-.09a1,1,0,0,0,.26-.18l0,.06v.78a4.34,4.34,0,0,1,1.34.77l.68-.38a.68.68,0,0,1,.48-.06.64.64,0,0,1,.38.29l.8,1.38a.58.58,0,0,1,.07.48.63.63,0,0,1-.3.38l-.68.4a3.84,3.84,0,0,1,.08.76,4.13,4.13,0,0,1-.08.78l.34.18.32.2ZM10.17,7.86a1.9,1.9,0,0,1,1.35,3.23,1.85,1.85,0,0,1-1.35.55A1.9,1.9,0,0,1,8.83,8.41a1.92,1.92,0,0,1,1.34-.55Zm1.58,7.2a.73.73,0,0,1-.21.49.66.66,0,0,1-.48.2H9.29a.68.68,0,0,1-.69-.69V14.2a4.75,4.75,0,0,1-1.48-.86l-.75.45a.73.73,0,0,1-.7,0,.63.63,0,0,1-.25-.26L4.54,12a.67.67,0,0,1-.08-.53.71.71,0,0,1,.32-.42l.75-.43a4.8,4.8,0,0,1-.08-.85,4.71,4.71,0,0,1,.08-.85l-.74-.44a.71.71,0,0,1-.32-.42.65.65,0,0,1,.07-.54L5.42,6a.66.66,0,0,1,.42-.32l.18,0a.73.73,0,0,1,.35.09l.75.43A4.68,4.68,0,0,1,8.6,5.33V4.45a.68.68,0,0,1,.69-.69h1.77a.64.64,0,0,1,.48.2.73.73,0,0,1,.21.49v.88a4.75,4.75,0,0,1,1.48.85L14,5.75a.67.67,0,0,1,.34-.09l.18,0a.71.71,0,0,1,.42.32l.89,1.54a.67.67,0,0,1,.06.52.73.73,0,0,1-.32.43l-.75.42a4.8,4.8,0,0,1,.08.85,4.71,4.71,0,0,1-.08.85l.75.43a.66.66,0,0,1,.32.42.73.73,0,0,1-.06.54l-.89,1.52a.69.69,0,0,1-.25.26.7.7,0,0,1-.35.09.64.64,0,0,1-.34-.09l-.75-.45a4.87,4.87,0,0,1-1.48.86v.87ZM7.23,9.75a3,3,0,0,0,.86,2.08,2.94,2.94,0,1,0,4.16-4.16,3,3,0,0,0-2.08-.85A2.94,2.94,0,0,0,7.23,9.75Z" transform="translate(-4.44 -3.76)"/></g></svg>',revert:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 14.69"><g><path d="M18.26,15V12.3l1.89-2V15a2.58,2.58,0,0,1-.24,1c-.2.58-.75.92-1.65,1H7.56v2L4.41,15.63,7.56,13v2h10.7ZM6.3,8.28V11L4.41,13V8.28a2.58,2.58,0,0,1,.24-1c.2-.58.75-.92,1.65-1H17v-2l3.15,3.34L17,10.3v-2H6.3Z" transform="translate(-4.4 -4.28)"/></g></svg>',auto_size:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 15.74"><g><path d="M6.71,17.19,6.89,16l1.21-.15A6,6,0,0,1,6.81,13.9a5.78,5.78,0,0,1-.45-2.27A6,6,0,0,1,8.1,7.45a5.83,5.83,0,0,1,4.17-1.73l1-1-1-1A7.89,7.89,0,0,0,5,14.64a7.73,7.73,0,0,0,1.71,2.55Zm5.57,2.31h0A7.86,7.86,0,0,0,17.85,6.07L17.67,7.3l-1.21.15a5.9,5.9,0,0,1,1.29,1.92,5.81,5.81,0,0,1,.45,2.26,5.91,5.91,0,0,1-5.9,5.9l-1,1,.49.49.47.5Z" transform="translate(-4.41 -3.76)"/></g></svg>',insert_row_below:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M15.7,1.3c-0.1-0.1-0.1-0.2-0.2-0.2L15.3,1H0.4L0.3,1.1c0,0-0.1,0.1-0.1,0.1c0,0-0.1,0.1-0.1,0.1L0,1.4v7.7l0.1,0.1c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h2.3V9.3l0.1-0.5L3,8.5l0.1-0.2c-0.1,0-0.2,0-0.3,0H1.2v-6h13.3v6h-1.6c-0.1,0-0.2,0-0.3,0l0.1,0.2l0.2,0.4C12.9,9,13,9.2,13,9.3v0.1h2.3l0.2-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1V1.4L15.7,1.3z"/><path d="M10.5,7.5C9.9,7.1,9.3,6.8,8.6,6.7c-0.2,0-0.5-0.1-0.7,0c-0.2,0-0.5,0-0.7,0C6.6,6.7,6.1,6.9,5.6,7.3C5.2,7.6,4.7,8,4.4,8.4C4.3,8.6,4.2,8.8,4.2,8.9C4.1,9.1,4,9.3,3.9,9.4C3.9,9.6,3.8,9.7,3.8,9.9c0,0.2-0.1,0.3-0.1,0.5v-0.1c-0.1,0.8,0.1,1.6,0.5,2.4c0.4,0.7,1,1.3,1.7,1.7c0.3,0.2,0.6,0.3,0.9,0.3c0.3,0.1,0.7,0.1,1,0.1c0.3,0,0.7,0,1-0.1c0.3-0.1,0.6-0.2,0.9-0.3c0.5-0.3,0.9-0.6,1.3-1c0.3-0.4,0.6-0.8,0.8-1.3c0.1-0.4,0.2-0.9,0.2-1.4c0-0.5-0.1-1-0.3-1.4C11.5,8.6,11.1,8,10.5,7.5z M10.1,11.3H8.5v1.6H8H7.9H7.3v0v-0.1v-1.4H5.7v-0.4v-0.2v-0.6h0h1.5V8.5h1.2v1.6h1.6V11.3z"/></g></svg>',insert_row_above:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M0.1,14.5c0.1,0.1,0.1,0.2,0.2,0.2l0.1,0.1h14.9l0.1-0.1c0,0,0.1-0.1,0.1-0.1c0,0,0.1-0.1,0.1-0.1l0.1-0.1V6.7l-0.1-0.1c0-0.1-0.1-0.1-0.2-0.2l-0.1-0.1h-2.3v0.1l-0.1,0.5l-0.2,0.4l-0.1,0.2c0.1,0,0.2,0,0.3,0h1.6v6H1.3v-6h1.6c0.1,0,0.2,0,0.3,0L3.1,7.3L2.9,6.9C2.8,6.8,2.8,6.6,2.7,6.5V6.3H0.4L0.3,6.4c-0.1,0-0.1,0.1-0.2,0.2L0,6.7v7.7L0.1,14.5z"/><path d="M5.3,8.3c0.6,0.5,1.2,0.8,1.9,0.9c0.2,0,0.5,0.1,0.7,0c0.2,0,0.5,0,0.7,0c0.6-0.1,1.1-0.3,1.6-0.6c0.5-0.3,0.9-0.7,1.2-1.2c0.1-0.2,0.2-0.3,0.3-0.5c0.1-0.2,0.2-0.4,0.2-0.5c0.1-0.1,0.1-0.3,0.1-0.4C12,5.8,12,5.6,12,5.4v0.1c0.1-0.8-0.1-1.6-0.5-2.4c-0.4-0.7-1-1.3-1.7-1.7C9.5,1.3,9.2,1.2,8.9,1.1C8.5,1,8.2,1,7.9,1c-0.3,0-0.7,0-1,0.1C6.6,1.2,6.3,1.3,6,1.4C5.5,1.7,5.1,2,4.7,2.4C4.4,2.8,4.1,3.3,3.9,3.8C3.8,4.2,3.7,4.7,3.7,5.2c0,0.5,0.1,1,0.3,1.4C4.3,7.2,4.7,7.8,5.3,8.3z M5.7,4.5h1.6V2.9h0.5h0.1h0.6v0v0.1v1.4H10v0.4v0.2v0.6h0H8.5v1.6H7.3V5.7H5.7V4.5z"/></g></svg>',insert_column_left:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M14.5,15.7c0.1-0.1,0.2-0.1,0.2-0.2l0.1-0.1V0.4l-0.1-0.1c0,0-0.1-0.1-0.1-0.1c0,0-0.1-0.1-0.1-0.1L14.4,0H6.7L6.6,0.1c-0.1,0-0.1,0.1-0.2,0.2L6.3,0.4v2.3h0.1l0.5,0.1L7.3,3l0.2,0.1c0-0.1,0-0.2,0-0.3V1.2h6v13.3h-6v-1.6c0-0.1,0-0.2,0-0.3l-0.2,0.1l-0.4,0.2C6.7,12.9,6.6,13,6.4,13H6.3v2.3l0.1,0.2c0,0.1,0.1,0.1,0.2,0.2l0.1,0.1h7.7L14.5,15.7z"/><path d="M8.3,10.5C8.7,10,9,9.3,9.1,8.6c0-0.2,0.1-0.5,0-0.7c0-0.2,0-0.5,0-0.7C9,6.7,8.8,6.1,8.5,5.7C8.2,5.2,7.8,4.8,7.3,4.5C7.2,4.4,7,4.3,6.9,4.2C6.7,4.1,6.5,4,6.4,4C6.2,3.9,6.1,3.9,5.9,3.8c-0.2,0-0.3-0.1-0.5-0.1h0.1C4.7,3.7,3.8,3.9,3.1,4.3C2.4,4.7,1.8,5.3,1.4,6C1.3,6.3,1.2,6.6,1.1,6.9C1,7.2,1,7.6,1,7.9c0,0.3,0,0.7,0.1,1c0.1,0.3,0.2,0.6,0.3,0.9c0.3,0.5,0.6,0.9,1,1.3c0.4,0.3,0.8,0.6,1.3,0.8C4.2,12,4.7,12.1,5.1,12c0.5,0,1-0.1,1.4-0.3C7.2,11.5,7.8,11.1,8.3,10.5zM4.5,10.1V8.5H2.9V8V7.9V7.3h0H3h1.4V5.7h0.4h0.2h0.6v0v1.5h1.6v1.2H5.7v1.6H4.5z"/></g></svg>',insert_column_right:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M1.3,0.1C1.2,0.2,1.1,0.2,1.1,0.3L1,0.4v14.9l0.1,0.1c0,0,0.1,0.1,0.1,0.1c0,0,0.1,0.1,0.1,0.1l0.1,0.1h7.7l0.1-0.1c0.1,0,0.1-0.1,0.2-0.2l0.1-0.1v-2.3H9.3l-0.5-0.1l-0.4-0.2l-0.2-0.1c0,0.1,0,0.2,0,0.3v1.6h-6V1.3h6v1.6c0,0.1,0,0.2,0,0.3l0.2-0.1l0.4-0.2C9,2.9,9.2,2.8,9.3,2.8h0.1V0.5L9.4,0.3c0-0.1-0.1-0.1-0.2-0.2L9.1,0H1.4L1.3,0.1z"/><path d="M7.5,5.3C7,5.8,6.7,6.5,6.6,7.2c0,0.2-0.1,0.5,0,0.7c0,0.2,0,0.5,0,0.7c0.1,0.6,0.3,1.1,0.6,1.6c0.3,0.5,0.7,0.9,1.2,1.2c0.2,0.1,0.3,0.2,0.5,0.3c0.2,0.1,0.4,0.2,0.5,0.2c0.1,0.1,0.3,0.1,0.4,0.1c0.2,0,0.3,0.1,0.5,0.1h-0.1c0.8,0.1,1.6-0.1,2.4-0.5c0.7-0.4,1.3-1,1.7-1.7c0.2-0.3,0.3-0.6,0.3-0.9c0.1-0.3,0.1-0.7,0.1-1c0-0.3,0-0.7-0.1-1c-0.1-0.3-0.2-0.6-0.3-0.9c-0.3-0.5-0.6-0.9-1-1.3C13,4.4,12.5,4.2,12,4c-0.4-0.1-0.9-0.2-1.4-0.2c-0.5,0-1,0.1-1.4,0.2C8.5,4.3,7.9,4.7,7.5,5.3z M11.3,5.7v1.6h1.6v0.5v0.1v0.6h0h-0.1h-1.4v1.6h-0.4h-0.2h-0.6v0V8.5H8.5V7.3h1.6V5.7H11.3z"/></g></svg>',delete_row:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 13.83"><g><path d="M4.7,18.46l.12.08H19.73l.12-.08a.58.58,0,0,0,.22-.22l.08-.12,0-7.69-.08-.11a.77.77,0,0,0-.18-.18l-.11-.08-2.31,0-.08.28-.1.29a1.58,1.58,0,0,1-.12.29l-.14.34s0,0,.18,0H18.9v6H5.64v-6H7.35c.14,0,.2,0,.18,0l-.14-.34a2.85,2.85,0,0,1-.12-.29l-.1-.29-.07-.27-2.31,0-.11.08a.77.77,0,0,0-.18.18l-.08.11,0,7.69.08.12a.47.47,0,0,0,.09.12l.13.09ZM12.11,13a4,4,0,0,0,1.46-.21,4.51,4.51,0,0,0,1.31-.71A4,4,0,0,0,16.26,10a4.32,4.32,0,0,0-.08-2.54,4.34,4.34,0,0,0-1-1.52,4.15,4.15,0,0,0-1.54-1,4.34,4.34,0,0,0-1.35-.22A4.07,4.07,0,0,0,11,4.93,3.94,3.94,0,0,0,9.24,6.07,3.92,3.92,0,0,0,8.15,8.88a3.91,3.91,0,0,0,.12.95A4.16,4.16,0,0,0,12.11,13Zm2.35-4.14v.58H10.09V8.27h4.37v.58Z" transform="translate(-4.4 -4.71)"/></g></svg>',delete_column:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13.81 15.74"><g><path d="M5.66,19.42l.12.08,7.69,0,.11-.08a.77.77,0,0,0,.18-.18l.08-.11,0-2.32-.15,0-.45-.15-.42-.18-.17-.07a1,1,0,0,0,0,.27v1.63h-6V5h6V6.62a.9.9,0,0,0,0,.26l.17-.07.42-.17a3.91,3.91,0,0,1,.45-.15l.15,0,0-2.32L13.75,4a.77.77,0,0,0-.18-.18l-.11-.08H5.79l-.13.07a.63.63,0,0,0-.21.22l-.08.12V19.08l.08.12a.47.47,0,0,0,.09.12.35.35,0,0,0,.12.1Zm9-3.67a4.16,4.16,0,0,0,2.36-.51,4.08,4.08,0,0,0,1.67-1.72,4,4,0,0,0,.35-.91,3.79,3.79,0,0,0,.1-1,4.71,4.71,0,0,0-.11-1,5,5,0,0,0-.3-.87,4.25,4.25,0,0,0-1-1.25,4.49,4.49,0,0,0-1.34-.81A4.26,4.26,0,0,0,15,7.48a3.88,3.88,0,0,0-1.41.25A4.32,4.32,0,0,0,11.86,9,4,4,0,0,0,11,10.94a4.4,4.4,0,0,0-.05.68,4.5,4.5,0,0,0,.05.68,3.93,3.93,0,0,0,.61,1.57,4.22,4.22,0,0,0,1.18,1.2,4.59,4.59,0,0,0,.48.27c.2.1.37.17.5.22a2.44,2.44,0,0,0,.45.12,4.61,4.61,0,0,0,.5.07Zm2.54-4.12v.58H12.87V11h4.37v.59Z" transform="translate(-5.37 -3.76)"/></g></svg>',fixed_column_width:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M6,5H18A1,1 0 0,1 19,6A1,1 0 0,1 18,7H6A1,1 0 0,1 5,6A1,1 0 0,1 6,5M21,2V4H3V2H21M15,8H17V22H15V8M7,8H9V22H7V8M11,8H13V22H11V8Z" /></svg>',rotate_left:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M0.5,10.2c0,0.1,0,0.2,0,0.3v0.2l0,0c0.1,0.3,0.3,0.6,0.4,0.9l0,0C1,11.8,1.3,12,1.5,11.9h0.1h0.2h0.1c0.1-0.1,0.3-0.3,0.4-0.5v-0.2c0-0.1,0-0.2-0.1-0.3l0,0c-0.2-0.2-0.3-0.4-0.3-0.7l0,0C1.8,10,1.7,9.9,1.5,9.8c-0.1,0-0.2,0-0.3,0H0.9C0.7,9.9,0.6,10,0.5,10.2L0.5,10.2z"/><path d="M2.2,11.5L2.2,11.5L2.2,11.5z"/><path d="M5.9,3.6L5.9,3.6L5.9,3.6z"/><path d="M0.1,7.9c0,0.3,0,0.6,0,0.9l0,0l0,0l0,0l0,0c0,0.2,0.1,0.3,0.2,0.4l0,0c0.2,0.1,0.3,0.2,0.5,0.2l0,0l0,0c0.2,0,0.4-0.1,0.5-0.3l0,0c0-0.1,0.1-0.3,0.1-0.4V8.6l0,0c0-0.2,0-0.5,0-0.7l0,0c0-0.2-0.1-0.4-0.2-0.5C1.1,7.3,0.9,7.2,0.7,7.2S0.3,7.3,0.2,7.4C0.1,7.5,0,7.7,0.1,7.9z"/><path d="M1.9,12.7L1.9,12.7c0,0.2,0,0.4,0.2,0.5l0,0l0.2,0.3l0,0c0.2,0.1,0.3,0.2,0.5,0.4l0,0l0,0l0,0l0,0C2.9,14,3,14.1,3.2,14.1s0.4-0.1,0.5-0.2c0.1-0.2,0.2-0.3,0.2-0.5v-0.1c0-0.2-0.1-0.4-0.2-0.5l0,0l-0.4-0.4l-0.2-0.2l0,0C3,12.1,2.8,12,2.6,12l0,0c-0.2,0-0.4,0.1-0.5,0.2l0,0C2,12.3,1.9,12.5,1.9,12.7z"/><path d="M6.6,15c0,0.2,0.1,0.4,0.2,0.5c0.1,0.1,0.2,0.2,0.4,0.3l0,0c0.3,0,0.5,0,0.7,0h0.3l0,0c0.2,0,0.4-0.1,0.5-0.2c0.1-0.2,0.2-0.3,0.2-0.5l0,0l0,0c0-0.2-0.1-0.4-0.2-0.5l0,0c-0.1-0.1-0.3-0.2-0.5-0.2l0,0H7.9c-0.1,0-0.3,0-0.5,0l0,0H7.3c-0.2-0.1-0.3,0-0.5,0.1l0,0C6.7,14.6,6.6,14.8,6.6,15L6.6,15L6.6,15L6.6,15z"/><path d="M4.2,7.4C4,7.5,4,7.7,4,7.9c0,0.2,0,0.4,0.2,0.5l0,0l3.2,3.2l0,0c0.1,0.1,0.3,0.2,0.5,0.2s0.3-0.1,0.5-0.2l0,0l3.2-3.2l0,0c0.1-0.1,0.2-0.3,0.2-0.5c0-0.2-0.1-0.4-0.2-0.5l0,0C11.5,7.3,11,6.7,10,5.8l0,0L8.4,4.2l0,0C8.3,4.1,8.1,4,7.9,4S7.5,4.1,7.4,4.2L4.2,7.4L4.2,7.4z M6.8,9L5.7,7.9l2.2-2.2l2.3,2.2l-2.3,2.2C7.7,9.9,7.3,9.5,6.8,9L6.8,9z"/><path d="M4.1,14.1C4,14.2,4,14.3,4,14.4v0.2l0,0c0.1,0.1,0.2,0.3,0.4,0.4l0,0c0.3,0.1,0.6,0.2,0.9,0.4h0.1h0.1l0,0c0.2,0,0.3-0.1,0.5-0.1l0,0c0.2-0.1,0.3-0.3,0.3-0.4l0,0l0,0l0,0l0,0v-0.2c0-0.1-0.1-0.2-0.1-0.3l0,0C6.1,14.2,6,14.1,5.8,14l0,0c-0.3-0.1-0.5-0.2-0.8-0.2l0,0c-0.1-0.1-0.2-0.1-0.3-0.1H4.5C4.3,13.7,4.2,13.9,4.1,14.1z"/><path d="M9.3,14.4c0,0.1-0.1,0.3,0,0.4V15l0,0c0,0.1,0.1,0.3,0.5,0.4c0.1,0.1,0.3,0.1,0.4,0.1l0,0h0.1l0,0c0.3-0.1,0.6-0.2,0.9-0.3l0,0c0.1-0.1,0.2-0.2,0.3-0.4l0.1-0.3c0-0.1-0.1-0.2-0.1-0.3l0,0c-0.1-0.2-0.2-0.3-0.4-0.4l0,0h-0.3c-0.1,0-0.2,0-0.3,0l0,0c-0.2,0.1-0.5,0.2-0.8,0.3l0,0C9.5,14.1,9.4,14.2,9.3,14.4L9.3,14.4z"/><path d="M11.4,14.7L11.4,14.7L11.4,14.7z"/><path d="M9.5,15.3L9.5,15.3L9.5,15.3z"/><path d="M15.9,7.9c0-1-0.2-2-0.6-3l0,0c-0.4-1-1-1.9-1.7-2.6C12.8,1.6,12,1,11,0.6l0,0C10.1,0.2,9,0,8,0C7.3,0,6.5,0.1,5.8,0.3l0,0C5.2,0.5,4.6,0.8,4,1.1L3.1,0.2l0,0C2.9,0.1,2.8,0,2.6,0H2.4l0,0C2.2,0,2,0.2,1.9,0.4l0,0L0.1,4.9l0,0C0,5,0,5.1,0,5.2c0,0.2,0.1,0.4,0.2,0.5l0,0c0.2,0.1,0.3,0.2,0.5,0.2h0.1H1l0,0l4.7-1.8l0,0C5.9,4,6.1,3.8,6.1,3.6V3.4C6.1,3.2,6,3,5.9,2.9l0,0L5.1,2.1c0.4-0.2,0.8-0.4,1.3-0.5c0.5-0.1,1.1-0.2,1.7-0.2c0.9,0,1.7,0.2,2.5,0.5l0,0c0.8,0.3,1.5,0.8,2.1,1.4c0.6,0.6,1.1,1.3,1.4,2.1l0,0c0.3,0.8,0.5,1.6,0.5,2.5s-0.2,1.7-0.5,2.5l0,0c-0.3,0.8-0.8,1.5-1.4,2.1c-0.2,0.2-0.4,0.3-0.6,0.5l0,0c-0.2,0.1-0.3,0.3-0.3,0.5v0.1c0,0.1,0,0.3,0.1,0.4l0,0c0.1,0.2,0.3,0.3,0.5,0.3l0,0c0.1,0,0.3-0.1,0.4-0.2l0,0l0,0l0,0l0,0c0.2-0.2,0.5-0.4,0.7-0.6l0,0l0,0l0,0l0,0c0.7-0.8,1.3-1.6,1.7-2.6C15.6,10,15.8,9,15.9,7.9z M1.9,4C2,3.8,2.1,3.5,2.3,3.1l0,0L2.7,2l1.2,1.2L1.9,4z"/><path d="M6.8,15.5L6.8,15.5L6.8,15.5z"/></g></svg>',rotate_right:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.8 15.8"><g><path d="M9.9,15.3L9.9,15.3L9.9,15.3z"/><path d="M6.9,15.1L6.9,15.1c0,0.1,0.1,0.3,0.2,0.4l0,0c0.1,0.2,0.3,0.3,0.5,0.3l0,0h0.3c0.2,0,0.4,0,0.7,0l0,0c0.2-0.1,0.3-0.2,0.4-0.3c0.1-0.1,0.2-0.2,0.2-0.4V15c0-0.2-0.1-0.4-0.2-0.4c-0.2-0.1-0.3-0.2-0.5-0.2H8.4l0,0c-0.1,0-0.3,0-0.5,0H7.6l0,0c-0.2,0-0.4,0.1-0.5,0.2C7,14.7,6.9,14.9,6.9,15.1z"/><path d="M6.5,14.4L6.5,14.4L6.5,14.4z"/><path d="M5.8,5.8L5.8,5.8c-1,0.9-1.5,1.5-1.7,1.6l0,0C4,7.5,4,7.7,4,7.9c0,0.2,0,0.4,0.2,0.5l0,0l3.2,3.2l0,0c0.2,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2l0,0l3.2-3.2l0,0c0.1-0.1,0.2-0.3,0.2-0.5c0-0.2-0.1-0.4-0.2-0.5l0,0L8.4,4.2C8.3,4.1,8.1,4,7.9,4C7.7,4,7.5,4.1,7.4,4.2l0,0L5.8,5.8z M5.6,7.9l2.3-2.2l2.2,2.2L9,9l0,0l0,0l0,0l0,0c-0.5,0.6-0.9,0.9-1.1,1.1L5.6,7.9z"/><path d="M9,15.5L9,15.5L9,15.5z"/><path d="M9.6,14.7v0.2l0,0l0,0l0,0l0,0c0.1,0.2,0.1,0.3,0.3,0.3c0.1,0.1,0.3,0.1,0.4,0.1l0,0h0.1h0.1c0.3-0.1,0.6-0.3,0.9-0.4l0,0c0.1-0.1,0.2-0.2,0.3-0.4l0,0v-0.2c0-0.1,0-0.2-0.1-0.3c-0.1-0.2-0.2-0.3-0.4-0.4H11c-0.1,0-0.2,0.1-0.3,0.1l0,0c-0.2,0.1-0.4,0.2-0.7,0.3l0,0l0,0c-0.1,0.1-0.3,0.2-0.4,0.4C9.6,14.5,9.6,14.6,9.6,14.7z"/><path d="M9,14.5L9,14.5L9,14.5z"/><path d="M9.6,14.4L9.6,14.4L9.6,14.4z"/><path d="M11.7,14L11.7,14L11.7,14z"/><path d="M15.6,7.4L15.6,7.4L15.6,7.4z"/><path d="M15,9.4c0.2,0,0.4,0,0.6-0.2l0,0c0.1-0.1,0.2-0.2,0.2-0.4l0,0l0,0l0,0l0,0c0-0.3,0-0.6,0-0.9c0-0.2-0.1-0.4-0.2-0.5c-0.1-0.1-0.3-0.2-0.5-0.2s-0.4,0.1-0.5,0.2c-0.1,0.1-0.2,0.3-0.2,0.5l0,0c0,0.2,0,0.4,0,0.7l0,0v0.1c0,0.1,0,0.3,0.1,0.4l0,0C14.6,9.3,14.8,9.4,15,9.4L15,9.4L15,9.4z"/><path d="M14,12h0.1h0.2h0.1c0.2,0,0.5-0.2,0.6-0.4l0,0c0.2-0.3,0.3-0.6,0.4-0.9l0,0v-0.2c0-0.1-0.1-0.2-0.1-0.3c-0.1-0.2-0.2-0.3-0.4-0.4h-0.3c-0.1,0-0.2,0-0.3,0C14.2,9.9,14,10,14,10.3l0,0c-0.1,0.2-0.2,0.5-0.3,0.7l0,0c-0.1,0.1-0.1,0.2-0.1,0.3v0.2l0,0l0,0C13.6,11.6,13.8,11.8,14,12z"/><path d="M14.6,7.4L14.6,7.4L14.6,7.4z"/><path d="M4.4,14.2c-0.1,0.1-0.1,0.2-0.1,0.3l0.1,0.2c0,0.2,0.2,0.3,0.3,0.4l0,0c0.3,0.1,0.6,0.3,1.1,0.4l0,0h0.1l0,0c0.1,0,0.2-0.1,0.4-0.2c0.1,0,0.2-0.2,0.3-0.3l0,0v-0.2c0-0.1-0.1-0.3-0.2-0.4c-0.1-0.1-0.2-0.2-0.4-0.3l0,0c-0.2-0.1-0.5-0.2-0.7-0.3l0,0c-0.1,0-0.2,0-0.3,0H4.7l0,0C4.6,13.9,4.4,14,4.4,14.2L4.4,14.2z"/><path d="M11.9,13.3c0,0.2,0.1,0.4,0.2,0.6c0.1,0.1,0.3,0.2,0.5,0.2s0.4-0.1,0.5-0.2l0,0l0,0l0,0l0,0c0.1-0.1,0.3-0.3,0.4-0.4l0,0l0.2-0.3l0,0c0.1-0.2,0.2-0.3,0.2-0.5l0,0c0-0.2-0.1-0.4-0.2-0.5l0,0c-0.1-0.1-0.3-0.2-0.5-0.2l0,0c-0.2,0-0.4,0.1-0.5,0.2l0,0l-0.2,0.2l-0.4,0.4l0,0C12,13,11.9,13.1,11.9,13.3L11.9,13.3z"/><path d="M12.1,13.8L12.1,13.8L12.1,13.8z"/><path d="M11.9,13.3L11.9,13.3L11.9,13.3z"/><path d="M15.9,5.2c0-0.1-0.1-0.2-0.1-0.3l0,0L14,0.4l0,0C13.9,0.2,13.7,0,13.5,0l0,0l0,0h-0.2c-0.2,0-0.4,0.1-0.5,0.2l0,0l-0.9,0.9c-0.5-0.3-1.1-0.6-1.8-0.8l0,0C9.4,0.1,8.7,0,7.9,0c-1,0-2,0.2-3,0.6S3,1.6,2.3,2.3C1.6,3.1,1,3.9,0.6,4.9l0,0C0.2,5.8,0,6.8,0,7.9c0,1,0.2,2,0.6,3s0.9,1.8,1.7,2.6l0,0l0,0l0,0l0,0c0.2,0.2,0.5,0.4,0.7,0.6l0,0l0,0l0,0l0,0c0.2,0.1,0.3,0.2,0.5,0.2l0,0c0.2,0,0.4-0.1,0.6-0.3l0,0c0.1-0.1,0.1-0.3,0.1-0.4v-0.1l0,0C4.1,13.3,4,13.1,3.9,13l0,0c-0.2-0.1-0.4-0.3-0.6-0.5c-0.6-0.6-1.1-1.3-1.4-2.1l0,0C1.6,9.6,1.4,8.8,1.4,7.9s0.2-1.7,0.5-2.5l0,0c0.3-0.8,0.8-1.5,1.4-2.1c0.6-0.6,1.3-1.1,2.1-1.4l0,0C6.2,1.6,7,1.4,7.9,1.4c0.6,0,1.1,0.1,1.7,0.2c0.5,0.1,0.9,0.3,1.3,0.5l-0.8,0.8l0,0C10,3.1,9.9,3.2,9.9,3.4v0.2l0,0l0,0c0,0.2,0.2,0.4,0.4,0.5l0,0l4.5,1.8l0,0H15h0.1c0.2,0,0.4-0.1,0.5-0.2l0,0C15.7,5.6,15.8,5.4,15.9,5.2z M11.8,3.2L13,2l0.4,1.1l0,0c0.2,0.4,0.3,0.7,0.4,0.9L11.8,3.2z"/></g></svg>',mirror_horizontal:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.75 15.74"><g><path d="M13.75,3.76l5.9,15.74h-5.9V3.76ZM4.9,19.5,10.8,3.76V19.5H4.9Z" transform="translate(-4.9 -3.76)"/></g></svg>',mirror_vertical:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.74 14.75"><g><path d="M20.15,13.1,4.41,19V13.1H20.15ZM4.41,4.25l15.74,5.9H4.41V4.25Z" transform="translate(-4.41 -4.25)"/></g></svg>',checked:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.75 12.1"><g><path d="M4.59,12.23l.12.18L9.43,17.5a.58.58,0,0,0,.84,0L20,7.45h0a.58.58,0,0,0,0-.84l-.85-.85a.58.58,0,0,0-.84,0H18.2l-8.12,8.41a.29.29,0,0,1-.42,0l-3.4-3.63a.58.58,0,0,0-.84,0l-.85.85a.6.6,0,0,0-.14.21.51.51,0,0,0,0,.44c.05.06.1.13.16.19Z" transform="translate(-4.38 -5.58)"/></g></svg>',line_break:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19,6a1,1,0,0,0-1,1v4a1,1,0,0,1-1,1H7.41l1.3-1.29A1,1,0,0,0,7.29,9.29l-3,3a1,1,0,0,0-.21.33,1,1,0,0,0,0,.76,1,1,0,0,0,.21.33l3,3a1,1,0,0,0,1.42,0,1,1,0,0,0,0-1.42L7.41,14H17a3,3,0,0,0,3-3V7A1,1,0,0,0,19,6Z"/></svg>',audio:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" /></svg>',image_gallery:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="30 30 150 150"><g><path d="M152.775,120.548V51.651c0-12.271-9.984-22.254-22.254-22.254H43.727c-12.271,0-22.254,9.983-22.254,22.254v68.896c0,12.27,9.983,22.254,22.254,22.254h86.795C142.791,142.802,152.775,132.817,152.775,120.548z M36.394,51.651c0-4.042,3.291-7.333,7.333-7.333h86.795c4.042,0,7.332,3.291,7.332,7.333v23.917l-14.938-17.767c-1.41-1.678-3.487-2.649-5.68-2.658h-0.029c-2.184,0-4.255,0.954-5.674,2.613L76.709,98.519l-9.096-9.398c-1.427-1.474-3.392-2.291-5.448-2.273c-2.052,0.025-4.004,0.893-5.396,2.4L36.394,111.32V51.651z M41.684,127.585l20.697-22.416l9.312,9.622c1.461,1.511,3.489,2.334,5.592,2.27c2.101-0.066,4.075-1.013,5.44-2.612l34.436-40.308l20.693,24.613v21.794c0,4.042-3.29,7.332-7.332,7.332H43.727C43.018,127.88,42.334,127.775,41.684,127.585z M182.616,152.5V75.657c0-4.12-3.34-7.46-7.461-7.46c-4.119,0-7.46,3.34-7.46,7.46V152.5c0,4.112-3.347,7.46-7.461,7.46h-94c-4.119,0-7.46,3.339-7.46,7.459c0,4.123,3.341,7.462,7.46,7.462h94C172.576,174.881,182.616,164.841,182.616,152.5z"/></g></svg>',bookmark:'<svg viewBox="0 0 24 24"><path d="M17,3H7A2,2 0 0,0 5,5V21L12,18L19,21V5C19,3.89 18.1,3 17,3Z" /></svg>',download:'<svg viewBox="0 0 24 24"><path d="M2 12H4V17H20V12H22V17C22 18.11 21.11 19 20 19H4C2.9 19 2 18.11 2 17V12M12 15L17.55 9.54L16.13 8.13L13 11.25V2H11V11.25L7.88 8.13L6.46 9.55L12 15Z" /></svg>',dir_ltr:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2H9C6.79 2 5 3.79 5 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zm0 12v3H5v2h12v3l4-4-4-4z"/></svg>',dir_rtl:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M10 4v4c-1.1 0-2-.9-2-2s.9-2 2-2m8-2h-8C7.79 2 6 3.79 6 6s1.79 4 4 4v5h2V4h2v11h2V4h2V2zM8 14l-4 4 4 4v-3h12v-2H8v-3z"/></svg>',alert_outline:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11,15H13V17H11V15M11,7H13V13H11V7M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20Z" /></svg>',more_text:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 180 180"><g><path d="M49.711,142.188h49.027c2.328,0.002,4.394,1.492,5.129,3.699l9.742,29.252c0.363,1.092,1.385,1.828,2.537,1.83l15.883,0.01c0.859,0,1.667-0.412,2.17-1.109s0.641-1.594,0.37-2.41l-16.625-50.045L86.503,28.953c-0.36-1.097-1.383-1.839-2.537-1.842H64.532c-1.153-0.001-2.178,0.736-2.542,1.831L13.847,173.457c-0.271,0.816-0.135,1.713,0.369,2.412c0.503,0.697,1.311,1.109,2.171,1.109h15.872c1.151,0,2.173-0.736,2.537-1.828l9.793-29.287C45.325,143.66,47.39,142.18,49.711,142.188L49.711,142.188z M53.493,119.098l15.607-46.9c0.744-2.196,2.806-3.674,5.125-3.674s4.381,1.478,5.125,3.674l15.607,46.904c0.537,1.621,0.263,3.402-0.736,4.789c-1.018,1.408-2.649,2.24-4.386,2.24H58.615c-1.736,0-3.368-0.832-4.386-2.24C53.23,122.504,52.956,120.721,53.493,119.098L53.493,119.098z M190.465,63.32c0-2.919-1.015-5.396-3.059-7.428c-2.029-2.031-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.016-7.388,3.047c-2.029,2.032-3.056,4.498-3.056,7.386c0,2.889,1.026,5.354,3.056,7.385c2.032,2.032,4.499,3.059,7.388,3.059c2.887,0,5.354-1.026,7.383-3.059C189.45,68.633,190.465,66.178,190.465,63.32L190.465,63.32z M190.465,101.994c0-2.858-1.015-5.313-3.059-7.333c-2.029-2.042-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.005-7.388,3.047c-2.029,2.021-3.056,4.486-3.056,7.376c0,2.887,1.026,5.352,3.056,7.395c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,107.389,190.465,104.914,190.465,101.994L190.465,101.994z M190.465,140.76c0-2.918-1.015-5.395-3.059-7.438c-2.029-2.041-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.006-7.388,3.047c-2.029,2.043-3.056,4.52-3.056,7.438c0,2.922,1.026,5.398,3.056,7.439c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,146.158,190.465,143.682,190.465,140.76L190.465,140.76z"/></g></svg>',more_paragraph:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 180 180"><g><path d="M128.39,28.499H63.493c-25.558,0-46.354,20.796-46.354,46.354c0,25.559,20.796,46.353,46.354,46.353h9.271v55.625h18.542V47.04h9.271V176.83h18.543V47.04h9.271V28.499z M72.764,102.664h-9.271c-15.337,0-27.813-12.475-27.813-27.812c0-15.336,12.476-27.813,27.813-27.813h9.271V102.664z M190.465,63.32c0-2.919-1.015-5.396-3.059-7.428c-2.029-2.031-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.016-7.388,3.047c-2.029,2.032-3.056,4.498-3.056,7.386c0,2.889,1.026,5.354,3.056,7.385c2.032,2.032,4.499,3.059,7.388,3.059c2.887,0,5.354-1.026,7.383-3.059C189.45,68.633,190.465,66.178,190.465,63.32L190.465,63.32z M190.465,101.994c0-2.858-1.015-5.313-3.059-7.333c-2.029-2.042-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.005-7.388,3.047c-2.029,2.021-3.056,4.486-3.056,7.376c0,2.887,1.026,5.352,3.056,7.395c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,107.389,190.465,104.914,190.465,101.994L190.465,101.994z M190.465,140.76c0-2.918-1.015-5.395-3.059-7.438c-2.029-2.041-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.006-7.388,3.047c-2.029,2.043-3.056,4.52-3.056,7.438c0,2.922,1.026,5.398,3.056,7.439c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,146.158,190.465,143.682,190.465,140.76L190.465,140.76z"/></g></svg>',more_plus:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="35 30 140 140"><g><path d="M137.215,102.045c0,3.498-2.835,6.332-6.333,6.332H24.549c-3.498,0-6.334-2.834-6.334-6.332l0,0c0-3.498,2.836-6.333,6.334-6.333h106.333C134.38,95.711,137.215,98.547,137.215,102.045L137.215,102.045z M77.715,161.545c-3.498,0-6.333-2.836-6.333-6.334V48.878c0-3.498,2.836-6.333,6.333-6.333l0,0c3.498,0,6.334,2.835,6.334,6.333v106.333C84.049,158.709,81.213,161.545,77.715,161.545L77.715,161.545z M190.465,63.32c0-2.919-1.015-5.396-3.059-7.428c-2.029-2.031-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.016-7.388,3.047c-2.029,2.032-3.056,4.498-3.056,7.386c0,2.889,1.026,5.354,3.056,7.385c2.032,2.032,4.499,3.059,7.388,3.059c2.887,0,5.354-1.026,7.383-3.059C189.45,68.632,190.465,66.177,190.465,63.32L190.465,63.32z M190.465,101.993c0-2.858-1.015-5.313-3.059-7.333c-2.029-2.042-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.005-7.388,3.047c-2.029,2.021-3.056,4.486-3.056,7.376c0,2.888,1.026,5.353,3.056,7.396c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,107.389,190.465,104.914,190.465,101.993L190.465,101.993z M190.465,140.76c0-2.918-1.015-5.395-3.059-7.438c-2.029-2.041-4.496-3.047-7.383-3.047c-2.889,0-5.355,1.006-7.388,3.047c-2.029,2.043-3.056,4.52-3.056,7.438c0,2.922,1.026,5.398,3.056,7.439c2.032,2.021,4.499,3.047,7.388,3.047c2.887,0,5.354-1.025,7.383-3.047C189.45,146.158,190.465,143.682,190.465,140.76L190.465,140.76z"/></g></svg>',more_horizontal:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.76 3.58"><g><path d="M4.64,10.73a1.84,1.84,0,0,1,.65-.65,1.76,1.76,0,0,1,1.79,0A1.79,1.79,0,0,1,8,11.63a1.84,1.84,0,0,1-.25.9,1.69,1.69,0,0,1-.65.65,1.8,1.8,0,0,1-2.69-1.55A2.08,2.08,0,0,1,4.64,10.73Zm6.09,0a1.84,1.84,0,0,1,.65-.65,1.78,1.78,0,0,1,2.67,1.55,1.73,1.73,0,0,1-.24.9,1.84,1.84,0,0,1-.65.65,1.76,1.76,0,0,1-1.79,0,1.79,1.79,0,0,1-.64-2.44Zm6.08,0a1.69,1.69,0,0,1,.65-.65,1.76,1.76,0,0,1,1.79,0,1.79,1.79,0,0,1,.9,1.54,1.73,1.73,0,0,1-.24.9,1.84,1.84,0,0,1-.65.65,1.8,1.8,0,0,1-2.69-1.55A2,2,0,0,1,16.81,10.73Z" transform="translate(-4.39 -9.84)"/></g></svg>',more_vertical:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 3.94 15.75"><g><path d="M12.28,7.69a1.92,1.92,0,0,1-1.39-.58,2,2,0,0,1-.58-1.39,1.92,1.92,0,0,1,.58-1.39,2,2,0,0,1,1.39-.58,1.92,1.92,0,0,1,1.39.58,2,2,0,0,1,.58,1.39,1.92,1.92,0,0,1-.58,1.39,2,2,0,0,1-1.39.58Zm0,2a1.92,1.92,0,0,1,1.39.58,2,2,0,0,1,.58,1.39A1.92,1.92,0,0,1,13.67,13a2,2,0,0,1-1.39.58A1.92,1.92,0,0,1,10.89,13a2,2,0,0,1-.58-1.39,2,2,0,0,1,2-2Zm0,5.9a1.92,1.92,0,0,1,1.39.58,2,2,0,0,1,.58,1.39,1.92,1.92,0,0,1-.58,1.39,2,2,0,0,1-1.39.58,1.92,1.92,0,0,1-1.39-.58,2,2,0,0,1-.58-1.39,1.92,1.92,0,0,1,.58-1.39,1.94,1.94,0,0,1,1.39-.58Z" transform="translate(-10.31 -3.75)"/></g></svg>',attachment:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8.38 15.68"><g><path d="M15.23,6h1v9.78a3.88,3.88,0,0,1-1.31,2.45,4,4,0,0,1-6.57-2.45V7A3,3,0,0,1,9.2,4.89a3,3,0,0,1,5,2.09v8.31a1.92,1.92,0,0,1-.58,1.39,2,2,0,0,1-1.39.58,1.92,1.92,0,0,1-1.39-.58,2,2,0,0,1-.58-1.39V8h1v7.32a1,1,0,0,0,.29.69,1,1,0,0,0,.69.28A.9.9,0,0,0,13,16a1,1,0,0,0,.29-.69V7a1.92,1.92,0,0,0-.58-1.39A2,2,0,0,0,11.27,5a1.92,1.92,0,0,0-1.39.58A2,2,0,0,0,9.33,7v8.31a3,3,0,1,0,5.9,0V6Z" transform="translate(-8.08 -3.78)"/></g></svg>',map:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.7 15.62"><g><path d="M12.05,12.42a2.93,2.93,0,1,1,2.07-5A2.88,2.88,0,0,1,15,9.49a3,3,0,0,1-.86,2.07,2.89,2.89,0,0,1-2.07.86Zm0-5.36a2.43,2.43,0,0,0-1.72,4.16,2.48,2.48,0,0,0,1.72.72,2.44,2.44,0,0,0,0-4.88Zm0-3.3A5.84,5.84,0,0,1,17.9,9.62a9.94,9.94,0,0,1-1.73,5A33.59,33.59,0,0,1,12.84,19a1.52,1.52,0,0,1-.23.2,1,1,0,0,1-.55.2h0a1,1,0,0,1-.55-.2,1.52,1.52,0,0,1-.23-.2,33.59,33.59,0,0,1-3.33-4.32,9.93,9.93,0,0,1-1.72-5,5.84,5.84,0,0,1,5.85-5.86ZM12,18.34l.08.05.06-.06a35.58,35.58,0,0,0,3.06-3.93,9.35,9.35,0,0,0,1.74-4.77,4.88,4.88,0,0,0-4.88-4.88A4.79,4.79,0,0,0,8.6,6.17,4.84,4.84,0,0,0,7.17,9.62,9.29,9.29,0,0,0,8.91,14.4,36,36,0,0,0,12,18.34Z" transform="translate(-6.2 -3.76)"/></g></svg>',magic_stick:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15.73 15.75"><g><path d="M19.86,19.21a1,1,0,0,0,.28-.68,1,1,0,0,0-.28-.7L13,10.93a1,1,0,0,0-.7-.28,1,1,0,0,0-.68,1.65l6.9,6.9a1,1,0,0,0,.69.29.93.93,0,0,0,.69-.28ZM9.19,8.55a3,3,0,0,0,1.68,0,14.12,14.12,0,0,0,1.41-.32A11.26,11.26,0,0,0,10.8,7.06c-.56-.36-.86-.56-.91-.58S10,5.91,10,5.11s0-1.26-.15-1.37a4.35,4.35,0,0,0-1.19.71c-.53.4-.81.62-.87.68a9,9,0,0,0-2-.6,6.84,6.84,0,0,0-.76-.09s0,.27.08.77a8.6,8.6,0,0,0,.61,2q-.09.09-.69.87a3.59,3.59,0,0,0-.68,1.17c.12.17.57.23,1.36.15S7,9.26,7.15,9.23s.21.36.57.91a10.49,10.49,0,0,0,1.14,1.48c0-.1.14-.57.31-1.4a3,3,0,0,0,0-1.67Z" transform="translate(-4.41 -3.74)"/></g></svg>',empty_file:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12.78 15.75"><g><path d="M14.73,3.76,18.67,7.7v9.84a2,2,0,0,1-2,2H7.84a1.89,1.89,0,0,1-1.38-.58,2,2,0,0,1-.57-1.39V5.73a1.93,1.93,0,0,1,.57-1.38,2,2,0,0,1,1.38-.58h6.62l.26,0v0Zm2.95,4.92h-2a1.93,1.93,0,0,1-1.38-.57,2,2,0,0,1-.58-1.4V6.17c0-.36,0-.84,0-1.43H7.85a1,1,0,0,0-.7.29,1,1,0,0,0-.29.7V17.54a1,1,0,0,0,.29.69,1,1,0,0,0,.69.29h8.85a1,1,0,0,0,.71-.29.92.92,0,0,0,.28-.69Zm0-1L14.73,4.74v2A1,1,0,0,0,15,7.4a1,1,0,0,0,.69.29Z" transform="translate(-5.89 -3.76)"/></g></svg>'},qP={exports:{}};(function(e){(function(t,n){e.exports=t.document?n(t,!0):function(a){if(!a.document)throw new Error("SUNEDITOR_LANG a window with a document");return n(a)}})(typeof window!="undefined"?window:sn,function(t,n){const a={code:"en",toolbar:{default:"Default",save:"Save",font:"Font",formats:"Formats",fontSize:"Size",bold:"Bold",underline:"Underline",italic:"Italic",strike:"Strike",subscript:"Subscript",superscript:"Superscript",removeFormat:"Remove Format",fontColor:"Font Color",hiliteColor:"Highlight Color",indent:"Indent",outdent:"Outdent",align:"Align",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Align center",alignJustify:"Align justify",list:"List",orderList:"Ordered list",unorderList:"Unordered list",horizontalRule:"Horizontal line",hr_solid:"Solid",hr_dotted:"Dotted",hr_dashed:"Dashed",table:"Table",link:"Link",math:"Math",image:"Image",video:"Video",audio:"Audio",fullScreen:"Full screen",showBlocks:"Show blocks",codeView:"Code view",undo:"Undo",redo:"Redo",preview:"Preview",print:"print",tag_p:"Paragraph",tag_div:"Normal (DIV)",tag_h:"Header",tag_blockquote:"Quote",tag_pre:"Code",template:"Template",lineHeight:"Line height",paragraphStyle:"Paragraph style",textStyle:"Text style",imageGallery:"Image gallery",dir_ltr:"Left to right",dir_rtl:"Right to left",mention:"Mention"},dialogBox:{linkBox:{title:"Insert Link",url:"URL to link",text:"Text to display",newWindowCheck:"Open in new window",downloadLinkCheck:"Download link",bookmark:"Bookmark"},mathBox:{title:"Math",inputLabel:"Mathematical Notation",fontSizeLabel:"Font Size",previewLabel:"Preview"},imageBox:{title:"Insert image",file:"Select from files",url:"Image URL",altText:"Alternative text"},videoBox:{title:"Insert Video",file:"Select from files",url:"Media embed URL, YouTube/Vimeo"},audioBox:{title:"Insert Audio",file:"Select from files",url:"Audio URL"},browser:{tags:"Tags",search:"Search"},caption:"Insert description",close:"Close",submitButton:"Submit",revertButton:"Revert",proportion:"Constrain proportions",basic:"Basic",left:"Left",right:"Right",center:"Center",width:"Width",height:"Height",size:"Size",ratio:"Ratio"},controller:{edit:"Edit",unlink:"Unlink",remove:"Remove",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete row",insertColumnBefore:"Insert column before",insertColumnAfter:"Insert column after",deleteColumn:"Delete column",fixedColumnWidth:"Fixed column width",resize100:"Resize 100%",resize75:"Resize 75%",resize50:"Resize 50%",resize25:"Resize 25%",autoSize:"Auto size",mirrorHorizontal:"Mirror, Horizontal",mirrorVertical:"Mirror, Vertical",rotateLeft:"Rotate left",rotateRight:"Rotate right",maxSize:"Max size",minSize:"Min size",tableHeader:"Table header",mergeCells:"Merge cells",splitCells:"Split Cells",HorizontalSplit:"Horizontal split",VerticalSplit:"Vertical split"},menu:{spaced:"Spaced",bordered:"Bordered",neon:"Neon",translucent:"Translucent",shadow:"Shadow",code:"Code"}};return typeof n=="undefined"&&(t.SUNEDITOR_LANG||Object.defineProperty(t,"SUNEDITOR_LANG",{enumerable:!0,writable:!1,configurable:!1,value:{}}),Object.defineProperty(t.SUNEDITOR_LANG,"en",{enumerable:!0,writable:!0,configurable:!0,value:a})),a})})(qP);var n2e=qP.exports;const jd={_d:null,_w:null,isIE:null,isIE_Edge:null,isOSX_IOS:null,isChromium:null,isMobile:null,isResizeObserverSupported:null,_propertiesInit:function(){this._d||(this._d=document,this._w=window,this.isIE=navigator.userAgent.indexOf("Trident")>-1,this.isIE_Edge=navigator.userAgent.indexOf("Trident")>-1||navigator.appVersion.indexOf("Edge")>-1,this.isOSX_IOS=/(Mac|iPhone|iPod|iPad)/.test(navigator.platform),this.isChromium=!!window.chrome,this.isResizeObserverSupported=typeof ResizeObserver=="function",this.isMobile=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)},_allowedEmptyNodeList:".se-component, pre, blockquote, hr, li, table, img, iframe, video, audio, canvas",_HTMLConvertor:function(e){const t={"&":"&amp;","\xA0":"&nbsp;","'":"&apos;",'"':"&quot;","<":"&lt;",">":"&gt;"};return e.replace(/&|\u00A0|'|"|<|>/g,function(n){return typeof t[n]=="string"?t[n]:n})},zeroWidthSpace:String.fromCharCode(8203),zeroWidthRegExp:new RegExp(String.fromCharCode(8203),"g"),onlyZeroWidthRegExp:new RegExp("^"+String.fromCharCode(8203)+"+$"),fontValueMap:{"xx-small":1,"x-small":2,small:3,medium:4,large:5,"x-large":6,"xx-large":7},onlyZeroWidthSpace:function(e){return e==null?!1:(typeof e!="string"&&(e=e.textContent),e===""||this.onlyZeroWidthRegExp.test(e))},getXMLHttpRequest:function(){if(this._w.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch{try{return new ActiveXObject("Microsoft.XMLHTTP")}catch{return null}}else return this._w.XMLHttpRequest?new XMLHttpRequest:null},getValues:function(e){return e?this._w.Object.keys(e).map(function(t){return e[t]}):[]},camelToKebabCase:function(e){return typeof e=="string"?e.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()}):e.map(function(t){return jd.camelToKebabCase(t)})},kebabToCamelCase:function(e){return typeof e=="string"?e.replace(/-[a-zA-Z]/g,function(t){return t.replace("-","").toUpperCase()}):e.map(function(t){return jd.camelToKebabCase(t)})},createElement:function(e){return this._d.createElement(e)},createTextNode:function(e){return this._d.createTextNode(e||"")},HTMLEncoder:function(e){const t={"<":"$lt;",">":"$gt;"};return e.replace(/<|>/g,function(n){return typeof t[n]=="string"?t[n]:n})},HTMLDecoder:function(e){const t={"$lt;":"<","$gt;":">"};return e.replace(/\$lt;|\$gt;/g,function(n){return typeof t[n]=="string"?t[n]:n})},hasOwn:function(e,t){return this._hasOwn.call(e,t)},_hasOwn:Object.prototype.hasOwnProperty,getIncludePath:function(e,t){let n="";const a=[],r=t==="js"?"script":"link",i=t==="js"?"src":"href";let o="(?:";for(let d=0,u=e.length;d<u;d++)o+=e[d]+(d<u-1?"|":")");const c=new this._w.RegExp("(^|.*[\\/])"+o+"(\\.[^\\/]+)?."+t+"(?:\\?.*|;.*)?$","i"),l=new this._w.RegExp(".+\\."+t+"(?:\\?.*|;.*)?$","i");for(let d=this._d.getElementsByTagName(r),u=0;u<d.length;u++)l.test(d[u][i])&&a.push(d[u]);for(let d=0;d<a.length;d++){let u=a[d][i].match(c);if(u){n=u[0];break}}if(n===""&&(n=a.length>0?a[0][i]:""),n.indexOf(":/")===-1&&n.slice(0,2)!=="//"&&(n=n.indexOf("/")===0?location.href.match(/^.*?:\/\/[^\/]*/)[0]+n:location.href.match(/^[^\?]*\/(?:)/)[0]+n),!n)throw"[SUNEDITOR.util.getIncludePath.fail] The SUNEDITOR installation path could not be automatically detected. (name: +"+name+", extension: "+t+")";return n},getPageStyle:function(e){let t="";const n=(e||this._d).styleSheets;for(let a=0,r=n.length,i;a<r;a++){try{i=n[a].cssRules}catch{continue}if(i)for(let o=0,c=i.length;o<c;o++)t+=i[o].cssText}return t},getIframeDocument:function(e){let t=e.contentWindow||e.contentDocument;return t.document&&(t=t.document),t},getAttributesToString:function(e,t){if(!e.attributes)return"";const n=e.attributes;let a="";for(let r=0,i=n.length;r<i;r++)t&&t.indexOf(n[r].name)>-1||(a+=n[r].name+'="'+n[r].value+'" ');return a},getByteLength:function(e){if(!e||!e.toString)return 0;e=e.toString();const t=this._w.encodeURIComponent;let n,a;return this.isIE_Edge?(a=this._w.unescape(t(e)).length,n=0,t(e).match(/(%0A|%0D)/gi)!==null&&(n=t(e).match(/(%0A|%0D)/gi).length),a+n):(a=new this._w.TextEncoder("utf-8").encode(e).length,n=0,t(e).match(/(%0A|%0D)/gi)!==null&&(n=t(e).match(/(%0A|%0D)/gi).length),a+n)},isWysiwygDiv:function(e){return e&&e.nodeType===1&&(this.hasClass(e,"se-wrapper-wysiwyg")||/^BODY$/i.test(e.nodeName))},isNonEditable:function(e){return e&&e.nodeType===1&&e.getAttribute("contenteditable")==="false"},isTextStyleElement:function(e){return e&&e.nodeType!==3&&/^(strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code|summary)$/i.test(e.nodeName)},isInputElement:function(e){return e&&e.nodeType===1&&/^(INPUT|TEXTAREA)$/i.test(e.nodeName)},isFormatElement:function(e){return e&&e.nodeType===1&&(/^(P|DIV|H[1-6]|PRE|LI|TH|TD|DETAILS)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__replace_.+(\\s|$)|(\\s|^)__se__format__free_.+(\\s|$)"))&&!this.isComponent(e)&&!this.isWysiwygDiv(e)},isRangeFormatElement:function(e){return e&&e.nodeType===1&&(/^(BLOCKQUOTE|OL|UL|FIGCAPTION|TABLE|THEAD|TBODY|TR|TH|TD|DETAILS)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__range_.+(\\s|$)"))},isClosureRangeFormatElement:function(e){return e&&e.nodeType===1&&(/^(TH|TD)$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__range__closure_.+(\\s|$)"))},isFreeFormatElement:function(e){return e&&e.nodeType===1&&(/^PRE$/i.test(e.nodeName)||this.hasClass(e,"(\\s|^)__se__format__free_.+(\\s|$)"))&&!this.isComponent(e)&&!this.isWysiwygDiv(e)},isClosureFreeFormatElement:function(e){return e&&e.nodeType===1&&this.hasClass(e,"(\\s|^)__se__format__free__closure_.+(\\s|$)")},isComponent:function(e){return e&&(/se-component/.test(e.className)||/^(TABLE|HR)$/.test(e.nodeName))},isUneditableComponent:function(e){return e&&this.hasClass(e,"__se__uneditable")},isMediaComponent:function(e){return e&&/se-component/.test(e.className)},isNotCheckingNode:function(e){return e&&/katex|__se__tag/.test(e.className)},getFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&e.firstElementChild,this.isFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getRangeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&!/^(THEAD|TBODY|TR)$/i.test(e.nodeName)&&t(e))return e;e=e.parentNode}return null},getFreeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isFreeFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getClosureFreeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isClosureFreeFormatElement(e)&&t(e))return e;e=e.parentNode}return null},copyTagAttributes:function(e,t,n){if(t.style.cssText){const r=t.style;for(let i=0,o=r.length;i<o;i++)e.style[r[i]]=r[r[i]]}const a=t.attributes;for(let r=0,i=a.length,o;r<i;r++)o=a[r].name.toLowerCase(),n&&n.indexOf(o)>-1||!a[r].value?e.removeAttribute(o):o!=="style"&&e.setAttribute(a[r].name,a[r].value)},copyFormatAttributes:function(e,t){t=t.cloneNode(!1),t.className=t.className.replace(/(\s|^)__se__format__[^\s]+/g,""),this.copyTagAttributes(e,t)},getArrayItem:function(e,t,n){if(!e||e.length===0)return null;t=t||function(){return!0};const a=[];for(let r=0,i=e.length,o;r<i;r++)if(o=e[r],t(o))if(n)a.push(o);else return o;return n?a:null},arrayIncludes:function(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return!0;return!1},getArrayIndex:function(e,t){let n=-1;for(let a=0,r=e.length;a<r;a++)if(e[a]===t){n=a;break}return n},nextIdx:function(e,t){let n=this.getArrayIndex(e,t);return n===-1?-1:n+1},prevIdx:function(e,t){let n=this.getArrayIndex(e,t);return n===-1?-1:n-1},getPositionIndex:function(e){let t=0;for(;e=e.previousSibling;)t+=1;return t},getNodePath:function(e,t,n){const a=[];let r=!0;return this.getParentElement(e,function(i){if(i===t&&(r=!1),r&&!this.isWysiwygDiv(i)){if(n&&i.nodeType===3){let o=null,c=null;n.s=n.e=0;let l=i.previousSibling;for(;l&&l.nodeType===3;)c=l.textContent.replace(this.zeroWidthRegExp,""),n.s+=c.length,i.textContent=c+i.textContent,o=l,l=l.previousSibling,this.removeItem(o);let d=i.nextSibling;for(;d&&d.nodeType===3;)c=d.textContent.replace(this.zeroWidthRegExp,""),n.e+=c.length,i.textContent+=c,o=d,d=d.nextSibling,this.removeItem(o)}a.push(i)}return!1}.bind(this)),a.map(this.getPositionIndex).reverse()},getNodeFromPath:function(e,t){let n=t,a;for(let r=0,i=e.length;r<i&&(a=n.childNodes,a.length!==0);r++)a.length<=e[r]?n=a[a.length-1]:n=a[e[r]];return n},isSameAttributes:function(e,t){if(e.nodeType===3&&t.nodeType===3)return!0;if(e.nodeType===3||t.nodeType===3)return!1;const n=e.style,a=t.style;let r=0;for(let d=0,u=n.length;d<u;d++)n[n[d]]===a[n[d]]&&r++;const i=e.classList,o=t.classList,c=this._w.RegExp;let l=0;for(let d=0,u=i.length;d<u;d++)c("(s|^)"+i[d]+"(s|$)").test(o.value)&&l++;return r===a.length&&r===n.length&&l===o.length&&l===i.length},isEmptyLine:function(e){return!e||!e.parentNode||!e.querySelector("IMG, IFRAME, AUDIO, VIDEO, CANVAS, TABLE")&&e.children.length===0&&this.onlyZeroWidthSpace(e.textContent)},isSpanWithoutAttr:function(e){return!!e&&e.nodeType===1&&/^SPAN$/i.test(e.nodeName)&&!e.className&&!e.style.cssText},isList:function(e){return e&&/^(OL|UL)$/i.test(typeof e=="string"?e:e.nodeName)},isListCell:function(e){return e&&/^LI$/i.test(typeof e=="string"?e:e.nodeName)},isTable:function(e){return e&&/^(TABLE|THEAD|TBODY|TR|TH|TD)$/i.test(typeof e=="string"?e:e.nodeName)},isCell:function(e){return e&&/^(TD|TH)$/i.test(typeof e=="string"?e:e.nodeName)},isBreak:function(e){return e&&/^BR$/i.test(typeof e=="string"?e:e.nodeName)},isAnchor:function(e){return e&&/^A$/i.test(typeof e=="string"?e:e.nodeName)},isMedia:function(e){return e&&/^(IMG|IFRAME|AUDIO|VIDEO|CANVAS)$/i.test(typeof e=="string"?e:e.nodeName)},isFigures:function(e){return e&&(this.isMedia(e)||/^(FIGURE)$/i.test(typeof e=="string"?e:e.nodeName))},isNumber:function(e){return!!e&&/^-?\d+(\.\d+)?$/.test(e+"")},getNumber:function(e,t){if(!e)return 0;let n=(e+"").match(/-?\d+(\.\d+)?/);return!n||!n[0]?0:(n=n[0],t<0?n*1:t===0?this._w.Math.round(n*1):(n*1).toFixed(t)*1)},getListChildren:function(e,t){const n=[];return!e||!e.children||e.children.length===0||(t=t||function(){return!0},function a(r){if(e!==r&&t(r)&&n.push(r),r.children)for(let i=0,o=r.children.length;i<o;i++)a(r.children[i])}(e)),n},getListChildNodes:function(e,t){const n=[];return!e||e.childNodes.length===0||(t=t||function(){return!0},function a(r){e!==r&&t(r)&&n.push(r);for(let i=0,o=r.childNodes.length;i<o;i++)a(r.childNodes[i])}(e)),n},getElementDepth:function(e){if(!e||this.isWysiwygDiv(e))return-1;let t=0;for(e=e.parentNode;e&&!this.isWysiwygDiv(e);)t+=1,e=e.parentNode;return t},compareElements:function(e,t){let n=e,a=t;for(;n&&a&&n.parentNode!==a.parentNode;)n=n.parentNode,a=a.parentNode;if(!n||!a)return{ancestor:null,a:e,b:t,result:0};const r=n.parentNode.childNodes,i=this.getArrayIndex(r,n),o=this.getArrayIndex(r,a);return{ancestor:n.parentNode,a:n,b:a,result:i>o?1:i<o?-1:0}},getParentElement:function(e,t){let n;if(typeof t=="function")n=t;else{let a;/^\./.test(t)?(a="className",t=t.split(".")[1]):/^#/.test(t)?(a="id",t="^"+t.split("#")[1]+"$"):/^:/.test(t)?(a="name",t="^"+t.split(":")[1]+"$"):(a="nodeName",t="^"+t+"$");const r=new this._w.RegExp(t,"i");n=function(i){return r.test(i[a])}}for(;e&&!n(e);){if(this.isWysiwygDiv(e))return null;e=e.parentNode}return e},getPreviousDeepestNode:function(e,t){let n=e.previousSibling;if(!n){for(let a=e.parentNode;a;a=a.parentNode){if(a===t)return null;if(a.previousSibling){n=a.previousSibling;break}}if(!n)return null}for(;n.lastChild;)n=n.lastChild;return n},getNextDeepestNode:function(e,t){let n=e.nextSibling;if(!n){for(let a=e.parentNode;a;a=a.parentNode){if(a===t)return null;if(a.nextSibling){n=a.nextSibling;break}}if(!n)return null}for(;n.firstChild;)n=n.firstChild;return n},getChildElement:function(e,t,n){let a;if(typeof t=="function")a=t;else{let i;/^\./.test(t)?(i="className",t=t.split(".")[1]):/^#/.test(t)?(i="id",t="^"+t.split("#")[1]+"$"):/^:/.test(t)?(i="name",t="^"+t.split(":")[1]+"$"):(i="nodeName",t="^"+(t==="text"?"#"+t:t)+"$");const o=new this._w.RegExp(t,"i");a=function(c){return o.test(c[i])}}const r=this.getListChildNodes(e,function(i){return a(i)});return r[n?r.length-1:0]},getEdgeChildNodes:function(e,t){if(!!e){for(t||(t=e);e&&e.nodeType===1&&e.childNodes.length>0&&!this.isBreak(e);)e=e.firstChild;for(;t&&t.nodeType===1&&t.childNodes.length>0&&!this.isBreak(t);)t=t.lastChild;return{sc:e,ec:t||e}}},getOffset:function(e,t){let n=0,a=0,r=e.nodeType===3?e.parentElement:e;const i=this.getParentElement(e,this.isWysiwygDiv.bind(this));for(;r&&!this.hasClass(r,"se-container")&&r!==i;)n+=r.offsetLeft,a+=r.offsetTop,r=r.offsetParent;const o=t&&/iframe/i.test(t.nodeName);return{left:n+(o?t.parentElement.offsetLeft:0),top:a-(i?i.scrollTop:0)+(o?t.parentElement.offsetTop:0)}},getOverlapRangeAtIndex:function(e,t,n,a){if(e<=a?t<n:t>n)return 0;const r=(e>n?e:n)-(t<a?t:a);return(r<0?r*-1:r)+1},changeTxt:function(e,t){!e||!t||(e.textContent=t)},changeElement:function(e,t){if(typeof t=="string")if(e.outerHTML)e.outerHTML=t;else{const n=this.createElement("DIV");n.innerHTML=t,t=n.firstChild,e.parentNode.replaceChild(t,e)}else t.nodeType===1&&e.parentNode.replaceChild(t,e)},setStyle:function(e,t,n){e.style[t]=n,!n&&!e.style.cssText&&e.removeAttribute("style")},hasClass:function(e,t){if(!!e)return new this._w.RegExp(t).test(e.className)},addClass:function(e,t){!e||new this._w.RegExp("(\\s|^)"+t+"(\\s|$)").test(e.className)||(e.className+=(e.className.length>0?" ":"")+t)},removeClass:function(e,t){if(!e)return;const n=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").trim(),e.className.trim()||e.removeAttribute("class")},toggleClass:function(e,t){if(!e)return;let n=!1;const a=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");return a.test(e.className)?e.className=e.className.replace(a," ").trim():(e.className+=" "+t,n=!0),e.className.trim()||e.removeAttribute("class"),n},isImportantDisabled:function(e){return e.hasAttribute("data-important-disabled")},setDisabledButtons:function(e,t,n){for(let a=0,r=t.length;a<r;a++){let i=t[a];(n||!this.isImportantDisabled(i))&&(i.disabled=e),n&&(e?i.setAttribute("data-important-disabled",""):i.removeAttribute("data-important-disabled"))}},removeItem:function(e){!e||(typeof e.remove=="function"?e.remove():e.parentNode&&e.parentNode.removeChild(e))},removeItemAllParents:function(e,t,n){if(!e)return null;let a=null;return t||(t=function(r){if(r===n||this.isComponent(r))return!1;const i=r.textContent.trim();return i.length===0||/^(\n|\u200B)+$/.test(i)}.bind(this)),function r(i){if(!jd.isWysiwygDiv(i)){const o=i.parentNode;o&&t(i)&&(a={sc:i.previousElementSibling,ec:i.nextElementSibling},jd.removeItem(i),r(o))}}(e),a},detachNestedList:function(e,t){const n=this._deleteNestedList(e);let a,r;if(n){a=n.cloneNode(!1),r=n.childNodes;const o=this.getPositionIndex(e);for(;r[o];)a.appendChild(r[o])}else a=e;let i;if(t)i=this.getListChildren(a,function(o){return this.isListCell(o)&&!o.previousElementSibling}.bind(this));else{const o=this.getElementDepth(e)+2;i=this.getListChildren(e,function(c){return this.isListCell(c)&&!c.previousElementSibling&&this.getElementDepth(c)===o}.bind(this))}for(let o=0,c=i.length;o<c;o++)this._deleteNestedList(i[o]);return n&&(n.parentNode.insertBefore(a,n.nextSibling),r&&r.length===0&&this.removeItem(n)),a===e?a.parentNode:a},_deleteNestedList:function(e){const t=e.parentNode;let n=t,a=n.parentNode,r,i,o,c,l;for(;this.isListCell(a);){for(c=this.getPositionIndex(e),r=a.nextElementSibling,i=a.parentNode,o=n;o;){if(n=n.nextSibling,this.isList(o)){for(l=o.childNodes;l[c];)i.insertBefore(l[c],r);l.length===0&&this.removeItem(o)}else i.appendChild(o);o=n}n=i,a=i.parentNode}return t.children.length===0&&this.removeItem(t),i},splitElement:function(e,t,n){if(this.isWysiwygDiv(e))return e;if(t&&!this.isNumber(t)){const y=e.childNodes;let w=this.getPositionIndex(t);const v=e.cloneNode(!1),S=e.cloneNode(!1);for(let m=0,p=y.length;m<p;m++){if(m<w)v.appendChild(y[m]);else if(m>w)S.appendChild(y[m]);else continue;m--,p--,w--}return v.childNodes.length>0&&e.parentNode.insertBefore(v,e),S.childNodes.length>0&&e.parentNode.insertBefore(S,e.nextElementSibling),e}const a=e.parentNode;let r=0,i=1,o=!0,c,l,d;if((!n||n<0)&&(n=0),e.nodeType===3){if(r=this.getPositionIndex(e),t>=0&&e.length!==t){e.splitText(t);const y=this.getNodeFromPath([r+1],a);this.onlyZeroWidthSpace(y)&&(y.data=this.zeroWidthSpace)}}else if(e.nodeType===1){if(t===0){for(;e.firstChild;)e=e.firstChild;if(e.nodeType===3){const y=this.createTextNode(this.zeroWidthSpace);e.parentNode.insertBefore(y,e),e=y}}e.previousSibling?e=e.previousSibling:this.getElementDepth(e)===n&&(o=!1)}e.nodeType===1&&(i=0);let u=e;for(;this.getElementDepth(u)>n;)for(r=this.getPositionIndex(u)+i,u=u.parentNode,d=c,c=u.cloneNode(!1),l=u.childNodes,d&&(this.isListCell(c)&&this.isList(d)&&d.firstElementChild?(c.innerHTML=d.firstElementChild.innerHTML,jd.removeItem(d.firstElementChild),d.children.length>0&&c.appendChild(d)):c.appendChild(d));l[r];)c.appendChild(l[r]);u.childNodes.length<=1&&(!u.firstChild||u.firstChild.textContent.length===0)&&(u.innerHTML="<br>");const g=u.parentNode;return o&&(u=u.nextSibling),c?(this.mergeSameTags(c,null,!1),this.mergeNestedTags(c,function(y){return this.isList(y)}.bind(this)),c.childNodes.length>0?g.insertBefore(c,u):c=u,this.isListCell(c)&&c.children&&this.isList(c.children[0])&&c.insertBefore(this.createElement("BR"),c.children[0]),a.childNodes.length===0&&this.removeItem(a),c):u},mergeSameTags:function(e,t,n){const a=this,r=t?t.length:0;let i=null;return r&&(i=this._w.Array.apply(null,new this._w.Array(r)).map(this._w.Number.prototype.valueOf,0)),function o(c,l,d){const u=c.childNodes;for(let g=0,y=u.length,w,v;g<y&&(w=u[g],v=u[g+1],!!w);g++){if(n&&a._isIgnoreNodeChange(w)||!n&&(a.isTable(w)||a.isListCell(w)||a.isFormatElement(w)&&!a.isFreeFormatElement(w))){(a.isTable(w)||a.isListCell(w))&&o(w,l+1,g);continue}if(y===1&&c.nodeName===w.nodeName&&c.parentNode){if(r){let S,m,p,b,x;for(let k=0;k<r;k++)if(S=t[k],S&&S[l]===g){for(m=w,p=c,b=l,x=!0;b>=0;){if(a.getArrayIndex(p.childNodes,m)!==S[b]){x=!1;break}m=w.parentNode,p=m.parentNode,b--}x&&(S.splice(l,1),S[l]=g)}}a.copyTagAttributes(w,c),c.parentNode.insertBefore(w,c),a.removeItem(c)}if(!v){w.nodeType===1&&o(w,l+1,g);break}if(w.nodeName===v.nodeName&&a.isSameAttributes(w,v)&&w.href===v.href){const S=w.childNodes;let m=0;for(let k=0,N=S.length;k<N;k++)S[k].textContent.length>0&&m++;const p=w.lastChild,b=v.firstChild;let x=0;if(p&&b){const k=p.nodeType===3&&b.nodeType===3;x=p.textContent.length;let N=p.previousSibling;for(;N&&N.nodeType===3;)x+=N.textContent.length,N=N.previousSibling;if(m>0&&p.nodeType===3&&b.nodeType===3&&(p.textContent.length>0||b.textContent.length>0)&&m--,r){let _=null;for(let C=0;C<r;C++)if(_=t[C],_&&_[l]>g){if(l>0&&_[l-1]!==d)continue;_[l]-=1,_[l+1]>=0&&_[l]===g&&(_[l+1]+=m,k&&p&&p.nodeType===3&&b&&b.nodeType===3&&(i[C]+=x))}}}if(w.nodeType===3){if(x=w.textContent.length,w.textContent+=v.textContent,r){let k=null;for(let N=0;N<r;N++)if(k=t[N],k&&k[l]>g){if(l>0&&k[l-1]!==d)continue;k[l]-=1,k[l+1]>=0&&k[l]===g&&(k[l+1]+=m,i[N]+=x)}}}else w.innerHTML+=v.innerHTML;a.removeItem(v),g--}else w.nodeType===1&&o(w,l+1,g)}}(e,0,0),i},mergeNestedTags:function(e,t){typeof t=="string"?t=function(n){return this.test(n.tagName)}.bind(new this._w.RegExp("^("+(t||".+")+")$","i")):typeof t!="function"&&(t=function(){return!0}),function n(a){let r=a.children;if(r.length===1&&r[0].nodeName===a.nodeName&&t(a)){const i=r[0];for(r=i.children;r[0];)a.appendChild(r[0]);a.removeChild(i)}for(let i=0,o=a.children.length;i<o;i++)n(a.children[i])}(e)},removeEmptyNode:function(e,t,n){const a=this;t&&(t=a.getParentElement(t,function(r){return e===r.parentElement})),function r(i){if(a._notTextNode(i)||i===t||a.isNonEditable(i))return 0;if(i!==e&&a.onlyZeroWidthSpace(i.textContent)&&(!i.firstChild||!a.isBreak(i.firstChild))&&!i.querySelector(a._allowedEmptyNodeList)){if(i.parentNode)return i.parentNode.removeChild(i),-1}else{const o=i.children;for(let c=0,l=o.length,d=0;c<l;c++)!o[c+d]||a.isComponent(o[c+d])||(d+=r(o[c+d]))}return 0}(e),e.childNodes.length===0&&(n?this.removeItem(e):e.innerHTML="<br>")},htmlRemoveWhiteSpace:function(e){return e?e.trim().replace(/<\/?(?!strong|span|font|b|var|i|em|u|ins|s|strike|del|sub|sup|mark|a|label|code|summary)[^>^<]+>\s+(?=<)/ig,function(t){return t.replace(/\n/g,"").replace(/\s+/," ")}):""},htmlCompress:function(e){return e.replace(/\n/g,"").replace(/(>)(?:\s+)(<)/g,"$1$2")},sortByDepth:function(e,t){const n=t?1:-1,a=n*-1;e.sort(function(r,i){return!this.isListCell(r)||!this.isListCell(i)?0:(r=this.getElementDepth(r),i=this.getElementDepth(i),r>i?n:r<i?a:0)}.bind(this))},escapeStringRegexp:function(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},_isExcludeSelectionElement:function(e){return!/FIGCAPTION/i.test(e.nodeName)&&(this.isComponent(e)||/FIGURE/i.test(e.nodeName))},_isIgnoreNodeChange:function(e){return e&&e.nodeType!==3&&(this.isNonEditable(e)||!this.isTextStyleElement(e))},_isMaintainedNode:function(e){return e&&e.nodeType!==3&&/^(a|label|code|summary)$/i.test(typeof e=="string"?e:e.nodeName)},_isSizeNode:function(e){return e&&e.nodeType!==3&&this.isTextStyleElement(e)&&!!e.style.fontSize},_notTextNode:function(e){return e&&e.nodeType!==3&&(this.isComponent(e)||/^(br|input|select|canvas|img|iframe|audio|video)$/i.test(typeof e=="string"?e:e.nodeName))},_disallowedTags:function(e){return/^(meta|script|link|style|[a-z]+\:[a-z]+)$/i.test(e.nodeName)},createTagsWhitelist:function(e){return new RegExp("<\\/?\\b(?!\\b"+(e||"").replace(/\|/g,"\\b|\\b")+"\\b)[^>]*>","gi")},createTagsBlacklist:function(e){return new RegExp("<\\/?\\b(?:\\b"+(e||"^").replace(/\|/g,"\\b|\\b")+"\\b)[^>]*>","gi")},_consistencyCheckOfHTML:function(e,t,n,a){const r=[],i=[],o=[],c=[],l=this.getListChildNodes(e,function(u){if(u.nodeType!==1)return this.isList(u.parentElement)&&r.push(u),!1;if(n.test(u.nodeName)||!t.test(u.nodeName)&&u.childNodes.length===0&&this.isNotCheckingNode(u))return r.push(u),!1;const g=!this.getParentElement(u,this.isNotCheckingNode);if(!this.isTable(u)&&!this.isListCell(u)&&!this.isAnchor(u)&&(this.isFormatElement(u)||this.isRangeFormatElement(u)||this.isTextStyleElement(u))&&u.childNodes.length===0&&g)return i.push(u),!1;if(this.isList(u.parentNode)&&!this.isList(u)&&!this.isListCell(u))return o.push(u),!1;if(this.isCell(u)){const w=u.firstElementChild;if(!this.isFormatElement(w)&&!this.isRangeFormatElement(w)&&!this.isComponent(w))return c.push(u),!1}if(g&&u.className){const w=new this._w.Array(u.classList).map(a).join(" ").trim();w?u.className=w:u.removeAttribute("class")}return u.parentNode!==e&&g&&(this.isListCell(u)&&!this.isList(u.parentNode)||(this.isFormatElement(u)||this.isComponent(u))&&!this.isRangeFormatElement(u.parentNode)&&!this.getParentElement(u,this.isComponent))}.bind(this));for(let u=0,g=r.length;u<g;u++)this.removeItem(r[u]);const d=[];for(let u=0,g=l.length,y,w;u<g;u++)if(y=l[u],w=y.parentNode,!(!w||!w.parentNode))if(this.getParentElement(y,this.isListCell)){const v=y.childNodes;for(let S=v.length-1;g>=0;S--)w.insertBefore(y,v[S]);d.push(y)}else w.parentNode.insertBefore(y,w),d.push(w);for(let u=0,g=d.length,y;u<g;u++)y=d[u],this.onlyZeroWidthSpace(y.textContent.trim())&&this.removeItem(y);for(let u=0,g=i.length;u<g;u++)this.removeItem(i[u]);for(let u=0,g=o.length,y,w,v,S;u<g;u++)if(y=o[u],S=y.parentNode,!!S)if(w=this.createElement("LI"),this.isFormatElement(y)){for(v=y.childNodes;v[0];)w.appendChild(v[0]);S.insertBefore(w,y),this.removeItem(y)}else y=y.nextSibling,w.appendChild(o[u]),S.insertBefore(w,y);for(let u=0,g=c.length,y,w;u<g;u++)y=c[u],w=this.createElement("DIV"),w.innerHTML=y.textContent.trim().length===0&&y.children.length===0?"<br>":y.innerHTML,y.innerHTML=w.outerHTML},_setDefaultOptionStyle:function(e,t){let n="";e.height&&(n+="height:"+e.height+";"),e.minHeight&&(n+="min-height:"+e.minHeight+";"),e.maxHeight&&(n+="max-height:"+e.maxHeight+";"),e.position&&(n+="position:"+e.position+";"),e.width&&(n+="width:"+e.width+";"),e.minWidth&&(n+="min-width:"+e.minWidth+";"),e.maxWidth&&(n+="max-width:"+e.maxWidth+";");let a="",r="",i="";t=n+t;const o=t.split(";");for(let c=0,l=o.length,d;c<l;c++)if(d=o[c].trim(),!!d){if(/^(min-|max-)?width\s*:/.test(d)||/^(z-index|position)\s*:/.test(d)){a+=d+";";continue}if(/^(min-|max-)?height\s*:/.test(d)){/^height/.test(d)&&d.split(":")[1].trim()==="auto"&&(e.height="auto"),r+=d+";";continue}i+=d+";"}return{top:a,frame:r,editor:i}},_setIframeDocument:function(e,t){e.setAttribute("scrolling","auto"),e.contentDocument.head.innerHTML='<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">'+this._setIframeCssTags(t),e.contentDocument.body.className=t._editableClass,e.contentDocument.body.setAttribute("contenteditable",!0),e.contentDocument.body.setAttribute("autocorrect","off")},_setIframeCssTags:function(e){const t=e.iframeCSSFileName,n=this._w.RegExp;let a="";for(let r=0,i=t.length,o;r<i;r++){if(o=[],/(^https?:\/\/)|(^data:text\/css,)/.test(t[r]))o.push(t[r]);else{const c=new n("(^|.*[\\/])"+t[r]+"(\\..+)?\\.css(?:\\?.*|;.*)?$","i");for(let l=document.getElementsByTagName("link"),d=0,u=l.length,g;d<u;d++)g=l[d].href.match(c),g&&o.push(g[0])}if(!o||o.length===0)throw'[SUNEDITOR.constructor.iframe.fail] The suneditor CSS files installation path could not be automatically detected. Please set the option property "iframeCSSFileName" before creating editor instances.';for(let c=0,l=o.length;c<l;c++)a+='<link href="'+o[c]+'" rel="stylesheet">'}return a+(e.height==="auto"?`<style>
/** Iframe height auto */
body{height: min-content; overflow: hidden;}
</style>`:"")}};var zt=jd,j4={init:function(e,t){typeof t!="object"&&(t={});const n=document;this._initOptions(e,t);const a=n.createElement("DIV");a.className="sun-editor"+(t.rtl?" se-rtl":""),e.id&&(a.id="suneditor_"+e.id);const r=n.createElement("DIV");r.className="se-container";const i=this._createToolBar(n,t.buttonList,t.plugins,t),o=i.element.cloneNode(!1);o.className+=" se-toolbar-shadow",i.element.style.visibility="hidden",i.pluginCallButtons.math&&this._checkKatexMath(t.katex);const c=n.createElement("DIV");c.className="se-arrow";const l=n.createElement("DIV");l.className="se-toolbar-sticky-dummy";const d=n.createElement("DIV");d.className="se-wrapper";const u=this._initElements(t,a,i.element,c),g=u.bottomBar,y=u.wysiwygFrame,w=u.placeholder;let v=u.codeView;const S=g.resizingBar,m=g.navigation,p=g.charWrapper,b=g.charCounter,x=n.createElement("DIV");x.className="se-loading-box sun-editor-common",x.innerHTML='<div class="se-loading-effect"></div>';const k=n.createElement("DIV");k.className="se-line-breaker",k.innerHTML='<button class="se-btn">'+t.icons.line_break+"</button>";const N=n.createElement("DIV");N.className+="se-line-breaker-component";const _=N.cloneNode(!0);N.innerHTML=_.innerHTML=t.icons.line_break;const C=n.createElement("DIV");C.className="se-resizing-back";const E=n.createElement("INPUT");E.tabIndex=-1,E.style.cssText="position: absolute !important; top: -10000px !important; display: block !important; width: 0 !important; height: 0 !important; margin: 0 !important; padding: 0 !important;";const T=t.toolbarContainer;T&&(T.appendChild(i.element),T.appendChild(o));const D=t.resizingBarContainer;return S&&D&&D.appendChild(S),d.appendChild(v),w&&d.appendChild(w),T||(r.appendChild(i.element),r.appendChild(o)),r.appendChild(l),r.appendChild(d),r.appendChild(C),r.appendChild(x),r.appendChild(k),r.appendChild(N),r.appendChild(_),r.appendChild(E),S&&!D&&r.appendChild(S),a.appendChild(r),v=this._checkCodeMirror(t,v),{constructed:{_top:a,_relative:r,_toolBar:i.element,_toolbarShadow:o,_menuTray:i._menuTray,_editorArea:d,_wysiwygArea:y,_codeArea:v,_placeholder:w,_resizingBar:S,_navigation:m,_charWrapper:p,_charCounter:b,_loading:x,_lineBreaker:k,_lineBreaker_t:N,_lineBreaker_b:_,_resizeBack:C,_stickyDummy:l,_arrow:c,_focusTemp:E},options:t,plugins:i.plugins,pluginCallButtons:i.pluginCallButtons,_responsiveButtons:i.responsiveButtons}},_checkCodeMirror:function(e,t){if(e.codeMirror){const n=[{mode:"htmlmixed",htmlMode:!0,lineNumbers:!0,lineWrapping:!0},e.codeMirror.options||{}].reduce(function(r,i){for(let o in i)zt.hasOwn(i,o)&&(r[o]=i[o]);return r},{});e.height==="auto"&&(n.viewportMargin=1/0,n.height="auto");const a=e.codeMirror.src.fromTextArea(t,n);a.display.wrapper.style.cssText=t.style.cssText,e.codeMirrorEditor=a,t=a.display.wrapper,t.className+=" se-wrapper-code-mirror"}return t},_checkKatexMath:function(e){if(!e)throw Error('[SUNEDITOR.create.fail] To use the math button you need to add a "katex" object to the options.');const t=[{throwOnError:!1},e.options||{}].reduce(function(n,a){for(let r in a)zt.hasOwn(a,r)&&(n[r]=a[r]);return n},{});e.options=t},_setOptions:function(e,t,n){this._initOptions(t.element.originElement,e);const a=t.element,r=a.relative,i=a.editorArea,o=e.toolbarContainer&&e.toolbarContainer!==n.toolbarContainer,c=e.lang!==n.lang||e.buttonList!==n.buttonList||e.mode!==n.mode||o,l=this._createToolBar(document,c?e.buttonList:n.buttonList,e.plugins,e);l.pluginCallButtons.math&&this._checkKatexMath(e.katex);const d=document.createElement("DIV");d.className="se-arrow",c&&(l.element.style.visibility="hidden",o?(e.toolbarContainer.appendChild(l.element),a.toolbar.parentElement.removeChild(a.toolbar)):a.toolbar.parentElement.replaceChild(l.element,a.toolbar),a.toolbar=l.element,a._menuTray=l._menuTray,a._arrow=d);const u=this._initElements(e,a.topArea,c?l.element:a.toolbar,d),g=u.bottomBar,y=u.wysiwygFrame,w=u.placeholder;let v=u.codeView;return a.resizingBar&&zt.removeItem(a.resizingBar),g.resizingBar&&(e.resizingBarContainer&&e.resizingBarContainer!==n.resizingBarContainer?e.resizingBarContainer.appendChild(g.resizingBar):r.appendChild(g.resizingBar)),i.innerHTML="",i.appendChild(v),w&&i.appendChild(w),v=this._checkCodeMirror(e,v),a.resizingBar=g.resizingBar,a.navigation=g.navigation,a.charWrapper=g.charWrapper,a.charCounter=g.charCounter,a.wysiwygFrame=y,a.code=v,a.placeholder=w,e.rtl?zt.addClass(a.topArea,"se-rtl"):zt.removeClass(a.topArea,"se-rtl"),{callButtons:l.pluginCallButtons,plugins:l.plugins,toolbar:l}},_initElements:function(e,t,n,a){t.style.cssText=e._editorStyles.top,/inline/i.test(e.mode)?(n.className+=" se-toolbar-inline",n.style.width=e.toolbarWidth):/balloon/i.test(e.mode)&&(n.className+=" se-toolbar-balloon",n.style.width=e.toolbarWidth,n.appendChild(a));const r=document.createElement(e.iframe?"IFRAME":"DIV");if(r.className="se-wrapper-inner se-wrapper-wysiwyg",e.iframe)r.allowFullscreen=!0,r.frameBorder=0,r.style.cssText=e._editorStyles.frame,r.className+=e.className;else{r.setAttribute("contenteditable",!0),r.setAttribute("autocorrect","off"),r.setAttribute("scrolling","auto");for(let g in e.iframeAttributes)r.setAttribute(g,e.iframeAttributes[g]);r.className+=" "+e._editableClass,r.style.cssText=e._editorStyles.frame+e._editorStyles.editor,r.className+=e.className}const i=document.createElement("TEXTAREA");i.className="se-wrapper-inner se-wrapper-code"+e.className,i.style.cssText=e._editorStyles.frame,i.style.display="none",e.height==="auto"&&(i.style.overflow="hidden");let o=null,c=null,l=null,d=null;if(e.resizingBar&&(o=document.createElement("DIV"),o.className="se-resizing-bar sun-editor-common",c=document.createElement("DIV"),c.className="se-navigation sun-editor-common",o.appendChild(c),e.charCounter)){if(l=document.createElement("DIV"),l.className="se-char-counter-wrapper",e.charCounterLabel){const g=document.createElement("SPAN");g.className="se-char-label",g.textContent=e.charCounterLabel,l.appendChild(g)}if(d=document.createElement("SPAN"),d.className="se-char-counter",d.textContent="0",l.appendChild(d),e.maxCharCount>0){const g=document.createElement("SPAN");g.textContent=" / "+e.maxCharCount,l.appendChild(g)}o.appendChild(l)}let u=null;return e.placeholder&&(u=document.createElement("SPAN"),u.className="se-placeholder",u.innerText=e.placeholder),{bottomBar:{resizingBar:o,navigation:c,charWrapper:l,charCounter:d},wysiwygFrame:r,codeView:i,placeholder:u}},_initOptions:function(e,t){const n={};if(t.plugins){const i=t.plugins,o=i.length?i:Object.keys(i).map(function(c){return i[c]});for(let c=0,l=o.length,d;c<l;c++)d=o[c].default||o[c],n[d.name]=d}t.plugins=n,t.strictMode=t.strictMode!==!1,t.lang=t.lang||n2e,t.value=typeof t.value=="string"?t.value:null,t.allowedClassNames=new zt._w.RegExp((t.allowedClassNames&&typeof t.allowedClassNames=="string"?t.allowedClassNames+"|":"")+"^__se__|se-|katex"),t.historyStackDelayTime=typeof t.historyStackDelayTime=="number"?t.historyStackDelayTime:400,t.frameAttrbutes=t.frameAttrbutes||{},t.defaultTag=typeof t.defaultTag=="string"&&t.defaultTag.length>0?t.defaultTag:"p";const a=t.textTags=[{bold:"STRONG",underline:"U",italic:"EM",strike:"DEL",sub:"SUB",sup:"SUP"},t.textTags||{}].reduce(function(i,o){for(let c in o)i[c]=o[c];return i},{});t._textTagsMap={strong:a.bold.toLowerCase(),b:a.bold.toLowerCase(),u:a.underline.toLowerCase(),ins:a.underline.toLowerCase(),em:a.italic.toLowerCase(),i:a.italic.toLowerCase(),del:a.strike.toLowerCase(),strike:a.strike.toLowerCase(),s:a.strike.toLowerCase(),sub:a.sub.toLowerCase(),sup:a.sup.toLowerCase()},t._defaultCommand={bold:t.textTags.bold,underline:t.textTags.underline,italic:t.textTags.italic,strike:t.textTags.strike,subscript:t.textTags.sub,superscript:t.textTags.sup},t.__allowedScriptTag=t.__allowedScriptTag===!0;const r="br|p|div|pre|blockquote|h1|h2|h3|h4|h5|h6|ol|ul|li|hr|figure|figcaption|img|iframe|audio|video|source|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|code|svg|path|details|summary";t.tagsBlacklist=t.tagsBlacklist||"",t._defaultTagsWhitelist=(typeof t._defaultTagsWhitelist=="string"?t._defaultTagsWhitelist:r)+(t.__allowedScriptTag?"|script":""),t._editorTagsWhitelist=t.addTagsWhitelist==="*"?"*":this._setWhitelist(t._defaultTagsWhitelist+(typeof t.addTagsWhitelist=="string"&&t.addTagsWhitelist.length>0?"|"+t.addTagsWhitelist:""),t.tagsBlacklist),t.pasteTagsBlacklist=t.tagsBlacklist+(t.tagsBlacklist&&t.pasteTagsBlacklist?"|"+t.pasteTagsBlacklist:t.pasteTagsBlacklist||""),t.pasteTagsWhitelist=t.pasteTagsWhitelist==="*"?"*":this._setWhitelist(typeof t.pasteTagsWhitelist=="string"?t.pasteTagsWhitelist:t._editorTagsWhitelist,t.pasteTagsBlacklist),t.attributesWhitelist=!t.attributesWhitelist||typeof t.attributesWhitelist!="object"?null:t.attributesWhitelist,t.attributesBlacklist=!t.attributesBlacklist||typeof t.attributesBlacklist!="object"?null:t.attributesBlacklist,t.mode=t.mode||"classic",t.rtl=!!t.rtl,t.lineAttrReset=["id"].concat(t.lineAttrReset&&typeof t.lineAttrReset=="string"?t.lineAttrReset.toLowerCase().split("|"):[]),t._editableClass="sun-editor-editable"+(t.rtl?" se-rtl":""),t._printClass=typeof t._printClass=="string"?t._printClass:null,t.toolbarWidth=t.toolbarWidth?zt.isNumber(t.toolbarWidth)?t.toolbarWidth+"px":t.toolbarWidth:"auto",t.toolbarContainer=typeof t.toolbarContainer=="string"?document.querySelector(t.toolbarContainer):t.toolbarContainer,t.stickyToolbar=/balloon/i.test(t.mode)||!!t.toolbarContainer?-1:t.stickyToolbar===void 0?0:/^\d+/.test(t.stickyToolbar)?zt.getNumber(t.stickyToolbar,0):-1,t.hideToolbar=!!t.hideToolbar,t.fullScreenOffset=t.fullScreenOffset===void 0?0:/^\d+/.test(t.fullScreenOffset)?zt.getNumber(t.fullScreenOffset,0):0,t.fullPage=!!t.fullPage,t.iframe=t.fullPage||!!t.iframe,t.iframeAttributes=t.iframeAttributes||{},t.iframeCSSFileName=t.iframe?typeof t.iframeCSSFileName=="string"?[t.iframeCSSFileName]:t.iframeCSSFileName||["suneditor"]:null,t.previewTemplate=typeof t.previewTemplate=="string"?t.previewTemplate:null,t.printTemplate=typeof t.printTemplate=="string"?t.printTemplate:null,t.codeMirror=t.codeMirror?t.codeMirror.src?t.codeMirror:{src:t.codeMirror}:null,t.katex=t.katex?t.katex.src?t.katex:{src:t.katex}:null,t.mathFontSize=t.mathFontSize?t.mathFontSize:[{text:"1",value:"1em"},{text:"1.5",value:"1.5em"},{text:"2",value:"2em"},{text:"2.5",value:"2.5em"}],t.position=typeof t.position=="string"?t.position:null,t.display=t.display||(e.style.display==="none"||!e.style.display?"block":e.style.display),t.popupDisplay=t.popupDisplay||"full",t.resizingBar=t.resizingBar===void 0?!/inline|balloon/i.test(t.mode):t.resizingBar,t.showPathLabel=t.resizingBar?typeof t.showPathLabel=="boolean"?t.showPathLabel:!0:!1,t.resizeEnable=t.resizeEnable===void 0?!0:!!t.resizeEnable,t.resizingBarContainer=typeof t.resizingBarContainer=="string"?document.querySelector(t.resizingBarContainer):t.resizingBarContainer,t.charCounter=t.maxCharCount>0?!0:typeof t.charCounter=="boolean"?t.charCounter:!1,t.charCounterType=typeof t.charCounterType=="string"?t.charCounterType:"char",t.charCounterLabel=typeof t.charCounterLabel=="string"?t.charCounterLabel.trim():null,t.maxCharCount=zt.isNumber(t.maxCharCount)&&t.maxCharCount>-1?t.maxCharCount*1:null,t.width=t.width?zt.isNumber(t.width)?t.width+"px":t.width:e.clientWidth?e.clientWidth+"px":"100%",t.minWidth=(zt.isNumber(t.minWidth)?t.minWidth+"px":t.minWidth)||"",t.maxWidth=(zt.isNumber(t.maxWidth)?t.maxWidth+"px":t.maxWidth)||"",t.height=t.height?zt.isNumber(t.height)?t.height+"px":t.height:e.clientHeight?e.clientHeight+"px":"auto",t.minHeight=(zt.isNumber(t.minHeight)?t.minHeight+"px":t.minHeight)||"",t.maxHeight=(zt.isNumber(t.maxHeight)?t.maxHeight+"px":t.maxHeight)||"",t.className=typeof t.className=="string"&&t.className.length>0?" "+t.className:"",t.defaultStyle=typeof t.defaultStyle=="string"?t.defaultStyle:"",t.font=t.font?t.font:["Arial","Comic Sans MS","Courier New","Impact","Georgia","tahoma","Trebuchet MS","Verdana"],t.fontSize=t.fontSize?t.fontSize:null,t.formats=t.formats?t.formats:null,t.colorList=t.colorList?t.colorList:null,t.lineHeights=t.lineHeights?t.lineHeights:null,t.paragraphStyles=t.paragraphStyles?t.paragraphStyles:null,t.textStyles=t.textStyles?t.textStyles:null,t.fontSizeUnit=typeof t.fontSizeUnit=="string"&&t.fontSizeUnit.trim().toLowerCase()||"px",t.alignItems=typeof t.alignItems=="object"?t.alignItems:t.rtl?["right","center","left","justify"]:["left","center","right","justify"],t.imageResizing=t.imageResizing===void 0?!0:t.imageResizing,t.imageHeightShow=t.imageHeightShow===void 0?!0:!!t.imageHeightShow,t.imageAlignShow=t.imageAlignShow===void 0?!0:!!t.imageAlignShow,t.imageWidth=t.imageWidth?zt.isNumber(t.imageWidth)?t.imageWidth+"px":t.imageWidth:"auto",t.imageHeight=t.imageHeight?zt.isNumber(t.imageHeight)?t.imageHeight+"px":t.imageHeight:"auto",t.imageSizeOnlyPercentage=!!t.imageSizeOnlyPercentage,t._imageSizeUnit=t.imageSizeOnlyPercentage?"%":"px",t.imageRotation=t.imageRotation!==void 0?t.imageRotation:!(t.imageSizeOnlyPercentage||!t.imageHeightShow),t.imageFileInput=t.imageFileInput===void 0?!0:t.imageFileInput,t.imageUrlInput=t.imageUrlInput===void 0||!t.imageFileInput?!0:t.imageUrlInput,t.imageUploadHeader=t.imageUploadHeader||null,t.imageUploadUrl=typeof t.imageUploadUrl=="string"?t.imageUploadUrl:null,t.imageUploadSizeLimit=/\d+/.test(t.imageUploadSizeLimit)?zt.getNumber(t.imageUploadSizeLimit,0):null,t.imageMultipleFile=!!t.imageMultipleFile,t.imageAccept=typeof t.imageAccept!="string"||t.imageAccept.trim()==="*"?"image/*":t.imageAccept.trim()||"image/*",t.imageGalleryUrl=typeof t.imageGalleryUrl=="string"?t.imageGalleryUrl:null,t.imageGalleryHeader=t.imageGalleryHeader||null,t.videoResizing=t.videoResizing===void 0?!0:t.videoResizing,t.videoHeightShow=t.videoHeightShow===void 0?!0:!!t.videoHeightShow,t.videoAlignShow=t.videoAlignShow===void 0?!0:!!t.videoAlignShow,t.videoRatioShow=t.videoRatioShow===void 0?!0:!!t.videoRatioShow,t.videoWidth=!t.videoWidth||!zt.getNumber(t.videoWidth,0)?"":zt.isNumber(t.videoWidth)?t.videoWidth+"px":t.videoWidth,t.videoHeight=!t.videoHeight||!zt.getNumber(t.videoHeight,0)?"":zt.isNumber(t.videoHeight)?t.videoHeight+"px":t.videoHeight,t.videoSizeOnlyPercentage=!!t.videoSizeOnlyPercentage,t._videoSizeUnit=t.videoSizeOnlyPercentage?"%":"px",t.videoRotation=t.videoRotation!==void 0?t.videoRotation:!(t.videoSizeOnlyPercentage||!t.videoHeightShow),t.videoRatio=zt.getNumber(t.videoRatio,4)||.5625,t.videoRatioList=t.videoRatioList?t.videoRatioList:null,t.youtubeQuery=(t.youtubeQuery||"").replace("?",""),t.videoFileInput=!!t.videoFileInput,t.videoUrlInput=t.videoUrlInput===void 0||!t.videoFileInput?!0:t.videoUrlInput,t.videoUploadHeader=t.videoUploadHeader||null,t.videoUploadUrl=typeof t.videoUploadUrl=="string"?t.videoUploadUrl:null,t.videoUploadSizeLimit=/\d+/.test(t.videoUploadSizeLimit)?zt.getNumber(t.videoUploadSizeLimit,0):null,t.videoMultipleFile=!!t.videoMultipleFile,t.videoTagAttrs=t.videoTagAttrs||null,t.videoIframeAttrs=t.videoIframeAttrs||null,t.videoAccept=typeof t.videoAccept!="string"||t.videoAccept.trim()==="*"?"video/*":t.videoAccept.trim()||"video/*",t.audioWidth=t.audioWidth?zt.isNumber(t.audioWidth)?t.audioWidth+"px":t.audioWidth:"",t.audioHeight=t.audioHeight?zt.isNumber(t.audioHeight)?t.audioHeight+"px":t.audioHeight:"",t.audioFileInput=!!t.audioFileInput,t.audioUrlInput=t.audioUrlInput===void 0||!t.audioFileInput?!0:t.audioUrlInput,t.audioUploadHeader=t.audioUploadHeader||null,t.audioUploadUrl=typeof t.audioUploadUrl=="string"?t.audioUploadUrl:null,t.audioUploadSizeLimit=/\d+/.test(t.audioUploadSizeLimit)?zt.getNumber(t.audioUploadSizeLimit,0):null,t.audioMultipleFile=!!t.audioMultipleFile,t.audioTagAttrs=t.audioTagAttrs||null,t.audioAccept=typeof t.audioAccept!="string"||t.audioAccept.trim()==="*"?"audio/*":t.audioAccept.trim()||"audio/*",t.tableCellControllerPosition=typeof t.tableCellControllerPosition=="string"?t.tableCellControllerPosition.toLowerCase():"cell",t.linkTargetNewWindow=!!t.linkTargetNewWindow,t.linkProtocol=typeof t.linkProtocol=="string"?t.linkProtocol:null,t.linkRel=Array.isArray(t.linkRel)?t.linkRel:[],t.linkRelDefault=t.linkRelDefault||{},t.tabDisable=!!t.tabDisable,t.shortcutsDisable=Array.isArray(t.shortcutsDisable)?t.shortcutsDisable:[],t.shortcutsHint=t.shortcutsHint===void 0?!0:!!t.shortcutsHint,t.callBackSave=t.callBackSave?t.callBackSave:null,t.templates=t.templates?t.templates:null,t.placeholder=typeof t.placeholder=="string"?t.placeholder:null,t.mediaAutoSelect=t.mediaAutoSelect===void 0?!0:!!t.mediaAutoSelect,t.buttonList=t.buttonList?t.buttonList:[["undo","redo"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["outdent","indent"],["fullScreen","showBlocks","codeView"],["preview","print"]],t.rtl&&(t.buttonList=t.buttonList.reverse()),t.icons=!t.icons||typeof t.icons!="object"?Z7:[Z7,t.icons].reduce(function(i,o){for(let c in o)zt.hasOwn(o,c)&&(i[c]=o[c]);return i},{}),t.icons=t.rtl?[t.icons,t.icons.rtl].reduce(function(i,o){for(let c in o)zt.hasOwn(o,c)&&(i[c]=o[c]);return i},{}):t.icons,t.__listCommonStyle=t.__listCommonStyle||["fontSize","color","fontFamily","fontWeight","fontStyle"],t._editorStyles=zt._setDefaultOptionStyle(t,t.defaultStyle)},_setWhitelist:function(e,t){if(typeof t!="string")return e;t=t.split("|"),e=e.split("|");for(let n=0,a=t.length,r;n<a;n++)r=e.indexOf(t[n]),r>-1&&e.splice(r,1);return e.join("|")},_defaultButtons:function(e){const t=e.icons,n=e.lang,a=zt.isOSX_IOS?"\u2318":"CTRL",r=zt.isOSX_IOS?"\u21E7":"+SHIFT",i=e.shortcutsHint?e.shortcutsDisable:["bold","strike","underline","italic","undo","indent","save"],o=e.rtl?["[","]"]:["]","["],c=e.rtl?[t.outdent,t.indent]:[t.indent,t.outdent];return{bold:["",n.toolbar.bold+'<span class="se-shortcut">'+(i.indexOf("bold")>-1?"":a+'+<span class="se-shortcut-key">B</span>')+"</span>","bold","",t.bold],underline:["",n.toolbar.underline+'<span class="se-shortcut">'+(i.indexOf("underline")>-1?"":a+'+<span class="se-shortcut-key">U</span>')+"</span>","underline","",t.underline],italic:["",n.toolbar.italic+'<span class="se-shortcut">'+(i.indexOf("italic")>-1?"":a+'+<span class="se-shortcut-key">I</span>')+"</span>","italic","",t.italic],strike:["",n.toolbar.strike+'<span class="se-shortcut">'+(i.indexOf("strike")>-1?"":a+r+'+<span class="se-shortcut-key">S</span>')+"</span>","strike","",t.strike],subscript:["",n.toolbar.subscript,"SUB","",t.subscript],superscript:["",n.toolbar.superscript,"SUP","",t.superscript],removeFormat:["",n.toolbar.removeFormat,"removeFormat","",t.erase],indent:["",n.toolbar.indent+'<span class="se-shortcut">'+(i.indexOf("indent")>-1?"":a+'+<span class="se-shortcut-key">'+o[0]+"</span>")+"</span>","indent","",c[0]],outdent:["",n.toolbar.outdent+'<span class="se-shortcut">'+(i.indexOf("indent")>-1?"":a+'+<span class="se-shortcut-key">'+o[1]+"</span>")+"</span>","outdent","",c[1]],fullScreen:["se-code-view-enabled se-resizing-enabled",n.toolbar.fullScreen,"fullScreen","",t.expansion],showBlocks:["",n.toolbar.showBlocks,"showBlocks","",t.show_blocks],codeView:["se-code-view-enabled se-resizing-enabled",n.toolbar.codeView,"codeView","",t.code_view],undo:["",n.toolbar.undo+'<span class="se-shortcut">'+(i.indexOf("undo")>-1?"":a+'+<span class="se-shortcut-key">Z</span>')+"</span>","undo","",t.undo],redo:["",n.toolbar.redo+'<span class="se-shortcut">'+(i.indexOf("undo")>-1?"":a+'+<span class="se-shortcut-key">Y</span> / '+a+r+'+<span class="se-shortcut-key">Z</span>')+"</span>","redo","",t.redo],preview:["se-resizing-enabled",n.toolbar.preview,"preview","",t.preview],print:["se-resizing-enabled",n.toolbar.print,"print","",t.print],dir:["",n.toolbar[e.rtl?"dir_ltr":"dir_rtl"],"dir","",t[e.rtl?"dir_ltr":"dir_rtl"]],dir_ltr:["",n.toolbar.dir_ltr,"dir_ltr","",t.dir_ltr],dir_rtl:["",n.toolbar.dir_rtl,"dir_rtl","",t.dir_rtl],save:["se-resizing-enabled",n.toolbar.save+'<span class="se-shortcut">'+(i.indexOf("save")>-1?"":a+'+<span class="se-shortcut-key">S</span>')+"</span>","save","",t.save],blockquote:["",n.toolbar.tag_blockquote,"blockquote","command",t.blockquote],font:["se-btn-select se-btn-tool-font",n.toolbar.font,"font","submenu",'<span class="txt">'+n.toolbar.font+"</span>"+t.arrow_down],formatBlock:["se-btn-select se-btn-tool-format",n.toolbar.formats,"formatBlock","submenu",'<span class="txt">'+n.toolbar.formats+"</span>"+t.arrow_down],fontSize:["se-btn-select se-btn-tool-size",n.toolbar.fontSize,"fontSize","submenu",'<span class="txt">'+n.toolbar.fontSize+"</span>"+t.arrow_down],fontColor:["",n.toolbar.fontColor,"fontColor","submenu",t.font_color],hiliteColor:["",n.toolbar.hiliteColor,"hiliteColor","submenu",t.highlight_color],align:["se-btn-align",n.toolbar.align,"align","submenu",e.rtl?t.align_right:t.align_left],list:["",n.toolbar.list,"list","submenu",t.list_number],horizontalRule:["btn_line",n.toolbar.horizontalRule,"horizontalRule","submenu",t.horizontal_rule],table:["",n.toolbar.table,"table","submenu",t.table],lineHeight:["",n.toolbar.lineHeight,"lineHeight","submenu",t.line_height],template:["",n.toolbar.template,"template","submenu",t.template],paragraphStyle:["",n.toolbar.paragraphStyle,"paragraphStyle","submenu",t.paragraph_style],textStyle:["",n.toolbar.textStyle,"textStyle","submenu",t.text_style],link:["",n.toolbar.link,"link","dialog",t.link],image:["",n.toolbar.image,"image","dialog",t.image],video:["",n.toolbar.video,"video","dialog",t.video],audio:["",n.toolbar.audio,"audio","dialog",t.audio],math:["",n.toolbar.math,"math","dialog",t.math],imageGallery:["",n.toolbar.imageGallery,"imageGallery","fileBrowser",t.image_gallery]}},_createModuleGroup:function(){const e=zt.createElement("DIV");e.className="se-btn-module se-btn-module-border";const t=zt.createElement("UL");return t.className="se-menu-list",e.appendChild(t),{div:e,ul:t}},_createButton:function(e,t,n,a,r,i,o){const c=zt.createElement("LI"),l=zt.createElement("BUTTON"),d=t||n;return l.setAttribute("type","button"),l.setAttribute("class","se-btn"+(e?" "+e:"")+" se-tooltip"),l.setAttribute("data-command",n),l.setAttribute("data-display",a),l.setAttribute("aria-label",d.replace(/<span .+<\/span>/,"")),l.setAttribute("tabindex","-1"),r||(r='<span class="se-icon-text">!</span>'),/^default\./i.test(r)&&(r=o[r.replace(/^default\./i,"")]),/^text\./i.test(r)&&(r=r.replace(/^text\./i,""),l.className+=" se-btn-more-text"),r+='<span class="se-tooltip-inner"><span class="se-tooltip-text">'+d+"</span></span>",i&&l.setAttribute("disabled",!0),l.innerHTML=r,c.appendChild(l),{li:c,button:l}},_createToolBar:function(e,t,n,a){const r=e.createElement("DIV");r.className="se-toolbar-separator-vertical";const i=e.createElement("DIV");i.className="se-toolbar sun-editor-common";const o=e.createElement("DIV");o.className="se-btn-tray",i.appendChild(o),t=JSON.parse(JSON.stringify(t));const c=a.icons,l=this._defaultButtons(a),d={},u=[];let g=null,y=null,w=null,v=null,S="",m=!1;const p=zt.createElement("DIV");p.className="se-toolbar-more-layer";e:for(let k=0,N,_,C,E,T;k<t.length;k++)if(N=!1,T="",E=t[k],w=this._createModuleGroup(),typeof E=="object"){for(let D=0,P;D<E.length;D++){if(y=E[D],P=!1,/^\%\d+/.test(y)&&D===0){E[0]=y.replace(/[^\d]/g,""),u.push(E),t.splice(k--,1);continue e}if(typeof y=="object")typeof y.add=="function"?(S=y.name,g=l[S],n[S]=y):(S=y.name,g=[y.buttonClass,y.title,y.name,y.dataDisplay,y.innerHTML,y._disabled]);else{if(/^\-/.test(y)){T=y.substr(1),w.div.className+=" module-float-"+T;continue}if(/^\#/.test(y)){y.substr(1)==="fix"&&(w.ul.className+=" se-menu-dir-fix");continue}if(/^\:/.test(y)){P=!0;const M=y.match(/^\:([^\-]+)\-([^\-]+)\-([^\-]+)/);C="__se__"+M[1].trim();const O=M[2].trim(),F=M[3].trim();g=["se-btn-more",O,C,"MORE",F]}else g=l[y];if(S=y,!g){const M=n[S];if(!M)throw Error("[SUNEDITOR.create.toolbar.fail] The button name of a plugin that does not exist. ["+S+"]");g=[M.buttonClass,M.title,M.name,M.display,M.innerHTML,M._disabled]}}v=this._createButton(g[0],g[1],g[2],g[3],g[4],g[5],c),(N?_:w.ul).appendChild(v.li),n[S]&&(d[S]=v.button),P&&(N=!0,_=zt.createElement("DIV"),_.className="se-more-layer "+C,_.innerHTML='<div class="se-more-form"><ul class="se-menu-list"'+(T?' style="float: '+T+';"':"")+"></ul></div>",p.appendChild(_),_=_.firstElementChild.firstElementChild)}if(m){const D=r.cloneNode(!1);o.appendChild(D)}o.appendChild(w.div),m=!0}else if(/^\/$/.test(E)){const D=e.createElement("DIV");D.className="se-btn-module-enter",o.appendChild(D),m=!1}switch(o.children.length){case 0:o.style.display="none";break;case 1:zt.removeClass(o.firstElementChild,"se-btn-module-border");break;default:if(a.rtl){const k=r.cloneNode(!1);k.style.float=o.lastElementChild.style.float,o.appendChild(k)}}u.length>0&&u.unshift(t),p.children.length>0&&o.appendChild(p);const b=e.createElement("DIV");b.className="se-menu-tray",i.appendChild(b);const x=e.createElement("DIV");return x.className="se-toolbar-cover",i.appendChild(x),a.hideToolbar&&(i.style.display="none"),{element:i,plugins:n,pluginCallButtons:d,responsiveButtons:u,_menuTray:b,_buttonTray:o}}};const a2e=function(e,t,n){return{element:{originElement:e,topArea:t._top,relative:t._relative,toolbar:t._toolBar,_toolbarShadow:t._toolbarShadow,_buttonTray:t._toolBar.querySelector(".se-btn-tray"),_menuTray:t._menuTray,resizingBar:t._resizingBar,navigation:t._navigation,charWrapper:t._charWrapper,charCounter:t._charCounter,editorArea:t._editorArea,wysiwygFrame:t._wysiwygArea,wysiwyg:t._wysiwygArea,code:t._codeArea,placeholder:t._placeholder,loading:t._loading,lineBreaker:t._lineBreaker,lineBreaker_t:t._lineBreaker_t,lineBreaker_b:t._lineBreaker_b,resizeBackground:t._resizeBack,_stickyDummy:t._stickyDummy,_arrow:t._arrow,_focusTemp:t._focusTemp},tool:{cover:t._toolBar.querySelector(".se-toolbar-cover"),bold:t._toolBar.querySelector('[data-command="bold"]'),underline:t._toolBar.querySelector('[data-command="underline"]'),italic:t._toolBar.querySelector('[data-command="italic"]'),strike:t._toolBar.querySelector('[data-command="strike"]'),sub:t._toolBar.querySelector('[data-command="SUB"]'),sup:t._toolBar.querySelector('[data-command="SUP"]'),undo:t._toolBar.querySelector('[data-command="undo"]'),redo:t._toolBar.querySelector('[data-command="redo"]'),save:t._toolBar.querySelector('[data-command="save"]'),outdent:t._toolBar.querySelector('[data-command="outdent"]'),indent:t._toolBar.querySelector('[data-command="indent"]'),fullScreen:t._toolBar.querySelector('[data-command="fullScreen"]'),showBlocks:t._toolBar.querySelector('[data-command="showBlocks"]'),codeView:t._toolBar.querySelector('[data-command="codeView"]'),dir:t._toolBar.querySelector('[data-command="dir"]'),dir_ltr:t._toolBar.querySelector('[data-command="dir_ltr"]'),dir_rtl:t._toolBar.querySelector('[data-command="dir_rtl"]')},options:n,option:n}};var z4=a2e;function r2e(e,t){const n=e._w,a=e.util,r=e.options.historyStackDelayTime;let i=e.context.element,o=e.context.tool.undo,c=e.context.tool.redo,l=null,d=0,u=[];function g(){const w=u[d];i.wysiwyg.innerHTML=w.contents,e.setRange(a.getNodeFromPath(w.s.path,i.wysiwyg),w.s.offset,a.getNodeFromPath(w.e.path,i.wysiwyg),w.e.offset),e.focus(),u.length<=1?(o&&o.setAttribute("disabled",!0),c&&c.setAttribute("disabled",!0)):d===0?(o&&o.setAttribute("disabled",!0),c&&c.removeAttribute("disabled")):d===u.length-1?(o&&o.removeAttribute("disabled"),c&&c.setAttribute("disabled",!0)):(o&&o.removeAttribute("disabled"),c&&c.removeAttribute("disabled")),e.controllersOff(),e._checkComponents(),e._setCharCount(),e._resourcesStateChange(),t()}function y(){e._checkComponents();const w=i.wysiwyg.innerHTML;if(!w||!!u[d]&&w===u[d].contents)return;d++;const v=e._variable._range;u.length>d&&(u=u.slice(0,d),c&&c.setAttribute("disabled",!0)),v?u[d]={contents:w,s:{path:a.getNodePath(v.startContainer,null,null),offset:v.startOffset},e:{path:a.getNodePath(v.endContainer,null,null),offset:v.endOffset}}:u[d]={contents:w,s:{path:[0,0],offset:[0,0]},e:{path:0,offset:0}},d===1&&o&&o.removeAttribute("disabled"),e._setCharCount(),t()}return{stack:u,push:function(w){n.setTimeout(e._resourcesStateChange.bind(e));const v=typeof w=="number"?w>0?w:0:w?r:0;if((!v||l)&&(n.clearTimeout(l),!v)){y();return}l=n.setTimeout(function(){n.clearTimeout(l),l=null,y()},v)},undo:function(){d>0&&(d--,g())},redo:function(){u.length-1>d&&(d++,g())},go:function(w){d=w<0?u.length-1:w,g()},getCurrentIndex:function(){return d},reset:function(w){o&&o.setAttribute("disabled",!0),c&&c.setAttribute("disabled",!0),e._variable.isChanged=!1,e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0),u.splice(0),d=0,u[d]={contents:e.getContents(!0),s:{path:[0,0],offset:0},e:{path:[0,0],offset:0}},w||t()},_resetCachingButton:function(){i=e.context.element,o=e.context.tool.undo,c=e.context.tool.redo,d===0?(o&&o.setAttribute("disabled",!0),c&&d===u.length-1&&c.setAttribute("disabled",!0),e._variable.isChanged=!1,e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0)):d===u.length-1&&c&&c.setAttribute("disabled",!0)},_destroy:function(){l&&n.clearTimeout(l),u=null}}}var Q7={name:"notice",add:function(e){const t=e.context;t.notice={};let n=e.util.createElement("DIV"),a=e.util.createElement("SPAN"),r=e.util.createElement("BUTTON");n.className="se-notice",r.className="close",r.setAttribute("aria-label","Close"),r.setAttribute("title",e.lang.dialogBox.close),r.innerHTML=e.icons.cancel,n.appendChild(a),n.appendChild(r),t.notice.modal=n,t.notice.message=a,r.addEventListener("click",this.onClick_cancel.bind(e)),t.element.editorArea.appendChild(n),n=null},onClick_cancel:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.notice.close.call(this)},open:function(e){this.context.notice.message.textContent=e,this.context.notice.modal.style.display="block"},close:function(){this.context.notice.modal.style.display="none"}};function s2e(e,t,n,a,r,i){const o=e.element.originElement.ownerDocument||document,c=o.defaultView||window,l=zt,d=r.icons,u={_d:o,_w:c,_parser:new c.DOMParser,_prevRtl:r.rtl,_editorHeight:0,_editorHeightPadding:0,_listCamel:r.__listCommonStyle,_listKebab:l.camelToKebabCase(r.__listCommonStyle),__focusTemp:e.element._focusTemp,_wd:null,_ww:null,_shadowRoot:null,_shadowRootControllerEventTarget:null,util:l,functions:null,options:null,wwComputedStyle:null,notice:Q7,icons:d,history:null,context:e,pluginCallButtons:t,plugins:n||{},initPlugins:{},_targetPlugins:{},_menuTray:{},lang:a,effectNode:null,submenu:null,container:null,_submenuName:"",_bindedSubmenuOff:null,_bindedContainerOff:null,submenuActiveButton:null,containerActiveButton:null,controllerArray:[],currentControllerName:"",currentControllerTarget:null,currentFileComponentInfo:null,codeViewDisabledButtons:[],resizingDisabledButtons:[],_moreLayerActiveButton:null,_htmlCheckWhitelistRegExp:null,_htmlCheckBlacklistRegExp:null,_disallowedTextTagsRegExp:null,editorTagsWhitelistRegExp:null,editorTagsBlacklistRegExp:null,pasteTagsWhitelistRegExp:null,pasteTagsBlacklistRegExp:null,hasFocus:!1,isDisabled:!1,isReadOnly:!1,_attributesWhitelistRegExp:null,_attributesWhitelistRegExp_all_data:null,_attributesBlacklistRegExp:null,_attributesTagsWhitelist:null,_attributesTagsBlacklist:null,_bindControllersOff:null,_isInline:null,_isBalloon:null,_isBalloonAlways:null,_inlineToolbarAttr:{top:"",width:"",isShow:!1},_notHideToolbar:!1,_sticky:!1,_antiBlur:!1,_lineBreaker:null,_lineBreakerButton:null,_componentsInfoInit:!0,_componentsInfoReset:!1,activePlugins:null,managedTagsInfo:null,_charTypeHTML:!1,_fileInfoPluginsCheck:null,_fileInfoPluginsReset:null,_fileManager:{tags:null,regExp:null,queryString:null,pluginRegExp:null,pluginMap:null},commandMap:{},_commandMapStyles:{STRONG:["font-weight"],U:["text-decoration"],EM:["font-style"],DEL:["text-decoration"]},_styleCommandMap:null,_cleanStyleRegExp:{div:new c.RegExp("\\s*[^-a-zA-Z](.+)\\s*:[^;]+(?!;)*","ig"),span:new c.RegExp("\\s*[^-a-zA-Z](font-family|font-size|color|background-color)\\s*:[^;]+(?!;)*","ig"),format:new c.RegExp("\\s*[^-a-zA-Z](text-align|margin-left|margin-right|width|height|line-height)\\s*:[^;]+(?!;)*","ig"),fontSizeUnit:new c.RegExp("\\d+"+r.fontSizeUnit+"$","i")},_variable:{isChanged:!1,isCodeView:!1,isFullScreen:!1,innerHeight_fullScreen:0,resizeClientY:0,tabSize:4,codeIndent:2,minResizingSize:l.getNumber(e.element.wysiwygFrame.style.minHeight||"65",0),currentNodes:[],currentNodesMap:[],_range:null,_selectionNode:null,_originCssText:e.element.topArea.style.cssText,_bodyOverflow:"",_editorAreaOriginCssText:"",_wysiwygOriginCssText:"",_codeOriginCssText:"",_fullScreenAttrs:{sticky:!1,balloon:!1,inline:!1},_lineBreakComp:null,_lineBreakDir:""},_formatAttrsTemp:null,_saveButtonStates:function(){this.allCommandButtons||(this.allCommandButtons={});const m=this.context.element._buttonTray.querySelectorAll(".se-menu-list button[data-display]");for(let p=0,b,x;p<m.length;p++)b=m[p],x=b.getAttribute("data-command"),this.allCommandButtons[x]=b},_recoverButtonStates:function(){if(this.allCommandButtons){const m=this.context.element._buttonTray.querySelectorAll(".se-menu-list button[data-display]");for(let p=0,b,x,k;p<m.length;p++)b=m[p],x=b.getAttribute("data-command"),k=this.allCommandButtons[x],k&&(b.parentElement.replaceChild(k,b),this.context.tool[x]&&(this.context.tool[x]=k))}},callPlugin:function(m,p,b){if(b=b||t[m],this.plugins[m])this.initPlugins[m]?typeof this._targetPlugins[m]=="object"&&!!b&&this.initMenuTarget(m,b,this._targetPlugins[m]):(this.plugins[m].add(this,b),this.initPlugins[m]=!0);else throw Error('[SUNEDITOR.core.callPlugin.fail] The called plugin does not exist or is in an invalid format. (pluginName:"'+m+'")');this.plugins[m].active&&!this.commandMap[m]&&!!b&&(this.commandMap[m]=b,this.activePlugins.push(m)),typeof p=="function"&&p()},addModule:function(m){for(let p=0,b=m.length,x;p<b;p++)x=m[p].name,this.plugins[x]||(this.plugins[x]=m[p]),this.initPlugins[x]||(this.initPlugins[x]=!0,typeof this.plugins[x].add=="function"&&this.plugins[x].add(this))},getGlobalScrollOffset:function(){let m=0,p=0,b=e.element.topArea;for(;b;)m+=b.scrollTop,p+=b.scrollLeft,b=b.parentElement;for(b=this._shadowRoot?this._shadowRoot.host:null;b;)m+=b.scrollTop,p+=b.scrollLeft,b=b.parentElement;return{top:m,left:p}},initMenuTarget:function(m,p,b){p?(e.element._menuTray.appendChild(b),this._targetPlugins[m]=!0,this._menuTray[p.getAttribute("data-command")]=b):this._targetPlugins[m]=b},submenuOn:function(m){this._bindedSubmenuOff&&this._bindedSubmenuOff(),this._bindControllersOff&&this.controllersOff();const p=this._submenuName=m.getAttribute("data-command"),b=this.submenu=this._menuTray[p];this.submenuActiveButton=m,this._setMenuPosition(m,b),this._bindedSubmenuOff=this.submenuOff.bind(this),this.addDocEvent("mousedown",this._bindedSubmenuOff,!1),this.plugins[p].on&&this.plugins[p].on.call(this),this._antiBlur=!0},submenuOff:function(){this.removeDocEvent("mousedown",this._bindedSubmenuOff),this._bindedSubmenuOff=null,this.submenu&&(this._submenuName="",this.submenu.style.display="none",this.submenu=null,l.removeClass(this.submenuActiveButton,"on"),this.submenuActiveButton=null,this._notHideToolbar=!1),this._antiBlur=!1},moreLayerOff:function(){if(this._moreLayerActiveButton){const m=e.element.toolbar.querySelector("."+this._moreLayerActiveButton.getAttribute("data-command"));m.style.display="none",l.removeClass(this._moreLayerActiveButton,"on"),this._moreLayerActiveButton=null}},containerOn:function(m){this._bindedContainerOff&&this._bindedContainerOff();const p=this._containerName=m.getAttribute("data-command"),b=this.container=this._menuTray[p];this.containerActiveButton=m,this._setMenuPosition(m,b),this._bindedContainerOff=this.containerOff.bind(this),this.addDocEvent("mousedown",this._bindedContainerOff,!1),this.plugins[p].on&&this.plugins[p].on.call(this),this._antiBlur=!0},containerOff:function(){this.removeDocEvent("mousedown",this._bindedContainerOff),this._bindedContainerOff=null,this.container&&(this._containerName="",this.container.style.display="none",this.container=null,l.removeClass(this.containerActiveButton,"on"),this.containerActiveButton=null,this._notHideToolbar=!1),this._antiBlur=!1},_setMenuPosition:function(m,p){p.style.visibility="hidden",p.style.display="block",p.style.height="",l.addClass(m,"on");const b=this.context.element.toolbar,x=b.offsetWidth,k=g._getEditorOffsets(e.element.toolbar),N=p.offsetWidth,_=m.parentElement.offsetLeft+3;if(r.rtl){const F=m.offsetWidth,z=N>F?N-F:0,H=z>0?0:F-N;p.style.left=_-z+H+"px",k.left>g._getEditorOffsets(p).left&&(p.style.left="0px")}else{const F=x<=N?0:x-(_+N);F<0?p.style.left=_+F+"px":p.style.left=_+"px"}let C=0,E=m;for(;E&&E!==b;)C+=E.offsetTop,E=E.offsetParent;const T=C;this._isBalloon?C+=b.offsetTop+m.offsetHeight:C-=m.offsetHeight;const D=k.top,P=p.offsetHeight,M=this.getGlobalScrollOffset().top,O=c.innerHeight-(D-M+T+m.parentElement.offsetHeight);if(O<P){let F=-1*(P-T+3);const z=D-M+F,H=P+(z<0?z:0);H>O?(p.style.height=H+"px",F=-1*(H-T+3)):(p.style.height=O+"px",F=T+m.parentElement.offsetHeight),p.style.top=F+"px"}else p.style.top=T+m.parentElement.offsetHeight+"px";p.style.visibility=""},controllersOn:function(){this._bindControllersOff&&this._bindControllersOff(),this.controllerArray=[];for(let m=0,p;m<arguments.length;m++)if(p=arguments[m],!!p){if(typeof p=="string"){this.currentControllerName=p;continue}if(typeof p=="function"){this.controllerArray.push(p);continue}if(!l.hasClass(p,"se-controller")){this.currentControllerTarget=p,this.currentFileComponentInfo=this.getFileComponent(p);continue}p.style&&(p.style.display="block",this._shadowRoot&&this._shadowRootControllerEventTarget.indexOf(p)===-1&&(p.addEventListener("mousedown",function(b){b.preventDefault(),b.stopPropagation()}),this._shadowRootControllerEventTarget.push(p))),this.controllerArray.push(p)}this._bindControllersOff=this.controllersOff.bind(this),this.addDocEvent("mousedown",this._bindControllersOff,!1),this.addDocEvent("keydown",this._bindControllersOff,!1),this._antiBlur=!0,typeof y.showController=="function"&&y.showController(this.currentControllerName,this.controllerArray,this)},controllersOff:function(m){this._lineBreaker.style.display="none";const p=this.controllerArray.length;if(m&&m.target&&p>0){for(let b=0;b<p;b++)if(typeof this.controllerArray[b].contains=="function"&&this.controllerArray[b].contains(m.target))return}if(!(this._fileManager.pluginRegExp.test(this.currentControllerName)&&m&&m.type==="keydown"&&m.keyCode!==27)&&(e.element.lineBreaker_t.style.display=e.element.lineBreaker_b.style.display="none",this._variable._lineBreakComp=null,this.currentControllerName="",this.currentControllerTarget=null,this.currentFileComponentInfo=null,this.effectNode=null,!!this._bindControllersOff)){if(this.removeDocEvent("mousedown",this._bindControllersOff),this.removeDocEvent("keydown",this._bindControllersOff),this._bindControllersOff=null,p>0){for(let b=0;b<p;b++)typeof this.controllerArray[b]=="function"?this.controllerArray[b]():this.controllerArray[b].style.display="none";this.controllerArray=[]}this._antiBlur=!1}},setControllerPosition:function(m,p,b,x){r.rtl&&(x.left*=-1);const k=l.getOffset(p,e.element.wysiwygFrame);m.style.visibility="hidden",m.style.display="block";const N=b==="top"?-(m.offsetHeight+2):p.offsetHeight+12;m.style.top=k.top+N+x.top+"px";const _=k.left-e.element.wysiwygFrame.scrollLeft+x.left,C=m.offsetWidth,E=p.offsetWidth,T=l.hasClass(m.firstElementChild,"se-arrow")?m.firstElementChild:null;if(r.rtl){const D=C>E?C-E:0,P=D>0?0:E-C;m.style.left=_-D+P+"px",D>0&&T&&(T.style.left=(C-14<10+D?C-14:10+D)+"px");const M=e.element.wysiwygFrame.offsetLeft-m.offsetLeft;M>0&&(m.style.left="0px",T&&(T.style.left=M+"px"))}else{m.style.left=_+"px";const D=e.element.wysiwygFrame.offsetWidth-(m.offsetLeft+C);D<0?(m.style.left=m.offsetLeft+D+"px",T&&(T.style.left=20-D+"px")):T&&(T.style.left="20px")}m.style.visibility=""},execCommand:function(m,p,b){this._wd.execCommand(m,p,m==="formatBlock"?"<"+b+">":b),this.history.push(!0)},nativeFocus:function(){this.__focus(),this._editorRange()},__focus:function(){const m=l.getParentElement(this.getSelectionNode(),"figcaption");m?m.focus():e.element.wysiwyg.focus()},focus:function(){if(e.element.wysiwygFrame.style.display!=="none"){if(r.iframe)this.nativeFocus();else try{const m=this.getRange();if(m.startContainer===m.endContainer&&l.isWysiwygDiv(m.startContainer)){const p=m.commonAncestorContainer.children[m.startOffset];if(!l.isFormatElement(p)&&!l.isComponent(p)){const b=l.createElement(r.defaultTag),x=l.createElement("BR");b.appendChild(x),e.element.wysiwyg.insertBefore(b,p),this.setRange(x,0,x,0);return}}this.setRange(m.startContainer,m.startOffset,m.endContainer,m.endOffset)}catch{this.nativeFocus()}g._applyTagEffects(),this._isBalloon&&g._toggleToolbarBalloon()}},focusEdge:function(m){m||(m=e.element.wysiwyg.lastElementChild);const p=this.getFileComponent(m);p?this.selectComponent(p.target,p.pluginName):m?(m=l.getChildElement(m,function(b){return b.childNodes.length===0||b.nodeType===3},!0),m?this.setRange(m,m.textContent.length,m,m.textContent.length):this.nativeFocus()):this.focus()},blur:function(){r.iframe?e.element.wysiwygFrame.blur():e.element.wysiwyg.blur()},setRange:function(m,p,b,x){if(!m||!b)return;p>m.textContent.length&&(p=m.textContent.length),x>b.textContent.length&&(x=b.textContent.length),l.isFormatElement(m)&&(m=m.childNodes[p]||m.childNodes[p-1]||m,p=p>0?m.nodeType===1?1:m.textContent?m.textContent.length:0:0),l.isFormatElement(b)&&(b=b.childNodes[x]||b.childNodes[x-1]||b,x=x>0?b.nodeType===1?1:b.textContent?b.textContent.length:0:0);const k=this._wd.createRange();try{k.setStart(m,p),k.setEnd(b,x)}catch(_){console.warn("[SUNEDITOR.core.focus.error] "+_),this.nativeFocus();return}const N=this.getSelection();return N.removeAllRanges&&N.removeAllRanges(),N.addRange(k),this._rangeInfo(k,this.getSelection()),r.iframe&&this.__focus(),k},removeRange:function(){this._variable._range=null,this._variable._selectionNode=null,this.hasFocus&&this.getSelection().removeAllRanges(),this._setKeyEffect([])},getRange:function(){const m=this._variable._range||this._createDefaultRange(),p=this.getSelection();if(m.collapsed===p.isCollapsed||!e.element.wysiwyg.contains(p.focusNode))return m;if(p.rangeCount>0)return this._variable._range=p.getRangeAt(0),this._variable._range;{const b=p.anchorNode,x=p.focusNode,k=p.anchorOffset,N=p.focusOffset,_=l.compareElements(b,x),C=_.ancestor&&(_.result===0?k<=N:_.result>1);return this.setRange(C?b:x,C?k:N,C?x:b,C?N:k)}},getRange_addLine:function(m,p){if(this._selectionVoid(m)){const b=e.element.wysiwyg,x=l.createElement(r.defaultTag);x.innerHTML="<br>",b.insertBefore(x,p&&p!==b?p.nextElementSibling:b.firstElementChild),this.setRange(x.firstElementChild,0,x.firstElementChild,1),m=this._variable._range}return m},getSelection:function(){const m=this._shadowRoot&&this._shadowRoot.getSelection?this._shadowRoot.getSelection():this._ww.getSelection();return!this._variable._range&&!e.element.wysiwyg.contains(m.focusNode)&&(m.removeAllRanges(),m.addRange(this._createDefaultRange())),m},getSelectionNode:function(){if(e.element.wysiwyg.contains(this._variable._selectionNode)||this._editorRange(),!this._variable._selectionNode){const m=l.getChildElement(e.element.wysiwyg.firstChild,function(p){return p.childNodes.length===0||p.nodeType===3},!1);if(!m)this._editorRange();else return this._variable._selectionNode=m,m}return this._variable._selectionNode},_editorRange:function(){const m=this._wd.activeElement;if(l.isInputElement(m))return this._variable._selectionNode=m,m;const p=this.getSelection();if(!p)return null;let b=null;p.rangeCount>0?b=p.getRangeAt(0):b=this._createDefaultRange(),this._rangeInfo(b,p)},_rangeInfo:function(m,p){let b=null;this._variable._range=m,m.collapsed?l.isWysiwygDiv(m.commonAncestorContainer)?b=m.commonAncestorContainer.children[m.startOffset]||m.commonAncestorContainer:b=m.commonAncestorContainer:b=p.extentNode||p.anchorNode,this._variable._selectionNode=b},_createDefaultRange:function(){const m=e.element.wysiwyg,p=this._wd.createRange();let b=m.firstElementChild,x=null;return b?(x=b.firstChild,x||(x=l.createElement("BR"),b.appendChild(x))):(b=l.createElement(r.defaultTag),x=l.createElement("BR"),b.appendChild(x),m.appendChild(b)),p.setStart(x,0),p.setEnd(x,0),p},_selectionVoid:function(m){const p=m.commonAncestorContainer;return l.isWysiwygDiv(m.startContainer)&&l.isWysiwygDiv(m.endContainer)||/FIGURE/i.test(p.nodeName)||this._fileManager.regExp.test(p.nodeName)||l.isMediaComponent(p)},_resetRangeToTextNode:function(){const m=this.getRange();if(this._selectionVoid(m))return!1;let p=m.startContainer,b=m.startOffset,x=m.endContainer,k=m.endOffset,N,_,C;if(l.isFormatElement(p))for(p.childNodes[b]?(p=p.childNodes[b]||p,b=0):(p=p.lastChild||p,b=p.textContent.length);p&&p.nodeType===1&&p.firstChild;)p=p.firstChild||p,b=0;if(l.isFormatElement(x)){for(x=x.childNodes[k]||x.lastChild||x;x&&x.nodeType===1&&x.lastChild;)x=x.lastChild;k=x.textContent.length}if(N=l.isWysiwygDiv(p)?e.element.wysiwyg.firstChild:p,_=b,l.isBreak(N)||N.nodeType===1&&N.childNodes.length>0){const E=l.isBreak(N);if(!E){for(;N&&!l.isBreak(N)&&N.nodeType===1;)N=N.childNodes[_]||N.nextElementSibling||N.nextSibling,_=0;let T=l.getFormatElement(N,null);T===l.getRangeFormatElement(T,null)&&(T=l.createElement(l.getParentElement(N,l.isCell)?"DIV":r.defaultTag),N.parentNode.insertBefore(T,N),T.appendChild(N))}if(l.isBreak(N)){const T=l.createTextNode(l.zeroWidthSpace);N.parentNode.insertBefore(T,N),N=T,E&&p===x&&(x=N,k=1)}}if(p=N,b=_,N=l.isWysiwygDiv(x)?e.element.wysiwyg.lastChild:x,_=k,l.isBreak(N)||N.nodeType===1&&N.childNodes.length>0){const E=l.isBreak(N);if(!E){for(;N&&!l.isBreak(N)&&N.nodeType===1&&(C=N.childNodes,C.length!==0);)N=C[_>0?_-1:_]||!/FIGURE/i.test(C[0].nodeName)?C[0]:N.previousElementSibling||N.previousSibling||p,_=_>0?N.textContent.length:_;let T=l.getFormatElement(N,null);T===l.getRangeFormatElement(T,null)&&(T=l.createElement(l.isCell(T)?"DIV":r.defaultTag),N.parentNode.insertBefore(T,N),T.appendChild(N))}if(l.isBreak(N)){const T=l.createTextNode(l.zeroWidthSpace);N.parentNode.insertBefore(T,N),N=T,_=1,E&&!N.previousSibling&&l.removeItem(x)}}return x=N,k=_,this.setRange(p,b,x,k),!0},getSelectedElements:function(m){if(!this._resetRangeToTextNode())return[];let p=this.getRange();if(l.isWysiwygDiv(p.startContainer)){const F=e.element.wysiwyg.children;if(F.length===0)return[];this.setRange(F[0],0,F[F.length-1],F[F.length-1].textContent.trim().length),p=this.getRange()}const b=p.startContainer,x=p.endContainer,k=p.commonAncestorContainer,N=l.getListChildren(k,function(F){return m?m(F):l.isFormatElement(F)});if(!l.isWysiwygDiv(k)&&!l.isRangeFormatElement(k)&&N.unshift(l.getFormatElement(k,null)),b===x||N.length===1)return N;let _=l.getFormatElement(b,null),C=l.getFormatElement(x,null),E=null,T=null;const D=function(F){return l.isTable(F)?/^TABLE$/i.test(F.nodeName):!0};let P=l.getRangeFormatElement(_,D),M=l.getRangeFormatElement(C,D);l.isTable(P)&&l.isListCell(P.parentNode)&&(P=P.parentNode),l.isTable(M)&&l.isListCell(M.parentNode)&&(M=M.parentNode);const O=P===M;for(let F=0,z=N.length,H;F<z;F++){if(H=N[F],_===H||!O&&H===P){E=F;continue}if(C===H||!O&&H===M){T=F;break}}return E===null&&(E=0),T===null&&(T=N.length-1),N.slice(E,T+1)},getSelectedElementsAndComponents:function(m){const p=this.getRange().commonAncestorContainer,b=l.getParentElement(p,l.isComponent),x=l.isTable(p)?this.getSelectedElements(null):this.getSelectedElements(function(k){const N=this.getParentElement(k,this.isComponent);return this.isFormatElement(k)&&(!N||N===b)||this.isComponent(k)&&!this.getFormatElement(k)}.bind(l));if(m){for(let k=0,N=x.length;k<N;k++)for(let _=k-1;_>=0;_--)if(x[_].contains(x[k])){x.splice(k,1),k--,N--;break}}return x},isEdgePoint:function(m,p,b){return b!=="end"&&p===0||(!b||b!=="front")&&!m.nodeValue&&p===1||(!b||b==="end")&&!!m.nodeValue&&p===m.nodeValue.length},_isEdgeFormat:function(m,p,b){if(!this.isEdgePoint(m,p,b))return!1;const x=[];for(b=b==="front"?"previousSibling":"nextSibling";m&&!l.isFormatElement(m)&&!l.isWysiwygDiv(m);)if(!m[b]||l.isBreak(m[b])&&!m[b][b])m.nodeType===1&&x.push(m.cloneNode(!1)),m=m.parentNode;else return null;return x},showLoading:function(){e.element.loading.style.display="block"},closeLoading:function(){e.element.loading.style.display="none"},appendFormatTag:function(m,p){if(!m||!m.parentNode)return null;const b=l.getFormatElement(this.getSelectionNode(),null);let x=null;if(!l.isFormatElement(m)&&l.isFreeFormatElement(b||m.parentNode))x=l.createElement("BR");else{const k=p?typeof p=="string"?p:p.nodeName:l.isFormatElement(b)&&!l.isRangeFormatElement(b)&&!l.isFreeFormatElement(b)?b.nodeName:r.defaultTag;x=l.createElement(k),x.innerHTML="<br>",(p&&typeof p!="string"||!p&&l.isFormatElement(b))&&l.copyTagAttributes(x,p||b,["id"])}return l.isCell(m)?m.insertBefore(x,m.nextElementSibling):m.parentNode.insertBefore(x,m.nextElementSibling),x},insertComponent:function(m,p,b,x){if(this.isReadOnly||b&&!this.checkCharCount(m,null))return null;const k=this.removeNode();this.getRange_addLine(this.getRange(),k.container);let N=null,_=this.getSelectionNode(),C=l.getFormatElement(_,null);if(l.isListCell(C))this.insertNode(m,_===C?null:k.container.nextSibling,!1),m.nextSibling||m.parentNode.appendChild(l.createElement("BR"));else{if(this.getRange().collapsed&&(k.container.nodeType===3||l.isBreak(k.container))){const E=l.getParentElement(k.container,function(T){return this.isRangeFormatElement(T)}.bind(l));N=l.splitElement(k.container,k.offset,E?l.getElementDepth(E)+1:0),N&&(C=N.previousSibling)}this.insertNode(m,l.isRangeFormatElement(C)?null:C,!1),C&&l.onlyZeroWidthSpace(C)&&l.removeItem(C)}if(!x){this.setRange(m,0,m,0);const E=this.getFileComponent(m);E?this.selectComponent(E.target,E.pluginName):N&&(N=l.getEdgeChildNodes(N,null).sc||N,this.setRange(N,0,N,0))}return p||this.history.push(1),N||m},getFileComponent:function(m){if(!this._fileManager.queryString||!m)return null;let p,b;return(/^FIGURE$/i.test(m.nodeName)||/se-component/.test(m.className))&&(p=m.querySelector(this._fileManager.queryString)),!p&&m.nodeName&&this._fileManager.regExp.test(m.nodeName)&&(p=m),p&&(b=this._fileManager.pluginMap[p.nodeName.toLowerCase()],b)?{target:p,component:l.getParentElement(p,l.isComponent),pluginName:b}:null},selectComponent:function(m,p){if(l.isUneditableComponent(l.getParentElement(m,l.isComponent))||l.isUneditableComponent(m))return!1;this.hasFocus||this.focus();const b=this.plugins[p];!b||c.setTimeout(function(){typeof b.select=="function"&&this.callPlugin(p,b.select.bind(this,m),null),this._setComponentLineBreaker(m)}.bind(this))},_setComponentLineBreaker:function(m){this._lineBreaker.style.display="none";const p=l.getParentElement(m,l.isComponent),b=e.element.lineBreaker_t.style,x=e.element.lineBreaker_b.style,k=this.context.resizing.resizeContainer.style.display==="block"?this.context.resizing.resizeContainer:m,N=l.isListCell(p.parentNode);let _,C,E;(N?!p.previousSibling:!l.isFormatElement(p.previousElementSibling))?(this._variable._lineBreakComp=p,C=e.element.wysiwyg.scrollTop,_=l.getOffset(m,e.element.wysiwygFrame).top+C,E=k.offsetWidth/2/2,b.top=_-C-12+"px",b.left=l.getOffset(k).left+E+"px",b.display="block"):b.display="none",(N?!p.nextSibling:!l.isFormatElement(p.nextElementSibling))?(_||(this._variable._lineBreakComp=p,C=e.element.wysiwyg.scrollTop,_=l.getOffset(m,e.element.wysiwygFrame).top+C,E=k.offsetWidth/2/2),x.top=_+k.offsetHeight-C-12+"px",x.left=l.getOffset(k).left+k.offsetWidth-E-24+"px",x.display="block"):x.display="none"},_checkDuplicateNode:function(m,p){(function b(x){u._dupleCheck(x,p);const k=x.childNodes;for(let N=0,_=k.length;N<_;N++)b(k[N])})(m)},_dupleCheck:function(m,p){if(!l.isTextStyleElement(m))return;const b=(m.style.cssText.match(/[^;]+;/g)||[]).map(function(N){return N.trim()}),x=m.nodeName;if(/^span$/i.test(x)&&b.length===0)return m;let k=!1;return function N(_){if(!(l.isWysiwygDiv(_)||!l.isTextStyleElement(_))){if(_.nodeName===x){k=!0;const C=_.style.cssText.match(/[^;]+;/g)||[];for(let E=0,T=C.length,D;E<T;E++)(D=b.indexOf(C[E].trim()))>-1&&b.splice(D,1);for(let E=0,T=_.classList.length;E<T;E++)m.classList.remove(_.classList[E])}N(_.parentElement)}}(p),k&&((m.style.cssText=b.join(" "))||(m.setAttribute("style",""),m.removeAttribute("style")),m.attributes.length||m.setAttribute("data-se-duple","true")),m},insertNode:function(m,p,b){if(this.isReadOnly||b&&!this.checkCharCount(m,null))return null;let x=this.getRange(),k=l.isListCell(x.commonAncestorContainer)?x.commonAncestorContainer:l.getFormatElement(this.getSelectionNode(),null),N=l.isListCell(k)&&(l.isListCell(m)||l.isList(m)),_,C,E,T=null;const D=l.isFreeFormatElement(k),P=!D&&(l.isFormatElement(m)||l.isRangeFormatElement(m))||l.isComponent(m);if(N&&(E=p||l.isList(m)?k.lastChild:k.nextElementSibling,T=l.isList(m)?k:(E||k).parentNode),!p&&(P||l.isComponent(m)||l.isMedia(m))){const j=this.isEdgePoint(x.endContainer,x.endOffset,"end"),I=this.removeNode(),B=I.container,Y=B===I.prevContainer&&x.collapsed?null:I.prevContainer;if(N&&Y)if(T=Y.nodeType===3?Y.parentNode:Y,T.contains(B)){let U=!0;for(E=B;E.parentNode&&E.parentNode!==T;)E=E.parentNode,U=!1;U&&B===Y&&(E=E.nextSibling)}else E=null;else if(N&&l.isListCell(B)&&!k.parentElement)k=l.createElement("LI"),T.appendChild(k),B.appendChild(T),E=null;else if(B.nodeType===3||l.isBreak(B)||N){const U=l.getParentElement(B,function(W){return this.isRangeFormatElement(W)||this.isListCell(W)}.bind(l));if(p=l.splitElement(B,I.offset,U?l.getElementDepth(U)+1:0),!p)E=p=k;else if(N){if(k.contains(B)){const W=l.isList(k.lastElementChild);let V=null;j||(V=k.cloneNode(!1),V.appendChild(p.textContent.trim()?p:l.createTextNode(l.zeroWidthSpace))),W&&(V||(V=k.cloneNode(!1),V.appendChild(l.createTextNode(l.zeroWidthSpace))),V.appendChild(k.lastElementChild)),V&&(k.parentNode.insertBefore(V,k.nextElementSibling),E=p=V)}}else p=p.previousSibling}}x=!p&&!P?this.getRange_addLine(this.getRange(),null):this.getRange();const M=x.commonAncestorContainer,O=x.startOffset,F=x.endOffset,z=x.startContainer===M&&l.isFormatElement(M),H=z&&(M.childNodes[O]||M.childNodes[0])||x.startContainer,A=z&&(M.childNodes[F]||M.childNodes[M.childNodes.length-1])||x.endContainer;if(!N)if(p)_=p.parentNode,p=p.nextSibling,C=!0;else if(_=H,H.nodeType===3&&(_=H.parentNode),x.collapsed)if(M.nodeType===3)M.textContent.length>F?p=M.splitText(F):p=M.nextSibling;else if(l.isBreak(_))p=_,_=_.parentNode;else{let j=_.childNodes[O];const I=j&&j.nodeType===3&&l.onlyZeroWidthSpace(j)&&l.isBreak(j.nextSibling)?j.nextSibling:j;I?!I.nextSibling&&l.isBreak(I)?(_.removeChild(I),p=null):p=l.isBreak(I)&&!l.isBreak(m)?I:I.nextSibling:p=null}else if(H===A){this.isEdgePoint(A,F)?p=A.nextSibling:p=A.splitText(F);let I=H;this.isEdgePoint(H,O)||(I=H.splitText(O)),_.removeChild(I),_.childNodes.length===0&&P&&(_.innerHTML="<br>")}else{const I=this.removeNode(),B=I.container,Y=I.prevContainer;if(B&&B.childNodes.length===0&&P&&(l.isFormatElement(B)?B.innerHTML="<br>":l.isRangeFormatElement(B)&&(B.innerHTML="<"+r.defaultTag+"><br></"+r.defaultTag+">")),l.isListCell(B)&&m.nodeType===3)_=B,p=null;else if(!P&&Y)if(_=Y.nodeType===3?Y.parentNode:Y,_.contains(B)){let U=!0;for(p=B;p.parentNode&&p.parentNode!==_;)p=p.parentNode,U=!1;U&&B===Y&&(p=p.nextSibling)}else p=null;else l.isWysiwygDiv(B)&&!l.isFormatElement(m)?(_=B.appendChild(l.createElement(r.defaultTag)),p=null):(p=P?A:B===Y?B.nextSibling:B,_=!p||!p.parentNode?M:p.parentNode);for(;p&&!l.isFormatElement(p)&&p.parentNode!==M;)p=p.parentNode}try{if(!N){if((l.isWysiwygDiv(p)||_===e.element.wysiwyg.parentNode)&&(_=e.element.wysiwyg,p=null),l.isFormatElement(m)||l.isRangeFormatElement(m)||!l.isListCell(_)&&l.isComponent(m)){const j=_;if(l.isList(p))_=p,p=null;else if(l.isListCell(p))_=p.previousElementSibling||p;else if(!C&&!p){const I=this.removeNode(),B=I.container.nodeType===3?l.isListCell(l.getFormatElement(I.container,null))?I.container:l.getFormatElement(I.container,null)||I.container.parentNode:I.container,Y=l.isWysiwygDiv(B)||l.isRangeFormatElement(B);_=Y?B:B.parentNode,p=Y?null:B.nextSibling}j.childNodes.length===0&&_!==j&&l.removeItem(j)}if(P&&!D&&!l.isRangeFormatElement(_)&&!l.isListCell(_)&&!l.isWysiwygDiv(_)&&(p=_.nextElementSibling,_=_.parentNode),l.isWysiwygDiv(_)&&(m.nodeType===3||l.isBreak(m))){const j=l.createElement(r.defaultTag);j.appendChild(m),m=j}}if(N?T.parentNode?(_=T,p=E):(_=e.element.wysiwyg,p=null):p=_===p?_.lastChild:p,l.isListCell(m)&&!l.isList(_)){if(l.isListCell(_))p=_.nextElementSibling,_=_.parentNode;else{const j=l.createElement("ol");_.insertBefore(j,p),_=j,p=null}N=!0}if(this._checkDuplicateNode(m,_),_.insertBefore(m,p),N)if(l.onlyZeroWidthSpace(k.textContent.trim()))l.removeItem(k),m=m.lastChild;else{const j=l.getArrayItem(k.children,l.isList);j&&(m!==j?(m.appendChild(j),m=j.previousSibling):(_.appendChild(m),m=_),l.onlyZeroWidthSpace(k.textContent.trim())&&l.removeItem(k))}}catch(j){_.appendChild(m),console.warn("[SUNEDITOR.insertNode.warn] "+j)}finally{const j=_.querySelectorAll("[data-se-duple]");if(j.length>0)for(let I=0,B=j.length,Y,U,W,V;I<B;I++){for(Y=j[I],W=Y.childNodes,V=Y.parentNode;W[0];)U=W[0],V.insertBefore(U,Y);Y===m&&(m=U),l.removeItem(Y)}if((l.isFormatElement(m)||l.isComponent(m))&&H===A){const I=l.getFormatElement(M,null);I&&I.nodeType===1&&l.isEmptyLine(I)&&l.removeItem(I)}if(D&&(l.isFormatElement(m)||l.isRangeFormatElement(m))&&(m=this._setIntoFreeFormat(m)),!l.isComponent(m)){let I=1;if(m.nodeType===3){const B=m.previousSibling,Y=m.nextSibling,U=!B||B.nodeType===1||l.onlyZeroWidthSpace(B)?"":B.textContent,W=!Y||Y.nodeType===1||l.onlyZeroWidthSpace(Y)?"":Y.textContent;B&&U.length>0&&(m.textContent=U+m.textContent,l.removeItem(B)),Y&&Y.length>0&&(m.textContent+=W,l.removeItem(Y));const V={container:m,startOffset:U.length,endOffset:m.textContent.length-W.length};return this.setRange(m,V.startOffset,m,V.endOffset),V}else if(!l.isBreak(m)&&!l.isListCell(m)&&l.isFormatElement(_)){let B=null;(!m.previousSibling||l.isBreak(m.previousSibling))&&(B=l.createTextNode(l.zeroWidthSpace),m.parentNode.insertBefore(B,m)),(!m.nextSibling||l.isBreak(m.nextSibling))&&(B=l.createTextNode(l.zeroWidthSpace),m.parentNode.insertBefore(B,m.nextSibling)),l._isIgnoreNodeChange(m)&&(m=m.nextSibling,I=0)}this.setRange(m,I,m,I)}return this.history.push(!0),m}},_setIntoFreeFormat:function(m){const p=m.parentNode;let b,x;for(;l.isFormatElement(m)||l.isRangeFormatElement(m);){for(b=m.childNodes,x=null;b[0];){if(x=b[0],l.isFormatElement(x)||l.isRangeFormatElement(x)){if(this._setIntoFreeFormat(x),!m.parentNode)break;b=m.childNodes;continue}p.insertBefore(x,m)}m.childNodes.length===0&&l.removeItem(m),m=l.createElement("BR"),p.insertBefore(m,x.nextSibling)}return m},removeNode:function(){this._resetRangeToTextNode();const m=this.getRange();if(m.startContainer===m.endContainer){const B=l.getParentElement(m.startContainer,l.isMediaComponent);if(B){const Y=l.createElement("BR"),U=l.createElement(r.defaultTag);return U.appendChild(Y),l.changeElement(B,U),u.setRange(U,0,U,0),this.history.push(!0),{container:U,offset:0,prevContainer:null}}}const p=m.startOffset===0,b=u.isEdgePoint(m.endContainer,m.endOffset,"end");let x=null,k=null,N=null;p&&(k=l.getFormatElement(m.startContainer),k&&(x=k.previousElementSibling,k=x)),b&&(N=l.getFormatElement(m.endContainer),N=N&&N.nextElementSibling);let _,C=0,E=m.startContainer,T=m.endContainer,D=m.startOffset,P=m.endOffset;const M=m.commonAncestorContainer.nodeType===3&&m.commonAncestorContainer.parentNode===E.parentNode?E.parentNode:m.commonAncestorContainer;if(M===E&&M===T&&(E=M.children[D],T=M.children[P],D=P=0),!E||!T)return{container:M,offset:0};if(E===T&&m.collapsed&&E.textContent&&l.onlyZeroWidthSpace(E.textContent.substr(D)))return{container:E,offset:D,prevContainer:E&&E.parentNode?E:null};let O=null,F=null;const z=l.getListChildNodes(M,null);let H=l.getArrayIndex(z,E),A=l.getArrayIndex(z,T);if(z.length>0&&H>-1&&A>-1){for(let B=H+1,Y=E;B>=0;B--)z[B]===Y.parentNode&&z[B].firstChild===Y&&D===0&&(H=B,Y=Y.parentNode);for(let B=A-1,Y=T;B>H;B--)z[B]===Y.parentNode&&z[B].nodeType===1&&(z.splice(B,1),Y=Y.parentNode,--A)}else{if(z.length===0){if(l.isFormatElement(M)||l.isRangeFormatElement(M)||l.isWysiwygDiv(M)||l.isBreak(M)||l.isMedia(M))return{container:M,offset:0};if(M.nodeType===3)return{container:M,offset:P};z.push(M),E=T=M}else if(E=T=z[0],l.isBreak(E)||l.onlyZeroWidthSpace(E))return{container:l.isMedia(M)?M:E,offset:0};H=A=0}for(let B=H;B<=A;B++){const Y=z[B];if(Y.length===0||Y.nodeType===3&&Y.data===void 0){this._nodeRemoveListItem(Y);continue}if(Y===E){if(E.nodeType===1){if(l.isComponent(E))continue;O=l.createTextNode(E.textContent)}else Y===T?(O=l.createTextNode(E.substringData(0,D)+T.substringData(P,T.length-P)),C=D):O=l.createTextNode(E.substringData(0,D));if(O.length>0?E.data=O.data:this._nodeRemoveListItem(E),Y===T)break;continue}if(Y===T){if(T.nodeType===1){if(l.isComponent(T))continue;F=l.createTextNode(T.textContent)}else F=l.createTextNode(T.substringData(P,T.length-P));F.length>0?T.data=F.data:this._nodeRemoveListItem(T);continue}this._nodeRemoveListItem(Y)}const j=l.getParentElement(T,"ul"),I=l.getParentElement(E,"li");if(j&&I&&I.contains(j)?(_=j.previousSibling,C=_.textContent.length):(_=T&&T.parentNode?T:E&&E.parentNode?E:m.endContainer||m.startContainer,C=!p&&!b?C:b?_.textContent.length:0),!l.isWysiwygDiv(_)&&_.childNodes.length===0){const B=l.removeItemAllParents(_,null,null);B&&(_=B.sc||B.ec||e.element.wysiwyg)}return!l.getFormatElement(_)&&!(E&&E.parentNode)&&(N?(_=N,C=0):k&&(_=k,C=1)),this.setRange(_,C,_,C),this.history.push(!0),{container:_,offset:C,prevContainer:x}},_nodeRemoveListItem:function(m){const p=l.getFormatElement(m,null);l.removeItem(m),l.isListCell(p)&&(l.removeItemAllParents(p,null,null),p&&l.isList(p.firstChild)&&p.insertBefore(l.createTextNode(l.zeroWidthSpace),p.firstChild))},applyRangeFormatElement:function(m){this.getRange_addLine(this.getRange(),null);const p=this.getSelectedElementsAndComponents(!1);if(!p||p.length===0)return;e:for(let P=0,M=p.length,O,F,z,H,A,j;P<M;P++)if(O=p[P],!!l.isListCell(O)&&(F=O.lastElementChild,F&&l.isListCell(O.nextElementSibling)&&p.indexOf(O.nextElementSibling)>-1&&(H=F.lastElementChild,p.indexOf(H)>-1))){let I=null;for(;I=H.lastElementChild;)if(l.isList(I))if(p.indexOf(I.lastElementChild)>-1)H=I.lastElementChild;else continue e;z=F.firstElementChild,A=p.indexOf(z),j=p.indexOf(H),p.splice(A,j-A+1),M=p.length;continue}let b=p[p.length-1],x,k,N;l.isRangeFormatElement(b)||l.isFormatElement(b)?x=b:x=l.getRangeFormatElement(b,null)||l.getFormatElement(b,null),l.isCell(x)?(k=null,N=x):(k=x.nextSibling,N=x.parentNode);let _=l.getElementDepth(x),C=null;const E=[],T=function(P,M,O){let F=null;if(P!==M&&!l.isTable(M)){if(M&&l.getElementDepth(P)===l.getElementDepth(M))return O;F=l.removeItemAllParents(M,null,P)}return F?F.ec:O};for(let P=0,M=p.length,O,F,z,H,A,j,I;P<M;P++)if(O=p[P],F=O.parentNode,!(!F||m.contains(F)))if(z=l.getElementDepth(O),l.isList(F)){if(C===null&&(j?(C=j,I=!0,j=null):C=F.cloneNode(!1)),E.push(O),A=p[P+1],P===M-1||A&&A.parentNode!==F){A&&O.contains(A.parentNode)&&(j=A.parentNode.cloneNode(!1));let B=F.parentNode,Y;for(;l.isList(B);)Y=l.createElement(B.nodeName),Y.appendChild(C),C=Y,B=B.parentNode;const U=this.detachRangeFormatElement(F,E,null,!0,!0);_>=z?(_=z,N=U.cc,k=T(N,F,U.ec),k&&(N=k.parentNode)):N===U.cc&&(k=U.ec),N!==U.cc&&(H=T(N,U.cc,H),H!==void 0?k=H:k=U.cc);for(let W=0,V=U.removeArray.length;W<V;W++)C.appendChild(U.removeArray[W]);I||m.appendChild(C),j&&U.removeArray[U.removeArray.length-1].appendChild(j),C=null,I=!1}}else _>=z&&(_=z,N=F,k=O.nextSibling),m.appendChild(O),N!==F&&(H=T(N,F),H!==void 0&&(k=H));if(this.effectNode=null,l.mergeSameTags(m,null,!1),l.mergeNestedTags(m,function(P){return this.isList(P)}.bind(l)),k&&l.getElementDepth(k)>0&&(l.isList(k.parentNode)||l.isList(k.parentNode.parentNode))){const P=l.getParentElement(k,function(O){return this.isRangeFormatElement(O)&&!this.isList(O)}.bind(l)),M=l.splitElement(k,null,P?l.getElementDepth(P)+1:0);M.parentNode.insertBefore(m,M)}else N.insertBefore(m,k),T(m,k);const D=l.getEdgeChildNodes(m.firstElementChild,m.lastElementChild);p.length>1?this.setRange(D.sc,0,D.ec,D.ec.textContent.length):this.setRange(D.ec,D.ec.textContent.length,D.ec,D.ec.textContent.length),this.history.push(!1)},detachRangeFormatElement:function(m,p,b,x,k){const N=this.getRange();let _=N.startOffset,C=N.endOffset,E=l.getListChildNodes(m,function(U){return U.parentNode===m}),T=m.parentNode,D=null,P=null,M=m.cloneNode(!1);const O=[],F=l.isList(b);let z=!1,H=!1,A=!1;function j(U,W,V,X){if(l.onlyZeroWidthSpace(W)&&(W.innerHTML=l.zeroWidthSpace,_=C=1),W.nodeType===3)return U.insertBefore(W,V),W;const ne=(A?W:X).childNodes;let oe=W.cloneNode(!1),q=null,te=null;for(;ne[0];)te=ne[0],l._notTextNode(te)&&!l.isBreak(te)&&!l.isListCell(oe)?(oe.childNodes.length>0&&(q||(q=oe),U.insertBefore(oe,V),oe=W.cloneNode(!1)),U.insertBefore(te,V),q||(q=te)):oe.appendChild(te);if(oe.childNodes.length>0){if(l.isListCell(U)&&l.isListCell(oe)&&l.isList(V))if(F){for(q=V;V;)oe.appendChild(V),V=V.nextSibling;U.parentNode.insertBefore(oe,U.nextElementSibling)}else{const G=X.nextElementSibling,J=l.detachNestedList(X,!1);if(m!==J||G!==X.nextElementSibling){const K=oe.childNodes;for(;K[0];)X.appendChild(K[0]);m=J,H=!0}}else U.insertBefore(oe,V);q||(q=oe)}return q}for(let U=0,W=E.length,V,X,ne;U<W;U++)if(V=E[U],!(V.nodeType===3&&l.isList(M)))if(A=!1,x&&U===0&&(!p||p.length===W||p[0]===V?D=m.previousSibling:D=M),p&&(X=p.indexOf(V)),p&&X===-1)M||(M=m.cloneNode(!1)),M.appendChild(V);else{if(p&&(ne=p[X+1]),M&&M.children.length>0&&(T.insertBefore(M,m),M=null),!F&&l.isListCell(V))if(ne&&l.getElementDepth(V)!==l.getElementDepth(ne)&&(l.isListCell(T)||l.getArrayItem(V.children,l.isList,!1))){const oe=V.nextElementSibling,q=l.detachNestedList(V,!1);(m!==q||oe!==V.nextElementSibling)&&(m=q,H=!0)}else{const oe=V;V=l.createElement(x?oe.nodeName:l.isList(m.parentNode)||l.isListCell(m.parentNode)?"LI":l.isCell(m.parentNode)?"DIV":r.defaultTag);const q=l.isListCell(V),te=oe.childNodes;for(;te[0]&&!(l.isList(te[0])&&!q);)V.appendChild(te[0]);l.copyFormatAttributes(V,oe),A=!0}else V=V.cloneNode(!1);if(!H&&(x?(O.push(V),l.removeItem(E[U])):(b?(z||(T.insertBefore(b,m),z=!0),V=j(b,V,null,E[U])):V=j(T,V,m,E[U]),H||(p?(P=V,D||(D=V)):D||(D=P=V))),H)){H=A=!1,E=l.getListChildNodes(m,function(oe){return oe.parentNode===m}),M=m.cloneNode(!1),T=m.parentNode,U=-1,W=E.length;continue}}const I=m.parentNode;let B=m.nextSibling;M&&M.children.length>0&&I.insertBefore(M,B),b?D=b.previousSibling:D||(D=m.previousSibling),B=m.nextSibling!==M?m.nextSibling:M?M.nextSibling:null,m.children.length===0||m.textContent.length===0?l.removeItem(m):l.removeEmptyNode(m,null,!1);let Y=null;if(x)Y={cc:I,sc:D,so:_,ec:B,eo:C,removeArray:O};else{D||(D=P),P||(P=D);const U=l.getEdgeChildNodes(D,P.parentNode?D:P);Y={cc:(U.sc||U.ec).parentNode,sc:U.sc,so:_,ec:U.ec,eo:C,removeArray:null}}if(this.effectNode=null,k)return Y;!x&&Y&&(p?this.setRange(Y.sc,_,Y.ec,C):this.setRange(Y.sc,0,Y.sc,0)),this.history.push(!1)},detachList:function(m,p){let b={},x=!1,k=!1,N=null,_=null;const C=function(E){return!this.isComponent(E)}.bind(l);for(let E=0,T=m.length,D,P,M,O;E<T;E++){if(M=E===T-1,P=l.getRangeFormatElement(m[E],C),O=l.isList(P),!D&&O)D=P,b={r:D,f:[l.getParentElement(m[E],"LI")]},E===0&&(x=!0);else if(D&&O)if(D!==P){const F=this.detachRangeFormatElement(b.f[0].parentNode,b.f,null,p,!0);P=m[E].parentNode,x&&(N=F.sc,x=!1),M&&(_=F.ec),O?(D=P,b={r:D,f:[l.getParentElement(m[E],"LI")]},M&&(k=!0)):D=null}else b.f.push(l.getParentElement(m[E],"LI")),M&&(k=!0);if(M&&l.isList(D)){const F=this.detachRangeFormatElement(b.f[0].parentNode,b.f,null,p,!0);(k||T===1)&&(_=F.ec),x&&(N=F.sc||_)}}return{sc:N,ec:_}},nodeChange:function(m,p,b,x){this._resetRangeToTextNode();let k=this.getRange_addLine(this.getRange(),null);p=p&&p.length>0?p:!1,b=b&&b.length>0?b:!1;const N=!m,_=N&&!b&&!p;let C=k.startContainer,E=k.startOffset,T=k.endContainer,D=k.endOffset;if(_&&k.collapsed&&l.isFormatElement(C.parentNode)||C===T&&C.nodeType===1&&l.isNonEditable(C)){const te=C.parentNode;if(!l.isListCell(te)||!l.getValues(te.style).some(function(G){return this._listKebab.indexOf(G)>-1}.bind(this)))return}if(k.collapsed&&!_&&C.nodeType===1&&!l.isBreak(C)&&!l.isComponent(C)){let te=null;const G=C.childNodes[E];G&&(G.nextSibling?te=l.isBreak(G)?G:G.nextSibling:te=null);const J=l.createTextNode(l.zeroWidthSpace);C.insertBefore(J,te),this.setRange(J,1,J,1),k=this.getRange(),C=k.startContainer,E=k.startOffset,T=k.endContainer,D=k.endOffset}l.isFormatElement(C)&&(C=C.childNodes[E]||C.firstChild,E=0),l.isFormatElement(T)&&(T=T.childNodes[D]||T.lastChild,D=T.textContent.length),N&&(m=l.createElement("DIV"));const P=c.RegExp,M=m.nodeName;if(!_&&C===T&&!b&&m){let te=C,G=0;const J=[],K=m.style;for(let Z=0,se=K.length;Z<se;Z++)J.push(K[Z]);const Q=m.classList;for(let Z=0,se=Q.length;Z<se;Z++)J.push("."+Q[Z]);if(J.length>0){for(;!l.isFormatElement(te)&&!l.isWysiwygDiv(te);){for(let Z=0;Z<J.length;Z++)if(te.nodeType===1){const se=J[Z],ce=/^\./.test(se)?new P("\\s*"+se.replace(/^\./,"")+"(\\s+|$)","ig"):!1,le=N?!!te.style[se]:!!te.style[se]&&!!m.style[se]&&te.style[se]===m.style[se],ae=ce===!1?!1:N?!!te.className.match(ce):!!te.className.match(ce)&&!!m.className.match(ce);(le||ae)&&G++}te=te.parentNode}if(G>=J.length)return}}let O={},F={},z,H="",A="",j="";if(p){for(let te=0,G=p.length,J;te<G;te++)J=p[te],/^\./.test(J)?A+=(A?"|":"\\s*(?:")+J.replace(/^\./,""):H+=(H?"|":"(?:;|^|\\s)(?:")+J;H&&(H+=")\\s*:[^;]*\\s*(?:;|$)",H=new P(H,"ig")),A&&(A+=")(?=\\s+|$)",A=new P(A,"ig"))}if(b){j="^(?:"+b[0];for(let te=1;te<b.length;te++)j+="|"+b[te];j+=")$",j=new P(j,"i")}const I=c.Boolean,B={v:!1},Y=function(te){const G=te.cloneNode(!1);if(G.nodeType===3||l.isBreak(G))return G;if(_)return null;const J=!j&&N||j&&j.test(G.nodeName);if(J&&!x)return B.v=!0,null;const K=G.style.cssText;let Q="";H&&K.length>0&&(Q=K.replace(H,"").trim(),Q!==K&&(B.v=!0));const Z=G.className;let se="";return A&&Z.length>0&&(se=Z.replace(A,"").trim(),se!==Z&&(B.v=!0)),N&&(A||!Z)&&(H||!K)&&!Q&&!se&&J?(B.v=!0,null):Q||se||G.nodeName!==M||I(H)!==I(K)||I(A)!==I(Z)?(H&&K.length>0&&(G.style.cssText=Q),G.style.cssText||G.removeAttribute("style"),A&&Z.length>0&&(G.className=se.trim()),G.className.trim()||G.removeAttribute("class"),!G.style.cssText&&!G.className&&(G.nodeName===M||J)?(B.v=!0,null):G):(B.v=!0,null)},U=this.getSelectedElements(null);k=this.getRange(),C=k.startContainer,E=k.startOffset,T=k.endContainer,D=k.endOffset,l.getFormatElement(C,null)||(C=l.getChildElement(U[0],function(te){return te.nodeType===3},!1),E=0),l.getFormatElement(T,null)||(T=l.getChildElement(U[U.length-1],function(te){return te.nodeType===3},!1),D=T.textContent.length);const W=l.getFormatElement(C,null)===l.getFormatElement(T,null),V=U.length-(W?0:1);z=m.cloneNode(!1);const X=_||N&&function(te){for(let G=0,J=te.length;G<J;G++)if(l._isMaintainedNode(te[G])||l._isSizeNode(te[G]))return!0;return!1}(b),ne=N||l._isSizeNode(z),oe=this._util_getMaintainedNode.bind(l,X,ne),q=this._util_isMaintainedNode.bind(l,X,ne);if(W){this._resetCommonListCell(U[0],p)&&(k=this.setRange(C,E,T,D));const te=this._nodeChange_oneLine(U[0],z,Y,C,E,T,D,_,N,k.collapsed,B,oe,q);O.container=te.startContainer,O.offset=te.startOffset,F.container=te.endContainer,F.offset=te.endOffset,O.container===F.container&&l.onlyZeroWidthSpace(O.container)&&(O.offset=F.offset=1),this._setCommonListStyle(te.ancestor,null)}else{let te=!1;V>0&&this._resetCommonListCell(U[V],p)&&(te=!0),this._resetCommonListCell(U[0],p)&&(te=!0),te&&this.setRange(C,E,T,D),V>0&&(z=m.cloneNode(!1),F=this._nodeChange_endLine(U[V],z,Y,T,D,_,N,B,oe,q));for(let G=V-1,J;G>0;G--)this._resetCommonListCell(U[G],p),z=m.cloneNode(!1),J=this._nodeChange_middleLine(U[G],z,Y,_,N,B,F.container),J.endContainer&&J.ancestor.contains(J.endContainer)&&(F.ancestor=null,F.container=J.endContainer),this._setCommonListStyle(J.ancestor,null);z=m.cloneNode(!1),O=this._nodeChange_startLine(U[0],z,Y,C,E,_,N,B,oe,q,F.container),O.endContainer&&(F.ancestor=null,F.container=O.endContainer),V<=0?F=O:F.container||(F.ancestor=null,F.container=O.container,F.offset=O.container.textContent.length),this._setCommonListStyle(O.ancestor,null),this._setCommonListStyle(F.ancestor||l.getFormatElement(F.container),null)}this.controllersOff(),this.setRange(O.container,O.offset,F.container,F.offset),this.history.push(!1)},_resetCommonListCell:function(m,p){if(!l.isListCell(m))return;p||(p=this._listKebab);const b=l.getArrayItem(m.childNodes,function(P){return!l.isBreak(P)},!0),x=m.style,k=[],N=[],_=l.getValues(x);for(let P=0,M=this._listKebab.length;P<M;P++)_.indexOf(this._listKebab[P])>-1&&p.indexOf(this._listKebab[P])>-1&&(k.push(this._listCamel[P]),N.push(this._listKebab[P]));if(!k.length)return;const C=l.createElement("SPAN");for(let P=0,M=k.length;P<M;P++)C.style[k[P]]=x[N[P]],x.removeProperty(N[P]);let E=C.cloneNode(!1),T=null,D=!1;for(let P=0,M=b.length,O,F;P<M;P++)O=b[P],!r._textTagsMap[O.nodeName.toLowerCase()]&&(F=l.getValues(O.style),F.length===0||k.some(function(z){return F.indexOf(z)===-1})&&F.some(function(z){})?(T=O.nextSibling,E.appendChild(O)):E.childNodes.length>0&&(m.insertBefore(E,T),E=C.cloneNode(!1),T=null,D=!0));return E.childNodes.length>0&&(m.insertBefore(E,T),D=!0),x.length||m.removeAttribute("style"),D},_setCommonListStyle:function(m,p){if(!l.isListCell(m))return;const b=l.getArrayItem((p||m).childNodes,function(E){return!l.isBreak(E)},!0);if(p=b[0],!p||b.length>1||p.nodeType!==1)return;const x=p.style,k=m.style,N=p.nodeName.toLowerCase();let _=!1;r._textTagsMap[N]===r._defaultCommand.bold.toLowerCase()&&(k.fontWeight="bold"),r._textTagsMap[N]===r._defaultCommand.italic.toLowerCase()&&(k.fontStyle="italic");const C=l.getValues(x);if(C.length>0)for(let E=0,T=this._listCamel.length;E<T;E++)C.indexOf(this._listKebab[E])>-1&&(k[this._listCamel[E]]=x[this._listCamel[E]],x.removeProperty(this._listKebab[E]),_=!0);if(this._setCommonListStyle(m,p),!!_&&!x.length){const E=p.childNodes,T=p.parentNode,D=p.nextSibling;for(;E.length>0;)T.insertBefore(E[0],D);l.removeItem(p)}},_stripRemoveNode:function(m){const p=m.parentNode;if(!m||m.nodeType===3||!p)return;const b=m.childNodes;for(;b[0];)p.insertBefore(b[0],m);p.removeChild(m)},_util_getMaintainedNode:function(m,p,b){return!b||m?null:this.getParentElement(b,this._isMaintainedNode.bind(this))||(p?null:this.getParentElement(b,this._isSizeNode.bind(this)))},_util_isMaintainedNode:function(m,p,b){if(!b||m||b.nodeType!==1)return!1;const x=this._isMaintainedNode(b);return this.getParentElement(b,this._isMaintainedNode.bind(this))?x:x||(p?!1:this._isSizeNode(b))},_nodeChange_oneLine:function(m,p,b,x,k,N,_,C,E,T,D,P,M){let O=x.parentNode;for(;!O.nextSibling&&!O.previousSibling&&!l.isFormatElement(O.parentNode)&&!l.isWysiwygDiv(O.parentNode)&&O.nodeName!==p.nodeName;)O=O.parentNode;if(!E&&O===N.parentNode&&O.nodeName===p.nodeName&&l.onlyZeroWidthSpace(x.textContent.slice(0,k))&&l.onlyZeroWidthSpace(N.textContent.slice(_))){const ae=O.childNodes;let ie=!0;for(let de=0,fe=ae.length,be,he,ve,Ce;de<fe;de++){if(be=ae[de],Ce=!l.onlyZeroWidthSpace(be),be===x){he=!0;continue}if(be===N){ve=!0;continue}if(!he&&Ce||he&&ve&&Ce){ie=!1;break}}if(ie)return l.copyTagAttributes(O,p),{ancestor:m,startContainer:x,startOffset:k,endContainer:N,endOffset:_}}D.v=!1;const F=m,z=[p],H=m.cloneNode(!1),A=x===N;let j=x,I=k,B=N,Y=_,U=!1,W=!1,V,X,ne,oe,q;const te=c.RegExp;function G(ae){const ie=new te("(?:;|^|\\s)(?:"+oe+"null)\\s*:[^;]*\\s*(?:;|$)","ig");let de="";return ie&&ae.style.cssText.length>0&&(de=ie.test(ae.style.cssText)),!de}if(function ae(ie,de){const fe=ie.childNodes;for(let be=0,he=fe.length,ve;be<he;be++){let Ce=fe[be];if(!Ce)continue;let nt=de,Ae;if(!U&&Ce===j){let Je=H;q=P(Ce);const ze=l.createTextNode(j.nodeType===1?"":j.substringData(0,I)),We=l.createTextNode(j.nodeType===1?"":j.substringData(I,A&&Y>=I?Y-I:j.data.length-I));if(q){const wt=P(de);if(wt&&wt.parentNode!==Je){let At=wt,Yt=null;for(;At.parentNode!==Je;){for(de=Yt=At.parentNode.cloneNode(!1);At.childNodes[0];)Yt.appendChild(At.childNodes[0]);At.appendChild(Yt),At=At.parentNode}At.parentNode.appendChild(wt)}q=q.cloneNode(!1)}l.onlyZeroWidthSpace(ze)||de.appendChild(ze);const bt=P(de);for(bt&&(q=bt),q&&(Je=q),X=Ce,V=[],oe="";X!==Je&&X!==F&&X!==null;)ve=M(X)?null:b(X),ve&&X.nodeType===1&&G(X)&&(V.push(ve),oe+=X.style.cssText.substr(0,X.style.cssText.indexOf(":"))+"|"),X=X.parentNode;const Et=V.pop()||We;for(ne=X=Et;V.length>0;)X=V.pop(),ne.appendChild(X),ne=X;if(p.appendChild(Et),Je.appendChild(p),q&&!P(B)&&(p=p.cloneNode(!1),H.appendChild(p),z.push(p)),j=We,I=0,U=!0,X!==We&&X.appendChild(j),!A)continue}if(!W&&Ce===B){q=P(Ce);const Je=l.createTextNode(B.nodeType===1?"":B.substringData(Y,B.length-Y)),ze=l.createTextNode(A||B.nodeType===1?"":B.substringData(0,Y));if(q?q=q.cloneNode(!1):M(p.parentNode)&&!q&&(p=p.cloneNode(!1),H.appendChild(p),z.push(p)),!l.onlyZeroWidthSpace(Je)){X=Ce,oe="",V=[];const bt=[];for(;X!==H&&X!==F&&X!==null;)X.nodeType===1&&G(X)&&(M(X)?bt.push(X.cloneNode(!1)):V.push(X.cloneNode(!1)),oe+=X.style.cssText.substr(0,X.style.cssText.indexOf(":"))+"|"),X=X.parentNode;for(V=V.concat(bt),Ae=ne=X=V.pop()||Je;V.length>0;)X=V.pop(),ne.appendChild(X),ne=X;H.appendChild(Ae),X.textContent=Je.data}if(q&&Ae){const bt=P(Ae);bt&&(q=bt)}for(X=Ce,V=[],oe="";X!==H&&X!==F&&X!==null;)ve=M(X)?null:b(X),ve&&X.nodeType===1&&G(X)&&(V.push(ve),oe+=X.style.cssText.substr(0,X.style.cssText.indexOf(":"))+"|"),X=X.parentNode;const We=V.pop()||ze;for(ne=X=We;V.length>0;)X=V.pop(),ne.appendChild(X),ne=X;q?(p=p.cloneNode(!1),p.appendChild(We),q.insertBefore(p,q.firstChild),H.appendChild(q),z.push(p),q=null):p.appendChild(We),B=ze,Y=ze.data.length,W=!0,!C&&T&&(p=ze,ze.textContent=l.zeroWidthSpace),X!==ze&&X.appendChild(B);continue}if(U){if(Ce.nodeType===1&&!l.isBreak(Ce)){l._isIgnoreNodeChange(Ce)?(H.appendChild(Ce.cloneNode(!0)),T||(p=p.cloneNode(!1),H.appendChild(p),z.push(p))):ae(Ce,Ce);continue}X=Ce,V=[],oe="";const Je=[];for(;X.parentNode!==null&&X!==F&&X!==p;)ve=W?X.cloneNode(!1):b(X),X.nodeType===1&&!l.isBreak(Ce)&&ve&&G(X)&&(M(X)?q||Je.push(ve):V.push(ve),oe+=X.style.cssText.substr(0,X.style.cssText.indexOf(":"))+"|"),X=X.parentNode;V=V.concat(Je);const ze=V.pop()||Ce;for(ne=X=ze;V.length>0;)X=V.pop(),ne.appendChild(X),ne=X;if(M(p.parentNode)&&!M(ze)&&!l.onlyZeroWidthSpace(p)&&(p=p.cloneNode(!1),H.appendChild(p),z.push(p)),!W&&!q&&M(ze)){p=p.cloneNode(!1);const We=ze.childNodes;for(let bt=0,Et=We.length;bt<Et;bt++)p.appendChild(We[bt]);ze.appendChild(p),H.appendChild(ze),z.push(p),p.children.length>0?de=X:de=p}else ze===Ce?W?de=H:de=p:W?(H.appendChild(ze),de=X):(p.appendChild(ze),de=X);if(q&&Ce.nodeType===3)if(P(Ce)){const We=l.getParentElement(de,function(bt){return this._isMaintainedNode(bt.parentNode)||bt.parentNode===H}.bind(l));q.appendChild(We),p=We.cloneNode(!1),z.push(p),H.appendChild(p)}else q=null}Ae=Ce.cloneNode(!1),de.appendChild(Ae),Ce.nodeType===1&&!l.isBreak(Ce)&&(nt=Ae),ae(Ce,nt)}}(m,H),E&&!C&&!D.v)return{ancestor:m,startContainer:x,startOffset:k,endContainer:N,endOffset:_};if(C=C&&E,C)for(let ae=0;ae<z.length;ae++){let ie=z[ae],de,fe,be;if(T)de=l.createTextNode(l.zeroWidthSpace),H.replaceChild(de,ie);else{const he=ie.childNodes;for(fe=he[0];he[0];)be=he[0],H.insertBefore(be,ie);l.removeItem(ie)}ae===0&&(T?j=B=de:(j=fe,B=be))}else{if(E)for(let ae=0;ae<z.length;ae++)this._stripRemoveNode(z[ae]);T&&(j=B=p)}l.removeEmptyNode(H,p,!1),T&&(I=j.textContent.length,Y=B.textContent.length);const J=C||B.textContent.length===0;!l.isBreak(B)&&B.textContent.length===0&&(l.removeItem(B),B=j),Y=J?B.textContent.length:Y;const K={s:0,e:0},Q=l.getNodePath(j,H,K),Z=!B.parentNode;Z&&(B=j);const se={s:0,e:0},ce=l.getNodePath(B,H,!Z&&!J?se:null);I+=K.s,Y=T?I:Z?j.textContent.length:J?Y+K.s:Y+se.s;const le=l.mergeSameTags(H,[Q,ce],!0);return m.parentNode.replaceChild(H,m),j=l.getNodeFromPath(Q,H),B=l.getNodeFromPath(ce,H),{ancestor:H,startContainer:j,startOffset:I+le[0],endContainer:B,endOffset:Y+le[1]}},_nodeChange_startLine:function(m,p,b,x,k,N,_,C,E,T,D){let P=x.parentNode;for(;!P.nextSibling&&!P.previousSibling&&!l.isFormatElement(P.parentNode)&&!l.isWysiwygDiv(P.parentNode)&&P.nodeName!==p.nodeName;)P=P.parentNode;if(!_&&P.nodeName===p.nodeName&&!l.isFormatElement(P)&&!P.nextSibling&&l.onlyZeroWidthSpace(x.textContent.slice(0,k))){let U=!0,W=x.previousSibling;for(;W;){if(!l.onlyZeroWidthSpace(W)){U=!1;break}W=W.previousSibling}if(U)return l.copyTagAttributes(P,p),{ancestor:m,container:x,offset:k}}C.v=!1;const M=m,O=[p],F=m.cloneNode(!1);let z=x,H=k,A=!1,j,I,B,Y;if(function U(W,V){const X=W.childNodes;for(let ne=0,oe=X.length,q,te;ne<oe;ne++){const G=X[ne];if(!G)continue;let J=V;if(A&&!l.isBreak(G)){if(G.nodeType===1){if(l._isIgnoreNodeChange(G)){if(p=p.cloneNode(!1),te=G.cloneNode(!0),F.appendChild(te),F.appendChild(p),O.push(p),D&&G.contains(D)){const se=l.getNodePath(D,G);D=l.getNodeFromPath(se,te)}}else U(G,G);continue}I=G,j=[];const K=[];for(;I.parentNode!==null&&I!==M&&I!==p;)q=b(I),I.nodeType===1&&q&&(T(I)?Y||K.push(q):j.push(q)),I=I.parentNode;j=j.concat(K);const Q=j.length>0,Z=j.pop()||G;for(B=I=Z;j.length>0;)I=j.pop(),B.appendChild(I),B=I;if(T(p.parentNode)&&!T(Z)&&(p=p.cloneNode(!1),F.appendChild(p),O.push(p)),!Y&&T(Z)){p=p.cloneNode(!1);const se=Z.childNodes;for(let ce=0,le=se.length;ce<le;ce++)p.appendChild(se[ce]);Z.appendChild(p),F.appendChild(Z),V=T(I)?p:I,O.push(p)}else Q?(p.appendChild(Z),V=I):V=p;if(Y&&G.nodeType===3)if(E(G)){const se=l.getParentElement(V,function(ce){return this._isMaintainedNode(ce.parentNode)||ce.parentNode===F}.bind(l));Y.appendChild(se),p=se.cloneNode(!1),O.push(p),F.appendChild(p)}else Y=null}if(!A&&G===z){let K=F;Y=E(G);const Q=l.createTextNode(z.nodeType===1?"":z.substringData(0,H)),Z=l.createTextNode(z.nodeType===1?"":z.substringData(H,z.length-H));if(Y){const le=E(V);if(le&&le.parentNode!==K){let ae=le,ie=null;for(;ae.parentNode!==K;){for(V=ie=ae.parentNode.cloneNode(!1);ae.childNodes[0];)ie.appendChild(ae.childNodes[0]);ae.appendChild(ie),ae=ae.parentNode}ae.parentNode.appendChild(le)}Y=Y.cloneNode(!1)}l.onlyZeroWidthSpace(Q)||V.appendChild(Q);const se=E(V);for(se&&(Y=se),Y&&(K=Y),I=V,j=[];I!==K&&I!==null;)q=b(I),I.nodeType===1&&q&&j.push(q),I=I.parentNode;const ce=j.pop()||V;for(B=I=ce;j.length>0;)I=j.pop(),B.appendChild(I),B=I;ce!==V?(p.appendChild(ce),V=I):V=p,l.isBreak(G)&&p.appendChild(G.cloneNode(!1)),K.appendChild(p),z=Z,H=0,A=!0,V.appendChild(z);continue}q=A?b(G):G.cloneNode(!1),q&&(V.appendChild(q),G.nodeType===1&&!l.isBreak(G)&&(J=q)),U(G,J)}}(m,F),_&&!N&&!C.v)return{ancestor:m,container:x,offset:k,endContainer:D};if(N=N&&_,N)for(let U=0;U<O.length;U++){let W=O[U];const V=W.childNodes,X=V[0];for(;V[0];)F.insertBefore(V[0],W);l.removeItem(W),U===0&&(z=X)}else if(_){p=p.firstChild;for(let U=0;U<O.length;U++)this._stripRemoveNode(O[U])}if(!N&&F.childNodes.length===0)m.childNodes?z=m.childNodes[0]:(z=l.createTextNode(l.zeroWidthSpace),m.appendChild(z));else{l.removeEmptyNode(F,p,!1),l.onlyZeroWidthSpace(F.textContent)&&(z=F.firstChild,H=0);const U={s:0,e:0},W=l.getNodePath(z,F,U);H+=U.s;const V=l.mergeSameTags(F,[W],!0);m.parentNode.replaceChild(F,m),z=l.getNodeFromPath(W,F),H+=V[0]}return{ancestor:F,container:z,offset:H,endContainer:D}},_nodeChange_middleLine:function(m,p,b,x,k,N,_){if(!k){let D=null;_&&m.contains(_)&&(D=l.getNodePath(_,m));const P=m.cloneNode(!0),M=p.nodeName,O=p.style.cssText,F=p.className;let z=P.childNodes,H=0,A=z.length;for(let j;H<A&&(j=z[H],j.nodeType!==3);H++)if(j.nodeName===M)j.style.cssText+=O,l.addClass(j,F);else{if(!l.isBreak(j)&&l._isIgnoreNodeChange(j))continue;if(A===1){z=j.childNodes,A=z.length,H=-1;continue}else break}if(A>0&&H===A)return m.innerHTML=P.innerHTML,{ancestor:m,endContainer:D?l.getNodeFromPath(D,m):null}}N.v=!1;const C=m.cloneNode(!1),E=[p];let T=!0;if(function D(P,M){const O=P.childNodes;for(let F=0,z=O.length,H,A;F<z;F++){let j=O[F];if(!j)continue;let I=M;if(!l.isBreak(j)&&l._isIgnoreNodeChange(j)){if(p.childNodes.length>0&&(C.appendChild(p),p=p.cloneNode(!1)),A=j.cloneNode(!0),C.appendChild(A),C.appendChild(p),E.push(p),M=p,_&&j.contains(_)){const B=l.getNodePath(_,j);_=l.getNodeFromPath(B,A)}continue}else H=b(j),H&&(T=!1,M.appendChild(H),j.nodeType===1&&(I=H));l.isBreak(j)||D(j,I)}}(m,p),T||k&&!x&&!N.v)return{ancestor:m,endContainer:_};if(C.appendChild(p),x&&k)for(let D=0;D<E.length;D++){let P=E[D];const M=P.childNodes;for(;M[0];)C.insertBefore(M[0],P);l.removeItem(P)}else if(k){p=p.firstChild;for(let D=0;D<E.length;D++)this._stripRemoveNode(E[D])}return l.removeEmptyNode(C,p,!1),l.mergeSameTags(C,null,!0),m.parentNode.replaceChild(C,m),{ancestor:C,endContainer:_}},_nodeChange_endLine:function(m,p,b,x,k,N,_,C,E,T){let D=x.parentNode;for(;!D.nextSibling&&!D.previousSibling&&!l.isFormatElement(D.parentNode)&&!l.isWysiwygDiv(D.parentNode)&&D.nodeName!==p.nodeName;)D=D.parentNode;if(!_&&D.nodeName===p.nodeName&&!l.isFormatElement(D)&&!D.previousSibling&&l.onlyZeroWidthSpace(x.textContent.slice(k))){let Y=!0,U=x.nextSibling;for(;U;){if(!l.onlyZeroWidthSpace(U)){Y=!1;break}U=U.nextSibling}if(Y)return l.copyTagAttributes(D,p),{ancestor:m,container:x,offset:k}}C.v=!1;const P=m,M=[p],O=m.cloneNode(!1);let F=x,z=k,H=!1,A,j,I,B;if(function Y(U,W){const V=U.childNodes;for(let X=V.length-1,ne;0<=X;X--){const oe=V[X];if(!oe)continue;let q=W;if(H&&!l.isBreak(oe)){if(oe.nodeType===1){if(l._isIgnoreNodeChange(oe)){p=p.cloneNode(!1);const K=oe.cloneNode(!0);O.insertBefore(K,W),O.insertBefore(p,K),M.push(p)}else Y(oe,oe);continue}j=oe,A=[];const te=[];for(;j.parentNode!==null&&j!==P&&j!==p;)ne=b(j),ne&&j.nodeType===1&&(T(j)?B||te.push(ne):A.push(ne)),j=j.parentNode;A=A.concat(te);const G=A.length>0,J=A.pop()||oe;for(I=j=J;A.length>0;)j=A.pop(),I.appendChild(j),I=j;if(T(p.parentNode)&&!T(J)&&(p=p.cloneNode(!1),O.insertBefore(p,O.firstChild),M.push(p)),!B&&T(J)){p=p.cloneNode(!1);const K=J.childNodes;for(let Q=0,Z=K.length;Q<Z;Q++)p.appendChild(K[Q]);J.appendChild(p),O.insertBefore(J,O.firstChild),M.push(p),p.children.length>0?W=j:W=p}else G?(p.insertBefore(J,p.firstChild),W=j):W=p;if(B&&oe.nodeType===3)if(E(oe)){const K=l.getParentElement(W,function(Q){return this._isMaintainedNode(Q.parentNode)||Q.parentNode===O}.bind(l));B.appendChild(K),p=K.cloneNode(!1),M.push(p),O.insertBefore(p,O.firstChild)}else B=null}if(!H&&oe===F){B=E(oe);const te=l.createTextNode(F.nodeType===1?"":F.substringData(z,F.length-z)),G=l.createTextNode(F.nodeType===1?"":F.substringData(0,z));if(B){B=B.cloneNode(!1);const K=E(W);if(K&&K.parentNode!==O){let Q=K,Z=null;for(;Q.parentNode!==O;){for(W=Z=Q.parentNode.cloneNode(!1);Q.childNodes[0];)Z.appendChild(Q.childNodes[0]);Q.appendChild(Z),Q=Q.parentNode}Q.parentNode.insertBefore(K,Q.parentNode.firstChild)}B=B.cloneNode(!1)}else T(p.parentNode)&&!B&&(p=p.cloneNode(!1),O.appendChild(p),M.push(p));for(l.onlyZeroWidthSpace(te)||W.insertBefore(te,W.firstChild),j=W,A=[];j!==O&&j!==null;)ne=T(j)?null:b(j),ne&&j.nodeType===1&&A.push(ne),j=j.parentNode;const J=A.pop()||W;for(I=j=J;A.length>0;)j=A.pop(),I.appendChild(j),I=j;J!==W?(p.insertBefore(J,p.firstChild),W=j):W=p,l.isBreak(oe)&&p.appendChild(oe.cloneNode(!1)),B?(B.insertBefore(p,B.firstChild),O.insertBefore(B,O.firstChild),B=null):O.insertBefore(p,O.firstChild),F=G,z=G.data.length,H=!0,W.insertBefore(F,W.firstChild);continue}ne=H?b(oe):oe.cloneNode(!1),ne&&(W.insertBefore(ne,W.firstChild),oe.nodeType===1&&!l.isBreak(oe)&&(q=ne)),Y(oe,q)}}(m,O),_&&!N&&!C.v)return{ancestor:m,container:x,offset:k};if(N=N&&_,N)for(let Y=0;Y<M.length;Y++){let U=M[Y];const W=U.childNodes;let V=null;for(;W[0];)V=W[0],O.insertBefore(V,U);l.removeItem(U),Y===M.length-1&&(F=V,z=V.textContent.length)}else if(_){p=p.firstChild;for(let Y=0;Y<M.length;Y++)this._stripRemoveNode(M[Y])}if(!N&&O.childNodes.length===0)m.childNodes?F=m.childNodes[0]:(F=l.createTextNode(l.zeroWidthSpace),m.appendChild(F));else{if(!_&&p.textContent.length===0)return l.removeEmptyNode(O,null,!1),{ancestor:null,container:null,offset:0};l.removeEmptyNode(O,p,!1),l.onlyZeroWidthSpace(O.textContent)?(F=O.firstChild,z=F.textContent.length):l.onlyZeroWidthSpace(F)&&(F=p,z=1);const Y={s:0,e:0},U=l.getNodePath(F,O,Y);z+=Y.s;const W=l.mergeSameTags(O,[U],!0);m.parentNode.replaceChild(O,m),F=l.getNodeFromPath(U,O),z+=W[0]}return{ancestor:O,container:F,offset:F.nodeType===1&&z===1?F.childNodes.length:z}},actionCall:function(m,p,b){if(p){if(/more/i.test(p)){if(b!==this._moreLayerActiveButton){const x=e.element.toolbar.querySelector("."+m);x&&(this._moreLayerActiveButton&&this.moreLayerOff(),this._moreLayerActiveButton=b,x.style.display="block",g._showToolbarBalloon(),g._showToolbarInline()),l.addClass(b,"on")}else e.element.toolbar.querySelector("."+this._moreLayerActiveButton.getAttribute("data-command"))&&(this.moreLayerOff(),g._showToolbarBalloon(),g._showToolbarInline());return}if(/container/.test(p)&&(this._menuTray[m]===null||b!==this.containerActiveButton)){this.callPlugin(m,this.containerOn.bind(this,b),b);return}if(this.isReadOnly&&l.arrayIncludes(this.resizingDisabledButtons,b))return;if(/submenu/.test(p)&&(this._menuTray[m]===null||b!==this.submenuActiveButton)){this.callPlugin(m,this.submenuOn.bind(this,b),b);return}else if(/dialog/.test(p)){this.callPlugin(m,this.plugins[m].open.bind(this),b);return}else/command/.test(p)?this.callPlugin(m,this.plugins[m].action.bind(this),b):/fileBrowser/.test(p)&&this.callPlugin(m,this.plugins[m].open.bind(this,null),b)}else m&&this.commandHandler(b,m);/submenu/.test(p)?this.submenuOff():/command/.test(p)||(this.submenuOff(),this.containerOff())},commandHandler:function(m,p){if(!(u.isReadOnly&&!/copy|cut|selectAll|codeView|fullScreen|print|preview|showBlocks/.test(p)))switch(p){case"copy":case"cut":this.execCommand(p);break;case"paste":break;case"selectAll":this.containerOff();const b=e.element.wysiwyg;let x=l.getChildElement(b.firstChild,function(E){return E.childNodes.length===0||E.nodeType===3},!1)||b.firstChild,k=l.getChildElement(b.lastChild,function(E){return E.childNodes.length===0||E.nodeType===3},!0)||b.lastChild;if(!x||!k)return;if(l.isMedia(x)){const E=this.getFileComponent(x),T=l.createElement("BR"),D=l.createElement(r.defaultTag);D.appendChild(T),x=E?E.component:x,x.parentNode.insertBefore(D,x),x=T}if(l.isMedia(k)){const E=l.createElement("BR"),T=l.createElement(r.defaultTag);T.appendChild(E),b.appendChild(T),k=E}g._showToolbarBalloon(this.setRange(x,0,k,k.textContent.length));break;case"codeView":this.toggleCodeView();break;case"fullScreen":this.toggleFullScreen(m);break;case"indent":case"outdent":this.indent(p);break;case"undo":this.history.undo();break;case"redo":this.history.redo();break;case"removeFormat":this.removeFormat(),this.focus();break;case"print":this.print();break;case"preview":this.preview();break;case"showBlocks":this.toggleDisplayBlocks();break;case"dir":this.setDir(r.rtl?"ltr":"rtl");break;case"dir_ltr":this.setDir("ltr");break;case"dir_rtl":this.setDir("rtl");break;case"save":if(typeof r.callBackSave=="function")r.callBackSave(this.getContents(!1),this._variable.isChanged);else if(this._variable.isChanged&&typeof y.save=="function")y.save();else throw Error("[SUNEDITOR.core.commandHandler.fail] Please register call back function in creation option. (callBackSave : Function)");this._variable.isChanged=!1,e.tool.save&&e.tool.save.setAttribute("disabled",!0);break;default:p=r._defaultCommand[p.toLowerCase()]||p,this.commandMap[p]||(this.commandMap[p]=m);const N=this._variable.currentNodesMap,_=N.indexOf(p)>-1?null:l.createElement(p);let C=p;/^SUB$/i.test(p)&&N.indexOf("SUP")>-1?C="SUP":/^SUP$/i.test(p)&&N.indexOf("SUB")>-1&&(C="SUB"),this.nodeChange(_,this._commandMapStyles[p]||null,[C],!1),this.focus()}},removeFormat:function(){this.nodeChange(null,null,null,null)},indent:function(m){const p=this.getRange(),b=this.getSelectedElements(null),x=[],k=m!=="indent",N=r.rtl?"marginRight":"marginLeft";let _=p.startContainer,C=p.endContainer,E=p.startOffset,T=p.endOffset;for(let D=0,P=b.length,M,O;D<P;D++)M=b[D],!l.isListCell(M)||!this.plugins.list?(O=/\d+/.test(M.style[N])?l.getNumber(M.style[N],0):0,k?O-=25:O+=25,l.setStyle(M,N,O<=0?"":O+"px")):(k||M.previousElementSibling)&&x.push(M);x.length>0&&this.plugins.list.editInsideList.call(this,k,x),this.effectNode=null,this.setRange(_,E,C,T),this.history.push(!1)},toggleDisplayBlocks:function(){const m=e.element.wysiwyg;l.toggleClass(m,"se-show-block"),l.hasClass(m,"se-show-block")?l.addClass(this._styleCommandMap.showBlocks,"active"):l.removeClass(this._styleCommandMap.showBlocks,"active"),this._resourcesStateChange()},toggleCodeView:function(){const m=this._variable.isCodeView;this.controllersOff(),l.setDisabledButtons(!m,this.codeViewDisabledButtons),m?(l.isNonEditable(e.element.wysiwygFrame)||this._setCodeDataToEditor(),e.element.wysiwygFrame.scrollTop=0,e.element.code.style.display="none",e.element.wysiwygFrame.style.display="block",this._variable._codeOriginCssText=this._variable._codeOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: none"),this._variable._wysiwygOriginCssText=this._variable._wysiwygOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: block"),r.height==="auto"&&!r.codeMirrorEditor&&(e.element.code.style.height="0px"),this._variable.isCodeView=!1,this._variable.isFullScreen||(this._notHideToolbar=!1,/balloon|balloon-always/i.test(r.mode)&&(e.element._arrow.style.display="",this._isInline=!1,this._isBalloon=!0,g._hideToolbar())),this.nativeFocus(),l.removeClass(this._styleCommandMap.codeView,"active"),l.isNonEditable(e.element.wysiwygFrame)||(this.history.push(!1),this.history._resetCachingButton())):(this._setEditorDataToCodeView(),this._variable._codeOriginCssText=this._variable._codeOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: block"),this._variable._wysiwygOriginCssText=this._variable._wysiwygOriginCssText.replace(/(\s?display(\s+)?:(\s+)?)[a-zA-Z]+(?=;)/,"display: none"),this._variable.isFullScreen?e.element.code.style.height="100%":r.height==="auto"&&!r.codeMirrorEditor&&(e.element.code.style.height=e.element.code.scrollHeight>0?e.element.code.scrollHeight+"px":"auto"),r.codeMirrorEditor&&r.codeMirrorEditor.refresh(),this._variable.isCodeView=!0,this._variable.isFullScreen||(this._notHideToolbar=!0,this._isBalloon&&(e.element._arrow.style.display="none",e.element.toolbar.style.left="",this._isInline=!0,this._isBalloon=!1,g._showToolbarInline())),this._variable._range=null,e.element.code.focus(),l.addClass(this._styleCommandMap.codeView,"active")),this._checkPlaceholder(),this.isReadOnly&&l.setDisabledButtons(!0,this.resizingDisabledButtons),typeof y.toggleCodeView=="function"&&y.toggleCodeView(this._variable.isCodeView,this)},_setCodeDataToEditor:function(){const m=this._getCodeView();if(r.fullPage){const p=this._parser.parseFromString(m,"text/html");if(!this.options.__allowedScriptTag){const k=p.head.children;for(let N=0,_=k.length;N<_;N++)/^script$/i.test(k[N].tagName)&&(p.head.removeChild(k[N]),N--,_--)}let b=p.head.innerHTML;(!p.head.querySelector('link[rel="stylesheet"]')||this.options.height==="auto"&&!p.head.querySelector("style"))&&(b+=l._setIframeCssTags(this.options)),this._wd.head.innerHTML=b,this._wd.body.innerHTML=this.convertContentsForEditor(p.body.innerHTML);const x=p.body.attributes;for(let k=0,N=x.length;k<N;k++)x[k].name!=="contenteditable"&&this._wd.body.setAttribute(x[k].name,x[k].value);if(!l.hasClass(this._wd.body,"sun-editor-editable")){const k=r._editableClass.split(" ");for(let N=0;N<k.length;N++)l.addClass(this._wd.body,r._editableClass[N])}}else e.element.wysiwyg.innerHTML=m.length>0?this.convertContentsForEditor(m):"<"+r.defaultTag+"><br></"+r.defaultTag+">"},_setEditorDataToCodeView:function(){const m=this.convertHTMLForCodeView(e.element.wysiwyg,!1);let p="";if(r.fullPage){const b=l.getAttributesToString(this._wd.body,null);p=`<!DOCTYPE html>
<html>
`+this._wd.head.outerHTML.replace(/>(?!\n)/g,`>
`)+"<body "+b+`>
`+m+`</body>
</html>`}else p=m;e.element.code.style.display="block",e.element.wysiwygFrame.style.display="none",this._setCodeView(p)},toggleFullScreen:function(m){const p=e.element.topArea,b=e.element.toolbar,x=e.element.editorArea,k=e.element.wysiwygFrame,N=e.element.code,_=this._variable;this.controllersOff();const C=b.style.display==="none"||this._isInline&&!this._inlineToolbarAttr.isShow;_.isFullScreen?(_.isFullScreen=!1,k.style.cssText=_._wysiwygOriginCssText,N.style.cssText=_._codeOriginCssText,b.style.cssText="",x.style.cssText=_._editorAreaOriginCssText,p.style.cssText=_._originCssText,o.body.style.overflow=_._bodyOverflow,r.height==="auto"&&!r.codeMirrorEditor&&g._codeViewAutoHeight(),r.toolbarContainer&&r.toolbarContainer.appendChild(b),r.stickyToolbar>-1&&l.removeClass(b,"se-toolbar-sticky"),_._fullScreenAttrs.sticky&&!r.toolbarContainer&&(_._fullScreenAttrs.sticky=!1,e.element._stickyDummy.style.display="block",l.addClass(b,"se-toolbar-sticky")),this._isInline=_._fullScreenAttrs.inline,this._isBalloon=_._fullScreenAttrs.balloon,this._isInline&&g._showToolbarInline(),r.toolbarContainer&&l.removeClass(b,"se-toolbar-balloon"),g.onScroll_window(),m&&l.changeElement(m.firstElementChild,d.expansion),e.element.topArea.style.marginTop="",l.removeClass(this._styleCommandMap.fullScreen,"active")):(_.isFullScreen=!0,_._fullScreenAttrs.inline=this._isInline,_._fullScreenAttrs.balloon=this._isBalloon,(this._isInline||this._isBalloon)&&(this._isInline=!1,this._isBalloon=!1),r.toolbarContainer&&e.element.relative.insertBefore(b,x),p.style.position="fixed",p.style.top="0",p.style.left="0",p.style.width="100%",p.style.maxWidth="100%",p.style.height="100%",p.style.zIndex="2147483647",e.element._stickyDummy.style.display!==""&&(_._fullScreenAttrs.sticky=!0,e.element._stickyDummy.style.display="none",l.removeClass(b,"se-toolbar-sticky")),_._bodyOverflow=o.body.style.overflow,o.body.style.overflow="hidden",_._editorAreaOriginCssText=x.style.cssText,_._wysiwygOriginCssText=k.style.cssText,_._codeOriginCssText=N.style.cssText,x.style.cssText=b.style.cssText="",k.style.cssText=(k.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0]+r._editorStyles.editor,N.style.cssText=(N.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],b.style.width=k.style.height=N.style.height="100%",b.style.position="relative",b.style.display="block",_.innerHeight_fullScreen=c.innerHeight-b.offsetHeight,x.style.height=_.innerHeight_fullScreen-r.fullScreenOffset+"px",m&&l.changeElement(m.firstElementChild,d.reduction),r.iframe&&r.height==="auto"&&(x.style.overflow="auto",this._iframeAutoHeight()),e.element.topArea.style.marginTop=r.fullScreenOffset+"px",l.addClass(this._styleCommandMap.fullScreen,"active")),C&&y.toolbar.hide(),typeof y.toggleFullScreen=="function"&&y.toggleFullScreen(this._variable.isFullScreen,this)},print:function(){const m=l.createElement("IFRAME");m.style.display="none",o.body.appendChild(m);const p=r.printTemplate?r.printTemplate.replace(/\{\{\s*contents\s*\}\}/i,this.getContents(!0)):this.getContents(!0),b=l.getIframeDocument(m),x=this._wd;if(r.iframe){const k=r._printClass!==null?'class="'+r._printClass+'"':r.fullPage?l.getAttributesToString(x.body,["contenteditable"]):'class="'+r._editableClass+'"';b.write("<!DOCTYPE html><html><head>"+x.head.innerHTML+"</head><body "+k+">"+p+"</body></html>")}else{const k=o.head.getElementsByTagName("link"),N=o.head.getElementsByTagName("style");let _="";for(let C=0,E=k.length;C<E;C++)_+=k[C].outerHTML;for(let C=0,E=N.length;C<E;C++)_+=N[C].outerHTML;b.write("<!DOCTYPE html><html><head>"+_+'</head><body class="'+(r._printClass!==null?r._printClass:r._editableClass)+'">'+p+"</body></html>")}this.showLoading(),c.setTimeout(function(){try{if(m.focus(),l.isIE_Edge||l.isChromium||!!o.documentMode||!!c.StyleMedia)try{m.contentWindow.document.execCommand("print",!1,null)}catch{m.contentWindow.print()}else m.contentWindow.print()}catch(k){throw Error("[SUNEDITOR.core.print.fail] error: "+k)}finally{u.closeLoading(),l.removeItem(m)}},1e3)},preview:function(){u.submenuOff(),u.containerOff(),u.controllersOff();const m=r.previewTemplate?r.previewTemplate.replace(/\{\{\s*contents\s*\}\}/i,this.getContents(!0)):this.getContents(!0),p=c.open("","_blank");p.mimeType="text/html";const b=this._wd;if(r.iframe){const x=r._printClass!==null?'class="'+r._printClass+'"':r.fullPage?l.getAttributesToString(b.body,["contenteditable"]):'class="'+r._editableClass+'"';p.document.write("<!DOCTYPE html><html><head>"+b.head.innerHTML+"<style>body {overflow:auto !important; margin: 10px auto !important; height:auto !important; outline:1px dashed #ccc;}</style></head><body "+x+">"+m+"</body></html>")}else{const x=o.head.getElementsByTagName("link"),k=o.head.getElementsByTagName("style");let N="";for(let _=0,C=x.length;_<C;_++)N+=x[_].outerHTML;for(let _=0,C=k.length;_<C;_++)N+=k[_].outerHTML;p.document.write('<!DOCTYPE html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"><title>'+a.toolbar.preview+"</title>"+N+'</head><body class="'+(r._printClass!==null?r._printClass:r._editableClass)+'" style="margin:10px auto !important; height:auto !important; outline:1px dashed #ccc;">'+m+"</body></html>")}},setDir:function(m){const p=m==="rtl",b=this._prevRtl!==p;this._prevRtl=r.rtl=p,b&&(this.plugins.align&&this.plugins.align.exchangeDir.call(this),e.tool.indent&&l.changeElement(e.tool.indent.firstElementChild,d.indent),e.tool.outdent&&l.changeElement(e.tool.outdent.firstElementChild,d.outdent));const x=e.element;p?(l.addClass(x.topArea,"se-rtl"),l.addClass(x.wysiwygFrame,"se-rtl")):(l.removeClass(x.topArea,"se-rtl"),l.removeClass(x.wysiwygFrame,"se-rtl"));const k=l.getListChildren(x.wysiwyg,function(_){return l.isFormatElement(_)&&(_.style.marginRight||_.style.marginLeft||_.style.textAlign)});for(let _=0,C=k.length,E,T,D;_<C;_++)E=k[_],D=E.style.marginRight,T=E.style.marginLeft,(D||T)&&(E.style.marginRight=T,E.style.marginLeft=D),D=E.style.textAlign,D==="left"?E.style.textAlign="right":D==="right"&&(E.style.textAlign="left");const N=e.tool;N.dir&&(l.changeTxt(N.dir.querySelector(".se-tooltip-text"),a.toolbar[r.rtl?"dir_ltr":"dir_rtl"]),l.changeElement(N.dir.firstElementChild,d[r.rtl?"dir_ltr":"dir_rtl"])),N.dir_ltr&&(p?l.removeClass(N.dir_ltr,"active"):l.addClass(N.dir_ltr,"active")),N.dir_rtl&&(p?l.addClass(N.dir_rtl,"active"):l.removeClass(N.dir_rtl,"active"))},setContents:function(m){this.removeRange();const p=m==null?"":this.convertContentsForEditor(m,null,null);if(!this._variable.isCodeView)e.element.wysiwyg.innerHTML=p,this._resetComponents(),this.history.push(!1);else{const b=this.convertHTMLForCodeView(p,!1);this._setCodeView(b)}},setIframeContents:function(m){if(!r.iframe)return!1;m.head&&(this._wd.head.innerHTML=this.options.__allowedScriptTag?m.head:m.head.replace(this.__scriptTagRegExp,"")),m.body&&(this._wd.body.innerHTML=this.convertContentsForEditor(m.body)),this._resetComponents()},getContents:function(m){const p=this.cleanHTML(e.element.wysiwyg.innerHTML,null,null),b=l.createElement("DIV");b.innerHTML=p;const x=l.getListChildren(b,function(k){return k.hasAttribute("contenteditable")});for(let k=0,N=x.length;k<N;k++)x[k].removeAttribute("contenteditable");if(r.fullPage&&!m){const k=l.getAttributesToString(this._wd.body,["contenteditable"]);return"<!DOCTYPE html><html>"+this._wd.head.outerHTML+"<body "+k+">"+b.innerHTML+"</body></html>"}else return b.innerHTML},getFullContents:function(m){return'<div class="sun-editor-editable'+(r.rtl?" se-rtl":"")+'">'+this.getContents(m)+"</div>"},_makeLine:function(m,p){const b=r.defaultTag;if(m.nodeType===1){if(this.__disallowedTagNameRegExp.test(m.nodeName))return"";if(/__se__tag/.test(m.className))return m.outerHTML;const x=l.getListChildNodes(m,function(k){return l.isSpanWithoutAttr(k)&&!l.getParentElement(k,l.isNotCheckingNode)})||[];for(let k=x.length-1;k>=0;k--)x[k].outerHTML=x[k].innerHTML;return!p||l.isFormatElement(m)||l.isRangeFormatElement(m)||l.isComponent(m)||l.isFigures(m)||l.isAnchor(m)&&l.isMedia(m.firstElementChild)?l.isSpanWithoutAttr(m)?m.innerHTML:m.outerHTML:"<"+b+">"+(l.isSpanWithoutAttr(m)?m.innerHTML:m.outerHTML)+"</"+b+">"}if(m.nodeType===3){if(!p)return l._HTMLConvertor(m.textContent);const x=m.textContent.split(/\n/g);let k="";for(let N=0,_=x.length,C;N<_;N++)C=x[N].trim(),C.length>0&&(k+="<"+b+">"+l._HTMLConvertor(C)+"</"+b+">");return k}return m.nodeType===8&&this._allowHTMLComments?"<!--"+m.textContent.trim()+"-->":""},_tagConvertor:function(m){if(!this._disallowedTextTagsRegExp)return m;const p=r._textTagsMap;return m.replace(this._disallowedTextTagsRegExp,function(b,x,k,N){return x+(typeof p[k]=="string"?p[k]:k)+(N?" "+N:"")})},_deleteDisallowedTags:function(m){return m=m.replace(this.__disallowedTagsRegExp,"").replace(/<[a-z0-9]+\:[a-z0-9]+[^>^\/]*>[^>]*<\/[a-z0-9]+\:[a-z0-9]+>/gi,""),/\bfont\b/i.test(this.options._editorTagsWhitelist)||(m=m.replace(/(<\/?)font(\s?)/gi,"$1span$2")),m.replace(this.editorTagsWhitelistRegExp,"").replace(this.editorTagsBlacklistRegExp,"")},_convertFontSize:function(m,p){const b=this._w.Math,x=p.match(/(\d+(?:\.\d+)?)(.+)/),k=x?x[1]*1:l.fontValueMap[p],N=x?x[2]:"rem";let _=k;switch(/em/.test(N)?_=b.round(k/.0625):N==="pt"?_=b.round(k*1.333):N==="%"&&(_=k/100),m){case"em":case"rem":case"%":return(_*.0625).toFixed(2)+m;case"pt":return b.floor(_/1.333)+m;default:return _+m}},_cleanStyle:function(m,p,b){let x=(m.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/)||[])[0];if(/span/i.test(b)&&!x&&(m.match(/<[^\s]+\s(.+)/)||[])[1]){const k=(m.match(/\ssize="([^"]+)"/i)||[])[1],N=(m.match(/\sface="([^"]+)"/i)||[])[1],_=(m.match(/\scolor="([^"]+)"/i)||[])[1];(k||N||_)&&(x='style="'+(k?"font-size:"+this.util.getNumber(k/3.333,1)+"rem;":"")+(N?"font-family:"+N+";":"")+(_?"color:"+_+";":"")+'"')}if(x){p||(p=[]);const k=x.replace(/&quot;/g,"").match(this._cleanStyleRegExp[b]);if(k){const N=[];for(let _=0,C=k.length,E;_<C;_++)if(E=k[_].match(/([a-zA-Z0-9-]+)(:)([^"']+)/),E&&!/inherit|initial|revert|unset/i.test(E[3])){const T=l.kebabToCamelCase(E[1].trim()),D=this.wwComputedStyle[T].replace(/"/g,""),P=E[3].trim();switch(T){case"fontFamily":if(!r.plugins.font||r.font.indexOf(P)===-1)continue;break;case"fontSize":if(!r.plugins.fontSize)continue;this._cleanStyleRegExp.fontSizeUnit.test(E[0])||(E[0]=E[0].replace((E[0].match(/:\s*([^;]+)/)||[])[1],this._convertFontSize.bind(this,r.fontSizeUnit)));break;case"color":if(!r.plugins.fontColor||/rgba\(([0-9]+\s*,\s*){3}0\)|windowtext/i.test(P))continue;break;case"backgroundColor":if(!r.plugins.hiliteColor||/rgba\(([0-9]+\s*,\s*){3}0\)|windowtext/i.test(P))continue;break}D!==P&&N.push(E[0])}N.length>0&&p.push('style="'+N.join(";")+'"')}}return p},_cleanTags:function(m,p,b){if(/^<[a-z0-9]+\:[a-z0-9]+/i.test(p))return p;let x=null;const k=b.match(/(?!<)[a-zA-Z0-9\-]+/)[0].toLowerCase(),N=this._attributesTagsBlacklist[k];p=p.replace(/\s(?:on[a-z]+)\s*=\s*(")[^"]*\1/ig,""),N?p=p.replace(N,""):p=p.replace(this._attributesBlacklistRegExp,"");const _=this._attributesTagsWhitelist[k];if(_?x=p.match(_):x=p.match(m?this._attributesWhitelistRegExp:this._attributesWhitelistRegExp_all_data),m||k==="span"||k==="li"||this._cleanStyleRegExp[k])if(k==="a"){const C=p.match(/(?:(?:id|name)\s*=\s*(?:"|')[^"']*(?:"|'))/g);C&&(x||(x=[]),x.push(C[0]))}else(!x||!/style=/i.test(x.toString()))&&((k==="span"||k==="li")&&(x=this._cleanStyle(p,x,"span")),this._cleanStyleRegExp[k]?x=this._cleanStyle(p,x,k):/^(P|DIV|H[1-6]|PRE)$/i.test(k)&&(x=this._cleanStyle(p,x,"format")));else{const C=p.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/);C&&!x?x=[C[0]]:C&&!x.some(function(E){return/^style/.test(E.trim())})&&x.push(C[0])}if(l.isFigures(k)){const C=p.match(/style\s*=\s*(?:"|')[^"']*(?:"|')/);x||(x=[]),C&&x.push(C[0])}if(x)for(let C=0,E=x.length,T;C<E;C++)T=/^(?:href|src)\s*=\s*('|"|\s)*javascript\s*\:/i.test(x[C].trim())?"":x[C],b+=(/^\s/.test(T)?"":" ")+T;return b},_editFormat:function(m){let p="",b;const x=m.childNodes;for(let k=0,N=x.length,_;k<N;k++)_=x[k],_.nodeType===8?p+="<!-- "+_.textContent+" -->":!l.isFormatElement(_)&&!l.isRangeFormatElement(_)&&!l.isComponent(_)&&!/meta/i.test(_.nodeName)?(b||(b=l.createElement(r.defaultTag)),b.appendChild(_),k--,N--):(b&&(p+=b.outerHTML,b=null),p+=_.outerHTML);return b&&(p+=b.outerHTML),o.createRange().createContextualFragment(p)},_convertListCell:function(m){let p="";for(let b=0,x=m.length,k;b<x;b++)k=m[b],k.nodeType===1?l.isList(k)?p+=k.innerHTML:l.isListCell(k)?p+=k.outerHTML:l.isFormatElement(k)?p+="<li>"+(k.innerHTML.trim()||"<br>")+"</li>":l.isRangeFormatElement(k)&&!l.isTable(k)?p+=this._convertListCell(k):p+="<li>"+k.outerHTML+"</li>":p+="<li>"+(k.textContent||"<br>")+"</li>";return p},_isFormatData:function(m){let p=!1;for(let b=0,x=m.length,k;b<x;b++)if(k=m[b],k.nodeType===1&&!l.isTextStyleElement(k)&&!l.isBreak(k)&&!this.__disallowedTagNameRegExp.test(k.nodeName)){p=!0;break}return p},cleanHTML:function(m,p,b){if(!r.strictMode)return m;m=this._deleteDisallowedTags(this._parser.parseFromString(l.htmlCompress(m),"text/html").body.innerHTML).replace(/(<[a-zA-Z0-9\-]+)[^>]*(?=>)/g,this._cleanTags.bind(this,!0)).replace(/<br\/?>$/i,"");const x=o.createRange().createContextualFragment(m);try{l._consistencyCheckOfHTML(x,this._htmlCheckWhitelistRegExp,this._htmlCheckBlacklistRegExp,this._classNameFilter)}catch(C){console.warn("[SUNEDITOR.cleanHTML.consistencyCheck.fail] "+C)}if(this.managedTagsInfo&&this.managedTagsInfo.query){const C=x.querySelectorAll(this.managedTagsInfo.query);for(let E=0,T=C.length,D,P;E<T;E++){P=[].slice.call(C[E].classList);for(let M=0,O=P.length;M<O;M++)if(D=this.managedTagsInfo.map[P[M]],D){D(C[E]);break}}}let k=x.childNodes,N="";const _=this._isFormatData(k);_&&(k=this._editFormat(x).childNodes);for(let C=0,E=k.length,T;C<E;C++){if(T=k[C],this.__allowedScriptRegExp.test(T.nodeName)){N+=T.outerHTML;continue}N+=this._makeLine(T,_)}return N=l.htmlRemoveWhiteSpace(N),N?(p&&(N=N.replace(typeof p=="string"?l.createTagsWhitelist(p):p,"")),b&&(N=N.replace(typeof b=="string"?l.createTagsBlacklist(b):b,""))):N=m,this._tagConvertor(N)},convertContentsForEditor:function(m){if(!r.strictMode)return m;m=this._deleteDisallowedTags(this._parser.parseFromString(l.htmlCompress(m),"text/html").body.innerHTML).replace(/(<[a-zA-Z0-9\-]+)[^>]*(?=>)/g,this._cleanTags.bind(this,!0));const p=o.createRange().createContextualFragment(m);try{l._consistencyCheckOfHTML(p,this._htmlCheckWhitelistRegExp,this._htmlCheckBlacklistRegExp,this._classNameFilter)}catch(N){console.warn("[SUNEDITOR.convertContentsForEditor.consistencyCheck.fail] "+N)}if(this.managedTagsInfo&&this.managedTagsInfo.query){const N=p.querySelectorAll(this.managedTagsInfo.query);for(let _=0,C=N.length,E,T;_<C;_++){T=[].slice.call(N[_].classList);for(let D=0,P=T.length;D<P;D++)if(E=this.managedTagsInfo.map[T[D]],E){E(N[_]);break}}}const b=p.childNodes;let x="",k=null;for(let N=0,_;N<b.length;N++){if(_=b[N],this.__allowedScriptRegExp.test(_.nodeName)){x+=_.outerHTML;continue}if(!l.isFormatElement(_)&&!l.isRangeFormatElement(_)&&!l.isComponent(_)&&!l.isFigures(_)&&_.nodeType!==8&&!/__se__tag/.test(_.className)){if(k||(k=l.createElement(r.defaultTag)),k.appendChild(_),N--,b[N+1]&&!l.isFormatElement(b[N+1]))continue;_=k,k=null}k&&(x+=this._makeLine(k,!0),k=null),x+=this._makeLine(_,!0)}return k&&(x+=this._makeLine(k,!0)),x.length===0?"<"+r.defaultTag+"><br></"+r.defaultTag+">":(x=l.htmlRemoveWhiteSpace(x),this._tagConvertor(x))},convertHTMLForCodeView:function(m,p){let b="";const x=c.RegExp,k=new x("^(BLOCKQUOTE|PRE|TABLE|THEAD|TBODY|TR|TH|TD|OL|UL|IMG|IFRAME|VIDEO|AUDIO|FIGURE|FIGCAPTION|HR|BR|CANVAS|SELECT)$","i"),N=typeof m=="string"?o.createRange().createContextualFragment(m):m,_=function(T){return this.isFormatElement(T)||this.isComponent(T)}.bind(l),C=p?"":`
`;let E=p?0:this._variable.codeIndent*1;return E=E>0?new c.Array(E+1).join(" "):"",function T(D,P){const M=D.childNodes,O=k.test(D.nodeName),F=O?P:"";for(let z=0,H=M.length,A,j,I,B,Y,U;z<H;z++){if(A=M[z],B=k.test(A.nodeName),j=B?C:"",I=_(A)&&!O&&!/^(TH|TD)$/i.test(D.nodeName)?C:"",A.nodeType===8){b+=`
<!-- `+A.textContent.trim()+" -->"+j;continue}if(A.nodeType===3){l.isList(A.parentElement)||(b+=l._HTMLConvertor(/^\n+$/.test(A.data)?"":A.data));continue}if(A.childNodes.length===0){b+=(/^HR$/i.test(A.nodeName)?C:"")+(/^PRE$/i.test(A.parentElement.nodeName)&&/^BR$/i.test(A.nodeName)?"":F)+A.outerHTML+j;continue}A.outerHTML?(Y=A.nodeName.toLowerCase(),U=F||B?P:"",b+=(I||(O?"":j))+U+A.outerHTML.match(x("<"+Y+"[^>]*>","i"))[0]+j,T(A,P+E),b+=(/\n$/.test(b)?U:"")+"</"+Y+">"+(I||j||O||/^(TH|TD)$/i.test(A.nodeName)?C:"")):b+=new c.XMLSerializer().serializeToString(A)}}(N,""),b.trim()+C},addDocEvent:function(m,p,b){o.addEventListener(m,p,b),r.iframe&&this._wd.addEventListener(m,p)},removeDocEvent:function(m,p){o.removeEventListener(m,p),r.iframe&&this._wd.removeEventListener(m,p)},_charCount:function(m){const p=r.maxCharCount,b=r.charCounterType;let x=0;if(m&&(x=this.getCharLength(m,b)),this._setCharCount(),p>0){let k=!1;const N=y.getCharCount(b);if(N>p){if(k=!0,x>0){this._editorRange();const _=this.getRange(),C=_.endOffset-1,E=this.getSelectionNode().textContent,T=_.endOffset-(N-p);this.getSelectionNode().textContent=E.slice(0,T<0?0:T)+E.slice(_.endOffset,E.length),this.setRange(_.endContainer,C,_.endContainer,C)}}else N+x>p&&(k=!0);if(k&&(this._callCounterBlink(),x>0))return!1}return!0},checkCharCount:function(m,p){if(r.maxCharCount){const b=p||r.charCounterType,x=this.getCharLength(typeof m=="string"?m:this._charTypeHTML&&m.nodeType===1?m.outerHTML:m.textContent,b);if(x>0&&x+y.getCharCount(b)>r.maxCharCount)return this._callCounterBlink(),!1}return!0},getCharLength:function(m,p){return/byte/.test(p)?l.getByteLength(m):m.length},resetResponsiveToolbar:function(){u.controllersOff();const m=g._responsiveButtonSize;if(m){let p=0;(u._isBalloon||u._isInline)&&r.toolbarWidth==="auto"?p=e.element.topArea.offsetWidth:p=e.element.toolbar.offsetWidth;let b="default";for(let x=1,k=m.length;x<k;x++)if(p<m[x]){b=m[x]+"";break}g._responsiveCurrentSize!==b&&(g._responsiveCurrentSize=b,y.setToolbarButtons(g._responsiveButtons[b]))}},_setCharCount:function(){e.element.charCounter&&c.setTimeout(function(m,p){this.textContent&&m&&(this.textContent=m.getCharCount(p.charCounterType))}.bind(e.element.charCounter,y,r),0)},_callCounterBlink:function(){const m=e.element.charWrapper;m&&!l.hasClass(m,"se-blink")&&(l.addClass(m,"se-blink"),c.setTimeout(function(){l.removeClass(m,"se-blink")},600))},_checkComponents:function(){for(let m=0,p=this._fileInfoPluginsCheck.length;m<p;m++)this._fileInfoPluginsCheck[m]()},_resetComponents:function(){for(let m=0,p=this._fileInfoPluginsReset.length;m<p;m++)this._fileInfoPluginsReset[m]()},_setCodeView:function(m){r.codeMirrorEditor?r.codeMirrorEditor.getDoc().setValue(m):e.element.code.value=m},_getCodeView:function(){return r.codeMirrorEditor?r.codeMirrorEditor.getDoc().getValue():e.element.code.value},_setKeyEffect:function(m){const p=this.commandMap,b=this.activePlugins;for(let x in p)m.indexOf(x)>-1||!l.hasOwn(p,x)||(b.indexOf(x)>-1?n[x].active.call(this,null):p.OUTDENT&&/^OUTDENT$/i.test(x)?l.isImportantDisabled(p.OUTDENT)||p.OUTDENT.setAttribute("disabled",!0):p.INDENT&&/^INDENT$/i.test(x)?l.isImportantDisabled(p.INDENT)||p.INDENT.removeAttribute("disabled"):l.removeClass(p[x],"active"))},_init:function(m,p){const b=c.RegExp;this._ww=r.iframe?e.element.wysiwygFrame.contentWindow:c,this._wd=o,this._charTypeHTML=r.charCounterType==="byte-html",this.wwComputedStyle=c.getComputedStyle(e.element.wysiwyg),this._editorHeight=e.element.wysiwygFrame.offsetHeight,this._editorHeightPadding=l.getNumber(this.wwComputedStyle.getPropertyValue("padding-top"))+l.getNumber(this.wwComputedStyle.getPropertyValue("padding-bottom")),this._classNameFilter=function(j){return this.test(j)?j:""}.bind(r.allowedClassNames);const x=r.__allowedScriptTag?"":"script|";if(this.__scriptTagRegExp=new b("<(script)[^>]*>([\\s\\S]*?)<\\/\\1>|<script[^>]*\\/?>","gi"),this.__disallowedTagsRegExp=new b("<("+x+"style)[^>]*>([\\s\\S]*?)<\\/\\1>|<("+x+"style)[^>]*\\/?>","gi"),this.__disallowedTagNameRegExp=new b("^("+x+"meta|link|style|[a-z]+:[a-z]+)$","i"),this.__allowedScriptRegExp=new b("^"+(r.__allowedScriptTag?"script":"")+"$","i"),!r.iframe&&typeof c.ShadowRoot=="function"){let j=e.element.wysiwygFrame;for(;j;){if(j.shadowRoot){this._shadowRoot=j.shadowRoot;break}else if(j instanceof c.ShadowRoot){this._shadowRoot=j;break}j=j.parentNode}this._shadowRoot&&(this._shadowRootControllerEventTarget=[])}const k=c.Object.keys(r._textTagsMap),N=r.addTagsWhitelist?r.addTagsWhitelist.split("|").filter(function(j){return/b|i|ins|s|strike/i.test(j)}):[];for(let j=0;j<N.length;j++)k.splice(k.indexOf(N[j].toLowerCase()),1);this._disallowedTextTagsRegExp=k.length===0?null:new b("(<\\/?)("+k.join("|")+")\\b\\s*([^>^<]+)?\\s*(?=>)","gi");const _=function(j,I){return j?j==="*"?"[a-z-]+":I?j+"|"+I:j:"^"},C="contenteditable|colspan|rowspan|target|href|download|rel|src|alt|class|type|controls|origin-size",E="data-format|data-size|data-file-size|data-file-name|data-origin|data-align|data-image-link|data-rotate|data-proportion|data-percentage|data-exp|data-font-size";this._allowHTMLComments=r._editorTagsWhitelist.indexOf("//")>-1||r._editorTagsWhitelist==="*",this._htmlCheckWhitelistRegExp=new b("^("+_(r._editorTagsWhitelist.replace("|//",""),"")+")$","i"),this._htmlCheckBlacklistRegExp=new b("^("+(r.tagsBlacklist||"^")+")$","i"),this.editorTagsWhitelistRegExp=l.createTagsWhitelist(_(r._editorTagsWhitelist.replace("|//","|<!--|-->"),"")),this.editorTagsBlacklistRegExp=l.createTagsBlacklist(r.tagsBlacklist.replace("|//","|<!--|-->")),this.pasteTagsWhitelistRegExp=l.createTagsWhitelist(_(r.pasteTagsWhitelist,"")),this.pasteTagsBlacklistRegExp=l.createTagsBlacklist(r.pasteTagsBlacklist);const T='\\s*=\\s*(")[^"]*\\1',D=r.attributesWhitelist;let P={},M="";if(D)for(let j in D)!l.hasOwn(D,j)||/^on[a-z]+$/i.test(D[j])||(j==="all"?M=_(D[j],C):P[j]=new b("\\s(?:"+_(D[j],"")+")"+T,"ig"));this._attributesWhitelistRegExp=new b("\\s(?:"+(M||C+"|"+E)+")"+T,"ig"),this._attributesWhitelistRegExp_all_data=new b("\\s(?:"+((M||C)+"|data-[a-z0-9\\-]+")+")"+T,"ig"),this._attributesTagsWhitelist=P;const O=r.attributesBlacklist;if(P={},M="",O)for(let j in O)!l.hasOwn(O,j)||(j==="all"?M=_(O[j],""):P[j]=new b("\\s(?:"+_(O[j],"")+")"+T,"ig"));this._attributesBlacklistRegExp=new b("\\s(?:"+(M||"^")+")"+T,"ig"),this._attributesTagsBlacklist=P,this._isInline=/inline/i.test(r.mode),this._isBalloon=/balloon|balloon-always/i.test(r.mode),this._isBalloonAlways=/balloon-always/i.test(r.mode),this._cachingButtons(),this._fileInfoPluginsCheck=[],this._fileInfoPluginsReset=[],this.managedTagsInfo={query:"",map:{}};const F=[];this.activePlugins=[],this._fileManager.tags=[],this._fileManager.pluginMap={};let z=[],H,A;for(let j in n)if(!!l.hasOwn(n,j)){if(H=n[j],A=t[j],(H.active||H.action)&&A&&this.callPlugin(j,null,A),typeof H.checkFileInfo=="function"&&typeof H.resetFileInfo=="function"&&(this.callPlugin(j,null,A),this._fileInfoPluginsCheck.push(H.checkFileInfo.bind(this)),this._fileInfoPluginsReset.push(H.resetFileInfo.bind(this))),c.Array.isArray(H.fileTags)){const I=H.fileTags;this.callPlugin(j,null,A),this._fileManager.tags=this._fileManager.tags.concat(I),z.push(j);for(let B=0,Y=I.length;B<Y;B++)this._fileManager.pluginMap[I[B].toLowerCase()]=j}if(H.managedTags){const I=H.managedTags();F.push("."+I.className),this.managedTagsInfo.map[I.className]=I.method.bind(this)}}this.managedTagsInfo.query=F.toString(),this._fileManager.queryString=this._fileManager.tags.join(","),this._fileManager.regExp=new b("^("+(this._fileManager.tags.join("|")||"^")+")$","i"),this._fileManager.pluginRegExp=new b("^("+(z.length===0?"^":z.join("|"))+")$","i"),this._variable._originCssText=e.element.topArea.style.cssText,this._placeholder=e.element.placeholder,this._lineBreaker=e.element.lineBreaker,this._lineBreakerButton=this._lineBreaker.querySelector("button"),this.history=r2e(this,this._onChange_historyStack.bind(this)),this.addModule([Q7]),r.iframe&&(this._wd=e.element.wysiwygFrame.contentDocument,e.element.wysiwyg=this._wd.body,r._editorStyles.editor&&(e.element.wysiwyg.style.cssText=r._editorStyles.editor),r.height==="auto"&&(this._iframeAuto=this._wd.body)),this._initWysiwygArea(m,p)},_cachingButtons:function(){this.codeViewDisabledButtons=e.element._buttonTray.querySelectorAll('.se-menu-list button[data-display]:not([class~="se-code-view-enabled"]):not([data-display="MORE"])'),this.resizingDisabledButtons=e.element._buttonTray.querySelectorAll('.se-menu-list button[data-display]:not([class~="se-resizing-enabled"]):not([data-display="MORE"])');const m=e.tool,p=this.commandMap;p.INDENT=m.indent,p.OUTDENT=m.outdent,p[r.textTags.bold.toUpperCase()]=m.bold,p[r.textTags.underline.toUpperCase()]=m.underline,p[r.textTags.italic.toUpperCase()]=m.italic,p[r.textTags.strike.toUpperCase()]=m.strike,p[r.textTags.sub.toUpperCase()]=m.subscript,p[r.textTags.sup.toUpperCase()]=m.superscript,this._styleCommandMap={fullScreen:m.fullScreen,showBlocks:m.showBlocks,codeView:m.codeView},this._saveButtonStates()},_initWysiwygArea:function(m,p){e.element.wysiwyg.innerHTML=m?p:this.convertContentsForEditor((typeof p=="string"?p:/^TEXTAREA$/i.test(e.element.originElement.nodeName)?e.element.originElement.value:e.element.originElement.innerHTML)||"")},_resourcesStateChange:function(){this._iframeAutoHeight(),this._checkPlaceholder()},_onChange_historyStack:function(){this.hasFocus&&g._applyTagEffects(),this._variable.isChanged=!0,e.tool.save&&e.tool.save.removeAttribute("disabled"),y.onChange&&y.onChange(this.getContents(!0),this),e.element.toolbar.style.display==="block"&&g._showToolbarBalloon()},_iframeAutoHeight:function(){this._iframeAuto?c.setTimeout(function(){const m=u._iframeAuto.offsetHeight;e.element.wysiwygFrame.style.height=m+"px",l.isResizeObserverSupported||u.__callResizeFunction(m,null)}):l.isResizeObserverSupported||u.__callResizeFunction(e.element.wysiwygFrame.offsetHeight,null)},__callResizeFunction:function(m,p){m=m===-1?p.borderBoxSize&&p.borderBoxSize[0]?p.borderBoxSize[0].blockSize:p.contentRect.height+this._editorHeightPadding:m,this._editorHeight!==m&&(typeof y.onResizeEditor=="function"&&y.onResizeEditor(m,this._editorHeight,u,p),this._editorHeight=m)},_checkPlaceholder:function(){if(this._placeholder){if(this._variable.isCodeView){this._placeholder.style.display="none";return}const m=e.element.wysiwyg;!l.onlyZeroWidthSpace(m.textContent)||m.querySelector(l._allowedEmptyNodeList)||(m.innerText.match(/\n/g)||"").length>1?this._placeholder.style.display="none":this._placeholder.style.display="block"}},_setDefaultFormat:function(m){if(this._fileManager.pluginRegExp.test(this.currentControllerName))return;const p=this.getRange(),b=p.commonAncestorContainer,x=p.startContainer,k=l.getRangeFormatElement(b,null);let N,_,C;const E=l.getParentElement(b,l.isComponent);if(!(E&&!l.isTable(E))){if(b.nodeType===1&&b.getAttribute("data-se-embed")==="true"){let T=b.nextElementSibling;l.isFormatElement(T)||(T=this.appendFormatTag(b,r.defaultTag)),this.setRange(T.firstChild,0,T.firstChild,0);return}if(!((l.isRangeFormatElement(x)||l.isWysiwygDiv(x))&&(l.isComponent(x.children[p.startOffset])||l.isComponent(x.children[p.startOffset-1])))){if(l.getParentElement(b,l.isNotCheckingNode))return null;if(k){C=l.createElement(m||r.defaultTag),C.innerHTML=k.innerHTML,C.childNodes.length===0&&(C.innerHTML=l.zeroWidthSpace),k.innerHTML=C.outerHTML,C=k.firstChild,N=l.getEdgeChildNodes(C,null).sc,N||(N=l.createTextNode(l.zeroWidthSpace),C.insertBefore(N,C.firstChild)),_=N.textContent.length,this.setRange(N,_,N,_);return}if(l.isRangeFormatElement(b)&&b.childNodes.length<=1){let T=null;b.childNodes.length===1&&l.isBreak(b.firstChild)?T=b.firstChild:(T=l.createTextNode(l.zeroWidthSpace),b.appendChild(T)),this.setRange(T,1,T,1);return}try{if(b.nodeType===3&&(C=l.createElement(m||r.defaultTag),b.parentNode.insertBefore(C,b),C.appendChild(b)),l.isBreak(C.nextSibling)&&l.removeItem(C.nextSibling),l.isBreak(C.previousSibling)&&l.removeItem(C.previousSibling),l.isBreak(N)){const T=l.createTextNode(l.zeroWidthSpace);N.parentNode.insertBefore(T,N),N=T}}catch{this.execCommand("formatBlock",!1,m||r.defaultTag),this.removeRange(),this._editorRange()}if(C&&(l.isBreak(C.nextSibling)&&l.removeItem(C.nextSibling),l.isBreak(C.previousSibling)&&l.removeItem(C.previousSibling),l.isBreak(N))){const T=l.createTextNode(l.zeroWidthSpace);N.parentNode.insertBefore(T,N),N=T}this.effectNode=null,this.nativeFocus()}}},_setOptionsInit:function(m,p){this.context=e=z4(m.originElement,this._getConstructed(m),r),this._componentsInfoReset=!0,this._editorInit(!0,p)},_editorInit:function(m,p){this._init(m,p),g._addEvent(),this._setCharCount(),g._offStickyToolbar(),g.onResize_window(),e.element.toolbar.style.visibility="";const b=r.frameAttrbutes;for(let x in b)e.element.wysiwyg.setAttribute(x,b[x]);this._checkComponents(),this._componentsInfoInit=!1,this._componentsInfoReset=!1,this.history.reset(!0),c.setTimeout(function(){typeof u._resourcesStateChange=="function"&&(g._resizeObserver&&g._resizeObserver.observe(e.element.wysiwygFrame),g._toolbarObserver&&g._toolbarObserver.observe(e.element._toolbarShadow),u._resourcesStateChange(),typeof y.onload=="function"&&y.onload(u,m))})},_getConstructed:function(m){return{_top:m.topArea,_relative:m.relative,_toolBar:m.toolbar,_toolbarShadow:m._toolbarShadow,_menuTray:m._menuTray,_editorArea:m.editorArea,_wysiwygArea:m.wysiwygFrame,_codeArea:m.code,_placeholder:m.placeholder,_resizingBar:m.resizingBar,_navigation:m.navigation,_charCounter:m.charCounter,_charWrapper:m.charWrapper,_loading:m.loading,_lineBreaker:m.lineBreaker,_lineBreaker_t:m.lineBreaker_t,_lineBreaker_b:m.lineBreaker_b,_resizeBack:m.resizeBackground,_stickyDummy:m._stickyDummy,_arrow:m._arrow}}},g={_IEisComposing:!1,_lineBreakerBind:null,_responsiveCurrentSize:"default",_responsiveButtonSize:null,_responsiveButtons:null,_cursorMoveKeyCode:new c.RegExp("^(8|3[2-9]|40|46)$"),_directionKeyCode:new c.RegExp("^(8|13|3[2-9]|40|46)$"),_nonTextKeyCode:new c.RegExp("^(8|13|1[6-9]|20|27|3[3-9]|40|45|46|11[2-9]|12[0-3]|144|145)$"),_historyIgnoreKeyCode:new c.RegExp("^(1[6-9]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$"),_onButtonsCheck:new c.RegExp("^("+c.Object.keys(r._textTagsMap).join("|")+")$","i"),_frontZeroWidthReg:new c.RegExp(l.zeroWidthSpace+"+",""),_keyCodeShortcut:{65:"A",66:"B",83:"S",85:"U",73:"I",89:"Y",90:"Z",219:"[",221:"]"},_shortcutCommand:function(m,p){let b=null;const x=g._keyCodeShortcut[m];switch(x){case"A":b="selectAll";break;case"B":r.shortcutsDisable.indexOf("bold")===-1&&(b="bold");break;case"S":p&&r.shortcutsDisable.indexOf("strike")===-1?b="strike":!p&&r.shortcutsDisable.indexOf("save")===-1&&(b="save");break;case"U":r.shortcutsDisable.indexOf("underline")===-1&&(b="underline");break;case"I":r.shortcutsDisable.indexOf("italic")===-1&&(b="italic");break;case"Z":r.shortcutsDisable.indexOf("undo")===-1&&(p?b="redo":b="undo");break;case"Y":r.shortcutsDisable.indexOf("undo")===-1&&(b="redo");break;case"[":r.shortcutsDisable.indexOf("indent")===-1&&(b=r.rtl?"indent":"outdent");break;case"]":r.shortcutsDisable.indexOf("indent")===-1&&(b=r.rtl?"outdent":"indent");break}return b?(u.commandHandler(u.commandMap[b],b),!0):!!x},_applyTagEffects:function(){let m=u.getSelectionNode();if(m===u.effectNode)return;u.effectNode=m;const p=r.rtl?"marginRight":"marginLeft",b=u.commandMap,x=g._onButtonsCheck,k=[],N=[],_=u.activePlugins,C=_.length;let E="";for(;m.firstChild;)m=m.firstChild;for(let T=m;!l.isWysiwygDiv(T)&&T;T=T.parentNode)if(!(T.nodeType!==1||l.isBreak(T))){if(E=T.nodeName.toUpperCase(),N.push(E),!u.isReadOnly)for(let D=0,P;D<C;D++)P=_[D],k.indexOf(P)===-1&&n[P].active.call(u,T)&&k.push(P);if(l.isFormatElement(T)){k.indexOf("OUTDENT")===-1&&b.OUTDENT&&!l.isImportantDisabled(b.OUTDENT)&&(l.isListCell(T)||T.style[p]&&l.getNumber(T.style[p],0)>0)&&(k.push("OUTDENT"),b.OUTDENT.removeAttribute("disabled")),k.indexOf("INDENT")===-1&&b.INDENT&&!l.isImportantDisabled(b.INDENT)&&(k.push("INDENT"),l.isListCell(T)&&!T.previousElementSibling?b.INDENT.setAttribute("disabled",!0):b.INDENT.removeAttribute("disabled"));continue}x&&x.test(E)&&(k.push(E),l.addClass(b[E],"active"))}u._setKeyEffect(k),u._variable.currentNodes=N.reverse(),u._variable.currentNodesMap=k,r.showPathLabel&&(e.element.navigation.textContent=u._variable.currentNodes.join(" > "))},_buttonsEventHandler:function(m){let p=m.target;if(u._bindControllersOff&&m.stopPropagation(),/^(input|textarea|select|option)$/i.test(p.nodeName)?u._antiBlur=!1:m.preventDefault(),l.getParentElement(p,".se-submenu"))m.stopPropagation(),u._notHideToolbar=!0;else{let b=p.getAttribute("data-command"),x=p.className;for(;!b&&!/se-menu-list/.test(x)&&!/sun-editor-common/.test(x);)p=p.parentNode,b=p.getAttribute("data-command"),x=p.className;(b===u._submenuName||b===u._containerName)&&m.stopPropagation()}},addGlobalEvent(m,p,b){return r.iframe&&u._ww.addEventListener(m,p,b),u._w.addEventListener(m,p,b),{type:m,listener:p,useCapture:b}},removeGlobalEvent(m,p,b){!m||(typeof m=="object"&&(p=m.listener,b=m.useCapture,m=m.type),r.iframe&&u._ww.removeEventListener(m,p,b),u._w.removeEventListener(m,p,b))},onClick_toolbar:function(m){let p=m.target,b=p.getAttribute("data-display"),x=p.getAttribute("data-command"),k=p.className;for(u.controllersOff();p.parentNode&&!x&&!/se-menu-list/.test(k)&&!/se-toolbar/.test(k);)p=p.parentNode,x=p.getAttribute("data-command"),b=p.getAttribute("data-display"),k=p.className;!x&&!b||p.disabled||u.actionCall(x,b,p)},__selectionSyncEvent:null,onMouseDown_wysiwyg:function(m){if(u.isReadOnly||l.isNonEditable(e.element.wysiwyg))return;if(l._isExcludeSelectionElement(m.target)){m.preventDefault();return}if(g.removeGlobalEvent(g.__selectionSyncEvent),g.__selectionSyncEvent=g.addGlobalEvent("mouseup",function(){u._editorRange(),g.removeGlobalEvent(g.__selectionSyncEvent)}),typeof y.onMouseDown=="function"&&y.onMouseDown(m,u)===!1)return;const p=l.getParentElement(m.target,l.isCell);if(p){const b=u.plugins.table;b&&p!==b._fixedCell&&!b._shift&&u.callPlugin("table",function(){b.onTableCellMultiSelect.call(u,p,!1)},null)}u._isBalloon&&g._hideToolbar()},onClick_wysiwyg:function(m){const p=m.target;if(u.isReadOnly)return m.preventDefault(),l.isAnchor(p)&&c.open(p.href,p.target),!1;if(l.isNonEditable(e.element.wysiwyg)||typeof y.onClick=="function"&&y.onClick(m,u)===!1)return;const b=u.getFileComponent(p);if(b){m.preventDefault(),u.selectComponent(b.target,b.pluginName);return}const x=l.getParentElement(p,"FIGCAPTION");if(x&&l.isNonEditable(x)&&(m.preventDefault(),x.focus(),u._isInline&&!u._inlineToolbarAttr.isShow)){g._showToolbarInline();const T=function(){g._hideToolbar(),x.removeEventListener("blur",T)};x.addEventListener("blur",T)}if(u._editorRange(),m.detail===3){let T=u.getRange();l.isFormatElement(T.endContainer)&&T.endOffset===0&&(T=u.setRange(T.startContainer,T.startOffset,T.startContainer,T.startContainer.length),u._rangeInfo(T,u.getSelection()))}const k=u.getSelectionNode(),N=l.getFormatElement(k,null),_=l.getRangeFormatElement(k,null);let C=k;for(;C.firstChild;)C=C.firstChild;const E=u.getFileComponent(C);if(E){const T=u.getRange();!_&&T.startContainer===T.endContainer&&u.selectComponent(E.target,E.pluginName)}else u.currentFileComponentInfo&&u.controllersOff();if(!N&&!l.isNonEditable(p)&&!l.isList(_)){const T=u.getRange();if(l.getFormatElement(T.startContainer)===l.getFormatElement(T.endContainer))if(l.isList(_)){m.preventDefault();const D=l.createElement("LI"),P=k.nextElementSibling;D.appendChild(k),_.insertBefore(D,P),u.focus()}else!l.isWysiwygDiv(k)&&!l.isComponent(k)&&(!l.isTable(k)||l.isCell(k))&&u._setDefaultFormat(l.isRangeFormatElement(_)?"DIV":r.defaultTag)!==null?(m.preventDefault(),u.focus()):g._applyTagEffects()}else g._applyTagEffects();u._isBalloon&&c.setTimeout(g._toggleToolbarBalloon)},_balloonDelay:null,_showToolbarBalloonDelay:function(){g._balloonDelay&&c.clearTimeout(g._balloonDelay),g._balloonDelay=c.setTimeout(function(){c.clearTimeout(this._balloonDelay),this._balloonDelay=null,this._showToolbarBalloon()}.bind(g),350)},_toggleToolbarBalloon:function(){u._editorRange();const m=u.getRange();u._bindControllersOff||!u._isBalloonAlways&&m.collapsed?g._hideToolbar():g._showToolbarBalloon(m)},_showToolbarBalloon:function(m){if(!u._isBalloon)return;const p=m||u.getRange(),b=e.element.toolbar,x=e.element.topArea,k=u.getSelection();let N;if(u._isBalloonAlways&&p.collapsed)N=!0;else if(k.focusNode===k.anchorNode)N=k.focusOffset<k.anchorOffset;else{const j=l.getListChildNodes(p.commonAncestorContainer,null);N=l.getArrayIndex(j,k.focusNode)<l.getArrayIndex(j,k.anchorNode)}let _=p.getClientRects();_=_[N?0:_.length-1];const C=u.getGlobalScrollOffset();let E=C.left,T=C.top;const D=x.offsetWidth,P=g._getEditorOffsets(null),M=P.top,O=P.left;if(b.style.top="-10000px",b.style.visibility="hidden",b.style.display="block",!_){const j=u.getSelectionNode();if(l.isFormatElement(j)){const I=l.createTextNode(l.zeroWidthSpace);u.insertNode(I,null,!1),u.setRange(I,1,I,1),u._editorRange(),_=u.getRange().getClientRects(),_=_[N?0:_.length-1]}if(!_){const I=l.getOffset(j,e.element.wysiwygFrame);_={left:I.left,top:I.top,right:I.left,bottom:I.top+j.offsetHeight,noText:!0},E=0,T=0}N=!0}const F=c.Math.round(e.element._arrow.offsetWidth/2),z=b.offsetWidth,H=b.offsetHeight,A=/iframe/i.test(e.element.wysiwygFrame.nodeName)?e.element.wysiwygFrame.getClientRects()[0]:null;if(A&&(_={left:_.left+A.left,top:_.top+A.top,right:_.right+A.right-A.width,bottom:_.bottom+A.bottom-A.height}),g._setToolbarOffset(N,_,b,O,D,E,T,M,F),(z!==b.offsetWidth||H!==b.offsetHeight)&&g._setToolbarOffset(N,_,b,O,D,E,T,M,F),r.toolbarContainer){const j=x.parentElement;let I=r.toolbarContainer,B=I.offsetLeft,Y=I.offsetTop;for(;!I.parentElement.contains(j)||!/^(BODY|HTML)$/i.test(I.parentElement.nodeName);)I=I.offsetParent,B+=I.offsetLeft,Y+=I.offsetTop;b.style.left=b.offsetLeft-B+x.offsetLeft+"px",b.style.top=b.offsetTop-Y+x.offsetTop+"px"}b.style.visibility=""},_setToolbarOffset:function(m,p,b,x,k,N,_,C,E){const D=b.offsetWidth,P=p.noText&&!m?0:b.offsetHeight,M=(m?p.left:p.right)-x-D/2+N,O=M+D-k;let F=(m?p.top-P-E:p.bottom+E)-(p.noText?0:C)+_,z=M<0?1:O<0?M:M-O-1-1,H=!1;const A=F+(m?g._getEditorOffsets(null).top:b.offsetHeight-e.element.wysiwyg.offsetHeight);!m&&A>0&&g._getPageBottomSpace()<A?(m=!0,H=!0):m&&o.documentElement.offsetTop>A&&(m=!1,H=!0),H&&(F=(m?p.top-P-E:p.bottom+E)-(p.noText?0:C)+_),b.style.left=c.Math.floor(z)+"px",b.style.top=c.Math.floor(F)+"px",m?(l.removeClass(e.element._arrow,"se-arrow-up"),l.addClass(e.element._arrow,"se-arrow-down"),e.element._arrow.style.top=P+"px"):(l.removeClass(e.element._arrow,"se-arrow-down"),l.addClass(e.element._arrow,"se-arrow-up"),e.element._arrow.style.top=-E+"px");const j=c.Math.floor(D/2+(M-z));e.element._arrow.style.left=(j+E>b.offsetWidth?b.offsetWidth-E:j<E?E:j)+"px"},_showToolbarInline:function(){if(!u._isInline)return;const m=e.element.toolbar;r.toolbarContainer?m.style.position="relative":m.style.position="absolute",m.style.visibility="hidden",m.style.display="block",u._inlineToolbarAttr.width=m.style.width=r.toolbarWidth,u._inlineToolbarAttr.top=m.style.top=(r.toolbarContainer?0:-1-m.offsetHeight)+"px",typeof y.showInline=="function"&&y.showInline(m,e,u),g.onScroll_window(),u._inlineToolbarAttr.isShow=!0,m.style.visibility=""},_hideToolbar:function(){!u._notHideToolbar&&!u._variable.isFullScreen&&(e.element.toolbar.style.display="none",u._inlineToolbarAttr.isShow=!1)},onInput_wysiwyg:function(m){if(/AUDIO/.test(m.target.nodeName))return!1;if(u.isReadOnly||u.isDisabled)return m.preventDefault(),m.stopPropagation(),u.history.go(u.history.getCurrentIndex()),!1;u._editorRange();const p=(m.data===null?"":m.data===void 0?" ":m.data)||"";if(!u._charCount(p))return m.preventDefault(),m.stopPropagation(),!1;typeof y.onInput=="function"&&y.onInput(m,u)===!1||u.history.push(!0)},_isUneditableNode:function(m,p){const b=p?m.startContainer:m.endContainer,x=p?m.startOffset:m.endOffset,k=p?"previousSibling":"nextSibling",N=b.nodeType===1;let _;return N?(_=g._isUneditableNode_getSibling(b.childNodes[x],k,b),_&&_.nodeType===1&&_.getAttribute("contenteditable")==="false"):(_=g._isUneditableNode_getSibling(b,k,b),u.isEdgePoint(b,x,p?"front":"end")&&_&&_.nodeType===1&&_.getAttribute("contenteditable")==="false")},_isUneditableNode_getSibling:function(m,p,b){if(!m)return null;let x=m[p];if(!x)if(x=l.getFormatElement(b),x=x?x[p]:null,x&&!l.isComponent(x))x=p==="previousSibling"?x.firstChild:x.lastChild;else return null;return x},_onShortcutKey:!1,onKeyDown_wysiwyg:function(m){let p=u.getSelectionNode();if(l.isInputElement(p))return;const b=m.keyCode,x=m.shiftKey,k=m.ctrlKey||m.metaKey||b===91||b===92||b===224,N=m.altKey;if(g._IEisComposing=b===229,!k&&u.isReadOnly&&!g._cursorMoveKeyCode.test(b))return m.preventDefault(),!1;if(u.submenuOff(),u._isBalloon&&g._hideToolbar(),typeof y.onKeyDown=="function"&&y.onKeyDown(m,u)===!1)return;if(k&&g._shortcutCommand(b,x))return g._onShortcutKey=!0,m.preventDefault(),m.stopPropagation(),!1;g._onShortcutKey&&(g._onShortcutKey=!1);const _=u.getRange(),C=!_.collapsed||_.startContainer!==_.endContainer,E=u._fileManager.pluginRegExp.test(u.currentControllerName)?u.currentControllerName:"";let T=l.getFormatElement(p,null)||p,D=l.getRangeFormatElement(T,null);if(!(/37|38|39|40/.test(m.keyCode)&&g._onKeyDown_wysiwyg_arrowKey(m)===!1)){switch(b){case 8:if(!C&&E){m.preventDefault(),m.stopPropagation(),u.plugins[E].destroy.call(u);break}if(C&&g._hardDelete()){m.preventDefault(),m.stopPropagation();break}if(!l.isFormatElement(T)&&!e.element.wysiwyg.firstElementChild&&!l.isComponent(p)&&u._setDefaultFormat(r.defaultTag)!==null)return m.preventDefault(),m.stopPropagation(),!1;if(!C&&!T.previousElementSibling&&_.startOffset===0&&!p.previousSibling&&!l.isListCell(T)&&l.isFormatElement(T)&&(!l.isFreeFormatElement(T)||l.isClosureFreeFormatElement(T))){if(l.isClosureRangeFormatElement(T.parentNode))return m.preventDefault(),m.stopPropagation(),!1;if(l.isWysiwygDiv(T.parentNode)&&T.childNodes.length<=1&&(!T.firstChild||l.onlyZeroWidthSpace(T.textContent))){if(m.preventDefault(),m.stopPropagation(),T.nodeName.toUpperCase()===r.defaultTag.toUpperCase()){T.innerHTML="<br>";const U=T.attributes;for(;U[0];)T.removeAttribute(U[0].name)}else{const U=l.createElement(r.defaultTag);U.innerHTML="<br>",T.parentElement.replaceChild(U,T)}return u.nativeFocus(),!1}}const M=_.startContainer;if(T&&!T.previousElementSibling&&_.startOffset===0&&M.nodeType===3&&!l.isFormatElement(M.parentNode)){let U=M.parentNode.previousSibling;const W=M.parentNode.nextSibling;U||(W?U=W:(U=l.createElement("BR"),T.appendChild(U)));let V=M;for(;T.contains(V)&&!V.previousSibling;)V=V.parentNode;if(!T.contains(V)){M.textContent="",l.removeItemAllParents(M,null,T);break}}if(g._isUneditableNode(_,!0)){m.preventDefault(),m.stopPropagation();break}!C&&u._isEdgeFormat(_.startContainer,_.startOffset,"start")&&l.isFormatElement(T.previousElementSibling)&&(u._formatAttrsTemp=T.previousElementSibling.attributes);const O=_.commonAncestorContainer;if(T=l.getFormatElement(_.startContainer,null),D=l.getRangeFormatElement(T,null),D&&T&&!l.isCell(D)&&!/^FIGCAPTION$/i.test(D.nodeName)){if(l.isListCell(T)&&l.isList(D)&&(l.isListCell(D.parentNode)||T.previousElementSibling)&&(p===T||p.nodeType===3&&(!p.previousSibling||l.isList(p.previousSibling)))&&(l.getFormatElement(_.startContainer,null)!==l.getFormatElement(_.endContainer,null)?D.contains(_.startContainer):_.startOffset===0&&_.collapsed)){if(_.startContainer!==_.endContainer)m.preventDefault(),u.removeNode(),_.startContainer.nodeType===3&&u.setRange(_.startContainer,_.startContainer.textContent.length,_.startContainer,_.startContainer.textContent.length),u.history.push(!0);else{let U=T.previousElementSibling||D.parentNode;if(l.isListCell(U)){m.preventDefault();let W=U;if(!U.contains(T)&&l.isListCell(W)&&l.isList(W.lastElementChild)){for(W=W.lastElementChild.lastElementChild;l.isListCell(W)&&l.isList(W.lastElementChild);)W=W.lastElementChild&&W.lastElementChild.lastElementChild;U=W}let V=U===D.parentNode?D.previousSibling:U.lastChild;V||(V=l.createTextNode(l.zeroWidthSpace),D.parentNode.insertBefore(V,D.parentNode.firstChild));const X=V.nodeType===3?V.textContent.length:1,ne=T.childNodes;let oe=V,q=ne[0];for(;q=ne[0];)U.insertBefore(q,oe.nextSibling),oe=q;l.removeItem(T),D.children.length===0&&l.removeItem(D),u.setRange(V,X,V,X),u.history.push(!0)}}break}if(!C&&_.startOffset===0){let U=!0,W=O;for(;W&&W!==D&&!l.isWysiwygDiv(W);){if(W.previousSibling&&(W.previousSibling.nodeType===1||!l.onlyZeroWidthSpace(W.previousSibling.textContent.trim()))){U=!1;break}W=W.parentNode}if(U&&D.parentNode){m.preventDefault(),u.detachRangeFormatElement(D,l.isListCell(T)?[T]:null,null,!1,!1),u.history.push(!0);break}}}if(!C&&T&&(_.startOffset===0||(p===T?!!T.childNodes[_.startOffset]:!1))){const U=p===T?T.childNodes[_.startOffset]:p,W=T.previousSibling,V=(O.nodeType===3||l.isBreak(O))&&!O.previousSibling&&_.startOffset===0;if(U&&!U.previousSibling&&(O&&l.isComponent(O.previousSibling)||V&&l.isComponent(W))){const X=u.getFileComponent(W);X?(m.preventDefault(),m.stopPropagation(),T.textContent.length===0&&l.removeItem(T),u.selectComponent(X.target,X.pluginName)===!1&&u.blur()):l.isComponent(W)&&(m.preventDefault(),m.stopPropagation(),l.removeItem(W));break}if(U&&l.isNonEditable(U.previousSibling)){m.preventDefault(),m.stopPropagation(),l.removeItem(U.previousSibling);break}}break;case 46:if(E){m.preventDefault(),m.stopPropagation(),u.plugins[E].destroy.call(u);break}if(C&&g._hardDelete()){m.preventDefault(),m.stopPropagation();break}if(g._isUneditableNode(_,!1)){m.preventDefault(),m.stopPropagation();break}if((l.isFormatElement(p)||p.nextSibling===null||l.onlyZeroWidthSpace(p.nextSibling)&&p.nextSibling.nextSibling===null)&&_.startOffset===p.textContent.length){const U=T.nextElementSibling;if(!U)break;if(l.isComponent(U)){if(m.preventDefault(),l.onlyZeroWidthSpace(T)&&(l.removeItem(T),l.isTable(U))){let V=l.getChildElement(U,l.isCell,!1);V=V.firstElementChild||V,u.setRange(V,0,V,0);break}const W=u.getFileComponent(U);W?(m.stopPropagation(),u.selectComponent(W.target,W.pluginName)===!1&&u.blur()):l.isComponent(U)&&(m.stopPropagation(),l.removeItem(U));break}}if(!C&&(u.isEdgePoint(_.endContainer,_.endOffset)||(p===T?!!T.childNodes[_.startOffset]:!1))){const U=p===T&&T.childNodes[_.startOffset]||p;if(U&&l.isNonEditable(U.nextSibling)){m.preventDefault(),m.stopPropagation(),l.removeItem(U.nextSibling);break}else if(l.isComponent(U)){m.preventDefault(),m.stopPropagation(),l.removeItem(U);break}}if(!C&&u._isEdgeFormat(_.endContainer,_.endOffset,"end")&&l.isFormatElement(T.nextElementSibling)&&(u._formatAttrsTemp=T.attributes),T=l.getFormatElement(_.startContainer,null),D=l.getRangeFormatElement(T,null),l.isListCell(T)&&l.isList(D)&&(p===T||p.nodeType===3&&(!p.nextSibling||l.isList(p.nextSibling))&&(l.getFormatElement(_.startContainer,null)!==l.getFormatElement(_.endContainer,null)?D.contains(_.endContainer):_.endOffset===p.textContent.length&&_.collapsed))){_.startContainer!==_.endContainer&&u.removeNode();let U=l.getArrayItem(T.children,l.isList,!1);if(U=U||T.nextElementSibling||D.parentNode.nextElementSibling,U&&(l.isList(U)||l.getArrayItem(U.children,l.isList,!1))){m.preventDefault();let W,V;if(l.isList(U)){const X=U.firstElementChild;for(V=X.childNodes,W=V[0];V[0];)T.insertBefore(V[0],U);l.removeItem(X)}else{for(W=U.firstChild,V=U.childNodes;V[0];)T.appendChild(V[0]);l.removeItem(U)}u.setRange(W,0,W,0),u.history.push(!0)}break}break;case 9:if(E||r.tabDisable||(m.preventDefault(),k||N||l.isWysiwygDiv(p)))break;const F=!_.collapsed||u.isEdgePoint(_.startContainer,_.startOffset),z=u.getSelectedElements(null);p=u.getSelectionNode();const H=[];let A=[],j=l.isListCell(z[0]),I=l.isListCell(z[z.length-1]),B={sc:_.startContainer,so:_.startOffset,ec:_.endContainer,eo:_.endOffset};for(let U=0,W=z.length,V;U<W;U++)if(V=z[U],l.isListCell(V)){if(!V.previousElementSibling&&!x)continue;H.push(V)}else A.push(V);if(H.length>0&&F&&u.plugins.list)B=u.plugins.list.editInsideList.call(u,x,H);else{const U=l.getParentElement(p,l.isCell);if(U&&F){const W=l.getParentElement(U,"table"),V=l.getListChildren(W,l.isCell);let X=x?l.prevIdx(V,U):l.nextIdx(V,U);X===V.length&&!x&&(X=0),X===-1&&x&&(X=V.length-1);let ne=V[X];if(!ne)break;ne=ne.firstElementChild||ne,u.setRange(ne,0,ne,0);break}A=A.concat(H),j=I=null}if(A.length>0)if(x){const U=A.length-1;for(let X=0,ne;X<=U;X++){ne=A[X].childNodes;for(let oe=0,q=ne.length,te;oe<q&&(te=ne[oe],!!te);oe++)if(!l.onlyZeroWidthSpace(te)){/^\s{1,4}$/.test(te.textContent)?l.removeItem(te):/^\s{1,4}/.test(te.textContent)&&(te.textContent=te.textContent.replace(/^\s{1,4}/,""));break}}const W=l.getChildElement(A[0],"text",!1),V=l.getChildElement(A[U],"text",!0);!j&&W&&(B.sc=W,B.so=0),!I&&V&&(B.ec=V,B.eo=V.textContent.length)}else{const U=l.createTextNode(new c.Array(u._variable.tabSize+1).join("\xA0"));if(A.length===1){const W=u.insertNode(U,null,!0);if(!W)return!1;j||(B.sc=U,B.so=W.endOffset),I||(B.ec=U,B.eo=W.endOffset)}else{const W=A.length-1;for(let ne=0,oe;ne<=W;ne++)oe=A[ne].firstChild,oe&&(l.isBreak(oe)?A[ne].insertBefore(U.cloneNode(!1),oe):oe.textContent=U.textContent+oe.textContent);const V=l.getChildElement(A[0],"text",!1),X=l.getChildElement(A[W],"text",!0);!j&&V&&(B.sc=V,B.so=0),!I&&X&&(B.ec=X,B.eo=X.textContent.length)}}u.setRange(B.sc,B.so,B.ec,B.eo),u.history.push(!1);break;case 13:const Y=l.getFreeFormatElement(p,null);if(u._charTypeHTML){let U="";if(!x&&Y||x?U="<br>":U="<"+T.nodeName+"><br></"+T.nodeName+">",!u.checkCharCount(U,"byte-html"))return m.preventDefault(),!1}if(!x&&!E){const U=u._isEdgeFormat(_.endContainer,_.endOffset,"end"),W=u._isEdgeFormat(_.startContainer,_.startOffset,"start");if(U&&(/^H[1-6]$/i.test(T.nodeName)||/^HR$/i.test(T.nodeName))){g._enterPrevent(m);let V=null;const X=u.appendFormatTag(T,r.defaultTag);if(U&&U.length>0){V=U.pop();const ne=V;for(;U.length>0;)V=V.appendChild(U.pop());X.appendChild(ne)}if(V=V?V.appendChild(X.firstChild):X.firstChild,l.isBreak(V)){const ne=l.createTextNode(l.zeroWidthSpace);V.parentNode.insertBefore(ne,V),u.setRange(ne,1,ne,1)}else u.setRange(V,0,V,0);break}else if(D&&T&&!l.isCell(D)&&!/^FIGCAPTION$/i.test(D.nodeName)){const V=u.getRange();if(u.isEdgePoint(V.endContainer,V.endOffset)&&l.isList(p.nextSibling)){g._enterPrevent(m);const X=l.createElement("LI"),ne=l.createElement("BR");X.appendChild(ne),T.parentNode.insertBefore(X,T.nextElementSibling),X.appendChild(p.nextSibling),u.setRange(ne,1,ne,1);break}if((V.commonAncestorContainer.nodeType===3?!V.commonAncestorContainer.nextElementSibling:!0)&&l.onlyZeroWidthSpace(T.innerText.trim())&&!l.isListCell(T.nextElementSibling)){g._enterPrevent(m);let X=null;if(l.isListCell(D.parentNode)){const ne=T.parentNode.parentNode;D=ne.parentNode;const oe=l.createElement("LI");oe.innerHTML="<br>",l.copyTagAttributes(oe,T,r.lineAttrReset),X=oe,D.insertBefore(X,ne.nextElementSibling)}else{const ne=l.isCell(D.parentNode)?"DIV":l.isList(D.parentNode)?"LI":l.isFormatElement(D.nextElementSibling)&&!l.isRangeFormatElement(D.nextElementSibling)?D.nextElementSibling.nodeName:l.isFormatElement(D.previousElementSibling)&&!l.isRangeFormatElement(D.previousElementSibling)?D.previousElementSibling.nodeName:r.defaultTag;X=l.createElement(ne),l.copyTagAttributes(X,T,r.lineAttrReset);const oe=u.detachRangeFormatElement(D,[T],null,!0,!0);oe.cc.insertBefore(X,oe.ec)}X.innerHTML="<br>",l.removeItemAllParents(T,null,null),u.setRange(X,1,X,1);break}}if(Y){g._enterPrevent(m);const V=p===Y,X=u.getSelection(),ne=p.childNodes,oe=X.focusOffset,q=p.previousElementSibling,te=p.nextSibling;if(!l.isClosureFreeFormatElement(Y)&&!!ne&&(V&&_.collapsed&&ne.length-1<=oe+1&&l.isBreak(ne[oe])&&(!ne[oe+1]||(!ne[oe+2]||l.onlyZeroWidthSpace(ne[oe+2].textContent))&&ne[oe+1].nodeType===3&&l.onlyZeroWidthSpace(ne[oe+1].textContent))&&oe>0&&l.isBreak(ne[oe-1])||!V&&l.onlyZeroWidthSpace(p.textContent)&&l.isBreak(q)&&(l.isBreak(q.previousSibling)||!l.onlyZeroWidthSpace(q.previousSibling.textContent))&&(!te||!l.isBreak(te)&&l.onlyZeroWidthSpace(te.textContent)))){V?l.removeItem(ne[oe-1]):l.removeItem(p);const G=u.appendFormatTag(Y,l.isFormatElement(Y.nextElementSibling)&&!l.isRangeFormatElement(Y.nextElementSibling)?Y.nextElementSibling:null);l.copyFormatAttributes(G,Y),u.setRange(G,1,G,1);break}if(V){y.insertHTML(_.collapsed&&l.isBreak(_.startContainer.childNodes[_.startOffset-1])?"<br>":"<br><br>",!0,!1);let G=X.focusNode;const J=X.focusOffset;Y===G&&(G=G.childNodes[J-oe>1?J-1:J]),u.setRange(G,1,G,1)}else{const G=X.focusNode.nextSibling,J=l.createElement("BR");u.insertNode(J,null,!1);const K=J.previousSibling,Q=J.nextSibling;!l.isBreak(G)&&!l.isBreak(K)&&(!Q||l.onlyZeroWidthSpace(Q))?(J.parentNode.insertBefore(J.cloneNode(!1),J),u.setRange(J,1,J,1)):u.setRange(Q,0,Q,0)}g._onShortcutKey=!0;break}if(_.collapsed&&(W||U)){g._enterPrevent(m);const V=l.createElement("BR"),X=l.createElement(T.nodeName);l.copyTagAttributes(X,T,r.lineAttrReset);let ne=V;do{if(!l.isBreak(p)&&p.nodeType===1){const oe=p.cloneNode(!1);oe.appendChild(ne),ne=oe}p=p.parentNode}while(T!==p&&T.contains(p));X.appendChild(ne),T.parentNode.insertBefore(X,W&&!U?T:T.nextElementSibling),U&&u.setRange(V,1,V,1);break}if(T){m.stopPropagation();let V,X=0;if(_.collapsed)l.onlyZeroWidthSpace(T)?V=u.appendFormatTag(T,T.cloneNode(!1)):V=l.splitElement(_.endContainer,_.endOffset,l.getElementDepth(T));else{const ne=l.getFormatElement(_.startContainer,null)!==l.getFormatElement(_.endContainer,null),oe=T.cloneNode(!1);oe.innerHTML="<br>";const q=u.removeNode();if(V=l.getFormatElement(q.container,null),!V){l.isWysiwygDiv(q.container)&&(g._enterPrevent(m),e.element.wysiwyg.appendChild(oe),V=oe,l.copyTagAttributes(V,T,r.lineAttrReset),u.setRange(V,X,V,X));break}const te=l.getRangeFormatElement(q.container);if(V=V.contains(te)?l.getChildElement(te,l.getFormatElement.bind(l)):V,ne){if(U&&!W)V.parentNode.insertBefore(oe,!q.prevContainer||q.container===q.prevContainer?V.nextElementSibling:V),V=oe,X=0;else if(X=q.offset,W){const G=V.parentNode.insertBefore(oe,V);U&&(V=G,X=0)}}else U&&W?(V.parentNode.insertBefore(oe,q.prevContainer&&q.container===q.prevContainer?V.nextElementSibling:V),V=oe,X=0):V=l.splitElement(q.container,q.offset,l.getElementDepth(T))}g._enterPrevent(m),l.copyTagAttributes(V,T,r.lineAttrReset),u.setRange(V,X,V,X);break}}if(C)break;if(D&&l.getParentElement(D,"FIGCAPTION")&&l.getParentElement(D,l.isList)&&(g._enterPrevent(m),T=u.appendFormatTag(T,null),u.setRange(T,0,T,0)),E){m.preventDefault(),m.stopPropagation(),u.containerOff(),u.controllersOff();const U=e[E],W=U._container,V=W.previousElementSibling||W.nextElementSibling;let X=null;l.isListCell(W.parentNode)?X=l.createElement("BR"):(X=l.createElement(l.isFormatElement(V)&&!l.isRangeFormatElement(V)?V.nodeName:r.defaultTag),X.innerHTML="<br>"),x?W.parentNode.insertBefore(X,W):W.parentNode.insertBefore(X,W.nextElementSibling),u.callPlugin(E,function(){u.selectComponent(U._element,E)===!1&&u.blur()},null)}break;case 27:if(E)return m.preventDefault(),m.stopPropagation(),u.controllersOff(),!1;break}if(x&&b===16){m.preventDefault(),m.stopPropagation();const M=u.plugins.table;if(M&&!M._shift&&!M._ref){const O=l.getParentElement(T,l.isCell);if(O){M.onTableCellMultiSelect.call(u,O,!0);return}}}else if(x&&(l.isOSX_IOS?N:k)&&b===32){m.preventDefault(),m.stopPropagation();const M=u.insertNode(l.createTextNode("\xA0"));if(M&&M.container){u.setRange(M.container,M.endOffset,M.container,M.endOffset);return}}if(l.isIE&&!k&&!N&&!C&&!g._nonTextKeyCode.test(b)&&l.isBreak(_.commonAncestorContainer)){const M=l.createTextNode(l.zeroWidthSpace);u.insertNode(M,null,!1),u.setRange(M,1,M,1)}g._directionKeyCode.test(b)&&(u._editorRange(),g._applyTagEffects())}},_onKeyDown_wysiwyg_arrowKey:function(m){if(m.shiftKey)return;let p=u.getSelectionNode();const b=function(N,_=0){if(m.preventDefault(),m.stopPropagation(),!N)return;let C=u.getFileComponent(N);C?u.selectComponent(C.target,C.pluginName):(u.setRange(N,_,N,_),u.controllersOff())},x=l.getParentElement(p,"table");if(x){const N=l.getParentElement(p,"tr"),_=l.getParentElement(p,"td");let C=_,E=_;if(_){for(;C.firstChild;)C=C.firstChild;for(;E.lastChild;)E=E.lastChild}let T=p;for(;T.firstChild;)T=T.firstChild;const D=T===C,P=T===E;let M=null,O=0;if(m.keyCode===38&&D){const F=N&&N.previousElementSibling;for(F?M=F.children[_.cellIndex]:M=l.getPreviousDeepestNode(x,u.context.element.wysiwyg);M.lastChild;)M=M.lastChild;M&&(O=M.textContent.length)}else if(m.keyCode===40&&P){const F=N&&N.nextElementSibling;for(F?M=F.children[_.cellIndex]:M=l.getNextDeepestNode(x,u.context.element.wysiwyg);M.firstChild;)M=M.firstChild}if(M)return b(M,O),!1}const k=u.getFileComponent(p);if(k){const N=/37|38/.test(m.keyCode),_=/39|40/.test(m.keyCode);if(N){const C=l.getPreviousDeepestNode(k.target,u.context.element.wysiwyg);b(C,C&&C.textContent.length)}else if(_){const C=l.getNextDeepestNode(k.target,u.context.element.wysiwyg);b(C)}}},onKeyUp_wysiwyg:function(m){if(g._onShortcutKey)return;u._editorRange();const p=m.keyCode,b=m.ctrlKey||m.metaKey||p===91||p===92||p===224,x=m.altKey;if(u.isReadOnly){!b&&g._cursorMoveKeyCode.test(p)&&g._applyTagEffects();return}const k=u.getRange();let N=u.getSelectionNode();if(u._isBalloon&&(u._isBalloonAlways&&p!==27||!k.collapsed))if(u._isBalloonAlways)p!==27&&g._showToolbarBalloonDelay();else{g._showToolbarBalloon();return}let _=N;for(;_.firstChild;)_=_.firstChild;const C=u.getFileComponent(_);if(!(m.keyCode===16||m.shiftKey)&&C?u.selectComponent(C.target,C.pluginName):u.currentFileComponentInfo&&u.controllersOff(),p===8&&l.isWysiwygDiv(N)&&N.textContent===""&&N.children.length===0){m.preventDefault(),m.stopPropagation(),N.innerHTML="";const M=l.createElement(l.isFormatElement(u._variable.currentNodes[0])?u._variable.currentNodes[0]:r.defaultTag);M.innerHTML="<br>",N.appendChild(M),u.setRange(M,0,M,0),g._applyTagEffects(),u.history.push(!1);return}const E=l.getFormatElement(N,null),T=l.getRangeFormatElement(N,null),D=u._formatAttrsTemp;if(D){for(let M=0,O=D.length;M<O;M++){if(p===13&&/^id$/i.test(D[M].name)){E.removeAttribute("id");continue}E.setAttribute(D[M].name,D[M].value)}u._formatAttrsTemp=null}if(!E&&k.collapsed&&!l.isComponent(N)&&!l.isList(N)&&u._setDefaultFormat(l.isRangeFormatElement(T)?"DIV":r.defaultTag)!==null&&(N=u.getSelectionNode()),!b&&!x&&!g._nonTextKeyCode.test(p)&&N.nodeType===3&&l.zeroWidthRegExp.test(N.textContent)&&!(m.isComposing!==void 0?m.isComposing:g._IEisComposing)){let M=k.startOffset,O=k.endOffset;const F=(N.textContent.substring(0,O).match(g._frontZeroWidthReg)||"").length;M=k.startOffset-F,O=k.endOffset-F,N.textContent=N.textContent.replace(l.zeroWidthRegExp,""),u.setRange(N,M<0?0:M,N,O<0?0:O)}u._charCount(""),!(typeof y.onKeyUp=="function"&&y.onKeyUp(m,u)===!1)&&!b&&!x&&!g._historyIgnoreKeyCode.test(p)&&u.history.push(!0)},onScroll_wysiwyg:function(m){u.controllersOff(),u._isBalloon&&g._hideToolbar(),typeof y.onScroll=="function"&&y.onScroll(m,u)},onFocus_wysiwyg:function(m){u._antiBlur||(u.hasFocus=!0,c.setTimeout(g._applyTagEffects),u._isInline&&g._showToolbarInline(),typeof y.onFocus=="function"&&y.onFocus(m,u))},onBlur_wysiwyg:function(m){u._antiBlur||u._variable.isCodeView||(u.hasFocus=!1,u.effectNode=null,u.controllersOff(),(u._isInline||u._isBalloon)&&g._hideToolbar(),u._setKeyEffect([]),u._variable.currentNodes=[],u._variable.currentNodesMap=[],r.showPathLabel&&(e.element.navigation.textContent=""),typeof y.onBlur=="function"&&y.onBlur(m,u,this))},onMouseDown_resizingBar:function(m){m.stopPropagation(),u.submenuOff(),u.controllersOff(),u._variable.resizeClientY=m.clientY,e.element.resizeBackground.style.display="block";function p(){e.element.resizeBackground.style.display="none",o.removeEventListener("mousemove",g._resize_editor),o.removeEventListener("mouseup",p)}o.addEventListener("mousemove",g._resize_editor),o.addEventListener("mouseup",p)},_resize_editor:function(m){const p=e.element.editorArea.offsetHeight+(m.clientY-u._variable.resizeClientY),b=p<u._variable.minResizingSize?u._variable.minResizingSize:p;e.element.wysiwygFrame.style.height=e.element.code.style.height=b+"px",u._variable.resizeClientY=m.clientY,l.isResizeObserverSupported||u.__callResizeFunction(b,null)},onResize_window:function(){l.isResizeObserverSupported||u.resetResponsiveToolbar();const m=e.element.toolbar,p=m.style.display==="none"||u._isInline&&!u._inlineToolbarAttr.isShow;if(!(m.offsetWidth===0&&!p)){if(e.fileBrowser&&e.fileBrowser.area.style.display==="block"&&(e.fileBrowser.body.style.maxHeight=c.innerHeight-e.fileBrowser.header.offsetHeight-50+"px"),u.submenuActiveButton&&u.submenu&&u._setMenuPosition(u.submenuActiveButton,u.submenu),u._variable.isFullScreen){u._variable.innerHeight_fullScreen+=c.innerHeight-m.offsetHeight-u._variable.innerHeight_fullScreen,e.element.editorArea.style.height=u._variable.innerHeight_fullScreen+"px";return}if(u._variable.isCodeView&&u._isInline){g._showToolbarInline();return}u._iframeAutoHeight(),u._sticky&&(m.style.width=e.element.topArea.offsetWidth-2+"px",g.onScroll_window())}},onScroll_window:function(){if(u._variable.isFullScreen||e.element.toolbar.offsetWidth===0||r.stickyToolbar<0)return;const m=e.element,p=m.editorArea.offsetHeight,b=(this.scrollY||o.documentElement.scrollTop)+r.stickyToolbar,x=g._getEditorOffsets(r.toolbarContainer).top-(u._isInline?m.toolbar.offsetHeight:0),k=u._isInline&&b-x>0?b-x-e.element.toolbar.offsetHeight:0;b<x?g._offStickyToolbar():b+u._variable.minResizingSize>=p+x?(u._sticky||g._onStickyToolbar(k),m.toolbar.style.top=k+p+x+r.stickyToolbar-b-u._variable.minResizingSize+"px"):b>=x&&g._onStickyToolbar(k)},_getEditorOffsets:function(m){let p=m||e.element.topArea,b=0,x=0,k=0;for(;p;)b+=p.offsetTop,x+=p.offsetLeft,k+=p.scrollTop,p=p.offsetParent;return{top:b,left:x,scroll:k}},_getPageBottomSpace:function(){return o.documentElement.scrollHeight-(g._getEditorOffsets(null).top+e.element.topArea.offsetHeight)},_onStickyToolbar:function(m){const p=e.element;!u._isInline&&!r.toolbarContainer&&(p._stickyDummy.style.height=p.toolbar.offsetHeight+"px",p._stickyDummy.style.display="block"),p.toolbar.style.top=r.stickyToolbar+m+"px",p.toolbar.style.width=u._isInline?u._inlineToolbarAttr.width:p.toolbar.offsetWidth+"px",l.addClass(p.toolbar,"se-toolbar-sticky"),u._sticky=!0},_offStickyToolbar:function(){const m=e.element;m._stickyDummy.style.display="none",m.toolbar.style.top=u._isInline?u._inlineToolbarAttr.top:"",m.toolbar.style.width=u._isInline?u._inlineToolbarAttr.width:"",m.editorArea.style.marginTop="",l.removeClass(m.toolbar,"se-toolbar-sticky"),u._sticky=!1},_codeViewAutoHeight:function(){u._variable.isFullScreen||(e.element.code.style.height=e.element.code.scrollHeight+"px")},_hardDelete:function(){const m=u.getRange(),p=m.startContainer,b=m.endContainer,x=l.getRangeFormatElement(p),k=l.getRangeFormatElement(b),N=l.isCell(x),_=l.isCell(k),C=m.commonAncestorContainer;if((N&&!x.previousElementSibling&&!x.parentElement.previousElementSibling||_&&!k.nextElementSibling&&!k.parentElement.nextElementSibling)&&x!==k)if(!N)l.removeItem(l.getParentElement(k,function(D){return C===D.parentNode}));else if(!_)l.removeItem(l.getParentElement(x,function(D){return C===D.parentNode}));else return l.removeItem(l.getParentElement(x,function(D){return C===D.parentNode})),u.nativeFocus(),!0;const E=p.nodeType===1?l.getParentElement(p,".se-component"):null,T=b.nodeType===1?l.getParentElement(b,".se-component"):null;return E&&l.removeItem(E),T&&l.removeItem(T),!1},onPaste_wysiwyg:function(m){const p=l.isIE?c.clipboardData:m.clipboardData;return p?g._dataTransferAction("paste",m,p):!0},_setClipboardComponent:function(m,p,b){m.preventDefault(),m.stopPropagation(),b.setData("text/html",p.component.outerHTML)},onCopy_wysiwyg:function(m){const p=l.isIE?c.clipboardData:m.clipboardData;if(typeof y.onCopy=="function"&&y.onCopy(m,p,u)===!1)return m.preventDefault(),m.stopPropagation(),!1;const b=u.currentFileComponentInfo;b&&!l.isIE&&(g._setClipboardComponent(m,b,p),l.addClass(b.component,"se-component-copy"),c.setTimeout(function(){l.removeClass(b.component,"se-component-copy")},150))},onSave_wysiwyg:function(m){if(typeof y.onSave=="function"){y.onSave(m,u);return}},onCut_wysiwyg:function(m){const p=l.isIE?c.clipboardData:m.clipboardData;if(typeof y.onCut=="function"&&y.onCut(m,p,u)===!1)return m.preventDefault(),m.stopPropagation(),!1;const b=u.currentFileComponentInfo;b&&!l.isIE&&(g._setClipboardComponent(m,b,p),l.removeItem(b.component),u.controllersOff()),c.setTimeout(function(){u.history.push(!1)})},onDrop_wysiwyg:function(m){if(u.isReadOnly||l.isIE)return m.preventDefault(),m.stopPropagation(),!1;const p=m.dataTransfer;return p?(g._setDropLocationSelection(m),u.removeNode(),document.body.contains(u.currentControllerTarget)||u.controllersOff(),g._dataTransferAction("drop",m,p)):!0},_setDropLocationSelection:function(m){const p={startContainer:null,startOffset:null,endContainer:null,endOffset:null};let b=null;if(m.rangeParent?(p.startContainer=m.rangeParent,p.startOffset=m.rangeOffset,p.endContainer=m.rangeParent,p.endOffset=m.rangeOffset):u._wd.caretRangeFromPoint?b=u._wd.caretRangeFromPoint(m.clientX,m.clientY):b=u.getRange(),b&&(p.startContainer=b.startContainer,p.startOffset=b.startOffset,p.endContainer=b.endContainer,p.endOffset=b.endOffset),p.startContainer===p.endContainer){const x=l.getParentElement(p.startContainer,l.isComponent);x&&(p.startContainer=x,p.startOffset=0,p.endContainer=x,p.endOffset=0)}u.setRange(p.startContainer,p.startOffset,p.endContainer,p.endOffset)},_dataTransferAction:function(m,p,b){let x,k;if(l.isIE){x=b.getData("Text");const N=u.getRange(),_=l.createElement("DIV"),C={sc:N.startContainer,so:N.startOffset,ec:N.endContainer,eo:N.endOffset};return _.setAttribute("contenteditable",!0),_.style.cssText="position:absolute; top:0; left:0; width:1px; height:1px; overflow:hidden;",e.element.relative.appendChild(_),_.focus(),c.setTimeout(function(){k=_.innerHTML,l.removeItem(_),u.setRange(C.sc,C.so,C.ec,C.eo),g._setClipboardData(m,p,x,k,b)}),!0}else if(x=b.getData("text/plain"),k=b.getData("text/html"),g._setClipboardData(m,p,x,k,b)===!1)return p.preventDefault(),p.stopPropagation(),!1},_setClipboardData:function(m,p,b,x,k){const N=/class=["']*Mso(Normal|List)/i.test(x)||/content=["']*Word.Document/i.test(x)||/content=["']*OneNote.File/i.test(x)||/content=["']*Excel.Sheet/i.test(x);!x?x=l._HTMLConvertor(b).replace(/\n/g,"<br>"):(x=x.replace(/^<html>\r?\n?<body>\r?\n?\x3C!--StartFragment--\>|\x3C!--EndFragment-->\r?\n?<\/body\>\r?\n?<\/html>$/g,""),N&&(x=x.replace(/\n/g," "),b=b.replace(/\n/g," ")),x=u.cleanHTML(x,u.pasteTagsWhitelistRegExp,u.pasteTagsBlacklistRegExp));const C=u._charCount(u._charTypeHTML?x:b);if(m==="paste"&&typeof y.onPaste=="function"){const T=y.onPaste(p,x,C,u);if(T===!1)return!1;if(typeof T=="string"){if(!T)return!1;x=T}}if(m==="drop"&&typeof y.onDrop=="function"){const T=y.onDrop(p,x,C,u);if(T===!1)return!1;if(typeof T=="string"){if(!T)return!1;x=T}}const E=k.files;if(E.length>0&&!N)return/^image/.test(E[0].type)&&u.plugins.image&&y.insertImage(E),!1;if(!C)return!1;if(x)return y.insertHTML(x,!0,!1),!1},onMouseMove_wysiwyg:function(m){if(u.isDisabled||u.isReadOnly)return!1;const p=l.getParentElement(m.target,l.isComponent),b=u._lineBreaker.style;if(p&&!u.currentControllerName){const x=e.element;let k=0,N=x.wysiwyg;do k+=N.scrollTop,N=N.parentElement;while(N&&!/^(BODY|HTML)$/i.test(N.nodeName));const _=x.wysiwyg.scrollTop,C=g._getEditorOffsets(null),E=l.getOffset(p,x.wysiwygFrame).top+_,T=m.pageY+k+(r.iframe&&!r.toolbarContainer?x.toolbar.offsetHeight:0),D=E+(r.iframe?k:C.top),P=l.isListCell(p.parentNode);let M="",O="";if((P?!p.previousSibling:!l.isFormatElement(p.previousElementSibling))&&T<D+20)O=E,M="t";else if((P?!p.nextSibling:!l.isFormatElement(p.nextElementSibling))&&T>D+p.offsetHeight-20)O=E+p.offsetHeight,M="b";else{b.display="none";return}u._variable._lineBreakComp=p,u._variable._lineBreakDir=M,b.top=O-_+"px",u._lineBreakerButton.style.left=l.getOffset(p).left+p.offsetWidth/2-15+"px",b.display="block"}else b.display!=="none"&&(b.display="none")},_enterPrevent(m){m.preventDefault(),l.isMobile&&u.__focusTemp.focus()},_onMouseDown_lineBreak:function(m){m.preventDefault()},_onLineBreak:function(m){m.preventDefault();const p=u._variable._lineBreakComp,b=this?this:u._variable._lineBreakDir,x=l.isListCell(p.parentNode),k=l.createElement(x?"BR":l.isCell(p.parentNode)?"DIV":r.defaultTag);if(x||(k.innerHTML="<br>"),u._charTypeHTML&&!u.checkCharCount(k.outerHTML,"byte-html"))return;p.parentNode.insertBefore(k,b==="t"?p:p.nextSibling),u._lineBreaker.style.display="none",u._variable._lineBreakComp=null;const N=x?k:k.firstChild;u.setRange(N,1,N,1),u.history.push(!1)},_resizeObserver:null,_toolbarObserver:null,_addEvent:function(){const m=r.iframe?u._ww:e.element.wysiwyg;l.isResizeObserverSupported&&(this._resizeObserver=new c.ResizeObserver(function(p){u.__callResizeFunction(-1,p[0])})),e.element.toolbar.addEventListener("mousedown",g._buttonsEventHandler,!1),e.element._menuTray.addEventListener("mousedown",g._buttonsEventHandler,!1),e.element.toolbar.addEventListener("click",g.onClick_toolbar,!1),m.addEventListener("mousedown",g.onMouseDown_wysiwyg,!1),m.addEventListener("click",g.onClick_wysiwyg,!1),m.addEventListener(l.isIE?"textinput":"input",g.onInput_wysiwyg,!1),m.addEventListener("keydown",g.onKeyDown_wysiwyg,!1),m.addEventListener("keyup",g.onKeyUp_wysiwyg,!1),m.addEventListener("paste",g.onPaste_wysiwyg,!1),m.addEventListener("copy",g.onCopy_wysiwyg,!1),m.addEventListener("cut",g.onCut_wysiwyg,!1),m.addEventListener("drop",g.onDrop_wysiwyg,!1),m.addEventListener("scroll",g.onScroll_wysiwyg,!1),m.addEventListener("focus",g.onFocus_wysiwyg,!1),m.addEventListener("blur",g.onBlur_wysiwyg,!1),g._lineBreakerBind={a:g._onLineBreak.bind(""),t:g._onLineBreak.bind("t"),b:g._onLineBreak.bind("b")},m.addEventListener("mousemove",g.onMouseMove_wysiwyg,!1),u._lineBreakerButton.addEventListener("mousedown",g._onMouseDown_lineBreak,!1),u._lineBreakerButton.addEventListener("click",g._lineBreakerBind.a,!1),e.element.lineBreaker_t.addEventListener("mousedown",g._lineBreakerBind.t,!1),e.element.lineBreaker_b.addEventListener("mousedown",g._lineBreakerBind.b,!1),m.addEventListener("touchstart",g.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),m.addEventListener("touchend",g.onClick_wysiwyg,{passive:!0,useCapture:!1}),r.height==="auto"&&!r.codeMirrorEditor&&(e.element.code.addEventListener("keydown",g._codeViewAutoHeight,!1),e.element.code.addEventListener("keyup",g._codeViewAutoHeight,!1),e.element.code.addEventListener("paste",g._codeViewAutoHeight,!1)),e.element.resizingBar&&(/\d+/.test(r.height)&&r.resizeEnable?e.element.resizingBar.addEventListener("mousedown",g.onMouseDown_resizingBar,!1):l.addClass(e.element.resizingBar,"se-resizing-none")),g._setResponsiveToolbar(),l.isResizeObserverSupported&&(this._toolbarObserver=new c.ResizeObserver(u.resetResponsiveToolbar)),c.addEventListener("resize",g.onResize_window,!1),r.stickyToolbar>-1&&c.addEventListener("scroll",g.onScroll_window,!1)},_removeEvent:function(){const m=r.iframe?u._ww:e.element.wysiwyg;e.element.toolbar.removeEventListener("mousedown",g._buttonsEventHandler),e.element._menuTray.removeEventListener("mousedown",g._buttonsEventHandler),e.element.toolbar.removeEventListener("click",g.onClick_toolbar),m.removeEventListener("mousedown",g.onMouseDown_wysiwyg),m.removeEventListener("click",g.onClick_wysiwyg),m.removeEventListener(l.isIE?"textinput":"input",g.onInput_wysiwyg),m.removeEventListener("keydown",g.onKeyDown_wysiwyg),m.removeEventListener("keyup",g.onKeyUp_wysiwyg),m.removeEventListener("paste",g.onPaste_wysiwyg),m.removeEventListener("copy",g.onCopy_wysiwyg),m.removeEventListener("cut",g.onCut_wysiwyg),m.removeEventListener("drop",g.onDrop_wysiwyg),m.removeEventListener("scroll",g.onScroll_wysiwyg),m.removeEventListener("mousemove",g.onMouseMove_wysiwyg),u._lineBreakerButton.removeEventListener("mousedown",g._onMouseDown_lineBreak),u._lineBreakerButton.removeEventListener("click",g._lineBreakerBind.a),e.element.lineBreaker_t.removeEventListener("mousedown",g._lineBreakerBind.t),e.element.lineBreaker_b.removeEventListener("mousedown",g._lineBreakerBind.b),g._lineBreakerBind=null,m.removeEventListener("touchstart",g.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),m.removeEventListener("touchend",g.onClick_wysiwyg,{passive:!0,useCapture:!1}),m.removeEventListener("focus",g.onFocus_wysiwyg),m.removeEventListener("blur",g.onBlur_wysiwyg),e.element.code.removeEventListener("keydown",g._codeViewAutoHeight),e.element.code.removeEventListener("keyup",g._codeViewAutoHeight),e.element.code.removeEventListener("paste",g._codeViewAutoHeight),e.element.resizingBar&&e.element.resizingBar.removeEventListener("mousedown",g.onMouseDown_resizingBar),g._resizeObserver&&(g._resizeObserver.unobserve(e.element.wysiwygFrame),g._resizeObserver=null),g._toolbarObserver&&(g._toolbarObserver.unobserve(e.element._toolbarShadow),g._toolbarObserver=null),c.removeEventListener("resize",g.onResize_window),c.removeEventListener("scroll",g.onScroll_window)},_setResponsiveToolbar:function(){if(i.length===0){i=null;return}g._responsiveCurrentSize="default";const m=g._responsiveButtonSize=[],p=g._responsiveButtons={default:i[0]};for(let b=1,x=i.length,k,N;b<x;b++)N=i[b],k=N[0]*1,m.push(k),p[k]=N[1];m.sort(function(b,x){return b-x}).unshift("default")}},y={core:u,util:l,onload:null,onScroll:null,onMouseDown:null,onClick:null,onInput:null,onKeyDown:null,onKeyUp:null,onCopy:null,onCut:null,onFocus:null,onBlur:null,onChange:null,onSave:null,onDrop:null,onPaste:null,showInline:null,showController:null,toggleCodeView:null,toggleFullScreen:null,imageUploadHandler:null,videoUploadHandler:null,audioUploadHandler:null,onImageUploadBefore:null,onVideoUploadBefore:null,onAudioUploadBefore:null,onImageUpload:null,onVideoUpload:null,onAudioUpload:null,onImageUploadError:null,onVideoUploadError:null,onAudioUploadError:null,onResizeEditor:null,onSetToolbarButtons:null,setToolbarButtons:function(m){u.submenuOff(),u.containerOff(),u.moreLayerOff();const p=j4._createToolBar(o,m,u.plugins,r);i=p.responsiveButtons,g._setResponsiveToolbar(),e.element.toolbar.replaceChild(p._buttonTray,e.element._buttonTray);const b=z4(e.element.originElement,u._getConstructed(e.element),r);e.element=b.element,e.tool=b.tool,r.iframe&&(e.element.wysiwyg=u._wd.body),u._recoverButtonStates(),u._cachingButtons(),u.history._resetCachingButton(),u.effectNode=null,u.hasFocus&&g._applyTagEffects(),u.isReadOnly&&l.setDisabledButtons(!0,u.resizingDisabledButtons),typeof y.onSetToolbarButtons=="function"&&y.onSetToolbarButtons(p._buttonTray.querySelectorAll("button"),u)},setOptions:function(m){g._removeEvent(),u._resetComponents(),l.removeClass(u._styleCommandMap.showBlocks,"active"),l.removeClass(u._styleCommandMap.codeView,"active"),u._variable.isCodeView=!1,u._iframeAuto=null,u.plugins=m.plugins||u.plugins;const p=[r,m].reduce(function(N,_){for(let C in _)if(!!l.hasOwn(_,C))if(C==="plugins"&&_[C]&&N[C]){let E=N[C],T=_[C];E=E.length?E:c.Object.keys(E).map(function(D){return E[D]}),T=T.length?T:c.Object.keys(T).map(function(D){return T[D]}),N[C]=T.filter(function(D){return E.indexOf(D)===-1}).concat(E)}else N[C]=_[C];return N},{}),b=e.element,x=b.wysiwyg.innerHTML,k=j4._setOptions(p,e,r);k.callButtons&&(t=k.callButtons,u.initPlugins={}),k.plugins&&(u.plugins=n=k.plugins),b._menuTray.children.length===0&&(this._menuTray={}),i=k.toolbar.responsiveButtons,u.options=r=p,u.lang=a=r.lang,r.iframe&&b.wysiwygFrame.addEventListener("load",function(){l._setIframeDocument(this,r),u._setOptionsInit(b,x)}),b.editorArea.appendChild(b.wysiwygFrame),r.iframe||u._setOptionsInit(b,x)},setDefaultStyle:function(m){const p=r._editorStyles=l._setDefaultOptionStyle(r,m),b=e.element;b.topArea.style.cssText=p.top,b.code.style.cssText=r._editorStyles.frame,b.code.style.display="none",r.height==="auto"?b.code.style.overflow="hidden":b.code.style.overflow="",r.iframe?(b.wysiwygFrame.style.cssText=p.frame,b.wysiwyg.style.cssText=p.editor):b.wysiwygFrame.style.cssText=p.frame+p.editor},noticeOpen:function(m){u.notice.open.call(u,m)},noticeClose:function(){u.notice.close.call(u)},save:function(){const m=u.getContents(!1);e.element.originElement.value=m,g.onSave_wysiwyg(m,u)},getContext:function(){return e},getContents:function(m){return u.getContents(m)},getText:function(){return e.element.wysiwyg.textContent},getCharCount:function(m){return m=typeof m=="string"?m:r.charCounterType,u.getCharLength(u._charTypeHTML?e.element.wysiwyg.innerHTML:e.element.wysiwyg.textContent,m)},getImagesInfo:function(){return e.image?e.image._infoList:[]},getFilesInfo:function(m){return e[m]?e[m]._infoList:[]},insertImage:function(m){!u.plugins.image||!m||(u.initPlugins.image?u.plugins.image.submitAction.call(u,m):u.callPlugin("image",u.plugins.image.submitAction.bind(u,m),null),u.focus())},insertHTML:function(m,p,b,x){if(e.element.wysiwygFrame.contains(u.getSelection().focusNode)||u.focus(),typeof m=="string"){p||(m=u.cleanHTML(m,null,null));try{if(l.isListCell(l.getFormatElement(u.getSelectionNode(),null))){const O=o.createRange().createContextualFragment(m).childNodes;u._isFormatData(O)&&(m=u._convertListCell(O))}const N=o.createRange().createContextualFragment(m).childNodes;if(b){const M=u._charTypeHTML?"outerHTML":"textContent";let O="";for(let F=0,z=N.length;F<z;F++)O+=N[F][M];if(!u.checkCharCount(O,null))return}let _,C,E,T,D;for(;_=N[0];){if(T&&T.nodeType===3&&C&&C.nodeType===1&&l.isBreak(_)){T=_,l.removeItem(_);continue}E=u.insertNode(_,C,!1),C=E.container||E,D||(D=E),T=_}T.nodeType===3&&C.nodeType===1&&(C=T);const P=C.nodeType===3?E.endOffset||C.textContent.length:C.childNodes.length;x?u.setRange(D.container||D,D.startOffset||0,C,P):u.setRange(C,P,C,P)}catch(k){if(u.isDisabled||u.isReadOnly)return;console.warn("[SUNEDITOR.insertHTML.fail] "+k),u.execCommand("insertHTML",!1,m)}}else if(l.isComponent(m))u.insertComponent(m,!1,b,!1);else{let k=null;(l.isFormatElement(m)||l.isMedia(m))&&(k=l.getFormatElement(u.getSelectionNode(),null)),u.insertNode(m,k,b)}u.effectNode=null,u.focus(),u.history.push(!1)},setContents:function(m){u.setContents(m)},appendContents:function(m){const p=u.convertContentsForEditor(m);if(u._variable.isCodeView)u._setCodeView(u._getCodeView()+`
`+u.convertHTMLForCodeView(p,!1));else{const b=l.createElement("DIV");b.innerHTML=p;const x=e.element.wysiwyg,k=b.children;for(let N=0,_=k.length;N<_;N++)k[N]&&x.appendChild(k[N])}u.history.push(!1)},readOnly:function(m){u.isReadOnly=m,l.setDisabledButtons(!!m,u.resizingDisabledButtons),m?(u.controllersOff(),u.submenuActiveButton&&u.submenuActiveButton.disabled&&u.submenuOff(),u._moreLayerActiveButton&&u._moreLayerActiveButton.disabled&&u.moreLayerOff(),u.containerActiveButton&&u.containerActiveButton.disabled&&u.containerOff(),u.modalForm&&u.plugins.dialog.close.call(u),e.element.code.setAttribute("readOnly","true"),l.addClass(e.element.wysiwygFrame,"se-read-only")):(e.element.code.removeAttribute("readOnly"),l.removeClass(e.element.wysiwygFrame,"se-read-only")),r.codeMirrorEditor&&r.codeMirrorEditor.setOption("readOnly",!!m)},disable:function(){this.toolbar.disable(),this.wysiwyg.disable()},disabled:function(){this.disable()},enable:function(){this.toolbar.enable(),this.wysiwyg.enable()},enabled:function(){this.enable()},show:function(){const m=e.element.topArea.style;m.display==="none"&&(m.display=r.display)},hide:function(){e.element.topArea.style.display="none"},destroy:function(){u.submenuOff(),u.containerOff(),u.controllersOff(),u.notice&&u.notice.close.call(u),u.modalForm&&u.plugins.dialog.close.call(u),u.history._destroy(),g._removeEvent(),l.removeItem(e.element.toolbar),l.removeItem(e.element.topArea);for(let m in u.functions)l.hasOwn(u,m)&&delete u.functions[m];for(let m in u)l.hasOwn(u,m)&&delete u[m];for(let m in g)l.hasOwn(g,m)&&delete g[m];for(let m in e)l.hasOwn(e,m)&&delete e[m];for(let m in t)l.hasOwn(t,m)&&delete t[m];for(let m in this)l.hasOwn(this,m)&&delete this[m]},toolbar:{disable:function(){u.submenuOff(),u.moreLayerOff(),u.containerOff(),e.tool.cover.style.display="block"},disabled:function(){this.disable()},enable:function(){e.tool.cover.style.display="none"},enabled:function(){this.enable()},show:function(){u._isInline?g._showToolbarInline():(e.element.toolbar.style.display="",e.element._stickyDummy.style.display=""),g.onResize_window()},hide:function(){u._isInline?g._hideToolbar():(e.element.toolbar.style.display="none",e.element._stickyDummy.style.display="none"),g.onResize_window()}},wysiwyg:{disable:function(){u.controllersOff(),u.modalForm&&u.plugins.dialog.close.call(u),e.element.wysiwyg.setAttribute("contenteditable",!1),u.isDisabled=!0,r.codeMirrorEditor?r.codeMirrorEditor.setOption("readOnly",!0):e.element.code.setAttribute("disabled","disabled")},enable:function(){e.element.wysiwyg.setAttribute("contenteditable",!0),u.isDisabled=!1,r.codeMirrorEditor?r.codeMirrorEditor.setOption("readOnly",!1):e.element.code.removeAttribute("disabled")}}};u.functions=y,u.options=r;let w=e.element,v=w.originElement,S=w.topArea;return v.style.display="none",S.style.display="block",r.iframe&&w.wysiwygFrame.addEventListener("load",function(){l._setIframeDocument(this,r),u._editorInit(!1,r.value),r.value=null}),typeof v.nextElementSibling=="object"?v.parentNode.insertBefore(S,v.nextElementSibling):v.parentNode.appendChild(S),w.editorArea.appendChild(w.wysiwygFrame),w=v=S=null,r.iframe||(u._editorInit(!1,r.value),r.value=null),y}var i2e={init:function(e){return{create:function(t,n){return this.create(t,n,e)}.bind(this)}},create:function(e,t,n){zt._propertiesInit(),typeof t!="object"&&(t={}),n&&(t=[n,t].reduce(function(i,o){for(let c in o)if(!!zt.hasOwn(o,c))if(c==="plugins"&&o[c]&&i[c]){let l=i[c],d=o[c];l=l.length?l:Object.keys(l).map(function(u){return l[u]}),d=d.length?d:Object.keys(d).map(function(u){return d[u]}),i[c]=d.filter(function(u){return l.indexOf(u)===-1}).concat(l)}else i[c]=o[c];return i},{}));const a=typeof e=="string"?document.getElementById(e):e;if(!a)throw Error(typeof e=="string"?'[SUNEDITOR.create.fail] The element for that id was not found (ID:"'+e+'")':"[SUNEDITOR.create.fail] suneditor requires textarea's element or id value");const r=j4.init(a,t);if(r.constructed._top.id&&document.getElementById(r.constructed._top.id))throw Error('[SUNEDITOR.create.fail] The ID of the suneditor you are trying to create already exists (ID:"'+r.constructed._top.id+'")');return s2e(z4(a,r.constructed,r.options),r.pluginCallButtons,r.plugins,r.options.lang,t,r._responsiveButtons)}},o2e=Object.freeze(Object.defineProperty({__proto__:null,default:i2e},Symbol.toStringTag,{value:"Module"})),l2e=M_(o2e),s5={};Object.defineProperty(s5,"__esModule",{value:!0});var c2e=function(e){switch(typeof e){case"object":return e;case"string":return iL("suneditor/src/lang/".concat(e,".js"));default:return}};s5.default=c2e;var Fu={};Object.defineProperty(Fu,"__esModule",{value:!0});Fu.uploadBeforeEvents=Fu.events=void 0;Fu.events=["onMouseDown","onScroll","onInput","onClick","onKeyUp","onKeyDown","onFocus","onImageUpload","onAudioUpload","onVideoUpload","onImageUploadError","onVideoUploadError","onAudioUploadError","onSave","onSetToolbarButtons","imageUploadHandler","toggleCodeView","toggleFullScreen","showInline","showController","onCopy","onCut","onDrop","onPaste"];Fu.uploadBeforeEvents=["onImageUploadBefore","onVideoUploadBefore","onAudioUploadBefore"];var zm=sn&&sn.__assign||function(){return zm=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},zm.apply(this,arguments)},d2e=sn&&sn.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,r)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),u2e=sn&&sn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f2e=sn&&sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&d2e(t,e,n);return u2e(t,e),t},i5=sn&&sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(n5,"__esModule",{value:!0});var fs=f2e(h.exports),m2e=i5(t2e),p2e=i5(l2e),J7=i5(s5),K7=Fu,h2e=function(e){var t=e.name,n=e.lang,a=e.setOptions,r=a===void 0?{}:a,i=e.placeholder,o=e.width,c=o===void 0?"100%":o,l=e.height,d=e.defaultValue,u=e.setContents,g=e.setDefaultStyle,y=e.getSunEditorInstance,w=e.appendContents,v=e.setAllPlugins,S=v===void 0?!0:v,m=e.disable,p=m===void 0?!1:m,b=e.readOnly,x=b===void 0?!1:b,k=e.hide,N=k===void 0?!1:k,_=e.hideToolbar,C=_===void 0?!1:_,E=e.disableToolbar,T=E===void 0?!1:E,D=e.onChange,P=e.autoFocus,M=e.onBlur,O=e.onLoad,F=(0,fs.useRef)(null),z=(0,fs.useRef)(null),H=(0,fs.useRef)(!0);return(0,fs.useEffect)(function(){var A,j=zm(zm({},r),{lang:n?(0,J7.default)(n):r.lang,width:c!=null?c:r.width,placeholder:i!=null?i:r.placeholder,plugins:(A=r.plugins)!==null&&A!==void 0?A:S?m2e.default:void 0,height:l!=null?l:r.height,value:d!=null?d:r.value,defaultStyle:g!=null?g:r.defaultStyle});return t&&j.value&&(F.current.value=j.value),z.current=p2e.default.create(F.current,j),y&&y(z.current),z.current.onload=function(I,B){return B||(u&&(z.current.setContents(u),z.current.core.focusEdge(null)),w&&z.current.appendContents(w),z.current.util.isIE&&z.current.core._createDefaultRange(),p&&z.current.disable(),x&&z.current.readOnly(!0),N&&z.current.hide(),C&&z.current.toolbar.hide(),T&&z.current.toolbar.disable(),P===!1?z.current.core.context.element.wysiwyg.blur():P&&z.current.core.context.element.wysiwyg.focus()),O==null?void 0:O(B)},z.current.onChange=function(I){t&&F.current&&(F.current.value=I),D&&D(I)},M&&(z.current.onBlur=function(I){return M(I,z.current.getContents(!0))}),K7.uploadBeforeEvents.forEach(function(I){var B=e[I];z.current&&B&&(z.current[I]=function(Y,U,W,V){return B(Y,U,V)})}),K7.events.forEach(function(I){var B=e[I];B&&z.current&&(z.current[I]=B)}),function(){z.current&&z.current.destroy(),z.current=null}},[]),(0,fs.useEffect)(function(){var A;H.current||(A=z.current)===null||A===void 0||A.setOptions({lang:(0,J7.default)(n)})},[n]),(0,fs.useEffect)(function(){var A;H.current||(A=z.current)===null||A===void 0||A.setOptions({placeholder:i,height:l,width:c})},[i,l,c]),(0,fs.useEffect)(function(){var A;g&&!H.current&&((A=z.current)===null||A===void 0||A.setDefaultStyle(g))},[g]),(0,fs.useEffect)(function(){var A,j;!H.current&&u!==void 0&&!(!((A=z.current)===null||A===void 0)&&A.core.hasFocus)&&((j=z.current)===null||j===void 0||j.setContents(u))},[u]),(0,fs.useEffect)(function(){var A,j,I;!H.current&&w!==void 0&&!(!((A=z.current)===null||A===void 0)&&A.core.hasFocus)&&((j=z.current)===null||j===void 0||j.appendContents(w),(I=z.current)===null||I===void 0||I.core.focusEdge(null))},[w]),(0,fs.useEffect)(function(){var A,j,I,B,Y,U,W,V,X;H.current||((A=z.current)===null||A===void 0||A.readOnly(x),C?(j=z.current)===null||j===void 0||j.toolbar.hide():(I=z.current)===null||I===void 0||I.toolbar.show(),T?(B=z.current)===null||B===void 0||B.toolbar.disable():(Y=z.current)===null||Y===void 0||Y.toolbar.enable(),p?(U=z.current)===null||U===void 0||U.disable():(W=z.current)===null||W===void 0||W.enable(),N?(V=z.current)===null||V===void 0||V.hide():(X=z.current)===null||X===void 0||X.show())},[p,C,T,N,x]),(0,fs.useEffect)(function(){H.current=!1},[]),fs.default.createElement("textarea",zm({style:{visibility:"hidden"},ref:F},{name:t}))};n5.default=h2e;var El={};Object.defineProperty(El,"__esModule",{value:!0});El.formatting=El.complex=El.basic=void 0;El.basic=[["font","fontSize"],["fontColor"],["horizontalRule"],["link","image"]];El.complex=[["undo","redo"],["font","fontSize","formatBlock"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],"/",["fontColor","hiliteColor"],["outdent","indent"],["align","horizontalRule","list","table"],["link","image","video"],["fullScreen","showBlocks","codeView"],["preview","print"],["save","template"]];El.formatting=[["undo","redo"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["outdent","indent"],["fullScreen","showBlocks","codeView"],["preview","print"]];var g2e=sn&&sn.__createBinding||(Object.create?function(e,t,n,a){a===void 0&&(a=n);var r=Object.getOwnPropertyDescriptor(t,n);(!r||("get"in r?!t.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,a,r)}:function(e,t,n,a){a===void 0&&(a=n),e[a]=t[n]}),b2e=sn&&sn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y2e=sn&&sn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&g2e(t,e,n);return b2e(t,e),t},x2e=sn&&sn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gy,"__esModule",{value:!0});var Ul=Gy.buttonList=void 0,w2e=x2e(n5);Ul=Gy.buttonList=y2e(El);var Mo=Gy.default=w2e.default;const v2e=()=>{var y,w,v;const{dispatch:e}=R.useContext(we),[t,n]=h.exports.useState(""),a=Qe({question:ge().required("Question is required"),answer:ge(),status:dt()}).required(),{dispatch:r}=R.useContext(Ee),i=je(),{register:o,handleSubmit:c,setError:l,formState:{errors:d}}=Oe({resolver:Xe(a)}),u=async S=>{if(t==""){l("answer",{type:"manual",message:"Answer is required"});return}let m=new _e;try{m.setTable("faq");const p=await m.callRestAPI({question:S.question,answer:t,status:S.status},"POST");if(!p.error)pe(e,"Added"),i("/admin/faq");else if(p.validation){const b=Object.keys(p.validation);for(let x=0;x<b.length;x++){const k=b[x];l(k,{type:"manual",message:p.validation[k]})}}}catch(p){console.log("Error",p),l("question",{type:"manual",message:p.message}),me(r,p.message)}},g=()=>{l("answer",{type:"manual",message:"Answer is required"})};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"faq"}})},[]),s(Sa,{title:"FAQ",backTo:"faq",children:f("form",{className:" w-full max-w-lg",onSubmit:c(u,g),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"question",children:"Question"}),s("textarea",{placeholder:"Question",...o("question"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(y=d.question)!=null&&y.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(w=d.question)==null?void 0:w.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"status",children:"Status"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...o("status"),children:[s("option",{value:"0",children:"For customer"}),s("option",{value:"1",children:"For hosts"})]})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"answer",children:"Answer"}),s(Mo,{width:"100%",height:"400px",onChange:S=>n(S),placeholder:"Add your answer here",setOptions:{buttonList:Ul.complex}}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(v=d.answer)==null?void 0:v.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>i("/admin/faq"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})},Ja=({title:e,type:t,backTo:n,children:a,table1:r,table2:i,deleteMessage:o,id:c,showDelete:l=!0})=>{const d=je(),{dispatch:u}=R.useContext(we);return f("div",{className:" rounded bg-white mx-auto ",children:[f("div",{className:"border px-5 py-3",children:[s("div",{children:f("button",{type:"button",onClick:()=>d(`/${t?"account":"admin"}/${n}`),className:"font-semibold text-sm pr-5 py-2.5 text-center inline-flex items-center mr-2 mb-2",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"stroke-[#667085] h-4 w-4"})," ",s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"flex justify-between",children:[f("h4",{className:"text-2xl font-bold",children:["Edit ",e]}),l&&f("button",{className:"font-semibold text-sm pr-5 py-2.5 text-center inline-flex items-center mr-2 mb-2",onClick:()=>{u({type:"SHOWMODAL",payload:{showModal:!0,modalShowMessage:o,modalShowTitle:"Confirm Changes",type:"Delete",modalBtnText:"Yes, Delete",itemId:c,table1:r,table2:i,backTo:`/admin/${n}`}})},children:[s(ln,{type:"trash",variant:"two",className:"stroke-[#667085] h-4 w-4"})," ",f("span",{className:"ml-2",children:[" Delete ",e]})]})]})]}),s("div",{className:"border p-5 border-t-0",children:a})]})};let Sw=new _e;const _2e=()=>{var b,x,k;const{dispatch:e}=R.useContext(Ee),[t,n]=h.exports.useState(""),a=Qe({question:ge().required(),answer:ge()}).required(),{dispatch:r,state:i}=R.useContext(we),o=h.exports.useRef(null),c=je(),[l,d]=h.exports.useState(0),{register:u,handleSubmit:g,setError:y,setValue:w,formState:{errors:v}}=Oe({resolver:Xe(a)}),S=Mt();h.exports.useEffect(function(){(async function(){try{Sw.setTable("faq");const N=await Sw.callRestAPI({id:Number(S==null?void 0:S.id)},"GET");console.log(N),N.error||(w("question",N.model.question),w("status",N.model.status),n(N.model.answer),d(N.model.id))}catch(N){console.log("error",N),me(e,N.message)}})()},[]);const m=()=>{t==""&&y("answer",{type:"manual",message:"Answer is required"})},p=async N=>{if(t==""){y("answer",{type:"manual",message:"Answer is required"});return}try{const _=await Sw.callRestAPI({id:l,question:N.question,answer:t,status:N.status},"PUT");if(!_.error)pe(r,"Updated"),c("/admin/faq");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];y(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),y("question",{type:"manual",message:_.message})}};return h.exports.useEffect(()=>{i.saveChanges&&(o.current.click(),r({type:"SAVE_CHANGES",payload:{saveChanges:!1}}))},[i.saveChanges]),h.exports.useEffect(()=>{r({type:"SETPATH",payload:{path:"faq"}})},[]),s(Ja,{title:"FAQ",backTo:"faq",table1:"faq",deleteMessage:"Are you sure you want to delete this Question?",id:l,children:f("form",{className:" w-full max-w-lg",onSubmit:g(p,m),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"question",children:"Question"}),s("textarea",{placeholder:"Question",...u("question"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(b=v.question)!=null&&b.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(x=v.question)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"status",children:"Status"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...u("status"),children:[s("option",{value:"0",children:"For customer"}),s("option",{value:"1",children:"For hosts"})]})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"answer",children:"Answer"}),s(Mo,{width:"100%",height:"400px",onChange:N=>n(N),setContents:t,name:"answer",setOptions:{buttonList:Ul.complex}}),s("p",{className:"text-red-500 text-xs italic",children:(k=v.answer)==null?void 0:k.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>c("/admin/faq"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"button",onClick:()=>r({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Changes",type:"Edit",modalShowMessage:"Are you sure you want to update this question?",modalBtnText:"Yes, save changes"}}),className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"}),s("button",{ref:o,type:"submit",className:"hidden"})]})]})})},zr=({columns:e,rows:t,actions:n,profile:a,tableType:r,type:i,table1:o,table2:c,deleteMessage:l,deleteTitle:d,showDelete:u=!0,onSort:g,id:y,rejectImage:w,approveImage:v,setActivePicture:S,openPictureModal:m,baasDelete:p,emailActions:b})=>{const{dispatch:x}=h.exports.useContext(we),k=je();return f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:y,children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:e.map((N,_)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>g(N.accessor),children:[N.header,N.isSorted,s("span",{children:N.isSorted?N.isSortedDesc?" \u25BC":" \u25B2":""})]},_))})}),s("tbody",{className:"divide-y divide-gray-200",children:(t==null?void 0:t.length)>0&&t.map((N,_)=>s("tr",{className:"py-2 text-sm",children:e.map((C,E)=>{var T,D;return C.accessor.split(",").length>1?s("td",{className:"whitespace-nowrap px-6 py-4",children:C.accessor.split(",").map((P,M)=>s("span",{className:`mr-2 ${C!=null&&C.multiline?"mb-1 block":""}`,children:N[P.trim()]},M))},E):C.accessor===""&&b?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[s("button",{className:`bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent ${u?"border-r border-gray-200":""}`,onClick:()=>{k(`/admin/edit-${r.toLowerCase()}/${N.id}`,{state:N})},children:"Edit"}),u&&s("button",{className:"ml-2 px-1 text-[#667085]",onClick:()=>{x({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:d,modalShowMessage:l,modalBtnText:"Delete",type:"Delete",itemId:N.id,table1:o,table2:c}})},children:"Delete"}),s("button",{className:"ml-4 border-l border-gray-200 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pl-4 font-bold text-transparent",onClick:()=>{k(`/admin/view-${r.toLowerCase()}/${N.id}`,{state:N})},children:"View"})]},E):C.accessor===""&&a&&C.viewProperty?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[s("button",{className:`bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent ${u?"border-r border-gray-200":""}`,onClick:()=>{k(`/${i==="host"?"host":"admin"}/edit-${r.toLowerCase()}/${N.id}`,{state:N})},children:"Edit"}),u&&s("button",{className:"ml-2 px-1 text-[#667085]",onClick:()=>{x({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:d,modalShowMessage:l,modalBtnText:"Delete",type:p?"BaasDelete":"Delete",itemId:N.id,table1:o,table2:c}})},children:"Delete"}),s("button",{className:"ml-4 border-l border-gray-200 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pl-4 font-bold text-transparent",onClick:()=>{k(`/admin/view-${r.toLowerCase()}/${N.id}`,{state:N})},children:"View"})]},E):C.accessor===""&&n?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{S(N.photo),m()},children:"View Picture"}),(N==null?void 0:N.is_photo_approved)==rn.IN_REVIEW?f(Se,{children:[s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>w(N),children:"Reject Photo"}),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>v(N.id),children:"Approve Photo"})]}):(N==null?void 0:N.is_photo_approved)===rn.APPROVED?s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>w(N),children:"Reject Photo"}):s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>v(N.id),children:"Approve Photo"}),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{k(`/admin/view-${r.toLowerCase()}/${N.id}`,{state:N})},children:"View Profile"})]},E):C.accessor===""&&a?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[s("button",{className:`bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent ${u?"border-r border-gray-200":""}`,onClick:()=>{k(`${i==="host"?"host":"admin"}/edit-${r.toLowerCase()}/${N.id}`,{state:N})},children:"Edit"}),u&&s("button",{className:"ml-2 px-1 text-[#667085]",onClick:()=>{x({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:d,modalShowMessage:l,modalBtnText:"Delete",type:p?"BaasDelete":"Delete",itemId:N.id,table1:o,table2:c}})},children:"Delete"})]},E):C.accessor=="image"||C.accessor=="photo_url"?s("td",{className:"max-h-[80px] whitespace-nowrap px-6 py-2",children:s("img",{src:N[C.accessor],className:"h-16 ",alt:"image"})},E):C.accessor=="icon"?s("td",{className:"max-h-[80px] whitespace-nowrap object-cover px-6 py-2",children:s("img",{src:N[C.accessor],className:"h-16 ",alt:"icon"})},E):C.statusMapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:`${N[C.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full border border-[#EAECF0] bg-[#F9FAFB] py-[2px] px-[10px]`,children:[" ",C.statusMapping[N[C.accessor]]]})},E):C.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:(T=C.mapping[N[C.accessor]])!=null?T:"N/A"},E):C.accessor=="dob"?s("td",{className:"whitespace-nowrap px-6 py-4",children:N[C.accessor]?Te(N[C.accessor]).format("MM/DD/YY"):""},E):(D=C.accessor)!=null&&D.includes("email")?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:N[C.accessor]},E):C.accessor=="num_properties"?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case ",children:s("button",{className:"border-r border-gray-200 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-2 font-bold text-transparent",onClick:()=>{k(`/admin/property_spaces?host_id=${N.id}`)},children:"View"})},E):C.accessor.includes("payout")||C.amountField?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case ",children:f("span",{className:"ml-2",children:["$",(N[C.accessor]?N[C.accessor]:0).toFixed(2)]})},E):C.formatDate?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case ",children:s("span",{className:"ml-2",children:new Date(N[C.accessor]).toUTCString()})},E):C.nested?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:N[C.nested][C.accessor]},E):C.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:C.idPrefix+N[C.accessor]},E):C.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:C.format(N[C.accessor])},E):C.accessor==="cost"?f("td",{className:"whitespace-nowrap px-6 py-4",children:["$",N[C.accessor]]},E):s("td",{className:"whitespace-nowrap px-6 py-4",children:N[C.accessor]},E)})},_))})]})};new _e;let N2e=new St;const S2e=[{header:"ID",accessor:"id",idPrefix:mt.EMAIL},{header:"Email Type",accessor:"slug"},{header:"Subject",accessor:"subject"},{header:"Tags",accessor:"tag"},{header:"Actions",accessor:""}],k2e=()=>{const{dispatch:e}=R.useContext(Ee),[t,n]=R.useState([]),{dispatch:a}=R.useContext(we);async function r(){try{let i=["deleted_at,is"];const o=await N2e.getList("email",{join:[],filter:i,order:"update_at"}),{list:c}=o;n(c)}catch(i){me(e,i.message),pe(a,i.message,4e3,"ERROR")}}return R.useEffect(()=>{a({type:"SETPATH",payload:{path:"email"}}),r()},[]),s(Se,{children:f("div",{className:"overflow-x-auto rounded bg-white p-5 shadow",children:[f("div",{className:"mb-3 flex w-full justify-between text-center ",children:[s("h4",{className:"text-2xl font-medium",children:"Emails "}),s(ma,{link:"/admin/add-email",text:"Add new Email"})]}),s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:S2e,rows:t,tableType:"email",table1:"email",emailActions:!0,deleteMessage:"Are you sure you want to delete this Email?"})})]})})},C2e=()=>{var d,u,g,y,w,v;const e=Qe({slug:ge().required(),subject:ge().required(),html:ge().required(),tag:ge().required()}).required(),{dispatch:t}=R.useContext(Ee),{dispatch:n}=R.useContext(we),a=je(),{register:r,handleSubmit:i,setError:o,formState:{errors:c}}=Oe({resolver:Xe(e)}),l=async S=>{let m=new _e;try{m.setTable("email");const p=await m.callRestAPI({slug:S.slug,subject:S.subject,html:S.html,tag:S.tag},"POST");if(!p.error)a("/admin/email"),pe(n,"Added");else if(p.validation){const b=Object.keys(p.validation);for(let x=0;x<b.length;x++){const k=b[x];o(k,{type:"manual",message:p.validation[k]})}}}catch(p){console.log("Error",p),o("subject",{type:"manual",message:p.message}),me(t,p.message)}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"email"}})},[]),f("div",{className:" shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium mb-8",children:"Add Email"}),f("form",{className:" w-full max-w-lg",onSubmit:i(l),children:[f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"slug",children:"Email Type"}),s("input",{type:"text",placeholder:"Email Type",...r("slug"),className:"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline}"})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"subject",children:"Subject"}),s("input",{type:"text",placeholder:"subject",...r("subject"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(d=c.subject)!=null&&d.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(u=c.subject)==null?void 0:u.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"tag",children:"Tags"}),s("input",{type:"text",placeholder:"tag",...r("tag"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(g=c.tag)!=null&&g.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(y=c.tag)==null?void 0:y.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"html",children:"Email Body"}),s("textarea",{placeholder:"Email Body",className:`shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(w=c.html)!=null&&w.message?"border-red-500":""}`,...r("html"),rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(v=c.html)==null?void 0:v.message})]}),s("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:"Submit"})]})]})};let kw=new _e;const E2e=()=>{var S,m,p,b,x,k;const e=Qe({subject:ge().required(),html:ge().required(),tag:ge().required()}).required(),{dispatch:t}=R.useContext(Ee),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),[o,c]=h.exports.useState(""),{register:l,handleSubmit:d,setError:u,setValue:g,formState:{errors:y}}=Oe({resolver:Xe(e)}),w=Mt();return h.exports.useEffect(function(){n({type:"SETPATH",payload:{path:"email"}}),async function(){try{kw.setTable("email");const N=await kw.callRestAPI({id:Number(w==null?void 0:w.id)},"GET");N.error||(g("subject",N.model.subject),g("html",N.model.html),g("tag",N.model.tag),c(N.model.slug),i(N.model.id))}catch(N){console.log("error",N),me(t,N.message)}}()},[]),f("div",{className:" shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium mb-8",children:"Edit Email"}),f("form",{className:" w-full max-w-lg",onSubmit:d(async N=>{try{const _=await kw.callRestAPI({id:r,slug:o,subject:N.subject,html:N.html,tag:N.tag},"PUT");if(!_.error)pe(n,"Updated"),a("/admin/email");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];u(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),u("html",{type:"manual",message:_.message}),me(t,_.message)}}),children:[f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"slug",children:"Email Type"}),s("input",{type:"text",placeholder:"Email Type",value:o,readOnly:!0,className:"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline}"})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"email",children:"Subject"}),s("input",{type:"text",placeholder:"subject",...l("subject"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(S=y.subject)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(m=y.subject)==null?void 0:m.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"tag",children:"Tags"}),s("input",{type:"text",placeholder:"tag",...l("tag"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(p=y.tag)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(b=y.tag)==null?void 0:b.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"html",children:"Email Body"}),s("textarea",{placeholder:"Email Body",className:`shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(x=y.html)!=null&&x.message?"border-red-500":""}`,...l("html"),rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(k=y.html)==null?void 0:k.message})]}),s("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:"Submit"})]})]})},wf=({title:e,backTo:t,children:n,table1:a,table2:r,deleteMessage:i,id:o,showDelete:c=!0,name:l})=>{const{dispatch:d}=h.exports.useContext(we),u=je();return f("div",{className:" mx-auto rounded bg-white ",children:[f("div",{className:"border px-5 py-3",children:[s("div",{children:f("button",{type:"button",onClick:()=>u(`/admin/${t}`),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(cf,{className:"h-4 w-4"}),s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"flex justify-between",children:[f("h4",{className:"text-2xl font-bold",children:[" ",l?`${e} - ${l}`:`View ${e}`]}),c?f("button",{className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",onClick:()=>{d({type:"SHOWMODAL",payload:{showModal:!0,modalShowMessage:i,modalShowTitle:"Confirm Changes",type:"Delete",modalBtnText:"Yes, Delete",itemId:o,table1:a,table2:r,backTo:`/admin/${t}`}})},children:[s(Ru,{className:"h-6 w-6"}),f("span",{className:"ml-2",children:[" Delete ",e]})]}):null]})]}),s("div",{className:"border border-t-0 p-5",children:n})]})};let X7=new _e;const T2e=()=>{const[e,t]=h.exports.useState({}),{dispatch:n}=R.useContext(Ee),{dispatch:a}=R.useContext(we),r=Mt();return je(),R.useEffect(()=>{a({type:"SETPATH",payload:{path:"email"}}),async function(){try{X7.setTable("email");const i=await X7.callRestAPI({id:Number(r==null?void 0:r.id)},"GET");t(i.model||{}),console.log(i.model)}catch(i){console.log("ERROR",i),me(n,i.message)}}()},[]),s(wf,{title:"Email",backTo:"email",table1:"email",deleteMessage:"Are you sure you want to delete this Email?",id:r==null?void 0:r.id,children:s("div",{className:"py-5",children:f("div",{className:"w-full max-w-[413px]",children:[f("div",{className:"flex mb-5 px-5",children:[s("p",{className:"w-[15rem] font-bold text-base",children:"Email Details"}),s("div",{className:"flex-1"})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"ID"}),s("p",{className:"flex-1",children:e.id})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Type"}),s("p",{className:"flex-1",children:e.slug})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Subject"}),s("p",{className:"flex-1",children:e.subject})]}),f("div",{className:"flex py-2",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Tags"}),s("p",{className:"flex-1 normal-case",children:e.tag})]})]})})})},dn=({text:e,setResetClicked:t})=>s("button",{onClick:()=>t(!1),type:"submit",className:" ml-2 rounded-md font-inter px-[66px] py-[10px] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent border border-[#33D4B7]",children:e}),Ln=({currentPage:e,pageSize:t,updatePageSize:n,totalNumber:a,noBorder:r})=>s(Se,{children:f("div",{className:"flex justify-between bg-white py-4 font-medium items-center text-[#667085] "+(r?"":"border px-6"),children:[s("div",{className:"",children:f("p",{className:"text-sm mb-0",children:["Showing"," ",f("span",{children:[a<1?0:e>1?(e-1)*t+1:e,"-",e*t<a?e*t:a," of ",a]})," "]})}),f("div",{children:[s("span",{className:"mr-2 text-sm",children:"Results per page:"}),s("select",{className:"md:mt-2 cursor-pointer border w-[53px] py-1 text-sm bg-white",value:t,onChange:i=>{n(Number(i.target.value))},children:[5,10,20,30,40,50,"ALL"].map(i=>s("option",{value:i=="ALL"?1e5:i,children:i},i))})]})]})});var ZP={},o5={exports:{}},L2e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",D2e=L2e,M2e=D2e;function QP(){}function JP(){}JP.resetWarningCache=QP;var A2e=function(){function e(a,r,i,o,c,l){if(l!==M2e){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:JP,resetWarningCache:QP};return n.PropTypes=n,n};o5.exports=A2e();var Ie=o5.exports;Object.defineProperty(ZP,"__esModule",{value:!0});var I2e=function(){function e(t,n){for(var a=0;a<n.length;a++){var r=n[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),KP=h.exports,O2e=XP(KP),P2e=o5.exports,hd=XP(P2e);function XP(e){return e&&e.__esModule?e:{default:e}}function R2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j2e(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function z2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var F2e={table:hd.default.string.isRequired,filename:hd.default.string.isRequired,sheet:hd.default.string.isRequired,id:hd.default.string,className:hd.default.string,buttonText:hd.default.string},$2e={id:"button-download-as-xls",className:"button-download",buttonText:"Download"},l5=function(e){z2e(t,e);function t(n){R2e(this,t);var a=j2e(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return a.handleDownload=a.handleDownload.bind(a),a}return I2e(t,[{key:"handleDownload",value:function(){if(!document||document.getElementById(this.props.table).nodeType!==1||document.getElementById(this.props.table).nodeName!=="TABLE")return null;var a=document.getElementById(this.props.table).outerHTML,r=String(this.props.sheet),i=String(this.props.filename)+".xls",o="data:application/vnd.ms-excel;base64,",c='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>{table}</body></html>',l={worksheet:r||"Worksheet",table:a};if(window.navigator.msSaveOrOpenBlob){var d=['<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8"><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>'+a+"</body></html>"],u=new Blob(d);return document.getElementById("react-html-table-to-excel").click()(function(){window.navigator.msSaveOrOpenBlob(u,i)}),!0}var g=window.document.createElement("a");return g.href=o+t.base64(t.format(c,l)),g.download=i,document.body.appendChild(g),g.click(),document.body.removeChild(g),!0}},{key:"render",value:function(){return O2e.default.createElement("button",{id:this.props.id,className:this.props.className,type:"button",onClick:this.handleDownload},this.props.buttonText)}}],[{key:"base64",value:function(a){return window.btoa(unescape(encodeURIComponent(a)))}},{key:"format",value:function(a,r){return a.replace(/{(\w+)}/g,function(i,o){return r[o]})}}]),t}(KP.Component);l5.propTypes=F2e;l5.defaultProps=$2e;var Ka=ZP.default=l5;function va(e,t){return e=on(e),e=e.sort((n,a)=>n.defaultOrder-a.defaultOrder),t.filter((n,a)=>{var r;return(r=e[a])==null?void 0:r.shouldShow}).sort((n,a)=>e[n.defaultOrder].orderNumber-e[a.defaultOrder].orderNumber)}const _a={admin_user:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,defaultOrder:0,idPrefix:mt.USER},{header:"First Name",accessor:"first_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Last Name",accessor:"last_name",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"DOB",accessor:"dob",defaultOrder:4},{header:"Role",accessor:"role",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Preferences",accessor:"settings",isSorted:!0,isSortedDesc:!0,defaultOrder:6},{header:"Status",accessor:"status",statusMapping:["Inactive","Active","Suspend"],isSorted:!0,isSortedDesc:!0,defaultOrder:7},{header:"Profile",accessor:"",defaultOrder:8},{header:"Photo Status",accessor:"is_photo_approved",mapping:["IN REVIEW","APPROVED","REJECTED"],default:"No Photo",defaultOrder:9}],admin_host:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.HOST,defaultOrder:0},{header:"Name",accessor:"first_name,last_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Status",accessor:"status",statusMapping:["Inactive","Active","Suspend"],isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Total Payout",accessor:"total_payout",isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Properties",accessor:"num_properties",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Profile",accessor:"",defaultOrder:6}],admin_customer:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.CUSTOMER,defaultOrder:0},{header:"First Name",accessor:"first_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Last Name",accessor:"last_name",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Verified",accessor:"verify",mapping:["No","Yes"],isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Payment Set",accessor:"payment_method_set",mapping:["No","Yes"],isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Status",accessor:"status",statusMapping:["Inactive","Active","Suspend"],isSorted:!0,isSortedDesc:!0,defaultOrder:6},{header:"Profile",accessor:"",defaultOrder:7}],admin_id_verification:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.ID_VERIFICATION,defaultOrder:0},{header:"User ID",accessor:"user_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.USER,defaultOrder:1},{header:"Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Date of Birth",accessor:"dob",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"ID Photo Front",accessor:"image_front",defaultOrder:4},{header:"ID Photo Back",accessor:"image_back",defaultOrder:5},{header:"Expiry Date",accessor:"expiry_date",isSorted:!0,isSortedDesc:!0,defaultOrder:6},{header:"ID Type",accessor:"type",isSorted:!1,isSortedDesc:!1,defaultOrder:7},{header:"Status",accessor:"status",isSorted:!0,isSortedDesc:!0,mapping:["Pending","Verified","Declined"],defaultOrder:8},{header:"Actions",accessor:"",defaultOrder:9}],admin_space_categories:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.SPACE_CATEGORY,defaultOrder:0},{header:"Category",accessor:"category",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Image",accessor:"image",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Icon",accessor:"icon",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Has Sizes",accessor:"has_sizes",mapping:["NO","YES"],isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Actions",accessor:"",defaultOrder:4}],admin_addon_categories:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.ADDON_CATEGORY,defaultOrder:0},{header:"Space Category",nested:"spaces",accessor:"category",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Cost ($)",accessor:"cost",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Actions",accessor:"",defaultOrder:4}],host_addon_categories:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.ADDON_CATEGORY,defaultOrder:0},{header:"Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Cost ($)",accessor:"cost",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Actions",accessor:"",defaultOrder:3}],admin_amenity_categories:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.AMENITY_CATEGORY,defaultOrder:0},{header:"Space Category",nested:"spaces",accessor:"category",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Actions",accessor:"",defaultOrder:3}],host_amenity_categories:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.AMENITY_CATEGORY,defaultOrder:0},{header:"Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Actions",accessor:"",defaultOrder:2}],admin_property:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY,defaultOrder:0},{header:"Property Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Host's Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Address",accessor:"address_line_1, address_line_2",multiline:!0,defaultOrder:3},{header:"City",accessor:"city",isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Zip Code",accessor:"zip",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Country",accessor:"country",isSorted:!0,isSortedDesc:!0,defaultOrder:6},{header:"Spaces",accessor:"spaces",isSorted:!0,isSortedDesc:!0,defaultOrder:7},{header:"Actions",accessor:"",defaultOrder:8}],admin_property_space:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE,defaultOrder:0},{header:"Property",accessor:"property_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Space",accessor:"space_category",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Max Capacity",accessor:"max_capacity",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Rate ( Hourly )",accessor:"rate",isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Additional guest rate ( hourly )",accessor:"additional_guest_rate",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Date Updated",accessor:"update_at",isSorted:!0,isSortedDesc:!0,formatDate:!0,defaultOrder:6},{header:"Is Draft",accessor:"draft_status",isSorted:!0,isSortedDesc:!0,format:e=>e===Nn.COMPLETED?"NO":"YES",defaultOrder:7},{header:"Status",accessor:"space_status",isSorted:!0,isSortedDesc:!0,mapping:["UNDER REVIEW","APPROVED","DECLINED"],defaultOrder:8},{header:"Visibility",accessor:"availability",isSorted:!0,isSortedDesc:!0,mapping:["HIDDEN","VISIBLE"],defaultOrder:9},{header:"Size",accessor:"size",isSorted:!0,isSortedDesc:!0,mapping:["Small","Medium","Large","X-Large"],defaultOrder:10},{header:"Actions",accessor:"",viewProperty:!0,defaultOrder:11}],admin_property_space_images:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE_IMAGES,defaultOrder:0},{header:"Property",accessor:"property_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Property Space",accessor:"space_category",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Host Email",accessor:"email",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Image",accessor:"photo_url",defaultOrder:4},{header:"Actions",accessor:"",defaultOrder:5},{header:"Status",accessor:"is_approved",defaultOrder:6,mapping:["IN REVIEW","APPROVED","REJECTED"]}],admin_property_space_amenities:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE_AMENITIES,defaultOrder:0},{header:"Property Name",accessor:"property_name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Property Space",accessor:"space_category",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Amenity",accessor:"amenity_name",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Actions",accessor:"",defaultOrder:4}],admin_property_space_faqs:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE_FAQS,defaultOrder:0},{header:"Property Space ID",accessor:"property_space_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE,defaultOrder:1},{header:"Questions",accessor:"question",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Actions",accessor:"",defaultOrder:3}],admin_booking_addons:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.BOOKING_ADDON,defaultOrder:0},{header:"Booking Id",accessor:"booking_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.BOOKINGS,defaultOrder:1},{header:"Property Add-on",accessor:"add_on_name",isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Actions",accessor:"",defaultOrder:3}],admin_hashtag:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.HASHTAGS,defaultOrder:0},{header:"Name",accessor:"name",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Actions",accessor:"",defaultOrder:2}],admin_host_reviews:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.REVIEWS,defaultOrder:0},{header:"Host",accessor:"host_first_name , host_last_name",type:"single",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Space",accessor:"name,category",multiline:!0,isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Post Date",accessor:"create_at",defaultOrder:3},{header:"Rating",accessor:"rating",isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Type",accessor:"type",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Status",accessor:"status",mapping:["Under Review","Posted","Declined"],defaultOrder:6},{header:"Action",accessor:"",defaultOrder:7}],admin_customer_reviews:[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.REVIEWS,defaultOrder:0},{header:"Customer",accessor:"customer_first_name , customer_last_name",type:"single",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Space",accessor:"name,category",multiline:!0,isSorted:!0,isSortedDesc:!0,defaultOrder:2},{header:"Post Date",accessor:"create_at",defaultOrder:3},{header:"Rating",accessor:"rating",isSorted:!0,isSortedDesc:!0,defaultOrder:4},{header:"Type",accessor:"type",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Status",accessor:"status",mapping:["Under Review","Posted","Declined"],defaultOrder:6},{header:"Action",accessor:"",defaultOrder:7}],admin_booking_report:[{header:"Booking ID",accessor:"id",idPrefix:mt.BOOKINGS,defaultOrder:0},{header:"Host ID",accessor:"host_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.HOST,defaultOrder:1},{header:"Customer ID",accessor:"customer_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.CUSTOMER,defaultOrder:2},{header:"Property ID",accessor:"property_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY,defaultOrder:3},{header:"Property Space ID",accessor:"property_space_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_SPACE,defaultOrder:4},{header:"Addon Cost",accessor:"addon_cost",isSorted:!0,isSortedDesc:!0,defaultOrder:5},{header:"Property name",accessor:"property_name",isSorted:!0,isSortedDesc:!0,defaultOrder:6},{header:"Space Category",accessor:"space_category",isSorted:!0,isSortedDesc:!0,defaultOrder:7},{header:"Hourly rate",accessor:"rate",isSorted:!0,isSortedDesc:!0,defaultOrder:8},{header:"Space Address",accessor:"address_line_1, address_line_2",joinFields:!0,isSorted:!0,isSortedDesc:!0,defaultOrder:9},{header:"Customer name",accessor:"customer_first_name, customer_last_name",joinFields:!0,isSorted:!0,isSortedDesc:!0,defaultOrder:10},{header:"Host name",accessor:"host_first_name, host_last_name",joinFields:!0,isSorted:!0,isSortedDesc:!0,defaultOrder:11},{header:"Booking date",accessor:"booking_start_time",isSorted:!0,isSortedDesc:!0,formatDate:!0,defaultOrder:12},{header:"Booking status",accessor:"status",isSorted:!0,isSortedDesc:!0,mapping:["Pending","Upcoming","Ongoing","Completed","Declined","Cancelled"],defaultOrder:13}],admin_analytics:[{header:"User ID",accessor:"user_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.CUSTOMER,defaultOrder:0},{header:"Url",accessor:"path",isSorted:!0,isSortedDesc:!0,defaultOrder:1},{header:"Country",accessor:"country",isSorted:!0,isSortedDesc:!0,isCountry:!0,defaultOrder:2},{header:"Role",accessor:"role",isSorted:!0,isSortedDesc:!0,defaultOrder:3},{header:"Date",accessor:"create_at",isSorted:!0,isSortedDesc:!0,formatDate:!0,defaultOrder:4}]};let eE=new _e,tE=new St;const B2e=()=>{var Y,U,W,V,X,ne,oe;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((Y=localStorage.getItem("admin_addon_filter"))!=null?Y:""),[N,_]=R.useState([]),C=Qe({name:ge()}),{register:E,handleSubmit:T,reset:D,formState:{errors:P}}=Oe({resolver:Xe(C),defaultValues:Ue(x)});function M(q){const te=a,G=te.findIndex(Q=>Q.accessor===q),J=te[G];J.isSortedDesc=!J.isSortedDesc,te.splice(G,1,J),r(()=>[...te]);const K=O(i,J.isSortedDesc,q);o(K)}function O(q,te,G){return(G==null?void 0:G.split(",").length)>1&&(G=G.split(",")[0]),q.sort((J,K)=>{var Q,Z,se,ce;if(te)return isNaN(J[G])?((Q=J[G])==null?void 0:Q.toLowerCase())<((Z=K[G])==null?void 0:Z.toLowerCase())?1:-1:J[G]<K[G]?1:-1;if(!te)return isNaN(J[G])?((se=J[G])==null?void 0:se.toLowerCase())<((ce=K[G])==null?void 0:ce.toLowerCase())?-1:1:J[G]<K[G]?-1:1})}function F(q){(async function(){l(q),await A(0,q)})()}function z(){(async function(){await A(w-1>0?w-1:0,c)})()}function H(){(async function(){await A(w+1<=d?w+1:0,c)})()}async function A(q,te){var J;const G=Ue(x);G.id=(J=G.id)==null?void 0:J.replace(mt.ADDON_CATEGORY,"");try{let K=["ergo_add_on.deleted_at,is"];G.id&&K.push(`ergo_add_on.id,eq,${G.id}`),G.name&&K.push(`name,cs,${G.name}`),G.space_id&&K.push(`space_id,eq,${G.space_id}`);let Q=await tE.getPaginate("add_on",{filter:K,join:["spaces|space_id"],page:q||1,size:te,order:"update_at"});const{list:Z,total:se,limit:ce,num_pages:le,page:ae}=Q,ie=O(Z,!1);o(ie),l(ce),u(le),v(ae),y(se),m(ae>1),b(ae+1<=le)}catch(K){me(e,K.message),pe(t,K.message,4e3,"ERROR")}}async function j(){try{let q=["deleted_at,is"];const te=await tE.getList("spaces",{filter:q,join:[]});Array.isArray(te.list)&&_(te.list)}catch(q){me(e,q.message),pe(t,q.message,4e3,"ERROR")}}const I=q=>{x.set("id",q.id),x.set("name",q.name),x.set("space_id",q.space_id),k(x),localStorage.setItem("admin_addons_filter",x.toString()),A(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"add_on"}}),async function(){await B(),await j(),A(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),A(w,c))},[n.deleted]);async function B(){var te;eE.setTable("settings");const q={key_name:"admin_addon_categories_column_order"};try{const G=await eE.callRestAPI({limit:1,page:1,payload:q},"PAGINATE");Array.isArray(G.list)&&G.list.length>0&&r(va((te=G.list[0].optional_data)!=null?te:[],_a.admin_addon_categories))}catch(G){me(e,G.message),pe(t,G.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:T(I),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Add-On Search"}),s(ma,{link:"/admin/add-add_on",text:"Add add-on"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-2xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...E("id"),className:` focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=P.id)!=null&&U.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(W=P.id)==null?void 0:W.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"type",children:"Name"}),s("input",{placeholder:"Name",...E("name"),className:` focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=P.name)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=P.name)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),f("select",{...E("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=P.space_id)!=null&&ne.message?"border-red-500":""}`,children:[s("option",{value:"",children:"ALL"}),N.map(q=>s("option",{value:q.id,children:q.category},q.id))]}),s("p",{className:"text-xs italic text-red-500",children:(oe=P.space_id)==null?void 0:oe.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{D({name:"",id:"",space_id:""}),localStorage.removeItem("admin_addon_filter"),Pt(x,k),A(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:F}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/addon_categories",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"addon_categories",sheet:"addon_categories",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,emailActions:!0,tableType:"Add_on",table1:"add_on",profile:!0,deleteMessage:"Are you sure you want to delete this add-on?",deleteTitle:"Confirm Delete",onSort:M,showDelete:!0,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:F,previousPage:z,nextPage:H})]})},H2e=()=>{var w,v,S,m,p,b;let e=new _e;const{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),r=Qe({name:ge().required("Name is required"),cost:dt().required().typeError("Cost must be a number"),space_id:dt().required().typeError("This field is required")}).required(),{dispatch:i}=R.useContext(Ee),o=je(),{register:c,handleSubmit:l,setError:d,formState:{errors:u}}=Oe({resolver:Xe(r)});async function g(){try{e.setTable("spaces");const x=await e.callRestAPI({},"GETALL");Array.isArray(x.list)&&a(x.list)}catch(x){me(i,x.message),pe(t,x.message,4e3,"ERROR")}}const y=async x=>{try{e.setTable("add_on");const k=await e.callRestAPI({name:x.name,cost:x.cost,space_id:x.space_id||null},"POST");if(!k.error)pe(t,"Added"),o("/admin/add_on");else if(k.validation){const N=Object.keys(k.validation);for(let _=0;_<N.length;_++){const C=N[_];d(C,{type:"manual",message:k.validation[C]})}}}catch(k){console.log("Error",k),d("name",{type:"manual",message:k.message}),me(i,k.message)}};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"add_on"}}),g()},[]),s(Sa,{title:"Add-on",backTo:"add_on",children:f("form",{className:" w-full max-w-lg",onSubmit:l(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...c("name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(w=u.name)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(v=u.name)==null?void 0:v.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),f("select",{...c("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(S=u.space_id)!=null&&S.message?"border-red-500":""}`,children:[s("option",{value:"",children:"NONE"}),n.map(x=>s("option",{value:x.id,children:x.category},x.id))]}),s("p",{className:"text-xs italic text-red-500",children:(m=u.space_id)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"cost",children:"Cost"}),s("input",{type:"number",placeholder:"cost",...c("cost"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(p=u.cost)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(b=u.cost)==null?void 0:b.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>o("/admin/add_on"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let gd=new _e;const U2e=()=>{var m,p,b,x,k,N;const[e,t]=R.useState([]),{dispatch:n}=R.useContext(Ee),a=Qe({name:ge().required("Name is required"),cost:dt().required().typeError("Cost must be a number"),space_id:dt().nullable()}).required(),{dispatch:r}=R.useContext(we),i=je(),[o,c]=h.exports.useState(0),{register:l,handleSubmit:d,setError:u,setValue:g,formState:{errors:y}}=Oe({resolver:Xe(a)}),w=Mt();h.exports.useEffect(function(){(async function(){try{gd.setTable("add_on");const _=await gd.callRestAPI({id:Number(w==null?void 0:w.id)},"GET");_.error||(g("name",_.model.name),g("cost",_.model.cost),g("space_id",_.model.space_id),c(_.model.id))}catch(_){console.log("error",_),me(n,_.message)}})()},[]);async function v(){try{gd.setTable("spaces");const _=await gd.callRestAPI({},"GETALL");Array.isArray(_.list)&&t(_.list)}catch(_){me(n,_.message),pe(r,_.message,4e3,"ERROR")}}const S=async _=>{gd.setTable("add_on");try{const C=await gd.callRestAPI({id:o,name:_.name,cost:_.cost,space_id:_.space_id},"PUT");if(!C.error)pe(r,"Updated"),i("/admin/add_on");else if(C.validation){const E=Object.keys(C.validation);for(let T=0;T<E.length;T++){const D=E[T];u(D,{type:"manual",message:C.validation[D]})}}}catch(C){console.log("Error",C),u("name",{type:"manual",message:C.message})}};return R.useEffect(()=>{r({type:"SETPATH",payload:{path:"add_on"}}),v()},[]),s(Ja,{title:"Add-on",backTo:"add_on",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:d(S),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...l("name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(m=y.name)!=null&&m.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(p=y.name)==null?void 0:p.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),s("select",{...l("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=y.space_id)!=null&&b.message?"border-red-500":""}`,children:e.map(_=>s("option",{value:_.id,children:_.category},_.id))}),s("p",{className:"text-xs italic text-red-500",children:(x=y.space_id)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"cost",children:"Cost"}),s("input",{type:"number",placeholder:"cost",...l("cost"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(k=y.cost)!=null&&k.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(N=y.cost)==null?void 0:N.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>i("/admin/add_on"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};function c5({modalOpen:e,modalImage:t,closeModal:n}){return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:s(De.Panel,{as:"img",className:"w-full full-circle object-cover max-w-sm transform overflow-hidden align-middle shadow-xl transition-all",src:t||"/default.png"})})})})]})})})}function d5({modalOpen:e,data:t,closeModal:n,onSuccess:a,noSettings:r}){const{dispatch:i}=h.exports.useContext(Ee),{dispatch:o}=h.exports.useContext(we),[c,l]=h.exports.useState(!1);async function d(u){var v;l(!0);const g=new _e;u.preventDefault();const w=new FormData(u.target).get("reason");g.setTable("user");try{await g.callRestAPI({id:t.id,is_photo_approved:rn.NOT_APPROVED},"PUT");let S=t.settings;if(r&&(S=(await _t("get-user","post",{id:t.id},"")).settings),on(S,{}).email_on_profile_photo_declined==!0){const m=await g.getEmailTemplate("profile-image-decline"),p=(v=m.html)==null?void 0:v.replace(new RegExp("{{{reason}}}","g"),w);await g.sendEmail(t.email,m.subject,p),pe(o,"Email sent to user")}else pe(o,"Successful");a(),u.target.reset()}catch(S){me(i,S.message),pe(o,S.message,4e3,"ERROR")}n(),l(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:d,children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900 mb-8",children:"Decline Reason"}),s("textarea",{name:"reason",cols:"30",rows:"5",className:"w-full focus:outline-none border-2 p-2 resize-none text-sm text-gray-900"}),f("div",{className:"mt-4 flex gap-4 justify-end",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border border-black px-4 py-2 text-sm font-medium",onClick:n,children:"Cancel"}),s("button",{type:"submit",disabled:c,className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] text-white inline-flex justify-center rounded-md px-4 py-2 text-sm font-medium",children:"Reject"})]})]})})})})]})})})}function V2e({modalOpen:e,preferences:t,closeModal:n}){function a(r){return r.replace(/^_*(.)|_+(.)/g,(i,o,c)=>o?o.toUpperCase():" "+c.toUpperCase())}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:s(De.Panel,{as:"div",className:"w-full max-w-lg transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:s("ul",{children:Object.entries(on(t,{})).map(([r,i],o)=>f("li",{children:[a(r),": ",i?"YES":"NO"]},o))})})})})})]})})})}let rm=new _e;const W2e=()=>{var Q,Z,se,ce,le,ae;const{dispatch:e,state:t}=R.useContext(we),{dispatch:n}=R.useContext(Ee),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt(),[N]=lt((Q=localStorage.getItem("admin_user_filter"))!=null?Q:""),[_,C]=R.useState(""),[E,T]=R.useState(!1),[D,P]=R.useState({}),[M,O]=R.useState({}),[F,z]=R.useState(!1),H=je(),A=Qe({id:ge(),email:ge(),role:ge(),dob:ge().test("is-not-in-future","Not a valid date",ie=>ie==""?!0:new Date(ie)<new Date),status:ge(),first_name:ge(),last_name:ge()}),{reset:j,register:I,handleSubmit:B,formState:{errors:Y}}=Oe({resolver:Xe(A),defaultValues:(()=>{let ie=Ue(x);return Object.keys(ie).length>0?ie:Ue(N)})()}),U=["Superadmin","Admin","Host","Customer"];function W(ie){(async function(){l(ie),await q(0,ie)})()}function V(){(async function(){await q(w-1>0?w-1:0,c)})()}function X(){(async function(){await q(w+1<=d?w+1:0,c)})()}function ne(ie){const de=a,fe=de.findIndex(ve=>ve.accessor===ie),be=de[fe];be.isSortedDesc=!be.isSortedDesc,de.splice(fe,1,be),r(()=>[...de]);const he=oe(i,be.isSortedDesc,ie);o(he)}function oe(ie,de,fe){return(fe==null?void 0:fe.split(",").length)>1&&(fe=fe.split(",")[0]),ie.sort((be,he)=>{var ve,Ce,nt,Ae;if(de)return isNaN(be[fe])?((ve=be[fe])==null?void 0:ve.toLowerCase())<((Ce=he[fe])==null?void 0:Ce.toLowerCase())?1:-1:be[fe]<he[fe]?1:-1;if(!de)return isNaN(be[fe])?((nt=be[fe])==null?void 0:nt.toLowerCase())<((Ae=he[fe])==null?void 0:Ae.toLowerCase())?-1:1:be[fe]<he[fe]?-1:1})}async function q(ie,de){var be,he,ve;let fe=Ue(x);fe=Object.keys(fe).length<1?Ue(N):fe,fe.id=(be=fe.id)==null?void 0:be.replace(mt.USER,""),fe.id=(he=fe.id)==null?void 0:he.replace(mt.CUSTOMER,""),fe.id=(ve=fe.id)==null?void 0:ve.replace(mt.HOST,"");try{const Ce=await rm.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{page:ie,limit:de,where:[fe?`${fe.id?`ergo_user.id = ${fe.id}`:"1"} AND ${fe.first_name?`ergo_user.first_name LIKE '%${fe.first_name}%'`:"1"} AND ${fe.last_name?`ergo_user.last_name LIKE '%${fe.last_name}%'`:"1"} AND ${fe.dob?`ergo_profile.dob = '${fe.dob}'`:"1"} AND ${fe.role?`ergo_user.role = '${fe.role}'`:"1"} AND ${fe.email?`ergo_user.email LIKE '%${fe.email}%'`:"1"} AND ergo_user.deleted_at IS NULL`:"1"],sortId:"create_at",direction:"DESC"},"POST"),{list:nt,total:Ae,limit:Je,num_pages:ze,page:We}=Ce,bt=oe(nt,!1);o(bt),l(Je),u(ze),v(We),y(Ae),m(We>1),b(We+1<=ze)}catch(Ce){me(n,Ce.message),pe(e,Ce.message,4e3,"ERROR")}}const te=ie=>{x.set("email",ie.email),x.set("first_name",ie.first_name),x.set("last_name",ie.last_name),x.set("role",ie.role),x.set("dob",ie.dob),x.set("id",ie.id),k(x),localStorage.setItem("admin_user_filter",x.toString()),q(w,c)};R.useEffect(()=>{e({type:"SETPATH",payload:{path:"user"}}),async function(){await G(),await q(1,c)}()},[]),R.useEffect(()=>{t.deleted&&(e({type:"DELETED",payload:{deleted:!1}}),q(w,c))},[t.deleted]);async function G(){var de;rm.setTable("settings");const ie={key_name:"admin_user_column_order"};try{const fe=await rm.callRestAPI({limit:1,page:1,payload:ie},"PAGINATE");Array.isArray(fe.list)&&fe.list.length>0&&r(va((de=fe.list[0].optional_data)!=null?de:[],_a.admin_user))}catch(fe){me(n,fe.message),pe(e,fe.message,4e3,"ERROR")}}async function J(ie){rm.setTable("user");try{await rm.callRestAPI({id:ie,is_photo_approved:rn.APPROVED},"PUT"),pe(e,"Successful"),await q(1,c)}catch(de){me(n,de.message),pe(e,de.message,4e3,"ERROR")}}R.useEffect(()=>{let ie;return F||(ie=setTimeout(()=>{O({})},200)),()=>clearTimeout(ie)},[F]);const K=ie=>{switch(ie.is_photo_approved){case rn.IN_REVIEW:return f(Se,{children:[s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>P(ie),children:"Reject Photo"}),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>J(ie.id),children:"Approve Photo"})]});case rn.APPROVED:return s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>P(ie),children:"Reject Photo"});case rn.NOT_APPROVED:return s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>J(ie.id),children:"Approve Photo"});default:return""}};return f(Se,{children:[f("form",{id:"searchForm",className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:B(te),children:[f("div",{className:"flex w-full justify-between ",children:[s("h4",{className:"text-2xl font-bold",children:"Users"}),s(ma,{link:"/admin/add-user/",text:"Add New user"})]}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"ID"}),s("input",{type:"text",...I("id"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(Z=Y.id)==null?void 0:Z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"First Name"}),s("input",{type:"text",...I("first_name"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(se=Y.first_name)==null?void 0:se.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Last Name"}),s("input",{type:"text",...I("last_name"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(ce=Y.last_name)==null?void 0:ce.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Email"}),s("input",{type:"text",...I("email"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(le=Y.email)==null?void 0:le.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Date Of Birth"}),s("input",{type:"date",placeholder:"Date of Birth",...I("dob"),className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(ae=Y.dob)==null?void 0:ae.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),f("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...I("role"),children:[s("option",{value:"",children:"All"}),U.map(ie=>s("option",{name:"role",value:ie.toLowerCase(),defaultValue:"Select Role",children:ie},ie))]}),s("p",{className:"text-xs italic text-red-500"})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{j({email:"",role:"",dob:"",first_name:"",last_name:"",id:""}),localStorage.removeItem("admin_user_filter"),Pt(x,k),Pt(N,k),q(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:W}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/user",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"users",sheet:"users",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-t-0 border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:a.map((ie,de)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>ne(ie.accessor),children:[ie.header,ie.isSorted,s("span",{children:ie.isSorted?ie.isSortedDesc?" \u25BC":" \u25B2":""})]},de))})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:i.map((ie,de)=>s("tr",{className:"py-2 text-sm",children:a.map((fe,be)=>{var he,ve;return fe.accessor===""?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{C(ie.photo),T(!0)},children:"View Picture"}),K(ie),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{H(`/admin/view-user/${ie.id}`,{state:ie})},children:"View Profile"})]},be):fe.statusMapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:`${ie[fe.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full border border-[#EAECF0] bg-[#F9FAFB] py-[2px] px-[10px]`,children:[" ",fe.statusMapping[ie[fe.accessor]]]})},be):fe.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:(ve=(he=fe.mapping[ie[fe.accessor]])!=null?he:fe.default)!=null?ve:"N/A"},be):fe.accessor=="dob"?s("td",{className:"whitespace-nowrap px-6 py-4",children:ie[fe.accessor]?Te(ie[fe.accessor]).format("DD/MM/YYYY"):""},be):fe.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:fe.idPrefix+ie[fe.accessor]},be):fe.accessor=="settings"?s("td",{className:"whitespace-nowrap px-6 py-4",children:s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text font-bold text-transparent",onClick:()=>{O(on(ie.settings,{})),z(!0)},children:"Email Preferences"})},be):s("td",{className:"whitespace-nowrap px-6 py-4",children:ie[fe.accessor]},be)})},de))})]})})}),s(vn,{currentPage:w,totalNumber:g,pageCount:d,pageSize:c,canPreviousPage:S,canNextPage:p,updatePageSize:W,previousPage:V,nextPage:X}),s(c5,{modalOpen:E,modalImage:_,closeModal:()=>T(!1)}),s(d5,{modalOpen:D.id!=null,closeModal:()=>P({}),data:D,onSuccess:()=>q(w,c)}),s(V2e,{modalOpen:F,closeModal:()=>z(!1),preferences:M})]})};var fh=["password","123456","12345678","1234","qwerty","12345","dragon","pussy","baseball","football","letmein","monkey","696969","abc123","mustang","michael","shadow","master","jennifer","111111","2000","jordan","superman","harley","1234567","fuckme","hunter","fuckyou","trustno1","ranger","buster","thomas","tigger","robert","soccer","fuck","batman","test","pass","killer","hockey","george","charlie","andrew","michelle","love","sunshine","jessica","asshole","6969","pepper","daniel","access","123456789","654321","joshua","maggie","starwars","silver","william","dallas","yankees","123123","ashley","666666","hello","amanda","orange","biteme","freedom","computer","sexy","thunder","nicole","ginger","heather","hammer","summer","corvette","taylor","fucker","austin","1111","merlin","matthew","121212","golfer","cheese","princess","martin","chelsea","patrick","richard","diamond","yellow","bigdog","secret","asdfgh","sparky","cowboy","camaro","anthony","matrix","falcon","iloveyou","bailey","guitar","jackson","purple","scooter","phoenix","aaaaaa","morgan","tigers","porsche","mickey","maverick","cookie","nascar","peanut","justin","131313","money","horny","samantha","panties","steelers","joseph","snoopy","boomer","whatever","iceman","smokey","gateway","dakota","cowboys","eagles","chicken","dick","black","zxcvbn","please","andrea","ferrari","knight","hardcore","melissa","compaq","coffee","booboo","bitch","johnny","bulldog","xxxxxx","welcome","james","player","ncc1701","wizard","scooby","charles","junior","internet","bigdick","mike","brandy","tennis","blowjob","banana","monster","spider","lakers","miller","rabbit","enter","mercedes","brandon","steven","fender","john","yamaha","diablo","chris","boston","tiger","marine","chicago","rangers","gandalf","winter","bigtits","barney","edward","raiders","porn","badboy","blowme","spanky","bigdaddy","johnson","chester","london","midnight","blue","fishing","000000","hannah","slayer","11111111","rachel","sexsex","redsox","thx1138","asdf","marlboro","panther","zxcvbnm","arsenal","oliver","qazwsx","mother","victoria","7777777","jasper","angel","david","winner","crystal","golden","butthead","viking","jack","iwantu","shannon","murphy","angels","prince","cameron","girls","madison","wilson","carlos","hooters","willie","startrek","captain","maddog","jasmine","butter","booger","angela","golf","lauren","rocket","tiffany","theman","dennis","liverpoo","flower","forever","green","jackie","muffin","turtle","sophie","danielle","redskins","toyota","jason","sierra","winston","debbie","giants","packers","newyork","jeremy","casper","bubba","112233","sandra","lovers","mountain","united","cooper","driver","tucker","helpme","fucking","pookie","lucky","maxwell","8675309","bear","suckit","gators","5150","222222","shithead","fuckoff","jaguar","monica","fred","happy","hotdog","tits","gemini","lover","xxxxxxxx","777777","canada","nathan","victor","florida","88888888","nicholas","rosebud","metallic","doctor","trouble","success","stupid","tomcat","warrior","peaches","apples","fish","qwertyui","magic","buddy","dolphins","rainbow","gunner","987654","freddy","alexis","braves","cock","2112","1212","cocacola","xavier","dolphin","testing","bond007","member","calvin","voodoo","7777","samson","alex","apollo","fire","tester","walter","beavis","voyager","peter","porno","bonnie","rush2112","beer","apple","scorpio","jonathan","skippy","sydney","scott","red123","power","gordon","travis","beaver","star","jackass","flyers","boobs","232323","zzzzzz","steve","rebecca","scorpion","doggie","legend","ou812","yankee","blazer","bill","runner","birdie","bitches","555555","parker","topgun","asdfasdf","heaven","viper","animal","2222","bigboy","4444","arthur","baby","private","godzilla","donald","williams","lifehack","phantom","dave","rock","august","sammy","cool","brian","platinum","jake","bronco","paul","mark","frank","heka6w2","copper","billy","cumshot","garfield","willow","cunt","little","carter","slut","albert","69696969","kitten","super","jordan23","eagle1","shelby","america","11111","jessie","house","free","123321","chevy","bullshit","white","broncos","horney","surfer","nissan","999999","saturn","airborne","elephant","marvin","shit","action","adidas","qwert","kevin","1313","explorer","walker","police","christin","december","benjamin","wolf","sweet","therock","king","online","dickhead","brooklyn","teresa","cricket","sharon","dexter","racing","penis","gregory","0000","teens","redwings","dreams","michigan","hentai","magnum","87654321","nothing","donkey","trinity","digital","333333","stella","cartman","guinness","123abc","speedy","buffalo","kitty","pimpin","eagle","einstein","kelly","nelson","nirvana","vampire","xxxx","playboy","louise","pumpkin","snowball","test123","girl","sucker","mexico","beatles","fantasy","ford","gibson","celtic","marcus","cherry","cassie","888888","natasha","sniper","chance","genesis","hotrod","reddog","alexande","college","jester","passw0rd","bigcock","smith","lasvegas","carmen","slipknot","3333","death","kimberly","1q2w3e","eclipse","1q2w3e4r","stanley","samuel","drummer","homer","montana","music","aaaa","spencer","jimmy","carolina","colorado","creative","hello1","rocky","goober","friday","bollocks","scotty","abcdef","bubbles","hawaii","fluffy","mine","stephen","horses","thumper","5555","pussies","darkness","asdfghjk","pamela","boobies","buddha","vanessa","sandman","naughty","douglas","honda","matt","azerty","6666","shorty","money1","beach","loveme","4321","simple","poohbear","444444","badass","destiny","sarah","denise","vikings","lizard","melanie","assman","sabrina","nintendo","water","good","howard","time","123qwe","november","xxxxx","october","leather","bastard","young","101010","extreme","hard","password1","vincent","pussy1","lacrosse","hotmail","spooky","amateur","alaska","badger","paradise","maryjane","poop","crazy","mozart","video","russell","vagina","spitfire","anderson","norman","eric","cherokee","cougar","barbara","long","420420","family","horse","enigma","allison","raider","brazil","blonde","jones","55555","dude","drowssap","jeff","school","marshall","lovely","1qaz2wsx","jeffrey","caroline","franklin","booty","molly","snickers","leslie","nipples","courtney","diesel","rocks","eminem","westside","suzuki","daddy","passion","hummer","ladies","zachary","frankie","elvis","reggie","alpha","suckme","simpson","patricia","147147","pirate","tommy","semperfi","jupiter","redrum","freeuser","wanker","stinky","ducati","paris","natalie","babygirl","bishop","windows","spirit","pantera","monday","patches","brutus","houston","smooth","penguin","marley","forest","cream","212121","flash","maximus","nipple","bobby","bradley","vision","pokemon","champion","fireman","indian","softball","picard","system","clinton","cobra","enjoy","lucky1","claire","claudia","boogie","timothy","marines","security","dirty","admin","wildcats","pimp","dancer","hardon","veronica","fucked","abcd1234","abcdefg","ironman","wolverin","remember","great","freepass","bigred","squirt","justice","francis","hobbes","kermit","pearljam","mercury","domino","9999","denver","brooke","rascal","hitman","mistress","simon","tony","bbbbbb","friend","peekaboo","naked","budlight","electric","sluts","stargate","saints","bondage","brittany","bigman","zombie","swimming","duke","qwerty1","babes","scotland","disney","rooster","brenda","mookie","swordfis","candy","duncan","olivia","hunting","blink182","alicia","8888","samsung","bubba1","whore","virginia","general","passport","aaaaaaaa","erotic","liberty","arizona","jesus","abcd","newport","skipper","rolltide","balls","happy1","galore","christ","weasel","242424","wombat","digger","classic","bulldogs","poopoo","accord","popcorn","turkey","jenny","amber","bunny","mouse","007007","titanic","liverpool","dreamer","everton","friends","chevelle","carrie","gabriel","psycho","nemesis","burton","pontiac","connor","eatme","lickme","roland","cumming","mitchell","ireland","lincoln","arnold","spiderma","patriots","goblue","devils","eugene","empire","asdfg","cardinal","brown","shaggy","froggy","qwer","kawasaki","kodiak","people","phpbb","light","54321","kramer","chopper","hooker","honey","whynot","lesbian","lisa","baxter","adam","snake","teen","ncc1701d","qqqqqq","airplane","britney","avalon","sandy","sugar","sublime","stewart","wildcat","raven","scarface","elizabet","123654","trucks","wolfpack","pervert","lawrence","raymond","redhead","american","alyssa","bambam","movie","woody","shaved","snowman","tiger1","chicks","raptor","1969","stingray","shooter","france","stars","madmax","kristen","sports","jerry","789456","garcia","simpsons","lights","ryan","looking","chronic","alison","hahaha","packard","hendrix","perfect","service","spring","srinivas","spike","katie","252525","oscar","brother","bigmac","suck","single","cannon","georgia","popeye","tattoo","texas","party","bullet","taurus","sailor","wolves","panthers","japan","strike","flowers","pussycat","chris1","loverboy","berlin","sticky","marina","tarheels","fisher","russia","connie","wolfgang","testtest","mature","bass","catch22","juice","michael1","nigger","159753","women","alpha1","trooper","hawkeye","head","freaky","dodgers","pakistan","machine","pyramid","vegeta","katana","moose","tinker","coyote","infinity","inside","pepsi","letmein1","bang","control","hercules","morris","james1","tickle","outlaw","browns","billybob","pickle","test1","michele","antonio","sucks","pavilion","changeme","caesar","prelude","tanner","adrian","darkside","bowling","wutang","sunset","robbie","alabama","danger","zeppelin","juan","rusty","pppppp","nick","2001","ping","darkstar","madonna","qwe123","bigone","casino","cheryl","charlie1","mmmmmm","integra","wrangler","apache","tweety","qwerty12","bobafett","simone","none","business","sterling","trevor","transam","dustin","harvey","england","2323","seattle","ssssss","rose","harry","openup","pandora","pussys","trucker","wallace","indigo","storm","malibu","weed","review","babydoll","doggy","dilbert","pegasus","joker","catfish","flipper","valerie","herman","fuckit","detroit","kenneth","cheyenne","bruins","stacey","smoke","joey","seven","marino","fetish","xfiles","wonder","stinger","pizza","babe","pretty","stealth","manutd","gracie","gundam","cessna","longhorn","presario","mnbvcxz","wicked","mustang1","victory","21122112","shelly","awesome","athena","q1w2e3r4","help","holiday","knicks","street","redneck","12341234","casey","gizmo","scully","dragon1","devildog","triumph","eddie","bluebird","shotgun","peewee","ronnie","angel1","daisy","special","metallica","madman","country","impala","lennon","roscoe","omega","access14","enterpri","miranda","search","smitty","blizzard","unicorn","tight","rick","ronald","asdf1234","harrison","trigger","truck","danny","home","winnie","beauty","thailand","1234567890","cadillac","castle","tyler","bobcat","buddy1","sunny","stones","asian","freddie","chuck","butt","loveyou","norton","hellfire","hotsex","indiana","short","panzer","lonewolf","trumpet","colors","blaster","12121212","fireball","logan","precious","aaron","elaine","jungle","atlanta","gold","corona","curtis","nikki","polaris","timber","theone","baller","chipper","orlando","island","skyline","dragons","dogs","benson","licker","goldie","engineer","kong","pencil","basketba","open","hornet","world","linda","barbie","chan","farmer","valentin","wetpussy","indians","larry","redman","foobar","travel","morpheus","bernie","target","141414","hotstuff","photos","laura","savage","holly","rocky1","fuck_inside","dollar","turbo","design","newton","hottie","moon","202020","blondes","4128","lestat","avatar","future","goforit","random","abgrtyu","jjjjjj","cancer","q1w2e3","smiley","goldberg","express","virgin","zipper","wrinkle1","stone","andy","babylon","dong","powers","consumer","dudley","monkey1","serenity","samurai","99999999","bigboobs","skeeter","lindsay","joejoe","master1","aaaaa","chocolat","christia","birthday","stephani","tang","1234qwer","alfred","ball","98765432","maria","sexual","maxima","77777777","sampson","buckeye","highland","kristin","seminole","reaper","bassman","nugget","lucifer","airforce","nasty","watson","warlock","2121","philip","always","dodge","chrissy","burger","bird","snatch","missy","pink","gang","maddie","holmes","huskers","piglet","photo","joanne","hamilton","dodger","paladin","christy","chubby","buckeyes","hamlet","abcdefgh","bigfoot","sunday","manson","goldfish","garden","deftones","icecream","blondie","spartan","julie","harold","charger","brandi","stormy","sherry","pleasure","juventus","rodney","galaxy","holland","escort","zxcvb","planet","jerome","wesley","blues","song","peace","david1","ncc1701e","1966","51505150","cavalier","gambit","karen","sidney","ripper","oicu812","jamie","sister","marie","martha","nylons","aardvark","nadine","minnie","whiskey","bing","plastic","anal","babylon5","chang","savannah","loser","racecar","insane","yankees1","mememe","hansolo","chiefs","fredfred","freak","frog","salmon","concrete","yvonne","zxcv","shamrock","atlantis","warren","wordpass","julian","mariah","rommel","1010","harris","predator","sylvia","massive","cats","sammy1","mister","stud","marathon","rubber","ding","trunks","desire","montreal","justme","faster","kathleen","irish","1999","bertha","jessica1","alpine","sammie","diamonds","tristan","00000","swinger","shan","stallion","pitbull","letmein2","roberto","ready","april","palmer","ming","shadow1","audrey","chong","clitoris","wang","shirley","fuckers","jackoff","bluesky","sundance","renegade","hollywoo","151515","bernard","wolfman","soldier","picture","pierre","ling","goddess","manager","nikita","sweety","titans","hang","fang","ficken","niners","bottom","bubble","hello123","ibanez","webster","sweetpea","stocking","323232","tornado","lindsey","content","bruce","buck","aragorn","griffin","chen","campbell","trojan","christop","newman","wayne","tina","rockstar","father","geronimo","pascal","crimson","brooks","hector","penny","anna","google","camera","chandler","fatcat","lovelove","cody","cunts","waters","stimpy","finger","cindy","wheels","viper1","latin","robin","greenday","987654321","creampie","brendan","hiphop","willy","snapper","funtime","duck","trombone","adult","cotton","cookies","kaiser","mulder","westham","latino","jeep","ravens","aurora","drizzt","madness","energy","kinky","314159","sophia","stefan","slick","rocker","55555555","freeman","french","mongoose","speed","dddddd","hong","henry","hungry","yang","catdog","cheng","ghost","gogogo","randy","tottenha","curious","butterfl","mission","january","singer","sherman","shark","techno","lancer","lalala","autumn","chichi","orion","trixie","clifford","delta","bobbob","bomber","holden","kang","kiss","1968","spunky","liquid","mary","beagle","granny","network","bond","kkkkkk","millie","1973","biggie","beetle","teacher","susan","toronto","anakin","genius","dream","cocks","dang","bush","karate","snakes","bangkok","callie","fuckyou2","pacific","daytona","kelsey","infantry","skywalke","foster","felix","sailing","raistlin","vanhalen","huang","herbert","jacob","blackie","tarzan","strider","sherlock","lang","gong","sang","dietcoke","ultimate","tree","shai","sprite","ting","artist","chai","chao","devil","python","ninja","misty","ytrewq","sweetie","superfly","456789","tian","jing","jesus1","freedom1","dian","drpepper","potter","chou","darren","hobbit","violet","yong","shen","phillip","maurice","gloria","nolimit","mylove","biscuit","yahoo","shasta","sex4me","smoker","smile","pebbles","pics","philly","tong","tintin","lesbians","marlin","cactus","frank1","tttttt","chun","danni","emerald","showme","pirates","lian","dogg","colleen","xiao","xian","tazman","tanker","patton","toshiba","richie","alberto","gotcha","graham","dillon","rang","emily","keng","jazz","bigguy","yuan","woman","tomtom","marion","greg","chaos","fossil","flight","racerx","tuan","creamy","boss","bobo","musicman","warcraft","window","blade","shuang","sheila","shun","lick","jian","microsoft","rong","allen","feng","getsome","sally","quality","kennedy","morrison","1977","beng","wwwwww","yoyoyo","zhang","seng","teddy","joanna","andreas","harder","luke","qazxsw","qian","cong","chuan","deng","nang","boeing","keeper","western","isabelle","1963","subaru","sheng","thuglife","teng","jiong","miao","martina","mang","maniac","pussie","tracey","a1b2c3","clayton","zhou","zhuang","xing","stonecol","snow","spyder","liang","jiang","memphis","regina","ceng","magic1","logitech","chuang","dark","million","blow","sesame","shao","poison","titty","terry","kuan","kuai","kyle","mian","guan","hamster","guai","ferret","florence","geng","duan","pang","maiden","quan","velvet","nong","neng","nookie","buttons","bian","bingo","biao","zhong","zeng","xiong","zhun","ying","zong","xuan","zang","0.0.000","suan","shei","shui","sharks","shang","shua","small","peng","pian","piao","liao","meng","miami","reng","guang","cang","change","ruan","diao","luan","lucas","qing","chui","chuo","cuan","nuan","ning","heng","huan","kansas","muscle","monroe","weng","whitney","1passwor","bluemoon","zhui","zhua","xiang","zheng","zhen","zhei","zhao","zhan","yomama","zhai","zhuo","zuan","tarheel","shou","shuo","tiao","lady","leonard","leng","kuang","jiao","13579","basket","qiao","qiong","qiang","chuai","nian","niao","niang","huai","22222222","bianca","zhuan","zhuai","shuan","shuai","stardust","jumper","margaret","archie","66666666","charlott","forget","qwertz","bones","history","milton","waterloo","2002","stuff","11223344","office","oldman","preston","trains","murray","vertigo","246810","black1","swallow","smiles","standard","alexandr","parrot","luther","user","nicolas","1976","surfing","pioneer","pete","masters","apple1","asdasd","auburn","hannibal","frontier","panama","lucy","buffy","brianna","welcome1","vette","blue22","shemale","111222","baggins","groovy","global","turner","181818","1979","blades","spanking","life","byteme","lobster","collins","dawg","hilton","japanese","1970","1964","2424","polo","markus","coco","deedee","mikey","1972","171717","1701","strip","jersey","green1","capital","sasha","sadie","putter","vader","seven7","lester","marcel","banshee","grendel","gilbert","dicks","dead","hidden","iloveu","1980","sound","ledzep","michel","147258","female","bugger","buffett","bryan","hell","kristina","molson","2020","wookie","sprint","thanks","jericho","102030","grace","fuckin","mandy","ranger1","trebor","deepthroat","bonehead","molly1","mirage","models","1984","2468","stuart","showtime","squirrel","pentium","mario","anime","gator","powder","twister","connect","neptune","bruno","butts","engine","eatshit","mustangs","woody1","shogun","septembe","pooh","jimbo","roger","annie","bacon","center","russian","sabine","damien","mollie","voyeur","2525","363636","leonardo","camel","chair","germany","giant","qqqq","nudist","bone","sleepy","tequila","megan","fighter","garrett","dominic","obiwan","makaveli","vacation","walnut","1974","ladybug","cantona","ccbill","satan","rusty1","passwor1","columbia","napoleon","dusty","kissme","motorola","william1","1967","zzzz","skater","smut","play","matthew1","robinson","valley","coolio","dagger","boner","bull","horndog","jason1","blake","penguins","rescue","griffey","8j4ye3uz","californ","champs","qwertyuiop","portland","queen","colt45","boat","xxxxxxx","xanadu","tacoma","mason","carpet","gggggg","safety","palace","italia","stevie","picturs","picasso","thongs","tempest","ricardo","roberts","asd123","hairy","foxtrot","gary","nimrod","hotboy","343434","1111111","asdfghjkl","goose","overlord","blood","wood","stranger","454545","shaolin","sooners","socrates","spiderman","peanuts","maxine","rogers","13131313","andrew1","filthy","donnie","ohyeah","africa","national","kenny","keith","monique","intrepid","jasmin","pickles","assass","fright","potato","darwin","hhhhhh","kingdom","weezer","424242","pepsi1","throat","romeo","gerard","looker","puppy","butch","monika","suzanne","sweets","temple","laurie","josh","megadeth","analsex","nymets","ddddddd","bigballs","support","stick","today","down","oakland","oooooo","qweasd","chucky","bridge","carrot","chargers","discover","dookie","condor","night","butler","hoover","horny1","isabella","sunrise","sinner","jojo","megapass","martini","assfuck","grateful","ffffff","abigail","esther","mushroom","janice","jamaica","wright","sims","space","there","timmy","7654321","77777","cccccc","gizmodo","roxanne","ralph","tractor","cristina","dance","mypass","hongkong","helena","1975","blue123","pissing","thomas1","redred","rich","basketball","attack","cash","satan666","drunk","dixie","dublin","bollox","kingkong","katrina","miles","1971","22222","272727","sexx","penelope","thompson","anything","bbbb","battle","grizzly","passat","porter","tracy","defiant","bowler","knickers","monitor","wisdom","wild","slappy","thor","letsgo","robert1","feet","rush","brownie","hudson","098765","playing","playtime","lightnin","melvin","atomic","bart","hawk","goku","glory","llllll","qwaszx","cosmos","bosco","knights","bentley","beast","slapshot","lewis","assword","frosty","gillian","sara","dumbass","mallard","dddd","deanna","elwood","wally","159357","titleist","angelo","aussie","guest","golfing","doobie","loveit","chloe","elliott","werewolf","vipers","janine","1965","blabla","surf","sucking","tardis","serena","shelley","thegame","legion","rebels","fernando","fast","gerald","sarah1","double","onelove","loulou","toto","crash","blackcat","0007","tacobell","soccer1","jedi","manuel","method","river","chase","ludwig","poopie","derrick","boob","breast","kittycat","isabel","belly","pikachu","thunder1","thankyou","jose","celeste","celtics","frances","frogger","scoobydo","sabbath","coltrane","budman","willis","jackal","bigger","zzzzz","silvia","sooner","licking","gopher","geheim","lonestar","primus","pooper","newpass","brasil","heather1","husker","element","moomoo","beefcake","zzzzzzzz","tammy","shitty","smokin","personal","jjjj","anthony1","anubis","backup","gorilla","fuckface","painter","lowrider","punkrock","traffic","claude","daniela","dale","delta1","nancy","boys","easy","kissing","kelley","wendy","theresa","amazon","alan","fatass","dodgeram","dingdong","malcolm","qqqqqqqq","breasts","boots","honda1","spidey","poker","temp","johnjohn","miguel","147852","archer","asshole1","dogdog","tricky","crusader","weather","syracuse","spankme","speaker","meridian","amadeus","back","harley1","falcons","dorothy","turkey50","kenwood","keyboard","ilovesex","1978","blackman","shazam","shalom","lickit","jimbob","richmond","roller","carson","check","fatman","funny","garbage","sandiego","loving","magnus","cooldude","clover","mobile","bell","payton","plumber","texas1","tool","topper","jenna","mariners","rebel","harmony","caliente","celica","fletcher","german","diana","oxford","osiris","orgasm","punkin","porsche9","tuesday","close","breeze","bossman","kangaroo","billie","latinas","judith","astros","scruffy","donna","qwertyu","davis","hearts","kathy","jammer","java","springer","rhonda","ricky","1122","goodtime","chelsea1","freckles","flyboy","doodle","city","nebraska","bootie","kicker","webmaster","vulcan","iverson","191919","blueeyes","stoner","321321","farside","rugby","director","pussy69","power1","bobbie","hershey","hermes","monopoly","west","birdman","blessed","blackjac","southern","peterpan","thumbs","lawyer","melinda","fingers","fuckyou1","rrrrrr","a1b2c3d4","coke","nicola","bohica","heart","elvis1","kids","blacky","stories","sentinel","snake1","phoebe","jesse","richard1","1234abcd","guardian","candyman","fisting","scarlet","dildo","pancho","mandingo","lucky7","condom","munchkin","billyboy","summer1","student","sword","skiing","sergio","site","sony","thong","rootbeer","assassin","cassidy","frederic","fffff","fitness","giovanni","scarlett","durango","postal","achilles","dawn","dylan","kisses","warriors","imagine","plymouth","topdog","asterix","hallo","cameltoe","fuckfuck","bridget","eeeeee","mouth","weird","will","sithlord","sommer","toby","theking","juliet","avenger","backdoor","goodbye","chevrole","faith","lorraine","trance","cosworth","brad","houses","homers","eternity","kingpin","verbatim","incubus","1961","blond","zaphod","shiloh","spurs","station","jennie","maynard","mighty","aliens","hank","charly","running","dogman","omega1","printer","aggies","chocolate","deadhead","hope","javier","bitch1","stone55","pineappl","thekid","lizzie","rockets","ashton","camels","formula","forrest","rosemary","oracle","rain","pussey","porkchop","abcde","clancy","nellie","mystic","inferno","blackdog","steve1","pauline","alexander","alice","alfa","grumpy","flames","scream","lonely","puffy","proxy","valhalla","unreal","cynthia","herbie","engage","yyyyyy","010101","solomon","pistol","melody","celeb","flying","gggg","santiago","scottie","oakley","portugal","a12345","newbie","mmmm","venus","1qazxsw2","beverly","zorro","work","writer","stripper","sebastia","spread","phil","tobias","links","members","metal","1221","andre","565656","funfun","trojans","again","cyber","hurrican","moneys","1x2zkg8w","zeus","thing","tomato","lion","atlantic","celine","usa123","trans","account","aaaaaaa","homerun","hyperion","kevin1","blacks","44444444","skittles","sean","hastings","fart","gangbang","fubar","sailboat","older","oilers","craig","conrad","church","damian","dean","broken","buster1","hithere","immortal","sticks","pilot","peters","lexmark","jerkoff","maryland","anders","cheers","possum","columbus","cutter","muppet","beautiful","stolen","swordfish","sport","sonic","peter1","jethro","rockon","asdfghj","pass123","paper","pornos","ncc1701a","bootys","buttman","bonjour","escape","1960","becky","bears","362436","spartans","tinman","threesom","lemons","maxmax","1414","bbbbb","camelot","chad","chewie","gogo","fusion","saint","dilligaf","nopass","myself","hustler","hunter1","whitey","beast1","yesyes","spank","smudge","pinkfloy","patriot","lespaul","annette","hammers","catalina","finish","formula1","sausage","scooter1","orioles","oscar1","over","colombia","cramps","natural","eating","exotic","iguana","bella","suckers","strong","sheena","start","slave","pearl","topcat","lancelot","angelica","magelan","racer","ramona","crunch","british","button","eileen","steph","456123","skinny","seeking","rockhard","chief","filter","first","freaks","sakura","pacman","poontang","dalton","newlife","homer1","klingon","watcher","walleye","tasha","tasty","sinatra","starship","steel","starbuck","poncho","amber1","gonzo","grover","catherin","carol","candle","firefly","goblin","scotch","diver","usmc","huskies","eleven","kentucky","kitkat","israel","beckham","bicycle","yourmom","studio","tara","33333333","shane","splash","jimmy1","reality","12344321","caitlin","focus","sapphire","mailman","raiders1","clark","ddddd","hopper","excalibu","more","wilbur","illini","imperial","phillips","lansing","maxx","gothic","golfball","carlton","camille","facial","front242","macdaddy","qwer1234","vectra","cowboys1","crazy1","dannyboy","jane","betty","benny","bennett","leader","martinez","aquarius","barkley","hayden","caught","franky","ffff","floyd","sassy","pppp","pppppppp","prodigy","clarence","noodle","eatpussy","vortex","wanking","beatrice","billy1","siemens","pedro","phillies","research","groups","carolyn","chevy1","cccc","fritz","gggggggg","doughboy","dracula","nurses","loco","madrid","lollipop","trout","utopia","chrono","cooler","conner","nevada","wibble","werner","summit","marco","marilyn","1225","babies","capone","fugazi","panda","mama","qazwsxed","puppies","triton","9876","command","nnnnnn","ernest","momoney","iforgot","wolfie","studly","shawn","renee","alien","hamburg","81fukkc","741852","catman","china","forgot","gagging","scott1","drew","oregon","qweqwe","train","crazybab","daniel1","cutlass","brothers","holes","heidi","mothers","music1","what","walrus","1957","bigtime","bike","xtreme","simba","ssss","rookie","angie","bathing","fresh","sanchez","rotten","maestro","luis","look","turbo1","99999","butthole","hhhh","elijah","monty","bender","yoda","shania","shock","phish","thecat","rightnow","reagan","baddog","asia","greatone","gateway1","randall","abstr","napster","brian1","bogart","high","hitler","emma","kill","weaver","wildfire","jackson1","isaiah","1981","belinda","beaner","yoyo","0.0.0.000","super1","select","snuggles","slutty","some","phoenix1","technics","toon","raven1","rayray","123789","1066","albion","greens","fashion","gesperrt","santana","paint","powell","credit","darling","mystery","bowser","bottle","brucelee","hehehe","kelly1","mojo","1998","bikini","woofwoof","yyyy","strap","sites","spears","theodore","julius","richards","amelia","central","f**k","nyjets","punisher","username","vanilla","twisted","bryant","brent","bunghole","here","elizabeth","erica","kimber","viagra","veritas","pony","pool","titts","labtec","lifetime","jenny1","masterbate","mayhem","redbull","govols","gremlin","505050","gmoney","rupert","rovers","diamond1","lorenzo","trident","abnormal","davidson","deskjet","cuddles","nice","bristol","karina","milano","vh5150","jarhead","1982","bigbird","bizkit","sixers","slider","star69","starfish","penetration","tommy1","john316","meghan","michaela","market","grant","caligula","carl","flicks","films","madden","railroad","cosmo","cthulhu","bradford","br0d3r","military","bearbear","swedish","spawn","patrick1","polly","these","todd","reds","anarchy","groove","franco","fuckher","oooo","tyrone","vegas","airbus","cobra1","christine","clips","delete","duster","kitty1","mouse1","monkeys","jazzman","1919","262626","swinging","stroke","stocks","sting","pippen","labrador","jordan1","justdoit","meatball","females","saturday","park","vector","cooter","defender","desert","demon","nike","bubbas","bonkers","english","kahuna","wildman","4121","sirius","static","piercing","terror","teenage","leelee","marissa","microsof","mechanic","robotech","rated","hailey","chaser","sanders","salsero","nuts","macross","quantum","rachael","tsunami","universe","daddy1","cruise","nguyen","newpass6","nudes","hellyeah","vernon","1959","zaq12wsx","striker","sixty","steele","spice","spectrum","smegma","thumb","jjjjjjjj","mellow","astrid","cancun","cartoon","sabres","samiam","pants","oranges","oklahoma","lust","coleman","denali","nude","noodles","buzz","brest","hooter","mmmmmmmm","warthog","bloody","blueblue","zappa","wolverine","sniffing","lance","jean","jjjjj","harper","calico","freee","rover","door","pooter","closeup","bonsai","evelyn","emily1","kathryn","keystone","iiii","1955","yzerman","theboss","tolkien","jill","megaman","rasta","bbbbbbbb","bean","handsome","hal9000","goofy","gringo","gofish","gizmo1","samsam","scuba","onlyme","tttttttt","corrado","clown","clapton","deborah","boris","bulls","vivian","jayhawk","bethany","wwww","sharky","seeker","ssssssss","somethin","pillow","thesims","lighter","lkjhgf","melissa1","marcius2","barry","guiness","gymnast","casey1","goalie","godsmack","doug","lolo","rangers1","poppy","abby","clemson","clipper","deeznuts","nobody","holly1","elliot","eeee","kingston","miriam","belle","yosemite","sucked","sex123","sexy69","pic's","tommyboy","lamont","meat","masterbating","marianne","marc","gretzky","happyday","frisco","scratch","orchid","orange1","manchest","quincy","unbelievable","aberdeen","dawson","nathalie","ne1469","boxing","hill","korn","intercourse","161616","1985","ziggy","supersta","stoney","senior","amature","barber","babyboy","bcfields","goliath","hack","hardrock","children","frodo","scout","scrappy","rosie","qazqaz","tracker","active","craving","commando","cohiba","deep","cyclone","dana","bubba69","katie1","mpegs","vsegda","jade","irish1","better","sexy1","sinclair","smelly","squerting","lions","jokers","jeanette","julia","jojojo","meathead","ashley1","groucho","cheetah","champ","firefox","gandalf1","packer","magnolia","love69","tyler1","typhoon","tundra","bobby1","kenworth","village","volley","beth","wolf359","0420","000007","swimmer","skydive","smokes","patty","peugeot","pompey","legolas","kristy","redhot","rodman","redalert","having","grapes","4runner","carrera","floppy","dollars","ou8122","quattro","adams","cloud9","davids","nofear","busty","homemade","mmmmm","whisper","vermont","webmaste","wives","insertion","jayjay","philips","phone","topher","tongue","temptress","midget","ripken","havefun","gretchen","canon","celebrity","five","getting","ghetto","direct","otto","ragnarok","trinidad","usnavy","conover","cruiser","dalshe","nicole1","buzzard","hottest","kingfish","misfit","moore","milfnew","warlord","wassup","bigsexy","blackhaw","zippy","shearer","tights","thursday","kungfu","labia","journey","meatloaf","marlene","rider","area51","batman1","bananas","636363","cancel","ggggg","paradox","mack","lynn","queens","adults","aikido","cigars","nova","hoosier","eeyore","moose1","warez","interacial","streaming","313131","pertinant","pool6123","mayday","rivers","revenge","animated","banker","baddest","gordon24","ccccc","fortune","fantasies","touching","aisan","deadman","homepage","ejaculation","whocares","iscool","jamesbon","1956","1pussy","womam","sweden","skidoo","spock","sssss","petra","pepper1","pinhead","micron","allsop","amsterda","army","aside","gunnar","666999","chip","foot","fowler","february","face","fletch","george1","sapper","science","sasha1","luckydog","lover1","magick","popopo","public","ultima","derek","cypress","booker","businessbabe","brandon1","edwards","experience","vulva","vvvv","jabroni","bigbear","yummy","010203","searay","secret1","showing","sinbad","sexxxx","soleil","software","piccolo","thirteen","leopard","legacy","jensen","justine","memorex","marisa","mathew","redwing","rasputin","134679","anfield","greenbay","gore","catcat","feather","scanner","pa55word","contortionist","danzig","daisy1","hores","erik","exodus","vinnie","iiiiii","zero","1001","subway","tank","second","snapple","sneakers","sonyfuck","picks","poodle","test1234","their","llll","junebug","june","marker","mellon","ronaldo","roadkill","amanda1","asdfjkl","beaches","greene","great1","cheerleaers","force","doitnow","ozzy","madeline","radio","tyson","christian","daphne","boxster","brighton","housewifes","emmanuel","emerson","kkkk","mnbvcx","moocow","vides","wagner","janet","1717","bigmoney","blonds","1000","storys","stereo","4545","420247","seductive","sexygirl","lesbean","live","justin1","124578","animals","balance","hansen","cabbage","canadian","gangbanged","dodge1","dimas","lori","loud","malaka","puss","probes","adriana","coolman","crawford","dante","nacked","hotpussy","erotica","kool","mirror","wearing","implants","intruder","bigass","zenith","woohoo","womans","tanya","tango","stacy","pisces","laguna","krystal","maxell","andyod22","barcelon","chainsaw","chickens","flash1","downtown","orgasms","magicman","profit","pusyy","pothead","coconut","chuckie","contact","clevelan","designer","builder","budweise","hotshot","horizon","hole","experienced","mondeo","wifes","1962","strange","stumpy","smiths","sparks","slacker","piper","pitchers","passwords","laptop","jeremiah","allmine","alliance","bbbbbbb","asscock","halflife","grandma","hayley","88888","cecilia","chacha","saratoga","sandy1","santos","doogie","number","positive","qwert40","transexual","crow","close-up","darrell","bonita","ib6ub9","volvo","jacob1","iiiii","beastie","sunnyday","stoned","sonics","starfire","snapon","pictuers","pepe","testing1","tiberius","lisalisa","lesbain","litle","retard","ripple","austin1","badgirl","golfgolf","flounder","garage","royals","dragoon","dickie","passwor","ocean","majestic","poppop","trailers","dammit","nokia","bobobo","br549","emmitt","knock","minime","mikemike","whitesox","1954","3232","353535","seamus","solo","sparkle","sluttey","pictere","titten","lback","1024","angelina","goodluck","charlton","fingerig","gallaries","goat","ruby","passme","oasis","lockerroom","logan1","rainman","twins","treasure","absolutely","club","custom","cyclops","nipper","bucket","homepage-","hhhhh","momsuck","indain","2345","beerbeer","bimmer","susanne","stunner","stevens","456456","shell","sheba","tootsie","tiny","testerer","reefer","really","1012","harcore","gollum","545454","chico","caveman","carole","fordf150","fishes","gaymen","saleen","doodoo","pa55w0rd","looney","presto","qqqqq","cigar","bogey","brewer","helloo","dutch","kamikaze","monte","wasser","vietnam","visa","japanees","0123","swords","slapper","peach","jump","marvel","masterbaiting","march","redwood","rolling","1005","ametuer","chiks","cathy","callaway","fucing","sadie1","panasoni","mamas","race","rambo","unknown","absolut","deacon","dallas1","housewife","kristi","keywest","kirsten","kipper","morning","wings","idiot","18436572","1515","beating","zxczxc","sullivan","303030","shaman","sparrow","terrapin","jeffery","masturbation","mick","redfish","1492","angus","barrett","goirish","hardcock","felicia","forfun","galary","freeporn","duchess","olivier","lotus","pornographic","ramses","purdue","traveler","crave","brando","enter1","killme","moneyman","welder","windsor","wifey","indon","yyyyy","stretch","taylor1","4417","shopping","picher","pickup","thumbnils","johnboy","jets","jess","maureen","anne","ameteur","amateurs","apollo13","hambone","goldwing","5050","charley","sally1","doghouse","padres","pounding","quest","truelove","underdog","trader","crack","climber","bolitas","bravo","hohoho","model","italian","beanie","beretta","wrestlin","stroker","tabitha","sherwood","sexyman","jewels","johannes","mets","marcos","rhino","bdsm","balloons","goodman","grils","happy123","flamingo","games","route66","devo","dino","outkast","paintbal","magpie","llllllll","twilight","critter","christie","cupcake","nickel","bullseye","krista","knickerless","mimi","murder","videoes","binladen","xerxes","slim","slinky","pinky","peterson","thanatos","meister","menace","ripley","retired","albatros","balloon","bank","goten","5551212","getsdown","donuts","divorce","nwo4life","lord","lost","underwear","tttt","comet","deer","damnit","dddddddd","deeznutz","nasty1","nonono","nina","enterprise","eeeee","misfit99","milkman","vvvvvv","isaac","1818","blueboy","beans","bigbutt","wyatt","tech","solution","poetry","toolman","laurel","juggalo","jetski","meredith","barefoot","50spanks","gobears","scandinavian","original","truman","cubbies","nitram","briana","ebony","kings","warner","bilbo","yumyum","zzzzzzz","stylus","321654","shannon1","server","secure","silly","squash","starman","steeler","staples","phrases","techniques","laser","135790","allan","barker","athens","cbr600","chemical","fester","gangsta","fucku2","freeze","game","salvador","droopy","objects","passwd","lllll","loaded","louis","manchester","losers","vedder","clit","chunky","darkman","damage","buckshot","buddah","boobed","henti","hillary","webber","winter1","ingrid","bigmike","beta","zidane","talon","slave1","pissoff","person","thegreat","living","lexus","matador","readers","riley","roberta","armani","ashlee","goldstar","5656","cards","fmale","ferris","fuking","gaston","fucku","ggggggg","sauron","diggler","pacers","looser","pounded","premier","pulled","town","trisha","triangle","cornell","collin","cosmic","deeper","depeche","norway","bright","helmet","kristine","kendall","mustard","misty1","watch","jagger","bertie","berger","word","3x7pxr","silver1","smoking","snowboar","sonny","paula","penetrating","photoes","lesbens","lambert","lindros","lillian","roadking","rockford","1357","143143","asasas","goodboy","898989","chicago1","card","ferrari1","galeries","godfathe","gawker","gargoyle","gangster","rubble","rrrr","onetime","pussyman","pooppoop","trapper","twenty","abraham","cinder","company","newcastl","boricua","bunny1","boxer","hotred","hockey1","hooper","edward1","evan","kris","misery","moscow","milk","mortgage","bigtit","show","snoopdog","three","lionel","leanne","joshua1","july","1230","assholes","cedric","fallen","farley","gene","frisky","sanity","script","divine","dharma","lucky13","property","tricia","akira","desiree","broadway","butterfly","hunt","hotbox","hootie","heat","howdy","earthlink","karma","kiteboy","motley","westwood","1988","bert","blackbir","biggles","wrench","working","wrestle","slippery","pheonix","penny1","pianoman","tomorrow","thedude","jenn","jonjon","jones1","mattie","memory","micheal","roadrunn","arrow","attitude","azzer","seahawks","diehard","dotcom","lola","tunafish","chivas","cinnamon","clouds","deluxe","northern","nuclear","north","boom","boobie","hurley","krishna","momomo","modles","volume","23232323","bluedog","wwwwwww","zerocool","yousuck","pluto","limewire","link","joung","marcia","awnyce","gonavy","haha","films+pic+galeries","fabian","francois","girsl","fuckthis","girfriend","rufus","drive","uncencored","a123456","airport","clay","chrisbln","combat","cygnus","cupoi","never","netscape","brett","hhhhhhhh","eagles1","elite","knockers","kendra","mommy","1958","tazmania","shonuf","piano","pharmacy","thedog","lips","jillian","jenkins","midway","arsenal1","anaconda","australi","gromit","gotohell","787878","66666","carmex2","camber","gator1","ginger1","fuzzy","seadoo","dorian","lovesex","rancid","uuuuuu","911911","nature","bulldog1","helen","health","heater","higgins","kirk","monalisa","mmmmmmm","whiteout","virtual","ventura","jamie1","japanes","james007","2727","2469","blam","bitchass","believe","zephyr","stiffy","sweet1","silent","southpar","spectre","tigger1","tekken","lenny","lakota","lionking","jjjjjjj","medical","megatron","1369","hawaiian","gymnastic","golfer1","gunners","7779311","515151","famous","glass","screen","rudy","royal","sanfran","drake","optimus","panther1","love1","mail","maggie1","pudding","venice","aaron1","delphi","niceass","bounce","busted","house1","killer1","miracle","momo","musashi","jammin","2003","234567","wp2003wp","submit","silence","sssssss","state","spikes","sleeper","passwort","toledo","kume","media","meme","medusa","mantis","remote","reading","reebok","1017","artemis","hampton","harry1","cafc91","fettish","friendly","oceans","oooooooo","mango","ppppp","trainer","troy","uuuu","909090","cross","death1","news","bullfrog","hokies","holyshit","eeeeeee","mitch","jasmine1","&amp","&amp;","sergeant","spinner","leon","jockey","records","right","babyblue","hans","gooner","474747","cheeks","cars","candice","fight","glow","pass1234","parola","okokok","pablo","magical","major","ramsey","poseidon","989898","confused","circle","crusher","cubswin","nnnn","hollywood","erin","kotaku","milo","mittens","whatsup","vvvvv","iomega","insertions","bengals","bermuda","biit","yellow1","012345","spike1","south","sowhat","pitures","peacock","pecker","theend","juliette","jimmie","romance","augusta","hayabusa","hawkeyes","castro","florian","geoffrey","dolly","lulu","qaz123","usarmy","twinkle","cloud","chuckles","cold","hounddog","hover","hothot","europa","ernie","kenshin","kojak","mikey1","water1","196969","because","wraith","zebra","wwwww","33333","simon1","spider1","snuffy","philippe","thunderb","teddy1","lesley","marino13","maria1","redline","renault","aloha","antoine","handyman","cerberus","gamecock","gobucks","freesex","duffman","ooooo","papa","nuggets","magician","longbow","preacher","porno1","county","chrysler","contains","dalejr","darius","darlene","dell","navy","buffy1","hedgehog","hoosiers","honey1","hott","heyhey","europe","dutchess","everest","wareagle","ihateyou","sunflowe","3434","senators","shag","spoon","sonoma","stalker","poochie","terminal","terefon","laurence","maradona","maryann","marty","roman","1007","142536","alibaba","america1","bartman","astro","goth","century","chicken1","cheater","four","ghost1","passpass","oral","r2d2c3po","civic","cicero","myxworld","kkkkk","missouri","wishbone","infiniti","jameson","1a2b3c","1qwerty","wonderboy","skip","shojou","stanford","sparky1","smeghead","poiuy","titanium","torres","lantern","jelly","jeanne","meier","1213","bayern","basset","gsxr750","cattle","charlene","fishing1","fullmoon","gilles","dima","obelix","popo","prissy","ramrod","unique","absolute","bummer","hotone","dynasty","entry","konyor","missy1","moses","282828","yeah","xyz123","stop","426hemi","404040","seinfeld","simmons","pingpong","lazarus","matthews","marine1","manning","recovery","12345a","beamer","babyface","greece","gustav","7007","charity","camilla","ccccccc","faggot","foxy","frozen","gladiato","duckie","dogfood","paranoid","packers1","longjohn","radical","tuna","clarinet","claudio","circus","danny1","novell","nights","bonbon","kashmir","kiki","mortimer","modelsne","moondog","monaco","vladimir","insert","1953","zxc123","supreme","3131","sexxx","selena","softail","poipoi","pong","together","mars","martin1","rogue","alone","avalanch","audia4","55bgates","cccccccc","chick","came11","figaro","geneva","dogboy","dnsadm","dipshit","paradigm","othello","operator","officer","malone","post","rafael","valencia","tripod","choice","chopin","coucou","coach","cocksuck","common","creature","borussia","book","browning","heritage","hiziad","homerj","eight","earth","millions","mullet","whisky","jacques","store","4242","speedo","starcraf","skylar","spaceman","piggy","pierce","tiger2","legos","lala","jezebel","judy","joker1","mazda","barton","baker","727272","chester1","fishman","food","rrrrrrrr","sandwich","dundee","lumber","magazine","radar","ppppppp","tranny","aaliyah","admiral","comics","cleo","delight","buttfuck","homeboy","eternal","kilroy","kellie","khan","violin","wingman","walmart","bigblue","blaze","beemer","beowulf","bigfish","yyyyyyy","woodie","yeahbaby","0123456","tbone","style","syzygy","starter","lemon","linda1","merlot","mexican","11235813","anita","banner","bangbang","badman","barfly","grease","carla","charles1","ffffffff","screw","doberman","diane","dogshit","overkill","counter","coolguy","claymore","demons","demo","nomore","normal","brewster","hhhhhhh","hondas","iamgod","enterme","everett","electron","eastside","kayla","minimoni","mybaby","wildbill","wildcard","ipswich","200000","bearcat","zigzag","yyyyyyyy","xander","sweetnes","369369","skyler","skywalker","pigeon","peyton","tipper","lilly","asdf123","alphabet","asdzxc","babybaby","banane","barnes","guyver","graphics","grand","chinook","florida1","flexible","fuckinside","otis","ursitesux","tototo","trust","tower","adam12","christma","corey","chrome","buddie","bombers","bunker","hippie","keegan","misfits","vickie","292929","woofer","wwwwwwww","stubby","sheep","secrets","sparta","stang","spud","sporty","pinball","jorge","just4fun","johanna","maxxxx","rebecca1","gunther","fatima","fffffff","freeway","garion","score","rrrrr","sancho","outback","maggot","puddin","trial","adrienne","987456","colton","clyde","brain","brains","hoops","eleanor","dwayne","kirby","mydick","villa","19691969","bigcat","becker","shiner","silverad","spanish","templar","lamer","juicy","marsha","mike1","maximum","rhiannon","real","1223","10101010","arrows","andres","alucard","baldwin","baron","avenue","ashleigh","haggis","channel","cheech","safari","ross","dog123","orion1","paloma","qwerasdf","presiden","vegitto","trees","969696","adonis","colonel","cookie1","newyork1","brigitte","buddyboy","hellos","heineken","dwight","eraser","kerstin","motion","moritz","millwall","visual","jaybird","1983","beautifu","bitter","yvette","zodiac","steven1","sinister","slammer","smashing","slick1","sponge","teddybea","theater","this","ticklish","lipstick","jonny","massage","mann","reynolds","ring","1211","amazing","aptiva","applepie","bailey1","guitar1","chanel","canyon","gagged","fuckme1","rough","digital1","dinosaur","punk","98765","90210","clowns","cubs","daniels","deejay","nigga","naruto","boxcar","icehouse","hotties","electra","kent","widget","india","insanity","1986","2004","best","bluefish","bingo1","*****","stratus","strength","sultan","storm1","44444","4200","sentnece","season","sexyboy","sigma","smokie","spam","point","pippo","ticket","temppass","joel","manman","medicine","1022","anton","almond","bacchus","aztnm","axio","awful","bamboo","hakr","gregor","hahahaha","5678","casanova","caprice","camero1","fellow","fountain","dupont","dolphin1","dianne","paddle","magnet","qwert1","pyon","porsche1","tripper","vampires","coming","noway","burrito","bozo","highheel","hughes","hookem","eddie1","ellie","entropy","kkkkkkkk","kkkkkkk","illinois","jacobs","1945","1951","24680","21212121","100000","stonecold","taco","subzero","sharp","sexxxy","skolko","shanna","skyhawk","spurs1","sputnik","piazza","testpass","letter","lane","kurt","jiggaman","matilda","1224","harvard","hannah1","525252","4ever","carbon","chef","federico","ghosts","gina","scorpio1","rt6ytere","madison1","loki","raquel","promise","coolness","christina","coldbeer","citadel","brittney","highway","evil","monarch","morgan1","washingt","1997","bella1","berry","yaya","yolanda","superb","taxman","studman","stephanie","3636","sherri","sheriff","shepherd","poland","pizzas","tiffany1","toilet","latina","lassie","larry1","joseph1","mephisto","meagan","marian","reptile","rico","razor","1013","barron","hammer1","gypsy","grande","carroll","camper","chippy","cat123","call","chimera","fiesta","glock","glenn","domain","dieter","dragonba","onetwo","nygiants","odessa","password2","louie","quartz","prowler","prophet","towers","ultra","cocker","corleone","dakota1","cumm","nnnnnnn","natalia","boxers","hugo","heynow","hollow","iceberg","elvira","kittykat","kate","kitchen","wasabi","vikings1","impact","beerman","string","sleep","splinter","snoopy1","pipeline","pocket","legs","maple","mickey1","manuela","mermaid","micro","meowmeow","redbird","alisha","baura","battery","grass","chevys","chestnut","caravan","carina","charmed","fraser","frogman","diving","dogger","draven","drifter","oatmeal","paris1","longdong","quant4307s","rachel1","vegitta","cole","cobras","corsair","dadada","noelle","mylife","nine","bowwow","body","hotrats","eastwood","moonligh","modena","wave","illusion","iiiiiii","jayhawks","birgit","zone","sutton","susana","swingers","shocker","shrimp","sexgod","squall","stefanie","squeeze","soul","patrice","poiu","players","tigers1","toejam","tickler","line","julie1","jimbo1","jefferso","juanita","michael2","rodeo","robot","1023","annie1","bball","guess","happy2","charter","farm","flasher","falcon1","fiction","fastball","gadget","scrabble","diaper","dirtbike","dinner","oliver1","partner","paco","lucille","macman","poopy","popper","postman","ttttttt","ursula","acura","cowboy1","conan","daewoo","cyrus","customer","nation","nemrac58","nnnnn","nextel","bolton","bobdylan","hopeless","eureka","extra","kimmie","kcj9wx5n","killbill","musica","volkswag","wage","windmill","wert","vintage","iloveyou1","itsme","bessie","zippo","311311","starligh","smokey1","spot","snappy","soulmate","plasma","thelma","tonight","krusty","just4me","mcdonald","marius","rochelle","rebel1","1123","alfredo","aubrey","audi","chantal","fick","goaway","roses","sales","rusty2","dirt","dogbone","doofus","ooooooo","oblivion","mankind","luck","mahler","lllllll","pumper","puck","pulsar","valkyrie","tupac","compass","concorde","costello","cougars","delaware","niceguy","nocturne","bob123","boating","bronze","hopkins","herewego","hewlett","houhou","hubert","earnhard","eeeeeeee","keller","mingus","mobydick","venture","verizon","imation","1950","1948","1949","223344","bigbig","blossom","zack","wowwow","sissy","skinner","spiker","square","snooker","sluggo","player1","junk","jeannie","jsbach","jumbo","jewel","medic","robins","reddevil","reckless","123456a","1125","1031","beacon","astra","gumby","hammond","hassan","757575","585858","chillin","fuck1","sander","lowell","radiohea","upyours","trek","courage","coolcool","classics","choochoo","darryl","nikki1","nitro","bugs","boytoy","ellen","excite","kirsty","kane","wingnut","wireless","icu812","1master","beatle","bigblock","blanca","wolfen","summer99","sugar1","tartar","sexysexy","senna","sexman","sick","someone","soprano","pippin","platypus","pixies","telephon","land","laura1","laurent","rimmer","road","report","1020","12qwaszx","arturo","around","hamish","halifax","fishhead","forum","dododo","doit","outside","paramedi","lonesome","mandy1","twist","uuuuu","uranus","ttttt","butcher","bruce1","helper","hopeful","eduard","dusty1","kathy1","katherin","moonbeam","muscles","monster1","monkeybo","morton","windsurf","vvvvvvv","vivid","install","1947","187187","1941","1952","tatiana","susan1","31415926","sinned","sexxy","senator","sebastian","shadows","smoothie","snowflak","playstat","playa","playboy1","toaster","jerry1","marie1","mason1","merlin1","roger1","roadster","112358","1121","andrea1","bacardi","auto","hardware","hardy","789789","5555555","captain1","flores","fergus","sascha","rrrrrrr","dome","onion","nutter","lololo","qqqqqqq","quick","undertak","uuuuuuuu","uuuuuuu","criminal","cobain","cindy1","coors","dani","descent","nimbus","nomad","nanook","norwich","bomb","bombay","broker","hookup","kiwi","winners","jackpot","1a2b3c4d","1776","beardog","bighead","blast","bird33","0987","stress","shot","spooge","pelican","peepee","perry","pointer","titan","thedoors","jeremy1","annabell","altima","baba","hallie","hate","hardone","5454","candace","catwoman","flip","faithful","finance","farmboy","farscape","genesis1","salomon","destroy","papers","option","page","loser1","lopez","r2d2","pumpkins","training","chriss","cumcum","ninjas","ninja1","hung","erika","eduardo","killers","miller1","islander","jamesbond","intel","jarvis","19841984","2626","bizzare","blue12","biker","yoyoma","sushi","styles","shitface","series","shanti","spanker","steffi","smart","sphinx","please1","paulie","pistons","tiburon","limited","maxwell1","mdogg","rockies","armstron","alexia","arlene","alejandr","arctic","banger","audio","asimov","augustus","grandpa","753951","4you","chilly","care1839","chapman","flyfish","fantasia","freefall","santa","sandrine","oreo","ohshit","macbeth","madcat","loveya","mallory","rage","quentin","qwerqwer","project","ramirez","colnago","citizen","chocha","cobalt","crystal1","dabears","nevets","nineinch","broncos1","helene","huge","edgar","epsilon","easter","kestrel","moron","virgil","winston1","warrior1","iiiiiiii","iloveyou2","1616","beat","bettina","woowoo","zander","straight","shower","sloppy","specialk","tinkerbe","jellybea","reader","romero","redsox1","ride","1215","1112","annika","arcadia","answer","baggio","base","guido","555666","carmel","cayman","cbr900rr","chips","gabriell","gertrude","glennwei","roxy","sausages","disco","pass1","luna","lovebug","macmac","queenie","puffin","vanguard","trip","trinitro","airwolf","abbott","aaa111","cocaine","cisco","cottage","dayton","deadly","datsun","bricks","bumper","eldorado","kidrock","wizard1","whiskers","wind","wildwood","istheman","interest","italy","25802580","benoit","bigones","woodland","wolfpac","strawber","suicide","3030","sheba1","sixpack","peace1","physics","pearson","tigger2","toad","megan1","meow","ringo","roll","amsterdam","717171","686868","5424","catherine","canuck","football1","footjob","fulham","seagull","orgy","lobo","mancity","truth","trace","vancouve","vauxhall","acidburn","derf","myspace1","boozer","buttercu","howell","hola","easton","minemine","munch","jared","1dragon","biology","bestbuy","bigpoppa","blackout","blowfish","bmw325","bigbob","stream","talisman","tazz","sundevil","3333333","skate","shutup","shanghai","shop","spencer1","slowhand","polish","pinky1","tootie","thecrow","leroy","jonathon","jubilee","jingle","martine","matrix1","manowar","michaels","messiah","mclaren","resident","reilly","redbaron","rollins","romans","return","rivera","andromed","athlon","beach1","badgers","guitars","harald","harddick","gotribe","6996","7grout","5wr2i7h8","635241","chase1","carver","charlotte","fallout","fiddle","fredrick","fenris","francesc","fortuna","ferguson","fairlane","felipe","felix1","forward","gasman","frost","fucks","sahara","sassy1","dogpound","dogbert","divx1","manila","loretta","priest","pornporn","quasar","venom","987987","access1","clippers","daylight","decker","daman","data","dentist","crusty","nathan1","nnnnnnnn","bruno1","bucks","brodie","budapest","kittens","kerouac","mother1","waldo1","wedding","whistler","whatwhat","wanderer","idontkno","1942","1946","bigdawg","bigpimp","zaqwsx","414141","3000gt","434343","shoes","serpent","starr","smurf","pasword","tommie","thisisit","lake","john1","robotics","redeye","rebelz","1011","alatam","asses","asians","bama","banzai","harvest","gonzalez","hair","hanson","575757","5329","cascade","chinese","fatty","fender1","flower2","funky","sambo","drummer1","dogcat","dottie","oedipus","osama","macleod","prozac","private1","rampage","punch","presley","concord","cook","cinema","cornwall","cleaner","christopher","ciccio","corinne","clutch","corvet07","daemon","bruiser","boiler","hjkl","eyes","egghead","expert","ethan","kasper","mordor","wasted","jamess","iverson3","bluesman","zouzou","090909","1002","switch","stone1","4040","sisters","sexo","shawna","smith1","sperma","sneaky","polska","thewho","terminat","krypton","lawson","library","lekker","jules","johnson1","johann","justus","rockie","romano","aspire","bastards","goodie","cheese1","fenway","fishon","fishin","fuckoff1","girls1","sawyer","dolores","desmond","duane","doomsday","pornking","ramones","rabbits","transit","aaaaa1","clock","delilah","noel","boyz","bookworm","bongo","bunnies","brady","buceta","highbury","henry1","heels","eastern","krissy","mischief","mopar","ministry","vienna","weston","wildone","vodka","jayson","bigbooty","beavis1","betsy","xxxxxx1","yogibear","000001","0815","zulu","420000","september","sigmar","sprout","stalin","peggy","patch","lkjhgfds","lagnaf","rolex","redfox","referee","123123123","1231","angus1","ariana","ballin","attila","hall","greedy","grunt","747474","carpedie","cecile","caramel","foxylady","field","gatorade","gidget","futbol","frosch","saiyan","schmidt","drums","donner","doggy1","drum","doudou","pack","pain","nutmeg","quebec","valdepen","trash","triple","tosser","tuscl","track","comfort","choke","comein","cola","deputy","deadpool","bremen","borders","bronson","break","hotass","hotmail1","eskimo","eggman","koko","kieran","katrin","kordell1","komodo","mone","munich","vvvvvvvv","winger","jaeger","ivan","jackson5","2222222","bergkamp","bennie","bigben","zanzibar","worm","xxx123","sunny1","373737","services","sheridan","slater","slayer1","snoop","stacie","peachy","thecure","times","little1","jennaj","marquis","middle","rasta69","1114","aries","havana","gratis","calgary","checkers","flanker","salope","dirty1","draco","dogface","luv2epus","rainbow6","qwerty123","umpire","turnip","vbnm","tucson","troll","aileen","codered","commande","damon","nana","neon","nico","nightwin","neil","boomer1","bushido","hotmail0","horace","enternow","kaitlyn","keepout","karen1","mindy","mnbv","viewsoni","volcom","wizards","wine","1995","berkeley","bite","zach","woodstoc","tarpon","shinobi","starstar","phat","patience","patrol","toolbox","julien","johnny1","joebob","marble","riders","reflex","120676","1235","angelus","anthrax","atlas","hawks","grandam","harlem","hawaii50","gorgeous","655321","cabron","challeng","callisto","firewall","firefire","fischer","flyer","flower1","factory","federal","gambler","frodo1","funk","sand","sam123","scania","dingo","papito","passmast","olive","palermo","ou8123","lock","ranch","pride","randy1","twiggy","travis1","transfer","treetop","addict","admin1","963852","aceace","clarissa","cliff","cirrus","clifton","colin","bobdole","bonner","bogus","bonjovi","bootsy","boater","elway7","edison","kelvin","kenny1","moonshin","montag","moreno","wayne1","white1","jazzy","jakejake","1994","1991","2828","blunt","bluejays","beau","belmont","worthy","systems","sensei","southpark","stan","peeper","pharao","pigpen","tomahawk","teensex","leedsutd","larkin","jermaine","jeepster","jimjim","josephin","melons","marlon","matthias","marriage","robocop","1003","1027","antelope","azsxdc","gordo","hazard","granada","8989","7894","ceasar","cabernet","cheshire","california","chelle","candy1","fergie","fanny","fidelio","giorgio","fuckhead","ruth","sanford","diego","dominion","devon","panic","longer","mackie","qawsed","trucking","twelve","chloe1","coral","daddyo","nostromo","boyboy","booster","bucky","honolulu","esquire","dynamite","motor","mollydog","wilder","windows1","waffle","wallet","warning","virus","washburn","wealth","vincent1","jabber","jaguars","javelin","irishman","idefix","bigdog1","blue42","blanked","blue32","biteme1","bearcats","blaine","yessir","sylveste","team","stephan","sunfire","tbird","stryker","3ip76k2","sevens","sheldon","pilgrim","tenchi","titman","leeds","lithium","lander","linkin","landon","marijuan","mariner","markie","midnite","reddwarf","1129","123asd","12312312","allstar","albany","asdf12","antonia","aspen","hardball","goldfing","7734","49ers","carlo","chambers","cable","carnage","callum","carlos1","fitter","fandango","festival","flame","gofast","gamma","fucmy69","scrapper","dogwood","django","magneto","loose","premium","addison","9999999","abc1234","cromwell","newyear","nichole","bookie","burns","bounty","brown1","bologna","earl","entrance","elway","killjoy","kerry","keenan","kick","klondike","mini","mouser","mohammed","wayer","impreza","irene","insomnia","24682468","2580","24242424","billbill","bellaco","blessing","blues1","bedford","blanco","blunts","stinks","teaser","streets","sf49ers","shovel","solitude","spikey","sonia","pimpdadd","timeout","toffee","lefty","johndoe","johndeer","mega","manolo","mentor","margie","ratman","ridge","record","rhodes","robin1","1124","1210","1028","1226","another","babylove","barbados","harbor","gramma","646464","carpente","chaos1","fishbone","fireblad","glasgow","frogs","scissors","screamer","salem","scuba1","ducks","driven","doggies","dicky","donovan","obsidian","rams","progress","tottenham","aikman","comanche","corolla","clarke","conway","cumslut","cyborg","dancing","boston1","bong","houdini","helmut","elvisp","edge","keksa12","misha","monty1","monsters","wetter","watford","wiseguy","veronika","visitor","janelle","1989","1987","20202020","biatch","beezer","bigguns","blueball","bitchy","wyoming","yankees2","wrestler","stupid1","sealteam","sidekick","simple1","smackdow","sporting","spiral","smeller","sperm","plato","tophat","test2","theatre","thick","toomuch","leigh","jello","jewish","junkie","maxim","maxime","meadow","remingto","roofer","124038","1018","1269","1227","123457","arkansas","alberta","aramis","andersen","beaker","barcelona","baltimor","googoo","goochi","852456","4711","catcher","carman","champ1","chess","fortress","fishfish","firefigh","geezer","rsalinas","samuel1","saigon","scooby1","doors","dick1","devin","doom","dirk","doris","dontknow","load","magpies","manfred","raleigh","vader1","universa","tulips","defense","mygirl","burn","bowtie","bowman","holycow","heinrich","honeys","enforcer","katherine","minerva","wheeler","witch","waterboy","jaime","irving","1992","23skidoo","bimbo","blue11","birddog","woodman","womble","zildjian","030303","stinker","stoppedby","sexybabe","speakers","slugger","spotty","smoke1","polopolo","perfect1","things","torpedo","tender","thrasher","lakeside","lilith","jimmys","jerk","junior1","marsh","masamune","rice","root","1214","april1","allgood","bambi","grinch","767676","5252","cherries","chipmunk","cezer121","carnival","capecod","finder","flint","fearless","goats","funstuff","gideon","savior","seabee","sandro","schalke","salasana","disney1","duckman","options","pancake","pantera1","malice","lookin","love123","lloyd","qwert123","puppet","prayers","union","tracer","crap","creation","cwoui","nascar24","hookers","hollie","hewitt","estrella","erection","ernesto","ericsson","edthom","kaylee","kokoko","kokomo","kimball","morales","mooses","monk","walton","weekend","inter","internal","1michael","1993","19781978","25252525","worker","summers","surgery","shibby","shamus","skibum","sheepdog","sex69","spliff","slipper","spoons","spanner","snowbird","slow","toriamos","temp123","tennesse","lakers1","jomama","julio","mazdarx7","rosario","recon","riddle","room","revolver","1025","1101","barney1","babycake","baylor","gotham","gravity","hallowee","hancock","616161","515000","caca","cannabis","castor","chilli","fdsa","getout","fuck69","gators1","sail","sable","rumble","dolemite","dork","dickens","duffer","dodgers1","painting","onions","logger","lorena","lookout","magic32","port","poon","prime","twat","coventry","citroen","christmas","civicsi","cocksucker","coochie","compaq1","nancy1","buzzer","boulder","butkus","bungle","hogtied","honor","hero","hotgirls","hilary","heidi1","eggplant","mustang6","mortal","monkey12","wapapapa","wendy1","volleyba","vibrate","vicky","bledsoe","blink","birthday4","woof","xxxxx1","talk","stephen1","suburban","stock","tabatha","sheeba","start1","soccer10","something","starcraft","soccer12","peanut1","plastics","penthous","peterbil","tools","tetsuo","torino","tennis1","termite","ladder","last","lemmein","lakewood","jughead","melrose","megane","reginald","redone","request","angela1","alive","alissa","goodgirl","gonzo1","golden1","gotyoass","656565","626262","capricor","chains","calvin1","foolish","fallon","getmoney","godfather","gabber","gilligan","runaway","salami","dummy","dungeon","dudedude","dumb","dope","opus","paragon","oxygen","panhead","pasadena","opendoor","odyssey","magellan","lottie","printing","pressure","prince1","trustme","christa","court","davies","neville","nono","bread","buffet","hound","kajak","killkill","mona","moto","mildred","winner1","vixen","whiteboy","versace","winona","voyager1","instant","indy","jackjack","bigal","beech","biggun","blake1","blue99","big1","woods","synergy","success1","336699","sixty9","shark1","skin","simba1","sharpe","sebring","spongebo","spunk","springs","sliver","phialpha","password9","pizza1","plane","perkins","pookey","tickling","lexingky","lawman","joe123","jolly","mike123","romeo1","redheads","reserve","apple123","alanis","ariane","antony","backbone","aviation","band","hand","green123","haley","carlitos","byebye","cartman1","camden","chewy","camaross","favorite6","forumwp","franks","ginscoot","fruity","sabrina1","devil666","doughnut","pantie","oldone","paintball","lumina","rainbow1","prosper","total","true","umbrella","ajax","951753","achtung","abc12345","compact","color","corn","complete","christi","closer","corndog","deerhunt","darklord","dank","nimitz","brandy1","bowl","breanna","holidays","hetfield","holein1","hillbill","hugetits","east","evolutio","kenobi","whiplash","waldo","wg8e3wjf","wing","istanbul","invis","1996","benton","bigjohn","bluebell","beef","beater","benji","bluejay","xyzzy","wrestling","storage","superior","suckdick","taichi","stellar","stephane","shaker","skirt","seymour","semper","splurge","squeak","pearls","playball","pitch","phyllis","pooky","piss","tomas","titfuck","joemama","johnny5","marcello","marjorie","married","maxi","rhubarb","rockwell","ratboy","reload","rooney","redd","1029","1030","1220","anchor","bbking","baritone","gryphon","gone","57chevy","494949","celeron","fishy","gladiator","fucker1","roswell","dougie","downer","dicker","diva","domingo","donjuan","nympho","omar","praise","racers","trick","trauma","truck1","trample","acer","corwin","cricket1","clemente","climax","denmark","cuervo","notnow","nittany","neutron","native","bosco1","buffa","breaker","hello2","hydro","estelle","exchange","explore","kisskiss","kittys","kristian","montecar","modem","mississi","mooney","weiner","washington","20012001","bigdick1","bibi","benfica","yahoo1","striper","tabasco","supra","383838","456654","seneca","serious","shuttle","socks","stanton","penguin1","pathfind","testibil","thethe","listen","lightning","lighting","jeter2","marma","mark1","metoo","republic","rollin","redleg","redbone","redskin","rocco","1245","armand","anthony7","altoids","andrews","barley","away","asswipe","bauhaus","bbbbbb1","gohome","harrier","golfpro","goldeney","818181","6666666","5000","5rxypn","cameron1","calling","checker","calibra","fields","freefree","faith1","fist","fdm7ed","finally","giraffe","glasses","giggles","fringe","gate","georgie","scamper","rrpass1","screwyou","duffy","deville","dimples","pacino","ontario","passthie","oberon","quest1","postov1000","puppydog","puffer","raining","protect","qwerty7","trey","tribe","ulysses","tribal","adam25","a1234567","compton","collie","cleopatr","contract","davide","norris","namaste","myrtle","buffalo1","bonovox","buckley","bukkake","burning","burner","bordeaux","burly","hun999","emilie","elmo","enters","enrique","keisha","mohawk","willard","vgirl","whale","vince","jayden","jarrett","1812","1943","222333","bigjim","bigd","zoom","wordup","ziggy1","yahooo","workout","young1","written","xmas","zzzzzz1","surfer1","strife","sunlight","tasha1","skunk","shauna","seth","soft","sprinter","peaches1","planes","pinetree","plum","pimping","theforce","thedon","toocool","leeann","laddie","list","lkjh","lara","joke","jupiter1","mckenzie","matty","rene","redrose","1200","102938","annmarie","alexa","antares","austin31","ground","goose1","737373","78945612","789987","6464","calimero","caster","casper1","cement","chevrolet","chessie","caddy","chill","child","canucks","feeling","favorite","fellatio","f00tball","francine","gateway2","gigi","gamecube","giovanna","rugby1","scheisse","dshade","dudes","dixie1","owen","offshore","olympia","lucas1","macaroni","manga","pringles","puff","tribble","trouble1","ussy","core","clint","coolhand","colonial","colt","debra","darthvad","dealer","cygnusx1","natalie1","newark","husband","hiking","errors","eighteen","elcamino","emmett","emilia","koolaid","knight1","murphy1","volcano","idunno","2005","2233","block","benito","blueberr","biguns","yamahar1","zapper","zorro1","0911","3006","sixsix","shopper","siobhan","sextoy","stafford","snowboard","speedway","sounds","pokey","peabody","playboy2","titi","think","toast","toonarmy","lister","lambda","joecool","jonas","joyce","juniper","mercer","max123","manny","massimo","mariposa","met2002","reggae","ricky1","1236","1228","1016","all4one","arianna","baberuth","asgard","gonzales","484848","5683","6669","catnip","chiquita","charisma","capslock","cashmone","chat","figure","galant","frenchy","gizmodo1","girlies","gabby","garner","screwy","doubled","divers","dte4uw","done","dragonfl","maker","locks","rachelle","treble","twinkie","trailer","tropical","acid","crescent","cooking","cococo","cory","dabomb","daffy","dandfa","cyrano","nathanie","briggs","boners","helium","horton","hoffman","hellas","espresso","emperor","killa","kikimora","wanda","w4g8at","verona","ilikeit","iforget","1944","20002000","birthday1","beatles1","blue1","bigdicks","beethove","blacklab","blazers","benny1","woodwork","0069","0101","taffy","susie","survivor","swim","stokes","4567","shodan","spoiled","steffen","pissed","pavlov","pinnacle","place","petunia","terrell","thirty","toni","tito","teenie","lemonade","lily","lillie","lalakers","lebowski","lalalala","ladyboy","jeeper","joyjoy","mercury1","mantle","mannn","rocknrol","riversid","reeves","123aaa","11112222","121314","1021","1004","1120","allen1","ambers","amstel","ambrose","alice1","alleycat","allegro","ambrosia","alley","australia","hatred","gspot","graves","goodsex","hattrick","harpoon","878787","8inches","4wwvte","cassandr","charlie123","case","chavez","fighting","gabriela","gatsby","fudge","gerry","generic","gareth","fuckme2","samm","sage","seadog","satchmo","scxakv","santafe","dipper","dingle","dizzy","outoutout","madmad","london1","qbg26i","pussy123","randolph","vaughn","tzpvaw","vamp","comedy","comp","cowgirl","coldplay","dawgs","delaney","nt5d27","novifarm","needles","notredam","newness","mykids","bryan1","bouncer","hihihi","honeybee","iceman1","herring","horn","hook","hotlips","dynamo","klaus","kittie","kappa","kahlua","muffy","mizzou","mohamed","musical","wannabe","wednesda","whatup","weller","waterfal","willy1","invest","blanche","bear1","billabon","youknow","zelda","yyyyyy1","zachary1","01234567","070462","zurich","superstar","storms","tail","stiletto","strat","427900","sigmachi","shelter","shells","sexy123","smile1","sophie1","stefano","stayout","somerset","smithers","playmate","pinkfloyd","phish1","payday","thebear","telefon","laetitia","kswbdu","larson","jetta","jerky","melina","metro","revoluti","retire","respect","1216","1201","1204","1222","1115","archange","barry1","handball","676767","chandra","chewbacc","flesh","furball","gocubs","fruit","fullback","gman","gentle","dunbar","dewalt","dominiqu","diver1","dhip6a","olemiss","ollie","mandrake","mangos","pretzel","pusssy","tripleh","valdez","vagabond","clean","comment","crew","clovis","deaths","dandan","csfbr5yy","deadspin","darrel","ninguna","noah","ncc74656","bootsie","bp2002","bourbon","brennan","bumble","books","hose","heyyou","houston1","hemlock","hippo","hornets","hurricane","horseman","hogan","excess","extensa","muffin1","virginie","werdna","idontknow","info","iron","jack1","1bitch","151nxjmt","bendover","bmwbmw","bills","zaq123","wxcvbn","surprise","supernov","tahoe","talbot","simona","shakur","sexyone","seviyi","sonja","smart1","speed1","pepito","phantom1","playoffs","terry1","terrier","laser1","lite","lancia","johngalt","jenjen","jolene","midori","message","maserati","matteo","mental","miami1","riffraff","ronald1","reason","rhythm","1218","1026","123987","1015","1103","armada","architec","austria","gotmilk","hawkins","gray","camila","camp","cambridg","charge","camero","flex","foreplay","getoff","glacier","glotest","froggie","gerbil","rugger","sanity72","salesman","donna1","dreaming","deutsch","orchard","oyster","palmtree","ophelia","pajero","m5wkqf","magenta","luckyone","treefrog","vantage","usmarine","tyvugq","uptown","abacab","aaaaaa1","advance","chuck1","delmar","darkange","cyclones","nate","navajo","nope","border","bubba123","building","iawgk2","hrfzlz","dylan1","enrico","encore","emilio","eclipse1","killian","kayleigh","mutant","mizuno","mustang2","video1","viewer","weed420","whales","jaguar1","insight","1990","159159","1love","bliss","bears1","bigtruck","binder","bigboss","blitz","xqgann","yeahyeah","zeke","zardoz","stickman","table","3825","signal","sentra","side","shiva","skipper1","singapor","southpaw","sonora","squid","slamdunk","slimjim","placid","photon","placebo","pearl1","test12","therock1","tiger123","leinad","legman","jeepers","joeblow","mccarthy","mike23","redcar","rhinos","rjw7x4","1102","13576479","112211","alcohol","gwju3g","greywolf","7bgiqk","7878","535353","4snz9g","candyass","cccccc1","carola","catfight","cali","fister","fosters","finland","frankie1","gizzmo","fuller","royalty","rugrat","sandie","rudolf","dooley","dive","doreen","dodo","drop","oemdlg","out3xf","paddy","opennow","puppy1","qazwsxedc","pregnant","quinn","ramjet","under","uncle","abraxas","corner","creed","cocoa","crown","cows","cn42qj","dancer1","death666","damned","nudity","negative","nimda2k","buick","bobb","braves1","brook","henrik","higher","hooligan","dust","everlast","karachi","mortis","mulligan","monies","motocros","wally1","weapon","waterman","view","willie1","vicki","inspiron","1test","2929","bigblack","xytfu7","yackwin","zaq1xsw2","yy5rbfsc","100100","0660","tahiti","takehana","talks","332211","3535","sedona","seawolf","skydiver","shine","spleen","slash","spjfet","special1","spooner","slimshad","sopranos","spock1","penis1","patches1","terri","thierry","thething","toohot","large","limpone","johnnie","mash4077","matchbox","masterp","maxdog","ribbit","reed","rita","rockin","redhat","rising","1113","14789632","1331","allday","aladin","andrey","amethyst","ariel","anytime","baseball1","athome","basil","goofy1","greenman","gustavo","goofball","ha8fyp","goodday","778899","charon","chappy","castillo","caracas","cardiff","capitals","canada1","cajun","catter","freddy1","favorite2","frazier","forme","follow","forsaken","feelgood","gavin","gfxqx686","garlic","sarge","saskia","sanjose","russ","salsa","dilbert1","dukeduke","downhill","longhair","loop","locutus","lockdown","malachi","mamacita","lolipop","rainyday","pumpkin1","punker","prospect","rambo1","rainbows","quake","twin","trinity1","trooper1","aimee","citation","coolcat","crappy","default","dental","deniro","d9ungl","daddys","napoli","nautica","nermal","bukowski","brick","bubbles1","bogota","board","branch","breath","buds","hulk","humphrey","hitachi","evans","ender","export","kikiki","kcchiefs","kram","morticia","montrose","mongo","waqw3p","wizzard","visited","whdbtp","whkzyc","image","154ugeiu","1fuck","binky","blind","bigred1","blubber","benz","becky1","year2005","wonderfu","wooden","xrated","0001","tampabay","survey","tammy1","stuffer","3mpz4r","3000","3some","selina","sierra1","shampoo","silk","shyshy","slapnuts","standby","spartan1","sprocket","sometime","stanley1","poker1","plus","thought","theshit","torture","thinking","lavalamp","light1","laserjet","jediknig","jjjjj1","jocelyn","mazda626","menthol","maximo","margaux","medic1","release","richter","rhino1","roach","renate","repair","reveal","1209","1234321","amigos","apricot","alexandra","asdfgh1","hairball","hatter","graduate","grimace","7xm5rq","6789","cartoons","capcom","cheesy","cashflow","carrots","camping","fanatic","fool","format","fleming","girlie","glover","gilmore","gardner","safeway","ruthie","dogfart","dondon","diapers","outsider","odin","opiate","lollol","love12","loomis","mallrats","prague","primetime21","pugsley","program","r29hqq","touch","valleywa","airman","abcdefg1","darkone","cummer","dempsey","damn","nadia","natedogg","nineball","ndeyl5","natchez","newone","normandy","nicetits","buddy123","buddys","homely","husky","iceland","hr3ytm","highlife","holla","earthlin","exeter","eatmenow","kimkim","karine","k2trix","kernel","kirkland","money123","moonman","miles1","mufasa","mousey","wilma","wilhelm","whites","warhamme","instinct","jackass1","2277","20spanks","blobby","blair","blinky","bikers","blackjack","becca","blue23","xman","wyvern","085tzzqi","zxzxzx","zsmj2v","suede","t26gn4","sugars","sylvie","tantra","swoosh","swiss","4226","4271","321123","383pdjvl","shoe","shane1","shelby1","spades","spain","smother","soup","sparhawk","pisser","photo1","pebble","phones","peavey","picnic","pavement","terra","thistle","tokyo","therapy","lives","linden","kronos","lilbit","linux","johnston","material","melanie1","marbles","redlight","reno","recall","1208","1138","1008","alchemy","aolsucks","alexalex","atticus","auditt","ballet","b929ezzh","goodyear","hanna","griffith","gubber","863abgsg","7474","797979","464646","543210","4zqauf","4949","ch5nmk","carlito","chewey","carebear","caleb","checkmat","cheddar","chachi","fever","forgetit","fine","forlife","giants1","gates","getit","gamble","gerhard","galileo","g3ujwg","ganja","rufus1","rushmore","scouts","discus","dudeman","olympus","oscars","osprey","madcow","locust","loyola","mammoth","proton","rabbit1","question","ptfe3xxp","pwxd5x","purple1","punkass","prophecy","uyxnyd","tyson1","aircraft","access99","abcabc","cocktail","colts","civilwar","cleveland","claudia1","contour","clement","dddddd1","cypher","denied","dapzu455","dagmar","daisydog","name","noles","butters","buford","hoochie","hotel","hoser","eddy","ellis","eldiablo","kingrich","mudvayne","motown","mp8o6d","wife","vipergts","italiano","innocent","2055","2211","beavers","bloke","blade1","yamato","zooropa","yqlgr667","050505","zxcvbnm1","zw6syj","suckcock","tango1","swing","stern","stephens","swampy","susanna","tammie","445566","333666","380zliki","sexpot","sexylady","sixtynin","sickboy","spiffy","sleeping","skylark","sparkles","slam","pintail","phreak","places","teller","timtim","tires","thighs","left","latex","llamas","letsdoit","lkjhg","landmark","letters","lizzard","marlins","marauder","metal1","manu","register","righton","1127","alain","alcat","amigo","basebal1","azertyui","attract","azrael","hamper","gotenks","golfgti","gutter","hawkwind","h2slca","harman","grace1","6chid8","789654","canine","casio","cazzo","chamber","cbr900","cabrio","calypso","capetown","feline","flathead","fisherma","flipmode","fungus","goal","g9zns4","full","giggle","gabriel1","fuck123","saffron","dogmeat","dreamcas","dirtydog","dunlop","douche","dresden","dickdick","destiny1","pappy","oaktree","lydia","luft4","puta","prayer","ramada","trumpet1","vcradq","tulip","tracy71","tycoon","aaaaaaa1","conquest","click","chitown","corps","creepers","constant","couples","code","cornhole","danman","dada","density","d9ebk7","cummins","darth","cute","nash","nirvana1","nixon","norbert","nestle","brenda1","bonanza","bundy","buddies","hotspur","heavy","horror","hufmqw","electro","erasure","enough","elisabet","etvww4","ewyuza","eric1","kinder","kenken","kismet","klaatu","musician","milamber","willi","waiting","isacs155","igor","1million","1letmein","x35v8l","yogi","ywvxpz","xngwoj","zippy1","020202","****","stonewal","sweeney","story","sentry","sexsexsex","spence","sonysony","smirnoff","star12","solace","sledge","states","snyder","star1","paxton","pentagon","pkxe62","pilot1","pommes","paulpaul","plants","tical","tictac","toes","lighthou","lemans","kubrick","letmein22","letmesee","jys6wz","jonesy","jjjjjj1","jigga","joelle","mate","merchant","redstorm","riley1","rosa","relief","14141414","1126","allison1","badboy1","asthma","auggie","basement","hartley","hartford","hardwood","gumbo","616913","57np39","56qhxs","4mnveh","cake","forbes","fatluvr69","fqkw5m","fidelity","feathers","fresno","godiva","gecko","gladys","gibson1","gogators","fridge","general1","saxman","rowing","sammys","scotts","scout1","sasasa","samoht","dragon69","ducky","dragonball","driller","p3wqaw","nurse","papillon","oneone","openit","optimist","longshot","portia","rapier","pussy2","ralphie","tuxedo","ulrike","undertow","trenton","copenhag","come","delldell","culinary","deltas","mytime","nicky","nickie","noname","noles1","bucker","bopper","bullock","burnout","bryce","hedges","ibilltes","hihje863","hitter","ekim","espana","eatme69","elpaso","envelope","express1","eeeeee1","eatme1","karaoke","kara","mustang5","misses","wellingt","willem","waterski","webcam","jasons","infinite","iloveyou!","jakarta","belair","bigdad","beerme","yoshi","yinyang","zimmer","x24ik3","063dyjuy","0000007","ztmfcq","stopit","stooges","survival","stockton","symow8","strato","2hot4u","ship","simons","skins","shakes","sex1","shield","snacks","softtail","slimed123","pizzaman","pipe","pitt","pathetic","pinto","tigercat","tonton","lager","lizzy","juju","john123","jennings","josiah","jesse1","jordon","jingles","martian","mario1","rootedit","rochard","redwine","requiem","riverrat","rats","1117","1014","1205","althea","allie","amor","amiga","alpina","alert","atreides","banana1","bahamut","hart","golfman","happines","7uftyx","5432","5353","5151","4747","byron","chatham","chadwick","cherie","foxfire","ffvdj474","freaked","foreskin","gayboy","gggggg1","glenda","gameover","glitter","funny1","scoobydoo","scroll","rudolph","saddle","saxophon","dingbat","digimon","omicron","parsons","ohio","panda1","loloxx","macintos","lululu","lollypop","racer1","queen1","qwertzui","prick","upnfmc","tyrant","trout1","9skw5g","aceman","adelaide","acls2h","aaabbb","acapulco","aggie","comcast","craft","crissy","cloudy","cq2kph","custer","d6o8pm","cybersex","davecole","darian","crumbs","daisey","davedave","dasani","needle","mzepab","myporn","narnia","nineteen","booger1","bravo1","budgie","btnjey","highlander","hotel6","humbug","edwin","ewtosi","kristin1","kobe","knuckles","keith1","katarina","muff","muschi","montana1","wingchun","wiggle","whatthe","walking","watching","vette1","vols","virago","intj3a","ishmael","intern","jachin","illmatic","199999","2010","beck","blender","bigpenis","bengal","blue1234","your","zaqxsw","xray","xxxxxxx1","zebras","yanks","worlds","tadpole","stripes","svetlana","3737","4343","3728","4444444","368ejhih","solar","sonne","smalls","sniffer","sonata","squirts","pitcher","playstation","pktmxr","pescator","points","texaco","lesbos","lilian","l8v53x","jo9k2jw2","jimbeam","josie","jimi","jupiter2","jurassic","marines1","maya","rocket1","ringer","14725836","12345679","1219","123098","1233","alessand","althor","angelika","arch","armando","alpha123","basher","barefeet","balboa","bbbbb1","banks","badabing","harriet","gopack","golfnut","gsxr1000","gregory1","766rglqy","8520","753159","8dihc6","69camaro","666777","cheeba","chino","calendar","cheeky","camel1","fishcake","falling","flubber","giuseppe","gianni","gloves","gnasher23","frisbee","fuzzy1","fuzzball","sauce","save13tx","schatz","russell1","sandra1","scrotum","scumbag","sabre","samdog","dripping","dragon12","dragster","paige","orwell","mainland","lunatic","lonnie","lotion","maine","maddux","qn632o","poophead","rapper","porn4life","producer","rapunzel","tracks","velocity","vanessa1","ulrich","trueblue","vampire1","abacus","902100","crispy","corky","crane","chooch","d6wnro","cutie","deal","dabulls","dehpye","navyseal","njqcw4","nownow","nigger1","nightowl","nonenone","nightmar","bustle","buddy2","boingo","bugman","bulletin","bosshog","bowie","hybrid","hillside","hilltop","hotlegs","honesty","hzze929b","hhhhh1","hellohel","eloise","evilone","edgewise","e5pftu","eded","embalmer","excalibur","elefant","kenzie","karl","karin","killah","kleenex","mouses","mounta1n","motors","mutley","muffdive","vivitron","winfield","wednesday","w00t88","iloveit","jarjar","incest","indycar","17171717","1664","17011701","222777","2663","beelch","benben","yitbos","yyyyy1","yasmin","zapata","zzzzz1","stooge","tangerin","taztaz","stewart1","summer69","sweetness","system1","surveyor","stirling","3qvqod","3way","456321","sizzle","simhrq","shrink","shawnee","someday","sparty","ssptx452","sphere","spark","slammed","sober","persian","peppers","ploppy","pn5jvw","poobear","pianos","plaster","testme","tiff","thriller","larissa","lennox","jewell","master12","messier","rockey","1229","1217","1478","1009","anastasi","almighty","amonra","aragon","argentin","albino","azazel","grinder","6uldv8","83y6pv","8888888","4tlved","515051","carsten","changes","flanders","flyers88","ffffff1","firehawk","foreman","firedog","flashman","ggggg1","gerber","godspeed","galway","giveitup","funtimes","gohan","giveme","geryfe","frenchie","sayang","rudeboy","savanna","sandals","devine","dougal","drag0n","dga9la","disaster","desktop","only","onlyone","otter","pandas","mafia","lombard","luckys","lovejoy","lovelife","manders","product","qqh92r","qcmfd454","pork","radar1","punani","ptbdhw","turtles","undertaker","trs8f7","tramp","ugejvp","abba","911turbo","acdc","abcd123","clever","corina","cristian","create","crash1","colony","crosby","delboy","daniele","davinci","daughter","notebook","niki","nitrox","borabora","bonzai","budd","brisbane","hotter","heeled","heroes","hooyah","hotgirl","i62gbq","horse1","hills","hpk2qc","epvjb6","echo","korean","kristie","mnbvc","mohammad","mind","mommy1","munster","wade","wiccan","wanted","jacket","2369","bettyboo","blondy","bismark","beanbag","bjhgfi","blackice","yvtte545","ynot","yess","zlzfrh","wolvie","007bond","******","tailgate","tanya1","sxhq65","stinky1","3234412","3ki42x","seville","shimmer","sheryl","sienna","shitshit","skillet","seaman","sooners1","solaris","smartass","pastor","pasta","pedros","pennywis","pfloyd","tobydog","thetruth","lethal","letme1n","leland","jenifer","mario66","micky","rocky2","rewq","ripped","reindeer","1128","1207","1104","1432","aprilia","allstate","alyson","bagels","basic","baggies","barb","barrage","greatest","gomez","guru","guard","72d5tn","606060","4wcqjn","caldwell","chance1","catalog","faust","film","flange","fran","fartman","geil","gbhcf2","fussball","glen","fuaqz4","gameboy","garnet","geneviev","rotary","seahawk","russel","saab","seal","samadams","devlt4","ditto","drevil","drinker","deuce","dipstick","donut","octopus","ottawa","losangel","loverman","porky","q9umoz","rapture","pump","pussy4me","university","triplex","ue8fpw","trent","trophy","turbos","troubles","agent","aaa340","churchil","crazyman","consult","creepy","craven","class","cutiepie","ddddd1","dejavu","cuxldv","nettie","nbvibt","nikon","niko","norwood","nascar1","nolan","bubba2","boobear","boogers","buff","bullwink","bully","bulldawg","horsemen","escalade","editor","eagle2","dynamic","ella","efyreg","edition","kidney","minnesot","mogwai","morrow","msnxbi","moonlight","mwq6qlzo","wars","werder","verygood","voodoo1","wheel","iiiiii1","159951","1624","1911a1","2244","bellagio","bedlam","belkin","bill1","woodrow","xirt2k","worship","??????","tanaka","swift","susieq","sundown","sukebe","tales","swifty","2fast4u","senate","sexe","sickness","shroom","shaun","seaweed","skeeter1","status","snicker","sorrow","spanky1","spook","patti","phaedrus","pilots","pinch","peddler","theo","thumper1","tessie","tiger7","tmjxn151","thematri","l2g7k3","letmeinn","lazy","jeffjeff","joan","johnmish","mantra","mariana","mike69","marshal","mart","mazda6","riptide","robots","rental","1107","1130","142857","11001001","1134","armored","alvin","alec","allnight","alright","amatuers","bartok","attorney","astral","baboon","bahamas","balls1","bassoon","hcleeb","happyman","granite","graywolf","golf1","gomets","8vjzus","7890","789123","8uiazp","5757","474jdvff","551scasi","50cent","camaro1","cherry1","chemist","final","firenze","fishtank","farrell","freewill","glendale","frogfrog","gerhardt","ganesh","same","scirocco","devilman","doodles","dinger","okinawa","olympic","nursing","orpheus","ohmygod","paisley","pallmall","null","lounge","lunchbox","manhatta","mahalo","mandarin","qwqwqw","qguvyt","pxx3eftp","president","rambler","puzzle","poppy1","turk182","trotter","vdlxuc","trish","tugboat","valiant","tracie","uwrl7c","chris123","coaster","cmfnpu","decimal","debbie1","dandy","daedalus","dede","natasha1","nissan1","nancy123","nevermin","napalm","newcastle","boats","branden","britt","bonghit","hester","ibxnsm","hhhhhh1","holger","durham","edmonton","erwin","equinox","dvader","kimmy","knulla","mustafa","monsoon","mistral","morgana","monica1","mojave","month","monterey","mrbill","vkaxcs","victor1","wacker","wendell","violator","vfdhif","wilson1","wavpzt","verena","wildstar","winter99","iqzzt580","jarrod","imback","1914","19741974","1monkey","1q2w3e4r5t","2500","2255","blank","bigshow","bigbucks","blackcoc","zoomer","wtcacq","wobble","xmen","xjznq5","yesterda","yhwnqc","zzzxxx","streak","393939","2fchbg","skinhead","skilled","shakira","shaft","shadow12","seaside","sigrid","sinful","silicon","smk7366","snapshot","sniper1","soccer11","staff","slap","smutty","peepers","pleasant","plokij","pdiddy","pimpdaddy","thrust","terran","topaz","today1","lionhear","littlema","lauren1","lincoln1","lgnu9d","laughing","juneau","methos","medina","merlyn","rogue1","romulus","redshift","1202","1469","12locked","arizona1","alfarome","al9agd","aol123","altec","apollo1","arse","baker1","bbb747","bach","axeman","astro1","hawthorn","goodfell","hawks1","gstring","hannes","8543852","868686","4ng62t","554uzpad","5401","567890","5232","catfood","frame","flow","fire1","flipflop","fffff1","fozzie","fluff","garrison","fzappa","furious","round","rustydog","sandberg","scarab","satin","ruger","samsung1","destin","diablo2","dreamer1","detectiv","dominick","doqvq3","drywall","paladin1","papabear","offroad","panasonic","nyyankee","luetdi","qcfmtz","pyf8ah","puddles","privacy","rainer","pussyeat","ralph1","princeto","trivia","trewq","tri5a3","advent","9898","agyvorc","clarkie","coach1","courier","contest","christo","corinna","chowder","concept","climbing","cyzkhw","davidb","dad2ownu","days","daredevi","de7mdf","nose","necklace","nazgul","booboo1","broad","bonzo","brenna","boot","butch1","huskers1","hgfdsa","hornyman","elmer","elektra","england1","elodie","kermit1","knife","kaboom","minute","modern","motherfucker","morten","mocha","monday1","morgoth","ward","weewee","weenie","walters","vorlon","website","wahoo","ilovegod","insider","jayman","1911","1dallas","1900","1ranger","201jedlz","2501","1qaz","bertram","bignuts","bigbad","beebee","billows","belize","bebe","wvj5np","wu4etd","yamaha1","wrinkle5","zebra1","yankee1","zoomzoom","09876543","0311","?????","stjabn","tainted","3tmnej","shoot","skooter","skelter","sixteen","starlite","smack","spice1","stacey1","smithy","perrin","pollux","peternorth","pixie","paulina","piston","pick","poets","pine","toons","tooth","topspin","kugm7b","legends","jeepjeep","juliana","joystick","junkmail","jojojojo","jonboy","judge","midland","meteor","mccabe","matter","mayfair","meeting","merrill","raul","riches","reznor","rockrock","reboot","reject","robyn","renee1","roadway","rasta220","1411","1478963","1019","archery","allman","andyandy","barks","bagpuss","auckland","gooseman","hazmat","gucci","guns","grammy","happydog","greek","7kbe9d","7676","6bjvpe","5lyedn","5858","5291","charlie2","chas","c7lrwu","candys","chateau","ccccc1","cardinals","fear","fihdfv","fortune12","gocats","gaelic","fwsadn","godboy","gldmeo","fx3tuo","fubar1","garland","generals","gforce","rxmtkp","rulz","sairam","dunhill","division","dogggg","detect","details","doll","drinks","ozlq6qwm","ov3ajy","lockout","makayla","macgyver","mallorca","loves","prima","pvjegu","qhxbij","raphael","prelude1","totoro","tusymo","trousers","tunnel","valeria","tulane","turtle1","tracy1","aerosmit","abbey1","address","clticic","clueless","cooper1","comets","collect","corbin","delpiero","derick","cyprus","dante1","dave1","nounours","neal","nexus6","nero","nogard","norfolk","brent1","booyah","bootleg","buckaroo","bulls23","bulls1","booper","heretic","icecube","hellno","hounds","honeydew","hooters1","hoes","howie","hevnm4","hugohugo","eighty","epson","evangeli","eeeee1","eyphed","tiwaribachjayega"];const Y2e=()=>{var v,S,m,p,b,x,k,N,_;const e=Qe({firstName:ge().required("First name is required"),lastName:ge().required("Last name is required"),email:ge().email().required("Email is required"),dob:ge().test("is-not-in-future","Not a valid date",C=>(console.log("testing here",C),C==""?!0:new Date(C)<new Date)).test("must-be-at-least-18yo","Must be at least 18 years of age",C=>Te().diff(Te(C),"years")>18),password:ge().required("Password is required").min(10,"Password must be at least 10 characters long").matches(/^(?=.*[0-9])/,"Password must contain at least one digit(0-9)").matches(/^(?=.*[a-z])/,"Password must contain at least one lowercase letter").matches(/^(?=.*[A-Z])/,"Password must contain at least one uppercase letter").matches(/^(?=.*[!@#\$%\^&\*])/,"Password must contain at least one symbol").test("is-not-dictionary","Password must not contain a common word",C=>fh.every(E=>!C.includes(E))).test("does-not-contain-user-info","Password must not contain your name or date of birth",(C,E)=>{const T=Te(E.parent.dob);return[E.parent.firstName,E.parent.lastName,T.format("yyyyMMDD"),T.format("DDMMyyyy"),T.format("MMDDyyyy"),T.format("YYMMDD"),T.format("MMDDYY"),T.format("DDMMYY")].every(D=>D.trim()==""||!C.toLowerCase().includes(D.toLowerCase()))}),role:ge().required(),status:ge().required(),verify:ge().required()}),{dispatch:t,state:n}=R.useContext(Ee),{dispatch:a}=R.useContext(we),r=je(),{register:i,handleSubmit:o,setError:c,trigger:l,formState:{errors:d,dirtyFields:u}}=Oe({resolver:Xe(e),defaultValues:{password:""},criteriaMode:"all",mode:"all"}),g=async C=>{console.log("submitting",C);let E=new _e;try{const T=await E.callRawAPI("/v2/api/custom/ergo/register",{firstName:C.firstName,lastName:C.lastName,status:C.status||0,email:C.email,password:C.password,dob:C.dob||null,verify:C.verify||0,role:C.role,payment_method_set:0},"POST");if(!T.error)pe(t,"Added"),r("/admin/user");else if(T!=null&&T.validation){const D=Object.keys(T.validation);for(let P=0;P<D.length;P++){const M=D[P];c(M,{type:"manual",message:T.validation[M]})}}E.setTable("device"),await E.callRestAPI({active:1,user_id:T.user_id,last_login_time:new Date().toISOString().split("T")[0],uid:localStorage.getItem("device-uid")},"POST")}catch(T){c("firstName",{type:"manual",message:T.message}),me(t,T.message)}};R.useEffect(()=>{a({type:"SETPATH",payload:{path:"user"}})},[]);function y(){var E,T,D,P,M,O,F,z,H;var C=[];return Array.isArray((E=d.password)==null?void 0:E.types.matches)&&(C=[...d.password.types.matches]),typeof((D=(T=d.password)==null?void 0:T.types)==null?void 0:D.matches)=="string"&&C.push(d.password.types.matches),(M=(P=d.password)==null?void 0:P.types)!=null&&M.min&&C.push(d.password.types.min),(O=d.password)!=null&&O.types["does-not-contain-user-info"]&&C.push((F=d.password)==null?void 0:F.types["does-not-contain-user-info"]),(z=d.password)!=null&&z.types["is-not-dictionary"]&&C.push((H=d.password)==null?void 0:H.types["is-not-dictionary"]),C}const w=y();return s(Sa,{title:"User",backTo:"user",children:s("div",{className:"border-t-0 p-5",children:f("form",{className:" w-full max-w-sm",onSubmit:o(g),autoComplete:"off",children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First Name"}),s("input",{id:"firstName",type:"text",...i("firstName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(v=d.firstName)!=null&&v.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500 ",children:(S=d.firstName)==null?void 0:S.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last Name"}),s("input",{type:"text",id:"lastName",...i("lastName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(m=d.lastName)!=null&&m.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(p=d.lastName)==null?void 0:p.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...i("email"),autoComplete:"off",className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=d.email)!=null&&b.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(x=d.email)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date Of Birth"}),s("input",{type:"date",id:"dob",min:"1950-01-01",...i("dob"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(k=d.dob)!=null&&k.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(N=d.dob)==null?void 0:N.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 capitalize leading-tight text-gray-700 focus:outline-none",...i("role"),children:(n.role=="superadmin"?["superadmin","admin","host","customer"]:["admin","host","customer"]).map(C=>s("option",{value:C,children:C},C))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...i("status"),children:["Inactive","Active"].map((C,E)=>s("option",{value:E,children:C},E))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...i("verify"),defaultValue:0,children:["No","Yes"].map((C,E)=>s("option",{value:E,children:C},E))})]}),f("div",{className:"mb-5",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"password",children:"Password"}),s("input",{id:"password",type:"password",...i("password",{onChange:()=>{l("password")}}),autoComplete:"new-password",className:` mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(_=d.password)!=null&&_.message?"border-red-500":""}`}),u.password&&s("div",{className:"fade-in mb-4 space-y-2 rounded-sm border border-[#C42945] p-3 text-sm normal-case text-[#C42945] empty:hidden",children:w.map((C,E)=>s("p",{children:C},E))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>r("/admin/user"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})})};let Yi=new _e;const G2e=()=>{var T,D,P,M,O,F,z,H;const e=Qe({firstName:ge().required(),lastName:ge().required(),email:ge().email().required(),password:ge(),status:ge(),dob:ge().nullable(),role:ge(),verify:ge()}).required(),{dispatch:t,state:n}=R.useContext(Ee),{dispatch:a,state:r}=R.useContext(we),i=h.exports.useRef(null),o=je(),c=Mt(),[l,d]=h.exports.useState(""),[u,g]=h.exports.useState(""),[y,w]=h.exports.useState(""),[v,S]=h.exports.useState(0),{trigger:m,register:p,handleSubmit:b,setError:x,setValue:k,formState:{errors:N}}=Oe({resolver:Xe(e)}),_=[{key:"0",value:"Inactive"},{key:"1",value:"Active"}],C=[{key:"0",value:"No"},{key:"1",value:"Yes"}],E=async A=>{console.log("got here",A);try{if(l!==A.email){console.log("here",l,A.email);const B=await Yi.updateEmailByAdmin(A.email,v);if(!B.error)pe(a,"Email Updated",1e3);else if(B.validation){const Y=Object.keys(B.validation);for(let U=0;U<Y.length;U++){const W=Y[U];x(W,{type:"manual",message:B.validation[W]})}}}Yi.setTable("user");const j=await Yi.callRestAPI({id:v,first_name:A.firstName,last_name:A.lastName,email:A.email,role:A.role.toLowerCase(),status:A.status,verify:A.verify||0},"PUT");if(Yi.setTable("profile"),(await Yi.callRestAPI({set:{dob:A.dob},where:{user_id:v}},"PUTWHERE")).error)x("dob",{type:"manual",message:"Date of birth is required"});else if(!j.error)pe(a,"Updated",4e3),o("/admin/user");else if(j.validation){const B=Object.keys(j.validation);for(let Y=0;Y<B.length;Y++){const U=B[Y];x(U,{type:"manual",message:j.validation[U]})}}}catch(j){console.log("Error",j),x("email",{type:"manual",message:j.message}),me(t,j.message)}};return h.exports.useEffect(()=>{r.saveChanges&&(console.log("triggering"),m().then(A=>{A&&b(E)()}),a({type:"SAVE_CHANGES",payload:{saveChanges:!1}}))},[r.saveChanges]),h.exports.useEffect(()=>{a({type:"SETPATH",payload:{path:"user"}}),async function(){try{Yi.setTable("user");const A=await Yi.callRestAPI({id:Number(c==null?void 0:c.id)},"GET");Yi.setTable("profile");const{list:[j]}=await Yi.callRestAPI({payload:{user_id:A.model.id}},"GETALL");A.error||(k("firstName",A.model.first_name),k("lastName",A.model.last_name),k("email",A.model.email),k("role",A.model.role),k("dob",j!=null&&j.dob?Te(j.dob).format("yyyy-MM-DD"):null),k("status",A.model.status),k("verify",A.model.verify),d(A.model.email),g(A.model.first_name),w(A.model.last_name),S(A.model.id))}catch(A){console.log("Error",A),me(t,A.message)}}()},[]),s(Ja,{title:"User",backTo:"user",table1:"user",table2:"profile",deleteMessage:"Are you sure you want to delete this User?",id:v,children:f("form",{className:" w-full max-w-sm",onSubmit:b(E),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First name"}),s("input",{id:"firstName",type:"text",...p("firstName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(T=N.firstName)!=null&&T.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(D=N.firstName)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last name"}),s("input",{type:"text",id:"lastName",...p("lastName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(P=N.lastName)!=null&&P.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(M=N.lastName)==null?void 0:M.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...p("email"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(O=N.email)!=null&&O.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(F=N.email)==null?void 0:F.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date of birth"}),s("input",{type:"date",id:"dob",...p("dob"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(z=N.dob)!=null&&z.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(H=N.dob)==null?void 0:H.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:"mb-3 w-full rounded border bg-white py-2 px-3 capitalize leading-tight text-gray-700 focus:outline-none",...p("role"),children:(n.originalRole=="superadmin"?["superadmin","admin","host","customer"]:["admin","host","customer"]).map(A=>s("option",{value:A,children:A},A))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...p("status"),children:_.map(A=>s("option",{name:"status",value:A.key,children:A.value},A.key))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...p("verify"),defaultValue:0,children:C.map(A=>s("option",{name:"verify",value:A.key,children:A.value},A.key))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>o("/admin/user"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"button",onClick:()=>a({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Changes",type:"Edit",modalShowMessage:`Are you sure you want to update ${u||""}${y?" "+y:""}'s profile?`,modalBtnText:"Yes, save changes"}}),className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"}),s("button",{ref:i,type:"submit",className:"hidden"})]})]})})};let Vo=new _e;const q2e=()=>{var S;const e=["Inactive","Active","Suspend"],t=["No","Yes"],n=["Pending","Yes","No"],[a,r]=h.exports.useState({}),{dispatch:i}=R.useContext(we),{dispatch:o,state:c}=R.useContext(Ee),l=Mt(),d=je(),[u,g]=h.exports.useState(!1);async function y(){try{Vo.setTable("user");const m=await Vo.callRestAPI({id:Number(l==null?void 0:l.id)},"GET");Vo.setTable("profile");const{list:[p]}=await Vo.callRestAPI({payload:{user_id:m.model.id}},"GETALL");Vo.setTable("id_verification");const{list:[b]}=await Vo.callRestAPI({payload:{user_id:m.model.id}},"GETALL");r({...m.model,dob:p==null?void 0:p.dob,id_verified:b==null?void 0:b.status})}catch(m){me(o,m.message),pe(i,m.message,4e3,"ERROR")}}async function w(){g(!0);try{await Vo.forgot(a.email,a.role),pe(i,"Email Sent")}catch(m){me(o,m.message),pe(i,m.message,4e3,"ERROR")}g(!1)}async function v(){try{await Vo.callRawAPI("/v2/api/custom/ergo/resend-verification-email",{email:a.email},"POST"),pe(i,"Email Sent")}catch(m){me(o,m.message),pe(i,m.message,4e3,"ERROR")}}return R.useEffect(()=>{i({type:"SETPATH",payload:{path:"user"}}),y()},[]),s(wf,{title:"User",backTo:"user",table1:"user",table2:"profile",deleteMessage:"Are you sure you want to delete this User?",id:l==null?void 0:l.id,showDelete:c.originalRole=="superadmin"||a.role!="superadmin",children:s("div",{className:"py-5",children:f("div",{className:"w-full max-w-xl",children:[f("div",{className:"mb-5 flex px-5",children:[s("p",{className:"w-[15rem] text-base font-bold",children:"Profile Details"}),!(c.role!="superadmin"&&a.role=="superadmin")&&s("div",{className:"flex-1",children:f("button",{className:"flex items-center text-[#33D4B7]",onClick:()=>d(`/admin/edit-user/${l==null?void 0:l.id}`),children:[s(ln,{type:"pencil",className:"stroke-[#33D4B7]"}),s("span",{className:"ml-2",children:"Edit"})]})})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID"}),s("p",{className:"flex-1",children:a.id})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"First Name"}),s("p",{className:"flex-1",children:a.first_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Last Name"}),s("p",{className:"flex-1",children:a.last_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Email"}),s("p",{className:"flex-1 normal-case",children:a.email})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Date of Birth"}),s("p",{className:"flex-1",children:a.dob==null?"N/A":Te(a.dob).format("MM/DD/yyyy")})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Role"}),s("p",{className:"flex-1",children:a.role})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Status"}),s("p",{className:"flex-1",children:e[a.status]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Email Verified"}),s("p",{className:"flex-1",children:t[a.verify]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID Verified"}),s("p",{className:"flex-1",children:(S=n[a.id_verified])!=null?S:"N/A"})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Actions"}),s("button",{disabled:u,onClick:w,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Send A Password Reset Link"}),s("button",{disabled:u,onClick:v,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Resend Email Verification"})]})]})})})};let Cw=new _e;const Z2e=()=>{var X,ne,oe;const{dispatch:e,state:t}=R.useContext(we),{dispatch:n}=R.useContext(Ee),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((X=localStorage.getItem("admin_host_filter"))!=null?X:""),N=je(),[_,C]=R.useState(""),[E,T]=R.useState(!1),[D,P]=R.useState({}),M=Qe({id:ge(),email:ge()}),{reset:O,register:F,handleSubmit:z,formState:{errors:H}}=Oe({resolver:Xe(M),defaultValues:Ue(x)});function A(q){(async function(){l(q),await U(0,q)})()}function j(){(async function(){await U(w-1>0?w-1:0,c)})()}function I(q){const te=a,G=te.findIndex(Q=>Q.accessor===q),J=te[G];J.isSortedDesc=!J.isSortedDesc,te.splice(G,1,J),r(()=>[...te]);const K=B(i,J.isSortedDesc,q);o(K)}function B(q,te,G){return(G==null?void 0:G.split(",").length)>1&&(G=G.split(",")[0]),q.sort((J,K)=>{var Q,Z,se,ce;if(te)return isNaN(J[G])?((Q=J[G])==null?void 0:Q.toLowerCase())<((Z=K[G])==null?void 0:Z.toLowerCase())?1:-1:J[G]<K[G]?1:-1;if(!te)return isNaN(J[G])?((se=J[G])==null?void 0:se.toLowerCase())<((ce=K[G])==null?void 0:ce.toLowerCase())?-1:1:J[G]<K[G]?-1:1})}function Y(){(async function(){await U(w+1<=d?w+1:0,c)})()}async function U(q,te){var J;const G=Ue(x);G.id=(J=G.id)==null?void 0:J.replace(mt.HOST,"");try{const K=await Cw.callRawAPI("/v2/api/custom/ergo/user/PAGINATEHOST",{where:[G?`${G.id?`ergo_user.id = '${G.id}'`:"1"} AND ${G.email?`ergo_user.email LIKE '%${G.email}%'`:"1"}`:"role = 'host'","ergo_user.deleted_at IS NULL"],page:q,sortId:"create_at",direction:"DESC",limit:te},"POST"),{list:Q,total:Z,limit:se,num_pages:ce,page:le}=K,ae=B(Q,!1);o(ae),l(se),u(ce),v(le),y(Z),m(le>1),b(le+1<=ce)}catch(K){me(n,K.message),pe(e,K.message,4e3,"ERROR")}}const W=q=>{x.set("email",q.email),x.set("id",q.id),k(x),localStorage.setItem("admin_host_filter",x.toString()),U(0,c)};R.useEffect(()=>{e({type:"SETPATH",payload:{path:"host"}}),async function(){await V(),await U(0,c)}()},[]),R.useEffect(()=>{t.deleted&&(e({type:"DELETED",payload:{deleted:!1}}),U(w,c))},[t.deleted]);async function V(){var te;Cw.setTable("settings");const q={key_name:"admin_host_column_order"};try{const G=await Cw.callRestAPI({limit:1,page:1,payload:q},"PAGINATE");Array.isArray(G.list)&&G.list.length>0&&r(va((te=G.list[0].optional_data)!=null?te:[],_a.admin_host))}catch(G){me(n,G.message),pe(e,G.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:z(W),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Hosts"}),s(ma,{link:"/admin/add-host",text:"Add New host"})]}),f("div",{className:"filter-form-holder mt-2 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"ID"}),s("input",{type:"text",...F("id"),className:" focus:shadow-outline mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(ne=H.id)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Email"}),s("input",{type:"email",...F("email"),className:" focus:shadow-outline mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(oe=H.email)==null?void 0:oe.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{O({id:"",email:""}),Pt(x,k),localStorage.removeItem("admin_host_filter"),U(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:A}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/host",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"hosts",sheet:"hosts",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto normal-case",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:a.map((q,te)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>I(q.accessor),children:[q.header,q.isSorted,s("span",{children:q.isSorted?q.isSortedDesc?" \u25BC":" \u25B2":""})]},te))})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((q,te)=>s("tr",{className:"py-2 text-sm",children:a.map((G,J)=>G.accessor.split(",").length>1?s("td",{className:"whitespace-nowrap px-6 py-4",children:G.accessor.split(",").map((K,Q)=>s("span",{className:`mr-2 ${G!=null&&G.multiline?"mb-1 block":""}`,children:q[K.trim()]},Q))},J):G.accessor===""?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[q.photo?s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{C(q.photo),T(!0)},children:"View Picture"}):s("span",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",children:"No Photo"}),s("button",{className:"ml-2 border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{N(`/admin/view-host/${q.id}`,{state:q})},children:"View Profile"})]},J):G.statusMapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:`${q[G.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full border border-[#EAECF0] bg-[#F9FAFB] py-[2px] px-[10px]`,children:[" ",G.statusMapping[q[G.accessor]]]})},J):G.accessor=="num_properties"?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case ",children:s("button",{className:"border-r border-gray-200 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-2 font-bold text-transparent",onClick:()=>{N(`/admin/property_spaces?host_id=${q.id}`)},children:"View"})},J):G.accessor.includes("payout")||G.amountField?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case ",children:f("span",{className:"ml-2",children:["$",(q[G.accessor]?q[G.accessor]:0).toFixed(2)]})},J):G.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:G.idPrefix+q[G.accessor]},J):s("td",{className:"whitespace-nowrap px-6 py-4",children:q[G.accessor]},J))},te))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:A,previousPage:j,nextPage:Y}),s(c5,{modalOpen:E,modalImage:_,closeModal:()=>T(!1)}),s(d5,{modalOpen:D.id!=null,closeModal:()=>P({}),data:D,onSuccess:()=>U(w,c)})]})},Q2e=()=>{var w,v,S,m,p,b,x,k,N;const e=Qe({firstName:ge().required("First name is required"),lastName:ge().required("Last name is required"),email:ge().email().required("Email is required"),dob:ge().test("is-not-in-future","Not a valid date",_=>(console.log("testing here",_),_==""?!0:new Date(_)<new Date)).test("must-be-at-least-18yo","Must be at least 18 years of age",_=>Te().diff(Te(_),"years")>18),password:ge().required("Password is required").min(10,"Password must be at least 10 characters long").matches(/^(?=.*[0-9])/,"Password must contain at least one digit(0-9)").matches(/^(?=.*[a-z])/,"Password must contain at least one lowercase letter").matches(/^(?=.*[A-Z])/,"Password must contain at least one uppercase letter").matches(/^(?=.*[!@#\$%\^&\*])/,"Password must contain at least one symbol").test("is-not-dictionary","Password must not contain a common word",_=>fh.every(C=>!_.includes(C))).test("does-not-contain-user-info","Password must not contain your name or date of birth",(_,C)=>{const E=Te(C.parent.dob);return[C.parent.firstName,C.parent.lastName,E.format("yyyyMMDD"),E.format("DDMMyyyy"),E.format("MMDDyyyy"),E.format("YYMMDD"),E.format("MMDDYY"),E.format("DDMMYY")].every(T=>T.trim()==""||!_.toLowerCase().includes(T.toLowerCase()))}),role:ge().required(),status:ge().required(),verify:ge().required()}),{dispatch:t}=R.useContext(Ee),{dispatch:n}=R.useContext(we),a=je(),{register:r,handleSubmit:i,setError:o,trigger:c,formState:{errors:l,dirtyFields:d}}=Oe({resolver:Xe(e),defaultValues:{password:""},criteriaMode:"all",mode:"all"}),u=async _=>{console.log("submitting",_);let C=new _e;try{const E=await C.callRawAPI("/v2/api/custom/ergo/register",{firstName:_.firstName,lastName:_.lastName,status:_.status||0,email:_.email,password:_.password,dob:_.dob||null,verify:_.verify||0,role:"host",payment_method_set:0},"POST");if(!E.error)pe(t,"Added"),a("/admin/host");else if(E!=null&&E.validation){const T=Object.keys(E.validation);for(let D=0;D<T.length;D++){const P=T[D];o(P,{type:"manual",message:E.validation[P]})}}C.setTable("device"),await C.callRestAPI({active:1,user_id:E.user_id,last_login_time:new Date().toISOString().split("T")[0],uid:localStorage.getItem("device-uid")},"POST")}catch(E){o("firstName",{type:"manual",message:E.message}),me(t,E.message)}};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"host"}})},[]);function g(){var C,E,T,D,P,M,O,F,z;var _=[];return Array.isArray((C=l.password)==null?void 0:C.types.matches)&&(_=[...l.password.types.matches]),typeof((T=(E=l.password)==null?void 0:E.types)==null?void 0:T.matches)=="string"&&_.push(l.password.types.matches),(P=(D=l.password)==null?void 0:D.types)!=null&&P.min&&_.push(l.password.types.min),(M=l.password)!=null&&M.types["does-not-contain-user-info"]&&_.push((O=l.password)==null?void 0:O.types["does-not-contain-user-info"]),(F=l.password)!=null&&F.types["is-not-dictionary"]&&_.push((z=l.password)==null?void 0:z.types["is-not-dictionary"]),_}const y=g();return s(Sa,{title:"Host",backTo:"host",children:s("div",{className:"border-t-0 p-5",children:f("form",{className:" w-full max-w-sm",onSubmit:i(u),autoComplete:"off",children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First Name"}),s("input",{id:"firstName",type:"text",...r("firstName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(w=l.firstName)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500 ",children:(v=l.firstName)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last Name"}),s("input",{type:"text",id:"lastName",...r("lastName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(S=l.lastName)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(m=l.lastName)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...r("email"),autoComplete:"off",className:`"w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(p=l.email)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(b=l.email)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date Of Birth"}),s("input",{type:"date",id:"dob",min:"1950-01-01",...r("dob"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(x=l.dob)!=null&&x.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(k=l.dob)==null?void 0:k.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 capitalize leading-tight text-gray-700 focus:outline-none",...r("role"),children:["host"].map(_=>s("option",{value:_,children:_},_))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...r("status"),children:["Inactive","Active"].map((_,C)=>s("option",{value:C,children:_},C))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...r("verify"),defaultValue:0,children:["No","Yes"].map((_,C)=>s("option",{value:C,children:_},C))})]}),f("div",{className:"mb-5",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"password",children:"Password"}),s("input",{id:"password",type:"password",...r("password",{onChange:()=>{c("password")}}),autoComplete:"new-password",className:` mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(N=l.password)!=null&&N.message?"border-red-500":""}`}),d.password&&s("div",{className:"fade-in mb-4 space-y-2 rounded-sm border border-[#C42945] p-3 text-sm normal-case text-[#C42945] empty:hidden",children:y.map((_,C)=>s("p",{children:_},C))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/host"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})})},u5=({id:e,table:t})=>{const n=je();R.useState("");const[a,r]=R.useState([]),[i,o]=R.useState(10),[c,l]=R.useState(0),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(!1),[S,m]=R.useState(!1),p=[{key:"0",value:"Pending"},{key:"1",value:"Upcoming"},{key:"2",value:"Ongoing"},{key:"3",value:"Complete"},{key:"4",value:"Declined"},{key:"5",value:"Cancelled"}];function b(_){(async function(){o(_),await N(0,_)})()}function x(){(async function(){await N(g-1>0?g-1:0,i)})()}function k(){(async function(){await N(g+1<=c?g+1:0,i)})()}async function N(_,C){try{const T=await new _e().callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{where:[t?`${t==="customer"?`customer.id = ${e}`:"1"} AND ${t==="host"?`ergo_user.id = ${e}`:"1"} AND ${t=="property"?`ergo_property.id = ${e}`:"1"}`:1],page:_,limit:C},"POST"),{list:D,total:P,limit:M,num_pages:O,page:F}=T;r(D),o(M),l(O),y(F),u(P),v(F>1),m(F+1<=O)}catch(E){console.log("ERROR",E),tokenExpireError(dispatch,E.message)}}return R.useEffect(()=>{(async function(){await N(1,i)})()},[]),f(Se,{children:[s(Ln,{currentPage:g,pageSize:i,totalNumber:d,updatePageSize:b}),s("div",{className:"overflow-x-auto p-5 bg-white shadow rounded",children:a.map(_=>{var C,E,T,D,P;return f("div",{className:"border rounded px-5 py-4 flex justify-between flex-col lg:flex-row mb-4",children:[s("div",{children:mt.BOOKINGS+_.id}),s("img",{src:_.image_url,className:"h-24 max-w-[135px]",alt:"property_image"}),f("div",{className:"min-w-[219px] max-w-[219px] mb-4",children:[s("p",{className:"font-semibold text-xl text-[#101828] mb-1",children:_.property_name}),s("p",{className:"text-xs font-medium mb-1",children:_.space_category}),s("p",{className:"bg-gray-200 text-xs p-2 w-fit rounded",children:(C=p.find(M=>M.key==_.status))==null?void 0:C.value})]}),f("div",{className:"min-w-[219px] max-w-[219px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Host"}),f("p",{className:"mb-1 text-sm",children:[_.host_last_name,", ",_.host_first_name," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Customer"}),f("p",{className:"mb-1 text-xs",children:[_.customer_last_name,", ",_.customer_first_name," "]})]}),f("div",{className:"min-w-[72px] max-w-[72px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Date"}),f("p",{className:"mb-1 text-sm",children:[Te(_.booking_start_time).format("MM/DD/YY")," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Duration"}),f("p",{className:"mb-1 text-xs",children:[iy(_.duration)," "]})]}),f("div",{className:"min-w-[72px] max-w-[72px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Rate"}),f("p",{className:"mb-1 text-sm",children:["$",(E=_==null?void 0:_.rate)==null?void 0:E.toFixed(2)," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Tax"}),f("p",{className:"mb-1 text-xs",children:["$",(T=_==null?void 0:_.tax)==null?void 0:T.toFixed(2)]})]}),f("div",{className:"min-w-[72px] max-w-[72px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Total"}),f("p",{className:"mb-1 text-xs",children:["$",(D=_==null?void 0:_.total)==null?void 0:D.toFixed(2)," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Commission"}),f("p",{className:"mb-1 text-xs",children:["$",(P=_==null?void 0:_.commission)==null?void 0:P.toFixed(2)]})]}),f(jt,{as:"div",className:"relative min-w-[60px] max-w-[60px] inline-block text-left",children:[s("div",{className:"",children:s(jt.Button,{className:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-1 py-3 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#33D4B7] focus:ring-offset-2 focus:ring-offset-gray-100",children:s(ln,{type:"dots"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:({active:M})=>s("button",{onClick:()=>n(`/admin/edit-booking/${_.id}`),className:`${M?"bg-gray-100 text-gray-900":"text-gray-700"} w-full text-left block px-4 py-2 text-sm`,children:"Edit"})})})})})]})]},_.id)})}),s(vn,{currentPage:g,pageCount:c,pageSize:i,totalNumber:d,canPreviousPage:w,canNextPage:S,updatePageSize:b,previousPage:x,nextPage:k})]})},J2e=({id:e,table:t})=>{const n=je();R.useState("");const[a,r]=R.useState([]),[i,o]=R.useState(10),[c,l]=R.useState(0),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(!1),[S,m]=R.useState(!1),p=[{key:"0",value:"Pending"},{key:"1",value:"Initiated"},{key:"2",value:"Paid"},{key:"3",value:"Cancelled"}];function b(_){(async function(){o(_),await N(0,_)})()}function x(){(async function(){await N(g-1>0?g-1:0,i)})()}function k(){(async function(){await N(g+1<=c?g+1:0,i)})()}async function N(_,C){try{const T=await new _e().callRawAPI("/v2/api/custom/ergo/payout/PAGINATE",{where:[t?`${t==="host"?`ergo_user.id = ${e}`:"1"}`:1],page:_,limit:C},"POST"),{list:D,total:P,limit:M,num_pages:O,page:F}=T;r(D),o(M),l(O),y(F),u(P),v(F>1),m(F+1<=O)}catch(E){console.log("ERROR",E),tokenExpireError(dispatch,E.message)}}return R.useEffect(()=>{(async function(){await N(1,i)})()},[]),f(Se,{children:[s(Ln,{currentPage:g,pageSize:i,totalNumber:d,updatePageSize:b}),s("div",{className:"overflow-x-auto p-5 bg-white shadow rounded",children:a.map((_,C)=>{var E,T,D,P;return f("div",{className:"border rounded px-5 py-4 flex justify-between flex-col lg:flex-row mb-4",children:[s("div",{children:mt.PAYOUT+_.id}),f("div",{className:"min-w-[219px] max-w-[219px] mr-[22px]",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Host"}),f("p",{className:"mb-1 text-sm",children:[_.host_last_name,", ",_.host_first_name," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Customer"}),f("p",{className:"mb-1 text-sm",children:[_.customer_last_name,", ",_.customer_first_name," "]})]}),f("div",{className:"min-w-[219px] max-w-[219px] mr-[22px]",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Booking Date"}),f("p",{className:"mb-1 text-sm",children:[_.create_at," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Order Number"}),s("p",{className:"mb-1 text-sm",children:_.id})]}),f("div",{className:"min-w-[72px] max-w-[72px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Total"}),f("p",{className:"mb-1 text-sm",children:["$",(E=_==null?void 0:_.total)==null?void 0:E.toFixed(2)," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Tax"}),f("p",{className:"mb-1 text-sm",children:["$",(T=_==null?void 0:_.tax)==null?void 0:T.toFixed(2)]})]}),f("div",{className:"min-w-[72px] max-w-[72px] mb-4",children:[s("p",{className:"text-xs mb-1 font-medium ",children:"Commission"}),f("p",{className:"mb-1 text-sm",children:["$",(D=_==null?void 0:_.commission)==null?void 0:D.toFixed(2)," "]}),s("p",{className:"text-xs mb-1 font-medium ",children:"Payout Date"}),s("p",{className:"mb-1 text-sm",children:_!=null&&_.initiated_at?Te(_.initiated_at).add(7,"days").format("MM/DD/YY"):""})]}),s("div",{className:"flex min-w-[60px] max-w-[60px] mr-[22px] items-center justify-center",children:s("p",{children:(P=p.find(M=>M.key==_.status))==null?void 0:P.value})}),f(jt,{as:"div",className:"relative min-w-[60px] max-w-[60px] inline-block text-left",children:[s("div",{className:"h-full flex items-center",children:s(jt.Button,{className:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-1 py-3 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#33D4B7] focus:ring-offset-2 focus:ring-offset-gray-100",children:s(ln,{type:"dots"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:({active:M})=>s("button",{onClick:()=>n(`/admin/edit-payout/${_.id}`),className:`${M?"bg-gray-100 text-gray-900":"text-gray-700"} w-full text-left block px-4 py-2 text-sm`,children:"Edit"})})})})})]})]},C)})}),s(vn,{currentPage:g,pageCount:c,pageSize:i,totalNumber:d,canPreviousPage:w,canNextPage:S,updatePageSize:b,previousPage:x,nextPage:k})]})};let Gi=new _e;const K2e=()=>{var T,D;const e=Qe({firstName:ge().required(),lastName:ge().required(),email:ge().email().required(),password:ge(),status:ge(),dob:ge(),role:ge(),verify:ge()}).required(),{dispatch:t}=R.useContext(Ee),{dispatch:n,state:a}=R.useContext(we),r=je(),i=Mt(),o=h.exports.useRef(null),[c,l]=h.exports.useState(""),[d,u]=h.exports.useState(""),[g,y]=h.exports.useState(""),[w,v]=h.exports.useState(0),{register:S,handleSubmit:m,setError:p,setValue:b,trigger:x,formState:{errors:k}}=Oe({resolver:Xe(e)}),N=[{name:"role",value:"Host"}],_=[{key:"0",value:"Inactive"},{key:"1",value:"Active"}],C=[{key:"0",value:"No"},{key:"1",value:"Yes"}],E=async P=>{console.log("submitting",P);try{if(c!==P.email){const F=await Gi.updateEmailByAdmin(P.email,w);if(!F.error)pe(n,"Email Updated",1e3);else if(F.validation){const z=Object.keys(F.validation);for(let H=0;H<z.length;H++){const A=z[H];p(A,{type:"manual",message:F.validation[A]})}}}Gi.setTable("user");const M=await Gi.callRestAPI({id:w,first_name:P.firstName,last_name:P.lastName,email:P.email,role:P.role.toLowerCase(),status:P.status,verify:P.verify||0},"PUT");if(Gi.setTable("profile"),(await Gi.callRestAPI({set:{dob:P.dob},where:{user_id:w}},"PUTWHERE")).error)p("dob",{type:"manual",message:"Date of birth is required"});else if(!M.error)pe(n,"Updated",4e3),r("/admin/host");else if(M.validation){const F=Object.keys(M.validation);for(let z=0;z<F.length;z++){const H=F[z];p(H,{type:"manual",message:M.validation[H]})}}}catch(M){console.log("Error",M),p("email",{type:"manual",message:M.message}),me(t,M.message)}};return R.useEffect(()=>{a.saveChanges&&(o.current.click(),n({type:"SAVE_CHANGES",payload:{saveChanges:!1}}))},[a.saveChanges]),R.useEffect(()=>{n({type:"SETPATH",payload:{path:"host"}}),async function(){try{Gi.setTable("user");const P=await Gi.callRestAPI({id:Number(i==null?void 0:i.id)},"GET");Gi.setTable("profile");const{list:[M]}=await Gi.callRestAPI({payload:{user_id:P.model.id}},"GETALL");P.error||(b("firstName",P.model.first_name),b("lastName",P.model.last_name),b("email",P.model.email),b("role",P.model.role[0].toUpperCase()+P.model.role.slice(1)),b("dob",M!=null&&M.dob?Te(M.dob).format("yyyy-MM-DD"):null),b("status",P.model.status),l(P.model.email),b("verify",P.model.verify),u(P.model.first_name),y(P.model.last_name),v(P.model.id))}catch(P){console.log("Error",P),me(t,P.message)}}()},[]),f("form",{className:" mt-10 w-full max-w-sm",onSubmit:m(E),children:[f("div",{className:"mb-5 flex justify-between",children:[s("p",{className:"text-base font-bold",children:"Edit Host"}),s("button",{onClick:()=>r(`/admin/view-host/${i==null?void 0:i.id}`),children:"Cancel"})]}),f("div",{className:"mb-4 flex justify-between ",children:[s("p",{children:"ID"}),s("p",{className:"font-bold",children:w})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First name"}),s("input",{id:"firstName",type:"text",...S("firstName"),className:'" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none'}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last name"}),s("input",{type:"text",id:"lastName",...S("lastName"),className:'" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none '}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...S("email"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(T=k.email)!=null&&T.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(D=k.email)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date of birth"}),s("input",{type:"date",id:"dob",...S("dob"),className:'" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none '}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("role"),children:N.map(P=>s("option",{name:P.name,value:P.value,children:P.value},P.value))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("status"),children:_.map(P=>s("option",{name:"status",value:P.key,children:P.value},P.key))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("verify"),defaultValue:0,children:C.map(P=>s("option",{name:"verify",value:P.key,children:P.value},P.key))})]}),f("div",{className:"flex justify-between",children:[s("button",{type:"button",onClick:()=>r("/admin/host"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"button",onClick:()=>n({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Changes",type:"Edit",modalShowMessage:`Are you sure you want to update ${d||""}${g?" "+g:""}'s profile?`,modalBtnText:"Yes, save changes"}}),className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"}),s("button",{ref:o,type:"submit",className:"hidden"})]})]})};let Wo=new _e;const nE=({page:e})=>{const[t,n]=h.exports.useState({}),{dispatch:a}=R.useContext(we),{dispatch:r}=R.useContext(Ee),i=Mt(),[o,c]=h.exports.useState(0),[l,d]=h.exports.useState(!1),u=[{key:0,name:"Profile Details",component:e==="view"?s(X2e,{userInfo:t,loading:l,sendPasswordReset:y,sendEmailVerification:w}):s(K2e,{})},{key:1,name:"History",component:s(u5,{id:i==null?void 0:i.id,table:"host"})},{key:2,name:"Payment",component:s(J2e,{id:i==null?void 0:i.id,table:"host"})}];async function g(){try{Wo.setTable("user");const v=await Wo.callRawAPI("/v2/api/custom/ergo/user/PAGINATEHOST",{where:[i!=null&&i.id?`${i!=null&&i.id?`ergo_user.id = ${Number(i==null?void 0:i.id)}`:"1"} `:"role = 'host'"],page:1,limit:1},"POST");Wo.setTable("profile");const{list:[S]}=await Wo.callRestAPI({payload:{user_id:v.list[0].id}},"GETALL");Wo.setTable("id_verification");const{list:[m]}=await Wo.callRestAPI({payload:{user_id:v.list[0].id}},"GETALL");n({...v.list[0],dob:S==null?void 0:S.dob,id_verified:m==null?void 0:m.status})}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}}async function y(){d(!0);try{await Wo.forgot(t.email,t.role),pe(a,"Email Sent")}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}d(!1)}async function w(){try{await Wo.callRawAPI("/v2/api/custom/ergo/resend-verification-email",{email:t.email},"POST"),pe(a,"Email Sent")}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}}return R.useEffect(()=>{a({type:"SETPATH",payload:{path:"host"}}),g()},[]),f(wf,{title:"Host",name:`${t?`${t==null?void 0:t.first_name} ${t==null?void 0:t.last_name}`:""}`,backTo:"host",table1:"user",table2:"profile",deleteMessage:"Are you sure you want to delete this Host?",id:i==null?void 0:i.id,children:[s("div",{className:"border-b border-gray-200 text-center text-sm font-medium text-gray-500",children:s("ul",{className:"-mb-px flex flex-wrap",children:u.map(v=>s("li",{className:"mr-2",children:s("button",{onClick:()=>c(v.key),className:`inline-block p-4 ${o===v.key?"border-[#111827] font-bold text-[#111827]":" border-transparent hover:border-gray-300 hover:text-gray-600"} rounded-t-lg border-b-2 `,children:v.name})},v.key))})}),u[o].component]})},X2e=({userInfo:e,loading:t,sendPasswordReset:n,sendEmailVerification:a})=>{var d;const r=["Inactive","Active","Suspend"],i=["No","Yes"],o=["Pending","Yes","No"],c=Mt(),l=je();return s(Se,{children:s("div",{className:"p-5",children:f("div",{className:"w-full max-w-xl",children:[f("div",{className:"mb-5 flex px-5",children:[s("p",{className:"w-[15rem] text-base font-bold",children:"Profile Details"}),s("div",{className:"flex-1",children:f("button",{className:"flex items-center text-[#33D4B7]",onClick:()=>l(`/admin/edit-host/${c==null?void 0:c.id}`),children:[s(ln,{type:"pencil",className:"stroke-[#33D4B7]"}),s("span",{className:"ml-2",children:"Edit"})]})})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID"}),s("p",{className:"flex-1",children:mt.HOST+(e==null?void 0:e.id)})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"First Name"}),s("p",{className:"flex-1",children:e==null?void 0:e.first_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Last Name"}),s("p",{className:"flex-1",children:e==null?void 0:e.last_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right ",children:"Email"}),s("p",{className:"flex-1 normal-case",children:e==null?void 0:e.email})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Date of Birth"}),s("p",{className:"flex-1",children:e.dob==null?"N/A":Te(e.dob).format("MM/DD/yyyy")})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Properties"}),f("p",{className:"flex-1 ",children:[e==null?void 0:e.num_properties,s("button",{className:"ml-2 border-gray-200 font-bold underline",onClick:()=>{var u;l(`/admin/property?email=${(u=e==null?void 0:e.email)!=null?u:""}`)},children:"( View )"})]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Status"}),s("p",{className:"flex-1",children:r[e==null?void 0:e.status]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Email Verified"}),s("p",{className:"flex-1",children:i[e==null?void 0:e.verify]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID Verified"}),s("p",{className:"flex-1",children:(d=o[e==null?void 0:e.id_verified])!=null?d:"N/A"})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Actions"}),s("button",{disabled:t,onClick:n,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Send A Password Reset Link"}),s("button",{disabled:t,onClick:a,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Resend Email Verification"})]})]})})})};let aE=new _e,ewe=new St;const twe=()=>{var oe,q,te,G,J;const{dispatch:e,state:t}=R.useContext(we),{dispatch:n}=R.useContext(Ee);R.useState("");const[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),x=je(),[k,N]=lt((oe=localStorage.getItem("admin_customer_filter"))!=null?oe:""),[_,C]=R.useState(""),[E,T]=R.useState(!1),[D,P]=R.useState({}),M=Qe({id:ge(),email:ge(),role:ge(),status:ge(),first_name:ge(),last_name:ge()}),{reset:O,register:F,handleSubmit:z,formState:{errors:H}}=Oe({resolver:Xe(M),defaultValues:Ue(k)}),A=[{key:"",value:"All"},{key:"0",value:"Inactive"},{key:"1",value:"Active"},{key:"2",value:"Suspend"}],j=[{key:"",value:"All"},{key:"0",value:"No"},{key:"1",value:"Yes"}];function I(K){(async function(){l(K),await V(0,K)})()}function B(){(async function(){await V(w-1>0?w-1:0,c)})()}function Y(K){const Q=a,Z=Q.findIndex(le=>le.accessor===K),se=Q[Z];se.isSortedDesc=!se.isSortedDesc,Q.splice(Z,1,se),r(()=>[...Q]);const ce=U(i,se.isSortedDesc,K);o(ce)}function U(K,Q,Z){return(Z==null?void 0:Z.split(",").length)>1&&(Z=Z.split(",")[0]),K.sort((se,ce)=>{var le,ae,ie,de;if(Q)return isNaN(se[Z])?((le=se[Z])==null?void 0:le.toLowerCase())<((ae=ce[Z])==null?void 0:ae.toLowerCase())?1:-1:se[Z]<ce[Z]?1:-1;if(!Q)return isNaN(se[Z])?((ie=se[Z])==null?void 0:ie.toLowerCase())<((de=ce[Z])==null?void 0:de.toLowerCase())?-1:1:se[Z]<ce[Z]?-1:1})}function W(){(async function(){await V(w+1<=d?w+1:0,c)})()}async function V(K,Q,Z){var ce;const se=Ue(k);se.id=(ce=se.id)==null?void 0:ce.replace(mt.CUSTOMER,"");try{let le=["deleted_at,is","role,eq,'customer'"];se.id&&le.push(`id,eq,${se.id}`),se.email&&le.push(`email,cs,${se.email}`),se.first_name&&le.push(`first_name,cs,${se.first_name}`),se.last_name&&le.push(`last_name,cs,${se.last_name}`),se.verify&&le.push(`verify,eq,${se.verify}`),se.status&&le.push(`status,eq,${se.status}`);const ae=await ewe.getPaginate("user",{join:[],filter:le,page:K||1,size:Q,order:"update_at"}),{list:ie,total:de,limit:fe,num_pages:be,page:he}=ae,ve=U(ie,!1);o(ve),l(fe),u(be),v(he),y(de),m(he>1),b(he+1<=be)}catch(le){me(n,le.message),pe(e,le.message,4e3,"ERROR")}}const X=K=>{console.log("submitting",K),k.set("email",K.email),k.set("first_name",K.first_name),k.set("last_name",K.last_name),k.set("verify",K.verify),k.set("status",K.status),k.set("id",K.id),N(k),localStorage.setItem("admin_customer_filter",k.toString()),V(0,c,K.dob)};R.useEffect(()=>{e({type:"SETPATH",payload:{path:"customer"}}),async function(){await ne(),await V(0,c)}()},[]),R.useEffect(()=>{t.deleted&&(e({type:"DELETED",payload:{deleted:!1}}),V(w,c))},[t.deleted]);async function ne(){var Q;aE.setTable("settings");const K={key_name:"admin_customer_column_order"};try{const Z=await aE.callRestAPI({limit:1,page:1,payload:K},"PAGINATE");Array.isArray(Z.list)&&Z.list.length>0&&r(va((Q=Z.list[0].optional_data)!=null?Q:[],_a.admin_customer))}catch(Z){me(n,Z.message),pe(e,Z.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:z(X),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Search"}),s(ma,{link:"/admin/add-customer",text:"Add new customer"})]}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"ID"}),s("input",{type:"text",...F("id"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(q=H.id)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"First Name"}),s("input",{type:"text",...F("first_name"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(te=H.first_name)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Last Name"}),s("input",{type:"text",...F("last_name"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(G=H.last_name)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Email"}),s("input",{type:"text",...F("email"),className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(J=H.email)==null?void 0:J.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"verify"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...F("verify"),children:j.map(K=>s("option",{name:"Verify",value:K.key,defaultValue:"Select Verified",children:K.value},K.key))}),s("p",{className:"text-xs italic text-red-500"})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...F("status"),children:A.map(K=>s("option",{name:"Status",value:K.key,defaultValue:"Select Status",children:K.value},K.key))}),s("p",{className:"text-xs italic text-red-500"})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{O({email:"",first_name:"",last_name:"",id:"",verify:"",status:""}),Pt(k,N),localStorage.removeItem("admin_customer_filter"),V(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:I}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/customer",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"customers",sheet:"customers",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded normal-case",children:s("div",{className:" overflow-x-auto border-t-0 border-gray-200 ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:a.map((K,Q)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>Y(K.accessor),children:[K.header,K.isSorted,s("span",{children:K.isSorted?K.isSortedDesc?" \u25BC":" \u25B2":""})]},Q))})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((K,Q)=>s("tr",{className:"py-2 text-sm",children:a.map((Z,se)=>{var ce;return Z.accessor===""?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[K.photo?s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{C(K.photo),T(!0)},children:"View Picture"}):s("span",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",children:"No Photo"}),s("button",{className:"ml-2 border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{x(`/admin/view-customer/${K.id}`,{state:K})},children:"View Profile"})]},se):Z.statusMapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:`${K[Z.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full border border-[#EAECF0] bg-[#F9FAFB] py-[2px] px-[10px]`,children:[" ",Z.statusMapping[K[Z.accessor]]]})},se):Z.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:Z.idPrefix+K[Z.accessor]},se):Z.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:(ce=Z.mapping[K[Z.accessor]])!=null?ce:"N/A"},se):s("td",{className:"whitespace-nowrap px-6 py-4",children:K[Z.accessor]},se)})},Q))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:I,previousPage:B,nextPage:W}),s(c5,{modalOpen:E,modalImage:_,closeModal:()=>T(!1)}),s(d5,{modalOpen:D.id!=null,closeModal:()=>P({}),data:D,onSuccess:()=>V(w,c),noSettings:!0})]})},nwe=()=>{var w,v,S,m,p,b,x,k,N;const e=Qe({firstName:ge().required("First name is required"),lastName:ge().required("Last name is required"),email:ge().email().required("Email is required"),dob:ge().test("is-not-in-future","Not a valid date",_=>(console.log("testing here",_),_==""?!0:new Date(_)<new Date)).test("must-be-at-least-18yo","Must be at least 18 years of age",_=>Te().diff(Te(_),"years")>18),password:ge().required("Password is required").min(10,"Password must be at least 10 characters long").matches(/^(?=.*[0-9])/,"Password must contain at least one digit(0-9)").matches(/^(?=.*[a-z])/,"Password must contain at least one lowercase letter").matches(/^(?=.*[A-Z])/,"Password must contain at least one uppercase letter").matches(/^(?=.*[!@#\$%\^&\*])/,"Password must contain at least one symbol").test("is-not-dictionary","Password must not contain a common word",_=>fh.every(C=>!_.includes(C))).test("does-not-contain-user-info","Password must not contain your name or date of birth",(_,C)=>{const E=Te(C.parent.dob);return[C.parent.firstName,C.parent.lastName,E.format("yyyyMMDD"),E.format("DDMMyyyy"),E.format("MMDDyyyy"),E.format("YYMMDD"),E.format("MMDDYY"),E.format("DDMMYY")].every(T=>T.trim()==""||!_.toLowerCase().includes(T.toLowerCase()))}),role:ge().required(),status:ge().required(),verify:ge().required()}),{dispatch:t}=R.useContext(Ee),{dispatch:n}=R.useContext(we),a=je(),{register:r,handleSubmit:i,setError:o,trigger:c,formState:{errors:l,dirtyFields:d}}=Oe({resolver:Xe(e),defaultValues:{password:""},criteriaMode:"all",mode:"all"}),u=async _=>{console.log("submitting",_);let C=new _e;try{const E=await C.callRawAPI("/v2/api/custom/ergo/register",{firstName:_.firstName,lastName:_.lastName,status:_.status||0,email:_.email,password:_.password,dob:_.dob||null,verify:_.verify||0,role:"customer",payment_method_set:0},"POST");if(!E.error)pe(t,"Added"),a("/admin/customer");else if(E!=null&&E.validation){const T=Object.keys(E.validation);for(let D=0;D<T.length;D++){const P=T[D];o(P,{type:"manual",message:E.validation[P]})}}C.setTable("device"),await C.callRestAPI({active:1,user_id:E.user_id,last_login_time:new Date().toISOString().split("T")[0],uid:localStorage.getItem("device-uid")},"POST")}catch(E){o("firstName",{type:"manual",message:E.message}),me(t,E.message)}};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"customer"}})},[]);function g(){var C,E,T,D,P,M,O,F,z;var _=[];return Array.isArray((C=l.password)==null?void 0:C.types.matches)&&(_=[...l.password.types.matches]),typeof((T=(E=l.password)==null?void 0:E.types)==null?void 0:T.matches)=="string"&&_.push(l.password.types.matches),(P=(D=l.password)==null?void 0:D.types)!=null&&P.min&&_.push(l.password.types.min),(M=l.password)!=null&&M.types["does-not-contain-user-info"]&&_.push((O=l.password)==null?void 0:O.types["does-not-contain-user-info"]),(F=l.password)!=null&&F.types["is-not-dictionary"]&&_.push((z=l.password)==null?void 0:z.types["is-not-dictionary"]),_}const y=g();return s(Sa,{title:"Customer",backTo:"customer",children:s("div",{className:"border-t-0 p-5",children:f("form",{className:" w-full max-w-sm",onSubmit:i(u),autoComplete:"off",children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First Name"}),s("input",{id:"firstName",type:"text",...r("firstName"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(w=l.firstName)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500 ",children:(v=l.firstName)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last Name"}),s("input",{type:"text",id:"lastName",...r("lastName"),className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(S=l.lastName)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(m=l.lastName)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...r("email"),autoComplete:"off",className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(p=l.email)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(b=l.email)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date Of Birth"}),s("input",{type:"date",id:"dob",min:"1950-01-01",...r("dob"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(x=l.dob)!=null&&x.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(k=l.dob)==null?void 0:k.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 capitalize leading-tight text-gray-700 focus:outline-none",...r("role"),children:["customer"].map(_=>s("option",{value:_,children:_},_))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...r("status"),children:["Inactive","Active"].map((_,C)=>s("option",{value:C,children:_},C))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...r("verify"),defaultValue:0,children:["No","Yes"].map((_,C)=>s("option",{value:C,children:_},C))})]}),f("div",{className:"mb-5",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"password",children:"Password"}),s("input",{id:"password",type:"password",...r("password",{onChange:()=>{c("password")}}),autoComplete:"new-password",className:` mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(N=l.password)!=null&&N.message?"border-red-500":""}`}),d.password&&s("div",{className:"fade-in mb-4 space-y-2 rounded-sm border border-[#C42945] p-3 text-sm normal-case text-[#C42945] empty:hidden",children:y.map((_,C)=>s("p",{children:_},C))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/customer"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})})};let qi=new _e;const awe=()=>{var E,T;const e=Qe({firstName:ge().required(),lastName:ge().required(),email:ge().email().required(),password:ge(),status:ge(),dob:ge(),role:ge(),verify:ge()}).required(),{dispatch:t}=R.useContext(Ee),{dispatch:n,state:a}=R.useContext(we),r=je(),i=h.exports.useRef(null),o=Mt(),[c,l]=h.exports.useState(""),[d,u]=h.exports.useState(""),[g,y]=h.exports.useState(""),[w,v]=h.exports.useState(0),{register:S,handleSubmit:m,setError:p,setValue:b,formState:{errors:x}}=Oe({resolver:Xe(e)}),k=[{name:"role",value:"Customer"}],N=[{key:"0",value:"Inactive"},{key:"1",value:"Active"}],_=[{key:"0",value:"No"},{key:"1",value:"Yes"}],C=async D=>{try{if(c!==D.email){const O=await qi.updateEmailByAdmin(D.email,w);if(!O.error)pe(n,"Email Updated",1e3);else if(O.validation){const F=Object.keys(O.validation);for(let z=0;z<F.length;z++){const H=F[z];p(H,{type:"manual",message:O.validation[H]})}}}qi.setTable("user");const P=await qi.callRestAPI({id:w,first_name:D.firstName,last_name:D.lastName,email:D.email,role:D.role.toLowerCase(),status:D.status,verify:D.verify},"PUT");if(qi.setTable("profile"),(await qi.callRestAPI({set:{dob:D.dob||null},where:{user_id:w}},"PUTWHERE")).error)p("dob",{type:"manual",message:"Date of birth is required"});else if(!P.error)pe(n,"Updated",4e3),r("/admin/customer");else if(P.validation){const O=Object.keys(P.validation);for(let F=0;F<O.length;F++){const z=O[F];p(z,{type:"manual",message:P.validation[z]})}}}catch(P){console.log("Error",P),p("email",{type:"manual",message:P.message}),me(t,P.message)}};return R.useEffect(()=>{a.saveChanges&&(i.current.click(),n({type:"SAVE_CHANGES",payload:{saveChanges:!1}}))},[a.saveChanges]),R.useEffect(()=>{n({type:"SETPATH",payload:{path:"customer"}}),async function(){var D,P,M,O,F,z,H,A;try{qi.setTable("user");const j=await qi.callRestAPI({id:Number(o==null?void 0:o.id)},"GET");qi.setTable("profile");const{list:[I]}=await qi.callRestAPI({payload:{user_id:j.model.id}},"GETALL");j.error||(b("firstName",(D=j.model)==null?void 0:D.first_name),b("lastName",(P=j.model)==null?void 0:P.last_name),b("email",(M=j.model)==null?void 0:M.email),b("role",j.model.role[0].toUpperCase()+j.model.role.slice(1)),b("dob",I!=null&&I.dob?Te(I.dob).format("yyyy-MM-DD"):null),b("status",(O=j.model)==null?void 0:O.status),b("verify",(F=j.model)==null?void 0:F.verify),l((z=j.model)==null?void 0:z.email),u((H=j.model)==null?void 0:H.first_name),y((A=j.model)==null?void 0:A.last_name),v(j.model.id))}catch(j){console.log("Error",j),me(t,j.message)}}()},[]),f("form",{className:" mt-10 w-full max-w-sm",onSubmit:m(C),children:[f("div",{className:"mb-5 flex justify-between",children:[s("p",{className:"text-base font-bold",children:"Edit Customer"}),s("button",{onClick:()=>r(`/admin/view-customer/${o==null?void 0:o.id}`),children:"Cancel"})]}),f("div",{className:"mb-4 flex justify-between ",children:[s("p",{children:"ID"}),s("p",{className:"font-bold",children:w})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"firstName",children:"First name"}),s("input",{id:"firstName",type:"text",...S("firstName"),className:"border w-full rounded py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"lastName",children:"Last name"}),s("input",{type:"text",id:"lastName",...S("lastName"),className:"w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none "}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{type:"email",id:"email",...S("email"),className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(E=x.email)!=null&&E.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(T=x.email)==null?void 0:T.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:"Date of birth"}),s("input",{type:"date",id:"dob",...S("dob"),className:"w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none "}),s("p",{className:"text-xs italic text-red-500",children:!1})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"role",className:"mb-2 block text-sm font-bold text-gray-700",children:"Role"}),s("select",{name:"role",id:"role",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("role"),children:k.map(D=>s("option",{name:D.name,value:D.value,children:D.value},D.value))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"status",id:"status",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("status"),children:N.map(D=>s("option",{name:"status",value:D.key,children:D.value},D.key))})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"verify",className:"mb-2 block text-sm font-bold text-gray-700",children:"Verified"}),s("select",{name:"verify",id:"verify",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...S("verify"),children:_.map(D=>s("option",{name:"verify",value:D.key,children:D.value},D.key))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>r("/admin/customer"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"button",onClick:()=>n({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Changes",type:"Edit",modalShowMessage:`Are you sure you want to update ${d||""}${g?" "+g:""}'s profile?`,modalBtnText:"Yes, save changes"}}),className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"}),s("button",{ref:i,type:"submit",className:"hidden"})]})]})};let Yo=new _e;const rE=({page:e})=>{const[t,n]=h.exports.useState({}),{dispatch:a}=R.useContext(we),{dispatch:r}=R.useContext(Ee),i=Mt();je();const[o,c]=h.exports.useState(0),[l,d]=h.exports.useState(!1);async function u(){d(!0);try{await Yo.forgot(t.email,t.role),pe(a,"Email Sent")}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}d(!1)}async function g(){try{await Yo.callRawAPI("/v2/api/custom/ergo/resend-verification-email",{email:t.email},"POST"),pe(a,"Email Sent")}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}}const y=[{key:0,name:"Profile Details",component:e==="view"?s(rwe,{userInfo:t,loading:l,sendPasswordReset:u,sendEmailVerification:g}):s(awe,{})},{key:1,name:"History",component:s(u5,{id:i==null?void 0:i.id,table:"customer"})}];async function w(){try{Yo.setTable("user");const v=await Yo.callRestAPI({id:Number(i==null?void 0:i.id)},"GET");Yo.setTable("profile");const{list:[S]}=await Yo.callRestAPI({payload:{user_id:v.model.id}},"GETALL");Yo.setTable("id_verification");const{list:[m]}=await Yo.callRestAPI({payload:{user_id:v.model.id}},"GETALL");n({...v.model,dob:S==null?void 0:S.dob,id_verified:m==null?void 0:m.status})}catch(v){me(r,v.message),pe(a,v.message,4e3,"ERROR")}}return R.useEffect(()=>{a({type:"SETPATH",payload:{path:"customer"}}),w()},[]),f(wf,{title:"Customer",name:`${t?`${t==null?void 0:t.first_name} ${t==null?void 0:t.last_name}`:""}`,backTo:"customer",table1:"user",table2:"profile",deleteMessage:"Are you sure you want to delete this Customer?",id:i==null?void 0:i.id,children:[s("div",{className:"border-b border-gray-200 text-center text-sm font-medium text-gray-500",children:s("ul",{className:"-mb-px flex flex-wrap",children:y.map(v=>s("li",{className:"mr-2",children:s("button",{onClick:()=>c(v.key),className:`inline-block p-4 ${o===v.key?"border-[#111827] font-bold text-[#111827]":" border-transparent hover:border-gray-300 hover:text-gray-600"} rounded-t-lg border-b-2 `,children:v.name})},v.key))})}),y[o].component]})},rwe=({userInfo:e,loading:t,sendPasswordReset:n,sendEmailVerification:a})=>{var l;const r=Mt(),i=je(),o=["No","Yes"],c=["Pending","Yes","No"];return s(Se,{children:s("div",{className:"p-5",children:f("div",{className:"w-full max-w-xl",children:[f("div",{className:"mb-5 flex px-5",children:[s("p",{className:"w-[15rem] text-base font-bold",children:"Profile Details"}),s("div",{className:"flex-1",children:f("button",{className:"flex items-center text-[#33D4B7]",onClick:()=>i(`/admin/edit-customer/${r==null?void 0:r.id}`),children:[s(ln,{type:"pencil",className:"stroke-[#33D4B7]"}),s("span",{className:"ml-2",children:"Edit"})]})})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID"}),s("p",{className:"flex-1",children:e==null?void 0:e.id})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"First Name"}),s("p",{className:"flex-1",children:e==null?void 0:e.first_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Last Name"}),s("p",{className:"flex-1",children:e==null?void 0:e.last_name})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Email"}),s("p",{className:"flex-1 normal-case",children:e==null?void 0:e.email})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Date of Birth"}),s("p",{className:"flex-1",children:(e==null?void 0:e.dob)==null?"N/A":Te(e==null?void 0:e.dob).format("MM/DD/yyyy")})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Role"}),s("p",{className:"flex-1",children:e==null?void 0:e.role})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Email Verified"}),s("p",{className:"flex-1",children:o[e==null?void 0:e.verify]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"ID Verified"}),s("p",{className:"flex-1",children:(l=c[e.id_verified])!=null?l:"N/A"})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[9rem] px-5 text-right",children:"Actions"}),s("button",{disabled:t,onClick:n,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Send A Password Reset Link"}),s("button",{disabled:t,onClick:a,className:"mr-4 text-sm text-[#33D4B7] underline disabled:text-gray-500",children:"Resend Email Verification"})]})]})})})};let T0=new _e;const swe=()=>{var U,W,V,X,ne,oe,q,te,G,J;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),x=je(),[k,N]=lt(),[_]=lt((U=localStorage.getItem("admin_customer_review_filter"))!=null?U:""),C=Qe({id:ge(),customer_first_name:ge(),customer_last_name:ge(),rating:ge(),type:ge()}),{reset:E,register:T,handleSubmit:D,formState:{errors:P}}=Oe({resolver:Xe(C),defaultValues:(()=>{let K=Ue(k);return Object.keys(K).length>0?K:Ue(_)})()});function M(K){const Q=a,Z=Q.findIndex(le=>le.accessor===K),se=Q[Z];se.isSortedDesc=!se.isSortedDesc,Q.splice(Z,1,se),r(()=>[...Q]);const ce=O(i,se.isSortedDesc,K);o(ce)}function O(K,Q,Z){return(Z==null?void 0:Z.split(",").length)>1&&(Z=Z.split(",")[0]),K.sort((se,ce)=>{var le,ae,ie,de;if(Q)return isNaN(se[Z])?((le=se[Z])==null?void 0:le.toLowerCase())<((ae=ce[Z])==null?void 0:ae.toLowerCase())?1:-1:se[Z]<ce[Z]?1:-1;if(!Q)return isNaN(se[Z])?((ie=se[Z])==null?void 0:ie.toLowerCase())<((de=ce[Z])==null?void 0:de.toLowerCase())?-1:1:se[Z]<ce[Z]?-1:1})}const F=[{key:"",value:"All"},{key:"1",value:"1"},{key:"2",value:"2"},{key:"3",value:"3"},{key:"4",value:"4"},{key:"5",value:"5"}],z=[{key:"",value:"All"},{key:"0",value:"Given"},{key:"1",value:"Received"}];function H(K){(async function(){l(K),await I(0,K)})()}function A(){(async function(){await I(w-1>0?w-1:0,c)})()}function j(){(async function(){await I(w+1<=d?w+1:0,c)})()}async function I(K,Q){var se;let Z=Ue(k);Z=Object.keys(Z).length<1?Ue(_):Z,Z.id=(se=Z.id)==null?void 0:se.replace(mt.REVIEWS,""),Z&&(Z.type!=null||Z.type!=null)&&(Z.type=Z.type==0?"customer":"host");try{T0.setTable("review");const ce=await T0.callRawAPI("/v2/api/custom/ergo/review/PAGINATE",{where:[Z?`${Z.id?`ergo_review.id = '${Z.id}'`:"1"} AND ${Z.customer_first_name?`customer.first_name LIKE '%${Z.customer_first_name}%'`:"1"} AND ${Z.customer_last_name?`customer.last_name LIKE '%${Z.customer_last_name}%'`:"1"} AND ${Z.rating?`customer_rating = ${Z.rating}`:"1"} AND ${Z.type?`given_by = '${Z.type}'`:"1"} AND ${Z.status?`ergo_review.status = ${Z.status}`:"1"} AND ${Z.property_spaces_id?`ergo_review.property_spaces_id = ${Z.property_spaces_id}`:"1"}`:1],page:K,limit:Q,sortId:"update_at",direction:"DESC",user:"customer"},"POST"),{list:le,total:ae,limit:ie,num_pages:de,page:fe}=ce,be=O(le,!1);o(be),l(ie),u(de),v(fe),y(ae),m(fe>1),b(fe+1<=de)}catch(ce){me(e,ce.message),pe(n,ce.message,4e3,"ERROR")}}const B=K=>{k.set("id",K.id),k.set("customer_first_name",K.customer_first_name),k.set("customer_last_name",K.customer_last_name),k.set("rating",K.rating),k.set("type",K.type),k.set("status",K.status),N(k),localStorage.setItem("admin_customer_review_filter",k.toString()),I(1,c)};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"review"}}),async function(){await Y(),I(1,c)}()},[]),R.useEffect(()=>{t.showReview||I(1,10)},[t.showReview]);async function Y(){var Q;T0.setTable("settings");const K={key_name:"admin_customer_review_column_order"};try{const Z=await T0.callRestAPI({limit:1,page:1,payload:K},"PAGINATE");Array.isArray(Z.list)&&Z.list.length>0&&r(va((Q=Z.list[0].optional_data)!=null?Q:[],_a.admin_customer_reviews))}catch(Z){me(e,Z.message),pe(n,Z.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:D(B),children:[f("div",{className:"flex justify-between ",children:[s("h4",{className:"text-2xl font-medium",children:"Review"}),s(ma,{link:"/admin/add-review",text:"Add new Review"})]}),s("div",{className:"border-b border-gray-200 text-center text-sm font-medium text-gray-500",children:f("ul",{className:"-mb-px flex flex-wrap",children:[s("li",{className:"mr-2",children:s("button",{onClick:()=>x("/admin/review"),className:"inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600",children:"Hosts"})}),s("li",{className:"mr-2",children:s("button",{onClick:()=>x("/admin/review/customer"),className:"inline-block rounded-t-lg border-b-2 border-[#111827] p-4 font-bold text-[#111827]",children:"Guests"})})]})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...T("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=P.id)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=P.id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_last_name",children:"Last name"}),s("input",{placeholder:"Last name",...T("customer_last_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=P.customer_last_name)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=P.customer_last_name)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_first_name",children:"First name"}),s("input",{placeholder:"First name",...T("customer_first_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(oe=P.customer_first_name)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(q=P.customer_first_name)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_rating",children:"Rating"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("rating"),children:F.map(K=>s("option",{name:"status",value:K.key,children:K.value},K.key))}),s("p",{className:"text-xs italic text-red-500",children:(te=P.rating)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_rating",children:"Type"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("type"),children:z.map(K=>s("option",{name:"status",value:K.key,children:K.value},K.key))}),s("p",{className:"text-xs italic text-red-500",children:(G=P.type)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"status",children:"Status"}),f("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("status"),children:[s("option",{value:"",children:"ALL"}),["Under Review","Posted","Declined"].map((K,Q)=>s("option",{name:"status",value:Q,children:K},K))]}),s("p",{className:"text-xs italic text-red-500",children:(J=P.status)==null?void 0:J.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({id:"",customer_first_name:"",customer_last_name:"",status:"",type:"",rating:"",property_spaces_id:""}),localStorage.removeItem("admin_customer_review_filter"),Pt(k,N),Pt(_,N),I(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:H}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/customer_review",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"customer_review",sheet:"customer_review",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:a.map((K,Q)=>f("th",{scope:"col",className:"cursor-pointer px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>M(K.accessor),children:[K.header,s("span",{children:K.isSorted?K.isSortedDesc?" \u25BC":" \u25B2":""})]},Q))})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((K,Q)=>s("tr",{className:"py-2",children:a.map((Z,se)=>Z.accessor.split(",").length>1?s("td",{className:"whitespace-nowrap px-6 py-4",children:Z.accessor.split(",").map(ce=>s("span",{className:`mr-2 ${Z!=null&&Z.multiline?"mb-1 block":""}`,children:K[ce.trim()]}))},se):Z.accessor===""?s("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent",onClick:()=>n({type:"SHOW_REVIEW",payload:{showReview:!0,review:K}}),children:"View"})},se):Z.accessor==="rating"?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:"flex items-center",children:[s(ln,{type:"star",className:"mr-2 fill-[#0D9895]"}),K[Z.accessor]]})},se):Z.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Z.mapping[K[Z.accessor]]},se):Z.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:Z.idPrefix+K[Z.accessor]},se):s("td",{className:"whitespace-nowrap px-6 py-4",children:K[Z.accessor]},se))},Q))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:H,previousPage:A,nextPage:j})]})};let L0=new _e;const iwe=()=>{var W,V,X,ne,oe,q,te,G,J,K;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),x=je(),[k,N]=lt(),[_]=lt((W=localStorage.getItem("admin_host_review_filter"))!=null?W:""),C=Qe({id:ge(),host_first_name:ge(),host_last_name:ge(),rating:ge(),type:ge()}),{reset:E,register:T,handleSubmit:D,setError:P,formState:{errors:M}}=Oe({resolver:Xe(C),defaultValues:(()=>{let Q=Ue(k);return Object.keys(Q).length>0?Q:Ue(_)})()});function O(Q){const Z=a,se=Z.findIndex(ae=>ae.accessor===Q),ce=Z[se];ce.isSortedDesc=!ce.isSortedDesc,Z.splice(se,1,ce),r(()=>[...Z]);const le=F(i,ce.isSortedDesc,Q);o(le)}function F(Q,Z,se){return(se==null?void 0:se.split(",").length)>1&&(se=se.split(",")[0]),Q.sort((ce,le)=>{var ae,ie,de,fe;if(Z)return isNaN(ce[se])?((ae=ce[se])==null?void 0:ae.toLowerCase())<((ie=le[se])==null?void 0:ie.toLowerCase())?1:-1:ce[se]<le[se]?1:-1;if(!Z)return isNaN(ce[se])?((de=ce[se])==null?void 0:de.toLowerCase())<((fe=le[se])==null?void 0:fe.toLowerCase())?-1:1:ce[se]<le[se]?-1:1})}const z=[{key:"",value:"All"},{key:"1",value:"1"},{key:"2",value:"2"},{key:"3",value:"3"},{key:"4",value:"4"},{key:"5",value:"5"}],H=[{key:"",value:"All"},{key:"0",value:"Given"},{key:"1",value:"Received"}];function A(Q){(async function(){l(Q),await B(0,Q)})()}function j(){(async function(){await B(w-1>0?w-1:0,c)})()}function I(){(async function(){await B(w+1<=d?w+1:0,c)})()}async function B(Q,Z){var ce;let se=Ue(k);se=Object.keys(se).length<1?Ue(_):se,se.id=(ce=se.id)==null?void 0:ce.replace(mt.REVIEWS,""),se&&(se.type!=null||se.type!=null)&&(se.type=se.type==0?"host":"customer");try{L0.setTable("review");const le=await L0.callRawAPI("/v2/api/custom/ergo/review/PAGINATE",{where:[se?`${se.id?`ergo_review.id = '${se.id}'`:"1"} AND ${se.host_first_name?`host.first_name LIKE '%${se.host_first_name}%'`:"1"} AND ${se.host_last_name?`host.last_name LIKE '%${se.host_last_name}%'`:"1"} AND ${se.rating?`host_rating = ${se.rating}`:"1"} AND ${se.type?`given_by = '${se.type}'`:"1"} AND ${se.status?`ergo_review.status = ${se.status}`:"1"}`:1],page:Q,limit:Z,sortId:"update_at",direction:"DESC",user:"host"},"POST"),{list:ae,total:ie,limit:de,num_pages:fe,page:be}=le,he=F(ae,!1);o(he),l(de),u(fe),v(be),y(ie),m(be>1),b(be+1<=fe)}catch(le){me(e,le.message),pe(n,le.message,4e3,"ERROR")}}const Y=Q=>{k.set("id",Q.id),k.set("host_first_name",Q.host_first_name),k.set("host_last_name",Q.host_last_name),k.set("rating",Q.rating),k.set("type",Q.type),k.set("status",Q.status),N(k),localStorage.setItem("admin_host_review_filter",k.toString()),B(1,c)};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"review"}}),async function(){await U(),B(1,c)}()},[]),R.useEffect(()=>{t.showReview||B(1,10)},[t.showReview]);async function U(){var Z;L0.setTable("settings");const Q={key_name:"admin_host_review_column_order"};try{const se=await L0.callRestAPI({limit:1,page:1,payload:Q},"PAGINATE");Array.isArray(se.list)&&se.list.length>0&&r(va((Z=se.list[0].optional_data)!=null?Z:[],_a.admin_host_reviews))}catch(se){me(e,se.message),pe(n,se.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:D(Y),children:[f("div",{className:"flex justify-between ",children:[s("h4",{className:"text-2xl font-medium",children:"Review"}),s(ma,{link:"/admin/add-review",text:"Add New Review"})]}),s("div",{className:"border-b border-gray-200 text-center text-sm font-medium text-gray-500",children:f("ul",{className:"-mb-px flex flex-wrap",children:[s("li",{className:"mr-2",children:s("button",{onClick:()=>x("/admin/review"),className:"inline-block rounded-t-lg border-b-2 border-[#111827] p-4 font-bold text-[#111827]",children:"Hosts"})}),s("li",{className:"mr-2",children:s("button",{onClick:()=>x("/admin/review/customer"),className:"inline-block rounded-t-lg border-b-2 border-transparent p-4 hover:border-gray-300 hover:text-gray-600",children:"Guests"})})]})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...T("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=M.id)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=M.id)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_last_name",children:"Last name"}),s("input",{placeholder:"Last name",...T("host_last_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=M.host_last_name)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(oe=M.host_last_name)==null?void 0:oe.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_first_name",children:"First name"}),s("input",{placeholder:"First name",...T("host_first_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(q=M.host_first_name)!=null&&q.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(te=M.host_first_name)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_rating",children:"Rating"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("rating"),children:z.map(Q=>s("option",{name:"status",value:Q.key,children:Q.value},Q.key))}),s("p",{className:"text-xs italic text-red-500",children:(G=M.rating)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_rating",children:"Type"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("type"),children:H.map(Q=>s("option",{name:"status",value:Q.key,children:Q.value},Q.key))}),s("p",{className:"text-xs italic text-red-500",children:(J=M.type)==null?void 0:J.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"status",children:"Status"}),f("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("status"),children:[s("option",{value:"",children:"ALL"}),["Under Review","Posted","Declined"].map((Q,Z)=>s("option",{name:"status",value:Z,children:Q},Q))]}),s("p",{className:"text-xs italic text-red-500",children:(K=M.status)==null?void 0:K.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({id:"",host_first_name:"",host_last_name:"",status:"",type:"",rating:""}),localStorage.removeItem("admin_host_review_filter"),Pt(k,N),Pt(_,N),B(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:A}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/host_review",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"host_review",sheet:"host_review",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:a.map((Q,Z)=>f("th",{scope:"col",className:"cursor-pointer px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>O(Q.accessor),children:[Q.header,s("span",{children:Q.isSorted?Q.isSortedDesc?" \u25BC":" \u25B2":""})]},Z))})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((Q,Z)=>s("tr",{className:"py-2",children:a.map((se,ce)=>se.accessor.split(",").length>1?s("td",{className:"whitespace-nowrap px-6 py-4",children:se.accessor.split(",").map(le=>s("span",{className:`mr-2 ${se!=null&&se.multiline?"mb-1 block":""}`,children:Q[le.trim()]}))},ce):se.accessor===""?s("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent",onClick:()=>n({type:"SHOW_REVIEW",payload:{showReview:!0,review:Q}}),children:"View"})},ce):se.accessor==="rating"?s("td",{className:"whitespace-nowrap px-6 py-4",children:f("span",{className:"flex items-center",children:[s(ln,{type:"star",className:"mr-2 fill-[#0D9895]"}),Q[se.accessor]?Q[se.accessor]:0]})},ce):se.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:se.mapping[Q[se.accessor]]},ce):se.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:se.idPrefix+Q[se.accessor]},ce):s("td",{className:"whitespace-nowrap px-6 py-4",children:Q[se.accessor]},ce))},Z))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:A,previousPage:j,nextPage:I})]})},vr=({selectedData:e,setSelectedData:t,data:n,field:a,field2:r,errorField:i,getData:o,setError:c,type:l,multiple:d=!1})=>{const[u,g]=h.exports.useState("");return s(Rn,{value:e,onChange:y=>{t(y),c(i,{type:"manual",message:null})},disabled:!!l,multiple:d,children:f("div",{className:"relative mt-1",children:[s("div",{className:"relative w-full cursor-default overflow-hidden rounded-lg bg-white text-left sm:text-sm",children:s(Rn.Input,{as:"input",className:"border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline",displayValue:y=>r?y!==void 0&&y[a]!==""?d?y.map(w=>`${y[a]} - ${y[r]}`):`${y[a]} - ${y[r]}`:"":d?y.map(w=>w[a]).join(","):y[a],onChange:y=>{g(y.target.value);let w=y.target.value;if(d){let v=w.split(","),S=v.length>1?v.length-1:0;w=v[S]}if(qG(()=>o(1,10,{[a]:w.trim()})),y.target.value===""){const v={[a]:""};r&&(v[r]=""),t(d?[]:{...v})}}})}),s(ke,{as:h.exports.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",afterLeave:()=>g(""),children:s(Rn.Options,{className:"absolute mt-1 z-50 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:n&&n.length===0&&u!==""?s("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:"Nothing found."}):n&&n.map(y=>s(Rn.Option,{disabled:!0,className:({active:w})=>`relative normal-case cursor-default select-none py-2 pl-10 pr-4 ${w?"bg-teal-600 text-white":"text-gray-900"}`,value:y,children:({selected:w})=>s(Se,{children:s("span",{className:`block truncate ${w?"font-medium":"font-normal"}`,children:r?`${y[a]} - ${y[r]}`:y[a]})})},y.id))})})]})})},owe=()=>{var U,W,V,X,ne,oe,q,te,G,J;let e=new _e;const{dispatch:t}=R.useContext(Ee),{dispatch:n}=R.useContext(we),[a,r]=R.useState(),[i,o]=R.useState([]),[c,l]=R.useState({}),[d,u]=R.useState([]),[g,y]=R.useState({}),[w,v]=R.useState([]),[S,m]=R.useState([]),[p,b]=R.useState([]),x=Qe({booking_id:dt().required("Booking ID is required").positive().integer().typeError("Booking ID must be a number"),comment:ge().required("Comment is required")}).required(),k=[{key:"customer",value:"customer"},{key:"host",value:"host"}],[N,_]=R.useState(k[1].value),C=[{key:"1",value:"1"},{key:"2",value:"2"},{key:"3",value:"3"},{key:"4",value:"4"},{key:"5",value:"5"}],E=je(),{register:T,handleSubmit:D,setError:P,formState:{errors:M}}=Oe({resolver:Xe(x)}),O=K=>{if(N==="customer"){if(isNaN(K.host_rating))return P("host_rating",{type:"manual",message:"Host rating is required"});if(isNaN(K.space_rating))return P("space_rating",{type:"manual",message:"Space rating is required"})}else if(isNaN(K.customer_rating))return P("customer_rating",{type:"manual",message:"Customer rating is required"});F(K)},F=async K=>{try{e.setTable("booking");const Q=await e.callRestAPI({id:K.booking_id},"GET");!Q.error&&(Q==null?void 0:Q.model)?B(K):P("booking_id",{type:"manual",message:"Booking with this ID doesn't exist"})}catch(Q){console.log("Error",Q),P("booking_id",{type:"manual",message:Q.message}),me(t,Q.message)}};async function z(K,Q,Z){try{e.setTable("user");const se={email:Z.email||void 0,role:"customer"},ce=await e.callRestAPI({payload:se,page:K,limit:Q},"PAGINATE"),{list:le}=ce;v(le)}catch(se){console.log("ERROR",se),me(t,se.message)}}async function H(K,Q,Z){try{e.setTable("user");const se={email:Z.email||void 0,role:"host"},ce=await e.callRestAPI({payload:se,page:K,limit:Q},"PAGINATE"),{list:le}=ce;u(le)}catch(se){console.log("ERROR",se),me(t,se.message)}}async function A(K,Q,Z){try{const se=await e.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[Z!=null&&Z.property_name?`ergo_property.name LIKE '%${Z.property_name}%' OR ergo_spaces.category LIKE '%${Z.property_name}%'`:1],page:K,limit:Q},"POST"),{list:ce}=se;o(ce)}catch(se){console.log("ERROR",se),me(t,se.message)}}async function j(K,Q,Z){try{e.setTable("hashtag");const se={name:Z.name||void 0},ce=await e.callRestAPI({payload:se,page:K,limit:Q},"PAGINATE"),{list:le}=ce;b(le)}catch(se){console.log("ERROR",se),me(t,se.message)}}const I=async(K,Q)=>{try{e.setTable("review_hashtag");const Z=Q.map(se=>e.callRestAPI({hashtag_id:se.id,review_id:K},"POST"));await Promise.all(Z)}catch(Z){console.log("Error",Z),me(t,Z.message)}},B=async K=>{if((g==null?void 0:g.id)&&(c==null?void 0:c.id)&&(a==null?void 0:a.id)){let Q=new Date,Z={customer_id:g.id,host_id:c.id,property_spaces_id:a.id,booking_id:K.booking_id,comment:K.comment,customer_rating:null,host_rating:null,space_rating:null,post_date:Q.toISOString(),status:0};N==="host"?(Z.customer_rating=K.customer_rating||0,Z.given_by="host",Z.received_by="customer"):(Z.host_rating=K.host_rating||0,Z.space_rating=K.space_rating||0,Z.given_by="customer",Z.received_by="host");try{const se=await e.callRawAPI("/v2/api/custom/ergo/review/POST",{...Z},"POST");se.error||(S.length>0&&await I(se.message,S),pe(n,"Added"),E("/admin/review"))}catch(se){console.log("Error",se),pe(n,se.message),me(t,se.message)}}else g!=null&&g.id||P("customer_email",{type:"manual",message:"Please select a customer"}),c!=null&&c.id||P("host_email",{type:"manual",message:"Please select a host"}),a!=null&&a.id||P("property_spaces_id",{type:"manual",message:"Please select a Property space"})};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"review"}}),j()},[]);const Y=()=>{g!=null&&g.id||P("customer_email",{type:"manual",message:"Please select a customer"}),c!=null&&c.id||P("host_email",{type:"manual",message:"Please select a host"}),a!=null&&a.id||P("property_spaces_id",{type:"manual",message:"Please select a Property space"})};return f(Sa,{title:"Review",backTo:"review",children:[f("div",{className:"mb-5 max-w-lg",children:[s("label",{htmlFor:"userType",className:"block text-gray-700 text-sm font-bold mb-2",children:"Select Who you are reviewing as"}),s("select",{name:"userType",id:"userType",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",defaultValue:"host",onChange:K=>_(K.target.value),children:k.map(K=>s("option",{name:"status",value:K.key,children:K.value},K.key))})]}),f("form",{className:" w-full max-w-lg",onSubmit:D(O,Y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"customer_email",children:"Customer"}),s(vr,{selectedData:g,setSelectedData:y,data:w,getData:z,field:"email",errorField:"customer_email",setError:P}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(U=M.customer_email)==null?void 0:U.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host_email",children:"Host"}),s(vr,{selectedData:c,setSelectedData:l,data:d,getData:H,field:"email",errorField:"host_email",setError:P}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(W=M.host_email)==null?void 0:W.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"Property Space"}),s(vr,{selectedData:a,setSelectedData:r,data:i,getData:A,field:"property_name",field2:"space_category",errorField:"property_spaces_id",setError:P}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(V=M.property_spaces_id)==null?void 0:V.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"booking_id",children:"Booking ID"}),s("input",{type:"number",placeholder:"Booking ID",...T("booking_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(X=M.booking_id)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(ne=M.booking_id)==null?void 0:ne.message})]}),N==="customer"?f(Se,{children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host_rating",children:"Host Rating"}),f("select",{name:"host_rating",id:"host_rating",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...T("host_rating"),children:[s("option",{selected:!0,value:null,hidden:!0,children:"Select Option"}),C.map(K=>s("option",{name:"host_rating",value:K.key,children:K.value},K.key))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(oe=M.host_rating)==null?void 0:oe.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"space_rating",children:"Space Rating"}),f("select",{name:"space_rating",id:"space_rating",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...T("space_rating"),children:[s("option",{selected:!0,value:null,hidden:!0,children:"Select Option"}),C.map(K=>s("option",{name:"space_rating",value:K.key,children:K.value},K.key))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(q=M.space_rating)==null?void 0:q.message})]})]}):f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"customer_rating",children:"Rating"}),f("select",{name:"customer_rating",id:"customer_rating",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...T("customer_rating"),defaultValue:null,children:[s("option",{hidden:!0,children:"Select Option"}),C.map(K=>s("option",{name:"customer_rating",value:K.key,children:K.value},K.key))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(te=M.customer_rating)==null?void 0:te.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"comment",children:"Comment"}),s("textarea",{placeholder:"comment",...T("comment"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(G=M.comment)!=null&&G.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(J=M.comment)==null?void 0:J.message})]}),f("div",{className:"mb-4 ",children:[f("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"hashtags",children:["Hashtags",s("span",{className:"text-xxs text-gray-500 ml-2",children:'Separate using a comma " , "'})]}),s(vr,{selectedData:S,setSelectedData:m,multiple:!0,data:p,getData:j,field:"name",errorField:"hashtags",setError:P})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>E("/admin/review"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})]})};let Ew=new _e;const lwe=()=>{var w,v,S,m,p,b,x,k,N,_,C,E,T,D,P,M;const{dispatch:e}=R.useContext(Ee),t=Qe({customer_id:dt().required().positive().integer(),property_id:dt().required().positive().integer(),host_id:dt().required().positive().integer(),property_spaces_id:dt().required().positive().integer(),host_rating:dt().required().positive().integer(),space_rating:dt().required().positive().integer(),comment:ge().required(),hashtags:ge().required()}).required(),{dispatch:n}=R.useContext(we),a=je();h.exports.useState(0),h.exports.useState(0),h.exports.useState(0),h.exports.useState(0),h.exports.useState(0),h.exports.useState(0),h.exports.useState(""),h.exports.useState("");const[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=Mt();h.exports.useEffect(function(){(async function(){try{Ew.setTable("review");const O=await Ew.callRestAPI({id:Number(g==null?void 0:g.id)},"GET");O.error||(d("customer_id",O.model.customer_id),d("property_id",O.model.property_id),d("host_id",O.model.host_id),d("property_spaces_id",O.model.property_spaces_id),d("host_rating",O.model.host_rating),d("space_rating",O.model.space_rating),d("comment",O.model.comment),d("hashtags",O.model.hashtags),i(O.model.id))}catch(O){console.log("error",O),me(e,O.message)}})()},[]);const y=async O=>{try{const F=await Ew.callRestAPI({id:r,customer_id:O.customer_id,property_id:O.property_id,host_id:O.host_id,property_spaces_id:O.property_spaces_id,host_rating:O.host_rating,space_rating:O.space_rating,comment:O.comment,hashtags:O.hashtags},"PUT");if(!F.error)pe(n,"Updated"),a("/admin/review");else if(F.validation){const z=Object.keys(F.validation);for(let H=0;H<z.length;H++){const A=z[H];l(A,{type:"manual",message:F.validation[A]})}}}catch(F){console.log("Error",F),l("customer_id",{type:"manual",message:F.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"review"}})},[]),s(Ja,{title:"Review",backTo:"review",children:f("form",{className:" w-full max-w-lg",onSubmit:c(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"customer_id",children:"CustomerId"}),s("input",{placeholder:"customer_id",...o("customer_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(w=u.customer_id)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(v=u.customer_id)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"PropertyId"}),s("input",{placeholder:"property_id",...o("property_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(S=u.property_id)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(m=u.property_id)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host_id",children:"HostId"}),s("input",{placeholder:"host_id",...o("host_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(p=u.host_id)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(b=u.host_id)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_spaces_id",children:"PropertySpacesId"}),s("input",{placeholder:"property_spaces_id",...o("property_spaces_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(x=u.property_spaces_id)!=null&&x.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(k=u.property_spaces_id)==null?void 0:k.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host_rating",children:"HostRating"}),s("input",{placeholder:"host_rating",...o("host_rating"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(N=u.host_rating)!=null&&N.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(_=u.host_rating)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"space_rating",children:"SpaceRating"}),s("input",{placeholder:"space_rating",...o("space_rating"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(C=u.space_rating)!=null&&C.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(E=u.space_rating)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"comment",children:"Comment"}),s("textarea",{placeholder:"comment",...o("comment"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(T=u.comment)!=null&&T.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(D=u.comment)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"hashtags",children:"Hashtags"}),s("textarea",{placeholder:"hashtags",...o("hashtags"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(P=u.hashtags)!=null&&P.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(M=u.hashtags)==null?void 0:M.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/review"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let sE=new _e;const cwe=new St,dwe=()=>{var I,B,Y,U,W,V,X;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((I=localStorage.getItem("admin_spaces_filter"))!=null?I:""),N=Qe({category:ge(),id:ge()}),{reset:_,register:C,handleSubmit:E,setError:T,formState:{errors:D}}=Oe({resolver:Xe(N)});function P(ne){const oe=a,q=oe.findIndex(J=>J.accessor===ne),te=oe[q];te.isSortedDesc=!te.isSortedDesc,oe.splice(q,1,te),r(()=>[...oe]);const G=M(i,te.isSortedDesc,ne);o(G)}function M(ne,oe,q){return(q==null?void 0:q.split(",").length)>1&&(q=q.split(",")[0]),ne.sort((te,G)=>{var J,K,Q,Z;if(oe)return isNaN(te[q])?((J=te[q])==null?void 0:J.toLowerCase())<((K=G[q])==null?void 0:K.toLowerCase())?1:-1:te[q]<G[q]?1:-1;if(!oe)return isNaN(te[q])?((Q=te[q])==null?void 0:Q.toLowerCase())<((Z=G[q])==null?void 0:Z.toLowerCase())?-1:1:te[q]<G[q]?-1:1})}function O(ne){(async function(){l(ne),await H(0,ne)})()}function F(){(async function(){await H(w-1>0?w-1:0,c)})()}function z(){(async function(){await H(w+1<=d?w+1:0,c)})()}async function H(ne,oe){var te;const q=Ue(x);q.id=(te=q.id)==null?void 0:te.replace(mt.SPACE_CATEGORY,"");try{let G=["deleted_at,is"];q.id&&G.push(`id,eq,${q.id}`),q.category&&G.push(`category,cs,${q.category}`),q.has_sizes&&G.push(`has_sizes,eq,${q.has_sizes}`);const J=await cwe.getPaginate("spaces",{join:[],filter:G,page:ne||1,size:oe,order:"update_at"}),{list:K,total:Q,limit:Z,num_pages:se,page:ce}=J,le=M(K,!1);o(le),l(Z),u(se),v(ce),y(Q),m(ce>1),b(ce+1<=se)}catch(G){me(e,G.message),pe(t,G.message,4e3,"ERROR")}}const A=ne=>{x.set("id",ne.id),x.set("category",ne.category),x.set("has_sizes",ne.has_sizes),k(x),localStorage.setItem("admin_spaces_filter",x.toString()),H(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"spaces"}}),async function(){await j(),H(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),H(w,c))},[n.deleted]);async function j(){var oe;sE.setTable("settings");const ne={key_name:"admin_space_categories_column_order"};try{const q=await sE.callRestAPI({limit:1,page:1,payload:ne},"PAGINATE");console.log(JSON.parse(q.list[0].optional_data)),Array.isArray(q.list)&&q.list.length>0&&r(va((oe=q.list[0].optional_data)!=null?oe:[],_a.admin_space_categories))}catch(q){me(e,q.message),pe(t,q.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(A),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Spaces Search"}),s(ma,{link:"/admin/add-spaces",text:"Add new space"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(B=D.id)!=null&&B.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(Y=D.id)==null?void 0:Y.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"has_sizes",children:"Has Sizes"}),f("select",{...C("has_sizes"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=D.id)!=null&&U.message?"border-red-500":""}`,children:[s("option",{value:"",children:"ALL"}),s("option",{value:0,children:"NO"}),s("option",{value:1,children:"YES"})]}),s("p",{className:"text-xs italic text-red-500",children:(W=D.id)==null?void 0:W.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"category",children:"Category"}),s("input",{...C("category"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=D.type)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=D.category)==null?void 0:X.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",category:"",has_sizes:""}),localStorage.removeItem("admin_spaces_filter"),Pt(x,k),H(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:O}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/space_categories",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"space_categories",sheet:"space_categories",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,emailActions:!0,profile:!0,tableType:"Spaces",table1:"spaces",deleteMessage:"Are you sure you want to delete this Space?",deleteTitle:"Confirm Delete",onSort:P,id:"table-to-xls",showDelete:!0})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:O,previousPage:F,nextPage:z})]})},uwe=()=>{var g,y,w,v,S,m;const{dispatch:e}=R.useContext(we),t=Qe({category:ge().required(),has_sizes:ge()}).required(),{dispatch:n}=R.useContext(Ee),[a,r]=R.useState(!1),i=je(),{register:o,handleSubmit:c,setError:l,formState:{errors:d}}=Oe({resolver:Xe(t)}),u=async p=>{if(r(!0),p.image.length<1||!p.image[0]){l("image",{type:"manual",message:"This field is required"});return}if(p.icon.length<1||!p.icon[0]){l("icon",{type:"manual",message:"This field is required"});return}let b=new _e;try{const x=new FormData;x.append("file",p.image[0]);const k=await b.uploadImage(x),N=new FormData;N.append("file",p.icon[0]);const _=await b.uploadImage(N);b.setTable("spaces");const C=await b.callRestAPI({category:p.category,image:k.url,icon:_.url,has_sizes:p.has_sizes},"POST");if(!C.error)pe(e,"Added"),i("/admin/spaces");else if(C.validation){const E=Object.keys(C.validation);for(let T=0;T<E.length;T++){const D=E[T];l(D,{type:"manual",message:C.validation[D]})}}}catch(x){console.log("Error",x),l("category",{type:"manual",message:x.message}),me(n,x.message),pe(e,x.message,4e3,"ERROR")}r(!1)};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"spaces"}})},[]),s(Sa,{title:"Space",backTo:"spaces",children:s("div",{className:"border-t-0 p-5",children:f("form",{className:" w-full max-w-sm",onSubmit:c(u),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"category",children:"Category"}),s("input",{id:"category",type:"text",...o("category"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(g=d.category)!=null&&g.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(y=d.category)==null?void 0:y.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:"Banner Image"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/jpeg",...o("image")}),s("p",{className:"text-xs normal-case italic text-red-500",children:(w=d.image)==null?void 0:w.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:"Icon"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/jpeg, image/svg",...o("icon")}),s("p",{className:"text-xs normal-case italic text-red-500",children:(v=d.icon)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"has_sizes",children:"Has Sizes"}),f("select",{id:"has_sizes",type:"text",...o("has_sizes"),className:`w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none${(S=d.has_sizes)!=null&&S.message?"border-red-500":""}`,children:[s("option",{value:0,children:"NO"}),s("option",{value:1,children:"YES"})]}),s("p",{className:"text-xs italic text-red-500",children:(m=d.has_sizes)==null?void 0:m.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>i("/admin/spaces"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",disabled:a,className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})})};let bd=new _e;const fwe=()=>{var w,v,S,m,p,b;const{dispatch:e}=R.useContext(Ee),t=Qe({category:ge().required(),has_sizes:ge()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=Mt();h.exports.useEffect(function(){(async function(){try{bd.setTable("spaces");const x=await bd.callRestAPI({id:Number(g==null?void 0:g.id)},"GET");x.error||(d("category",x.model.category),d("has_sizes",x.model.has_sizes),i(x.model.id))}catch(x){console.log("error",x),me(e,x.message),pe(n,x.message,4e3,"ERROR")}})()},[]);const y=async x=>{try{var k=void 0,N=void 0;if(x.image.length>0&&x.image[0]){const C=new FormData;C.append("file",x.image[0]),k=(await bd.uploadImage(C)).url}if(x.icon.length>0&&x.icon[0]){const C=new FormData;C.append("file",x.icon[0]),N=(await bd.uploadImage(C)).url}bd.setTable("spaces");const _=await bd.callRestAPI({id:r,category:x.category,image:k,icon:N,has_sizes:x.has_sizes},"PUT");if(!_.error)pe(n,"Updated"),a("/admin/spaces");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];l(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),l("category",{type:"manual",message:_.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"spaces"}})},[]),s(Ja,{title:"Space",backTo:"spaces",showDelete:!1,children:f("form",{className:" w-full max-w-sm",onSubmit:c(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"category",children:"Category"}),s("input",{id:"category",type:"text",...o("category"),className:`" w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none${(w=u.category)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(v=u.category)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:"Banner Image"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/jpeg",...o("image")}),s("p",{className:"text-xs normal-case italic text-red-500",children:(S=u.image)==null?void 0:S.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:"Icon"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/jpeg, image/svg",...o("icon")}),s("p",{className:"text-xs normal-case italic text-red-500",children:(m=u.icon)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"has_sizes",children:"Has Sizes"}),f("select",{id:"has_sizes",type:"text",...o("has_sizes"),className:`w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none${(p=u.has_sizes)!=null&&p.message?"border-red-500":""}`,children:[s("option",{value:0,children:"NO"}),s("option",{value:1,children:"YES"})]}),s("p",{className:"text-xs italic text-red-500",children:(b=u.has_sizes)==null?void 0:b.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/spaces"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let Tw=new _e,mwe=new St;const pwe=()=>{var W,V,X,ne,oe,q;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState([]),[N,_]=lt(),[C]=lt((W=localStorage.getItem("admin_psa_filter"))!=null?W:""),E=Qe({spaces_name:ge(),amenity_name:ge()}),{reset:T,register:D,handleSubmit:P,setError:M,formState:{errors:O}}=Oe({resolver:Xe(E),defaultValues:(()=>{let te=Ue(N);return Object.keys(te).length>0?te:Ue(C)})()});function F(te){(async function(){l(te),await I(0,te)})()}function z(){(async function(){await I(w-1>0?w-1:0,c)})()}function H(){(async function(){await I(w+1<=d?w+1:0,c)})()}function A(te){const G=a,J=G.findIndex(Z=>Z.accessor===te),K=G[J];K.isSortedDesc=!K.isSortedDesc,G.splice(J,1,K),r(()=>[...G]);const Q=j(i,K.isSortedDesc,te);o(Q)}function j(te,G,J){return(J==null?void 0:J.split(",").length)>1&&(J=J.split(",")[0]),te.sort((K,Q)=>{var Z,se,ce,le;if(G)return isNaN(K[J])?((Z=K[J])==null?void 0:Z.toLowerCase())<((se=Q[J])==null?void 0:se.toLowerCase())?1:-1:K[J]<Q[J]?1:-1;if(!G)return isNaN(K[J])?((ce=K[J])==null?void 0:ce.toLowerCase())<((le=Q[J])==null?void 0:le.toLowerCase())?-1:1:K[J]<Q[J]?-1:1})}async function I(te,G){var K;let J=Ue(N);J=Object.keys(J).length<1?Ue(C):J,J.id=(K=J.id)==null?void 0:K.replace(mt.PROPERTY_SPACE_AMENITIES,"");try{const Q=await Tw.callRawAPI("/v2/api/custom/ergo/property-spaces-amenitites/PAGINATE",{where:[J?`${J.id?`ergo_property_spaces_amenitites.id = '${J.id}'`:"1"} AND ${J.spaces_name?`ergo_spaces.category LIKE '%${J.spaces_name}%'`:"1"} AND ${J.amenity_name?`ergo_amenity.name LIKE '%${J.amenity_name}%'`:"1"} AND ${J.property_spaces_id?`property_spaces_id = ${J.property_spaces_id}`:"1"}`:1,"ergo_property_spaces_amenitites.deleted_at IS NULL"],page:te,limit:G,sortId:"update_at",direction:"DESC"},"POST"),{list:Z,total:se,limit:ce,num_pages:le,page:ae}=Q,ie=j(Z,!1);o(ie),l(ce),u(le),v(ae),y(se),m(ae>1),b(ae+1<=le)}catch(Q){me(e,Q.message),pe(t,Q.message,4e3,"ERROR")}}const B=te=>{N.set("id",te.id),N.set("spaces_name",te.spaces_name),N.set("amenity_name",te.amenity_name),_(N),localStorage.setItem("admin_psa_filter",N.toString()),I(1,c)},Y=async()=>{try{const te=await mwe.getList("amenity",{filter:["deleted_at,is"],join:[]});te.error||k(te.list)}catch(te){console.log("Error",te),M("amenity_name",{type:"manual",message:te.message}),me(e,te.message)}};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_spaces_amenitites"}}),Y(),async function(){await U(),I(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),I(w,c))},[n.deleted]);async function U(){var G;Tw.setTable("settings");const te={key_name:"admin_property_spaces_amenities_column_order"};try{const J=await Tw.callRestAPI({limit:1,page:1,payload:te},"PAGINATE");Array.isArray(J.list)&&J.list.length>0&&r(va((G=J.list[0].optional_data)!=null?G:[],_a.admin_property_space_amenities))}catch(J){me(e,J.message),pe(t,J.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:P(B),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property Spaces Amenitites Search"}),s(ma,{link:"/admin/add-property_spaces_amenitites",text:"Add new Property Space Amenity"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...D("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=O.id)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=O.id)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"spaces_name",children:"Property Space"}),s("input",{placeholder:"Property Space",...D("spaces_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=O.spaces_name)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(oe=O.spaces_name)==null?void 0:oe.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"amenity_name",children:"Amenity"}),f("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...D("amenity_name"),children:[s("option",{selected:!0,value:"",children:"Select Option"}),x.map(te=>s("option",{children:te==null?void 0:te.name},te.id))]}),s("p",{className:"text-xs italic text-red-500",children:(q=O.amenity_name)==null?void 0:q.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{T({id:"",spaces_name:"",property_spaces_id:"",amenity_name:""}),localStorage.removeItem("admin_psa_filter"),Pt(N,_),Pt(C,_),I(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:F}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/property_spaces_amenities",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_space_amenities",sheet:"property_space_amenities",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded bg-white",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,tableType:"property_spaces_amenitites",table1:"property_spaces_amenitites",profile:!0,deleteMessage:"Are you sure you want to delete this Property Space Amenity?",deleteTitle:"Confirm Delete",baasDelete:!0,onSort:A,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:F,previousPage:z,nextPage:H})]})},hwe=()=>{var x,k;let e=new _e;const{dispatch:t}=R.useContext(we),[n,a]=R.useState(),[r,i]=R.useState([]),[o,c]=R.useState([]),l=Qe({property_spaces_id:ge(),amenity_id:dt().required().positive().integer().typeError("Please select an amenity")}).required(),{dispatch:d}=R.useContext(Ee),u=je(),{register:g,handleSubmit:y,setError:w,formState:{errors:v}}=Oe({resolver:Xe(l)});async function S(N,_,C){try{const E=await e.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[C!=null&&C.property_name?`ergo_property.name LIKE '%${C.property_name}%' OR ergo_spaces.category LIKE '%${C.property_name}%'`:1],page:N,limit:_},"POST"),{list:T}=E;i(T)}catch(E){console.log("ERROR",E),me(d,E.message)}}const m=async()=>{try{e.setTable("amenity");const N=await e.callRestAPI({},"GETALL");N.error||c(N.list)}catch(N){console.log("Error",N),w("amenity_id",{type:"manual",message:N.message}),me(d,N.message)}},p=async N=>{if(n!=null&&n.id){N.property_spaces_id=n.id;try{e.setTable("property_spaces_amenitites");const _=await e.callRestAPI({property_spaces_id:N.property_spaces_id,amenity_id:N.amenity_id},"POST");if(!_.error)pe(t,"Added"),u("/admin/property_spaces_amenitites");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];w(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),w("property_spaces_id",{type:"manual",message:_.message}),me(d,_.message)}}else w("property_spaces_id",{type:"manual",message:"Please Select a property space"})},b=()=>{n!=null&&n.id||w("property_spaces_id",{type:"manual",message:"Please Select a property space"})};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_spaces_amenitites"}}),m()},[]),s(Sa,{title:"Property Space Amenity",backTo:"property_spaces_amenitites",children:f("form",{className:" w-full max-w-lg",onSubmit:y(p,b),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_spaces_id",children:"Property Space"}),s(vr,{selectedData:n,setSelectedData:a,data:r,getData:S,field:"property_name",field2:"space_category",errorField:"property_spaces_id",setError:w}),s("p",{className:"text-red-500 text-xs italic",children:(x=v.property_spaces_id)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"amenity_id",children:"Amenity"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...g("amenity_id"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),o.map(N=>s("option",{name:"property_spaces_id",value:N.id,children:N==null?void 0:N.name},N.id))]}),s("p",{className:"text-red-500 text-xs italic",children:(k=v.amenity_id)==null?void 0:k.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/property_spaces_amenitites"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let yd=new _e;const gwe=()=>{var _,C;const{dispatch:e}=R.useContext(Ee),t=Qe({property_spaces_id:dt(),amenity_id:dt().required().positive().integer()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState({}),[o,c]=h.exports.useState([]),[l,d]=R.useState([]),[u,g]=h.exports.useState(0),{register:y,handleSubmit:w,setError:v,setValue:S,formState:{errors:m}}=Oe({resolver:Xe(t)}),p=Mt();async function b(E,T,D){try{const P=await yd.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[D!=null&&D.property_name?`ergo_property.name LIKE '%${D.property_name}%' OR ergo_spaces.category LIKE '%${D.property_name}%'`:1],page:E,limit:T},"POST"),{list:M}=P;c(M)}catch(P){console.log("ERROR",P),me(e,P.message)}}h.exports.useEffect(()=>{o.length>0&&!r.property_name&&async function(){try{yd.setTable("property_spaces_amenitites");const E=await yd.callRestAPI({id:Number(p==null?void 0:p.id)},"GET");E.error||(console.log(E.model.property_spaces_id),i(o.find(T=>T.id==E.model.property_spaces_id)),S("amenity_id",E.model.amenity_id),g(E.model.id))}catch(E){console.log("error",E),me(e,E.message)}}()},[o.length]);const x=async()=>{try{yd.setTable("amenity");const E=await yd.callRestAPI({},"GETALL");E.error||d(E.list)}catch(E){console.log("Error",E),v("amenity_id",{type:"manual",message:E.message}),me(e,E.message)}},k=async E=>{if(console.log("submitting",E),!(r!=null&&r.id)){v("property_spaces_id",{type:"manual",message:"Please select a valid property space"});return}E.property_spaces_id=r.id;try{const T=await yd.callRestAPI({id:u,property_spaces_id:E.property_spaces_id,amenity_id:E.amenity_id},"PUT");if(!T.error)pe(n,"Updated"),a("/admin/property_spaces_amenitites");else if(T.validation){const D=Object.keys(T.validation);for(let P=0;P<D.length;P++){const M=D[P];v(M,{type:"manual",message:T.validation[M]})}}}catch(T){console.log("Error",T),v("property_spaces_id",{type:"manual",message:T.message})}},N=()=>{r!=null&&r.id||v("property_spaces_id",{type:"manual",message:"Please Select a property space"})};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"property_spaces_amenitites"}}),b(1,0,{property_name:null}),x()},[]),s(Ja,{title:"Property Space Amenity",backTo:"property_spaces_amenitites",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:w(k,N),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_spaces_id",children:"Property Spaces"}),s(vr,{selectedData:r,setSelectedData:i,data:o,getData:b,field:"property_name",field2:"space_category",errorField:"property_spaces_id",setError:v}),s("p",{className:"text-red-500 text-xs italic",children:(_=m.property_spaces_id)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"amenity_id",children:"Amenity"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...y("amenity_id"),children:[s("option",{value:"",children:"Select Option"}),l.map(E=>s("option",{value:E.id,children:E==null?void 0:E.name},E.id))]}),s("p",{className:"text-red-500 text-xs italic",children:(C=m.amenity_id)==null?void 0:C.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/property_spaces_amenitites"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};var eR={},bwe="text/csv;charset=utf-8;",ywe=function(e){var t=e.data,n=e.filename,a=n===void 0?"export.csv":n,r=e.delimiter,i=r===void 0?";":r,o=e.headers,c=xwe(a);if(t.length===0){iE(o?o.join(i):"",c);return}var l=Object.keys(t[0]),d=o!=null?o:l,u=t.map(function(y){return l.map(function(w){var v;return JSON.stringify(y[w]===0?0:(v=y[w])!==null&&v!==void 0?v:"")}).join(i)});u.unshift(d.join(i));var g=u.join(`\r
`);iE(g,c)},iE=function(e,t){var n="\uFEFF",a=new Blob([n,e],{type:bwe}),r=document.createElement("a");r.href=URL.createObjectURL(a),r.download=t,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r)},xwe=function(e){return/csv$/i.test(e)?e:"".concat(e,".csv")},wwe=Object.freeze(Object.defineProperty({__proto__:null,default:ywe},Symbol.toStringTag,{value:"Module"})),vwe=M_(wwe);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(h.exports),n=r(vwe),a=["data","filename","delimiter","headers"];function r(u){return u&&u.__esModule?u:{default:u}}function i(){return i=Object.assign?Object.assign.bind():function(u){for(var g=1;g<arguments.length;g++){var y=arguments[g];for(var w in y)Object.prototype.hasOwnProperty.call(y,w)&&(u[w]=y[w])}return u},i.apply(this,arguments)}function o(u,g){if(u==null)return{};var y=c(u,g),w,v;if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(u);for(v=0;v<S.length;v++)w=S[v],!(g.indexOf(w)>=0)&&(!Object.prototype.propertyIsEnumerable.call(u,w)||(y[w]=u[w]))}return y}function c(u,g){if(u==null)return{};var y={},w=Object.keys(u),v,S;for(S=0;S<w.length;S++)v=w[S],!(g.indexOf(v)>=0)&&(y[v]=u[v]);return y}var l=function(g){var y=g.data,w=g.filename,v=g.delimiter,S=g.headers,m=o(g,a);return t.default.createElement("button",i({onClick:function(){return(0,n.default)({data:y,filename:w,delimiter:v,headers:S})}},m),g.children||"Download Data")},d=l;e.default=d})(eR);var qy=zU(eR);let oE=new _e;const _we=()=>{var U,W,V,X,ne,oe,q,te;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState(10),[o,c]=R.useState(0),[l,d]=R.useState(0),[u,g]=R.useState(0),[y,w]=R.useState(!1),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=R.useState([]),[k,N]=lt(),[_]=lt((U=localStorage.getItem("admin_payout_filter"))!=null?U:""),C=je(),E=Qe({host_name:ge(),customer_name:ge(),status:ge()}),{reset:T,register:D,handleSubmit:P,setError:M,formState:{errors:O}}=Oe({resolver:Xe(E),defaultValues:(()=>{let G=Ue(k);return Object.keys(G).length>0?G:Ue(_)})()}),F=[{key:"",value:"All"},{key:"0",value:"Pending"},{key:"1",value:"Initiated"},{key:"2",value:"Paid"},{key:"3",value:"Cancelled"}],z=[{key:"0",value:"Pending"},{key:"1",value:"Initiated"},{key:"2",value:"Paid"},{key:"3",value:"Cancelled"}];function H(G){(async function(){i(G),await I(0,G)})()}function A(){(async function(){await I(u-1>0?u-1:0,r)})()}function j(){(async function(){await I(u+1<=o?u+1:0,r)})()}async function I(G,J){var Q;let K=Ue(k);K=Object.keys(K).length<1?Ue(_):K,K.id=(Q=K.id)==null?void 0:Q.replace(mt.PAYOUT,"");try{const Z=await oE.callRawAPI("/v2/api/custom/ergo/payout/PAGINATE",{where:[K?`${K.id?`ergo_payout.id LIKE '%${K.id}%'`:"1"} AND ${K.customer_name?`customer.first_name LIKE '%${K.customer_name}%' OR customer.last_name LIKE '%${K.customer_name}%'`:"1"} AND ${K.status?`ergo_payout.status LIKE '%${K.status}%'`:"1"} AND ${K.host_name?`ergo_user.first_name LIKE '%${K.host_name}%' OR ergo_user.last_name LIKE '%${K.host_name}%'`:"1"}`:1,"ergo_payout.deleted_at IS NULL"],page:G,limit:J,sortId:"update_at",direction:"DESC"},"POST"),{list:se,total:ce,limit:le,num_pages:ae,page:ie}=Z;a(se),i(le),c(ae),g(ie),d(ce),w(ie>1),S(ie+1<=ae)}catch(Z){me(e,Z.message),pe(t,Z.message,4e3,"ERROR")}}const B=G=>{k.set("id",G.id),k.set("host_name",G.host_name),k.set("customer_name",G.customer_name),k.set("status",G.status),N(k),localStorage.setItem("admin_payout_filter",k.toString()),I(1,r)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"payout"}}),async function(){await I(1,r)}()},[]);const Y=async G=>{G.bulk_status==1&&(G.initiated_at=new Date().toISOString());try{await Promise.all(b.map(J=>oE.callRawAPI("/v2/api/custom/ergo/payout/PUT",{id:J,status:G.bulk_status,initiated_at:G.initiated_at},"POST"))),pe(t,"Successful"),x([]),p(!1),I(1,r)}catch(J){me(e,J.message),pe(t,J.message,4e3,"ERROR")}};return f(Se,{children:[f("form",{className:"mb-10 rounded bg-white p-5 shadow",onSubmit:P(B),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Payout Search"}),s(ma,{link:"/admin/add-payout",text:"Add new Payout"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-4xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...D("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=O.id)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=O.id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host"}),s("input",{placeholder:"Host",...D("host_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=O.host_id)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=O.host_name)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_id",children:"Customer"}),s("input",{placeholder:"Customer",...D("customer_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(oe=O.customer_id)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(q=O.customer_name)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"status",children:"Status"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...D("status"),children:F.map(G=>s("option",{name:"status",value:G.key,children:G.value},G.key))}),s("p",{className:"text-xs italic text-red-500",children:(te=O.status)==null?void 0:te.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{T({id:"",customer_name:"",status:"",host_name:""}),localStorage.removeItem("admin_payout_filter"),Pt(k,N),Pt(_,N),I(u,r)},children:"Reset"})]}),s(Ln,{currentPage:u,pageSize:r,totalNumber:l,updatePageSize:H}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s("button",{className:"font-inter mr-5 rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",onClick:()=>p(G=>!G),children:m?"Turn off Bulk mode":"Turn on Bulk mode"}),s(qy,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",filename:"payout",data:n})]}),b.length>0&&m?s(Se,{children:f("form",{className:"flex items-center justify-end bg-white p-5",onSubmit:P(Y),children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"bulk_status",children:"Status"}),s("select",{className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...D("bulk_status"),children:F.map(G=>s("option",{name:"bulk_status",value:G.key,children:G.value},G.key))})]}),s("button",{type:"submit",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Bulk Edit"})]})}):null,s("div",{className:"max-w-[80vw] rounded bg-white p-5 shadow",id:"table-to-xls",children:n.map((G,J)=>{var K,Q,Z,se;return f("label",{className:"mb-4 flex flex-col justify-between rounded border px-5 py-4 lg:flex-row",children:[m&&s("input",{type:"checkbox",value:G.id,checked:b.includes(String(G.id)),onChange:ce=>{x(le=>{var ae=new Set(le);return ae.has(ce.target.value)?ae.delete(ce.target.value):ae.add(ce.target.value),Array.from(ae)})}}),s("div",{children:mt.PAYOUT+G.id}),f("div",{className:"mr-[22px] min-w-[219px] max-w-[219px]",children:[s("p",{className:"mb-1 text-xs font-medium ",children:"Host"}),f("p",{className:"mb-1 text-sm",children:[G.host_last_name,", ",G.host_first_name," "]}),s("p",{className:"mb-1 text-xs font-medium ",children:"Customer"}),f("p",{className:"mb-1 text-sm",children:[G.customer_last_name,", ",G.customer_first_name," "]})]}),f("div",{className:"mr-[22px] min-w-[219px] max-w-[219px]",children:[s("p",{className:"mb-1 text-xs font-medium ",children:"Booking Date"}),f("p",{className:"mb-1 text-sm",children:[G.create_at," "]}),s("p",{className:"mb-1 text-xs font-medium ",children:"Order Number"}),s("p",{className:"mb-1 text-sm",children:G.booking_id})]}),f("div",{className:"mb-4 min-w-[72px] max-w-[72px]",children:[s("p",{className:"mb-1 text-xs font-medium ",children:"Total"}),f("p",{className:"mb-1 text-sm",children:["$",(K=G==null?void 0:G.total)==null?void 0:K.toFixed(2)," "]}),s("p",{className:"mb-1 text-xs font-medium ",children:"Tax"}),f("p",{className:"mb-1 text-sm",children:["$",(Q=G==null?void 0:G.tax)==null?void 0:Q.toFixed(2)]})]}),f("div",{className:"mb-4 min-w-[72px] max-w-[72px]",children:[s("p",{className:"mb-1 text-xs font-medium ",children:"Commission"}),f("p",{className:"mb-1 text-sm",children:["$",(Z=G==null?void 0:G.commission)==null?void 0:Z.toFixed(2)," "]}),s("p",{className:"mb-1 text-xs font-medium ",children:"Payout Date"}),s("p",{className:"mb-1 text-sm",children:G!=null&&G.initiated_at?Te(G.initiated_at).add(7,"days").format("MM/DD/YY"):""})]}),s("div",{className:"mr-[22px] flex min-w-[60px] max-w-[60px] items-center justify-center",children:s("p",{children:(se=z.find(ce=>ce.key==G.status))==null?void 0:se.value})}),f(jt,{as:"div",className:"relative inline-block min-w-[60px] max-w-[60px] text-left",children:[s("div",{className:"flex h-full items-center",children:s(jt.Button,{className:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-1 py-3 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#33D4B7] focus:ring-offset-2 focus:ring-offset-gray-100",children:s(ln,{type:"dots"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:({active:ce})=>s("button",{onClick:()=>C(`/admin/edit-payout/${G.id}`),className:`${ce?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,children:"Edit"})})})})})]})]},J)})}),s(vn,{currentPage:u,pageCount:o,pageSize:r,totalNumber:l,canPreviousPage:y,canNextPage:v,updatePageSize:H,previousPage:A,nextPage:j})]})},lE=()=>{var S,m,p,b,x,k,N,_,C,E,T,D,P;const{dispatch:e}=R.useContext(we),t=Qe({host_id:ge(),customer_id:ge(),host_name:ge(),customer_name:ge(),total:dt().typeError("Total must be a number").required(),tax:dt().typeError("Tax must be a number").required(),commission:dt().typeError("Commission must be a number").required(),booking_id:dt().typeError("Booking id must be a number").required().positive().integer(),status:dt().required()}),{dispatch:n}=R.useContext(Ee);let a=new _e;const r=je(),{clearErrors:i,register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=[{key:0,value:"Pending"},{key:1,value:"Initiated"},{key:2,value:"Paid"},{key:3,value:"Cancelled"}];async function y(){try{a.setTable("settings");const M=await a.callRestAPI({page:1,limit:2},"PAGINATE"),{list:O}=M;d("tax",O.find(F=>F.key_name==="tax").key_value),d("commission",O.find(F=>F.key_name==="commission").key_value)}catch(M){console.log("ERROR",M),me(n,M.message)}}async function w(M){if(!!M)try{const F=await new _e().callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${M}`]},"POST");if(F.error||!F.list||!F.list.id)throw new Error;i("booking_id"),d("host_name",F.list.host_first_name+" "+F.list.host_last_name),d("customer_name",F.list.customer_first_name+" "+F.list.customer_last_name),d("host_id",F.list.host_id),d("customer_id",F.list.customer_id),console.log("booking",F.list)}catch(O){console.log("ERROR",O),l("booking_id",{type:"manual",message:"Booking with this ID does not exist"})}}const v=async M=>{console.log("submitting,",M);try{console.log(M),a.setTable("payout");const O=await a.callRawAPI("/v2/api/custom/ergo/payout/POST",{host_id:Number(M.host_id),customer_id:Number(M.customer_id),total:M.total,tax:M.tax,commission:M.commission,booking_id:M.booking_id,status:M.status},"POST");if(!O.error)pe(e,"Added"),r("/admin/payout");else if(O.validation){const F=Object.keys(O.validation);for(let z=0;z<F.length;z++){const H=F[z];l(H,{type:"manual",message:O.validation[H]})}}}catch(O){console.log("Error",O),l("host_id",{type:"manual",message:O.message}),me(n,O.message)}};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"payout"}}),y()},[]),s(Sa,{title:"Payout",backTo:"payout",children:f("form",{className:" w-full max-w-lg",onSubmit:c(v),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"booking_id",children:"Booking ID"}),s("input",{placeholder:"Booking ID",...o("booking_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(S=u.booking_id)!=null&&S.message?"border-red-500":""}`,onChange:M=>w(M.target.value)}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(m=u.booking_id)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host",children:"Host"}),s("input",{placeholder:"Host",...o("host_name"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(p=u.host_name)!=null&&p.message?"border-red-500":""}`,readOnly:!0}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(b=u.host_name)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"customer_id",children:"Customer"}),s("input",{placeholder:"Customer",...o("customer_name"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(x=u.customer_name)!=null&&x.message?"border-red-500":""}`,readOnly:!0}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(k=u.customer_name)==null?void 0:k.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"total",children:"Total"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{placeholder:"Total",...o("total"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(N=u.total)!=null&&N.message?"border-red-500":""}`})]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(_=u.total)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"tax",children:"Tax"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{placeholder:"Tax",...o("tax"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(C=u.tax)!=null&&C.message?"border-red-500":""}`,readOnly:!0})]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(E=u.tax)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"commission",children:"Commission"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{placeholder:"Commission",...o("commission"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(T=u.commission)!=null&&T.message?"border-red-500":""}`,readOnly:!0})]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(D=u.commission)==null?void 0:D.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"block text-gray-700 text-sm font-bold mb-2",children:"Status"}),s("select",{name:"Status",id:"status",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...o("status"),defaultValue:0,children:g.map(M=>s("option",{name:"status",value:M.key,children:M.value},M.key))}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(P=u.status)==null?void 0:P.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>r("/admin/payout"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let Lw=new _e;const cE=()=>{var k,N,_,C,E,T;const{dispatch:e}=R.useContext(Ee),t=Qe({total:dt().required().positive().typeError("total must be a number"),tax:dt().required().typeError("tax must be a number"),commission:dt().required().typeError("commission must be a number"),booking_id:dt().required().positive().integer().typeError("booking id must be a number"),status:ge()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),[o,c]=h.exports.useState(0),[l,d]=h.exports.useState(0),[u,g]=h.exports.useState(0),{register:y,handleSubmit:w,setError:v,setValue:S,formState:{errors:m}}=Oe({resolver:Xe(t)}),p=Mt(),b=[{key:"0",value:"Pending"},{key:"1",value:"initiated"},{key:"2",value:"Paid"},{key:"3",value:"Cancelled"}];h.exports.useEffect(function(){(async function(){var D,P;try{Lw.setTable("payout");const M=await Lw.callRestAPI({id:Number(p==null?void 0:p.id)},"GET");M.error||(d(M.model.host_id),c(M.model.customer_id),g(M.model.property_id),S("total",M.model.total),S("tax",(D=M.model.tax)!=null?D:0),S("commission",(P=M.model.commission)!=null?P:0),S("booking_id",M.model.booking_id),S("status",M.model.status),i(M.model.id))}catch(M){console.log("error",M),me(e,M.message)}})()},[]);const x=async D=>{try{let P={id:r,host_id:l,customer_id:o,property_id:u,total:D.total,tax:D.tax,commission:D.commission,booking_id:D.booking_id,status:D.status};if(P.status=="1"){let O=new Date;P.initiated_at=O.toISOString()}const M=await Lw.callRawAPI("/v2/api/custom/ergo/payout/PUT",{...P},"POST");if(!M.error)pe(n,"Updated"),a("/admin/payout");else if(M.validation){const O=Object.keys(M.validation);for(let F=0;F<O.length;F++){const z=O[F];v(z,{type:"manual",message:M.validation[z]})}}}catch(P){console.log("Error",P),v("host_id",{type:"manual",message:P.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"payout"}})},[]),s(Ja,{title:"Payout",backTo:"payout",table1:"payout",deleteMessage:"Are you sure you want to delete this payout?",id:r,children:f("form",{className:" w-full max-w-lg",onSubmit:w(x),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"total",children:"Total"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{disabled:!0,placeholder:"Total",...y("total"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(k=m.total)!=null&&k.message?"border-red-500":""}`})]}),s("p",{className:"text-red-500 text-xs italic",children:(N=m.total)==null?void 0:N.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"tax",children:"Tax"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{disabled:!0,placeholder:"Tax",...y("tax"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(_=m.tax)!=null&&_.message?"border-red-500":""}`})]}),s("p",{className:"text-red-500 text-xs italic",children:(C=m.tax)==null?void 0:C.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"commission",children:"Commission"}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center px-4 text-sm bg-gray-100 rounded-l-md border border-r-0 border-gray-300",children:"$"}),s("input",{disabled:!0,placeholder:"Commission",...y("commission"),className:`"shadow border rounded rounded-l-none w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(E=m.commission)!=null&&E.message?"border-red-500":""}`})]}),s("p",{className:"text-red-500 text-xs italic",children:(T=m.commission)==null?void 0:T.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"block text-gray-700 text-sm font-bold mb-2",children:"Status"}),s("select",{name:"status",id:"status",className:" border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...y("status"),children:b.map(D=>s("option",{name:"status",value:D.key,children:D.value},D.key))})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/payout"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let Dw=new _e;const Nwe=()=>{var j,I,B,Y,U,W,V,X,ne;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState([]),[o,c]=R.useState(10),[l,d]=R.useState(0),[u,g]=R.useState(0),[y,w]=R.useState(0),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=lt((j=localStorage.getItem("admin_property_filter"))!=null?j:""),k=Qe({address_line_1:ge(),address_line_2:ge(),city:ge(),country:ge(),zip:ge(),host_id:dt().positive().integer(),name:ge()}),{reset:N,register:_,handleSubmit:C,setError:E,formState:{errors:T}}=Oe({resolver:Xe(k),defaultValues:Ue(b)});function D(oe){const q=n,te=q.findIndex(K=>K.accessor===oe),G=q[te];G.isSortedDesc=!G.isSortedDesc,q.splice(te,1,G),a(()=>[...q]);const J=P(r,G.isSortedDesc,oe);i(J)}function P(oe,q,te){return(te==null?void 0:te.split(",").length)>1&&(te=te.split(",")[0]),oe.sort((G,J)=>{var K,Q,Z,se;if(q)return isNaN(G[te])?((K=G[te])==null?void 0:K.toLowerCase())<((Q=J[te])==null?void 0:Q.toLowerCase())?1:-1:G[te]<J[te]?1:-1;if(!q)return isNaN(G[te])?((Z=G[te])==null?void 0:Z.toLowerCase())<((se=J[te])==null?void 0:se.toLowerCase())?-1:1:G[te]<J[te]?-1:1})}function M(oe){(async function(){c(oe),await z(0,oe)})()}function O(){(async function(){await z(y-1>0?y-1:0,o)})()}function F(){(async function(){await z(y+1<=l?y+1:0,o)})()}async function z(oe,q){var G;const te=Ue(b);te.id=(G=te.id)==null?void 0:G.replace(mt.PROPERTY,"");try{const J=await Dw.callRawAPI("/v2/api/custom/ergo/property/PAGINATE",{where:[te?`${te.id?`ergo_property.id = '${te.id}'`:"1"}
AND ${te.host_id?`ergo_property.host_id = ${te.host_id}`:"1"}
AND ${te.email?`ergo_user.email LIKE '%${te.email}%'`:"1"}
AND ${te.zip?`ergo_property.zip LIKE '%${te.zip}%'`:"1"}
AND ${te.country?`ergo_property.country LIKE '%${te.country}%'`:"1"}`:1,"ergo_property.deleted_at IS NULL"],page:oe,limit:q,sortId:"update_at",direction:"DESC"},"POST"),{list:K,total:Q,limit:Z,num_pages:se,page:ce}=J,le=P(K,!1);i(le),c(Z),d(se),w(ce),g(Q),S(ce>1),p(ce+1<=se)}catch(J){console.log("ERROR",J),me(e,J.message),pe(t,J.message,4e3,"ERROR")}}const H=oe=>{b.set("id",oe.id),b.set("city",oe.city),b.set("zip",oe.zip),b.set("email",oe.email),x(b),localStorage.setItem("admin_property_filter",b.toString()),z(1,o)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property"}}),A(),z(1,o)},[]);async function A(){var oe;Dw.setTable("settings");try{const q=await Dw.callRestAPI({limit:1,page:1,payload:{key_name:"admin_property_space_column_order"}},"PAGINATE");Array.isArray(q.list)&&q.list.length>0&&a(va((oe=q.list[0].optional_data)!=null?oe:[],_a.admin_property))}catch(q){me(e,q.message),pe(t,q.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:C(H),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property"}),s(ma,{link:"/admin/add-property",text:"Add New Property"})]}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{..._("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(I=T.id)!=null&&I.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(B=T.id)==null?void 0:B.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host's Email"}),s("input",{..._("email"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Y=T.host_id)!=null&&Y.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(U=T.host_id)==null?void 0:U.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:"City"}),s("input",{..._("city"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=T.city)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=T.city)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"zip",children:"Zip Code"}),s("input",{type:"number",..._("zip"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=T.zip)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=T.zip)==null?void 0:ne.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{N({id:"",zip:"",host_id:"",city:""}),localStorage.removeItem("admin_property_filter"),Pt(b,x),z(y,o)},children:"Reset"})]}),s(Ln,{currentPage:y,pageSize:o,totalNumber:u,updatePageSize:M}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/property",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_spaces",sheet:"property_spaces",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:n,rows:r,emailActions:!0,tableType:"Property",table1:"property",deleteTitle:"Are you sure?",deleteMessage:"Are you sure you want to delete this Property?",onSort:D,id:"table-to-xls"})})}),s(vn,{currentPage:y,pageCount:l,pageSize:o,totalNumber:u,canPreviousPage:v,canNextPage:m,updatePageSize:M,previousPage:O,nextPage:F})]})};function tR({data:e,fieldToDisplay:t,setSelected:n,selected:a,placeholder:r}){const[i,o]=h.exports.useState(""),c=i===""?e:e.filter(l=>l[t].toLowerCase().replace(/\s+/g,"").includes(i.toLowerCase().replace(/\s+/g,""))).sort((l,d)=>l[t].toLowerCase().indexOf(i.toLowerCase())>d[t].toLowerCase().indexOf(i.toLowerCase())?1:l[t].toLowerCase().indexOf(i.toLowerCase())<d[t].toLowerCase().indexOf(i.toLowerCase())?-1:l[t]>d[t]?1:-1);return f(Se,{children:[" ",s("div",{className:"border w-full p-2",children:s(Rn,{value:a,onChange:n,children:f("div",{className:"relative",children:[s("div",{className:"relative w-full cursor-default overflow-hidden text-left focus:outline-none sm:text-sm",children:s(Rn.Input,{className:"w-full border-none focus:outline-none",displayValue:l=>l[t],onChange:l=>o(l.target.value),placeholder:r!=null?r:"Type to search.."})}),s(ke,{as:h.exports.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",afterLeave:()=>o(""),children:s(Rn.Options,{className:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm review-scroll custom-calendar-scroll",children:c.length===0&&i!==""?s("div",{className:"relative cursor-default select-none py-2 px-4 text-gray-700",children:"Other"}):c.filter(l=>l[t]!="").map(l=>s(Rn.Option,{className:({active:d})=>`relative cursor-default select-none py-2 px-4 ${d?"bg-teal-600 text-white":"text-gray-900"}`,value:l,children:({selected:d,active:u})=>s(Se,{children:s("span",{className:`block truncate ${d?"font-medium":"font-normal"}`,children:l[t]})})},l.id))})})]})})})]})}const Swe=()=>{var b,x,k,N,_,C,E,T,D,P,M,O,F;const{dispatch:e}=R.useContext(we),[t,n]=R.useState({}),[a,r]=R.useState([]),[i,o]=R.useState(!1);let c=new _e;const l=Qe({address_line_1:ge().required("Address line one is required"),address_line_2:ge(),city:ge().required("City is required"),country:ge().required("Country is required"),zip:dt().required("Zip is required").typeError("Zip code must be a number"),name:ge().required("Name is required")}).required(),{dispatch:d}=R.useContext(Ee),u=je(),{register:g,handleSubmit:y,setError:w,formState:{errors:v}}=Oe({resolver:Xe(l)});async function S(){try{c.setTable("user");const z=await c.callRestAPI({},"GETALL"),{list:H}=z;r(H)}catch(z){console.log("ERROR",z),me(d,z.message)}}const m=async z=>{if(o(!0),t!=null&&t.id){z.host_id=t.id;try{c.setTable("property");const H=await c.callRestAPI({address_line_1:z.address_line_1,address_line_2:z.address_line_2,city:z.city,country:z.country,zip:z.zip,status:1,verified:1,host_id:z.host_id,name:z.name},"POST");if(!H.error)pe(e,"Added"),u("/admin/property");else if(H.validation){const A=Object.keys(H.validation);for(let j=0;j<A.length;j++){const I=A[j];w(I,{type:"manual",message:H.validation[I]})}}}catch(H){console.log("Error",H),w("address_line_1",{type:"manual",message:H.message}),me(d,H.message)}}else return w("host_email",{type:"manual",message:"Please select a valid host email"});o(!1)},p=()=>{if(!(t!=null&&t.id))return w("host_email",{type:"manual",message:"Please select a valid host email"})};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"property"}}),S()},[]),s(Sa,{title:"Property",backTo:"property",children:f("form",{className:" w-full max-w-lg",onSubmit:y(m,p),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Property Name"}),s("input",{placeholder:"Property Name",...g("name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=v.name)!=null&&b.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(x=v.name)==null?void 0:x.message})]}),f("div",{className:"mb-4 normal-case",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host Email"}),s(tR,{selected:t,setSelected:n,data:a,fieldToDisplay:"email"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(k=v.host_email)==null?void 0:k.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_1",children:"Address Line 1"}),s("input",{placeholder:"Address line 1",...g("address_line_1"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(N=v.address_line_1)!=null&&N.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(_=v.address_line_1)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_2",children:"Address Line 2 (optional)"}),s("input",{placeholder:"Address line 2",...g("address_line_2"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(C=v.address_line_2)!=null&&C.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(E=v.address_line_2)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:"City"}),s("input",{placeholder:"City",...g("city"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(T=v.city)!=null&&T.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(D=v.city)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"country",children:"Country"}),s("input",{placeholder:"Country",...g("country"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(P=v.country)!=null&&P.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(M=v.country)==null?void 0:M.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"zip",children:"Zip Code"}),s("input",{type:"number",placeholder:"Zip Code",...g("zip"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(O=v.zip)!=null&&O.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(F=v.zip)==null?void 0:F.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/property"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",disabled:i,className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};function nR({control:e,name:t,setValue:n,className:a,valueField:r,labelField:i,getItems:o,...c}){const{field:l,fieldState:d,formState:u}=Ii({control:e,name:t}),[g,y]=h.exports.useState([]),[w,v]=h.exports.useState(""),[S,m]=h.exports.useState({});return h.exports.useEffect(()=>{o("",y,l.value)},[l.value]),h.exports.useEffect(()=>{S[i]&&v(S[i])},[S[r]]),h.exports.useEffect(()=>{var p;m((p=g.find(b=>b[r]==l.value))!=null?p:{})},[l.value,g.length]),f(Rn,{as:"div",className:`${a!=null?a:""} ${d.error?"border-red-500":""} normal-case`,value:l.value,onChange:n,children:[s(Rn.Input,{...c,className:"w-full truncate border-0 text-black focus:outline-none",onChange:p=>{v(p.target.value),p.target.value.trim()==""&&n(""),o(p.target.value,y,l.value)},value:w,onBlur:l.onBlur,ref:l.ref,name:l.name,autoComplete:"off"}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(Rn.Options,{className:`tiny-scroll absolute left-0 right-0 top-full z-50 mt-2 max-h-60 w-full origin-top cursor-pointer divide-y divide-gray-100 overflow-y-auto rounded-xl bg-white ring-black ring-opacity-5 focus:outline-none ${g.length>0?"py-2 shadow-lg ring-1":""}`,children:g.map((p,b)=>s(Rn.Option,{className:"flex w-full items-center truncate rounded-pill px-3 py-3 pr-5 text-sm ui-active:bg-gray-100 ui-active:text-black ui-not-active:text-gray-800",value:p[r],children:p[i]},b))})})]})}let sm=new _e;const kwe=()=>{var m,p,b,x,k,N,_,C,E,T,D,P,M;const{dispatch:e}=R.useContext(Ee),t=Qe({address_line_1:ge().required("Address line one is required"),address_line_2:ge(),city:ge().required("City is required"),country:ge().required("Country is required"),zip:ge().required("Zip is required"),host_id:dt()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,control:u,formState:{errors:g}}=Oe({resolver:Xe(t)}),y=Mt();async function w(){try{sm.setTable("property");const O=await sm.callRestAPI({id:Number(y==null?void 0:y.id)},"GET");O.error||(d("address_line_1",O.model.address_line_1),d("address_line_2",O.model.address_line_2),d("city",O.model.city),d("country",O.model.country),d("zip",O.model.zip),d("name",O.model.name),d("host_id",O.model.host_id),i(O.model.id))}catch(O){me(e,O.message),pe(n,O.message,4e3,"ERROR")}}async function v(O,F,z){try{var H=[];if(+z){const A=await sm.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{page:1,limit:1,where:[`${z?`ergo_user.id = ${+z}`:""} AND ergo_user.role != 'customer'`]},"POST");Array.isArray(A.list)&&(H=A.list)}if(O){const A=await sm.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{page:1,limit:10,where:[`ergo_user.email LIKE '%${O}%' AND ergo_user.role != 'customer'`]},"POST");Array.isArray(A.list)&&(H=[...H,...A.list])}F(H)}catch(A){console.log("err",A)}}const S=async O=>{console.log("submitting",O);try{const F=await sm.callRestAPI({id:r,address_line_1:O.address_line_1,address_line_2:O.address_line_2,city:O.city,country:O.country,zip:O.zip,host_id:O.host_id,name:O.name},"PUT");if(!F.error)pe(n,"Updated"),a("/admin/property");else if(F.validation){const z=Object.keys(F.validation);for(let H=0;H<z.length;H++){const A=z[H];l(A,{type:"manual",message:F.validation[A]})}}}catch(F){console.log("Error",F),l("address_line_1",{type:"manual",message:F.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"property"}}),w()},[]),f("form",{className:" mt-10 w-full max-w-lg",onSubmit:c(S),children:[f("div",{className:"mb-5 flex justify-between",children:[s("p",{className:"text-base font-bold",children:"Edit Property"}),s("button",{onClick:()=>a(`/admin/view-property/${y==null?void 0:y.id}`),children:"Cancel"})]}),f("div",{className:"mb-4 flex justify-between ",children:[s("p",{children:"ID"}),s("p",{className:"font-bold",children:r})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Property Name"}),s("input",{placeholder:"Property Name",...o("name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(m=g.name)!=null&&m.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(p=g.name)==null?void 0:p.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host Email"}),s(nR,{control:u,name:"host_id",setValue:O=>d("host_id",O),valueField:"id",labelField:"email",getItems:v,className:"relative flex h-[40px] items-center rounded border px-3",placeholder:"Host email"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(b=g.host_id)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_1",children:"Address Line 1"}),s("input",{placeholder:"Address Line 1",...o("address_line_1"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(x=g.address_line_1)!=null&&x.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(k=g.address_line_1)==null?void 0:k.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_2",children:"Address Line 2"}),s("input",{placeholder:"Address Line 2",...o("address_line_2"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(N=g.address_line_2)!=null&&N.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(_=g.address_line_2)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:"City"}),s("input",{placeholder:"City",...o("city"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(C=g.city)!=null&&C.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(E=g.city)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"country",children:"Country"}),s("input",{placeholder:"Country",...o("country"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(T=g.country)!=null&&T.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(D=g.country)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"zip",children:"Zip Code"}),s("input",{placeholder:"Zip Code",...o("zip"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(P=g.zip)!=null&&P.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(M=g.zip)==null?void 0:M.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/property"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})};let Cwe=new _e;const dE=({page:e})=>{const[t,n]=h.exports.useState(),{dispatch:a}=R.useContext(we),r=Mt(),[i,o]=h.exports.useState(0),c=[{key:0,name:"Profile Details",component:e==="view"?s(Ewe,{profileInfo:t}):s(kwe,{})},{key:1,name:"History",component:s(u5,{id:r==null?void 0:r.id,table:"property"})}];return R.useEffect(()=>{a({type:"SETPATH",payload:{path:"property"}}),async function(){const l=await Cwe.callRawAPI("/v2/api/custom/ergo/property/PAGINATE",{where:[r!=null&&r.id?`${r!=null&&r.id?`ergo_property.id = '${r==null?void 0:r.id}'`:"1"}`:1],page:1,limit:1},"POST");l.error||n(l.list[0])}()},[]),f(wf,{title:"Property",name:`${t?`${t==null?void 0:t.name}`:""}`,backTo:"property",table1:"property",deleteMessage:"Are you sure you want to delete this Property?",id:r==null?void 0:r.id,children:[s("div",{className:"border-b border-gray-200 text-center text-sm font-medium text-gray-500",children:s("ul",{className:"-mb-px flex flex-wrap",children:c.map(l=>s("li",{className:"mr-2",children:s("button",{onClick:()=>o(l.key),className:`inline-block p-4 ${i===l.key?"border-[#111827] font-bold text-[#111827]":" border-transparent hover:border-gray-300 hover:text-gray-600"} rounded-t-lg border-b-2 `,children:l.name})},l.key))})}),c[i].component]})},Ewe=({profileInfo:e})=>{var i,o;const t=je(),n=Mt(),a=[{key:"0",value:"No"},{key:"1",value:"Yes"}],r=[{key:"0",value:"Inactive"},{key:"1",value:"Active"}];return s(Se,{children:s("div",{className:"p-5",children:f("div",{className:"w-full max-w-[413px]",children:[f("div",{className:"mb-5 flex px-5",children:[s("p",{className:"w-[15rem] text-base font-bold",children:"Profile Details"}),s("div",{className:"flex-1",children:f("button",{className:"flex items-center text-[#33D4B7]",onClick:()=>t(`/admin/edit-property/${n==null?void 0:n.id}`),children:[s(ln,{type:"pencil",className:"stroke-[#33D4B7]"}),s("span",{className:"ml-2",children:"Edit"})]})})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Host ID"}),s("p",{className:"flex-1",children:e==null?void 0:e.host_id})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Host Email"}),s("p",{className:"flex-1 lowercase",children:e==null?void 0:e.email})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Address"}),f("p",{className:"flex-1",children:[e==null?void 0:e.address_line_1," ",e==null?void 0:e.address_line_2]})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"City"}),s("p",{className:"flex-1",children:e==null?void 0:e.city})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Zip Code"}),s("p",{className:"flex-1",children:e==null?void 0:e.zip})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Country"}),s("p",{className:"flex-1",children:e==null?void 0:e.country})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Verified"}),s("p",{className:"flex-1",children:(i=a[e==null?void 0:e.verified])==null?void 0:i.value})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right normal-case",children:"Num of Spaces"}),s("p",{className:"flex-1",children:e==null?void 0:e.spaces})]}),f("div",{className:"flex py-2",children:[s("p",{className:"mr-10 w-[10rem] px-5 text-right",children:"Status"}),s("p",{className:"flex-1",children:(o=r[e==null?void 0:e.status])==null?void 0:o.value})]}),s("div",{className:"flex py-2",children:s($e,{className:"mr-10 w-[10rem] px-5 text-right font-semibold underline ",to:`/admin/property_add_on?property_id=${e==null?void 0:e.id}`,target:"_blank",children:"View Addons"})})]})})})};let D0=new _e,Twe=new St;const Lwe=()=>{var U,W,V,X,ne,oe;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState([]),[N,_]=lt((U=localStorage.getItem("admin_bka_filter"))!=null?U:""),C=Qe({id:ge(),booking_id:ge(),property_add_on_id:ge()}),{reset:E,register:T,handleSubmit:D,setError:P,formState:{errors:M}}=Oe({resolver:Xe(C),defaultValues:Ue(N)});function O(q){const te=a,G=te.findIndex(Q=>Q.accessor===q),J=te[G];J.isSortedDesc=!J.isSortedDesc,te.splice(G,1,J),r(()=>[...te]);const K=F(i,J.isSortedDesc,q);o(K)}function F(q,te,G){return(G==null?void 0:G.split(",").length)>1&&(G=G.split(",")[0]),q.sort((J,K)=>{var Q,Z,se,ce;if(te)return isNaN(J[G])?((Q=J[G])==null?void 0:Q.toLowerCase())<((Z=K[G])==null?void 0:Z.toLowerCase())?1:-1:J[G]<K[G]?1:-1;if(!te)return isNaN(J[G])?((se=J[G])==null?void 0:se.toLowerCase())<((ce=K[G])==null?void 0:ce.toLowerCase())?-1:1:J[G]<K[G]?-1:1})}function z(q){(async function(){l(q),await I(0,q)})()}function H(){(async function(){await I(w-1>0?w-1:0,c)})()}function A(){(async function(){await I(w+1<=d?w+1:0,c)})()}const j=async()=>{try{const q=await Twe.getList("add_on",{filter:["deleted_at,is"],join:[]});q.error||k(q.list)}catch(q){console.log("Error",q),P("property_add_on_id",{type:"manual",message:q.message}),me(e,q.message)}};async function I(q,te){var J,K;const G=Ue(N);G.id=(J=G.id)==null?void 0:J.replace(mt.BOOKING_ADDON,""),G.booking_id=(K=G.booking_id)==null?void 0:K.replace(mt.BOOKINGS,""),D0.setTable("booking_addons");try{const Q=await D0.callRawAPI("/v2/api/custom/ergo/booking-addon/PAGINATE",{where:[G?`${G.id?`ergo_booking_addons.id = '${G.id}'`:"1"}
AND ${G.property_add_on_id?`ergo_add_on.id = '${G.property_add_on_id}'`:"1"}
AND ${G.booking_id?`booking_id = '${G.booking_id}'`:"1"}`:1,"ergo_booking_addons.deleted_at IS NULL"],page:q,limit:te,sortId:"update_at",direction:"DESC"},"POST"),{list:Z,total:se,limit:ce,num_pages:le,page:ae}=Q;console.log("list",Z);const ie=F(Z,!1);o(ie),l(ce),u(le),v(ae),y(se),m(ae>1),b(ae+1<=le)}catch(Q){me(e,Q.message),pe(t,Q.message,4e3,"ERROR")}}const B=q=>{console.log("submitting",q),N.set("id",q.id),N.set("booking_id",q.booking_id),N.set("property_add_on_id",q.property_add_on_id),_(N),localStorage.setItem("admin_bka_filter",N.toString()),I(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"booking_addons"}}),j(),async function(){await Y(),I(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),I(w,c))},[n.deleted]);async function Y(){var te;D0.setTable("settings");const q={key_name:"admin_booking_addons_column_order"};try{const G=await D0.callRestAPI({limit:1,page:1,payload:q},"PAGINATE");Array.isArray(G.list)&&G.list.length>0&&r(va((te=G.list[0].optional_data)!=null?te:[],_a.admin_booking_addons))}catch(G){me(e,G.message),pe(t,G.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:D(B),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Booking Addons Search"}),s(ma,{link:"/admin/add-booking_addons",text:"Add new Booking Add-on"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...T("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=M.id)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=M.id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"booking_id",children:"Booking ID"}),s("input",{placeholder:"Booking ID",...T("booking_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=M.booking_id)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=M.booking_id)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_add_on_id",children:"Add-ons"}),f("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("property_add_on_id"),children:[s("option",{value:"",children:"Select Option"}),x.map(q=>s("option",{value:q.id,children:q==null?void 0:q.name},q.id))]}),s("p",{className:"text-xs italic text-red-500",children:(oe=M.property_add_on_id)==null?void 0:oe.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({id:"",property_add_on_id:"",booking_id:""}),localStorage.removeItem("admin_bka_filter"),Pt(N,_),I(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:z}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/booking_addons",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"booking_addons",sheet:"booking_addons",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:" overflow-x-auto border border-gray-200 ",children:s(zr,{columns:a,rows:i,profile:!0,tableType:"booking_addons",table1:"booking_addons",deleteMessage:"Are you sure you want to delete this Booking Add-on?",deleteTitle:"Confirm Delete",onSort:O,showDelete:!1,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:z,previousPage:H,nextPage:A})]})},Dwe=()=>{var p,b,x,k;let e=new _e;const{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState("");R.useState("");const o=Qe({booking_id:dt().required().positive().integer().typeError("Booking ID must be a number"),property_add_on_id:dt()}).required(),{dispatch:c}=R.useContext(Ee),l=je(),{register:d,handleSubmit:u,setError:g,clearErrors:y,formState:{errors:w}}=Oe({resolver:Xe(o)});async function v(){try{const N=await e.callRawAPI("/v2/api/custom/ergo/property-addons/PAGINATE",{where:[r?`${r?`ergo_property.name = '${r}'`:"1"}`:1],page:1,limit:1e3},"POST"),{list:_}=N;console.log("addon",_),a(_)}catch(N){console.log("ERROR",N),me(c,N.message)}}const S=async N=>{if(!N){y("booking_id");return}try{const C=await new _e().callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${N}`]},"POST");if(C.error||!C.list||!C.list.id)throw new Error;y("booking_id"),i(C.list.property_name)}catch(_){console.log("ERROR",_),g("booking_id",{type:"manual",message:"Booking with this ID does not exist"})}},m=async N=>{try{e.setTable("booking_addons");const _=await e.callRestAPI({booking_id:N.booking_id,property_add_on_id:N.property_add_on_id},"POST");if(!_.error)pe(t,"Added"),l("/admin/booking_addons");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];g(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),g("booking_id",{type:"manual",message:_.message}),me(c,_.message)}};return h.exports.useEffect(()=>{r!=""&&v()},[r]),R.useEffect(()=>{t({type:"SETPATH",payload:{path:"booking_addons"}})},[]),s(Sa,{title:"Booking Add on",backTo:"booking_addons",children:f("form",{className:" w-full max-w-lg",onSubmit:u(m),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"booking_id",children:"Booking ID"}),s("input",{placeholder:"Booking ID",...d("booking_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(p=w.booking_id)!=null&&p.message?"border-red-500":""}`,onChange:N=>S(N.target.value)}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(b=w.booking_id)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_add_on_id",children:"Property Add-on"}),f("select",{className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(x=w.property_add_on_id)!=null&&x.message?"border-red-500":""}`,...d("property_add_on_id"),children:[s("option",{value:"",children:"Select Add On"}),n.map(N=>s("option",{value:N.id,children:N.add_on_name},N.id))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(k=w.property_add_on_id)==null?void 0:k.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>l("/admin/booking_addons"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let M0=new _e;const Mwe=()=>{var k,N,_;const{dispatch:e}=R.useContext(Ee),t=Qe({booking_id:dt().required().positive().integer(),property_add_on_id:dt().required().positive().integer()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=R.useState([]),[o,c]=R.useState(""),[l,d]=h.exports.useState(0),{register:u,handleSubmit:g,setError:y,setValue:w,clearErrors:v,formState:{errors:S}}=Oe({resolver:Xe(t)}),m=Mt(),p=async()=>{try{const C=await M0.callRawAPI("/v2/api/custom/ergo/property-addons/PAGINATE",{where:[o?`${o?`ergo_property.name = '${o}'`:"1"}`:1],page:1,limit:1e3},"POST"),{list:E}=C;console.log("addon",E),i(E)}catch(C){console.log("ERROR",C),me(e,C.message)}},b=async C=>{if(!C){v("booking_id");return}try{const T=await new _e().callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${C}`]},"POST");if(T.error||!T.list||!T.list.id)throw new Error;v("booking_id"),c(T.list.property_name)}catch(E){console.log("ERROR",E),y("booking_id",{type:"manual",message:"Booking with this ID does not exist"})}};h.exports.useEffect(function(){r.length>0&&l==0&&async function(){try{M0.setTable("booking_addons");const C=await M0.callRestAPI({id:Number(m==null?void 0:m.id)},"GET");C.error||(w("booking_id",C.model.booking_id),b(C.model.booking_id),w("property_add_on_id",C.model.property_add_on_id),d(C.model.id))}catch(C){console.log("error",C),me(e,C.message)}}()},[r.length]),h.exports.useEffect(()=>{o!=""&&p()},[o]);const x=async C=>{try{const E=await M0.callRestAPI({id:l,booking_id:C.booking_id,property_add_on_id:C.property_add_on_id},"PUT");if(!E.error)pe(n,"Updated"),a("/admin/booking_addons");else if(E.validation){const T=Object.keys(E.validation);for(let D=0;D<T.length;D++){const P=T[D];y(P,{type:"manual",message:E.validation[P]})}}}catch(E){console.log("Error",E),y("booking_id",{type:"manual",message:E.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"booking_addons"}}),p()},[]),s(Ja,{title:"Booking Add on",backTo:"booking_addons",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:g(x),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"booking_id",children:"Booking ID"}),s("input",{placeholder:"Booking ID",...u("booking_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(k=S.booking_id)!=null&&k.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(N=S.booking_id)==null?void 0:N.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_add_on_id",children:"Property Add-On"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...u("property_add_on_id"),children:[s("option",{value:"",children:"Select Option"}),r.map(C=>s("option",{value:C.id,children:C.add_on_name},C.id))]}),s("p",{className:"text-red-500 text-xs italic",children:(_=S.property_add_on_id)==null?void 0:_.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/booking_addons"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let Mw=new _e,Awe=new St;const Iwe=[{key:"",value:"All"},{key:"0",value:"HIDDEN"},{key:"1",value:"VISIBLE"}],Owe=[{key:"",value:"All"},{key:"0",value:"UNDER REVIEW"},{key:"1",value:"APPROVED"},{key:"2",value:"DECLINED"}],Pwe=()=>{var U,W,V,X,ne,oe,q,te,G,J,K,Q,Z,se,ce;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=h.exports.useState([]),[c,l]=lt(),[d]=lt((U=localStorage.getItem("admin_property_space_filter"))!=null?U:""),[u,g]=R.useState([]),[y,w]=R.useState(10),[v,S]=R.useState(0),[m,p]=R.useState(0),[b,x]=R.useState(0),[k,N]=R.useState(!1),[_,C]=R.useState(!1),E=Qe({property_name:ge(),status:ge(),category_name:ge()}),{reset:T,register:D,handleSubmit:P,formState:{errors:M}}=Oe({resolver:Xe(E),defaultValues:(()=>{let le=Ue(c);return Object.keys(le).length>0?le:Ue(d)})()});function O(le){const ae=a,ie=ae.findIndex(be=>be.accessor===le),de=ae[ie];de.isSortedDesc=!de.isSortedDesc,ae.splice(ie,1,de),r(()=>[...ae]);const fe=F(u,de.isSortedDesc,le);g(fe)}function F(le,ae,ie){return(ie==null?void 0:ie.split(",").length)>1&&(ie=ie.split(",")[0]),le.sort((de,fe)=>{var be,he,ve,Ce;if(ae)return isNaN(de[ie])?((be=de[ie])==null?void 0:be.toLowerCase())<((he=fe[ie])==null?void 0:he.toLowerCase())?1:-1:de[ie]<fe[ie]?1:-1;if(!ae)return isNaN(de[ie])?((ve=de[ie])==null?void 0:ve.toLowerCase())<((Ce=fe[ie])==null?void 0:Ce.toLowerCase())?-1:1:de[ie]<fe[ie]?-1:1})}function z(le){(async function(){w(le),await I(0,le)})()}function H(){(async function(){await I(b-1>0?b-1:0,y)})()}function A(){(async function(){await I(b+1<=v?b+1:0,y)})()}async function j(){try{let le=["deleted_at,is"];const ae=await Awe.getList("spaces",{filter:le,join:[]});Array.isArray(ae.list)&&o(ae.list)}catch(le){me(e,le.message),pe(t,le.message,4e3,"ERROR")}}async function I(le,ae){var de;let ie=Ue(c);ie=Object.keys(ie).length<1?Ue(d):ie,ie.id=(de=ie.id)==null?void 0:de.replace(mt.PROPERTY_SPACE,"");try{const fe=await Mw.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[ie?`${ie.id?`ergo_property_spaces.id = '${ie.id}'`:"1"} AND ${ie.host_email?`email LIKE '${ie.host_email}'`:"1"} AND ${ie.property_name?`ergo_property.name LIKE '%${ie.property_name}%'`:"1"} AND ${ie.category_name?`ergo_spaces.category LIKE '%${ie.category_name}%' `:"1"} AND ${ie.status?`ergo_property_spaces.availability LIKE '%${ie.status}%'`:"1"} AND ${ie.space_status?`ergo_property_spaces.space_status LIKE '%${ie.space_status}%'`:"1"} AND ${ie.host_id?`ergo_property.host_id = ${ie.host_id}`:"1"} AND ${ie.size!=null?`ergo_property_spaces.size = ${ie.size}`:"1"} AND ${ie.is_draft==1?`ergo_property_spaces.draft_status < ${Nn.COMPLETED}`:`ergo_property_spaces.draft_status = ${Nn.COMPLETED}`}`:1,"ergo_property_spaces.deleted_at IS NULL"],page:le,limit:ae,sortId:"update_at",direction:"DESC"},"POST"),{list:be,total:he,limit:ve,num_pages:Ce,page:nt}=fe,Ae=F(be,!1);g(Ae),w(ve),S(Ce),x(nt),p(he),N(nt>1),C(nt+1<=Ce)}catch(fe){me(e,fe.message),pe(t,fe.message,4e3,"ERROR")}}const B=le=>{c.set("id",le.id),c.set("host_id",le.host_id),c.set("host_email",le.host_email),c.set("property_name",le.property_name),c.set("category_name",le.category_name),c.set("status",le.status),c.set("space_status",le.space_status),c.set("size",le.size),c.set("is_draft",le.is_draft),l(c),localStorage.setItem("admin_property_space_filter",c.toString()),I(1,y)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_spaces"}}),async function(){await Y(),await I(1,y),j()}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),I(b,y))},[n.deleted]);async function Y(){var le;Mw.setTable("settings");try{const ae=await Mw.callRestAPI({limit:1,page:1,payload:{key_name:"admin_property_space_column_order"}},"PAGINATE");Array.isArray(ae.list)&&ae.list.length>0&&r(va((le=ae.list[0].optional_data)!=null?le:[],_a.admin_property_space))}catch(ae){me(e,ae.message),pe(t,ae.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none bg-white p-5 shadow ",onSubmit:P(B),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property Spaces Search"}),s(ma,{link:"/admin/add-property_spaces",text:"Add new Property Space"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-6xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{type:"number",placeholder:"ID",...D("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=M.id)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=M.id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host ID"}),s("input",{type:"number",placeholder:"Host ID",...D("host_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=M.id)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=M.host_id)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_email",children:"Host Email"}),s("input",{type:"email",placeholder:"Host Email",...D("host_email"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(oe=M.host_email)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(q=M.host_email)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_name",children:"Property"}),s("input",{type:"text",placeholder:"Property Name",...D("property_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(te=M.property_name)!=null&&te.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(G=M.property_name)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space",children:"Space"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white p-2 leading-tight text-gray-700 focus:outline-none ${(J=M.space_id)!=null&&J.message?"border-red-500":""}`,...D("category_name"),children:[s("option",{value:"",children:"Select Space Category"}),i.map(le=>s("option",{value:le.category,children:le.category},le.id))]}),s("p",{className:"text-xs italic text-red-500",children:(K=M.category_name)==null?void 0:K.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"size",children:"Size"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Q=M.size)!=null&&Q.message?"border-red-500":""}`,...D("size"),children:[s("option",{value:"",children:"ALL"}),["Small","Medium","Large","X-Large"].map((le,ae)=>s("option",{value:ae,children:le},le))]}),s("p",{className:"text-xs italic text-red-500",children:(Z=M.size)==null?void 0:Z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"is_draft",children:"Is draft"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(se=M.is_draft)!=null&&se.message?"border-red-500":""}`,...D("is_draft"),children:[s("option",{value:"",children:"ALL"}),["NO","YES"].map((le,ae)=>s("option",{value:ae,children:le},le))]}),s("p",{className:"text-xs italic text-red-500",children:(ce=M.is_draft)==null?void 0:ce.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Visibility"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...D("status"),children:Iwe.map(le=>s("option",{name:"Status",value:le.key,defaultValue:"Select Visibility",children:le.value},le.key))}),s("p",{className:"text-xs italic text-red-500"})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...D("space_status"),children:Owe.map(le=>s("option",{name:"space_status",value:le.key,defaultValue:"Select Status",children:le.value},le.key))}),s("p",{className:"text-xs italic text-red-500"})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{T({category_name:"",space_status:"",id:"",host_id:"",property_name:"",status:"",size:""}),localStorage.removeItem("admin_property_space_filter"),Pt(c,l),Pt(d,l),I(b,y)},children:"Reset"})]}),s(Ln,{currentPage:b,pageSize:y,totalNumber:m,updatePageSize:z}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/property_space",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_spaces",sheet:"property_spaces",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:u,profile:!0,tableType:"property_spaces",table1:"property_spaces",deleteMessage:"Are you sure you want to delete this Property Space?",deleteTitle:"Confirm Delete",onSort:O,id:"table-to-xls"})})}),s(vn,{currentPage:b,pageCount:v,pageSize:y,totalNumber:m,canPreviousPage:k,canNextPage:_,updatePageSize:z,previousPage:H,nextPage:A})]})},uE=new St,Rwe=()=>{var C,E,T,D,P,M,O,F,z,H,A,j,I,B,Y,U,W,V;const[e,t]=h.exports.useState([]),[n,a]=h.exports.useState({}),[r,i]=h.exports.useState([]);let o=new _e;const{dispatch:c}=R.useContext(we),l=Qe({max_capacity:dt().typeError("Max Capacity must be a number").required().positive().integer(),description:ge().required("Description is required"),rate:dt().typeError("Rate must be a number").required(),tax:dt().typeError("Tax must be a number").required(),availability:dt(),space_status:dt(),space_id:dt().typeError("Please select a space category").required("Space category is required"),additional_guest_rate:ge()}),{dispatch:d}=R.useContext(Ee),u=je(),{register:g,handleSubmit:y,setError:w,setValue:v,watch:S,formState:{errors:m}}=Oe({resolver:Xe(l)}),p=S("space_id"),b=((C=e.find(X=>X.id==Number(p)))==null?void 0:C.has_sizes)==1;async function x(){try{const X=await uE.getList("property",{filter:["deleted_at,is"],join:[]}),{list:ne}=X;i(ne)}catch(X){console.log("ERROR",X),me(d,X.message)}}async function k(){try{const X=await uE.getList("spaces",{filter:["deleted_at,is"],join:[]}),{list:ne}=X;t(ne)}catch(X){console.log("ERROR",X),me(d,X.message)}}const N=async X=>{if(!(n!=null&&n.id)){w("property_id",{type:"manual",message:"Please select a valid property"});return}X.property_id=n.id;try{o.setTable("property_spaces");const ne=await o.callRestAPI({property_id:X.property_id,space_id:X.space_id,max_capacity:X.max_capacity,description:X.description,rate:X.rate,tax:X==null?void 0:X.tax,availability:X.availability,space_status:X.space_status,additional_guest_rate:X.additional_guest_rate||void 0,size:Number(X.size)||null},"POST");if(!ne.error)pe(c,"Added"),u("/admin/property_spaces");else if(ne.validation){const oe=Object.keys(ne.validation);for(let q=0;q<oe.length;q++){const te=oe[q];w(te,{type:"manual",message:ne.validation[te]})}}}catch(ne){console.log("Error",ne),ne.message=="Validation error"?w("property_id",{type:"manual",message:"Property Space Already Exists!"}):w("property_id",{type:"manual",message:ne.message}),me(d,ne.message)}},_=()=>{n!=null&&n.id||w("property_id",{type:"manual",message:"Please select a valid property"})};return h.exports.useEffect(()=>{c({type:"SETPATH",payload:{path:"property_spaces"}}),async function(){await x(),await k()}()},[]),s(Sa,{title:"Property Space",backTo:"property_spaces",children:f("form",{className:" w-full max-w-lg",onSubmit:y(N,_),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_id",children:"Property"}),s(tR,{selected:n,setSelected:a,data:r,fieldToDisplay:"name"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(E=m.property_id)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(T=m.space_id)!=null&&T.message?"border-red-500":""}`,...g("space_id"),children:[s("option",{value:"",children:"Select Space Category"}),e.map(X=>s("option",{value:X.id,children:X.category},X.id))]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(D=m.space_id)==null?void 0:D.message})]}),b&&f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"size",children:"Size"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(P=m.size)!=null&&P.message?"border-red-500":""}`,...g("size",{shouldUnregister:!0}),children:[s("option",{value:"",children:"Select Size"}),["Small","Medium","Large","X-Large"].map((X,ne)=>s("option",{value:ne,children:X},X))]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(M=m.size)==null?void 0:M.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"max_capacity",children:"Max Capacity"}),s("input",{placeholder:"Max Capacity",...g("max_capacity"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(O=m.max_capacity)!=null&&O.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(F=m.max_capacity)==null?void 0:F.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"description",children:"Description"}),s("textarea",{placeholder:"description",...g("description"),className:`focus:shadow-outline mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(z=m.description)!=null&&z.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-xs normal-case italic text-red-500",children:(H=m.description)==null?void 0:H.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:"Tax"}),s("input",{placeholder:"Tax",...g("tax"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(A=m.rate)!=null&&A.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(j=m.tax)==null?void 0:j.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:"Rate ( Hourly )"}),s("input",{placeholder:"Rate ( Hourly )",...g("rate"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(I=m.rate)!=null&&I.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(B=m.rate)==null?void 0:B.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"additional_guest_rate",children:"Additional guests price ( Hourly )"}),s("input",{placeholder:"Rate for additional guests",...g("additional_guest_rate"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Y=m.additional_guest_rate)!=null&&Y.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(U=m.additional_guest_rate)==null?void 0:U.message})]}),f("div",{className:"mb-8 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"availability",children:"Visibility"}),f("select",{name:"availability",...g("availability"),className:"focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",children:[s("option",{value:0,children:"HIDDEN"}),s("option",{value:1,children:"VISIBLE"})]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(W=m.availability)==null?void 0:W.message})]}),f("div",{className:"mb-8 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_status",children:"Status"}),f("select",{name:"space_status",...g("space_status"),className:"focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",children:[s("option",{value:0,children:"UNDER REVIEW"}),s("option",{value:1,children:"APPROVED"}),s("option",{value:1,children:"DECLINED"})]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(V=m.space_status)==null?void 0:V.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/property_spaces"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let fi=new _e;const jwe=()=>{var O,F,z,H,A,j,I,B,Y,U,W,V,X,ne,oe,q,te,G,J,K;const{dispatch:e}=R.useContext(Ee),[t,n]=h.exports.useState([]),[a,r]=h.exports.useState({}),[i,o]=h.exports.useState([]),c=Qe({property_id:dt(),max_capacity:dt().required().positive().integer(),description:ge().required(),rate:dt().required(),tax:dt().typeError("Tax must be a number").required(),visibility:dt(),space_status:dt(),space_id:dt().typeError("Please select a space category").required("Space category is required"),reason:ge().when("space_status",{is:Q=>Q==2,then:ge().required("This field is required"),otherwise:ge().notRequired()}),additional_guest_rate:ge()}).required(),{dispatch:l}=R.useContext(we),d=je(),[u,g]=h.exports.useState(0),{register:y,handleSubmit:w,setError:v,setValue:S,watch:m,formState:{errors:p}}=Oe({resolver:Xe(c)}),b=m("space_status"),x=m("space_id"),k=((O=t.find(Q=>Q.id==Number(x)))==null?void 0:O.has_sizes)==1,N=Mt(),[_,C]=h.exports.useState(null);async function E(Q,Z,se){try{fi.setTable("property");const ce={name:se.name||void 0},le=await fi.callRestAPI({payload:ce,page:Q,limit:Z},"PAGINATE"),{list:ae}=le;o(ae)}catch(ce){console.log("ERROR",ce),me(e,ce.message)}}async function T(){try{fi.setTable("spaces");const Q=await fi.callRestAPI({},"GETALL"),{list:Z}=Q;n(Z)}catch(Q){console.log("ERROR",Q),me(e,Q.message)}}async function D(Q,Z){fi.setTable("user");try{var se=(await fi.callRestAPI({id:Q.host_id},"GET")).model.email;const le=await fi.sendEmail(se,"Property Space Declined",Z)}catch(ce){l({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:ce.message}})}}h.exports.useEffect(()=>{i.length>0&&t.length>0&&!a.name&&async function(){try{const Q=await fi.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[`ergo_property_spaces.id = ${N==null?void 0:N.id}`],page:1,limit:1},"POST");if(!Q.error){const Z=Q.list[0]||{};console.log("properties",i),r(i.find(se=>se.name==Z.property_name)||{name:""}),S("space_id",Z.space_id),S("max_capacity",Z.max_capacity),S("description",Z.description),S("rate",Z.rate),S("visibility",Z.availability),S("space_status",Z.space_status),C(Z.space_status),S("reason",Z.reason),S("tax",Z==null?void 0:Z.tax),S("additional_guest_rate",Z.additional_guest_rate),S("size",Z.size),g(Z.id)}}catch(Q){console.log("error",Q),me(e,Q.message)}}()},[i.length,t.length]);const P=async Q=>{if(console.log("data",Q),!(a!=null&&a.id)){v("property_id",{type:"manual",message:"Please select a valid property"});return}console.log(Q.size),Q.property_id=a.id,_!=2&&Q.space_status==2&&D(a,Q.reason);try{fi.setTable("property_spaces");const Z=await fi.callRestAPI({id:u,property_id:Q.property_id,space_id:Q.space_id,max_capacity:Q.max_capacity,description:Q.description,rate:Q.rate,tax:Q==null?void 0:Q.tax,additional_guest_rate:Number(Q.additional_guest_rate)||0,availability:Q.visibility,space_status:Q.space_status,size:Number(Q.size)||null},"PUT");if(!Z.error)pe(l,"Updated"),d("/admin/property_spaces");else if(Z.validation){const se=Object.keys(Z.validation);for(let ce=0;ce<se.length;ce++){const le=se[ce];v(le,{type:"manual",message:Z.validation[le]})}}}catch(Z){console.log("Error",Z),v("property_id",{type:"manual",message:Z.message})}},M=Q=>{console.log("erroring",Q),a!=null&&a.id||v("property_id",{type:"manual",message:"Please select a valid property"})};return R.useEffect(()=>{l({type:"SETPATH",payload:{path:"property_spaces"}}),async function(){await E(1,1e4,{name:null}),await T()}()},[]),s(Ja,{title:"Property Space",backTo:"property_spaces",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:w(P,M),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_id",children:"Property"}),s(vr,{selectedData:a,setSelectedData:r,data:i,getData:E,field:"name",errorField:"property_id",setError:v}),s("p",{className:"text-xs italic text-red-500",children:(F=p.property_id)==null?void 0:F.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space"}),f("select",{className:`focus:shadow-outline w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 shadow focus:outline-none ${(z=p.space_id)!=null&&z.message?"border-red-500":""}`,...y("space_id"),children:[s("option",{value:"",children:"Select Space Category"}),t.map(Q=>s("option",{value:Q.id,children:Q.category},Q.id))]}),s("p",{className:"text-xs italic text-red-500",children:(H=p.space_id)==null?void 0:H.message})]}),k&&f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"size",children:"Size"}),f("select",{className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(A=p.size)!=null&&A.message?"border-red-500":""}`,...y("size",{shouldUnregister:!0}),children:[s("option",{value:"",children:"Select Size"}),["Small","Medium","Large","X-Large"].map((Q,Z)=>s("option",{value:Z,children:Q},Q))]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(j=p.size)==null?void 0:j.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"max_capacity",children:"Max Capacity"}),s("input",{placeholder:"Max Capacity",...y("max_capacity"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(I=p.max_capacity)!=null&&I.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(B=p.max_capacity)==null?void 0:B.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"description",children:"Description"}),s("textarea",{placeholder:"Description",...y("description"),className:`focus:shadow-outline mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Y=p.description)!=null&&Y.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-xs italic text-red-500",children:(U=p.description)==null?void 0:U.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:"Tax"}),s("input",{placeholder:"Tax",...y("tax"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=p.rate)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(V=p.tax)==null?void 0:V.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:"Rate ( Hourly )"}),s("input",{placeholder:"Rate ( Hourly )",...y("rate"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=p.rate)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=p.rate)==null?void 0:ne.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"additional_guest_price",children:"Additional guests price ( Hourly )"}),s("input",{placeholder:"Rate for additional guests",...y("additional_guest_rate"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(oe=p.additional_guest_price)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(q=p.additional_guest_price)==null?void 0:q.message})]}),f("div",{className:"mb-8",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"visibility",children:"Visibility"}),f("select",{name:"visibility",...y("visibility"),className:"focus:shadow-outline w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 shadow focus:outline-none",children:[s("option",{value:0,children:"HIDDEN"}),s("option",{value:1,children:"VISIBLE"})]}),s("p",{className:"text-xs italic text-red-500",children:(te=p.visibility)==null?void 0:te.message})]}),f("div",{className:"mb-8",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_status",children:"Status"}),f("select",{name:"space_status",...y("space_status"),className:"focus:shadow-outline w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 shadow focus:outline-none",children:[s("option",{value:0,children:"UNDER REVIEW"}),s("option",{value:1,children:"APPROVED"}),s("option",{value:2,children:"DECLINED"})]}),s("p",{className:"text-xs italic text-red-500",children:(G=p.space_status)==null?void 0:G.message})]}),b==2&&f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"reason",children:"Decline Reason"}),s("textarea",{placeholder:"Reason",...y("reason"),className:`focus:shadow-outline mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(J=p.reason)!=null&&J.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-xs italic text-red-500",children:(K=p.reason)==null?void 0:K.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>d("/admin/property_spaces"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let fE=new _e;const zwe=({page:e})=>{const{state:t}=An(),{dispatch:n}=R.useContext(we),{id:a}=Mt(),[r,i]=h.exports.useState(1),[o,c]=h.exports.useState([]),[l,d]=h.exports.useState([]),[u,g]=h.exports.useState([]),[y,w]=h.exports.useState([]);async function v(){const x=[`property_spaces_id = ${a}`];try{const k=await _t("property-space-images","post",{page:1,limit:7,where:x},"PAGINATE");Array.isArray(k.list)&&c(k.list)}catch(k){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:k.message}})}}async function S(){const x=[`property_spaces_id = ${a}`];try{const k=await _t("property-spaces-amenitites","post",{page:1,limit:1e3,where:x},"PAGINATE");Array.isArray(k.list)&&d(k.list.map(N=>N.amenity_name))}catch(k){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:k.message}})}}async function m(){var N;const x=(N=localStorage.getItem("role"))!=null?N:"customer",k=[`ergo_review.property_spaces_id = ${a} AND ergo_review.status = 1 AND ergo_review.given_by = 'customer'`];try{const _=await _t("review-hashtag","post",{page:1,limit:1e3,where:k,user:x},"PAGINATE");Array.isArray(_.list)&&g(_.list)}catch(_){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:_.message}})}}async function p(){fE.setTable("property_space_faq");const x={property_space_id:Number(a)};try{const k=await fE.callRestAPI({page:1,limit:1e3,payload:x},"PAGINATE");Array.isArray(k.list)&&w(k.list)}catch(k){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:k.message}})}}h.exports.useEffect(()=>{v(),S(),p(),m()},[]);const b=[{key:0,name:"Summary",component:s(Fwe,{images:o,faqs:y,amenities:l,reviews:u})},{key:1,name:"Links",component:f("div",{className:"flex min-h-[500px] items-center justify-center gap-12 p-8",children:[s($e,{to:`/admin/property_spaces_images?property_spaces_id=${a}`,target:"_blank",className:"border border-blue-500 p-5 duration-200 hover:scale-150",children:"View Images"}),s($e,{to:`/admin/property_spaces_faq?property_space_id=${a}`,className:"border border-blue-500 p-5 duration-200 hover:scale-150",target:"_blank",children:"View FAQs"}),s($e,{to:`/admin/property_spaces_amenitites?property_spaces_id=${a}`,className:"border border-blue-500 p-5 duration-200 hover:scale-150",target:"_blank",children:"View Amenities"}),s($e,{to:`/admin/booking?property_space_id=${a}`,className:"border border-blue-500 p-5 duration-200 hover:scale-150",target:"_blank",children:"View Bookings"}),s($e,{to:`/admin/review/customer?property_spaces_id=${a}`,className:"border border-blue-500 p-5 duration-200 hover:scale-150",target:"_blank",children:"View Reviews"})]})}];return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"property_spaces"}})},[]),f(Se,{children:[f("div",{className:"",children:[s("h1",{className:"text-center text-4xl",children:t==null?void 0:t.property_name}),s("ul",{className:"-mb-px flex flex-wrap",children:b.map(x=>s("li",{className:"mr-2",children:s("button",{onClick:()=>i(x.key),className:`inline-block p-4 ${r===x.key?"border-[#111827] font-bold text-[#111827]":" border-transparent hover:border-gray-300 hover:text-gray-600"} rounded-t-lg border-b-2 `,children:x.name})},x.key))})]}),b[r].component]})},Fwe=({images:e,amenities:t,faqs:n,reviews:a})=>f("div",{className:"p-3",children:[s("h1",{className:"my-4 text-3xl font-semibold",children:"Images"}),s("div",{className:"flex flex-wrap gap-3",children:e.map(r=>s($e,{to:`/admin/property_spaces_images?id=${r.id}`,children:s("img",{className:"max-w-60 max-h-60 border",src:r.photo_url})},r.id))}),s("br",{}),s("br",{}),s("h1",{className:"my-4 text-3xl font-semibold",children:"Amenities"}),s("div",{className:"flex flex-col gap-3",children:t.map((r,i)=>s("li",{children:r},i))}),s("br",{}),s("br",{}),s("h1",{className:"my-4 text-3xl font-semibold",children:"FAQS"}),s("div",{className:"flex flex-col gap-3",children:n.map((r,i)=>s("li",{children:r.question},i))}),s("br",{}),s("br",{}),s("h1",{className:"my-4 text-3xl font-semibold",children:"Reviews"}),s("div",{className:"flex flex-col gap-3",children:a.map(r=>s("li",{children:r},r.id))})]});let mE=new _e;const $we=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.SETTING},{header:"Key Name",accessor:"key_name",isSorted:!0,isSortedDesc:!0},{header:"Key Value",accessor:"key_value",isSorted:!0,isSortedDesc:!0},{header:"Actions",accessor:""}],Bwe=()=>{var A,j,I,B;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=R.useState($we),[r,i]=R.useState([]),[o,c]=R.useState(10),[l,d]=R.useState(0),[u,g]=R.useState(0),[y,w]=R.useState(0),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=lt(),k=Qe({id:ge(),key_name:ge()}),{reset:N,register:_,handleSubmit:C,setError:E,formState:{errors:T}}=Oe({resolver:Xe(k)});function D(Y){const U=n,W=U.findIndex(ne=>ne.accessor===Y),V=U[W];V.isSortedDesc=!V.isSortedDesc,U.splice(W,1,V),a(()=>[...U]);const X=P(r,V.isSortedDesc,Y);i(X)}function P(Y,U,W){return(W==null?void 0:W.split(",").length)>1&&(W=W.split(",")[0]),Y.sort((V,X)=>{var ne,oe,q,te;if(U)return isNaN(V[W])?((ne=V[W])==null?void 0:ne.toLowerCase())<((oe=X[W])==null?void 0:oe.toLowerCase())?1:-1:V[W]<X[W]?1:-1;if(!U)return isNaN(V[W])?((q=V[W])==null?void 0:q.toLowerCase())<((te=X[W])==null?void 0:te.toLowerCase())?-1:1:V[W]<X[W]?-1:1})}function M(Y){(async function(){c(Y),await z(0,Y)})()}function O(){(async function(){await z(y-1>0?y-1:0,o)})()}function F(){(async function(){await z(y+1<=l?y+1:0,o)})()}async function z(Y,U){const W=Ue(b);try{mE.setTable("settings");const V={id:W.id||void 0,key_name:W.key_name||void 0},X=await mE.callRestAPI({payload:V,page:Y,limit:U},"PAGINATE"),{list:ne,total:oe,limit:q,num_pages:te,page:G}=X,J=P(ne.filter(K=>K.key_value),!1);i(J),c(q),d(te),w(G),g(oe),S(G>1),p(G+1<=te)}catch(V){me(e,V.message),pe(t,V.message,4e3,"ERROR")}}const H=Y=>{var V,X;Y.id=Y.id.replace(mt.SETTING,"");let U=(V=Y.id)!=null?V:void 0,W=(X=Y.key_name)!=null?X:void 0;x(Au({id:U,key_name:W})),z(1,o)};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"settings"}}),z(1,o)},[]),f(Se,{children:[f("form",{className:"p-5 bg-white shadow rounded",onSubmit:C(H),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Settings"}),s(ma,{link:"/admin/add-settings",text:"Add New Setting"})]}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap max-w-4xl",children:[f("div",{className:"mb-4 w-full md:w-1/2 pr-2 pl-2",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",..._("id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(A=T.id)!=null&&A.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(j=T.id)==null?void 0:j.message})]}),f("div",{className:"mb-4 w-full md:w-1/2 pr-2 pl-2",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"key_name",children:"Key Name"}),s("input",{placeholder:"Key Name",..._("key_name"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(I=T.key_name)!=null&&I.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(B=T.key_name)==null?void 0:B.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"ml-2 cursor-pointer rounded-md font-inter px-[66px] py-[10px] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent border border-[#33D4B7]",type:"reset",onClick:()=>{N({id:"",key_name:""}),Pt(b,x),z(y,o)},children:"Reset"})]}),s(Ln,{currentPage:y,pageSize:o,totalNumber:u,updatePageSize:M}),s("div",{className:"overflow-x-auto bg-white shadow rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200",children:s(zr,{columns:n,rows:r,profile:!0,tableType:"settings",table1:"settings",deleteMessage:"Are you sure you want to delete this setting?",showDelete:!1,onSort:D})})}),s(vn,{currentPage:y,pageCount:l,pageSize:o,totalNumber:u,canPreviousPage:v,canNextPage:m,updatePageSize:M,previousPage:O,nextPage:F})]})},Hwe=()=>{var d,u,g,y;const{dispatch:e}=R.useContext(we),t=Qe({key_name:ge().required(),key_value:ge().required()}).required(),{dispatch:n}=R.useContext(Ee),a=je(),{register:r,handleSubmit:i,setError:o,formState:{errors:c}}=Oe({resolver:Xe(t)}),l=async w=>{let v=new _e;try{v.setTable("settings");const S=await v.callRestAPI({key_name:w.key_name.toLowerCase(),key_value:w.key_value},"POST");if(!S.error)pe(e,"Added"),a("/admin/settings");else if(S.validation){const m=Object.keys(S.validation);for(let p=0;p<m.length;p++){const b=m[p];o(b,{type:"manual",message:S.validation[b]})}}}catch(S){console.log("Error",S),o("key_name",{type:"manual",message:S.message}),me(n,S.message)}};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"settings"}})},[]),s(Sa,{title:"Settings",backTo:"settings",children:f("form",{className:" w-full max-w-lg",onSubmit:i(l),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"key_name",children:"Key Name"}),s("input",{placeholder:"Key name",...r("key_name"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(d=c.key_name)!=null&&d.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(u=c.key_name)==null?void 0:u.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"key_value",children:"Key Value"}),s("input",{placeholder:"key value",...r("key_value"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(g=c.key_value)!=null&&g.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(y=c.key_value)==null?void 0:y.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/settings"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let Aw=new _e;const Uwe=()=>{var w,v,S,m;const{dispatch:e}=R.useContext(Ee),t=Qe({key_value:ge().required()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=Mt();h.exports.useEffect(function(){(async function(){try{Aw.setTable("settings");const p=await Aw.callRestAPI({id:Number(g==null?void 0:g.id)},"GET");p.error||(d("key_name",p.model.key_name),d("key_value",p.model.key_value),i(p.model.id))}catch(p){console.log("error",p),me(e,p.message)}})()},[]);const y=async p=>{try{const b=await Aw.callRestAPI({id:r,key_value:p.key_value},"PUT");if(!b.error)pe(n,"Updated"),a("/admin/settings");else if(b.validation){const x=Object.keys(b.validation);for(let k=0;k<x.length;k++){const N=x[k];l(N,{type:"manual",message:b.validation[N]})}}}catch(b){console.log("Error",b),l("key_name",{type:"manual",message:b.message}),me(e,b.message)}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"settings"}})},[]),s(Ja,{title:"Setting",backTo:"settings",table1:"settings",deleteMessage:"Are you sure you want to delete this setting?",id:r,showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:c(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"key_name",children:"KeyName"}),s("input",{placeholder:"Key Name",disabled:!0,...o("key_name"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(w=u.key_name)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(v=u.key_name)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"key_value",children:"KeyValue"}),s("input",{placeholder:"Key Value",...o("key_value"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(S=u.key_value)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(m=u.key_value)==null?void 0:m.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/settings"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};function Xa({enabled:e,setEnabled:t}){return s("div",{className:"py-1",children:f(Tr,{checked:e,onChange:t,className:`${e?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${e?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})})}function Vwe({modalOpen:e,modalImage:t,closeModal:n}){return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:s(De.Panel,{as:"img",className:"w-full max-w-3xl transform overflow-hidden align-middle shadow-xl transition-all",src:t})})})})]})})})}function Wwe({modalOpen:e,data:t,closeModal:n,onSuccess:a}){const{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we),[o,c]=h.exports.useState(!1);async function l(d){var w;c(!0);const u=new _e;d.preventDefault();const y=new FormData(d.target).get("reason");u.setTable("property_spaces_images");try{if(await u.callRestAPI({id:t.id,is_approved:rn.NOT_APPROVED},"PUT"),on(t.settings,{}).email_on_space_image_declined==!0){const v=await u.getEmailTemplate("space-image-decline"),S=(w=v.html)==null?void 0:w.replace(new RegExp("{{{reason}}}","g"),y);await u.sendEmail(t.email,v.subject,S),pe(i,"Email sent to user")}else pe(i,"Successful");a(),d.target.reset()}catch(v){me(r,v.message),pe(i,v.message,4e3,"ERROR")}n(),c(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:l,children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900 mb-8",children:"Decline Reason"}),s("textarea",{name:"reason",cols:"30",rows:"5",className:"w-full focus:outline-none border-2 p-2 resize-none text-sm text-gray-900"}),f("div",{className:"mt-4 flex gap-4 justify-end",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border border-black px-4 py-2 text-sm font-medium",onClick:n,children:"Cancel"}),s("button",{disabled:o,type:"submit",className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] text-white inline-flex justify-center rounded-md px-4 py-2 text-sm font-medium",children:"Reject"})]})]})})})})]})})})}let ms=new _e;const Ywe=()=>{var Z,se,ce,le,ae,ie,de,fe,be,he,ve,Ce,nt;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState(!0),[N,_]=R.useState([]),[C,E]=lt(),[T]=lt((Z=localStorage.getItem("admin_psi_filter"))!=null?Z:""),[D,P]=R.useState(null),[M,O]=R.useState(!1),[F,z]=R.useState({}),H=Qe({id:ge(),property_id:ge(),property_space_name:ge(),property_name:ge(),is_approved:ge(),host_email:ge()}),{reset:A,register:j,handleSubmit:I,setError:B,formState:{errors:Y}}=Oe({resolver:Xe(H),defaultValues:(()=>{let Ae=Ue(C);return Object.keys(Ae).length>0?Ae:Ue(T)})()});function U(Ae){const Je=a,ze=Je.findIndex(Et=>Et.accessor===Ae),We=Je[ze];We.isSortedDesc=!We.isSortedDesc,Je.splice(ze,1,We),r(()=>[...Je]);const bt=W(i,We.isSortedDesc,Ae);o(bt)}function W(Ae,Je,ze){return(ze==null?void 0:ze.split(",").length)>1&&(ze=ze.split(",")[0]),Ae.sort((We,bt)=>{var Et,wt,At,Yt;if(Je)return isNaN(We[ze])?((Et=We[ze])==null?void 0:Et.toLowerCase())<((wt=bt[ze])==null?void 0:wt.toLowerCase())?1:-1:We[ze]<bt[ze]?1:-1;if(!Je)return isNaN(We[ze])?((At=We[ze])==null?void 0:At.toLowerCase())<((Yt=bt[ze])==null?void 0:Yt.toLowerCase())?-1:1:We[ze]<bt[ze]?-1:1})}function V(Ae){(async function(){l(Ae),await oe(0,Ae)})()}function X(){(async function(){await oe(w-1>0?w-1:0,c)})()}function ne(){(async function(){await oe(w+1<=d?w+1:0,c)})()}async function oe(Ae,Je){var We;let ze=Ue(C);ze=Object.keys(ze).length<1?Ue(T):ze,ze.id=(We=ze.id)==null?void 0:We.replace(mt.PROPERTY_SPACE_IMAGES,"");try{ms.setTable("property_spaces");const bt=await ms.callRawAPI("/v2/api/custom/ergo/property-space-images/PAGINATE",{where:[ze?`${ze.id?`ergo_property_spaces_images.id = ${ze.id}`:"1"} AND ${ze.property_space_name?`ergo_spaces.category LIKE '%${ze.property_space_name}%'`:"1"} AND ${ze.property_name?`ergo_property.name LIKE '%${ze.property_name}%'`:"1"} AND ${ze.property_spaces_id?`property_spaces_id = ${ze.property_spaces_id}`:"1"} AND ${ze.is_approved!=null?`is_approved = ${ze.is_approved}`:"1"} AND ${ze.host_email?`ergo_user.email LIKE '%${ze.host_email}%'`:"1"}`:1,"ergo_property_spaces_images.deleted_at IS NULL"],page:Ae,limit:Je,sortId:"update_at",direction:"DESC"},"POST"),{list:Et,total:wt,limit:At,num_pages:Yt,page:xn}=bt;console.log("list",Et);const Bn=W(Et,!1);o(Bn),l(At),u(Yt),v(xn),y(wt),m(xn>1),b(xn+1<=Yt)}catch(bt){me(e,bt.message),pe(t,bt.message,4e3,"ERROR")}}const q=Ae=>{console.log("submitting",Ae),C.set("id",Ae.id),C.set("property_name",Ae.property_name),C.set("property_space_name",Ae.property_space_name),C.set("is_approved",Ae.is_approved),C.set("host_email",Ae.host_email),C.set("property_spaces_id",Ae.property_spaces_id),E(C),localStorage.setItem("admin_psi_filter",C.toString()),oe(1,c)},te=async Ae=>{try{ms.setTable("property_spaces");const Je=await ms.callRestAPI({id:Ae.id,default_image_id:Ae.image_id},"PUT");if(Je.error)throw new Error(Je.message||"Error when setting default image");pe(t,"Successful"),oe(1,10)}catch(Je){me(e,Je.message),pe(t,Je.message,4e3,"ERROR")}};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_spaces_images"}}),async function(){await G(),oe(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),oe(w,c))},[n.deleted]),R.useEffect(()=>{let Ae;return M||(Ae=setTimeout(()=>{P(null)},200)),()=>clearTimeout(Ae)},[M]);async function G(){var Je;ms.setTable("settings");const Ae={key_name:"admin_property_spaces_images_column_order"};try{const ze=await ms.callRestAPI({limit:1,page:1,payload:Ae},"PAGINATE");Array.isArray(ze.list)&&ze.list.length>0&&r(va((Je=ze.list[0].optional_data)!=null?Je:[],_a.admin_property_space_images))}catch(ze){me(e,ze.message),pe(t,ze.message,4e3,"ERROR")}}async function J(Ae){ms.setTable("property_spaces_images");try{await ms.callRestAPI({id:Ae,is_approved:rn.APPROVED},"PUT"),pe(t,"Successful"),await oe(1,c)}catch(Je){me(e,Je.message),pe(t,Je.message,4e3,"ERROR")}}async function K(){ms.setTable("property_spaces_images");try{await Promise.all(N.map(Ae=>ms.callRestAPI({id:Ae,is_approved:rn.APPROVED},"PUT"))),pe(t,"Successful"),await oe(1,c)}catch(Ae){me(e,Ae.message),pe(t,Ae.message,4e3,"ERROR")}_([])}async function Q(){ms.setTable("property_spaces_images");try{await Promise.all(N.map(Ae=>ms.callRestAPI({id:Ae,is_approved:rn.NOT_APPROVED},"PUT"))),pe(t,"Successful"),await oe(1,c)}catch(Ae){me(e,Ae.message),pe(t,Ae.message,4e3,"ERROR")}_([])}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:I(q),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property Spaces Images"}),s(ma,{link:"/admin/add-property_spaces_images",text:"Add New Property Space Image"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...j("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(se=Y.id)!=null&&se.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ce=Y.id)==null?void 0:ce.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_spaces_id",children:"Property Space ID"}),s("input",{placeholder:"Property Space ID",...j("property_spaces_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(le=Y.property_spaces_id)!=null&&le.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ae=Y.property_spaces_id)==null?void 0:ae.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_email",children:"Host Email"}),s("input",{placeholder:"Host Email",...j("host_email"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ie=Y.host_email)!=null&&ie.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(de=Y.host_email)==null?void 0:de.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_name",children:"Property"}),s("input",{placeholder:"Property Name",...j("property_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(fe=Y.property_name)!=null&&fe.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(be=Y.property_name)==null?void 0:be.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_space_name",children:"Space"}),s("input",{placeholder:"Space",...j("property_space_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(he=Y.property_space_name)!=null&&he.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ve=Y.property_space_name)==null?void 0:ve.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"is_approved",children:"Status"}),f("select",{...j("is_approved"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 shadow focus:outline-none ${(Ce=Y.is_approved)!=null&&Ce.message?"border-red-500":""}`,children:[s("option",{value:"",children:"ALL"}),s("option",{value:rn.IN_REVIEW,children:"IN REVIEW"}),s("option",{value:rn.APPROVED,children:"APPROVED"}),s("option",{value:rn.NOT_APPROVED,children:"REJECTED"})]}),s("p",{className:"text-xs italic text-red-500",children:(nt=Y.is_approved)==null?void 0:nt.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{A({is_approved:"",property_space_name:"",id:"",property_spaces_id:"",property_name:"",host_email:""}),localStorage.removeItem("admin_psi_filter"),Pt(C,E),Pt(T,E),oe(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:V}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/property_spaces_images",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_space_images",sheet:"property_space_images",buttonText:"Export to xls"})]}),s("div",{className:"flex justify-end bg-white px-6",children:s(Xa,{enabled:x,setEnabled:k})}),x&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.length!=i.length?_(i.map(Ae=>Ae.id)):_([])},checked:N.length==i.length&&i.length>0,onChange:()=>{}}),"Select All"]}),N.length>0?f("div",{className:"flex gap-2",children:[s("button",{className:"rounded-md !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white duration-100 hover:bg-[var(--outline-color)]",onClick:K,children:"Approve Selected"}),s("button",{className:"rounded-md !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white duration-100 hover:bg-[var(--outline-color)]",onClick:Q,children:"Reject Selected"})]}):null]}),s("div",{className:"overflow-x-auto rounded bg-white",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[x&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),a.map((Ae,Je)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>U(Ae.accessor),children:[Ae.header,s("span",{children:Ae.isSorted?Ae.isSortedDesc?" \u25BC":" \u25B2":""})]},Je))]})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((Ae,Je)=>f("tr",{className:"py-2 text-sm",children:[x&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.includes(Ae.id)?_(ze=>{let We=[...ze];return We.splice(ze.findIndex(bt=>bt==Ae.id),1),We}):_(ze=>[...ze,Ae.id])},checked:N.includes(Ae.id),onChange:()=>{}})}),a.map((ze,We)=>{var bt;return ze.accessor.split(",").length>1?s("td",{className:"whitespace-nowrap px-6 py-4",children:ze.accessor.split(",").map(Et=>s("span",{className:"mr-2",children:Ae[Et.trim()]}))},We):ze.accessor===""?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[(Ae==null?void 0:Ae.is_approved)==rn.IN_REVIEW?f(Se,{children:[s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>z(Ae),children:"Reject"}),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>J(Ae.id),children:"Approve"})]}):(Ae==null?void 0:Ae.is_approved)===rn.APPROVED?s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>z(Ae),children:"Reject"}):s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>J(Ae.id),children:"Approve"}),s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{t({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Delete",modalShowMessage:"Are you sure you want to delete this property space image?",modalBtnText:"Delete",type:"BaasDelete",itemId:Ae.id,itemId2:Ae.photo_id,table1:"property_spaces_images"}})},children:"Delete"}),(Ae==null?void 0:Ae.default_image)===1?s("span",{className:"ml-2 px-1 text-[#667085]",children:"(Default Image)"}):s("button",{className:"ml-2 px-1 text-[#667085]",onClick:()=>te({id:Ae.property_spaces_id,image_id:Ae.photo_id}),children:"Set As Default Image"})]},We):ze.accessor=="image"||ze.accessor=="photo_url"?s("td",{className:"max-h-[80px] whitespace-nowrap px-6 py-2",children:s("button",{onClick:()=>{P(Ae[ze.accessor]),O(!0)},children:s("img",{src:Ae[ze.accessor],className:"h-16 ",alt:"image"})})},We):ze.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:ze.idPrefix+Ae[ze.accessor]},We):ze.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:ze.mapping[(bt=Ae[ze.accessor])!=null?bt:0]},We):s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:Ae[ze.accessor]},We)})]},Je))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:V,previousPage:X,nextPage:ne}),s(Vwe,{modalOpen:M,modalImage:D,closeModal:()=>O(!1)}),s(Wwe,{modalOpen:F.id!=null,closeModal:()=>z({}),data:F,onSuccess:()=>oe(w,c)})]})},Gwe=()=>{var k,N,_,C;const{dispatch:e}=R.useContext(we),[t,n]=R.useState(),[a,r]=R.useState(""),[i,o]=R.useState([]);let c=new _e;const l=Qe({property_id:dt().required("Property Id is required").typeError("Property ID must be a number"),property_spaces_id:dt().required().positive().integer().typeError("No property selected")}).required(),{dispatch:d}=R.useContext(Ee),u=je(),{register:g,handleSubmit:y,setError:w,formState:{errors:v}}=Oe({resolver:Xe(l)}),S=async E=>{if(t){const T=new FormData;for(let D=0;D<t.length;D++)T.append("file",t[D]);try{const D=await c.uploadImage(T);E.image=D.id,b(E)}catch(D){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:D.message}})}}else w("image",{type:"manual",message:"Please include an image"})},m=async E=>{try{const T=await c.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[E?`ergo_property.id = ${E}`:1],page:1,limit:10},"POST");!T.error&&(T==null?void 0:T.list)?o(T.list):w("property_id",{type:"manual",message:"Property with this ID doesn't exist"})}catch(T){console.log("Error",T),w("property_spaces_id",{type:"manual",message:T.message}),me(d,T.message)}};async function p(E){try{c.setTable("property");const T=await c.callRestAPI({id:E},"GET");!T.error&&(T==null?void 0:T.model)?(w("property_id",{type:"manual",message:""}),m(E)):w("property_id",{type:"manual",message:"Property with this ID doesn't exist"})}catch(T){console.log("ERROR",T),me(d,T.message)}}const b=async E=>{console.log("got here");try{c.setTable("property_spaces_images");const T=await c.callRestAPI({property_id:a,property_spaces_id:E.property_spaces_id,photo_id:E.image},"POST");if(!T.error)pe(e,"Added"),u("/admin/property_spaces_images");else if(T.validation){const D=Object.keys(T.validation);for(let P=0;P<D.length;P++){const M=D[P];w(M,{type:"manual",message:T.validation[M]})}}}catch(T){console.log("Error",T),w("property_id",{type:"manual",message:T.message}),me(d,T.message)}},x=()=>{t||w("image",{type:"manual",message:"Please include an image"})};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"property_spaces_images"}})},[]),s(Sa,{title:"Property Space Images",backTo:"property_spaces_images",children:f("form",{className:" w-full max-w-lg",onSubmit:y(S,x),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"Property ID"}),s("input",{...g("property_id"),placeholder:"Property ID",value:a,onChange:E=>{r(E.target.value),p(E.target.value)},className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(k=v.property_id)!=null&&k.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(N=v.property_id)==null?void 0:N.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_spaces_id",children:"Property Space"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...g("property_spaces_id"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),i.map(E=>f("option",{name:"property_spaces_id",value:E.id,children:[E==null?void 0:E.property_name," - ",E==null?void 0:E.space_category]},E.id))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(_=v.property_spaces_id)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"image",children:"Image"}),s("input",{className:"block w-full text-sm py-2 px-3 text-gray-700 bg-gray-50 rounded-lg border border-gray-300 cursor-pointer focus:outline-none",type:"file",accept:"image/png, image/gif, image/jpeg",name:"file",onChange:E=>{n(E.target.files)}}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(C=v.image)==null?void 0:C.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/property_spaces_images"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let Iw=new _e;const qwe=()=>{var w,v,S,m,p,b;const{dispatch:e}=R.useContext(Ee),t=Qe({property_id:dt().required().positive().integer(),property_spaces_id:dt().required().positive().integer()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=Mt();h.exports.useEffect(function(){(async function(){try{Iw.setTable("property_spaces_images");const x=await Iw.callRestAPI({id:Number(g==null?void 0:g.id)},"GET");x.error||(d("property_id",x.model.property_id),d("property_spaces_id",x.model.property_spaces_id),d("photo_id",x.model.photo_id),i(x.model.id))}catch(x){console.log("error",x),me(e,x.message)}})()},[]);const y=async x=>{try{const k=await Iw.callRestAPI({id:r,property_id:x.property_id,property_spaces_id:x.property_spaces_id,photo_id:x.photo_id},"PUT");if(!k.error)pe(n,"Updated"),a("/admin/property_spaces_images");else if(k.validation){const N=Object.keys(k.validation);for(let _=0;_<N.length;_++){const C=N[_];l(C,{type:"manual",message:k.validation[C]})}}}catch(k){console.log("Error",k),l("property_id",{type:"manual",message:k.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"property_spaces_images"}})},[]),s(Ja,{title:"Property Space Image",backTo:"property_spaces_images",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:c(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"Property ID"}),s("input",{placeholder:"Property ID",...o("property_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(w=u.property_id)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(v=u.property_id)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_spaces_id",children:"Property Spaces ID"}),s("input",{placeholder:"Property spaces ID",...o("property_spaces_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(S=u.property_spaces_id)!=null&&S.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(m=u.property_spaces_id)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"photo_id",children:"Photo ID"}),s("input",{placeholder:"Photo ID",...o("photo_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(p=u.photo_id)!=null&&p.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(b=u.photo_id)==null?void 0:b.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/property_spaces_images"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};function Zwe({modalOpen:e,data:t,closeModal:n,onSuccess:a}){const{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we),[o,c]=h.exports.useState();async function l(d){var w;d.preventDefault(),c(!0);const u=new _e,y=new FormData(d.target).get("reason");u.setTable("property_spaces_images");try{u.setTable("id_verification"),await u.callRestAPI({id:t.id,status:2},"PUT");const v=await u.getEmailTemplate("id-verification-declined"),S=(w=v.html)==null?void 0:w.replace(new RegExp("{{{reason}}}","g"),y).replace(new RegExp("{{{type}}}","g"),t.type).replace(new RegExp("{{{first_name}}}","g"),t.first_name);await u.sendEmail(t.email,v.subject,S),pe(i,"Successful, email sent to user"),a(),d.target.reset()}catch(v){me(r,v.message),pe(i,v.message,4e3,"ERROR")}n(),c(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:l,children:[s(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900",children:"Decline Reason"}),s("textarea",{name:"reason",cols:"30",rows:"5",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none"}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border border-black px-4 py-2 text-sm font-medium",onClick:n,children:"Cancel"}),s("button",{disabled:o,type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Reject"})]})]})})})})]})})})}let tc=new _e;const Qwe=()=>{var V,X,ne,oe,q,te,G;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState([]),[o,c]=R.useState(10),[l,d]=R.useState(0),[u,g]=R.useState(0),[y,w]=R.useState(0),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=lt(),[k]=lt((V=localStorage.getItem("admin_idv_filter"))!=null?V:"");je();const[N,_]=R.useState({}),C=Qe({status:ge(),email:ge()}),{reset:E,register:T,handleSubmit:D,setError:P,formState:{errors:M}}=Oe({resolver:Xe(C),defaultValues:(()=>{let J=Ue(b);return Object.keys(J).length>0?J:Ue(k)})()});function O(J){const K=n,Q=K.findIndex(ce=>ce.accessor===J),Z=K[Q];Z.isSortedDesc=!Z.isSortedDesc,K.splice(Q,1,Z),a(()=>[...K]);const se=F(r,Z.isSortedDesc,J);i(se)}function F(J,K,Q){return(Q==null?void 0:Q.split(",").length)>1&&(Q=Q.split(",")[0]),J.sort((Z,se)=>{var ce,le,ae,ie;if(K)return isNaN(Z[Q])?((ce=Z[Q])==null?void 0:ce.toLowerCase())<((le=se[Q])==null?void 0:le.toLowerCase())?1:-1:Z[Q]<se[Q]?1:-1;if(!K)return isNaN(Z[Q])?((ae=Z[Q])==null?void 0:ae.toLowerCase())<((ie=se[Q])==null?void 0:ie.toLowerCase())?-1:1:Z[Q]<se[Q]?-1:1})}const z=[{key:"",value:"All"},{key:"0",value:"Pending"},{key:"1",value:"Verified"},{key:"2",value:"Declined"}];function H(J){(async function(){c(J),await I(0,J)})()}function A(){(async function(){await I(y-1>0?y-1:0,o)})()}function j(){(async function(){await I(y+1<=l?y+1:0,o)})()}async function I(J,K){var Z,se;let Q=Ue(b);Q=Object.keys(Q).length<1?Ue(k):Q,Q.id=(Z=Q.id)==null?void 0:Z.replace(mt.ID_VERIFICATION,""),Q.user_id=(se=Q.user_id)==null?void 0:se.replace(mt.USER,"");try{tc.setTable("id_verification");const ce=await _t("id-verification","post",{where:[Q?`${Q.user_id?`ergo_user.id = ${Q.user_id}`:"1"} AND ${Q.id?`ergo_id_verification.id = ${Q.id}`:"1"} AND ${Q.email?`ergo_user.email LIKE '%${Q.email}%'`:"1"} AND ${[null,void 0].includes(Q.status)?"1":`ergo_id_verification.status = ${Q.status}`} AND ${Q.type?`ergo_id_verification.type LIKE '%${Q.type}%'`:"1"} AND ${Q.dob?`dob = ${Q.dob}`:"1"} AND ${Q.first_name?`first_name LIKE '%${Q.first_name}%'`:"1"} AND ${Q.last_name?`last_name LIKE '%${Q.last_name}%'`:"1"} AND ${Q.role?`role = ${Q.role}`:"1"}`:1],page:J,limit:K,sortId:"update_at",direction:"DESC"},"PAGINATE"),{list:le,total:ae,limit:ie,num_pages:de,page:fe}=ce,be=F(le,!1);i(be),c(ie),d(de),w(fe),g(ae),S(fe>1),p(fe+1<=de)}catch(ce){me(e,ce.message),pe(t,ce.message,4e3,"ERROR")}}const B=async(J,K)=>{try{tc.setTable("id_verification");const Q=await tc.callRestAPI({id:J.id,status:K},"PUT");if(!Q.error)pe(t,"Successful"),await I(y,o);else if(Q.validation){const Z=Object.keys(Q.validation);for(let se=0;se<Z.length;se++){const ce=Z[se];pe(t,Q.validation[ce],4e3,"ERROR")}}}catch(Q){me(e,Q.message),pe(t,Q.message,4e3,"ERROR")}},Y=J=>{console.log("submitting",J),b.set("email",J.email),b.set("status",J.status),b.set("user_id",J.user_id),b.set("id",J.id),x(b),localStorage.setItem("admin_idv_filter",b.toString()),I(1,o)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"id_verification"}}),async function(){await U(),await I(1,o)}()},[]);async function U(){var K;tc.setTable("settings");const J={key_name:"admin_id_verification_column_order"};try{const Q=await tc.callRestAPI({limit:1,page:1,payload:J},"PAGINATE");Array.isArray(Q.list)&&Q.list.length>0&&a(va((K=Q.list[0].optional_data)!=null?K:[],_a.admin_id_verification))}catch(Q){pe(t,Q.message,4e3,"ERROR")}}async function W(J){var K;try{const Q=await tc.getEmailTemplate("id-verification-approved"),Z=(K=Q.html)==null?void 0:K.replace(new RegExp("{{{type}}}","g"),J.type).replace(new RegExp("{{{first_name}}}","g"),J.first_name);await tc.sendEmail(J.email,Q.subject,Z)}catch(Q){console.log("err",Q)}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5 ",onSubmit:D(Y),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"ID Verification"}),s(ma,{link:"/admin/add-id_verification",text:"Add new ID verification"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-2xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"type",children:"ID"}),s("input",{type:"text",placeholder:"ID",...T("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=M.id)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=M.id)==null?void 0:ne.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"type",children:"User ID"}),s("input",{type:"text",placeholder:"User ID",...T("user_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(oe=M.user_id)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(q=M.user_id)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"type",children:"Email"}),s("input",{type:"email",placeholder:"Email",...T("email"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(te=M.type)!=null&&te.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(G=M.type)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-1/2 pr-2 pl-2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("status"),children:z.map(J=>s("option",{name:"status",value:J.key,defaultValue:0,children:J.value},J.key))}),s("p",{className:"text-xs italic text-red-500"})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({email:"",status:"",id:"",type:"",user_id:""}),Pt(b,x),Pt(k,x),localStorage.removeItem("admin_idv_filter"),I(y,o)},children:"Reset"})]}),s(Ln,{currentPage:y,pageSize:o,totalNumber:u,updatePageSize:H}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/id_verification",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(qy,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",filename:"id_verification",data:r})]}),s("div",{className:"overflow-x-auto rounded bg-white p-5 shadow",children:s("div",{className:"overflow-x-auto border-b border-gray-200 ",children:f("table",{className:"min-w-full divide-y divide-gray-200",id:"table-to-xls",children:[s("thead",{className:"bg-gray-50",children:s("tr",{children:n.map((J,K)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>O(J.accessor),children:[J.header,s("span",{children:J.isSorted?J.isSortedDesc?" \u25BC":" \u25B2":""})]},K))})}),s("tbody",{className:"divide-y divide-gray-200 bg-white",children:r.map((J,K)=>s("tr",{className:"text-sm",children:n.map((Q,Z)=>Q.accessor==""?s("td",{className:"h-[68px] max-h-[68px] whitespace-nowrap px-6 py-4",children:f("div",{children:[J.status!=1&&s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-2 font-semibold text-transparent ",onClick:()=>{B(J,1),W(J)},children:"Approve"}),J.status!=2&&s("button",{className:"ml-2 pr-2 font-semibold text-[#667085]",onClick:()=>_(J),children:"Decline"})]})},Z):Q.accessor=="image_front"?s("td",{className:"max-h-[68px] whitespace-nowrap px-6",children:s("div",{children:s("img",{src:J[Q.accessor],className:"h-16",alt:"image"})})},Z):Q.accessor=="image_back"?s("td",{className:"max-h-[68px] whitespace-nowrap px-6",children:s("div",{className:"block",children:J[Q.accessor]!=null&&s("img",{src:J[Q.accessor],className:"h-16",alt:"image"})})},Z):Q.mapping?s("td",{className:"max-h-[68px] whitespace-nowrap px-6 py-4",children:f("span",{className:`${J[Q.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full border border-[#EAECF0] bg-[#F9FAFB] py-[2px] px-[10px]`,children:[" ",Q.mapping[J[Q.accessor]]]})},Z):Q.accessor.includes("email")?s("td",{className:"max-h-[68px] whitespace-nowrap px-6 py-4 normal-case",children:J[Q.accessor]},Z):Q.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:Q.idPrefix+J[Q.accessor]},Z):s("td",{className:"max-h-[68px] whitespace-nowrap px-6 py-4",children:J[Q.accessor]},Z))},K))})]})})}),s(vn,{currentPage:y,pageCount:l,pageSize:o,totalNumber:u,canPreviousPage:v,canNextPage:m,updatePageSize:H,previousPage:A,nextPage:j}),s(Zwe,{modalOpen:N.id!=null,closeModal:()=>_({}),data:N,onSuccess:()=>I(y,o)})]})},Jwe=()=>{var P,M,O,F,z,H,A;const{dispatch:e}=R.useContext(we),[t,n]=R.useState(),[a,r]=R.useState(),[i,o]=R.useState("Passport");let c=new _e;const l=Qe({type:ge().required(),expiry_date:ge().test("is-not-in-past","Not a valid date",j=>j==""?!1:new Date(j)>new Date),status:dt().required().integer(),user_id:ge().required("Please select a user")}).required(),{dispatch:d}=R.useContext(Ee),u=je(),{control:g,setValue:y,register:w,handleSubmit:v,setError:S,clearErrors:m,formState:{errors:p}}=Oe({resolver:Xe(l),defaultValues:{user_id:""}}),b=[{key:"0",value:"Pending"},{key:"1",value:"Verified"},{key:"2",value:"Declined"}],x=[{key:"Passport",value:"Passport"},{key:"Driver's License",value:"Driver's License"}],k=j=>{o(j.target.value)},N=async j=>{const I=new FormData;for(let B=0;B<j.length;B++)I.append("file",j[B]);try{return(await c.uploadImage(I)).url}catch(B){me(d,B.message)}};async function _(j,I,B){try{var Y=[];if(+B){const U=await c.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{page:1,limit:1,where:[`${B?`ergo_user.id = ${+B}`:""}`]},"POST");Array.isArray(U.list)&&(Y=U.list)}if(j){const U=await c.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{page:1,limit:10,where:[`ergo_user.email LIKE '%${j}%'`]},"POST");Array.isArray(U.list)&&I([...Y,...U.list])}}catch(U){console.log("err",U)}}const C=async j=>{try{if(t||S("front_image",{type:"manual",message:"Image is required"}),a||S("back_image",{type:"manual",message:"Image is required"}),!t||!a&&i!="Passport")return;j.frontImage=await N(t),i=="Passport"&&(j.backImage=null),a&&(j.backImage=await N(a)),E(j)}catch(I){console.log("Error",I),S("type",{type:"manual",message:I.message}),me(d,I.message)}},E=async j=>{console.log("data",j);try{c.setTable("id_verification");const I=await c.callRestAPI({type:j.type,expiry_date:j.expiry_date,status:j.status,image_front:j.frontImage,image_back:j.backImage,user_id:j.user_id},"POST");if(!I.error)pe(e,"Added"),u("/admin/id_verification");else if(I.validation){const B=Object.keys(I.validation);for(let Y=0;Y<B.length;Y++){const U=B[Y];S(U,{type:"manual",message:I.validation[U]})}}}catch(I){if(me(d,I.message),I.message=="Validation error"){D({type:j.type,expiry_date:j.expiry_date,status:j.status,image_front:j.frontImage,image_back:j.backImage,user_id:j.user_id});return}S("type",{type:"manual",message:I.message})}},T=(j,I)=>{t||S("front_image",{type:"manual",message:"Image is required"}),!a&&i!="Password"&&S("back_image",{type:"manual",message:"Image is required"})};R.useEffect(()=>{e({type:"SETPATH",payload:{path:"id_verification"}})},[]);async function D(j){try{c.setTable("id_verification"),await c.callRestAPI({set:j,where:{user_id:j.user_id}},"PUTWHERE"),pe(e,"Updated"),u("/admin/id_verification")}catch(I){me(d,I),pe(e,I,4e3,"ERROR")}}return s(Sa,{title:"ID Verification",backTo:"id_verification",children:f("form",{className:" w-full max-w-lg",onSubmit:v(C,T),children:[f("div",{className:"mb-5",children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"user_id",children:"User"}),s(nR,{control:g,name:"user_id",setValue:j=>y("user_id",j),valueField:"id",labelField:"email",getItems:_,className:"relative flex h-[40px] items-center rounded border px-3",placeholder:"User email"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(P=p.user_id)==null?void 0:P.message})]}),s("label",{htmlFor:"type",className:"mb-2 block text-sm font-bold text-gray-700",children:"Type"}),s("select",{name:"type",id:"type",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...w("type"),defaultValue:0,onChange:k,children:x.map(j=>s("option",{name:"type",value:j.key,children:j.value},j.key))}),s("p",{className:"text-xs normal-case italic text-red-500",children:(M=p.type)==null?void 0:M.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"expiry_date",children:"Expiry Date"}),s("input",{type:"date",placeholder:"expiry_date",...w("expiry_date"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(O=p.expiry_date)!=null&&O.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(F=p.expiry_date)==null?void 0:F.message})]}),f("div",{className:"mb-5",children:[s("label",{htmlFor:"status",className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{name:"Status",id:"status",className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...w("status"),defaultValue:0,children:b.map(j=>s("option",{name:"status",value:j.key,children:j.value},j.key))}),s("p",{className:"text-xs normal-case italic text-red-500",children:(z=p.status)==null?void 0:z.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:i=="Passport"?"Image":"Front Image"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/gif, image/jpeg",name:"file",onChange:j=>{n(j.target.files),m("front_image")}}),s("p",{className:"text-xs normal-case italic text-red-500",children:(H=p.front_image)==null?void 0:H.message})]}),f("div",{className:i=="Passport"?"hidden":"mb-4",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"image",children:"Back Image"}),s("input",{className:"block w-full cursor-pointer rounded-lg border border-gray-300 bg-gray-50 py-2 px-3 text-sm text-gray-700 focus:outline-none",type:"file",accept:"image/png, image/gif, image/jpeg",name:"file",onChange:j=>{r(j.target.files),m("back_image")}}),s("p",{className:"text-xs normal-case italic text-red-500",children:(A=p.back_image)==null?void 0:A.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/id_verification"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let Ow=new _e;const Kwe=()=>{var C,E,T,D,P,M,O,F,z,H;const{dispatch:e}=R.useContext(Ee),t=Qe({type:ge().required(),expiry_date:ge().matches(/[0-9]{4}-[0-9]{2}-[0-9]{2}/,"Date Format YYYY-MM-DD"),status:dt().required().positive().integer(),image:ge().required(),user_id:dt().required().positive().integer()}).required(),{dispatch:n}=R.useContext(we),a=je(),[r,i]=h.exports.useState(""),[o,c]=h.exports.useState(""),[l,d]=h.exports.useState(0),[u,g]=h.exports.useState(""),[y,w]=h.exports.useState(0),[v,S]=h.exports.useState(0),{register:m,handleSubmit:p,setError:b,setValue:x,formState:{errors:k}}=Oe({resolver:Xe(t)}),N=Mt();h.exports.useEffect(function(){(async function(){try{Ow.setTable("id_verification");const A=await Ow.callRestAPI({id:Number(N==null?void 0:N.id)},"GET");A.error||(i(A.model.type),c(A.model.expiry_date),d(A.model.status),g(A.model.image),w(A.model.user_id),S(A.model.id))}catch(A){console.log("error",A),me(e,A.message)}})()},[]);const _=async A=>{try{const j=await Ow.callRestAPI({id:v,type:A.type,expiry_date:A.expiry_date,status:A.status,image:A.image,user_id:A.user_id},"PUT");if(!j.error)pe(n,"Updated"),a("/admin/id_verification");else if(j.validation){const I=Object.keys(j.validation);for(let B=0;B<I.length;B++){const Y=I[B];b(Y,{type:"manual",message:j.validation[Y]})}}}catch(j){console.log("Error",j),b("type",{type:"manual",message:j.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"id_verification"}})},[]),f("div",{className:" shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium",children:"Edit IdVerification"}),f("form",{className:" w-full max-w-lg",onSubmit:p(_),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"type",children:"Type"}),s("input",{placeholder:"type",...m("type"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(C=k.type)!=null&&C.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(E=k.type)==null?void 0:E.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"expiry_date",children:"ExpiryDate"}),s("input",{type:"date",placeholder:"expiry_date",...m("expiry_date"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(T=k.expiry_date)!=null&&T.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(D=k.expiry_date)==null?void 0:D.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"status",children:"Status"}),s("input",{placeholder:"status",...m("status"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(P=k.status)!=null&&P.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(M=k.status)==null?void 0:M.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"image",children:"Image"}),s("textarea",{placeholder:"image",...m("image"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(O=k.image)!=null&&O.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(F=k.image)==null?void 0:F.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"user_id",children:"UserId"}),s("input",{placeholder:"user_id",...m("user_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(z=k.user_id)!=null&&z.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(H=k.user_id)==null?void 0:H.message})]}),s("button",{type:"submit",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:"Submit"})]})]})};let Pw=new _e;const Xwe=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.PROPERTY_ADDON},{header:"Property",accessor:"property_name",isSorted:!0,isSortedDesc:!0},{header:"Add-on name",accessor:"add_on_name",isSorted:!0,isSortedDesc:!0},{header:"Cost",accessor:"cost",isSorted:!0,isSortedDesc:!0,amountField:!0},{header:"Actions",accessor:""}],eve=()=>{var Y,U,W,V,X,ne;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState(Xwe),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState([]),[N,_]=lt((Y=localStorage.getItem("admin_property_addon_filter"))!=null?Y:"");je();const C=Qe({property_name:ge(),addon_name:ge(),id:ge()}),{reset:E,register:T,handleSubmit:D,setError:P,formState:{errors:M}}=Oe({resolver:Xe(C),defaultValues:Ue(N)});function O(oe){const q=a,te=q.findIndex(K=>K.accessor===oe),G=q[te];G.isSortedDesc=!G.isSortedDesc,q.splice(te,1,G),r(()=>[...q]);const J=F(i,G.isSortedDesc,oe);o(J)}function F(oe,q,te){return(te==null?void 0:te.split(",").length)>1&&(te=te.split(",")[0]),oe.sort((G,J)=>{var K,Q,Z,se;if(q)return isNaN(G[te])?((K=G[te])==null?void 0:K.toLowerCase())<((Q=J[te])==null?void 0:Q.toLowerCase())?1:-1:G[te]<J[te]?1:-1;if(!q)return isNaN(G[te])?((Z=G[te])==null?void 0:Z.toLowerCase())<((se=J[te])==null?void 0:se.toLowerCase())?-1:1:G[te]<J[te]?-1:1})}function z(oe){(async function(){l(oe),await j(0,oe)})()}function H(){(async function(){await j(w-1>0?w-1:0,c)})()}function A(){(async function(){await j(w+1<=d?w+1:0,c)})()}async function j(oe,q){var G;const te=Ue(N);te.id=(G=te.id)==null?void 0:G.replace(mt.PROPERTY_ADDON,"");try{const J=await Pw.callRawAPI("/v2/api/custom/ergo/property-addons/PAGINATE",{where:[te?`${te.id?`ergo_property_add_on.id = '${te.id}'`:"1"}
AND ${te.property_name?`ergo_property.name LIKE '%${te.property_name}%'`:"1"}
AND ${te.addon_name?`ergo_add_on.name LIKE '%${te.addon_name}%'`:"1"} AND ${te.property_id?`ergo_property.id = ${te.property_id}`:"1"}`:1,"ergo_property_add_on.deleted_at IS NULL"],page:oe,limit:q,sortId:"update_at",direction:"DESC"},"POST"),{list:K,total:Q,limit:Z,num_pages:se,page:ce}=J,le=F(K,!1);o(le),l(Z),u(se),v(ce),y(Q),m(ce>1),b(ce+1<=se)}catch(J){console.log("ERROR",J),me(e,J.message),pe(t,J.message,4e3,"ERROR")}}const I=oe=>{N.set("id",oe.id),N.set("property_name",oe.property_name),N.set("addon_name",oe.addon_name),_(N),localStorage.setItem("admin_property_addon_filter",N.toString()),j(1,c)},B=async()=>{try{Pw.setTable("add_on");const oe=await Pw.callRestAPI({},"GETALL");oe.error||k(oe.list)}catch(oe){console.log("Error",oe),P("add_on_id",{type:"manual",message:oe.message}),me(e,oe.message)}};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_add_on"}}),B(),j(1,c)},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),j(w,c))},[n.deleted]),f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:D(I),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property Add-on Search"}),s(ma,{link:"/admin/add-property_add_on",text:"Add New Property Add-on"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-2xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...T("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=M.id)!=null&&U.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(W=M.id)==null?void 0:W.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_name",children:"Property"}),s("input",{placeholder:"Property",...T("property_name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=M.property_name)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=M.property_name)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"addon_name",children:"Add-on"}),f("select",{className:"mb-3 w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...T("addon_name"),children:[s("option",{value:"",children:"Select Option"}),x.map(oe=>s("option",{children:oe==null?void 0:oe.name},oe.id))]}),s("p",{className:"text-xs italic text-red-500",children:(ne=M.addon_name)==null?void 0:ne.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({id:"",property_name:"",add_on_name:"",property_id:""}),localStorage.removeItem("admin_property_addon_filter"),Pt(N,_),j(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:z}),s("div",{className:"flex justify-end bg-white py-3 pt-5",children:s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_addon",sheet:"property_addon",buttonText:"Export to xls"})}),s("div",{className:"overflow-x-auto rounded bg-white",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,tableType:"property_add_on",table1:"property_add_on",profile:!0,deleteMessage:"Are you sure you want to delete this Property Add-on?",deleteTitle:"Confirm Delete",baasDelete:!0,onSort:O,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:z,previousPage:H,nextPage:A})]})},tve=new St,nve=()=>{var x,k;const[e,t]=h.exports.useState({}),[n,a]=h.exports.useState([]);async function r(N,_,C){try{let E=["deleted_at,is"];C.name&&E.push(`name,cs,${C.name}`);const T=await tve.getList("property",{join:[],filter:E}),{list:D}=T;a(D)}catch(E){console.log("ERROR",E),me(u,E.message)}}let i=new _e;const[o,c]=R.useState([]),{dispatch:l}=R.useContext(we),d=Qe({property_id:ge(),add_on_id:dt().required().positive().integer().typeError("Please select an Add on")}).required(),{dispatch:u}=R.useContext(Ee),g=je(),{register:y,handleSubmit:w,setError:v,formState:{errors:S}}=Oe({resolver:Xe(d)}),m=async()=>{try{i.setTable("add_on");const N=await i.callRestAPI({},"GETALL");N.error||c(N.list)}catch(N){console.log("Error",N),v("add_on_id",{type:"manual",message:N.message}),me(u,N.message)}},p=async N=>{if(!(e!=null&&e.id)){v("property_id","Property Name is Required");return}N.property_id=e.id;try{i.setTable("property_add_on");const _=await i.callRestAPI({property_id:N.property_id,add_on_id:N.add_on_id},"POST");if(!_.error)pe(l,"Added"),g("/admin/property_add_on");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];v(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),v("property_id",{type:"manual",message:_.message}),me(u,_.message)}},b=()=>{e!=null&&e.id||v("property_id",{type:"manual",message:"Please select a property"})};return R.useEffect(()=>{l({type:"SETPATH",payload:{path:"property_add_on"}}),async function(){await r(),await m()}()},[]),s(Sa,{title:"Property Add-on",backTo:"property_add_on",children:f("form",{className:" w-full max-w-lg",onSubmit:w(p,b),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_id",children:"Property"}),s(vr,{selectedData:e,setSelectedData:t,data:n,getData:r,field:"name",errorField:"property_id",setError:v}),s("p",{className:"text-xs normal-case italic text-red-500",children:(x=S.property_id)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"add_on_id",children:"Add-Ons"}),f("select",{className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...y("add_on_id"),defaultValue:"none",children:[s("option",{value:"none",children:"Select Option"}),o.map(N=>s("option",{name:"add_on_id",value:N.id,children:N==null?void 0:N.name},N.id))]}),s("p",{className:"text-xs normal-case italic text-red-500",children:(k=S.add_on_id)==null?void 0:k.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>g("/admin/property_add_on"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let Go=new _e;const ave=()=>{var _,C;const[e,t]=h.exports.useState({}),[n,a]=h.exports.useState([]);async function r(E,T,D){try{Go.setTable("property");const P={name:D.name||void 0},M=await Go.callRestAPI({payload:P,page:E,limit:T},"PAGINATE"),{list:O}=M;a(O)}catch(P){console.log("ERROR",P),me(i,P.message)}}const{dispatch:i}=R.useContext(Ee),o=Qe({property_id:ge(),add_on_id:dt().required().positive().integer()}).required(),{dispatch:c}=R.useContext(we),[l,d]=R.useState([]),u=je(),[g,y]=h.exports.useState(0),{register:w,handleSubmit:v,setError:S,setValue:m,formState:{errors:p}}=Oe({resolver:Xe(o)}),b=Mt();h.exports.useEffect(function(){(async function(){await r(1,0,{name:null})})()},[]),h.exports.useEffect(()=>{l.length>0&&n.length>0&&!e.name&&async function(){try{Go.setTable("property_add_on");const E=await Go.callRestAPI({id:Number(b==null?void 0:b.id)},"GET");E.error||(t(n.find(T=>T.id==E.model.property_id)||{name:""}),m("add_on_id",E.model.add_on_id),y(E.model.id))}catch(E){console.log("error",E),me(i,E.message)}}()},[l.length,n.length]);const x=async E=>{if(!(e!=null&&e.id)){S("property_id","Property Name is Required");return}E.property_spaces_id=e.id,Go.setTable("property_add_on");try{const T=await Go.callRestAPI({id:g,property_id:E.property_spaces_id,add_on_id:E.add_on_id},"PUT");if(!T.error)pe(c,"Updated"),u("/admin/property_add_on");else if(T.validation){const D=Object.keys(T.validation);for(let P=0;P<D.length;P++){const M=D[P];S(M,{type:"manual",message:T.validation[M]})}}}catch(T){console.log("Error",T),S("property_spaces_id",{type:"manual",message:T.message})}},k=()=>{e!=null&&e.id||S("property_id",{type:"manual",message:"Please select a property"})},N=async()=>{try{Go.setTable("add_on");const E=await Go.callRestAPI({},"GETALL");E.error||d(E.list)}catch(E){console.log("Error",E),S("add_on_id",{type:"manual",message:E.message}),me(i,E.message)}};return h.exports.useEffect(()=>{c({type:"SETPATH",payload:{path:"property_add_on"}}),async function(){await r(1,10,{name:""}),await N()}()},[]),s(Ja,{title:"Property Add on",backTo:"property_add_on",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:v(x,k),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"Property"}),s(vr,{selectedData:e,setSelectedData:t,data:n,getData:r,field:"name",errorField:"property_id",setError:S}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(_=p.property_id)==null?void 0:_.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"add_on_id",children:"Add-Ons"}),f("select",{className:"border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...w("add_on_id"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),l.map(E=>s("option",{name:"add_on_id",value:E.id,children:E==null?void 0:E.name},E.id))]}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(C=p.add_on_id)==null?void 0:C.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>u("/admin/property_add_on"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let pE=new _e;const rve=()=>{var X,ne,oe,q,te,G,J,K,Q,Z,se,ce;const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState(10),[o,c]=R.useState(0),[l,d]=R.useState(0),[u,g]=R.useState(0),[y,w]=R.useState(!1),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=R.useState(),[k,N]=R.useState([]),_=je(),[C,E]=lt(),[T]=lt((X=localStorage.getItem("admin_booking_filter"))!=null?X:""),D=Qe({id:ge(),property_space_id:ge(),customer_name:ge(),customer_email:ge(),host_email:ge(),status:ge(),payment_status:ge(),booking_start_time:ge(),booking_time:ge(),duration:ge()}),{reset:P,register:M,handleSubmit:O,setError:F,formState:{errors:z}}=Oe({resolver:Xe(D),defaultValues:(()=>{let le=Ue(C);return Object.keys(le).length>0?le:Ue(T)})()}),H=[{key:"",value:"All"},{key:"0",value:"Pending"},{key:"1",value:"Upcoming"},{key:"2",value:"Ongoing"},{key:"3",value:"Complete"},{key:"4",value:"Declined"},{key:"5",value:"Cancelled"}],A=[{key:"",value:"All"},{key:"0",value:"Pending"},{key:"1",value:"Paid"},{key:"2",value:"Declined"},{key:"3",value:"Cancelled"}],j=[{key:"0",value:"Pending"},{key:"1",value:"Upcoming"},{key:"2",value:"Ongoing"},{key:"3",value:"Complete"},{key:"4",value:"Declined"},{key:"5",value:"Cancelled"}];async function I(le,ae,ie){try{const de=await pE.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[ie!=null&&ie.property_name?`ergo_property.name LIKE '%${ie.property_name}%' OR ergo_spaces.category LIKE '%${ie.property_name}%'`:1,"ergo_property.deleted_at IS NULL"],page:le,limit:ae},"POST"),{list:fe}=de;N(fe)}catch(de){me(e,de.message),pe(t,de.message,4e3,"ERROR")}}function B(le){(async function(){i(le),await W(0,le)})()}function Y(){(async function(){await W(u-1>0?u-1:0,r)})()}function U(){(async function(){await W(u+1<=o?u+1:0,r)})()}async function W(le,ae,ie){var fe,be;let de=Ue(C);Ue(T),de=Object.keys(de).length<1?Ue(T):de,ie&&(de={},de.id=(fe=de.id)==null?void 0:fe.replace(mt.BOOKINGS,"")),de.id=(be=de.id)==null?void 0:be.replace(mt.BOOKINGS,"");try{const he=await pE.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{where:[de?`${de.id?`ergo_booking.id = '${de.id}'`:"1"} AND ${de.customer_name?`customer.first_name LIKE '%${de.customer_name}%' OR customer.last_name LIKE '%${de.customer_name}%'`:"1"} AND ${de.status?`ergo_booking.status = ${de.status}`:"1"} AND ${de.payment_status?`ergo_booking.payment_status = ${de.payment_status}`:"1"} AND ${de.booking_start_time?`ergo_booking.booking_start_time LIKE '%${de.booking_start_time}%'`:"1"} AND ${de.property_space_id?`ergo_booking.property_space_id LIKE '%${de.property_space_id}%'`:"1"} AND ${de.host_email?`ergo_user.email LIKE '%${de.host_email}%'`:"1"} AND ${de.customer_email?`customer.email LIKE '%${de.customer_email}%'`:"1"}`:1,"ergo_booking.deleted_at IS NULL"],page:le,limit:ae,sortId:"update_at",direction:"DESC"},"POST"),{list:ve,total:Ce,limit:nt,num_pages:Ae,page:Je}=he;a(ve),i(nt),c(Ae),g(Je),d(Ce),w(Je>1),S(Je+1<=Ae)}catch(he){me(e,he.message),pe(t,he.message,4e3,"ERROR")}}const V=le=>{var ae;C.set("id",le.id),C.set("property_space_id",(ae=b==null?void 0:b.id)!=null?ae:""),C.set("customer_name",le.customer_name),C.set("status",le.status),C.set("payment_status",le.payment_status),C.set("booking_start_time",le.booking_start_time),C.set("customer_email",le.customer_email),C.set("host_email",le.host_email),E(C),localStorage.setItem("admin_booking_filter",C.toString()),W(1,r)};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"booking"}}),async function(){await W(1,r),I(1,10)}()},[]),f(Se,{children:[f("form",{className:"mb-10 rounded bg-white p-5 shadow",onSubmit:O(V),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Booking Search"}),s(ma,{link:"/admin/add-booking",text:"Add new Booking"})]}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...M("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=z.id)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(oe=z.id)==null?void 0:oe.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_spaces_id",children:"Property Space"}),s(vr,{selectedData:b,setSelectedData:x,data:k,getData:I,field:"property_name",field2:"space_category",errorField:"property_spaces_id",setError:F}),s("p",{className:"text-xs italic text-red-500",children:(q=z.property_spaces_id)==null?void 0:q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_name",children:"Customer"}),s("input",{placeholder:"Customer",...M("customer_name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(te=z.customer_name)!=null&&te.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(G=z.customer_name)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...M("status"),children:H.map(le=>s("option",{name:"Status",value:le.key,children:le.value},le.key))}),s("p",{className:"text-xs italic text-red-500"})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Payment Status"}),s("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...M("payment_status"),children:A.map(le=>s("option",{name:"payment_status",value:le.key,children:le.value},le.key))}),s("p",{className:"text-xs italic text-red-500"})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"booking_start_time",children:"Booking Date"}),s("input",{type:"date",placeholder:"Booking date",...M("booking_start_time"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(J=z.booking_start_time)!=null&&J.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(K=z.booking_start_time)==null?void 0:K.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_email",children:"Customer Email"}),s("input",{...M("customer_email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Q=z.customer_email)!=null&&Q.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(Z=z.customer_email)==null?void 0:Z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_email",children:"Host Email"}),s("input",{...M("host_email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(se=z.host_email)!=null&&se.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ce=z.host_email)==null?void 0:ce.message})]})]}),s(dn,{text:"Search",setResetClicked:p}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{x({}),P({id:"",customer_name:"",payment_status:"",status:"",booking_start_time:"",property_space_id:"",customer_email:"",host_email:""},W(u,r,!0)),localStorage.removeItem("admin_booking_filter"),Pt(C,E)},children:"Reset"})]}),s("div",{className:"flex justify-end bg-white py-3 pt-5",children:s(qy,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",filename:"booking",data:n})}),s("div",{className:"max-w-[80vw] rounded bg-white p-5 shadow",id:"table-to-xls",children:n.map(le=>{var ae,ie,de,fe,be,he;return f("div",{className:"mb-4 flex flex-col justify-between rounded border px-5 py-4 lg:flex-row",children:[s("div",{children:mt.BOOKINGS+le.id}),s("img",{src:le.image_url,className:"h-24 w-[135px] object-contain",alt:"property_image"}),f("div",{className:"mb-4 min-w-[219px] max-w-[219px]",children:[s("p",{className:"mb-1 text-xl font-semibold text-[#101828]",children:le.property_name}),s("p",{className:"mb-1 text-xs font-medium",children:le.space_category}),s("p",{className:"w-fit rounded bg-gray-200 p-2 text-xs",children:(ae=j.find(ve=>ve.key==le.status))==null?void 0:ae.value})]}),f("div",{className:"mb-4 min-w-[219px] max-w-[219px]",children:[f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Host"}),f("p",{className:"mb-1 text-sm",children:[le.host_last_name,", ",le.host_first_name," "]})]}),f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Customer"}),f("p",{className:"mb-1 whitespace-nowrap text-xs",children:[le.customer_last_name,", ",le.customer_first_name," "]})]})]}),f("div",{className:"mb-4 min-w-[72px] max-w-none md:max-w-[72px] ",children:[f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Date"}),f("p",{className:"mb-1 text-sm",children:[Te(le.booking_start_time).format("MM/DD/YY")," "]})]}),f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Duration"}),s("p",{className:"mb-1 whitespace-nowrap text-xs",children:iy(le.duration)})]})]}),f("div",{className:"mb-4 min-w-[72px] max-w-none md:max-w-[72px] ",children:[f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Rate"}),f("p",{className:"mb-1 text-sm",children:["$",(ie=le==null?void 0:le.rate)==null?void 0:ie.toFixed(2)," "]})]}),f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Tax"}),f("p",{className:"mb-1 text-xs",children:["$",(de=le==null?void 0:le.tax)==null?void 0:de.toFixed(2)]})]})]}),f("div",{className:"mb-4 min-w-[72px] max-w-none md:max-w-[72px] ",children:[f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Total"}),f("p",{className:"mb-1 text-xs",children:["$",(((fe=le==null?void 0:le.total)!=null?fe:0)+((be=le==null?void 0:le.addon_cost)!=null?be:0)).toFixed(2)," "]})]}),f("div",{className:"flex items-center gap-4 md:flex-col md:items-start md:gap-0",children:[s("p",{className:"mb-1 w-20 text-xs font-medium md:w-[unset] ",children:"Commission"}),f("p",{className:"mb-1 text-xs",children:["$",(he=le==null?void 0:le.commission)==null?void 0:he.toFixed(2)]})]})]}),f(jt,{as:"div",className:"relative inline-block min-w-[60px] max-w-[60px] text-left",children:[s("div",{className:"",children:s(jt.Button,{className:"inline-flex justify-center rounded-md border border-gray-300 bg-white px-1 py-3 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-[#33D4B7] focus:ring-offset-2 focus:ring-offset-gray-100",children:s(ln,{type:"dots"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute left-0 z-10 mt-0 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none lg:right-0 lg:left-[unset]",children:f("div",{className:"py-1",children:[s(jt.Item,{children:({active:ve})=>s("button",{onClick:()=>_(`/admin/edit-booking/${le.id}`),className:`${ve?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,children:"Edit"})}),s(jt.Item,{children:({active:ve})=>s("button",{onClick:()=>_(`/admin/view-booking/${le.id}`),className:`${ve?"bg-gray-100 text-gray-900":"text-gray-700"} block w-full px-4 py-2 text-left text-sm`,children:"View"})})]})})})]})]},le.id)})}),s(vn,{currentPage:u,pageCount:o,pageSize:r,totalNumber:l,canPreviousPage:y,canNextPage:v,updatePageSize:B,previousPage:Y,nextPage:U})]})},sve=new St,ive=()=>{var H,A,j,I,B,Y,U,W,V,X,ne,oe;let e=new _e;const{dispatch:t}=R.useContext(we),[n,a]=R.useState([]),[r,i]=R.useState(),[o,c]=R.useState([]),[l,d]=R.useState({}),[u,g]=R.useState([]),[y,w]=R.useState({}),v=Qe({status:dt().required().typeError("This field is required"),payment_status:dt().required().typeError("This field is required"),booking_date:ge().test("is-not-in-past","Not a valid booking date",q=>{const te=new Date(q);return te.setDate(te.getDate()+1)>new Date}).required("Booking date is required"),booking_time:ge().required("Booking time is required"),duration:dt().required().positive().integer().typeError("Duration must be a number"),host_id:ge().required("Host is required")}).required(),{dispatch:S}=R.useContext(Ee),m=je(),{register:p,handleSubmit:b,setError:x,setValue:k,formState:{errors:N,isSubmitting:_,isValidating:C}}=Oe({resolver:Xe(v)}),E=[{key:"0",value:"Pending"},{key:"1",value:"Upcoming"},{key:"2",value:"Ongoing"},{key:"3",value:"Complete"},{key:"4",value:"Declined"},{key:"5",value:"Cancelled"}],T=[{key:"0",value:"Pending"},{key:"1",value:"Paid"},{key:"2",value:"Declined"},{key:"3",value:"Cancelled"}];async function D(){try{e.setTable("settings");const q=await e.callRestAPI({page:1,limit:2},"PAGINATE"),{list:te}=q;a(te)}catch(q){console.log("ERROR",q),me(S,q.message)}}async function P(q,te,G){try{let J=["deleted_at,is"];G.email&&J.push(`email,cs,${G.email}`);const K=await sve.getList("user",{join:[],filter:J}),{list:Q}=K;g(Q)}catch(J){me(S,J.message)}}async function M(q,te,G){try{e.setTable("user");const J={id:G.id||void 0,role:"host"},K=await e.callRestAPI({payload:J,page:q,limit:te},"PAGINATE"),{list:Q}=K;w(Q[0]),k("host_id",Q[0].email)}catch(J){console.log("ERROR",J),me(S,J.message)}}async function O(q,te,G){try{const J=await e.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[G!=null&&G.property_name?`ergo_property.name LIKE '%${G.property_name}%' OR ergo_spaces.category LIKE '%${G.property_name}%'`:1,"ergo_property_spaces.deleted_at IS NULL"],page:q,limit:te},"POST"),{list:K}=J;c(K)}catch(J){console.log("ERROR",J),me(S,J.message)}}const F=async q=>{var te,G;if(console.log("submitting",q),(l==null?void 0:l.id)&&(y==null?void 0:y.id)&&(r==null?void 0:r.id)){q.customer_id=l.id,q.host_id=y.id,q.property_space_id=r.id;try{let J=new Date(`${q.booking_date} ${q.booking_time}`),K=MM(q.duration,J);q.duration=q.duration*60*60;const Q=await e.callRawAPI("/v2/api/custom/ergo/booking/POST",{property_space_id:q.property_space_id,customer_id:q.customer_id,host_id:q.host_id,booked_unit:1,payment_method:1,status:q.status,payment_status:q.payment_status,booking_start_time:J.toISOString(),booking_end_time:K.toISOString(),duration:q.duration,tax_rate:(te=n.find(Z=>Z.key_name==="tax"))==null?void 0:te.key_value,commission_rate:(G=n.find(Z=>Z.key_name==="commission"))==null?void 0:G.key_value},"POST");if(q.status==3){e.setTable("booking");const Z=await e.callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${Q.message}`]},"POST");console.log("newBookingResult",Z);const se=await e.callRawAPI("/v2/api/custom/ergo/payout/POST",{initiated_at:J.toISOString(),host_id:q.host_id,customer_id:q.customer_id,property_space_id:q.property_space_id,total:Z.list.total+Z.list.addon_cost,tax:n.find(ce=>ce.key_name==="tax").key_value,commission:n.find(ce=>ce.key_name==="commission").key_value,booking_id:Q.message,status:0},"POST");console.log("payoutResult",se)}if(!Q.error)pe(t,"Added"),m("/admin/booking");else if(Q.validation){const Z=Object.keys(Q.validation);for(let se=0;se<Z.length;se++){const ce=Z[se];x(ce,{type:"manual",message:Q.validation[ce]})}}}catch(J){console.log("Error",J),pe(t,J.message),me(S,J.message)}}else l||x("customer_id",{type:"manual",message:"Please select a customer"}),y||x("host_id",{type:"manual",message:"Please select a host"}),r||x("property_space_id",{type:"manual",message:"Please select a property space"})},z=()=>{l!=null&&l.id||x("customer_id",{type:"manual",message:"Please select a customer"}),y!=null&&y.id||x("host_id",{type:"manual",message:"Please select a host"}),r!=null&&r.id||x("property_space_id",{type:"manual",message:"Please select a property space"})};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"booking"}}),async function(){await D(),await P(),await O(1,10,{property_name:""})}()},[]),h.exports.useEffect(()=>{console.log("selectedSpace",r),r!=null&&r.property_id&&async function(){try{const q=await e.callRawAPI("/v2/api/custom/ergo/property/PAGINATE",{where:[r?`${r.property_id?`ergo_property.id = '${r.property_id}'`:"1"} `:1],page:1,limit:1},"POST");console.log("result",q.list[0].host_id),await M(1,1,{id:q.list[0].host_id})}catch(q){console.log("err",q)}}()},[r]),s(Sa,{title:"Booking",backTo:"booking",children:f("form",{className:" w-full max-w-lg",onSubmit:b(F,z),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_id",children:"Property Space"}),s(vr,{selectedData:r,setSelectedData:i,data:o,getData:O,field:"property_name",field2:"space_category",errorField:"property_space_id",setError:x}),s("p",{className:"text-xs normal-case italic text-red-500",children:(H=N.property_space_id)==null?void 0:H.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"customer_id",children:"Customer"}),s(vr,{selectedData:l,setSelectedData:d,data:u,getData:P,field:"email",errorField:"customer_id",setError:x}),s("p",{className:"text-xs normal-case italic text-red-500",children:(A=N.customer_id)==null?void 0:A.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host"}),s("input",{type:"text",placeholder:"Host",readOnly:!0,...p("host_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(j=N.host_id)!=null&&j.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(I=N.host_id)==null?void 0:I.message})]}),f("div",{className:"mb-4 w-full",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Status"}),f("select",{className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...p("status"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),E.map(q=>s("option",{name:"Status",value:q.key,children:q.value},q.key))]}),f("p",{className:"norma-casel text-xs italic text-red-500",children:[" ",(B=N.status)==null?void 0:B.message]})]}),f("div",{className:"mb-4 w-full",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Payment Status"}),f("select",{className:" mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...p("payment_status"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),T.map(q=>s("option",{name:"payment_status",value:q.key,children:q.value},q.key))]}),f("p",{className:"norma-casel text-xs italic text-red-500",children:[" ",(Y=N.payment_status)==null?void 0:Y.message]})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"booking_date",children:"Booking Date"}),s("input",{type:"date",placeholder:"Booking Date",...p("booking_date"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=N.booking_date)!=null&&U.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(W=N.booking_date)==null?void 0:W.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"booking_date",children:"Booking Time"}),s("input",{type:"time",placeholder:"Booking Time",...p("booking_time"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=N.booking_time)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(X=N.booking_time)==null?void 0:X.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"duration",children:"Duration"}),s("input",{placeholder:"Duration ( hours )",...p("duration"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=N.duration)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(oe=N.duration)==null?void 0:oe.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>m("/admin/booking"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{disabled:_||C,type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let Vr=new _e;const ove=()=>{var U,W,V,X,ne,oe,q,te,G;const{dispatch:e}=R.useContext(Ee),t=Qe({property_space_id:dt(),customer_id:dt(),host_id:dt(),status:dt().required(),payment_status:dt().required(),booked_unit:dt().required().positive().integer(),payment_method:ge(),booking_start_time:ge(),duration:dt().required().positive().integer()}),[n,a]=R.useState({}),[r,i]=R.useState([]),[o,c]=R.useState({}),[l,d]=R.useState([]),[u,g]=R.useState({}),[y,w]=R.useState({}),[v,S]=R.useState([]),[m,p]=R.useState(0),[b,x]=R.useState([]);async function k(J,K,Q){try{Vr.setTable("user");const Z={email:Q.email||void 0,role:"host"},se=await Vr.callRestAPI({payload:Z,page:J,limit:K},"PAGINATE"),{list:ce}=se;S(ce||[])}catch(Z){console.log("ERROR",Z),me(e,Z.message)}}async function N(J,K,Q){try{Vr.setTable("user");const Z={email:Q.email||void 0},se=await Vr.callRestAPI({payload:Z,page:J,limit:K},"PAGINATE"),{list:ce}=se;d(ce||[])}catch(Z){console.log("ERROR",Z),me(e,Z.message)}}async function _(){try{Vr.setTable("settings");const J=await Vr.callRestAPI({page:1,limit:2},"PAGINATE"),{list:K}=J;x(K)}catch(J){console.log("ERROR",J),me(e,J.message)}}async function C(J,K,Q){try{const Z=await Vr.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[Q!=null&&Q.property_name?`ergo_property.name LIKE '%${Q.property_name}%' OR ergo_spaces.category LIKE '%${Q.property_name}%'`:1],page:J,limit:K},"POST"),{list:se}=Z;i(se)}catch(Z){console.log("ERROR",Z),me(e,Z.message)}}const{dispatch:E}=R.useContext(we),T=je(),[D,P]=h.exports.useState(0),{register:M,handleSubmit:O,setError:F,setValue:z,formState:{errors:H}}=Oe({resolver:Xe(t)}),A=Mt(),j=[{key:"0",value:"Pending"},{key:"1",value:"Upcoming"},{key:"2",value:"Ongoing"},{key:"3",value:"Complete"},{key:"4",value:"Declined"},{key:"5",value:"Cancelled"}],I=[{key:"0",value:"Pending"},{key:"1",value:"Paid"},{key:"2",value:"Declined"},{key:"3",value:"Cancelled"}];h.exports.useEffect(()=>{l.length>0&&v.length>0&&r.length>0&&!(o!=null&&o.email)&&!(y!=null&&y.email)&&!n.category&&async function(){try{Vr.setTable("booking");const J=await Vr.callRestAPI({id:Number(A==null?void 0:A.id)},"GET");J.error||(a(r.find(K=>K.id==J.model.property_space_id)||{}),c(l.find(K=>K.id==J.model.customer_id)||{}),w(v.find(K=>K.id==J.model.host_id)||{}),z("status",J.model.status),p(J.model.status),z("payment_status",J.model.payment_status),z("payment_method",J.model.payment_method),z("booking_start_time",Te(J.model.booking_start_time).format("yyyy-MM-DDTHH:mm")),z("duration",J.model.duration/3600),z("booked_unit",J.model.booked_unit),g(J.model),P(J.model.id))}catch(J){console.log("error",J),me(e,J.message)}}()},[l.length,v.length,r.length]);const B=async J=>{if(!(y!=null&&y.id)){F("host_id",{type:"manual",message:"Please select a valid host"});return}if(!(o!=null&&o.id)){F("customer_id",{type:"manual",message:"Please select a valid customer"});return}if(!(n!=null&&n.id)){F("property_space_id",{type:"manual",message:"Please select a valid space"});return}J.host_id=y.id,J.customer_id=o.id,J.property_space_id=n.id;let K=new Date(J.booking_start_time),Q=MM(J.duration,K);J.duration=J.duration*60*60;const Z={id:Number(A==null?void 0:A.id),booked_unit:1,status:J.status===u.status?null:J.status,payment_status:J.payment_status===u.payment_status?null:J.payment_status,booking_start_time:new Date(J.booking_start_time).getTime()===new Date(u.booking_start_time).getTime()?null:K.toISOString(),booking_end_time:new Date(J.booking_start_time).getTime()===new Date(u.booking_start_time).getTime()?null:Q.toISOString(),duration:J.duration},se=()=>{const ce={};for(const le in Z)Z[le]!==null&&(ce[le]=Z[le]);return ce};try{const ce=await Vr.callRawAPI("/v2/api/custom/ergo/booking/PUT",se(),"POST");if(J.status==3&&m!=3){Vr.setTable("booking");const le=await Vr.callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${ce.message}`]},"POST"),ae=await Vr.callRawAPI("/v2/api/custom/ergo/payout/POST",{initiated_at:K.toISOString(),host_id:J.host_id,customer_id:J.customer_id,property_space_id:J.property_space_id,total:le.list.total+le.list.addon_cost,tax:b.find(ie=>ie.key_name==="tax").key_value,commission:b.find(ie=>ie.key_name==="commission").key_value,booking_id:ce.message,status:0},"POST");console.log("payoutResult",ae)}if(!ce.error)pe(E,"Updated"),T("/admin/booking");else if(ce.validation){const le=Object.keys(ce.validation);for(let ae=0;ae<le.length;ae++){const ie=le[ae];F(ie,{type:"manual",message:ce.validation[ie]})}}}catch(ce){E({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:ce.message}})}},Y=()=>{o!=null&&o.id||F("customer_id",{type:"manual",message:"Please select a customer"}),y!=null&&y.id||F("host_id",{type:"manual",message:"Please select a host"}),n!=null&&n.id||F("property_space_id",{type:"manual",message:"Please select a property space"})};return R.useEffect(()=>{E({type:"SETPATH",payload:{path:"booking"}}),async function(){await _(),await N(1,200,{email:""}),await k(1,200,{email:""}),await C(1,100,{property_name:""})}()},[]),s(Ja,{title:"Booking",backTo:"booking",table1:"booking",deleteMessage:"Are you sure you want to delete this booking?",id:D,children:f("form",{className:" w-full max-w-lg",onSubmit:O(B,Y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_id",children:"Property"}),s(vr,{selectedData:n,setSelectedData:a,data:r,getData:C,field:"property_name",field2:"space_category",errorField:"property_space_id",setError:F,type:!0}),s("p",{className:"text-red-500 text-xs italic",children:(U=H.property_space_id)==null?void 0:U.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"customer_id",children:"Customer"}),s(vr,{selectedData:o,setSelectedData:c,data:l,getData:N,field:"email",errorField:"customer_id",setError:F,type:!0}),s("p",{className:"text-red-500 text-xs italic",children:(W=H.customer_id)==null?void 0:W.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"host_id",children:"Host"}),s(vr,{selectedData:y,setSelectedData:w,data:v,getData:k,field:"email",errorField:"host_id",setError:F,type:!0}),s("p",{className:"text-red-500 text-xs italic",children:(V=H.host_id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Status"}),f("select",{className:"bg-white border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...M("status"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),j.map(J=>s("option",{name:"Status",value:J.key,children:J.value},J.key))]}),f("p",{className:"text-red-500 text-xs italic",children:[" ",(X=H.status)==null?void 0:X.message]})]}),f("div",{className:"mb-4 w-full",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",children:"Payment Status"}),f("select",{className:"bg-white border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none",...M("payment_status"),children:[s("option",{selected:!0,value:"none",hidden:!0,children:"Select Option"}),I.map(J=>s("option",{name:"payment_status",value:J.key,children:J.value},J.key))]}),f("p",{className:"text-red-500 text-xs italic",children:[" ",(ne=H.payment_status)==null?void 0:ne.message]})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"booking_date",children:"Booking Time"}),s("input",{type:"datetime-local",placeholder:"Booking Date",...M("booking_start_time"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(oe=H.booking_start_time)!=null&&oe.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(q=H.booking_start_time)==null?void 0:q.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"duration",children:"Duration"}),s("input",{placeholder:"Duration ( hours )",...M("duration"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline ${(te=H.duration)!=null&&te.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic",children:(G=H.duration)==null?void 0:G.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>T("/admin/booking"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})},lve=()=>{var l,d,u;const[e,t]=h.exports.useState({}),[n,a]=h.exports.useState([]),{dispatch:r}=R.useContext(we),{dispatch:i}=R.useContext(Ee),o=Mt();je();const c=[{value:"Pending"},{value:"Upcoming"},{value:"Ongoing"},{value:"Complete",color:"#0D9895"},{value:"Declined"},{value:"Cancelled"}];return R.useEffect(()=>{r({type:"SETPATH",payload:{path:"booking"}});const g=y=>{let w=[];const v=S=>w.some(m=>m.id===S);return y.forEach(S=>{if(v(S.id)){let m=w.findIndex(p=>p.id===S.id);w[m].count+=w[m].count}else w.push({...S,count:1})}),w};(async function(){try{const w=await new _e().callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id=${Number(o==null?void 0:o.id)}`]},"POST");!w.error&&w.list&&(t(w.list),a(g(w.list.add_ons)))}catch(y){console.log("ERROR",y),me(i,y.message)}})()},[]),s(wf,{title:"Booking Details",backTo:"booking",showDelete:!1,children:f("div",{className:"py-2 flex lg:flex-row flex-col lg:justify-between",children:[f("div",{className:"w-full lg:w-1/2 lg:max-w-[413px] mb-8 lg:mb-0",children:[s("div",{className:"flex mb-1 px-5",children:f("p",{className:"w-[15rem] font-bold text-base",children:["Booking #",o==null?void 0:o.id]})}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Host"}),f("p",{className:"flex-1",children:[e.host_first_name,", ",e.host_last_name]})]}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Guest"}),f("p",{className:"flex-1",children:[e.customer_first_name," ",e.customer_last_name]})]}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Property"}),s("p",{className:"flex-1 normal-case",children:e.property_name})]}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Space Name"}),s("p",{className:"flex-1 normal-case",children:e.space_category})]}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"From"}),s("p",{className:"flex-1 normal-case",children:Te(e.booking_start_time).format("MM/DD/YY hh:mm a")})]}),f("div",{className:"flex py-1",children:[s("p",{className:"w-[9rem] px-5 text-right mr-10",children:"Till"}),s("p",{className:"flex-1 normal-case",children:Te(e.booking_end_time).format("MM/DD/YY hh:mm a")})]}),f("div",{className:"flex py-1",children:[s($e,{to:`/admin/booking_addons?booking_id=${e==null?void 0:e.id}`,target:"_blank",className:"w-[9rem] px-5 text-right font-semibold underline",children:"View Addons"}),s("div",{className:"flex-1"})]})]}),f("div",{className:"w-full lg:w-1/2 flex-end ",children:[f("div",{className:"flex justify-between py-2",children:[s("div",{}),f("p",{children:["Status:"," ",s("span",{className:`${e!=null&&e.status?`text-[${(l=c[e==null?void 0:e.status])==null?void 0:l.color}]`:""} py-1 text-sm px-4 bg-[#F9FAF8]`,children:(d=c[e==null?void 0:e.status])==null?void 0:d.value})]})]}),f("div",{className:"border rounded w-full px-8 py-7",children:[f("div",{className:"mb-5",children:[s("p",{className:"w-[15rem] font-bold text-xl mb-2",children:"Charges"}),f("p",{children:["Payment method: ",(u=e==null?void 0:e.payment_method)==null?void 0:u.replaceAll("_"," ")]})]}),f("div",{className:"flex py-2 justify-between w-full",children:[s("p",{className:"",children:"Rate"}),f("p",{className:"normal-case",children:["$",e!=null&&e.hourly_rate?e.hourly_rate:0,"/h"]})]}),f("div",{className:"flex py-2 justify-between w-full",children:[s("p",{className:"",children:"Price"}),f("p",{className:"normal-case",children:["$",e!=null&&e.hourly_rate?e.hourly_rate*(e.duration/3600):0]})]}),n.map(g=>f("div",{className:"flex py-2 justify-between w-full",children:[f("p",{className:"normal-case",children:[g.name," (x",g.count,")"]}),f("p",{className:"normal-case",children:["$",g.cost*g.count]})]})),f("div",{className:"flex py-2 justify-between w-full",children:[s("p",{className:"",children:"Tax"}),f("p",{className:"normal-case",children:["$",e!=null&&e.tax?e.tax:0]})]}),f("div",{className:"flex justify-between w-full bg-[#F2F4F7] px-2 py-3",children:[s("p",{className:"font-bold text-xl",children:"Total"}),f("p",{className:"normal-case font-bold text-xl",children:["$",e!=null&&e.total?e.total:0]})]})]})]})]})})};let hE=new _e,gE=new St;const cve=()=>{var Y,U,W,V,X,ne,oe;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((Y=localStorage.getItem("admin_amenity_filter"))!=null?Y:""),[N,_]=R.useState([]),C=Qe({name:ge()}),{reset:E,register:T,handleSubmit:D,formState:{errors:P}}=Oe({resolver:Xe(C),defaultValues:Ue(x)});function M(q){const te=a,G=te.findIndex(Q=>Q.accessor===q),J=te[G];J.isSortedDesc=!J.isSortedDesc,te.splice(G,1,J),r(()=>[...te]);const K=O(i,J.isSortedDesc,q);o(K)}function O(q,te,G){return(G==null?void 0:G.split(",").length)>1&&(G=G.split(",")[0]),q.sort((J,K)=>{var Q,Z,se,ce;if(te)return isNaN(J[G])?((Q=J[G])==null?void 0:Q.toLowerCase())<((Z=K[G])==null?void 0:Z.toLowerCase())?1:-1:J[G]<K[G]?1:-1;if(!te)return isNaN(J[G])?((se=J[G])==null?void 0:se.toLowerCase())<((ce=K[G])==null?void 0:ce.toLowerCase())?-1:1:J[G]<K[G]?-1:1})}function F(q){(async function(){l(q),await A(0,q)})()}function z(){(async function(){await A(w-1>0?w-1:0,c)})()}function H(){(async function(){await A(w+1<=d?w+1:0,c)})()}async function A(q,te){var J;const G=Ue(x);G.id=(J=G.id)==null?void 0:J.replace(mt.AMENITY_CATEGORY,"");try{let K=["ergo_amenity.deleted_at,is"];G.id&&K.push(`ergo_amenity.id,eq,${G.id}`),G.name&&K.push(`name,cs,${G.name}`),G.space_id&&K.push(`space_id,eq,${G.space_id}`);let Q=await gE.getPaginate("amenity",{filter:K,join:["spaces|space_id"],page:q||1,size:te,order:"update_at"});const{list:Z,total:se,limit:ce,num_pages:le,page:ae}=Q,ie=O(Z,!1);o(ie),l(ce),u(le),v(ae),y(se),m(ae>1),b(ae+1<=le)}catch(K){me(e,K.message),pe(t,K.message,4e3,"ERROR")}}async function j(){try{let q=["deleted_at,is"];const te=await gE.getList("spaces",{filter:q,join:[]});Array.isArray(te.list)&&_(te.list)}catch(q){me(e,q.message),pe(t,q.message,4e3,"ERROR")}}const I=q=>{x.set("id",q.id),x.set("name",q.name),x.set("space_id",q.space_id),k(x),localStorage.setItem("admin_amenity_filter",x.toString()),A(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"amenity"}}),async function(){await B(),await j(),A(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),A(w,c))},[n.deleted]);async function B(){var te;hE.setTable("settings");const q={key_name:"admin_amenity_categories_column_order"};try{const G=await hE.callRestAPI({limit:1,page:1,payload:q},"PAGINATE");Array.isArray(G.list)&&G.list.length>0&&r(va((te=G.list[0].optional_data)!=null?te:[],_a.admin_amenity_categories))}catch(G){me(e,G.message),pe(t,G.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:D(I),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Amenity Search"}),s(ma,{link:"/admin/add-amenity",text:"Add Amenity"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-2xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{placeholder:"ID",...T("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=P.id)!=null&&U.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(W=P.id)==null?void 0:W.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...T("name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=P.name)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=P.name)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),f("select",{...T("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=P.space_id)!=null&&ne.message?"border-red-500":""}`,children:[s("option",{value:"",children:"ALL"}),N.map(q=>s("option",{value:q.id,children:q.category},q.id))]}),s("p",{className:"text-xs italic text-red-500",children:(oe=P.space_id)==null?void 0:oe.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{E({name:"",id:""}),localStorage.removeItem("admin_amenity_filter"),Pt(x,k),A(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:F}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/amenity_categories",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"amenity_categories",sheet:"amenity_categories",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 ",children:s(zr,{columns:a,rows:i,emailActions:!0,tableType:"Amenity",table1:"amenity",profile:!0,deleteMessage:"Are you sure you want to delete this amenity?",deleteTitle:"Confirm Delete",onSort:M,id:"table-to-xls",showDelete:!0})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:F,previousPage:z,nextPage:H})]})};let A0=new _e;const dve=()=>{var y,w,v,S;const[e,t]=R.useState([]),{dispatch:n}=R.useContext(we),a=Qe({name:ge().required("Category is required"),space_id:dt().required().typeError("This field is required")}).required(),{dispatch:r}=R.useContext(Ee),i=je(),{register:o,handleSubmit:c,setError:l,formState:{errors:d}}=Oe({resolver:Xe(a)});async function u(){try{A0.setTable("spaces");const m=await A0.callRestAPI({},"GETALL");Array.isArray(m.list)&&t(m.list)}catch(m){me(r,m.message),pe(n,m.message,4e3,"ERROR")}}const g=async m=>{try{A0.setTable("amenity");const p=await A0.callRestAPI({name:m.name,space_id:m.space_id||null},"POST");if(!p.error)pe(n,"Added"),i("/admin/amenity");else if(p.validation){const b=Object.keys(p.validation);for(let x=0;x<b.length;x++){const k=b[x];l(k,{type:"manual",message:p.validation[k]})}}}catch(p){console.log("Error",p),l("name",{type:"manual",message:p.message}),me(r,p.message)}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"amenity"}}),u()},[]),s(Sa,{title:"Amenity",backTo:"amenity",children:f("form",{className:" w-full max-w-lg",onSubmit:c(g),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...o("name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(y=d.name)!=null&&y.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(w=d.name)==null?void 0:w.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),f("select",{...o("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(v=d.space_id)!=null&&v.message?"border-red-500":""}`,children:[s("option",{value:"",children:"NONE"}),e.map(m=>s("option",{value:m.id,children:m.category},m.id))]}),s("p",{className:"text-xs italic text-red-500",children:(S=d.space_id)==null?void 0:S.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>i("/admin/amenity"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let xd=new _e;const uve=()=>{var m,p,b,x;const[e,t]=R.useState([]),{dispatch:n}=R.useContext(Ee),a=Qe({name:ge().required("Category is required"),space_id:dt().nullable()}).required(),{dispatch:r}=R.useContext(we),i=je();h.exports.useState("");const[o,c]=h.exports.useState(0),{register:l,handleSubmit:d,setError:u,setValue:g,formState:{errors:y}}=Oe({resolver:Xe(a)}),w=Mt();h.exports.useEffect(function(){(async function(){try{xd.setTable("amenity");const k=await xd.callRestAPI({id:Number(w==null?void 0:w.id)},"GET");k.error||(g("name",k.model.name),c(k.model.id),g("space_id",k.model.space_id))}catch(k){console.log("error",k),me(n,k.message)}})()},[]);async function v(){try{xd.setTable("spaces");const k=await xd.callRestAPI({},"GETALL");Array.isArray(k.list)&&t(k.list)}catch(k){me(n,k.message),pe(r,k.message,4e3,"ERROR")}}const S=async k=>{try{xd.setTable("amenity");const N=await xd.callRestAPI({id:o,name:k.name,space_id:k.space_id},"PUT");if(!N.error)pe(r,"Updated"),i("/admin/amenity");else if(N.validation){const _=Object.keys(N.validation);for(let C=0;C<_.length;C++){const E=_[C];u(E,{type:"manual",message:N.validation[E]})}}}catch(N){console.log("Error",N),u("name",{type:"manual",message:N.message})}};return R.useEffect(()=>{r({type:"SETPATH",payload:{path:"amenity"}}),v()},[]),s(Ja,{title:"Amenity",backTo:"amenity",table1:"amenity",showDelete:!1,children:f("form",{className:" w-full max-w-lg",onSubmit:d(S),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...l("name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(m=y.name)!=null&&m.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(p=y.name)==null?void 0:p.message})]}),f("div",{className:"mb-4",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"space_id",children:"Space Category"}),s("select",{...l("space_id"),className:`focus:shadow-outline w-full cursor-pointer rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=y.space_id)!=null&&b.message?"border-red-500":""}`,children:e.map(k=>s("option",{value:k.id,children:k.category},k.id))}),s("p",{className:"text-xs italic text-red-500",children:(x=y.space_id)==null?void 0:x.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>i("/admin/amenity"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"submit",className:"ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save"})]})]})})};let bE=new _e,fve=new St;const mve=()=>{var j,I,B,Y;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1);je();const[x,k]=lt(),N=Qe({id:ge(),type:ge(),category:ge()}),{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({resolver:Xe(N),defaultValues:Ue(x)});function D(U){const W=a,V=W.findIndex(oe=>oe.accessor===U),X=W[V];X.isSortedDesc=!X.isSortedDesc,W.splice(V,1,X),r(()=>[...W]);const ne=P(i,X.isSortedDesc,U);o(ne)}function P(U,W,V){return(V==null?void 0:V.split(",").length)>1&&(V=V.split(",")[0]),U.sort((X,ne)=>{var oe,q,te,G;if(W)return isNaN(X[V])?((oe=X[V])==null?void 0:oe.toLowerCase())<((q=ne[V])==null?void 0:q.toLowerCase())?1:-1:X[V]<ne[V]?1:-1;if(!W)return isNaN(X[V])?((te=X[V])==null?void 0:te.toLowerCase())<((G=ne[V])==null?void 0:G.toLowerCase())?-1:1:X[V]<ne[V]?-1:1})}function M(U){(async function(){l(U),await z(0,U)})()}function O(){(async function(){await z(w-1>0?w-1:0,c)})()}function F(){(async function(){await z(w+1<=d?w+1:0,c)})()}async function z(U,W){var X;const V=Ue(x);V.id=(X=V.id)==null?void 0:X.replace(mt.HASHTAGS,"");try{let ne=["deleted_at,is"];V.id&&ne.push(`id,eq,${V.id}`),V.name&&ne.push(`name,cs,${V.name}`);const oe=await fve.getPaginate("hashtag",{join:[],filter:ne,page:U||1,size:W,order:"update_at"}),{list:q,total:te,limit:G,num_pages:J,page:K}=oe,Q=P(q,!1);o(Q),l(G),u(J),v(K),y(te),m(K>1),b(K+1<=J)}catch(ne){me(e,ne.message),pe(t,ne.message,4e3,"ERROR")}}const H=U=>{x.set("id",U.id),x.set("name",U.name),k(x),z(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"hashtag"}}),async function(){await A(),z(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),z(w,c))},[n.deleted]);async function A(){var W;bE.setTable("settings");const U={key_name:"admin_hashtag_column_order"};try{const V=await bE.callRestAPI({limit:1,page:1,payload:U},"PAGINATE");Array.isArray(V.list)&&V.list.length>0&&r(va((W=V.list[0].optional_data)!=null?W:[],_a.admin_hashtag))}catch(V){me(e,V.message),pe(t,V.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(H),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Hashtag Search"}),s(ma,{link:"/admin/add-hashtag",text:"Add New Hashtag"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-2xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(j=T.id)!=null&&j.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(I=T.id)==null?void 0:I.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{...C("name"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(B=T.type)!=null&&B.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(Y=T.name)==null?void 0:Y.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",name:""}),Pt(x,k),z(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:M}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/hashtag",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"hashtag",sheet:"hashtag",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,tableType:"Hashtag",table1:"hashtag",profile:!0,deleteMessage:"Are you sure you want to delete this Hashtag?",deleteTitle:"Confirm Delete",baasDelete:!0,onSort:D,id:"table-to-xls",showDelete:!0})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:M,previousPage:O,nextPage:F})]})},pve=()=>{var d,u;const{dispatch:e}=R.useContext(we),t=Qe({name:ge().required("Name is required")}).required(),{dispatch:n}=R.useContext(Ee),a=je(),{register:r,handleSubmit:i,setError:o,formState:{errors:c}}=Oe({resolver:Xe(t)}),l=async g=>{let y=new _e;try{y.setTable("hashtag");const w=await y.callRestAPI({name:g.name},"POST");if(!w.error)pe(e,"Added"),a("/admin/hashtag");else if(w.validation){const v=Object.keys(w.validation);for(let S=0;S<v.length;S++){const m=v[S];o(m,{type:"manual",message:w.validation[m]})}}}catch(w){console.log("Error",w),o("name",{type:"manual",message:w.message}),me(n,w.message)}};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"hashtag"}})},[]),s(Sa,{title:"Hashtag",backTo:"hashtag",children:s("div",{className:"p-5 border-t-0",children:f("form",{className:" w-full max-w-sm",onSubmit:i(l),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:"Name"}),s("input",{id:"name",type:"text",...r("name"),className:`" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none${(d=c.name)!=null&&d.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(u=c.name)==null?void 0:u.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/hashtag"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})})};let Rw=new _e;const hve=()=>{var w,v;const{dispatch:e}=R.useContext(Ee),t=Qe({name:ge().required("Name is required")}).required(),{dispatch:n}=R.useContext(we),a=je();h.exports.useState("");const[r,i]=h.exports.useState(0),{register:o,handleSubmit:c,setError:l,setValue:d,formState:{errors:u}}=Oe({resolver:Xe(t)}),g=Mt();h.exports.useEffect(function(){(async function(){try{Rw.setTable("hashtag");const S=await Rw.callRestAPI({id:Number(g==null?void 0:g.id)},"GET");S.error||(d("name",S.model.name),i(S.model.id))}catch(S){console.log("error",S),me(e,S.message)}})()},[]);const y=async S=>{try{const m=await Rw.callRestAPI({id:r,name:S.name},"PUT");if(!m.error)pe(n,"Updated"),a("/admin/hashtag");else if(m.validation){const p=Object.keys(m.validation);for(let b=0;b<p.length;b++){const x=p[b];l(x,{type:"manual",message:m.validation[x]})}}}catch(m){console.log("Error",m),l("name",{type:"manual",message:m.message})}};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"hashtag"}})},[]),s(Ja,{title:"Hashtag",backTo:"hashtag",showDelete:!1,children:f("form",{className:" w-full max-w-sm",onSubmit:c(y),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"name",children:"Name"}),s("input",{id:"name",type:"text",...o("name"),className:`" border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none${(w=u.name)!=null&&w.message?"border-red-500":""}`}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(v=u.name)==null?void 0:v.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>a("/admin/hashtag"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let yE=new _e,gve=new St;const bve=()=>{var B,Y,U,W,V,X,ne;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt(),[N]=lt((B=localStorage.getItem("admin_psf_filter"))!=null?B:""),_=Qe({id:ge(),property_space_id:ge(),question:ge()}),{reset:C,register:E,handleSubmit:T,setError:D,formState:{errors:P}}=Oe({resolver:Xe(_),defaultValues:(()=>{let oe=Ue(x);return Object.keys(oe).length>0?oe:Ue(N)})()});function M(oe){const q=a,te=q.findIndex(K=>K.accessor===oe),G=q[te];G.isSortedDesc=!G.isSortedDesc,q.splice(te,1,G),r(()=>[...q]);const J=O(i,G.isSortedDesc,oe);o(J)}function O(oe,q,te){return(te==null?void 0:te.split(",").length)>1&&(te=te.split(",")[0]),oe.sort((G,J)=>{var K,Q,Z,se;if(q)return isNaN(G[te])?((K=G[te])==null?void 0:K.toLowerCase())<((Q=J[te])==null?void 0:Q.toLowerCase())?1:-1:G[te]<J[te]?1:-1;if(!q)return isNaN(G[te])?((Z=G[te])==null?void 0:Z.toLowerCase())<((se=J[te])==null?void 0:se.toLowerCase())?-1:1:G[te]<J[te]?-1:1})}function F(oe){(async function(){l(oe),await A(0,oe)})()}function z(){(async function(){await A(w-1>0?w-1:0,c)})()}function H(){(async function(){await A(w+1<=d?w+1:0,c)})()}async function A(oe,q){var G,J;let te=Ue(x);te=Object.keys(te).length<1?Ue(N):te,te.id=(G=te.id)==null?void 0:G.replace(mt.PROPERTY_SPACE_FAQS,""),te.property_space_id=(J=te.property_space_id)==null?void 0:J.replace(mt.PROPERTY_SPACE,"");try{let K=["deleted_at,is"];te.id&&K.push(`id,eq,${te.id}`),te.question&&K.push(`question,cs,${te.question}`),te.property_space_id&&K.push(`property_space_id,eq,${te.property_space_id}`);let Q=await gve.getPaginate("property_space_faq",{filter:K,join:[],page:oe||1,size:q,order:"update_at"});const{list:Z,total:se,limit:ce,num_pages:le,page:ae}=Q;console.log("result ",Q);const ie=O(Z,!1);o(ie),l(ce),u(le),v(ae),y(se),m(ae>1),b(ae+1<=le)}catch(K){me(e,K.message),pe(t,K.message,4e3,"ERROR")}}const j=oe=>{console.log("submitting",oe),x.set("id",oe.id),x.set("property_space_id",oe.property_space_id),x.set("question",oe.question),k(x),localStorage.setItem("admin_psf_filter",x.toString()),A(1,c)};R.useEffect(()=>{t({type:"SETPATH",payload:{path:"property_spaces_faq"}}),async function(){await I(),A(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),A(w,c))},[n.deleted]);async function I(){var q;yE.setTable("settings");const oe={key_name:"admin_property_spaces_faq_column_order"};try{const te=await yE.callRestAPI({limit:1,page:1,payload:oe},"PAGINATE");Array.isArray(te.list)&&te.list.length>0&&r(va((q=te.list[0].optional_data)!=null?q:[],_a.admin_property_space_faqs))}catch(te){me(e,te.message),pe(t,te.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none bg-white p-5 shadow",onSubmit:T(j),children:[f("div",{className:"flex justify-between",children:[s("h4",{className:"text-2xl font-medium",children:"Property Spaces Faq Search"}),s(ma,{link:"/admin/add-property_spaces_faq",text:"Add new Property Space Faq"})]}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{type:"text",placeholder:"ID",...E("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(Y=P.id)!=null&&Y.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(U=P.id)==null?void 0:U.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"property_spaces_id",children:"Property Space"}),s("input",{type:"number",placeholder:"Property Space ID",...E("property_space_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(W=P.property_space_id)!=null&&W.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(V=P.property_space_id)==null?void 0:V.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/2",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"question",children:"question"}),s("input",{type:"text",placeholder:"Question",...E("question"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(X=P.question)!=null&&X.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(ne=P.question)==null?void 0:ne.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{C({id:"",property_space_id:"",question:""}),localStorage.removeItem("admin_psf_filter"),Pt(x,k),Pt(N,k),A(w,c)},children:"Reset"})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:F}),f("div",{className:"flex justify-end bg-white py-3 pt-5",children:[s($e,{to:"/admin/column_order/property_spaces_faq",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"})," ",s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:"property_spaces_faqs",sheet:"property_spaces_faq",buttonText:"Export to xls"})]}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,profile:!0,tableType:"property_spaces_faq",table1:"property_space_faq",deleteMessage:"Are you sure you want to delete this Property Space FAQ?",deleteTitle:"Confirm Delete",onSort:M,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:F,previousPage:z,nextPage:H})]})},yve=()=>{var S,m,p,b,x;const{dispatch:e}=R.useContext(we),[t,n]=h.exports.useState(""),a=Qe({property_space_id:dt().positive().integer().typeError("Invalid ID").required(),question:ge().required("Question is required"),answer:ge()}).required(),{dispatch:r}=R.useContext(Ee),i=new _e,o=je(),{register:c,handleSubmit:l,setError:d,clearErrors:u,formState:{errors:g}}=Oe({resolver:Xe(a)}),y=async k=>{if(k==""){u("property_space_id");return}try{const N=await i.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[`ergo_property_spaces.id = ${k}`],page:1,limit:1},"POST");if(N.error||!N.list||N.list.length<1)throw new Error;u("property_space_id")}catch(N){console.log("ERROR",N),d("property_space_id",{type:"manual",message:"Property Space with this ID does not exist"})}},w=async k=>{if(t==""){d("answer",{type:"manual",message:"Answer is required"});return}let N=new _e;try{N.setTable("property_space_faq");const _=await N.callRestAPI({property_space_id:k.property_space_id,question:k.question,answer:t},"POST");if(!_.error)pe(e,"Added"),console.log(_),o("/admin/property_spaces_faq");else if(_.validation){const C=Object.keys(_.validation);for(let E=0;E<C.length;E++){const T=C[E];d(T,{type:"manual",message:_.validation[T]})}}}catch(_){console.log("Error",_),d("question",{type:"manual",message:_.message}),me(r,_.message)}},v=()=>{d("answer",{type:"manual",message:"Answer is required"})};return R.useEffect(()=>{e({type:"SETPATH",payload:{path:"property_space_faq"}})},[]),s(Sa,{title:"Property Space FAQ",backTo:"property_spaces_faq",children:f("form",{className:" w-full max-w-lg",onSubmit:l(w,v),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_space_id",children:"Property space ID"}),s("input",{placeholder:"Property space id",...c("property_space_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(S=g.property_space_id)!=null&&S.message?"border-red-500":""}`,onChange:k=>y(k.target.value)}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(m=g.property_space_id)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"question",children:"Question"}),s("textarea",{placeholder:"Question",...c("question"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(p=g.question)!=null&&p.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(b=g.question)==null?void 0:b.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"answer",children:"Answer"}),s(Mo,{width:"100%",height:"400px",onChange:k=>n(k),placeholder:"Add your answer here",setOptions:{buttonList:Ul.complex}}),s("p",{className:"text-red-500 text-xs italic normal-case",children:(x=g.answer)==null?void 0:x.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>o("/admin/faq"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"submit",className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"})]})]})})};let I0=new _e;const xve=()=>{var k,N,_,C,E;const{dispatch:e}=R.useContext(Ee),[t,n]=h.exports.useState(""),a=Qe({property_space_id:dt().positive().integer().typeError("Invalid ID").required(),question:ge().required(),answer:ge()}).required(),{dispatch:r,state:i}=R.useContext(we),o=h.exports.useRef(null),c=je(),[l,d]=h.exports.useState(0),{register:u,handleSubmit:g,setError:y,clearErrors:w,setValue:v,formState:{errors:S}}=Oe({resolver:Xe(a)}),m=Mt(),p=async T=>{if(T==""){w("property_space_id");return}try{const D=await I0.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:[`ergo_property_spaces.id = ${T}`],page:1,limit:1},"POST");if(D.error||!D.list||D.list.length<1)throw new Error;w("property_space_id")}catch(D){console.log("ERROR",D),y("property_space_id",{type:"manual",message:"Property Space with this ID does not exist"})}};h.exports.useEffect(function(){(async function(){try{I0.setTable("property_space_faq");const T=await I0.callRestAPI({id:Number(m==null?void 0:m.id)},"GET");console.log(T),T.error||(v("property_space_id",T.model.property_space_id),v("question",T.model.question),n(T.model.answer),d(T.model.id))}catch(T){console.log("error",T),me(e,T.message)}})()},[]);const b=()=>{t==""&&y("answer",{type:"manual",message:"Answer is required"})},x=async T=>{if(t==""){y("answer",{type:"manual",message:"Answer is required"});return}try{const D=await I0.callRestAPI({id:l,question:T.question,answer:t,property_space_id:T.property_space_id},"PUT");if(!D.error)pe(r,"Updated"),c("/admin/property_spaces_faq");else if(D.validation){const P=Object.keys(D.validation);for(let M=0;M<P.length;M++){const O=P[M];y(O,{type:"manual",message:D.validation[O]})}}}catch(D){console.log("Error",D),y("question",{type:"manual",message:D.message})}};return h.exports.useEffect(()=>{i.saveChanges&&(o.current.click(),r({type:"SAVE_CHANGES",payload:{saveChanges:!1}}))},[i.saveChanges]),h.exports.useEffect(()=>{r({type:"SETPATH",payload:{path:"property_space_faq"}})},[]),s(Ja,{title:"Property Space FAQ",backTo:"property_spaces_faq",table1:"property_space_faq",deleteMessage:"Are you sure you want to delete this Question?",id:l,children:f("form",{className:" w-full max-w-lg",onSubmit:g(x,b),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"property_space_id",children:"Property Space ID"}),s("input",{placeholder:"Property Space ID",...u("property_space_id"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(k=S.property_space_id)!=null&&k.message?"border-red-500":""}`,onChange:T=>p(T.target.value)}),s("p",{className:"text-red-500 text-xs italic",children:(N=S.property_space_id)==null?void 0:N.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"question",children:"Question"}),s("textarea",{placeholder:"Question",...u("question"),className:`"shadow border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline ${(_=S.question)!=null&&_.message?"border-red-500":""}`,rows:15}),s("p",{className:"text-red-500 text-xs italic",children:(C=S.question)==null?void 0:C.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"answer",children:"Answer"}),s(Mo,{width:"100%",height:"400px",onChange:T=>n(T),setContents:t,name:"answer",setOptions:{buttonList:Ul.complex}}),s("p",{className:"text-red-500 text-xs italic",children:(E=S.answer)==null?void 0:E.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>c("/admin/faq"),className:"!bg-gradient-to-r flex-1 text-[#667085] font-semibold border border-[#667085] px-6 py-2 text-sm outline-none focus:outline-none mb-1 rounded",children:"Cancel"}),s("button",{type:"button",onClick:()=>r({type:"SHOWMODAL",payload:{showModal:!0,modalShowTitle:"Confirm Changes",type:"Edit",modalShowMessage:"Are you sure you want to update this question?",modalBtnText:"Yes, save changes"}}),className:"!bg-gradient-to-r flex-1 from-[#33D4B7] to-[#0D9895] font-semibold text-white px-6 py-2 text-sm outline-none focus:outline-none ml-5 mb-1 rounded",children:"Save"}),s("button",{ref:o,type:"submit",className:"hidden"})]})]})})},wve=({data:e,register:t,singleName:n})=>{const[a,r]=h.exports.useState(1);return console.log(n),f("div",{className:"flex justify-between mb-[12px]",children:[f("form",{className:"checkbox-container",children:[s("input",{type:"checkbox",className:"",id:"cb"+e.id,value:e.cost,...t(n!=null?n:e.add_on_name)}),s("label",{className:"text-black",htmlFor:"cb"+e.id,children:e.add_on_name})]}),f("div",{className:"flex gap-[32px] items-center",children:[e.showCounter&&f("div",{className:"border border-[#475467] rounded-xl p-2 flex gap-[10px] items-center text-white",children:[s("button",{className:"border rounded-full px-2 text-white"+(a>0?" border-[#475467]":""),onClick:()=>r(i=>i==0?i:i-1),children:"-"}),s("span",{children:a}),s("button",{className:"border rounded-full px-2 border-[#475467]",onClick:()=>r(i=>i+1),children:"+"})]}),f("p",{className:"font-semibold text-[#344054]",children:[" $",e.cost*a]})]})]})},vve=({isFav:e,stroke:t,favColor:n})=>s("svg",{width:"20",height:"17",viewBox:"0 0 20 17",fill:e?"#33d4b7":"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.99413 2.77985C8.328 0.832 5.54963 0.308035 3.46208 2.09168C1.37454 3.87532 1.08064 6.85748 2.72 8.967C4.08302 10.7209 8.20798 14.4201 9.55992 15.6174C9.71117 15.7513 9.7868 15.8183 9.87502 15.8446C9.95201 15.8676 10.0363 15.8676 10.1132 15.8446C10.2015 15.8183 10.2771 15.7513 10.4283 15.6174C11.7803 14.4201 15.9052 10.7209 17.2683 8.967C18.9076 6.85748 18.6496 3.85656 16.5262 2.09168C14.4028 0.326798 11.6603 0.832 9.99413 2.77985Z",stroke:"#33d4b7",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),cr=(e,t)=>{const[n,a]=h.exports.useState(!1);return h.exports.useEffect(()=>{let r;return e&&!n?a(!0):!e&&n&&(r=setTimeout(()=>a(!1),t)),()=>clearTimeout(r)},[e,t,n]),n},$u=Math.min,Nc=Math.max,W1=Math.round,O0=Math.floor,Al=e=>({x:e,y:e}),_ve={left:"right",right:"left",bottom:"top",top:"bottom"},Nve={start:"end",end:"start"};function F4(e,t,n){return Nc(e,$u(t,n))}function mh(e,t){return typeof e=="function"?e(t):e}function Ic(e){return e.split("-")[0]}function ph(e){return e.split("-")[1]}function aR(e){return e==="x"?"y":"x"}function f5(e){return e==="y"?"height":"width"}function Zy(e){return["top","bottom"].includes(Ic(e))?"y":"x"}function m5(e){return aR(Zy(e))}function Sve(e,t,n){n===void 0&&(n=!1);const a=ph(e),r=m5(e),i=f5(r);let o=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=Y1(o)),[o,Y1(o)]}function kve(e){const t=Y1(e);return[$4(e),t,$4(t)]}function $4(e){return e.replace(/start|end/g,t=>Nve[t])}function Cve(e,t,n){const a=["left","right"],r=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:a:t?a:r;case"left":case"right":return t?i:o;default:return[]}}function Eve(e,t,n,a){const r=ph(e);let i=Cve(Ic(e),n==="start",a);return r&&(i=i.map(o=>o+"-"+r),t&&(i=i.concat(i.map($4)))),i}function Y1(e){return e.replace(/left|right|bottom|top/g,t=>_ve[t])}function Tve(e){return{top:0,right:0,bottom:0,left:0,...e}}function rR(e){return typeof e!="number"?Tve(e):{top:e,right:e,bottom:e,left:e}}function G1(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function xE(e,t,n){let{reference:a,floating:r}=e;const i=Zy(t),o=m5(t),c=f5(o),l=Ic(t),d=i==="y",u=a.x+a.width/2-r.width/2,g=a.y+a.height/2-r.height/2,y=a[c]/2-r[c]/2;let w;switch(l){case"top":w={x:u,y:a.y-r.height};break;case"bottom":w={x:u,y:a.y+a.height};break;case"right":w={x:a.x+a.width,y:g};break;case"left":w={x:a.x-r.width,y:g};break;default:w={x:a.x,y:a.y}}switch(ph(t)){case"start":w[o]-=y*(n&&d?-1:1);break;case"end":w[o]+=y*(n&&d?-1:1);break}return w}const Lve=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:i=[],platform:o}=n,c=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let d=await o.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:g}=xE(d,a,l),y=a,w={},v=0;for(let S=0;S<c.length;S++){const{name:m,fn:p}=c[S],{x:b,y:x,data:k,reset:N}=await p({x:u,y:g,initialPlacement:a,placement:y,strategy:r,middlewareData:w,rects:d,platform:o,elements:{reference:e,floating:t}});u=b!=null?b:u,g=x!=null?x:g,w={...w,[m]:{...w[m],...k}},N&&v<=50&&(v++,typeof N=="object"&&(N.placement&&(y=N.placement),N.rects&&(d=N.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:r}):N.rects),{x:u,y:g}=xE(d,y,l)),S=-1)}return{x:u,y:g,placement:y,strategy:r,middlewareData:w}};async function sR(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:i,rects:o,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:g="floating",altBoundary:y=!1,padding:w=0}=mh(t,e),v=rR(w),m=c[y?g==="floating"?"reference":"floating":g],p=G1(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(m)))==null||n?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:l})),b=g==="floating"?{x:a,y:r,width:o.floating.width,height:o.floating.height}:o.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),k=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},N=G1(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:b,offsetParent:x,strategy:l}):b);return{top:(p.top-N.top+v.top)/k.y,bottom:(N.bottom-p.bottom+v.bottom)/k.y,left:(p.left-N.left+v.left)/k.x,right:(N.right-p.right+v.right)/k.x}}const Dve=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:i,platform:o,elements:c,middlewareData:l}=t,{element:d,padding:u=0}=mh(e,t)||{};if(d==null)return{};const g=rR(u),y={x:n,y:a},w=m5(r),v=f5(w),S=await o.getDimensions(d),m=w==="y",p=m?"top":"left",b=m?"bottom":"right",x=m?"clientHeight":"clientWidth",k=i.reference[v]+i.reference[w]-y[w]-i.floating[v],N=y[w]-i.reference[w],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d));let C=_?_[x]:0;(!C||!await(o.isElement==null?void 0:o.isElement(_)))&&(C=c.floating[x]||i.floating[v]);const E=k/2-N/2,T=C/2-S[v]/2-1,D=$u(g[p],T),P=$u(g[b],T),M=D,O=C-S[v]-P,F=C/2-S[v]/2+E,z=F4(M,F,O),H=!l.arrow&&ph(r)!=null&&F!==z&&i.reference[v]/2-(F<M?D:P)-S[v]/2<0,A=H?F<M?F-M:F-O:0;return{[w]:y[w]+A,data:{[w]:z,centerOffset:F-z-A,...H&&{alignmentOffset:A}},reset:H}}}),Mve=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:i,rects:o,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...m}=mh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const p=Ic(r),b=Ic(c)===c,x=await(l.isRTL==null?void 0:l.isRTL(d.floating)),k=y||(b||!S?[Y1(c)]:kve(c));!y&&v!=="none"&&k.push(...Eve(c,S,v,x));const N=[c,...k],_=await sR(t,m),C=[];let E=((a=i.flip)==null?void 0:a.overflows)||[];if(u&&C.push(_[p]),g){const M=Sve(r,o,x);C.push(_[M[0]],_[M[1]])}if(E=[...E,{placement:r,overflows:C}],!C.every(M=>M<=0)){var T,D;const M=(((T=i.flip)==null?void 0:T.index)||0)+1,O=N[M];if(O)return{data:{index:M,overflows:E},reset:{placement:O}};let F=(D=E.filter(z=>z.overflows[0]<=0).sort((z,H)=>z.overflows[1]-H.overflows[1])[0])==null?void 0:D.placement;if(!F)switch(w){case"bestFit":{var P;const z=(P=E.map(H=>[H.placement,H.overflows.filter(A=>A>0).reduce((A,j)=>A+j,0)]).sort((H,A)=>H[1]-A[1])[0])==null?void 0:P[0];z&&(F=z);break}case"initialPlacement":F=c;break}if(r!==F)return{reset:{placement:F}}}return{}}}};async function Ave(e,t){const{placement:n,platform:a,elements:r}=e,i=await(a.isRTL==null?void 0:a.isRTL(r.floating)),o=Ic(n),c=ph(n),l=Zy(n)==="y",d=["left","top"].includes(o)?-1:1,u=i&&l?-1:1,g=mh(t,e);let{mainAxis:y,crossAxis:w,alignmentAxis:v}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return c&&typeof v=="number"&&(w=c==="end"?v*-1:v),l?{x:w*u,y:y*d}:{x:y*d,y:w*u}}const Ive=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:i,placement:o,middlewareData:c}=t,l=await Ave(t,e);return o===((n=c.offset)==null?void 0:n.placement)&&(a=c.arrow)!=null&&a.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:o}}}}},Ove=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:c={fn:m=>{let{x:p,y:b}=m;return{x:p,y:b}}},...l}=mh(e,t),d={x:n,y:a},u=await sR(t,l),g=Zy(Ic(r)),y=aR(g);let w=d[y],v=d[g];if(i){const m=y==="y"?"top":"left",p=y==="y"?"bottom":"right",b=w+u[m],x=w-u[p];w=F4(b,w,x)}if(o){const m=g==="y"?"top":"left",p=g==="y"?"bottom":"right",b=v+u[m],x=v-u[p];v=F4(b,v,x)}const S=c.fn({...t,[y]:w,[g]:v});return{...S,data:{x:S.x-n,y:S.y-a}}}}};function vf(e){return iR(e)?(e.nodeName||"").toLowerCase():"#document"}function es(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ao(e){var t;return(t=(iR(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function iR(e){return e instanceof Node||e instanceof es(e).Node}function Di(e){return e instanceof Element||e instanceof es(e).Element}function Mi(e){return e instanceof HTMLElement||e instanceof es(e).HTMLElement}function wE(e){return typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof es(e).ShadowRoot}function hh(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=si(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!["inline","contents"].includes(r)}function Pve(e){return["table","td","th"].includes(vf(e))}function p5(e){const t=h5(),n=si(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(a=>(n.willChange||"").includes(a))||["paint","layout","strict","content"].some(a=>(n.contain||"").includes(a))}function Rve(e){let t=Il(e);for(;Mi(t)&&!Bu(t);){if(p5(t))return t;t=Il(t)}return null}function h5(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Bu(e){return["html","body","#document"].includes(vf(e))}function si(e){return es(e).getComputedStyle(e)}function Qy(e){return Di(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Il(e){if(vf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wE(e)&&e.host||Ao(e);return wE(t)?t.host:t}function oR(e){const t=Il(e);return Bu(t)?e.ownerDocument?e.ownerDocument.body:e.body:Mi(t)&&hh(t)?t:oR(t)}function wp(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=oR(e),i=r===((a=e.ownerDocument)==null?void 0:a.body),o=es(r);return i?t.concat(o,o.visualViewport||[],hh(r)?r:[],o.frameElement&&n?wp(o.frameElement):[]):t.concat(r,wp(r,[],n))}function lR(e){const t=si(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=Mi(e),i=r?e.offsetWidth:n,o=r?e.offsetHeight:a,c=W1(n)!==i||W1(a)!==o;return c&&(n=i,a=o),{width:n,height:a,$:c}}function g5(e){return Di(e)?e:e.contextElement}function yu(e){const t=g5(e);if(!Mi(t))return Al(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:i}=lR(t);let o=(i?W1(n.width):n.width)/a,c=(i?W1(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!c||!Number.isFinite(c))&&(c=1),{x:o,y:c}}const jve=Al(0);function cR(e){const t=es(e);return!h5()||!t.visualViewport?jve:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zve(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==es(e)?!1:t}function Oc(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=g5(e);let o=Al(1);t&&(a?Di(a)&&(o=yu(a)):o=yu(e));const c=zve(i,n,a)?cR(i):Al(0);let l=(r.left+c.x)/o.x,d=(r.top+c.y)/o.y,u=r.width/o.x,g=r.height/o.y;if(i){const y=es(i),w=a&&Di(a)?es(a):a;let v=y,S=v.frameElement;for(;S&&a&&w!==v;){const m=yu(S),p=S.getBoundingClientRect(),b=si(S),x=p.left+(S.clientLeft+parseFloat(b.paddingLeft))*m.x,k=p.top+(S.clientTop+parseFloat(b.paddingTop))*m.y;l*=m.x,d*=m.y,u*=m.x,g*=m.y,l+=x,d+=k,v=es(S),S=v.frameElement}}return G1({width:u,height:g,x:l,y:d})}const Fve=[":popover-open",":modal"];function b5(e){return Fve.some(t=>{try{return e.matches(t)}catch{return!1}})}function $ve(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const i=r==="fixed",o=Ao(a),c=t?b5(t.floating):!1;if(a===o||c&&i)return n;let l={scrollLeft:0,scrollTop:0},d=Al(1);const u=Al(0),g=Mi(a);if((g||!g&&!i)&&((vf(a)!=="body"||hh(o))&&(l=Qy(a)),Mi(a))){const y=Oc(a);d=yu(a),u.x=y.x+a.clientLeft,u.y=y.y+a.clientTop}return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x,y:n.y*d.y-l.scrollTop*d.y+u.y}}function Bve(e){return Array.from(e.getClientRects())}function dR(e){return Oc(Ao(e)).left+Qy(e).scrollLeft}function Hve(e){const t=Ao(e),n=Qy(e),a=e.ownerDocument.body,r=Nc(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),i=Nc(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let o=-n.scrollLeft+dR(e);const c=-n.scrollTop;return si(a).direction==="rtl"&&(o+=Nc(t.clientWidth,a.clientWidth)-r),{width:r,height:i,x:o,y:c}}function Uve(e,t){const n=es(e),a=Ao(e),r=n.visualViewport;let i=a.clientWidth,o=a.clientHeight,c=0,l=0;if(r){i=r.width,o=r.height;const d=h5();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:i,height:o,x:c,y:l}}function Vve(e,t){const n=Oc(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,i=Mi(e)?yu(e):Al(1),o=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,d=a*i.y;return{width:o,height:c,x:l,y:d}}function vE(e,t,n){let a;if(t==="viewport")a=Uve(e,n);else if(t==="document")a=Hve(Ao(e));else if(Di(t))a=Vve(t,n);else{const r=cR(e);a={...t,x:t.x-r.x,y:t.y-r.y}}return G1(a)}function uR(e,t){const n=Il(e);return n===t||!Di(n)||Bu(n)?!1:si(n).position==="fixed"||uR(n,t)}function Wve(e,t){const n=t.get(e);if(n)return n;let a=wp(e,[],!1).filter(c=>Di(c)&&vf(c)!=="body"),r=null;const i=si(e).position==="fixed";let o=i?Il(e):e;for(;Di(o)&&!Bu(o);){const c=si(o),l=p5(o);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||hh(o)&&!l&&uR(e,o))?a=a.filter(u=>u!==o):r=c,o=Il(o)}return t.set(e,a),a}function Yve(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const o=[...n==="clippingAncestors"?b5(t)?[]:Wve(t,this._c):[].concat(n),a],c=o[0],l=o.reduce((d,u)=>{const g=vE(t,u,r);return d.top=Nc(g.top,d.top),d.right=$u(g.right,d.right),d.bottom=$u(g.bottom,d.bottom),d.left=Nc(g.left,d.left),d},vE(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Gve(e){const{width:t,height:n}=lR(e);return{width:t,height:n}}function qve(e,t,n){const a=Mi(t),r=Ao(t),i=n==="fixed",o=Oc(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=Al(0);if(a||!a&&!i)if((vf(t)!=="body"||hh(r))&&(c=Qy(t)),a){const g=Oc(t,!0,i,t);l.x=g.x+t.clientLeft,l.y=g.y+t.clientTop}else r&&(l.x=dR(r));const d=o.left+c.scrollLeft-l.x,u=o.top+c.scrollTop-l.y;return{x:d,y:u,width:o.width,height:o.height}}function jw(e){return si(e).position==="static"}function _E(e,t){return!Mi(e)||si(e).position==="fixed"?null:t?t(e):e.offsetParent}function fR(e,t){const n=es(e);if(b5(e))return n;if(!Mi(e)){let r=Il(e);for(;r&&!Bu(r);){if(Di(r)&&!jw(r))return r;r=Il(r)}return n}let a=_E(e,t);for(;a&&Pve(a)&&jw(a);)a=_E(a,t);return a&&Bu(a)&&jw(a)&&!p5(a)?n:a||Rve(e)||n}const Zve=async function(e){const t=this.getOffsetParent||fR,n=this.getDimensions,a=await n(e.floating);return{reference:qve(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function Qve(e){return si(e).direction==="rtl"}const Jve={convertOffsetParentRelativeRectToViewportRelativeRect:$ve,getDocumentElement:Ao,getClippingRect:Yve,getOffsetParent:fR,getElementRects:Zve,getClientRects:Bve,getDimensions:Gve,getScale:yu,isElement:Di,isRTL:Qve};function Kve(e,t){let n=null,a;const r=Ao(e);function i(){var c;clearTimeout(a),(c=n)==null||c.disconnect(),n=null}function o(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const{left:d,top:u,width:g,height:y}=e.getBoundingClientRect();if(c||t(),!g||!y)return;const w=O0(u),v=O0(r.clientWidth-(d+g)),S=O0(r.clientHeight-(u+y)),m=O0(d),b={rootMargin:-w+"px "+-v+"px "+-S+"px "+-m+"px",threshold:Nc(0,$u(1,l))||1};let x=!0;function k(N){const _=N[0].intersectionRatio;if(_!==l){if(!x)return o();_?o(!1,_):a=setTimeout(()=>{o(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(k,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(k,b)}n.observe(e)}return o(!0),i}function Xve(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=a,d=g5(e),u=r||i?[...d?wp(d):[],...wp(t)]:[];u.forEach(p=>{r&&p.addEventListener("scroll",n,{passive:!0}),i&&p.addEventListener("resize",n)});const g=d&&c?Kve(d,n):null;let y=-1,w=null;o&&(w=new ResizeObserver(p=>{let[b]=p;b&&b.target===d&&w&&(w.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var x;(x=w)==null||x.observe(t)})),n()}),d&&!l&&w.observe(d),w.observe(t));let v,S=l?Oc(e):null;l&&m();function m(){const p=Oc(e);S&&(p.x!==S.x||p.y!==S.y||p.width!==S.width||p.height!==S.height)&&n(),S=p,v=requestAnimationFrame(m)}return n(),()=>{var p;u.forEach(b=>{r&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),g==null||g(),(p=w)==null||p.disconnect(),w=null,l&&cancelAnimationFrame(v)}}const e3e=Ive,t3e=Ove,n3e=Mve,a3e=Dve,NE=(e,t,n)=>{const a=new Map,r={platform:Jve,...n},i={...r.platform,_c:a};return Lve(e,t,{...r,platform:i})};var mR={exports:{}};/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var i="",o=0;o<arguments.length;o++){var c=arguments[o];c&&(i=r(i,a(c)))}return i}function a(i){if(typeof i=="string"||typeof i=="number")return i;if(typeof i!="object")return"";if(Array.isArray(i))return n.apply(null,i);if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]"))return i.toString();var o="";for(var c in i)t.call(i,c)&&i[c]&&(o=r(o,c));return o}function r(i,o){return o?i?i+" "+o:i+o:i}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(mR);var B4=mR.exports;/*
* React Tooltip
* {@link https://github.com/ReactTooltip/react-tooltip}
* @copyright ReactTooltip Team
* @license MIT
*/const r3e="react-tooltip-core-styles",s3e="react-tooltip-base-styles",SE={core:!1,base:!1};function kE({css:e,id:t=s3e,type:n="base",ref:a}){var r,i;if(!e||typeof document=="undefined"||SE[n]||n==="core"&&typeof process!="undefined"&&((r=process==null?void 0:process.env)===null||r===void 0?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES)||n!=="base"&&typeof process!="undefined"&&((i=process==null?void 0:process.env)===null||i===void 0?void 0:i.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;n==="core"&&(t=r3e),a||(a={});const{insertAt:o}=a;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const c=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.id=t,l.type="text/css",o==="top"&&c.firstChild?c.insertBefore(l,c.firstChild):c.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)),SE[n]=!0}const CE=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:a="top",offset:r=10,strategy:i="absolute",middlewares:o=[e3e(Number(r)),n3e({fallbackAxisSideDirection:"start"}),t3e({padding:5})],border:c})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:a};if(t===null)return{tooltipStyles:{},tooltipArrowStyles:{},place:a};const l=o;return n?(l.push(a3e({element:n,padding:5})),NE(e,t,{placement:a,strategy:i,middleware:l}).then(({x:d,y:u,placement:g,middlewareData:y})=>{var w,v;const S={left:`${d}px`,top:`${u}px`,border:c},{x:m,y:p}=(w=y.arrow)!==null&&w!==void 0?w:{x:0,y:0},b=(v={top:"bottom",right:"left",bottom:"top",left:"right"}[g.split("-")[0]])!==null&&v!==void 0?v:"bottom",x=c&&{borderBottom:c,borderRight:c};let k=0;if(c){const N=`${c}`.match(/(\d+)px/);k=N!=null&&N[1]?Number(N[1]):1}return{tooltipStyles:S,tooltipArrowStyles:{left:m!=null?`${m}px`:"",top:p!=null?`${p}px`:"",right:"",bottom:"",...x,[b]:`-${4+k}px`},place:g}})):NE(e,t,{placement:"bottom",strategy:i,middleware:l}).then(({x:d,y:u,placement:g})=>({tooltipStyles:{left:`${d}px`,top:`${u}px`},tooltipArrowStyles:{},place:g}))},EE=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),TE=(e,t,n)=>{let a=null;const r=function(...i){const o=()=>{a=null,n||e.apply(this,i)};n&&!a&&(e.apply(this,i),a=setTimeout(o,t)),n||(a&&clearTimeout(a),a=setTimeout(o,t))};return r.cancel=()=>{a&&(clearTimeout(a),a=null)},r},LE=e=>e!==null&&!Array.isArray(e)&&typeof e=="object",H4=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,i)=>H4(r,t[i]));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!LE(e)||!LE(t))return e===t;const n=Object.keys(e),a=Object.keys(t);return n.length===a.length&&n.every(r=>H4(e[r],t[r]))},i3e=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some(n=>{const a=t.getPropertyValue(n);return a==="auto"||a==="scroll"})},DE=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(i3e(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},o3e=typeof window!="undefined"?h.exports.useLayoutEffect:h.exports.useEffect,l3e="DEFAULT_TOOLTIP_ID",c3e={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},d3e=h.exports.createContext({getTooltipData:()=>c3e});function pR(e=l3e){return h.exports.useContext(d3e).getTooltipData(e)}var wd={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},zw={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const u3e=({forwardRef:e,id:t,className:n,classNameArrow:a,variant:r="dark",anchorId:i,anchorSelect:o,place:c="top",offset:l=10,events:d=["hover"],openOnClick:u=!1,positionStrategy:g="absolute",middlewares:y,wrapper:w,delayShow:v=0,delayHide:S=0,float:m=!1,hidden:p=!1,noArrow:b=!1,clickable:x=!1,closeOnEsc:k=!1,closeOnScroll:N=!1,closeOnResize:_=!1,openEvents:C,closeEvents:E,globalCloseEvents:T,imperativeModeOnly:D,style:P,position:M,afterShow:O,afterHide:F,content:z,contentWrapperRef:H,isOpen:A,defaultIsOpen:j=!1,setIsOpen:I,activeAnchor:B,setActiveAnchor:Y,border:U,opacity:W,arrowColor:V,role:X="tooltip"})=>{var ne;const oe=h.exports.useRef(null),q=h.exports.useRef(null),te=h.exports.useRef(null),G=h.exports.useRef(null),J=h.exports.useRef(null),[K,Q]=h.exports.useState({tooltipStyles:{},tooltipArrowStyles:{},place:c}),[Z,se]=h.exports.useState(!1),[ce,le]=h.exports.useState(!1),[ae,ie]=h.exports.useState(null),de=h.exports.useRef(!1),fe=h.exports.useRef(null),{anchorRefs:be,setActiveAnchor:he}=pR(t),ve=h.exports.useRef(!1),[Ce,nt]=h.exports.useState([]),Ae=h.exports.useRef(!1),Je=u||d.includes("click"),ze=Je||(C==null?void 0:C.click)||(C==null?void 0:C.dblclick)||(C==null?void 0:C.mousedown),We=C?{...C}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!C&&Je&&Object.assign(We,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const bt=E?{...E}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!E&&Je&&Object.assign(bt,{mouseleave:!1,blur:!1,mouseout:!1});const Et=T?{...T}:{escape:k||!1,scroll:N||!1,resize:_||!1,clickOutsideAnchor:ze||!1};D&&(Object.assign(We,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(bt,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Et,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),o3e(()=>(Ae.current=!0,()=>{Ae.current=!1}),[]);const wt=Ye=>{Ae.current&&(Ye&&le(!0),setTimeout(()=>{Ae.current&&(I==null||I(Ye),A===void 0&&se(Ye))},10))};h.exports.useEffect(()=>{if(A===void 0)return()=>null;A&&le(!0);const Ye=setTimeout(()=>{se(A)},10);return()=>{clearTimeout(Ye)}},[A]),h.exports.useEffect(()=>{if(Z!==de.current)if(J.current&&clearTimeout(J.current),de.current=Z,Z)O==null||O();else{const Ye=(Ge=>{const kt=Ge.match(/^([\d.]+)(ms|s)$/);if(!kt)return 0;const[,vt,pn]=kt;return Number(vt)*(pn==="ms"?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));J.current=setTimeout(()=>{le(!1),ie(null),F==null||F()},Ye+25)}},[Z]);const At=Ye=>{Q(Ge=>H4(Ge,Ye)?Ge:Ye)},Yt=(Ye=v)=>{te.current&&clearTimeout(te.current),ce?wt(!0):te.current=setTimeout(()=>{wt(!0)},Ye)},xn=(Ye=S)=>{G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{ve.current||wt(!1)},Ye)},Bn=Ye=>{var Ge;if(!Ye)return;const kt=(Ge=Ye.currentTarget)!==null&&Ge!==void 0?Ge:Ye.target;if(!(kt!=null&&kt.isConnected))return Y(null),void he({current:null});v?Yt():wt(!0),Y(kt),he({current:kt}),G.current&&clearTimeout(G.current)},zn=()=>{x?xn(S||100):S?xn():wt(!1),te.current&&clearTimeout(te.current)},Kn=({x:Ye,y:Ge})=>{var kt;const vt={getBoundingClientRect:()=>({x:Ye,y:Ge,width:0,height:0,top:Ge,left:Ye,right:Ye,bottom:Ge})};CE({place:(kt=ae==null?void 0:ae.place)!==null&&kt!==void 0?kt:c,offset:l,elementReference:vt,tooltipReference:oe.current,tooltipArrowReference:q.current,strategy:g,middlewares:y,border:U}).then(pn=>{At(pn)})},ca=Ye=>{if(!Ye)return;const Ge=Ye,kt={x:Ge.clientX,y:Ge.clientY};Kn(kt),fe.current=kt},ht=Ye=>{var Ge;if(!Z)return;const kt=Ye.target;!kt.isConnected||!((Ge=oe.current)===null||Ge===void 0)&&Ge.contains(kt)||[document.querySelector(`[id='${i}']`),...Ce].some(vt=>vt==null?void 0:vt.contains(kt))||(wt(!1),te.current&&clearTimeout(te.current))},Ht=TE(Bn,50,!0),Dt=TE(zn,50,!0),Lt=Ye=>{Dt.cancel(),Ht(Ye)},Le=()=>{Ht.cancel(),Dt()},Ze=h.exports.useCallback(()=>{var Ye,Ge;const kt=(Ye=ae==null?void 0:ae.position)!==null&&Ye!==void 0?Ye:M;kt?Kn(kt):m?fe.current&&Kn(fe.current):B!=null&&B.isConnected&&CE({place:(Ge=ae==null?void 0:ae.place)!==null&&Ge!==void 0?Ge:c,offset:l,elementReference:B,tooltipReference:oe.current,tooltipArrowReference:q.current,strategy:g,middlewares:y,border:U}).then(vt=>{Ae.current&&At(vt)})},[Z,B,z,P,c,ae==null?void 0:ae.place,l,g,M,ae==null?void 0:ae.position,m]);h.exports.useEffect(()=>{var Ye,Ge;const kt=new Set(be);Ce.forEach(ye=>{kt.add({current:ye})});const vt=document.querySelector(`[id='${i}']`);vt&&kt.add({current:vt});const pn=()=>{wt(!1)},da=DE(B),Vn=DE(oe.current);Et.scroll&&(window.addEventListener("scroll",pn),da==null||da.addEventListener("scroll",pn),Vn==null||Vn.addEventListener("scroll",pn));let Me=null;Et.resize?window.addEventListener("resize",pn):B&&oe.current&&(Me=Xve(B,oe.current,Ze,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const Ve=ye=>{ye.key==="Escape"&&wt(!1)};Et.escape&&window.addEventListener("keydown",Ve),Et.clickOutsideAnchor&&window.addEventListener("click",ht);const He=[],at=ye=>{Z&&(ye==null?void 0:ye.target)===B||Bn(ye)},Tt=ye=>{Z&&(ye==null?void 0:ye.target)===B&&zn()},Gt=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],ft=["click","dblclick","mousedown","mouseup"];Object.entries(We).forEach(([ye,Fe])=>{Fe&&(Gt.includes(ye)?He.push({event:ye,listener:Lt}):ft.includes(ye)&&He.push({event:ye,listener:at}))}),Object.entries(bt).forEach(([ye,Fe])=>{Fe&&(Gt.includes(ye)?He.push({event:ye,listener:Le}):ft.includes(ye)&&He.push({event:ye,listener:Tt}))}),m&&He.push({event:"pointermove",listener:ca});const qt=()=>{ve.current=!0},qe=()=>{ve.current=!1,zn()};return x&&!ze&&((Ye=oe.current)===null||Ye===void 0||Ye.addEventListener("mouseenter",qt),(Ge=oe.current)===null||Ge===void 0||Ge.addEventListener("mouseleave",qe)),He.forEach(({event:ye,listener:Fe})=>{kt.forEach(ot=>{var Nt;(Nt=ot.current)===null||Nt===void 0||Nt.addEventListener(ye,Fe)})}),()=>{var ye,Fe;Et.scroll&&(window.removeEventListener("scroll",pn),da==null||da.removeEventListener("scroll",pn),Vn==null||Vn.removeEventListener("scroll",pn)),Et.resize?window.removeEventListener("resize",pn):Me==null||Me(),Et.clickOutsideAnchor&&window.removeEventListener("click",ht),Et.escape&&window.removeEventListener("keydown",Ve),x&&!ze&&((ye=oe.current)===null||ye===void 0||ye.removeEventListener("mouseenter",qt),(Fe=oe.current)===null||Fe===void 0||Fe.removeEventListener("mouseleave",qe)),He.forEach(({event:ot,listener:Nt})=>{kt.forEach(Kt=>{var Cn;(Cn=Kt.current)===null||Cn===void 0||Cn.removeEventListener(ot,Nt)})})}},[B,Ze,ce,be,Ce,C,E,T,Je,v,S]),h.exports.useEffect(()=>{var Ye,Ge;let kt=(Ge=(Ye=ae==null?void 0:ae.anchorSelect)!==null&&Ye!==void 0?Ye:o)!==null&&Ge!==void 0?Ge:"";!kt&&t&&(kt=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`);const vt=new MutationObserver(pn=>{const da=[],Vn=[];pn.forEach(Me=>{if(Me.type==="attributes"&&Me.attributeName==="data-tooltip-id"&&(Me.target.getAttribute("data-tooltip-id")===t?da.push(Me.target):Me.oldValue===t&&Vn.push(Me.target)),Me.type==="childList"){if(B){const Ve=[...Me.removedNodes].filter(He=>He.nodeType===1);if(kt)try{Vn.push(...Ve.filter(He=>He.matches(kt))),Vn.push(...Ve.flatMap(He=>[...He.querySelectorAll(kt)]))}catch{}Ve.some(He=>{var at;return!!(!((at=He==null?void 0:He.contains)===null||at===void 0)&&at.call(He,B))&&(le(!1),wt(!1),Y(null),te.current&&clearTimeout(te.current),G.current&&clearTimeout(G.current),!0)})}if(kt)try{const Ve=[...Me.addedNodes].filter(He=>He.nodeType===1);da.push(...Ve.filter(He=>He.matches(kt))),da.push(...Ve.flatMap(He=>[...He.querySelectorAll(kt)]))}catch{}}}),(da.length||Vn.length)&&nt(Me=>[...Me.filter(Ve=>!Vn.includes(Ve)),...da])});return vt.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{vt.disconnect()}},[t,o,ae==null?void 0:ae.anchorSelect,B]),h.exports.useEffect(()=>{Ze()},[Ze]),h.exports.useEffect(()=>{if(!(H!=null&&H.current))return()=>null;const Ye=new ResizeObserver(()=>{setTimeout(()=>Ze())});return Ye.observe(H.current),()=>{Ye.disconnect()}},[z,H==null?void 0:H.current]),h.exports.useEffect(()=>{var Ye;const Ge=document.querySelector(`[id='${i}']`),kt=[...Ce,Ge];B&&kt.includes(B)||Y((Ye=Ce[0])!==null&&Ye!==void 0?Ye:Ge)},[i,Ce,B]),h.exports.useEffect(()=>(j&&wt(!0),()=>{te.current&&clearTimeout(te.current),G.current&&clearTimeout(G.current)}),[]),h.exports.useEffect(()=>{var Ye;let Ge=(Ye=ae==null?void 0:ae.anchorSelect)!==null&&Ye!==void 0?Ye:o;if(!Ge&&t&&(Ge=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),Ge)try{const kt=Array.from(document.querySelectorAll(Ge));nt(kt)}catch{nt([])}},[t,o,ae==null?void 0:ae.anchorSelect]),h.exports.useEffect(()=>{te.current&&(clearTimeout(te.current),Yt(v))},[v]);const It=(ne=ae==null?void 0:ae.content)!==null&&ne!==void 0?ne:z,un=Z&&Object.keys(K.tooltipStyles).length>0;return h.exports.useImperativeHandle(e,()=>({open:Ye=>{if(Ye!=null&&Ye.anchorSelect)try{document.querySelector(Ye.anchorSelect)}catch{return void console.warn(`[react-tooltip] "${Ye.anchorSelect}" is not a valid CSS selector`)}ie(Ye!=null?Ye:null),Ye!=null&&Ye.delay?Yt(Ye.delay):wt(!0)},close:Ye=>{Ye!=null&&Ye.delay?xn(Ye.delay):wt(!1)},activeAnchor:B,place:K.place,isOpen:Boolean(ce&&!p&&It&&un)})),ce&&!p&&It?R.createElement(w,{id:t,role:X,className:B4("react-tooltip",wd.tooltip,zw.tooltip,zw[r],n,`react-tooltip__place-${K.place}`,wd[un?"show":"closing"],un?"react-tooltip__show":"react-tooltip__closing",g==="fixed"&&wd.fixed,x&&wd.clickable),onTransitionEnd:Ye=>{J.current&&clearTimeout(J.current),Z||Ye.propertyName!=="opacity"||(le(!1),ie(null),F==null||F())},style:{...P,...K.tooltipStyles,opacity:W!==void 0&&un?W:void 0},ref:oe},It,R.createElement(w,{className:B4("react-tooltip-arrow",wd.arrow,zw.arrow,a,b&&wd.noArrow),style:{...K.tooltipArrowStyles,background:V?`linear-gradient(to right bottom, transparent 50%, ${V} 50%)`:void 0},ref:q})):null},f3e=({content:e})=>R.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),bc=R.forwardRef(({id:e,anchorId:t,anchorSelect:n,content:a,html:r,render:i,className:o,classNameArrow:c,variant:l="dark",place:d="top",offset:u=10,wrapper:g="div",children:y=null,events:w=["hover"],openOnClick:v=!1,positionStrategy:S="absolute",middlewares:m,delayShow:p=0,delayHide:b=0,float:x=!1,hidden:k=!1,noArrow:N=!1,clickable:_=!1,closeOnEsc:C=!1,closeOnScroll:E=!1,closeOnResize:T=!1,openEvents:D,closeEvents:P,globalCloseEvents:M,imperativeModeOnly:O=!1,style:F,position:z,isOpen:H,defaultIsOpen:A=!1,disableStyleInjection:j=!1,border:I,opacity:B,arrowColor:Y,setIsOpen:U,afterShow:W,afterHide:V,role:X="tooltip"},ne)=>{const[oe,q]=h.exports.useState(a),[te,G]=h.exports.useState(r),[J,K]=h.exports.useState(d),[Q,Z]=h.exports.useState(l),[se,ce]=h.exports.useState(u),[le,ae]=h.exports.useState(p),[ie,de]=h.exports.useState(b),[fe,be]=h.exports.useState(x),[he,ve]=h.exports.useState(k),[Ce,nt]=h.exports.useState(g),[Ae,Je]=h.exports.useState(w),[ze,We]=h.exports.useState(S),[bt,Et]=h.exports.useState(null),[wt,At]=h.exports.useState(null),Yt=h.exports.useRef(j),{anchorRefs:xn,activeAnchor:Bn}=pR(e),zn=Dt=>Dt==null?void 0:Dt.getAttributeNames().reduce((Lt,Le)=>{var Ze;return Le.startsWith("data-tooltip-")&&(Lt[Le.replace(/^data-tooltip-/,"")]=(Ze=Dt==null?void 0:Dt.getAttribute(Le))!==null&&Ze!==void 0?Ze:null),Lt},{}),Kn=Dt=>{const Lt={place:Le=>{var Ze;K((Ze=Le)!==null&&Ze!==void 0?Ze:d)},content:Le=>{q(Le!=null?Le:a)},html:Le=>{G(Le!=null?Le:r)},variant:Le=>{var Ze;Z((Ze=Le)!==null&&Ze!==void 0?Ze:l)},offset:Le=>{ce(Le===null?u:Number(Le))},wrapper:Le=>{var Ze;nt((Ze=Le)!==null&&Ze!==void 0?Ze:g)},events:Le=>{const Ze=Le==null?void 0:Le.split(" ");Je(Ze!=null?Ze:w)},"position-strategy":Le=>{var Ze;We((Ze=Le)!==null&&Ze!==void 0?Ze:S)},"delay-show":Le=>{ae(Le===null?p:Number(Le))},"delay-hide":Le=>{de(Le===null?b:Number(Le))},float:Le=>{be(Le===null?x:Le==="true")},hidden:Le=>{ve(Le===null?k:Le==="true")},"class-name":Le=>{Et(Le)}};Object.values(Lt).forEach(Le=>Le(null)),Object.entries(Dt).forEach(([Le,Ze])=>{var It;(It=Lt[Le])===null||It===void 0||It.call(Lt,Ze)})};h.exports.useEffect(()=>{q(a)},[a]),h.exports.useEffect(()=>{G(r)},[r]),h.exports.useEffect(()=>{K(d)},[d]),h.exports.useEffect(()=>{Z(l)},[l]),h.exports.useEffect(()=>{ce(u)},[u]),h.exports.useEffect(()=>{ae(p)},[p]),h.exports.useEffect(()=>{de(b)},[b]),h.exports.useEffect(()=>{be(x)},[x]),h.exports.useEffect(()=>{ve(k)},[k]),h.exports.useEffect(()=>{We(S)},[S]),h.exports.useEffect(()=>{Yt.current!==j&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")},[j]),h.exports.useEffect(()=>{typeof window!="undefined"&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:j==="core",disableBase:j}}))},[]),h.exports.useEffect(()=>{var Dt;const Lt=new Set(xn);let Le=n;if(!Le&&e&&(Le=`[data-tooltip-id='${e.replace(/'/g,"\\'")}']`),Le)try{document.querySelectorAll(Le).forEach(Ge=>{Lt.add({current:Ge})})}catch{console.warn(`[react-tooltip] "${Le}" is not a valid CSS selector`)}const Ze=document.querySelector(`[id='${t}']`);if(Ze&&Lt.add({current:Ze}),!Lt.size)return()=>null;const It=(Dt=wt!=null?wt:Ze)!==null&&Dt!==void 0?Dt:Bn.current,un=new MutationObserver(Ge=>{Ge.forEach(kt=>{var vt;if(!It||kt.type!=="attributes"||!(!((vt=kt.attributeName)===null||vt===void 0)&&vt.startsWith("data-tooltip-")))return;const pn=zn(It);Kn(pn)})}),Ye={attributes:!0,childList:!1,subtree:!1};if(It){const Ge=zn(It);Kn(Ge),un.observe(It,Ye)}return()=>{un.disconnect()}},[xn,Bn,wt,t,n]),h.exports.useEffect(()=>{F!=null&&F.border&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),I&&!EE("border",`${I}`)&&console.warn(`[react-tooltip] "${I}" is not a valid \`border\`.`),F!=null&&F.opacity&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),B&&!EE("opacity",`${B}`)&&console.warn(`[react-tooltip] "${B}" is not a valid \`opacity\`.`)},[]);let ca=y;const ht=h.exports.useRef(null);if(i){const Dt=i({content:(wt==null?void 0:wt.getAttribute("data-tooltip-content"))||oe||null,activeAnchor:wt});ca=Dt?R.createElement("div",{ref:ht,className:"react-tooltip-content-wrapper"},Dt):null}else oe&&(ca=oe);te&&(ca=R.createElement(f3e,{content:te}));const Ht={forwardRef:ne,id:e,anchorId:t,anchorSelect:n,className:B4(o,bt),classNameArrow:c,content:ca,contentWrapperRef:ht,place:J,variant:Q,offset:se,wrapper:Ce,events:Ae,openOnClick:v,positionStrategy:ze,middlewares:m,delayShow:le,delayHide:ie,float:fe,hidden:he,noArrow:N,clickable:_,closeOnEsc:C,closeOnScroll:E,closeOnResize:T,openEvents:D,closeEvents:P,globalCloseEvents:M,imperativeModeOnly:O,style:F,position:z,isOpen:H,defaultIsOpen:A,border:I,opacity:B,arrowColor:Y,setIsOpen:U,afterShow:W,afterHide:V,activeAnchor:wt,setActiveAnchor:Dt=>At(Dt),role:X};return R.createElement(u3e,{...Ht})});typeof window!="undefined"&&window.addEventListener("react-tooltip-inject-styles",e=>{e.detail.disableCore||kE({css:":root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}",type:"core"}),e.detail.disableBase||kE({css:`
.styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})});function ls({space_id:e,user_property_spaces_id:t,reRender:n,withLoader:a,className:r,buttonClassName:i,stroke:o,favColor:c}){const[l,d]=h.exports.useState(!1),u=cr(l,100),{dispatch:g}=h.exports.useContext(we),{state:y}=h.exports.useContext(Ee),w=new _e;async function v(){a&&g({type:"START_LOADING"}),w.setTable("user_property_spaces");try{await w.callRestAPI({property_spaces_id:e,user_id:y.user},"POST"),n&&n(new Date),g({type:"STOP_LOADING"})}catch(p){g({type:"STOP_LOADING"}),g({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:p.message}})}}async function S(){a&&g({type:"START_LOADING"}),w.setTable("user_property_spaces");try{await w.callRestAPI({id:t},"DELETE"),n&&n(new Date),g({type:"STOP_LOADING"}),d(!1)}catch(p){g({type:"STOP_LOADING"}),g({type:"SHOW_ERROR",payload:{heading:"Operation Failed",message:p.message}})}}async function m(){t?d(!0):v()}return f("div",{className:r!=null?r:"flex flex-grow justify-end pt-2",children:[s("button",{className:i!=null?i:"pointer-auto flex h-[32px] w-[32px] items-center justify-center rounded-full bg-[#13131366] text-end",onClick:p=>{p.preventDefault(),p.stopPropagation(),m()},id:"favorite-button",children:s(vve,{isFav:t!==null&&t!==0,stroke:o,favColor:c})}),u&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:p=>{p.preventDefault(),p.stopPropagation(),d(!1)},children:f("div",{className:`${l?"pop-in":"pop-out"} w-[400px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:p=>p.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"text-2xl font-semibold",children:"Are you sure?"}),s("button",{className:"rounded-full border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",onClick:p=>{p.preventDefault(),p.stopPropagation(),d(!1)},children:"\u2715"})]}),s("p",{children:"Are you sure you want to remove this space from your favorites?"}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"mt-4 flex-grow rounded border-2 border-[#98A2B3] py-2 tracking-wide outline-none focus:outline-none",onClick:p=>{p.preventDefault(),p.stopPropagation(),d(!1)},children:"Cancel"}),s("button",{type:"button",className:"login-btn-gradient mt-4 flex-grow rounded py-2 tracking-wide text-white outline-none focus:outline-none",onClick:p=>{p.preventDefault(),p.stopPropagation(),S()},children:"Yes, remove"})]})]})})]})}let Fw=new _e;function m3e(){const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=h.exports.useState(0),[r,i]=h.exports.useState(""),[o,c]=h.exports.useState(!1);async function l(){Fw.setTable("cms");try{const u=await Fw.callRestAPI({payload:{content_key:"privacy_policy"},limit:1,page:1},"PAGINATE");Array.isArray(u.list)&&u.list.length>0&&(a(u.list[0].id),i(u.list[0].content_value))}catch(u){me(e,u.message),pe(t,u.message,4e3,"ERROR")}}const d=async u=>{c(!0),u.preventDefault();try{const g=await Fw.callRestAPI({id:n,content_value:r},"PUT");pe(t,"Saved",3e3)}catch(g){me(e,g.message),pe(t,g.message,4e3,"ERROR")}c(!1)};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"privacy"}}),l()},[]),f("div",{className:"shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium mb-16",children:"Privacy policy"}),f("form",{className:"w-full",onSubmit:d,children:[s("div",{className:"mb-4",children:s(Mo,{width:"600px",height:"304px",onChange:u=>i(u),setContents:r,name:"content",setOptions:{buttonList:Ul.complex}})}),s("div",{className:"flex gap-2",children:s(Ft,{loading:o,loadingEl:s(Se,{children:"Submitting"}),type:"submit",className:"login-btn-gradient text-white py-2 px-4 rounded focus:outline-none focus:shadow-outline",disabled:o,children:"Submit"})})]})]})}let $w=new _e;function p3e(){const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=h.exports.useState(0),[r,i]=h.exports.useState(""),[o,c]=h.exports.useState(!1);async function l(){$w.setTable("cms");try{const u=await $w.callRestAPI({payload:{content_key:"terms_and_conditions"},limit:1,page:1},"PAGINATE");Array.isArray(u.list)&&u.list.length>0&&(a(u.list[0].id),i(u.list[0].content_value))}catch(u){me(e,u.message),pe(t,u.message,4e3,"ERROR")}}const d=async u=>{c(!0),u.preventDefault();try{const g=await $w.callRestAPI({id:n,content_value:r},"PUT");pe(t,"Saved",3e3)}catch(g){me(e,g.message),pe(t,g.message,4e3,"ERROR")}c(!1)};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"terms_and_conditions"}}),l()},[]),f("div",{className:"shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium mb-16",children:"Terms and conditions"}),f("form",{className:"w-full",onSubmit:d,children:[s("div",{className:"mb-4",children:s(Mo,{width:"600px",height:"304px",onChange:u=>i(u),setContents:r,name:"content",setOptions:{buttonList:Ul.complex}})}),s("div",{className:"flex gap-2",children:s(Ft,{loading:o,loadingEl:s(Se,{children:"Submitting"}),type:"submit",className:"login-btn-gradient text-white py-2 px-4 rounded focus:outline-none focus:shadow-outline",disabled:o,children:"Submit"})})]})]})}let Bw=new _e;function h3e(){const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),[n,a]=h.exports.useState(0),[r,i]=h.exports.useState(""),[o,c]=h.exports.useState(!1);async function l(){Bw.setTable("cms");try{const u=await Bw.callRestAPI({payload:{content_key:"cancellation_policy"},limit:1,page:1},"PAGINATE");Array.isArray(u.list)&&u.list.length>0&&(a(u.list[0].id),i(u.list[0].content_value))}catch(u){me(e,u.message),pe(t,u.message,4e3,"ERROR")}}const d=async u=>{c(!0),u.preventDefault();try{const g=await Bw.callRestAPI({id:n,content_value:r},"PUT");pe(t,"Saved",3e3)}catch(g){me(e,g.message),pe(t,g.message,4e3,"ERROR")}c(!1)};return R.useEffect(()=>{t({type:"SETPATH",payload:{path:"cancellation_policy"}}),l()},[]),f("div",{className:"shadow-md rounded mx-auto p-5",children:[s("h4",{className:"text-2xl font-medium mb-16",children:"Cancellation policy"}),f("form",{className:"w-full",onSubmit:d,children:[s("div",{className:"mb-4",children:s(Mo,{width:"600px",height:"304px",onChange:u=>i(u),setContents:r,name:"content",setOptions:{buttonList:Ul.complex}})}),s("div",{className:"flex gap-2",children:s(Ft,{loading:o,loadingEl:s(Se,{children:"Submitting"}),type:"submit",className:"login-btn-gradient text-white py-2 px-4 rounded focus:outline-none focus:shadow-outline",disabled:o,children:"Submit"})})]})]})}let nc=new _e,g3e=new St;const U4=["Not Viewed","Viewed"],hR=["New Space Added","New Property Space Images Added","Profile Picture Changed","Property Space Edited","New Review Added","New Payout","New Id Verification Submitted"],ME=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.NOTIFICATION},{header:"User ID",accessor:"user_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.USER},{header:"Type",accessor:"type",isSorted:!0,isSortedDesc:!0,mapping:hR},{header:"Message",accessor:"message",isSorted:!0,isSortedDesc:!0},{header:"Notification Time",accessor:"notification_time",isSorted:!0,isSortedDesc:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Status",accessor:"status",isSorted:!0,isSortedDesc:!0,mapping:U4},{header:"Actions",accessor:""}];function b3e(){var te,G,J,K,Q,Z,se,ce;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(ME),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState(!1),[N,_]=R.useState([]),[C,E]=R.useState(""),[T,D]=lt((te=localStorage.getItem("admin_notification_filter"))!=null?te:""),[P,M]=R.useState(!1),{reset:O,register:F,handleSubmit:z,setError:H,formState:{errors:A}}=Oe({defaultValues:Ue(T)});function j(le){const ae=a,ie=ae.findIndex(be=>be.accessor===le),de=ae[ie];de.isSortedDesc=!de.isSortedDesc,ae.splice(ie,1,de),r(()=>[...ae]);const fe=I(i,de.isSortedDesc,le);o(fe)}function I(le,ae,ie){return(ie==null?void 0:ie.split(",").length)>1&&(ie=ie.split(",")[0]),le.sort((de,fe)=>{var be,he,ve,Ce;if(ae)return isNaN(de[ie])?((be=de[ie])==null?void 0:be.toLowerCase())<((he=fe[ie])==null?void 0:he.toLowerCase())?1:-1:de[ie]<fe[ie]?1:-1;if(!ae)return isNaN(de[ie])?((ve=de[ie])==null?void 0:ve.toLowerCase())<((Ce=fe[ie])==null?void 0:Ce.toLowerCase())?-1:1:de[ie]<fe[ie]?-1:1})}function B(le){(async function(){l(le),await W(0,le)})()}function Y(){(async function(){await W(w-1>0?w-1:0,c)})()}function U(){(async function(){await W(w+1<=d?w+1:0,c)})()}async function W(le,ae){var de;const ie=Ue(T);ie.id=(de=ie.id)==null?void 0:de.replace(mt.NOTIFICATION,""),nc.setTable("notification");try{let fe=[];ie.id&&fe.push(`ergo_notification.id,eq,${ie.id}`),ie.status&&fe.push(`ergo_notification.status,eq,${ie.status}`),ie.create_at&&fe.push(`ergo_notification.create_at,eq,'${ie.create_at}'`),ie.type&&fe.push(`ergo_notification.type,eq,${ie.type}`),ie.email&&fe.push(`ergo_user.email,cs,${ie.email}`),console.log("filter",fe);let be=await g3e.getPaginate("notification",{filter:fe,join:["user"],page:le||1,size:ae,order:"update_at"});const{list:he,total:ve,limit:Ce,num_pages:nt,page:Ae}=be,Je=I(he,!1);o(Je),l(Ce),u(nt),v(Ae),y(ve),m(Ae>1),b(Ae+1<=nt)}catch(fe){me(e,fe.message),pe(n,fe.message,4e3,"ERROR")}}const V=le=>{T.set("id",le.id),T.set("status",le.status),T.set("create_at",le.create_at),T.set("type",le.type),T.set("email",le.email),D(T),localStorage.setItem("admin_notification_filter",T.toString()),W(1,c)};R.useEffect(()=>{n({type:"SETPATH",payload:{path:"notification"}}),W(1,c)},[]);async function X(){if(C!=""){M(!0),nc.setTable("notification");try{await Promise.all(N.map(ae=>nc.callRestAPI({id:Number(ae),status:C},"PUT")));const le=i.reduce((ae,ie)=>ie.status!=Number(C)&&N.includes(ie.id)?ae+1:ae,0);Number(C)==rr.NOT_ADDRESSED?n({type:"SET_NOTIFICATION_COUNT",payload:t.adminNotificationCount+le}):n({type:"SET_NOTIFICATION_COUNT",payload:t.adminNotificationCount-le}),pe(n,"Successful"),E(""),_([]),document.querySelector(".none").value="",W(1,c)}catch(le){me(e,le.message),pe(n,le.message,4e3,"ERROR")}M(!1)}}async function ne(le){nc.setTable("notification");try{await nc.callRestAPI({id:le,status:rr.ADDRESSED},"PUT"),n({type:"SET_NOTIFICATION_COUNT",payload:t.adminNotificationCount>0?t.adminNotificationCount-1:0}),pe(n,"Successful"),W(1,c)}catch(ae){me(e,ae.message),pe(n,ae.message,4e3,"ERROR")}}async function oe(le){nc.setTable("notification");try{await nc.callRestAPI({id:le,status:rr.NOT_ADDRESSED},"PUT"),n({type:"SET_NOTIFICATION_COUNT",payload:t.adminNotificationCount+1}),pe(n,"Successful"),W(1,c)}catch(ae){me(e,ae.message),pe(n,ae.message,4e3,"ERROR")}}function q(le,ae,ie){switch(le){case za.EDIT_PROPERTY_SPACE:case za.CREATE_SPACE:return`/admin/property_spaces?id=${ae}`;case za.CREATE_PROPERTY_SPACE_IMAGE:return`/admin/property_spaces_images?id=${ae}`;case za.EDIT_USER_PICTURE:return`/admin/user?id=${ae}`;case za.ADD_PAYOUT:return`/admin/payout?id=${ae}`;case za.ADD_REVIEW:return`/admin/review?id=${ae}`;case za.NEW_ID_VERIFICATION:return`/admin/id_verification?id=${ae}`;default:return""}}return f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:z(V),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Notification"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...F("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(G=A.id)!=null&&G.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(J=A.id)==null?void 0:J.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...F("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(K=A.email)!=null&&K.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(Q=A.email)==null?void 0:Q.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"status",children:"Status"}),f("select",{className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...F("status"),children:[s("option",{value:"",children:"ALL"}),U4.map((le,ae)=>s("option",{name:"status",value:ae,children:le},ae))]}),s("p",{className:"text-xs italic text-red-500",children:(Z=A.status)==null?void 0:Z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"type",children:"Type"}),f("select",{className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...F("type"),children:[s("option",{value:"",children:"ALL"}),hR.map((le,ae)=>s("option",{name:"type",value:ae,children:le},ae))]}),s("p",{className:"text-xs italic text-red-500",children:(se=A.type)==null?void 0:se.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"create_at",children:"Date Added"}),s("input",{type:"date",...F("create_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(ce=A.create_at)==null?void 0:ce.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{O({id:"",status:"",type:"",create_at:""}),localStorage.removeItem("admin_notification_filter"),Pt(T,D),W(w,c)},children:"Reset"})]})}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:B}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:x,setEnabled:k})}),x&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.length!=i.length?_(i.map(le=>le.id)):_([])},checked:N.length==i.length&&i.length>0,onChange:()=>{}}),"Select All"]}),N.length>0?f("div",{className:"flex items-start gap-4",children:[f("select",{className:"mb-3 rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",onChange:le=>E(le.target.value),children:[s("option",{value:"",className:"none",children:"NONE"}),U4.map((le,ae)=>s("option",{name:"status",value:ae,children:le},ae))]}),s(Ft,{type:"button",loading:P,className:"rounded-md !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white",onClick:()=>X(),children:"Bulk Save"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[x&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),ME.map((le,ae)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>j(le.accessor),children:[le.header,le.isSorted,s("span",{children:le.isSorted?le.isSortedDesc?" \u25BC":" \u25B2":""})]},ae))]})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((le,ae)=>f("tr",{className:"py-2 text-sm",children:[x&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.includes(le.id)?(_(ie=>{let de=[...ie];return de.splice(ie.findIndex(fe=>fe==le.id),1),de}),E()):_(ie=>[...ie,le.id])},checked:N.includes(le.id),onChange:()=>{}})}),a.map((ie,de)=>{var fe;return ie.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:ie.format(le[ie.accessor])},de):ie.accessor==""?f("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:[le.status==rr.NOT_ADDRESSED?s("button",{className:"ml-2 w-fit border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>ne(le.id),children:"Mark as Viewed"}):s("button",{className:"ml-2 w-fit border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>oe(le.id),children:"Mark as not Viewed"}),s("button",{className:"ml-2 px-1 text-[#667085]",onClick:async()=>{await ne(le.id),window.open(location.origin+q(le.type,le.action_id,le.user_id),"_blank")},target:"_blank",children:"View"})]},de):ie.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:ie.mapping[(fe=le[ie.accessor])!=null?fe:0]},de):ie.accessor=="notification_time"?s("td",{className:"whitespace-nowrap px-6 py-4",children:ZG(le.notification_time)},de):ie.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:ie.idPrefix+le[ie.accessor]},de):ie.nested?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:le[ie.nested][ie.accessor]},de):s("td",{className:"whitespace-nowrap px-6 py-4",children:le[ie.accessor]},de)})]},ae))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:B,previousPage:Y,nextPage:U})]})}var y3e=["password","123456","12345678","1234","qwerty","12345","dragon","pussy","baseball","football","letmein","monkey","696969","abc123","mustang","michael","shadow","master","jennifer","111111","2000","jordan","superman","harley","1234567","fuckme","hunter","fuckyou","trustno1","ranger","buster","thomas","tigger","robert","soccer","fuck","batman","test","pass","killer","hockey","george","charlie","andrew","michelle","love","sunshine","jessica","asshole","6969","pepper","daniel","access","123456789","654321","joshua","maggie","starwars","silver","william","dallas","yankees","123123","ashley","666666","hello","amanda","orange","biteme","freedom","computer","sexy","thunder","nicole","ginger","heather","hammer","summer","corvette","taylor","fucker","austin","1111","merlin","matthew","121212","golfer","cheese","princess","martin","chelsea","patrick","richard","diamond","yellow","bigdog","secret","asdfgh","sparky","cowboy","camaro","anthony","matrix","falcon","iloveyou","bailey","guitar","jackson","purple","scooter","phoenix","aaaaaa","morgan","tigers","porsche","mickey","maverick","cookie","nascar","peanut","justin","131313","money","horny","samantha","panties","steelers","joseph","snoopy","boomer","whatever","iceman","smokey","gateway","dakota","cowboys","eagles","chicken","dick","black","zxcvbn","please","andrea","ferrari","knight","hardcore","melissa","compaq","coffee","booboo","bitch","johnny","bulldog","xxxxxx","welcome","james","player","ncc1701","wizard","scooby","charles","junior","internet","bigdick","mike","brandy","tennis","blowjob","banana","monster","spider","lakers","miller","rabbit","enter","mercedes","brandon","steven","fender","john","yamaha","diablo","chris","boston","tiger","marine","chicago","rangers","gandalf","winter","bigtits","barney","edward","raiders","porn","badboy","blowme","spanky","bigdaddy","johnson","chester","london","midnight","blue","fishing","000000","hannah","slayer","11111111","rachel","sexsex","redsox","thx1138","asdf","marlboro","panther","zxcvbnm","arsenal","oliver","qazwsx","mother","victoria","7777777","jasper","angel","david","winner","crystal","golden","butthead","viking","jack","iwantu","shannon","murphy","angels","prince","cameron","girls","madison","wilson","carlos","hooters","willie","startrek","captain","maddog","jasmine","butter","booger","angela","golf","lauren","rocket","tiffany","theman","dennis","liverpoo","flower","forever","green","jackie","muffin","turtle","sophie","danielle","redskins","toyota","jason","sierra","winston","debbie","giants","packers","newyork","jeremy","casper","bubba","112233","sandra","lovers","mountain","united","cooper","driver","tucker","helpme","fucking","pookie","lucky","maxwell","8675309","bear","suckit","gators","5150","222222","shithead","fuckoff","jaguar","monica","fred","happy","hotdog","tits","gemini","lover","xxxxxxxx","777777","canada","nathan","victor","florida","88888888","nicholas","rosebud","metallic","doctor","trouble","success","stupid","tomcat","warrior","peaches","apples","fish","qwertyui","magic","buddy","dolphins","rainbow","gunner","987654","freddy","alexis","braves","cock","2112","1212","cocacola","xavier","dolphin","testing","bond007","member","calvin","voodoo","7777","samson","alex","apollo","fire","tester","walter","beavis","voyager","peter","porno","bonnie","rush2112","beer","apple","scorpio","jonathan","skippy","sydney","scott","red123","power","gordon","travis","beaver","star","jackass","flyers","boobs","232323","zzzzzz","steve","rebecca","scorpion","doggie","legend","ou812","yankee","blazer","bill","runner","birdie","bitches","555555","parker","topgun","asdfasdf","heaven","viper","animal","2222","bigboy","4444","arthur","baby","private","godzilla","donald","williams","lifehack","phantom","dave","rock","august","sammy","cool","brian","platinum","jake","bronco","paul","mark","frank","heka6w2","copper","billy","cumshot","garfield","willow","cunt","little","carter","slut","albert","69696969","kitten","super","jordan23","eagle1","shelby","america","11111","jessie","house","free","123321","chevy","bullshit","white","broncos","horney","surfer","nissan","999999","saturn","airborne","elephant","marvin","shit","action","adidas","qwert","kevin","1313","explorer","walker","police","christin","december","benjamin","wolf","sweet","therock","king","online","dickhead","brooklyn","teresa","cricket","sharon","dexter","racing","penis","gregory","0000","teens","redwings","dreams","michigan","hentai","magnum","87654321","nothing","donkey","trinity","digital","333333","stella","cartman","guinness","123abc","speedy","buffalo","kitty","pimpin","eagle","einstein","kelly","nelson","nirvana","vampire","xxxx","playboy","louise","pumpkin","snowball","test123","girl","sucker","mexico","beatles","fantasy","ford","gibson","celtic","marcus","cherry","cassie","888888","natasha","sniper","chance","genesis","hotrod","reddog","alexande","college","jester","passw0rd","bigcock","smith","lasvegas","carmen","slipknot","3333","death","kimberly","1q2w3e","eclipse","1q2w3e4r","stanley","samuel","drummer","homer","montana","music","aaaa","spencer","jimmy","carolina","colorado","creative","hello1","rocky","goober","friday","bollocks","scotty","abcdef","bubbles","hawaii","fluffy","mine","stephen","horses","thumper","5555","pussies","darkness","asdfghjk","pamela","boobies","buddha","vanessa","sandman","naughty","douglas","honda","matt","azerty","6666","shorty","money1","beach","loveme","4321","simple","poohbear","444444","badass","destiny","sarah","denise","vikings","lizard","melanie","assman","sabrina","nintendo","water","good","howard","time","123qwe","november","xxxxx","october","leather","bastard","young","101010","extreme","hard","password1","vincent","pussy1","lacrosse","hotmail","spooky","amateur","alaska","badger","paradise","maryjane","poop","crazy","mozart","video","russell","vagina","spitfire","anderson","norman","eric","cherokee","cougar","barbara","long","420420","family","horse","enigma","allison","raider","brazil","blonde","jones","55555","dude","drowssap","jeff","school","marshall","lovely","1qaz2wsx","jeffrey","caroline","franklin","booty","molly","snickers","leslie","nipples","courtney","diesel","rocks","eminem","westside","suzuki","daddy","passion","hummer","ladies","zachary","frankie","elvis","reggie","alpha","suckme","simpson","patricia","147147","pirate","tommy","semperfi","jupiter","redrum","freeuser","wanker","stinky","ducati","paris","natalie","babygirl","bishop","windows","spirit","pantera","monday","patches","brutus","houston","smooth","penguin","marley","forest","cream","212121","flash","maximus","nipple","bobby","bradley","vision","pokemon","champion","fireman","indian","softball","picard","system","clinton","cobra","enjoy","lucky1","claire","claudia","boogie","timothy","marines","security","dirty","admin","wildcats","pimp","dancer","hardon","veronica","fucked","abcd1234","abcdefg","ironman","wolverin","remember","great","freepass","bigred","squirt","justice","francis","hobbes","kermit","pearljam","mercury","domino","9999","denver","brooke","rascal","hitman","mistress","simon","tony","bbbbbb","friend","peekaboo","naked","budlight","electric","sluts","stargate","saints","bondage","brittany","bigman","zombie","swimming","duke","qwerty1","babes","scotland","disney","rooster","brenda","mookie","swordfis","candy","duncan","olivia","hunting","blink182","alicia","8888","samsung","bubba1","whore","virginia","general","passport","aaaaaaaa","erotic","liberty","arizona","jesus","abcd","newport","skipper","rolltide","balls","happy1","galore","christ","weasel","242424","wombat","digger","classic","bulldogs","poopoo","accord","popcorn","turkey","jenny","amber","bunny","mouse","007007","titanic","liverpool","dreamer","everton","friends","chevelle","carrie","gabriel","psycho","nemesis","burton","pontiac","connor","eatme","lickme","roland","cumming","mitchell","ireland","lincoln","arnold","spiderma","patriots","goblue","devils","eugene","empire","asdfg","cardinal","brown","shaggy","froggy","qwer","kawasaki","kodiak","people","phpbb","light","54321","kramer","chopper","hooker","honey","whynot","lesbian","lisa","baxter","adam","snake","teen","ncc1701d","qqqqqq","airplane","britney","avalon","sandy","sugar","sublime","stewart","wildcat","raven","scarface","elizabet","123654","trucks","wolfpack","pervert","lawrence","raymond","redhead","american","alyssa","bambam","movie","woody","shaved","snowman","tiger1","chicks","raptor","1969","stingray","shooter","france","stars","madmax","kristen","sports","jerry","789456","garcia","simpsons","lights","ryan","looking","chronic","alison","hahaha","packard","hendrix","perfect","service","spring","srinivas","spike","katie","252525","oscar","brother","bigmac","suck","single","cannon","georgia","popeye","tattoo","texas","party","bullet","taurus","sailor","wolves","panthers","japan","strike","flowers","pussycat","chris1","loverboy","berlin","sticky","marina","tarheels","fisher","russia","connie","wolfgang","testtest","mature","bass","catch22","juice","michael1","nigger","159753","women","alpha1","trooper","hawkeye","head","freaky","dodgers","pakistan","machine","pyramid","vegeta","katana","moose","tinker","coyote","infinity","inside","pepsi","letmein1","bang","control","hercules","morris","james1","tickle","outlaw","browns","billybob","pickle","test1","michele","antonio","sucks","pavilion","changeme","caesar","prelude","tanner","adrian","darkside","bowling","wutang","sunset","robbie","alabama","danger","zeppelin","juan","rusty","pppppp","nick","2001","ping","darkstar","madonna","qwe123","bigone","casino","cheryl","charlie1","mmmmmm","integra","wrangler","apache","tweety","qwerty12","bobafett","simone","none","business","sterling","trevor","transam","dustin","harvey","england","2323","seattle","ssssss","rose","harry","openup","pandora","pussys","trucker","wallace","indigo","storm","malibu","weed","review","babydoll","doggy","dilbert","pegasus","joker","catfish","flipper","valerie","herman","fuckit","detroit","kenneth","cheyenne","bruins","stacey","smoke","joey","seven","marino","fetish","xfiles","wonder","stinger","pizza","babe","pretty","stealth","manutd","gracie","gundam","cessna","longhorn","presario","mnbvcxz","wicked","mustang1","victory","21122112","shelly","awesome","athena","q1w2e3r4","help","holiday","knicks","street","redneck","12341234","casey","gizmo","scully","dragon1","devildog","triumph","eddie","bluebird","shotgun","peewee","ronnie","angel1","daisy","special","metallica","madman","country","impala","lennon","roscoe","omega","access14","enterpri","miranda","search","smitty","blizzard","unicorn","tight","rick","ronald","asdf1234","harrison","trigger","truck","danny","home","winnie","beauty","thailand","1234567890","cadillac","castle","tyler","bobcat","buddy1","sunny","stones","asian","freddie","chuck","butt","loveyou","norton","hellfire","hotsex","indiana","short","panzer","lonewolf","trumpet","colors","blaster","12121212","fireball","logan","precious","aaron","elaine","jungle","atlanta","gold","corona","curtis","nikki","polaris","timber","theone","baller","chipper","orlando","island","skyline","dragons","dogs","benson","licker","goldie","engineer","kong","pencil","basketba","open","hornet","world","linda","barbie","chan","farmer","valentin","wetpussy","indians","larry","redman","foobar","travel","morpheus","bernie","target","141414","hotstuff","photos","laura","savage","holly","rocky1","fuck_inside","dollar","turbo","design","newton","hottie","moon","202020","blondes","4128","lestat","avatar","future","goforit","random","abgrtyu","jjjjjj","cancer","q1w2e3","smiley","goldberg","express","virgin","zipper","wrinkle1","stone","andy","babylon","dong","powers","consumer","dudley","monkey1","serenity","samurai","99999999","bigboobs","skeeter","lindsay","joejoe","master1","aaaaa","chocolat","christia","birthday","stephani","tang","1234qwer","alfred","ball","98765432","maria","sexual","maxima","77777777","sampson","buckeye","highland","kristin","seminole","reaper","bassman","nugget","lucifer","airforce","nasty","watson","warlock","2121","philip","always","dodge","chrissy","burger","bird","snatch","missy","pink","gang","maddie","holmes","huskers","piglet","photo","joanne","hamilton","dodger","paladin","christy","chubby","buckeyes","hamlet","abcdefgh","bigfoot","sunday","manson","goldfish","garden","deftones","icecream","blondie","spartan","julie","harold","charger","brandi","stormy","sherry","pleasure","juventus","rodney","galaxy","holland","escort","zxcvb","planet","jerome","wesley","blues","song","peace","david1","ncc1701e","1966","51505150","cavalier","gambit","karen","sidney","ripper","oicu812","jamie","sister","marie","martha","nylons","aardvark","nadine","minnie","whiskey","bing","plastic","anal","babylon5","chang","savannah","loser","racecar","insane","yankees1","mememe","hansolo","chiefs","fredfred","freak","frog","salmon","concrete","yvonne","zxcv","shamrock","atlantis","warren","wordpass","julian","mariah","rommel","1010","harris","predator","sylvia","massive","cats","sammy1","mister","stud","marathon","rubber","ding","trunks","desire","montreal","justme","faster","kathleen","irish","1999","bertha","jessica1","alpine","sammie","diamonds","tristan","00000","swinger","shan","stallion","pitbull","letmein2","roberto","ready","april","palmer","ming","shadow1","audrey","chong","clitoris","wang","shirley","fuckers","jackoff","bluesky","sundance","renegade","hollywoo","151515","bernard","wolfman","soldier","picture","pierre","ling","goddess","manager","nikita","sweety","titans","hang","fang","ficken","niners","bottom","bubble","hello123","ibanez","webster","sweetpea","stocking","323232","tornado","lindsey","content","bruce","buck","aragorn","griffin","chen","campbell","trojan","christop","newman","wayne","tina","rockstar","father","geronimo","pascal","crimson","brooks","hector","penny","anna","google","camera","chandler","fatcat","lovelove","cody","cunts","waters","stimpy","finger","cindy","wheels","viper1","latin","robin","greenday","987654321","creampie","brendan","hiphop","willy","snapper","funtime","duck","trombone","adult","cotton","cookies","kaiser","mulder","westham","latino","jeep","ravens","aurora","drizzt","madness","energy","kinky","314159","sophia","stefan","slick","rocker","55555555","freeman","french","mongoose","speed","dddddd","hong","henry","hungry","yang","catdog","cheng","ghost","gogogo","randy","tottenha","curious","butterfl","mission","january","singer","sherman","shark","techno","lancer","lalala","autumn","chichi","orion","trixie","clifford","delta","bobbob","bomber","holden","kang","kiss","1968","spunky","liquid","mary","beagle","granny","network","bond","kkkkkk","millie","1973","biggie","beetle","teacher","susan","toronto","anakin","genius","dream","cocks","dang","bush","karate","snakes","bangkok","callie","fuckyou2","pacific","daytona","kelsey","infantry","skywalke","foster","felix","sailing","raistlin","vanhalen","huang","herbert","jacob","blackie","tarzan","strider","sherlock","lang","gong","sang","dietcoke","ultimate","tree","shai","sprite","ting","artist","chai","chao","devil","python","ninja","misty","ytrewq","sweetie","superfly","456789","tian","jing","jesus1","freedom1","dian","drpepper","potter","chou","darren","hobbit","violet","yong","shen","phillip","maurice","gloria","nolimit","mylove","biscuit","yahoo","shasta","sex4me","smoker","smile","pebbles","pics","philly","tong","tintin","lesbians","marlin","cactus","frank1","tttttt","chun","danni","emerald","showme","pirates","lian","dogg","colleen","xiao","xian","tazman","tanker","patton","toshiba","richie","alberto","gotcha","graham","dillon","rang","emily","keng","jazz","bigguy","yuan","woman","tomtom","marion","greg","chaos","fossil","flight","racerx","tuan","creamy","boss","bobo","musicman","warcraft","window","blade","shuang","sheila","shun","lick","jian","microsoft","rong","allen","feng","getsome","sally","quality","kennedy","morrison","1977","beng","wwwwww","yoyoyo","zhang","seng","teddy","joanna","andreas","harder","luke","qazxsw","qian","cong","chuan","deng","nang","boeing","keeper","western","isabelle","1963","subaru","sheng","thuglife","teng","jiong","miao","martina","mang","maniac","pussie","tracey","a1b2c3","clayton","zhou","zhuang","xing","stonecol","snow","spyder","liang","jiang","memphis","regina","ceng","magic1","logitech","chuang","dark","million","blow","sesame","shao","poison","titty","terry","kuan","kuai","kyle","mian","guan","hamster","guai","ferret","florence","geng","duan","pang","maiden","quan","velvet","nong","neng","nookie","buttons","bian","bingo","biao","zhong","zeng","xiong","zhun","ying","zong","xuan","zang","0.0.000","suan","shei","shui","sharks","shang","shua","small","peng","pian","piao","liao","meng","miami","reng","guang","cang","change","ruan","diao","luan","lucas","qing","chui","chuo","cuan","nuan","ning","heng","huan","kansas","muscle","monroe","weng","whitney","1passwor","bluemoon","zhui","zhua","xiang","zheng","zhen","zhei","zhao","zhan","yomama","zhai","zhuo","zuan","tarheel","shou","shuo","tiao","lady","leonard","leng","kuang","jiao","13579","basket","qiao","qiong","qiang","chuai","nian","niao","niang","huai","22222222","bianca","zhuan","zhuai","shuan","shuai","stardust","jumper","margaret","archie","66666666","charlott","forget","qwertz","bones","history","milton","waterloo","2002","stuff","11223344","office","oldman","preston","trains","murray","vertigo","246810","black1","swallow","smiles","standard","alexandr","parrot","luther","user","nicolas","1976","surfing","pioneer","pete","masters","apple1","asdasd","auburn","hannibal","frontier","panama","lucy","buffy","brianna","welcome1","vette","blue22","shemale","111222","baggins","groovy","global","turner","181818","1979","blades","spanking","life","byteme","lobster","collins","dawg","hilton","japanese","1970","1964","2424","polo","markus","coco","deedee","mikey","1972","171717","1701","strip","jersey","green1","capital","sasha","sadie","putter","vader","seven7","lester","marcel","banshee","grendel","gilbert","dicks","dead","hidden","iloveu","1980","sound","ledzep","michel","147258","female","bugger","buffett","bryan","hell","kristina","molson","2020","wookie","sprint","thanks","jericho","102030","grace","fuckin","mandy","ranger1","trebor","deepthroat","bonehead","molly1","mirage","models","1984","2468","stuart","showtime","squirrel","pentium","mario","anime","gator","powder","twister","connect","neptune","bruno","butts","engine","eatshit","mustangs","woody1","shogun","septembe","pooh","jimbo","roger","annie","bacon","center","russian","sabine","damien","mollie","voyeur","2525","363636","leonardo","camel","chair","germany","giant","qqqq","nudist","bone","sleepy","tequila","megan","fighter","garrett","dominic","obiwan","makaveli","vacation","walnut","1974","ladybug","cantona","ccbill","satan","rusty1","passwor1","columbia","napoleon","dusty","kissme","motorola","william1","1967","zzzz","skater","smut","play","matthew1","robinson","valley","coolio","dagger","boner","bull","horndog","jason1","blake","penguins","rescue","griffey","8j4ye3uz","californ","champs","qwertyuiop","portland","queen","colt45","boat","xxxxxxx","xanadu","tacoma","mason","carpet","gggggg","safety","palace","italia","stevie","picturs","picasso","thongs","tempest","ricardo","roberts","asd123","hairy","foxtrot","gary","nimrod","hotboy","343434","1111111","asdfghjkl","goose","overlord","blood","wood","stranger","454545","shaolin","sooners","socrates","spiderman","peanuts","maxine","rogers","13131313","andrew1","filthy","donnie","ohyeah","africa","national","kenny","keith","monique","intrepid","jasmin","pickles","assass","fright","potato","darwin","hhhhhh","kingdom","weezer","424242","pepsi1","throat","romeo","gerard","looker","puppy","butch","monika","suzanne","sweets","temple","laurie","josh","megadeth","analsex","nymets","ddddddd","bigballs","support","stick","today","down","oakland","oooooo","qweasd","chucky","bridge","carrot","chargers","discover","dookie","condor","night","butler","hoover","horny1","isabella","sunrise","sinner","jojo","megapass","martini","assfuck","grateful","ffffff","abigail","esther","mushroom","janice","jamaica","wright","sims","space","there","timmy","7654321","77777","cccccc","gizmodo","roxanne","ralph","tractor","cristina","dance","mypass","hongkong","helena","1975","blue123","pissing","thomas1","redred","rich","basketball","attack","cash","satan666","drunk","dixie","dublin","bollox","kingkong","katrina","miles","1971","22222","272727","sexx","penelope","thompson","anything","bbbb","battle","grizzly","passat","porter","tracy","defiant","bowler","knickers","monitor","wisdom","wild","slappy","thor","letsgo","robert1","feet","rush","brownie","hudson","098765","playing","playtime","lightnin","melvin","atomic","bart","hawk","goku","glory","llllll","qwaszx","cosmos","bosco","knights","bentley","beast","slapshot","lewis","assword","frosty","gillian","sara","dumbass","mallard","dddd","deanna","elwood","wally","159357","titleist","angelo","aussie","guest","golfing","doobie","loveit","chloe","elliott","werewolf","vipers","janine","1965","blabla","surf","sucking","tardis","serena","shelley","thegame","legion","rebels","fernando","fast","gerald","sarah1","double","onelove","loulou","toto","crash","blackcat","0007","tacobell","soccer1","jedi","manuel","method","river","chase","ludwig","poopie","derrick","boob","breast","kittycat","isabel","belly","pikachu","thunder1","thankyou","jose","celeste","celtics","frances","frogger","scoobydo","sabbath","coltrane","budman","willis","jackal","bigger","zzzzz","silvia","sooner","licking","gopher","geheim","lonestar","primus","pooper","newpass","brasil","heather1","husker","element","moomoo","beefcake","zzzzzzzz","tammy","shitty","smokin","personal","jjjj","anthony1","anubis","backup","gorilla","fuckface","painter","lowrider","punkrock","traffic","claude","daniela","dale","delta1","nancy","boys","easy","kissing","kelley","wendy","theresa","amazon","alan","fatass","dodgeram","dingdong","malcolm","qqqqqqqq","breasts","boots","honda1","spidey","poker","temp","johnjohn","miguel","147852","archer","asshole1","dogdog","tricky","crusader","weather","syracuse","spankme","speaker","meridian","amadeus","back","harley1","falcons","dorothy","turkey50","kenwood","keyboard","ilovesex","1978","blackman","shazam","shalom","lickit","jimbob","richmond","roller","carson","check","fatman","funny","garbage","sandiego","loving","magnus","cooldude","clover","mobile","bell","payton","plumber","texas1","tool","topper","jenna","mariners","rebel","harmony","caliente","celica","fletcher","german","diana","oxford","osiris","orgasm","punkin","porsche9","tuesday","close","breeze","bossman","kangaroo","billie","latinas","judith","astros","scruffy","donna","qwertyu","davis","hearts","kathy","jammer","java","springer","rhonda","ricky","1122","goodtime","chelsea1","freckles","flyboy","doodle","city","nebraska","bootie","kicker","webmaster","vulcan","iverson","191919","blueeyes","stoner","321321","farside","rugby","director","pussy69","power1","bobbie","hershey","hermes","monopoly","west","birdman","blessed","blackjac","southern","peterpan","thumbs","lawyer","melinda","fingers","fuckyou1","rrrrrr","a1b2c3d4","coke","nicola","bohica","heart","elvis1","kids","blacky","stories","sentinel","snake1","phoebe","jesse","richard1","1234abcd","guardian","candyman","fisting","scarlet","dildo","pancho","mandingo","lucky7","condom","munchkin","billyboy","summer1","student","sword","skiing","sergio","site","sony","thong","rootbeer","assassin","cassidy","frederic","fffff","fitness","giovanni","scarlett","durango","postal","achilles","dawn","dylan","kisses","warriors","imagine","plymouth","topdog","asterix","hallo","cameltoe","fuckfuck","bridget","eeeeee","mouth","weird","will","sithlord","sommer","toby","theking","juliet","avenger","backdoor","goodbye","chevrole","faith","lorraine","trance","cosworth","brad","houses","homers","eternity","kingpin","verbatim","incubus","1961","blond","zaphod","shiloh","spurs","station","jennie","maynard","mighty","aliens","hank","charly","running","dogman","omega1","printer","aggies","chocolate","deadhead","hope","javier","bitch1","stone55","pineappl","thekid","lizzie","rockets","ashton","camels","formula","forrest","rosemary","oracle","rain","pussey","porkchop","abcde","clancy","nellie","mystic","inferno","blackdog","steve1","pauline","alexander","alice","alfa","grumpy","flames","scream","lonely","puffy","proxy","valhalla","unreal","cynthia","herbie","engage","yyyyyy","010101","solomon","pistol","melody","celeb","flying","gggg","santiago","scottie","oakley","portugal","a12345","newbie","mmmm","venus","1qazxsw2","beverly","zorro","work","writer","stripper","sebastia","spread","phil","tobias","links","members","metal","1221","andre","565656","funfun","trojans","again","cyber","hurrican","moneys","1x2zkg8w","zeus","thing","tomato","lion","atlantic","celine","usa123","trans","account","aaaaaaa","homerun","hyperion","kevin1","blacks","44444444","skittles","sean","hastings","fart","gangbang","fubar","sailboat","older","oilers","craig","conrad","church","damian","dean","broken","buster1","hithere","immortal","sticks","pilot","peters","lexmark","jerkoff","maryland","anders","cheers","possum","columbus","cutter","muppet","beautiful","stolen","swordfish","sport","sonic","peter1","jethro","rockon","asdfghj","pass123","paper","pornos","ncc1701a","bootys","buttman","bonjour","escape","1960","becky","bears","362436","spartans","tinman","threesom","lemons","maxmax","1414","bbbbb","camelot","chad","chewie","gogo","fusion","saint","dilligaf","nopass","myself","hustler","hunter1","whitey","beast1","yesyes","spank","smudge","pinkfloy","patriot","lespaul","annette","hammers","catalina","finish","formula1","sausage","scooter1","orioles","oscar1","over","colombia","cramps","natural","eating","exotic","iguana","bella","suckers","strong","sheena","start","slave","pearl","topcat","lancelot","angelica","magelan","racer","ramona","crunch","british","button","eileen","steph","456123","skinny","seeking","rockhard","chief","filter","first","freaks","sakura","pacman","poontang","dalton","newlife","homer1","klingon","watcher","walleye","tasha","tasty","sinatra","starship","steel","starbuck","poncho","amber1","gonzo","grover","catherin","carol","candle","firefly","goblin","scotch","diver","usmc","huskies","eleven","kentucky","kitkat","israel","beckham","bicycle","yourmom","studio","tara","33333333","shane","splash","jimmy1","reality","12344321","caitlin","focus","sapphire","mailman","raiders1","clark","ddddd","hopper","excalibu","more","wilbur","illini","imperial","phillips","lansing","maxx","gothic","golfball","carlton","camille","facial","front242","macdaddy","qwer1234","vectra","cowboys1","crazy1","dannyboy","jane","betty","benny","bennett","leader","martinez","aquarius","barkley","hayden","caught","franky","ffff","floyd","sassy","pppp","pppppppp","prodigy","clarence","noodle","eatpussy","vortex","wanking","beatrice","billy1","siemens","pedro","phillies","research","groups","carolyn","chevy1","cccc","fritz","gggggggg","doughboy","dracula","nurses","loco","madrid","lollipop","trout","utopia","chrono","cooler","conner","nevada","wibble","werner","summit","marco","marilyn","1225","babies","capone","fugazi","panda","mama","qazwsxed","puppies","triton","9876","command","nnnnnn","ernest","momoney","iforgot","wolfie","studly","shawn","renee","alien","hamburg","81fukkc","741852","catman","china","forgot","gagging","scott1","drew","oregon","qweqwe","train","crazybab","daniel1","cutlass","brothers","holes","heidi","mothers","music1","what","walrus","1957","bigtime","bike","xtreme","simba","ssss","rookie","angie","bathing","fresh","sanchez","rotten","maestro","luis","look","turbo1","99999","butthole","hhhh","elijah","monty","bender","yoda","shania","shock","phish","thecat","rightnow","reagan","baddog","asia","greatone","gateway1","randall","abstr","napster","brian1","bogart","high","hitler","emma","kill","weaver","wildfire","jackson1","isaiah","1981","belinda","beaner","yoyo","0.0.0.000","super1","select","snuggles","slutty","some","phoenix1","technics","toon","raven1","rayray","123789","1066","albion","greens","fashion","gesperrt","santana","paint","powell","credit","darling","mystery","bowser","bottle","brucelee","hehehe","kelly1","mojo","1998","bikini","woofwoof","yyyy","strap","sites","spears","theodore","julius","richards","amelia","central","f**k","nyjets","punisher","username","vanilla","twisted","bryant","brent","bunghole","here","elizabeth","erica","kimber","viagra","veritas","pony","pool","titts","labtec","lifetime","jenny1","masterbate","mayhem","redbull","govols","gremlin","505050","gmoney","rupert","rovers","diamond1","lorenzo","trident","abnormal","davidson","deskjet","cuddles","nice","bristol","karina","milano","vh5150","jarhead","1982","bigbird","bizkit","sixers","slider","star69","starfish","penetration","tommy1","john316","meghan","michaela","market","grant","caligula","carl","flicks","films","madden","railroad","cosmo","cthulhu","bradford","br0d3r","military","bearbear","swedish","spawn","patrick1","polly","these","todd","reds","anarchy","groove","franco","fuckher","oooo","tyrone","vegas","airbus","cobra1","christine","clips","delete","duster","kitty1","mouse1","monkeys","jazzman","1919","262626","swinging","stroke","stocks","sting","pippen","labrador","jordan1","justdoit","meatball","females","saturday","park","vector","cooter","defender","desert","demon","nike","bubbas","bonkers","english","kahuna","wildman","4121","sirius","static","piercing","terror","teenage","leelee","marissa","microsof","mechanic","robotech","rated","hailey","chaser","sanders","salsero","nuts","macross","quantum","rachael","tsunami","universe","daddy1","cruise","nguyen","newpass6","nudes","hellyeah","vernon","1959","zaq12wsx","striker","sixty","steele","spice","spectrum","smegma","thumb","jjjjjjjj","mellow","astrid","cancun","cartoon","sabres","samiam","pants","oranges","oklahoma","lust","coleman","denali","nude","noodles","buzz","brest","hooter","mmmmmmmm","warthog","bloody","blueblue","zappa","wolverine","sniffing","lance","jean","jjjjj","harper","calico","freee","rover","door","pooter","closeup","bonsai","evelyn","emily1","kathryn","keystone","iiii","1955","yzerman","theboss","tolkien","jill","megaman","rasta","bbbbbbbb","bean","handsome","hal9000","goofy","gringo","gofish","gizmo1","samsam","scuba","onlyme","tttttttt","corrado","clown","clapton","deborah","boris","bulls","vivian","jayhawk","bethany","wwww","sharky","seeker","ssssssss","somethin","pillow","thesims","lighter","lkjhgf","melissa1","marcius2","barry","guiness","gymnast","casey1","goalie","godsmack","doug","lolo","rangers1","poppy","abby","clemson","clipper","deeznuts","nobody","holly1","elliot","eeee","kingston","miriam","belle","yosemite","sucked","sex123","sexy69","pic's","tommyboy","lamont","meat","masterbating","marianne","marc","gretzky","happyday","frisco","scratch","orchid","orange1","manchest","quincy","unbelievable","aberdeen","dawson","nathalie","ne1469","boxing","hill","korn","intercourse","161616","1985","ziggy","supersta","stoney","senior","amature","barber","babyboy","bcfields","goliath","hack","hardrock","children","frodo","scout","scrappy","rosie","qazqaz","tracker","active","craving","commando","cohiba","deep","cyclone","dana","bubba69","katie1","mpegs","vsegda","jade","irish1","better","sexy1","sinclair","smelly","squerting","lions","jokers","jeanette","julia","jojojo","meathead","ashley1","groucho","cheetah","champ","firefox","gandalf1","packer","magnolia","love69","tyler1","typhoon","tundra","bobby1","kenworth","village","volley","beth","wolf359","0420","000007","swimmer","skydive","smokes","patty","peugeot","pompey","legolas","kristy","redhot","rodman","redalert","having","grapes","4runner","carrera","floppy","dollars","ou8122","quattro","adams","cloud9","davids","nofear","busty","homemade","mmmmm","whisper","vermont","webmaste","wives","insertion","jayjay","philips","phone","topher","tongue","temptress","midget","ripken","havefun","gretchen","canon","celebrity","five","getting","ghetto","direct","otto","ragnarok","trinidad","usnavy","conover","cruiser","dalshe","nicole1","buzzard","hottest","kingfish","misfit","moore","milfnew","warlord","wassup","bigsexy","blackhaw","zippy","shearer","tights","thursday","kungfu","labia","journey","meatloaf","marlene","rider","area51","batman1","bananas","636363","cancel","ggggg","paradox","mack","lynn","queens","adults","aikido","cigars","nova","hoosier","eeyore","moose1","warez","interacial","streaming","313131","pertinant","pool6123","mayday","rivers","revenge","animated","banker","baddest","gordon24","ccccc","fortune","fantasies","touching","aisan","deadman","homepage","ejaculation","whocares","iscool","jamesbon","1956","1pussy","womam","sweden","skidoo","spock","sssss","petra","pepper1","pinhead","micron","allsop","amsterda","army","aside","gunnar","666999","chip","foot","fowler","february","face","fletch","george1","sapper","science","sasha1","luckydog","lover1","magick","popopo","public","ultima","derek","cypress","booker","businessbabe","brandon1","edwards","experience","vulva","vvvv","jabroni","bigbear","yummy","010203","searay","secret1","showing","sinbad","sexxxx","soleil","software","piccolo","thirteen","leopard","legacy","jensen","justine","memorex","marisa","mathew","redwing","rasputin","134679","anfield","greenbay","gore","catcat","feather","scanner","pa55word","contortionist","danzig","daisy1","hores","erik","exodus","vinnie","iiiiii","zero","1001","subway","tank","second","snapple","sneakers","sonyfuck","picks","poodle","test1234","their","llll","junebug","june","marker","mellon","ronaldo","roadkill","amanda1","asdfjkl","beaches","greene","great1","cheerleaers","force","doitnow","ozzy","madeline","radio","tyson","christian","daphne","boxster","brighton","housewifes","emmanuel","emerson","kkkk","mnbvcx","moocow","vides","wagner","janet","1717","bigmoney","blonds","1000","storys","stereo","4545","420247","seductive","sexygirl","lesbean","live","justin1","124578","animals","balance","hansen","cabbage","canadian","gangbanged","dodge1","dimas","lori","loud","malaka","puss","probes","adriana","coolman","crawford","dante","nacked","hotpussy","erotica","kool","mirror","wearing","implants","intruder","bigass","zenith","woohoo","womans","tanya","tango","stacy","pisces","laguna","krystal","maxell","andyod22","barcelon","chainsaw","chickens","flash1","downtown","orgasms","magicman","profit","pusyy","pothead","coconut","chuckie","contact","clevelan","designer","builder","budweise","hotshot","horizon","hole","experienced","mondeo","wifes","1962","strange","stumpy","smiths","sparks","slacker","piper","pitchers","passwords","laptop","jeremiah","allmine","alliance","bbbbbbb","asscock","halflife","grandma","hayley","88888","cecilia","chacha","saratoga","sandy1","santos","doogie","number","positive","qwert40","transexual","crow","close-up","darrell","bonita","ib6ub9","volvo","jacob1","iiiii","beastie","sunnyday","stoned","sonics","starfire","snapon","pictuers","pepe","testing1","tiberius","lisalisa","lesbain","litle","retard","ripple","austin1","badgirl","golfgolf","flounder","garage","royals","dragoon","dickie","passwor","ocean","majestic","poppop","trailers","dammit","nokia","bobobo","br549","emmitt","knock","minime","mikemike","whitesox","1954","3232","353535","seamus","solo","sparkle","sluttey","pictere","titten","lback","1024","angelina","goodluck","charlton","fingerig","gallaries","goat","ruby","passme","oasis","lockerroom","logan1","rainman","twins","treasure","absolutely","club","custom","cyclops","nipper","bucket","homepage-","hhhhh","momsuck","indain","2345","beerbeer","bimmer","susanne","stunner","stevens","456456","shell","sheba","tootsie","tiny","testerer","reefer","really","1012","harcore","gollum","545454","chico","caveman","carole","fordf150","fishes","gaymen","saleen","doodoo","pa55w0rd","looney","presto","qqqqq","cigar","bogey","brewer","helloo","dutch","kamikaze","monte","wasser","vietnam","visa","japanees","0123","swords","slapper","peach","jump","marvel","masterbaiting","march","redwood","rolling","1005","ametuer","chiks","cathy","callaway","fucing","sadie1","panasoni","mamas","race","rambo","unknown","absolut","deacon","dallas1","housewife","kristi","keywest","kirsten","kipper","morning","wings","idiot","18436572","1515","beating","zxczxc","sullivan","303030","shaman","sparrow","terrapin","jeffery","masturbation","mick","redfish","1492","angus","barrett","goirish","hardcock","felicia","forfun","galary","freeporn","duchess","olivier","lotus","pornographic","ramses","purdue","traveler","crave","brando","enter1","killme","moneyman","welder","windsor","wifey","indon","yyyyy","stretch","taylor1","4417","shopping","picher","pickup","thumbnils","johnboy","jets","jess","maureen","anne","ameteur","amateurs","apollo13","hambone","goldwing","5050","charley","sally1","doghouse","padres","pounding","quest","truelove","underdog","trader","crack","climber","bolitas","bravo","hohoho","model","italian","beanie","beretta","wrestlin","stroker","tabitha","sherwood","sexyman","jewels","johannes","mets","marcos","rhino","bdsm","balloons","goodman","grils","happy123","flamingo","games","route66","devo","dino","outkast","paintbal","magpie","llllllll","twilight","critter","christie","cupcake","nickel","bullseye","krista","knickerless","mimi","murder","videoes","binladen","xerxes","slim","slinky","pinky","peterson","thanatos","meister","menace","ripley","retired","albatros","balloon","bank","goten","5551212","getsdown","donuts","divorce","nwo4life","lord","lost","underwear","tttt","comet","deer","damnit","dddddddd","deeznutz","nasty1","nonono","nina","enterprise","eeeee","misfit99","milkman","vvvvvv","isaac","1818","blueboy","beans","bigbutt","wyatt","tech","solution","poetry","toolman","laurel","juggalo","jetski","meredith","barefoot","50spanks","gobears","scandinavian","original","truman","cubbies","nitram","briana","ebony","kings","warner","bilbo","yumyum","zzzzzzz","stylus","321654","shannon1","server","secure","silly","squash","starman","steeler","staples","phrases","techniques","laser","135790","allan","barker","athens","cbr600","chemical","fester","gangsta","fucku2","freeze","game","salvador","droopy","objects","passwd","lllll","loaded","louis","manchester","losers","vedder","clit","chunky","darkman","damage","buckshot","buddah","boobed","henti","hillary","webber","winter1","ingrid","bigmike","beta","zidane","talon","slave1","pissoff","person","thegreat","living","lexus","matador","readers","riley","roberta","armani","ashlee","goldstar","5656","cards","fmale","ferris","fuking","gaston","fucku","ggggggg","sauron","diggler","pacers","looser","pounded","premier","pulled","town","trisha","triangle","cornell","collin","cosmic","deeper","depeche","norway","bright","helmet","kristine","kendall","mustard","misty1","watch","jagger","bertie","berger","word","3x7pxr","silver1","smoking","snowboar","sonny","paula","penetrating","photoes","lesbens","lambert","lindros","lillian","roadking","rockford","1357","143143","asasas","goodboy","898989","chicago1","card","ferrari1","galeries","godfathe","gawker","gargoyle","gangster","rubble","rrrr","onetime","pussyman","pooppoop","trapper","twenty","abraham","cinder","company","newcastl","boricua","bunny1","boxer","hotred","hockey1","hooper","edward1","evan","kris","misery","moscow","milk","mortgage","bigtit","show","snoopdog","three","lionel","leanne","joshua1","july","1230","assholes","cedric","fallen","farley","gene","frisky","sanity","script","divine","dharma","lucky13","property","tricia","akira","desiree","broadway","butterfly","hunt","hotbox","hootie","heat","howdy","earthlink","karma","kiteboy","motley","westwood","1988","bert","blackbir","biggles","wrench","working","wrestle","slippery","pheonix","penny1","pianoman","tomorrow","thedude","jenn","jonjon","jones1","mattie","memory","micheal","roadrunn","arrow","attitude","azzer","seahawks","diehard","dotcom","lola","tunafish","chivas","cinnamon","clouds","deluxe","northern","nuclear","north","boom","boobie","hurley","krishna","momomo","modles","volume","23232323","bluedog","wwwwwww","zerocool","yousuck","pluto","limewire","link","joung","marcia","awnyce","gonavy","haha","films+pic+galeries","fabian","francois","girsl","fuckthis","girfriend","rufus","drive","uncencored","a123456","airport","clay","chrisbln","combat","cygnus","cupoi","never","netscape","brett","hhhhhhhh","eagles1","elite","knockers","kendra","mommy","1958","tazmania","shonuf","piano","pharmacy","thedog","lips","jillian","jenkins","midway","arsenal1","anaconda","australi","gromit","gotohell","787878","66666","carmex2","camber","gator1","ginger1","fuzzy","seadoo","dorian","lovesex","rancid","uuuuuu","911911","nature","bulldog1","helen","health","heater","higgins","kirk","monalisa","mmmmmmm","whiteout","virtual","ventura","jamie1","japanes","james007","2727","2469","blam","bitchass","believe","zephyr","stiffy","sweet1","silent","southpar","spectre","tigger1","tekken","lenny","lakota","lionking","jjjjjjj","medical","megatron","1369","hawaiian","gymnastic","golfer1","gunners","7779311","515151","famous","glass","screen","rudy","royal","sanfran","drake","optimus","panther1","love1","mail","maggie1","pudding","venice","aaron1","delphi","niceass","bounce","busted","house1","killer1","miracle","momo","musashi","jammin","2003","234567","wp2003wp","submit","silence","sssssss","state","spikes","sleeper","passwort","toledo","kume","media","meme","medusa","mantis","remote","reading","reebok","1017","artemis","hampton","harry1","cafc91","fettish","friendly","oceans","oooooooo","mango","ppppp","trainer","troy","uuuu","909090","cross","death1","news","bullfrog","hokies","holyshit","eeeeeee","mitch","jasmine1","&amp","&amp;","sergeant","spinner","leon","jockey","records","right","babyblue","hans","gooner","474747","cheeks","cars","candice","fight","glow","pass1234","parola","okokok","pablo","magical","major","ramsey","poseidon","989898","confused","circle","crusher","cubswin","nnnn","hollywood","erin","kotaku","milo","mittens","whatsup","vvvvv","iomega","insertions","bengals","bermuda","biit","yellow1","012345","spike1","south","sowhat","pitures","peacock","pecker","theend","juliette","jimmie","romance","augusta","hayabusa","hawkeyes","castro","florian","geoffrey","dolly","lulu","qaz123","usarmy","twinkle","cloud","chuckles","cold","hounddog","hover","hothot","europa","ernie","kenshin","kojak","mikey1","water1","196969","because","wraith","zebra","wwwww","33333","simon1","spider1","snuffy","philippe","thunderb","teddy1","lesley","marino13","maria1","redline","renault","aloha","antoine","handyman","cerberus","gamecock","gobucks","freesex","duffman","ooooo","papa","nuggets","magician","longbow","preacher","porno1","county","chrysler","contains","dalejr","darius","darlene","dell","navy","buffy1","hedgehog","hoosiers","honey1","hott","heyhey","europe","dutchess","everest","wareagle","ihateyou","sunflowe","3434","senators","shag","spoon","sonoma","stalker","poochie","terminal","terefon","laurence","maradona","maryann","marty","roman","1007","142536","alibaba","america1","bartman","astro","goth","century","chicken1","cheater","four","ghost1","passpass","oral","r2d2c3po","civic","cicero","myxworld","kkkkk","missouri","wishbone","infiniti","jameson","1a2b3c","1qwerty","wonderboy","skip","shojou","stanford","sparky1","smeghead","poiuy","titanium","torres","lantern","jelly","jeanne","meier","1213","bayern","basset","gsxr750","cattle","charlene","fishing1","fullmoon","gilles","dima","obelix","popo","prissy","ramrod","unique","absolute","bummer","hotone","dynasty","entry","konyor","missy1","moses","282828","yeah","xyz123","stop","426hemi","404040","seinfeld","simmons","pingpong","lazarus","matthews","marine1","manning","recovery","12345a","beamer","babyface","greece","gustav","7007","charity","camilla","ccccccc","faggot","foxy","frozen","gladiato","duckie","dogfood","paranoid","packers1","longjohn","radical","tuna","clarinet","claudio","circus","danny1","novell","nights","bonbon","kashmir","kiki","mortimer","modelsne","moondog","monaco","vladimir","insert","1953","zxc123","supreme","3131","sexxx","selena","softail","poipoi","pong","together","mars","martin1","rogue","alone","avalanch","audia4","55bgates","cccccccc","chick","came11","figaro","geneva","dogboy","dnsadm","dipshit","paradigm","othello","operator","officer","malone","post","rafael","valencia","tripod","choice","chopin","coucou","coach","cocksuck","common","creature","borussia","book","browning","heritage","hiziad","homerj","eight","earth","millions","mullet","whisky","jacques","store","4242","speedo","starcraf","skylar","spaceman","piggy","pierce","tiger2","legos","lala","jezebel","judy","joker1","mazda","barton","baker","727272","chester1","fishman","food","rrrrrrrr","sandwich","dundee","lumber","magazine","radar","ppppppp","tranny","aaliyah","admiral","comics","cleo","delight","buttfuck","homeboy","eternal","kilroy","kellie","khan","violin","wingman","walmart","bigblue","blaze","beemer","beowulf","bigfish","yyyyyyy","woodie","yeahbaby","0123456","tbone","style","syzygy","starter","lemon","linda1","merlot","mexican","11235813","anita","banner","bangbang","badman","barfly","grease","carla","charles1","ffffffff","screw","doberman","diane","dogshit","overkill","counter","coolguy","claymore","demons","demo","nomore","normal","brewster","hhhhhhh","hondas","iamgod","enterme","everett","electron","eastside","kayla","minimoni","mybaby","wildbill","wildcard","ipswich","200000","bearcat","zigzag","yyyyyyyy","xander","sweetnes","369369","skyler","skywalker","pigeon","peyton","tipper","lilly","asdf123","alphabet","asdzxc","babybaby","banane","barnes","guyver","graphics","grand","chinook","florida1","flexible","fuckinside","otis","ursitesux","tototo","trust","tower","adam12","christma","corey","chrome","buddie","bombers","bunker","hippie","keegan","misfits","vickie","292929","woofer","wwwwwwww","stubby","sheep","secrets","sparta","stang","spud","sporty","pinball","jorge","just4fun","johanna","maxxxx","rebecca1","gunther","fatima","fffffff","freeway","garion","score","rrrrr","sancho","outback","maggot","puddin","trial","adrienne","987456","colton","clyde","brain","brains","hoops","eleanor","dwayne","kirby","mydick","villa","19691969","bigcat","becker","shiner","silverad","spanish","templar","lamer","juicy","marsha","mike1","maximum","rhiannon","real","1223","10101010","arrows","andres","alucard","baldwin","baron","avenue","ashleigh","haggis","channel","cheech","safari","ross","dog123","orion1","paloma","qwerasdf","presiden","vegitto","trees","969696","adonis","colonel","cookie1","newyork1","brigitte","buddyboy","hellos","heineken","dwight","eraser","kerstin","motion","moritz","millwall","visual","jaybird","1983","beautifu","bitter","yvette","zodiac","steven1","sinister","slammer","smashing","slick1","sponge","teddybea","theater","this","ticklish","lipstick","jonny","massage","mann","reynolds","ring","1211","amazing","aptiva","applepie","bailey1","guitar1","chanel","canyon","gagged","fuckme1","rough","digital1","dinosaur","punk","98765","90210","clowns","cubs","daniels","deejay","nigga","naruto","boxcar","icehouse","hotties","electra","kent","widget","india","insanity","1986","2004","best","bluefish","bingo1","*****","stratus","strength","sultan","storm1","44444","4200","sentnece","season","sexyboy","sigma","smokie","spam","point","pippo","ticket","temppass","joel","manman","medicine","1022","anton","almond","bacchus","aztnm","axio","awful","bamboo","hakr","gregor","hahahaha","5678","casanova","caprice","camero1","fellow","fountain","dupont","dolphin1","dianne","paddle","magnet","qwert1","pyon","porsche1","tripper","vampires","coming","noway","burrito","bozo","highheel","hughes","hookem","eddie1","ellie","entropy","kkkkkkkk","kkkkkkk","illinois","jacobs","1945","1951","24680","21212121","100000","stonecold","taco","subzero","sharp","sexxxy","skolko","shanna","skyhawk","spurs1","sputnik","piazza","testpass","letter","lane","kurt","jiggaman","matilda","1224","harvard","hannah1","525252","4ever","carbon","chef","federico","ghosts","gina","scorpio1","rt6ytere","madison1","loki","raquel","promise","coolness","christina","coldbeer","citadel","brittney","highway","evil","monarch","morgan1","washingt","1997","bella1","berry","yaya","yolanda","superb","taxman","studman","stephanie","3636","sherri","sheriff","shepherd","poland","pizzas","tiffany1","toilet","latina","lassie","larry1","joseph1","mephisto","meagan","marian","reptile","rico","razor","1013","barron","hammer1","gypsy","grande","carroll","camper","chippy","cat123","call","chimera","fiesta","glock","glenn","domain","dieter","dragonba","onetwo","nygiants","odessa","password2","louie","quartz","prowler","prophet","towers","ultra","cocker","corleone","dakota1","cumm","nnnnnnn","natalia","boxers","hugo","heynow","hollow","iceberg","elvira","kittykat","kate","kitchen","wasabi","vikings1","impact","beerman","string","sleep","splinter","snoopy1","pipeline","pocket","legs","maple","mickey1","manuela","mermaid","micro","meowmeow","redbird","alisha","baura","battery","grass","chevys","chestnut","caravan","carina","charmed","fraser","frogman","diving","dogger","draven","drifter","oatmeal","paris1","longdong","quant4307s","rachel1","vegitta","cole","cobras","corsair","dadada","noelle","mylife","nine","bowwow","body","hotrats","eastwood","moonligh","modena","wave","illusion","iiiiiii","jayhawks","birgit","zone","sutton","susana","swingers","shocker","shrimp","sexgod","squall","stefanie","squeeze","soul","patrice","poiu","players","tigers1","toejam","tickler","line","julie1","jimbo1","jefferso","juanita","michael2","rodeo","robot","1023","annie1","bball","guess","happy2","charter","farm","flasher","falcon1","fiction","fastball","gadget","scrabble","diaper","dirtbike","dinner","oliver1","partner","paco","lucille","macman","poopy","popper","postman","ttttttt","ursula","acura","cowboy1","conan","daewoo","cyrus","customer","nation","nemrac58","nnnnn","nextel","bolton","bobdylan","hopeless","eureka","extra","kimmie","kcj9wx5n","killbill","musica","volkswag","wage","windmill","wert","vintage","iloveyou1","itsme","bessie","zippo","311311","starligh","smokey1","spot","snappy","soulmate","plasma","thelma","tonight","krusty","just4me","mcdonald","marius","rochelle","rebel1","1123","alfredo","aubrey","audi","chantal","fick","goaway","roses","sales","rusty2","dirt","dogbone","doofus","ooooooo","oblivion","mankind","luck","mahler","lllllll","pumper","puck","pulsar","valkyrie","tupac","compass","concorde","costello","cougars","delaware","niceguy","nocturne","bob123","boating","bronze","hopkins","herewego","hewlett","houhou","hubert","earnhard","eeeeeeee","keller","mingus","mobydick","venture","verizon","imation","1950","1948","1949","223344","bigbig","blossom","zack","wowwow","sissy","skinner","spiker","square","snooker","sluggo","player1","junk","jeannie","jsbach","jumbo","jewel","medic","robins","reddevil","reckless","123456a","1125","1031","beacon","astra","gumby","hammond","hassan","757575","585858","chillin","fuck1","sander","lowell","radiohea","upyours","trek","courage","coolcool","classics","choochoo","darryl","nikki1","nitro","bugs","boytoy","ellen","excite","kirsty","kane","wingnut","wireless","icu812","1master","beatle","bigblock","blanca","wolfen","summer99","sugar1","tartar","sexysexy","senna","sexman","sick","someone","soprano","pippin","platypus","pixies","telephon","land","laura1","laurent","rimmer","road","report","1020","12qwaszx","arturo","around","hamish","halifax","fishhead","forum","dododo","doit","outside","paramedi","lonesome","mandy1","twist","uuuuu","uranus","ttttt","butcher","bruce1","helper","hopeful","eduard","dusty1","kathy1","katherin","moonbeam","muscles","monster1","monkeybo","morton","windsurf","vvvvvvv","vivid","install","1947","187187","1941","1952","tatiana","susan1","31415926","sinned","sexxy","senator","sebastian","shadows","smoothie","snowflak","playstat","playa","playboy1","toaster","jerry1","marie1","mason1","merlin1","roger1","roadster","112358","1121","andrea1","bacardi","auto","hardware","hardy","789789","5555555","captain1","flores","fergus","sascha","rrrrrrr","dome","onion","nutter","lololo","qqqqqqq","quick","undertak","uuuuuuuu","uuuuuuu","criminal","cobain","cindy1","coors","dani","descent","nimbus","nomad","nanook","norwich","bomb","bombay","broker","hookup","kiwi","winners","jackpot","1a2b3c4d","1776","beardog","bighead","blast","bird33","0987","stress","shot","spooge","pelican","peepee","perry","pointer","titan","thedoors","jeremy1","annabell","altima","baba","hallie","hate","hardone","5454","candace","catwoman","flip","faithful","finance","farmboy","farscape","genesis1","salomon","destroy","papers","option","page","loser1","lopez","r2d2","pumpkins","training","chriss","cumcum","ninjas","ninja1","hung","erika","eduardo","killers","miller1","islander","jamesbond","intel","jarvis","19841984","2626","bizzare","blue12","biker","yoyoma","sushi","styles","shitface","series","shanti","spanker","steffi","smart","sphinx","please1","paulie","pistons","tiburon","limited","maxwell1","mdogg","rockies","armstron","alexia","arlene","alejandr","arctic","banger","audio","asimov","augustus","grandpa","753951","4you","chilly","care1839","chapman","flyfish","fantasia","freefall","santa","sandrine","oreo","ohshit","macbeth","madcat","loveya","mallory","rage","quentin","qwerqwer","project","ramirez","colnago","citizen","chocha","cobalt","crystal1","dabears","nevets","nineinch","broncos1","helene","huge","edgar","epsilon","easter","kestrel","moron","virgil","winston1","warrior1","iiiiiiii","iloveyou2","1616","beat","bettina","woowoo","zander","straight","shower","sloppy","specialk","tinkerbe","jellybea","reader","romero","redsox1","ride","1215","1112","annika","arcadia","answer","baggio","base","guido","555666","carmel","cayman","cbr900rr","chips","gabriell","gertrude","glennwei","roxy","sausages","disco","pass1","luna","lovebug","macmac","queenie","puffin","vanguard","trip","trinitro","airwolf","abbott","aaa111","cocaine","cisco","cottage","dayton","deadly","datsun","bricks","bumper","eldorado","kidrock","wizard1","whiskers","wind","wildwood","istheman","interest","italy","25802580","benoit","bigones","woodland","wolfpac","strawber","suicide","3030","sheba1","sixpack","peace1","physics","pearson","tigger2","toad","megan1","meow","ringo","roll","amsterdam","717171","686868","5424","catherine","canuck","football1","footjob","fulham","seagull","orgy","lobo","mancity","truth","trace","vancouve","vauxhall","acidburn","derf","myspace1","boozer","buttercu","howell","hola","easton","minemine","munch","jared","1dragon","biology","bestbuy","bigpoppa","blackout","blowfish","bmw325","bigbob","stream","talisman","tazz","sundevil","3333333","skate","shutup","shanghai","shop","spencer1","slowhand","polish","pinky1","tootie","thecrow","leroy","jonathon","jubilee","jingle","martine","matrix1","manowar","michaels","messiah","mclaren","resident","reilly","redbaron","rollins","romans","return","rivera","andromed","athlon","beach1","badgers","guitars","harald","harddick","gotribe","6996","7grout","5wr2i7h8","635241","chase1","carver","charlotte","fallout","fiddle","fredrick","fenris","francesc","fortuna","ferguson","fairlane","felipe","felix1","forward","gasman","frost","fucks","sahara","sassy1","dogpound","dogbert","divx1","manila","loretta","priest","pornporn","quasar","venom","987987","access1","clippers","daylight","decker","daman","data","dentist","crusty","nathan1","nnnnnnnn","bruno1","bucks","brodie","budapest","kittens","kerouac","mother1","waldo1","wedding","whistler","whatwhat","wanderer","idontkno","1942","1946","bigdawg","bigpimp","zaqwsx","414141","3000gt","434343","shoes","serpent","starr","smurf","pasword","tommie","thisisit","lake","john1","robotics","redeye","rebelz","1011","alatam","asses","asians","bama","banzai","harvest","gonzalez","hair","hanson","575757","5329","cascade","chinese","fatty","fender1","flower2","funky","sambo","drummer1","dogcat","dottie","oedipus","osama","macleod","prozac","private1","rampage","punch","presley","concord","cook","cinema","cornwall","cleaner","christopher","ciccio","corinne","clutch","corvet07","daemon","bruiser","boiler","hjkl","eyes","egghead","expert","ethan","kasper","mordor","wasted","jamess","iverson3","bluesman","zouzou","090909","1002","switch","stone1","4040","sisters","sexo","shawna","smith1","sperma","sneaky","polska","thewho","terminat","krypton","lawson","library","lekker","jules","johnson1","johann","justus","rockie","romano","aspire","bastards","goodie","cheese1","fenway","fishon","fishin","fuckoff1","girls1","sawyer","dolores","desmond","duane","doomsday","pornking","ramones","rabbits","transit","aaaaa1","clock","delilah","noel","boyz","bookworm","bongo","bunnies","brady","buceta","highbury","henry1","heels","eastern","krissy","mischief","mopar","ministry","vienna","weston","wildone","vodka","jayson","bigbooty","beavis1","betsy","xxxxxx1","yogibear","000001","0815","zulu","420000","september","sigmar","sprout","stalin","peggy","patch","lkjhgfds","lagnaf","rolex","redfox","referee","123123123","1231","angus1","ariana","ballin","attila","hall","greedy","grunt","747474","carpedie","cecile","caramel","foxylady","field","gatorade","gidget","futbol","frosch","saiyan","schmidt","drums","donner","doggy1","drum","doudou","pack","pain","nutmeg","quebec","valdepen","trash","triple","tosser","tuscl","track","comfort","choke","comein","cola","deputy","deadpool","bremen","borders","bronson","break","hotass","hotmail1","eskimo","eggman","koko","kieran","katrin","kordell1","komodo","mone","munich","vvvvvvvv","winger","jaeger","ivan","jackson5","2222222","bergkamp","bennie","bigben","zanzibar","worm","xxx123","sunny1","373737","services","sheridan","slater","slayer1","snoop","stacie","peachy","thecure","times","little1","jennaj","marquis","middle","rasta69","1114","aries","havana","gratis","calgary","checkers","flanker","salope","dirty1","draco","dogface","luv2epus","rainbow6","qwerty123","umpire","turnip","vbnm","tucson","troll","aileen","codered","commande","damon","nana","neon","nico","nightwin","neil","boomer1","bushido","hotmail0","horace","enternow","kaitlyn","keepout","karen1","mindy","mnbv","viewsoni","volcom","wizards","wine","1995","berkeley","bite","zach","woodstoc","tarpon","shinobi","starstar","phat","patience","patrol","toolbox","julien","johnny1","joebob","marble","riders","reflex","120676","1235","angelus","anthrax","atlas","hawks","grandam","harlem","hawaii50","gorgeous","655321","cabron","challeng","callisto","firewall","firefire","fischer","flyer","flower1","factory","federal","gambler","frodo1","funk","sand","sam123","scania","dingo","papito","passmast","olive","palermo","ou8123","lock","ranch","pride","randy1","twiggy","travis1","transfer","treetop","addict","admin1","963852","aceace","clarissa","cliff","cirrus","clifton","colin","bobdole","bonner","bogus","bonjovi","bootsy","boater","elway7","edison","kelvin","kenny1","moonshin","montag","moreno","wayne1","white1","jazzy","jakejake","1994","1991","2828","blunt","bluejays","beau","belmont","worthy","systems","sensei","southpark","stan","peeper","pharao","pigpen","tomahawk","teensex","leedsutd","larkin","jermaine","jeepster","jimjim","josephin","melons","marlon","matthias","marriage","robocop","1003","1027","antelope","azsxdc","gordo","hazard","granada","8989","7894","ceasar","cabernet","cheshire","california","chelle","candy1","fergie","fanny","fidelio","giorgio","fuckhead","ruth","sanford","diego","dominion","devon","panic","longer","mackie","qawsed","trucking","twelve","chloe1","coral","daddyo","nostromo","boyboy","booster","bucky","honolulu","esquire","dynamite","motor","mollydog","wilder","windows1","waffle","wallet","warning","virus","washburn","wealth","vincent1","jabber","jaguars","javelin","irishman","idefix","bigdog1","blue42","blanked","blue32","biteme1","bearcats","blaine","yessir","sylveste","team","stephan","sunfire","tbird","stryker","3ip76k2","sevens","sheldon","pilgrim","tenchi","titman","leeds","lithium","lander","linkin","landon","marijuan","mariner","markie","midnite","reddwarf","1129","123asd","12312312","allstar","albany","asdf12","antonia","aspen","hardball","goldfing","7734","49ers","carlo","chambers","cable","carnage","callum","carlos1","fitter","fandango","festival","flame","gofast","gamma","fucmy69","scrapper","dogwood","django","magneto","loose","premium","addison","9999999","abc1234","cromwell","newyear","nichole","bookie","burns","bounty","brown1","bologna","earl","entrance","elway","killjoy","kerry","keenan","kick","klondike","mini","mouser","mohammed","wayer","impreza","irene","insomnia","24682468","2580","24242424","billbill","bellaco","blessing","blues1","bedford","blanco","blunts","stinks","teaser","streets","sf49ers","shovel","solitude","spikey","sonia","pimpdadd","timeout","toffee","lefty","johndoe","johndeer","mega","manolo","mentor","margie","ratman","ridge","record","rhodes","robin1","1124","1210","1028","1226","another","babylove","barbados","harbor","gramma","646464","carpente","chaos1","fishbone","fireblad","glasgow","frogs","scissors","screamer","salem","scuba1","ducks","driven","doggies","dicky","donovan","obsidian","rams","progress","tottenham","aikman","comanche","corolla","clarke","conway","cumslut","cyborg","dancing","boston1","bong","houdini","helmut","elvisp","edge","keksa12","misha","monty1","monsters","wetter","watford","wiseguy","veronika","visitor","janelle","1989","1987","20202020","biatch","beezer","bigguns","blueball","bitchy","wyoming","yankees2","wrestler","stupid1","sealteam","sidekick","simple1","smackdow","sporting","spiral","smeller","sperm","plato","tophat","test2","theatre","thick","toomuch","leigh","jello","jewish","junkie","maxim","maxime","meadow","remingto","roofer","124038","1018","1269","1227","123457","arkansas","alberta","aramis","andersen","beaker","barcelona","baltimor","googoo","goochi","852456","4711","catcher","carman","champ1","chess","fortress","fishfish","firefigh","geezer","rsalinas","samuel1","saigon","scooby1","doors","dick1","devin","doom","dirk","doris","dontknow","load","magpies","manfred","raleigh","vader1","universa","tulips","defense","mygirl","burn","bowtie","bowman","holycow","heinrich","honeys","enforcer","katherine","minerva","wheeler","witch","waterboy","jaime","irving","1992","23skidoo","bimbo","blue11","birddog","woodman","womble","zildjian","030303","stinker","stoppedby","sexybabe","speakers","slugger","spotty","smoke1","polopolo","perfect1","things","torpedo","tender","thrasher","lakeside","lilith","jimmys","jerk","junior1","marsh","masamune","rice","root","1214","april1","allgood","bambi","grinch","767676","5252","cherries","chipmunk","cezer121","carnival","capecod","finder","flint","fearless","goats","funstuff","gideon","savior","seabee","sandro","schalke","salasana","disney1","duckman","options","pancake","pantera1","malice","lookin","love123","lloyd","qwert123","puppet","prayers","union","tracer","crap","creation","cwoui","nascar24","hookers","hollie","hewitt","estrella","erection","ernesto","ericsson","edthom","kaylee","kokoko","kokomo","kimball","morales","mooses","monk","walton","weekend","inter","internal","1michael","1993","19781978","25252525","worker","summers","surgery","shibby","shamus","skibum","sheepdog","sex69","spliff","slipper","spoons","spanner","snowbird","slow","toriamos","temp123","tennesse","lakers1","jomama","julio","mazdarx7","rosario","recon","riddle","room","revolver","1025","1101","barney1","babycake","baylor","gotham","gravity","hallowee","hancock","616161","515000","caca","cannabis","castor","chilli","fdsa","getout","fuck69","gators1","sail","sable","rumble","dolemite","dork","dickens","duffer","dodgers1","painting","onions","logger","lorena","lookout","magic32","port","poon","prime","twat","coventry","citroen","christmas","civicsi","cocksucker","coochie","compaq1","nancy1","buzzer","boulder","butkus","bungle","hogtied","honor","hero","hotgirls","hilary","heidi1","eggplant","mustang6","mortal","monkey12","wapapapa","wendy1","volleyba","vibrate","vicky","bledsoe","blink","birthday4","woof","xxxxx1","talk","stephen1","suburban","stock","tabatha","sheeba","start1","soccer10","something","starcraft","soccer12","peanut1","plastics","penthous","peterbil","tools","tetsuo","torino","tennis1","termite","ladder","last","lemmein","lakewood","jughead","melrose","megane","reginald","redone","request","angela1","alive","alissa","goodgirl","gonzo1","golden1","gotyoass","656565","626262","capricor","chains","calvin1","foolish","fallon","getmoney","godfather","gabber","gilligan","runaway","salami","dummy","dungeon","dudedude","dumb","dope","opus","paragon","oxygen","panhead","pasadena","opendoor","odyssey","magellan","lottie","printing","pressure","prince1","trustme","christa","court","davies","neville","nono","bread","buffet","hound","kajak","killkill","mona","moto","mildred","winner1","vixen","whiteboy","versace","winona","voyager1","instant","indy","jackjack","bigal","beech","biggun","blake1","blue99","big1","woods","synergy","success1","336699","sixty9","shark1","skin","simba1","sharpe","sebring","spongebo","spunk","springs","sliver","phialpha","password9","pizza1","plane","perkins","pookey","tickling","lexingky","lawman","joe123","jolly","mike123","romeo1","redheads","reserve","apple123","alanis","ariane","antony","backbone","aviation","band","hand","green123","haley","carlitos","byebye","cartman1","camden","chewy","camaross","favorite6","forumwp","franks","ginscoot","fruity","sabrina1","devil666","doughnut","pantie","oldone","paintball","lumina","rainbow1","prosper","total","true","umbrella","ajax","951753","achtung","abc12345","compact","color","corn","complete","christi","closer","corndog","deerhunt","darklord","dank","nimitz","brandy1","bowl","breanna","holidays","hetfield","holein1","hillbill","hugetits","east","evolutio","kenobi","whiplash","waldo","wg8e3wjf","wing","istanbul","invis","1996","benton","bigjohn","bluebell","beef","beater","benji","bluejay","xyzzy","wrestling","storage","superior","suckdick","taichi","stellar","stephane","shaker","skirt","seymour","semper","splurge","squeak","pearls","playball","pitch","phyllis","pooky","piss","tomas","titfuck","joemama","johnny5","marcello","marjorie","married","maxi","rhubarb","rockwell","ratboy","reload","rooney","redd","1029","1030","1220","anchor","bbking","baritone","gryphon","gone","57chevy","494949","celeron","fishy","gladiator","fucker1","roswell","dougie","downer","dicker","diva","domingo","donjuan","nympho","omar","praise","racers","trick","trauma","truck1","trample","acer","corwin","cricket1","clemente","climax","denmark","cuervo","notnow","nittany","neutron","native","bosco1","buffa","breaker","hello2","hydro","estelle","exchange","explore","kisskiss","kittys","kristian","montecar","modem","mississi","mooney","weiner","washington","20012001","bigdick1","bibi","benfica","yahoo1","striper","tabasco","supra","383838","456654","seneca","serious","shuttle","socks","stanton","penguin1","pathfind","testibil","thethe","listen","lightning","lighting","jeter2","marma","mark1","metoo","republic","rollin","redleg","redbone","redskin","rocco","1245","armand","anthony7","altoids","andrews","barley","away","asswipe","bauhaus","bbbbbb1","gohome","harrier","golfpro","goldeney","818181","6666666","5000","5rxypn","cameron1","calling","checker","calibra","fields","freefree","faith1","fist","fdm7ed","finally","giraffe","glasses","giggles","fringe","gate","georgie","scamper","rrpass1","screwyou","duffy","deville","dimples","pacino","ontario","passthie","oberon","quest1","postov1000","puppydog","puffer","raining","protect","qwerty7","trey","tribe","ulysses","tribal","adam25","a1234567","compton","collie","cleopatr","contract","davide","norris","namaste","myrtle","buffalo1","bonovox","buckley","bukkake","burning","burner","bordeaux","burly","hun999","emilie","elmo","enters","enrique","keisha","mohawk","willard","vgirl","whale","vince","jayden","jarrett","1812","1943","222333","bigjim","bigd","zoom","wordup","ziggy1","yahooo","workout","young1","written","xmas","zzzzzz1","surfer1","strife","sunlight","tasha1","skunk","shauna","seth","soft","sprinter","peaches1","planes","pinetree","plum","pimping","theforce","thedon","toocool","leeann","laddie","list","lkjh","lara","joke","jupiter1","mckenzie","matty","rene","redrose","1200","102938","annmarie","alexa","antares","austin31","ground","goose1","737373","78945612","789987","6464","calimero","caster","casper1","cement","chevrolet","chessie","caddy","chill","child","canucks","feeling","favorite","fellatio","f00tball","francine","gateway2","gigi","gamecube","giovanna","rugby1","scheisse","dshade","dudes","dixie1","owen","offshore","olympia","lucas1","macaroni","manga","pringles","puff","tribble","trouble1","ussy","core","clint","coolhand","colonial","colt","debra","darthvad","dealer","cygnusx1","natalie1","newark","husband","hiking","errors","eighteen","elcamino","emmett","emilia","koolaid","knight1","murphy1","volcano","idunno","2005","2233","block","benito","blueberr","biguns","yamahar1","zapper","zorro1","0911","3006","sixsix","shopper","siobhan","sextoy","stafford","snowboard","speedway","sounds","pokey","peabody","playboy2","titi","think","toast","toonarmy","lister","lambda","joecool","jonas","joyce","juniper","mercer","max123","manny","massimo","mariposa","met2002","reggae","ricky1","1236","1228","1016","all4one","arianna","baberuth","asgard","gonzales","484848","5683","6669","catnip","chiquita","charisma","capslock","cashmone","chat","figure","galant","frenchy","gizmodo1","girlies","gabby","garner","screwy","doubled","divers","dte4uw","done","dragonfl","maker","locks","rachelle","treble","twinkie","trailer","tropical","acid","crescent","cooking","cococo","cory","dabomb","daffy","dandfa","cyrano","nathanie","briggs","boners","helium","horton","hoffman","hellas","espresso","emperor","killa","kikimora","wanda","w4g8at","verona","ilikeit","iforget","1944","20002000","birthday1","beatles1","blue1","bigdicks","beethove","blacklab","blazers","benny1","woodwork","0069","0101","taffy","susie","survivor","swim","stokes","4567","shodan","spoiled","steffen","pissed","pavlov","pinnacle","place","petunia","terrell","thirty","toni","tito","teenie","lemonade","lily","lillie","lalakers","lebowski","lalalala","ladyboy","jeeper","joyjoy","mercury1","mantle","mannn","rocknrol","riversid","reeves","123aaa","11112222","121314","1021","1004","1120","allen1","ambers","amstel","ambrose","alice1","alleycat","allegro","ambrosia","alley","australia","hatred","gspot","graves","goodsex","hattrick","harpoon","878787","8inches","4wwvte","cassandr","charlie123","case","chavez","fighting","gabriela","gatsby","fudge","gerry","generic","gareth","fuckme2","samm","sage","seadog","satchmo","scxakv","santafe","dipper","dingle","dizzy","outoutout","madmad","london1","qbg26i","pussy123","randolph","vaughn","tzpvaw","vamp","comedy","comp","cowgirl","coldplay","dawgs","delaney","nt5d27","novifarm","needles","notredam","newness","mykids","bryan1","bouncer","hihihi","honeybee","iceman1","herring","horn","hook","hotlips","dynamo","klaus","kittie","kappa","kahlua","muffy","mizzou","mohamed","musical","wannabe","wednesda","whatup","weller","waterfal","willy1","invest","blanche","bear1","billabon","youknow","zelda","yyyyyy1","zachary1","01234567","070462","zurich","superstar","storms","tail","stiletto","strat","427900","sigmachi","shelter","shells","sexy123","smile1","sophie1","stefano","stayout","somerset","smithers","playmate","pinkfloyd","phish1","payday","thebear","telefon","laetitia","kswbdu","larson","jetta","jerky","melina","metro","revoluti","retire","respect","1216","1201","1204","1222","1115","archange","barry1","handball","676767","chandra","chewbacc","flesh","furball","gocubs","fruit","fullback","gman","gentle","dunbar","dewalt","dominiqu","diver1","dhip6a","olemiss","ollie","mandrake","mangos","pretzel","pusssy","tripleh","valdez","vagabond","clean","comment","crew","clovis","deaths","dandan","csfbr5yy","deadspin","darrel","ninguna","noah","ncc74656","bootsie","bp2002","bourbon","brennan","bumble","books","hose","heyyou","houston1","hemlock","hippo","hornets","hurricane","horseman","hogan","excess","extensa","muffin1","virginie","werdna","idontknow","info","iron","jack1","1bitch","151nxjmt","bendover","bmwbmw","bills","zaq123","wxcvbn","surprise","supernov","tahoe","talbot","simona","shakur","sexyone","seviyi","sonja","smart1","speed1","pepito","phantom1","playoffs","terry1","terrier","laser1","lite","lancia","johngalt","jenjen","jolene","midori","message","maserati","matteo","mental","miami1","riffraff","ronald1","reason","rhythm","1218","1026","123987","1015","1103","armada","architec","austria","gotmilk","hawkins","gray","camila","camp","cambridg","charge","camero","flex","foreplay","getoff","glacier","glotest","froggie","gerbil","rugger","sanity72","salesman","donna1","dreaming","deutsch","orchard","oyster","palmtree","ophelia","pajero","m5wkqf","magenta","luckyone","treefrog","vantage","usmarine","tyvugq","uptown","abacab","aaaaaa1","advance","chuck1","delmar","darkange","cyclones","nate","navajo","nope","border","bubba123","building","iawgk2","hrfzlz","dylan1","enrico","encore","emilio","eclipse1","killian","kayleigh","mutant","mizuno","mustang2","video1","viewer","weed420","whales","jaguar1","insight","1990","159159","1love","bliss","bears1","bigtruck","binder","bigboss","blitz","xqgann","yeahyeah","zeke","zardoz","stickman","table","3825","signal","sentra","side","shiva","skipper1","singapor","southpaw","sonora","squid","slamdunk","slimjim","placid","photon","placebo","pearl1","test12","therock1","tiger123","leinad","legman","jeepers","joeblow","mccarthy","mike23","redcar","rhinos","rjw7x4","1102","13576479","112211","alcohol","gwju3g","greywolf","7bgiqk","7878","535353","4snz9g","candyass","cccccc1","carola","catfight","cali","fister","fosters","finland","frankie1","gizzmo","fuller","royalty","rugrat","sandie","rudolf","dooley","dive","doreen","dodo","drop","oemdlg","out3xf","paddy","opennow","puppy1","qazwsxedc","pregnant","quinn","ramjet","under","uncle","abraxas","corner","creed","cocoa","crown","cows","cn42qj","dancer1","death666","damned","nudity","negative","nimda2k","buick","bobb","braves1","brook","henrik","higher","hooligan","dust","everlast","karachi","mortis","mulligan","monies","motocros","wally1","weapon","waterman","view","willie1","vicki","inspiron","1test","2929","bigblack","xytfu7","yackwin","zaq1xsw2","yy5rbfsc","100100","0660","tahiti","takehana","talks","332211","3535","sedona","seawolf","skydiver","shine","spleen","slash","spjfet","special1","spooner","slimshad","sopranos","spock1","penis1","patches1","terri","thierry","thething","toohot","large","limpone","johnnie","mash4077","matchbox","masterp","maxdog","ribbit","reed","rita","rockin","redhat","rising","1113","14789632","1331","allday","aladin","andrey","amethyst","ariel","anytime","baseball1","athome","basil","goofy1","greenman","gustavo","goofball","ha8fyp","goodday","778899","charon","chappy","castillo","caracas","cardiff","capitals","canada1","cajun","catter","freddy1","favorite2","frazier","forme","follow","forsaken","feelgood","gavin","gfxqx686","garlic","sarge","saskia","sanjose","russ","salsa","dilbert1","dukeduke","downhill","longhair","loop","locutus","lockdown","malachi","mamacita","lolipop","rainyday","pumpkin1","punker","prospect","rambo1","rainbows","quake","twin","trinity1","trooper1","aimee","citation","coolcat","crappy","default","dental","deniro","d9ungl","daddys","napoli","nautica","nermal","bukowski","brick","bubbles1","bogota","board","branch","breath","buds","hulk","humphrey","hitachi","evans","ender","export","kikiki","kcchiefs","kram","morticia","montrose","mongo","waqw3p","wizzard","visited","whdbtp","whkzyc","image","154ugeiu","1fuck","binky","blind","bigred1","blubber","benz","becky1","year2005","wonderfu","wooden","xrated","0001","tampabay","survey","tammy1","stuffer","3mpz4r","3000","3some","selina","sierra1","shampoo","silk","shyshy","slapnuts","standby","spartan1","sprocket","sometime","stanley1","poker1","plus","thought","theshit","torture","thinking","lavalamp","light1","laserjet","jediknig","jjjjj1","jocelyn","mazda626","menthol","maximo","margaux","medic1","release","richter","rhino1","roach","renate","repair","reveal","1209","1234321","amigos","apricot","alexandra","asdfgh1","hairball","hatter","graduate","grimace","7xm5rq","6789","cartoons","capcom","cheesy","cashflow","carrots","camping","fanatic","fool","format","fleming","girlie","glover","gilmore","gardner","safeway","ruthie","dogfart","dondon","diapers","outsider","odin","opiate","lollol","love12","loomis","mallrats","prague","primetime21","pugsley","program","r29hqq","touch","valleywa","airman","abcdefg1","darkone","cummer","dempsey","damn","nadia","natedogg","nineball","ndeyl5","natchez","newone","normandy","nicetits","buddy123","buddys","homely","husky","iceland","hr3ytm","highlife","holla","earthlin","exeter","eatmenow","kimkim","karine","k2trix","kernel","kirkland","money123","moonman","miles1","mufasa","mousey","wilma","wilhelm","whites","warhamme","instinct","jackass1","2277","20spanks","blobby","blair","blinky","bikers","blackjack","becca","blue23","xman","wyvern","085tzzqi","zxzxzx","zsmj2v","suede","t26gn4","sugars","sylvie","tantra","swoosh","swiss","4226","4271","321123","383pdjvl","shoe","shane1","shelby1","spades","spain","smother","soup","sparhawk","pisser","photo1","pebble","phones","peavey","picnic","pavement","terra","thistle","tokyo","therapy","lives","linden","kronos","lilbit","linux","johnston","material","melanie1","marbles","redlight","reno","recall","1208","1138","1008","alchemy","aolsucks","alexalex","atticus","auditt","ballet","b929ezzh","goodyear","hanna","griffith","gubber","863abgsg","7474","797979","464646","543210","4zqauf","4949","ch5nmk","carlito","chewey","carebear","caleb","checkmat","cheddar","chachi","fever","forgetit","fine","forlife","giants1","gates","getit","gamble","gerhard","galileo","g3ujwg","ganja","rufus1","rushmore","scouts","discus","dudeman","olympus","oscars","osprey","madcow","locust","loyola","mammoth","proton","rabbit1","question","ptfe3xxp","pwxd5x","purple1","punkass","prophecy","uyxnyd","tyson1","aircraft","access99","abcabc","cocktail","colts","civilwar","cleveland","claudia1","contour","clement","dddddd1","cypher","denied","dapzu455","dagmar","daisydog","name","noles","butters","buford","hoochie","hotel","hoser","eddy","ellis","eldiablo","kingrich","mudvayne","motown","mp8o6d","wife","vipergts","italiano","innocent","2055","2211","beavers","bloke","blade1","yamato","zooropa","yqlgr667","050505","zxcvbnm1","zw6syj","suckcock","tango1","swing","stern","stephens","swampy","susanna","tammie","445566","333666","380zliki","sexpot","sexylady","sixtynin","sickboy","spiffy","sleeping","skylark","sparkles","slam","pintail","phreak","places","teller","timtim","tires","thighs","left","latex","llamas","letsdoit","lkjhg","landmark","letters","lizzard","marlins","marauder","metal1","manu","register","righton","1127","alain","alcat","amigo","basebal1","azertyui","attract","azrael","hamper","gotenks","golfgti","gutter","hawkwind","h2slca","harman","grace1","6chid8","789654","canine","casio","cazzo","chamber","cbr900","cabrio","calypso","capetown","feline","flathead","fisherma","flipmode","fungus","goal","g9zns4","full","giggle","gabriel1","fuck123","saffron","dogmeat","dreamcas","dirtydog","dunlop","douche","dresden","dickdick","destiny1","pappy","oaktree","lydia","luft4","puta","prayer","ramada","trumpet1","vcradq","tulip","tracy71","tycoon","aaaaaaa1","conquest","click","chitown","corps","creepers","constant","couples","code","cornhole","danman","dada","density","d9ebk7","cummins","darth","cute","nash","nirvana1","nixon","norbert","nestle","brenda1","bonanza","bundy","buddies","hotspur","heavy","horror","hufmqw","electro","erasure","enough","elisabet","etvww4","ewyuza","eric1","kinder","kenken","kismet","klaatu","musician","milamber","willi","waiting","isacs155","igor","1million","1letmein","x35v8l","yogi","ywvxpz","xngwoj","zippy1","020202","****","stonewal","sweeney","story","sentry","sexsexsex","spence","sonysony","smirnoff","star12","solace","sledge","states","snyder","star1","paxton","pentagon","pkxe62","pilot1","pommes","paulpaul","plants","tical","tictac","toes","lighthou","lemans","kubrick","letmein22","letmesee","jys6wz","jonesy","jjjjjj1","jigga","joelle","mate","merchant","redstorm","riley1","rosa","relief","14141414","1126","allison1","badboy1","asthma","auggie","basement","hartley","hartford","hardwood","gumbo","616913","57np39","56qhxs","4mnveh","cake","forbes","fatluvr69","fqkw5m","fidelity","feathers","fresno","godiva","gecko","gladys","gibson1","gogators","fridge","general1","saxman","rowing","sammys","scotts","scout1","sasasa","samoht","dragon69","ducky","dragonball","driller","p3wqaw","nurse","papillon","oneone","openit","optimist","longshot","portia","rapier","pussy2","ralphie","tuxedo","ulrike","undertow","trenton","copenhag","come","delldell","culinary","deltas","mytime","nicky","nickie","noname","noles1","bucker","bopper","bullock","burnout","bryce","hedges","ibilltes","hihje863","hitter","ekim","espana","eatme69","elpaso","envelope","express1","eeeeee1","eatme1","karaoke","kara","mustang5","misses","wellingt","willem","waterski","webcam","jasons","infinite","iloveyou!","jakarta","belair","bigdad","beerme","yoshi","yinyang","zimmer","x24ik3","063dyjuy","0000007","ztmfcq","stopit","stooges","survival","stockton","symow8","strato","2hot4u","ship","simons","skins","shakes","sex1","shield","snacks","softtail","slimed123","pizzaman","pipe","pitt","pathetic","pinto","tigercat","tonton","lager","lizzy","juju","john123","jennings","josiah","jesse1","jordon","jingles","martian","mario1","rootedit","rochard","redwine","requiem","riverrat","rats","1117","1014","1205","althea","allie","amor","amiga","alpina","alert","atreides","banana1","bahamut","hart","golfman","happines","7uftyx","5432","5353","5151","4747","byron","chatham","chadwick","cherie","foxfire","ffvdj474","freaked","foreskin","gayboy","gggggg1","glenda","gameover","glitter","funny1","scoobydoo","scroll","rudolph","saddle","saxophon","dingbat","digimon","omicron","parsons","ohio","panda1","loloxx","macintos","lululu","lollypop","racer1","queen1","qwertzui","prick","upnfmc","tyrant","trout1","9skw5g","aceman","adelaide","acls2h","aaabbb","acapulco","aggie","comcast","craft","crissy","cloudy","cq2kph","custer","d6o8pm","cybersex","davecole","darian","crumbs","daisey","davedave","dasani","needle","mzepab","myporn","narnia","nineteen","booger1","bravo1","budgie","btnjey","highlander","hotel6","humbug","edwin","ewtosi","kristin1","kobe","knuckles","keith1","katarina","muff","muschi","montana1","wingchun","wiggle","whatthe","walking","watching","vette1","vols","virago","intj3a","ishmael","intern","jachin","illmatic","199999","2010","beck","blender","bigpenis","bengal","blue1234","your","zaqxsw","xray","xxxxxxx1","zebras","yanks","worlds","tadpole","stripes","svetlana","3737","4343","3728","4444444","368ejhih","solar","sonne","smalls","sniffer","sonata","squirts","pitcher","playstation","pktmxr","pescator","points","texaco","lesbos","lilian","l8v53x","jo9k2jw2","jimbeam","josie","jimi","jupiter2","jurassic","marines1","maya","rocket1","ringer","14725836","12345679","1219","123098","1233","alessand","althor","angelika","arch","armando","alpha123","basher","barefeet","balboa","bbbbb1","banks","badabing","harriet","gopack","golfnut","gsxr1000","gregory1","766rglqy","8520","753159","8dihc6","69camaro","666777","cheeba","chino","calendar","cheeky","camel1","fishcake","falling","flubber","giuseppe","gianni","gloves","gnasher23","frisbee","fuzzy1","fuzzball","sauce","save13tx","schatz","russell1","sandra1","scrotum","scumbag","sabre","samdog","dripping","dragon12","dragster","paige","orwell","mainland","lunatic","lonnie","lotion","maine","maddux","qn632o","poophead","rapper","porn4life","producer","rapunzel","tracks","velocity","vanessa1","ulrich","trueblue","vampire1","abacus","902100","crispy","corky","crane","chooch","d6wnro","cutie","deal","dabulls","dehpye","navyseal","njqcw4","nownow","nigger1","nightowl","nonenone","nightmar","bustle","buddy2","boingo","bugman","bulletin","bosshog","bowie","hybrid","hillside","hilltop","hotlegs","honesty","hzze929b","hhhhh1","hellohel","eloise","evilone","edgewise","e5pftu","eded","embalmer","excalibur","elefant","kenzie","karl","karin","killah","kleenex","mouses","mounta1n","motors","mutley","muffdive","vivitron","winfield","wednesday","w00t88","iloveit","jarjar","incest","indycar","17171717","1664","17011701","222777","2663","beelch","benben","yitbos","yyyyy1","yasmin","zapata","zzzzz1","stooge","tangerin","taztaz","stewart1","summer69","sweetness","system1","surveyor","stirling","3qvqod","3way","456321","sizzle","simhrq","shrink","shawnee","someday","sparty","ssptx452","sphere","spark","slammed","sober","persian","peppers","ploppy","pn5jvw","poobear","pianos","plaster","testme","tiff","thriller","larissa","lennox","jewell","master12","messier","rockey","1229","1217","1478","1009","anastasi","almighty","amonra","aragon","argentin","albino","azazel","grinder","6uldv8","83y6pv","8888888","4tlved","515051","carsten","changes","flanders","flyers88","ffffff1","firehawk","foreman","firedog","flashman","ggggg1","gerber","godspeed","galway","giveitup","funtimes","gohan","giveme","geryfe","frenchie","sayang","rudeboy","savanna","sandals","devine","dougal","drag0n","dga9la","disaster","desktop","only","onlyone","otter","pandas","mafia","lombard","luckys","lovejoy","lovelife","manders","product","qqh92r","qcmfd454","pork","radar1","punani","ptbdhw","turtles","undertaker","trs8f7","tramp","ugejvp","abba","911turbo","acdc","abcd123","clever","corina","cristian","create","crash1","colony","crosby","delboy","daniele","davinci","daughter","notebook","niki","nitrox","borabora","bonzai","budd","brisbane","hotter","heeled","heroes","hooyah","hotgirl","i62gbq","horse1","hills","hpk2qc","epvjb6","echo","korean","kristie","mnbvc","mohammad","mind","mommy1","munster","wade","wiccan","wanted","jacket","2369","bettyboo","blondy","bismark","beanbag","bjhgfi","blackice","yvtte545","ynot","yess","zlzfrh","wolvie","007bond","******","tailgate","tanya1","sxhq65","stinky1","3234412","3ki42x","seville","shimmer","sheryl","sienna","shitshit","skillet","seaman","sooners1","solaris","smartass","pastor","pasta","pedros","pennywis","pfloyd","tobydog","thetruth","lethal","letme1n","leland","jenifer","mario66","micky","rocky2","rewq","ripped","reindeer","1128","1207","1104","1432","aprilia","allstate","alyson","bagels","basic","baggies","barb","barrage","greatest","gomez","guru","guard","72d5tn","606060","4wcqjn","caldwell","chance1","catalog","faust","film","flange","fran","fartman","geil","gbhcf2","fussball","glen","fuaqz4","gameboy","garnet","geneviev","rotary","seahawk","russel","saab","seal","samadams","devlt4","ditto","drevil","drinker","deuce","dipstick","donut","octopus","ottawa","losangel","loverman","porky","q9umoz","rapture","pump","pussy4me","university","triplex","ue8fpw","trent","trophy","turbos","troubles","agent","aaa340","churchil","crazyman","consult","creepy","craven","class","cutiepie","ddddd1","dejavu","cuxldv","nettie","nbvibt","nikon","niko","norwood","nascar1","nolan","bubba2","boobear","boogers","buff","bullwink","bully","bulldawg","horsemen","escalade","editor","eagle2","dynamic","ella","efyreg","edition","kidney","minnesot","mogwai","morrow","msnxbi","moonlight","mwq6qlzo","wars","werder","verygood","voodoo1","wheel","iiiiii1","159951","1624","1911a1","2244","bellagio","bedlam","belkin","bill1","woodrow","xirt2k","worship","??????","tanaka","swift","susieq","sundown","sukebe","tales","swifty","2fast4u","senate","sexe","sickness","shroom","shaun","seaweed","skeeter1","status","snicker","sorrow","spanky1","spook","patti","phaedrus","pilots","pinch","peddler","theo","thumper1","tessie","tiger7","tmjxn151","thematri","l2g7k3","letmeinn","lazy","jeffjeff","joan","johnmish","mantra","mariana","mike69","marshal","mart","mazda6","riptide","robots","rental","1107","1130","142857","11001001","1134","armored","alvin","alec","allnight","alright","amatuers","bartok","attorney","astral","baboon","bahamas","balls1","bassoon","hcleeb","happyman","granite","graywolf","golf1","gomets","8vjzus","7890","789123","8uiazp","5757","474jdvff","551scasi","50cent","camaro1","cherry1","chemist","final","firenze","fishtank","farrell","freewill","glendale","frogfrog","gerhardt","ganesh","same","scirocco","devilman","doodles","dinger","okinawa","olympic","nursing","orpheus","ohmygod","paisley","pallmall","null","lounge","lunchbox","manhatta","mahalo","mandarin","qwqwqw","qguvyt","pxx3eftp","president","rambler","puzzle","poppy1","turk182","trotter","vdlxuc","trish","tugboat","valiant","tracie","uwrl7c","chris123","coaster","cmfnpu","decimal","debbie1","dandy","daedalus","dede","natasha1","nissan1","nancy123","nevermin","napalm","newcastle","boats","branden","britt","bonghit","hester","ibxnsm","hhhhhh1","holger","durham","edmonton","erwin","equinox","dvader","kimmy","knulla","mustafa","monsoon","mistral","morgana","monica1","mojave","month","monterey","mrbill","vkaxcs","victor1","wacker","wendell","violator","vfdhif","wilson1","wavpzt","verena","wildstar","winter99","iqzzt580","jarrod","imback","1914","19741974","1monkey","1q2w3e4r5t","2500","2255","blank","bigshow","bigbucks","blackcoc","zoomer","wtcacq","wobble","xmen","xjznq5","yesterda","yhwnqc","zzzxxx","streak","393939","2fchbg","skinhead","skilled","shakira","shaft","shadow12","seaside","sigrid","sinful","silicon","smk7366","snapshot","sniper1","soccer11","staff","slap","smutty","peepers","pleasant","plokij","pdiddy","pimpdaddy","thrust","terran","topaz","today1","lionhear","littlema","lauren1","lincoln1","lgnu9d","laughing","juneau","methos","medina","merlyn","rogue1","romulus","redshift","1202","1469","12locked","arizona1","alfarome","al9agd","aol123","altec","apollo1","arse","baker1","bbb747","bach","axeman","astro1","hawthorn","goodfell","hawks1","gstring","hannes","8543852","868686","4ng62t","554uzpad","5401","567890","5232","catfood","frame","flow","fire1","flipflop","fffff1","fozzie","fluff","garrison","fzappa","furious","round","rustydog","sandberg","scarab","satin","ruger","samsung1","destin","diablo2","dreamer1","detectiv","dominick","doqvq3","drywall","paladin1","papabear","offroad","panasonic","nyyankee","luetdi","qcfmtz","pyf8ah","puddles","privacy","rainer","pussyeat","ralph1","princeto","trivia","trewq","tri5a3","advent","9898","agyvorc","clarkie","coach1","courier","contest","christo","corinna","chowder","concept","climbing","cyzkhw","davidb","dad2ownu","days","daredevi","de7mdf","nose","necklace","nazgul","booboo1","broad","bonzo","brenna","boot","butch1","huskers1","hgfdsa","hornyman","elmer","elektra","england1","elodie","kermit1","knife","kaboom","minute","modern","motherfucker","morten","mocha","monday1","morgoth","ward","weewee","weenie","walters","vorlon","website","wahoo","ilovegod","insider","jayman","1911","1dallas","1900","1ranger","201jedlz","2501","1qaz","bertram","bignuts","bigbad","beebee","billows","belize","bebe","wvj5np","wu4etd","yamaha1","wrinkle5","zebra1","yankee1","zoomzoom","09876543","0311","?????","stjabn","tainted","3tmnej","shoot","skooter","skelter","sixteen","starlite","smack","spice1","stacey1","smithy","perrin","pollux","peternorth","pixie","paulina","piston","pick","poets","pine","toons","tooth","topspin","kugm7b","legends","jeepjeep","juliana","joystick","junkmail","jojojojo","jonboy","judge","midland","meteor","mccabe","matter","mayfair","meeting","merrill","raul","riches","reznor","rockrock","reboot","reject","robyn","renee1","roadway","rasta220","1411","1478963","1019","archery","allman","andyandy","barks","bagpuss","auckland","gooseman","hazmat","gucci","guns","grammy","happydog","greek","7kbe9d","7676","6bjvpe","5lyedn","5858","5291","charlie2","chas","c7lrwu","candys","chateau","ccccc1","cardinals","fear","fihdfv","fortune12","gocats","gaelic","fwsadn","godboy","gldmeo","fx3tuo","fubar1","garland","generals","gforce","rxmtkp","rulz","sairam","dunhill","division","dogggg","detect","details","doll","drinks","ozlq6qwm","ov3ajy","lockout","makayla","macgyver","mallorca","loves","prima","pvjegu","qhxbij","raphael","prelude1","totoro","tusymo","trousers","tunnel","valeria","tulane","turtle1","tracy1","aerosmit","abbey1","address","clticic","clueless","cooper1","comets","collect","corbin","delpiero","derick","cyprus","dante1","dave1","nounours","neal","nexus6","nero","nogard","norfolk","brent1","booyah","bootleg","buckaroo","bulls23","bulls1","booper","heretic","icecube","hellno","hounds","honeydew","hooters1","hoes","howie","hevnm4","hugohugo","eighty","epson","evangeli","eeeee1","eyphed","tiwaribachjayega"];const Hw=()=>{const[e]=lt(),t=e.get("role")||"customer",[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(!1),[o,c]=h.exports.useState(!1),l=Qe({code:dt().required("Code is required").typeError("Code is required").positive("Invalid Code").integer(),password:ge().required("Password is required").min(10,"Password must be at least 10 characters long").matches(/^(?=.*[0-9])/,"Password must contain at least one digit(0-9)").matches(/^(?=.*[a-z])/,"Password must contain at least one lowercase letter").matches(/^(?=.*[A-Z])/,"Password must contain at least one uppercase letter").matches(/^(?=.*[!@#\$%\^&\*])/,"Password must contain at least one symbol").test("is-not-dictionary","Password must not contain a common word",x=>y3e.every(k=>!x.includes(k))).test("does-not-contain-user-info","Password must not contain your name or date of birth",x=>{const k=Te("2001-01-01");return["john","doe",k.format("yyyyMMDD"),k.format("DDMMyyyy"),k.format("MMDDyyyy"),k.format("YYMMDD"),k.format("MMDDYY"),k.format("DDMMYY")].every(N=>N.trim()==""||!x.toLowerCase().includes(N.toLowerCase()))}),confirm_password:ge().oneOf([zu("password"),null],"Passwords don't match")}),{handleSubmit:d,register:u,trigger:g,formState:{errors:y,dirtyFields:w},setError:v}=Oe({resolver:Xe(l),defaultValues:{password:""},criteriaMode:"all"}),S=je();new _e;const m=async x=>{console.log("submitting",x),c(!0);try{await _t("reset","post",{code:x.code,password:x.password,token:e.get("token")},""),S("/login?role="+t)}catch(k){v("code",{message:k.message=="Password is same as old password"?"Please use a different password":k.message})}c(!1)};function p(){var k,N,_,C,E,T,D;var x=[];return Array.isArray((k=y.password)==null?void 0:k.types.matches)&&(x=[...y.password.types.matches]),typeof((N=y.password)==null?void 0:N.types.matches)=="string"&&x.push(y.password.types.matches),(_=y.password)!=null&&_.types.min&&x.push(y.password.types.min),(C=y.password)!=null&&C.types["does-not-contain-user-info"]&&x.push((E=y.password)==null?void 0:E.types["does-not-contain-user-info"]),(T=y.password)!=null&&T.types["is-not-dictionary"]&&x.push((D=y.password)==null?void 0:D.types["is-not-dictionary"]),x}const b=p();return s("div",{className:"bg-login flex h-screen items-center justify-center",children:f("form",{className:"flex w-96 flex-col bg-white p-5",onSubmit:d(m),autoComplete:"off",children:[s("h2",{className:"mb-4 text-2xl font-semibold",children:"Set New Password"}),s("input",{type:"text",inputMode:"numeric",...u("code"),className:"remove-arrows mb-4 border-2 py-2 px-4 focus:outline-none",autoComplete:"off",placeholder:"Enter code"}),f("div",{className:"relative mb-4 flex justify-between rounded-sm border-2 bg-transparent",children:[s("input",{autoComplete:n?"off":"new-password",type:n?"text":"password",...u("password",{onChange:()=>g("password")}),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Password"})," ",f("button",{type:"button",onClick:()=>a(x=>!x),className:"absolute right-1 top-[20%]",children:[" ",n?s("img",{src:"/show.png",alt:"",className:"mr-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 w-6"})]})]}),w.password&&s("div",{className:"fade-in mb-4 space-y-2 rounded-sm border border-[#C42945] p-3 text-sm normal-case text-[#C42945] empty:hidden",children:b.map(x=>s("p",{children:x}))}),f("div",{className:"relative mb-4 flex justify-between rounded-sm border-2 bg-transparent",children:[s("input",{autoComplete:r?"off":"new-password",type:r?"text":"password",...u("confirm_password"),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Confirm password"})," ",f("button",{type:"button",onClick:()=>i(x=>!x),className:"absolute right-1 top-[20%]",children:[" ",r?s("img",{src:"/show.png",alt:"",className:"mr-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 w-6"})]})]}),Object.entries(y).length>0&&w.password&&!y.password?s("p",{className:"error-vibrate my-3 rounded-md border border-[#C42945] bg-white py-2 px-3 text-center text-sm normal-case text-[#C42945]",children:Object.values(y)[0].message}):null,s(Ft,{loading:o,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${o?"loading py-1":"py-2"}`,children:"Continue"})]})})};function x3e({modalOpen:e,closeModal:t}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Can't remember your password?"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"We noticed you tried to login several times, would you like to change your password"})}),f("div",{className:"mt-4 flex gap-4 justify-end",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s($e,{to:"/request-reset",className:"inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium login-btn-gradient text-white",children:"Reset Password"})]})]})})})})]})})}function w3e({modalOpen:e,closeModal:t,email:n}){const[a,r]=h.exports.useState(!1),{dispatch:i}=h.exports.useContext(Ee),{dispatch:o}=h.exports.useContext(we),[c]=h.exports.useState(new AbortController);async function l(){r(!0);const d=new _e;try{await d.callRawAPI("/v2/api/custom/ergo/resend-verification-email",{email:n},"POST",c.signal),pe(o,"Email sent, Please check your inbox",8e3),t()}catch(u){if(u.name=="AbortError"){r(!1);return}me(i,u.message),pe(o,u.message,4e3,"ERROR")}r(!1)}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Resend verification email?"}),s("div",{className:"mt-2",children:f("p",{className:"text-sm text-gray-500",children:["Your email address is not verified, would you like us to resend verification email to ",s("b",{children:n})]})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>{console.log("aborting"),c.abort(),t()},children:"Cancel"}),s(Ft,{type:"button",loading:a,onClick:l,className:`login-btn-gradient inline-flex justify-center rounded-md px-4 text-sm font-medium text-white ${a?"py-1":"py-2"}`,children:"Yes, resend"})]})]})})})})]})})}const P0=new _e;function Uw(){const[e]=lt(),t=e.get("role")||"customer";h.exports.useState(!1);const[n,a]=h.exports.useState(null),r=Qe({email:ge().email("Email must be valid").required("Email is required"),password:ge().required("Password is required")}),{dispatch:i}=R.useContext(Ee);R.useContext(we);const[o,c]=R.useState(!1),[l,d]=R.useState(!1),[u,g]=R.useState(!1),[y,w]=R.useState(0),[v,S]=R.useState([]),[m,p]=R.useState(!1),[b,x]=h.exports.useState(null);h.exports.useState(!1),h.exports.useState(""),h.exports.useState("");const k=je(),{register:N,handleSubmit:_,setError:C,watch:E,formState:{errors:T,isSubmitting:D,isDirty:P}}=Oe({resolver:Xe(r),defaultValues:{email:"",password:""}}),M=E("email"),O=()=>{e.get("error")&&(pe(dispatch,e.get("message"),5e3,"error"),k("/login"))};h.exports.useEffect(()=>{let j;return j||O(),()=>{j=!0}},[]),h.exports.useEffect(()=>{const j=I=>{I.preventDefault(),a(I)};return window.addEventListener("beforeinstallprompt",j),()=>{window.removeEventListener("beforeinstallprompt",j)}},[]);const F=async()=>{try{const j=await P0.oauthLoginApi("google",t),I=e.get("oauth");window.open(j,"_self")}catch(j){console.log(j),pe(i,j.message)}},z=async()=>{JSON.parse(e.get("oauth"));try{const j=await P0.oauthLoginApi("facebook",t);window.open(j,"_self")}catch(j){console.log(j),pe(i,j.message)}},H=async()=>{try{const j=await P0.oauthLoginApi("apple",t);window.open(j,"_self")}catch(j){console.log(j)}};return f("div",{children:[s("header",{className:"absolute top-0 left-0 pt-4 pl-6 md:pl-16",children:s($e,{to:"/",children:s(ln,{type:"logo",fill:"fill-[#101828]"})})}),f("div",{className:"flex min-h-screen w-full justify-center",children:[f("section",{className:"flex w-full flex-col items-center justify-center bg-white md:w-1/2",children:[f("form",{className:"flex w-full max-w-md flex-col px-6",onSubmit:_(async j=>{var I,B;try{x("Location Granted.");try{const Y=await P0.customLogin(j);Y.error||(i({type:"LOGIN",payload:{...Y,originalRole:Y.role}}),["superadmin","admin"].includes(Y.role)?k((I=e.get("redirect_uri"))!=null?I:"/admin/dashboard"):k((B=e.get("redirect_uri"))!=null?B:"/"))}catch(Y){(Y.message=="Your account is inactive"||Y.message=="This email is not registered")&&(S(U=>[...U,j.email.toLowerCase()]),p(!0)),Y.message=="Your email is not verified"&&g(!0),Y.message=="Invalid Password"?w(U=>U+1):w(0),C("email",{type:"manual",message:Y.message}),y>=3&&d(!0)}}catch(Y){console.error("Error fetching location information",Y)}}),autoComplete:"off",children:[s("h1",{className:"mb-8 text-center text-3xl font-semibold md:text-5xl md:font-bold",children:"Log In"}),s("input",{type:"text",autoComplete:"off",className:"mb-8 resize-none rounded-sm border-2 bg-transparent p-2 px-4 focus:outline-none active:outline-none",...N("email",{onChange:j=>{v.includes(j.target.value.toLowerCase())?p(!0):p(!1)}}),placeholder:"Email"}),f("div",{className:"relative mb-4 flex items-center justify-between rounded-sm border-2 bg-transparent",children:[s("input",{autoComplete:o?"off":"new-password",type:o?"text":"password",...N("password"),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Password"})," ",f("button",{type:"button",onClick:()=>c(j=>!j),className:"absolute right-1",children:[" ",o?s("img",{src:"/show.png",alt:"",className:"m-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"m-2 w-6"})]})]}),s($e,{to:"/request-reset?role="+t,className:"my-text-gradient mb-6 self-end text-sm font-semibold",children:"Forgot Password"}),P&&Object.entries(T).length>0?s("p",{className:"error-vibrate my-3 rounded-md border border-[#C42945] bg-white py-2 px-3 text-center text-sm normal-case text-[#C42945]",children:Object.values(T)[0].message}):s(Se,{}),s(Ft,{disabled:m,loading:D,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${D?"py-1":"py-2"}`,children:"Continue"})]}),s("div",{className:"hr my-6 text-center",children:"OR"}),f("div",{className:"oauth flex w-full max-w-md flex-col gap-4 px-6 text-[#344054]",children:[f("button",{onClick:()=>F(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/google-icon.png",className:"h-[18px] w-[18px]"}),s("span",{children:"Sign in With Google"})]}),f("button",{onClick:()=>z(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/facebook-icon.png",className:"h-[16px] w-[16px]"}),s("span",{children:"Sign in With Facebook"})]}),f("button",{onClick:()=>H(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/apple-icon.png",className:"h-[16px] w-[16px]"}),s("span",{children:"Sign in With Apple"})]}),f("div",{children:[f("h3",{className:"mb-2 text-center text-sm normal-case text-gray-800",children:["Don't have an account?"," ",s($e,{to:"/signup",className:"my-text-gradient mb-8 self-end text-sm font-semibold",children:"Sign up"})," "]}),f("h3",{className:"text-center text-sm normal-case text-gray-800",children:["Account issues? Please visit our"," ",s($e,{to:"/faq",className:"my-text-gradient mb-8 self-end text-sm font-semibold",children:"FAQ page"})," "]})]})]})]}),s("section",{style:{backgroundImage:"url(/login-bg.jpg)",backgroundSize:"cover",backgroundPosition:"center"},className:"hidden w-1/2 md:block"})]}),s(x3e,{modalOpen:l,closeModal:()=>d(!1)}),s(w3e,{modalOpen:u,closeModal:()=>g(!1),email:M})]})}const _f=({size:e})=>f("svg",{className:"mr-[11px] inline",width:e!=null?e:"28",height:e!=null?e:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M12.0333 17.0337L8.76663 13.767C8.56663 13.567 8.32218 13.467 8.03329 13.467C7.7444 13.467 7.49996 13.567 7.29996 13.767C7.07774 13.9892 6.96663 14.2503 6.96663 14.5503C6.96663 14.8503 7.06663 15.1003 7.26663 15.3003L11.3333 19.367C11.5111 19.5448 11.7444 19.6337 12.0333 19.6337C12.3222 19.6337 12.5555 19.5448 12.7333 19.367L20.7333 11.367C20.9333 11.167 21.0333 10.9225 21.0333 10.6337C21.0333 10.3448 20.9222 10.0892 20.7 9.86699C20.5 9.66699 20.25 9.56699 19.95 9.56699C19.65 9.56699 19.3888 9.6781 19.1666 9.90033L12.0333 17.0337ZM14 27.3337C12.1111 27.3337 10.3555 26.9948 8.73329 26.317C7.11107 25.6392 5.69996 24.7003 4.49996 23.5003C3.29996 22.3003 2.36107 20.8892 1.68329 19.267C1.00551 17.6448 0.666626 15.8892 0.666626 14.0003C0.666626 12.1337 1.00551 10.3892 1.68329 8.76699C2.36107 7.14477 3.29996 5.73366 4.49996 4.53366C5.69996 3.33366 7.11107 2.38921 8.73329 1.70033C10.3555 1.01144 12.1111 0.666992 14 0.666992C15.8666 0.666992 17.6111 1.01144 19.2333 1.70033C20.8555 2.38921 22.2666 3.33366 23.4666 4.53366C24.6666 5.73366 25.6111 7.14477 26.3 8.76699C26.9888 10.3892 27.3333 12.1337 27.3333 14.0003C27.3333 15.8892 26.9888 17.6448 26.3 19.267C25.6111 20.8892 24.6666 22.3003 23.4666 23.5003C22.2666 24.7003 20.8555 25.6392 19.2333 26.317C17.6111 26.9948 15.8666 27.3337 14 27.3337Z",fill:"url(#paint0_linear_2839_24747)"}),s("defs",{children:f("linearGradient",{id:"paint0_linear_2839_24747",x1:"30.4266",y1:"9.84033",x2:"12.9066",y2:"24.187",gradientUnits:"userSpaceOnUse",children:[s("stop",{stopColor:"#33D4B7"}),s("stop",{offset:"1",stopColor:"#0D9895"})]})})]});function Vw(){var y;const[e,t]=h.exports.useState(!1),[n,a]=h.exports.useState(!1),r=je(),i=new _e,o=Qe({email:ge().email("Invalid email").required("Email is required")}),{register:c,handleSubmit:l,formState:{errors:d},setError:u}=Oe({resolver:Xe(o),defaultValues:{email:""}});return f("div",{children:[s("header",{className:"absolute top-0 left-0 pt-4 md:pl-16 pl-6",children:s($e,{to:"/",children:s(ln,{type:"logo",fill:"fill-[#101828]"})})}),f("div",{className:"bg-login h-screen flex items-center justify-center relative normal-case",children:[!e&&f("form",{className:"bg-white p-5 w-[472px] flex flex-col mb-40",onSubmit:l(async w=>{var m;console.log("submitting",w),a(!0);const v=await i.callRawAPI("/v2/api/custom/ergo/userinfo/PAGINATE",{where:[`email='${w.email}'`],page:1,limit:10},"POST"),S=(m=v==null?void 0:v.list[0])==null?void 0:m.role;try{await i.forgot(w.email,S),t(!0),setTimeout(()=>{r("/login")},6e3)}catch(p){u("email",{type:"manual",message:p.message})}a(!1)}),autoComplete:"off",children:[s("h2",{className:"mb-4 text-2xl font-semibold",children:"Request Password Reset"}),s("p",{className:"mb-4 text-gray-500 text-lg",children:"We will email you a link to reset your password."}),s("input",{autoComplete:"off",type:"text",...c("email"),className:"resize-none border-2 rounded-sm p-2 px-4 bg-transparent mb-4 focus:outline-none active:outline-none",placeholder:"Email"}),(y=d.email)!=null&&y.message?s("p",{className:"border border-[#C42945] py-2 px-3 rounded-md bg-white text-[#C42945] text-center text-sm my-3 normal-case error-vibrate",children:d.email.message}):s(Se,{}),s(Ft,{loading:n,type:"submit",className:`login-btn-gradient text-white tracking-wide outline-none focus:outline-none rounded ${n?"py-1":"py-2"}`,children:"Continue"})]}),e&&f("div",{className:"bg-white p-5 w-[422px] flex flex-col mb-40",children:[f("h2",{className:"mb-4 text-2xl font-semibold",children:[s(_f,{}),"Email Sent!"]}),s("p",{className:"mb-4 text-gray-500 text-sm",children:"You should receive an email with the instruction to reset your password. Sometimes it will go to your spam folder."})]}),f("footer",{className:"absolute bottom-[27px] lowercase left-0 right-0 flex justify-between text-[#667085] items-center 2xl:px-16 container mx-auto",children:[s("p",{children:"2022 in ergo"}),s("p",{children:"Contact: Support@ergobooking.com"})]})]})]})}const vd=()=>{const{dispatch:e}=R.useContext(Ee),{dispatch:t}=R.useContext(we),n=je();new St;const a=new _e;return h.exports.useEffect(()=>{var o;const r=new URLSearchParams(window.location.search),i=on(r.get("data"),{});i!=null&&i.error?(pe(t,i==null?void 0:i.message,3e3,"error"),n("/login")):(e({type:"LOGIN",payload:i}),localStorage.setItem("first_login",i.user_id),localStorage.setItem("token",(o=i.token)!=null?o:i.access_token),(!localStorage.getItem("device-uid")||localStorage.getItem("device-uid")!==void 0)&&a.setUUId(),n("/"))},[]),s("h1",{className:"mt-96 text-7xl"})},AE=({role:e})=>{const[t]=lt();return s(wr,{to:`/reset-password?token=${t.get("token")}&role=${e}`})},v3e={email:"",firstName:"",lastName:"",dob:"",password:"",role:""},_3e=(e,t)=>{switch(t.type){case"SET_EMAIL":return{...e,email:t.payload};case"SET_ROLE":return{...e,role:t.payload};default:return e}},gR=h.exports.createContext({}),N3e=({children:e})=>{const[t,n]=h.exports.useReducer(_3e,v3e);return s(gR.Provider,{value:{signUpData:t,dispatch:n},children:e})},y5=()=>h.exports.useContext(gR);function Pn(e){if(e=new Date(e),isNaN(e))return"";var t=e.getHours(),n=e.getMinutes(),a=t>=12?"pm":"am";t=t%12,t=t||12,n=n<10?"0"+n:n;var r=(t<10?"0"+t:t)+":"+n+" "+a;return r}function eo(e,t){var n=new Date(e),a=new Date(t);return!isNaN(n)&&!isNaN(a)||(n=new Date(`01/01/2001 ${e}`),a=new Date(`01/01/2001 ${t}`),!isNaN(n)&&!isNaN(a))?(a-n)/36e5:0}const bR=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Rr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],yR=["January","February","March","April","May","June","July","August","September","October","November","December"],sr=["sun","mon","tue","wed","thu","fri","sat"],Xs=["12:00 am","01:00 am","02:00 am","03:00 am","04:00 am","05:00 am","06:00 am","07:00 am","08:00 am","09:00 am","10:00 am","11:00 am","12:00 pm","01:00 pm","02:00 pm","03:00 pm","04:00 pm","05:00 pm","06:00 pm","07:00 pm","08:00 pm","09:00 pm","10:00 pm","11:00 pm"];function gh(e){return e==null||(e=new Date(e),isNaN(e))?"":Rr[e.getMonth()]+" "+e.getDate()+"/"+e.getFullYear()}function S3e(e,t){return Te(e).format("MM/DD/YY")==Te(t).format("MM/DD/YY")}function xR(e){const t=Te.duration(Te(e).diff(Te())).asSeconds(),n=Te.duration(Te(e).diff(Te())).asMinutes(),a=Te.duration(Te(e).diff(Te())).asHours(),r=Te.duration(Te(e).diff(Te())).asDays();return r>30?{timeLeft:Math.floor(Te.duration(Te(e).diff(Te())).asMonths()),format:"mon"}:a>24?{timeLeft:Math.floor(r),format:Math.floor(r)>1?"days":"day"}:n>60?{timeLeft:Math.floor(a),format:Math.floor(a)>1?"hrs":"hr"}:t>60?{timeLeft:Math.floor(n),format:Math.floor(n)>1?"mins":"min"}:{}}var wR={exports:{}};(function(e,t){(function(n,a){e.exports=a()})(sn,function(){var n;function a(){return n.apply(null,arguments)}function r(L){n=L}function i(L){return L instanceof Array||Object.prototype.toString.call(L)==="[object Array]"}function o(L){return L!=null&&Object.prototype.toString.call(L)==="[object Object]"}function c(L,$){return Object.prototype.hasOwnProperty.call(L,$)}function l(L){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(L).length===0;var $;for($ in L)if(c(L,$))return!1;return!0}function d(L){return L===void 0}function u(L){return typeof L=="number"||Object.prototype.toString.call(L)==="[object Number]"}function g(L){return L instanceof Date||Object.prototype.toString.call(L)==="[object Date]"}function y(L,$){var ee=[],re,ue=L.length;for(re=0;re<ue;++re)ee.push($(L[re],re));return ee}function w(L,$){for(var ee in $)c($,ee)&&(L[ee]=$[ee]);return c($,"toString")&&(L.toString=$.toString),c($,"valueOf")&&(L.valueOf=$.valueOf),L}function v(L,$,ee,re){return ek(L,$,ee,re,!0).utc()}function S(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function m(L){return L._pf==null&&(L._pf=S()),L._pf}var p;Array.prototype.some?p=Array.prototype.some:p=function(L){var $=Object(this),ee=$.length>>>0,re;for(re=0;re<ee;re++)if(re in $&&L.call(this,$[re],re,$))return!0;return!1};function b(L){var $=null,ee=!1,re=L._d&&!isNaN(L._d.getTime());if(re&&($=m(L),ee=p.call($.parsedDateParts,function(ue){return ue!=null}),re=$.overflow<0&&!$.empty&&!$.invalidEra&&!$.invalidMonth&&!$.invalidWeekday&&!$.weekdayMismatch&&!$.nullInput&&!$.invalidFormat&&!$.userInvalidated&&(!$.meridiem||$.meridiem&&ee),L._strict&&(re=re&&$.charsLeftOver===0&&$.unusedTokens.length===0&&$.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(L))L._isValid=re;else return re;return L._isValid}function x(L){var $=v(NaN);return L!=null?w(m($),L):m($).userInvalidated=!0,$}var k=a.momentProperties=[],N=!1;function _(L,$){var ee,re,ue,Ne=k.length;if(d($._isAMomentObject)||(L._isAMomentObject=$._isAMomentObject),d($._i)||(L._i=$._i),d($._f)||(L._f=$._f),d($._l)||(L._l=$._l),d($._strict)||(L._strict=$._strict),d($._tzm)||(L._tzm=$._tzm),d($._isUTC)||(L._isUTC=$._isUTC),d($._offset)||(L._offset=$._offset),d($._pf)||(L._pf=m($)),d($._locale)||(L._locale=$._locale),Ne>0)for(ee=0;ee<Ne;ee++)re=k[ee],ue=$[re],d(ue)||(L[re]=ue);return L}function C(L){_(this,L),this._d=new Date(L._d!=null?L._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),N===!1&&(N=!0,a.updateOffset(this),N=!1)}function E(L){return L instanceof C||L!=null&&L._isAMomentObject!=null}function T(L){a.suppressDeprecationWarnings===!1&&typeof console!="undefined"&&console.warn&&console.warn("Deprecation warning: "+L)}function D(L,$){var ee=!0;return w(function(){if(a.deprecationHandler!=null&&a.deprecationHandler(null,L),ee){var re=[],ue,Ne,Pe,gt=arguments.length;for(Ne=0;Ne<gt;Ne++){if(ue="",typeof arguments[Ne]=="object"){ue+=`
[`+Ne+"] ";for(Pe in arguments[0])c(arguments[0],Pe)&&(ue+=Pe+": "+arguments[0][Pe]+", ");ue=ue.slice(0,-2)}else ue=arguments[Ne];re.push(ue)}T(L+`
Arguments: `+Array.prototype.slice.call(re).join("")+`
`+new Error().stack),ee=!1}return $.apply(this,arguments)},$)}var P={};function M(L,$){a.deprecationHandler!=null&&a.deprecationHandler(L,$),P[L]||(T($),P[L]=!0)}a.suppressDeprecationWarnings=!1,a.deprecationHandler=null;function O(L){return typeof Function!="undefined"&&L instanceof Function||Object.prototype.toString.call(L)==="[object Function]"}function F(L){var $,ee;for(ee in L)c(L,ee)&&($=L[ee],O($)?this[ee]=$:this["_"+ee]=$);this._config=L,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function z(L,$){var ee=w({},L),re;for(re in $)c($,re)&&(o(L[re])&&o($[re])?(ee[re]={},w(ee[re],L[re]),w(ee[re],$[re])):$[re]!=null?ee[re]=$[re]:delete ee[re]);for(re in L)c(L,re)&&!c($,re)&&o(L[re])&&(ee[re]=w({},ee[re]));return ee}function H(L){L!=null&&this.set(L)}var A;Object.keys?A=Object.keys:A=function(L){var $,ee=[];for($ in L)c(L,$)&&ee.push($);return ee};var j={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function I(L,$,ee){var re=this._calendar[L]||this._calendar.sameElse;return O(re)?re.call($,ee):re}function B(L,$,ee){var re=""+Math.abs(L),ue=$-re.length,Ne=L>=0;return(Ne?ee?"+":"":"-")+Math.pow(10,Math.max(0,ue)).toString().substr(1)+re}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},V={};function X(L,$,ee,re){var ue=re;typeof re=="string"&&(ue=function(){return this[re]()}),L&&(V[L]=ue),$&&(V[$[0]]=function(){return B(ue.apply(this,arguments),$[1],$[2])}),ee&&(V[ee]=function(){return this.localeData().ordinal(ue.apply(this,arguments),L)})}function ne(L){return L.match(/\[[\s\S]/)?L.replace(/^\[|\]$/g,""):L.replace(/\\/g,"")}function oe(L){var $=L.match(Y),ee,re;for(ee=0,re=$.length;ee<re;ee++)V[$[ee]]?$[ee]=V[$[ee]]:$[ee]=ne($[ee]);return function(ue){var Ne="",Pe;for(Pe=0;Pe<re;Pe++)Ne+=O($[Pe])?$[Pe].call(ue,L):$[Pe];return Ne}}function q(L,$){return L.isValid()?($=te($,L.localeData()),W[$]=W[$]||oe($),W[$](L)):L.localeData().invalidDate()}function te(L,$){var ee=5;function re(ue){return $.longDateFormat(ue)||ue}for(U.lastIndex=0;ee>=0&&U.test(L);)L=L.replace(U,re),U.lastIndex=0,ee-=1;return L}var G={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function J(L){var $=this._longDateFormat[L],ee=this._longDateFormat[L.toUpperCase()];return $||!ee?$:(this._longDateFormat[L]=ee.match(Y).map(function(re){return re==="MMMM"||re==="MM"||re==="DD"||re==="dddd"?re.slice(1):re}).join(""),this._longDateFormat[L])}var K="Invalid date";function Q(){return this._invalidDate}var Z="%d",se=/\d{1,2}/;function ce(L){return this._ordinal.replace("%d",L)}var le={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ae(L,$,ee,re){var ue=this._relativeTime[ee];return O(ue)?ue(L,$,ee,re):ue.replace(/%d/i,L)}function ie(L,$){var ee=this._relativeTime[L>0?"future":"past"];return O(ee)?ee($):ee.replace(/%s/i,$)}var de={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fe(L){return typeof L=="string"?de[L]||de[L.toLowerCase()]:void 0}function be(L){var $={},ee,re;for(re in L)c(L,re)&&(ee=fe(re),ee&&($[ee]=L[re]));return $}var he={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ve(L){var $=[],ee;for(ee in L)c(L,ee)&&$.push({unit:ee,priority:he[ee]});return $.sort(function(re,ue){return re.priority-ue.priority}),$}var Ce=/\d/,nt=/\d\d/,Ae=/\d{3}/,Je=/\d{4}/,ze=/[+-]?\d{6}/,We=/\d\d?/,bt=/\d\d\d\d?/,Et=/\d\d\d\d\d\d?/,wt=/\d{1,3}/,At=/\d{1,4}/,Yt=/[+-]?\d{1,6}/,xn=/\d+/,Bn=/[+-]?\d+/,zn=/Z|[+-]\d\d:?\d\d/gi,Kn=/Z|[+-]\d\d(?::?\d\d)?/gi,ca=/[+-]?\d+(\.\d{1,3})?/,ht=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ht=/^[1-9]\d?/,Dt=/^([1-9]\d|\d)/,Lt;Lt={};function Le(L,$,ee){Lt[L]=O($)?$:function(re,ue){return re&&ee?ee:$}}function Ze(L,$){return c(Lt,L)?Lt[L]($._strict,$._locale):new RegExp(It(L))}function It(L){return un(L.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function($,ee,re,ue,Ne){return ee||re||ue||Ne}))}function un(L){return L.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ye(L){return L<0?Math.ceil(L)||0:Math.floor(L)}function Ge(L){var $=+L,ee=0;return $!==0&&isFinite($)&&(ee=Ye($)),ee}var kt={};function vt(L,$){var ee,re=$,ue;for(typeof L=="string"&&(L=[L]),u($)&&(re=function(Ne,Pe){Pe[$]=Ge(Ne)}),ue=L.length,ee=0;ee<ue;ee++)kt[L[ee]]=re}function pn(L,$){vt(L,function(ee,re,ue,Ne){ue._w=ue._w||{},$(ee,ue._w,ue,Ne)})}function da(L,$,ee){$!=null&&c(kt,L)&&kt[L]($,ee._a,ee,L)}function Vn(L){return L%4===0&&L%100!==0||L%400===0}var Me=0,Ve=1,He=2,at=3,Tt=4,Gt=5,ft=6,qt=7,qe=8;X("Y",0,0,function(){var L=this.year();return L<=9999?B(L,4):"+"+L}),X(0,["YY",2],0,function(){return this.year()%100}),X(0,["YYYY",4],0,"year"),X(0,["YYYYY",5],0,"year"),X(0,["YYYYYY",6,!0],0,"year"),Le("Y",Bn),Le("YY",We,nt),Le("YYYY",At,Je),Le("YYYYY",Yt,ze),Le("YYYYYY",Yt,ze),vt(["YYYYY","YYYYYY"],Me),vt("YYYY",function(L,$){$[Me]=L.length===2?a.parseTwoDigitYear(L):Ge(L)}),vt("YY",function(L,$){$[Me]=a.parseTwoDigitYear(L)}),vt("Y",function(L,$){$[Me]=parseInt(L,10)});function ye(L){return Vn(L)?366:365}a.parseTwoDigitYear=function(L){return Ge(L)+(Ge(L)>68?1900:2e3)};var Fe=Nt("FullYear",!0);function ot(){return Vn(this.year())}function Nt(L,$){return function(ee){return ee!=null?(Cn(this,L,ee),a.updateOffset(this,$),this):Kt(this,L)}}function Kt(L,$){if(!L.isValid())return NaN;var ee=L._d,re=L._isUTC;switch($){case"Milliseconds":return re?ee.getUTCMilliseconds():ee.getMilliseconds();case"Seconds":return re?ee.getUTCSeconds():ee.getSeconds();case"Minutes":return re?ee.getUTCMinutes():ee.getMinutes();case"Hours":return re?ee.getUTCHours():ee.getHours();case"Date":return re?ee.getUTCDate():ee.getDate();case"Day":return re?ee.getUTCDay():ee.getDay();case"Month":return re?ee.getUTCMonth():ee.getMonth();case"FullYear":return re?ee.getUTCFullYear():ee.getFullYear();default:return NaN}}function Cn(L,$,ee){var re,ue,Ne,Pe,gt;if(!(!L.isValid()||isNaN(ee))){switch(re=L._d,ue=L._isUTC,$){case"Milliseconds":return void(ue?re.setUTCMilliseconds(ee):re.setMilliseconds(ee));case"Seconds":return void(ue?re.setUTCSeconds(ee):re.setSeconds(ee));case"Minutes":return void(ue?re.setUTCMinutes(ee):re.setMinutes(ee));case"Hours":return void(ue?re.setUTCHours(ee):re.setHours(ee));case"Date":return void(ue?re.setUTCDate(ee):re.setDate(ee));case"FullYear":break;default:return}Ne=ee,Pe=L.month(),gt=L.date(),gt=gt===29&&Pe===1&&!Vn(Ne)?28:gt,ue?re.setUTCFullYear(Ne,Pe,gt):re.setFullYear(Ne,Pe,gt)}}function Ea(L){return L=fe(L),O(this[L])?this[L]():this}function fr(L,$){if(typeof L=="object"){L=be(L);var ee=ve(L),re,ue=ee.length;for(re=0;re<ue;re++)this[ee[re].unit](L[ee[re].unit])}else if(L=fe(L),O(this[L]))return this[L]($);return this}function di(L,$){return(L%$+$)%$}var nn;Array.prototype.indexOf?nn=Array.prototype.indexOf:nn=function(L){var $;for($=0;$<this.length;++$)if(this[$]===L)return $;return-1};function rd(L,$){if(isNaN(L)||isNaN($))return NaN;var ee=di($,12);return L+=($-ee)/12,ee===1?Vn(L)?29:28:31-ee%7%2}X("M",["MM",2],"Mo",function(){return this.month()+1}),X("MMM",0,0,function(L){return this.localeData().monthsShort(this,L)}),X("MMMM",0,0,function(L){return this.localeData().months(this,L)}),Le("M",We,Ht),Le("MM",We,nt),Le("MMM",function(L,$){return $.monthsShortRegex(L)}),Le("MMMM",function(L,$){return $.monthsRegex(L)}),vt(["M","MM"],function(L,$){$[Ve]=Ge(L)-1}),vt(["MMM","MMMM"],function(L,$,ee,re){var ue=ee._locale.monthsParse(L,re,ee._strict);ue!=null?$[Ve]=ue:m(ee).invalidMonth=L});var jh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),$S="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),BS=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,m$=ht,p$=ht;function h$(L,$){return L?i(this._months)?this._months[L.month()]:this._months[(this._months.isFormat||BS).test($)?"format":"standalone"][L.month()]:i(this._months)?this._months:this._months.standalone}function g$(L,$){return L?i(this._monthsShort)?this._monthsShort[L.month()]:this._monthsShort[BS.test($)?"format":"standalone"][L.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function b$(L,$,ee){var re,ue,Ne,Pe=L.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],re=0;re<12;++re)Ne=v([2e3,re]),this._shortMonthsParse[re]=this.monthsShort(Ne,"").toLocaleLowerCase(),this._longMonthsParse[re]=this.months(Ne,"").toLocaleLowerCase();return ee?$==="MMM"?(ue=nn.call(this._shortMonthsParse,Pe),ue!==-1?ue:null):(ue=nn.call(this._longMonthsParse,Pe),ue!==-1?ue:null):$==="MMM"?(ue=nn.call(this._shortMonthsParse,Pe),ue!==-1?ue:(ue=nn.call(this._longMonthsParse,Pe),ue!==-1?ue:null)):(ue=nn.call(this._longMonthsParse,Pe),ue!==-1?ue:(ue=nn.call(this._shortMonthsParse,Pe),ue!==-1?ue:null))}function y$(L,$,ee){var re,ue,Ne;if(this._monthsParseExact)return b$.call(this,L,$,ee);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),re=0;re<12;re++){if(ue=v([2e3,re]),ee&&!this._longMonthsParse[re]&&(this._longMonthsParse[re]=new RegExp("^"+this.months(ue,"").replace(".","")+"$","i"),this._shortMonthsParse[re]=new RegExp("^"+this.monthsShort(ue,"").replace(".","")+"$","i")),!ee&&!this._monthsParse[re]&&(Ne="^"+this.months(ue,"")+"|^"+this.monthsShort(ue,""),this._monthsParse[re]=new RegExp(Ne.replace(".",""),"i")),ee&&$==="MMMM"&&this._longMonthsParse[re].test(L))return re;if(ee&&$==="MMM"&&this._shortMonthsParse[re].test(L))return re;if(!ee&&this._monthsParse[re].test(L))return re}}function HS(L,$){if(!L.isValid())return L;if(typeof $=="string"){if(/^\d+$/.test($))$=Ge($);else if($=L.localeData().monthsParse($),!u($))return L}var ee=$,re=L.date();return re=re<29?re:Math.min(re,rd(L.year(),ee)),L._isUTC?L._d.setUTCMonth(ee,re):L._d.setMonth(ee,re),L}function US(L){return L!=null?(HS(this,L),a.updateOffset(this,!0),this):Kt(this,"Month")}function x$(){return rd(this.year(),this.month())}function w$(L){return this._monthsParseExact?(c(this,"_monthsRegex")||VS.call(this),L?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=m$),this._monthsShortStrictRegex&&L?this._monthsShortStrictRegex:this._monthsShortRegex)}function v$(L){return this._monthsParseExact?(c(this,"_monthsRegex")||VS.call(this),L?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=p$),this._monthsStrictRegex&&L?this._monthsStrictRegex:this._monthsRegex)}function VS(){function L(Ot,hn){return hn.length-Ot.length}var $=[],ee=[],re=[],ue,Ne,Pe,gt;for(ue=0;ue<12;ue++)Ne=v([2e3,ue]),Pe=un(this.monthsShort(Ne,"")),gt=un(this.months(Ne,"")),$.push(Pe),ee.push(gt),re.push(gt),re.push(Pe);$.sort(L),ee.sort(L),re.sort(L),this._monthsRegex=new RegExp("^("+re.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+ee.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+$.join("|")+")","i")}function _$(L,$,ee,re,ue,Ne,Pe){var gt;return L<100&&L>=0?(gt=new Date(L+400,$,ee,re,ue,Ne,Pe),isFinite(gt.getFullYear())&&gt.setFullYear(L)):gt=new Date(L,$,ee,re,ue,Ne,Pe),gt}function Mf(L){var $,ee;return L<100&&L>=0?(ee=Array.prototype.slice.call(arguments),ee[0]=L+400,$=new Date(Date.UTC.apply(null,ee)),isFinite($.getUTCFullYear())&&$.setUTCFullYear(L)):$=new Date(Date.UTC.apply(null,arguments)),$}function zh(L,$,ee){var re=7+$-ee,ue=(7+Mf(L,0,re).getUTCDay()-$)%7;return-ue+re-1}function WS(L,$,ee,re,ue){var Ne=(7+ee-re)%7,Pe=zh(L,re,ue),gt=1+7*($-1)+Ne+Pe,Ot,hn;return gt<=0?(Ot=L-1,hn=ye(Ot)+gt):gt>ye(L)?(Ot=L+1,hn=gt-ye(L)):(Ot=L,hn=gt),{year:Ot,dayOfYear:hn}}function Af(L,$,ee){var re=zh(L.year(),$,ee),ue=Math.floor((L.dayOfYear()-re-1)/7)+1,Ne,Pe;return ue<1?(Pe=L.year()-1,Ne=ue+zi(Pe,$,ee)):ue>zi(L.year(),$,ee)?(Ne=ue-zi(L.year(),$,ee),Pe=L.year()+1):(Pe=L.year(),Ne=ue),{week:Ne,year:Pe}}function zi(L,$,ee){var re=zh(L,$,ee),ue=zh(L+1,$,ee);return(ye(L)-re+ue)/7}X("w",["ww",2],"wo","week"),X("W",["WW",2],"Wo","isoWeek"),Le("w",We,Ht),Le("ww",We,nt),Le("W",We,Ht),Le("WW",We,nt),pn(["w","ww","W","WW"],function(L,$,ee,re){$[re.substr(0,1)]=Ge(L)});function N$(L){return Af(L,this._week.dow,this._week.doy).week}var S$={dow:0,doy:6};function k$(){return this._week.dow}function C$(){return this._week.doy}function E$(L){var $=this.localeData().week(this);return L==null?$:this.add((L-$)*7,"d")}function T$(L){var $=Af(this,1,4).week;return L==null?$:this.add((L-$)*7,"d")}X("d",0,"do","day"),X("dd",0,0,function(L){return this.localeData().weekdaysMin(this,L)}),X("ddd",0,0,function(L){return this.localeData().weekdaysShort(this,L)}),X("dddd",0,0,function(L){return this.localeData().weekdays(this,L)}),X("e",0,0,"weekday"),X("E",0,0,"isoWeekday"),Le("d",We),Le("e",We),Le("E",We),Le("dd",function(L,$){return $.weekdaysMinRegex(L)}),Le("ddd",function(L,$){return $.weekdaysShortRegex(L)}),Le("dddd",function(L,$){return $.weekdaysRegex(L)}),pn(["dd","ddd","dddd"],function(L,$,ee,re){var ue=ee._locale.weekdaysParse(L,re,ee._strict);ue!=null?$.d=ue:m(ee).invalidWeekday=L}),pn(["d","e","E"],function(L,$,ee,re){$[re]=Ge(L)});function L$(L,$){return typeof L!="string"?L:isNaN(L)?(L=$.weekdaysParse(L),typeof L=="number"?L:null):parseInt(L,10)}function D$(L,$){return typeof L=="string"?$.weekdaysParse(L)%7||7:isNaN(L)?null:L}function zx(L,$){return L.slice($,7).concat(L.slice(0,$))}var M$="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),YS="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),A$="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),I$=ht,O$=ht,P$=ht;function R$(L,$){var ee=i(this._weekdays)?this._weekdays:this._weekdays[L&&L!==!0&&this._weekdays.isFormat.test($)?"format":"standalone"];return L===!0?zx(ee,this._week.dow):L?ee[L.day()]:ee}function j$(L){return L===!0?zx(this._weekdaysShort,this._week.dow):L?this._weekdaysShort[L.day()]:this._weekdaysShort}function z$(L){return L===!0?zx(this._weekdaysMin,this._week.dow):L?this._weekdaysMin[L.day()]:this._weekdaysMin}function F$(L,$,ee){var re,ue,Ne,Pe=L.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],re=0;re<7;++re)Ne=v([2e3,1]).day(re),this._minWeekdaysParse[re]=this.weekdaysMin(Ne,"").toLocaleLowerCase(),this._shortWeekdaysParse[re]=this.weekdaysShort(Ne,"").toLocaleLowerCase(),this._weekdaysParse[re]=this.weekdays(Ne,"").toLocaleLowerCase();return ee?$==="dddd"?(ue=nn.call(this._weekdaysParse,Pe),ue!==-1?ue:null):$==="ddd"?(ue=nn.call(this._shortWeekdaysParse,Pe),ue!==-1?ue:null):(ue=nn.call(this._minWeekdaysParse,Pe),ue!==-1?ue:null):$==="dddd"?(ue=nn.call(this._weekdaysParse,Pe),ue!==-1||(ue=nn.call(this._shortWeekdaysParse,Pe),ue!==-1)?ue:(ue=nn.call(this._minWeekdaysParse,Pe),ue!==-1?ue:null)):$==="ddd"?(ue=nn.call(this._shortWeekdaysParse,Pe),ue!==-1||(ue=nn.call(this._weekdaysParse,Pe),ue!==-1)?ue:(ue=nn.call(this._minWeekdaysParse,Pe),ue!==-1?ue:null)):(ue=nn.call(this._minWeekdaysParse,Pe),ue!==-1||(ue=nn.call(this._weekdaysParse,Pe),ue!==-1)?ue:(ue=nn.call(this._shortWeekdaysParse,Pe),ue!==-1?ue:null))}function $$(L,$,ee){var re,ue,Ne;if(this._weekdaysParseExact)return F$.call(this,L,$,ee);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),re=0;re<7;re++){if(ue=v([2e3,1]).day(re),ee&&!this._fullWeekdaysParse[re]&&(this._fullWeekdaysParse[re]=new RegExp("^"+this.weekdays(ue,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[re]=new RegExp("^"+this.weekdaysShort(ue,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[re]=new RegExp("^"+this.weekdaysMin(ue,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[re]||(Ne="^"+this.weekdays(ue,"")+"|^"+this.weekdaysShort(ue,"")+"|^"+this.weekdaysMin(ue,""),this._weekdaysParse[re]=new RegExp(Ne.replace(".",""),"i")),ee&&$==="dddd"&&this._fullWeekdaysParse[re].test(L))return re;if(ee&&$==="ddd"&&this._shortWeekdaysParse[re].test(L))return re;if(ee&&$==="dd"&&this._minWeekdaysParse[re].test(L))return re;if(!ee&&this._weekdaysParse[re].test(L))return re}}function B$(L){if(!this.isValid())return L!=null?this:NaN;var $=Kt(this,"Day");return L!=null?(L=L$(L,this.localeData()),this.add(L-$,"d")):$}function H$(L){if(!this.isValid())return L!=null?this:NaN;var $=(this.day()+7-this.localeData()._week.dow)%7;return L==null?$:this.add(L-$,"d")}function U$(L){if(!this.isValid())return L!=null?this:NaN;if(L!=null){var $=D$(L,this.localeData());return this.day(this.day()%7?$:$-7)}else return this.day()||7}function V$(L){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Fx.call(this),L?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=I$),this._weekdaysStrictRegex&&L?this._weekdaysStrictRegex:this._weekdaysRegex)}function W$(L){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Fx.call(this),L?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=O$),this._weekdaysShortStrictRegex&&L?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Y$(L){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Fx.call(this),L?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=P$),this._weekdaysMinStrictRegex&&L?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Fx(){function L(mr,Ui){return Ui.length-mr.length}var $=[],ee=[],re=[],ue=[],Ne,Pe,gt,Ot,hn;for(Ne=0;Ne<7;Ne++)Pe=v([2e3,1]).day(Ne),gt=un(this.weekdaysMin(Pe,"")),Ot=un(this.weekdaysShort(Pe,"")),hn=un(this.weekdays(Pe,"")),$.push(gt),ee.push(Ot),re.push(hn),ue.push(gt),ue.push(Ot),ue.push(hn);$.sort(L),ee.sort(L),re.sort(L),ue.sort(L),this._weekdaysRegex=new RegExp("^("+ue.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+re.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+ee.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+$.join("|")+")","i")}function $x(){return this.hours()%12||12}function G$(){return this.hours()||24}X("H",["HH",2],0,"hour"),X("h",["hh",2],0,$x),X("k",["kk",2],0,G$),X("hmm",0,0,function(){return""+$x.apply(this)+B(this.minutes(),2)}),X("hmmss",0,0,function(){return""+$x.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),X("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),X("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)});function GS(L,$){X(L,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),$)})}GS("a",!0),GS("A",!1);function qS(L,$){return $._meridiemParse}Le("a",qS),Le("A",qS),Le("H",We,Dt),Le("h",We,Ht),Le("k",We,Ht),Le("HH",We,nt),Le("hh",We,nt),Le("kk",We,nt),Le("hmm",bt),Le("hmmss",Et),Le("Hmm",bt),Le("Hmmss",Et),vt(["H","HH"],at),vt(["k","kk"],function(L,$,ee){var re=Ge(L);$[at]=re===24?0:re}),vt(["a","A"],function(L,$,ee){ee._isPm=ee._locale.isPM(L),ee._meridiem=L}),vt(["h","hh"],function(L,$,ee){$[at]=Ge(L),m(ee).bigHour=!0}),vt("hmm",function(L,$,ee){var re=L.length-2;$[at]=Ge(L.substr(0,re)),$[Tt]=Ge(L.substr(re)),m(ee).bigHour=!0}),vt("hmmss",function(L,$,ee){var re=L.length-4,ue=L.length-2;$[at]=Ge(L.substr(0,re)),$[Tt]=Ge(L.substr(re,2)),$[Gt]=Ge(L.substr(ue)),m(ee).bigHour=!0}),vt("Hmm",function(L,$,ee){var re=L.length-2;$[at]=Ge(L.substr(0,re)),$[Tt]=Ge(L.substr(re))}),vt("Hmmss",function(L,$,ee){var re=L.length-4,ue=L.length-2;$[at]=Ge(L.substr(0,re)),$[Tt]=Ge(L.substr(re,2)),$[Gt]=Ge(L.substr(ue))});function q$(L){return(L+"").toLowerCase().charAt(0)==="p"}var Z$=/[ap]\.?m?\.?/i,Q$=Nt("Hours",!0);function J$(L,$,ee){return L>11?ee?"pm":"PM":ee?"am":"AM"}var ZS={calendar:j,longDateFormat:G,invalidDate:K,ordinal:Z,dayOfMonthOrdinalParse:se,relativeTime:le,months:jh,monthsShort:$S,week:S$,weekdays:M$,weekdaysMin:A$,weekdaysShort:YS,meridiemParse:Z$},Xn={},If={},Of;function K$(L,$){var ee,re=Math.min(L.length,$.length);for(ee=0;ee<re;ee+=1)if(L[ee]!==$[ee])return ee;return re}function QS(L){return L&&L.toLowerCase().replace("_","-")}function X$(L){for(var $=0,ee,re,ue,Ne;$<L.length;){for(Ne=QS(L[$]).split("-"),ee=Ne.length,re=QS(L[$+1]),re=re?re.split("-"):null;ee>0;){if(ue=Fh(Ne.slice(0,ee).join("-")),ue)return ue;if(re&&re.length>=ee&&K$(Ne,re)>=ee-1)break;ee--}$++}return Of}function eB(L){return!!(L&&L.match("^[^/\\\\]*$"))}function Fh(L){var $=null,ee;if(Xn[L]===void 0&&!0&&e&&e.exports&&eB(L))try{$=Of._abbr,ee=iL,ee("./locale/"+L),jo($)}catch{Xn[L]=null}return Xn[L]}function jo(L,$){var ee;return L&&(d($)?ee=Fi(L):ee=Bx(L,$),ee?Of=ee:typeof console!="undefined"&&console.warn&&console.warn("Locale "+L+" not found. Did you forget to load it?")),Of._abbr}function Bx(L,$){if($!==null){var ee,re=ZS;if($.abbr=L,Xn[L]!=null)M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),re=Xn[L]._config;else if($.parentLocale!=null)if(Xn[$.parentLocale]!=null)re=Xn[$.parentLocale]._config;else if(ee=Fh($.parentLocale),ee!=null)re=ee._config;else return If[$.parentLocale]||(If[$.parentLocale]=[]),If[$.parentLocale].push({name:L,config:$}),null;return Xn[L]=new H(z(re,$)),If[L]&&If[L].forEach(function(ue){Bx(ue.name,ue.config)}),jo(L),Xn[L]}else return delete Xn[L],null}function tB(L,$){if($!=null){var ee,re,ue=ZS;Xn[L]!=null&&Xn[L].parentLocale!=null?Xn[L].set(z(Xn[L]._config,$)):(re=Fh(L),re!=null&&(ue=re._config),$=z(ue,$),re==null&&($.abbr=L),ee=new H($),ee.parentLocale=Xn[L],Xn[L]=ee),jo(L)}else Xn[L]!=null&&(Xn[L].parentLocale!=null?(Xn[L]=Xn[L].parentLocale,L===jo()&&jo(L)):Xn[L]!=null&&delete Xn[L]);return Xn[L]}function Fi(L){var $;if(L&&L._locale&&L._locale._abbr&&(L=L._locale._abbr),!L)return Of;if(!i(L)){if($=Fh(L),$)return $;L=[L]}return X$(L)}function nB(){return A(Xn)}function Hx(L){var $,ee=L._a;return ee&&m(L).overflow===-2&&($=ee[Ve]<0||ee[Ve]>11?Ve:ee[He]<1||ee[He]>rd(ee[Me],ee[Ve])?He:ee[at]<0||ee[at]>24||ee[at]===24&&(ee[Tt]!==0||ee[Gt]!==0||ee[ft]!==0)?at:ee[Tt]<0||ee[Tt]>59?Tt:ee[Gt]<0||ee[Gt]>59?Gt:ee[ft]<0||ee[ft]>999?ft:-1,m(L)._overflowDayOfYear&&($<Me||$>He)&&($=He),m(L)._overflowWeeks&&$===-1&&($=qt),m(L)._overflowWeekday&&$===-1&&($=qe),m(L).overflow=$),L}var aB=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rB=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sB=/Z|[+-]\d\d(?::?\d\d)?/,$h=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ux=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],iB=/^\/?Date\((-?\d+)/i,oB=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,lB={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function JS(L){var $,ee,re=L._i,ue=aB.exec(re)||rB.exec(re),Ne,Pe,gt,Ot,hn=$h.length,mr=Ux.length;if(ue){for(m(L).iso=!0,$=0,ee=hn;$<ee;$++)if($h[$][1].exec(ue[1])){Pe=$h[$][0],Ne=$h[$][2]!==!1;break}if(Pe==null){L._isValid=!1;return}if(ue[3]){for($=0,ee=mr;$<ee;$++)if(Ux[$][1].exec(ue[3])){gt=(ue[2]||" ")+Ux[$][0];break}if(gt==null){L._isValid=!1;return}}if(!Ne&&gt!=null){L._isValid=!1;return}if(ue[4])if(sB.exec(ue[4]))Ot="Z";else{L._isValid=!1;return}L._f=Pe+(gt||"")+(Ot||""),Wx(L)}else L._isValid=!1}function cB(L,$,ee,re,ue,Ne){var Pe=[dB(L),$S.indexOf($),parseInt(ee,10),parseInt(re,10),parseInt(ue,10)];return Ne&&Pe.push(parseInt(Ne,10)),Pe}function dB(L){var $=parseInt(L,10);return $<=49?2e3+$:$<=999?1900+$:$}function uB(L){return L.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function fB(L,$,ee){if(L){var re=YS.indexOf(L),ue=new Date($[0],$[1],$[2]).getDay();if(re!==ue)return m(ee).weekdayMismatch=!0,ee._isValid=!1,!1}return!0}function mB(L,$,ee){if(L)return lB[L];if($)return 0;var re=parseInt(ee,10),ue=re%100,Ne=(re-ue)/100;return Ne*60+ue}function KS(L){var $=oB.exec(uB(L._i)),ee;if($){if(ee=cB($[4],$[3],$[2],$[5],$[6],$[7]),!fB($[1],ee,L))return;L._a=ee,L._tzm=mB($[8],$[9],$[10]),L._d=Mf.apply(null,L._a),L._d.setUTCMinutes(L._d.getUTCMinutes()-L._tzm),m(L).rfc2822=!0}else L._isValid=!1}function pB(L){var $=iB.exec(L._i);if($!==null){L._d=new Date(+$[1]);return}if(JS(L),L._isValid===!1)delete L._isValid;else return;if(KS(L),L._isValid===!1)delete L._isValid;else return;L._strict?L._isValid=!1:a.createFromInputFallback(L)}a.createFromInputFallback=D("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(L){L._d=new Date(L._i+(L._useUTC?" UTC":""))});function sd(L,$,ee){return L!=null?L:$!=null?$:ee}function hB(L){var $=new Date(a.now());return L._useUTC?[$.getUTCFullYear(),$.getUTCMonth(),$.getUTCDate()]:[$.getFullYear(),$.getMonth(),$.getDate()]}function Vx(L){var $,ee,re=[],ue,Ne,Pe;if(!L._d){for(ue=hB(L),L._w&&L._a[He]==null&&L._a[Ve]==null&&gB(L),L._dayOfYear!=null&&(Pe=sd(L._a[Me],ue[Me]),(L._dayOfYear>ye(Pe)||L._dayOfYear===0)&&(m(L)._overflowDayOfYear=!0),ee=Mf(Pe,0,L._dayOfYear),L._a[Ve]=ee.getUTCMonth(),L._a[He]=ee.getUTCDate()),$=0;$<3&&L._a[$]==null;++$)L._a[$]=re[$]=ue[$];for(;$<7;$++)L._a[$]=re[$]=L._a[$]==null?$===2?1:0:L._a[$];L._a[at]===24&&L._a[Tt]===0&&L._a[Gt]===0&&L._a[ft]===0&&(L._nextDay=!0,L._a[at]=0),L._d=(L._useUTC?Mf:_$).apply(null,re),Ne=L._useUTC?L._d.getUTCDay():L._d.getDay(),L._tzm!=null&&L._d.setUTCMinutes(L._d.getUTCMinutes()-L._tzm),L._nextDay&&(L._a[at]=24),L._w&&typeof L._w.d!="undefined"&&L._w.d!==Ne&&(m(L).weekdayMismatch=!0)}}function gB(L){var $,ee,re,ue,Ne,Pe,gt,Ot,hn;$=L._w,$.GG!=null||$.W!=null||$.E!=null?(Ne=1,Pe=4,ee=sd($.GG,L._a[Me],Af(Wn(),1,4).year),re=sd($.W,1),ue=sd($.E,1),(ue<1||ue>7)&&(Ot=!0)):(Ne=L._locale._week.dow,Pe=L._locale._week.doy,hn=Af(Wn(),Ne,Pe),ee=sd($.gg,L._a[Me],hn.year),re=sd($.w,hn.week),$.d!=null?(ue=$.d,(ue<0||ue>6)&&(Ot=!0)):$.e!=null?(ue=$.e+Ne,($.e<0||$.e>6)&&(Ot=!0)):ue=Ne),re<1||re>zi(ee,Ne,Pe)?m(L)._overflowWeeks=!0:Ot!=null?m(L)._overflowWeekday=!0:(gt=WS(ee,re,ue,Ne,Pe),L._a[Me]=gt.year,L._dayOfYear=gt.dayOfYear)}a.ISO_8601=function(){},a.RFC_2822=function(){};function Wx(L){if(L._f===a.ISO_8601){JS(L);return}if(L._f===a.RFC_2822){KS(L);return}L._a=[],m(L).empty=!0;var $=""+L._i,ee,re,ue,Ne,Pe,gt=$.length,Ot=0,hn,mr;for(ue=te(L._f,L._locale).match(Y)||[],mr=ue.length,ee=0;ee<mr;ee++)Ne=ue[ee],re=($.match(Ze(Ne,L))||[])[0],re&&(Pe=$.substr(0,$.indexOf(re)),Pe.length>0&&m(L).unusedInput.push(Pe),$=$.slice($.indexOf(re)+re.length),Ot+=re.length),V[Ne]?(re?m(L).empty=!1:m(L).unusedTokens.push(Ne),da(Ne,re,L)):L._strict&&!re&&m(L).unusedTokens.push(Ne);m(L).charsLeftOver=gt-Ot,$.length>0&&m(L).unusedInput.push($),L._a[at]<=12&&m(L).bigHour===!0&&L._a[at]>0&&(m(L).bigHour=void 0),m(L).parsedDateParts=L._a.slice(0),m(L).meridiem=L._meridiem,L._a[at]=bB(L._locale,L._a[at],L._meridiem),hn=m(L).era,hn!==null&&(L._a[Me]=L._locale.erasConvertYear(hn,L._a[Me])),Vx(L),Hx(L)}function bB(L,$,ee){var re;return ee==null?$:L.meridiemHour!=null?L.meridiemHour($,ee):(L.isPM!=null&&(re=L.isPM(ee),re&&$<12&&($+=12),!re&&$===12&&($=0)),$)}function yB(L){var $,ee,re,ue,Ne,Pe,gt=!1,Ot=L._f.length;if(Ot===0){m(L).invalidFormat=!0,L._d=new Date(NaN);return}for(ue=0;ue<Ot;ue++)Ne=0,Pe=!1,$=_({},L),L._useUTC!=null&&($._useUTC=L._useUTC),$._f=L._f[ue],Wx($),b($)&&(Pe=!0),Ne+=m($).charsLeftOver,Ne+=m($).unusedTokens.length*10,m($).score=Ne,gt?Ne<re&&(re=Ne,ee=$):(re==null||Ne<re||Pe)&&(re=Ne,ee=$,Pe&&(gt=!0));w(L,ee||$)}function xB(L){if(!L._d){var $=be(L._i),ee=$.day===void 0?$.date:$.day;L._a=y([$.year,$.month,ee,$.hour,$.minute,$.second,$.millisecond],function(re){return re&&parseInt(re,10)}),Vx(L)}}function wB(L){var $=new C(Hx(XS(L)));return $._nextDay&&($.add(1,"d"),$._nextDay=void 0),$}function XS(L){var $=L._i,ee=L._f;return L._locale=L._locale||Fi(L._l),$===null||ee===void 0&&$===""?x({nullInput:!0}):(typeof $=="string"&&(L._i=$=L._locale.preparse($)),E($)?new C(Hx($)):(g($)?L._d=$:i(ee)?yB(L):ee?Wx(L):vB(L),b(L)||(L._d=null),L))}function vB(L){var $=L._i;d($)?L._d=new Date(a.now()):g($)?L._d=new Date($.valueOf()):typeof $=="string"?pB(L):i($)?(L._a=y($.slice(0),function(ee){return parseInt(ee,10)}),Vx(L)):o($)?xB(L):u($)?L._d=new Date($):a.createFromInputFallback(L)}function ek(L,$,ee,re,ue){var Ne={};return($===!0||$===!1)&&(re=$,$=void 0),(ee===!0||ee===!1)&&(re=ee,ee=void 0),(o(L)&&l(L)||i(L)&&L.length===0)&&(L=void 0),Ne._isAMomentObject=!0,Ne._useUTC=Ne._isUTC=ue,Ne._l=ee,Ne._i=L,Ne._f=$,Ne._strict=re,wB(Ne)}function Wn(L,$,ee,re){return ek(L,$,ee,re,!1)}var _B=D("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var L=Wn.apply(null,arguments);return this.isValid()&&L.isValid()?L<this?this:L:x()}),NB=D("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var L=Wn.apply(null,arguments);return this.isValid()&&L.isValid()?L>this?this:L:x()});function tk(L,$){var ee,re;if($.length===1&&i($[0])&&($=$[0]),!$.length)return Wn();for(ee=$[0],re=1;re<$.length;++re)(!$[re].isValid()||$[re][L](ee))&&(ee=$[re]);return ee}function SB(){var L=[].slice.call(arguments,0);return tk("isBefore",L)}function kB(){var L=[].slice.call(arguments,0);return tk("isAfter",L)}var CB=function(){return Date.now?Date.now():+new Date},Pf=["year","quarter","month","week","day","hour","minute","second","millisecond"];function EB(L){var $,ee=!1,re,ue=Pf.length;for($ in L)if(c(L,$)&&!(nn.call(Pf,$)!==-1&&(L[$]==null||!isNaN(L[$]))))return!1;for(re=0;re<ue;++re)if(L[Pf[re]]){if(ee)return!1;parseFloat(L[Pf[re]])!==Ge(L[Pf[re]])&&(ee=!0)}return!0}function TB(){return this._isValid}function LB(){return js(NaN)}function Bh(L){var $=be(L),ee=$.year||0,re=$.quarter||0,ue=$.month||0,Ne=$.week||$.isoWeek||0,Pe=$.day||0,gt=$.hour||0,Ot=$.minute||0,hn=$.second||0,mr=$.millisecond||0;this._isValid=EB($),this._milliseconds=+mr+hn*1e3+Ot*6e4+gt*1e3*60*60,this._days=+Pe+Ne*7,this._months=+ue+re*3+ee*12,this._data={},this._locale=Fi(),this._bubble()}function Hh(L){return L instanceof Bh}function Yx(L){return L<0?Math.round(-1*L)*-1:Math.round(L)}function DB(L,$,ee){var re=Math.min(L.length,$.length),ue=Math.abs(L.length-$.length),Ne=0,Pe;for(Pe=0;Pe<re;Pe++)(ee&&L[Pe]!==$[Pe]||!ee&&Ge(L[Pe])!==Ge($[Pe]))&&Ne++;return Ne+ue}function nk(L,$){X(L,0,0,function(){var ee=this.utcOffset(),re="+";return ee<0&&(ee=-ee,re="-"),re+B(~~(ee/60),2)+$+B(~~ee%60,2)})}nk("Z",":"),nk("ZZ",""),Le("Z",Kn),Le("ZZ",Kn),vt(["Z","ZZ"],function(L,$,ee){ee._useUTC=!0,ee._tzm=Gx(Kn,L)});var MB=/([\+\-]|\d\d)/gi;function Gx(L,$){var ee=($||"").match(L),re,ue,Ne;return ee===null?null:(re=ee[ee.length-1]||[],ue=(re+"").match(MB)||["-",0,0],Ne=+(ue[1]*60)+Ge(ue[2]),Ne===0?0:ue[0]==="+"?Ne:-Ne)}function qx(L,$){var ee,re;return $._isUTC?(ee=$.clone(),re=(E(L)||g(L)?L.valueOf():Wn(L).valueOf())-ee.valueOf(),ee._d.setTime(ee._d.valueOf()+re),a.updateOffset(ee,!1),ee):Wn(L).local()}function Zx(L){return-Math.round(L._d.getTimezoneOffset())}a.updateOffset=function(){};function AB(L,$,ee){var re=this._offset||0,ue;if(!this.isValid())return L!=null?this:NaN;if(L!=null){if(typeof L=="string"){if(L=Gx(Kn,L),L===null)return this}else Math.abs(L)<16&&!ee&&(L=L*60);return!this._isUTC&&$&&(ue=Zx(this)),this._offset=L,this._isUTC=!0,ue!=null&&this.add(ue,"m"),re!==L&&(!$||this._changeInProgress?ik(this,js(L-re,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?re:Zx(this)}function IB(L,$){return L!=null?(typeof L!="string"&&(L=-L),this.utcOffset(L,$),this):-this.utcOffset()}function OB(L){return this.utcOffset(0,L)}function PB(L){return this._isUTC&&(this.utcOffset(0,L),this._isUTC=!1,L&&this.subtract(Zx(this),"m")),this}function RB(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var L=Gx(zn,this._i);L!=null?this.utcOffset(L):this.utcOffset(0,!0)}return this}function jB(L){return this.isValid()?(L=L?Wn(L).utcOffset():0,(this.utcOffset()-L)%60===0):!1}function zB(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function FB(){if(!d(this._isDSTShifted))return this._isDSTShifted;var L={},$;return _(L,this),L=XS(L),L._a?($=L._isUTC?v(L._a):Wn(L._a),this._isDSTShifted=this.isValid()&&DB(L._a,$.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function $B(){return this.isValid()?!this._isUTC:!1}function BB(){return this.isValid()?this._isUTC:!1}function ak(){return this.isValid()?this._isUTC&&this._offset===0:!1}var HB=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,UB=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function js(L,$){var ee=L,re=null,ue,Ne,Pe;return Hh(L)?ee={ms:L._milliseconds,d:L._days,M:L._months}:u(L)||!isNaN(+L)?(ee={},$?ee[$]=+L:ee.milliseconds=+L):(re=HB.exec(L))?(ue=re[1]==="-"?-1:1,ee={y:0,d:Ge(re[He])*ue,h:Ge(re[at])*ue,m:Ge(re[Tt])*ue,s:Ge(re[Gt])*ue,ms:Ge(Yx(re[ft]*1e3))*ue}):(re=UB.exec(L))?(ue=re[1]==="-"?-1:1,ee={y:Kl(re[2],ue),M:Kl(re[3],ue),w:Kl(re[4],ue),d:Kl(re[5],ue),h:Kl(re[6],ue),m:Kl(re[7],ue),s:Kl(re[8],ue)}):ee==null?ee={}:typeof ee=="object"&&("from"in ee||"to"in ee)&&(Pe=VB(Wn(ee.from),Wn(ee.to)),ee={},ee.ms=Pe.milliseconds,ee.M=Pe.months),Ne=new Bh(ee),Hh(L)&&c(L,"_locale")&&(Ne._locale=L._locale),Hh(L)&&c(L,"_isValid")&&(Ne._isValid=L._isValid),Ne}js.fn=Bh.prototype,js.invalid=LB;function Kl(L,$){var ee=L&&parseFloat(L.replace(",","."));return(isNaN(ee)?0:ee)*$}function rk(L,$){var ee={};return ee.months=$.month()-L.month()+($.year()-L.year())*12,L.clone().add(ee.months,"M").isAfter($)&&--ee.months,ee.milliseconds=+$-+L.clone().add(ee.months,"M"),ee}function VB(L,$){var ee;return L.isValid()&&$.isValid()?($=qx($,L),L.isBefore($)?ee=rk(L,$):(ee=rk($,L),ee.milliseconds=-ee.milliseconds,ee.months=-ee.months),ee):{milliseconds:0,months:0}}function sk(L,$){return function(ee,re){var ue,Ne;return re!==null&&!isNaN(+re)&&(M($,"moment()."+$+"(period, number) is deprecated. Please use moment()."+$+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),Ne=ee,ee=re,re=Ne),ue=js(ee,re),ik(this,ue,L),this}}function ik(L,$,ee,re){var ue=$._milliseconds,Ne=Yx($._days),Pe=Yx($._months);!L.isValid()||(re=re==null?!0:re,Pe&&HS(L,Kt(L,"Month")+Pe*ee),Ne&&Cn(L,"Date",Kt(L,"Date")+Ne*ee),ue&&L._d.setTime(L._d.valueOf()+ue*ee),re&&a.updateOffset(L,Ne||Pe))}var WB=sk(1,"add"),YB=sk(-1,"subtract");function ok(L){return typeof L=="string"||L instanceof String}function GB(L){return E(L)||g(L)||ok(L)||u(L)||ZB(L)||qB(L)||L===null||L===void 0}function qB(L){var $=o(L)&&!l(L),ee=!1,re=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],ue,Ne,Pe=re.length;for(ue=0;ue<Pe;ue+=1)Ne=re[ue],ee=ee||c(L,Ne);return $&&ee}function ZB(L){var $=i(L),ee=!1;return $&&(ee=L.filter(function(re){return!u(re)&&ok(L)}).length===0),$&&ee}function QB(L){var $=o(L)&&!l(L),ee=!1,re=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],ue,Ne;for(ue=0;ue<re.length;ue+=1)Ne=re[ue],ee=ee||c(L,Ne);return $&&ee}function JB(L,$){var ee=L.diff($,"days",!0);return ee<-6?"sameElse":ee<-1?"lastWeek":ee<0?"lastDay":ee<1?"sameDay":ee<2?"nextDay":ee<7?"nextWeek":"sameElse"}function KB(L,$){arguments.length===1&&(arguments[0]?GB(arguments[0])?(L=arguments[0],$=void 0):QB(arguments[0])&&($=arguments[0],L=void 0):(L=void 0,$=void 0));var ee=L||Wn(),re=qx(ee,this).startOf("day"),ue=a.calendarFormat(this,re)||"sameElse",Ne=$&&(O($[ue])?$[ue].call(this,ee):$[ue]);return this.format(Ne||this.localeData().calendar(ue,this,Wn(ee)))}function XB(){return new C(this)}function eH(L,$){var ee=E(L)?L:Wn(L);return this.isValid()&&ee.isValid()?($=fe($)||"millisecond",$==="millisecond"?this.valueOf()>ee.valueOf():ee.valueOf()<this.clone().startOf($).valueOf()):!1}function tH(L,$){var ee=E(L)?L:Wn(L);return this.isValid()&&ee.isValid()?($=fe($)||"millisecond",$==="millisecond"?this.valueOf()<ee.valueOf():this.clone().endOf($).valueOf()<ee.valueOf()):!1}function nH(L,$,ee,re){var ue=E(L)?L:Wn(L),Ne=E($)?$:Wn($);return this.isValid()&&ue.isValid()&&Ne.isValid()?(re=re||"()",(re[0]==="("?this.isAfter(ue,ee):!this.isBefore(ue,ee))&&(re[1]===")"?this.isBefore(Ne,ee):!this.isAfter(Ne,ee))):!1}function aH(L,$){var ee=E(L)?L:Wn(L),re;return this.isValid()&&ee.isValid()?($=fe($)||"millisecond",$==="millisecond"?this.valueOf()===ee.valueOf():(re=ee.valueOf(),this.clone().startOf($).valueOf()<=re&&re<=this.clone().endOf($).valueOf())):!1}function rH(L,$){return this.isSame(L,$)||this.isAfter(L,$)}function sH(L,$){return this.isSame(L,$)||this.isBefore(L,$)}function iH(L,$,ee){var re,ue,Ne;if(!this.isValid())return NaN;if(re=qx(L,this),!re.isValid())return NaN;switch(ue=(re.utcOffset()-this.utcOffset())*6e4,$=fe($),$){case"year":Ne=Uh(this,re)/12;break;case"month":Ne=Uh(this,re);break;case"quarter":Ne=Uh(this,re)/3;break;case"second":Ne=(this-re)/1e3;break;case"minute":Ne=(this-re)/6e4;break;case"hour":Ne=(this-re)/36e5;break;case"day":Ne=(this-re-ue)/864e5;break;case"week":Ne=(this-re-ue)/6048e5;break;default:Ne=this-re}return ee?Ne:Ye(Ne)}function Uh(L,$){if(L.date()<$.date())return-Uh($,L);var ee=($.year()-L.year())*12+($.month()-L.month()),re=L.clone().add(ee,"months"),ue,Ne;return $-re<0?(ue=L.clone().add(ee-1,"months"),Ne=($-re)/(re-ue)):(ue=L.clone().add(ee+1,"months"),Ne=($-re)/(ue-re)),-(ee+Ne)||0}a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",a.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function oH(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function lH(L){if(!this.isValid())return null;var $=L!==!0,ee=$?this.clone().utc():this;return ee.year()<0||ee.year()>9999?q(ee,$?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?$?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",q(ee,"Z")):q(ee,$?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cH(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var L="moment",$="",ee,re,ue,Ne;return this.isLocal()||(L=this.utcOffset()===0?"moment.utc":"moment.parseZone",$="Z"),ee="["+L+'("]',re=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",ue="-MM-DD[T]HH:mm:ss.SSS",Ne=$+'[")]',this.format(ee+re+ue+Ne)}function dH(L){L||(L=this.isUtc()?a.defaultFormatUtc:a.defaultFormat);var $=q(this,L);return this.localeData().postformat($)}function uH(L,$){return this.isValid()&&(E(L)&&L.isValid()||Wn(L).isValid())?js({to:this,from:L}).locale(this.locale()).humanize(!$):this.localeData().invalidDate()}function fH(L){return this.from(Wn(),L)}function mH(L,$){return this.isValid()&&(E(L)&&L.isValid()||Wn(L).isValid())?js({from:this,to:L}).locale(this.locale()).humanize(!$):this.localeData().invalidDate()}function pH(L){return this.to(Wn(),L)}function lk(L){var $;return L===void 0?this._locale._abbr:($=Fi(L),$!=null&&(this._locale=$),this)}var ck=D("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(L){return L===void 0?this.localeData():this.locale(L)});function dk(){return this._locale}var Vh=1e3,id=60*Vh,Wh=60*id,uk=(365*400+97)*24*Wh;function od(L,$){return(L%$+$)%$}function fk(L,$,ee){return L<100&&L>=0?new Date(L+400,$,ee)-uk:new Date(L,$,ee).valueOf()}function mk(L,$,ee){return L<100&&L>=0?Date.UTC(L+400,$,ee)-uk:Date.UTC(L,$,ee)}function hH(L){var $,ee;if(L=fe(L),L===void 0||L==="millisecond"||!this.isValid())return this;switch(ee=this._isUTC?mk:fk,L){case"year":$=ee(this.year(),0,1);break;case"quarter":$=ee(this.year(),this.month()-this.month()%3,1);break;case"month":$=ee(this.year(),this.month(),1);break;case"week":$=ee(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":$=ee(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":$=ee(this.year(),this.month(),this.date());break;case"hour":$=this._d.valueOf(),$-=od($+(this._isUTC?0:this.utcOffset()*id),Wh);break;case"minute":$=this._d.valueOf(),$-=od($,id);break;case"second":$=this._d.valueOf(),$-=od($,Vh);break}return this._d.setTime($),a.updateOffset(this,!0),this}function gH(L){var $,ee;if(L=fe(L),L===void 0||L==="millisecond"||!this.isValid())return this;switch(ee=this._isUTC?mk:fk,L){case"year":$=ee(this.year()+1,0,1)-1;break;case"quarter":$=ee(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":$=ee(this.year(),this.month()+1,1)-1;break;case"week":$=ee(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":$=ee(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":$=ee(this.year(),this.month(),this.date()+1)-1;break;case"hour":$=this._d.valueOf(),$+=Wh-od($+(this._isUTC?0:this.utcOffset()*id),Wh)-1;break;case"minute":$=this._d.valueOf(),$+=id-od($,id)-1;break;case"second":$=this._d.valueOf(),$+=Vh-od($,Vh)-1;break}return this._d.setTime($),a.updateOffset(this,!0),this}function bH(){return this._d.valueOf()-(this._offset||0)*6e4}function yH(){return Math.floor(this.valueOf()/1e3)}function xH(){return new Date(this.valueOf())}function wH(){var L=this;return[L.year(),L.month(),L.date(),L.hour(),L.minute(),L.second(),L.millisecond()]}function vH(){var L=this;return{years:L.year(),months:L.month(),date:L.date(),hours:L.hours(),minutes:L.minutes(),seconds:L.seconds(),milliseconds:L.milliseconds()}}function _H(){return this.isValid()?this.toISOString():null}function NH(){return b(this)}function SH(){return w({},m(this))}function kH(){return m(this).overflow}function CH(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}X("N",0,0,"eraAbbr"),X("NN",0,0,"eraAbbr"),X("NNN",0,0,"eraAbbr"),X("NNNN",0,0,"eraName"),X("NNNNN",0,0,"eraNarrow"),X("y",["y",1],"yo","eraYear"),X("y",["yy",2],0,"eraYear"),X("y",["yyy",3],0,"eraYear"),X("y",["yyyy",4],0,"eraYear"),Le("N",Qx),Le("NN",Qx),Le("NNN",Qx),Le("NNNN",jH),Le("NNNNN",zH),vt(["N","NN","NNN","NNNN","NNNNN"],function(L,$,ee,re){var ue=ee._locale.erasParse(L,re,ee._strict);ue?m(ee).era=ue:m(ee).invalidEra=L}),Le("y",xn),Le("yy",xn),Le("yyy",xn),Le("yyyy",xn),Le("yo",FH),vt(["y","yy","yyy","yyyy"],Me),vt(["yo"],function(L,$,ee,re){var ue;ee._locale._eraYearOrdinalRegex&&(ue=L.match(ee._locale._eraYearOrdinalRegex)),ee._locale.eraYearOrdinalParse?$[Me]=ee._locale.eraYearOrdinalParse(L,ue):$[Me]=parseInt(L,10)});function EH(L,$){var ee,re,ue,Ne=this._eras||Fi("en")._eras;for(ee=0,re=Ne.length;ee<re;++ee){switch(typeof Ne[ee].since){case"string":ue=a(Ne[ee].since).startOf("day"),Ne[ee].since=ue.valueOf();break}switch(typeof Ne[ee].until){case"undefined":Ne[ee].until=1/0;break;case"string":ue=a(Ne[ee].until).startOf("day").valueOf(),Ne[ee].until=ue.valueOf();break}}return Ne}function TH(L,$,ee){var re,ue,Ne=this.eras(),Pe,gt,Ot;for(L=L.toUpperCase(),re=0,ue=Ne.length;re<ue;++re)if(Pe=Ne[re].name.toUpperCase(),gt=Ne[re].abbr.toUpperCase(),Ot=Ne[re].narrow.toUpperCase(),ee)switch($){case"N":case"NN":case"NNN":if(gt===L)return Ne[re];break;case"NNNN":if(Pe===L)return Ne[re];break;case"NNNNN":if(Ot===L)return Ne[re];break}else if([Pe,gt,Ot].indexOf(L)>=0)return Ne[re]}function LH(L,$){var ee=L.since<=L.until?1:-1;return $===void 0?a(L.since).year():a(L.since).year()+($-L.offset)*ee}function DH(){var L,$,ee,re=this.localeData().eras();for(L=0,$=re.length;L<$;++L)if(ee=this.clone().startOf("day").valueOf(),re[L].since<=ee&&ee<=re[L].until||re[L].until<=ee&&ee<=re[L].since)return re[L].name;return""}function MH(){var L,$,ee,re=this.localeData().eras();for(L=0,$=re.length;L<$;++L)if(ee=this.clone().startOf("day").valueOf(),re[L].since<=ee&&ee<=re[L].until||re[L].until<=ee&&ee<=re[L].since)return re[L].narrow;return""}function AH(){var L,$,ee,re=this.localeData().eras();for(L=0,$=re.length;L<$;++L)if(ee=this.clone().startOf("day").valueOf(),re[L].since<=ee&&ee<=re[L].until||re[L].until<=ee&&ee<=re[L].since)return re[L].abbr;return""}function IH(){var L,$,ee,re,ue=this.localeData().eras();for(L=0,$=ue.length;L<$;++L)if(ee=ue[L].since<=ue[L].until?1:-1,re=this.clone().startOf("day").valueOf(),ue[L].since<=re&&re<=ue[L].until||ue[L].until<=re&&re<=ue[L].since)return(this.year()-a(ue[L].since).year())*ee+ue[L].offset;return this.year()}function OH(L){return c(this,"_erasNameRegex")||Jx.call(this),L?this._erasNameRegex:this._erasRegex}function PH(L){return c(this,"_erasAbbrRegex")||Jx.call(this),L?this._erasAbbrRegex:this._erasRegex}function RH(L){return c(this,"_erasNarrowRegex")||Jx.call(this),L?this._erasNarrowRegex:this._erasRegex}function Qx(L,$){return $.erasAbbrRegex(L)}function jH(L,$){return $.erasNameRegex(L)}function zH(L,$){return $.erasNarrowRegex(L)}function FH(L,$){return $._eraYearOrdinalRegex||xn}function Jx(){var L=[],$=[],ee=[],re=[],ue,Ne,Pe,gt,Ot,hn=this.eras();for(ue=0,Ne=hn.length;ue<Ne;++ue)Pe=un(hn[ue].name),gt=un(hn[ue].abbr),Ot=un(hn[ue].narrow),$.push(Pe),L.push(gt),ee.push(Ot),re.push(Pe),re.push(gt),re.push(Ot);this._erasRegex=new RegExp("^("+re.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+$.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+L.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+ee.join("|")+")","i")}X(0,["gg",2],0,function(){return this.weekYear()%100}),X(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Yh(L,$){X(0,[L,L.length],0,$)}Yh("gggg","weekYear"),Yh("ggggg","weekYear"),Yh("GGGG","isoWeekYear"),Yh("GGGGG","isoWeekYear"),Le("G",Bn),Le("g",Bn),Le("GG",We,nt),Le("gg",We,nt),Le("GGGG",At,Je),Le("gggg",At,Je),Le("GGGGG",Yt,ze),Le("ggggg",Yt,ze),pn(["gggg","ggggg","GGGG","GGGGG"],function(L,$,ee,re){$[re.substr(0,2)]=Ge(L)}),pn(["gg","GG"],function(L,$,ee,re){$[re]=a.parseTwoDigitYear(L)});function $H(L){return pk.call(this,L,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function BH(L){return pk.call(this,L,this.isoWeek(),this.isoWeekday(),1,4)}function HH(){return zi(this.year(),1,4)}function UH(){return zi(this.isoWeekYear(),1,4)}function VH(){var L=this.localeData()._week;return zi(this.year(),L.dow,L.doy)}function WH(){var L=this.localeData()._week;return zi(this.weekYear(),L.dow,L.doy)}function pk(L,$,ee,re,ue){var Ne;return L==null?Af(this,re,ue).year:(Ne=zi(L,re,ue),$>Ne&&($=Ne),YH.call(this,L,$,ee,re,ue))}function YH(L,$,ee,re,ue){var Ne=WS(L,$,ee,re,ue),Pe=Mf(Ne.year,0,Ne.dayOfYear);return this.year(Pe.getUTCFullYear()),this.month(Pe.getUTCMonth()),this.date(Pe.getUTCDate()),this}X("Q",0,"Qo","quarter"),Le("Q",Ce),vt("Q",function(L,$){$[Ve]=(Ge(L)-1)*3});function GH(L){return L==null?Math.ceil((this.month()+1)/3):this.month((L-1)*3+this.month()%3)}X("D",["DD",2],"Do","date"),Le("D",We,Ht),Le("DD",We,nt),Le("Do",function(L,$){return L?$._dayOfMonthOrdinalParse||$._ordinalParse:$._dayOfMonthOrdinalParseLenient}),vt(["D","DD"],He),vt("Do",function(L,$){$[He]=Ge(L.match(We)[0])});var hk=Nt("Date",!0);X("DDD",["DDDD",3],"DDDo","dayOfYear"),Le("DDD",wt),Le("DDDD",Ae),vt(["DDD","DDDD"],function(L,$,ee){ee._dayOfYear=Ge(L)});function qH(L){var $=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return L==null?$:this.add(L-$,"d")}X("m",["mm",2],0,"minute"),Le("m",We,Dt),Le("mm",We,nt),vt(["m","mm"],Tt);var ZH=Nt("Minutes",!1);X("s",["ss",2],0,"second"),Le("s",We,Dt),Le("ss",We,nt),vt(["s","ss"],Gt);var QH=Nt("Seconds",!1);X("S",0,0,function(){return~~(this.millisecond()/100)}),X(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),X(0,["SSS",3],0,"millisecond"),X(0,["SSSS",4],0,function(){return this.millisecond()*10}),X(0,["SSSSS",5],0,function(){return this.millisecond()*100}),X(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),X(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),X(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),X(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),Le("S",wt,Ce),Le("SS",wt,nt),Le("SSS",wt,Ae);var zo,gk;for(zo="SSSS";zo.length<=9;zo+="S")Le(zo,xn);function JH(L,$){$[ft]=Ge(("0."+L)*1e3)}for(zo="S";zo.length<=9;zo+="S")vt(zo,JH);gk=Nt("Milliseconds",!1),X("z",0,0,"zoneAbbr"),X("zz",0,0,"zoneName");function KH(){return this._isUTC?"UTC":""}function XH(){return this._isUTC?"Coordinated Universal Time":""}var et=C.prototype;et.add=WB,et.calendar=KB,et.clone=XB,et.diff=iH,et.endOf=gH,et.format=dH,et.from=uH,et.fromNow=fH,et.to=mH,et.toNow=pH,et.get=Ea,et.invalidAt=kH,et.isAfter=eH,et.isBefore=tH,et.isBetween=nH,et.isSame=aH,et.isSameOrAfter=rH,et.isSameOrBefore=sH,et.isValid=NH,et.lang=ck,et.locale=lk,et.localeData=dk,et.max=NB,et.min=_B,et.parsingFlags=SH,et.set=fr,et.startOf=hH,et.subtract=YB,et.toArray=wH,et.toObject=vH,et.toDate=xH,et.toISOString=lH,et.inspect=cH,typeof Symbol!="undefined"&&Symbol.for!=null&&(et[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),et.toJSON=_H,et.toString=oH,et.unix=yH,et.valueOf=bH,et.creationData=CH,et.eraName=DH,et.eraNarrow=MH,et.eraAbbr=AH,et.eraYear=IH,et.year=Fe,et.isLeapYear=ot,et.weekYear=$H,et.isoWeekYear=BH,et.quarter=et.quarters=GH,et.month=US,et.daysInMonth=x$,et.week=et.weeks=E$,et.isoWeek=et.isoWeeks=T$,et.weeksInYear=VH,et.weeksInWeekYear=WH,et.isoWeeksInYear=HH,et.isoWeeksInISOWeekYear=UH,et.date=hk,et.day=et.days=B$,et.weekday=H$,et.isoWeekday=U$,et.dayOfYear=qH,et.hour=et.hours=Q$,et.minute=et.minutes=ZH,et.second=et.seconds=QH,et.millisecond=et.milliseconds=gk,et.utcOffset=AB,et.utc=OB,et.local=PB,et.parseZone=RB,et.hasAlignedHourOffset=jB,et.isDST=zB,et.isLocal=$B,et.isUtcOffset=BB,et.isUtc=ak,et.isUTC=ak,et.zoneAbbr=KH,et.zoneName=XH,et.dates=D("dates accessor is deprecated. Use date instead.",hk),et.months=D("months accessor is deprecated. Use month instead",US),et.years=D("years accessor is deprecated. Use year instead",Fe),et.zone=D("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",IB),et.isDSTShifted=D("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",FB);function eU(L){return Wn(L*1e3)}function tU(){return Wn.apply(null,arguments).parseZone()}function bk(L){return L}var _n=H.prototype;_n.calendar=I,_n.longDateFormat=J,_n.invalidDate=Q,_n.ordinal=ce,_n.preparse=bk,_n.postformat=bk,_n.relativeTime=ae,_n.pastFuture=ie,_n.set=F,_n.eras=EH,_n.erasParse=TH,_n.erasConvertYear=LH,_n.erasAbbrRegex=PH,_n.erasNameRegex=OH,_n.erasNarrowRegex=RH,_n.months=h$,_n.monthsShort=g$,_n.monthsParse=y$,_n.monthsRegex=v$,_n.monthsShortRegex=w$,_n.week=N$,_n.firstDayOfYear=C$,_n.firstDayOfWeek=k$,_n.weekdays=R$,_n.weekdaysMin=z$,_n.weekdaysShort=j$,_n.weekdaysParse=$$,_n.weekdaysRegex=V$,_n.weekdaysShortRegex=W$,_n.weekdaysMinRegex=Y$,_n.isPM=q$,_n.meridiem=J$;function Gh(L,$,ee,re){var ue=Fi(),Ne=v().set(re,$);return ue[ee](Ne,L)}function yk(L,$,ee){if(u(L)&&($=L,L=void 0),L=L||"",$!=null)return Gh(L,$,ee,"month");var re,ue=[];for(re=0;re<12;re++)ue[re]=Gh(L,re,ee,"month");return ue}function Kx(L,$,ee,re){typeof L=="boolean"?(u($)&&(ee=$,$=void 0),$=$||""):($=L,ee=$,L=!1,u($)&&(ee=$,$=void 0),$=$||"");var ue=Fi(),Ne=L?ue._week.dow:0,Pe,gt=[];if(ee!=null)return Gh($,(ee+Ne)%7,re,"day");for(Pe=0;Pe<7;Pe++)gt[Pe]=Gh($,(Pe+Ne)%7,re,"day");return gt}function nU(L,$){return yk(L,$,"months")}function aU(L,$){return yk(L,$,"monthsShort")}function rU(L,$,ee){return Kx(L,$,ee,"weekdays")}function sU(L,$,ee){return Kx(L,$,ee,"weekdaysShort")}function iU(L,$,ee){return Kx(L,$,ee,"weekdaysMin")}jo("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(L){var $=L%10,ee=Ge(L%100/10)===1?"th":$===1?"st":$===2?"nd":$===3?"rd":"th";return L+ee}}),a.lang=D("moment.lang is deprecated. Use moment.locale instead.",jo),a.langData=D("moment.langData is deprecated. Use moment.localeData instead.",Fi);var $i=Math.abs;function oU(){var L=this._data;return this._milliseconds=$i(this._milliseconds),this._days=$i(this._days),this._months=$i(this._months),L.milliseconds=$i(L.milliseconds),L.seconds=$i(L.seconds),L.minutes=$i(L.minutes),L.hours=$i(L.hours),L.months=$i(L.months),L.years=$i(L.years),this}function xk(L,$,ee,re){var ue=js($,ee);return L._milliseconds+=re*ue._milliseconds,L._days+=re*ue._days,L._months+=re*ue._months,L._bubble()}function lU(L,$){return xk(this,L,$,1)}function cU(L,$){return xk(this,L,$,-1)}function wk(L){return L<0?Math.floor(L):Math.ceil(L)}function dU(){var L=this._milliseconds,$=this._days,ee=this._months,re=this._data,ue,Ne,Pe,gt,Ot;return L>=0&&$>=0&&ee>=0||L<=0&&$<=0&&ee<=0||(L+=wk(Xx(ee)+$)*864e5,$=0,ee=0),re.milliseconds=L%1e3,ue=Ye(L/1e3),re.seconds=ue%60,Ne=Ye(ue/60),re.minutes=Ne%60,Pe=Ye(Ne/60),re.hours=Pe%24,$+=Ye(Pe/24),Ot=Ye(vk($)),ee+=Ot,$-=wk(Xx(Ot)),gt=Ye(ee/12),ee%=12,re.days=$,re.months=ee,re.years=gt,this}function vk(L){return L*4800/146097}function Xx(L){return L*146097/4800}function uU(L){if(!this.isValid())return NaN;var $,ee,re=this._milliseconds;if(L=fe(L),L==="month"||L==="quarter"||L==="year")switch($=this._days+re/864e5,ee=this._months+vk($),L){case"month":return ee;case"quarter":return ee/3;case"year":return ee/12}else switch($=this._days+Math.round(Xx(this._months)),L){case"week":return $/7+re/6048e5;case"day":return $+re/864e5;case"hour":return $*24+re/36e5;case"minute":return $*1440+re/6e4;case"second":return $*86400+re/1e3;case"millisecond":return Math.floor($*864e5)+re;default:throw new Error("Unknown unit "+L)}}function Bi(L){return function(){return this.as(L)}}var _k=Bi("ms"),fU=Bi("s"),mU=Bi("m"),pU=Bi("h"),hU=Bi("d"),gU=Bi("w"),bU=Bi("M"),yU=Bi("Q"),xU=Bi("y"),wU=_k;function vU(){return js(this)}function _U(L){return L=fe(L),this.isValid()?this[L+"s"]():NaN}function Xl(L){return function(){return this.isValid()?this._data[L]:NaN}}var NU=Xl("milliseconds"),SU=Xl("seconds"),kU=Xl("minutes"),CU=Xl("hours"),EU=Xl("days"),TU=Xl("months"),LU=Xl("years");function DU(){return Ye(this.days()/7)}var Hi=Math.round,ld={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function MU(L,$,ee,re,ue){return ue.relativeTime($||1,!!ee,L,re)}function AU(L,$,ee,re){var ue=js(L).abs(),Ne=Hi(ue.as("s")),Pe=Hi(ue.as("m")),gt=Hi(ue.as("h")),Ot=Hi(ue.as("d")),hn=Hi(ue.as("M")),mr=Hi(ue.as("w")),Ui=Hi(ue.as("y")),Fo=Ne<=ee.ss&&["s",Ne]||Ne<ee.s&&["ss",Ne]||Pe<=1&&["m"]||Pe<ee.m&&["mm",Pe]||gt<=1&&["h"]||gt<ee.h&&["hh",gt]||Ot<=1&&["d"]||Ot<ee.d&&["dd",Ot];return ee.w!=null&&(Fo=Fo||mr<=1&&["w"]||mr<ee.w&&["ww",mr]),Fo=Fo||hn<=1&&["M"]||hn<ee.M&&["MM",hn]||Ui<=1&&["y"]||["yy",Ui],Fo[2]=$,Fo[3]=+L>0,Fo[4]=re,MU.apply(null,Fo)}function IU(L){return L===void 0?Hi:typeof L=="function"?(Hi=L,!0):!1}function OU(L,$){return ld[L]===void 0?!1:$===void 0?ld[L]:(ld[L]=$,L==="s"&&(ld.ss=$-1),!0)}function PU(L,$){if(!this.isValid())return this.localeData().invalidDate();var ee=!1,re=ld,ue,Ne;return typeof L=="object"&&($=L,L=!1),typeof L=="boolean"&&(ee=L),typeof $=="object"&&(re=Object.assign({},ld,$),$.s!=null&&$.ss==null&&(re.ss=$.s-1)),ue=this.localeData(),Ne=AU(this,!ee,re,ue),ee&&(Ne=ue.pastFuture(+this,Ne)),ue.postformat(Ne)}var e2=Math.abs;function cd(L){return(L>0)-(L<0)||+L}function qh(){if(!this.isValid())return this.localeData().invalidDate();var L=e2(this._milliseconds)/1e3,$=e2(this._days),ee=e2(this._months),re,ue,Ne,Pe,gt=this.asSeconds(),Ot,hn,mr,Ui;return gt?(re=Ye(L/60),ue=Ye(re/60),L%=60,re%=60,Ne=Ye(ee/12),ee%=12,Pe=L?L.toFixed(3).replace(/\.?0+$/,""):"",Ot=gt<0?"-":"",hn=cd(this._months)!==cd(gt)?"-":"",mr=cd(this._days)!==cd(gt)?"-":"",Ui=cd(this._milliseconds)!==cd(gt)?"-":"",Ot+"P"+(Ne?hn+Ne+"Y":"")+(ee?hn+ee+"M":"")+($?mr+$+"D":"")+(ue||re||L?"T":"")+(ue?Ui+ue+"H":"")+(re?Ui+re+"M":"")+(L?Ui+Pe+"S":"")):"P0D"}var bn=Bh.prototype;bn.isValid=TB,bn.abs=oU,bn.add=lU,bn.subtract=cU,bn.as=uU,bn.asMilliseconds=_k,bn.asSeconds=fU,bn.asMinutes=mU,bn.asHours=pU,bn.asDays=hU,bn.asWeeks=gU,bn.asMonths=bU,bn.asQuarters=yU,bn.asYears=xU,bn.valueOf=wU,bn._bubble=dU,bn.clone=vU,bn.get=_U,bn.milliseconds=NU,bn.seconds=SU,bn.minutes=kU,bn.hours=CU,bn.days=EU,bn.weeks=DU,bn.months=TU,bn.years=LU,bn.humanize=PU,bn.toISOString=qh,bn.toString=qh,bn.toJSON=qh,bn.locale=lk,bn.localeData=dk,bn.toIsoString=D("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",qh),bn.lang=ck,X("X",0,0,"unix"),X("x",0,0,"valueOf"),Le("x",Bn),Le("X",ca),vt("X",function(L,$,ee){ee._d=new Date(parseFloat(L)*1e3)}),vt("x",function(L,$,ee){ee._d=new Date(Ge(L))});//! moment.js
return a.version="2.30.1",r(Wn),a.fn=et,a.min=SB,a.max=kB,a.now=CB,a.utc=v,a.unix=eU,a.months=nU,a.isDate=g,a.locale=jo,a.invalid=x,a.duration=js,a.isMoment=E,a.weekdays=rU,a.parseZone=tU,a.localeData=Fi,a.isDuration=Hh,a.monthsShort=aU,a.weekdaysMin=iU,a.defineLocale=Bx,a.updateLocale=tB,a.locales=nB,a.weekdaysShort=sU,a.normalizeUnits=fe,a.relativeTimeRounding=IU,a.relativeTimeThreshold=OU,a.calendarFormat=JB,a.prototype=et,a.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},a})})(wR);var q1=wR.exports;function k3e({isOpen:e,closeModal:t,setIsAgreed:n}){const[a,r]=h.exports.useState(""),[i,o]=h.exports.useState(!1),{dispatch:c}=h.exports.useContext(we);async function l(){try{const d=await _t("cms","post",{where:["content_key = 'terms_and_conditions'"],limit:1,page:1},"PAGINATE");Array.isArray(d.list)&&d.list.length>0&&r(d.list[0].content_value)}catch(d){c({type:"SHOW_ERROR",payload:{heading:"Cannot get Terms and Conditions",message:d.message}})}}return h.exports.useEffect(()=>{l()},[]),f(Se,{children:[s("div",{className:`${e?"flex":"hidden"} fixed inset-0 items-center justify-center`}),s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-6xl transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg flex items-center justify-between font-medium leading-6 text-gray-900",children:[" ",s("button",{type:"button",onClick:t,className:"flex justify-end rounded-full border px-3 py-2 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("div",{className:"mt-2",children:s("article",{className:"sun-editor-editable my-8 max-h-[600px] overflow-y-auto text-sm",dangerouslySetInnerHTML:{__html:a}})}),f("div",{className:"checkbox-container",children:[s("input",{type:"checkbox",name:"i-agree",id:"i-agree",checked:i,onChange:()=>{o(d=>!d),n(d=>!d),t()}}),s("label",{htmlFor:"i-agree",className:"remove-select cursor-pointer items-center",children:"Yeah, I agree to everything"})]})]})})})})]})})]})}function vR(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=vR(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function li(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=vR(e))&&(a&&(a+=" "),a+=t);return a}const C3e=(e,t,n,a)=>{if(n==="length"||n==="prototype"||n==="arguments"||n==="caller")return;const r=Object.getOwnPropertyDescriptor(e,n),i=Object.getOwnPropertyDescriptor(t,n);!E3e(r,i)&&a||Object.defineProperty(e,n,i)},E3e=function(e,t){return e===void 0||e.configurable||e.writable===t.writable&&e.enumerable===t.enumerable&&e.configurable===t.configurable&&(e.writable||e.value===t.value)},T3e=(e,t)=>{const n=Object.getPrototypeOf(t);n!==Object.getPrototypeOf(e)&&Object.setPrototypeOf(e,n)},L3e=(e,t)=>`/* Wrapped ${e}*/
${t}`,D3e=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),M3e=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),A3e=(e,t,n)=>{const a=n===""?"":`with ${n.trim()}() `,r=L3e.bind(null,a,t.toString());Object.defineProperty(r,"name",M3e),Object.defineProperty(e,"toString",{...D3e,value:r})},I3e=(e,t,{ignoreNonConfigurable:n=!1}={})=>{const{name:a}=e;for(const r of Reflect.ownKeys(t))C3e(e,t,r,n);return T3e(e,t),A3e(e,t,a),e};var O3e=I3e,V4={exports:{}},P3e=()=>{const e={};return e.promise=new Promise((t,n)=>{e.resolve=t,e.reject=n}),e};(function(e,t){var n=sn&&sn.__awaiter||function(o,c,l,d){return new(l||(l=Promise))(function(u,g){function y(S){try{v(d.next(S))}catch(m){g(m)}}function w(S){try{v(d.throw(S))}catch(m){g(m)}}function v(S){S.done?u(S.value):new l(function(m){m(S.value)}).then(y,w)}v((d=d.apply(o,c||[])).next())})},a=sn&&sn.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(t,"__esModule",{value:!0});const r=a(P3e);function i(o,c="maxAge"){let l,d,u;const g=()=>n(this,void 0,void 0,function*(){if(l!==void 0)return;const v=S=>n(this,void 0,void 0,function*(){u=r.default();const m=S[1][c]-Date.now();if(m<=0){o.delete(S[0]),u.resolve();return}return l=S[0],d=setTimeout(()=>{o.delete(S[0]),u&&u.resolve()},m),typeof d.unref=="function"&&d.unref(),u.promise});try{for(const S of o)yield v(S)}catch{}l=void 0}),y=()=>{l=void 0,d!==void 0&&(clearTimeout(d),d=void 0),u!==void 0&&(u.reject(void 0),u=void 0)},w=o.set.bind(o);return o.set=(v,S)=>{o.has(v)&&o.delete(v);const m=w(v,S);return l&&l===v&&y(),g(),m},g(),o}t.default=i,e.exports=i,e.exports.default=i})(V4,V4.exports);const R3e=O3e,j3e=V4.exports,Ww=new WeakMap,_R=new WeakMap,Z1=(e,{cacheKey:t,cache:n=new Map,maxAge:a}={})=>{typeof a=="number"&&j3e(n);const r=function(...i){const o=t?t(i):i[0],c=n.get(o);if(c)return c.data;const l=e.apply(this,i);return n.set(o,{data:l,maxAge:a?Date.now()+a:Number.POSITIVE_INFINITY}),l};return R3e(r,e,{ignoreNonConfigurable:!0}),_R.set(r,n),r};Z1.decorator=(e={})=>(t,n,a)=>{const r=t[n];if(typeof r!="function")throw new TypeError("The decorated value must be a function");delete a.value,delete a.writable,a.get=function(){if(!Ww.has(this)){const i=Z1(r,e);return Ww.set(this,i),i}return Ww.get(this)}};Z1.clear=e=>{const t=_R.get(e);if(!t)throw new TypeError("Can't clear a function that was not memoized!");if(typeof t.clear!="function")throw new TypeError("The cache Map can't be cleared!");t.clear()};var NR=Z1;function z3e(e){return typeof e=="string"}function F3e(e,t,n){return n.indexOf(e)===t}function $3e(e){return e.toLowerCase()===e}function IE(e){return e.indexOf(",")===-1?e:e.split(",")}function W4(e){if(!e)return e;if(e==="C"||e==="posix"||e==="POSIX")return"en-US";if(e.indexOf(".")!==-1){var t=e.split(".")[0],n=t===void 0?"":t;return W4(n)}if(e.indexOf("@")!==-1){var a=e.split("@")[0],n=a===void 0?"":a;return W4(n)}if(e.indexOf("-")===-1||!$3e(e))return e;var r=e.split("-"),i=r[0],o=r[1],c=o===void 0?"":o;return"".concat(i,"-").concat(c.toUpperCase())}function B3e(e){var t=e===void 0?{}:e,n=t.useFallbackLocale,a=n===void 0?!0:n,r=t.fallbackLocale,i=r===void 0?"en-US":r,o=[];if(typeof navigator!="undefined"){for(var c=navigator.languages||[],l=[],d=0,u=c;d<u.length;d++){var g=u[d];l=l.concat(IE(g))}var y=navigator.language,w=y&&IE(y);o=o.concat(l,w)}return a&&o.push(i),o.filter(z3e).map(W4).filter(F3e)}var H3e=NR(B3e,{cacheKey:JSON.stringify});function U3e(e){return H3e(e)[0]||null}var SR=NR(U3e,{cacheKey:JSON.stringify});function Io(e,t,n){return function(r,i){i===void 0&&(i=n);var o=e(r)+i;return t(o)}}function bh(e){return function(n){return new Date(e(n).getTime()-1)}}function yh(e,t){return function(a){return[e(a),t(a)]}}function aa(e){if(e instanceof Date)return e.getFullYear();if(typeof e=="number")return e;var t=parseInt(e,10);if(typeof e=="string"&&!isNaN(t))return t;throw new Error("Failed to get year from date: ".concat(e,"."))}function Vl(e){if(e instanceof Date)return e.getMonth();throw new Error("Failed to get month from date: ".concat(e,"."))}function Jy(e){if(e instanceof Date)return e.getDate();throw new Error("Failed to get year from date: ".concat(e,"."))}function Nf(e){var t=aa(e),n=t+(-t+1)%100,a=new Date;return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}var V3e=Io(aa,Nf,-100),kR=Io(aa,Nf,100),x5=bh(kR),W3e=Io(aa,x5,-100),CR=yh(Nf,x5);function Wl(e){var t=aa(e),n=t+(-t+1)%10,a=new Date;return a.setFullYear(n,0,1),a.setHours(0,0,0,0),a}var ER=Io(aa,Wl,-10),w5=Io(aa,Wl,10),Ky=bh(w5),TR=Io(aa,Ky,-10),LR=yh(Wl,Ky);function Sf(e){var t=aa(e),n=new Date;return n.setFullYear(t,0,1),n.setHours(0,0,0,0),n}var DR=Io(aa,Sf,-1),v5=Io(aa,Sf,1),Xy=bh(v5),MR=Io(aa,Xy,-1),Y3e=yh(Sf,Xy);function _5(e,t){return function(a,r){r===void 0&&(r=t);var i=aa(a),o=Vl(a)+r,c=new Date;return c.setFullYear(i,o,1),c.setHours(0,0,0,0),e(c)}}function Gc(e){var t=aa(e),n=Vl(e),a=new Date;return a.setFullYear(t,n,1),a.setHours(0,0,0,0),a}var AR=_5(Gc,-1),N5=_5(Gc,1),xh=bh(N5),IR=_5(xh,-1),G3e=yh(Gc,xh);function q3e(e,t){return function(a,r){r===void 0&&(r=t);var i=aa(a),o=Vl(a),c=Jy(a)+r,l=new Date;return l.setFullYear(i,o,c),l.setHours(0,0,0,0),e(l)}}function wh(e){var t=aa(e),n=Vl(e),a=Jy(e),r=new Date;return r.setFullYear(t,n,a),r.setHours(0,0,0,0),r}var Z3e=q3e(wh,1),S5=bh(Z3e),Q3e=yh(wh,S5);function OR(e){return Jy(xh(e))}var im,qn={GREGORY:"gregory",HEBREW:"hebrew",ISLAMIC:"islamic",ISO_8601:"iso8601"},nu={ARABIC:"Arabic",HEBREW:"Hebrew",ISO_8601:"ISO 8601",US:"US"},J3e=(im={},im[qn.GREGORY]=["en-CA","en-US","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-GT","es-HN","es-MX","es-NI","es-PA","es-PE","es-PR","es-SV","es-VE","pt-BR"],im[qn.HEBREW]=["he","he-IL"],im[qn.ISLAMIC]=["ar","ar-AE","ar-BH","ar-DZ","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LY","ar-OM","ar-QA","ar-SA","ar-SD","ar-SY","ar-YE","dv","dv-MV","ps","ps-AR"],im),k5=[0,1,2,3,4,5,6],Yw=new Map;function K3e(e){return function(n,a){var r=n||SR();Yw.has(r)||Yw.set(r,new Map);var i=Yw.get(r);return i.has(e)||i.set(e,new Intl.DateTimeFormat(r||void 0,e).format),i.get(e)(a)}}function X3e(e){var t=new Date(e);return new Date(t.setHours(12))}function qc(e){return function(t,n){return K3e(e)(t,X3e(n))}}var e4e={day:"numeric"},t4e={day:"numeric",month:"long",year:"numeric"},n4e={month:"long"},a4e={month:"long",year:"numeric"},r4e={weekday:"short"},s4e={weekday:"long"},i4e={year:"numeric"},o4e=qc(e4e),l4e=qc(t4e),c4e=qc(n4e),PR=qc(a4e),d4e=qc(r4e),u4e=qc(s4e),ex=qc(i4e),f4e=k5[0],m4e=k5[5],OE=k5[6];function vp(e,t){t===void 0&&(t=qn.ISO_8601);var n=e.getDay();switch(t){case qn.ISO_8601:return(n+6)%7;case qn.ISLAMIC:return(n+1)%7;case qn.HEBREW:case qn.GREGORY:return n;default:throw new Error("Unsupported calendar type.")}}function p4e(e){var t=Nf(e);return aa(t)}function h4e(e){var t=Wl(e);return aa(t)}function Y4(e,t){t===void 0&&(t=qn.ISO_8601);var n=aa(e),a=Vl(e),r=e.getDate()-vp(e,t);return new Date(n,a,r)}function g4e(e,t){t===void 0&&(t=qn.ISO_8601);var n=t===qn.GREGORY?qn.GREGORY:qn.ISO_8601,a=Y4(e,t),r=aa(e)+1,i,o;do i=new Date(r,0,n===qn.ISO_8601?4:1),o=Y4(i,t),r-=1;while(e<o);return Math.round((a.getTime()-o.getTime())/(864e5*7))+1}function Sc(e,t){switch(e){case"century":return Nf(t);case"decade":return Wl(t);case"year":return Sf(t);case"month":return Gc(t);case"day":return wh(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function b4e(e,t){switch(e){case"century":return V3e(t);case"decade":return ER(t);case"year":return DR(t);case"month":return AR(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function RR(e,t){switch(e){case"century":return kR(t);case"decade":return w5(t);case"year":return v5(t);case"month":return N5(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function y4e(e,t){switch(e){case"decade":return ER(t,-100);case"year":return DR(t,-10);case"month":return AR(t,-12);default:throw new Error("Invalid rangeType: ".concat(e))}}function x4e(e,t){switch(e){case"decade":return w5(t,100);case"year":return v5(t,10);case"month":return N5(t,12);default:throw new Error("Invalid rangeType: ".concat(e))}}function jR(e,t){switch(e){case"century":return x5(t);case"decade":return Ky(t);case"year":return Xy(t);case"month":return xh(t);case"day":return S5(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function w4e(e,t){switch(e){case"century":return W3e(t);case"decade":return TR(t);case"year":return MR(t);case"month":return IR(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function v4e(e,t){switch(e){case"decade":return TR(t,-100);case"year":return MR(t,-10);case"month":return IR(t,-12);default:throw new Error("Invalid rangeType: ".concat(e))}}function PE(e,t){switch(e){case"century":return CR(t);case"decade":return LR(t);case"year":return Y3e(t);case"month":return G3e(t);case"day":return Q3e(t);default:throw new Error("Invalid rangeType: ".concat(e))}}function _4e(e,t,n){var a=[t,n].sort(function(r,i){return r.getTime()-i.getTime()});return[Sc(e,a[0]),jR(e,a[1])]}function zR(e,t,n){return t===void 0&&(t=ex),n.map(function(a){return t(e,a)}).join(" \u2013 ")}function N4e(e,t,n){return zR(e,t,CR(n))}function FR(e,t,n){return zR(e,t,LR(n))}function S4e(e){return e.getDay()===new Date().getDay()}function $R(e,t){t===void 0&&(t=qn.ISO_8601);var n=e.getDay();switch(t){case qn.ISLAMIC:case qn.HEBREW:return n===m4e||n===OE;case qn.ISO_8601:case qn.GREGORY:return n===OE||n===f4e;default:throw new Error("Unsupported calendar type.")}}var mi="react-calendar__navigation";function k4e(e){var t=e.activeStartDate,n=e.drillUp,a=e.formatMonthYear,r=a===void 0?PR:a,i=e.formatYear,o=i===void 0?ex:i,c=e.locale,l=e.maxDate,d=e.minDate,u=e.navigationAriaLabel,g=u===void 0?"":u,y=e.navigationAriaLive,w=e.navigationLabel,v=e.next2AriaLabel,S=v===void 0?"":v,m=e.next2Label,p=m===void 0?"\xBB":m,b=e.nextAriaLabel,x=b===void 0?"":b,k=e.nextLabel,N=k===void 0?"\u203A":k,_=e.prev2AriaLabel,C=_===void 0?"":_,E=e.prev2Label,T=E===void 0?"\xAB":E,D=e.prevAriaLabel,P=D===void 0?"":D,M=e.prevLabel,O=M===void 0?"\u2039":M,F=e.setActiveStartDate,z=e.showDoubleView,H=e.view,A=e.views,j=A.indexOf(H)>0,I=H!=="century",B=b4e(H,t),Y=I?y4e(H,t):void 0,U=RR(H,t),W=I?x4e(H,t):void 0,V=function(){if(B.getFullYear()<0)return!0;var Z=w4e(H,t);return d&&d>=Z}(),X=I&&function(){if(Y.getFullYear()<0)return!0;var Z=v4e(H,t);return d&&d>=Z}(),ne=l&&l<U,oe=I&&l&&l<W;function q(){F(B,"prev")}function te(){F(Y,"prev2")}function G(){F(U,"next")}function J(){F(W,"next2")}function K(Z){var se=function(){switch(H){case"century":return N4e(c,o,Z);case"decade":return FR(c,o,Z);case"year":return o(c,Z);case"month":return r(c,Z);default:throw new Error("Invalid view: ".concat(H,"."))}}();return w?w({date:Z,label:se,locale:c||SR()||void 0,view:H}):se}function Q(){var Z="".concat(mi,"__label");return R.createElement("button",{"aria-label":g,"aria-live":y,className:Z,disabled:!j,onClick:n,style:{flexGrow:1},type:"button"},R.createElement("span",{className:"".concat(Z,"__labelText ").concat(Z,"__labelText--from")},K(t)),z?R.createElement(R.Fragment,null,R.createElement("span",{className:"".concat(Z,"__divider")}," \u2013 "),R.createElement("span",{className:"".concat(Z,"__labelText ").concat(Z,"__labelText--to")},K(U))):null)}return R.createElement("div",{className:mi},T!==null&&I?R.createElement("button",{"aria-label":C,className:"".concat(mi,"__arrow ").concat(mi,"__prev2-button"),disabled:X,onClick:te,type:"button"},T):null,O!==null&&R.createElement("button",{"aria-label":P,className:"".concat(mi,"__arrow ").concat(mi,"__prev-button"),disabled:V,onClick:q,type:"button"},O),Q(),N!==null&&R.createElement("button",{"aria-label":x,className:"".concat(mi,"__arrow ").concat(mi,"__next-button"),disabled:ne,onClick:G,type:"button"},N),p!==null&&I?R.createElement("button",{"aria-label":S,className:"".concat(mi,"__arrow ").concat(mi,"__next2-button"),disabled:oe,onClick:J,type:"button"},p):null)}var au=globalThis&&globalThis.__assign||function(){return au=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},au.apply(this,arguments)},C4e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function RE(e){return"".concat(e,"%")}function C5(e){var t=e.children,n=e.className,a=e.count,r=e.direction,i=e.offset,o=e.style,c=e.wrap,l=C4e(e,["children","className","count","direction","offset","style","wrap"]);return R.createElement("div",au({className:n,style:au({display:"flex",flexDirection:r,flexWrap:c?"wrap":"nowrap"},o)},l),R.Children.map(t,function(d,u){var g=i&&u===0?RE(100*i/a):null;return R.cloneElement(d,au(au({},d.props),{style:{flexBasis:RE(100/a),flexShrink:0,flexGrow:0,overflow:"hidden",marginLeft:g,marginInlineStart:g,marginInlineEnd:0}}))}))}var _d;function E4e(e,t,n){return t&&t>e?t:n&&n<e?n:e}function _p(e,t){return t[0]<=e&&t[1]>=e}function T4e(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function BR(e,t){return _p(e[0],t)||_p(e[1],t)}function jE(e,t,n){var a=BR(t,e),r=[];if(a){r.push(n);var i=_p(e[0],t),o=_p(e[1],t);i&&r.push("".concat(n,"Start")),o&&r.push("".concat(n,"End")),i&&o&&r.push("".concat(n,"BothEnds"))}return r}function L4e(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function D4e(e){if(!e)throw new Error("args is required");var t=e.value,n=e.date,a=e.hover,r="react-calendar__tile",i=[r];if(!n)return i;var o=new Date,c=function(){if(Array.isArray(n))return n;var w=e.dateType;if(!w)throw new Error("dateType is required when date is not an array of two dates");return PE(w,n)}();if(_p(o,c)&&i.push("".concat(r,"--now")),!t||!L4e(t))return i;var l=function(){if(Array.isArray(t))return t;var w=e.valueType;if(!w)throw new Error("valueType is required when value is not an array of two dates");return PE(w,t)}();T4e(l,c)?i.push("".concat(r,"--active")):BR(l,c)&&i.push("".concat(r,"--hasActive"));var d=jE(l,c,"".concat(r,"--range"));i.push.apply(i,d);var u=Array.isArray(t)?t:[t];if(a&&u.length===1){var g=a>l[0]?[l[0],a]:[a,l[0]],y=jE(g,c,"".concat(r,"--hover"));i.push.apply(i,y)}return i}var M4e=(_d={},_d[nu.ARABIC]=qn.ISLAMIC,_d[nu.HEBREW]=qn.HEBREW,_d[nu.ISO_8601]=qn.ISO_8601,_d[nu.US]=qn.GREGORY,_d);function A4e(e){return e!==void 0&&e in nu}function tx(e){if(A4e(e)){var t=M4e[e];return t}return e}function nx(e){for(var t=e.className,n=e.count,a=n===void 0?3:n,r=e.dateTransform,i=e.dateType,o=e.end,c=e.hover,l=e.offset,d=e.renderTile,u=e.start,g=e.step,y=g===void 0?1:g,w=e.value,v=e.valueType,S=[],m=u;m<=o;m+=y){var p=r(m);S.push(d({classes:D4e({date:p,dateType:i,hover:c,value:w,valueType:v}),date:p}))}return R.createElement(C5,{className:t,count:a,offset:l,wrap:!0},S)}function ax(e){var t=e.activeStartDate,n=e.children,a=e.classes,r=e.date,i=e.formatAbbr,o=e.locale,c=e.maxDate,l=e.maxDateTransform,d=e.minDate,u=e.minDateTransform,g=e.onClick,y=e.onMouseOver,w=e.style,v=e.tileClassName,S=e.tileContent,m=e.tileDisabled,p=e.view,b=h.exports.useMemo(function(){var k={activeStartDate:t,date:r,view:p};return typeof v=="function"?v(k):v},[t,r,v,p]),x=h.exports.useMemo(function(){var k={activeStartDate:t,date:r,view:p};return typeof S=="function"?S(k):S},[t,r,S,p]);return f("button",{className:li(a,b),disabled:d&&u(d)>r||c&&l(c)<r||m&&m({activeStartDate:t,date:r,view:p}),onClick:g?function(k){return g(r,k)}:void 0,onFocus:y?function(){return y(r)}:void 0,onMouseOver:y?function(){return y(r)}:void 0,style:w,type:"button",children:[i?s("abbr",{"aria-label":i(o,r),children:n}):n,x]})}var G4=globalThis&&globalThis.__assign||function(){return G4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},G4.apply(this,arguments)},I4e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},Gw="react-calendar__century-view__decades__decade";function O4e(e){var t=e.classes,n=t===void 0?[]:t,a=e.currentCentury,r=e.formatYear,i=r===void 0?ex:r,o=I4e(e,["classes","currentCentury","formatYear"]),c=o.date,l=o.locale,d=[];return n&&d.push.apply(d,n),Gw&&d.push(Gw),Nf(c).getFullYear()!==a&&d.push("".concat(Gw,"--neighboringCentury")),R.createElement(ax,G4({},o,{classes:d,maxDateTransform:Ky,minDateTransform:Wl,view:"century"}),FR(l,i,c))}var q4=globalThis&&globalThis.__assign||function(){return q4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},q4.apply(this,arguments)},zE=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function P4e(e){var t=e.activeStartDate,n=e.hover,a=e.showNeighboringCentury,r=e.value,i=e.valueType,o=zE(e,["activeStartDate","hover","showNeighboringCentury","value","valueType"]),c=p4e(t),l=c+(a?119:99);return R.createElement(nx,{className:"react-calendar__century-view__decades",dateTransform:Wl,dateType:"decade",end:l,hover:n,renderTile:function(d){var u=d.date,g=zE(d,["date"]);return R.createElement(O4e,q4({key:u.getTime()},o,g,{activeStartDate:t,currentCentury:c,date:u}))},start:c,step:10,value:r,valueType:i})}var FE=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,i;a<r;a++)(i||!(a in t))&&(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return e.concat(i||Array.prototype.slice.call(t))},R4e=Object.values(qn),j4e=Object.values(nu),Z4=["century","decade","year","month"],HR=Ie.oneOf(FE(FE([],R4e,!0),j4e,!0)),Q1=Ie.oneOfType([Ie.string,Ie.arrayOf(Ie.string)]),E5=function(t,n,a){var r=t,i=n,o=r[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(a,"`, expected instance of `Date`."));var c=t.maxDate;return c&&o>c?new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(a,"`, minDate cannot be larger than maxDate.")):null},T5=function(t,n,a){var r=t,i=n,o=r[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(a,"`, expected instance of `Date`."));var c=t.minDate;return c&&o<c?new Error("Invalid prop `".concat(n,"` of type `").concat(typeof o,"` supplied to `").concat(a,"`, maxDate cannot be smaller than minDate.")):null},z4e=Ie.oneOfType([Ie.func,Ie.exact({current:Ie.any})]),F4e=Ie.arrayOf(Ie.oneOfType([Ie.instanceOf(Date),Ie.oneOf([null])]).isRequired),$4e=Ie.oneOfType([Ie.instanceOf(Date),Ie.oneOf([null]),F4e]);Ie.arrayOf(Ie.oneOf(Z4));var J1=function(t,n,a){var r=t,i=n,o=r[i];return o!==void 0&&(typeof o!="string"||Z4.indexOf(o)===-1)?new Error("Invalid prop `".concat(n,"` of value `").concat(o,"` supplied to `").concat(a,"`, expected one of [").concat(Z4.map(function(c){return'"'.concat(c,'"')}).join(", "),"].")):null};J1.isRequired=function(t,n,a,r,i){var o=t,c=n,l=o[c];return l?J1(t,n,a):new Error("The prop `".concat(n,"` is marked as required in `").concat(a,"`, but its value is `").concat(l,"`."))};var B4e=function(e){return Ie.arrayOf(e)},rx={activeStartDate:Ie.instanceOf(Date).isRequired,hover:Ie.instanceOf(Date),locale:Ie.string,maxDate:T5,minDate:E5,onClick:Ie.func,onMouseOver:Ie.func,tileClassName:Ie.oneOfType([Ie.func,Q1]),tileContent:Ie.oneOfType([Ie.func,Ie.node]),value:$4e,valueType:Ie.oneOf(["century","decade","year","month","day"]).isRequired};Ie.instanceOf(Date).isRequired,Ie.arrayOf(Ie.string.isRequired).isRequired,Ie.instanceOf(Date).isRequired,Ie.string,Ie.func,Ie.func,Ie.objectOf(Ie.oneOfType([Ie.string,Ie.number])),Ie.oneOfType([Ie.func,Q1]),Ie.oneOfType([Ie.func,Ie.node]),Ie.func;var Np=globalThis&&globalThis.__assign||function(){return Np=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Np.apply(this,arguments)},UR=function(t){function n(){return R.createElement(P4e,Np({},t))}return R.createElement("div",{className:"react-calendar__century-view"},n())};UR.propTypes=Np(Np({},rx),{showNeighboringCentury:Ie.bool});var H4e=UR,Q4=globalThis&&globalThis.__assign||function(){return Q4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Q4.apply(this,arguments)},U4e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},qw="react-calendar__decade-view__years__year";function V4e(e){var t=e.classes,n=t===void 0?[]:t,a=e.currentDecade,r=e.formatYear,i=r===void 0?ex:r,o=U4e(e,["classes","currentDecade","formatYear"]),c=o.date,l=o.locale,d=[];return n&&d.push.apply(d,n),qw&&d.push(qw),Wl(c).getFullYear()!==a&&d.push("".concat(qw,"--neighboringDecade")),R.createElement(ax,Q4({},o,{classes:d,maxDateTransform:Xy,minDateTransform:Sf,view:"decade"}),i(l,c))}var J4=globalThis&&globalThis.__assign||function(){return J4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},J4.apply(this,arguments)},$E=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function W4e(e){var t=e.activeStartDate,n=e.hover,a=e.showNeighboringDecade,r=e.value,i=e.valueType,o=$E(e,["activeStartDate","hover","showNeighboringDecade","value","valueType"]),c=h4e(t),l=c+(a?11:9);return R.createElement(nx,{className:"react-calendar__decade-view__years",dateTransform:Sf,dateType:"year",end:l,hover:n,renderTile:function(d){var u=d.date,g=$E(d,["date"]);return R.createElement(V4e,J4({key:u.getTime()},o,g,{activeStartDate:t,currentDecade:c,date:u}))},start:c,value:r,valueType:i})}var Sp=globalThis&&globalThis.__assign||function(){return Sp=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},Sp.apply(this,arguments)},VR=function(t){function n(){return R.createElement(W4e,Sp({},t))}return R.createElement("div",{className:"react-calendar__decade-view"},n())};VR.propTypes=Sp(Sp({},rx),{showNeighboringDecade:Ie.bool});var Y4e=VR,K4=globalThis&&globalThis.__assign||function(){return K4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},K4.apply(this,arguments)},G4e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},BE=globalThis&&globalThis.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,i;a<r;a++)(i||!(a in t))&&(i||(i=Array.prototype.slice.call(t,0,a)),i[a]=t[a]);return e.concat(i||Array.prototype.slice.call(t))},q4e="react-calendar__year-view__months__month";function Z4e(e){var t=e.classes,n=t===void 0?[]:t,a=e.formatMonth,r=a===void 0?c4e:a,i=e.formatMonthYear,o=i===void 0?PR:i,c=G4e(e,["classes","formatMonth","formatMonthYear"]),l=c.date,d=c.locale;return R.createElement(ax,K4({},c,{classes:BE(BE([],n,!0),[q4e],!1),formatAbbr:o,maxDateTransform:xh,minDateTransform:Gc,view:"year"}),r(d,l))}var X4=globalThis&&globalThis.__assign||function(){return X4=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},X4.apply(this,arguments)},HE=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function Q4e(e){var t=e.activeStartDate,n=e.hover,a=e.value,r=e.valueType,i=HE(e,["activeStartDate","hover","value","valueType"]),o=0,c=11,l=aa(t);return R.createElement(nx,{className:"react-calendar__year-view__months",dateTransform:function(d){var u=new Date;return u.setFullYear(l,d,1),Gc(u)},dateType:"month",end:c,hover:n,renderTile:function(d){var u=d.date,g=HE(d,["date"]);return R.createElement(Z4e,X4({key:u.getTime()},i,g,{activeStartDate:t,date:u}))},start:o,value:a,valueType:r})}var K1=globalThis&&globalThis.__assign||function(){return K1=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},K1.apply(this,arguments)},WR=function(t){function n(){return R.createElement(Q4e,K1({},t))}return R.createElement("div",{className:"react-calendar__year-view"},n())};WR.propTypes=K1({},rx);var J4e=WR,e_=globalThis&&globalThis.__assign||function(){return e_=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},e_.apply(this,arguments)},K4e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},R0="react-calendar__month-view__days__day";function X4e(e){var t=e.calendarType,n=e.classes,a=n===void 0?[]:n,r=e.currentMonthIndex,i=e.formatDay,o=i===void 0?o4e:i,c=e.formatLongDate,l=c===void 0?l4e:c,d=K4e(e,["calendarType","classes","currentMonthIndex","formatDay","formatLongDate"]),u=tx(t),g=d.date,y=d.locale,w=[];return a&&w.push.apply(w,a),R0&&w.push(R0),$R(g,u)&&w.push("".concat(R0,"--weekend")),g.getMonth()!==r&&w.push("".concat(R0,"--neighboringMonth")),R.createElement(ax,e_({},d,{classes:w,formatAbbr:l,maxDateTransform:S5,minDateTransform:wh,view:"month"}),o(y,g))}var t_=globalThis&&globalThis.__assign||function(){return t_=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},t_.apply(this,arguments)},UE=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function e_e(e){var t=e.activeStartDate,n=e.calendarType,a=e.hover,r=e.showFixedNumberOfWeeks,i=e.showNeighboringMonth,o=e.value,c=e.valueType,l=UE(e,["activeStartDate","calendarType","hover","showFixedNumberOfWeeks","showNeighboringMonth","value","valueType"]),d=tx(n),u=aa(t),g=Vl(t),y=r||i,w=vp(t,d),v=y?0:w,S=(y?-w:0)+1,m=function(){if(r)return S+6*7-1;var p=OR(t);if(i){var b=new Date;b.setFullYear(u,g,p),b.setHours(0,0,0,0);var x=7-vp(b,d)-1;return p+x}return p}();return R.createElement(nx,{className:"react-calendar__month-view__days",count:7,dateTransform:function(p){var b=new Date;return b.setFullYear(u,g,p),wh(b)},dateType:"day",hover:a,end:m,renderTile:function(p){var b=p.date,x=UE(p,["date"]);return R.createElement(X4e,t_({key:b.getTime()},l,x,{activeStartDate:t,calendarType:n,currentMonthIndex:g,date:b}))},offset:v,start:S,value:o,valueType:c})}var YR="react-calendar__month-view__weekdays",Zw="".concat(YR,"__weekday");function t_e(e){for(var t=e.calendarType,n=e.formatShortWeekday,a=n===void 0?d4e:n,r=e.formatWeekday,i=r===void 0?u4e:r,o=e.locale,c=e.onMouseLeave,l=tx(t),d=new Date,u=Gc(d),g=aa(u),y=Vl(u),w=[],v=1;v<=7;v+=1){var S=new Date(g,y,v-vp(u,l)),m=i(o,S);w.push(R.createElement("div",{key:v,className:li(Zw,S4e(S)&&"".concat(Zw,"--current"),$R(S,l)&&"".concat(Zw,"--weekend"))},R.createElement("abbr",{"aria-label":m,title:m},a(o,S).replace(".",""))))}return R.createElement(C5,{className:YR,count:7,onFocus:c,onMouseOver:c},w)}var X1=globalThis&&globalThis.__assign||function(){return X1=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},X1.apply(this,arguments)},VE=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n},WE="react-calendar__tile";function n_e(e){var t=e.onClickWeekNumber,n=e.weekNumber,a=R.createElement("span",null,n);if(t){var r=e.date,i=e.onClickWeekNumber,o=e.weekNumber,c=VE(e,["date","onClickWeekNumber","weekNumber"]);return R.createElement("button",X1({},c,{className:WE,onClick:function(l){return i(o,r,l)},type:"button"}),a)}else{e.date,e.onClickWeekNumber,e.weekNumber;var c=VE(e,["date","onClickWeekNumber","weekNumber"]);return R.createElement("div",X1({},c,{className:WE}),a)}}function a_e(e){var t=e.activeStartDate,n=e.calendarType,a=e.onClickWeekNumber,r=e.onMouseLeave,i=e.showFixedNumberOfWeeks,o=tx(n),c=function(){if(i)return 6;var u=OR(t),g=vp(t,o),y=u-(7-g);return 1+Math.ceil(y/7)}(),l=function(){for(var u=aa(t),g=Vl(t),y=Jy(t),w=[],v=0;v<c;v+=1)w.push(Y4(new Date(u,g,y+v*7),o));return w}(),d=l.map(function(u){return g4e(u,o)});return R.createElement(C5,{className:"react-calendar__month-view__weekNumbers",count:c,direction:"column",onFocus:r,onMouseOver:r,style:{flexBasis:"calc(100% * (1 / 8)",flexShrink:0}},d.map(function(u,g){var y=l[g];if(!y)throw new Error("date is not defined");return R.createElement(n_e,{key:u,date:y,onClickWeekNumber:a,weekNumber:u})}))}var kp=globalThis&&globalThis.__assign||function(){return kp=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},kp.apply(this,arguments)},r_e=globalThis&&globalThis.__rest||function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n};function s_e(e){if(e)for(var t=0,n=Object.entries(J3e);t<n.length;t++){var a=n[t],r=a[0],i=a[1];if(i.includes(e))return r}return qn.ISO_8601}var GR=function(t){var n=t.activeStartDate,a=t.locale,r=t.onMouseLeave,i=t.showFixedNumberOfWeeks,o=t.calendarType,c=o===void 0?s_e(a):o,l=t.formatShortWeekday,d=t.formatWeekday,u=t.onClickWeekNumber,g=t.showWeekNumbers,y=r_e(t,["calendarType","formatShortWeekday","formatWeekday","onClickWeekNumber","showWeekNumbers"]);function w(){return R.createElement(t_e,{calendarType:c,formatShortWeekday:l,formatWeekday:d,locale:a,onMouseLeave:r})}function v(){return g?R.createElement(a_e,{activeStartDate:n,calendarType:c,onClickWeekNumber:u,onMouseLeave:r,showFixedNumberOfWeeks:i}):null}function S(){return R.createElement(e_e,kp({calendarType:c},y))}var m="react-calendar__month-view";return R.createElement("div",{className:li(m,g?"".concat(m,"--weekNumbers"):"")},R.createElement("div",{style:{display:"flex",alignItems:"flex-end"}},v(),R.createElement("div",{style:{flexGrow:1,width:"100%"}},w(),S())))};GR.propTypes=kp(kp({},rx),{calendarType:HR,formatDay:Ie.func,formatLongDate:Ie.func,formatShortWeekday:Ie.func,formatWeekday:Ie.func,onClickWeekNumber:Ie.func,onMouseLeave:Ie.func,showFixedNumberOfWeeks:Ie.bool,showNeighboringMonth:Ie.bool,showWeekNumbers:Ie.bool});var i_e=GR,ru=globalThis&&globalThis.__assign||function(){return ru=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},ru.apply(this,arguments)},j0="react-calendar",xu=["century","decade","year","month"],o_e=["decade","year","month","day"],L5=new Date;L5.setFullYear(1,0,1);L5.setHours(0,0,0,0);var l_e=new Date(864e13);function vm(e){return e instanceof Date?e:new Date(e)}function qR(e,t){return xu.slice(xu.indexOf(e),xu.indexOf(t)+1)}function c_e(e,t,n){var a=qR(t,n);return a.indexOf(e)!==-1}function D5(e,t,n){return e&&c_e(e,t,n)?e:n}function ZR(e){var t=xu.indexOf(e);return o_e[t]}function d_e(e,t){var n=Array.isArray(e)?e[t]:e;if(!n)return null;var a=vm(n);if(isNaN(a.getTime()))throw new Error("Invalid date: ".concat(e));return a}function QR(e,t){var n=e.value,a=e.minDate,r=e.maxDate,i=e.maxDetail,o=d_e(n,t);if(!o)return null;var c=ZR(i),l=function(){switch(t){case 0:return Sc(c,o);case 1:return jR(c,o);default:throw new Error("Invalid index value: ".concat(t))}}();return E4e(l,a,r)}var M5=function(e){return QR(e,0)},JR=function(e){return QR(e,1)},u_e=function(e){return[M5,JR].map(function(t){return t(e)})};function KR(e){var t=e.maxDate,n=e.maxDetail,a=e.minDate,r=e.minDetail,i=e.value,o=e.view,c=D5(o,r,n),l=M5({value:i,minDate:a,maxDate:t,maxDetail:n})||new Date;return Sc(c,l)}function f_e(e){var t=e.activeStartDate,n=e.defaultActiveStartDate,a=e.defaultValue,r=e.defaultView,i=e.maxDate,o=e.maxDetail,c=e.minDate,l=e.minDetail,d=e.value,u=e.view,g=D5(u,l,o),y=t||n;return y?Sc(g,y):KR({maxDate:i,maxDetail:o,minDate:c,minDetail:l,value:d||a,view:u||r})}function Qw(e){return e&&(!Array.isArray(e)||e.length===1)}function z0(e,t){return e instanceof Date&&t instanceof Date&&e.getTime()===t.getTime()}var XR=h.exports.forwardRef(function(t,n){var a=t.activeStartDate,r=t.allowPartialRange,i=t.calendarType,o=t.className,c=t.defaultActiveStartDate,l=t.defaultValue,d=t.defaultView,u=t.formatDay,g=t.formatLongDate,y=t.formatMonth,w=t.formatMonthYear,v=t.formatShortWeekday,S=t.formatWeekday,m=t.formatYear,p=t.goToRangeStartOnSelect,b=p===void 0?!0:p,x=t.inputRef,k=t.locale,N=t.maxDate,_=N===void 0?l_e:N,C=t.maxDetail,E=C===void 0?"month":C,T=t.minDate,D=T===void 0?L5:T,P=t.minDetail,M=P===void 0?"century":P,O=t.navigationAriaLabel,F=t.navigationAriaLive,z=t.navigationLabel,H=t.next2AriaLabel,A=t.next2Label,j=t.nextAriaLabel,I=t.nextLabel,B=t.onActiveStartDateChange,Y=t.onChange,U=t.onClickDay,W=t.onClickDecade,V=t.onClickMonth,X=t.onClickWeekNumber,ne=t.onClickYear,oe=t.onDrillDown,q=t.onDrillUp,te=t.onViewChange,G=t.prev2AriaLabel,J=t.prev2Label,K=t.prevAriaLabel,Q=t.prevLabel,Z=t.returnValue,se=Z===void 0?"start":Z,ce=t.selectRange,le=t.showDoubleView,ae=t.showFixedNumberOfWeeks,ie=t.showNavigation,de=ie===void 0?!0:ie,fe=t.showNeighboringCentury,be=t.showNeighboringDecade,he=t.showNeighboringMonth,ve=he===void 0?!0:he,Ce=t.showWeekNumbers,nt=t.tileClassName,Ae=t.tileContent,Je=t.tileDisabled,ze=t.value,We=t.view,bt=h.exports.useState(c),Et=bt[0],wt=bt[1],At=h.exports.useState(null),Yt=At[0],xn=At[1],Bn=h.exports.useState(Array.isArray(l)?l.map(function(ft){return ft!==null?vm(ft):null}):l!=null?vm(l):null),zn=Bn[0],Kn=Bn[1],ca=h.exports.useState(d),ht=ca[0],Ht=ca[1],Dt=a||Et||f_e({activeStartDate:a,defaultActiveStartDate:c,defaultValue:l,defaultView:d,maxDate:_,maxDetail:E,minDate:D,minDetail:M,value:ze,view:We}),Lt=function(){var ft=function(){return ce&&Qw(zn)?zn:ze!==void 0?ze:zn}();return ft?Array.isArray(ft)?ft.map(function(qt){return qt!==null?vm(qt):null}):ft!==null?vm(ft):null:null}(),Le=ZR(E),Ze=D5(We||ht,M,E),It=qR(M,E),un=ce?Yt:null,Ye=It.indexOf(Ze)<It.length-1,Ge=It.indexOf(Ze)>0,kt=h.exports.useCallback(function(ft){var qt=function(){switch(se){case"start":return M5;case"end":return JR;case"range":return u_e;default:throw new Error("Invalid returnValue.")}}();return qt({maxDate:_,maxDetail:E,minDate:D,value:ft})},[_,E,D,se]),vt=h.exports.useCallback(function(ft,qt){wt(ft);var qe={action:qt,activeStartDate:ft,value:Lt,view:Ze};B&&!z0(Dt,ft)&&B(qe)},[Dt,B,Lt,Ze]),pn=h.exports.useCallback(function(ft,qt){var qe=function(){switch(Ze){case"century":return W;case"decade":return ne;case"year":return V;case"month":return U;default:throw new Error("Invalid view: ".concat(Ze,"."))}}();qe&&qe(ft,qt)},[U,W,V,ne,Ze]),da=h.exports.useCallback(function(ft,qt){if(!!Ye){pn(ft,qt);var qe=It[It.indexOf(Ze)+1];if(!qe)throw new Error("Attempted to drill down from the lowest view.");wt(ft),Ht(qe);var ye={action:"drillDown",activeStartDate:ft,value:Lt,view:qe};B&&!z0(Dt,ft)&&B(ye),te&&Ze!==qe&&te(ye),oe&&oe(ye)}},[Dt,Ye,B,pn,oe,te,Lt,Ze,It]),Vn=h.exports.useCallback(function(){if(!!Ge){var ft=It[It.indexOf(Ze)-1];if(!ft)throw new Error("Attempted to drill up from the highest view.");var qt=Sc(ft,Dt);wt(qt),Ht(ft);var qe={action:"drillUp",activeStartDate:qt,value:Lt,view:ft};B&&!z0(Dt,qt)&&B(qe),te&&Ze!==ft&&te(qe),q&&q(qe)}},[Dt,Ge,B,q,te,Lt,Ze,It]),Me=h.exports.useCallback(function(ft,qt){var qe=Lt;pn(ft,qt);var ye=ce&&!Qw(qe),Fe;if(ce)if(ye)Fe=Sc(Le,ft);else{if(!qe)throw new Error("previousValue is required");if(Array.isArray(qe))throw new Error("previousValue must not be an array");Fe=_4e(Le,qe,ft)}else Fe=kt(ft);var ot=!ce||ye||b?KR({maxDate:_,maxDetail:E,minDate:D,minDetail:M,value:Fe,view:Ze}):null;qt.persist(),wt(ot),Kn(Fe);var Nt={action:"onChange",activeStartDate:ot,value:Fe,view:Ze};if(B&&!z0(Dt,ot)&&B(Nt),Y)if(ce){var Kt=Qw(Fe);if(!Kt)Y(Fe||null,qt);else if(r){if(Array.isArray(Fe))throw new Error("value must not be an array");Y([Fe||null,null],qt)}}else Y(Fe||null,qt)},[Dt,r,kt,b,_,E,D,M,B,Y,pn,ce,Lt,Le,Ze]);function Ve(ft){xn(ft)}function He(){xn(null)}h.exports.useImperativeHandle(n,function(){return{activeStartDate:Dt,drillDown:da,drillUp:Vn,onChange:Me,setActiveStartDate:vt,value:Lt,view:Ze}},[Dt,da,Vn,Me,vt,Lt,Ze]);function at(ft){var qt=ft?RR(Ze,Dt):Sc(Ze,Dt),qe=Ye?da:Me,ye={activeStartDate:qt,hover:un,locale:k,maxDate:_,minDate:D,onClick:qe,onMouseOver:ce?Ve:void 0,tileClassName:nt,tileContent:Ae,tileDisabled:Je,value:Lt,valueType:Le};switch(Ze){case"century":return s(H4e,{...ru({formatYear:m,showNeighboringCentury:fe},ye)});case"decade":return s(Y4e,{...ru({formatYear:m,showNeighboringDecade:be},ye)});case"year":return s(J4e,{...ru({formatMonth:y,formatMonthYear:w},ye)});case"month":return s(i_e,{...ru({calendarType:i,formatDay:u,formatLongDate:g,formatShortWeekday:v,formatWeekday:S,onClickWeekNumber:X,onMouseLeave:ce?He:void 0,showFixedNumberOfWeeks:typeof ae!="undefined"?ae:le,showNeighboringMonth:ve,showWeekNumbers:Ce},ye)});default:throw new Error("Invalid view: ".concat(Ze,"."))}}function Tt(){return de?s(k4e,{activeStartDate:Dt,drillUp:Vn,formatMonthYear:w,formatYear:m,locale:k,maxDate:_,minDate:D,navigationAriaLabel:O,navigationAriaLive:F,navigationLabel:z,next2AriaLabel:H,next2Label:A,nextAriaLabel:j,nextLabel:I,prev2AriaLabel:G,prev2Label:J,prevAriaLabel:K,prevLabel:Q,setActiveStartDate:vt,showDoubleView:le,view:Ze,views:It}):null}var Gt=Array.isArray(Lt)?Lt:[Lt];return f("div",{className:li(j0,ce&&Gt.length===1&&"".concat(j0,"--selectRange"),le&&"".concat(j0,"--doubleView"),o),ref:x,children:[Tt(),f("div",{className:"".concat(j0,"__viewContainer"),onBlur:ce?He:void 0,onMouseLeave:ce?He:void 0,children:[at(),le?at(!0):null]})]})}),YE=Ie.instanceOf(Date),GE=Ie.oneOfType([Ie.string,Ie.instanceOf(Date)]),qE=Ie.oneOfType([GE,B4e(GE)]);XR.propTypes={activeStartDate:YE,allowPartialRange:Ie.bool,calendarType:HR,className:Q1,defaultActiveStartDate:YE,defaultValue:qE,defaultView:J1,formatDay:Ie.func,formatLongDate:Ie.func,formatMonth:Ie.func,formatMonthYear:Ie.func,formatShortWeekday:Ie.func,formatWeekday:Ie.func,formatYear:Ie.func,goToRangeStartOnSelect:Ie.bool,inputRef:z4e,locale:Ie.string,maxDate:T5,maxDetail:Ie.oneOf(xu),minDate:E5,minDetail:Ie.oneOf(xu),navigationAriaLabel:Ie.string,navigationAriaLive:Ie.oneOf(["off","polite","assertive"]),navigationLabel:Ie.func,next2AriaLabel:Ie.string,next2Label:Ie.node,nextAriaLabel:Ie.string,nextLabel:Ie.node,onActiveStartDateChange:Ie.func,onChange:Ie.func,onClickDay:Ie.func,onClickDecade:Ie.func,onClickMonth:Ie.func,onClickWeekNumber:Ie.func,onClickYear:Ie.func,onDrillDown:Ie.func,onDrillUp:Ie.func,onViewChange:Ie.func,prev2AriaLabel:Ie.string,prev2Label:Ie.node,prevAriaLabel:Ie.string,prevLabel:Ie.node,returnValue:Ie.oneOf(["start","end","range"]),selectRange:Ie.bool,showDoubleView:Ie.bool,showFixedNumberOfWeeks:Ie.bool,showNavigation:Ie.bool,showNeighboringCentury:Ie.bool,showNeighboringDecade:Ie.bool,showNeighboringMonth:Ie.bool,showWeekNumbers:Ie.bool,tileClassName:Ie.oneOfType([Ie.func,Q1]),tileContent:Ie.oneOfType([Ie.func,Ie.node]),tileDisabled:Ie.func,value:qE,view:J1};var vh=XR;const A5=()=>s("svg",{width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M17.25 8.16658H0.75M12.6667 0.833252V4.49992M5.33333 0.833252V4.49992M5.15 19.1666H12.85C14.3901 19.1666 15.1602 19.1666 15.7485 18.8669C16.2659 18.6032 16.6866 18.1825 16.9503 17.6651C17.25 17.0768 17.25 16.3067 17.25 14.7666V7.06659C17.25 5.52644 17.25 4.75637 16.9503 4.16811C16.6866 3.65067 16.2659 3.22997 15.7485 2.96632C15.1602 2.66659 14.3901 2.66659 12.85 2.66659H5.15C3.60986 2.66659 2.83978 2.66659 2.25153 2.96632C1.73408 3.22997 1.31338 3.65067 1.04973 4.16811C0.75 4.75637 0.75 5.52644 0.75 7.06658V14.7666C0.75 16.3067 0.75 17.0768 1.04973 17.6651C1.31338 18.1825 1.73408 18.6032 2.25153 18.8669C2.83978 19.1666 3.60986 19.1666 5.15 19.1666Z",stroke:"#98A2B3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),_o=()=>s("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-auto next-icon",children:s("path",{d:"M1.5 11L6.5 6L1.5 1",stroke:"#667085",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})}),_h=()=>s("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mx-auto prev-icon",children:s("path",{d:"M6.5 11L1.5 6L6.5 1",stroke:"#667085",strokeWidth:"1.66667",strokeLinecap:"round",strokeLinejoin:"round"})});function No({control:e,name:t,min:n,type:a,max:r,setValue:i,classNameCustomized:o}){const{field:c,fieldState:l}=Ii({control:e,name:t}),[d,u]=h.exports.useState(new Date),[g,y]=h.exports.useState(!1);return h.exports.useEffect(()=>{isNaN(new Date(c.value))||u(new Date(c.value))},[c.value]),f("div",{className:`${o||(a?"mb-0":"mb-8 w-full relative")}`,children:[f("div",{className:"relative !min-h-[40px] gap-3 hover:cursor-pointer",children:[s("input",{type:"date",max:"9999-12-31",className:`${o?"h-10":"h-12"} text-left !min-h-[40px] w-full resize-non rounded-md border bg-transparent p-2 px-4 focus:outline-none active:outline-none`,autoComplete:"off",...c,disabled:!1,placeholder:"ceremony",style:{textAlignLast:"left"}}),f("div",{className:"flex items-center absolute -right-2 top-[7px]",children:[s("span",{children:"D.O.B"}),s("button",{className:" h-[38px] bg-white px-3",type:"button",onClick:()=>y(!g),children:s(A5,{})})]})]}),g&&s("div",{className:"absolute z-50",children:s(vh,{onChange:w=>{i(Te(w).format("yyyy-MM-DD")),y(!1)},value:d,className:"calendar date-picker",nextLabel:s(_o,{}),prevLabel:s(_h,{}),next2Label:s("div",{className:"h-full w-full cursor-default",onClick:w=>w.stopPropagation()}),prev2Label:s("div",{className:"h-full w-full cursor-default",onClick:w=>w.stopPropagation()}),minDate:n,maxDate:r,maxDetail:"month"})})]})}const m_e=({isOpen:e,closeModal:t,onReadToEnd:n})=>{const[a,r]=h.exports.useState(""),{dispatch:i}=h.exports.useContext(we),[o,c]=h.exports.useState(!1);async function l(){var g;i({type:"START_LOADING"}),new _e().setTable("cms");try{const y=await _t("cms","post",{payload:{content_key:"privacy_policy"},limit:1e3,page:1},"PAGINATE");Array.isArray(y.list)&&y.list.length>0&&r((g=y.list.find(w=>w.content_key=="privacy_policy"))==null?void 0:g.content_value)}catch(y){i({type:"SHOW_ERROR",payload:{heading:"Cannot get Privacy policy",message:y.message}})}i({type:"STOP_LOADING"})}h.exports.useEffect(()=>{l(),c(!1)},[e]);function d(u){const{scrollTop:g,scrollHeight:y,clientHeight:w}=u.target;!o&&g+w>=y-10&&(c(!0),n&&n())}return f(Se,{children:[s("div",{className:`${e?"flex":"hidden"} fixed inset-0 items-center justify-center`}),s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-6xl transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg flex items-center justify-between font-medium leading-6 text-gray-900",children:[" ",s("button",{type:"button",onClick:t,className:"flex justify-end rounded-full border px-3 py-2 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("div",{className:"mt-2",children:s("article",{className:"sun-editor-editable my-8 max-h-[600px] overflow-y-auto text-sm",dangerouslySetInnerHTML:{__html:a},onScroll:d})})]})})})})]})})]})};function Jw(){var Y,U,W;const e=je(),{signUpData:t}=y5(),n=t.role,{dispatch:a}=R.useContext(Ee),[r,i]=R.useState(!1),[o,c]=R.useState(!1),l=new _e,[d,u]=R.useState(!1),[g,y]=R.useState(!1),w=h.exports.useRef(new Date),[v,S]=R.useState(!1),[m,p]=R.useState(!1),[b,x]=R.useState([]);function k(V){if(!V)return!1;const X=new Date,ne=new Date(V);let oe=X.getFullYear()-ne.getFullYear();const q=X.getMonth()-ne.getMonth();return(q<0||q===0&&X.getDate()<ne.getDate())&&oe--,oe>=18}function N(V,X,ne,oe){const q=[];if(V||q.push("Password is required."),V&&V.length<10&&q.push("Password must be at least 10 characters long."),V&&!/[a-z]/.test(V)&&q.push("Password must contain at least one lowercase letter."),V&&!/[A-Z]/.test(V)&&q.push("Password must contain at least one uppercase letter."),V&&!/[0-9]/.test(V)&&q.push("Password must contain at least one digit."),V&&!/[^A-Za-z0-9]/.test(V)&&q.push("Password must contain at least one symbol."),V&&X&&V.toLowerCase().includes(X.toLowerCase())&&q.push("Password must not contain your first name."),V&&ne&&V.toLowerCase().includes(ne.toLowerCase())&&q.push("Password must not contain your last name."),V&&oe){const te=new Date(oe).toISOString().slice(0,10).replace(/-/g,"");te&&V.includes(te)&&q.push("Password must not contain your date of birth.")}return V&&fh.some(te=>V.toLowerCase().includes(te))&&q.push("Password must not contain common password words."),q}const _=Qe({firstName:ge().required("First name is required."),lastName:ge().required("Last name is required."),dob:XN().required("Date of birth is required.").test("age","You must be at least 18 years old.",k),password:ge().required("Password is required.")}),{register:C,setError:E,handleSubmit:T,trigger:D,watch:P,setValue:M,control:O,formState:{errors:F,dirtyFields:z}}=Oe({resolver:Xe(_),defaultValues:{firstName:t.firstName,lastName:t.lastName,dob:w.current,password:t.password},criteriaMode:"all"}),H=P();R.useEffect(()=>{x(N(H.password,H.firstName,H.lastName,H.dob))},[H.password,H.firstName,H.lastName,H.dob]);function A(){S(!0),u(!1)}function j(){p(!0),y(!1)}const I=H.firstName&&H.lastName&&H.dob&&k(H.dob)&&H.password&&b.length===0&&v&&m;async function B(){c(!0);try{const V=await l.register(t.email,H.password,n);if(!V.error)localStorage.setItem("token",V.token),l.setTable("device"),await l.callRestAPI({active:1,user_id:V.user_id,last_login_time:new Date().toISOString().split("T")[0],uid:localStorage.getItem("device-uid")},"POST"),await _t("edit-self","post",{user:{first_name:H.firstName,last_name:H.lastName},profile:{dob:S3e(H.dob,w.current)?void 0:q1(H.dob).format("yyyy-MM-DD")}},"",V.token),localStorage.removeItem("token"),a({type:"ALLOW_CHECK_VERIFICATION"}),e("/check-verification"),localStorage.setItem("first_login",V.user_id),c(!1);else if(c(!1),V.validation){const X=Object.keys(V.validation);for(let ne=0;ne<X.length;ne++){const oe=X[ne];E(oe,{type:"manual",message:V.validation[oe]})}}}catch(V){c(!1),E("firstName",{type:"manual",message:V.message})}}return t.email?f(Se,{children:[s("section",{className:"flex flex-col items-center justify-center bg-white md:w-1/2",children:f("form",{className:"flex w-full max-w-md flex-col px-6",onSubmit:T(B),autoComplete:"off",children:[s("h1",{className:"mb-8 text-center text-5xl font-bold",children:"Finish Signing Up"}),f("div",{className:"mb-8",children:[s("input",{type:"text",...C("firstName"),className:"w-full resize-none rounded-md border bg-transparent px-4 py-2 focus:outline-none active:outline-none",placeholder:"First name",autoComplete:"off"}),s("p",{className:"mt-2 block text-xs italic text-red-500",children:(Y=F.firstName)==null?void 0:Y.message})]}),f("div",{className:"mb-8",children:[s("input",{type:"text",...C("lastName"),className:"w-full resize-none rounded-md border bg-transparent px-4 py-2 focus:outline-none active:outline-none",placeholder:"Last name",autoComplete:"off"}),s("p",{className:"mt-2 block text-xs italic text-red-500",children:(U=F.lastName)==null?void 0:U.message})]}),s(No,{control:O,name:"dob",min:new Date("1950-01-01"),max:w.current,setValue:V=>M("dob",V)}),s("p",{className:"mt-2 block text-xs italic text-red-500",children:(W=F.dob)==null?void 0:W.message}),f("div",{className:`${b.length>0&&z.password?"rounded-md border border-[#C42945]":"borde"} relative mb-4 flex flex-col rounded-md bg-transparent`,children:[f("div",{className:"flex items-center justify-between",children:[s("input",{autoComplete:r?"off":"new-password",type:r?"text":"password",...C("password",{onChange:()=>{D("password")}}),className:"flex-grow rounded-md border p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Password"}),s("button",{type:"button",onClick:()=>i(V=>!V),className:"absolute right-1 top-[20%]",children:r?s("img",{src:"/show.png",alt:"",className:"mr-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 w-6"})})]}),z.password&&b.length>0&&s("ul",{className:"ml-6 mt-2 list-disc text-xs text-red-500",children:b.map((V,X)=>s("li",{children:V},X))})]}),f("p",{className:"mb-4 text-sm normal-case text-gray-500",children:["Select and agree to"," ",f("button",{type:"button",onClick:()=>u(!0),className:"underline",children:[" ","Terms and Conditions"]})," ","to continue."," ",s("button",{type:"button",onClick:()=>y(!0),className:"underline",children:"Privacy Policy"})]}),f("div",{className:"mb-1 flex flex-col",children:[" ",!v&&s("span",{className:"text-xs text-red-500",children:"You must agree to the Terms and Conditions."}),!m&&s("span",{className:"text-xs text-red-500",children:"You must read the Privacy Policy to the end."})]}),s(Ft,{loading:o,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none disabled:cursor-not-allowed ${o?"py-1":"py-2"}`,disabled:!I,children:"Continue"})]})}),s("section",{style:{backgroundImage:`url(${n=="host"?"/host-sign-up.jpg":"/sign-up-bg.jpg"})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},className:"hidden w-1/2 md:block"}),s(k3e,{isOpen:d,closeModal:()=>u(!1),setIsAgreed:A}),s(m_e,{isOpen:g,closeModal:()=>y(!1),onReadToEnd:j})]}):s(wr,{to:"/signup"})}const Kw=()=>s(N3e,{children:f("div",{children:[s("header",{className:"absolute top-0 left-0 pt-4 md:pl-16 pl-6",children:s($e,{to:"/",children:s(ln,{type:"logo",fill:"fill-[#101828]"})})}),s("div",{className:"min-h-screen flex justify-center w-full",children:s(Xu,{})})]})});var p_e=["aaa","aarp","abarth","abb","abbott","abbvie","abc","able","abogado","abudhabi","ac","academy","accenture","accountant","accountants","aco","actor","ad","ads","adult","ae","aeg","aero","aetna","af","afl","africa","ag","agakhan","agency","ai","aig","airbus","airforce","airtel","akdn","al","alfaromeo","alibaba","alipay","allfinanz","allstate","ally","alsace","alstom","am","amazon","americanexpress","americanfamily","amex","amfam","amica","amsterdam","analytics","android","anquan","anz","ao","aol","apartments","app","apple","aq","aquarelle","ar","arab","aramco","archi","army","arpa","art","arte","as","asda","asia","associates","at","athleta","attorney","au","auction","audi","audible","audio","auspost","author","auto","autos","avianca","aw","aws","ax","axa","az","azure","ba","baby","baidu","banamex","bananarepublic","band","bank","bar","barcelona","barclaycard","barclays","barefoot","bargains","baseball","basketball","bauhaus","bayern","bb","bbc","bbt","bbva","bcg","bcn","bd","be","beats","beauty","beer","bentley","berlin","best","bestbuy","bet","bf","bg","bh","bharti","bi","bible","bid","bike","bing","bingo","bio","biz","bj","black","blackfriday","blockbuster","blog","bloomberg","blue","bm","bms","bmw","bn","bnpparibas","bo","boats","boehringer","bofa","bom","bond","boo","book","booking","bosch","bostik","boston","bot","boutique","box","br","bradesco","bridgestone","broadway","broker","brother","brussels","bs","bt","build","builders","business","buy","buzz","bv","bw","by","bz","bzh","ca","cab","cafe","cal","call","calvinklein","cam","camera","camp","canon","capetown","capital","capitalone","car","caravan","cards","care","career","careers","cars","casa","case","cash","casino","cat","catering","catholic","cba","cbn","cbre","cbs","cc","cd","center","ceo","cern","cf","cfa","cfd","cg","ch","chanel","channel","charity","chase","chat","cheap","chintai","christmas","chrome","church","ci","cipriani","circle","cisco","citadel","citi","citic","city","cityeats","ck","cl","claims","cleaning","click","clinic","clinique","clothing","cloud","club","clubmed","cm","cn","co","coach","codes","coffee","college","cologne","com","comcast","commbank","community","company","compare","computer","comsec","condos","construction","consulting","contact","contractors","cooking","cookingchannel","cool","coop","corsica","country","coupon","coupons","courses","cpa","cr","credit","creditcard","creditunion","cricket","crown","crs","cruise","cruises","cu","cuisinella","cv","cw","cx","cy","cymru","cyou","cz","dabur","dad","dance","data","date","dating","datsun","day","dclk","dds","de","deal","dealer","deals","degree","delivery","dell","deloitte","delta","democrat","dental","dentist","desi","design","dev","dhl","diamonds","diet","digital","direct","directory","discount","discover","dish","diy","dj","dk","dm","dnp","do","docs","doctor","dog","domains","dot","download","drive","dtv","dubai","dunlop","dupont","durban","dvag","dvr","dz","earth","eat","ec","eco","edeka","edu","education","ee","eg","email","emerck","energy","engineer","engineering","enterprises","epson","equipment","er","ericsson","erni","es","esq","estate","et","etisalat","eu","eurovision","eus","events","exchange","expert","exposed","express","extraspace","fage","fail","fairwinds","faith","family","fan","fans","farm","farmers","fashion","fast","fedex","feedback","ferrari","ferrero","fi","fiat","fidelity","fido","film","final","finance","financial","fire","firestone","firmdale","fish","fishing","fit","fitness","fj","fk","flickr","flights","flir","florist","flowers","fly","fm","fo","foo","food","foodnetwork","football","ford","forex","forsale","forum","foundation","fox","fr","free","fresenius","frl","frogans","frontdoor","frontier","ftr","fujitsu","fun","fund","furniture","futbol","fyi","ga","gal","gallery","gallo","gallup","game","games","gap","garden","gay","gb","gbiz","gd","gdn","ge","gea","gent","genting","george","gf","gg","ggee","gh","gi","gift","gifts","gives","giving","gl","glass","gle","global","globo","gm","gmail","gmbh","gmo","gmx","gn","godaddy","gold","goldpoint","golf","goo","goodyear","goog","google","gop","got","gov","gp","gq","gr","grainger","graphics","gratis","green","gripe","grocery","group","gs","gt","gu","guardian","gucci","guge","guide","guitars","guru","gw","gy","hair","hamburg","hangout","haus","hbo","hdfc","hdfcbank","health","healthcare","help","helsinki","here","hermes","hgtv","hiphop","hisamitsu","hitachi","hiv","hk","hkt","hm","hn","hockey","holdings","holiday","homedepot","homegoods","homes","homesense","honda","horse","hospital","host","hosting","hot","hoteles","hotels","hotmail","house","how","hr","hsbc","ht","hu","hughes","hyatt","hyundai","ibm","icbc","ice","icu","id","ie","ieee","ifm","ikano","il","im","imamat","imdb","immo","immobilien","in","inc","industries","infiniti","info","ing","ink","institute","insurance","insure","int","international","intuit","investments","io","ipiranga","iq","ir","irish","is","ismaili","ist","istanbul","it","itau","itv","jaguar","java","jcb","je","jeep","jetzt","jewelry","jio","jll","jm","jmp","jnj","jo","jobs","joburg","jot","joy","jp","jpmorgan","jprs","juegos","juniper","kaufen","kddi","ke","kerryhotels","kerrylogistics","kerryproperties","kfh","kg","kh","ki","kia","kids","kim","kinder","kindle","kitchen","kiwi","km","kn","koeln","komatsu","kosher","kp","kpmg","kpn","kr","krd","kred","kuokgroup","kw","ky","kyoto","kz","la","lacaixa","lamborghini","lamer","lancaster","lancia","land","landrover","lanxess","lasalle","lat","latino","latrobe","law","lawyer","lb","lc","lds","lease","leclerc","lefrak","legal","lego","lexus","lgbt","li","lidl","life","lifeinsurance","lifestyle","lighting","like","lilly","limited","limo","lincoln","link","lipsy","live","living","lk","llc","llp","loan","loans","locker","locus","lol","london","lotte","lotto","love","lpl","lplfinancial","lr","ls","lt","ltd","ltda","lu","lundbeck","luxe","luxury","lv","ly","ma","madrid","maif","maison","makeup","man","management","mango","map","market","marketing","markets","marriott","marshalls","maserati","mattel","mba","mc","mckinsey","md","me","med","media","meet","melbourne","meme","memorial","men","menu","merckmsd","mg","mh","miami","microsoft","mil","mini","mint","mit","mitsubishi","mk","ml","mlb","mls","mm","mma","mn","mo","mobi","mobile","moda","moe","moi","mom","monash","money","monster","mormon","mortgage","moscow","moto","motorcycles","mov","movie","mp","mq","mr","ms","msd","mt","mtn","mtr","mu","museum","music","mutual","mv","mw","mx","my","mz","na","nab","nagoya","name","natura","navy","nba","nc","ne","nec","net","netbank","netflix","network","neustar","new","news","next","nextdirect","nexus","nf","nfl","ng","ngo","nhk","ni","nico","nike","nikon","ninja","nissan","nissay","nl","no","nokia","northwesternmutual","norton","now","nowruz","nowtv","np","nr","nra","nrw","ntt","nu","nyc","nz","obi","observer","office","okinawa","olayan","olayangroup","oldnavy","ollo","om","omega","one","ong","onl","online","ooo","open","oracle","orange","org","organic","origins","osaka","otsuka","ott","ovh","pa","page","panasonic","paris","pars","partners","parts","party","passagens","pay","pccw","pe","pet","pf","pfizer","pg","ph","pharmacy","phd","philips","phone","photo","photography","photos","physio","pics","pictet","pictures","pid","pin","ping","pink","pioneer","pizza","pk","pl","place","play","playstation","plumbing","plus","pm","pn","pnc","pohl","poker","politie","porn","post","pr","pramerica","praxi","press","prime","pro","prod","productions","prof","progressive","promo","properties","property","protection","pru","prudential","ps","pt","pub","pw","pwc","py","qa","qpon","quebec","quest","racing","radio","re","read","realestate","realtor","realty","recipes","red","redstone","redumbrella","rehab","reise","reisen","reit","reliance","ren","rent","rentals","repair","report","republican","rest","restaurant","review","reviews","rexroth","rich","richardli","ricoh","ril","rio","rip","ro","rocher","rocks","rodeo","rogers","room","rs","rsvp","ru","rugby","ruhr","run","rw","rwe","ryukyu","sa","saarland","safe","safety","sakura","sale","salon","samsclub","samsung","sandvik","sandvikcoromant","sanofi","sap","sarl","sas","save","saxo","sb","sbi","sbs","sc","sca","scb","schaeffler","schmidt","scholarships","school","schule","schwarz","science","scot","sd","se","search","seat","secure","security","seek","select","sener","services","seven","sew","sex","sexy","sfr","sg","sh","shangrila","sharp","shaw","shell","shia","shiksha","shoes","shop","shopping","shouji","show","showtime","si","silk","sina","singles","site","sj","sk","ski","skin","sky","skype","sl","sling","sm","smart","smile","sn","sncf","so","soccer","social","softbank","software","sohu","solar","solutions","song","sony","soy","spa","space","sport","spot","sr","srl","ss","st","stada","staples","star","statebank","statefarm","stc","stcgroup","stockholm","storage","store","stream","studio","study","style","su","sucks","supplies","supply","support","surf","surgery","suzuki","sv","swatch","swiss","sx","sy","sydney","systems","sz","tab","taipei","talk","taobao","target","tatamotors","tatar","tattoo","tax","taxi","tc","tci","td","tdk","team","tech","technology","tel","temasek","tennis","teva","tf","tg","th","thd","theater","theatre","tiaa","tickets","tienda","tiffany","tips","tires","tirol","tj","tjmaxx","tjx","tk","tkmaxx","tl","tm","tmall","tn","to","today","tokyo","tools","top","toray","toshiba","total","tours","town","toyota","toys","tr","trade","trading","training","travel","travelchannel","travelers","travelersinsurance","trust","trv","tt","tube","tui","tunes","tushu","tv","tvs","tw","tz","ua","ubank","ubs","ug","uk","unicom","university","uno","uol","ups","us","uy","uz","va","vacations","vana","vanguard","vc","ve","vegas","ventures","verisign","versicherung","vet","vg","vi","viajes","video","vig","viking","villas","vin","vip","virgin","visa","vision","viva","vivo","vlaanderen","vn","vodka","volkswagen","volvo","vote","voting","voto","voyage","vu","vuelos","wales","walmart","walter","wang","wanggou","watch","watches","weather","weatherchannel","webcam","weber","website","wed","wedding","weibo","weir","wf","whoswho","wien","wiki","williamhill","win","windows","wine","winners","wme","wolterskluwer","woodside","work","works","world","wow","ws","wtc","wtf","xbox","xerox","xfinity","xihuan","xin","xn--11b4c3d","xn--1ck2e1b","xn--1qqw23a","xn--2scrj9c","xn--30rr7y","xn--3bst00m","xn--3ds443g","xn--3e0b707e","xn--3hcrj9c","xn--3pxu8k","xn--42c2d9a","xn--45br5cyl","xn--45brj9c","xn--45q11c","xn--4dbrk0ce","xn--4gbrim","xn--54b7fta0cc","xn--55qw42g","xn--55qx5d","xn--5su34j936bgsg","xn--5tzm5g","xn--6frz82g","xn--6qq986b3xl","xn--80adxhks","xn--80ao21a","xn--80aqecdr1a","xn--80asehdb","xn--80aswg","xn--8y0a063a","xn--90a3ac","xn--90ae","xn--90ais","xn--9dbq2a","xn--9et52u","xn--9krt00a","xn--b4w605ferd","xn--bck1b9a5dre4c","xn--c1avg","xn--c2br7g","xn--cck2b3b","xn--cckwcxetd","xn--cg4bki","xn--clchc0ea0b2g2a9gcd","xn--czr694b","xn--czrs0t","xn--czru2d","xn--d1acj3b","xn--d1alf","xn--e1a4c","xn--eckvdtc9d","xn--efvy88h","xn--fct429k","xn--fhbei","xn--fiq228c5hs","xn--fiq64b","xn--fiqs8s","xn--fiqz9s","xn--fjq720a","xn--flw351e","xn--fpcrj9c3d","xn--fzc2c9e2c","xn--fzys8d69uvgm","xn--g2xx48c","xn--gckr3f0f","xn--gecrj9c","xn--gk3at1e","xn--h2breg3eve","xn--h2brj9c","xn--h2brj9c8c","xn--hxt814e","xn--i1b6b1a6a2e","xn--imr513n","xn--io0a7i","xn--j1aef","xn--j1amh","xn--j6w193g","xn--jlq480n2rg","xn--jvr189m","xn--kcrx77d1x4a","xn--kprw13d","xn--kpry57d","xn--kput3i","xn--l1acc","xn--lgbbat1ad8j","xn--mgb9awbf","xn--mgba3a3ejt","xn--mgba3a4f16a","xn--mgba7c0bbn0a","xn--mgbaakc7dvf","xn--mgbaam7a8h","xn--mgbab2bd","xn--mgbah1a3hjkrd","xn--mgbai9azgqp6j","xn--mgbayh7gpa","xn--mgbbh1a","xn--mgbbh1a71e","xn--mgbc0a9azcg","xn--mgbca7dzdo","xn--mgbcpq6gpa1a","xn--mgberp4a5d4ar","xn--mgbgu82a","xn--mgbi4ecexp","xn--mgbpl2fh","xn--mgbt3dhd","xn--mgbtx2b","xn--mgbx4cd0ab","xn--mix891f","xn--mk1bu44c","xn--mxtq1m","xn--ngbc5azd","xn--ngbe9e0a","xn--ngbrx","xn--node","xn--nqv7f","xn--nqv7fs00ema","xn--nyqy26a","xn--o3cw4h","xn--ogbpf8fl","xn--otu796d","xn--p1acf","xn--p1ai","xn--pgbs0dh","xn--pssy2u","xn--q7ce6a","xn--q9jyb4c","xn--qcka1pmc","xn--qxa6a","xn--qxam","xn--rhqv96g","xn--rovu88b","xn--rvc1e0am3e","xn--s9brj9c","xn--ses554g","xn--t60b56a","xn--tckwe","xn--tiq49xqyj","xn--unup4y","xn--vermgensberater-ctb","xn--vermgensberatung-pwb","xn--vhquv","xn--vuq861b","xn--w4r85el8fhu5dnra","xn--w4rs40l","xn--wgbh1c","xn--wgbl6a","xn--xhq521b","xn--xkc2al3hye2a","xn--xkc2dl3a5ee0h","xn--y9a3aq","xn--yfro4i67o","xn--ygbi2ammx","xn--zfr164b","xxx","xyz","yachts","yahoo","yamaxun","yandex","ye","yodobashi","yoga","yokohama","you","youtube","yt","yun","za","zappos","zara","zero","zip","zm","zone","zuerich","zw"];function n_(){return n_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},n_.apply(this,arguments)}function h_e(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,i;for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function F0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g_e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var sx=function(e){g_e(t,e);function t(){var a;return a=e.call(this)||this,a.handleExpired=a.handleExpired.bind(F0(a)),a.handleErrored=a.handleErrored.bind(F0(a)),a.handleChange=a.handleChange.bind(F0(a)),a.handleRecaptchaRef=a.handleRecaptchaRef.bind(F0(a)),a}var n=t.prototype;return n.getValue=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this.props.grecaptcha.getResponse(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var r=this.props.grecaptcha;if(r&&this._widgetId!==void 0)return r.execute(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var r=this;return new Promise(function(i,o){r.executionResolve=i,r.executionReject=o,r.execute()})},n.reset=function(){this.props.grecaptcha&&this._widgetId!==void 0&&this.props.grecaptcha.reset(this._widgetId)},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(r){this.props.onChange&&this.props.onChange(r),this.executionResolve&&(this.executionResolve(r),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){if(this.props.grecaptcha&&this.props.grecaptcha.render&&this._widgetId===void 0){var r=document.createElement("div");this._widgetId=this.props.grecaptcha.render(r,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge}),this.captcha.appendChild(r)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.componentWillUnmount=function(){this._widgetId!==void 0&&(this.delayOfCaptchaIframeRemoving(),this.reset())},n.delayOfCaptchaIframeRemoving=function(){var r=document.createElement("div");for(document.body.appendChild(r),r.style.display="none";this.captcha.firstChild;)r.appendChild(this.captcha.firstChild);setTimeout(function(){document.body.removeChild(r)},5e3)},n.handleRecaptchaRef=function(r){this.captcha=r},n.render=function(){var r=this.props;r.sitekey,r.onChange,r.theme,r.type,r.tabindex,r.onExpired,r.onErrored,r.size,r.stoken,r.grecaptcha,r.badge,r.hl;var i=h_e(r,["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl"]);return R.createElement("div",n_({},i,{ref:this.handleRecaptchaRef}))},t}(R.Component);sx.displayName="ReCAPTCHA";sx.propTypes={sitekey:Ie.string.isRequired,onChange:Ie.func,grecaptcha:Ie.object,theme:Ie.oneOf(["dark","light"]),type:Ie.oneOf(["image","audio"]),tabindex:Ie.number,onExpired:Ie.func,onErrored:Ie.func,size:Ie.oneOf(["compact","normal","invisible"]),stoken:Ie.string,hl:Ie.string,badge:Ie.oneOf(["bottomright","bottomleft","inline"])};sx.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var ix={exports:{}},In={};/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Va=typeof Symbol=="function"&&Symbol.for,I5=Va?Symbol.for("react.element"):60103,O5=Va?Symbol.for("react.portal"):60106,ox=Va?Symbol.for("react.fragment"):60107,lx=Va?Symbol.for("react.strict_mode"):60108,cx=Va?Symbol.for("react.profiler"):60114,dx=Va?Symbol.for("react.provider"):60109,ux=Va?Symbol.for("react.context"):60110,P5=Va?Symbol.for("react.async_mode"):60111,fx=Va?Symbol.for("react.concurrent_mode"):60111,mx=Va?Symbol.for("react.forward_ref"):60112,px=Va?Symbol.for("react.suspense"):60113,b_e=Va?Symbol.for("react.suspense_list"):60120,hx=Va?Symbol.for("react.memo"):60115,gx=Va?Symbol.for("react.lazy"):60116,y_e=Va?Symbol.for("react.block"):60121,x_e=Va?Symbol.for("react.fundamental"):60117,w_e=Va?Symbol.for("react.responder"):60118,v_e=Va?Symbol.for("react.scope"):60119;function cs(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case I5:switch(e=e.type,e){case P5:case fx:case ox:case cx:case lx:case px:return e;default:switch(e=e&&e.$$typeof,e){case ux:case mx:case gx:case hx:case dx:return e;default:return t}}case O5:return t}}}function ej(e){return cs(e)===fx}In.AsyncMode=P5;In.ConcurrentMode=fx;In.ContextConsumer=ux;In.ContextProvider=dx;In.Element=I5;In.ForwardRef=mx;In.Fragment=ox;In.Lazy=gx;In.Memo=hx;In.Portal=O5;In.Profiler=cx;In.StrictMode=lx;In.Suspense=px;In.isAsyncMode=function(e){return ej(e)||cs(e)===P5};In.isConcurrentMode=ej;In.isContextConsumer=function(e){return cs(e)===ux};In.isContextProvider=function(e){return cs(e)===dx};In.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===I5};In.isForwardRef=function(e){return cs(e)===mx};In.isFragment=function(e){return cs(e)===ox};In.isLazy=function(e){return cs(e)===gx};In.isMemo=function(e){return cs(e)===hx};In.isPortal=function(e){return cs(e)===O5};In.isProfiler=function(e){return cs(e)===cx};In.isStrictMode=function(e){return cs(e)===lx};In.isSuspense=function(e){return cs(e)===px};In.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===ox||e===fx||e===cx||e===lx||e===px||e===b_e||typeof e=="object"&&e!==null&&(e.$$typeof===gx||e.$$typeof===hx||e.$$typeof===dx||e.$$typeof===ux||e.$$typeof===mx||e.$$typeof===x_e||e.$$typeof===w_e||e.$$typeof===v_e||e.$$typeof===y_e)};In.typeOf=cs;ix.exports=In;var R5=ix.exports,__e={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},N_e={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},S_e={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},tj={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},j5={};j5[R5.ForwardRef]=S_e;j5[R5.Memo]=tj;function ZE(e){return R5.isMemo(e)?tj:j5[e.$$typeof]||__e}var k_e=Object.defineProperty,C_e=Object.getOwnPropertyNames,QE=Object.getOwnPropertySymbols,E_e=Object.getOwnPropertyDescriptor,T_e=Object.getPrototypeOf,JE=Object.prototype;function nj(e,t,n){if(typeof t!="string"){if(JE){var a=T_e(t);a&&a!==JE&&nj(e,a,n)}var r=C_e(t);QE&&(r=r.concat(QE(t)));for(var i=ZE(e),o=ZE(t),c=0;c<r.length;++c){var l=r[c];if(!N_e[l]&&!(n&&n[l])&&!(o&&o[l])&&!(i&&i[l])){var d=E_e(t,l);try{k_e(e,l,d)}catch{}}}}return e}var aj=nj;function a_(){return a_=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},a_.apply(this,arguments)}function L_e(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,i;for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function D_e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var $s={},M_e=0;function A_e(e,t){return t=t||{},function(a){var r=a.displayName||a.name||"Component",i=function(c){D_e(l,c);function l(u,g){var y;return y=c.call(this,u,g)||this,y.state={},y.__scriptURL="",y}var d=l.prototype;return d.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+M_e++),this.__scriptLoaderID},d.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},d.asyncScriptLoaderHandleLoad=function(g){var y=this;this.setState(g,function(){return y.props.asyncScriptOnLoad&&y.props.asyncScriptOnLoad(y.state)})},d.asyncScriptLoaderTriggerOnScriptLoaded=function(){var g=$s[this.__scriptURL];if(!g||!g.loaded)throw new Error("Script is not loaded.");for(var y in g.observers)g.observers[y](g);delete window[t.callbackName]},d.componentDidMount=function(){var g=this,y=this.setupScriptURL(),w=this.asyncScriptLoaderGetScriptLoaderID(),v=t,S=v.globalName,m=v.callbackName,p=v.scriptId;if(S&&typeof window[S]!="undefined"&&($s[y]={loaded:!0,observers:{}}),$s[y]){var b=$s[y];if(b&&(b.loaded||b.errored)){this.asyncScriptLoaderHandleLoad(b);return}b.observers[w]=function(C){return g.asyncScriptLoaderHandleLoad(C)};return}var x={};x[w]=function(C){return g.asyncScriptLoaderHandleLoad(C)},$s[y]={loaded:!1,observers:x};var k=document.createElement("script");k.src=y,k.async=!0;for(var N in t.attributes)k.setAttribute(N,t.attributes[N]);p&&(k.id=p);var _=function(E){if($s[y]){var T=$s[y],D=T.observers;for(var P in D)E(D[P])&&delete D[P]}};m&&typeof window!="undefined"&&(window[m]=function(){return g.asyncScriptLoaderTriggerOnScriptLoaded()}),k.onload=function(){var C=$s[y];C&&(C.loaded=!0,_(function(E){return m?!1:(E(C),!0)}))},k.onerror=function(){var C=$s[y];C&&(C.errored=!0,_(function(E){return E(C),!0}))},document.body.appendChild(k)},d.componentWillUnmount=function(){var g=this.__scriptURL;if(t.removeOnUnmount===!0)for(var y=document.getElementsByTagName("script"),w=0;w<y.length;w+=1)y[w].src.indexOf(g)>-1&&y[w].parentNode&&y[w].parentNode.removeChild(y[w]);var v=$s[g];v&&(delete v.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete $s[g])},d.render=function(){var g=t.globalName,y=this.props;y.asyncScriptOnLoad;var w=y.forwardedRef,v=L_e(y,["asyncScriptOnLoad","forwardedRef"]);return g&&typeof window!="undefined"&&(v[g]=typeof window[g]!="undefined"?window[g]:void 0),v.ref=w,h.exports.createElement(a,v)},l}(h.exports.Component),o=h.exports.forwardRef(function(c,l){return h.exports.createElement(i,a_({},c,{forwardedRef:l}))});return o.displayName="AsyncScriptLoader("+r+")",o.propTypes={asyncScriptOnLoad:Ie.func},aj(o,a)}}var rj="onloadcallback",I_e="grecaptcha";function O_e(){return typeof window!="undefined"&&window.recaptchaOptions||{}}function P_e(){var e=O_e(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return"https://"+t+"/recaptcha/api.js?onload="+rj+"&render=explicit"}var R_e=A_e(P_e,{callbackName:rj,globalName:I_e})(sx);const Xw=()=>{const e=je(),{signUpData:t,dispatch:n}=y5(),a=t.role,r=Qe({email:ge().required("Email is required").email("Invalid email address").test("tld-check","Invalid email TLD",x=>{if(!x)return!1;const k=x.split(".").pop();return p_e.includes(k)})}),[i,o]=h.exports.useState(!1),[c,l]=h.exports.useState(null),[d,u]=h.exports.useState(""),{register:g,handleSubmit:y,setError:w,formState:{errors:v}}=Oe({resolver:Xe(r),defaultValues:{email:t.email}}),S=async x=>{if(u(""),!c){u("Please complete the recaptcha.");return}o(!0);try{const k=await _t("email-exist","post",{email:x.email},"");if(k.error||k.exist)throw new Error("User already exists");n({type:"SET_EMAIL",payload:x.email}),e("/signup/details?role="+a)}catch(k){w("email",{type:"manual",message:k.message})}o(!1)},m=async()=>{const x=await pw("google",a);window.open(x.data,"_self")},p=async()=>{const x=await pw("facebook",a);window.open(x.data,"_self")},b=async()=>{const x=await pw("apple",a);window.open(x.data,"_self")};return t.role?f(Se,{children:[f("section",{className:"flex w-full flex-col items-center justify-center bg-white md:w-1/2",children:[f("form",{className:"flex w-full max-w-md flex-col px-6",onSubmit:y(S),autoComplete:"off",children:[s("h1",{className:"mb-8 text-center text-3xl font-semibold md:text-5xl md:font-bold",children:a=="host"?"Become a host":"Sign up"}),s("input",{autoComplete:"off",...g("email"),type:"text",className:"mb-8 resize-none rounded-sm border-2 bg-transparent p-2 px-4 focus:outline-none active:outline-none",placeholder:"Email"}),Object.entries(v).length>0?s("p",{className:"error-vibrate my-3 rounded-md border border-[#C42945] bg-white px-3 py-2 text-center text-sm normal-case text-[#C42945]",children:Object.values(v)[0].message}):s(Se,{}),s("div",{className:"mb-4 flex justify-center",children:s(R_e,{sitekey:"6LfAMHMrAAAAAHZ4qGtqD9NuwVAUUQ4YQCkBMzzh",onChange:x=>{l(x),u("")}})}),d&&s("p",{className:"mb-2 text-center text-xs italic text-red-500",children:d}),s(Ft,{loading:i,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${i?"py-1":"py-2"}`,disabled:!c,children:"Continue"})]}),s("div",{className:"hr my-6 text-center",children:"OR"}),f("div",{className:"oauth flex w-full max-w-md flex-col gap-4 px-6 text-[#344054]",children:[f("button",{onClick:()=>m(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/google-icon.png",className:"h-[18px] w-[18px]"}),s("span",{children:"Sign Up With Google"})]}),f("button",{onClick:()=>p(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/facebook-icon.png",className:"h-[16px] w-[16px]"}),s("span",{children:"Sign Up With Facebook"})]}),f("button",{onClick:()=>b(),className:"flex items-center justify-center gap-2 border-2 py-[10px]",children:[s("img",{src:"/apple-icon.png",className:"h-[16px] w-[16px]"}),s("span",{children:"Sign Up With Apple"})]}),s("div",{children:f("h3",{className:"text-center text-sm normal-case text-gray-800",children:["Already have an account?"," ",s($e,{to:"/login?role="+a,className:"my-text-gradient mb-8 self-end text-sm font-semibold",children:"Log In"})," "]})})]})]}),s("section",{style:{backgroundImage:`url(${a=="host"?"/jumbotron1.jpg":"/sign-up-bg.jpg"})`,backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center"},className:"hidden w-1/2 bg-contain md:block"})]}):s(wr,{to:"/signup/select-role"})},sj=R.createContext({}),ij=!0;function j_e({baseColor:e,highlightColor:t,width:n,height:a,borderRadius:r,circle:i,direction:o,duration:c,enableAnimation:l=ij}){const d={};return o==="rtl"&&(d["--animation-direction"]="reverse"),typeof c=="number"&&(d["--animation-duration"]=`${c}s`),l||(d["--pseudo-element-display"]="none"),(typeof n=="string"||typeof n=="number")&&(d.width=n),(typeof a=="string"||typeof a=="number")&&(d.height=a),(typeof r=="string"||typeof r=="number")&&(d.borderRadius=r),i&&(d.borderRadius="50%"),typeof e!="undefined"&&(d["--base-color"]=e),typeof t!="undefined"&&(d["--highlight-color"]=t),d}function Ut({count:e=1,wrapper:t,className:n,containerClassName:a,containerTestId:r,circle:i=!1,style:o,...c}){var l,d,u;const g=R.useContext(sj),y={...c};for(const[x,k]of Object.entries(c))typeof k=="undefined"&&delete y[x];const w={...g,...y,circle:i},v={...o,...j_e(w)};let S="react-loading-skeleton";n&&(S+=` ${n}`);const m=(l=w.inline)!==null&&l!==void 0?l:!1,p=[],b=Math.ceil(e);for(let x=0;x<b;x++){let k=v;if(b>e&&x===b-1){const _=(d=k.width)!==null&&d!==void 0?d:"100%",C=e%1,E=typeof _=="number"?_*C:`calc(${_} * ${C})`;k={...k,width:E}}const N=R.createElement("span",{className:S,style:k,key:x},"\u200C");m?p.push(N):p.push(R.createElement(R.Fragment,{key:x},N,R.createElement("br",null)))}return R.createElement("span",{className:a,"data-testid":r,"aria-live":"polite","aria-busy":(u=w.enableAnimation)!==null&&u!==void 0?u:ij},t?p.map((x,k)=>R.createElement(t,{key:k},x)):p)}function z_e({children:e,...t}){return R.createElement(sj.Provider,{value:t},e)}const Zc=()=>s("svg",{width:"13",height:"16",viewBox:"0 0 13 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M11.8334 14.25C11.8334 13.2809 11.8334 12.7963 11.7186 12.402C11.4601 11.5142 10.7931 10.8195 9.94084 10.5502C9.56231 10.4306 9.09712 10.4306 8.16675 10.4306H4.83342C3.90304 10.4306 3.43785 10.4306 3.05932 10.5502C2.20705 10.8195 1.54011 11.5142 1.28157 12.402C1.16675 12.7963 1.16675 13.2809 1.16675 14.25M9.50008 4.875C9.50008 6.60089 8.15694 8 6.50008 8C4.84323 8 3.50008 6.60089 3.50008 4.875C3.50008 3.14911 4.84323 1.75 6.50008 1.75C8.15694 1.75 9.50008 3.14911 9.50008 4.875Z",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),ds=()=>f("svg",{width:"18",height:"17",viewBox:"0 0 18 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M9.00001 14.275L4.85001 16.775C4.66668 16.8917 4.47501 16.9417 4.27501 16.925C4.07501 16.9083 3.90001 16.8417 3.75001 16.725C3.60001 16.6083 3.48334 16.4627 3.40001 16.288C3.31668 16.1127 3.30001 15.9167 3.35001 15.7L4.45001 10.975L0.775009 7.8C0.608343 7.65 0.504343 7.479 0.463009 7.287C0.421009 7.09566 0.433343 6.90833 0.500009 6.725C0.566676 6.54166 0.666676 6.39166 0.800009 6.275C0.933343 6.15833 1.11668 6.08333 1.35001 6.05L6.20001 5.625L8.07501 1.175C8.15834 0.974997 8.28768 0.824997 8.46301 0.724997C8.63768 0.624997 8.81668 0.574997 9.00001 0.574997C9.18334 0.574997 9.36268 0.624997 9.53801 0.724997C9.71268 0.824997 9.84168 0.974997 9.92501 1.175L11.8 5.625L16.65 6.05C16.8833 6.08333 17.0667 6.15833 17.2 6.275C17.3333 6.39166 17.4333 6.54166 17.5 6.725C17.5667 6.90833 17.5793 7.09566 17.538 7.287C17.496 7.479 17.3917 7.65 17.225 7.8L13.55 10.975L14.65 15.7C14.7 15.9167 14.6833 16.1127 14.6 16.288C14.5167 16.4627 14.4 16.6083 14.25 16.725C14.1 16.8417 13.925 16.9083 13.725 16.925C13.525 16.9417 13.3333 16.8917 13.15 16.775L9.00001 14.275Z",fill:"url(#paint0_linear_5394_12703)"}),s("defs",{children:f("linearGradient",{id:"paint0_linear_5394_12703",x1:"19.548",y1:"6.20047",x2:"8.71717",y2:"15.4871",gradientUnits:"userSpaceOnUse",children:[s("stop",{stopColor:"#33D4B7"}),s("stop",{offset:"1",stopColor:"#0D9895"})]})})]});new _e;const Cp=({data:e,forceRender:t,isFav:n})=>{const[a,r]=h.exports.useState(!1);return s(z_e,{enableAnimation:!1,children:f($e,{to:`/property/${e.id}`,state:e,className:`overflow-hidden relative flex flex-col ${e.id?"":"pointer-events-none"}`,children:[s("img",{src:e.url,className:"w-full rounded-lg h-[var(--property-card-img-height)] object-cover mb-2",alt:e.name,onLoad:()=>r(!0)}),a?f("div",{className:"absolute z-1 w-full h-[var(--property-card-img-height)] top-0 left-0 mb-[8px] flex flex-col px-[8px] pb-[13px]",children:[s(ls,{space_id:e.id,user_property_spaces_id:e.user_property_spaces_id,reRender:t,withLoader:!0}),s("span",{className:"px-2 py-1 text-white bg-black font-bold rounded-lg text-xs self-start",children:e.category||s(Ut,{})})]}):s(Ut,{className:"!absolute z-1 w-full h-[var(--property-card-img-height)] top-0 left-0 !rounded-lg"}),f("div",{className:`px-[12px] ${a?"":"-mt-5"} flex-grow flex flex-col`,children:[s("h4",{className:"text-lg font-semibold",children:e.name||s(Ut,{})}),s("p",{className:"text-gray-500 mb-[6px] truncate flex-grow",children:e.city?e.city+", "+e.country:s(Ut,{})}),f("div",{className:"flex justify-between items-end lowercase",children:[f("p",{children:[e.rate?"from:":s(Ut,{width:100})," ",e.rate?f(Se,{children:[f("span",{className:"font-bold",children:["$",e.rate]})," / ",s("span",{className:"",children:"hour"})]}):f(Se,{children:[s("span",{}),s("span",{})]})]}),f("div",{className:"flex items-center gap-2",children:[e.max_capacity?s(Zc,{}):s("span",{}),s("span",{children:e.max_capacity||s(Ut,{})})]}),f("p",{className:"flex gap-2 items-center",children:[e.max_capacity?s(ds,{}):s("span",{}),e.rate?s("span",{children:(Number(e.average_space_rating)||0).toFixed(1)}):s("span",{})]})]})]})]})})},F_e=()=>s("svg",{width:"22",height:"20",viewBox:"0 0 22 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M21 19V17C21 15.1362 19.7252 13.5701 18 13.126M14.5 1.29076C15.9659 1.88415 17 3.32131 17 5C17 6.67869 15.9659 8.11585 14.5 8.70924M16 19C16 17.1362 16 16.2044 15.6955 15.4693C15.2895 14.4892 14.5108 13.7105 13.5307 13.3045C12.7956 13 11.8638 13 10 13H7C5.13623 13 4.20435 13 3.46927 13.3045C2.48915 13.7105 1.71046 14.4892 1.30448 15.4693C1 16.2044 1 17.1362 1 19M12.5 5C12.5 7.20914 10.7091 9 8.5 9C6.29086 9 4.5 7.20914 4.5 5C4.5 2.79086 6.29086 1 8.5 1C10.7091 1 12.5 2.79086 12.5 5Z",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});var r_=function(e,t){return r_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,a){n.__proto__=a}||function(n,a){for(var r in a)a.hasOwnProperty(r)&&(n[r]=a[r])},r_(e,t)};function $_e(e,t){r_(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Fm=function(){return Fm=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Fm.apply(this,arguments)};function B_e(e,t,n,a){var r,i=!1,o=0;function c(){r&&clearTimeout(r)}function l(){c(),i=!0}typeof t!="boolean"&&(a=n,n=t,t=void 0);function d(){var u=this,g=Date.now()-o,y=arguments;if(i)return;function w(){o=Date.now(),n.apply(u,y)}function v(){r=void 0}a&&!r&&w(),c(),a===void 0&&g>e?w():t!==!0&&(r=setTimeout(a?v:w,a===void 0?e-g:e))}return d.cancel=l,d}var wu={Pixel:"Pixel",Percent:"Percent"},KE={unit:wu.Percent,value:.8};function XE(e){return typeof e=="number"?{unit:wu.Percent,value:e*100}:typeof e=="string"?e.match(/^(\d*(\.\d+)?)px$/)?{unit:wu.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:wu.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),KE):(console.warn("scrollThreshold should be string or number"),KE)}var Pc=function(e){$_e(t,e);function t(n){var a=e.call(this,n)||this;return a.lastScrollTop=0,a.actionTriggered=!1,a.startY=0,a.currentY=0,a.dragging=!1,a.maxPullDownDistance=0,a.getScrollableTarget=function(){return a.props.scrollableTarget instanceof HTMLElement?a.props.scrollableTarget:typeof a.props.scrollableTarget=="string"?document.getElementById(a.props.scrollableTarget):(a.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might
happen because the element may not have been added to DOM yet.
See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.
`),null)},a.onStart=function(r){a.lastScrollTop||(a.dragging=!0,r instanceof MouseEvent?a.startY=r.pageY:r instanceof TouchEvent&&(a.startY=r.touches[0].pageY),a.currentY=a.startY,a._infScroll&&(a._infScroll.style.willChange="transform",a._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},a.onMove=function(r){!a.dragging||(r instanceof MouseEvent?a.currentY=r.pageY:r instanceof TouchEvent&&(a.currentY=r.touches[0].pageY),!(a.currentY<a.startY)&&(a.currentY-a.startY>=Number(a.props.pullDownToRefreshThreshold)&&a.setState({pullToRefreshThresholdBreached:!0}),!(a.currentY-a.startY>a.maxPullDownDistance*1.5)&&a._infScroll&&(a._infScroll.style.overflow="visible",a._infScroll.style.transform="translate3d(0px, "+(a.currentY-a.startY)+"px, 0px)")))},a.onEnd=function(){a.startY=0,a.currentY=0,a.dragging=!1,a.state.pullToRefreshThresholdBreached&&(a.props.refreshFunction&&a.props.refreshFunction(),a.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){a._infScroll&&(a._infScroll.style.overflow="auto",a._infScroll.style.transform="none",a._infScroll.style.willChange="unset")})},a.onScrollListener=function(r){typeof a.props.onScroll=="function"&&setTimeout(function(){return a.props.onScroll&&a.props.onScroll(r)},0);var i=a.props.height||a._scrollableNode?r.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!a.actionTriggered){var o=a.props.inverse?a.isElementAtTop(i,a.props.scrollThreshold):a.isElementAtBottom(i,a.props.scrollThreshold);o&&a.props.hasMore&&(a.actionTriggered=!0,a.setState({showLoader:!0}),a.props.next&&a.props.next()),a.lastScrollTop=i.scrollTop}},a.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},a.throttledOnScrollListener=B_e(150,a.onScrollListener).bind(a),a.onStart=a.onStart.bind(a),a.onMove=a.onMove.bind(a),a.onEnd=a.onEnd.bind(a),a}return t.prototype.componentDidMount=function(){if(typeof this.props.dataLength=="undefined")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing.
Pull Down To Refresh functionality will not work
as expected. Check README.md for usage'`)},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(n,a){var r=n.dataLength!==a.prevDataLength;return r?Fm(Fm({},a),{prevDataLength:n.dataLength}):null},t.prototype.isElementAtTop=function(n,a){a===void 0&&(a=.8);var r=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,i=XE(a);return i.unit===wu.Pixel?n.scrollTop<=i.value+r-n.scrollHeight+1:n.scrollTop<=i.value/100+r-n.scrollHeight+1},t.prototype.isElementAtBottom=function(n,a){a===void 0&&(a=.8);var r=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,i=XE(a);return i.unit===wu.Pixel?n.scrollTop+r>=n.scrollHeight-i.value:n.scrollTop+r>=i.value/100*n.scrollHeight},t.prototype.render=function(){var n=this,a=Fm({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),r=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),i=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return s("div",{style:i,className:"infinite-scroll-component__outerdiv",children:f("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(o){return n._infScroll=o},style:a,children:[this.props.pullDownToRefresh&&s("div",{style:{position:"relative"},ref:function(o){return n._pullDown=o},children:s("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance},children:this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent})}),this.props.children,!this.state.showLoader&&!r&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage]})})},t}(h.exports.Component);function e8(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function z5(e={},t={}){Object.keys(t).forEach(n=>{typeof e[n]=="undefined"?e[n]=t[n]:e8(t[n])&&e8(e[n])&&Object.keys(t[n]).length>0&&z5(e[n],t[n])})}const oj={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Fr(){const e=typeof document!="undefined"?document:{};return z5(e,oj),e}const H_e={document:oj,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout=="undefined"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout!="undefined"&&clearTimeout(e)}};function Ia(){const e=typeof window!="undefined"?window:{};return z5(e,H_e),e}function U_e(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get(){return t},set(n){t.__proto__=n}})}class ml extends Array{constructor(t){typeof t=="number"?super(t):(super(...t||[]),U_e(this))}}function Nh(e=[]){const t=[];return e.forEach(n=>{Array.isArray(n)?t.push(...Nh(n)):t.push(n)}),t}function lj(e,t){return Array.prototype.filter.call(e,t)}function V_e(e){const t=[];for(let n=0;n<e.length;n+=1)t.indexOf(e[n])===-1&&t.push(e[n]);return t}function W_e(e,t){if(typeof e!="string")return[e];const n=[],a=t.querySelectorAll(e);for(let r=0;r<a.length;r+=1)n.push(a[r]);return n}function ct(e,t){const n=Ia(),a=Fr();let r=[];if(!t&&e instanceof ml)return e;if(!e)return new ml(r);if(typeof e=="string"){const i=e.trim();if(i.indexOf("<")>=0&&i.indexOf(">")>=0){let o="div";i.indexOf("<li")===0&&(o="ul"),i.indexOf("<tr")===0&&(o="tbody"),(i.indexOf("<td")===0||i.indexOf("<th")===0)&&(o="tr"),i.indexOf("<tbody")===0&&(o="table"),i.indexOf("<option")===0&&(o="select");const c=a.createElement(o);c.innerHTML=i;for(let l=0;l<c.childNodes.length;l+=1)r.push(c.childNodes[l])}else r=W_e(e.trim(),t||a)}else if(e.nodeType||e===n||e===a)r.push(e);else if(Array.isArray(e)){if(e instanceof ml)return e;r=e}return new ml(V_e(r))}ct.fn=ml.prototype;function Y_e(...e){const t=Nh(e.map(n=>n.split(" ")));return this.forEach(n=>{n.classList.add(...t)}),this}function G_e(...e){const t=Nh(e.map(n=>n.split(" ")));return this.forEach(n=>{n.classList.remove(...t)}),this}function q_e(...e){const t=Nh(e.map(n=>n.split(" ")));this.forEach(n=>{t.forEach(a=>{n.classList.toggle(a)})})}function Z_e(...e){const t=Nh(e.map(n=>n.split(" ")));return lj(this,n=>t.filter(a=>n.classList.contains(a)).length>0).length>0}function Q_e(e,t){if(arguments.length===1&&typeof e=="string")return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(arguments.length===2)this[n].setAttribute(e,t);else for(const a in e)this[n][a]=e[a],this[n].setAttribute(a,e[a]);return this}function J_e(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function K_e(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this}function X_e(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration=typeof e!="string"?`${e}ms`:e;return this}function e6e(...e){let[t,n,a,r]=e;typeof e[1]=="function"&&([t,a,r]=e,n=void 0),r||(r=!1);function i(d){const u=d.target;if(!u)return;const g=d.target.dom7EventData||[];if(g.indexOf(d)<0&&g.unshift(d),ct(u).is(n))a.apply(u,g);else{const y=ct(u).parents();for(let w=0;w<y.length;w+=1)ct(y[w]).is(n)&&a.apply(y[w],g)}}function o(d){const u=d&&d.target?d.target.dom7EventData||[]:[];u.indexOf(d)<0&&u.unshift(d),a.apply(this,u)}const c=t.split(" ");let l;for(let d=0;d<this.length;d+=1){const u=this[d];if(n)for(l=0;l<c.length;l+=1){const g=c[l];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[g]||(u.dom7LiveListeners[g]=[]),u.dom7LiveListeners[g].push({listener:a,proxyListener:i}),u.addEventListener(g,i,r)}else for(l=0;l<c.length;l+=1){const g=c[l];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[g]||(u.dom7Listeners[g]=[]),u.dom7Listeners[g].push({listener:a,proxyListener:o}),u.addEventListener(g,o,r)}}return this}function t6e(...e){let[t,n,a,r]=e;typeof e[1]=="function"&&([t,a,r]=e,n=void 0),r||(r=!1);const i=t.split(" ");for(let o=0;o<i.length;o+=1){const c=i[o];for(let l=0;l<this.length;l+=1){const d=this[l];let u;if(!n&&d.dom7Listeners?u=d.dom7Listeners[c]:n&&d.dom7LiveListeners&&(u=d.dom7LiveListeners[c]),u&&u.length)for(let g=u.length-1;g>=0;g-=1){const y=u[g];a&&y.listener===a||a&&y.listener&&y.listener.dom7proxy&&y.listener.dom7proxy===a?(d.removeEventListener(c,y.proxyListener,r),u.splice(g,1)):a||(d.removeEventListener(c,y.proxyListener,r),u.splice(g,1))}}}return this}function n6e(...e){const t=Ia(),n=e[0].split(" "),a=e[1];for(let r=0;r<n.length;r+=1){const i=n[r];for(let o=0;o<this.length;o+=1){const c=this[o];if(t.CustomEvent){const l=new t.CustomEvent(i,{detail:a,bubbles:!0,cancelable:!0});c.dom7EventData=e.filter((d,u)=>u>0),c.dispatchEvent(l),c.dom7EventData=[],delete c.dom7EventData}}}return this}function a6e(e){const t=this;function n(a){a.target===this&&(e.call(this,a),t.off("transitionend",n))}return e&&t.on("transitionend",n),this}function r6e(e){if(this.length>0){if(e){const t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null}function s6e(e){if(this.length>0){if(e){const t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null}function i6e(){if(this.length>0){const e=Ia(),t=Fr(),n=this[0],a=n.getBoundingClientRect(),r=t.body,i=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,c=n===e?e.scrollY:n.scrollTop,l=n===e?e.scrollX:n.scrollLeft;return{top:a.top+c-i,left:a.left+l-o}}return null}function o6e(){const e=Ia();return this[0]?e.getComputedStyle(this[0],null):{}}function l6e(e,t){const n=Ia();let a;if(arguments.length===1)if(typeof e=="string"){if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}else{for(a=0;a<this.length;a+=1)for(const r in e)this[a].style[r]=e[r];return this}if(arguments.length===2&&typeof e=="string"){for(a=0;a<this.length;a+=1)this[a].style[e]=t;return this}return this}function c6e(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function d6e(e){const t=lj(this,e);return ct(t)}function u6e(e){if(typeof e=="undefined")return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function f6e(e){if(typeof e=="undefined")return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function m6e(e){const t=Ia(),n=Fr(),a=this[0];let r,i;if(!a||typeof e=="undefined")return!1;if(typeof e=="string"){if(a.matches)return a.matches(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);for(r=ct(e),i=0;i<r.length;i+=1)if(r[i]===a)return!0;return!1}if(e===n)return a===n;if(e===t)return a===t;if(e.nodeType||e instanceof ml){for(r=e.nodeType?[e]:e,i=0;i<r.length;i+=1)if(r[i]===a)return!0;return!1}return!1}function p6e(){let e=this[0],t;if(e){for(t=0;(e=e.previousSibling)!==null;)e.nodeType===1&&(t+=1);return t}}function h6e(e){if(typeof e=="undefined")return this;const t=this.length;if(e>t-1)return ct([]);if(e<0){const n=t+e;return n<0?ct([]):ct([this[n]])}return ct([this[e]])}function g6e(...e){let t;const n=Fr();for(let a=0;a<e.length;a+=1){t=e[a];for(let r=0;r<this.length;r+=1)if(typeof t=="string"){const i=n.createElement("div");for(i.innerHTML=t;i.firstChild;)this[r].appendChild(i.firstChild)}else if(t instanceof ml)for(let i=0;i<t.length;i+=1)this[r].appendChild(t[i]);else this[r].appendChild(t)}return this}function b6e(e){const t=Fr();let n,a;for(n=0;n<this.length;n+=1)if(typeof e=="string"){const r=t.createElement("div");for(r.innerHTML=e,a=r.childNodes.length-1;a>=0;a-=1)this[n].insertBefore(r.childNodes[a],this[n].childNodes[0])}else if(e instanceof ml)for(a=0;a<e.length;a+=1)this[n].insertBefore(e[a],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function y6e(e){return this.length>0?e?this[0].nextElementSibling&&ct(this[0].nextElementSibling).is(e)?ct([this[0].nextElementSibling]):ct([]):this[0].nextElementSibling?ct([this[0].nextElementSibling]):ct([]):ct([])}function x6e(e){const t=[];let n=this[0];if(!n)return ct([]);for(;n.nextElementSibling;){const a=n.nextElementSibling;e?ct(a).is(e)&&t.push(a):t.push(a),n=a}return ct(t)}function w6e(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&ct(t.previousElementSibling).is(e)?ct([t.previousElementSibling]):ct([]):t.previousElementSibling?ct([t.previousElementSibling]):ct([])}return ct([])}function v6e(e){const t=[];let n=this[0];if(!n)return ct([]);for(;n.previousElementSibling;){const a=n.previousElementSibling;e?ct(a).is(e)&&t.push(a):t.push(a),n=a}return ct(t)}function _6e(e){const t=[];for(let n=0;n<this.length;n+=1)this[n].parentNode!==null&&(e?ct(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return ct(t)}function N6e(e){const t=[];for(let n=0;n<this.length;n+=1){let a=this[n].parentNode;for(;a;)e?ct(a).is(e)&&t.push(a):t.push(a),a=a.parentNode}return ct(t)}function S6e(e){let t=this;return typeof e=="undefined"?ct([]):(t.is(e)||(t=t.parents(e).eq(0)),t)}function k6e(e){const t=[];for(let n=0;n<this.length;n+=1){const a=this[n].querySelectorAll(e);for(let r=0;r<a.length;r+=1)t.push(a[r])}return ct(t)}function C6e(e){const t=[];for(let n=0;n<this.length;n+=1){const a=this[n].children;for(let r=0;r<a.length;r+=1)(!e||ct(a[r]).is(e))&&t.push(a[r])}return ct(t)}function E6e(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}const t8={addClass:Y_e,removeClass:G_e,hasClass:Z_e,toggleClass:q_e,attr:Q_e,removeAttr:J_e,transform:K_e,transition:X_e,on:e6e,off:t6e,trigger:n6e,transitionEnd:a6e,outerWidth:r6e,outerHeight:s6e,styles:o6e,offset:i6e,css:l6e,each:c6e,html:u6e,text:f6e,is:m6e,index:p6e,eq:h6e,append:g6e,prepend:b6e,next:y6e,nextAll:x6e,prev:w6e,prevAll:v6e,parent:_6e,parents:N6e,closest:S6e,find:k6e,children:C6e,filter:d6e,remove:E6e};Object.keys(t8).forEach(e=>{Object.defineProperty(ct.fn,e,{value:t8[e],writable:!0})});function T6e(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function Ep(e,t=0){return setTimeout(e,t)}function _i(){return Date.now()}function L6e(e){const t=Ia();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function D6e(e,t="x"){const n=Ia();let a,r,i;const o=L6e(e);return n.WebKitCSSMatrix?(r=o.transform||o.webkitTransform,r.split(",").length>6&&(r=r.split(", ").map(c=>c.replace(",",".")).join(", ")),i=new n.WebKitCSSMatrix(r==="none"?"":r)):(i=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),a=i.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?r=i.m41:a.length===16?r=parseFloat(a[12]):r=parseFloat(a[4])),t==="y"&&(n.WebKitCSSMatrix?r=i.m42:a.length===16?r=parseFloat(a[13]):r=parseFloat(a[5])),r||0}function $0(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function M6e(e){return typeof window!="undefined"&&typeof window.HTMLElement!="undefined"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function Yr(...e){const t=Object(e[0]),n=["__proto__","constructor","prototype"];for(let a=1;a<e.length;a+=1){const r=e[a];if(r!=null&&!M6e(r)){const i=Object.keys(Object(r)).filter(o=>n.indexOf(o)<0);for(let o=0,c=i.length;o<c;o+=1){const l=i[o],d=Object.getOwnPropertyDescriptor(r,l);d!==void 0&&d.enumerable&&($0(t[l])&&$0(r[l])?r[l].__swiper__?t[l]=r[l]:Yr(t[l],r[l]):!$0(t[l])&&$0(r[l])?(t[l]={},r[l].__swiper__?t[l]=r[l]:Yr(t[l],r[l])):t[l]=r[l])}}}return t}function B0(e,t,n){e.style.setProperty(t,n)}function cj({swiper:e,targetPosition:t,side:n}){const a=Ia(),r=-e.translate;let i=null,o;const c=e.params.speed;e.wrapperEl.style.scrollSnapType="none",a.cancelAnimationFrame(e.cssModeFrameID);const l=t>r?"next":"prev",d=(g,y)=>l==="next"&&g>=y||l==="prev"&&g<=y,u=()=>{o=new Date().getTime(),i===null&&(i=o);const g=Math.max(Math.min((o-i)/c,1),0),y=.5-Math.cos(g*Math.PI)/2;let w=r+y*(t-r);if(d(w,t)&&(w=t),e.wrapperEl.scrollTo({[n]:w}),d(w,t)){e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout(()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[n]:w})}),a.cancelAnimationFrame(e.cssModeFrameID);return}e.cssModeFrameID=a.requestAnimationFrame(u)};u()}let ev;function A6e(){const e=Ia(),t=Fr();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let a=!1;try{const r=Object.defineProperty({},"passive",{get(){a=!0}});e.addEventListener("testPassiveListener",null,r)}catch{}return a}(),gestures:function(){return"ongesturestart"in e}()}}function dj(){return ev||(ev=A6e()),ev}let tv;function I6e({userAgent:e}={}){const t=dj(),n=Ia(),a=n.navigator.platform,r=e||n.navigator.userAgent,i={ios:!1,android:!1},o=n.screen.width,c=n.screen.height,l=r.match(/(Android);?[\s\/]+([\d.]+)?/);let d=r.match(/(iPad).*OS\s([\d_]+)/);const u=r.match(/(iPod)(.*OS\s([\d_]+))?/),g=!d&&r.match(/(iPhone\sOS|iOS)\s([\d_]+)/),y=a==="Win32";let w=a==="MacIntel";const v=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!d&&w&&t.touch&&v.indexOf(`${o}x${c}`)>=0&&(d=r.match(/(Version)\/([\d.]+)/),d||(d=[0,1,"13_0_0"]),w=!1),l&&!y&&(i.os="android",i.android=!0),(d||g||u)&&(i.os="ios",i.ios=!0),i}function O6e(e={}){return tv||(tv=I6e(e)),tv}let nv;function P6e(){const e=Ia();function t(){const n=e.navigator.userAgent.toLowerCase();return n.indexOf("safari")>=0&&n.indexOf("chrome")<0&&n.indexOf("android")<0}return{isSafari:t(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}function R6e(){return nv||(nv=P6e()),nv}function j6e({swiper:e,on:t,emit:n}){const a=Ia();let r=null,i=null;const o=()=>{!e||e.destroyed||!e.initialized||(n("beforeResize"),n("resize"))},c=()=>{!e||e.destroyed||!e.initialized||(r=new ResizeObserver(u=>{i=a.requestAnimationFrame(()=>{const{width:g,height:y}=e;let w=g,v=y;u.forEach(({contentBoxSize:S,contentRect:m,target:p})=>{p&&p!==e.el||(w=m?m.width:(S[0]||S).inlineSize,v=m?m.height:(S[0]||S).blockSize)}),(w!==g||v!==y)&&o()})}),r.observe(e.el))},l=()=>{i&&a.cancelAnimationFrame(i),r&&r.unobserve&&e.el&&(r.unobserve(e.el),r=null)},d=()=>{!e||e.destroyed||!e.initialized||n("orientationchange")};t("init",()=>{if(e.params.resizeObserver&&typeof a.ResizeObserver!="undefined"){c();return}a.addEventListener("resize",o),a.addEventListener("orientationchange",d)}),t("destroy",()=>{l(),a.removeEventListener("resize",o),a.removeEventListener("orientationchange",d)})}function z6e({swiper:e,extendParams:t,on:n,emit:a}){const r=[],i=Ia(),o=(d,u={})=>{const g=i.MutationObserver||i.WebkitMutationObserver,y=new g(w=>{if(w.length===1){a("observerUpdate",w[0]);return}const v=function(){a("observerUpdate",w[0])};i.requestAnimationFrame?i.requestAnimationFrame(v):i.setTimeout(v,0)});y.observe(d,{attributes:typeof u.attributes=="undefined"?!0:u.attributes,childList:typeof u.childList=="undefined"?!0:u.childList,characterData:typeof u.characterData=="undefined"?!0:u.characterData}),r.push(y)},c=()=>{if(!!e.params.observer){if(e.params.observeParents){const d=e.$el.parents();for(let u=0;u<d.length;u+=1)o(d[u])}o(e.$el[0],{childList:e.params.observeSlideChildren}),o(e.$wrapperEl[0],{attributes:!1})}},l=()=>{r.forEach(d=>{d.disconnect()}),r.splice(0,r.length)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",c),n("destroy",l)}var F6e={on(e,t,n){const a=this;if(!a.eventsListeners||a.destroyed||typeof t!="function")return a;const r=n?"unshift":"push";return e.split(" ").forEach(i=>{a.eventsListeners[i]||(a.eventsListeners[i]=[]),a.eventsListeners[i][r](t)}),a},once(e,t,n){const a=this;if(!a.eventsListeners||a.destroyed||typeof t!="function")return a;function r(...i){a.off(e,r),r.__emitterProxy&&delete r.__emitterProxy,t.apply(a,i)}return r.__emitterProxy=t,a.on(e,r,n)},onAny(e,t){const n=this;if(!n.eventsListeners||n.destroyed||typeof e!="function")return n;const a=t?"unshift":"push";return n.eventsAnyListeners.indexOf(e)<0&&n.eventsAnyListeners[a](e),n},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsAnyListeners)return t;const n=t.eventsAnyListeners.indexOf(e);return n>=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(a=>{typeof t=="undefined"?n.eventsListeners[a]=[]:n.eventsListeners[a]&&n.eventsListeners[a].forEach((r,i)=>{(r===t||r.__emitterProxy&&r.__emitterProxy===t)&&n.eventsListeners[a].splice(i,1)})}),n},emit(...e){const t=this;if(!t.eventsListeners||t.destroyed||!t.eventsListeners)return t;let n,a,r;return typeof e[0]=="string"||Array.isArray(e[0])?(n=e[0],a=e.slice(1,e.length),r=t):(n=e[0].events,a=e[0].data,r=e[0].context||t),a.unshift(r),(Array.isArray(n)?n:n.split(" ")).forEach(o=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach(c=>{c.apply(r,[o,...a])}),t.eventsListeners&&t.eventsListeners[o]&&t.eventsListeners[o].forEach(c=>{c.apply(r,a)})}),t}};function $6e(){const e=this;let t,n;const a=e.$el;typeof e.params.width!="undefined"&&e.params.width!==null?t=e.params.width:t=a[0].clientWidth,typeof e.params.height!="undefined"&&e.params.height!==null?n=e.params.height:n=a[0].clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(a.css("padding-left")||0,10)-parseInt(a.css("padding-right")||0,10),n=n-parseInt(a.css("padding-top")||0,10)-parseInt(a.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function B6e(){const e=this;function t(D){return e.isHorizontal()?D:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[D]}function n(D,P){return parseFloat(D.getPropertyValue(t(P))||0)}const a=e.params,{$wrapperEl:r,size:i,rtlTranslate:o,wrongRTL:c}=e,l=e.virtual&&a.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,u=r.children(`.${e.params.slideClass}`),g=l?e.virtual.slides.length:u.length;let y=[];const w=[],v=[];let S=a.slidesOffsetBefore;typeof S=="function"&&(S=a.slidesOffsetBefore.call(e));let m=a.slidesOffsetAfter;typeof m=="function"&&(m=a.slidesOffsetAfter.call(e));const p=e.snapGrid.length,b=e.slidesGrid.length;let x=a.spaceBetween,k=-S,N=0,_=0;if(typeof i=="undefined")return;typeof x=="string"&&x.indexOf("%")>=0&&(x=parseFloat(x.replace("%",""))/100*i),e.virtualSize=-x,o?u.css({marginLeft:"",marginBottom:"",marginTop:""}):u.css({marginRight:"",marginBottom:"",marginTop:""}),a.centeredSlides&&a.cssMode&&(B0(e.wrapperEl,"--swiper-centered-offset-before",""),B0(e.wrapperEl,"--swiper-centered-offset-after",""));const C=a.grid&&a.grid.rows>1&&e.grid;C&&e.grid.initSlides(g);let E;const T=a.slidesPerView==="auto"&&a.breakpoints&&Object.keys(a.breakpoints).filter(D=>typeof a.breakpoints[D].slidesPerView!="undefined").length>0;for(let D=0;D<g;D+=1){E=0;const P=u.eq(D);if(C&&e.grid.updateSlide(D,P,g,t),P.css("display")!=="none"){if(a.slidesPerView==="auto"){T&&(u[D].style[t("width")]="");const M=getComputedStyle(P[0]),O=P[0].style.transform,F=P[0].style.webkitTransform;if(O&&(P[0].style.transform="none"),F&&(P[0].style.webkitTransform="none"),a.roundLengths)E=e.isHorizontal()?P.outerWidth(!0):P.outerHeight(!0);else{const z=n(M,"width"),H=n(M,"padding-left"),A=n(M,"padding-right"),j=n(M,"margin-left"),I=n(M,"margin-right"),B=M.getPropertyValue("box-sizing");if(B&&B==="border-box")E=z+j+I;else{const{clientWidth:Y,offsetWidth:U}=P[0];E=z+H+A+j+I+(U-Y)}}O&&(P[0].style.transform=O),F&&(P[0].style.webkitTransform=F),a.roundLengths&&(E=Math.floor(E))}else E=(i-(a.slidesPerView-1)*x)/a.slidesPerView,a.roundLengths&&(E=Math.floor(E)),u[D]&&(u[D].style[t("width")]=`${E}px`);u[D]&&(u[D].swiperSlideSize=E),v.push(E),a.centeredSlides?(k=k+E/2+N/2+x,N===0&&D!==0&&(k=k-i/2-x),D===0&&(k=k-i/2-x),Math.abs(k)<1/1e3&&(k=0),a.roundLengths&&(k=Math.floor(k)),_%a.slidesPerGroup===0&&y.push(k),w.push(k)):(a.roundLengths&&(k=Math.floor(k)),(_-Math.min(e.params.slidesPerGroupSkip,_))%e.params.slidesPerGroup===0&&y.push(k),w.push(k),k=k+E+x),e.virtualSize+=E+x,N=E,_+=1}}if(e.virtualSize=Math.max(e.virtualSize,i)+m,o&&c&&(a.effect==="slide"||a.effect==="coverflow")&&r.css({width:`${e.virtualSize+a.spaceBetween}px`}),a.setWrapperSize&&r.css({[t("width")]:`${e.virtualSize+a.spaceBetween}px`}),C&&e.grid.updateWrapperSize(E,y,t),!a.centeredSlides){const D=[];for(let P=0;P<y.length;P+=1){let M=y[P];a.roundLengths&&(M=Math.floor(M)),y[P]<=e.virtualSize-i&&D.push(M)}y=D,Math.floor(e.virtualSize-i)-Math.floor(y[y.length-1])>1&&y.push(e.virtualSize-i)}if(y.length===0&&(y=[0]),a.spaceBetween!==0){const D=e.isHorizontal()&&o?"marginLeft":t("marginRight");u.filter((P,M)=>a.cssMode?M!==u.length-1:!0).css({[D]:`${x}px`})}if(a.centeredSlides&&a.centeredSlidesBounds){let D=0;v.forEach(M=>{D+=M+(a.spaceBetween?a.spaceBetween:0)}),D-=a.spaceBetween;const P=D-i;y=y.map(M=>M<0?-S:M>P?P+m:M)}if(a.centerInsufficientSlides){let D=0;if(v.forEach(P=>{D+=P+(a.spaceBetween?a.spaceBetween:0)}),D-=a.spaceBetween,D<i){const P=(i-D)/2;y.forEach((M,O)=>{y[O]=M-P}),w.forEach((M,O)=>{w[O]=M+P})}}if(Object.assign(e,{slides:u,snapGrid:y,slidesGrid:w,slidesSizesGrid:v}),a.centeredSlides&&a.cssMode&&!a.centeredSlidesBounds){B0(e.wrapperEl,"--swiper-centered-offset-before",`${-y[0]}px`),B0(e.wrapperEl,"--swiper-centered-offset-after",`${e.size/2-v[v.length-1]/2}px`);const D=-e.snapGrid[0],P=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(M=>M+D),e.slidesGrid=e.slidesGrid.map(M=>M+P)}if(g!==d&&e.emit("slidesLengthChange"),y.length!==p&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),w.length!==b&&e.emit("slidesGridLengthChange"),a.watchSlidesProgress&&e.updateSlidesOffset(),!l&&!a.cssMode&&(a.effect==="slide"||a.effect==="fade")){const D=`${a.containerModifierClass}backface-hidden`,P=e.$el.hasClass(D);g<=a.maxBackfaceHiddenSlides?P||e.$el.addClass(D):P&&e.$el.removeClass(D)}}function H6e(e){const t=this,n=[],a=t.virtual&&t.params.virtual.enabled;let r=0,i;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const o=c=>a?t.slides.filter(l=>parseInt(l.getAttribute("data-swiper-slide-index"),10)===c)[0]:t.slides.eq(c)[0];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||ct([])).each(c=>{n.push(c)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const c=t.activeIndex+i;if(c>t.slides.length&&!a)break;n.push(o(c))}else n.push(o(t.activeIndex));for(i=0;i<n.length;i+=1)if(typeof n[i]!="undefined"){const c=n[i].offsetHeight;r=c>r?c:r}(r||r===0)&&t.$wrapperEl.css("height",`${r}px`)}function U6e(){const e=this,t=e.slides;for(let n=0;n<t.length;n+=1)t[n].swiperSlideOffset=e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop}function V6e(e=this&&this.translate||0){const t=this,n=t.params,{slides:a,rtlTranslate:r,snapGrid:i}=t;if(a.length===0)return;typeof a[0].swiperSlideOffset=="undefined"&&t.updateSlidesOffset();let o=-e;r&&(o=e),a.removeClass(n.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let c=0;c<a.length;c+=1){const l=a[c];let d=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(d-=a[0].swiperSlideOffset);const u=(o+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+n.spaceBetween),g=(o-i[0]+(n.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+n.spaceBetween),y=-(o-d),w=y+t.slidesSizesGrid[c];(y>=0&&y<t.size-1||w>1&&w<=t.size||y<=0&&w>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(c),a.eq(c).addClass(n.slideVisibleClass)),l.progress=r?-u:u,l.originalProgress=r?-g:g}t.visibleSlides=ct(t.visibleSlides)}function W6e(e){const t=this;if(typeof e=="undefined"){const d=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*d||0}const n=t.params,a=t.maxTranslate()-t.minTranslate();let{progress:r,isBeginning:i,isEnd:o}=t;const c=i,l=o;a===0?(r=0,i=!0,o=!0):(r=(e-t.minTranslate())/a,i=r<=0,o=r>=1),Object.assign(t,{progress:r,isBeginning:i,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),i&&!c&&t.emit("reachBeginning toEdge"),o&&!l&&t.emit("reachEnd toEdge"),(c&&!i||l&&!o)&&t.emit("fromEdge"),t.emit("progress",r)}function Y6e(){const e=this,{slides:t,params:n,$wrapperEl:a,activeIndex:r,realIndex:i}=e,o=e.virtual&&n.virtual.enabled;t.removeClass(`${n.slideActiveClass} ${n.slideNextClass} ${n.slidePrevClass} ${n.slideDuplicateActiveClass} ${n.slideDuplicateNextClass} ${n.slideDuplicatePrevClass}`);let c;o?c=e.$wrapperEl.find(`.${n.slideClass}[data-swiper-slide-index="${r}"]`):c=t.eq(r),c.addClass(n.slideActiveClass),n.loop&&(c.hasClass(n.slideDuplicateClass)?a.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${i}"]`).addClass(n.slideDuplicateActiveClass):a.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${i}"]`).addClass(n.slideDuplicateActiveClass));let l=c.nextAll(`.${n.slideClass}`).eq(0).addClass(n.slideNextClass);n.loop&&l.length===0&&(l=t.eq(0),l.addClass(n.slideNextClass));let d=c.prevAll(`.${n.slideClass}`).eq(0).addClass(n.slidePrevClass);n.loop&&d.length===0&&(d=t.eq(-1),d.addClass(n.slidePrevClass)),n.loop&&(l.hasClass(n.slideDuplicateClass)?a.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass):a.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${l.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicateNextClass),d.hasClass(n.slideDuplicateClass)?a.children(`.${n.slideClass}:not(.${n.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass):a.children(`.${n.slideClass}.${n.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(n.slideDuplicatePrevClass)),e.emitSlidesClasses()}function G6e(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:a,snapGrid:r,params:i,activeIndex:o,realIndex:c,snapIndex:l}=t;let d=e,u;if(typeof d=="undefined"){for(let y=0;y<a.length;y+=1)typeof a[y+1]!="undefined"?n>=a[y]&&n<a[y+1]-(a[y+1]-a[y])/2?d=y:n>=a[y]&&n<a[y+1]&&(d=y+1):n>=a[y]&&(d=y);i.normalizeSlideIndex&&(d<0||typeof d=="undefined")&&(d=0)}if(r.indexOf(n)>=0)u=r.indexOf(n);else{const y=Math.min(i.slidesPerGroupSkip,d);u=y+Math.floor((d-y)/i.slidesPerGroup)}if(u>=r.length&&(u=r.length-1),d===o){u!==l&&(t.snapIndex=u,t.emit("snapIndexChange"));return}const g=parseInt(t.slides.eq(d).attr("data-swiper-slide-index")||d,10);Object.assign(t,{snapIndex:u,realIndex:g,previousIndex:o,activeIndex:d}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),c!==g&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")}function q6e(e){const t=this,n=t.params,a=ct(e).closest(`.${n.slideClass}`)[0];let r=!1,i;if(a){for(let o=0;o<t.slides.length;o+=1)if(t.slides[o]===a){r=!0,i=o;break}}if(a&&r)t.clickedSlide=a,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(ct(a).attr("data-swiper-slide-index"),10):t.clickedIndex=i;else{t.clickedSlide=void 0,t.clickedIndex=void 0;return}n.slideToClickedSlide&&t.clickedIndex!==void 0&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}var Z6e={updateSize:$6e,updateSlides:B6e,updateAutoHeight:H6e,updateSlidesOffset:U6e,updateSlidesProgress:V6e,updateProgress:W6e,updateSlidesClasses:Y6e,updateActiveIndex:G6e,updateClickedSlide:q6e};function Q6e(e=this.isHorizontal()?"x":"y"){const t=this,{params:n,rtlTranslate:a,translate:r,$wrapperEl:i}=t;if(n.virtualTranslate)return a?-r:r;if(n.cssMode)return r;let o=D6e(i[0],e);return a&&(o=-o),o||0}function J6e(e,t){const n=this,{rtlTranslate:a,params:r,$wrapperEl:i,wrapperEl:o,progress:c}=n;let l=0,d=0;const u=0;n.isHorizontal()?l=a?-e:e:d=e,r.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),r.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-d:r.virtualTranslate||i.transform(`translate3d(${l}px, ${d}px, ${u}px)`),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:d;let g;const y=n.maxTranslate()-n.minTranslate();y===0?g=0:g=(e-n.minTranslate())/y,g!==c&&n.updateProgress(e),n.emit("setTranslate",n.translate,t)}function K6e(){return-this.snapGrid[0]}function X6e(){return-this.snapGrid[this.snapGrid.length-1]}function eNe(e=0,t=this.params.speed,n=!0,a=!0,r){const i=this,{params:o,wrapperEl:c}=i;if(i.animating&&o.preventInteractionOnTransition)return!1;const l=i.minTranslate(),d=i.maxTranslate();let u;if(a&&e>l?u=l:a&&e<d?u=d:u=e,i.updateProgress(u),o.cssMode){const g=i.isHorizontal();if(t===0)c[g?"scrollLeft":"scrollTop"]=-u;else{if(!i.support.smoothScroll)return cj({swiper:i,targetPosition:-u,side:g?"left":"top"}),!0;c.scrollTo({[g?"left":"top"]:-u,behavior:"smooth"})}return!0}return t===0?(i.setTransition(0),i.setTranslate(u),n&&(i.emit("beforeTransitionStart",t,r),i.emit("transitionEnd"))):(i.setTransition(t),i.setTranslate(u),n&&(i.emit("beforeTransitionStart",t,r),i.emit("transitionStart")),i.animating||(i.animating=!0,i.onTranslateToWrapperTransitionEnd||(i.onTranslateToWrapperTransitionEnd=function(y){!i||i.destroyed||y.target===this&&(i.$wrapperEl[0].removeEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.$wrapperEl[0].removeEventListener("webkitTransitionEnd",i.onTranslateToWrapperTransitionEnd),i.onTranslateToWrapperTransitionEnd=null,delete i.onTranslateToWrapperTransitionEnd,n&&i.emit("transitionEnd"))}),i.$wrapperEl[0].addEventListener("transitionend",i.onTranslateToWrapperTransitionEnd),i.$wrapperEl[0].addEventListener("webkitTransitionEnd",i.onTranslateToWrapperTransitionEnd))),!0}var tNe={getTranslate:Q6e,setTranslate:J6e,minTranslate:K6e,maxTranslate:X6e,translateTo:eNe};function nNe(e,t){const n=this;n.params.cssMode||n.$wrapperEl.transition(e),n.emit("setTransition",e,t)}function uj({swiper:e,runCallbacks:t,direction:n,step:a}){const{activeIndex:r,previousIndex:i}=e;let o=n;if(o||(r>i?o="next":r<i?o="prev":o="reset"),e.emit(`transition${a}`),t&&r!==i){if(o==="reset"){e.emit(`slideResetTransition${a}`);return}e.emit(`slideChangeTransition${a}`),o==="next"?e.emit(`slideNextTransition${a}`):e.emit(`slidePrevTransition${a}`)}}function aNe(e=!0,t){const n=this,{params:a}=n;a.cssMode||(a.autoHeight&&n.updateAutoHeight(),uj({swiper:n,runCallbacks:e,direction:t,step:"Start"}))}function rNe(e=!0,t){const n=this,{params:a}=n;n.animating=!1,!a.cssMode&&(n.setTransition(0),uj({swiper:n,runCallbacks:e,direction:t,step:"End"}))}var sNe={setTransition:nNe,transitionStart:aNe,transitionEnd:rNe};function iNe(e=0,t=this.params.speed,n=!0,a,r){if(typeof e!="number"&&typeof e!="string")throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`);if(typeof e=="string"){const x=parseInt(e,10);if(!isFinite(x))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=x}const i=this;let o=e;o<0&&(o=0);const{params:c,snapGrid:l,slidesGrid:d,previousIndex:u,activeIndex:g,rtlTranslate:y,wrapperEl:w,enabled:v}=i;if(i.animating&&c.preventInteractionOnTransition||!v&&!a&&!r)return!1;const S=Math.min(i.params.slidesPerGroupSkip,o);let m=S+Math.floor((o-S)/i.params.slidesPerGroup);m>=l.length&&(m=l.length-1);const p=-l[m];if(c.normalizeSlideIndex)for(let x=0;x<d.length;x+=1){const k=-Math.floor(p*100),N=Math.floor(d[x]*100),_=Math.floor(d[x+1]*100);typeof d[x+1]!="undefined"?k>=N&&k<_-(_-N)/2?o=x:k>=N&&k<_&&(o=x+1):k>=N&&(o=x)}if(i.initialized&&o!==g&&(!i.allowSlideNext&&p<i.translate&&p<i.minTranslate()||!i.allowSlidePrev&&p>i.translate&&p>i.maxTranslate()&&(g||0)!==o))return!1;o!==(u||0)&&n&&i.emit("beforeSlideChangeStart"),i.updateProgress(p);let b;if(o>g?b="next":o<g?b="prev":b="reset",y&&-p===i.translate||!y&&p===i.translate)return i.updateActiveIndex(o),c.autoHeight&&i.updateAutoHeight(),i.updateSlidesClasses(),c.effect!=="slide"&&i.setTranslate(p),b!=="reset"&&(i.transitionStart(n,b),i.transitionEnd(n,b)),!1;if(c.cssMode){const x=i.isHorizontal(),k=y?p:-p;if(t===0){const N=i.virtual&&i.params.virtual.enabled;N&&(i.wrapperEl.style.scrollSnapType="none",i._immediateVirtual=!0),w[x?"scrollLeft":"scrollTop"]=k,N&&requestAnimationFrame(()=>{i.wrapperEl.style.scrollSnapType="",i._swiperImmediateVirtual=!1})}else{if(!i.support.smoothScroll)return cj({swiper:i,targetPosition:k,side:x?"left":"top"}),!0;w.scrollTo({[x?"left":"top"]:k,behavior:"smooth"})}return!0}return i.setTransition(t),i.setTranslate(p),i.updateActiveIndex(o),i.updateSlidesClasses(),i.emit("beforeTransitionStart",t,a),i.transitionStart(n,b),t===0?i.transitionEnd(n,b):i.animating||(i.animating=!0,i.onSlideToWrapperTransitionEnd||(i.onSlideToWrapperTransitionEnd=function(k){!i||i.destroyed||k.target===this&&(i.$wrapperEl[0].removeEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.$wrapperEl[0].removeEventListener("webkitTransitionEnd",i.onSlideToWrapperTransitionEnd),i.onSlideToWrapperTransitionEnd=null,delete i.onSlideToWrapperTransitionEnd,i.transitionEnd(n,b))}),i.$wrapperEl[0].addEventListener("transitionend",i.onSlideToWrapperTransitionEnd),i.$wrapperEl[0].addEventListener("webkitTransitionEnd",i.onSlideToWrapperTransitionEnd)),!0}function oNe(e=0,t=this.params.speed,n=!0,a){if(typeof e=="string"){const o=parseInt(e,10);if(!isFinite(o))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=o}const r=this;let i=e;return r.params.loop&&(i+=r.loopedSlides),r.slideTo(i,t,n,a)}function lNe(e=this.params.speed,t=!0,n){const a=this,{animating:r,enabled:i,params:o}=a;if(!i)return a;let c=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(c=Math.max(a.slidesPerViewDynamic("current",!0),1));const l=a.activeIndex<o.slidesPerGroupSkip?1:c;if(o.loop){if(r&&o.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}return o.rewind&&a.isEnd?a.slideTo(0,e,t,n):a.slideTo(a.activeIndex+l,e,t,n)}function cNe(e=this.params.speed,t=!0,n){const a=this,{params:r,animating:i,snapGrid:o,slidesGrid:c,rtlTranslate:l,enabled:d}=a;if(!d)return a;if(r.loop){if(i&&r.loopPreventsSlide)return!1;a.loopFix(),a._clientLeft=a.$wrapperEl[0].clientLeft}const u=l?a.translate:-a.translate;function g(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const y=g(u),w=o.map(m=>g(m));let v=o[w.indexOf(y)-1];if(typeof v=="undefined"&&r.cssMode){let m;o.forEach((p,b)=>{y>=p&&(m=b)}),typeof m!="undefined"&&(v=o[m>0?m-1:m])}let S=0;if(typeof v!="undefined"&&(S=c.indexOf(v),S<0&&(S=a.activeIndex-1),r.slidesPerView==="auto"&&r.slidesPerGroup===1&&r.slidesPerGroupAuto&&(S=S-a.slidesPerViewDynamic("previous",!0)+1,S=Math.max(S,0))),r.rewind&&a.isBeginning){const m=a.params.virtual&&a.params.virtual.enabled&&a.virtual?a.virtual.slides.length-1:a.slides.length-1;return a.slideTo(m,e,t,n)}return a.slideTo(S,e,t,n)}function dNe(e=this.params.speed,t=!0,n){const a=this;return a.slideTo(a.activeIndex,e,t,n)}function uNe(e=this.params.speed,t=!0,n,a=.5){const r=this;let i=r.activeIndex;const o=Math.min(r.params.slidesPerGroupSkip,i),c=o+Math.floor((i-o)/r.params.slidesPerGroup),l=r.rtlTranslate?r.translate:-r.translate;if(l>=r.snapGrid[c]){const d=r.snapGrid[c],u=r.snapGrid[c+1];l-d>(u-d)*a&&(i+=r.params.slidesPerGroup)}else{const d=r.snapGrid[c-1],u=r.snapGrid[c];l-d<=(u-d)*a&&(i-=r.params.slidesPerGroup)}return i=Math.max(i,0),i=Math.min(i,r.slidesGrid.length-1),r.slideTo(i,e,t,n)}function fNe(){const e=this,{params:t,$wrapperEl:n}=e,a=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let r=e.clickedIndex,i;if(t.loop){if(e.animating)return;i=parseInt(ct(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?r<e.loopedSlides-a/2||r>e.slides.length-e.loopedSlides+a/2?(e.loopFix(),r=n.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),Ep(()=>{e.slideTo(r)})):e.slideTo(r):r>e.slides.length-a?(e.loopFix(),r=n.children(`.${t.slideClass}[data-swiper-slide-index="${i}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),Ep(()=>{e.slideTo(r)})):e.slideTo(r)}else e.slideTo(r)}var mNe={slideTo:iNe,slideToLoop:oNe,slideNext:lNe,slidePrev:cNe,slideReset:dNe,slideToClosest:uNe,slideToClickedSlide:fNe};function pNe(){const e=this,t=Fr(),{params:n,$wrapperEl:a}=e,r=a.children().length>0?ct(a.children()[0].parentNode):a;r.children(`.${n.slideClass}.${n.slideDuplicateClass}`).remove();let i=r.children(`.${n.slideClass}`);if(n.loopFillGroupWithBlank){const l=n.slidesPerGroup-i.length%n.slidesPerGroup;if(l!==n.slidesPerGroup){for(let d=0;d<l;d+=1){const u=ct(t.createElement("div")).addClass(`${n.slideClass} ${n.slideBlankClass}`);r.append(u)}i=r.children(`.${n.slideClass}`)}}n.slidesPerView==="auto"&&!n.loopedSlides&&(n.loopedSlides=i.length),e.loopedSlides=Math.ceil(parseFloat(n.loopedSlides||n.slidesPerView,10)),e.loopedSlides+=n.loopAdditionalSlides,e.loopedSlides>i.length&&e.params.loopedSlidesLimit&&(e.loopedSlides=i.length);const o=[],c=[];i.each((l,d)=>{ct(l).attr("data-swiper-slide-index",d)});for(let l=0;l<e.loopedSlides;l+=1){const d=l-Math.floor(l/i.length)*i.length;c.push(i.eq(d)[0]),o.unshift(i.eq(i.length-d-1)[0])}for(let l=0;l<c.length;l+=1)r.append(ct(c[l].cloneNode(!0)).addClass(n.slideDuplicateClass));for(let l=o.length-1;l>=0;l-=1)r.prepend(ct(o[l].cloneNode(!0)).addClass(n.slideDuplicateClass))}function hNe(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:n,loopedSlides:a,allowSlidePrev:r,allowSlideNext:i,snapGrid:o,rtlTranslate:c}=e;let l;e.allowSlidePrev=!0,e.allowSlideNext=!0;const u=-o[t]-e.getTranslate();t<a?(l=n.length-a*3+t,l+=a,e.slideTo(l,0,!1,!0)&&u!==0&&e.setTranslate((c?-e.translate:e.translate)-u)):t>=n.length-a&&(l=-n.length+t+a,l+=a,e.slideTo(l,0,!1,!0)&&u!==0&&e.setTranslate((c?-e.translate:e.translate)-u)),e.allowSlidePrev=r,e.allowSlideNext=i,e.emit("loopFix")}function gNe(){const e=this,{$wrapperEl:t,params:n,slides:a}=e;t.children(`.${n.slideClass}.${n.slideDuplicateClass},.${n.slideClass}.${n.slideBlankClass}`).remove(),a.removeAttr("data-swiper-slide-index")}var bNe={loopCreate:pNe,loopFix:hNe,loopDestroy:gNe};function yNe(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;n.style.cursor="move",n.style.cursor=e?"grabbing":"grab"}function xNe(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="")}var wNe={setGrabCursor:yNe,unsetGrabCursor:xNe};function vNe(e,t=this){function n(a){if(!a||a===Fr()||a===Ia())return null;a.assignedSlot&&(a=a.assignedSlot);const r=a.closest(e);return!r&&!a.getRootNode?null:r||n(a.getRootNode().host)}return n(t)}function _Ne(e){const t=this,n=Fr(),a=Ia(),r=t.touchEventsData,{params:i,touches:o,enabled:c}=t;if(!c||t.animating&&i.preventInteractionOnTransition)return;!t.animating&&i.cssMode&&i.loop&&t.loopFix();let l=e;l.originalEvent&&(l=l.originalEvent);let d=ct(l.target);if(i.touchEventsTarget==="wrapper"&&!d.closest(t.wrapperEl).length||(r.isTouchEvent=l.type==="touchstart",!r.isTouchEvent&&"which"in l&&l.which===3)||!r.isTouchEvent&&"button"in l&&l.button>0||r.isTouched&&r.isMoved)return;const u=!!i.noSwipingClass&&i.noSwipingClass!=="",g=e.composedPath?e.composedPath():e.path;u&&l.target&&l.target.shadowRoot&&g&&(d=ct(g[0]));const y=i.noSwipingSelector?i.noSwipingSelector:`.${i.noSwipingClass}`,w=!!(l.target&&l.target.shadowRoot);if(i.noSwiping&&(w?vNe(y,d[0]):d.closest(y)[0])){t.allowClick=!0;return}if(i.swipeHandler&&!d.closest(i.swipeHandler)[0])return;o.currentX=l.type==="touchstart"?l.targetTouches[0].pageX:l.pageX,o.currentY=l.type==="touchstart"?l.targetTouches[0].pageY:l.pageY;const v=o.currentX,S=o.currentY,m=i.edgeSwipeDetection||i.iOSEdgeSwipeDetection,p=i.edgeSwipeThreshold||i.iOSEdgeSwipeThreshold;if(m&&(v<=p||v>=a.innerWidth-p))if(m==="prevent")e.preventDefault();else return;if(Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=v,o.startY=S,r.touchStartTime=_i(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,i.threshold>0&&(r.allowThresholdMove=!1),l.type!=="touchstart"){let b=!0;d.is(r.focusableElements)&&(b=!1,d[0].nodeName==="SELECT"&&(r.isTouched=!1)),n.activeElement&&ct(n.activeElement).is(r.focusableElements)&&n.activeElement!==d[0]&&n.activeElement.blur();const x=b&&t.allowTouchMove&&i.touchStartPreventDefault;(i.touchStartForcePreventDefault||x)&&!d[0].isContentEditable&&l.preventDefault()}t.params.freeMode&&t.params.freeMode.enabled&&t.freeMode&&t.animating&&!i.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",l)}function NNe(e){const t=Fr(),n=this,a=n.touchEventsData,{params:r,touches:i,rtlTranslate:o,enabled:c}=n;if(!c)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),!a.isTouched){a.startMoving&&a.isScrolling&&n.emit("touchMoveOpposite",l);return}if(a.isTouchEvent&&l.type!=="touchmove")return;const d=l.type==="touchmove"&&l.targetTouches&&(l.targetTouches[0]||l.changedTouches[0]),u=l.type==="touchmove"?d.pageX:l.pageX,g=l.type==="touchmove"?d.pageY:l.pageY;if(l.preventedByNestedSwiper){i.startX=u,i.startY=g;return}if(!n.allowTouchMove){ct(l.target).is(a.focusableElements)||(n.allowClick=!1),a.isTouched&&(Object.assign(i,{startX:u,startY:g,currentX:u,currentY:g}),a.touchStartTime=_i());return}if(a.isTouchEvent&&r.touchReleaseOnEdges&&!r.loop){if(n.isVertical()){if(g<i.startY&&n.translate<=n.maxTranslate()||g>i.startY&&n.translate>=n.minTranslate()){a.isTouched=!1,a.isMoved=!1;return}}else if(u<i.startX&&n.translate<=n.maxTranslate()||u>i.startX&&n.translate>=n.minTranslate())return}if(a.isTouchEvent&&t.activeElement&&l.target===t.activeElement&&ct(l.target).is(a.focusableElements)){a.isMoved=!0,n.allowClick=!1;return}if(a.allowTouchCallbacks&&n.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;i.currentX=u,i.currentY=g;const y=i.currentX-i.startX,w=i.currentY-i.startY;if(n.params.threshold&&Math.sqrt(y**2+w**2)<n.params.threshold)return;if(typeof a.isScrolling=="undefined"){let p;n.isHorizontal()&&i.currentY===i.startY||n.isVertical()&&i.currentX===i.startX?a.isScrolling=!1:y*y+w*w>=25&&(p=Math.atan2(Math.abs(w),Math.abs(y))*180/Math.PI,a.isScrolling=n.isHorizontal()?p>r.touchAngle:90-p>r.touchAngle)}if(a.isScrolling&&n.emit("touchMoveOpposite",l),typeof a.startMoving=="undefined"&&(i.currentX!==i.startX||i.currentY!==i.startY)&&(a.startMoving=!0),a.isScrolling){a.isTouched=!1;return}if(!a.startMoving)return;n.allowClick=!1,!r.cssMode&&l.cancelable&&l.preventDefault(),r.touchMoveStopPropagation&&!r.nested&&l.stopPropagation(),a.isMoved||(r.loop&&!r.cssMode&&n.loopFix(),a.startTranslate=n.getTranslate(),n.setTransition(0),n.animating&&n.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,r.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)),n.emit("sliderMove",l),a.isMoved=!0;let v=n.isHorizontal()?y:w;i.diff=v,v*=r.touchRatio,o&&(v=-v),n.swipeDirection=v>0?"prev":"next",a.currentTranslate=v+a.startTranslate;let S=!0,m=r.resistanceRatio;if(r.touchReleaseOnEdges&&(m=0),v>0&&a.currentTranslate>n.minTranslate()?(S=!1,r.resistance&&(a.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+a.startTranslate+v)**m)):v<0&&a.currentTranslate<n.maxTranslate()&&(S=!1,r.resistance&&(a.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-a.startTranslate-v)**m)),S&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&n.swipeDirection==="next"&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!n.allowSlidePrev&&n.swipeDirection==="prev"&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(a.currentTranslate=a.startTranslate),r.threshold>0)if(Math.abs(v)>r.threshold||a.allowThresholdMove){if(!a.allowThresholdMove){a.allowThresholdMove=!0,i.startX=i.currentX,i.startY=i.currentY,a.currentTranslate=a.startTranslate,i.diff=n.isHorizontal()?i.currentX-i.startX:i.currentY-i.startY;return}}else{a.currentTranslate=a.startTranslate;return}!r.followFinger||r.cssMode||((r.freeMode&&r.freeMode.enabled&&n.freeMode||r.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),n.params.freeMode&&r.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(a.currentTranslate),n.setTranslate(a.currentTranslate))}function SNe(e){const t=this,n=t.touchEventsData,{params:a,touches:r,rtlTranslate:i,slidesGrid:o,enabled:c}=t;if(!c)return;let l=e;if(l.originalEvent&&(l=l.originalEvent),n.allowTouchCallbacks&&t.emit("touchEnd",l),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&a.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}a.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const d=_i(),u=d-n.touchStartTime;if(t.allowClick){const b=l.path||l.composedPath&&l.composedPath();t.updateClickedSlide(b&&b[0]||l.target),t.emit("tap click",l),u<300&&d-n.lastClickTime<300&&t.emit("doubleTap doubleClick",l)}if(n.lastClickTime=_i(),Ep(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||r.diff===0||n.currentTranslate===n.startTranslate){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let g;if(a.followFinger?g=i?t.translate:-t.translate:g=-n.currentTranslate,a.cssMode)return;if(t.params.freeMode&&a.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:g});return}let y=0,w=t.slidesSizesGrid[0];for(let b=0;b<o.length;b+=b<a.slidesPerGroupSkip?1:a.slidesPerGroup){const x=b<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;typeof o[b+x]!="undefined"?g>=o[b]&&g<o[b+x]&&(y=b,w=o[b+x]-o[b]):g>=o[b]&&(y=b,w=o[o.length-1]-o[o.length-2])}let v=null,S=null;a.rewind&&(t.isBeginning?S=t.params.virtual&&t.params.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(v=0));const m=(g-o[y])/w,p=y<a.slidesPerGroupSkip-1?1:a.slidesPerGroup;if(u>a.longSwipesMs){if(!a.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(m>=a.longSwipesRatio?t.slideTo(a.rewind&&t.isEnd?v:y+p):t.slideTo(y)),t.swipeDirection==="prev"&&(m>1-a.longSwipesRatio?t.slideTo(y+p):S!==null&&m<0&&Math.abs(m)>a.longSwipesRatio?t.slideTo(S):t.slideTo(y))}else{if(!a.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(l.target===t.navigation.nextEl||l.target===t.navigation.prevEl)?l.target===t.navigation.nextEl?t.slideTo(y+p):t.slideTo(y):(t.swipeDirection==="next"&&t.slideTo(v!==null?v:y+p),t.swipeDirection==="prev"&&t.slideTo(S!==null?S:y))}}function n8(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:a,allowSlidePrev:r,snapGrid:i}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=r,e.allowSlideNext=a,e.params.watchOverflow&&i!==e.snapGrid&&e.checkOverflow()}function kNe(e){const t=this;!t.enabled||t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function CNe(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:a}=e;if(!a)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let r;const i=e.maxTranslate()-e.minTranslate();i===0?r=0:r=(e.translate-e.minTranslate())/i,r!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let a8=!1;function ENe(){}const fj=(e,t)=>{const n=Fr(),{params:a,touchEvents:r,el:i,wrapperEl:o,device:c,support:l}=e,d=!!a.nested,u=t==="on"?"addEventListener":"removeEventListener",g=t;if(!l.touch)i[u](r.start,e.onTouchStart,!1),n[u](r.move,e.onTouchMove,d),n[u](r.end,e.onTouchEnd,!1);else{const y=r.start==="touchstart"&&l.passiveListener&&a.passiveListeners?{passive:!0,capture:!1}:!1;i[u](r.start,e.onTouchStart,y),i[u](r.move,e.onTouchMove,l.passiveListener?{passive:!1,capture:d}:d),i[u](r.end,e.onTouchEnd,y),r.cancel&&i[u](r.cancel,e.onTouchEnd,y)}(a.preventClicks||a.preventClicksPropagation)&&i[u]("click",e.onClick,!0),a.cssMode&&o[u]("scroll",e.onScroll),a.updateOnWindowResize?e[g](c.ios||c.android?"resize orientationchange observerUpdate":"resize observerUpdate",n8,!0):e[g]("observerUpdate",n8,!0)};function TNe(){const e=this,t=Fr(),{params:n,support:a}=e;e.onTouchStart=_Ne.bind(e),e.onTouchMove=NNe.bind(e),e.onTouchEnd=SNe.bind(e),n.cssMode&&(e.onScroll=CNe.bind(e)),e.onClick=kNe.bind(e),a.touch&&!a8&&(t.addEventListener("touchstart",ENe),a8=!0),fj(e,"on")}function LNe(){fj(this,"off")}var DNe={attachEvents:TNe,detachEvents:LNe};const r8=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function MNe(){const e=this,{activeIndex:t,initialized:n,loopedSlides:a=0,params:r,$el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const c=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!c||e.currentBreakpoint===c)return;const d=(c in o?o[c]:void 0)||e.originalParams,u=r8(e,r),g=r8(e,d),y=r.enabled;u&&!g?(i.removeClass(`${r.containerModifierClass}grid ${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&g&&(i.addClass(`${r.containerModifierClass}grid`),(d.grid.fill&&d.grid.fill==="column"||!d.grid.fill&&r.grid.fill==="column")&&i.addClass(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(m=>{const p=r[m]&&r[m].enabled,b=d[m]&&d[m].enabled;p&&!b&&e[m].disable(),!p&&b&&e[m].enable()});const w=d.direction&&d.direction!==r.direction,v=r.loop&&(d.slidesPerView!==r.slidesPerView||w);w&&n&&e.changeDirection(),Yr(e.params,d);const S=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),y&&!S?e.disable():!y&&S&&e.enable(),e.currentBreakpoint=c,e.emit("_beforeBreakpoint",d),v&&n&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-a+e.loopedSlides,0,!1)),e.emit("breakpoint",d)}function ANe(e,t="window",n){if(!e||t==="container"&&!n)return;let a=!1;const r=Ia(),i=t==="window"?r.innerHeight:n.clientHeight,o=Object.keys(e).map(c=>{if(typeof c=="string"&&c.indexOf("@")===0){const l=parseFloat(c.substr(1));return{value:i*l,point:c}}return{value:c,point:c}});o.sort((c,l)=>parseInt(c.value,10)-parseInt(l.value,10));for(let c=0;c<o.length;c+=1){const{point:l,value:d}=o[c];t==="window"?r.matchMedia(`(min-width: ${d}px)`).matches&&(a=l):d<=n.clientWidth&&(a=l)}return a||"max"}var INe={setBreakpoint:MNe,getBreakpoint:ANe};function ONe(e,t){const n=[];return e.forEach(a=>{typeof a=="object"?Object.keys(a).forEach(r=>{a[r]&&n.push(t+r)}):typeof a=="string"&&n.push(t+a)}),n}function PNe(){const e=this,{classNames:t,params:n,rtl:a,$el:r,device:i,support:o}=e,c=ONe(["initialized",n.direction,{"pointer-events":!o.touch},{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:a},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:i.android},{ios:i.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...c),r.addClass([...t].join(" ")),e.emitContainerClasses()}function RNe(){const e=this,{$el:t,classNames:n}=e;t.removeClass(n.join(" ")),e.emitContainerClasses()}var jNe={addClasses:PNe,removeClasses:RNe};function zNe(e,t,n,a,r,i){const o=Ia();let c;function l(){i&&i()}!ct(e).parent("picture")[0]&&(!e.complete||!r)&&t?(c=new o.Image,c.onload=l,c.onerror=l,a&&(c.sizes=a),n&&(c.srcset=n),t&&(c.src=t)):l()}function FNe(){const e=this;e.imagesToLoad=e.$el.find("img");function t(){typeof e=="undefined"||e===null||!e||e.destroyed||(e.imagesLoaded!==void 0&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}for(let n=0;n<e.imagesToLoad.length;n+=1){const a=e.imagesToLoad[n];e.loadImage(a,a.currentSrc||a.getAttribute("src"),a.srcset||a.getAttribute("srcset"),a.sizes||a.getAttribute("sizes"),!0,t)}}var $Ne={loadImage:zNe,preloadImages:FNe};function BNe(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:a}=n;if(a){const r=e.slides.length-1,i=e.slidesGrid[r]+e.slidesSizesGrid[r]+a*2;e.isLocked=e.size>i}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var HNe={checkOverflow:BNe},s8={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopedSlidesLimit:!0,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function UNe(e,t){return function(a={}){const r=Object.keys(a)[0],i=a[r];if(typeof i!="object"||i===null){Yr(t,a);return}if(["navigation","pagination","scrollbar"].indexOf(r)>=0&&e[r]===!0&&(e[r]={auto:!0}),!(r in e&&"enabled"in i)){Yr(t,a);return}e[r]===!0&&(e[r]={enabled:!0}),typeof e[r]=="object"&&!("enabled"in e[r])&&(e[r].enabled=!0),e[r]||(e[r]={enabled:!1}),Yr(t,a)}}const av={eventsEmitter:F6e,update:Z6e,translate:tNe,transition:sNe,slide:mNe,loop:bNe,grabCursor:wNe,events:DNe,breakpoints:INe,checkOverflow:HNe,classes:jNe,images:$Ne},rv={};class xr{constructor(...t){let n,a;if(t.length===1&&t[0].constructor&&Object.prototype.toString.call(t[0]).slice(8,-1)==="Object"?a=t[0]:[n,a]=t,a||(a={}),a=Yr({},a),n&&!a.el&&(a.el=n),a.el&&ct(a.el).length>1){const c=[];return ct(a.el).each(l=>{const d=Yr({},a,{el:l});c.push(new xr(d))}),c}const r=this;r.__swiper__=!0,r.support=dj(),r.device=O6e({userAgent:a.userAgent}),r.browser=R6e(),r.eventsListeners={},r.eventsAnyListeners=[],r.modules=[...r.__modules__],a.modules&&Array.isArray(a.modules)&&r.modules.push(...a.modules);const i={};r.modules.forEach(c=>{c({swiper:r,extendParams:UNe(a,i),on:r.on.bind(r),once:r.once.bind(r),off:r.off.bind(r),emit:r.emit.bind(r)})});const o=Yr({},s8,i);return r.params=Yr({},o,rv,a),r.originalParams=Yr({},r.params),r.passedParams=Yr({},a),r.params&&r.params.on&&Object.keys(r.params.on).forEach(c=>{r.on(c,r.params.on[c])}),r.params&&r.params.onAny&&r.onAny(r.params.onAny),r.$=ct,Object.assign(r,{enabled:r.params.enabled,el:n,classNames:[],slides:ct(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return r.params.direction==="horizontal"},isVertical(){return r.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:r.params.allowSlideNext,allowSlidePrev:r.params.allowSlidePrev,touchEvents:function(){const l=["touchstart","touchmove","touchend","touchcancel"],d=["pointerdown","pointermove","pointerup"];return r.touchEventsTouch={start:l[0],move:l[1],end:l[2],cancel:l[3]},r.touchEventsDesktop={start:d[0],move:d[1],end:d[2]},r.support.touch||!r.params.simulateTouch?r.touchEventsTouch:r.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:r.params.focusableElements,lastClickTime:_i(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:r.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),r.emit("_swiper"),r.params.init&&r.init(),r}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;!t.enabled||(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const a=this;t=Math.min(Math.max(t,0),1);const r=a.minTranslate(),o=(a.maxTranslate()-r)*t+r;a.translateTo(o,typeof n=="undefined"?0:n),a.updateActiveIndex(),a.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(a=>a.indexOf("swiper")===0||a.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(a=>a.indexOf("swiper-slide")===0||a.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.each(a=>{const r=t.getSlideClasses(a);n.push({slideEl:a,classNames:r}),t.emit("_slideClass",a,r)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t="current",n=!1){const a=this,{params:r,slides:i,slidesGrid:o,slidesSizesGrid:c,size:l,activeIndex:d}=a;let u=1;if(r.centeredSlides){let g=i[d].swiperSlideSize,y;for(let w=d+1;w<i.length;w+=1)i[w]&&!y&&(g+=i[w].swiperSlideSize,u+=1,g>l&&(y=!0));for(let w=d-1;w>=0;w-=1)i[w]&&!y&&(g+=i[w].swiperSlideSize,u+=1,g>l&&(y=!0))}else if(t==="current")for(let g=d+1;g<i.length;g+=1)(n?o[g]+c[g]-o[d]<l:o[g]-o[d]<l)&&(u+=1);else for(let g=d-1;g>=0;g-=1)o[d]-o[g]<l&&(u+=1);return u}update(){const t=this;if(!t||t.destroyed)return;const{snapGrid:n,params:a}=t;a.breakpoints&&t.setBreakpoint(),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function r(){const o=t.rtlTranslate?t.translate*-1:t.translate,c=Math.min(Math.max(o,t.maxTranslate()),t.minTranslate());t.setTranslate(c),t.updateActiveIndex(),t.updateSlidesClasses()}let i;t.params.freeMode&&t.params.freeMode.enabled?(r(),t.params.autoHeight&&t.updateAutoHeight()):((t.params.slidesPerView==="auto"||t.params.slidesPerView>1)&&t.isEnd&&!t.params.centeredSlides?i=t.slideTo(t.slides.length-1,0,!1,!0):i=t.slideTo(t.activeIndex,0,!1,!0),i||r()),a.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n=!0){const a=this,r=a.params.direction;return t||(t=r==="horizontal"?"vertical":"horizontal"),t===r||t!=="horizontal"&&t!=="vertical"||(a.$el.removeClass(`${a.params.containerModifierClass}${r}`).addClass(`${a.params.containerModifierClass}${t}`),a.emitContainerClasses(),a.params.direction=t,a.slides.each(i=>{t==="vertical"?i.style.width="":i.style.height=""}),a.emit("changeDirection"),n&&a.update()),a}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.$el.addClass(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.$el.removeClass(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;const a=ct(t||n.params.el);if(t=a[0],!t)return!1;t.swiper=n;const r=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=(()=>{if(t&&t.shadowRoot&&t.shadowRoot.querySelector){const c=ct(t.shadowRoot.querySelector(r()));return c.children=l=>a.children(l),c}return a.children?a.children(r()):ct(a).children(r())})();if(o.length===0&&n.params.createElements){const l=Fr().createElement("div");o=ct(l),l.className=n.params.wrapperClass,a.append(l),a.children(`.${n.params.slideClass}`).each(d=>{o.append(d)})}return Object.assign(n,{$el:a,el:t,$wrapperEl:o,wrapperEl:o[0],mounted:!0,rtl:t.dir.toLowerCase()==="rtl"||a.css("direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(t.dir.toLowerCase()==="rtl"||a.css("direction")==="rtl"),wrongRTL:o.css("display")==="-webkit-box"}),!0}init(t){const n=this;return n.initialized||n.mount(t)===!1||(n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.params.loop&&n.loopCreate(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.preloadImages&&n.preloadImages(),n.params.loop?n.slideTo(n.params.initialSlide+n.loopedSlides,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.attachEvents(),n.initialized=!0,n.emit("init"),n.emit("afterInit")),n}destroy(t=!0,n=!0){const a=this,{params:r,$el:i,$wrapperEl:o,slides:c}=a;return typeof a.params=="undefined"||a.destroyed||(a.emit("beforeDestroy"),a.initialized=!1,a.detachEvents(),r.loop&&a.loopDestroy(),n&&(a.removeClasses(),i.removeAttr("style"),o.removeAttr("style"),c&&c.length&&c.removeClass([r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),a.emit("destroy"),Object.keys(a.eventsListeners).forEach(l=>{a.off(l)}),t!==!1&&(a.$el[0].swiper=null,T6e(a)),a.destroyed=!0),null}static extendDefaults(t){Yr(rv,t)}static get extendedDefaults(){return rv}static get defaults(){return s8}static installModule(t){xr.prototype.__modules__||(xr.prototype.__modules__=[]);const n=xr.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>xr.installModule(n)),xr):(xr.installModule(t),xr)}}Object.keys(av).forEach(e=>{Object.keys(av[e]).forEach(t=>{xr.prototype[t]=av[e][t]})});xr.use([j6e,z6e]);function VNe({swiper:e,extendParams:t,on:n,emit:a}){const r=Ia();t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),e.mousewheel={enabled:!1};let i,o=_i(),c;const l=[];function d(b){let _=0,C=0,E=0,T=0;return"detail"in b&&(C=b.detail),"wheelDelta"in b&&(C=-b.wheelDelta/120),"wheelDeltaY"in b&&(C=-b.wheelDeltaY/120),"wheelDeltaX"in b&&(_=-b.wheelDeltaX/120),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(_=C,C=0),E=_*10,T=C*10,"deltaY"in b&&(T=b.deltaY),"deltaX"in b&&(E=b.deltaX),b.shiftKey&&!E&&(E=T,T=0),(E||T)&&b.deltaMode&&(b.deltaMode===1?(E*=40,T*=40):(E*=800,T*=800)),E&&!_&&(_=E<1?-1:1),T&&!C&&(C=T<1?-1:1),{spinX:_,spinY:C,pixelX:E,pixelY:T}}function u(){!e.enabled||(e.mouseEntered=!0)}function g(){!e.enabled||(e.mouseEntered=!1)}function y(b){return e.params.mousewheel.thresholdDelta&&b.delta<e.params.mousewheel.thresholdDelta||e.params.mousewheel.thresholdTime&&_i()-o<e.params.mousewheel.thresholdTime?!1:b.delta>=6&&_i()-o<60?!0:(b.direction<0?(!e.isEnd||e.params.loop)&&!e.animating&&(e.slideNext(),a("scroll",b.raw)):(!e.isBeginning||e.params.loop)&&!e.animating&&(e.slidePrev(),a("scroll",b.raw)),o=new r.Date().getTime(),!1)}function w(b){const x=e.params.mousewheel;if(b.direction<0){if(e.isEnd&&!e.params.loop&&x.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&x.releaseOnEdges)return!0;return!1}function v(b){let x=b,k=!0;if(!e.enabled)return;const N=e.params.mousewheel;e.params.cssMode&&x.preventDefault();let _=e.$el;if(e.params.mousewheel.eventsTarget!=="container"&&(_=ct(e.params.mousewheel.eventsTarget)),!e.mouseEntered&&!_[0].contains(x.target)&&!N.releaseOnEdges)return!0;x.originalEvent&&(x=x.originalEvent);let C=0;const E=e.rtlTranslate?-1:1,T=d(x);if(N.forceToAxis)if(e.isHorizontal())if(Math.abs(T.pixelX)>Math.abs(T.pixelY))C=-T.pixelX*E;else return!0;else if(Math.abs(T.pixelY)>Math.abs(T.pixelX))C=-T.pixelY;else return!0;else C=Math.abs(T.pixelX)>Math.abs(T.pixelY)?-T.pixelX*E:-T.pixelY;if(C===0)return!0;N.invert&&(C=-C);let D=e.getTranslate()+C*N.sensitivity;if(D>=e.minTranslate()&&(D=e.minTranslate()),D<=e.maxTranslate()&&(D=e.maxTranslate()),k=e.params.loop?!0:!(D===e.minTranslate()||D===e.maxTranslate()),k&&e.params.nested&&x.stopPropagation(),!e.params.freeMode||!e.params.freeMode.enabled){const P={time:_i(),delta:Math.abs(C),direction:Math.sign(C),raw:b};l.length>=2&&l.shift();const M=l.length?l[l.length-1]:void 0;if(l.push(P),M?(P.direction!==M.direction||P.delta>M.delta||P.time>M.time+150)&&y(P):y(P),w(P))return!0}else{const P={time:_i(),delta:Math.abs(C),direction:Math.sign(C)},M=c&&P.time<c.time+500&&P.delta<=c.delta&&P.direction===c.direction;if(!M){c=void 0,e.params.loop&&e.loopFix();let O=e.getTranslate()+C*N.sensitivity;const F=e.isBeginning,z=e.isEnd;if(O>=e.minTranslate()&&(O=e.minTranslate()),O<=e.maxTranslate()&&(O=e.maxTranslate()),e.setTransition(0),e.setTranslate(O),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!F&&e.isBeginning||!z&&e.isEnd)&&e.updateSlidesClasses(),e.params.freeMode.sticky){clearTimeout(i),i=void 0,l.length>=15&&l.shift();const H=l.length?l[l.length-1]:void 0,A=l[0];if(l.push(P),H&&(P.delta>H.delta||P.direction!==H.direction))l.splice(0);else if(l.length>=15&&P.time-A.time<500&&A.delta-P.delta>=1&&P.delta<=6){const j=C>0?.8:.2;c=P,l.splice(0),i=Ep(()=>{e.slideToClosest(e.params.speed,!0,void 0,j)},0)}i||(i=Ep(()=>{c=P,l.splice(0),e.slideToClosest(e.params.speed,!0,void 0,.5)},500))}if(M||a("scroll",x),e.params.autoplay&&e.params.autoplayDisableOnInteraction&&e.autoplay.stop(),O===e.minTranslate()||O===e.maxTranslate())return!0}}return x.preventDefault?x.preventDefault():x.returnValue=!1,!1}function S(b){let x=e.$el;e.params.mousewheel.eventsTarget!=="container"&&(x=ct(e.params.mousewheel.eventsTarget)),x[b]("mouseenter",u),x[b]("mouseleave",g),x[b]("wheel",v)}function m(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",v),!0):e.mousewheel.enabled?!1:(S("on"),e.mousewheel.enabled=!0,!0)}function p(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,v),!0):e.mousewheel.enabled?(S("off"),e.mousewheel.enabled=!1,!0):!1}n("init",()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&p(),e.params.mousewheel.enabled&&m()}),n("destroy",()=>{e.params.cssMode&&m(),e.mousewheel.enabled&&p()}),Object.assign(e.mousewheel,{enable:m,disable:p})}function mj(e,t,n,a){const r=Fr();return e.params.createElements&&Object.keys(a).forEach(i=>{if(!n[i]&&n.auto===!0){let o=e.$el.children(`.${a[i]}`)[0];o||(o=r.createElement("div"),o.className=a[i],e.$el.append(o)),n[i]=o,t[i]=o}}),n}function F5({swiper:e,extendParams:t,on:n,emit:a}){t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),e.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null};function r(w){let v;return w&&(v=ct(w),e.params.uniqueNavElements&&typeof w=="string"&&v.length>1&&e.$el.find(w).length===1&&(v=e.$el.find(w))),v}function i(w,v){const S=e.params.navigation;w&&w.length>0&&(w[v?"addClass":"removeClass"](S.disabledClass),w[0]&&w[0].tagName==="BUTTON"&&(w[0].disabled=v),e.params.watchOverflow&&e.enabled&&w[e.isLocked?"addClass":"removeClass"](S.lockClass))}function o(){if(e.params.loop)return;const{$nextEl:w,$prevEl:v}=e.navigation;i(v,e.isBeginning&&!e.params.rewind),i(w,e.isEnd&&!e.params.rewind)}function c(w){w.preventDefault(),!(e.isBeginning&&!e.params.loop&&!e.params.rewind)&&(e.slidePrev(),a("navigationPrev"))}function l(w){w.preventDefault(),!(e.isEnd&&!e.params.loop&&!e.params.rewind)&&(e.slideNext(),a("navigationNext"))}function d(){const w=e.params.navigation;if(e.params.navigation=mj(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(w.nextEl||w.prevEl))return;const v=r(w.nextEl),S=r(w.prevEl);v&&v.length>0&&v.on("click",l),S&&S.length>0&&S.on("click",c),Object.assign(e.navigation,{$nextEl:v,nextEl:v&&v[0],$prevEl:S,prevEl:S&&S[0]}),e.enabled||(v&&v.addClass(w.lockClass),S&&S.addClass(w.lockClass))}function u(){const{$nextEl:w,$prevEl:v}=e.navigation;w&&w.length&&(w.off("click",l),w.removeClass(e.params.navigation.disabledClass)),v&&v.length&&(v.off("click",c),v.removeClass(e.params.navigation.disabledClass))}n("init",()=>{e.params.navigation.enabled===!1?y():(d(),o())}),n("toEdge fromEdge lock unlock",()=>{o()}),n("destroy",()=>{u()}),n("enable disable",()=>{const{$nextEl:w,$prevEl:v}=e.navigation;w&&w[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),v&&v[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)}),n("click",(w,v)=>{const{$nextEl:S,$prevEl:m}=e.navigation,p=v.target;if(e.params.navigation.hideOnClick&&!ct(p).is(m)&&!ct(p).is(S)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===p||e.pagination.el.contains(p)))return;let b;S?b=S.hasClass(e.params.navigation.hiddenClass):m&&(b=m.hasClass(e.params.navigation.hiddenClass)),a(b===!0?"navigationShow":"navigationHide"),S&&S.toggleClass(e.params.navigation.hiddenClass),m&&m.toggleClass(e.params.navigation.hiddenClass)}});const g=()=>{e.$el.removeClass(e.params.navigation.navigationDisabledClass),d(),o()},y=()=>{e.$el.addClass(e.params.navigation.navigationDisabledClass),u()};Object.assign(e.navigation,{enable:g,disable:y,update:o,init:d,destroy:u})}function to(e=""){return`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function $5({swiper:e,extendParams:t,on:n,emit:a}){const r="swiper-pagination";t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:S=>S,formatFractionTotal:S=>S,bulletClass:`${r}-bullet`,bulletActiveClass:`${r}-bullet-active`,modifierClass:`${r}-`,currentClass:`${r}-current`,totalClass:`${r}-total`,hiddenClass:`${r}-hidden`,progressbarFillClass:`${r}-progressbar-fill`,progressbarOppositeClass:`${r}-progressbar-opposite`,clickableClass:`${r}-clickable`,lockClass:`${r}-lock`,horizontalClass:`${r}-horizontal`,verticalClass:`${r}-vertical`,paginationDisabledClass:`${r}-disabled`}}),e.pagination={el:null,$el:null,bullets:[]};let i,o=0;function c(){return!e.params.pagination.el||!e.pagination.el||!e.pagination.$el||e.pagination.$el.length===0}function l(S,m){const{bulletActiveClass:p}=e.params.pagination;S[m]().addClass(`${p}-${m}`)[m]().addClass(`${p}-${m}-${m}`)}function d(){const S=e.rtl,m=e.params.pagination;if(c())return;const p=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,b=e.pagination.$el;let x;const k=e.params.loop?Math.ceil((p-e.loopedSlides*2)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(x=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),x>p-1-e.loopedSlides*2&&(x-=p-e.loopedSlides*2),x>k-1&&(x-=k),x<0&&e.params.paginationType!=="bullets"&&(x=k+x)):typeof e.snapIndex!="undefined"?x=e.snapIndex:x=e.activeIndex||0,m.type==="bullets"&&e.pagination.bullets&&e.pagination.bullets.length>0){const N=e.pagination.bullets;let _,C,E;if(m.dynamicBullets&&(i=N.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),b.css(e.isHorizontal()?"width":"height",`${i*(m.dynamicMainBullets+4)}px`),m.dynamicMainBullets>1&&e.previousIndex!==void 0&&(o+=x-(e.previousIndex-e.loopedSlides||0),o>m.dynamicMainBullets-1?o=m.dynamicMainBullets-1:o<0&&(o=0)),_=Math.max(x-o,0),C=_+(Math.min(N.length,m.dynamicMainBullets)-1),E=(C+_)/2),N.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map(T=>`${m.bulletActiveClass}${T}`).join(" ")),b.length>1)N.each(T=>{const D=ct(T),P=D.index();P===x&&D.addClass(m.bulletActiveClass),m.dynamicBullets&&(P>=_&&P<=C&&D.addClass(`${m.bulletActiveClass}-main`),P===_&&l(D,"prev"),P===C&&l(D,"next"))});else{const T=N.eq(x),D=T.index();if(T.addClass(m.bulletActiveClass),m.dynamicBullets){const P=N.eq(_),M=N.eq(C);for(let O=_;O<=C;O+=1)N.eq(O).addClass(`${m.bulletActiveClass}-main`);if(e.params.loop)if(D>=N.length){for(let O=m.dynamicMainBullets;O>=0;O-=1)N.eq(N.length-O).addClass(`${m.bulletActiveClass}-main`);N.eq(N.length-m.dynamicMainBullets-1).addClass(`${m.bulletActiveClass}-prev`)}else l(P,"prev"),l(M,"next");else l(P,"prev"),l(M,"next")}}if(m.dynamicBullets){const T=Math.min(N.length,m.dynamicMainBullets+4),D=(i*T-i)/2-E*i,P=S?"right":"left";N.css(e.isHorizontal()?P:"top",`${D}px`)}}if(m.type==="fraction"&&(b.find(to(m.currentClass)).text(m.formatFractionCurrent(x+1)),b.find(to(m.totalClass)).text(m.formatFractionTotal(k))),m.type==="progressbar"){let N;m.progressbarOpposite?N=e.isHorizontal()?"vertical":"horizontal":N=e.isHorizontal()?"horizontal":"vertical";const _=(x+1)/k;let C=1,E=1;N==="horizontal"?C=_:E=_,b.find(to(m.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${C}) scaleY(${E})`).transition(e.params.speed)}m.type==="custom"&&m.renderCustom?(b.html(m.renderCustom(e,x+1,k)),a("paginationRender",b[0])):a("paginationUpdate",b[0]),e.params.watchOverflow&&e.enabled&&b[e.isLocked?"addClass":"removeClass"](m.lockClass)}function u(){const S=e.params.pagination;if(c())return;const m=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,p=e.pagination.$el;let b="";if(S.type==="bullets"){let x=e.params.loop?Math.ceil((m-e.loopedSlides*2)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&!e.params.loop&&x>m&&(x=m);for(let k=0;k<x;k+=1)S.renderBullet?b+=S.renderBullet.call(e,k,S.bulletClass):b+=`<${S.bulletElement} class="${S.bulletClass}"></${S.bulletElement}>`;p.html(b),e.pagination.bullets=p.find(to(S.bulletClass))}S.type==="fraction"&&(S.renderFraction?b=S.renderFraction.call(e,S.currentClass,S.totalClass):b=`<span class="${S.currentClass}"></span> / <span class="${S.totalClass}"></span>`,p.html(b)),S.type==="progressbar"&&(S.renderProgressbar?b=S.renderProgressbar.call(e,S.progressbarFillClass):b=`<span class="${S.progressbarFillClass}"></span>`,p.html(b)),S.type!=="custom"&&a("paginationRender",e.pagination.$el[0])}function g(){e.params.pagination=mj(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const S=e.params.pagination;if(!S.el)return;let m=ct(S.el);m.length!==0&&(e.params.uniqueNavElements&&typeof S.el=="string"&&m.length>1&&(m=e.$el.find(S.el),m.length>1&&(m=m.filter(p=>ct(p).parents(".swiper")[0]===e.el))),S.type==="bullets"&&S.clickable&&m.addClass(S.clickableClass),m.addClass(S.modifierClass+S.type),m.addClass(e.isHorizontal()?S.horizontalClass:S.verticalClass),S.type==="bullets"&&S.dynamicBullets&&(m.addClass(`${S.modifierClass}${S.type}-dynamic`),o=0,S.dynamicMainBullets<1&&(S.dynamicMainBullets=1)),S.type==="progressbar"&&S.progressbarOpposite&&m.addClass(S.progressbarOppositeClass),S.clickable&&m.on("click",to(S.bulletClass),function(b){b.preventDefault();let x=ct(this).index()*e.params.slidesPerGroup;e.params.loop&&(x+=e.loopedSlides),e.slideTo(x)}),Object.assign(e.pagination,{$el:m,el:m[0]}),e.enabled||m.addClass(S.lockClass))}function y(){const S=e.params.pagination;if(c())return;const m=e.pagination.$el;m.removeClass(S.hiddenClass),m.removeClass(S.modifierClass+S.type),m.removeClass(e.isHorizontal()?S.horizontalClass:S.verticalClass),e.pagination.bullets&&e.pagination.bullets.removeClass&&e.pagination.bullets.removeClass(S.bulletActiveClass),S.clickable&&m.off("click",to(S.bulletClass))}n("init",()=>{e.params.pagination.enabled===!1?v():(g(),u(),d())}),n("activeIndexChange",()=>{(e.params.loop||typeof e.snapIndex=="undefined")&&d()}),n("snapIndexChange",()=>{e.params.loop||d()}),n("slidesLengthChange",()=>{e.params.loop&&(u(),d())}),n("snapGridLengthChange",()=>{e.params.loop||(u(),d())}),n("destroy",()=>{y()}),n("enable disable",()=>{const{$el:S}=e.pagination;S&&S[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)}),n("lock unlock",()=>{d()}),n("click",(S,m)=>{const p=m.target,{$el:b}=e.pagination;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&b&&b.length>0&&!ct(p).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&p===e.navigation.nextEl||e.navigation.prevEl&&p===e.navigation.prevEl))return;const x=b.hasClass(e.params.pagination.hiddenClass);a(x===!0?"paginationShow":"paginationHide"),b.toggleClass(e.params.pagination.hiddenClass)}});const w=()=>{e.$el.removeClass(e.params.pagination.paginationDisabledClass),e.pagination.$el&&e.pagination.$el.removeClass(e.params.pagination.paginationDisabledClass),g(),u(),d()},v=()=>{e.$el.addClass(e.params.pagination.paginationDisabledClass),e.pagination.$el&&e.pagination.$el.addClass(e.params.pagination.paginationDisabledClass),y()};Object.assign(e.pagination,{enable:w,disable:v,render:u,update:d,init:g,destroy:y})}function B5({swiper:e,extendParams:t,on:n}){t({a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}",slideLabelMessage:"{{index}} / {{slidesLength}}",containerMessage:null,containerRoleDescriptionMessage:null,itemRoleDescriptionMessage:null,slideRole:"group",id:null}}),e.a11y={clicked:!1};let a=null;function r(M){const O=a;O.length!==0&&(O.html(""),O.html(M))}function i(M=16){const O=()=>Math.round(16*Math.random()).toString(16);return"x".repeat(M).replace(/x/g,O)}function o(M){M.attr("tabIndex","0")}function c(M){M.attr("tabIndex","-1")}function l(M,O){M.attr("role",O)}function d(M,O){M.attr("aria-roledescription",O)}function u(M,O){M.attr("aria-controls",O)}function g(M,O){M.attr("aria-label",O)}function y(M,O){M.attr("id",O)}function w(M,O){M.attr("aria-live",O)}function v(M){M.attr("aria-disabled",!0)}function S(M){M.attr("aria-disabled",!1)}function m(M){if(M.keyCode!==13&&M.keyCode!==32)return;const O=e.params.a11y,F=ct(M.target);e.navigation&&e.navigation.$nextEl&&F.is(e.navigation.$nextEl)&&(e.isEnd&&!e.params.loop||e.slideNext(),e.isEnd?r(O.lastSlideMessage):r(O.nextSlideMessage)),e.navigation&&e.navigation.$prevEl&&F.is(e.navigation.$prevEl)&&(e.isBeginning&&!e.params.loop||e.slidePrev(),e.isBeginning?r(O.firstSlideMessage):r(O.prevSlideMessage)),e.pagination&&F.is(to(e.params.pagination.bulletClass))&&F[0].click()}function p(){if(e.params.loop||e.params.rewind||!e.navigation)return;const{$nextEl:M,$prevEl:O}=e.navigation;O&&O.length>0&&(e.isBeginning?(v(O),c(O)):(S(O),o(O))),M&&M.length>0&&(e.isEnd?(v(M),c(M)):(S(M),o(M)))}function b(){return e.pagination&&e.pagination.bullets&&e.pagination.bullets.length}function x(){return b()&&e.params.pagination.clickable}function k(){const M=e.params.a11y;!b()||e.pagination.bullets.each(O=>{const F=ct(O);e.params.pagination.clickable&&(o(F),e.params.pagination.renderBullet||(l(F,"button"),g(F,M.paginationBulletMessage.replace(/\{\{index\}\}/,F.index()+1)))),F.is(`.${e.params.pagination.bulletActiveClass}`)?F.attr("aria-current","true"):F.removeAttr("aria-current")})}const N=(M,O,F)=>{o(M),M[0].tagName!=="BUTTON"&&(l(M,"button"),M.on("keydown",m)),g(M,F),u(M,O)},_=()=>{e.a11y.clicked=!0},C=()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{e.destroyed||(e.a11y.clicked=!1)})})},E=M=>{if(e.a11y.clicked)return;const O=M.target.closest(`.${e.params.slideClass}`);if(!O||!e.slides.includes(O))return;const F=e.slides.indexOf(O)===e.activeIndex,z=e.params.watchSlidesProgress&&e.visibleSlides&&e.visibleSlides.includes(O);F||z||M.sourceCapabilities&&M.sourceCapabilities.firesTouchEvents||(e.isHorizontal()?e.el.scrollLeft=0:e.el.scrollTop=0,e.slideTo(e.slides.indexOf(O),0))},T=()=>{const M=e.params.a11y;M.itemRoleDescriptionMessage&&d(ct(e.slides),M.itemRoleDescriptionMessage),M.slideRole&&l(ct(e.slides),M.slideRole);const O=e.params.loop?e.slides.filter(F=>!F.classList.contains(e.params.slideDuplicateClass)).length:e.slides.length;M.slideLabelMessage&&e.slides.each((F,z)=>{const H=ct(F),A=e.params.loop?parseInt(H.attr("data-swiper-slide-index"),10):z,j=M.slideLabelMessage.replace(/\{\{index\}\}/,A+1).replace(/\{\{slidesLength\}\}/,O);g(H,j)})},D=()=>{const M=e.params.a11y;e.$el.append(a);const O=e.$el;M.containerRoleDescriptionMessage&&d(O,M.containerRoleDescriptionMessage),M.containerMessage&&g(O,M.containerMessage);const F=e.$wrapperEl,z=M.id||F.attr("id")||`swiper-wrapper-${i(16)}`,H=e.params.autoplay&&e.params.autoplay.enabled?"off":"polite";y(F,z),w(F,H),T();let A,j;e.navigation&&e.navigation.$nextEl&&(A=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(j=e.navigation.$prevEl),A&&A.length&&N(A,z,M.nextSlideMessage),j&&j.length&&N(j,z,M.prevSlideMessage),x()&&e.pagination.$el.on("keydown",to(e.params.pagination.bulletClass),m),e.$el.on("focus",E,!0),e.$el.on("pointerdown",_,!0),e.$el.on("pointerup",C,!0)};function P(){a&&a.length>0&&a.remove();let M,O;e.navigation&&e.navigation.$nextEl&&(M=e.navigation.$nextEl),e.navigation&&e.navigation.$prevEl&&(O=e.navigation.$prevEl),M&&M.off("keydown",m),O&&O.off("keydown",m),x()&&e.pagination.$el.off("keydown",to(e.params.pagination.bulletClass),m),e.$el.off("focus",E,!0),e.$el.off("pointerdown",_,!0),e.$el.off("pointerup",C,!0)}n("beforeInit",()=>{a=ct(`<span class="${e.params.a11y.notificationClass}" aria-live="assertive" aria-atomic="true"></span>`)}),n("afterInit",()=>{!e.params.a11y.enabled||D()}),n("slidesLengthChange snapGridLengthChange slidesGridLengthChange",()=>{!e.params.a11y.enabled||T()}),n("fromEdge toEdge afterInit lock unlock",()=>{!e.params.a11y.enabled||p()}),n("paginationUpdate",()=>{!e.params.a11y.enabled||k()}),n("destroy",()=>{!e.params.a11y.enabled||P()})}function Rc(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function pl(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(a=>n.indexOf(a)<0).forEach(a=>{typeof e[a]=="undefined"?e[a]=t[a]:Rc(t[a])&&Rc(e[a])&&Object.keys(t[a]).length>0?t[a].__swiper__?e[a]=t[a]:pl(e[a],t[a]):e[a]=t[a]})}function pj(e={}){return e.navigation&&typeof e.navigation.nextEl=="undefined"&&typeof e.navigation.prevEl=="undefined"}function hj(e={}){return e.pagination&&typeof e.pagination.el=="undefined"}function gj(e={}){return e.scrollbar&&typeof e.scrollbar.el=="undefined"}function bj(e=""){const t=e.split(" ").map(a=>a.trim()).filter(a=>!!a),n=[];return t.forEach(a=>{n.indexOf(a)<0&&n.push(a)}),n.join(" ")}const yj=["modules","init","_direction","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_preloadImages","updateOnImagesReady","_loop","_loopAdditionalSlides","_loopedSlides","_loopedSlidesLimit","_loopFillGroupWithBlank","loopPreventsSlide","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideBlankClass","slideActiveClass","slideDuplicateActiveClass","slideVisibleClass","slideDuplicateClass","slideNextClass","slideDuplicateNextClass","slidePrevClass","slideDuplicatePrevClass","wrapperClass","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","lazy","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom"];function WNe(e={},t=!0){const n={on:{}},a={},r={};pl(n,xr.defaults),pl(n,xr.extendedDefaults),n._emitClasses=!0,n.init=!1;const i={},o=yj.map(l=>l.replace(/_/,"")),c=Object.assign({},e);return Object.keys(c).forEach(l=>{typeof e[l]!="undefined"&&(o.indexOf(l)>=0?Rc(e[l])?(n[l]={},r[l]={},pl(n[l],e[l]),pl(r[l],e[l])):(n[l]=e[l],r[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?a[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:i[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:r,rest:i,events:a}}function YNe({el:e,nextEl:t,prevEl:n,paginationEl:a,scrollbarEl:r,swiper:i},o){pj(o)&&t&&n&&(i.params.navigation.nextEl=t,i.originalParams.navigation.nextEl=t,i.params.navigation.prevEl=n,i.originalParams.navigation.prevEl=n),hj(o)&&a&&(i.params.pagination.el=a,i.originalParams.pagination.el=a),gj(o)&&r&&(i.params.scrollbar.el=r,i.originalParams.scrollbar.el=r),i.init(e)}const xj=(e,t)=>{let n=t.slidesPerView;if(t.breakpoints){const r=xr.prototype.getBreakpoint(t.breakpoints),i=r in t.breakpoints?t.breakpoints[r]:void 0;i&&i.slidesPerView&&(n=i.slidesPerView)}let a=Math.ceil(parseFloat(t.loopedSlides||n,10));return a+=t.loopAdditionalSlides,a>e.length&&t.loopedSlidesLimit&&(a=e.length),a};function GNe(e,t,n){const a=t.map((l,d)=>R.cloneElement(l,{swiper:e,"data-swiper-slide-index":d}));function r(l,d,u){return R.cloneElement(l,{key:`${l.key}-duplicate-${d}-${u}`,className:`${l.props.className||""} ${n.slideDuplicateClass}`})}if(n.loopFillGroupWithBlank){const l=n.slidesPerGroup-a.length%n.slidesPerGroup;if(l!==n.slidesPerGroup)for(let d=0;d<l;d+=1){const u=R.createElement("div",{className:`${n.slideClass} ${n.slideBlankClass}`});a.push(u)}}n.slidesPerView==="auto"&&!n.loopedSlides&&(n.loopedSlides=a.length);const i=xj(a,n),o=[],c=[];for(let l=0;l<i;l+=1){const d=l-Math.floor(l/a.length)*a.length;c.push(r(a[d],l,"append")),o.unshift(r(a[a.length-d-1],l,"prepend"))}return e&&(e.loopedSlides=i),[...o,...a,...c]}function qNe(e,t,n,a,r){const i=[];if(!t)return i;const o=l=>{i.indexOf(l)<0&&i.push(l)};if(n&&a){const l=a.map(r),d=n.map(r);l.join("")!==d.join("")&&o("children"),a.length!==n.length&&o("children")}return yj.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Rc(e[l])&&Rc(t[l])){const d=Object.keys(e[l]),u=Object.keys(t[l]);d.length!==u.length?o(l):(d.forEach(g=>{e[l][g]!==t[l][g]&&o(l)}),u.forEach(g=>{e[l][g]!==t[l][g]&&o(l)}))}else e[l]!==t[l]&&o(l)}),i}function wj(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function vj(e){const t=[];return R.Children.toArray(e).forEach(n=>{wj(n)?t.push(n):n.props&&n.props.children&&vj(n.props.children).forEach(a=>t.push(a))}),t}function ZNe(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return R.Children.toArray(e).forEach(a=>{if(wj(a))t.push(a);else if(a.props&&a.props.slot&&n[a.props.slot])n[a.props.slot].push(a);else if(a.props&&a.props.children){const r=vj(a.props.children);r.length>0?r.forEach(i=>t.push(i)):n["container-end"].push(a)}else n["container-end"].push(a)}),{slides:t,slots:n}}function QNe({swiper:e,slides:t,passedParams:n,changedParams:a,nextEl:r,prevEl:i,scrollbarEl:o,paginationEl:c}){const l=a.filter(N=>N!=="children"&&N!=="direction"),{params:d,pagination:u,navigation:g,scrollbar:y,virtual:w,thumbs:v}=e;let S,m,p,b,x;a.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&d.thumbs&&!d.thumbs.swiper&&(S=!0),a.includes("controller")&&n.controller&&n.controller.control&&d.controller&&!d.controller.control&&(m=!0),a.includes("pagination")&&n.pagination&&(n.pagination.el||c)&&(d.pagination||d.pagination===!1)&&u&&!u.el&&(p=!0),a.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||o)&&(d.scrollbar||d.scrollbar===!1)&&y&&!y.el&&(b=!0),a.includes("navigation")&&n.navigation&&(n.navigation.prevEl||i)&&(n.navigation.nextEl||r)&&(d.navigation||d.navigation===!1)&&g&&!g.prevEl&&!g.nextEl&&(x=!0);const k=N=>{!e[N]||(e[N].destroy(),N==="navigation"?(d[N].prevEl=void 0,d[N].nextEl=void 0,e[N].prevEl=void 0,e[N].nextEl=void 0):(d[N].el=void 0,e[N].el=void 0))};l.forEach(N=>{if(Rc(d[N])&&Rc(n[N]))pl(d[N],n[N]);else{const _=n[N];(_===!0||_===!1)&&(N==="navigation"||N==="pagination"||N==="scrollbar")?_===!1&&k(N):d[N]=n[N]}}),l.includes("controller")&&!m&&e.controller&&e.controller.control&&d.controller&&d.controller.control&&(e.controller.control=d.controller.control),a.includes("children")&&t&&w&&d.virtual.enabled?(w.slides=t,w.update(!0)):a.includes("children")&&e.lazy&&e.params.lazy.enabled&&e.lazy.load(),S&&v.init()&&v.update(!0),m&&(e.controller.control=d.controller.control),p&&(c&&(d.pagination.el=c),u.init(),u.render(),u.update()),b&&(o&&(d.scrollbar.el=o),y.init(),y.updateSize(),y.setTranslate()),x&&(r&&(d.navigation.nextEl=r),i&&(d.navigation.prevEl=i),g.init(),g.update()),a.includes("allowSlideNext")&&(e.allowSlideNext=n.allowSlideNext),a.includes("allowSlidePrev")&&(e.allowSlidePrev=n.allowSlidePrev),a.includes("direction")&&e.changeDirection(n.direction,!1),e.update()}function JNe(e,t,n){if(!n)return null;const a=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`};return t.filter((r,i)=>i>=n.from&&i<=n.to).map(r=>R.cloneElement(r,{swiper:e,style:a}))}const KNe=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.lazy&&e.params.lazy.enabled&&e.lazy.load(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function $m(e,t){return typeof window=="undefined"?h.exports.useEffect(e,t):h.exports.useLayoutEffect(e,t)}const XNe=h.exports.createContext(null),e5e=h.exports.createContext(null),Sh=h.exports.forwardRef(function(e,t){let{className:n,tag:a="div",wrapperTag:r="div",children:i,onSwiper:o,...c}=e===void 0?{}:e,l=!1;const[d,u]=h.exports.useState("swiper"),[g,y]=h.exports.useState(null),[w,v]=h.exports.useState(!1),S=h.exports.useRef(!1),m=h.exports.useRef(null),p=h.exports.useRef(null),b=h.exports.useRef(null),x=h.exports.useRef(null),k=h.exports.useRef(null),N=h.exports.useRef(null),_=h.exports.useRef(null),C=h.exports.useRef(null),{params:E,passedParams:T,rest:D,events:P}=WNe(c),{slides:M,slots:O}=ZNe(i),F=()=>{v(!w)};Object.assign(E.on,{_containerClasses(I,B){u(B)}});const z=()=>{if(Object.assign(E.on,P),l=!0,p.current=new xr(E),p.current.loopCreate=()=>{},p.current.loopDestroy=()=>{},E.loop&&(p.current.loopedSlides=xj(M,E)),p.current.virtual&&p.current.params.virtual.enabled){p.current.virtual.slides=M;const I={cache:!1,slides:M,renderExternal:y,renderExternalUpdate:!1};pl(p.current.params.virtual,I),pl(p.current.originalParams.virtual,I)}};m.current||z(),p.current&&p.current.on("_beforeBreakpoint",F);const H=()=>{l||!P||!p.current||Object.keys(P).forEach(I=>{p.current.on(I,P[I])})},A=()=>{!P||!p.current||Object.keys(P).forEach(I=>{p.current.off(I,P[I])})};h.exports.useEffect(()=>()=>{p.current&&p.current.off("_beforeBreakpoint",F)}),h.exports.useEffect(()=>{!S.current&&p.current&&(p.current.emitSlidesClasses(),S.current=!0)}),$m(()=>{if(t&&(t.current=m.current),!!m.current)return p.current.destroyed&&z(),YNe({el:m.current,nextEl:k.current,prevEl:N.current,paginationEl:_.current,scrollbarEl:C.current,swiper:p.current},E),o&&o(p.current),()=>{p.current&&!p.current.destroyed&&p.current.destroy(!0,!1)}},[]),$m(()=>{H();const I=qNe(T,b.current,M,x.current,B=>B.key);return b.current=T,x.current=M,I.length&&p.current&&!p.current.destroyed&&QNe({swiper:p.current,slides:M,passedParams:T,changedParams:I,nextEl:k.current,prevEl:N.current,scrollbarEl:C.current,paginationEl:_.current}),()=>{A()}}),$m(()=>{KNe(p.current)},[g]);function j(){return E.virtual?JNe(p.current,M,g):!E.loop||p.current&&p.current.destroyed?M.map(I=>R.cloneElement(I,{swiper:p.current})):GNe(p.current,M,E)}return s(a,{ref:m,className:bj(`${d}${n?` ${n}`:""}`),...D,children:f(e5e.Provider,{value:p.current,children:[O["container-start"],f(r,{className:"swiper-wrapper",children:[O["wrapper-start"],j(),O["wrapper-end"]]}),pj(E)&&f(Se,{children:[s("div",{ref:N,className:"swiper-button-prev"}),s("div",{ref:k,className:"swiper-button-next"})]}),gj(E)&&s("div",{ref:C,className:"swiper-scrollbar"}),hj(E)&&s("div",{ref:_,className:"swiper-pagination"}),O["container-end"]]})})});Sh.displayName="Swiper";const kh=h.exports.forwardRef(function(e,t){let{tag:n="div",children:a,className:r="",swiper:i,zoom:o,virtualIndex:c,...l}=e===void 0?{}:e;const d=h.exports.useRef(null),[u,g]=h.exports.useState("swiper-slide");function y(S,m,p){m===d.current&&g(p)}$m(()=>{if(t&&(t.current=d.current),!(!d.current||!i)){if(i.destroyed){u!=="swiper-slide"&&g("swiper-slide");return}return i.on("_slideClass",y),()=>{!i||i.off("_slideClass",y)}}}),$m(()=>{i&&d.current&&!i.destroyed&&g(i.getSlideClasses(d.current))},[i]);const w={isActive:u.indexOf("swiper-slide-active")>=0||u.indexOf("swiper-slide-duplicate-active")>=0,isVisible:u.indexOf("swiper-slide-visible")>=0,isDuplicate:u.indexOf("swiper-slide-duplicate")>=0,isPrev:u.indexOf("swiper-slide-prev")>=0||u.indexOf("swiper-slide-duplicate-prev")>=0,isNext:u.indexOf("swiper-slide-next")>=0||u.indexOf("swiper-slide-duplicate-next")>=0},v=()=>typeof a=="function"?a(w):a;return s(n,{ref:d,className:bj(`${u}${r?` ${r}`:""}`),"data-swiper-slide-index":c,...l,children:s(XNe.Provider,{value:w,children:o?s("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof o=="number"?o:void 0,children:v()}):v()})})});kh.displayName="SwiperSlide";const t5e=({data:e})=>{var i;let t=new _e;const[n,a]=h.exports.useState(),r=async()=>{t.setTable("user");const o=await t.getAllUsers();let c=o==null?void 0:o.find(l=>l.id==e.id);a(c)};return h.exports.useEffect(()=>{localStorage.getItem("token")&&r()},[]),f("div",{className:"flex items-start w-[400px] md:text-base text-sm remove-select",children:[s("img",{src:e.is_photo_approved==rn.APPROVED&&(i=e.photo)!=null?i:"/default.png",alt:e.first_name,className:"rounded-full cursor-pointer md:w-[80px] md:h-[80px] w-[60px] h-[60px] object-cover"}),f("div",{className:"px-[12px]",children:[f("h4",{className:"md:text-2xl text-lg font-semibold",children:[e.first_name||s(Ut,{})," ",e.last_name]}),f("div",{className:"flex items-center",children:[s("p",{className:"text-gray-500 mb-[6px]",children:(e==null?void 0:e.city)&&(e==null?void 0:e.city)}),s("p",{className:"text-gray-500 mb-[6px]",children:(e==null?void 0:e.country)&&", "+(e==null?void 0:e.country)})]}),s("div",{className:"flex justify-between items-end lowercase",children:f("p",{className:"flex gap-2 items-center",children:[s(ds,{}),f("span",{children:[(Number(e.avg_host_rating)||0).toFixed(1),typeof(e==null?void 0:e.rating_count)=="number"&&(e==null?void 0:e.rating_count)>0&&f("span",{children:[" ","(",e.rating_count,")"]})]})]})})]})]})};function _j({hosts:e}){const t=h.exports.useRef(null),n=je(),a=i=>{i.scrollLeft+=160},r=i=>{i.scrollLeft+=-160};return f(Se,{children:[e.length==0&&s("p",{className:"text-center flex items-center justify-center normal-case min-h-[200px] max-w-fit",children:s("b",{children:"No Hosts found"})}),s("div",{ref:t,className:"flex justify-between w-full overflow-auto sidebar-holdee",children:e.length>0&&e.map((i,o)=>s("div",{className:"",children:s(t5e,{data:i})},o))}),e.length>3&&window.innerWidth>800&&f("div",{className:"flex items-center pb-2 gap-3 justify-center mx-auto w-full pt-6",children:[s("div",{className:"cursor-pointer",onClick:()=>r(t.current),children:s("button",{type:"button",onClick:()=>n(`/admin/${backTo}`),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:s(cf,{className:"h-6 w-6"})})}),s("div",{className:"cursor-pointer",onClick:()=>a(t.current),children:s("button",{type:"button",onClick:()=>n(`/admin/${backTo}`),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:s(Cee,{className:"h-6 w-6"})})})]})]})}function H5(){const[e,t]=h.exports.useState({}),{state:n,dispatch:a}=h.exports.useContext(we);async function r(){var o,c,l,d,u,g,y,w,v,S,m,p,b,x,k;if(n.isLocationSet){t(n.userLocationData||{});return}const i=on(localStorage.getItem("location"),{});if((i==null?void 0:i.city)||(i==null?void 0:i.country)){t(i);return}try{const _=await(await fetch("https://api.ipregistry.co/?key=tryout")).json();t({city:(o=_.location)==null?void 0:o.city,country:(l=(c=_.location)==null?void 0:c.country)==null?void 0:l.name,done:!0,latitude:(d=_.location)==null?void 0:d.latitude,longitude:(u=_.location)==null?void 0:u.longitude}),localStorage.setItem("location",JSON.stringify({city:(g=_.location)==null?void 0:g.city,country:(w=(y=_.location)==null?void 0:y.country)==null?void 0:w.name,done:!0,latitude:(v=_.location)==null?void 0:v.latitude,longitude:(S=_.location)==null?void 0:S.longitude})),a({type:"SET_USER_CURRENT_LOCATION",payload:{city:(m=_.location)==null?void 0:m.city,country:(b=(p=_.location)==null?void 0:p.country)==null?void 0:b.name,done:!0,latitude:(x=_.location)==null?void 0:x.latitude,longitude:(k=_.location)==null?void 0:k.longitude}})}catch{t({done:!0})}}return h.exports.useEffect(()=>{r()},[]),e}function Ua({control:e,name:t,placeholder:n,labelClassName:a,reset:r,min:i}){const{field:o,fieldState:c,formState:l}=Ii({control:e,name:t}),[d]=lt();return s("div",{className:"w-full",children:f(nw,{className:"lg:relative",children:[s(nw.Button,{className:"flex w-full justify-between focus:outline-none ui-open:text-opacity-90",children:f("div",{className:`flex gap-2 ${a!=null?a:""}`,children:[c.isDirty?s("span",{className:"self-end",type:"button",onClick:u=>{u.stopPropagation(),r(),d.delete(t)},children:"\u2715"}):s(A5,{}),s("span",{className:`${c.isDirty?"":"text-gray-400"}`,children:c.isDirty||d.get(t)?gh(o.value):n})]})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0 translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-150",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-1",afterEnter:o.onBlur,children:s(nw.Panel,{className:"absolute left-1/2 z-10 mt-3 -translate-x-1/2 transform px-4 pb-12 sm:px-0",children:({close:u})=>s("div",{className:"overflow-hidden rounded-lg shadow-lg ring-1 ring-black ring-opacity-5",children:s(vh,{onChange:g=>{o.onChange(g),u()},value:o.value,className:"calendar date-picker",nextLabel:s(_o,{}),prevLabel:s(_h,{}),next2Label:s("div",{className:"h-full w-full cursor-default",onClick:g=>g.stopPropagation()}),prev2Label:s("div",{className:"h-full w-full cursor-default",onClick:g=>g.stopPropagation()}),maxDetail:"month",minDate:i})})})})]})})}function fa({control:e,name:t,containerClassName:n,items:a,labelField:r,valueField:i,placeholder:o,shouldUnregister:c,...l}){var S,m;const{field:d,fieldState:u}=Ii({control:e,name:t,shouldUnregister:c!=null?c:!0}),[g,y]=h.exports.useState(!1),w=a.find(p=>p[i]===(typeof d.value!="number"?d.value:+d.value)),v=a.find(p=>p.type==="1");return s("div",{className:`relative rounded-md focus:outline-none active:outline-none ${n}`,children:f(no,{as:"fragment",value:d.value,onChange:d.onChange,children:[f(no.Button,{className:`flex h-full w-full items-center justify-between ${d.value===""?"text-gray-500":""} ${(S=l.className)!=null?S:""} ${g&&(m=l.openClassName)!=null?m:""}`,children:[s("span",{className:"block truncate",children:w?w[r]:v===void 0?o:v.name}),s("span",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2",children:s(DX,{className:"h-5 w-5 text-gray-400","aria-hidden":"true"})})]}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",afterEnter:d.onBlur,beforeEnter:()=>y(!0),afterLeave:()=>y(!1),children:s(no.Options,{className:"absolute z-50 mt-1 w-full max-h-60 md:max-w-lg overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",children:a.map((p,b)=>s(no.Option,{className:"relative cursor-pointer select-none py-2 pr-4 pl-4 ui-active:bg-amber-100 ui-active:text-amber-900 ui-not-active:text-gray-900",value:p[i],children:p[r]},b))})})]})})}const H0=new _e,om=new AbortController,sv=()=>{var oe,q,te;const{dispatch:t,state:n}=h.exports.useContext(we);h.exports.useContext(Ee);const[a,r]=lt(),[i,o]=h.exports.useState(a.get("category")||"all"),[c,l]=h.exports.useState(Array(5).fill({})),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState([]),[w,v]=h.exports.useState("");An();const{state:S,dispatch:m}=h.exports.useContext(Ee),{dispatch:p}=h.exports.useContext(Ee),[b,x]=h.exports.useState(1e3),[k,N]=h.exports.useState(1e3),_=n.spaceCategories,{handleSubmit:C,control:E,setValue:T,resetField:D,formState:P,register:M}=Oe({defaultValues:{booking_start_time:new Date,location:n.location,size:""}}),{touchedFields:O}=P,{city:F,country:z,done:H}=H5(),[A,j]=h.exports.useState(!1),I=je(),B=localStorage.getItem("role"),Y=!!localStorage.getItem("token");async function U(G){d.every(Q=>Object.keys(Q).length>0)&&u(Q=>{const Z=b-Q.length>12?12:Math.abs(b-Q.length-12);return[...Q,...Array(Z).fill({})]});const J=localStorage.getItem("user"),K=[`${i!="all"?`ergo_spaces.category LIKE '%${i}%'`:"1"} AND ergo_property_spaces.space_status = 1 AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces_images.is_approved = 1 AND ergo_property_spaces.deleted_at IS NULL AND schedule_template_id IS NOT NULL AND (${F&&!A?`ergo_property.city LIKE '%${F}%'`:"1"} OR ${z&&!A?`ergo_property.country LIKE '%${z}%'`:"1"})`];try{const Q=await H0.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:G!=null?G:1,limit:12,user_id:Number(J),where:K},"POST",om.signal);Array.isArray(Q.list)&&(u(Z=>[...Z.filter(se=>Object.keys(se).length>0),...Q.list].filter((se,ce,le)=>le.findIndex(ae=>ae.id===se.id)===ce)),x(Q.total))}catch(Q){if(me(p,Q.message),Q.name=="AbortError")return;t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Q.message}})}}async function W(G){g.every(Q=>Object.keys(Q).length>0)&&y(Q=>{const Z=k-Q.length>12?12:Math.abs(k-Q.length-12);return[...Q,...Array(Z).fill({})]});const J=localStorage.getItem("user"),K=[`${i!="all"?`ergo_spaces.category LIKE '%${i}%'`:"1"} AND ergo_property_spaces.space_status = 1 AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces_images.is_approved = 1 AND schedule_template_id IS NOT NULL AND ergo_property_spaces.deleted_at IS NULL AND (${F&&!A?`ergo_property.city LIKE '%${F}%'`:"1"} OR ${z&&!A?`ergo_property.country LIKE '%${z}%'`:"1"})`];try{const Q=await H0.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:G!=null?G:1,limit:6,user_id:Number(J),where:K,sortId:"update_at",direction:"DESC"},"POST",om==null?void 0:om.signal);Array.isArray(Q.list)&&(y(Z=>[...Z.filter(se=>Object.keys(se).length>0),...Q.list].filter((se,ce,le)=>le.findIndex(ae=>ae.id===se.id)===ce)),N(Q.total))}catch(Q){if(me(p,Q.message),Q.name=="AbortError")return;t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Q.message}})}}async function V(){try{const G=await H0.callRawAPI("/v2/api/custom/ergo/top-hosts/PAGINATE",{page:1,limit:10,sortId:"avg_host_rating",direction:"DESC",where:[`${F&&!A?`ergo_profile.city LIKE '%${F}%'`:"1"} AND ${z&&!A?`ergo_profile.country LIKE '%${z}%'`:"1"}`,"ergo_user.deleted_at IS NULL","ergo_property.id IS NOT NULL"]},"POST",om.signal);l(G.list)}catch(G){if(me(p,G.message),G.name=="AbortError")return;t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:G.message}})}}function X(G){var J,K,Q,Z;I({pathname:"/search",search:Au({location:(J=n.location)!=null?J:"",booking_start_time:O.booking_start_time?G.booking_start_time.toISOString():"",max_capacity:(K=G.max_capacity)!=null?K:"",capacity:(Q=G.capacity)!=null?Q:"",size:(Z=G.size)!=null?Z:""}).toString()})}async function ne(){if(!(!localStorage.getItem("token")||localStorage.getItem("token")!==void 0))try{await H0.setUUId()}catch(G){console.log(G.message)}}return h.exports.useEffect(()=>{let G;return G||ne(),()=>{G=!0}},[]),h.exports.useEffect(()=>{!H||(A||(t({type:"SETLOCATION",payload:{location:(F!=null?F:"")+(F&&z?", ":"")+(z!=null?z:"")}}),T("location",(F!=null?F:"")+(F&&z?", ":"")+(z!=null?z:""))),V())},[H,A]),h.exports.useEffect(()=>{!H||(u([]),y([]),U(),W())},[i,H,A]),h.exports.useEffect(()=>{w&&H&&(u([]),y([]),U(),W())},[w]),f(Se,{children:[f("section",{style:{height:600,background:`url('${(q=(oe=_.find(G=>i==G.category))==null?void 0:oe.image)!=null?q:"/jumbotron1.jpg"}'), linear-gradient(0deg, rgba(16, 24, 40, 0.79), rgba(16, 24, 40, 0.79))`},className:"my-background-image mb-6 pt-[70px] md:rounded-b-[3rem]",children:[s("nav",{className:"mb-[60px] flex justify-center border-b border-t border-gray-500 text-sm text-gray-300 md:mb-[103px] md:text-base",children:f("div",{className:"horizontal-scroll-categories",children:[s("button",{className:`${i=="all"?"active text-white":""} flex w-[105px] items-center justify-center whitespace-nowrap py-[12px]`,onClick:()=>{o("all"),a.set("category","all"),r(a)},children:"All Spaces"},0),_.map(G=>s("button",{className:`${i==G.category?"active text-white":""} flex w-[105px] items-center justify-center whitespace-nowrap py-[12px]`,onClick:()=>{o(G.category),a.set("category",G.category),r(a)},children:G.category},G.id)),s("div",{className:"mover"})]})}),s("h1",{className:"mb-[30px] px-4 text-center text-5xl font-bold text-white md:text-6xl lg:text-7xl",children:"Spaces tailored to your needs"}),f("form",{className:"fourteenth-step flex flex-wrap justify-center px-6 text-sm md:px-24 md:text-base lg:flex-nowrap",id:"search-bar",onSubmit:C(X),autoComplete:"off",children:[s(dN,{setValue:G=>t({type:"SETLOCATION",payload:{location:G}}),type:"static",containerClassName:"flex h-[40px] w-full items-center gap-2 rounded-t-md border-2 border-r-0 bg-white px-4 py-2 md:h-[unset] lg:max-w-[331px] lg:rounded-none lg:py-0",className:"border-0 focus:outline-none",placeholder:"Search by city or zip code",onClear:()=>j(!0),suggestionType:["(regions)"]}),s("div",{className:"flex min-h-[40px] w-1/2 items-center gap-2 rounded-bl-md border-l-2 bg-white px-2 lg:min-w-[230px] lg:max-w-[230px] lg:rounded-none",children:s(Ua,{reset:()=>D("booking_start_time"),setValue:G=>T("booking_start_time",G),control:E,name:"booking_start_time",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"Select Date",min:new Date})}),f("div",{className:"flex w-1/2 items-center gap-2 rounded-br-md border-l bg-white px-2 lg:max-w-[174px] lg:rounded-none lg:border-2",children:[s(F_e,{}),s("input",{type:"number",placeholder:i=="Parking"?"Number of spaces":"2 People",className:"remove-arrow w-full focus:outline-none",...M("max_capacity")})]}),((te=_.find(G=>i==G.category))==null?void 0:te.has_sizes)==1&&s("div",{className:"flex w-1/2 items-center gap-2 rounded-br-md !border-l-0 bg-white px-2 lg:max-w-[174px] lg:rounded-none lg:border-2",children:s(fa,{items:[{label:"All Sizes",value:""},{label:"Small",value:0},{label:"Medium",value:1},{label:"Large",value:2},{label:"X-Large",value:3}],labelField:"label",valueField:"value",containerClassName:"h-full flex-grow",placeholder:"All sizes",control:E,name:"size",optionsClassName:"mt-3 w-[150%] -left-1/3 -right-1/3 normal-case"})}),f("button",{type:"submit",className:"login-btn-gradient login-btn-gradient mt-4 flex w-full items-center justify-center gap-2 rounded-bl rounded-br rounded-tl rounded-tr px-6 py-3 tracking-wide text-white outline-none focus:outline-none lg:mt-0 lg:w-[unset] lg:rounded-bl-none lg:rounded-tl-none",id:"search-button",children:[s(OM,{}),s("span",{children:"Search"})]})]})]}),f("div",{className:"mb-[48px] w-full",children:[s("h2",{className:"mb-[5px] px-4 text-center text-3xl font-bold normal-case md:text-4xl",children:"Top-quality spaces and customer service"}),s("h5",{className:"text-md mb-[8px] px-4 text-center font-normal normal-case md:text-2xl",children:"Your number one stop for renting and offering space(s) for work and leisure"}),s("div",{className:"mx-auto mt-10 flex max-w-max justify-center",children:s("div",{className:"justify-even grid w-full w-full grid-cols-2 items-center gap-[15px] text-xl text-gray-300 md:grid-cols-4",children:_.map((G,J)=>s("div",{className:"block w-full",children:f("span",{className:"flex items-center gap-2 rounded-full py-1 text-black",children:[s("img",{src:G.icon,className:"h-5 w-5 object-cover"}),G.category]})},G.id))})})]}),f("section",{className:"container mx-auto px-6 pt-[40px] 2xl:px-16",children:[f("div",{className:"mb-[26px] flex items-center justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:[s("h3",{className:"text-3xl font-bold",children:"Popular"}),s($e,{to:"/explore?section=popular",className:"my-text-gradient text-sm font-semibold tracking-wider",id:"view-all-popular",children:"VIEW ALL POPULAR"})]}),d.length<1&&s("p",{className:"flex min-h-[400px] items-center justify-center text-center normal-case",children:s("b",{children:"No Spaces found"})}),s(Pc,{dataLength:d.length,next:()=>{console.log("calling next",d.length/12+1),U(Math.round(d.length/12+1))},scrollThreshold:.5,hasMore:d.length<b,loader:s(Se,{}),endMessage:s(Se,{}),children:f("div",{className:"property-space-grid pb-[100px]",children:[d.slice(0,6).map((G,J)=>{var K;return s(Cp,{data:G,forceRender:v},(K=G.id)!=null?K:J)}),d.length<4?f(Se,{children:[s("div",{className:"hidden 2xl:block"}),s("div",{className:"hidden lg:block"}),s("div",{className:"hidden md:block"})]}):null]})})]}),f("section",{className:"container mx-auto px-6 pb-[80px] normal-case md:pb-[140px] md:pt-[40px] 2xl:px-16",children:[f("div",{className:"mb-[26px] flex items-center justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:[s("h3",{className:"text-3xl font-bold",children:"Browse By Category"}),s($e,{to:"/explore?category=&section=popular&price_range=&space_name=&location=&from=&to=",className:"my-text-gradient text-sm font-semibold tracking-wider",id:"view-all-popular",children:"VIEW ALL CATEGORIES"})]}),s("div",{className:"md:browse-grid flex w-full flex-wrap justify-between gap-4",children:_.slice(0,_.length-4).map((G,J)=>f($e,{to:`/explore?category=${G.category}&section=popular`,className:"flex-cols md:max-w- flex w-full w-full grow rounded-[6px] border border-[#EAECF0] bg-[#F9FAFB]",children:[s("img",{src:G.image,alt:G.category,className:"h-24 w-full rounded-lg object-cover md:h-40"}),s("p",{className:"text-lg w-full px-5 py-3 text-right font-semibold",children:G.category})]},G.id))})]}),f("section",{className:"container mx-auto px-6 py-[64px] 2xl:px-16",children:[f("div",{className:"mb-[26px] flex items-center justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:[s("h3",{className:"text-2xl font-bold md:text-3xl",children:"Top rated hosts"}),s($e,{to:"/explore?section=hosts",className:"my-text-gradient text-sm font-semibold tracking-wider md:text-base",id:"view-all-hosts",children:"VIEW ALL HOSTS"})]}),s(_j,{hosts:c})]}),f("section",{className:"container mx-auto px-6 pt-[40px] 2xl:px-16",children:[f("div",{className:"mb-[26px] flex items-center justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:[s("h3",{className:"text-2xl font-bold md:text-3xl",children:"New Spaces"}),s($e,{to:"/explore?section=new-spaces",className:"my-text-gradient text-sm font-semibold tracking-wider md:text-base",id:"view-all-new-spaces",children:"VIEW ALL NEW SPACES"})]}),g.length==0&&s("p",{className:"flex min-h-[400px] items-center justify-center text-center normal-case",children:s("b",{children:"No Spaces found"})}),s(Pc,{dataLength:g.length,next:()=>{W(Math.round(g.length/12+1))},scrollThreshold:.9,hasMore:g.length<k,loader:s(Se,{}),endMessage:s("p",{className:"text-center normal-case",children:s("b",{})}),children:f("div",{className:"property-space-grid pb-[100px]",children:[g.slice(0,6).map((G,J)=>{var K;return s(Cp,{data:G,forceRender:v},(K=G.id)!=null?K:J)}),g.length<4?f(Se,{children:[s("div",{className:"hidden 2xl:block"}),s("div",{className:"hidden lg:block"}),s("div",{className:"hidden md:block"})]}):null]})})]}),(!Y||B==="customer")&&f("section",{className:"container mx-auto mb-12 items-center justify-between rounded-xl bg-gray-100 px-6 py-20 md:flex md:flex-nowrap 2xl:px-16",children:[f("div",{className:"mt-8 w-full md:mt-0 md:w-[25%]",children:[s("h3",{className:"pb-3 text-xl font-bold leading-10 md:text-4xl",children:"Host Your Space Today!"}),s("p",{className:"my-4 text-left text-base",children:"Unlock new income opportunities by listing your space on our platform. Join a community of successful hosts, reach thousands of potential guests, and maximize your property's potential."}),s("button",{onClick:()=>S.originalRole==="customer"?I("/become-a-host"):I("/signup"),className:"login-btn-gradient mb-4 rounded-3xl px-4 py-3 text-sm text-white",children:"Start Hosting Now"})]}),s("div",{className:"hidden w-full justify-between md:flex md:w-1/2",children:s("img",{src:"https://freepngimg.com/thumb/building/154733-building-hotel-download-hq.png",alt:"Descriptive Alt Text",className:"h-auto w-full rounded-lg object-cover md:w-[70%]"})})]}),s(bc,{anchorId:"search-button",place:"right",content:"Search",noArrow:!0}),s(bc,{anchorId:"view-all-popular",place:"bottom",content:"All popular",noArrow:!0}),s(bc,{anchorId:"view-all-hosts",place:"bottom",content:"All hosts",noArrow:!0}),s(bc,{anchorId:"view-all-new-spaces",place:"bottom",content:"New spaces",noArrow:!0})]})},i8=({data:e})=>{const[t,n]=h.exports.useState(!1);return f("div",{className:"mb-8 overflow-hidden",children:[s("div",{className:"mb-5 bg-[#F0F5F3] p-2 px-5 cursor-pointer rounded-xl overflow-hidden",onClick:()=>n(a=>!a),children:f("div",{className:"flex justify-between items-center",children:[s("h1",{children:e.question}),f("button",{className:"text-4xl",children:[t?s("span",{children:"\u2212"}):s("span",{children:"+"})," "]})]})}),s(ke,{as:h.exports.Fragment,show:t,enter:"transition-all ease duration-500 overflow-hidden",enterFrom:"max-h-0",enterTo:"max-h-[400px]",leave:"transition-all ease duration-500 overflow-hidden",leaveFrom:"max-h-[400px]",leaveTo:"max-h-0",children:s("p",{className:"sun-editor-editable pl-4 z-50",dangerouslySetInnerHTML:{__html:e.answer}})})]})},iv=()=>{const[e,t]=lt(),[n,a]=h.exports.useState([]),{dispatch:r}=h.exports.useContext(we);async function i(){r({type:"START_LOADING"});try{const o=await _t("faq","post",{page:1,limit:1e3,where:["1"]},"PAGINATE");Array.isArray(o.list)&&a(o.list)}catch(o){r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:o.message}})}r({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{i()},[]),f(Se,{children:[s("section",{className:"bg-black pb-[80px] pt-[170px] md:pt-[120px]",children:s("h1",{className:"text-center text-4xl font-semibold text-white md:text-7xl",children:"Frequently asked questions"})}),f("section",{className:"container mx-auto min-h-screen px-4 pt-[40px] pb-[140px] normal-case 2xl:px-16",children:[s("p",{className:"px-4 md:px-0",children:"Below are some common questions people ask."}),f(On.Group,{as:"div",className:"mt-8",onChange:o=>{t({tab:o==0?"customers":"hosts"}),window.scrollTo({top:0,left:0})},defaultIndex:localStorage.getItem("role")=="host"||e.get("tab")=="hosts"?1:0,children:[f(On.List,{className:"two-tab-menu small mb-4",children:[s(On,{className:"px-5 py-3 text-xl text-gray-700 focus:outline-none ui-selected:text-black",children:"For guests"}),s(On,{className:"px-5 py-3 text-xl text-gray-700 focus:outline-none ui-selected:text-black",children:"For hosts"}),s("div",{className:"mover"})]}),f(On.Panels,{children:[s(On.Panel,{as:"section",children:n.filter(o=>o.status!=1).map(o=>s(i8,{data:o},o.id))}),s(On.Panel,{as:"section",children:n.filter(o=>o.status==1).map(o=>s(i8,{data:o},o.id))})]})]}),f("p",{children:["If you can\u2019t find your answers we\u2019re here to help. ",s("br",{})]}),s($e,{to:"/contact-us",className:"underline",children:"Contact us"})]})]})};function As({options:e,accessor:t,name:n,register:a,setValue:r,formMode:i,valueAccessor:o,defaultValue:c,className:l,optionsClassName:d,defaultOptionClassName:u,onChange:g,initialEditValue:y,buttonClassName:w,listOptionClassName:v,noSelectedHighlight:S,hideIcon:m}){const[p,b]=h.exports.useState(c!=null?c:e[0]);return h.exports.useEffect(()=>{i&&(p==c?r(n,""):r(n,o?p[o]:p))},[p]),h.exports.useEffect(()=>{i&&c&&r(n,"")},[]),h.exports.useEffect(()=>{y&&b(y)},[JSON.stringify(y)]),s("div",{className:`border p-2 rounded-md focus:outline-none active:outline-none ${l}`,children:f(no,{value:p,onChange:x=>{b(x),g&&g(o?x[o]:x)},children:[i&&s("input",{...a(n),type:"hidden"}),f("div",{className:"relative mt-1",children:[f(no.Button,{className:`flex items-center justify-between w-full ${t&&JSON.stringify(p)==JSON.stringify(c)||t==c?u:""}`,children:[s("span",{className:`block truncate ${w!=null?w:""}`,children:t?p[t]:p}),s("span",{className:`${m?"hidden":"inline"} pointer-events-none flex items-center pr-2`,children:s(_o,{})})," "]}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:f(no.Options,{className:`absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm ${d} z-50 tiny-scroll`,children:[c&&s(no.Option,{className:({active:x})=>`relative cursor-default select-none py-2 pr-4 ${x?"bg-amber-100 text-amber-900":"text-gray-900"} ${v!=null?v:"pl-10"}`,value:c,children:({selected:x})=>f(Se,{children:[s("span",{className:`block truncate ${x?"font-medium":"font-normal"}`,children:t?c[t]:c}),x&&!S?s("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-amber-600",children:"\u2713"}):null]})}),e.map((x,k)=>s(no.Option,{className:({active:N})=>`relative cursor-default select-none py-2 ${v!=null?v:"pl-10"} pr-4 ${N?"bg-amber-100 text-amber-900":"text-gray-900"}`,value:x,children:({selected:N})=>f(Se,{children:[s("span",{className:`block truncate ${N?"font-medium":"font-normal"}`,children:t?x[t]:x}),N&&!S?s("span",{className:"absolute inset-y-0 left-0 flex items-center pl-3 text-amber-600",children:"\u2713"}):null]})},k))]})})]})]})})}const lm=()=>{const{handleSubmit:e,register:t,reset:n,setValue:a}=Oe();let r=new _e;const{dispatch:i}=h.exports.useContext(we);return f(Se,{children:[s("section",{className:"bg-black pb-[80px] md:pt-[120px] pt-[170px]",children:s("h1",{className:"text-white md:text-7xl text-4xl font-semibold text-center",children:"Contact Us"})}),f("section",{className:"pt-[40px] container mx-auto 2xl:px-16 pb-[140px] normal-case",children:[s("p",{className:"md:px-0 px-4 pb-8",children:"We are here to help. Copy to be provided"}),f("div",{className:"flex md:flex-row flex-col justify-between px-16 items-end mb-24",children:[f("div",{className:"mb-4",children:[s("small",{className:"font-semibold text-2xl",children:"FAQs - Frequently Asked Questions"}),s("h3",{className:"text-xs",children:"Read most common questions others have."})]}),s($e,{to:"/faq",className:"px-6 py-2 md:w-[178px] w-full text-center rounded-md border border-[#33D4B7] my-text-gradient whitespace-nowrap",children:"Visit FAQs"})]}),s("p",{className:"mb-16 px-4 md:px-0",children:"Feel free to reach out to our team. We usually reply within 24 hours."}),f("div",{className:"flex items-center justify-center flex-wrap",children:[f("form",{className:"flex flex-col gap-8 md:w-1/2 w-full p-8",onSubmit:e(async c=>{var l,d,u;console.log("submitting",c),i({type:"START_LOADING"});try{const g=await r.getEmailTemplate("contact"),y=(u=(d=(l=g.html)==null?void 0:l.replace(new RegExp("{{{name}}}","g"),c.name))==null?void 0:d.replace(new RegExp("{{{email}}}","g"),c.email))==null?void 0:u.replace(new RegExp("{{{message}}}","g"),c.message);await r.sendEmail(c.email,g.subject,y),i({type:"SHOW_CONFIRMATION",payload:{heading:"Email Sent",message:"Email has been sent, we will get back to you shortly",btn:"Ok got it"}})}catch(g){pe(i,g.message,4e3,"ERROR")}n(),i({type:"STOP_LOADING"})}),children:[s("input",{autoComplete:"off",type:"text",placeholder:"Name",className:"resize-none border p-2 focus:outline-none",...t("name")}),s("input",{autoComplete:"off",type:"text",placeholder:"Email",className:"resize-none border p-2 focus:outline-none",...t("email")}),s(As,{options:["Inquiry","Complaint","General"],name:"type",register:t,setValue:a,formMode:!0,className:"min-w-[200px]"}),s("textarea",{name:"",id:"",cols:"30",rows:"5",placeholder:"Message",className:"border p-2 focus:outline-none resize-none",...t("message")}),s("button",{type:"submit",className:"!bg-gradient-to-r from-[#33D4B7] to-[#0D9895] text-white w-40 self-end tracking-wide outline-none focus:outline-none rounded py-2",children:"Submit"})]}),s("div",{className:"md:pl-32 md:w-1/2 w-full",children:s("img",{src:"/contact.png",alt:""})})]})]})]})},Za=({width:e})=>s("svg",{width:e!=null?e:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M9.99935 13.3337V10.0003M9.99935 6.66699H10.0077M18.3327 10.0003C18.3327 14.6027 14.6017 18.3337 9.99935 18.3337C5.39698 18.3337 1.66602 14.6027 1.66602 10.0003C1.66602 5.39795 5.39698 1.66699 9.99935 1.66699C14.6017 1.66699 18.3327 5.39795 18.3327 10.0003Z",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function Ci({type:e,control:t,name:n,setValue:a,onClear:r,className:i,containerClassName:o,hideIcons:c,suggestionType:l,...d}){var v,S;const{field:u}=Ii({control:t,name:n}),{placePredictions:g,getPlacePredictions:y,isPlacePredictionsLoading:w}=lN({apiKey:"AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70",options:{types:l!=null?l:["(region)"]},debounce:200});return f(Rn,{as:"div",className:`relative w-full normal-case z-100 ${o!=null?o:""}`,value:typeof u.value=="object"?u.value:(v=u.value)==null?void 0:v.replace(", undefined",""),children:[!c&&s(cN,{}),s(Rn.Input,{...d,autoComplete:"off",className:`w-full truncate text-black ${i!=null?i:""}`,onBlur:u.onBlur,value:typeof u.value=="object"?u.value:(S=u.value)==null?void 0:S.replace(", undefined",""),onChange:m=>{u.onChange(m),y({input:m.target.value})}}),!c&&u.value&&s("button",{type:"button",onClick:()=>{a(""),r&&r()},children:"\u2715"}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:w?s("div",{className:"absolute left-0 right-0 top-full z-50 mt-2 flex w-full origin-top justify-center rounded-xl border bg-white py-8",children:s("svg",{style:{margin:"auto",background:"none",display:"block",shapeRendering:"auto"},width:"36px",height:"36px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"10",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(1)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.6666666666666667s",keyTimes:"0;1",values:"0;256.58892822265625"})})})}):s(Rn.Options,{className:`${g.length>0?"py-2 shadow-lg ring-1":""} absolute left-0 right-0 top-full z-50 mt-2 w-full origin-top cursor-pointer divide-y divide-gray-100 rounded-xl bg-white ring-black ring-opacity-5 focus:outline-none`,children:g.map((m,p)=>{var b,x,k;return s(Rn.Option,{className:"flex w-full items-center truncate rounded-pill px-3 py-3 pr-5 text-sm ui-active:bg-gray-100 ui-active:text-black ui-not-active:text-gray-800",value:m.structured_formatting.main_text,onClick:()=>{var N;return a((m==null?void 0:m.structured_formatting.main_text)+", "+((N=m.structured_formatting)==null?void 0:N.secondary_text))},children:s("span",{children:`${m.structured_formatting.main_text} ${(b=m.structured_formatting)!=null&&b.secondary_text?",":""} ${(x=m.structured_formatting)!=null&&x.secondary_text?(k=m.structured_formatting)==null?void 0:k.secondary_text:""}`})},p)})})})]})}const n5e=[{label:"All Prices",value:""},{label:"$0 - $30",value:"$0 - $30"},{label:"$31 - $60",value:"$31 - $60"},{label:"$60 - $90",value:"$60 - $90"},{label:"$90 - $120",value:"$90 - $120"},{label:"$120 - $150",value:"$120 - $150"},{label:"$150 - $180",value:"$150 - $180"}];function Nj({modalOpen:e,closeModal:t}){const[n,a]=lt(),{state:r}=h.exports.useContext(we),{handleSubmit:i,register:o,watch:c,reset:l,setValue:d,control:u,formState:g,resetField:y}=Oe({defaultValues:(()=>{var p,b,x,k,N,_;const m=Ue(n);return{location:(p=m.location)!=null?p:"",from:En((b=m.from)!=null?b:"")?new Date(m.from):new Date,to:En((x=m.to)!=null?x:"")?new Date(m.to):new Date,space_name:(k=m.space_name)!=null?k:"",category:(N=m.category)!=null?N:"",price_range:(_=m.price_range)!=null?_:"",direction:"DESC"}})()}),{dirtyFields:w}=g,v=c("from"),S=async m=>{console.log("submitting ",m),n.set("category",m.category),n.set("price_range",m.price_range),n.set("space_name",m.space_name),n.set("location",m.location),n.set("from",w!=null&&w.from?m.from.toISOString():""),n.set("to",w!=null&&w.to?m.to.toISOString():""),a(n),t()};return s(ke,{appear:!0,show:e&&window.innerWidth<700,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"tiny-scroll max-h-fit w-full max-w-md transform overflow-hidden overflow-y-auto rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:i(S),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[f("div",{className:"flex gap-4",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Filters"}),s("button",{type:"button",className:"text-sm text-gray-800 underline",onClick:()=>l({location:"",from:new Date,to:new Date,space_name:"",category:"",price_range:"",direction:"DESC"},{keepDirty:!1}),children:"Clear"})]}),s("button",{type:"button",onClick:t,className:"text-lg rounded-full border p-1 px-3 font-normal duration-300 hover:bg-gray-200 md:text-2xl",children:"\u2715"})," "]}),s("hr",{className:"my-[10px]"}),f("div",{className:"space-y-6",children:[f("select",{className:"w-full cursor-pointer border bg-white py-2 px-3 focus:outline-none",...o("category"),children:[s("option",{value:"",children:"All Categories"}),r.spaceCategories.map(m=>s("option",{value:m.category,children:m.category},m.id))]}),f("select",{className:"w-full cursor-pointer border bg-white py-2 px-3 focus:outline-none",...o("price_range"),children:[s("option",{value:"",children:"All Prices"}),n5e.map(m=>s("option",{value:m.value,children:m.label},m.value))]}),s(Ci,{control:u,setValue:m=>d("location",m),name:"location",className:"w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",placeholder:"Location",hideIcons:!0}),f("div",{className:"my-[16px] flex gap-2",children:[s("div",{className:"flex w-1/2 items-center gap-2 whitespace-nowrap rounded-md border bg-white p-2",children:s(Ua,{reset:()=>y("from",{keepDirty:!1,keepTouched:!1}),setValue:m=>d("from",m,{shouldDirty:!0}),control:u,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date})}),s("div",{className:"flex w-1/2 items-center gap-2 rounded-md border bg-white p-2",children:s(Ua,{reset:()=>y("to",{keepDirty:!1,keepTouched:!1}),setValue:m=>d("to",m,{shouldDirty:!0}),control:u,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:v})})]}),s("input",{type:"text",placeholder:"Space name",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...o("space_name")})]}),s("button",{type:"submit",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",children:"Apply and close"})]})})})})]})})}const a5e=[{label:"All Prices",value:""},{label:"$0 - $30",value:"$0 - $30"},{label:"$31 - $60",value:"$31 - $60"},{label:"$60 - $90",value:"$60 - $90"},{label:"$90 - $120",value:"$90 - $120"},{label:"$120 - $150",value:"$120 - $150"},{label:"$150 - $180",value:"$150 - $180"}],ov=new _e,lv=()=>{var U;const[t,n]=lt(),a=(U=t.get("section"))!=null?U:"all",[r,i]=h.exports.useState([]),[o,c]=h.exports.useState([]),[l,d]=h.exports.useState([]),[u,g]=h.exports.useState(!1),[y,w]=h.exports.useState(""),{dispatch:v,state:S}=h.exports.useContext(we),{dispatch:m}=h.exports.useContext(Ee),[p]=h.exports.useState(new AbortController),{handleSubmit:b,register:x,watch:k,reset:N,setValue:_,control:C,formState:E,resetField:T}=Oe({defaultValues:(()=>{var V,X,ne,oe,q,te;const W=Ue(t);return{location:(V=W.location)!=null?V:"",from:En((X=W.from)!=null?X:"")?new Date(W.from):new Date,to:En((ne=W.to)!=null?ne:"")?new Date(W.to):new Date,space_name:(oe=W.space_name)!=null?oe:"",category:(q=W.category)!=null?q:"",price_range:(te=W.price_range)!=null?te:"",direction:"DESC"}})()}),{dirtyFields:D}=E,P=k("direction"),M=k("from"),[O,F]=h.exports.useState(1e4),[z,H]=h.exports.useState(1e4);async function A(W){var J;c([]),c(K=>{const Q=O-K.length>12?12:Math.abs(O-K.length-12);return[...K,...Array(Q).fill({})]});const V=Ue(t),X=localStorage.getItem("user"),ne=(J=V.location)==null?void 0:J.split(",");var oe,q;if(V.price_range){var te=V.price_range.split("-");te.length>1&&(oe=te[0].trim().slice(1),q=te[1].trim().slice(1))}let G=[`ergo_property_spaces.space_status = ${wo.APPROVED} AND ergo_property_spaces_images.is_approved = 1 AND schedule_template_id IS NOT NULL AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces.deleted_at IS NULL`];V.category&&G.push(`ergo_spaces.category = '${V.category}'`),V.space_name&&G.push(`ergo_property.name LIKE '%${V.space_name}%'`),V.price_range&&G.push(`ergo_property_spaces.rate BETWEEN ${oe} AND ${q}`),V.location&&G.push(`(ergo_property.address_line_1 LIKE '%${V.location}%' OR ergo_property.address_line_2 LIKE '%${V.location}%' OR ergo_property.city LIKE '%${ne[0]}%' OR ergo_property.country LIKE '%${ne.length===1?ne[0]:ne.length===2?ne[1]:ne[2]}%' OR ergo_property.zip LIKE '%${V.location}%' OR ergo_property.name LIKE '%${V.location}%')`);try{const K=await ov.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:W!=null?W:1,limit:12,user_id:Number(X),where:G,booking_start_time:En(V.from||"")?new Date(V.from).toISOString():void 0,booking_end_time:En(V.to||"")?new Date(V.to).toISOString():void 0,sortId:P=="NONE"?void 0:"id",direction:P=="NONE"?void 0:P},"POST",p.signal);Array.isArray(K.list)&&(c(Q=>[...Q.filter(Z=>Object.keys(Z).length>0),...K.list].filter((Z,se,ce)=>ce.findIndex(le=>le.id===Z.id)===se)),F(K.total))}catch(K){if(me(m,K.message),K.name=="AbortError")return;v({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:K.message}})}}async function j(W){var G;d([]),d(J=>{const K=z-J.length>12?12:Math.abs(z-J.length-12);return[...J,...Array(K).fill({})]});const V=Ue(t),X=localStorage.getItem("user");var ne,oe;if(V.price_range){var q=V.price_range.split("-");q.length>1&&(ne=q[0].trim().slice(1),oe=q[1].trim().slice(1))}let te=[`ergo_property_spaces.space_status = ${wo.APPROVED} AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces.availability = ${Ti.VISIBLE} AND ergo_property_spaces_images.is_approved = 1`];V.category&&te.push(`ergo_spaces.category = '${V.category}'`),V.space_name&&te.push(`ergo_property.name LIKE '%${V.space_name}%'`),V.price_range&&te.push(`ergo_property_spaces.rate BETWEEN ${ne} AND ${oe}`),V.location&&te.push(`(ergo_property.address_line_1 LIKE '%${location}%' OR ergo_property.address_line_2 LIKE '%${location}%' OR ergo_property.city LIKE '%${(G=location[0])!=null?G:""}%' OR ergo_property.country LIKE '%${location.length===1?location[0]:location.length===2?location[1]:location[2]}%' OR ergo_property.zip LIKE '%${location}%' OR ergo_property.name LIKE '%${location}%')`);try{const J=await ov.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:W!=null?W:1,limit:12,user_id:Number(X),where:te,sortId:"update_at",direction:"DESC",booking_start_time:En(V.from||"")?new Date(V.from).toISOString():void 0,booking_end_time:En(V.to||"")?new Date(V.to).toISOString():void 0},"POST",p.signal);Array.isArray(J.list)&&(d(K=>[...K.filter(Q=>Object.keys(Q).length>0),...J.list].filter((Q,Z,se)=>se.findIndex(ce=>ce.id===Q.id)===Z)),H(J.total))}catch(J){if(me(m,J.message),J.name=="AbortError")return;v({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:J.message}})}}async function I(){var te,G;Ue(t);const W=Ue(t),V=(G=(te=W.location)==null?void 0:te.replace(", undefined",""))==null?void 0:G.split(",");localStorage.getItem("user");var X,ne;if(W.price_range){var oe=W.price_range.split("-");oe.length>1&&(X=oe[0].trim().slice(1),ne=oe[1].trim().slice(1))}let q=[];q.push("ergo_property.id IS NOT NULL"),W.category&&q.push(`ergo_spaces.category = '${W.category}'`),W.space_name&&q.push(`ergo_property.name LIKE '%${W.space_name}%'`),W.from&&q.push(`ergo_user.create_at BETWEEN '${W.from}' AND '${W.to}'`),W.price_range&&q.push(`ergo_property_spaces.rate BETWEEN ${X} AND ${ne}`),W.location&&q.push([`(ergo_profile.address_line_1 LIKE '%${W.location}%' OR ergo_profile.address_line_2 LIKE '%${W.location}%' OR ergo_profile.city LIKE '%${V[0]}%' OR ergo_profile.country LIKE '%${V[1]}%' OR ergo_profile.zip LIKE '%${W.location}%')`]);try{const J=await ov.callRawAPI("/v2/api/custom/ergo/top-hosts/PAGINATE",{page:1,limit:1e3,sortId:"avg_host_rating",direction:"DESC",where:q,booking_start_time:En(W.from||"")?new Date(W.from).toISOString():void 0,booking_end_time:En(W.to||"")?new Date(W.to).toISOString():void 0},"POST",p.signal);i(J.list)}catch(J){if(me(m,J.message),J.name=="AbortError")return;v({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:J.message}})}}h.exports.useEffect(()=>{switch(t.get("section")){case"popular":A();break;case"hosts":I();break;case"new-spaces":j();break;default:I(),A(),j()}},[t]),h.exports.useEffect(()=>{y&&(c([]),d([]),A(),j())},[y]),h.exports.useEffect(()=>()=>{},[]);const B=async W=>{if(window.innerWidth<700&&g(!1),W.location.includes("undefined")){const X=inputString.split(",")[0].trim();W.location=X}t.set("category",W.category),t.set("price_range",W.price_range),t.set("space_name",W.space_name),t.set("location",W.location),t.set("from",D!=null&&D.from?W.from.toISOString():""),t.set("to",D!=null&&D.to?W.to.toISOString():""),n(t)},Y=(W,V)=>P=="NONE"?0:P=="DESC"?new Date(V.id)-new Date(W.id):new Date(W.id)-new Date(V.id);return f("div",{className:"min-h-screen",children:[s("section",{className:"container mx-auto bg-white px-6 pt-[120px] normal-case 2xl:px-16",children:f("form",{onSubmit:b(B),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>g(W=>!W),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:C,name:"direction"})]}),f("div",{className:` ${u?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s(fa,{items:[{label:"All Categories",value:""},...S.spaceCategories.map(W=>({label:W.category,value:W.category}))],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All Categories",control:C,name:"category"}),s(fa,{items:a5e,labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All Prices",control:C,name:"price_range"}),s(Ci,{control:C,setValue:W=>_("location",W),name:"location",className:"rounded border py-3 px-3 leading-tight text-gray-700 focus:outline-none",containerClassName:"w-[unset] flex-gro max-w-xs",placeholder:"Location",suggestionType:["(regions)"],hideIcons:!0}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>T("from",{keepDirty:!1,keepTouched:!1}),setValue:W=>_("from",W,{shouldDirty:!0}),control:C,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From"})}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>T("to",{keepDirty:!1,keepTouched:!1}),setValue:W=>_("to",W,{shouldDirty:!0}),control:C,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:M})}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...x("space_name")}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),(a=="popular"||a=="all")&&f("section",{className:"container mx-auto pt-[40px] 2xl:px-16",id:"popular",children:[s("div",{className:"mb-[26px] flex items-end justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:s("h3",{className:"text-3xl font-bold",children:t.get("category")||"Popular spaces"})}),o.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," No spaces found"]})}),s(Pc,{dataLength:o.length,next:()=>{A(Math.round(o.length/12+1))},scrollThreshold:1,hasMore:o.length<O,loader:s(Se,{}),endMessage:s("p",{className:"text-center normal-case",children:s("b",{})}),children:f("div",{className:"property-space-grid pb-[100px]",children:[o.sort(Y).map((W,V)=>{var X;return s(Cp,{data:W,forceRender:w},(X=W.id)!=null?X:V)}),o.length<4?f(Se,{children:[s("div",{className:"hidden 2xl:block"}),s("div",{className:"hidden lg:block"}),s("div",{className:"hidden md:block"})]}):null]})})]}),a=="all"&&f("section",{className:"container mx-auto flex flex-wrap pt-[40px] pb-[40px] md:pb-[140px] 2xl:px-16",children:[s("div",{className:"px-6 md:w-2/5 md:px-0",children:s("h3",{className:"mb-[70px] text-[30px] font-semibold md:text-center",children:"Browse By Category"})}),s("div",{className:"browse-grid md:w-3/5",children:S.spaceCategories.map((W,V)=>f("button",{className:"",onClick:()=>{c(Array(12).fill({})),N(),window.scrollTo({top:0,left:0}),t.set("category",W.category),t.set("section","popular"),t.delete("price_range"),t.delete("space_name"),n(t)},children:[s("img",{src:W.image,alt:W.category,className:"h-24 w-full rounded-lg object-cover md:h-40"}),s("p",{className:"text-lg py-3 px-5 text-left font-semibold",children:W.category})]},W.id))})]}),(a=="hosts"||a=="all")&&f("section",{className:"container mx-auto pt-[12px] pb-[64px] 2xl:px-16",id:"hosts",children:[s("div",{className:"mb-[26px] flex items-end justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:s("h3",{className:"text-3xl font-bold",children:"Top rated hosts"})}),s("div",{className:"px-2 md:px-0",children:s(_j,{hosts:r})})]}),(a=="new-spaces"||a=="all")&&f("section",{className:"container mx-auto pt-[40px] 2xl:px-16",id:"new-spaces",children:[s("div",{className:"mb-[26px] flex items-end justify-between border-b border-gray-300 px-6 pb-[12px] md:px-0",children:s("h3",{className:"text-3xl font-bold",children:"New Spaces"})}),l.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," No spaces found"]})}),s(Pc,{dataLength:l.length,next:()=>{j(Math.round(l.length/12+1))},scrollThreshold:1,hasMore:l.length<z,loader:s(Se,{}),endMessage:s("p",{className:"text-center normal-case",children:s("b",{})}),children:f("div",{className:"property-space-grid pb-[100px]",children:[l.sort(Y).map((W,V)=>{var X;return s(Cp,{data:W,forceRender:w},(X=W.id)!=null?X:V)}),l.length<4?f(Se,{children:[s("div",{className:"hidden 2xl:block"}),s("div",{className:"hidden lg:block"}),s("div",{className:"hidden md:block"})]}):null]})})]}),s(Nj,{modalOpen:u,closeModal:()=>g(!1)})]})};function Oo({modalOpen:e,modalImage:t,closeModal:n}){return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:s(De.Panel,{as:"img",className:"w-full max-w-4xl transform overflow-hidden align-middle shadow-xl transition-all max-h-[500px]",src:t})})})})]})})})}const r5e=({data:e,forceRender:t})=>{var i;const[n,a]=h.exports.useState(!1);var r=((i=e.amenities)!=null?i:"").split(",");return r=Array.from(new Set(r)),f(Se,{children:[f($e,{to:`/property/${e.id}`,state:e,className:"mb-[20px] border lg:flex-row flex-col flex lg:gap-[32px] lg:h-[220px] lg:w-[unset] w-full max-w-full my-shadow",children:[f("div",{className:"rounded-sm bg-cover bg-center bg-no-repeat flex flex-col px-[12px] pr-1 pb-[10px] lg:h-full h-[210px] lg:w-[262px] w-full space-tile",style:{backgroundImage:`url('${e.url}')`},children:[s(ls,{space_id:e.id,user_property_spaces_id:e.user_property_spaces_id,reRender:t,withLoader:!0}),s("span",{className:"px-2 py-1 text-white bg-black font-bold rounded-lg text-xs self-start",children:e.category||"N/A"})]}),f("div",{className:"py-6 md:flex flex-gro justify-between w-full items-end lg:pl-0 pl-4 pr-4 lg:pr-8",children:[f("div",{className:"w-[200px]",children:[s("h2",{className:"text-[18px] font-semibold mb-[6px] w-full whitespace-normal md:whitespace-wrap",children:e.name}),s("p",{className:"text-[#475467] tracking-wider md:truncate mb-1",children:e.city}),f("p",{className:"text-[#475467] tracking-wider md:truncate",children:[e.country," "]}),f("div",{className:"lg:mt-[21px] mt-[6px] flex items-end",children:[f("p",{className:"mr-[31px]",children:["from: ",f("span",{className:"font-bold",children:["$",e.rate]}),"/",s("span",{className:"",children:"hour"})]}),f("div",{className:"flex items-center gap-2",children:[s(Zc,{}),s("span",{children:e.max_capacity})]})]})]}),f("div",{className:"flex flex-col w-full md:items-end mt-3 lg:mt-0",children:[f("div",{className:"",children:[f("p",{className:"flex text-xl gap-2 items-center lg:mb-[9px]",children:[s(BX,{className:"w-5"}),f("strong",{className:"font-semibold",children:[(Number(e.average_space_rating)||0).toFixed(1),Number(e.space_rating_count)>0&&f("span",{className:"font-normal",children:["(",e.space_rating_count,")"]})]})]}),s("button",{className:"text-sm underline whitespace-nowrap mt-1 lg:mt-0",target:"_blank",onClick:o=>{o.stopPropagation(),o.preventDefault(),a(!0)},children:"(view on map)"})]}),f("div",{className:"mt-2 lg:mt-[50px] lg:flex flex-wra max-w-[200px gap-[12px] whitespace-wrap",children:[r.slice(0,3).map((o,c)=>s("span",{className:"text-[14px] bg-[#F2F4F7] h-fit rounded-[3px] pt-[2px] px-[8px] mr-1 lg:mr-0 pb-[3px] text-[#667085]",children:o},c)),r.length>3?f("span",{className:"text-[14px] bg-[#F2F4F7] rounded-[3px] pt-[2px] px-[8px] pb-[3px] text-[#667085]",children:["+",r.length-3," more"]}):null]})]})]})]}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${e.address_line_1||""}, ${e.address_line_2||""}, ${e.city||""}, ${e.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${e.address_line_1||""}, ${e.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:n,closeModal:()=>a(!1)})]})};function s5e(){return s("svg",{width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M1.5 2.45C1.5 2.02996 1.5 1.81994 1.58175 1.65951C1.65365 1.51839 1.76839 1.40365 1.90951 1.33175C2.06994 1.25 2.27996 1.25 2.7 1.25H15.3C15.72 1.25 15.9301 1.25 16.0905 1.33175C16.2316 1.40365 16.3463 1.51839 16.4183 1.65951C16.5 1.81994 16.5 2.02996 16.5 2.45V2.95205C16.5 3.15364 16.5 3.25444 16.4754 3.34817C16.4535 3.43123 16.4176 3.50993 16.3691 3.58082C16.3144 3.66082 16.2383 3.72684 16.0859 3.85887L11.2891 8.01613C11.1367 8.14816 11.0606 8.21418 11.0059 8.29418C10.9574 8.36507 10.9215 8.44377 10.8996 8.52683C10.875 8.62056 10.875 8.72136 10.875 8.92295V12.8438C10.875 12.9905 10.875 13.0638 10.8513 13.1272C10.8304 13.1832 10.7964 13.2334 10.7522 13.2736C10.7021 13.3192 10.634 13.3464 10.4978 13.4009L7.94783 14.4209C7.67218 14.5311 7.53435 14.5863 7.4237 14.5633C7.32695 14.5432 7.24204 14.4857 7.18744 14.4033C7.125 14.3091 7.125 14.1607 7.125 13.8638V8.92295C7.125 8.72136 7.125 8.62056 7.10037 8.52683C7.07854 8.44377 7.0426 8.36507 6.99413 8.29418C6.93943 8.21418 6.86326 8.14816 6.71092 8.01613L1.91408 3.85887C1.76174 3.72684 1.68557 3.66082 1.63087 3.58082C1.5824 3.50993 1.54646 3.43123 1.52463 3.34817C1.5 3.25444 1.5 3.15364 1.5 2.95205V2.45Z",stroke:"black",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function cm({name:e,control:t,setValue:n,reset:a,title:r,labelField:i,valueField:o,options:c}){const{field:l,fieldState:d,formState:u}=Ii({control:t,name:e});return s("div",{className:"mb-[34px]",children:f(mu,{defaultOpen:!0,children:[f("div",{className:"mb-[12px] flex justify-between",children:[f("h4",{className:"flex w-full justify-between text-[16px] font-semibold lg:block",children:[s("span",{className:"lg:mr-2 lg:border-r lg:pr-2",children:r}),s("button",{className:"text-sm font-normal lowercase lg:text-xs",onClick:a,children:"Clear"})]}),f(mu.Button,{className:"hidden duration-200 ui-open:rotate-180 lg:inline",children:[" ",s("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M13 7L7 1L1 7",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]})]}),s(ke,{as:h.exports.Fragment,enter:"transition-all ease duration-500",enterFrom:"max-h-0",enterTo:"max-h-[900px]",leave:"transition-all ease duration-500",leaveFrom:"max-h-[900px]",leaveTo:"max-h-0",children:s(mu.Panel,{className:"overflow-hidden text-gray-500 duration-500",children:c.map((g,y)=>f("div",{className:"checkbox-container flex gap-2 items-center mb-[12px]",children:[s("input",{type:`${e==="capacity"?"radio":"checkbox"}`,id:g[o],value:g[o],className:`text-xl w-5 h-8 rounded ${e==="capacity"?"accent-[#0D9895]":""}`,name:e,checked:l.value.includes(g[o]),onChange:()=>{e==="capacity"?l.onChange(g[o]):l.value.includes(g[o])?l.onChange(l.value.filter(v=>v!==g[o])):l.onChange([...l.value,g[o]])},onBlur:l.onBlur}),e!=="capacity"?f("label",{htmlFor:g[o],children:[g[i]," ",r=="Reviews"?Array(Number(g[o])).fill("").map((w,v)=>s("span",{className:"ml-1",children:s(ds,{})},v)):null]}):f("span",{children:[g[i]," "]})]},y))})})]})})}const i5e=new AbortController;function Ch(e,t){const[n,a]=h.exports.useState([]),{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we);async function o(){let c=new _e;try{const l=await c.callRawAPI("/v2/api/custom/ergo/amenity/PAGINATE",{page:1,limit:1e3,where:["deleted_at IS NULL",`${t?e&&`space_id != ${e}`:e?`space_id = ${e}`:"1"} OR ${`creator_id = ${Number(localStorage.getItem("user"))}`}`]},"POST",i5e.signal);l.error||a(l.list)}catch(l){if(me(r,l.message),l.name=="AbortError")return;i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:l.message}})}}return h.exports.useEffect(()=>{o()},[e]),n}const o5e=[{name:"$0 - $30",id:0},{name:"$31 - $60",id:1},{name:"$60 - $90",id:2},{name:"$90 - $120",id:3},{name:"$120 - $150",id:4},{name:"$150 - $180",id:5}],l5e=[{name:"0 - 4",id:0},{name:"5 - 9",id:1},{name:"10 - 14",id:2},{name:"15 - 19",id:3},{name:"20 - 24",id:4},{name:"25 - 30",id:5},{name:"Greater Than 30",id:6}],c5e=[{name:"4",id:0},{name:"3",id:1},{name:"2",id:2},{name:"1",id:3}],d5e=new _e,u5e=new AbortController,cv=()=>{const[e,t]=lt(),{dispatch:n,state:a}=h.exports.useContext(we),[r,i]=h.exports.useState(!1),o=a.spaceCategories,c=Ch(),[l,d]=h.exports.useState([]),[u,g]=h.exports.useState(!1),{handleSubmit:y,control:w,setValue:v,resetField:S,register:m}=Oe({defaultValues:(()=>{var E,T,D,P,M,O;const C=Ue(e);return{...C,location:(E=C.location)!=null?E:"",booking_start_time:"",category:((T=C.category)==null?void 0:T.split(","))||[],capacity:((D=C.capacity)==null?void 0:D.split(","))||[],price:((P=C.price)==null?void 0:P.split(","))||[],amenity:((M=C.amenity)==null?void 0:M.split(","))||[],review:((O=C.review)==null?void 0:O.split(","))||[]}})()}),[p,b]=h.exports.useState(!1);async function x(){var M,O,F,z,H,A;const C=Ue(e),E=(M=C.location)==null?void 0:M.split(","),T=new Date(C.booking_start_time||void 0),D={...C,booking_start_time:isNaN(T)?void 0:T,category:((O=C.category)==null?void 0:O.split(","))||[],price:((F=C.price)==null?void 0:F.split(","))||[],capacity:((z=C.capacity)==null?void 0:z.split(","))||[],amenity:((H=C.amenity)==null?void 0:H.split(","))||[],review:((A=C.review)==null?void 0:A.split(","))||[]};n({type:"START_LOADING"});var P=[`ergo_property_spaces.space_status = ${wo.APPROVED} AND schedule_template_id IS NOT NULL AND ergo_property_spaces_images.is_approved = 1 AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces.deleted_at IS NULL`];if(D.location&&P.push(`(ergo_property.address_line_1 LIKE '%${D.location}%' OR ergo_property.address_line_2 LIKE '%${D.location}%' OR ergo_property.city LIKE '%${E[0]&&E[0]}%' OR ergo_property.country LIKE '%${E.length===1?E[0]:E.length===2?E[1]:E[2]}%' OR ergo_property.zip LIKE '%${D.location}%' OR ergo_property.name LIKE '%${D.location}%')`),D.size&&P.push(`ergo_property_spaces.size = ${D.size}`),D.capacity.length>0)if(D.capacity[D.capacity.length-1]!=="Greater Than 30"){const I=D.capacity[D.capacity.length-1].split("-").map(U=>U.trim()),[B,Y]=I;P.pop(),P.push(`ergo_property_spaces.max_capacity BETWEEN ${B} AND ${Y}`)}else P.push("ergo_property_spaces.max_capacity > 30");D.category.length>0&&P.push(`(${D.category.map(j=>`ergo_spaces.category LIKE '%${j}%'`).join(" OR ")})`),D.amenity.length>0&&P.push(`(${D.amenity.map(j=>`ergo_amenity.name LIKE '%${j}%'`).join(" OR ")})`),D.review.length>0&&P.push(`(${D.review.map(j=>`ER.average_space_rating >= ${j.replace("+","")}`).join(" OR ")})`),D.price.length>0&&P.push(`(${D.price.filter(j=>j.trim()!="").map(j=>j.split("-")).map(([j,I])=>`ergo_property_spaces.rate BETWEEN ${j.trim().slice(1)} AND ${I.trim().slice(1)} `).join(" OR ")})`);try{const j=Number(localStorage.getItem("user")),I=await d5e.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1e4,user_id:Number(j),where:P,booking_start_time:En(D.booking_start_time||"")?new Date(D.booking_start_time).toISOString():void 0},"POST",u5e.signal);d(I.list)}catch(j){console.log("err",j),n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:j.message}})}n({type:"STOP_LOADING"})}h.exports.useEffect(()=>{En(e.get("booking_start_time"))&&v("booking_start_time",new Date(e.get("booking_start_time")),{shouldDirty:!0})},[]),h.exports.useEffect(()=>{u&&x()},[u]);const k=(C,E)=>{var T;if(!E)v(C,""),e.set(C,""),t(e);else{const D=(T=e.get(C))!=null?T:"",P=(D==null?void 0:D.split(","))||[],M=P.indexOf(E);M>-1&&(P.splice(M,1),v(C,P),e.set(C,P.join(",")))}t(e)};async function N(C){if(a.location&&a.location.includes("undefined")){const T=a.location.split(",")[0].trim();a.location=T}e.set("location",a.location),e.set("booking_start_time",En(C.booking_start_time)?C.booking_start_time.toISOString():""),e.set("category",C.category.join(",")),e.set("price",C.price.join(",")),e.set("amenity",C.amenity.join(",")),e.set("review",C.review.join(",")),C.max_capacity!=="NaN"&&e.set("max_capacity",Number(C.max_capacity)),e.set("capacity",C.capacity),t(e)}h.exports.useEffect(()=>{x()},[e]);const _=(C,E)=>{var T,D,P,M;return p==1?((T=C.average_space_rating)!=null?T:0)-((D=E.average_space_rating)!=null?D:0):((P=E.average_space_rating)!=null?P:0)-((M=C.average_space_rating)!=null?M:0)};return f("div",{className:"min-h-screen bg-white",children:[f("section",{className:"container mx-auto mb-[24px] bg-white px-6 pt-[120px] normal-case 2xl:px-32",children:[f("form",{className:"flex w-full flex-wrap justify-center",onSubmit:y(N),id:"search-bar",children:[s(dN,{type:"static",setValue:C=>n({type:"SETLOCATION",payload:{location:C}}),containerClassName:"mb-4 flex min-h-[45px] w-full max-w-full flex-grow items-center gap-2 border-2 px-4 lg:mb-0 lg:w-[unset] lg:border-r-0 lg:border-b-2",className:"border-0 focus:outline-none",placeholder:"Search by city or zip code",suggestionType:["(regions)"]}),s("div",{className:"relative mb-6 flex h-[45px] w-full cursor-pointer items-center gap-2 border-2 p-2 lg:mb-0 lg:w-1/2 lg:w-[unset] lg:min-w-[230px] lg:border-r-0",children:s(Ua,{reset:()=>S("booking_start_time"),setValue:C=>v("booking_start_time",C),control:w,name:"booking_start_time",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"Select Date",min:new Date})}),s("button",{className:"login-btn-gradient mb-4 w-full whitespace-nowrap p-2 px-6 text-white disabled:text-[#98A2B3] lg:mb-0 lg:w-[unset]",type:"submit",id:"update-search",children:"Update Search"})]}),f("div",{className:"block lg:hidden",children:[f("button",{type:"button",className:"mb-6 flex w-full items-center justify-center gap-2 border-2 py-2 text-center",onClick:()=>i(!0),children:[s(s5e,{}),"Filters"]}),s("div",{className:"snap-scroll flex gap-4",children:Object.entries(Ue(e)).map(([C,E])=>{if(!E)return null;if(C=="booking_start_time")return f("span",{className:"whitespace-nowrap rounded-[50px] bg-[#F2F4F7] px-[16px] py-[6px] text-[#475467]",children:[gh(E),s("button",{type:"button",className:"ml-3",onClick:()=>k(C),children:"\u2715"})]});if(C=="max_capacity"&&E==0)return;let T=E.split(",");return T.length>0?T.map((D,P)=>f("span",{className:"whitespace-nowrap rounded-[50px] bg-[#F2F4F7] px-[16px] py-[6px] text-[#475467]",children:[D,s("button",{type:"button",className:"ml-3",onClick:()=>k(C,D),children:"\u2715"})]},P)):f("span",{className:"whitespace-nowrap rounded-[50px] bg-[#F2F4F7] px-[16px] py-[6px] text-[#475467]",children:[E,s("button",{type:"button",className:"ml-3",onClick:()=>k(C),children:"\u2715"})]},C)})})]})]}),f("section",{className:"search-page-container container mx-auto flex gap-[32px] bg-white px-6 normal-case 2xl:px-32",children:[s("aside",{className:`hidden xl:block xl:w-1/5 ${r?"popup-tablet":""}`,onClick:()=>i(!1),children:f("div",{className:`${r?"w-[80%] max-w-[500px] rounded-xl p-5":""} flex flex-col bg-white `,onClick:C=>C.stopPropagation(),children:[r?f("div",{className:"mb-[18px] flex items-center justify-between border-b pb-2",children:[s("h3",{className:"text-2xl font-semibold",children:"Filters"}),s("button",{onClick:()=>i(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})]}):null,f("div",{className:`${r?"snap-scroll h-[60vh]":""}`,children:[s(cm,{control:w,name:"category",title:"Spaces",labelField:"category",valueField:"category",options:o,reset:()=>{S("category"),e.set("category",""),t(e)}}),s(cm,{control:w,name:"price",title:"Prices",labelField:"name",valueField:"name",options:o5e,reset:()=>{S("price"),e.set("price",""),t(e)}}),s(cm,{control:w,name:"capacity",title:"Capacity",labelField:"name",valueField:"name",options:l5e,reset:()=>{S("capacity"),e.set("capacity",""),t(e)}}),s(cm,{name:"amenity",control:w,title:"Amenities",options:c,labelField:"name",valueField:"name",reset:()=>{S("amenity"),e.set("amenity",""),t(e)}}),s(cm,{name:"review",control:w,title:"Reviews",options:c5e,labelField:"name",valueField:"name",reset:()=>{S("review"),e.set("review",""),t(e)}})]})]})}),f("div",{className:"mb-16 max-w-full flex-grow xl:w-4/5",children:[f("div",{className:"mb-[15px] flex items-center justify-between",children:[s("h5",{className:l.length==0?"md:invisible":"",children:l.length==0?"No results Found":f(Se,{children:[" ","Results Found"," ",f("strong",{className:"font-semibold",children:["(",l.length,")"]})]})}),s(As,{options:[{label:"Rating (High to Low)",value:0},{label:"Rating (Low to High)",value:1}],onChange:b,accessor:"label",valueAccessor:"value",className:"min-w-[200px]",listOptionClassName:"pl-4"})]}),f("div",{className:"flex flex-wrap justify-center gap-6 lg:block",children:[l.length==0&&s("div",{className:"hidden min-h-[300px] items-center justify-center normal-case text-[#667085] md:flex",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," No results found"]})}),l.sort(_).map(C=>s(r5e,{data:C,forceRender:g},C.id))]})]})]}),s(bc,{anchorId:"update-search",place:"right",content:"Search",noArrow:!0})]})},f5e=()=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M12.117 7.89984C12.4684 7.89984 12.7547 7.78923 12.9759 7.568C13.1977 7.34617 13.3087 7.05956 13.3087 6.70817C13.3087 6.35678 13.1977 6.07017 12.9759 5.84834C12.7547 5.62712 12.4684 5.5165 12.117 5.5165C11.7809 5.5165 11.4982 5.62712 11.2691 5.84834C11.0399 6.07017 10.9253 6.35678 10.9253 6.70817C10.9253 7.05956 11.0362 7.34617 11.2581 7.568C11.4793 7.78923 11.7656 7.89984 12.117 7.89984ZM5.88366 7.89984C6.21977 7.89984 6.50241 7.78923 6.73158 7.568C6.96074 7.34617 7.07533 7.05956 7.07533 6.70817C7.07533 6.35678 6.96472 6.07017 6.74349 5.84834C6.52166 5.62712 6.23505 5.5165 5.88366 5.5165C5.53227 5.5165 5.24597 5.62712 5.02474 5.84834C4.80291 6.07017 4.69199 6.35678 4.69199 6.70817C4.69199 7.05956 4.80291 7.34617 5.02474 7.568C5.24597 7.78923 5.53227 7.89984 5.88366 7.89984ZM9.00033 13.7665C9.94755 13.7665 10.8147 13.5068 11.6018 12.9873C12.3883 12.4679 12.9802 11.7498 13.3774 10.8332H4.62324C5.02046 11.7498 5.61263 12.4679 6.39974 12.9873C7.18624 13.5068 8.0531 13.7665 9.00033 13.7665ZM9.00033 17.7082C7.79338 17.7082 6.65916 17.479 5.59766 17.0207C4.53555 16.5623 3.61491 15.9436 2.83574 15.1644C2.05658 14.3853 1.43783 13.4646 0.979492 12.4025C0.521159 11.341 0.291992 10.2068 0.291992 8.99984C0.291992 7.79289 0.521159 6.65837 0.979492 5.59625C1.43783 4.53475 2.05658 3.61442 2.83574 2.83525C3.61491 2.05609 4.53555 1.43734 5.59766 0.979004C6.65916 0.520671 7.79338 0.291504 9.00033 0.291504C10.2073 0.291504 11.3418 0.520671 12.4039 0.979004C13.4654 1.43734 14.3857 2.05609 15.1649 2.83525C15.9441 3.61442 16.5628 4.53475 17.0212 5.59625C17.4795 6.65837 17.7087 7.79289 17.7087 8.99984C17.7087 10.2068 17.4795 11.341 17.0212 12.4025C16.5628 13.4646 15.9441 14.3853 15.1649 15.1644C14.3857 15.9436 13.4654 16.5623 12.4039 17.0207C11.3418 17.479 10.2073 17.7082 9.00033 17.7082ZM9.00033 16.3332C11.0323 16.3332 12.7626 15.6191 14.1914 14.1909C15.6196 12.7621 16.3337 11.0318 16.3337 8.99984C16.3337 6.96789 15.6196 5.23753 14.1914 3.80875C12.7626 2.38059 11.0323 1.6665 9.00033 1.6665C6.96838 1.6665 5.23833 2.38059 3.81016 3.80875C2.38138 5.23753 1.66699 6.96789 1.66699 8.99984C1.66699 11.0318 2.38138 12.7621 3.81016 14.1909C5.23833 15.6191 6.96838 16.3332 9.00033 16.3332Z",fill:"#8E8E93"})});function s_(e){return[].concat(e)}function U5(e){return e.startsWith(":")}function Sj(e){return bx(e)&&(e==="*"||e.length>1&&":>~.+*".includes(e.slice(0,1))||Tj(e))}function kj(e,t){return(bx(t)||typeof t=="number")&&!Ej(e)&&!U5(e)&&!Cj(e)}function Cj(e){return e.startsWith("@media")}function m5e(e){return e==="."}function Ej(e){return e==="--"}function bx(e){return e+""===e}function Tj(e){return bx(e)&&(e.startsWith("&")||U5(e))}function eb(e,t=""){return e.filter(Boolean).join(t)}function Lj(e,t){let n=0;if(t.length===0)return n.toString();for(let a=0;a<t.length;a++){const r=t.charCodeAt(a);n=(n<<5)-n+r,n=n&n}return`${e!=null?e:"cl"}_${n.toString(36)}`}function p5e(e,t){return e==="content"?`"${t}"`:t}function h5e(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function o8(e,t){return`${e}:${t}`}function g5e(e){return e?`.${e}`:""}function b5e(e,t){return e?`${e}
${t}`:t}var Dj=class Mj{constructor(t,n,a,r){this.sheet=t,this.property=n,this.value=a,this.selector=r,this.property=n,this.value=a,this.joined=o8(n,a);const i=this.selector.preconditions.concat(this.selector.postconditions);this.hash=this.selector.hasConditions?this.selector.scopeClassName:Lj(this.sheet.name,this.joined),this.key=eb([this.joined,i,this.hash])}toString(){let t=i_(this.selector.preconditions,{right:this.hash});return t=i_(this.selector.postconditions,{left:t}),`${t} {${Mj.genRule(this.property,this.value)}}`}static genRule(t,n){const a=h5e(t);return o8(a,p5e(t,n))+";"}};function i_(e,{left:t="",right:n=""}={}){const a=e.reduce((r,i)=>U5(i)?r+i:Tj(i)?r+i.slice(1):eb([r,i]," "),t);return eb([a,g5e(n)]," ")}var y5e=class Dg{constructor(t,n=null,{preconditions:a,postconditions:r}={}){this.sheet=t,this.preconditions=[],this.scopeClassName=null,this.scopeName=null,this.postconditions=[],this.preconditions=a?s_(a):[],this.postconditions=r?s_(r):[],this.setScope(n)}setScope(t){return t?(this.scopeClassName||(this.scopeName=t,this.scopeClassName=Lj(this.sheet.name,t+this.sheet.count)),this):this}get hasConditions(){return this.preconditions.length>0||this.postconditions.length>0}addScope(t){return new Dg(this.sheet,t,{preconditions:this.preconditions,postconditions:this.postconditions})}addPrecondition(t){return new Dg(this.sheet,this.scopeClassName,{postconditions:this.postconditions,preconditions:this.preconditions.concat(t)})}addPostcondition(t){return new Dg(this.sheet,this.scopeClassName,{preconditions:this.preconditions,postconditions:this.postconditions.concat(t)})}createRule(t,n){return new Dj(this.sheet,t,n,this)}},x5e=class{constructor(e,t){this.name=e,this.rootNode=t,this.storedStyles={},this.storedClasses={},this.style="",this.count=0,this.id=`flairup-${e}`,this.styleTag=this.createStyleTag()}getStyle(){return this.style}append(e){this.style=b5e(this.style,e)}apply(){this.count++,this.styleTag&&(this.styleTag.innerHTML=this.style)}isApplied(){return!!this.styleTag}createStyleTag(){var t;if(typeof document=="undefined"||this.isApplied()||this.rootNode===null)return this.styleTag;const e=document.createElement("style");return e.type="text/css",e.id=this.id,((t=this.rootNode)!=null?t:document.head).appendChild(e),e}addRule(e){const t=this.storedClasses[e.key];return bx(t)?t:(this.storedClasses[e.key]=e.hash,this.storedStyles[e.hash]=[e.property,e.value],this.append(e.toString()),e.hash)}};function V5(e,t){for(const n in e)t(n.trim(),e[n])}function mn(...e){const t=e.reduce((n,a)=>(a instanceof Set?n.push(...a):typeof a=="string"?n.push(a):Array.isArray(a)?n.push(mn(...a)):typeof a=="object"&&Object.entries(a).forEach(([r,i])=>{i&&n.push(r)}),n),[]);return eb(t," ").trim()}function w5e(e,t){const n=new x5e(e,t);return{create:a,getStyle:n.getStyle.bind(n),isApplied:n.isApplied.bind(n)};function a(r){const i={};return Aj(n,r,new y5e(n)).forEach(([c,l,d])=>{yx(n,l,d).forEach(u=>{o(c,u)})}),n.apply(),i;function o(c,l){var d;i[c]=(d=i[c])!=null?d:new Set,i[c].add(l)}}}function Aj(e,t,n){const a=[];return V5(t,(r,i)=>{if(Sj(r))return Aj(e,i,n.addPrecondition(r)).forEach(o=>a.push(o));a.push([r,t[r],n.addScope(r)])}),a}function yx(e,t,n){const a=new Set;return V5(t,(r,i)=>{let o=[];if(Sj(r))o=yx(e,i,n.addPostcondition(r));else if(m5e(r))o=s_(i);else if(Cj(r))o=_5e(e,i,r,n);else if(Ej(r))o=v5e(e,i,n);else if(kj(r,i)){const c=n.createRule(r,i);e.addRule(c),a.add(c.hash)}return Ij(o,a)}),a}function Ij(e,t){return e.forEach(n=>t.add(n)),t}function v5e(e,t,n){const a=new Set,r=[];if(V5(t,(i,o)=>{if(kj(i,o)){r.push(Dj.genRule(i,o));return}const c=yx(e,o!=null?o:{},n);Ij(c,a)}),!n.scopeClassName)return a;if(r.length){const i=r.join(" ");e.append(`${i_(n.preconditions,{right:n.scopeClassName})} {${i}}`)}return a.add(n.scopeClassName),a}function _5e(e,t,n,a){e.append(n+" {");const r=yx(e,t,a);return e.append("}"),r}function oa(){return oa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},oa.apply(this,arguments)}function N5e(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o_(e,t)}function o_(e,t){return o_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,r){return a.__proto__=r,a},o_(e,t)}function Oj(e,t){if(e==null)return{};var n={},a=Object.keys(e),r,i;for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&(n[r]=e[r]);return n}function S5e(e,t){if(!!e){if(typeof e=="string")return l8(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l8(e,t)}}function l8(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function k5e(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=S5e(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var a=0;return function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var tn;(function(e){e.hiddenOnSearch="epr-hidden-on-search",e.searchActive="epr-search-active",e.hidden="epr-hidden",e.visible="epr-visible",e.active="epr-active",e.emoji="epr-emoji",e.category="epr-emoji-category",e.label="epr-emoji-category-label",e.categoryContent="epr-emoji-category-content",e.emojiHasVariations="epr-emoji-has-variations",e.scrollBody="epr-body",e.emojiList="epr-emoji-list",e.external="__EmojiPicker__",e.emojiPicker="EmojiPickerReact",e.open="epr-open",e.vertical="epr-vertical",e.horizontal="epr-horizontal",e.variationPicker="epr-emoji-variation-picker",e.darkTheme="epr-dark-theme",e.autoTheme="epr-auto-theme"})(tn||(tn={}));function dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.map(function(a){return"."+a}).join("")}var ra=w5e("epr",null),Mg={display:"none",opacity:"0",pointerEvents:"none",visibility:"hidden",overflow:"hidden"},W5=ra.create({hidden:oa({".":tn.hidden},Mg)}),C5e=h.exports.memo(function(){return h.exports.createElement("style",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:ra.getStyle()}})}),Qc=ra.create({".epr-main":{":has(input:not(:placeholder-shown))":{categoryBtn:{":hover":{opacity:"1",backgroundPositionY:"var(--epr-category-navigation-button-size)"}},hiddenOnSearch:oa({".":tn.hiddenOnSearch},Mg)},":has(input(:placeholder-shown))":{visibleOnSearchOnly:Mg}},hiddenOnReactions:{transition:"all 0.5s ease-in-out"},".epr-reactions":{hiddenOnReactions:{height:"0px",width:"0px",opacity:"0",pointerEvents:"none",overflow:"hidden"}},".EmojiPickerReact:not(.epr-search-active)":{categoryBtn:{":hover":{opacity:"1",backgroundPositionY:"var(--epr-category-navigation-button-size)"},"&.epr-active":{opacity:"1",backgroundPositionY:"var(--epr-category-navigation-button-size)"}},visibleOnSearchOnly:oa({".":"epr-visible-on-search-only"},Mg)}});function Ol(e,t){var n,a;return{".epr-dark-theme":(n={},n[e]=t,n),".epr-auto-theme":(a={},a[e]={"@media (prefers-color-scheme: dark)":t},a)}}function Pj(e,t){var n,a,r=(n=e.customEmojis)!=null?n:[],i=(a=t.customEmojis)!=null?a:[];return e.open===t.open&&e.emojiVersion===t.emojiVersion&&e.reactionsDefaultOpen===t.reactionsDefaultOpen&&e.searchPlaceHolder===t.searchPlaceHolder&&e.searchPlaceholder===t.searchPlaceholder&&e.defaultSkinTone===t.defaultSkinTone&&e.skinTonesDisabled===t.skinTonesDisabled&&e.autoFocusSearch===t.autoFocusSearch&&e.emojiStyle===t.emojiStyle&&e.theme===t.theme&&e.suggestedEmojisMode===t.suggestedEmojisMode&&e.lazyLoadEmojis===t.lazyLoadEmojis&&e.className===t.className&&e.height===t.height&&e.width===t.width&&e.style===t.style&&e.searchDisabled===t.searchDisabled&&e.skinTonePickerLocation===t.skinTonePickerLocation&&r.length===i.length}var E5e=["1f44d","2764-fe0f","1f603","1f622","1f64f","1f44e","1f621"],Tp;(function(e){e.RECENT="recent",e.FREQUENT="frequent"})(Tp||(Tp={}));var Kr;(function(e){e.NATIVE="native",e.APPLE="apple",e.TWITTER="twitter",e.GOOGLE="google",e.FACEBOOK="facebook"})(Kr||(Kr={}));var Lp;(function(e){e.DARK="dark",e.LIGHT="light",e.AUTO="auto"})(Lp||(Lp={}));var Ys;(function(e){e.NEUTRAL="neutral",e.LIGHT="1f3fb",e.MEDIUM_LIGHT="1f3fc",e.MEDIUM="1f3fd",e.MEDIUM_DARK="1f3fe",e.DARK="1f3ff"})(Ys||(Ys={}));var Xt;(function(e){e.SUGGESTED="suggested",e.CUSTOM="custom",e.SMILEYS_PEOPLE="smileys_people",e.ANIMALS_NATURE="animals_nature",e.FOOD_DRINK="food_drink",e.TRAVEL_PLACES="travel_places",e.ACTIVITIES="activities",e.OBJECTS="objects",e.SYMBOLS="symbols",e.FLAGS="flags"})(Xt||(Xt={}));var Hu;(function(e){e.SEARCH="SEARCH",e.PREVIEW="PREVIEW"})(Hu||(Hu={}));var ps,T5e=[Xt.SUGGESTED,Xt.CUSTOM,Xt.SMILEYS_PEOPLE,Xt.ANIMALS_NATURE,Xt.FOOD_DRINK,Xt.TRAVEL_PLACES,Xt.ACTIVITIES,Xt.OBJECTS,Xt.SYMBOLS,Xt.FLAGS],L5e={name:"Recently Used",category:Xt.SUGGESTED},Rj=(ps={},ps[Xt.SUGGESTED]={category:Xt.SUGGESTED,name:"Frequently Used"},ps[Xt.CUSTOM]={category:Xt.CUSTOM,name:"Custom Emojis"},ps[Xt.SMILEYS_PEOPLE]={category:Xt.SMILEYS_PEOPLE,name:"Smileys & People"},ps[Xt.ANIMALS_NATURE]={category:Xt.ANIMALS_NATURE,name:"Animals & Nature"},ps[Xt.FOOD_DRINK]={category:Xt.FOOD_DRINK,name:"Food & Drink"},ps[Xt.TRAVEL_PLACES]={category:Xt.TRAVEL_PLACES,name:"Travel & Places"},ps[Xt.ACTIVITIES]={category:Xt.ACTIVITIES,name:"Activities"},ps[Xt.OBJECTS]={category:Xt.OBJECTS,name:"Objects"},ps[Xt.SYMBOLS]={category:Xt.SYMBOLS,name:"Symbols"},ps[Xt.FLAGS]={category:Xt.FLAGS,name:"Flags"},ps);function jj(e){return T5e.map(function(t){return oa({},Rj[t],e&&e[t]&&e[t])})}function Y5(e){return e.category}function zj(e){return e.name}function D5e(e,t){var n;e===void 0&&(e=[]),t===void 0&&(t={});var a={};t.suggestionMode===Tp.RECENT&&(a[Xt.SUGGESTED]=L5e);var r=jj(a);return(n=e)!=null&&n.length?e.map(function(i){return typeof i=="string"?c8(i,a[i]):oa({},c8(i.category,a[i.category]),i)}):r}function c8(e,t){return t===void 0&&(t={}),Object.assign(Rj[e],t)}var M5e="https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/apple/64/",A5e="https://cdn.jsdelivr.net/npm/emoji-datasource-facebook/img/facebook/64/",I5e="https://cdn.jsdelivr.net/npm/emoji-datasource-twitter/img/twitter/64/",O5e="https://cdn.jsdelivr.net/npm/emoji-datasource-google/img/google/64/";function P5e(e){switch(e){case Kr.TWITTER:return I5e;case Kr.GOOGLE:return O5e;case Kr.FACEBOOK:return A5e;case Kr.APPLE:default:return M5e}}var R5e=[],j5e=[{n:["grinning","grinning face"],u:"1f600",a:"1.0"},{n:["smiley","smiling face with open mouth"],u:"1f603",a:"0.6"},{n:["smile","smiling face with open mouth and smiling eyes"],u:"1f604",a:"0.6"},{n:["grin","grinning face with smiling eyes"],u:"1f601",a:"0.6"},{n:["laughing","satisfied","smiling face with open mouth and tightly-closed eyes"],u:"1f606",a:"0.6"},{n:["sweat smile","smiling face with open mouth and cold sweat"],u:"1f605",a:"0.6"},{n:["rolling on the floor laughing"],u:"1f923",a:"3.0"},{n:["joy","face with tears of joy"],u:"1f602",a:"0.6"},{n:["slightly smiling face"],u:"1f642",a:"1.0"},{n:["upside-down face","upside down face"],u:"1f643",a:"1.0"},{n:["melting face"],u:"1fae0",a:"14.0"},{n:["wink","winking face"],u:"1f609",a:"0.6"},{n:["blush","smiling face with smiling eyes"],u:"1f60a",a:"0.6"},{n:["innocent","smiling face with halo"],u:"1f607",a:"1.0"},{n:["smiling face with 3 hearts","smiling face with smiling eyes and three hearts"],u:"1f970",a:"11.0"},{n:["heart eyes","smiling face with heart-shaped eyes"],u:"1f60d",a:"0.6"},{n:["star-struck","grinning face with star eyes"],u:"1f929",a:"5.0"},{n:["kissing heart","face throwing a kiss"],u:"1f618",a:"0.6"},{n:["kissing","kissing face"],u:"1f617",a:"1.0"},{n:["relaxed","white smiling face"],u:"263a-fe0f",a:"0.6"},{n:["kissing closed eyes","kissing face with closed eyes"],u:"1f61a",a:"0.6"},{n:["kissing smiling eyes","kissing face with smiling eyes"],u:"1f619",a:"1.0"},{n:["smiling face with tear"],u:"1f972",a:"13.0"},{n:["yum","face savouring delicious food"],u:"1f60b",a:"0.6"},{n:["stuck out tongue","face with stuck-out tongue"],u:"1f61b",a:"1.0"},{n:["stuck out tongue winking eye","face with stuck-out tongue and winking eye"],u:"1f61c",a:"0.6"},{n:["zany face","grinning face with one large and one small eye"],u:"1f92a",a:"5.0"},{n:["stuck out tongue closed eyes","face with stuck-out tongue and tightly-closed eyes"],u:"1f61d",a:"0.6"},{n:["money-mouth face","money mouth face"],u:"1f911",a:"1.0"},{n:["hugging face"],u:"1f917",a:"1.0"},{n:["face with hand over mouth","smiling face with smiling eyes and hand covering mouth"],u:"1f92d",a:"5.0"},{n:["face with open eyes and hand over mouth"],u:"1fae2",a:"14.0"},{n:["face with peeking eye"],u:"1fae3",a:"14.0"},{n:["shushing face","face with finger covering closed lips"],u:"1f92b",a:"5.0"},{n:["thinking face"],u:"1f914",a:"1.0"},{n:["saluting face"],u:"1fae1",a:"14.0"},{n:["zipper-mouth face","zipper mouth face"],u:"1f910",a:"1.0"},{n:["face with raised eyebrow","face with one eyebrow raised"],u:"1f928",a:"5.0"},{n:["neutral face"],u:"1f610",a:"0.7"},{n:["expressionless","expressionless face"],u:"1f611",a:"1.0"},{n:["no mouth","face without mouth"],u:"1f636",a:"1.0"},{n:["dotted line face"],u:"1fae5",a:"14.0"},{n:["face in clouds"],u:"1f636-200d-1f32b-fe0f",a:"13.1"},{n:["smirk","smirking face"],u:"1f60f",a:"0.6"},{n:["unamused","unamused face"],u:"1f612",a:"0.6"},{n:["face with rolling eyes"],u:"1f644",a:"1.0"},{n:["grimacing","grimacing face"],u:"1f62c",a:"1.0"},{n:["face exhaling"],u:"1f62e-200d-1f4a8",a:"13.1"},{n:["lying face"],u:"1f925",a:"3.0"},{n:["relieved","relieved face"],u:"1f60c",a:"0.6"},{n:["pensive","pensive face"],u:"1f614",a:"0.6"},{n:["sleepy","sleepy face"],u:"1f62a",a:"0.6"},{n:["drooling face"],u:"1f924",a:"3.0"},{n:["sleeping","sleeping face"],u:"1f634",a:"1.0"},{n:["mask","face with medical mask"],u:"1f637",a:"0.6"},{n:["face with thermometer"],u:"1f912",a:"1.0"},{n:["face with head-bandage","face with head bandage"],u:"1f915",a:"1.0"},{n:["nauseated face"],u:"1f922",a:"3.0"},{n:["face vomiting","face with open mouth vomiting"],u:"1f92e",a:"5.0"},{n:["sneezing face"],u:"1f927",a:"3.0"},{n:["hot face","overheated face"],u:"1f975",a:"11.0"},{n:["cold face","freezing face"],u:"1f976",a:"11.0"},{n:["woozy face","face with uneven eyes and wavy mouth"],u:"1f974",a:"11.0"},{n:["dizzy face"],u:"1f635",a:"0.6"},{n:["face with spiral eyes"],u:"1f635-200d-1f4ab",a:"13.1"},{n:["exploding head","shocked face with exploding head"],u:"1f92f",a:"5.0"},{n:["face with cowboy hat"],u:"1f920",a:"3.0"},{n:["partying face","face with party horn and party hat"],u:"1f973",a:"11.0"},{n:["disguised face"],u:"1f978",a:"13.0"},{n:["sunglasses","smiling face with sunglasses"],u:"1f60e",a:"1.0"},{n:["nerd face"],u:"1f913",a:"1.0"},{n:["face with monocle"],u:"1f9d0",a:"5.0"},{n:["confused","confused face"],u:"1f615",a:"1.0"},{n:["face with diagonal mouth"],u:"1fae4",a:"14.0"},{n:["worried","worried face"],u:"1f61f",a:"1.0"},{n:["slightly frowning face"],u:"1f641",a:"1.0"},{n:["frowning face","white frowning face"],u:"2639-fe0f",a:"0.7"},{n:["open mouth","face with open mouth"],u:"1f62e",a:"1.0"},{n:["hushed","hushed face"],u:"1f62f",a:"1.0"},{n:["astonished","astonished face"],u:"1f632",a:"0.6"},{n:["flushed","flushed face"],u:"1f633",a:"0.6"},{n:["pleading face","face with pleading eyes"],u:"1f97a",a:"11.0"},{n:["face holding back tears"],u:"1f979",a:"14.0"},{n:["frowning","frowning face with open mouth"],u:"1f626",a:"1.0"},{n:["anguished","anguished face"],u:"1f627",a:"1.0"},{n:["fearful","fearful face"],u:"1f628",a:"0.6"},{n:["cold sweat","face with open mouth and cold sweat"],u:"1f630",a:"0.6"},{n:["disappointed relieved","disappointed but relieved face"],u:"1f625",a:"0.6"},{n:["cry","crying face"],u:"1f622",a:"0.6"},{n:["sob","loudly crying face"],u:"1f62d",a:"0.6"},{n:["scream","face screaming in fear"],u:"1f631",a:"0.6"},{n:["confounded","confounded face"],u:"1f616",a:"0.6"},{n:["persevere","persevering face"],u:"1f623",a:"0.6"},{n:["disappointed","disappointed face"],u:"1f61e",a:"0.6"},{n:["sweat","face with cold sweat"],u:"1f613",a:"0.6"},{n:["weary","weary face"],u:"1f629",a:"0.6"},{n:["tired face"],u:"1f62b",a:"0.6"},{n:["yawning face"],u:"1f971",a:"12.0"},{n:["triumph","face with look of triumph"],u:"1f624",a:"0.6"},{n:["rage","pouting face"],u:"1f621",a:"0.6"},{n:["angry","angry face"],u:"1f620",a:"0.6"},{n:["face with symbols on mouth","serious face with symbols covering mouth"],u:"1f92c",a:"5.0"},{n:["smiling imp","smiling face with horns"],u:"1f608",a:"1.0"},{n:["imp"],u:"1f47f",a:"0.6"},{n:["skull"],u:"1f480",a:"0.6"},{n:["skull and crossbones"],u:"2620-fe0f",a:"1.0"},{n:["poop","shit","hankey","pile of poo"],u:"1f4a9",a:"0.6"},{n:["clown face"],u:"1f921",a:"3.0"},{n:["japanese ogre"],u:"1f479",a:"0.6"},{n:["japanese goblin"],u:"1f47a",a:"0.6"},{n:["ghost"],u:"1f47b",a:"0.6"},{n:["alien","extraterrestrial alien"],u:"1f47d",a:"0.6"},{n:["alien monster","space invader"],u:"1f47e",a:"0.6"},{n:["robot face"],u:"1f916",a:"1.0"},{n:["smiley cat","smiling cat face with open mouth"],u:"1f63a",a:"0.6"},{n:["smile cat","grinning cat face with smiling eyes"],u:"1f638",a:"0.6"},{n:["joy cat","cat face with tears of joy"],u:"1f639",a:"0.6"},{n:["heart eyes cat","smiling cat face with heart-shaped eyes"],u:"1f63b",a:"0.6"},{n:["smirk cat","cat face with wry smile"],u:"1f63c",a:"0.6"},{n:["kissing cat","kissing cat face with closed eyes"],u:"1f63d",a:"0.6"},{n:["scream cat","weary cat face"],u:"1f640",a:"0.6"},{n:["crying cat face"],u:"1f63f",a:"0.6"},{n:["pouting cat","pouting cat face"],u:"1f63e",a:"0.6"},{n:["see no evil","see-no-evil monkey"],u:"1f648",a:"0.6"},{n:["hear no evil","hear-no-evil monkey"],u:"1f649",a:"0.6"},{n:["speak no evil","speak-no-evil monkey"],u:"1f64a",a:"0.6"},{n:["kiss","kiss mark"],u:"1f48b",a:"0.6"},{n:["love letter"],u:"1f48c",a:"0.6"},{n:["cupid","heart with arrow"],u:"1f498",a:"0.6"},{n:["gift heart","heart with ribbon"],u:"1f49d",a:"0.6"},{n:["sparkling heart"],u:"1f496",a:"0.6"},{n:["heartpulse","growing heart"],u:"1f497",a:"0.6"},{n:["heartbeat","beating heart"],u:"1f493",a:"0.6"},{n:["revolving hearts"],u:"1f49e",a:"0.6"},{n:["two hearts"],u:"1f495",a:"0.6"},{n:["heart decoration"],u:"1f49f",a:"0.6"},{n:["heart exclamation","heavy heart exclamation mark ornament"],u:"2763-fe0f",a:"1.0"},{n:["broken heart"],u:"1f494",a:"0.6"},{n:["heart on fire"],u:"2764-fe0f-200d-1f525",a:"13.1"},{n:["mending heart"],u:"2764-fe0f-200d-1fa79",a:"13.1"},{n:["heart","heavy black heart"],u:"2764-fe0f",a:"0.6"},{n:["orange heart"],u:"1f9e1",a:"5.0"},{n:["yellow heart"],u:"1f49b",a:"0.6"},{n:["green heart"],u:"1f49a",a:"0.6"},{n:["blue heart"],u:"1f499",a:"0.6"},{n:["purple heart"],u:"1f49c",a:"0.6"},{n:["brown heart"],u:"1f90e",a:"12.0"},{n:["black heart"],u:"1f5a4",a:"3.0"},{n:["white heart"],u:"1f90d",a:"12.0"},{n:["100","hundred points symbol"],u:"1f4af",a:"0.6"},{n:["anger","anger symbol"],u:"1f4a2",a:"0.6"},{n:["boom","collision","collision symbol"],u:"1f4a5",a:"0.6"},{n:["dizzy","dizzy symbol"],u:"1f4ab",a:"0.6"},{n:["sweat drops","splashing sweat symbol"],u:"1f4a6",a:"0.6"},{n:["dash","dash symbol"],u:"1f4a8",a:"0.6"},{n:["hole"],u:"1f573-fe0f",a:"0.7"},{n:["bomb"],u:"1f4a3",a:"0.6"},{n:["speech balloon"],u:"1f4ac",a:"0.6"},{n:["eye in speech bubble","eye-in-speech-bubble"],u:"1f441-fe0f-200d-1f5e8-fe0f",a:"2.0"},{n:["left speech bubble"],u:"1f5e8-fe0f",a:"2.0"},{n:["right anger bubble"],u:"1f5ef-fe0f",a:"0.7"},{n:["thought balloon"],u:"1f4ad",a:"1.0"},{n:["zzz","sleeping symbol"],u:"1f4a4",a:"0.6"},{n:["wave","waving hand sign"],u:"1f44b",v:["1f44b-1f3fb","1f44b-1f3fc","1f44b-1f3fd","1f44b-1f3fe","1f44b-1f3ff"],a:"0.6"},{n:["raised back of hand"],u:"1f91a",v:["1f91a-1f3fb","1f91a-1f3fc","1f91a-1f3fd","1f91a-1f3fe","1f91a-1f3ff"],a:"3.0"},{n:["hand with fingers splayed","raised hand with fingers splayed"],u:"1f590-fe0f",v:["1f590-1f3fb","1f590-1f3fc","1f590-1f3fd","1f590-1f3fe","1f590-1f3ff"],a:"0.7"},{n:["hand","raised hand"],u:"270b",v:["270b-1f3fb","270b-1f3fc","270b-1f3fd","270b-1f3fe","270b-1f3ff"],a:"0.6"},{n:["spock-hand","raised hand with part between middle and ring fingers"],u:"1f596",v:["1f596-1f3fb","1f596-1f3fc","1f596-1f3fd","1f596-1f3fe","1f596-1f3ff"],a:"1.0"},{n:["rightwards hand"],u:"1faf1",v:["1faf1-1f3fb","1faf1-1f3fc","1faf1-1f3fd","1faf1-1f3fe","1faf1-1f3ff"],a:"14.0"},{n:["leftwards hand"],u:"1faf2",v:["1faf2-1f3fb","1faf2-1f3fc","1faf2-1f3fd","1faf2-1f3fe","1faf2-1f3ff"],a:"14.0"},{n:["palm down hand"],u:"1faf3",v:["1faf3-1f3fb","1faf3-1f3fc","1faf3-1f3fd","1faf3-1f3fe","1faf3-1f3ff"],a:"14.0"},{n:["palm up hand"],u:"1faf4",v:["1faf4-1f3fb","1faf4-1f3fc","1faf4-1f3fd","1faf4-1f3fe","1faf4-1f3ff"],a:"14.0"},{n:["ok hand","ok hand sign"],u:"1f44c",v:["1f44c-1f3fb","1f44c-1f3fc","1f44c-1f3fd","1f44c-1f3fe","1f44c-1f3ff"],a:"0.6"},{n:["pinched fingers"],u:"1f90c",v:["1f90c-1f3fb","1f90c-1f3fc","1f90c-1f3fd","1f90c-1f3fe","1f90c-1f3ff"],a:"13.0"},{n:["pinching hand"],u:"1f90f",v:["1f90f-1f3fb","1f90f-1f3fc","1f90f-1f3fd","1f90f-1f3fe","1f90f-1f3ff"],a:"12.0"},{n:["v","victory hand"],u:"270c-fe0f",v:["270c-1f3fb","270c-1f3fc","270c-1f3fd","270c-1f3fe","270c-1f3ff"],a:"0.6"},{n:["crossed fingers","hand with index and middle fingers crossed"],u:"1f91e",v:["1f91e-1f3fb","1f91e-1f3fc","1f91e-1f3fd","1f91e-1f3fe","1f91e-1f3ff"],a:"3.0"},{n:["hand with index finger and thumb crossed"],u:"1faf0",v:["1faf0-1f3fb","1faf0-1f3fc","1faf0-1f3fd","1faf0-1f3fe","1faf0-1f3ff"],a:"14.0"},{n:["i love you hand sign"],u:"1f91f",v:["1f91f-1f3fb","1f91f-1f3fc","1f91f-1f3fd","1f91f-1f3fe","1f91f-1f3ff"],a:"5.0"},{n:["the horns","sign of the horns"],u:"1f918",v:["1f918-1f3fb","1f918-1f3fc","1f918-1f3fd","1f918-1f3fe","1f918-1f3ff"],a:"1.0"},{n:["call me hand"],u:"1f919",v:["1f919-1f3fb","1f919-1f3fc","1f919-1f3fd","1f919-1f3fe","1f919-1f3ff"],a:"3.0"},{n:["point left","white left pointing backhand index"],u:"1f448",v:["1f448-1f3fb","1f448-1f3fc","1f448-1f3fd","1f448-1f3fe","1f448-1f3ff"],a:"0.6"},{n:["point right","white right pointing backhand index"],u:"1f449",v:["1f449-1f3fb","1f449-1f3fc","1f449-1f3fd","1f449-1f3fe","1f449-1f3ff"],a:"0.6"},{n:["point up 2","white up pointing backhand index"],u:"1f446",v:["1f446-1f3fb","1f446-1f3fc","1f446-1f3fd","1f446-1f3fe","1f446-1f3ff"],a:"0.6"},{n:["middle finger","reversed hand with middle finger extended"],u:"1f595",v:["1f595-1f3fb","1f595-1f3fc","1f595-1f3fd","1f595-1f3fe","1f595-1f3ff"],a:"1.0"},{n:["point down","white down pointing backhand index"],u:"1f447",v:["1f447-1f3fb","1f447-1f3fc","1f447-1f3fd","1f447-1f3fe","1f447-1f3ff"],a:"0.6"},{n:["point up","white up pointing index"],u:"261d-fe0f",v:["261d-1f3fb","261d-1f3fc","261d-1f3fd","261d-1f3fe","261d-1f3ff"],a:"0.6"},{n:["index pointing at the viewer"],u:"1faf5",v:["1faf5-1f3fb","1faf5-1f3fc","1faf5-1f3fd","1faf5-1f3fe","1faf5-1f3ff"],a:"14.0"},{n:["+1","thumbsup","thumbs up sign"],u:"1f44d",v:["1f44d-1f3fb","1f44d-1f3fc","1f44d-1f3fd","1f44d-1f3fe","1f44d-1f3ff"],a:"0.6"},{n:["-1","thumbsdown","thumbs down sign"],u:"1f44e",v:["1f44e-1f3fb","1f44e-1f3fc","1f44e-1f3fd","1f44e-1f3fe","1f44e-1f3ff"],a:"0.6"},{n:["fist","raised fist"],u:"270a",v:["270a-1f3fb","270a-1f3fc","270a-1f3fd","270a-1f3fe","270a-1f3ff"],a:"0.6"},{n:["punch","facepunch","fisted hand sign"],u:"1f44a",v:["1f44a-1f3fb","1f44a-1f3fc","1f44a-1f3fd","1f44a-1f3fe","1f44a-1f3ff"],a:"0.6"},{n:["left-facing fist"],u:"1f91b",v:["1f91b-1f3fb","1f91b-1f3fc","1f91b-1f3fd","1f91b-1f3fe","1f91b-1f3ff"],a:"3.0"},{n:["right-facing fist"],u:"1f91c",v:["1f91c-1f3fb","1f91c-1f3fc","1f91c-1f3fd","1f91c-1f3fe","1f91c-1f3ff"],a:"3.0"},{n:["clap","clapping hands sign"],u:"1f44f",v:["1f44f-1f3fb","1f44f-1f3fc","1f44f-1f3fd","1f44f-1f3fe","1f44f-1f3ff"],a:"0.6"},{n:["raised hands","person raising both hands in celebration"],u:"1f64c",v:["1f64c-1f3fb","1f64c-1f3fc","1f64c-1f3fd","1f64c-1f3fe","1f64c-1f3ff"],a:"0.6"},{n:["heart hands"],u:"1faf6",v:["1faf6-1f3fb","1faf6-1f3fc","1faf6-1f3fd","1faf6-1f3fe","1faf6-1f3ff"],a:"14.0"},{n:["open hands","open hands sign"],u:"1f450",v:["1f450-1f3fb","1f450-1f3fc","1f450-1f3fd","1f450-1f3fe","1f450-1f3ff"],a:"0.6"},{n:["palms up together"],u:"1f932",v:["1f932-1f3fb","1f932-1f3fc","1f932-1f3fd","1f932-1f3fe","1f932-1f3ff"],a:"5.0"},{n:["handshake"],u:"1f91d",v:["1f91d-1f3fb","1f91d-1f3fc","1f91d-1f3fd","1f91d-1f3fe","1f91d-1f3ff","1faf1-1f3fb-200d-1faf2-1f3fc","1faf1-1f3fb-200d-1faf2-1f3fd","1faf1-1f3fb-200d-1faf2-1f3fe","1faf1-1f3fb-200d-1faf2-1f3ff","1faf1-1f3fc-200d-1faf2-1f3fb","1faf1-1f3fc-200d-1faf2-1f3fd","1faf1-1f3fc-200d-1faf2-1f3fe","1faf1-1f3fc-200d-1faf2-1f3ff","1faf1-1f3fd-200d-1faf2-1f3fb","1faf1-1f3fd-200d-1faf2-1f3fc","1faf1-1f3fd-200d-1faf2-1f3fe","1faf1-1f3fd-200d-1faf2-1f3ff","1faf1-1f3fe-200d-1faf2-1f3fb","1faf1-1f3fe-200d-1faf2-1f3fc","1faf1-1f3fe-200d-1faf2-1f3fd","1faf1-1f3fe-200d-1faf2-1f3ff","1faf1-1f3ff-200d-1faf2-1f3fb","1faf1-1f3ff-200d-1faf2-1f3fc","1faf1-1f3ff-200d-1faf2-1f3fd","1faf1-1f3ff-200d-1faf2-1f3fe"],a:"3.0"},{n:["pray","person with folded hands"],u:"1f64f",v:["1f64f-1f3fb","1f64f-1f3fc","1f64f-1f3fd","1f64f-1f3fe","1f64f-1f3ff"],a:"0.6"},{n:["writing hand"],u:"270d-fe0f",v:["270d-1f3fb","270d-1f3fc","270d-1f3fd","270d-1f3fe","270d-1f3ff"],a:"0.7"},{n:["nail care","nail polish"],u:"1f485",v:["1f485-1f3fb","1f485-1f3fc","1f485-1f3fd","1f485-1f3fe","1f485-1f3ff"],a:"0.6"},{n:["selfie"],u:"1f933",v:["1f933-1f3fb","1f933-1f3fc","1f933-1f3fd","1f933-1f3fe","1f933-1f3ff"],a:"3.0"},{n:["muscle","flexed biceps"],u:"1f4aa",v:["1f4aa-1f3fb","1f4aa-1f3fc","1f4aa-1f3fd","1f4aa-1f3fe","1f4aa-1f3ff"],a:"0.6"},{n:["mechanical arm"],u:"1f9be",a:"12.0"},{n:["mechanical leg"],u:"1f9bf",a:"12.0"},{n:["leg"],u:"1f9b5",v:["1f9b5-1f3fb","1f9b5-1f3fc","1f9b5-1f3fd","1f9b5-1f3fe","1f9b5-1f3ff"],a:"11.0"},{n:["foot"],u:"1f9b6",v:["1f9b6-1f3fb","1f9b6-1f3fc","1f9b6-1f3fd","1f9b6-1f3fe","1f9b6-1f3ff"],a:"11.0"},{n:["ear"],u:"1f442",v:["1f442-1f3fb","1f442-1f3fc","1f442-1f3fd","1f442-1f3fe","1f442-1f3ff"],a:"0.6"},{n:["ear with hearing aid"],u:"1f9bb",v:["1f9bb-1f3fb","1f9bb-1f3fc","1f9bb-1f3fd","1f9bb-1f3fe","1f9bb-1f3ff"],a:"12.0"},{n:["nose"],u:"1f443",v:["1f443-1f3fb","1f443-1f3fc","1f443-1f3fd","1f443-1f3fe","1f443-1f3ff"],a:"0.6"},{n:["brain"],u:"1f9e0",a:"5.0"},{n:["anatomical heart"],u:"1fac0",a:"13.0"},{n:["lungs"],u:"1fac1",a:"13.0"},{n:["tooth"],u:"1f9b7",a:"11.0"},{n:["bone"],u:"1f9b4",a:"11.0"},{n:["eyes"],u:"1f440",a:"0.6"},{n:["eye"],u:"1f441-fe0f",a:"0.7"},{n:["tongue"],u:"1f445",a:"0.6"},{n:["lips","mouth"],u:"1f444",a:"0.6"},{n:["biting lip"],u:"1fae6",a:"14.0"},{n:["baby"],u:"1f476",v:["1f476-1f3fb","1f476-1f3fc","1f476-1f3fd","1f476-1f3fe","1f476-1f3ff"],a:"0.6"},{n:["child"],u:"1f9d2",v:["1f9d2-1f3fb","1f9d2-1f3fc","1f9d2-1f3fd","1f9d2-1f3fe","1f9d2-1f3ff"],a:"5.0"},{n:["boy"],u:"1f466",v:["1f466-1f3fb","1f466-1f3fc","1f466-1f3fd","1f466-1f3fe","1f466-1f3ff"],a:"0.6"},{n:["girl"],u:"1f467",v:["1f467-1f3fb","1f467-1f3fc","1f467-1f3fd","1f467-1f3fe","1f467-1f3ff"],a:"0.6"},{n:["adult"],u:"1f9d1",v:["1f9d1-1f3fb","1f9d1-1f3fc","1f9d1-1f3fd","1f9d1-1f3fe","1f9d1-1f3ff"],a:"5.0"},{n:["person with blond hair"],u:"1f471",v:["1f471-1f3fb","1f471-1f3fc","1f471-1f3fd","1f471-1f3fe","1f471-1f3ff"],a:"0.6"},{n:["man"],u:"1f468",v:["1f468-1f3fb","1f468-1f3fc","1f468-1f3fd","1f468-1f3fe","1f468-1f3ff"],a:"0.6"},{n:["bearded person"],u:"1f9d4",v:["1f9d4-1f3fb","1f9d4-1f3fc","1f9d4-1f3fd","1f9d4-1f3fe","1f9d4-1f3ff"],a:"5.0"},{n:["man: beard","man with beard"],u:"1f9d4-200d-2642-fe0f",v:["1f9d4-1f3fb-200d-2642-fe0f","1f9d4-1f3fc-200d-2642-fe0f","1f9d4-1f3fd-200d-2642-fe0f","1f9d4-1f3fe-200d-2642-fe0f","1f9d4-1f3ff-200d-2642-fe0f"],a:"13.1"},{n:["woman: beard","woman with beard"],u:"1f9d4-200d-2640-fe0f",v:["1f9d4-1f3fb-200d-2640-fe0f","1f9d4-1f3fc-200d-2640-fe0f","1f9d4-1f3fd-200d-2640-fe0f","1f9d4-1f3fe-200d-2640-fe0f","1f9d4-1f3ff-200d-2640-fe0f"],a:"13.1"},{n:["man: red hair","red haired man"],u:"1f468-200d-1f9b0",v:["1f468-1f3fb-200d-1f9b0","1f468-1f3fc-200d-1f9b0","1f468-1f3fd-200d-1f9b0","1f468-1f3fe-200d-1f9b0","1f468-1f3ff-200d-1f9b0"],a:"11.0"},{n:["man: curly hair","curly haired man"],u:"1f468-200d-1f9b1",v:["1f468-1f3fb-200d-1f9b1","1f468-1f3fc-200d-1f9b1","1f468-1f3fd-200d-1f9b1","1f468-1f3fe-200d-1f9b1","1f468-1f3ff-200d-1f9b1"],a:"11.0"},{n:["man: white hair","white haired man"],u:"1f468-200d-1f9b3",v:["1f468-1f3fb-200d-1f9b3","1f468-1f3fc-200d-1f9b3","1f468-1f3fd-200d-1f9b3","1f468-1f3fe-200d-1f9b3","1f468-1f3ff-200d-1f9b3"],a:"11.0"},{n:["bald man","man: bald"],u:"1f468-200d-1f9b2",v:["1f468-1f3fb-200d-1f9b2","1f468-1f3fc-200d-1f9b2","1f468-1f3fd-200d-1f9b2","1f468-1f3fe-200d-1f9b2","1f468-1f3ff-200d-1f9b2"],a:"11.0"},{n:["woman"],u:"1f469",v:["1f469-1f3fb","1f469-1f3fc","1f469-1f3fd","1f469-1f3fe","1f469-1f3ff"],a:"0.6"},{n:["woman: red hair","red haired woman"],u:"1f469-200d-1f9b0",v:["1f469-1f3fb-200d-1f9b0","1f469-1f3fc-200d-1f9b0","1f469-1f3fd-200d-1f9b0","1f469-1f3fe-200d-1f9b0","1f469-1f3ff-200d-1f9b0"],a:"11.0"},{n:["person: red hair","red haired person"],u:"1f9d1-200d-1f9b0",v:["1f9d1-1f3fb-200d-1f9b0","1f9d1-1f3fc-200d-1f9b0","1f9d1-1f3fd-200d-1f9b0","1f9d1-1f3fe-200d-1f9b0","1f9d1-1f3ff-200d-1f9b0"],a:"12.1"},{n:["woman: curly hair","curly haired woman"],u:"1f469-200d-1f9b1",v:["1f469-1f3fb-200d-1f9b1","1f469-1f3fc-200d-1f9b1","1f469-1f3fd-200d-1f9b1","1f469-1f3fe-200d-1f9b1","1f469-1f3ff-200d-1f9b1"],a:"11.0"},{n:["person: curly hair","curly haired person"],u:"1f9d1-200d-1f9b1",v:["1f9d1-1f3fb-200d-1f9b1","1f9d1-1f3fc-200d-1f9b1","1f9d1-1f3fd-200d-1f9b1","1f9d1-1f3fe-200d-1f9b1","1f9d1-1f3ff-200d-1f9b1"],a:"12.1"},{n:["woman: white hair","white haired woman"],u:"1f469-200d-1f9b3",v:["1f469-1f3fb-200d-1f9b3","1f469-1f3fc-200d-1f9b3","1f469-1f3fd-200d-1f9b3","1f469-1f3fe-200d-1f9b3","1f469-1f3ff-200d-1f9b3"],a:"11.0"},{n:["person: white hair","white haired person"],u:"1f9d1-200d-1f9b3",v:["1f9d1-1f3fb-200d-1f9b3","1f9d1-1f3fc-200d-1f9b3","1f9d1-1f3fd-200d-1f9b3","1f9d1-1f3fe-200d-1f9b3","1f9d1-1f3ff-200d-1f9b3"],a:"12.1"},{n:["bald woman","woman: bald"],u:"1f469-200d-1f9b2",v:["1f469-1f3fb-200d-1f9b2","1f469-1f3fc-200d-1f9b2","1f469-1f3fd-200d-1f9b2","1f469-1f3fe-200d-1f9b2","1f469-1f3ff-200d-1f9b2"],a:"11.0"},{n:["bald person","person: bald"],u:"1f9d1-200d-1f9b2",v:["1f9d1-1f3fb-200d-1f9b2","1f9d1-1f3fc-200d-1f9b2","1f9d1-1f3fd-200d-1f9b2","1f9d1-1f3fe-200d-1f9b2","1f9d1-1f3ff-200d-1f9b2"],a:"12.1"},{n:["woman: blond hair","blond-haired-woman"],u:"1f471-200d-2640-fe0f",v:["1f471-1f3fb-200d-2640-fe0f","1f471-1f3fc-200d-2640-fe0f","1f471-1f3fd-200d-2640-fe0f","1f471-1f3fe-200d-2640-fe0f","1f471-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["man: blond hair","blond-haired-man"],u:"1f471-200d-2642-fe0f",v:["1f471-1f3fb-200d-2642-fe0f","1f471-1f3fc-200d-2642-fe0f","1f471-1f3fd-200d-2642-fe0f","1f471-1f3fe-200d-2642-fe0f","1f471-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["older adult"],u:"1f9d3",v:["1f9d3-1f3fb","1f9d3-1f3fc","1f9d3-1f3fd","1f9d3-1f3fe","1f9d3-1f3ff"],a:"5.0"},{n:["older man"],u:"1f474",v:["1f474-1f3fb","1f474-1f3fc","1f474-1f3fd","1f474-1f3fe","1f474-1f3ff"],a:"0.6"},{n:["older woman"],u:"1f475",v:["1f475-1f3fb","1f475-1f3fc","1f475-1f3fd","1f475-1f3fe","1f475-1f3ff"],a:"0.6"},{n:["person frowning"],u:"1f64d",v:["1f64d-1f3fb","1f64d-1f3fc","1f64d-1f3fd","1f64d-1f3fe","1f64d-1f3ff"],a:"0.6"},{n:["man frowning","man-frowning"],u:"1f64d-200d-2642-fe0f",v:["1f64d-1f3fb-200d-2642-fe0f","1f64d-1f3fc-200d-2642-fe0f","1f64d-1f3fd-200d-2642-fe0f","1f64d-1f3fe-200d-2642-fe0f","1f64d-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman frowning","woman-frowning"],u:"1f64d-200d-2640-fe0f",v:["1f64d-1f3fb-200d-2640-fe0f","1f64d-1f3fc-200d-2640-fe0f","1f64d-1f3fd-200d-2640-fe0f","1f64d-1f3fe-200d-2640-fe0f","1f64d-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with pouting face"],u:"1f64e",v:["1f64e-1f3fb","1f64e-1f3fc","1f64e-1f3fd","1f64e-1f3fe","1f64e-1f3ff"],a:"0.6"},{n:["man pouting","man-pouting"],u:"1f64e-200d-2642-fe0f",v:["1f64e-1f3fb-200d-2642-fe0f","1f64e-1f3fc-200d-2642-fe0f","1f64e-1f3fd-200d-2642-fe0f","1f64e-1f3fe-200d-2642-fe0f","1f64e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman pouting","woman-pouting"],u:"1f64e-200d-2640-fe0f",v:["1f64e-1f3fb-200d-2640-fe0f","1f64e-1f3fc-200d-2640-fe0f","1f64e-1f3fd-200d-2640-fe0f","1f64e-1f3fe-200d-2640-fe0f","1f64e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["no good","face with no good gesture"],u:"1f645",v:["1f645-1f3fb","1f645-1f3fc","1f645-1f3fd","1f645-1f3fe","1f645-1f3ff"],a:"0.6"},{n:["man gesturing no","man-gesturing-no"],u:"1f645-200d-2642-fe0f",v:["1f645-1f3fb-200d-2642-fe0f","1f645-1f3fc-200d-2642-fe0f","1f645-1f3fd-200d-2642-fe0f","1f645-1f3fe-200d-2642-fe0f","1f645-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman gesturing no","woman-gesturing-no"],u:"1f645-200d-2640-fe0f",v:["1f645-1f3fb-200d-2640-fe0f","1f645-1f3fc-200d-2640-fe0f","1f645-1f3fd-200d-2640-fe0f","1f645-1f3fe-200d-2640-fe0f","1f645-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["ok woman","face with ok gesture"],u:"1f646",v:["1f646-1f3fb","1f646-1f3fc","1f646-1f3fd","1f646-1f3fe","1f646-1f3ff"],a:"0.6"},{n:["man gesturing ok","man-gesturing-ok"],u:"1f646-200d-2642-fe0f",v:["1f646-1f3fb-200d-2642-fe0f","1f646-1f3fc-200d-2642-fe0f","1f646-1f3fd-200d-2642-fe0f","1f646-1f3fe-200d-2642-fe0f","1f646-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman gesturing ok","woman-gesturing-ok"],u:"1f646-200d-2640-fe0f",v:["1f646-1f3fb-200d-2640-fe0f","1f646-1f3fc-200d-2640-fe0f","1f646-1f3fd-200d-2640-fe0f","1f646-1f3fe-200d-2640-fe0f","1f646-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["information desk person"],u:"1f481",v:["1f481-1f3fb","1f481-1f3fc","1f481-1f3fd","1f481-1f3fe","1f481-1f3ff"],a:"0.6"},{n:["man tipping hand","man-tipping-hand"],u:"1f481-200d-2642-fe0f",v:["1f481-1f3fb-200d-2642-fe0f","1f481-1f3fc-200d-2642-fe0f","1f481-1f3fd-200d-2642-fe0f","1f481-1f3fe-200d-2642-fe0f","1f481-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman tipping hand","woman-tipping-hand"],u:"1f481-200d-2640-fe0f",v:["1f481-1f3fb-200d-2640-fe0f","1f481-1f3fc-200d-2640-fe0f","1f481-1f3fd-200d-2640-fe0f","1f481-1f3fe-200d-2640-fe0f","1f481-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["raising hand","happy person raising one hand"],u:"1f64b",v:["1f64b-1f3fb","1f64b-1f3fc","1f64b-1f3fd","1f64b-1f3fe","1f64b-1f3ff"],a:"0.6"},{n:["man raising hand","man-raising-hand"],u:"1f64b-200d-2642-fe0f",v:["1f64b-1f3fb-200d-2642-fe0f","1f64b-1f3fc-200d-2642-fe0f","1f64b-1f3fd-200d-2642-fe0f","1f64b-1f3fe-200d-2642-fe0f","1f64b-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman raising hand","woman-raising-hand"],u:"1f64b-200d-2640-fe0f",v:["1f64b-1f3fb-200d-2640-fe0f","1f64b-1f3fc-200d-2640-fe0f","1f64b-1f3fd-200d-2640-fe0f","1f64b-1f3fe-200d-2640-fe0f","1f64b-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["deaf person"],u:"1f9cf",v:["1f9cf-1f3fb","1f9cf-1f3fc","1f9cf-1f3fd","1f9cf-1f3fe","1f9cf-1f3ff"],a:"12.0"},{n:["deaf man"],u:"1f9cf-200d-2642-fe0f",v:["1f9cf-1f3fb-200d-2642-fe0f","1f9cf-1f3fc-200d-2642-fe0f","1f9cf-1f3fd-200d-2642-fe0f","1f9cf-1f3fe-200d-2642-fe0f","1f9cf-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["deaf woman"],u:"1f9cf-200d-2640-fe0f",v:["1f9cf-1f3fb-200d-2640-fe0f","1f9cf-1f3fc-200d-2640-fe0f","1f9cf-1f3fd-200d-2640-fe0f","1f9cf-1f3fe-200d-2640-fe0f","1f9cf-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["bow","person bowing deeply"],u:"1f647",v:["1f647-1f3fb","1f647-1f3fc","1f647-1f3fd","1f647-1f3fe","1f647-1f3ff"],a:"0.6"},{n:["man bowing","man-bowing"],u:"1f647-200d-2642-fe0f",v:["1f647-1f3fb-200d-2642-fe0f","1f647-1f3fc-200d-2642-fe0f","1f647-1f3fd-200d-2642-fe0f","1f647-1f3fe-200d-2642-fe0f","1f647-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman bowing","woman-bowing"],u:"1f647-200d-2640-fe0f",v:["1f647-1f3fb-200d-2640-fe0f","1f647-1f3fc-200d-2640-fe0f","1f647-1f3fd-200d-2640-fe0f","1f647-1f3fe-200d-2640-fe0f","1f647-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["face palm"],u:"1f926",v:["1f926-1f3fb","1f926-1f3fc","1f926-1f3fd","1f926-1f3fe","1f926-1f3ff"],a:"3.0"},{n:["man facepalming","man-facepalming"],u:"1f926-200d-2642-fe0f",v:["1f926-1f3fb-200d-2642-fe0f","1f926-1f3fc-200d-2642-fe0f","1f926-1f3fd-200d-2642-fe0f","1f926-1f3fe-200d-2642-fe0f","1f926-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman facepalming","woman-facepalming"],u:"1f926-200d-2640-fe0f",v:["1f926-1f3fb-200d-2640-fe0f","1f926-1f3fc-200d-2640-fe0f","1f926-1f3fd-200d-2640-fe0f","1f926-1f3fe-200d-2640-fe0f","1f926-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["shrug"],u:"1f937",v:["1f937-1f3fb","1f937-1f3fc","1f937-1f3fd","1f937-1f3fe","1f937-1f3ff"],a:"3.0"},{n:["man shrugging","man-shrugging"],u:"1f937-200d-2642-fe0f",v:["1f937-1f3fb-200d-2642-fe0f","1f937-1f3fc-200d-2642-fe0f","1f937-1f3fd-200d-2642-fe0f","1f937-1f3fe-200d-2642-fe0f","1f937-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman shrugging","woman-shrugging"],u:"1f937-200d-2640-fe0f",v:["1f937-1f3fb-200d-2640-fe0f","1f937-1f3fc-200d-2640-fe0f","1f937-1f3fd-200d-2640-fe0f","1f937-1f3fe-200d-2640-fe0f","1f937-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["health worker"],u:"1f9d1-200d-2695-fe0f",v:["1f9d1-1f3fb-200d-2695-fe0f","1f9d1-1f3fc-200d-2695-fe0f","1f9d1-1f3fd-200d-2695-fe0f","1f9d1-1f3fe-200d-2695-fe0f","1f9d1-1f3ff-200d-2695-fe0f"],a:"12.1"},{n:["male-doctor","man health worker"],u:"1f468-200d-2695-fe0f",v:["1f468-1f3fb-200d-2695-fe0f","1f468-1f3fc-200d-2695-fe0f","1f468-1f3fd-200d-2695-fe0f","1f468-1f3fe-200d-2695-fe0f","1f468-1f3ff-200d-2695-fe0f"],a:"4.0"},{n:["female-doctor","woman health worker"],u:"1f469-200d-2695-fe0f",v:["1f469-1f3fb-200d-2695-fe0f","1f469-1f3fc-200d-2695-fe0f","1f469-1f3fd-200d-2695-fe0f","1f469-1f3fe-200d-2695-fe0f","1f469-1f3ff-200d-2695-fe0f"],a:"4.0"},{n:["student"],u:"1f9d1-200d-1f393",v:["1f9d1-1f3fb-200d-1f393","1f9d1-1f3fc-200d-1f393","1f9d1-1f3fd-200d-1f393","1f9d1-1f3fe-200d-1f393","1f9d1-1f3ff-200d-1f393"],a:"12.1"},{n:["man student","male-student"],u:"1f468-200d-1f393",v:["1f468-1f3fb-200d-1f393","1f468-1f3fc-200d-1f393","1f468-1f3fd-200d-1f393","1f468-1f3fe-200d-1f393","1f468-1f3ff-200d-1f393"],a:"4.0"},{n:["woman student","female-student"],u:"1f469-200d-1f393",v:["1f469-1f3fb-200d-1f393","1f469-1f3fc-200d-1f393","1f469-1f3fd-200d-1f393","1f469-1f3fe-200d-1f393","1f469-1f3ff-200d-1f393"],a:"4.0"},{n:["teacher"],u:"1f9d1-200d-1f3eb",v:["1f9d1-1f3fb-200d-1f3eb","1f9d1-1f3fc-200d-1f3eb","1f9d1-1f3fd-200d-1f3eb","1f9d1-1f3fe-200d-1f3eb","1f9d1-1f3ff-200d-1f3eb"],a:"12.1"},{n:["man teacher","male-teacher"],u:"1f468-200d-1f3eb",v:["1f468-1f3fb-200d-1f3eb","1f468-1f3fc-200d-1f3eb","1f468-1f3fd-200d-1f3eb","1f468-1f3fe-200d-1f3eb","1f468-1f3ff-200d-1f3eb"],a:"4.0"},{n:["woman teacher","female-teacher"],u:"1f469-200d-1f3eb",v:["1f469-1f3fb-200d-1f3eb","1f469-1f3fc-200d-1f3eb","1f469-1f3fd-200d-1f3eb","1f469-1f3fe-200d-1f3eb","1f469-1f3ff-200d-1f3eb"],a:"4.0"},{n:["judge"],u:"1f9d1-200d-2696-fe0f",v:["1f9d1-1f3fb-200d-2696-fe0f","1f9d1-1f3fc-200d-2696-fe0f","1f9d1-1f3fd-200d-2696-fe0f","1f9d1-1f3fe-200d-2696-fe0f","1f9d1-1f3ff-200d-2696-fe0f"],a:"12.1"},{n:["man judge","male-judge"],u:"1f468-200d-2696-fe0f",v:["1f468-1f3fb-200d-2696-fe0f","1f468-1f3fc-200d-2696-fe0f","1f468-1f3fd-200d-2696-fe0f","1f468-1f3fe-200d-2696-fe0f","1f468-1f3ff-200d-2696-fe0f"],a:"4.0"},{n:["woman judge","female-judge"],u:"1f469-200d-2696-fe0f",v:["1f469-1f3fb-200d-2696-fe0f","1f469-1f3fc-200d-2696-fe0f","1f469-1f3fd-200d-2696-fe0f","1f469-1f3fe-200d-2696-fe0f","1f469-1f3ff-200d-2696-fe0f"],a:"4.0"},{n:["farmer"],u:"1f9d1-200d-1f33e",v:["1f9d1-1f3fb-200d-1f33e","1f9d1-1f3fc-200d-1f33e","1f9d1-1f3fd-200d-1f33e","1f9d1-1f3fe-200d-1f33e","1f9d1-1f3ff-200d-1f33e"],a:"12.1"},{n:["man farmer","male-farmer"],u:"1f468-200d-1f33e",v:["1f468-1f3fb-200d-1f33e","1f468-1f3fc-200d-1f33e","1f468-1f3fd-200d-1f33e","1f468-1f3fe-200d-1f33e","1f468-1f3ff-200d-1f33e"],a:"4.0"},{n:["woman farmer","female-farmer"],u:"1f469-200d-1f33e",v:["1f469-1f3fb-200d-1f33e","1f469-1f3fc-200d-1f33e","1f469-1f3fd-200d-1f33e","1f469-1f3fe-200d-1f33e","1f469-1f3ff-200d-1f33e"],a:"4.0"},{n:["cook"],u:"1f9d1-200d-1f373",v:["1f9d1-1f3fb-200d-1f373","1f9d1-1f3fc-200d-1f373","1f9d1-1f3fd-200d-1f373","1f9d1-1f3fe-200d-1f373","1f9d1-1f3ff-200d-1f373"],a:"12.1"},{n:["man cook","male-cook"],u:"1f468-200d-1f373",v:["1f468-1f3fb-200d-1f373","1f468-1f3fc-200d-1f373","1f468-1f3fd-200d-1f373","1f468-1f3fe-200d-1f373","1f468-1f3ff-200d-1f373"],a:"4.0"},{n:["woman cook","female-cook"],u:"1f469-200d-1f373",v:["1f469-1f3fb-200d-1f373","1f469-1f3fc-200d-1f373","1f469-1f3fd-200d-1f373","1f469-1f3fe-200d-1f373","1f469-1f3ff-200d-1f373"],a:"4.0"},{n:["mechanic"],u:"1f9d1-200d-1f527",v:["1f9d1-1f3fb-200d-1f527","1f9d1-1f3fc-200d-1f527","1f9d1-1f3fd-200d-1f527","1f9d1-1f3fe-200d-1f527","1f9d1-1f3ff-200d-1f527"],a:"12.1"},{n:["man mechanic","male-mechanic"],u:"1f468-200d-1f527",v:["1f468-1f3fb-200d-1f527","1f468-1f3fc-200d-1f527","1f468-1f3fd-200d-1f527","1f468-1f3fe-200d-1f527","1f468-1f3ff-200d-1f527"],a:"4.0"},{n:["woman mechanic","female-mechanic"],u:"1f469-200d-1f527",v:["1f469-1f3fb-200d-1f527","1f469-1f3fc-200d-1f527","1f469-1f3fd-200d-1f527","1f469-1f3fe-200d-1f527","1f469-1f3ff-200d-1f527"],a:"4.0"},{n:["factory worker"],u:"1f9d1-200d-1f3ed",v:["1f9d1-1f3fb-200d-1f3ed","1f9d1-1f3fc-200d-1f3ed","1f9d1-1f3fd-200d-1f3ed","1f9d1-1f3fe-200d-1f3ed","1f9d1-1f3ff-200d-1f3ed"],a:"12.1"},{n:["man factory worker","male-factory-worker"],u:"1f468-200d-1f3ed",v:["1f468-1f3fb-200d-1f3ed","1f468-1f3fc-200d-1f3ed","1f468-1f3fd-200d-1f3ed","1f468-1f3fe-200d-1f3ed","1f468-1f3ff-200d-1f3ed"],a:"4.0"},{n:["woman factory worker","female-factory-worker"],u:"1f469-200d-1f3ed",v:["1f469-1f3fb-200d-1f3ed","1f469-1f3fc-200d-1f3ed","1f469-1f3fd-200d-1f3ed","1f469-1f3fe-200d-1f3ed","1f469-1f3ff-200d-1f3ed"],a:"4.0"},{n:["office worker"],u:"1f9d1-200d-1f4bc",v:["1f9d1-1f3fb-200d-1f4bc","1f9d1-1f3fc-200d-1f4bc","1f9d1-1f3fd-200d-1f4bc","1f9d1-1f3fe-200d-1f4bc","1f9d1-1f3ff-200d-1f4bc"],a:"12.1"},{n:["man office worker","male-office-worker"],u:"1f468-200d-1f4bc",v:["1f468-1f3fb-200d-1f4bc","1f468-1f3fc-200d-1f4bc","1f468-1f3fd-200d-1f4bc","1f468-1f3fe-200d-1f4bc","1f468-1f3ff-200d-1f4bc"],a:"4.0"},{n:["woman office worker","female-office-worker"],u:"1f469-200d-1f4bc",v:["1f469-1f3fb-200d-1f4bc","1f469-1f3fc-200d-1f4bc","1f469-1f3fd-200d-1f4bc","1f469-1f3fe-200d-1f4bc","1f469-1f3ff-200d-1f4bc"],a:"4.0"},{n:["scientist"],u:"1f9d1-200d-1f52c",v:["1f9d1-1f3fb-200d-1f52c","1f9d1-1f3fc-200d-1f52c","1f9d1-1f3fd-200d-1f52c","1f9d1-1f3fe-200d-1f52c","1f9d1-1f3ff-200d-1f52c"],a:"12.1"},{n:["man scientist","male-scientist"],u:"1f468-200d-1f52c",v:["1f468-1f3fb-200d-1f52c","1f468-1f3fc-200d-1f52c","1f468-1f3fd-200d-1f52c","1f468-1f3fe-200d-1f52c","1f468-1f3ff-200d-1f52c"],a:"4.0"},{n:["woman scientist","female-scientist"],u:"1f469-200d-1f52c",v:["1f469-1f3fb-200d-1f52c","1f469-1f3fc-200d-1f52c","1f469-1f3fd-200d-1f52c","1f469-1f3fe-200d-1f52c","1f469-1f3ff-200d-1f52c"],a:"4.0"},{n:["technologist"],u:"1f9d1-200d-1f4bb",v:["1f9d1-1f3fb-200d-1f4bb","1f9d1-1f3fc-200d-1f4bb","1f9d1-1f3fd-200d-1f4bb","1f9d1-1f3fe-200d-1f4bb","1f9d1-1f3ff-200d-1f4bb"],a:"12.1"},{n:["man technologist","male-technologist"],u:"1f468-200d-1f4bb",v:["1f468-1f3fb-200d-1f4bb","1f468-1f3fc-200d-1f4bb","1f468-1f3fd-200d-1f4bb","1f468-1f3fe-200d-1f4bb","1f468-1f3ff-200d-1f4bb"],a:"4.0"},{n:["woman technologist","female-technologist"],u:"1f469-200d-1f4bb",v:["1f469-1f3fb-200d-1f4bb","1f469-1f3fc-200d-1f4bb","1f469-1f3fd-200d-1f4bb","1f469-1f3fe-200d-1f4bb","1f469-1f3ff-200d-1f4bb"],a:"4.0"},{n:["singer"],u:"1f9d1-200d-1f3a4",v:["1f9d1-1f3fb-200d-1f3a4","1f9d1-1f3fc-200d-1f3a4","1f9d1-1f3fd-200d-1f3a4","1f9d1-1f3fe-200d-1f3a4","1f9d1-1f3ff-200d-1f3a4"],a:"12.1"},{n:["man singer","male-singer"],u:"1f468-200d-1f3a4",v:["1f468-1f3fb-200d-1f3a4","1f468-1f3fc-200d-1f3a4","1f468-1f3fd-200d-1f3a4","1f468-1f3fe-200d-1f3a4","1f468-1f3ff-200d-1f3a4"],a:"4.0"},{n:["woman singer","female-singer"],u:"1f469-200d-1f3a4",v:["1f469-1f3fb-200d-1f3a4","1f469-1f3fc-200d-1f3a4","1f469-1f3fd-200d-1f3a4","1f469-1f3fe-200d-1f3a4","1f469-1f3ff-200d-1f3a4"],a:"4.0"},{n:["artist"],u:"1f9d1-200d-1f3a8",v:["1f9d1-1f3fb-200d-1f3a8","1f9d1-1f3fc-200d-1f3a8","1f9d1-1f3fd-200d-1f3a8","1f9d1-1f3fe-200d-1f3a8","1f9d1-1f3ff-200d-1f3a8"],a:"12.1"},{n:["man artist","male-artist"],u:"1f468-200d-1f3a8",v:["1f468-1f3fb-200d-1f3a8","1f468-1f3fc-200d-1f3a8","1f468-1f3fd-200d-1f3a8","1f468-1f3fe-200d-1f3a8","1f468-1f3ff-200d-1f3a8"],a:"4.0"},{n:["woman artist","female-artist"],u:"1f469-200d-1f3a8",v:["1f469-1f3fb-200d-1f3a8","1f469-1f3fc-200d-1f3a8","1f469-1f3fd-200d-1f3a8","1f469-1f3fe-200d-1f3a8","1f469-1f3ff-200d-1f3a8"],a:"4.0"},{n:["pilot"],u:"1f9d1-200d-2708-fe0f",v:["1f9d1-1f3fb-200d-2708-fe0f","1f9d1-1f3fc-200d-2708-fe0f","1f9d1-1f3fd-200d-2708-fe0f","1f9d1-1f3fe-200d-2708-fe0f","1f9d1-1f3ff-200d-2708-fe0f"],a:"12.1"},{n:["man pilot","male-pilot"],u:"1f468-200d-2708-fe0f",v:["1f468-1f3fb-200d-2708-fe0f","1f468-1f3fc-200d-2708-fe0f","1f468-1f3fd-200d-2708-fe0f","1f468-1f3fe-200d-2708-fe0f","1f468-1f3ff-200d-2708-fe0f"],a:"4.0"},{n:["woman pilot","female-pilot"],u:"1f469-200d-2708-fe0f",v:["1f469-1f3fb-200d-2708-fe0f","1f469-1f3fc-200d-2708-fe0f","1f469-1f3fd-200d-2708-fe0f","1f469-1f3fe-200d-2708-fe0f","1f469-1f3ff-200d-2708-fe0f"],a:"4.0"},{n:["astronaut"],u:"1f9d1-200d-1f680",v:["1f9d1-1f3fb-200d-1f680","1f9d1-1f3fc-200d-1f680","1f9d1-1f3fd-200d-1f680","1f9d1-1f3fe-200d-1f680","1f9d1-1f3ff-200d-1f680"],a:"12.1"},{n:["man astronaut","male-astronaut"],u:"1f468-200d-1f680",v:["1f468-1f3fb-200d-1f680","1f468-1f3fc-200d-1f680","1f468-1f3fd-200d-1f680","1f468-1f3fe-200d-1f680","1f468-1f3ff-200d-1f680"],a:"4.0"},{n:["woman astronaut","female-astronaut"],u:"1f469-200d-1f680",v:["1f469-1f3fb-200d-1f680","1f469-1f3fc-200d-1f680","1f469-1f3fd-200d-1f680","1f469-1f3fe-200d-1f680","1f469-1f3ff-200d-1f680"],a:"4.0"},{n:["firefighter"],u:"1f9d1-200d-1f692",v:["1f9d1-1f3fb-200d-1f692","1f9d1-1f3fc-200d-1f692","1f9d1-1f3fd-200d-1f692","1f9d1-1f3fe-200d-1f692","1f9d1-1f3ff-200d-1f692"],a:"12.1"},{n:["man firefighter","male-firefighter"],u:"1f468-200d-1f692",v:["1f468-1f3fb-200d-1f692","1f468-1f3fc-200d-1f692","1f468-1f3fd-200d-1f692","1f468-1f3fe-200d-1f692","1f468-1f3ff-200d-1f692"],a:"4.0"},{n:["woman firefighter","female-firefighter"],u:"1f469-200d-1f692",v:["1f469-1f3fb-200d-1f692","1f469-1f3fc-200d-1f692","1f469-1f3fd-200d-1f692","1f469-1f3fe-200d-1f692","1f469-1f3ff-200d-1f692"],a:"4.0"},{n:["cop","police officer"],u:"1f46e",v:["1f46e-1f3fb","1f46e-1f3fc","1f46e-1f3fd","1f46e-1f3fe","1f46e-1f3ff"],a:"0.6"},{n:["man police officer","male-police-officer"],u:"1f46e-200d-2642-fe0f",v:["1f46e-1f3fb-200d-2642-fe0f","1f46e-1f3fc-200d-2642-fe0f","1f46e-1f3fd-200d-2642-fe0f","1f46e-1f3fe-200d-2642-fe0f","1f46e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman police officer","female-police-officer"],u:"1f46e-200d-2640-fe0f",v:["1f46e-1f3fb-200d-2640-fe0f","1f46e-1f3fc-200d-2640-fe0f","1f46e-1f3fd-200d-2640-fe0f","1f46e-1f3fe-200d-2640-fe0f","1f46e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["detective","sleuth or spy"],u:"1f575-fe0f",v:["1f575-1f3fb","1f575-1f3fc","1f575-1f3fd","1f575-1f3fe","1f575-1f3ff"],a:"0.7"},{n:["man detective","male-detective"],u:"1f575-fe0f-200d-2642-fe0f",v:["1f575-1f3fb-200d-2642-fe0f","1f575-1f3fc-200d-2642-fe0f","1f575-1f3fd-200d-2642-fe0f","1f575-1f3fe-200d-2642-fe0f","1f575-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman detective","female-detective"],u:"1f575-fe0f-200d-2640-fe0f",v:["1f575-1f3fb-200d-2640-fe0f","1f575-1f3fc-200d-2640-fe0f","1f575-1f3fd-200d-2640-fe0f","1f575-1f3fe-200d-2640-fe0f","1f575-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["guardsman"],u:"1f482",v:["1f482-1f3fb","1f482-1f3fc","1f482-1f3fd","1f482-1f3fe","1f482-1f3ff"],a:"0.6"},{n:["man guard","male-guard"],u:"1f482-200d-2642-fe0f",v:["1f482-1f3fb-200d-2642-fe0f","1f482-1f3fc-200d-2642-fe0f","1f482-1f3fd-200d-2642-fe0f","1f482-1f3fe-200d-2642-fe0f","1f482-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman guard","female-guard"],u:"1f482-200d-2640-fe0f",v:["1f482-1f3fb-200d-2640-fe0f","1f482-1f3fc-200d-2640-fe0f","1f482-1f3fd-200d-2640-fe0f","1f482-1f3fe-200d-2640-fe0f","1f482-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["ninja"],u:"1f977",v:["1f977-1f3fb","1f977-1f3fc","1f977-1f3fd","1f977-1f3fe","1f977-1f3ff"],a:"13.0"},{n:["construction worker"],u:"1f477",v:["1f477-1f3fb","1f477-1f3fc","1f477-1f3fd","1f477-1f3fe","1f477-1f3ff"],a:"0.6"},{n:["man construction worker","male-construction-worker"],u:"1f477-200d-2642-fe0f",v:["1f477-1f3fb-200d-2642-fe0f","1f477-1f3fc-200d-2642-fe0f","1f477-1f3fd-200d-2642-fe0f","1f477-1f3fe-200d-2642-fe0f","1f477-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman construction worker","female-construction-worker"],u:"1f477-200d-2640-fe0f",v:["1f477-1f3fb-200d-2640-fe0f","1f477-1f3fc-200d-2640-fe0f","1f477-1f3fd-200d-2640-fe0f","1f477-1f3fe-200d-2640-fe0f","1f477-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with crown"],u:"1fac5",v:["1fac5-1f3fb","1fac5-1f3fc","1fac5-1f3fd","1fac5-1f3fe","1fac5-1f3ff"],a:"14.0"},{n:["prince"],u:"1f934",v:["1f934-1f3fb","1f934-1f3fc","1f934-1f3fd","1f934-1f3fe","1f934-1f3ff"],a:"3.0"},{n:["princess"],u:"1f478",v:["1f478-1f3fb","1f478-1f3fc","1f478-1f3fd","1f478-1f3fe","1f478-1f3ff"],a:"0.6"},{n:["man with turban"],u:"1f473",v:["1f473-1f3fb","1f473-1f3fc","1f473-1f3fd","1f473-1f3fe","1f473-1f3ff"],a:"0.6"},{n:["man wearing turban","man-wearing-turban"],u:"1f473-200d-2642-fe0f",v:["1f473-1f3fb-200d-2642-fe0f","1f473-1f3fc-200d-2642-fe0f","1f473-1f3fd-200d-2642-fe0f","1f473-1f3fe-200d-2642-fe0f","1f473-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman wearing turban","woman-wearing-turban"],u:"1f473-200d-2640-fe0f",v:["1f473-1f3fb-200d-2640-fe0f","1f473-1f3fc-200d-2640-fe0f","1f473-1f3fd-200d-2640-fe0f","1f473-1f3fe-200d-2640-fe0f","1f473-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["man with gua pi mao"],u:"1f472",v:["1f472-1f3fb","1f472-1f3fc","1f472-1f3fd","1f472-1f3fe","1f472-1f3ff"],a:"0.6"},{n:["person with headscarf"],u:"1f9d5",v:["1f9d5-1f3fb","1f9d5-1f3fc","1f9d5-1f3fd","1f9d5-1f3fe","1f9d5-1f3ff"],a:"5.0"},{n:["man in tuxedo","person in tuxedo"],u:"1f935",v:["1f935-1f3fb","1f935-1f3fc","1f935-1f3fd","1f935-1f3fe","1f935-1f3ff"],a:"3.0"},{n:["man in tuxedo"],u:"1f935-200d-2642-fe0f",v:["1f935-1f3fb-200d-2642-fe0f","1f935-1f3fc-200d-2642-fe0f","1f935-1f3fd-200d-2642-fe0f","1f935-1f3fe-200d-2642-fe0f","1f935-1f3ff-200d-2642-fe0f"],a:"13.0"},{n:["woman in tuxedo"],u:"1f935-200d-2640-fe0f",v:["1f935-1f3fb-200d-2640-fe0f","1f935-1f3fc-200d-2640-fe0f","1f935-1f3fd-200d-2640-fe0f","1f935-1f3fe-200d-2640-fe0f","1f935-1f3ff-200d-2640-fe0f"],a:"13.0"},{n:["bride with veil"],u:"1f470",v:["1f470-1f3fb","1f470-1f3fc","1f470-1f3fd","1f470-1f3fe","1f470-1f3ff"],a:"0.6"},{n:["man with veil"],u:"1f470-200d-2642-fe0f",v:["1f470-1f3fb-200d-2642-fe0f","1f470-1f3fc-200d-2642-fe0f","1f470-1f3fd-200d-2642-fe0f","1f470-1f3fe-200d-2642-fe0f","1f470-1f3ff-200d-2642-fe0f"],a:"13.0"},{n:["woman with veil"],u:"1f470-200d-2640-fe0f",v:["1f470-1f3fb-200d-2640-fe0f","1f470-1f3fc-200d-2640-fe0f","1f470-1f3fd-200d-2640-fe0f","1f470-1f3fe-200d-2640-fe0f","1f470-1f3ff-200d-2640-fe0f"],a:"13.0"},{n:["pregnant woman"],u:"1f930",v:["1f930-1f3fb","1f930-1f3fc","1f930-1f3fd","1f930-1f3fe","1f930-1f3ff"],a:"3.0"},{n:["pregnant man"],u:"1fac3",v:["1fac3-1f3fb","1fac3-1f3fc","1fac3-1f3fd","1fac3-1f3fe","1fac3-1f3ff"],a:"14.0"},{n:["pregnant person"],u:"1fac4",v:["1fac4-1f3fb","1fac4-1f3fc","1fac4-1f3fd","1fac4-1f3fe","1fac4-1f3ff"],a:"14.0"},{n:["breast-feeding"],u:"1f931",v:["1f931-1f3fb","1f931-1f3fc","1f931-1f3fd","1f931-1f3fe","1f931-1f3ff"],a:"5.0"},{n:["woman feeding baby"],u:"1f469-200d-1f37c",v:["1f469-1f3fb-200d-1f37c","1f469-1f3fc-200d-1f37c","1f469-1f3fd-200d-1f37c","1f469-1f3fe-200d-1f37c","1f469-1f3ff-200d-1f37c"],a:"13.0"},{n:["man feeding baby"],u:"1f468-200d-1f37c",v:["1f468-1f3fb-200d-1f37c","1f468-1f3fc-200d-1f37c","1f468-1f3fd-200d-1f37c","1f468-1f3fe-200d-1f37c","1f468-1f3ff-200d-1f37c"],a:"13.0"},{n:["person feeding baby"],u:"1f9d1-200d-1f37c",v:["1f9d1-1f3fb-200d-1f37c","1f9d1-1f3fc-200d-1f37c","1f9d1-1f3fd-200d-1f37c","1f9d1-1f3fe-200d-1f37c","1f9d1-1f3ff-200d-1f37c"],a:"13.0"},{n:["angel","baby angel"],u:"1f47c",v:["1f47c-1f3fb","1f47c-1f3fc","1f47c-1f3fd","1f47c-1f3fe","1f47c-1f3ff"],a:"0.6"},{n:["santa","father christmas"],u:"1f385",v:["1f385-1f3fb","1f385-1f3fc","1f385-1f3fd","1f385-1f3fe","1f385-1f3ff"],a:"0.6"},{n:["mrs claus","mother christmas"],u:"1f936",v:["1f936-1f3fb","1f936-1f3fc","1f936-1f3fd","1f936-1f3fe","1f936-1f3ff"],a:"3.0"},{n:["mx claus"],u:"1f9d1-200d-1f384",v:["1f9d1-1f3fb-200d-1f384","1f9d1-1f3fc-200d-1f384","1f9d1-1f3fd-200d-1f384","1f9d1-1f3fe-200d-1f384","1f9d1-1f3ff-200d-1f384"],a:"13.0"},{n:["superhero"],u:"1f9b8",v:["1f9b8-1f3fb","1f9b8-1f3fc","1f9b8-1f3fd","1f9b8-1f3fe","1f9b8-1f3ff"],a:"11.0"},{n:["man superhero","male superhero"],u:"1f9b8-200d-2642-fe0f",v:["1f9b8-1f3fb-200d-2642-fe0f","1f9b8-1f3fc-200d-2642-fe0f","1f9b8-1f3fd-200d-2642-fe0f","1f9b8-1f3fe-200d-2642-fe0f","1f9b8-1f3ff-200d-2642-fe0f"],a:"11.0"},{n:["woman superhero","female superhero"],u:"1f9b8-200d-2640-fe0f",v:["1f9b8-1f3fb-200d-2640-fe0f","1f9b8-1f3fc-200d-2640-fe0f","1f9b8-1f3fd-200d-2640-fe0f","1f9b8-1f3fe-200d-2640-fe0f","1f9b8-1f3ff-200d-2640-fe0f"],a:"11.0"},{n:["supervillain"],u:"1f9b9",v:["1f9b9-1f3fb","1f9b9-1f3fc","1f9b9-1f3fd","1f9b9-1f3fe","1f9b9-1f3ff"],a:"11.0"},{n:["man supervillain","male supervillain"],u:"1f9b9-200d-2642-fe0f",v:["1f9b9-1f3fb-200d-2642-fe0f","1f9b9-1f3fc-200d-2642-fe0f","1f9b9-1f3fd-200d-2642-fe0f","1f9b9-1f3fe-200d-2642-fe0f","1f9b9-1f3ff-200d-2642-fe0f"],a:"11.0"},{n:["woman supervillain","female supervillain"],u:"1f9b9-200d-2640-fe0f",v:["1f9b9-1f3fb-200d-2640-fe0f","1f9b9-1f3fc-200d-2640-fe0f","1f9b9-1f3fd-200d-2640-fe0f","1f9b9-1f3fe-200d-2640-fe0f","1f9b9-1f3ff-200d-2640-fe0f"],a:"11.0"},{n:["mage"],u:"1f9d9",v:["1f9d9-1f3fb","1f9d9-1f3fc","1f9d9-1f3fd","1f9d9-1f3fe","1f9d9-1f3ff"],a:"5.0"},{n:["man mage","male mage"],u:"1f9d9-200d-2642-fe0f",v:["1f9d9-1f3fb-200d-2642-fe0f","1f9d9-1f3fc-200d-2642-fe0f","1f9d9-1f3fd-200d-2642-fe0f","1f9d9-1f3fe-200d-2642-fe0f","1f9d9-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman mage","female mage"],u:"1f9d9-200d-2640-fe0f",v:["1f9d9-1f3fb-200d-2640-fe0f","1f9d9-1f3fc-200d-2640-fe0f","1f9d9-1f3fd-200d-2640-fe0f","1f9d9-1f3fe-200d-2640-fe0f","1f9d9-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["fairy"],u:"1f9da",v:["1f9da-1f3fb","1f9da-1f3fc","1f9da-1f3fd","1f9da-1f3fe","1f9da-1f3ff"],a:"5.0"},{n:["man fairy","male fairy"],u:"1f9da-200d-2642-fe0f",v:["1f9da-1f3fb-200d-2642-fe0f","1f9da-1f3fc-200d-2642-fe0f","1f9da-1f3fd-200d-2642-fe0f","1f9da-1f3fe-200d-2642-fe0f","1f9da-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman fairy","female fairy"],u:"1f9da-200d-2640-fe0f",v:["1f9da-1f3fb-200d-2640-fe0f","1f9da-1f3fc-200d-2640-fe0f","1f9da-1f3fd-200d-2640-fe0f","1f9da-1f3fe-200d-2640-fe0f","1f9da-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["vampire"],u:"1f9db",v:["1f9db-1f3fb","1f9db-1f3fc","1f9db-1f3fd","1f9db-1f3fe","1f9db-1f3ff"],a:"5.0"},{n:["man vampire","male vampire"],u:"1f9db-200d-2642-fe0f",v:["1f9db-1f3fb-200d-2642-fe0f","1f9db-1f3fc-200d-2642-fe0f","1f9db-1f3fd-200d-2642-fe0f","1f9db-1f3fe-200d-2642-fe0f","1f9db-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman vampire","female vampire"],u:"1f9db-200d-2640-fe0f",v:["1f9db-1f3fb-200d-2640-fe0f","1f9db-1f3fc-200d-2640-fe0f","1f9db-1f3fd-200d-2640-fe0f","1f9db-1f3fe-200d-2640-fe0f","1f9db-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["merperson"],u:"1f9dc",v:["1f9dc-1f3fb","1f9dc-1f3fc","1f9dc-1f3fd","1f9dc-1f3fe","1f9dc-1f3ff"],a:"5.0"},{n:["merman"],u:"1f9dc-200d-2642-fe0f",v:["1f9dc-1f3fb-200d-2642-fe0f","1f9dc-1f3fc-200d-2642-fe0f","1f9dc-1f3fd-200d-2642-fe0f","1f9dc-1f3fe-200d-2642-fe0f","1f9dc-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["mermaid"],u:"1f9dc-200d-2640-fe0f",v:["1f9dc-1f3fb-200d-2640-fe0f","1f9dc-1f3fc-200d-2640-fe0f","1f9dc-1f3fd-200d-2640-fe0f","1f9dc-1f3fe-200d-2640-fe0f","1f9dc-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["elf"],u:"1f9dd",v:["1f9dd-1f3fb","1f9dd-1f3fc","1f9dd-1f3fd","1f9dd-1f3fe","1f9dd-1f3ff"],a:"5.0"},{n:["man elf","male elf"],u:"1f9dd-200d-2642-fe0f",v:["1f9dd-1f3fb-200d-2642-fe0f","1f9dd-1f3fc-200d-2642-fe0f","1f9dd-1f3fd-200d-2642-fe0f","1f9dd-1f3fe-200d-2642-fe0f","1f9dd-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman elf","female elf"],u:"1f9dd-200d-2640-fe0f",v:["1f9dd-1f3fb-200d-2640-fe0f","1f9dd-1f3fc-200d-2640-fe0f","1f9dd-1f3fd-200d-2640-fe0f","1f9dd-1f3fe-200d-2640-fe0f","1f9dd-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["genie"],u:"1f9de",a:"5.0"},{n:["man genie","male genie"],u:"1f9de-200d-2642-fe0f",a:"5.0"},{n:["woman genie","female genie"],u:"1f9de-200d-2640-fe0f",a:"5.0"},{n:["zombie"],u:"1f9df",a:"5.0"},{n:["man zombie","male zombie"],u:"1f9df-200d-2642-fe0f",a:"5.0"},{n:["woman zombie","female zombie"],u:"1f9df-200d-2640-fe0f",a:"5.0"},{n:["troll"],u:"1f9cc",a:"14.0"},{n:["massage","face massage"],u:"1f486",v:["1f486-1f3fb","1f486-1f3fc","1f486-1f3fd","1f486-1f3fe","1f486-1f3ff"],a:"0.6"},{n:["man getting massage","man-getting-massage"],u:"1f486-200d-2642-fe0f",v:["1f486-1f3fb-200d-2642-fe0f","1f486-1f3fc-200d-2642-fe0f","1f486-1f3fd-200d-2642-fe0f","1f486-1f3fe-200d-2642-fe0f","1f486-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman getting massage","woman-getting-massage"],u:"1f486-200d-2640-fe0f",v:["1f486-1f3fb-200d-2640-fe0f","1f486-1f3fc-200d-2640-fe0f","1f486-1f3fd-200d-2640-fe0f","1f486-1f3fe-200d-2640-fe0f","1f486-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["haircut"],u:"1f487",v:["1f487-1f3fb","1f487-1f3fc","1f487-1f3fd","1f487-1f3fe","1f487-1f3ff"],a:"0.6"},{n:["man getting haircut","man-getting-haircut"],u:"1f487-200d-2642-fe0f",v:["1f487-1f3fb-200d-2642-fe0f","1f487-1f3fc-200d-2642-fe0f","1f487-1f3fd-200d-2642-fe0f","1f487-1f3fe-200d-2642-fe0f","1f487-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman getting haircut","woman-getting-haircut"],u:"1f487-200d-2640-fe0f",v:["1f487-1f3fb-200d-2640-fe0f","1f487-1f3fc-200d-2640-fe0f","1f487-1f3fd-200d-2640-fe0f","1f487-1f3fe-200d-2640-fe0f","1f487-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["walking","pedestrian"],u:"1f6b6",v:["1f6b6-1f3fb","1f6b6-1f3fc","1f6b6-1f3fd","1f6b6-1f3fe","1f6b6-1f3ff"],a:"0.6"},{n:["man walking","man-walking"],u:"1f6b6-200d-2642-fe0f",v:["1f6b6-1f3fb-200d-2642-fe0f","1f6b6-1f3fc-200d-2642-fe0f","1f6b6-1f3fd-200d-2642-fe0f","1f6b6-1f3fe-200d-2642-fe0f","1f6b6-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman walking","woman-walking"],u:"1f6b6-200d-2640-fe0f",v:["1f6b6-1f3fb-200d-2640-fe0f","1f6b6-1f3fc-200d-2640-fe0f","1f6b6-1f3fd-200d-2640-fe0f","1f6b6-1f3fe-200d-2640-fe0f","1f6b6-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["standing person"],u:"1f9cd",v:["1f9cd-1f3fb","1f9cd-1f3fc","1f9cd-1f3fd","1f9cd-1f3fe","1f9cd-1f3ff"],a:"12.0"},{n:["man standing"],u:"1f9cd-200d-2642-fe0f",v:["1f9cd-1f3fb-200d-2642-fe0f","1f9cd-1f3fc-200d-2642-fe0f","1f9cd-1f3fd-200d-2642-fe0f","1f9cd-1f3fe-200d-2642-fe0f","1f9cd-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["woman standing"],u:"1f9cd-200d-2640-fe0f",v:["1f9cd-1f3fb-200d-2640-fe0f","1f9cd-1f3fc-200d-2640-fe0f","1f9cd-1f3fd-200d-2640-fe0f","1f9cd-1f3fe-200d-2640-fe0f","1f9cd-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["kneeling person"],u:"1f9ce",v:["1f9ce-1f3fb","1f9ce-1f3fc","1f9ce-1f3fd","1f9ce-1f3fe","1f9ce-1f3ff"],a:"12.0"},{n:["man kneeling"],u:"1f9ce-200d-2642-fe0f",v:["1f9ce-1f3fb-200d-2642-fe0f","1f9ce-1f3fc-200d-2642-fe0f","1f9ce-1f3fd-200d-2642-fe0f","1f9ce-1f3fe-200d-2642-fe0f","1f9ce-1f3ff-200d-2642-fe0f"],a:"12.0"},{n:["woman kneeling"],u:"1f9ce-200d-2640-fe0f",v:["1f9ce-1f3fb-200d-2640-fe0f","1f9ce-1f3fc-200d-2640-fe0f","1f9ce-1f3fd-200d-2640-fe0f","1f9ce-1f3fe-200d-2640-fe0f","1f9ce-1f3ff-200d-2640-fe0f"],a:"12.0"},{n:["person with white cane","person with probing cane"],u:"1f9d1-200d-1f9af",v:["1f9d1-1f3fb-200d-1f9af","1f9d1-1f3fc-200d-1f9af","1f9d1-1f3fd-200d-1f9af","1f9d1-1f3fe-200d-1f9af","1f9d1-1f3ff-200d-1f9af"],a:"12.1"},{n:["man with white cane","man with probing cane"],u:"1f468-200d-1f9af",v:["1f468-1f3fb-200d-1f9af","1f468-1f3fc-200d-1f9af","1f468-1f3fd-200d-1f9af","1f468-1f3fe-200d-1f9af","1f468-1f3ff-200d-1f9af"],a:"12.0"},{n:["woman with white cane","woman with probing cane"],u:"1f469-200d-1f9af",v:["1f469-1f3fb-200d-1f9af","1f469-1f3fc-200d-1f9af","1f469-1f3fd-200d-1f9af","1f469-1f3fe-200d-1f9af","1f469-1f3ff-200d-1f9af"],a:"12.0"},{n:["person in motorized wheelchair"],u:"1f9d1-200d-1f9bc",v:["1f9d1-1f3fb-200d-1f9bc","1f9d1-1f3fc-200d-1f9bc","1f9d1-1f3fd-200d-1f9bc","1f9d1-1f3fe-200d-1f9bc","1f9d1-1f3ff-200d-1f9bc"],a:"12.1"},{n:["man in motorized wheelchair"],u:"1f468-200d-1f9bc",v:["1f468-1f3fb-200d-1f9bc","1f468-1f3fc-200d-1f9bc","1f468-1f3fd-200d-1f9bc","1f468-1f3fe-200d-1f9bc","1f468-1f3ff-200d-1f9bc"],a:"12.0"},{n:["woman in motorized wheelchair"],u:"1f469-200d-1f9bc",v:["1f469-1f3fb-200d-1f9bc","1f469-1f3fc-200d-1f9bc","1f469-1f3fd-200d-1f9bc","1f469-1f3fe-200d-1f9bc","1f469-1f3ff-200d-1f9bc"],a:"12.0"},{n:["person in manual wheelchair"],u:"1f9d1-200d-1f9bd",v:["1f9d1-1f3fb-200d-1f9bd","1f9d1-1f3fc-200d-1f9bd","1f9d1-1f3fd-200d-1f9bd","1f9d1-1f3fe-200d-1f9bd","1f9d1-1f3ff-200d-1f9bd"],a:"12.1"},{n:["man in manual wheelchair"],u:"1f468-200d-1f9bd",v:["1f468-1f3fb-200d-1f9bd","1f468-1f3fc-200d-1f9bd","1f468-1f3fd-200d-1f9bd","1f468-1f3fe-200d-1f9bd","1f468-1f3ff-200d-1f9bd"],a:"12.0"},{n:["woman in manual wheelchair"],u:"1f469-200d-1f9bd",v:["1f469-1f3fb-200d-1f9bd","1f469-1f3fc-200d-1f9bd","1f469-1f3fd-200d-1f9bd","1f469-1f3fe-200d-1f9bd","1f469-1f3ff-200d-1f9bd"],a:"12.0"},{n:["runner","running"],u:"1f3c3",v:["1f3c3-1f3fb","1f3c3-1f3fc","1f3c3-1f3fd","1f3c3-1f3fe","1f3c3-1f3ff"],a:"0.6"},{n:["man running","man-running"],u:"1f3c3-200d-2642-fe0f",v:["1f3c3-1f3fb-200d-2642-fe0f","1f3c3-1f3fc-200d-2642-fe0f","1f3c3-1f3fd-200d-2642-fe0f","1f3c3-1f3fe-200d-2642-fe0f","1f3c3-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman running","woman-running"],u:"1f3c3-200d-2640-fe0f",v:["1f3c3-1f3fb-200d-2640-fe0f","1f3c3-1f3fc-200d-2640-fe0f","1f3c3-1f3fd-200d-2640-fe0f","1f3c3-1f3fe-200d-2640-fe0f","1f3c3-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["dancer"],u:"1f483",v:["1f483-1f3fb","1f483-1f3fc","1f483-1f3fd","1f483-1f3fe","1f483-1f3ff"],a:"0.6"},{n:["man dancing"],u:"1f57a",v:["1f57a-1f3fb","1f57a-1f3fc","1f57a-1f3fd","1f57a-1f3fe","1f57a-1f3ff"],a:"3.0"},{n:["person in suit levitating","man in business suit levitating"],u:"1f574-fe0f",v:["1f574-1f3fb","1f574-1f3fc","1f574-1f3fd","1f574-1f3fe","1f574-1f3ff"],a:"0.7"},{n:["dancers","woman with bunny ears"],u:"1f46f",a:"0.6"},{n:["men with bunny ears","men-with-bunny-ears-partying","man-with-bunny-ears-partying"],u:"1f46f-200d-2642-fe0f",a:"4.0"},{n:["women with bunny ears","women-with-bunny-ears-partying","woman-with-bunny-ears-partying"],u:"1f46f-200d-2640-fe0f",a:"4.0"},{n:["person in steamy room"],u:"1f9d6",v:["1f9d6-1f3fb","1f9d6-1f3fc","1f9d6-1f3fd","1f9d6-1f3fe","1f9d6-1f3ff"],a:"5.0"},{n:["man in steamy room"],u:"1f9d6-200d-2642-fe0f",v:["1f9d6-1f3fb-200d-2642-fe0f","1f9d6-1f3fc-200d-2642-fe0f","1f9d6-1f3fd-200d-2642-fe0f","1f9d6-1f3fe-200d-2642-fe0f","1f9d6-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman in steamy room"],u:"1f9d6-200d-2640-fe0f",v:["1f9d6-1f3fb-200d-2640-fe0f","1f9d6-1f3fc-200d-2640-fe0f","1f9d6-1f3fd-200d-2640-fe0f","1f9d6-1f3fe-200d-2640-fe0f","1f9d6-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["person climbing"],u:"1f9d7",v:["1f9d7-1f3fb","1f9d7-1f3fc","1f9d7-1f3fd","1f9d7-1f3fe","1f9d7-1f3ff"],a:"5.0"},{n:["man climbing"],u:"1f9d7-200d-2642-fe0f",v:["1f9d7-1f3fb-200d-2642-fe0f","1f9d7-1f3fc-200d-2642-fe0f","1f9d7-1f3fd-200d-2642-fe0f","1f9d7-1f3fe-200d-2642-fe0f","1f9d7-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman climbing"],u:"1f9d7-200d-2640-fe0f",v:["1f9d7-1f3fb-200d-2640-fe0f","1f9d7-1f3fc-200d-2640-fe0f","1f9d7-1f3fd-200d-2640-fe0f","1f9d7-1f3fe-200d-2640-fe0f","1f9d7-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["fencer"],u:"1f93a",a:"3.0"},{n:["horse racing"],u:"1f3c7",v:["1f3c7-1f3fb","1f3c7-1f3fc","1f3c7-1f3fd","1f3c7-1f3fe","1f3c7-1f3ff"],a:"1.0"},{n:["skier"],u:"26f7-fe0f",a:"0.7"},{n:["snowboarder"],u:"1f3c2",v:["1f3c2-1f3fb","1f3c2-1f3fc","1f3c2-1f3fd","1f3c2-1f3fe","1f3c2-1f3ff"],a:"0.6"},{n:["golfer","person golfing"],u:"1f3cc-fe0f",v:["1f3cc-1f3fb","1f3cc-1f3fc","1f3cc-1f3fd","1f3cc-1f3fe","1f3cc-1f3ff"],a:"0.7"},{n:["man golfing","man-golfing"],u:"1f3cc-fe0f-200d-2642-fe0f",v:["1f3cc-1f3fb-200d-2642-fe0f","1f3cc-1f3fc-200d-2642-fe0f","1f3cc-1f3fd-200d-2642-fe0f","1f3cc-1f3fe-200d-2642-fe0f","1f3cc-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman golfing","woman-golfing"],u:"1f3cc-fe0f-200d-2640-fe0f",v:["1f3cc-1f3fb-200d-2640-fe0f","1f3cc-1f3fc-200d-2640-fe0f","1f3cc-1f3fd-200d-2640-fe0f","1f3cc-1f3fe-200d-2640-fe0f","1f3cc-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["surfer"],u:"1f3c4",v:["1f3c4-1f3fb","1f3c4-1f3fc","1f3c4-1f3fd","1f3c4-1f3fe","1f3c4-1f3ff"],a:"0.6"},{n:["man surfing","man-surfing"],u:"1f3c4-200d-2642-fe0f",v:["1f3c4-1f3fb-200d-2642-fe0f","1f3c4-1f3fc-200d-2642-fe0f","1f3c4-1f3fd-200d-2642-fe0f","1f3c4-1f3fe-200d-2642-fe0f","1f3c4-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman surfing","woman-surfing"],u:"1f3c4-200d-2640-fe0f",v:["1f3c4-1f3fb-200d-2640-fe0f","1f3c4-1f3fc-200d-2640-fe0f","1f3c4-1f3fd-200d-2640-fe0f","1f3c4-1f3fe-200d-2640-fe0f","1f3c4-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["rowboat"],u:"1f6a3",v:["1f6a3-1f3fb","1f6a3-1f3fc","1f6a3-1f3fd","1f6a3-1f3fe","1f6a3-1f3ff"],a:"1.0"},{n:["man rowing boat","man-rowing-boat"],u:"1f6a3-200d-2642-fe0f",v:["1f6a3-1f3fb-200d-2642-fe0f","1f6a3-1f3fc-200d-2642-fe0f","1f6a3-1f3fd-200d-2642-fe0f","1f6a3-1f3fe-200d-2642-fe0f","1f6a3-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman rowing boat","woman-rowing-boat"],u:"1f6a3-200d-2640-fe0f",v:["1f6a3-1f3fb-200d-2640-fe0f","1f6a3-1f3fc-200d-2640-fe0f","1f6a3-1f3fd-200d-2640-fe0f","1f6a3-1f3fe-200d-2640-fe0f","1f6a3-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["swimmer"],u:"1f3ca",v:["1f3ca-1f3fb","1f3ca-1f3fc","1f3ca-1f3fd","1f3ca-1f3fe","1f3ca-1f3ff"],a:"0.6"},{n:["man swimming","man-swimming"],u:"1f3ca-200d-2642-fe0f",v:["1f3ca-1f3fb-200d-2642-fe0f","1f3ca-1f3fc-200d-2642-fe0f","1f3ca-1f3fd-200d-2642-fe0f","1f3ca-1f3fe-200d-2642-fe0f","1f3ca-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman swimming","woman-swimming"],u:"1f3ca-200d-2640-fe0f",v:["1f3ca-1f3fb-200d-2640-fe0f","1f3ca-1f3fc-200d-2640-fe0f","1f3ca-1f3fd-200d-2640-fe0f","1f3ca-1f3fe-200d-2640-fe0f","1f3ca-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person with ball","person bouncing ball"],u:"26f9-fe0f",v:["26f9-1f3fb","26f9-1f3fc","26f9-1f3fd","26f9-1f3fe","26f9-1f3ff"],a:"0.7"},{n:["man bouncing ball","man-bouncing-ball"],u:"26f9-fe0f-200d-2642-fe0f",v:["26f9-1f3fb-200d-2642-fe0f","26f9-1f3fc-200d-2642-fe0f","26f9-1f3fd-200d-2642-fe0f","26f9-1f3fe-200d-2642-fe0f","26f9-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman bouncing ball","woman-bouncing-ball"],u:"26f9-fe0f-200d-2640-fe0f",v:["26f9-1f3fb-200d-2640-fe0f","26f9-1f3fc-200d-2640-fe0f","26f9-1f3fd-200d-2640-fe0f","26f9-1f3fe-200d-2640-fe0f","26f9-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["weight lifter","person lifting weights"],u:"1f3cb-fe0f",v:["1f3cb-1f3fb","1f3cb-1f3fc","1f3cb-1f3fd","1f3cb-1f3fe","1f3cb-1f3ff"],a:"0.7"},{n:["man lifting weights","man-lifting-weights"],u:"1f3cb-fe0f-200d-2642-fe0f",v:["1f3cb-1f3fb-200d-2642-fe0f","1f3cb-1f3fc-200d-2642-fe0f","1f3cb-1f3fd-200d-2642-fe0f","1f3cb-1f3fe-200d-2642-fe0f","1f3cb-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman lifting weights","woman-lifting-weights"],u:"1f3cb-fe0f-200d-2640-fe0f",v:["1f3cb-1f3fb-200d-2640-fe0f","1f3cb-1f3fc-200d-2640-fe0f","1f3cb-1f3fd-200d-2640-fe0f","1f3cb-1f3fe-200d-2640-fe0f","1f3cb-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["bicyclist"],u:"1f6b4",v:["1f6b4-1f3fb","1f6b4-1f3fc","1f6b4-1f3fd","1f6b4-1f3fe","1f6b4-1f3ff"],a:"1.0"},{n:["man biking","man-biking"],u:"1f6b4-200d-2642-fe0f",v:["1f6b4-1f3fb-200d-2642-fe0f","1f6b4-1f3fc-200d-2642-fe0f","1f6b4-1f3fd-200d-2642-fe0f","1f6b4-1f3fe-200d-2642-fe0f","1f6b4-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman biking","woman-biking"],u:"1f6b4-200d-2640-fe0f",v:["1f6b4-1f3fb-200d-2640-fe0f","1f6b4-1f3fc-200d-2640-fe0f","1f6b4-1f3fd-200d-2640-fe0f","1f6b4-1f3fe-200d-2640-fe0f","1f6b4-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["mountain bicyclist"],u:"1f6b5",v:["1f6b5-1f3fb","1f6b5-1f3fc","1f6b5-1f3fd","1f6b5-1f3fe","1f6b5-1f3ff"],a:"1.0"},{n:["man mountain biking","man-mountain-biking"],u:"1f6b5-200d-2642-fe0f",v:["1f6b5-1f3fb-200d-2642-fe0f","1f6b5-1f3fc-200d-2642-fe0f","1f6b5-1f3fd-200d-2642-fe0f","1f6b5-1f3fe-200d-2642-fe0f","1f6b5-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman mountain biking","woman-mountain-biking"],u:"1f6b5-200d-2640-fe0f",v:["1f6b5-1f3fb-200d-2640-fe0f","1f6b5-1f3fc-200d-2640-fe0f","1f6b5-1f3fd-200d-2640-fe0f","1f6b5-1f3fe-200d-2640-fe0f","1f6b5-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person doing cartwheel"],u:"1f938",v:["1f938-1f3fb","1f938-1f3fc","1f938-1f3fd","1f938-1f3fe","1f938-1f3ff"],a:"3.0"},{n:["man cartwheeling","man-cartwheeling"],u:"1f938-200d-2642-fe0f",v:["1f938-1f3fb-200d-2642-fe0f","1f938-1f3fc-200d-2642-fe0f","1f938-1f3fd-200d-2642-fe0f","1f938-1f3fe-200d-2642-fe0f","1f938-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman cartwheeling","woman-cartwheeling"],u:"1f938-200d-2640-fe0f",v:["1f938-1f3fb-200d-2640-fe0f","1f938-1f3fc-200d-2640-fe0f","1f938-1f3fd-200d-2640-fe0f","1f938-1f3fe-200d-2640-fe0f","1f938-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["wrestlers"],u:"1f93c",a:"3.0"},{n:["men wrestling","man-wrestling"],u:"1f93c-200d-2642-fe0f",a:"4.0"},{n:["women wrestling","woman-wrestling"],u:"1f93c-200d-2640-fe0f",a:"4.0"},{n:["water polo"],u:"1f93d",v:["1f93d-1f3fb","1f93d-1f3fc","1f93d-1f3fd","1f93d-1f3fe","1f93d-1f3ff"],a:"3.0"},{n:["man playing water polo","man-playing-water-polo"],u:"1f93d-200d-2642-fe0f",v:["1f93d-1f3fb-200d-2642-fe0f","1f93d-1f3fc-200d-2642-fe0f","1f93d-1f3fd-200d-2642-fe0f","1f93d-1f3fe-200d-2642-fe0f","1f93d-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman playing water polo","woman-playing-water-polo"],u:"1f93d-200d-2640-fe0f",v:["1f93d-1f3fb-200d-2640-fe0f","1f93d-1f3fc-200d-2640-fe0f","1f93d-1f3fd-200d-2640-fe0f","1f93d-1f3fe-200d-2640-fe0f","1f93d-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["handball"],u:"1f93e",v:["1f93e-1f3fb","1f93e-1f3fc","1f93e-1f3fd","1f93e-1f3fe","1f93e-1f3ff"],a:"3.0"},{n:["man playing handball","man-playing-handball"],u:"1f93e-200d-2642-fe0f",v:["1f93e-1f3fb-200d-2642-fe0f","1f93e-1f3fc-200d-2642-fe0f","1f93e-1f3fd-200d-2642-fe0f","1f93e-1f3fe-200d-2642-fe0f","1f93e-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman playing handball","woman-playing-handball"],u:"1f93e-200d-2640-fe0f",v:["1f93e-1f3fb-200d-2640-fe0f","1f93e-1f3fc-200d-2640-fe0f","1f93e-1f3fd-200d-2640-fe0f","1f93e-1f3fe-200d-2640-fe0f","1f93e-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["juggling"],u:"1f939",v:["1f939-1f3fb","1f939-1f3fc","1f939-1f3fd","1f939-1f3fe","1f939-1f3ff"],a:"3.0"},{n:["man juggling","man-juggling"],u:"1f939-200d-2642-fe0f",v:["1f939-1f3fb-200d-2642-fe0f","1f939-1f3fc-200d-2642-fe0f","1f939-1f3fd-200d-2642-fe0f","1f939-1f3fe-200d-2642-fe0f","1f939-1f3ff-200d-2642-fe0f"],a:"4.0"},{n:["woman juggling","woman-juggling"],u:"1f939-200d-2640-fe0f",v:["1f939-1f3fb-200d-2640-fe0f","1f939-1f3fc-200d-2640-fe0f","1f939-1f3fd-200d-2640-fe0f","1f939-1f3fe-200d-2640-fe0f","1f939-1f3ff-200d-2640-fe0f"],a:"4.0"},{n:["person in lotus position"],u:"1f9d8",v:["1f9d8-1f3fb","1f9d8-1f3fc","1f9d8-1f3fd","1f9d8-1f3fe","1f9d8-1f3ff"],a:"5.0"},{n:["man in lotus position"],u:"1f9d8-200d-2642-fe0f",v:["1f9d8-1f3fb-200d-2642-fe0f","1f9d8-1f3fc-200d-2642-fe0f","1f9d8-1f3fd-200d-2642-fe0f","1f9d8-1f3fe-200d-2642-fe0f","1f9d8-1f3ff-200d-2642-fe0f"],a:"5.0"},{n:["woman in lotus position"],u:"1f9d8-200d-2640-fe0f",v:["1f9d8-1f3fb-200d-2640-fe0f","1f9d8-1f3fc-200d-2640-fe0f","1f9d8-1f3fd-200d-2640-fe0f","1f9d8-1f3fe-200d-2640-fe0f","1f9d8-1f3ff-200d-2640-fe0f"],a:"5.0"},{n:["bath"],u:"1f6c0",v:["1f6c0-1f3fb","1f6c0-1f3fc","1f6c0-1f3fd","1f6c0-1f3fe","1f6c0-1f3ff"],a:"0.6"},{n:["sleeping accommodation"],u:"1f6cc",v:["1f6cc-1f3fb","1f6cc-1f3fc","1f6cc-1f3fd","1f6cc-1f3fe","1f6cc-1f3ff"],a:"1.0"},{n:["people holding hands"],u:"1f9d1-200d-1f91d-200d-1f9d1",v:["1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3fe-200d-1f91d-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3fe","1f9d1-1f3ff-200d-1f91d-200d-1f9d1-1f3ff"],a:"12.0"},{n:["women holding hands","two women holding hands"],u:"1f46d",v:["1f46d-1f3fb","1f46d-1f3fc","1f46d-1f3fd","1f46d-1f3fe","1f46d-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f469-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f469-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f469-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f469-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f469-1f3fe"],a:"1.0"},{n:["couple","man and woman holding hands","woman and man holding hands"],u:"1f46b",v:["1f46b-1f3fb","1f46b-1f3fc","1f46b-1f3fd","1f46b-1f3fe","1f46b-1f3ff","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f469-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f469-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f469-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f469-1f3ff-200d-1f91d-200d-1f468-1f3fe"],a:"0.6"},{n:["men holding hands","two men holding hands"],u:"1f46c",v:["1f46c-1f3fb","1f46c-1f3fc","1f46c-1f3fd","1f46c-1f3fe","1f46c-1f3ff","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fb-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fb-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fc-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fc-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fd-200d-1f91d-200d-1f468-1f3fe","1f468-1f3fd-200d-1f91d-200d-1f468-1f3ff","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fb","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fc","1f468-1f3fe-200d-1f91d-200d-1f468-1f3fd","1f468-1f3fe-200d-1f91d-200d-1f468-1f3ff","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fb","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fc","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fd","1f468-1f3ff-200d-1f91d-200d-1f468-1f3fe"],a:"1.0"},{n:["kiss","couplekiss"],u:"1f48f",v:["1f48f-1f3fb","1f48f-1f3fc","1f48f-1f3fd","1f48f-1f3fe","1f48f-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f9d1-1f3fe"],a:"0.6"},{n:["woman-kiss-man","kiss: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"],a:"2.0"},{n:["man-kiss-man","kiss: man, man"],u:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f468-1f3ff"],a:"2.0"},{n:["woman-kiss-woman","kiss: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f48b-200d-1f469-1f3ff"],a:"2.0"},{n:["couple with heart"],u:"1f491",v:["1f491-1f3fb","1f491-1f3fc","1f491-1f3fd","1f491-1f3fe","1f491-1f3ff","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fb-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fc-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3fe","1f9d1-1f3fd-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3fe-200d-2764-fe0f-200d-1f9d1-1f3ff","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fb","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fc","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fd","1f9d1-1f3ff-200d-2764-fe0f-200d-1f9d1-1f3fe"],a:"0.6"},{n:["woman-heart-man","couple with heart: woman, man"],u:"1f469-200d-2764-fe0f-200d-1f468",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"],a:"2.0"},{n:["man-heart-man","couple with heart: man, man"],u:"1f468-200d-2764-fe0f-200d-1f468",v:["1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fb-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fc-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fd-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3fe-200d-2764-fe0f-200d-1f468-1f3ff","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fb","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fc","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fd","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3fe","1f468-1f3ff-200d-2764-fe0f-200d-1f468-1f3ff"],a:"2.0"},{n:["woman-heart-woman","couple with heart: woman, woman"],u:"1f469-200d-2764-fe0f-200d-1f469",v:["1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fb-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fc-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fd-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3fe-200d-2764-fe0f-200d-1f469-1f3ff","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fb","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fc","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fd","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3fe","1f469-1f3ff-200d-2764-fe0f-200d-1f469-1f3ff"],a:"2.0"},{n:["family"],u:"1f46a",a:"0.6"},{n:["man-woman-boy","family: man, woman, boy"],u:"1f468-200d-1f469-200d-1f466",a:"2.0"},{n:["man-woman-girl","family: man, woman, girl"],u:"1f468-200d-1f469-200d-1f467",a:"2.0"},{n:["man-woman-girl-boy","family: man, woman, girl, boy"],u:"1f468-200d-1f469-200d-1f467-200d-1f466",a:"2.0"},{n:["man-woman-boy-boy","family: man, woman, boy, boy"],u:"1f468-200d-1f469-200d-1f466-200d-1f466",a:"2.0"},{n:["man-woman-girl-girl","family: man, woman, girl, girl"],u:"1f468-200d-1f469-200d-1f467-200d-1f467",a:"2.0"},{n:["man-man-boy","family: man, man, boy"],u:"1f468-200d-1f468-200d-1f466",a:"2.0"},{n:["man-man-girl","family: man, man, girl"],u:"1f468-200d-1f468-200d-1f467",a:"2.0"},{n:["man-man-girl-boy","family: man, man, girl, boy"],u:"1f468-200d-1f468-200d-1f467-200d-1f466",a:"2.0"},{n:["man-man-boy-boy","family: man, man, boy, boy"],u:"1f468-200d-1f468-200d-1f466-200d-1f466",a:"2.0"},{n:["man-man-girl-girl","family: man, man, girl, girl"],u:"1f468-200d-1f468-200d-1f467-200d-1f467",a:"2.0"},{n:["woman-woman-boy","family: woman, woman, boy"],u:"1f469-200d-1f469-200d-1f466",a:"2.0"},{n:["woman-woman-girl","family: woman, woman, girl"],u:"1f469-200d-1f469-200d-1f467",a:"2.0"},{n:["woman-woman-girl-boy","family: woman, woman, girl, boy"],u:"1f469-200d-1f469-200d-1f467-200d-1f466",a:"2.0"},{n:["woman-woman-boy-boy","family: woman, woman, boy, boy"],u:"1f469-200d-1f469-200d-1f466-200d-1f466",a:"2.0"},{n:["woman-woman-girl-girl","family: woman, woman, girl, girl"],u:"1f469-200d-1f469-200d-1f467-200d-1f467",a:"2.0"},{n:["man-boy","family: man, boy"],u:"1f468-200d-1f466",a:"4.0"},{n:["man-boy-boy","family: man, boy, boy"],u:"1f468-200d-1f466-200d-1f466",a:"4.0"},{n:["man-girl","family: man, girl"],u:"1f468-200d-1f467",a:"4.0"},{n:["man-girl-boy","family: man, girl, boy"],u:"1f468-200d-1f467-200d-1f466",a:"4.0"},{n:["man-girl-girl","family: man, girl, girl"],u:"1f468-200d-1f467-200d-1f467",a:"4.0"},{n:["woman-boy","family: woman, boy"],u:"1f469-200d-1f466",a:"4.0"},{n:["woman-boy-boy","family: woman, boy, boy"],u:"1f469-200d-1f466-200d-1f466",a:"4.0"},{n:["woman-girl","family: woman, girl"],u:"1f469-200d-1f467",a:"4.0"},{n:["woman-girl-boy","family: woman, girl, boy"],u:"1f469-200d-1f467-200d-1f466",a:"4.0"},{n:["woman-girl-girl","family: woman, girl, girl"],u:"1f469-200d-1f467-200d-1f467",a:"4.0"},{n:["speaking head","speaking head in silhouette"],u:"1f5e3-fe0f",a:"0.7"},{n:["bust in silhouette"],u:"1f464",a:"0.6"},{n:["busts in silhouette"],u:"1f465",a:"1.0"},{n:["people hugging"],u:"1fac2",a:"13.0"},{n:["footprints"],u:"1f463",a:"0.6"}],z5e=[{n:["monkey face"],u:"1f435",a:"0.6"},{n:["monkey"],u:"1f412",a:"0.6"},{n:["gorilla"],u:"1f98d",a:"3.0"},{n:["orangutan"],u:"1f9a7",a:"12.0"},{n:["dog","dog face"],u:"1f436",a:"0.6"},{n:["dog","dog2"],u:"1f415",a:"0.7"},{n:["guide dog"],u:"1f9ae",a:"12.0"},{n:["service dog"],u:"1f415-200d-1f9ba",a:"12.0"},{n:["poodle"],u:"1f429",a:"0.6"},{n:["wolf","wolf face"],u:"1f43a",a:"0.6"},{n:["fox face"],u:"1f98a",a:"3.0"},{n:["raccoon"],u:"1f99d",a:"11.0"},{n:["cat","cat face"],u:"1f431",a:"0.6"},{n:["cat","cat2"],u:"1f408",a:"0.7"},{n:["black cat"],u:"1f408-200d-2b1b",a:"13.0"},{n:["lion face"],u:"1f981",a:"1.0"},{n:["tiger","tiger face"],u:"1f42f",a:"0.6"},{n:["tiger","tiger2"],u:"1f405",a:"1.0"},{n:["leopard"],u:"1f406",a:"1.0"},{n:["horse","horse face"],u:"1f434",a:"0.6"},{n:["horse","racehorse"],u:"1f40e",a:"0.6"},{n:["unicorn face"],u:"1f984",a:"1.0"},{n:["zebra face"],u:"1f993",a:"5.0"},{n:["deer"],u:"1f98c",a:"3.0"},{n:["bison"],u:"1f9ac",a:"13.0"},{n:["cow","cow face"],u:"1f42e",a:"0.6"},{n:["ox"],u:"1f402",a:"1.0"},{n:["water buffalo"],u:"1f403",a:"1.0"},{n:["cow","cow2"],u:"1f404",a:"1.0"},{n:["pig","pig face"],u:"1f437",a:"0.6"},{n:["pig","pig2"],u:"1f416",a:"1.0"},{n:["boar"],u:"1f417",a:"0.6"},{n:["pig nose"],u:"1f43d",a:"0.6"},{n:["ram"],u:"1f40f",a:"1.0"},{n:["sheep"],u:"1f411",a:"0.6"},{n:["goat"],u:"1f410",a:"1.0"},{n:["dromedary camel"],u:"1f42a",a:"1.0"},{n:["camel","bactrian camel"],u:"1f42b",a:"0.6"},{n:["llama"],u:"1f999",a:"11.0"},{n:["giraffe face"],u:"1f992",a:"5.0"},{n:["elephant"],u:"1f418",a:"0.6"},{n:["mammoth"],u:"1f9a3",a:"13.0"},{n:["rhinoceros"],u:"1f98f",a:"3.0"},{n:["hippopotamus"],u:"1f99b",a:"11.0"},{n:["mouse","mouse face"],u:"1f42d",a:"0.6"},{n:["mouse","mouse2"],u:"1f401",a:"1.0"},{n:["rat"],u:"1f400",a:"1.0"},{n:["hamster","hamster face"],u:"1f439",a:"0.6"},{n:["rabbit","rabbit face"],u:"1f430",a:"0.6"},{n:["rabbit","rabbit2"],u:"1f407",a:"1.0"},{n:["chipmunk"],u:"1f43f-fe0f",a:"0.7"},{n:["beaver"],u:"1f9ab",a:"13.0"},{n:["hedgehog"],u:"1f994",a:"5.0"},{n:["bat"],u:"1f987",a:"3.0"},{n:["bear","bear face"],u:"1f43b",a:"0.6"},{n:["polar bear"],u:"1f43b-200d-2744-fe0f",a:"13.0"},{n:["koala"],u:"1f428",a:"0.6"},{n:["panda face"],u:"1f43c",a:"0.6"},{n:["sloth"],u:"1f9a5",a:"12.0"},{n:["otter"],u:"1f9a6",a:"12.0"},{n:["skunk"],u:"1f9a8",a:"12.0"},{n:["kangaroo"],u:"1f998",a:"11.0"},{n:["badger"],u:"1f9a1",a:"11.0"},{n:["feet","paw prints"],u:"1f43e",a:"0.6"},{n:["turkey"],u:"1f983",a:"1.0"},{n:["chicken"],u:"1f414",a:"0.6"},{n:["rooster"],u:"1f413",a:"1.0"},{n:["hatching chick"],u:"1f423",a:"0.6"},{n:["baby chick"],u:"1f424",a:"0.6"},{n:["hatched chick","front-facing baby chick"],u:"1f425",a:"0.6"},{n:["bird"],u:"1f426",a:"0.6"},{n:["penguin"],u:"1f427",a:"0.6"},{n:["dove","dove of peace"],u:"1f54a-fe0f",a:"0.7"},{n:["eagle"],u:"1f985",a:"3.0"},{n:["duck"],u:"1f986",a:"3.0"},{n:["swan"],u:"1f9a2",a:"11.0"},{n:["owl"],u:"1f989",a:"3.0"},{n:["dodo"],u:"1f9a4",a:"13.0"},{n:["feather"],u:"1fab6",a:"13.0"},{n:["flamingo"],u:"1f9a9",a:"12.0"},{n:["peacock"],u:"1f99a",a:"11.0"},{n:["parrot"],u:"1f99c",a:"11.0"},{n:["frog","frog face"],u:"1f438",a:"0.6"},{n:["crocodile"],u:"1f40a",a:"1.0"},{n:["turtle"],u:"1f422",a:"0.6"},{n:["lizard"],u:"1f98e",a:"3.0"},{n:["snake"],u:"1f40d",a:"0.6"},{n:["dragon face"],u:"1f432",a:"0.6"},{n:["dragon"],u:"1f409",a:"1.0"},{n:["sauropod"],u:"1f995",a:"5.0"},{n:["t-rex"],u:"1f996",a:"5.0"},{n:["whale","spouting whale"],u:"1f433",a:"0.6"},{n:["whale","whale2"],u:"1f40b",a:"1.0"},{n:["dolphin","flipper"],u:"1f42c",a:"0.6"},{n:["seal"],u:"1f9ad",a:"13.0"},{n:["fish"],u:"1f41f",a:"0.6"},{n:["tropical fish"],u:"1f420",a:"0.6"},{n:["blowfish"],u:"1f421",a:"0.6"},{n:["shark"],u:"1f988",a:"3.0"},{n:["octopus"],u:"1f419",a:"0.6"},{n:["shell","spiral shell"],u:"1f41a",a:"0.6"},{n:["coral"],u:"1fab8",a:"14.0"},{n:["snail"],u:"1f40c",a:"0.6"},{n:["butterfly"],u:"1f98b",a:"3.0"},{n:["bug"],u:"1f41b",a:"0.6"},{n:["ant"],u:"1f41c",a:"0.6"},{n:["bee","honeybee"],u:"1f41d",a:"0.6"},{n:["beetle"],u:"1fab2",a:"13.0"},{n:["ladybug","lady beetle"],u:"1f41e",a:"0.6"},{n:["cricket"],u:"1f997",a:"5.0"},{n:["cockroach"],u:"1fab3",a:"13.0"},{n:["spider"],u:"1f577-fe0f",a:"0.7"},{n:["spider web"],u:"1f578-fe0f",a:"0.7"},{n:["scorpion"],u:"1f982",a:"1.0"},{n:["mosquito"],u:"1f99f",a:"11.0"},{n:["fly"],u:"1fab0",a:"13.0"},{n:["worm"],u:"1fab1",a:"13.0"},{n:["microbe"],u:"1f9a0",a:"11.0"},{n:["bouquet"],u:"1f490",a:"0.6"},{n:["cherry blossom"],u:"1f338",a:"0.6"},{n:["white flower"],u:"1f4ae",a:"0.6"},{n:["lotus"],u:"1fab7",a:"14.0"},{n:["rosette"],u:"1f3f5-fe0f",a:"0.7"},{n:["rose"],u:"1f339",a:"0.6"},{n:["wilted flower"],u:"1f940",a:"3.0"},{n:["hibiscus"],u:"1f33a",a:"0.6"},{n:["sunflower"],u:"1f33b",a:"0.6"},{n:["blossom"],u:"1f33c",a:"0.6"},{n:["tulip"],u:"1f337",a:"0.6"},{n:["seedling"],u:"1f331",a:"0.6"},{n:["potted plant"],u:"1fab4",a:"13.0"},{n:["evergreen tree"],u:"1f332",a:"1.0"},{n:["deciduous tree"],u:"1f333",a:"1.0"},{n:["palm tree"],u:"1f334",a:"0.6"},{n:["cactus"],u:"1f335",a:"0.6"},{n:["ear of rice"],u:"1f33e",a:"0.6"},{n:["herb"],u:"1f33f",a:"0.6"},{n:["shamrock"],u:"2618-fe0f",a:"1.0"},{n:["four leaf clover"],u:"1f340",a:"0.6"},{n:["maple leaf"],u:"1f341",a:"0.6"},{n:["fallen leaf"],u:"1f342",a:"0.6"},{n:["leaves","leaf fluttering in wind"],u:"1f343",a:"0.6"},{n:["empty nest"],u:"1fab9",a:"14.0"},{n:["nest with eggs"],u:"1faba",a:"14.0"}],F5e=[{n:["grapes"],u:"1f347",a:"0.6"},{n:["melon"],u:"1f348",a:"0.6"},{n:["watermelon"],u:"1f349",a:"0.6"},{n:["tangerine"],u:"1f34a",a:"0.6"},{n:["lemon"],u:"1f34b",a:"1.0"},{n:["banana"],u:"1f34c",a:"0.6"},{n:["pineapple"],u:"1f34d",a:"0.6"},{n:["mango"],u:"1f96d",a:"11.0"},{n:["apple","red apple"],u:"1f34e",a:"0.6"},{n:["green apple"],u:"1f34f",a:"0.6"},{n:["pear"],u:"1f350",a:"1.0"},{n:["peach"],u:"1f351",a:"0.6"},{n:["cherries"],u:"1f352",a:"0.6"},{n:["strawberry"],u:"1f353",a:"0.6"},{n:["blueberries"],u:"1fad0",a:"13.0"},{n:["kiwifruit"],u:"1f95d",a:"3.0"},{n:["tomato"],u:"1f345",a:"0.6"},{n:["olive"],u:"1fad2",a:"13.0"},{n:["coconut"],u:"1f965",a:"5.0"},{n:["avocado"],u:"1f951",a:"3.0"},{n:["eggplant","aubergine"],u:"1f346",a:"0.6"},{n:["potato"],u:"1f954",a:"3.0"},{n:["carrot"],u:"1f955",a:"3.0"},{n:["corn","ear of maize"],u:"1f33d",a:"0.6"},{n:["hot pepper"],u:"1f336-fe0f",a:"0.7"},{n:["bell pepper"],u:"1fad1",a:"13.0"},{n:["cucumber"],u:"1f952",a:"3.0"},{n:["leafy green"],u:"1f96c",a:"11.0"},{n:["broccoli"],u:"1f966",a:"5.0"},{n:["garlic"],u:"1f9c4",a:"12.0"},{n:["onion"],u:"1f9c5",a:"12.0"},{n:["mushroom"],u:"1f344",a:"0.6"},{n:["peanuts"],u:"1f95c",a:"3.0"},{n:["beans"],u:"1fad8",a:"14.0"},{n:["chestnut"],u:"1f330",a:"0.6"},{n:["bread"],u:"1f35e",a:"0.6"},{n:["croissant"],u:"1f950",a:"3.0"},{n:["baguette bread"],u:"1f956",a:"3.0"},{n:["flatbread"],u:"1fad3",a:"13.0"},{n:["pretzel"],u:"1f968",a:"5.0"},{n:["bagel"],u:"1f96f",a:"11.0"},{n:["pancakes"],u:"1f95e",a:"3.0"},{n:["waffle"],u:"1f9c7",a:"12.0"},{n:["cheese wedge"],u:"1f9c0",a:"1.0"},{n:["meat on bone"],u:"1f356",a:"0.6"},{n:["poultry leg"],u:"1f357",a:"0.6"},{n:["cut of meat"],u:"1f969",a:"5.0"},{n:["bacon"],u:"1f953",a:"3.0"},{n:["hamburger"],u:"1f354",a:"0.6"},{n:["fries","french fries"],u:"1f35f",a:"0.6"},{n:["pizza","slice of pizza"],u:"1f355",a:"0.6"},{n:["hotdog","hot dog"],u:"1f32d",a:"1.0"},{n:["sandwich"],u:"1f96a",a:"5.0"},{n:["taco"],u:"1f32e",a:"1.0"},{n:["burrito"],u:"1f32f",a:"1.0"},{n:["tamale"],u:"1fad4",a:"13.0"},{n:["stuffed flatbread"],u:"1f959",a:"3.0"},{n:["falafel"],u:"1f9c6",a:"12.0"},{n:["egg"],u:"1f95a",a:"3.0"},{n:["cooking","fried egg"],u:"1f373",a:"0.6"},{n:["shallow pan of food"],u:"1f958",a:"3.0"},{n:["stew","pot of food"],u:"1f372",a:"0.6"},{n:["fondue"],u:"1fad5",a:"13.0"},{n:["bowl with spoon"],u:"1f963",a:"5.0"},{n:["green salad"],u:"1f957",a:"3.0"},{n:["popcorn"],u:"1f37f",a:"1.0"},{n:["butter"],u:"1f9c8",a:"12.0"},{n:["salt","salt shaker"],u:"1f9c2",a:"11.0"},{n:["canned food"],u:"1f96b",a:"5.0"},{n:["bento","bento box"],u:"1f371",a:"0.6"},{n:["rice cracker"],u:"1f358",a:"0.6"},{n:["rice ball"],u:"1f359",a:"0.6"},{n:["rice","cooked rice"],u:"1f35a",a:"0.6"},{n:["curry","curry and rice"],u:"1f35b",a:"0.6"},{n:["ramen","steaming bowl"],u:"1f35c",a:"0.6"},{n:["spaghetti"],u:"1f35d",a:"0.6"},{n:["sweet potato","roasted sweet potato"],u:"1f360",a:"0.6"},{n:["oden"],u:"1f362",a:"0.6"},{n:["sushi"],u:"1f363",a:"0.6"},{n:["fried shrimp"],u:"1f364",a:"0.6"},{n:["fish cake","fish cake with swirl design"],u:"1f365",a:"0.6"},{n:["moon cake"],u:"1f96e",a:"11.0"},{n:["dango"],u:"1f361",a:"0.6"},{n:["dumpling"],u:"1f95f",a:"5.0"},{n:["fortune cookie"],u:"1f960",a:"5.0"},{n:["takeout box"],u:"1f961",a:"5.0"},{n:["crab"],u:"1f980",a:"1.0"},{n:["lobster"],u:"1f99e",a:"11.0"},{n:["shrimp"],u:"1f990",a:"3.0"},{n:["squid"],u:"1f991",a:"3.0"},{n:["oyster"],u:"1f9aa",a:"12.0"},{n:["icecream","soft ice cream"],u:"1f366",a:"0.6"},{n:["shaved ice"],u:"1f367",a:"0.6"},{n:["ice cream"],u:"1f368",a:"0.6"},{n:["doughnut"],u:"1f369",a:"0.6"},{n:["cookie"],u:"1f36a",a:"0.6"},{n:["birthday","birthday cake"],u:"1f382",a:"0.6"},{n:["cake","shortcake"],u:"1f370",a:"0.6"},{n:["cupcake"],u:"1f9c1",a:"11.0"},{n:["pie"],u:"1f967",a:"5.0"},{n:["chocolate bar"],u:"1f36b",a:"0.6"},{n:["candy"],u:"1f36c",a:"0.6"},{n:["lollipop"],u:"1f36d",a:"0.6"},{n:["custard"],u:"1f36e",a:"0.6"},{n:["honey pot"],u:"1f36f",a:"0.6"},{n:["baby bottle"],u:"1f37c",a:"1.0"},{n:["glass of milk"],u:"1f95b",a:"3.0"},{n:["coffee","hot beverage"],u:"2615",a:"0.6"},{n:["teapot"],u:"1fad6",a:"13.0"},{n:["tea","teacup without handle"],u:"1f375",a:"0.6"},{n:["sake","sake bottle and cup"],u:"1f376",a:"0.6"},{n:["champagne","bottle with popping cork"],u:"1f37e",a:"1.0"},{n:["wine glass"],u:"1f377",a:"0.6"},{n:["cocktail","cocktail glass"],u:"1f378",a:"0.6"},{n:["tropical drink"],u:"1f379",a:"0.6"},{n:["beer","beer mug"],u:"1f37a",a:"0.6"},{n:["beers","clinking beer mugs"],u:"1f37b",a:"0.6"},{n:["clinking glasses"],u:"1f942",a:"3.0"},{n:["tumbler glass"],u:"1f943",a:"3.0"},{n:["pouring liquid"],u:"1fad7",a:"14.0"},{n:["cup with straw"],u:"1f964",a:"5.0"},{n:["bubble tea"],u:"1f9cb",a:"13.0"},{n:["beverage box"],u:"1f9c3",a:"12.0"},{n:["mate drink"],u:"1f9c9",a:"12.0"},{n:["ice cube"],u:"1f9ca",a:"12.0"},{n:["chopsticks"],u:"1f962",a:"5.0"},{n:["knife fork plate","fork and knife with plate"],u:"1f37d-fe0f",a:"0.7"},{n:["fork and knife"],u:"1f374",a:"0.6"},{n:["spoon"],u:"1f944",a:"3.0"},{n:["hocho","knife"],u:"1f52a",a:"0.6"},{n:["jar"],u:"1fad9",a:"14.0"},{n:["amphora"],u:"1f3fa",a:"1.0"}],$5e=[{n:["earth africa","earth globe europe-africa"],u:"1f30d",a:"0.7"},{n:["earth americas","earth globe americas"],u:"1f30e",a:"0.7"},{n:["earth asia","earth globe asia-australia"],u:"1f30f",a:"0.6"},{n:["globe with meridians"],u:"1f310",a:"1.0"},{n:["world map"],u:"1f5fa-fe0f",a:"0.7"},{n:["japan","silhouette of japan"],u:"1f5fe",a:"0.6"},{n:["compass"],u:"1f9ed",a:"11.0"},{n:["snow-capped mountain","snow capped mountain"],u:"1f3d4-fe0f",a:"0.7"},{n:["mountain"],u:"26f0-fe0f",a:"0.7"},{n:["volcano"],u:"1f30b",a:"0.6"},{n:["mount fuji"],u:"1f5fb",a:"0.6"},{n:["camping"],u:"1f3d5-fe0f",a:"0.7"},{n:["beach with umbrella"],u:"1f3d6-fe0f",a:"0.7"},{n:["desert"],u:"1f3dc-fe0f",a:"0.7"},{n:["desert island"],u:"1f3dd-fe0f",a:"0.7"},{n:["national park"],u:"1f3de-fe0f",a:"0.7"},{n:["stadium"],u:"1f3df-fe0f",a:"0.7"},{n:["classical building"],u:"1f3db-fe0f",a:"0.7"},{n:["building construction"],u:"1f3d7-fe0f",a:"0.7"},{n:["brick","bricks"],u:"1f9f1",a:"11.0"},{n:["rock"],u:"1faa8",a:"13.0"},{n:["wood"],u:"1fab5",a:"13.0"},{n:["hut"],u:"1f6d6",a:"13.0"},{n:["houses","house buildings"],u:"1f3d8-fe0f",a:"0.7"},{n:["derelict house","derelict house building"],u:"1f3da-fe0f",a:"0.7"},{n:["house","house building"],u:"1f3e0",a:"0.6"},{n:["house with garden"],u:"1f3e1",a:"0.6"},{n:["office","office building"],u:"1f3e2",a:"0.6"},{n:["post office","japanese post office"],u:"1f3e3",a:"0.6"},{n:["european post office"],u:"1f3e4",a:"1.0"},{n:["hospital"],u:"1f3e5",a:"0.6"},{n:["bank"],u:"1f3e6",a:"0.6"},{n:["hotel"],u:"1f3e8",a:"0.6"},{n:["love hotel"],u:"1f3e9",a:"0.6"},{n:["convenience store"],u:"1f3ea",a:"0.6"},{n:["school"],u:"1f3eb",a:"0.6"},{n:["department store"],u:"1f3ec",a:"0.6"},{n:["factory"],u:"1f3ed",a:"0.6"},{n:["japanese castle"],u:"1f3ef",a:"0.6"},{n:["european castle"],u:"1f3f0",a:"0.6"},{n:["wedding"],u:"1f492",a:"0.6"},{n:["tokyo tower"],u:"1f5fc",a:"0.6"},{n:["statue of liberty"],u:"1f5fd",a:"0.6"},{n:["church"],u:"26ea",a:"0.6"},{n:["mosque"],u:"1f54c",a:"1.0"},{n:["hindu temple"],u:"1f6d5",a:"12.0"},{n:["synagogue"],u:"1f54d",a:"1.0"},{n:["shinto shrine"],u:"26e9-fe0f",a:"0.7"},{n:["kaaba"],u:"1f54b",a:"1.0"},{n:["fountain"],u:"26f2",a:"0.6"},{n:["tent"],u:"26fa",a:"0.6"},{n:["foggy"],u:"1f301",a:"0.6"},{n:["night with stars"],u:"1f303",a:"0.6"},{n:["cityscape"],u:"1f3d9-fe0f",a:"0.7"},{n:["sunrise over mountains"],u:"1f304",a:"0.6"},{n:["sunrise"],u:"1f305",a:"0.6"},{n:["city sunset","cityscape at dusk"],u:"1f306",a:"0.6"},{n:["city sunrise","sunset over buildings"],u:"1f307",a:"0.6"},{n:["bridge at night"],u:"1f309",a:"0.6"},{n:["hotsprings","hot springs"],u:"2668-fe0f",a:"0.6"},{n:["carousel horse"],u:"1f3a0",a:"0.6"},{n:["playground slide"],u:"1f6dd",a:"14.0"},{n:["ferris wheel"],u:"1f3a1",a:"0.6"},{n:["roller coaster"],u:"1f3a2",a:"0.6"},{n:["barber","barber pole"],u:"1f488",a:"0.6"},{n:["circus tent"],u:"1f3aa",a:"0.6"},{n:["steam locomotive"],u:"1f682",a:"1.0"},{n:["railway car"],u:"1f683",a:"0.6"},{n:["high-speed train","bullettrain side"],u:"1f684",a:"0.6"},{n:["bullettrain front","high-speed train with bullet nose"],u:"1f685",a:"0.6"},{n:["train","train2"],u:"1f686",a:"1.0"},{n:["metro"],u:"1f687",a:"0.6"},{n:["light rail"],u:"1f688",a:"1.0"},{n:["station"],u:"1f689",a:"0.6"},{n:["tram"],u:"1f68a",a:"1.0"},{n:["monorail"],u:"1f69d",a:"1.0"},{n:["mountain railway"],u:"1f69e",a:"1.0"},{n:["train","tram car"],u:"1f68b",a:"1.0"},{n:["bus"],u:"1f68c",a:"0.6"},{n:["oncoming bus"],u:"1f68d",a:"0.7"},{n:["trolleybus"],u:"1f68e",a:"1.0"},{n:["minibus"],u:"1f690",a:"1.0"},{n:["ambulance"],u:"1f691",a:"0.6"},{n:["fire engine"],u:"1f692",a:"0.6"},{n:["police car"],u:"1f693",a:"0.6"},{n:["oncoming police car"],u:"1f694",a:"0.7"},{n:["taxi"],u:"1f695",a:"0.6"},{n:["oncoming taxi"],u:"1f696",a:"1.0"},{n:["car","red car","automobile"],u:"1f697",a:"0.6"},{n:["oncoming automobile"],u:"1f698",a:"0.7"},{n:["blue car","recreational vehicle"],u:"1f699",a:"0.6"},{n:["pickup truck"],u:"1f6fb",a:"13.0"},{n:["truck","delivery truck"],u:"1f69a",a:"0.6"},{n:["articulated lorry"],u:"1f69b",a:"1.0"},{n:["tractor"],u:"1f69c",a:"1.0"},{n:["racing car"],u:"1f3ce-fe0f",a:"0.7"},{n:["motorcycle","racing motorcycle"],u:"1f3cd-fe0f",a:"0.7"},{n:["motor scooter"],u:"1f6f5",a:"3.0"},{n:["manual wheelchair"],u:"1f9bd",a:"12.0"},{n:["motorized wheelchair"],u:"1f9bc",a:"12.0"},{n:["auto rickshaw"],u:"1f6fa",a:"12.0"},{n:["bike","bicycle"],u:"1f6b2",a:"0.6"},{n:["scooter"],u:"1f6f4",a:"3.0"},{n:["skateboard"],u:"1f6f9",a:"11.0"},{n:["roller skate"],u:"1f6fc",a:"13.0"},{n:["busstop","bus stop"],u:"1f68f",a:"0.6"},{n:["motorway"],u:"1f6e3-fe0f",a:"0.7"},{n:["railway track"],u:"1f6e4-fe0f",a:"0.7"},{n:["oil drum"],u:"1f6e2-fe0f",a:"0.7"},{n:["fuelpump","fuel pump"],u:"26fd",a:"0.6"},{n:["wheel"],u:"1f6de",a:"14.0"},{n:["rotating light","police cars revolving light"],u:"1f6a8",a:"0.6"},{n:["traffic light","horizontal traffic light"],u:"1f6a5",a:"0.6"},{n:["vertical traffic light"],u:"1f6a6",a:"1.0"},{n:["octagonal sign"],u:"1f6d1",a:"3.0"},{n:["construction","construction sign"],u:"1f6a7",a:"0.6"},{n:["anchor"],u:"2693",a:"0.6"},{n:["ring buoy"],u:"1f6df",a:"14.0"},{n:["boat","sailboat"],u:"26f5",a:"0.6"},{n:["canoe"],u:"1f6f6",a:"3.0"},{n:["speedboat"],u:"1f6a4",a:"0.6"},{n:["passenger ship"],u:"1f6f3-fe0f",a:"0.7"},{n:["ferry"],u:"26f4-fe0f",a:"0.7"},{n:["motor boat"],u:"1f6e5-fe0f",a:"0.7"},{n:["ship"],u:"1f6a2",a:"0.6"},{n:["airplane"],u:"2708-fe0f",a:"0.6"},{n:["small airplane"],u:"1f6e9-fe0f",a:"0.7"},{n:["airplane departure"],u:"1f6eb",a:"1.0"},{n:["airplane arriving"],u:"1f6ec",a:"1.0"},{n:["parachute"],u:"1fa82",a:"12.0"},{n:["seat"],u:"1f4ba",a:"0.6"},{n:["helicopter"],u:"1f681",a:"1.0"},{n:["suspension railway"],u:"1f69f",a:"1.0"},{n:["mountain cableway"],u:"1f6a0",a:"1.0"},{n:["aerial tramway"],u:"1f6a1",a:"1.0"},{n:["satellite"],u:"1f6f0-fe0f",a:"0.7"},{n:["rocket"],u:"1f680",a:"0.6"},{n:["flying saucer"],u:"1f6f8",a:"5.0"},{n:["bellhop bell"],u:"1f6ce-fe0f",a:"0.7"},{n:["luggage"],u:"1f9f3",a:"11.0"},{n:["hourglass"],u:"231b",a:"0.6"},{n:["hourglass flowing sand","hourglass with flowing sand"],u:"23f3",a:"0.6"},{n:["watch"],u:"231a",a:"0.6"},{n:["alarm clock"],u:"23f0",a:"0.6"},{n:["stopwatch"],u:"23f1-fe0f",a:"1.0"},{n:["timer clock"],u:"23f2-fe0f",a:"1.0"},{n:["mantelpiece clock"],u:"1f570-fe0f",a:"0.7"},{n:["clock12","clock face twelve oclock"],u:"1f55b",a:"0.6"},{n:["clock1230","clock face twelve-thirty"],u:"1f567",a:"0.7"},{n:["clock1","clock face one oclock"],u:"1f550",a:"0.6"},{n:["clock130","clock face one-thirty"],u:"1f55c",a:"0.7"},{n:["clock2","clock face two oclock"],u:"1f551",a:"0.6"},{n:["clock230","clock face two-thirty"],u:"1f55d",a:"0.7"},{n:["clock3","clock face three oclock"],u:"1f552",a:"0.6"},{n:["clock330","clock face three-thirty"],u:"1f55e",a:"0.7"},{n:["clock4","clock face four oclock"],u:"1f553",a:"0.6"},{n:["clock430","clock face four-thirty"],u:"1f55f",a:"0.7"},{n:["clock5","clock face five oclock"],u:"1f554",a:"0.6"},{n:["clock530","clock face five-thirty"],u:"1f560",a:"0.7"},{n:["clock6","clock face six oclock"],u:"1f555",a:"0.6"},{n:["clock630","clock face six-thirty"],u:"1f561",a:"0.7"},{n:["clock7","clock face seven oclock"],u:"1f556",a:"0.6"},{n:["clock730","clock face seven-thirty"],u:"1f562",a:"0.7"},{n:["clock8","clock face eight oclock"],u:"1f557",a:"0.6"},{n:["clock830","clock face eight-thirty"],u:"1f563",a:"0.7"},{n:["clock9","clock face nine oclock"],u:"1f558",a:"0.6"},{n:["clock930","clock face nine-thirty"],u:"1f564",a:"0.7"},{n:["clock10","clock face ten oclock"],u:"1f559",a:"0.6"},{n:["clock1030","clock face ten-thirty"],u:"1f565",a:"0.7"},{n:["clock11","clock face eleven oclock"],u:"1f55a",a:"0.6"},{n:["clock1130","clock face eleven-thirty"],u:"1f566",a:"0.7"},{n:["new moon","new moon symbol"],u:"1f311",a:"0.6"},{n:["waxing crescent moon","waxing crescent moon symbol"],u:"1f312",a:"1.0"},{n:["first quarter moon","first quarter moon symbol"],u:"1f313",a:"0.6"},{n:["moon","waxing gibbous moon","waxing gibbous moon symbol"],u:"1f314",a:"0.6"},{n:["full moon","full moon symbol"],u:"1f315",a:"0.6"},{n:["waning gibbous moon","waning gibbous moon symbol"],u:"1f316",a:"1.0"},{n:["last quarter moon","last quarter moon symbol"],u:"1f317",a:"1.0"},{n:["waning crescent moon","waning crescent moon symbol"],u:"1f318",a:"1.0"},{n:["crescent moon"],u:"1f319",a:"0.6"},{n:["new moon with face"],u:"1f31a",a:"1.0"},{n:["first quarter moon with face"],u:"1f31b",a:"0.6"},{n:["last quarter moon with face"],u:"1f31c",a:"0.7"},{n:["thermometer"],u:"1f321-fe0f",a:"0.7"},{n:["sunny","black sun with rays"],u:"2600-fe0f",a:"0.6"},{n:["full moon with face"],u:"1f31d",a:"1.0"},{n:["sun with face"],u:"1f31e",a:"1.0"},{n:["ringed planet"],u:"1fa90",a:"12.0"},{n:["star","white medium star"],u:"2b50",a:"0.6"},{n:["star2","glowing star"],u:"1f31f",a:"0.6"},{n:["stars","shooting star"],u:"1f320",a:"0.6"},{n:["milky way"],u:"1f30c",a:"0.6"},{n:["cloud"],u:"2601-fe0f",a:"0.6"},{n:["partly sunny","sun behind cloud"],u:"26c5",a:"0.6"},{n:["thunder cloud and rain","cloud with lightning and rain"],u:"26c8-fe0f",a:"0.7"},{n:["mostly sunny","sun small cloud","sun behind small cloud"],u:"1f324-fe0f",a:"0.7"},{n:["barely sunny","sun behind cloud","sun behind large cloud"],u:"1f325-fe0f",a:"0.7"},{n:["partly sunny rain","sun behind rain cloud"],u:"1f326-fe0f",a:"0.7"},{n:["rain cloud","cloud with rain"],u:"1f327-fe0f",a:"0.7"},{n:["snow cloud","cloud with snow"],u:"1f328-fe0f",a:"0.7"},{n:["lightning","lightning cloud","cloud with lightning"],u:"1f329-fe0f",a:"0.7"},{n:["tornado","tornado cloud"],u:"1f32a-fe0f",a:"0.7"},{n:["fog"],u:"1f32b-fe0f",a:"0.7"},{n:["wind face","wind blowing face"],u:"1f32c-fe0f",a:"0.7"},{n:["cyclone"],u:"1f300",a:"0.6"},{n:["rainbow"],u:"1f308",a:"0.6"},{n:["closed umbrella"],u:"1f302",a:"0.6"},{n:["umbrella"],u:"2602-fe0f",a:"0.7"},{n:["umbrella with rain drops"],u:"2614",a:"0.6"},{n:["umbrella on ground"],u:"26f1-fe0f",a:"0.7"},{n:["zap","high voltage sign"],u:"26a1",a:"0.6"},{n:["snowflake"],u:"2744-fe0f",a:"0.6"},{n:["snowman"],u:"2603-fe0f",a:"0.7"},{n:["snowman without snow"],u:"26c4",a:"0.6"},{n:["comet"],u:"2604-fe0f",a:"1.0"},{n:["fire"],u:"1f525",a:"0.6"},{n:["droplet"],u:"1f4a7",a:"0.6"},{n:["ocean","water wave"],u:"1f30a",a:"0.6"}],B5e=[{n:["jack-o-lantern","jack o lantern"],u:"1f383",a:"0.6"},{n:["christmas tree"],u:"1f384",a:"0.6"},{n:["fireworks"],u:"1f386",a:"0.6"},{n:["sparkler","firework sparkler"],u:"1f387",a:"0.6"},{n:["firecracker"],u:"1f9e8",a:"11.0"},{n:["sparkles"],u:"2728",a:"0.6"},{n:["balloon"],u:"1f388",a:"0.6"},{n:["tada","party popper"],u:"1f389",a:"0.6"},{n:["confetti ball"],u:"1f38a",a:"0.6"},{n:["tanabata tree"],u:"1f38b",a:"0.6"},{n:["bamboo","pine decoration"],u:"1f38d",a:"0.6"},{n:["dolls","japanese dolls"],u:"1f38e",a:"0.6"},{n:["flags","carp streamer"],u:"1f38f",a:"0.6"},{n:["wind chime"],u:"1f390",a:"0.6"},{n:["rice scene","moon viewing ceremony"],u:"1f391",a:"0.6"},{n:["red envelope","red gift envelope"],u:"1f9e7",a:"11.0"},{n:["ribbon"],u:"1f380",a:"0.6"},{n:["gift","wrapped present"],u:"1f381",a:"0.6"},{n:["reminder ribbon"],u:"1f397-fe0f",a:"0.7"},{n:["admission tickets"],u:"1f39f-fe0f",a:"0.7"},{n:["ticket"],u:"1f3ab",a:"0.6"},{n:["medal","military medal"],u:"1f396-fe0f",a:"0.7"},{n:["trophy"],u:"1f3c6",a:"0.6"},{n:["sports medal"],u:"1f3c5",a:"1.0"},{n:["first place medal"],u:"1f947",a:"3.0"},{n:["second place medal"],u:"1f948",a:"3.0"},{n:["third place medal"],u:"1f949",a:"3.0"},{n:["soccer","soccer ball"],u:"26bd",a:"0.6"},{n:["baseball"],u:"26be",a:"0.6"},{n:["softball"],u:"1f94e",a:"11.0"},{n:["basketball","basketball and hoop"],u:"1f3c0",a:"0.6"},{n:["volleyball"],u:"1f3d0",a:"1.0"},{n:["football","american football"],u:"1f3c8",a:"0.6"},{n:["rugby football"],u:"1f3c9",a:"1.0"},{n:["tennis","tennis racquet and ball"],u:"1f3be",a:"0.6"},{n:["flying disc"],u:"1f94f",a:"11.0"},{n:["bowling"],u:"1f3b3",a:"0.6"},{n:["cricket bat and ball"],u:"1f3cf",a:"1.0"},{n:["field hockey stick and ball"],u:"1f3d1",a:"1.0"},{n:["ice hockey stick and puck"],u:"1f3d2",a:"1.0"},{n:["lacrosse","lacrosse stick and ball"],u:"1f94d",a:"11.0"},{n:["table tennis paddle and ball"],u:"1f3d3",a:"1.0"},{n:["badminton racquet and shuttlecock"],u:"1f3f8",a:"1.0"},{n:["boxing glove"],u:"1f94a",a:"3.0"},{n:["martial arts uniform"],u:"1f94b",a:"3.0"},{n:["goal net"],u:"1f945",a:"3.0"},{n:["golf","flag in hole"],u:"26f3",a:"0.6"},{n:["ice skate"],u:"26f8-fe0f",a:"0.7"},{n:["fishing pole and fish"],u:"1f3a3",a:"0.6"},{n:["diving mask"],u:"1f93f",a:"12.0"},{n:["running shirt with sash"],u:"1f3bd",a:"0.6"},{n:["ski","ski and ski boot"],u:"1f3bf",a:"0.6"},{n:["sled"],u:"1f6f7",a:"5.0"},{n:["curling stone"],u:"1f94c",a:"5.0"},{n:["dart","direct hit"],u:"1f3af",a:"0.6"},{n:["yo-yo"],u:"1fa80",a:"12.0"},{n:["kite"],u:"1fa81",a:"12.0"},{n:["8ball","billiards"],u:"1f3b1",a:"0.6"},{n:["crystal ball"],u:"1f52e",a:"0.6"},{n:["magic wand"],u:"1fa84",a:"13.0"},{n:["nazar amulet"],u:"1f9ff",a:"11.0"},{n:["hamsa"],u:"1faac",a:"14.0"},{n:["video game"],u:"1f3ae",a:"0.6"},{n:["joystick"],u:"1f579-fe0f",a:"0.7"},{n:["slot machine"],u:"1f3b0",a:"0.6"},{n:["game die"],u:"1f3b2",a:"0.6"},{n:["jigsaw","jigsaw puzzle piece"],u:"1f9e9",a:"11.0"},{n:["teddy bear"],u:"1f9f8",a:"11.0"},{n:["pinata"],u:"1fa85",a:"13.0"},{n:["mirror ball"],u:"1faa9",a:"14.0"},{n:["nesting dolls"],u:"1fa86",a:"13.0"},{n:["spades","black spade suit"],u:"2660-fe0f",a:"0.6"},{n:["hearts","black heart suit"],u:"2665-fe0f",a:"0.6"},{n:["diamonds","black diamond suit"],u:"2666-fe0f",a:"0.6"},{n:["clubs","black club suit"],u:"2663-fe0f",a:"0.6"},{n:["chess pawn"],u:"265f-fe0f",a:"11.0"},{n:["black joker","playing card black joker"],u:"1f0cf",a:"0.6"},{n:["mahjong","mahjong tile red dragon"],u:"1f004",a:"0.6"},{n:["flower playing cards"],u:"1f3b4",a:"0.6"},{n:["performing arts"],u:"1f3ad",a:"0.6"},{n:["framed picture","frame with picture"],u:"1f5bc-fe0f",a:"0.7"},{n:["art","artist palette"],u:"1f3a8",a:"0.6"},{n:["thread","spool of thread"],u:"1f9f5",a:"11.0"},{n:["sewing needle"],u:"1faa1",a:"13.0"},{n:["yarn","ball of yarn"],u:"1f9f6",a:"11.0"},{n:["knot"],u:"1faa2",a:"13.0"}],H5e=[{n:["eyeglasses"],u:"1f453",a:"0.6"},{n:["sunglasses","dark sunglasses"],u:"1f576-fe0f",a:"0.7"},{n:["goggles"],u:"1f97d",a:"11.0"},{n:["lab coat"],u:"1f97c",a:"11.0"},{n:["safety vest"],u:"1f9ba",a:"12.0"},{n:["necktie"],u:"1f454",a:"0.6"},{n:["shirt","tshirt","t-shirt"],u:"1f455",a:"0.6"},{n:["jeans"],u:"1f456",a:"0.6"},{n:["scarf"],u:"1f9e3",a:"5.0"},{n:["gloves"],u:"1f9e4",a:"5.0"},{n:["coat"],u:"1f9e5",a:"5.0"},{n:["socks"],u:"1f9e6",a:"5.0"},{n:["dress"],u:"1f457",a:"0.6"},{n:["kimono"],u:"1f458",a:"0.6"},{n:["sari"],u:"1f97b",a:"12.0"},{n:["one-piece swimsuit"],u:"1fa71",a:"12.0"},{n:["briefs"],u:"1fa72",a:"12.0"},{n:["shorts"],u:"1fa73",a:"12.0"},{n:["bikini"],u:"1f459",a:"0.6"},{n:["womans clothes"],u:"1f45a",a:"0.6"},{n:["purse"],u:"1f45b",a:"0.6"},{n:["handbag"],u:"1f45c",a:"0.6"},{n:["pouch"],u:"1f45d",a:"0.6"},{n:["shopping bags"],u:"1f6cd-fe0f",a:"0.7"},{n:["school satchel"],u:"1f392",a:"0.6"},{n:["thong sandal"],u:"1fa74",a:"13.0"},{n:["shoe","mans shoe"],u:"1f45e",a:"0.6"},{n:["athletic shoe"],u:"1f45f",a:"0.6"},{n:["hiking boot"],u:"1f97e",a:"11.0"},{n:["flat shoe","womans flat shoe"],u:"1f97f",a:"11.0"},{n:["high heel","high-heeled shoe"],u:"1f460",a:"0.6"},{n:["sandal","womans sandal"],u:"1f461",a:"0.6"},{n:["ballet shoes"],u:"1fa70",a:"12.0"},{n:["boot","womans boots"],u:"1f462",a:"0.6"},{n:["crown"],u:"1f451",a:"0.6"},{n:["womans hat"],u:"1f452",a:"0.6"},{n:["tophat","top hat"],u:"1f3a9",a:"0.6"},{n:["mortar board","graduation cap"],u:"1f393",a:"0.6"},{n:["billed cap"],u:"1f9e2",a:"5.0"},{n:["military helmet"],u:"1fa96",a:"13.0"},{n:["rescue worker\u2019s helmet","helmet with white cross"],u:"26d1-fe0f",a:"0.7"},{n:["prayer beads"],u:"1f4ff",a:"1.0"},{n:["lipstick"],u:"1f484",a:"0.6"},{n:["ring"],u:"1f48d",a:"0.6"},{n:["gem","gem stone"],u:"1f48e",a:"0.6"},{n:["mute","speaker with cancellation stroke"],u:"1f507",a:"1.0"},{n:["speaker"],u:"1f508",a:"0.7"},{n:["sound","speaker with one sound wave"],u:"1f509",a:"1.0"},{n:["loud sound","speaker with three sound waves"],u:"1f50a",a:"0.6"},{n:["loudspeaker","public address loudspeaker"],u:"1f4e2",a:"0.6"},{n:["mega","cheering megaphone"],u:"1f4e3",a:"0.6"},{n:["postal horn"],u:"1f4ef",a:"1.0"},{n:["bell"],u:"1f514",a:"0.6"},{n:["no bell","bell with cancellation stroke"],u:"1f515",a:"1.0"},{n:["musical score"],u:"1f3bc",a:"0.6"},{n:["musical note"],u:"1f3b5",a:"0.6"},{n:["notes","multiple musical notes"],u:"1f3b6",a:"0.6"},{n:["studio microphone"],u:"1f399-fe0f",a:"0.7"},{n:["level slider"],u:"1f39a-fe0f",a:"0.7"},{n:["control knobs"],u:"1f39b-fe0f",a:"0.7"},{n:["microphone"],u:"1f3a4",a:"0.6"},{n:["headphone","headphones"],u:"1f3a7",a:"0.6"},{n:["radio"],u:"1f4fb",a:"0.6"},{n:["saxophone"],u:"1f3b7",a:"0.6"},{n:["accordion"],u:"1fa97",a:"13.0"},{n:["guitar"],u:"1f3b8",a:"0.6"},{n:["musical keyboard"],u:"1f3b9",a:"0.6"},{n:["trumpet"],u:"1f3ba",a:"0.6"},{n:["violin"],u:"1f3bb",a:"0.6"},{n:["banjo"],u:"1fa95",a:"12.0"},{n:["drum with drumsticks"],u:"1f941",a:"3.0"},{n:["long drum"],u:"1fa98",a:"13.0"},{n:["iphone","mobile phone"],u:"1f4f1",a:"0.6"},{n:["calling","mobile phone with rightwards arrow at left"],u:"1f4f2",a:"0.6"},{n:["phone","telephone","black telephone"],u:"260e-fe0f",a:"0.6"},{n:["telephone receiver"],u:"1f4de",a:"0.6"},{n:["pager"],u:"1f4df",a:"0.6"},{n:["fax","fax machine"],u:"1f4e0",a:"0.6"},{n:["battery"],u:"1f50b",a:"0.6"},{n:["low battery"],u:"1faab",a:"14.0"},{n:["electric plug"],u:"1f50c",a:"0.6"},{n:["computer","personal computer"],u:"1f4bb",a:"0.6"},{n:["desktop computer"],u:"1f5a5-fe0f",a:"0.7"},{n:["printer"],u:"1f5a8-fe0f",a:"0.7"},{n:["keyboard"],u:"2328-fe0f",a:"1.0"},{n:["computer mouse","three button mouse"],u:"1f5b1-fe0f",a:"0.7"},{n:["trackball"],u:"1f5b2-fe0f",a:"0.7"},{n:["minidisc"],u:"1f4bd",a:"0.6"},{n:["floppy disk"],u:"1f4be",a:"0.6"},{n:["cd","optical disc"],u:"1f4bf",a:"0.6"},{n:["dvd"],u:"1f4c0",a:"0.6"},{n:["abacus"],u:"1f9ee",a:"11.0"},{n:["movie camera"],u:"1f3a5",a:"0.6"},{n:["film frames"],u:"1f39e-fe0f",a:"0.7"},{n:["film projector"],u:"1f4fd-fe0f",a:"0.7"},{n:["clapper","clapper board"],u:"1f3ac",a:"0.6"},{n:["tv","television"],u:"1f4fa",a:"0.6"},{n:["camera"],u:"1f4f7",a:"0.6"},{n:["camera with flash"],u:"1f4f8",a:"1.0"},{n:["video camera"],u:"1f4f9",a:"0.6"},{n:["vhs","videocassette"],u:"1f4fc",a:"0.6"},{n:["mag","left-pointing magnifying glass"],u:"1f50d",a:"0.6"},{n:["mag right","right-pointing magnifying glass"],u:"1f50e",a:"0.6"},{n:["candle"],u:"1f56f-fe0f",a:"0.7"},{n:["bulb","electric light bulb"],u:"1f4a1",a:"0.6"},{n:["flashlight","electric torch"],u:"1f526",a:"0.6"},{n:["lantern","izakaya lantern"],u:"1f3ee",a:"0.6"},{n:["diya lamp"],u:"1fa94",a:"12.0"},{n:["notebook with decorative cover"],u:"1f4d4",a:"0.6"},{n:["closed book"],u:"1f4d5",a:"0.6"},{n:["book","open book"],u:"1f4d6",a:"0.6"},{n:["green book"],u:"1f4d7",a:"0.6"},{n:["blue book"],u:"1f4d8",a:"0.6"},{n:["orange book"],u:"1f4d9",a:"0.6"},{n:["books"],u:"1f4da",a:"0.6"},{n:["notebook"],u:"1f4d3",a:"0.6"},{n:["ledger"],u:"1f4d2",a:"0.6"},{n:["page with curl"],u:"1f4c3",a:"0.6"},{n:["scroll"],u:"1f4dc",a:"0.6"},{n:["page facing up"],u:"1f4c4",a:"0.6"},{n:["newspaper"],u:"1f4f0",a:"0.6"},{n:["rolled-up newspaper","rolled up newspaper"],u:"1f5de-fe0f",a:"0.7"},{n:["bookmark tabs"],u:"1f4d1",a:"0.6"},{n:["bookmark"],u:"1f516",a:"0.6"},{n:["label"],u:"1f3f7-fe0f",a:"0.7"},{n:["moneybag","money bag"],u:"1f4b0",a:"0.6"},{n:["coin"],u:"1fa99",a:"13.0"},{n:["yen","banknote with yen sign"],u:"1f4b4",a:"0.6"},{n:["dollar","banknote with dollar sign"],u:"1f4b5",a:"0.6"},{n:["euro","banknote with euro sign"],u:"1f4b6",a:"1.0"},{n:["pound","banknote with pound sign"],u:"1f4b7",a:"1.0"},{n:["money with wings"],u:"1f4b8",a:"0.6"},{n:["credit card"],u:"1f4b3",a:"0.6"},{n:["receipt"],u:"1f9fe",a:"11.0"},{n:["chart","chart with upwards trend and yen sign"],u:"1f4b9",a:"0.6"},{n:["email","envelope"],u:"2709-fe0f",a:"0.6"},{n:["e-mail","e-mail symbol"],u:"1f4e7",a:"0.6"},{n:["incoming envelope"],u:"1f4e8",a:"0.6"},{n:["envelope with arrow","envelope with downwards arrow above"],u:"1f4e9",a:"0.6"},{n:["outbox tray"],u:"1f4e4",a:"0.6"},{n:["inbox tray"],u:"1f4e5",a:"0.6"},{n:["package"],u:"1f4e6",a:"0.6"},{n:["mailbox","closed mailbox with raised flag"],u:"1f4eb",a:"0.6"},{n:["mailbox closed","closed mailbox with lowered flag"],u:"1f4ea",a:"0.6"},{n:["mailbox with mail","open mailbox with raised flag"],u:"1f4ec",a:"0.7"},{n:["mailbox with no mail","open mailbox with lowered flag"],u:"1f4ed",a:"0.7"},{n:["postbox"],u:"1f4ee",a:"0.6"},{n:["ballot box with ballot"],u:"1f5f3-fe0f",a:"0.7"},{n:["pencil","pencil2"],u:"270f-fe0f",a:"0.6"},{n:["black nib"],u:"2712-fe0f",a:"0.6"},{n:["fountain pen","lower left fountain pen"],u:"1f58b-fe0f",a:"0.7"},{n:["pen","lower left ballpoint pen"],u:"1f58a-fe0f",a:"0.7"},{n:["paintbrush","lower left paintbrush"],u:"1f58c-fe0f",a:"0.7"},{n:["crayon","lower left crayon"],u:"1f58d-fe0f",a:"0.7"},{n:["memo","pencil"],u:"1f4dd",a:"0.6"},{n:["briefcase"],u:"1f4bc",a:"0.6"},{n:["file folder"],u:"1f4c1",a:"0.6"},{n:["open file folder"],u:"1f4c2",a:"0.6"},{n:["card index dividers"],u:"1f5c2-fe0f",a:"0.7"},{n:["date","calendar"],u:"1f4c5",a:"0.6"},{n:["calendar","tear-off calendar"],u:"1f4c6",a:"0.6"},{n:["spiral notepad","spiral note pad"],u:"1f5d2-fe0f",a:"0.7"},{n:["spiral calendar","spiral calendar pad"],u:"1f5d3-fe0f",a:"0.7"},{n:["card index"],u:"1f4c7",a:"0.6"},{n:["chart with upwards trend"],u:"1f4c8",a:"0.6"},{n:["chart with downwards trend"],u:"1f4c9",a:"0.6"},{n:["bar chart"],u:"1f4ca",a:"0.6"},{n:["clipboard"],u:"1f4cb",a:"0.6"},{n:["pushpin"],u:"1f4cc",a:"0.6"},{n:["round pushpin"],u:"1f4cd",a:"0.6"},{n:["paperclip"],u:"1f4ce",a:"0.6"},{n:["linked paperclips"],u:"1f587-fe0f",a:"0.7"},{n:["straight ruler"],u:"1f4cf",a:"0.6"},{n:["triangular ruler"],u:"1f4d0",a:"0.6"},{n:["scissors","black scissors"],u:"2702-fe0f",a:"0.6"},{n:["card file box"],u:"1f5c3-fe0f",a:"0.7"},{n:["file cabinet"],u:"1f5c4-fe0f",a:"0.7"},{n:["wastebasket"],u:"1f5d1-fe0f",a:"0.7"},{n:["lock"],u:"1f512",a:"0.6"},{n:["unlock","open lock"],u:"1f513",a:"0.6"},{n:["lock with ink pen"],u:"1f50f",a:"0.6"},{n:["closed lock with key"],u:"1f510",a:"0.6"},{n:["key"],u:"1f511",a:"0.6"},{n:["old key"],u:"1f5dd-fe0f",a:"0.7"},{n:["hammer"],u:"1f528",a:"0.6"},{n:["axe"],u:"1fa93",a:"12.0"},{n:["pick"],u:"26cf-fe0f",a:"0.7"},{n:["hammer and pick"],u:"2692-fe0f",a:"1.0"},{n:["hammer and wrench"],u:"1f6e0-fe0f",a:"0.7"},{n:["dagger","dagger knife"],u:"1f5e1-fe0f",a:"0.7"},{n:["crossed swords"],u:"2694-fe0f",a:"1.0"},{n:["gun","pistol"],u:"1f52b",a:"0.6"},{n:["boomerang"],u:"1fa83",a:"13.0"},{n:["bow and arrow"],u:"1f3f9",a:"1.0"},{n:["shield"],u:"1f6e1-fe0f",a:"0.7"},{n:["carpentry saw"],u:"1fa9a",a:"13.0"},{n:["wrench"],u:"1f527",a:"0.6"},{n:["screwdriver"],u:"1fa9b",a:"13.0"},{n:["nut and bolt"],u:"1f529",a:"0.6"},{n:["gear"],u:"2699-fe0f",a:"1.0"},{n:["clamp","compression"],u:"1f5dc-fe0f",a:"0.7"},{n:["scales","balance scale"],u:"2696-fe0f",a:"1.0"},{n:["probing cane"],u:"1f9af",a:"12.0"},{n:["link","link symbol"],u:"1f517",a:"0.6"},{n:["chains"],u:"26d3-fe0f",a:"0.7"},{n:["hook"],u:"1fa9d",a:"13.0"},{n:["toolbox"],u:"1f9f0",a:"11.0"},{n:["magnet"],u:"1f9f2",a:"11.0"},{n:["ladder"],u:"1fa9c",a:"13.0"},{n:["alembic"],u:"2697-fe0f",a:"1.0"},{n:["test tube"],u:"1f9ea",a:"11.0"},{n:["petri dish"],u:"1f9eb",a:"11.0"},{n:["dna","dna double helix"],u:"1f9ec",a:"11.0"},{n:["microscope"],u:"1f52c",a:"1.0"},{n:["telescope"],u:"1f52d",a:"1.0"},{n:["satellite antenna"],u:"1f4e1",a:"0.6"},{n:["syringe"],u:"1f489",a:"0.6"},{n:["drop of blood"],u:"1fa78",a:"12.0"},{n:["pill"],u:"1f48a",a:"0.6"},{n:["adhesive bandage"],u:"1fa79",a:"12.0"},{n:["crutch"],u:"1fa7c",a:"14.0"},{n:["stethoscope"],u:"1fa7a",a:"12.0"},{n:["x-ray"],u:"1fa7b",a:"14.0"},{n:["door"],u:"1f6aa",a:"0.6"},{n:["elevator"],u:"1f6d7",a:"13.0"},{n:["mirror"],u:"1fa9e",a:"13.0"},{n:["window"],u:"1fa9f",a:"13.0"},{n:["bed"],u:"1f6cf-fe0f",a:"0.7"},{n:["couch and lamp"],u:"1f6cb-fe0f",a:"0.7"},{n:["chair"],u:"1fa91",a:"12.0"},{n:["toilet"],u:"1f6bd",a:"0.6"},{n:["plunger"],u:"1faa0",a:"13.0"},{n:["shower"],u:"1f6bf",a:"1.0"},{n:["bathtub"],u:"1f6c1",a:"1.0"},{n:["mouse trap"],u:"1faa4",a:"13.0"},{n:["razor"],u:"1fa92",a:"12.0"},{n:["lotion bottle"],u:"1f9f4",a:"11.0"},{n:["safety pin"],u:"1f9f7",a:"11.0"},{n:["broom"],u:"1f9f9",a:"11.0"},{n:["basket"],u:"1f9fa",a:"11.0"},{n:["roll of paper"],u:"1f9fb",a:"11.0"},{n:["bucket"],u:"1faa3",a:"13.0"},{n:["soap","bar of soap"],u:"1f9fc",a:"11.0"},{n:["bubbles"],u:"1fae7",a:"14.0"},{n:["toothbrush"],u:"1faa5",a:"13.0"},{n:["sponge"],u:"1f9fd",a:"11.0"},{n:["fire extinguisher"],u:"1f9ef",a:"11.0"},{n:["shopping trolley"],u:"1f6d2",a:"3.0"},{n:["smoking","smoking symbol"],u:"1f6ac",a:"0.6"},{n:["coffin"],u:"26b0-fe0f",a:"1.0"},{n:["headstone"],u:"1faa6",a:"13.0"},{n:["funeral urn"],u:"26b1-fe0f",a:"1.0"},{n:["moyai"],u:"1f5ff",a:"0.6"},{n:["placard"],u:"1faa7",a:"13.0"},{n:["identification card"],u:"1faaa",a:"14.0"}],U5e=[{n:["atm","automated teller machine"],u:"1f3e7",a:"0.6"},{n:["put litter in its place","put litter in its place symbol"],u:"1f6ae",a:"1.0"},{n:["potable water","potable water symbol"],u:"1f6b0",a:"1.0"},{n:["wheelchair","wheelchair symbol"],u:"267f",a:"0.6"},{n:["mens","mens symbol"],u:"1f6b9",a:"0.6"},{n:["womens","womens symbol"],u:"1f6ba",a:"0.6"},{n:["restroom"],u:"1f6bb",a:"0.6"},{n:["baby symbol"],u:"1f6bc",a:"0.6"},{n:["wc","water closet"],u:"1f6be",a:"0.6"},{n:["passport control"],u:"1f6c2",a:"1.0"},{n:["customs"],u:"1f6c3",a:"1.0"},{n:["baggage claim"],u:"1f6c4",a:"1.0"},{n:["left luggage"],u:"1f6c5",a:"1.0"},{n:["warning","warning sign"],u:"26a0-fe0f",a:"0.6"},{n:["children crossing"],u:"1f6b8",a:"1.0"},{n:["no entry"],u:"26d4",a:"0.6"},{n:["no entry sign"],u:"1f6ab",a:"0.6"},{n:["no bicycles"],u:"1f6b3",a:"1.0"},{n:["no smoking","no smoking symbol"],u:"1f6ad",a:"0.6"},{n:["do not litter","do not litter symbol"],u:"1f6af",a:"1.0"},{n:["non-potable water","non-potable water symbol"],u:"1f6b1",a:"1.0"},{n:["no pedestrians"],u:"1f6b7",a:"1.0"},{n:["no mobile phones"],u:"1f4f5",a:"1.0"},{n:["underage","no one under eighteen symbol"],u:"1f51e",a:"0.6"},{n:["radioactive","radioactive sign"],u:"2622-fe0f",a:"1.0"},{n:["biohazard","biohazard sign"],u:"2623-fe0f",a:"1.0"},{n:["arrow up","upwards black arrow"],u:"2b06-fe0f",a:"0.6"},{n:["north east arrow","arrow upper right"],u:"2197-fe0f",a:"0.6"},{n:["arrow right","black rightwards arrow"],u:"27a1-fe0f",a:"0.6"},{n:["south east arrow","arrow lower right"],u:"2198-fe0f",a:"0.6"},{n:["arrow down","downwards black arrow"],u:"2b07-fe0f",a:"0.6"},{n:["south west arrow","arrow lower left"],u:"2199-fe0f",a:"0.6"},{n:["arrow left","leftwards black arrow"],u:"2b05-fe0f",a:"0.6"},{n:["north west arrow","arrow upper left"],u:"2196-fe0f",a:"0.6"},{n:["up down arrow","arrow up down"],u:"2195-fe0f",a:"0.6"},{n:["left right arrow"],u:"2194-fe0f",a:"0.6"},{n:["leftwards arrow with hook"],u:"21a9-fe0f",a:"0.6"},{n:["arrow right hook","rightwards arrow with hook"],u:"21aa-fe0f",a:"0.6"},{n:["arrow heading up","arrow pointing rightwards then curving upwards"],u:"2934-fe0f",a:"0.6"},{n:["arrow heading down","arrow pointing rightwards then curving downwards"],u:"2935-fe0f",a:"0.6"},{n:["arrows clockwise","clockwise downwards and upwards open circle arrows"],u:"1f503",a:"0.6"},{n:["arrows counterclockwise","anticlockwise downwards and upwards open circle arrows"],u:"1f504",a:"1.0"},{n:["back","back with leftwards arrow above"],u:"1f519",a:"0.6"},{n:["end","end with leftwards arrow above"],u:"1f51a",a:"0.6"},{n:["on","on with exclamation mark with left right arrow above"],u:"1f51b",a:"0.6"},{n:["soon","soon with rightwards arrow above"],u:"1f51c",a:"0.6"},{n:["top","top with upwards arrow above"],u:"1f51d",a:"0.6"},{n:["place of worship"],u:"1f6d0",a:"1.0"},{n:["atom symbol"],u:"269b-fe0f",a:"1.0"},{n:["om","om symbol"],u:"1f549-fe0f",a:"0.7"},{n:["star of david"],u:"2721-fe0f",a:"0.7"},{n:["wheel of dharma"],u:"2638-fe0f",a:"0.7"},{n:["yin yang"],u:"262f-fe0f",a:"0.7"},{n:["latin cross"],u:"271d-fe0f",a:"0.7"},{n:["orthodox cross"],u:"2626-fe0f",a:"1.0"},{n:["star and crescent"],u:"262a-fe0f",a:"0.7"},{n:["peace symbol"],u:"262e-fe0f",a:"1.0"},{n:["menorah with nine branches"],u:"1f54e",a:"1.0"},{n:["six pointed star","six pointed star with middle dot"],u:"1f52f",a:"0.6"},{n:["aries"],u:"2648",a:"0.6"},{n:["taurus"],u:"2649",a:"0.6"},{n:["gemini"],u:"264a",a:"0.6"},{n:["cancer"],u:"264b",a:"0.6"},{n:["leo"],u:"264c",a:"0.6"},{n:["virgo"],u:"264d",a:"0.6"},{n:["libra"],u:"264e",a:"0.6"},{n:["scorpius"],u:"264f",a:"0.6"},{n:["sagittarius"],u:"2650",a:"0.6"},{n:["capricorn"],u:"2651",a:"0.6"},{n:["aquarius"],u:"2652",a:"0.6"},{n:["pisces"],u:"2653",a:"0.6"},{n:["ophiuchus"],u:"26ce",a:"0.6"},{n:["twisted rightwards arrows"],u:"1f500",a:"1.0"},{n:["repeat","clockwise rightwards and leftwards open circle arrows"],u:"1f501",a:"1.0"},{n:["repeat one","clockwise rightwards and leftwards open circle arrows with circled one overlay"],u:"1f502",a:"1.0"},{n:["arrow forward","black right-pointing triangle"],u:"25b6-fe0f",a:"0.6"},{n:["fast forward","black right-pointing double triangle"],u:"23e9",a:"0.6"},{n:["next track button","black right pointing double triangle with vertical bar"],u:"23ed-fe0f",a:"0.7"},{n:["play or pause button","black right pointing triangle with double vertical bar"],u:"23ef-fe0f",a:"1.0"},{n:["arrow backward","black left-pointing triangle"],u:"25c0-fe0f",a:"0.6"},{n:["rewind","black left-pointing double triangle"],u:"23ea",a:"0.6"},{n:["last track button","black left pointing double triangle with vertical bar"],u:"23ee-fe0f",a:"0.7"},{n:["arrow up small","up-pointing small red triangle"],u:"1f53c",a:"0.6"},{n:["arrow double up","black up-pointing double triangle"],u:"23eb",a:"0.6"},{n:["arrow down small","down-pointing small red triangle"],u:"1f53d",a:"0.6"},{n:["arrow double down","black down-pointing double triangle"],u:"23ec",a:"0.6"},{n:["pause button","double vertical bar"],u:"23f8-fe0f",a:"0.7"},{n:["stop button","black square for stop"],u:"23f9-fe0f",a:"0.7"},{n:["record button","black circle for record"],u:"23fa-fe0f",a:"0.7"},{n:["eject","eject button"],u:"23cf-fe0f",a:"1.0"},{n:["cinema"],u:"1f3a6",a:"0.6"},{n:["low brightness","low brightness symbol"],u:"1f505",a:"1.0"},{n:["high brightness","high brightness symbol"],u:"1f506",a:"1.0"},{n:["signal strength","antenna with bars"],u:"1f4f6",a:"0.6"},{n:["vibration mode"],u:"1f4f3",a:"0.6"},{n:["mobile phone off"],u:"1f4f4",a:"0.6"},{n:["female sign"],u:"2640-fe0f",a:"4.0"},{n:["male sign"],u:"2642-fe0f",a:"4.0"},{n:["transgender symbol"],u:"26a7-fe0f",a:"13.0"},{n:["heavy multiplication x"],u:"2716-fe0f",a:"0.6"},{n:["heavy plus sign"],u:"2795",a:"0.6"},{n:["heavy minus sign"],u:"2796",a:"0.6"},{n:["heavy division sign"],u:"2797",a:"0.6"},{n:["heavy equals sign"],u:"1f7f0",a:"14.0"},{n:["infinity"],u:"267e-fe0f",a:"11.0"},{n:["bangbang","double exclamation mark"],u:"203c-fe0f",a:"0.6"},{n:["interrobang","exclamation question mark"],u:"2049-fe0f",a:"0.6"},{n:["question","black question mark ornament"],u:"2753",a:"0.6"},{n:["grey question","white question mark ornament"],u:"2754",a:"0.6"},{n:["grey exclamation","white exclamation mark ornament"],u:"2755",a:"0.6"},{n:["exclamation","heavy exclamation mark","heavy exclamation mark symbol"],u:"2757",a:"0.6"},{n:["wavy dash"],u:"3030-fe0f",a:"0.6"},{n:["currency exchange"],u:"1f4b1",a:"0.6"},{n:["heavy dollar sign"],u:"1f4b2",a:"0.6"},{n:["medical symbol","staff of aesculapius"],u:"2695-fe0f",a:"4.0"},{n:["recycle","black universal recycling symbol"],u:"267b-fe0f",a:"0.6"},{n:["fleur-de-lis","fleur de lis"],u:"269c-fe0f",a:"1.0"},{n:["trident","trident emblem"],u:"1f531",a:"0.6"},{n:["name badge"],u:"1f4db",a:"0.6"},{n:["beginner","japanese symbol for beginner"],u:"1f530",a:"0.6"},{n:["o","heavy large circle"],u:"2b55",a:"0.6"},{n:["white check mark","white heavy check mark"],u:"2705",a:"0.6"},{n:["ballot box with check"],u:"2611-fe0f",a:"0.6"},{n:["heavy check mark"],u:"2714-fe0f",a:"0.6"},{n:["x","cross mark"],u:"274c",a:"0.6"},{n:["negative squared cross mark"],u:"274e",a:"0.6"},{n:["curly loop"],u:"27b0",a:"0.6"},{n:["loop","double curly loop"],u:"27bf",a:"1.0"},{n:["part alternation mark"],u:"303d-fe0f",a:"0.6"},{n:["eight spoked asterisk"],u:"2733-fe0f",a:"0.6"},{n:["eight pointed black star"],u:"2734-fe0f",a:"0.6"},{n:["sparkle"],u:"2747-fe0f",a:"0.6"},{n:["copyright","copyright sign"],u:"00a9-fe0f",a:"0.6"},{n:["registered","registered sign"],u:"00ae-fe0f",a:"0.6"},{n:["tm","trade mark sign"],u:"2122-fe0f",a:"0.6"},{n:["hash","hash key"],u:"0023-fe0f-20e3",a:"0.6"},{n:["keycap: *","keycap star"],u:"002a-fe0f-20e3",a:"2.0"},{n:["zero","keycap 0"],u:"0030-fe0f-20e3",a:"0.6"},{n:["one","keycap 1"],u:"0031-fe0f-20e3",a:"0.6"},{n:["two","keycap 2"],u:"0032-fe0f-20e3",a:"0.6"},{n:["three","keycap 3"],u:"0033-fe0f-20e3",a:"0.6"},{n:["four","keycap 4"],u:"0034-fe0f-20e3",a:"0.6"},{n:["five","keycap 5"],u:"0035-fe0f-20e3",a:"0.6"},{n:["six","keycap 6"],u:"0036-fe0f-20e3",a:"0.6"},{n:["seven","keycap 7"],u:"0037-fe0f-20e3",a:"0.6"},{n:["eight","keycap 8"],u:"0038-fe0f-20e3",a:"0.6"},{n:["nine","keycap 9"],u:"0039-fe0f-20e3",a:"0.6"},{n:["keycap ten"],u:"1f51f",a:"0.6"},{n:["capital abcd","input symbol for latin capital letters"],u:"1f520",a:"0.6"},{n:["abcd","input symbol for latin small letters"],u:"1f521",a:"0.6"},{n:["1234","input symbol for numbers"],u:"1f522",a:"0.6"},{n:["symbols","input symbol for symbols"],u:"1f523",a:"0.6"},{n:["abc","input symbol for latin letters"],u:"1f524",a:"0.6"},{n:["a","negative squared latin capital letter a"],u:"1f170-fe0f",a:"0.6"},{n:["ab","negative squared ab"],u:"1f18e",a:"0.6"},{n:["b","negative squared latin capital letter b"],u:"1f171-fe0f",a:"0.6"},{n:["cl","squared cl"],u:"1f191",a:"0.6"},{n:["cool","squared cool"],u:"1f192",a:"0.6"},{n:["free","squared free"],u:"1f193",a:"0.6"},{n:["information source"],u:"2139-fe0f",a:"0.6"},{n:["id","squared id"],u:"1f194",a:"0.6"},{n:["m","circled latin capital letter m"],u:"24c2-fe0f",a:"0.6"},{n:["new","squared new"],u:"1f195",a:"0.6"},{n:["ng","squared ng"],u:"1f196",a:"0.6"},{n:["o2","negative squared latin capital letter o"],u:"1f17e-fe0f",a:"0.6"},{n:["ok","squared ok"],u:"1f197",a:"0.6"},{n:["parking","negative squared latin capital letter p"],u:"1f17f-fe0f",a:"0.6"},{n:["sos","squared sos"],u:"1f198",a:"0.6"},{n:["up","squared up with exclamation mark"],u:"1f199",a:"0.6"},{n:["vs","squared vs"],u:"1f19a",a:"0.6"},{n:["koko","squared katakana koko"],u:"1f201",a:"0.6"},{n:["sa","squared katakana sa"],u:"1f202-fe0f",a:"0.6"},{n:["u6708","squared cjk unified ideograph-6708"],u:"1f237-fe0f",a:"0.6"},{n:["u6709","squared cjk unified ideograph-6709"],u:"1f236",a:"0.6"},{n:["u6307","squared cjk unified ideograph-6307"],u:"1f22f",a:"0.6"},{n:["ideograph advantage","circled ideograph advantage"],u:"1f250",a:"0.6"},{n:["u5272","squared cjk unified ideograph-5272"],u:"1f239",a:"0.6"},{n:["u7121","squared cjk unified ideograph-7121"],u:"1f21a",a:"0.6"},{n:["u7981","squared cjk unified ideograph-7981"],u:"1f232",a:"0.6"},{n:["accept","circled ideograph accept"],u:"1f251",a:"0.6"},{n:["u7533","squared cjk unified ideograph-7533"],u:"1f238",a:"0.6"},{n:["u5408","squared cjk unified ideograph-5408"],u:"1f234",a:"0.6"},{n:["u7a7a","squared cjk unified ideograph-7a7a"],u:"1f233",a:"0.6"},{n:["congratulations","circled ideograph congratulation"],u:"3297-fe0f",a:"0.6"},{n:["secret","circled ideograph secret"],u:"3299-fe0f",a:"0.6"},{n:["u55b6","squared cjk unified ideograph-55b6"],u:"1f23a",a:"0.6"},{n:["u6e80","squared cjk unified ideograph-6e80"],u:"1f235",a:"0.6"},{n:["red circle","large red circle"],u:"1f534",a:"0.6"},{n:["large orange circle"],u:"1f7e0",a:"12.0"},{n:["large yellow circle"],u:"1f7e1",a:"12.0"},{n:["large green circle"],u:"1f7e2",a:"12.0"},{n:["large blue circle"],u:"1f535",a:"0.6"},{n:["large purple circle"],u:"1f7e3",a:"12.0"},{n:["large brown circle"],u:"1f7e4",a:"12.0"},{n:["black circle","medium black circle"],u:"26ab",a:"0.6"},{n:["white circle","medium white circle"],u:"26aa",a:"0.6"},{n:["large red square"],u:"1f7e5",a:"12.0"},{n:["large orange square"],u:"1f7e7",a:"12.0"},{n:["large yellow square"],u:"1f7e8",a:"12.0"},{n:["large green square"],u:"1f7e9",a:"12.0"},{n:["large blue square"],u:"1f7e6",a:"12.0"},{n:["large purple square"],u:"1f7ea",a:"12.0"},{n:["large brown square"],u:"1f7eb",a:"12.0"},{n:["black large square"],u:"2b1b",a:"0.6"},{n:["white large square"],u:"2b1c",a:"0.6"},{n:["black medium square"],u:"25fc-fe0f",a:"0.6"},{n:["white medium square"],u:"25fb-fe0f",a:"0.6"},{n:["black medium small square"],u:"25fe",a:"0.6"},{n:["white medium small square"],u:"25fd",a:"0.6"},{n:["black small square"],u:"25aa-fe0f",a:"0.6"},{n:["white small square"],u:"25ab-fe0f",a:"0.6"},{n:["large orange diamond"],u:"1f536",a:"0.6"},{n:["large blue diamond"],u:"1f537",a:"0.6"},{n:["small orange diamond"],u:"1f538",a:"0.6"},{n:["small blue diamond"],u:"1f539",a:"0.6"},{n:["small red triangle","up-pointing red triangle"],u:"1f53a",a:"0.6"},{n:["small red triangle down","down-pointing red triangle"],u:"1f53b",a:"0.6"},{n:["diamond shape with a dot inside"],u:"1f4a0",a:"0.6"},{n:["radio button"],u:"1f518",a:"0.6"},{n:["white square button"],u:"1f533",a:"0.6"},{n:["black square button"],u:"1f532",a:"0.6"}],V5e=[{n:["chequered flag","checkered flag"],u:"1f3c1",a:"0.6"},{n:["triangular flag on post"],u:"1f6a9",a:"0.6"},{n:["crossed flags"],u:"1f38c",a:"0.6"},{n:["waving black flag"],u:"1f3f4",a:"1.0"},{n:["white flag","waving white flag"],u:"1f3f3-fe0f",a:"0.7"},{n:["rainbow flag","rainbow-flag"],u:"1f3f3-fe0f-200d-1f308",a:"4.0"},{n:["transgender flag"],u:"1f3f3-fe0f-200d-26a7-fe0f",a:"13.0"},{n:["pirate flag"],u:"1f3f4-200d-2620-fe0f",a:"11.0"},{n:["flag-ac","ascension island flag"],u:"1f1e6-1f1e8",a:"2.0"},{n:["flag-ad","andorra flag"],u:"1f1e6-1f1e9",a:"2.0"},{n:["flag-ae","united arab emirates flag"],u:"1f1e6-1f1ea",a:"2.0"},{n:["flag-af","afghanistan flag"],u:"1f1e6-1f1eb",a:"2.0"},{n:["flag-ag","antigua & barbuda flag"],u:"1f1e6-1f1ec",a:"2.0"},{n:["flag-ai","anguilla flag"],u:"1f1e6-1f1ee",a:"2.0"},{n:["flag-al","albania flag"],u:"1f1e6-1f1f1",a:"2.0"},{n:["flag-am","armenia flag"],u:"1f1e6-1f1f2",a:"2.0"},{n:["flag-ao","angola flag"],u:"1f1e6-1f1f4",a:"2.0"},{n:["flag-aq","antarctica flag"],u:"1f1e6-1f1f6",a:"2.0"},{n:["flag-ar","argentina flag"],u:"1f1e6-1f1f7",a:"2.0"},{n:["flag-as","american samoa flag"],u:"1f1e6-1f1f8",a:"2.0"},{n:["flag-at","austria flag"],u:"1f1e6-1f1f9",a:"2.0"},{n:["flag-au","australia flag"],u:"1f1e6-1f1fa",a:"2.0"},{n:["flag-aw","aruba flag"],u:"1f1e6-1f1fc",a:"2.0"},{n:["flag-ax","\xE5land islands flag"],u:"1f1e6-1f1fd",a:"2.0"},{n:["flag-az","azerbaijan flag"],u:"1f1e6-1f1ff",a:"2.0"},{n:["flag-ba","bosnia & herzegovina flag"],u:"1f1e7-1f1e6",a:"2.0"},{n:["flag-bb","barbados flag"],u:"1f1e7-1f1e7",a:"2.0"},{n:["flag-bd","bangladesh flag"],u:"1f1e7-1f1e9",a:"2.0"},{n:["flag-be","belgium flag"],u:"1f1e7-1f1ea",a:"2.0"},{n:["flag-bf","burkina faso flag"],u:"1f1e7-1f1eb",a:"2.0"},{n:["flag-bg","bulgaria flag"],u:"1f1e7-1f1ec",a:"2.0"},{n:["flag-bh","bahrain flag"],u:"1f1e7-1f1ed",a:"2.0"},{n:["flag-bi","burundi flag"],u:"1f1e7-1f1ee",a:"2.0"},{n:["flag-bj","benin flag"],u:"1f1e7-1f1ef",a:"2.0"},{n:["flag-bl","st. barth\xE9lemy flag"],u:"1f1e7-1f1f1",a:"2.0"},{n:["flag-bm","bermuda flag"],u:"1f1e7-1f1f2",a:"2.0"},{n:["flag-bn","brunei flag"],u:"1f1e7-1f1f3",a:"2.0"},{n:["flag-bo","bolivia flag"],u:"1f1e7-1f1f4",a:"2.0"},{n:["flag-bq","caribbean netherlands flag"],u:"1f1e7-1f1f6",a:"2.0"},{n:["flag-br","brazil flag"],u:"1f1e7-1f1f7",a:"2.0"},{n:["flag-bs","bahamas flag"],u:"1f1e7-1f1f8",a:"2.0"},{n:["flag-bt","bhutan flag"],u:"1f1e7-1f1f9",a:"2.0"},{n:["flag-bv","bouvet island flag"],u:"1f1e7-1f1fb",a:"2.0"},{n:["flag-bw","botswana flag"],u:"1f1e7-1f1fc",a:"2.0"},{n:["flag-by","belarus flag"],u:"1f1e7-1f1fe",a:"2.0"},{n:["flag-bz","belize flag"],u:"1f1e7-1f1ff",a:"2.0"},{n:["flag-ca","canada flag"],u:"1f1e8-1f1e6",a:"2.0"},{n:["flag-cc","cocos (keeling) islands flag"],u:"1f1e8-1f1e8",a:"2.0"},{n:["flag-cd","congo - kinshasa flag"],u:"1f1e8-1f1e9",a:"2.0"},{n:["flag-cf","central african republic flag"],u:"1f1e8-1f1eb",a:"2.0"},{n:["flag-cg","congo - brazzaville flag"],u:"1f1e8-1f1ec",a:"2.0"},{n:["flag-ch","switzerland flag"],u:"1f1e8-1f1ed",a:"2.0"},{n:["flag-ci","c\xF4te d\u2019ivoire flag"],u:"1f1e8-1f1ee",a:"2.0"},{n:["flag-ck","cook islands flag"],u:"1f1e8-1f1f0",a:"2.0"},{n:["flag-cl","chile flag"],u:"1f1e8-1f1f1",a:"2.0"},{n:["flag-cm","cameroon flag"],u:"1f1e8-1f1f2",a:"2.0"},{n:["cn","flag-cn","china flag"],u:"1f1e8-1f1f3",a:"0.6"},{n:["flag-co","colombia flag"],u:"1f1e8-1f1f4",a:"2.0"},{n:["flag-cp","clipperton island flag"],u:"1f1e8-1f1f5",a:"2.0"},{n:["flag-cr","costa rica flag"],u:"1f1e8-1f1f7",a:"2.0"},{n:["flag-cu","cuba flag"],u:"1f1e8-1f1fa",a:"2.0"},{n:["flag-cv","cape verde flag"],u:"1f1e8-1f1fb",a:"2.0"},{n:["flag-cw","cura\xE7ao flag"],u:"1f1e8-1f1fc",a:"2.0"},{n:["flag-cx","christmas island flag"],u:"1f1e8-1f1fd",a:"2.0"},{n:["flag-cy","cyprus flag"],u:"1f1e8-1f1fe",a:"2.0"},{n:["flag-cz","czechia flag"],u:"1f1e8-1f1ff",a:"2.0"},{n:["de","flag-de","germany flag"],u:"1f1e9-1f1ea",a:"0.6"},{n:["flag-dg","diego garcia flag"],u:"1f1e9-1f1ec",a:"2.0"},{n:["flag-dj","djibouti flag"],u:"1f1e9-1f1ef",a:"2.0"},{n:["flag-dk","denmark flag"],u:"1f1e9-1f1f0",a:"2.0"},{n:["flag-dm","dominica flag"],u:"1f1e9-1f1f2",a:"2.0"},{n:["flag-do","dominican republic flag"],u:"1f1e9-1f1f4",a:"2.0"},{n:["flag-dz","algeria flag"],u:"1f1e9-1f1ff",a:"2.0"},{n:["flag-ea","ceuta & melilla flag"],u:"1f1ea-1f1e6",a:"2.0"},{n:["flag-ec","ecuador flag"],u:"1f1ea-1f1e8",a:"2.0"},{n:["flag-ee","estonia flag"],u:"1f1ea-1f1ea",a:"2.0"},{n:["flag-eg","egypt flag"],u:"1f1ea-1f1ec",a:"2.0"},{n:["flag-eh","western sahara flag"],u:"1f1ea-1f1ed",a:"2.0"},{n:["flag-er","eritrea flag"],u:"1f1ea-1f1f7",a:"2.0"},{n:["es","flag-es","spain flag"],u:"1f1ea-1f1f8",a:"0.6"},{n:["flag-et","ethiopia flag"],u:"1f1ea-1f1f9",a:"2.0"},{n:["flag-eu","european union flag"],u:"1f1ea-1f1fa",a:"2.0"},{n:["flag-fi","finland flag"],u:"1f1eb-1f1ee",a:"2.0"},{n:["flag-fj","fiji flag"],u:"1f1eb-1f1ef",a:"2.0"},{n:["flag-fk","falkland islands flag"],u:"1f1eb-1f1f0",a:"2.0"},{n:["flag-fm","micronesia flag"],u:"1f1eb-1f1f2",a:"2.0"},{n:["flag-fo","faroe islands flag"],u:"1f1eb-1f1f4",a:"2.0"},{n:["fr","flag-fr","france flag"],u:"1f1eb-1f1f7",a:"0.6"},{n:["flag-ga","gabon flag"],u:"1f1ec-1f1e6",a:"2.0"},{n:["gb","uk","flag-gb","united kingdom flag"],u:"1f1ec-1f1e7",a:"0.6"},{n:["flag-gd","grenada flag"],u:"1f1ec-1f1e9",a:"2.0"},{n:["flag-ge","georgia flag"],u:"1f1ec-1f1ea",a:"2.0"},{n:["flag-gf","french guiana flag"],u:"1f1ec-1f1eb",a:"2.0"},{n:["flag-gg","guernsey flag"],u:"1f1ec-1f1ec",a:"2.0"},{n:["flag-gh","ghana flag"],u:"1f1ec-1f1ed",a:"2.0"},{n:["flag-gi","gibraltar flag"],u:"1f1ec-1f1ee",a:"2.0"},{n:["flag-gl","greenland flag"],u:"1f1ec-1f1f1",a:"2.0"},{n:["flag-gm","gambia flag"],u:"1f1ec-1f1f2",a:"2.0"},{n:["flag-gn","guinea flag"],u:"1f1ec-1f1f3",a:"2.0"},{n:["flag-gp","guadeloupe flag"],u:"1f1ec-1f1f5",a:"2.0"},{n:["flag-gq","equatorial guinea flag"],u:"1f1ec-1f1f6",a:"2.0"},{n:["flag-gr","greece flag"],u:"1f1ec-1f1f7",a:"2.0"},{n:["flag-gs","south georgia & south sandwich islands flag"],u:"1f1ec-1f1f8",a:"2.0"},{n:["flag-gt","guatemala flag"],u:"1f1ec-1f1f9",a:"2.0"},{n:["flag-gu","guam flag"],u:"1f1ec-1f1fa",a:"2.0"},{n:["flag-gw","guinea-bissau flag"],u:"1f1ec-1f1fc",a:"2.0"},{n:["flag-gy","guyana flag"],u:"1f1ec-1f1fe",a:"2.0"},{n:["flag-hk","hong kong sar china flag"],u:"1f1ed-1f1f0",a:"2.0"},{n:["flag-hm","heard & mcdonald islands flag"],u:"1f1ed-1f1f2",a:"2.0"},{n:["flag-hn","honduras flag"],u:"1f1ed-1f1f3",a:"2.0"},{n:["flag-hr","croatia flag"],u:"1f1ed-1f1f7",a:"2.0"},{n:["flag-ht","haiti flag"],u:"1f1ed-1f1f9",a:"2.0"},{n:["flag-hu","hungary flag"],u:"1f1ed-1f1fa",a:"2.0"},{n:["flag-ic","canary islands flag"],u:"1f1ee-1f1e8",a:"2.0"},{n:["flag-id","indonesia flag"],u:"1f1ee-1f1e9",a:"2.0"},{n:["flag-ie","ireland flag"],u:"1f1ee-1f1ea",a:"2.0"},{n:["flag-il","israel flag"],u:"1f1ee-1f1f1",a:"2.0"},{n:["flag-im","isle of man flag"],u:"1f1ee-1f1f2",a:"2.0"},{n:["flag-in","india flag"],u:"1f1ee-1f1f3",a:"2.0"},{n:["flag-io","british indian ocean territory flag"],u:"1f1ee-1f1f4",a:"2.0"},{n:["flag-iq","iraq flag"],u:"1f1ee-1f1f6",a:"2.0"},{n:["flag-ir","iran flag"],u:"1f1ee-1f1f7",a:"2.0"},{n:["flag-is","iceland flag"],u:"1f1ee-1f1f8",a:"2.0"},{n:["it","flag-it","italy flag"],u:"1f1ee-1f1f9",a:"0.6"},{n:["flag-je","jersey flag"],u:"1f1ef-1f1ea",a:"2.0"},{n:["flag-jm","jamaica flag"],u:"1f1ef-1f1f2",a:"2.0"},{n:["flag-jo","jordan flag"],u:"1f1ef-1f1f4",a:"2.0"},{n:["jp","flag-jp","japan flag"],u:"1f1ef-1f1f5",a:"0.6"},{n:["flag-ke","kenya flag"],u:"1f1f0-1f1ea",a:"2.0"},{n:["flag-kg","kyrgyzstan flag"],u:"1f1f0-1f1ec",a:"2.0"},{n:["flag-kh","cambodia flag"],u:"1f1f0-1f1ed",a:"2.0"},{n:["flag-ki","kiribati flag"],u:"1f1f0-1f1ee",a:"2.0"},{n:["flag-km","comoros flag"],u:"1f1f0-1f1f2",a:"2.0"},{n:["flag-kn","st. kitts & nevis flag"],u:"1f1f0-1f1f3",a:"2.0"},{n:["flag-kp","north korea flag"],u:"1f1f0-1f1f5",a:"2.0"},{n:["kr","flag-kr","south korea flag"],u:"1f1f0-1f1f7",a:"0.6"},{n:["flag-kw","kuwait flag"],u:"1f1f0-1f1fc",a:"2.0"},{n:["flag-ky","cayman islands flag"],u:"1f1f0-1f1fe",a:"2.0"},{n:["flag-kz","kazakhstan flag"],u:"1f1f0-1f1ff",a:"2.0"},{n:["flag-la","laos flag"],u:"1f1f1-1f1e6",a:"2.0"},{n:["flag-lb","lebanon flag"],u:"1f1f1-1f1e7",a:"2.0"},{n:["flag-lc","st. lucia flag"],u:"1f1f1-1f1e8",a:"2.0"},{n:["flag-li","liechtenstein flag"],u:"1f1f1-1f1ee",a:"2.0"},{n:["flag-lk","sri lanka flag"],u:"1f1f1-1f1f0",a:"2.0"},{n:["flag-lr","liberia flag"],u:"1f1f1-1f1f7",a:"2.0"},{n:["flag-ls","lesotho flag"],u:"1f1f1-1f1f8",a:"2.0"},{n:["flag-lt","lithuania flag"],u:"1f1f1-1f1f9",a:"2.0"},{n:["flag-lu","luxembourg flag"],u:"1f1f1-1f1fa",a:"2.0"},{n:["flag-lv","latvia flag"],u:"1f1f1-1f1fb",a:"2.0"},{n:["flag-ly","libya flag"],u:"1f1f1-1f1fe",a:"2.0"},{n:["flag-ma","morocco flag"],u:"1f1f2-1f1e6",a:"2.0"},{n:["flag-mc","monaco flag"],u:"1f1f2-1f1e8",a:"2.0"},{n:["flag-md","moldova flag"],u:"1f1f2-1f1e9",a:"2.0"},{n:["flag-me","montenegro flag"],u:"1f1f2-1f1ea",a:"2.0"},{n:["flag-mf","st. martin flag"],u:"1f1f2-1f1eb",a:"2.0"},{n:["flag-mg","madagascar flag"],u:"1f1f2-1f1ec",a:"2.0"},{n:["flag-mh","marshall islands flag"],u:"1f1f2-1f1ed",a:"2.0"},{n:["flag-mk","north macedonia flag"],u:"1f1f2-1f1f0",a:"2.0"},{n:["flag-ml","mali flag"],u:"1f1f2-1f1f1",a:"2.0"},{n:["flag-mm","myanmar (burma) flag"],u:"1f1f2-1f1f2",a:"2.0"},{n:["flag-mn","mongolia flag"],u:"1f1f2-1f1f3",a:"2.0"},{n:["flag-mo","macao sar china flag"],u:"1f1f2-1f1f4",a:"2.0"},{n:["flag-mp","northern mariana islands flag"],u:"1f1f2-1f1f5",a:"2.0"},{n:["flag-mq","martinique flag"],u:"1f1f2-1f1f6",a:"2.0"},{n:["flag-mr","mauritania flag"],u:"1f1f2-1f1f7",a:"2.0"},{n:["flag-ms","montserrat flag"],u:"1f1f2-1f1f8",a:"2.0"},{n:["flag-mt","malta flag"],u:"1f1f2-1f1f9",a:"2.0"},{n:["flag-mu","mauritius flag"],u:"1f1f2-1f1fa",a:"2.0"},{n:["flag-mv","maldives flag"],u:"1f1f2-1f1fb",a:"2.0"},{n:["flag-mw","malawi flag"],u:"1f1f2-1f1fc",a:"2.0"},{n:["flag-mx","mexico flag"],u:"1f1f2-1f1fd",a:"2.0"},{n:["flag-my","malaysia flag"],u:"1f1f2-1f1fe",a:"2.0"},{n:["flag-mz","mozambique flag"],u:"1f1f2-1f1ff",a:"2.0"},{n:["flag-na","namibia flag"],u:"1f1f3-1f1e6",a:"2.0"},{n:["flag-nc","new caledonia flag"],u:"1f1f3-1f1e8",a:"2.0"},{n:["flag-ne","niger flag"],u:"1f1f3-1f1ea",a:"2.0"},{n:["flag-nf","norfolk island flag"],u:"1f1f3-1f1eb",a:"2.0"},{n:["flag-ng","nigeria flag"],u:"1f1f3-1f1ec",a:"2.0"},{n:["flag-ni","nicaragua flag"],u:"1f1f3-1f1ee",a:"2.0"},{n:["flag-nl","netherlands flag"],u:"1f1f3-1f1f1",a:"2.0"},{n:["flag-no","norway flag"],u:"1f1f3-1f1f4",a:"2.0"},{n:["flag-np","nepal flag"],u:"1f1f3-1f1f5",a:"2.0"},{n:["flag-nr","nauru flag"],u:"1f1f3-1f1f7",a:"2.0"},{n:["flag-nu","niue flag"],u:"1f1f3-1f1fa",a:"2.0"},{n:["flag-nz","new zealand flag"],u:"1f1f3-1f1ff",a:"2.0"},{n:["flag-om","oman flag"],u:"1f1f4-1f1f2",a:"2.0"},{n:["flag-pa","panama flag"],u:"1f1f5-1f1e6",a:"2.0"},{n:["flag-pe","peru flag"],u:"1f1f5-1f1ea",a:"2.0"},{n:["flag-pf","french polynesia flag"],u:"1f1f5-1f1eb",a:"2.0"},{n:["flag-pg","papua new guinea flag"],u:"1f1f5-1f1ec",a:"2.0"},{n:["flag-ph","philippines flag"],u:"1f1f5-1f1ed",a:"2.0"},{n:["flag-pk","pakistan flag"],u:"1f1f5-1f1f0",a:"2.0"},{n:["flag-pl","poland flag"],u:"1f1f5-1f1f1",a:"2.0"},{n:["flag-pm","st. pierre & miquelon flag"],u:"1f1f5-1f1f2",a:"2.0"},{n:["flag-pn","pitcairn islands flag"],u:"1f1f5-1f1f3",a:"2.0"},{n:["flag-pr","puerto rico flag"],u:"1f1f5-1f1f7",a:"2.0"},{n:["flag-ps","palestinian territories flag"],u:"1f1f5-1f1f8",a:"2.0"},{n:["flag-pt","portugal flag"],u:"1f1f5-1f1f9",a:"2.0"},{n:["flag-pw","palau flag"],u:"1f1f5-1f1fc",a:"2.0"},{n:["flag-py","paraguay flag"],u:"1f1f5-1f1fe",a:"2.0"},{n:["flag-qa","qatar flag"],u:"1f1f6-1f1e6",a:"2.0"},{n:["flag-re","r\xE9union flag"],u:"1f1f7-1f1ea",a:"2.0"},{n:["flag-ro","romania flag"],u:"1f1f7-1f1f4",a:"2.0"},{n:["flag-rs","serbia flag"],u:"1f1f7-1f1f8",a:"2.0"},{n:["ru","flag-ru","russia flag"],u:"1f1f7-1f1fa",a:"0.6"},{n:["flag-rw","rwanda flag"],u:"1f1f7-1f1fc",a:"2.0"},{n:["flag-sa","saudi arabia flag"],u:"1f1f8-1f1e6",a:"2.0"},{n:["flag-sb","solomon islands flag"],u:"1f1f8-1f1e7",a:"2.0"},{n:["flag-sc","seychelles flag"],u:"1f1f8-1f1e8",a:"2.0"},{n:["flag-sd","sudan flag"],u:"1f1f8-1f1e9",a:"2.0"},{n:["flag-se","sweden flag"],u:"1f1f8-1f1ea",a:"2.0"},{n:["flag-sg","singapore flag"],u:"1f1f8-1f1ec",a:"2.0"},{n:["flag-sh","st. helena flag"],u:"1f1f8-1f1ed",a:"2.0"},{n:["flag-si","slovenia flag"],u:"1f1f8-1f1ee",a:"2.0"},{n:["flag-sj","svalbard & jan mayen flag"],u:"1f1f8-1f1ef",a:"2.0"},{n:["flag-sk","slovakia flag"],u:"1f1f8-1f1f0",a:"2.0"},{n:["flag-sl","sierra leone flag"],u:"1f1f8-1f1f1",a:"2.0"},{n:["flag-sm","san marino flag"],u:"1f1f8-1f1f2",a:"2.0"},{n:["flag-sn","senegal flag"],u:"1f1f8-1f1f3",a:"2.0"},{n:["flag-so","somalia flag"],u:"1f1f8-1f1f4",a:"2.0"},{n:["flag-sr","suriname flag"],u:"1f1f8-1f1f7",a:"2.0"},{n:["flag-ss","south sudan flag"],u:"1f1f8-1f1f8",a:"2.0"},{n:["flag-st","s\xE3o tom\xE9 & pr\xEDncipe flag"],u:"1f1f8-1f1f9",a:"2.0"},{n:["flag-sv","el salvador flag"],u:"1f1f8-1f1fb",a:"2.0"},{n:["flag-sx","sint maarten flag"],u:"1f1f8-1f1fd",a:"2.0"},{n:["flag-sy","syria flag"],u:"1f1f8-1f1fe",a:"2.0"},{n:["flag-sz","eswatini flag"],u:"1f1f8-1f1ff",a:"2.0"},{n:["flag-ta","tristan da cunha flag"],u:"1f1f9-1f1e6",a:"2.0"},{n:["flag-tc","turks & caicos islands flag"],u:"1f1f9-1f1e8",a:"2.0"},{n:["flag-td","chad flag"],u:"1f1f9-1f1e9",a:"2.0"},{n:["flag-tf","french southern territories flag"],u:"1f1f9-1f1eb",a:"2.0"},{n:["flag-tg","togo flag"],u:"1f1f9-1f1ec",a:"2.0"},{n:["flag-th","thailand flag"],u:"1f1f9-1f1ed",a:"2.0"},{n:["flag-tj","tajikistan flag"],u:"1f1f9-1f1ef",a:"2.0"},{n:["flag-tk","tokelau flag"],u:"1f1f9-1f1f0",a:"2.0"},{n:["flag-tl","timor-leste flag"],u:"1f1f9-1f1f1",a:"2.0"},{n:["flag-tm","turkmenistan flag"],u:"1f1f9-1f1f2",a:"2.0"},{n:["flag-tn","tunisia flag"],u:"1f1f9-1f1f3",a:"2.0"},{n:["flag-to","tonga flag"],u:"1f1f9-1f1f4",a:"2.0"},{n:["flag-tr","turkey flag"],u:"1f1f9-1f1f7",a:"2.0"},{n:["flag-tt","trinidad & tobago flag"],u:"1f1f9-1f1f9",a:"2.0"},{n:["flag-tv","tuvalu flag"],u:"1f1f9-1f1fb",a:"2.0"},{n:["flag-tw","taiwan flag"],u:"1f1f9-1f1fc",a:"2.0"},{n:["flag-tz","tanzania flag"],u:"1f1f9-1f1ff",a:"2.0"},{n:["flag-ua","ukraine flag"],u:"1f1fa-1f1e6",a:"2.0"},{n:["flag-ug","uganda flag"],u:"1f1fa-1f1ec",a:"2.0"},{n:["flag-um","u.s. outlying islands flag"],u:"1f1fa-1f1f2",a:"2.0"},{n:["flag-un","united nations flag"],u:"1f1fa-1f1f3",a:"4.0"},{n:["us","flag-us","united states flag"],u:"1f1fa-1f1f8",a:"0.6"},{n:["flag-uy","uruguay flag"],u:"1f1fa-1f1fe",a:"2.0"},{n:["flag-uz","uzbekistan flag"],u:"1f1fa-1f1ff",a:"2.0"},{n:["flag-va","vatican city flag"],u:"1f1fb-1f1e6",a:"2.0"},{n:["flag-vc","st. vincent & grenadines flag"],u:"1f1fb-1f1e8",a:"2.0"},{n:["flag-ve","venezuela flag"],u:"1f1fb-1f1ea",a:"2.0"},{n:["flag-vg","british virgin islands flag"],u:"1f1fb-1f1ec",a:"2.0"},{n:["flag-vi","u.s. virgin islands flag"],u:"1f1fb-1f1ee",a:"2.0"},{n:["flag-vn","vietnam flag"],u:"1f1fb-1f1f3",a:"2.0"},{n:["flag-vu","vanuatu flag"],u:"1f1fb-1f1fa",a:"2.0"},{n:["flag-wf","wallis & futuna flag"],u:"1f1fc-1f1eb",a:"2.0"},{n:["flag-ws","samoa flag"],u:"1f1fc-1f1f8",a:"2.0"},{n:["flag-xk","kosovo flag"],u:"1f1fd-1f1f0",a:"2.0"},{n:["flag-ye","yemen flag"],u:"1f1fe-1f1ea",a:"2.0"},{n:["flag-yt","mayotte flag"],u:"1f1fe-1f1f9",a:"2.0"},{n:["flag-za","south africa flag"],u:"1f1ff-1f1e6",a:"2.0"},{n:["flag-zm","zambia flag"],u:"1f1ff-1f1f2",a:"2.0"},{n:["flag-zw","zimbabwe flag"],u:"1f1ff-1f1fc",a:"2.0"},{n:["england flag","flag-england"],u:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",a:"5.0"},{n:["scotland flag","flag-scotland"],u:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",a:"5.0"},{n:["wales flag","flag-wales"],u:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",a:"5.0"}],Dp={custom:R5e,smileys_people:j5e,animals_nature:z5e,food_drink:F5e,travel_places:$5e,activities:B5e,objects:H5e,symbols:U5e,flags:V5e},tb=[Ys.NEUTRAL,Ys.LIGHT,Ys.MEDIUM_LIGHT,Ys.MEDIUM,Ys.MEDIUM_DARK,Ys.DARK],W5e=Object.entries(Ys).reduce(function(e,t){var n=t[0],a=t[1];return e[a]=n,e},{}),Y5e=tb.reduce(function(e,t){var n;return Object.assign(e,(n={},n[t]=t,n))},{}),Ss;(function(e){e.name="n",e.unified="u",e.variations="v",e.added_in="a",e.imgUrl="imgUrl"})(Ss||(Ss={}));var Bm={};setTimeout(function(){xx.reduce(function(e,t){return Fj(t),e},Bm)});function Fj(e){var t=Eh(e).flat().join("").toLowerCase().replace(/[^a-zA-Z\d]/g,"").split("");t.forEach(function(n){var a;Bm[n]=(a=Bm[n])!=null?a:{},Bm[n][Sr(e)]=e})}function Eh(e){var t;return(t=e[Ss.name])!=null?t:[]}function G5e(e){return parseFloat(e[Ss.added_in])}function l_(e){return e?Eh(e)[0]:""}function G5(e){var t=e.split("-"),n=t.splice(1,1),a=n[0];return Y5e[a]?t.join("-"):e}function Sr(e,t){var n,a=e[Ss.unified];return!t||!kf(e)?a:(n=Z5e(e,t))!=null?n:a}function q5e(e){var t;return(t=Dp==null?void 0:Dp[e])!=null?t:[]}function $j(e,t){return""+P5e(t)+e+".png"}function Th(e){var t;return(t=e[Ss.variations])!=null?t:[]}function kf(e){return Th(e).length>0}function Z5e(e,t){return t?Th(e).find(function(n){return n.includes(t)}):Sr(e)}function Uu(e){if(!!e){if(vu[e])return vu[e];var t=G5(e);return vu[t]}}var xx=Object.values(Dp).flat();function Q5e(e){Dp[Xt.CUSTOM].length=0,e.forEach(function(t){var n=J5e(t);Dp[Xt.CUSTOM].push(n),!vu[n[Ss.unified]]&&(xx.push(n),vu[n[Ss.unified]]=n,Fj(n))})}function J5e(e){var t;return t={},t[Ss.name]=e.names.map(function(n){return n.toLowerCase()}),t[Ss.unified]=e.id.toLowerCase(),t[Ss.added_in]="0",t[Ss.imgUrl]=e.imgUrl,t}var vu={};setTimeout(function(){xx.reduce(function(e,t){return e[Sr(t)]=t,kf(t)&&Th(t).forEach(function(n){e[n]=t}),e},vu)});function K5e(e){var t=e.split("-"),n=t[1];return tb.includes(n)?n:null}var X5e=["2640-fe0f","2642-fe0f","2695-fe0f"],nb="Search",eSe="No results found",Bj=" found. Use up and down arrow keys to navigate.",tSe="1 result"+Bj,nSe="%n results"+Bj;function d8(e){var t,n;e===void 0&&(e={});var a=Hj(),r=Object.assign(a.previewConfig,(t=e.previewConfig)!=null?t:{}),i=Object.assign(a,e),o=D5e(e.categories,{suggestionMode:i.suggestedEmojisMode});i.hiddenEmojis.forEach(function(l){i.unicodeToHide.add(l)}),Q5e((n=i.customEmojis)!=null?n:[]);var c=i.searchDisabled?Hu.PREVIEW:i.skinTonePickerLocation;return oa({},i,{categories:o,previewConfig:r,skinTonePickerLocation:c})}function Hj(){return{autoFocusSearch:!0,categories:jj(),className:"",customEmojis:[],defaultSkinTone:Ys.NEUTRAL,emojiStyle:Kr.APPLE,emojiVersion:null,getEmojiUrl:$j,height:450,lazyLoadEmojis:!1,previewConfig:oa({},aSe),searchDisabled:!1,searchPlaceHolder:nb,searchPlaceholder:nb,skinTonePickerLocation:Hu.SEARCH,skinTonesDisabled:!1,style:{},suggestedEmojisMode:Tp.FREQUENT,theme:Lp.LIGHT,unicodeToHide:new Set(X5e),width:350,reactionsDefaultOpen:!1,reactions:E5e,open:!0,allowExpandReactions:!0,hiddenEmojis:[]}}var aSe={defaultEmoji:"1f60a",defaultCaption:"What's your mood?",showPreview:!0},rSe=["children"],Uj=h.exports.createContext(Hj());function sSe(e){var t=e.children,n=Oj(e,rSe),a=iSe(n);return h.exports.createElement(Uj.Provider,{value:a},t)}function iSe(e){var t,n=h.exports.useState(function(){return d8(e)}),a=n[0],r=n[1];return h.exports.useEffect(function(){Pj(a,e)||r(d8(e))},[(t=e.customEmojis)==null?void 0:t.length,e.open,e.emojiVersion,e.reactionsDefaultOpen,e.searchPlaceHolder,e.searchPlaceholder,e.defaultSkinTone,e.skinTonesDisabled,e.autoFocusSearch,e.emojiStyle,e.theme,e.suggestedEmojisMode,e.lazyLoadEmojis,e.className,e.height,e.width,e.searchDisabled,e.skinTonePickerLocation,e.allowExpandReactions]),a}function pa(){return h.exports.useContext(Uj)}var Vj=R.createContext({});function Wj(){var e=R.useContext(Vj);return e}function oSe(e){var t=R.useRef({onEmojiClick:e.onEmojiClick||U0,onReactionClick:e.onReactionClick||e.onEmojiClick,onSkinToneChange:e.onSkinToneChange||U0});return R.useEffect(function(){t.current.onEmojiClick=e.onEmojiClick||U0,t.current.onReactionClick=e.onReactionClick||e.onEmojiClick},[e.onEmojiClick,e.onReactionClick]),R.useEffect(function(){t.current.onSkinToneChange=e.onSkinToneChange||U0},[e.onSkinToneChange]),t}function U0(){}var Mp;(function(e){e.REACTIONS="reactions",e.PICKER="picker"})(Mp||(Mp={}));function lSe(){var e,t=pa(),n=t.searchPlaceHolder,a=t.searchPlaceholder;return(e=[n,a].find(function(r){return r!==nb}))!=null?e:nb}function cSe(){var e=pa(),t=e.defaultSkinTone;return t}function Yj(){var e=pa(),t=e.allowExpandReactions;return t}function Gj(){var e=pa(),t=e.skinTonesDisabled;return t}function Jc(){var e=pa(),t=e.emojiStyle;return t}function dSe(){var e=pa(),t=e.autoFocusSearch;return t}function qj(){var e=pa(),t=e.categories;return t}function uSe(){var e=pa(),t=e.customEmojis;return t}function fSe(){var e=pa(),t=e.open;return t}function mSe(e){var t,n=Wj(),a=n.current,r=(t=e===Mp.REACTIONS?a.onReactionClick:a.onEmojiClick)!=null?t:a.onEmojiClick;return r||function(){}}function pSe(){var e=Wj(),t=e.current;return t.onSkinToneChange||function(){}}function Zj(){var e=pa(),t=e.previewConfig;return t}function hSe(){var e=pa(),t=e.theme;return t}function gSe(){var e=pa(),t=e.suggestedEmojisMode;return t}function bSe(){var e=pa(),t=e.lazyLoadEmojis;return t}function ySe(){var e=pa(),t=e.className;return t}function xSe(){var e=pa(),t=e.height,n=e.width,a=e.style;return oa({height:u8(t),width:u8(n)},a)}function wSe(){var e=pa(),t=e.reactionsDefaultOpen;return t}function vSe(){var e=pa(),t=e.emojiVersion;return t}function Qj(){var e=pa(),t=e.searchDisabled;return t}function Jj(){var e=pa(),t=e.skinTonePickerLocation;return t}function _Se(){var e=pa(),t=e.unicodeToHide;return t}function NSe(){var e=pa(),t=e.reactions;return t}function Cf(){var e=pa(),t=e.getEmojiUrl;return t}function u8(e){return typeof e=="number"?e+"px":e}function SSe(e){var t=e>0,n=e>1;return t?n?nSe.replace("%n",e.toString()):tSe:eSe}function f8(e,t){t===void 0&&(t=0);var n=h.exports.useState(e),a=n[0],r=n[1],i=h.exports.useRef(null);function o(c){return new Promise(function(l){var d;i.current&&clearTimeout(i.current),i.current=(d=window)==null?void 0:d.setTimeout(function(){r(c),l(c)},t)})}return[a,o]}function kSe(){var e=_Se();return function(t){return e.has(t)}}function Kj(){var e=h.exports.useRef({}),t=vSe();return h.exports.useMemo(function(){var n=parseFloat(""+t);return!t||Number.isNaN(n)?e.current:xx.reduce(function(a,r){return ESe(r,n)&&(a[Sr(r)]=!0),a},e.current)},[t])}function CSe(){var e=Kj(),t=kSe();return function(a){var r=G5(Sr(a));return Boolean(e[r]||t(r))}}function ESe(e,t){return G5e(e)>t}function TSe(e){h.exports.useEffect(function(){e(!0)},[e])}function LSe(e){var t=e.children,n=Kj(),a=cSe(),r=wSe(),i=h.exports.useRef(Bm),o=h.exports.useRef(!1),c=h.exports.useRef(!1),l=h.exports.useRef(n),d=f8(Date.now(),200),u=f8("",100),g=h.exports.useState(!1),y=h.exports.useState(a),w=h.exports.useState(null),v=h.exports.useState(new Set),S=h.exports.useState(null),m=h.exports.useState(r),p=h.exports.useState(!1),b=p[0],x=p[1];return TSe(x),h.exports.createElement(Ps.Provider,{value:{activeCategoryState:w,activeSkinTone:y,disallowClickRef:o,disallowMouseRef:c,disallowedEmojisRef:l,emojiVariationPickerState:S,emojisThatFailedToLoadState:v,filterRef:i,isPastInitialLoad:b,searchTerm:u,skinToneFanOpenState:g,suggestedUpdateState:d,reactionsModeState:m}},t)}var Ps=h.exports.createContext({activeCategoryState:[null,function(){}],activeSkinTone:[Ys.NEUTRAL,function(){}],disallowClickRef:{current:!1},disallowMouseRef:{current:!1},disallowedEmojisRef:{current:{}},emojiVariationPickerState:[null,function(){}],emojisThatFailedToLoadState:[new Set,function(){}],filterRef:{current:{}},isPastInitialLoad:!0,searchTerm:["",function(){return new Promise(function(){})}],skinToneFanOpenState:[!1,function(){}],suggestedUpdateState:[Date.now(),function(){}],reactionsModeState:[!1,function(){}]});function q5(){var e=h.exports.useContext(Ps),t=e.filterRef;return t}function DSe(){var e=h.exports.useContext(Ps),t=e.disallowClickRef;return t}function Z5(){var e=h.exports.useContext(Ps),t=e.disallowMouseRef;return t}function wx(){var e=h.exports.useContext(Ps),t=e.reactionsModeState;return t}function vx(){var e=h.exports.useContext(Ps),t=e.searchTerm;return t}function Q5(){var e=h.exports.useContext(Ps),t=e.activeSkinTone;return t}function Xj(){var e=h.exports.useContext(Ps),t=e.emojisThatFailedToLoadState;return t}function MSe(){var e=h.exports.useContext(Ps),t=e.isPastInitialLoad;return t}function Ef(){var e=h.exports.useContext(Ps),t=e.emojiVariationPickerState;return t}function Lh(){var e=h.exports.useContext(Ps),t=e.skinToneFanOpenState;return t}function ez(){var e=h.exports.useContext(Ps),t=e.suggestedUpdateState,n=t[0],a=t[1];return[n,function(){a(Date.now())}]}function _x(){var e=vx(),t=e[0];return!!t}function us(e){!e||requestAnimationFrame(function(){e.focus()})}function tz(e){if(!!e){var t=e.previousElementSibling;us(t)}}function nz(e){if(!!e){var t=e.nextElementSibling;us(t)}}function az(e){if(!!e){var t=e.firstElementChild;us(t)}}function Ap(){return document.activeElement}function ASe(e){var t=e.children,n=h.exports.useRef(null),a=h.exports.useRef(null),r=h.exports.useRef(null),i=h.exports.useRef(null),o=h.exports.useRef(null),c=h.exports.useRef(null),l=h.exports.useRef(null),d=h.exports.useRef(null);return h.exports.createElement(rz.Provider,{value:{AnchoredEmojiRef:a,BodyRef:r,CategoryNavigationRef:c,PickerMainRef:n,SearchInputRef:i,SkinTonePickerRef:o,VariationPickerRef:l,ReactionsRef:d}},t)}var rz=h.exports.createContext({AnchoredEmojiRef:h.exports.createRef(),BodyRef:h.exports.createRef(),CategoryNavigationRef:h.exports.createRef(),PickerMainRef:h.exports.createRef(),SearchInputRef:h.exports.createRef(),SkinTonePickerRef:h.exports.createRef(),VariationPickerRef:h.exports.createRef(),ReactionsRef:h.exports.createRef()});function Yl(){return h.exports.useContext(rz)}function Dh(){return Yl().PickerMainRef}function Nx(){return Yl().AnchoredEmojiRef}function sz(){var e=Nx();return function(t){t===null&&e.current!==null&&us(e.current),e.current=t}}function Rs(){return Yl().BodyRef}function ISe(){return Yl().ReactionsRef}function Gl(){return Yl().SearchInputRef}function J5(){return Yl().SkinTonePickerRef}function K5(){return Yl().CategoryNavigationRef}function OSe(){return Yl().VariationPickerRef}function iz(e,t){t===void 0&&(t=0);var n=vz(e);!n||requestAnimationFrame(function(){n.scrollTop=t})}function PSe(e,t){var n=vz(e);!n||requestAnimationFrame(function(){n.scrollTop=n.scrollTop+t})}function RSe(){var e=Rs();return h.exports.useCallback(function(t){requestAnimationFrame(function(){e.current&&(e.current.scrollTop=t)})},[e])}function Sx(e){if(!(!e||!Cke(e))&&!e.closest(dr(tn.variationPicker))){var t=Nz(e),n=_z(e);PSe(t,-(rS(ql(e))-n))}}function kx(e){var t=lS(e);us(t),Sx(t)}function jSe(e){var t=lS(e);us(t),t==null||t.click()}function zSe(e){us(Ez(e))}function FSe(e){if(!!e){var t=Tz(e);if(!t)return kx(Ex(e));us(t),Sx(t)}}function $Se(e){if(!!e){var t=oS(e);if(!t)return zSe(Cx(e));us(t),Sx(t)}}function BSe(e,t){if(!!e){var n=USe(e);if(!n)return t();us(n),Sx(n)}}function HSe(e){if(!!e){var t=VSe(e);return us(t)}}function USe(e){if(!e)return null;var t=Lz(e),n=ql(t),a=bz(t,e),r=yz(t,e),i=gz(t,e);if(r===0){var o=Cx(n);return o?xz(Vu(o),-1,i,a):null}return wke(Vu(t),r,i,a)}function VSe(e){if(!e)return null;var t=Lz(e),n=ql(t),a=bz(t,e),r=yz(t,e),i=gz(t,e);if(!bke(t,e)){var o=Ex(n);return o?xz(Vu(o),0,i,a):null}var c=xke(Vu(t),r,i,a);return c}function Kc(){var e=Ef(),t=e[0],n=e[1],a=Lh(),r=a[0],i=a[1],o=h.exports.useCallback(function(){t&&n(null),r&&i(!1)},[t,r,n,i]);return o}function oz(){var e=Ef(),t=e[0],n=Lh(),a=n[0];return function(){return!!t||a}}function WSe(){var e=Z5();return function(){e.current=!0}}function lz(){var e=Z5();return function(){e.current=!1}}function cz(){var e=Z5();return function(){return e.current}}function YSe(){var e=Rs(),t=lz(),n=cz();h.exports.useEffect(function(){var a=e.current;a==null||a.addEventListener("mousemove",r,{passive:!0});function r(){n()&&t()}return function(){a==null||a.removeEventListener("mousemove",r)}},[e,t,n])}function Xc(){var e=Gl();return h.exports.useCallback(function(){us(e.current)},[e])}function GSe(){var e=J5();return h.exports.useCallback(function(){!e.current||az(e.current)},[e])}function dz(){var e=K5();return h.exports.useCallback(function(){!e.current||az(e.current)},[e])}function qSe(){var e=q5();return function t(n){if(typeof n=="function")return t(n(e.current));e.current=n}}function uz(){var e=X5(),t=Gl(),n=Xc();return function(){t.current&&(t.current.value=""),e(""),n()}}function ZSe(){var e=Gl(),t=X5();return function(a){e.current?(e.current.value=""+e.current.value+a,t(c_(e.current.value))):t(c_(a))}}function QSe(){var e=Gl(),t=q5(),n=qSe(),a=X5(),r=vx(),i=r[0],o=nke(t.current,i);return{onChange:c,searchTerm:i,SearchInputRef:e,statusSearchResults:o};function c(l){var d=t.current,u=l.toLowerCase();if(d!=null&&d[u]||u.length<=1)return a(u);var g=tke(u,d);if(!g)return a(u);n(function(y){var w;return Object.assign(y,(w={},w[u]=JSe(g,u),w))}),a(u)}}function X5(){var e=vx(),t=e[1],n=Dh();return function(r){requestAnimationFrame(function(){t(r&&(r==null?void 0:r.toLowerCase())).then(function(){iz(n.current,0)})})}}function JSe(e,t){var n={};for(var a in e){var r=e[a];KSe(r,t)&&(n[a]=r)}return n}function KSe(e,t){return Eh(e).some(function(n){return n.includes(t)})}function XSe(){var e=q5(),t=e.current,n=vx(),a=n[0];return function(r){return eke(r,t,a)}}function eke(e,t,n){var a;return!t||!n?!1:!((a=t[n])!=null&&a[e])}function tke(e,t){if(!t)return null;if(t[e])return t[e];var n=Object.keys(t).sort(function(a,r){return r.length-a.length}).find(function(a){return e.includes(a)});return n?t[n]:null}function c_(e){return!e||typeof e!="string"?"":e.trim().toLowerCase()}function nke(e,t){var n;if(!(e!=null&&e[t]))return"";var a=((n=Object.entries(e==null?void 0:e[t]))==null?void 0:n.length)||0;return SSe(a)}function fz(){var e=sz(),t=Ef(),n=t[1];return function(r){var i=aS(r),o=i[0];o&&(e(r),n(o))}}function eS(){var e=Jj();return e===Hu.SEARCH}function mz(){var e=Jj();return e===Hu.PREVIEW}var xa;(function(e){e.ArrowDown="ArrowDown",e.ArrowUp="ArrowUp",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.Escape="Escape",e.Enter="Enter",e.Space=" "})(xa||(xa={}));function ake(){rke(),ske(),ike(),oke(),lke()}function rke(){var e=Dh(),t=uz(),n=RSe(),a=Gl(),r=Xc(),i=oz(),o=WSe(),c=Kc(),l=h.exports.useMemo(function(){return function(u){var g=u.key;switch(o(),g){case xa.Escape:if(u.preventDefault(),i()){c();return}t(),n(0),r();break}}},[n,t,c,r,i,o]);h.exports.useEffect(function(){var d=e.current;if(!!d)return d.addEventListener("keydown",l),function(){d.removeEventListener("keydown",l)}},[e,a,n,l])}function ske(){var e=GSe(),t=Dh(),n=Rs(),a=Gl(),r=Lh(),i=r[1],o=pz(),c=eS(),l=h.exports.useMemo(function(){return function(u){var g=u.key;switch(g){case xa.ArrowRight:if(!c)return;u.preventDefault(),i(!0),e();break;case xa.ArrowDown:u.preventDefault(),o();break;case xa.Enter:u.preventDefault(),jSe(n.current);break}}},[e,o,i,n,c]);h.exports.useEffect(function(){var d=a.current;if(!!d)return d.addEventListener("keydown",l),function(){d.removeEventListener("keydown",l)}},[t,a,l])}function ike(){var e=J5(),t=Xc(),n=Gl(),a=pz(),r=Lh(),i=r[0],o=r[1],c=mz(),l=eS(),d=tS(),u=h.exports.useMemo(function(){return function(y){var w=y.key;if(l)switch(w){case xa.ArrowLeft:if(y.preventDefault(),!i)return t();m8(t);break;case xa.ArrowRight:if(y.preventDefault(),!i)return t();p8();break;case xa.ArrowDown:y.preventDefault(),i&&o(!1),a();break;default:d(y);break}if(c)switch(w){case xa.ArrowUp:if(y.preventDefault(),!i)return t();m8(t);break;case xa.ArrowDown:if(y.preventDefault(),!i)return t();p8();break;default:d(y);break}}},[i,t,o,a,d,c,l]);h.exports.useEffect(function(){var g=e.current;if(!!g)return g.addEventListener("keydown",u),function(){g.removeEventListener("keydown",u)}},[e,n,i,u])}function oke(){var e=Xc(),t=K5(),n=Rs(),a=tS(),r=h.exports.useMemo(function(){return function(o){var c=o.key;switch(c){case xa.ArrowUp:o.preventDefault(),e();break;case xa.ArrowRight:o.preventDefault(),nz(Ap());break;case xa.ArrowLeft:o.preventDefault(),tz(Ap());break;case xa.ArrowDown:o.preventDefault(),kx(n.current);break;default:a(o);break}}},[n,e,a]);h.exports.useEffect(function(){var i=t.current;if(!!i)return i.addEventListener("keydown",r),function(){i.removeEventListener("keydown",r)}},[t,n,r])}function lke(){var e=Rs(),t=cke(),n=fz(),a=oz(),r=Kc(),i=tS(),o=h.exports.useMemo(function(){return function(l){var d=l.key,u=ei(Ap());switch(d){case xa.ArrowRight:l.preventDefault(),FSe(u);break;case xa.ArrowLeft:l.preventDefault(),$Se(u);break;case xa.ArrowDown:if(l.preventDefault(),a()){r();break}HSe(u);break;case xa.ArrowUp:if(l.preventDefault(),a()){r();break}BSe(u,t);break;case xa.Space:l.preventDefault(),n(l.target);break;default:i(l);break}}},[t,i,n,a,r]);h.exports.useEffect(function(){var c=e.current;if(!!c)return c.addEventListener("keydown",o),function(){c.removeEventListener("keydown",o)}},[e,o])}function pz(){var e=dz(),t=_x(),n=Rs();return h.exports.useCallback(function(){return t?kx(n.current):e()},[n,e,t])}function cke(){var e=Xc(),t=dz(),n=_x();return h.exports.useCallback(function(){return n?e():t()},[e,n,t])}function m8(e){var t=Ap();!t||(_ke(t)||e(),nz(t))}function p8(){var e=Ap();!e||tz(e)}function tS(){var e=ZSe(),t=Xc(),n=Qj(),a=Kc();return function(i){var o=i.key;dke(i)||n||o.match(/(^[a-zA-Z0-9]$){1}/)&&(i.preventDefault(),a(),t(),e(o))}}function dke(e){var t=e.metaKey,n=e.ctrlKey,a=e.altKey;return t||n||a}function uke(e,t,n){if(!!t&&n!==Kr.NATIVE){var a=Sr(t);h8.has(a)||(Th(t).forEach(function(r){var i=e(r,n);fke(i)}),h8.add(a))}}var h8=new Set;function fke(e){var t=new Image;t.src=e}function mke(){var e=Rs(),t=Jc(),n=Cf();h.exports.useEffect(function(){if(t===Kr.NATIVE)return;var a=e.current;return a==null||a.addEventListener("focusin",r),function(){a==null||a.removeEventListener("focusin",r)};function r(i){var o=ei(i.target);if(!!o){var c=aS(o),l=c[0];!l||kf(l)&&uke(n,l,t)}}},[e,t,n])}var pke=["width","height"],hz=40;function hke(e){var t=e.children;return h.exports.createElement(LSe,null,h.exports.createElement(gke,null,t))}function gke(e){var t,n=e.children,a=wx(),r=a[0],i=hSe(),o=_x(),c=Dh(),l=ySe(),d=xSe();ake(),mke();var u=d||{},g=u.width,y=u.height,w=Oj(u,pke);return h.exports.createElement("aside",{className:mn(dm.main,dm.baseVariables,i===Lp.DARK&&dm.darkTheme,i===Lp.AUTO&&dm.autoThemeDark,(t={},t[tn.searchActive]=o,t),r&&dm.reactionsMenu,l),ref:c,style:oa({},w,!r&&{height:y,width:g})},n)}var g8={"--epr-emoji-variation-picker-bg-color":"var(--epr-dark-emoji-variation-picker-bg-color)","--epr-hover-bg-color-reduced-opacity":"var(--epr-dark-hover-bg-color-reduced-opacity)","--epr-highlight-color":"var(--epr-dark-highlight-color)","--epr-text-color":"var(--epr-dark-text-color)","--epr-hover-bg-color":"var(--epr-dark-hover-bg-color)","--epr-focus-bg-color":"var(--epr-dark-focus-bg-color)","--epr-search-input-bg-color":"var(--epr-dark-search-input-bg-color)","--epr-category-label-bg-color":"var(--epr-dark-category-label-bg-color)","--epr-picker-border-color":"var(--epr-dark-picker-border-color)","--epr-bg-color":"var(--epr-dark-bg-color)","--epr-reactions-bg-color":"var(--epr-dark-reactions-bg-color)","--epr-search-input-bg-color-active":"var(--epr-dark-search-input-bg-color-active)","--epr-emoji-variation-indicator-color":"var(--epr-dark-emoji-variation-indicator-color)","--epr-category-icon-active-color":"var(--epr-dark-category-icon-active-color)","--epr-skin-tone-picker-menu-color":"var(--epr-dark-skin-tone-picker-menu-color)"},dm=ra.create({main:{".":["epr-main",tn.emojiPicker],position:"relative",display:"flex",flexDirection:"column",borderWidth:"1px",borderStyle:"solid",borderRadius:"var(--epr-picker-border-radius)",borderColor:"var(--epr-picker-border-color)",backgroundColor:"var(--epr-bg-color)",overflow:"hidden",transition:"all 0.3s ease-in-out, background-color 0.1s ease-in-out","*":{boxSizing:"border-box",fontFamily:"sans-serif"}},baseVariables:{"--":{"--epr-highlight-color":"#007aeb","--epr-hover-bg-color":"#f1f8ff","--epr-hover-bg-color-reduced-opacity":"#f1f8ff80","--epr-focus-bg-color":"#e0f0ff","--epr-text-color":"#858585","--epr-search-input-bg-color":"#f6f6f6","--epr-picker-border-color":"#e7e7e7","--epr-bg-color":"#fff","--epr-reactions-bg-color":"#ffffff90","--epr-category-icon-active-color":"#6aa8de","--epr-skin-tone-picker-menu-color":"#ffffff95","--epr-horizontal-padding":"10px","--epr-picker-border-radius":"8px","--epr-search-border-color":"var(--epr-highlight-color)","--epr-header-padding":"15px var(--epr-horizontal-padding)","--epr-active-skin-tone-indicator-border-color":"var(--epr-highlight-color)","--epr-active-skin-hover-color":"var(--epr-hover-bg-color)","--epr-search-input-bg-color-active":"var(--epr-search-input-bg-color)","--epr-search-input-padding":"0 30px","--epr-search-input-border-radius":"8px","--epr-search-input-height":"40px","--epr-search-input-text-color":"var(--epr-text-color)","--epr-search-input-placeholder-color":"var(--epr-text-color)","--epr-search-bar-inner-padding":"var(--epr-horizontal-padding)","--epr-category-navigation-button-size":"30px","--epr-emoji-variation-picker-height":"45px","--epr-emoji-variation-picker-bg-color":"var(--epr-bg-color)","--epr-preview-height":"70px","--epr-preview-text-size":"14px","--epr-preview-text-padding":"0 var(--epr-horizontal-padding)","--epr-preview-border-color":"var(--epr-picker-border-color)","--epr-preview-text-color":"var(--epr-text-color)","--epr-category-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-bg-color":"#ffffffe6","--epr-category-label-text-color":"var(--epr-text-color)","--epr-category-label-padding":"0 var(--epr-horizontal-padding)","--epr-category-label-height":hz+"px","--epr-emoji-size":"30px","--epr-emoji-padding":"5px","--epr-emoji-fullsize":"calc(var(--epr-emoji-size) + var(--epr-emoji-padding) * 2)","--epr-emoji-hover-color":"var(--epr-hover-bg-color)","--epr-emoji-variation-indicator-color":"var(--epr-picker-border-color)","--epr-emoji-variation-indicator-color-hover":"var(--epr-text-color)","--epr-header-overlay-z-index":"3","--epr-emoji-variations-indictator-z-index":"1","--epr-category-label-z-index":"2","--epr-skin-variation-picker-z-index":"5","--epr-preview-z-index":"6","--epr-dark":"#000","--epr-dark-emoji-variation-picker-bg-color":"var(--epr-dark)","--epr-dark-highlight-color":"#c0c0c0","--epr-dark-text-color":"var(--epr-highlight-color)","--epr-dark-hover-bg-color":"#363636f6","--epr-dark-hover-bg-color-reduced-opacity":"#36363680","--epr-dark-focus-bg-color":"#474747","--epr-dark-search-input-bg-color":"#333333","--epr-dark-category-label-bg-color":"#222222e6","--epr-dark-picker-border-color":"#151617","--epr-dark-bg-color":"#222222","--epr-dark-reactions-bg-color":"#22222290","--epr-dark-search-input-bg-color-active":"var(--epr-dark)","--epr-dark-emoji-variation-indicator-color":"#444","--epr-dark-category-icon-active-color":"#3271b7","--epr-dark-skin-tone-picker-menu-color":"#22222295"}},autoThemeDark:{".":tn.autoTheme,"@media (prefers-color-scheme: dark)":{"--":g8}},darkTheme:{".":tn.darkTheme,"--":g8},reactionsMenu:{".":"epr-reactions",height:"50px",display:"inline-flex",backgroundColor:"var(--epr-reactions-bg-color)",backdropFilter:"blur(8px)","--":{"--epr-picker-border-radius":"50px"}}});function gz(e,t){if(!e||!t)return 0;var n=e.getBoundingClientRect().width,a=t.getBoundingClientRect().width;return Math.floor(n/a)}function bz(e,t){if(!e||!t)return 0;var n=t.getBoundingClientRect().width,a=t.getBoundingClientRect().left,r=e.getBoundingClientRect().left;return Math.floor((a-r)/n)}function yz(e,t){if(!e||!t)return 0;var n=t.getBoundingClientRect().height,a=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;return Math.round((a-r)/n)}function bke(e,t){if(!e||!t)return!1;var n=t.getBoundingClientRect().height,a=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top,i=e.getBoundingClientRect().height;return Math.round(a-r+n)<i}function nS(e,t,n){if(t===-1){var a=Math.floor((e.length-1)/n),r=a*n,i=e.length-1;return e.slice(r,i+1)}return e.slice(t*n,(t+1)*n)}function yke(e,t,n){var a=t+1;return a*n>e.length?[]:nS(e,a,n)}function xz(e,t,n,a){var r=nS(e,t,n);return r[a]||r[r.length-1]||null}function xke(e,t,n,a){var r=yke(e,t,n);return r[a]||r[r.length-1]||null}function wke(e,t,n,a){var r=nS(e,t-1,n);return r[a]||r[r.length-1]||null}function vke(e,t,n){if(n===void 0&&(n=0),!e||!t.length)return null;var a=e.getBoundingClientRect().top,r=e.getBoundingClientRect().bottom,i=a+Nke(e),o=t.find(function(c){var l=c.getBoundingClientRect().top,d=c.getBoundingClientRect().bottom,u=c.clientHeight*n,g=l+u,y=d-u;return g<i?!1:g>=a&&g<=r||y>=a&&y<=r});return o||null}function _ke(e){return!!e.nextElementSibling}function Nke(e){for(var t=Array.from(e.querySelectorAll(dr(tn.label))),n=0,a=t;n<a.length;n++){var r=a[n],i=r.getBoundingClientRect().height;if(i>0)return i}return hz}var ab="button"+dr(tn.emoji),Ske=[ab,dr(tn.visible),":not("+dr(tn.hidden)+")"].join("");function ei(e){var t;return(t=e==null?void 0:e.closest(ab))!=null?t:null}function aS(e){var t=Sz(e),n=sS(e);if(!t)return[];var a=Uu(n!=null?n:t);return a?[a,n]:[]}function kke(e){var t;return Boolean((e==null?void 0:e.matches(ab))||(e==null||(t=e.parentElement)==null?void 0:t.matches(ab)))}function b8(e){var t;return(t=e==null?void 0:e.clientHeight)!=null?t:0}function wz(e){if(!e)return 0;var t=ei(e),n=ql(t),a=rS(n);return y8(t)+y8(n)+a}function rS(e){var t,n;if(!e)return 0;var a=e.querySelector(dr(tn.categoryContent));return((t=e==null?void 0:e.clientHeight)!=null?t:0)-((n=a==null?void 0:a.clientHeight)!=null?n:0)}function Cke(e){return e?_z(e)<rS(ql(e)):!1}function vz(e){return e?e.matches(dr(tn.scrollBody))?e:e.querySelector(dr(tn.scrollBody)):null}function _z(e){var t,n;return e?wz(e)-((t=(n=Nz(e))==null?void 0:n.scrollTop)!=null?t:0):0}function Nz(e){var t;return e&&(t=e.closest(dr(tn.scrollBody)))!=null?t:null}function Eke(e){var t=ei(e),n=ql(t);return x8(t)+x8(n)}function y8(e){var t;return(t=e==null?void 0:e.offsetTop)!=null?t:0}function x8(e){var t;return(t=e==null?void 0:e.offsetLeft)!=null?t:0}function sS(e){var t;return(t=Tke(ei(e),"unified"))!=null?t:null}function Sz(e){var t=sS(e);return t?G5(t):null}function kz(e){return e?{unified:sS(e),originalUnified:Sz(e)}:{unified:null,originalUnified:null}}function Tke(e,t){var n;return(n=Lke(e)[t])!=null?n:null}function Lke(e){var t;return(t=e==null?void 0:e.dataset)!=null?t:{}}function iS(e){return e.classList.contains(tn.visible)}function Cz(e){return e?e.classList.contains(tn.hidden):!0}function Vu(e){return e?Array.from(e.querySelectorAll(Ske)):[]}function Ez(e){if(!e)return null;var t=Vu(e),n=t.slice(-1),a=n[0];return a?iS(a)?a:oS(a):null}function Tz(e){var t=e.nextElementSibling;return t?iS(t)?t:Tz(t):lS(Ex(e))}function oS(e){var t=e.previousElementSibling;return t?iS(t)?t:oS(t):Ez(Cx(e))}function lS(e){if(!e)return null;var t=Vu(e);return vke(e,t,.1)}function Cx(e){var t=ql(e);if(!t)return null;var n=t.previousElementSibling;return n?Cz(n)?Cx(n):n:null}function Ex(e){var t=ql(e);if(!t)return null;var n=t.nextElementSibling;return n?Cz(n)?Ex(n):n:null}function ql(e){return e?e.closest(dr(tn.category)):null}function Lz(e){return e?e.closest(dr(tn.categoryContent)):null}function Dz(e){return e.split("-").map(function(t){return String.fromCodePoint(parseInt(t,16))}).join("")}var Mz="epr_suggested";function Az(e){try{var t,n,a;if(!((t=window)!=null&&t.localStorage))return[];var r=JSON.parse((n=(a=window)==null?void 0:a.localStorage.getItem(Mz))!=null?n:"[]");return e===Tp.FREQUENT?r.sort(function(i,o){return o.count-i.count}):r}catch{return[]}}function Dke(e,t){var n=Az(),a=Sr(e,t),r=Sr(e),i=n.find(function(l){var d=l.unified;return d===a}),o;i?o=[i].concat(n.filter(function(l){return l!==i})):(i={unified:a,original:r,count:0},o=[i].concat(n)),i.count++,o.length=Math.min(o.length,14);try{var c;(c=window)==null||c.localStorage.setItem(Mz,JSON.stringify(o))}catch{}}function Mke(e){return e.category===Xt.CUSTOM}function Iz(e){return e.imgUrl!==void 0}function Oz(e,t){var n=h.exports.useRef(),a=fz(),r=DSe(),i=Ef(),o=i[1],c=Kc(),l=Q5(),d=l[0],u=mSe(t),g=ez(),y=g[1],w=Cf(),v=Jc(),S=h.exports.useCallback(function(x){if(!r.current){c();var k=w8(x),N=k[0],_=k[1];if(!(!N||!_)){var C=K5e(_)||d;y(),Dke(N,C),u(Ake(N,C,v,w),x)}}},[d,c,r,u,y,w,v]),m=h.exports.useCallback(function(x){var k;n.current&&clearTimeout(n.current);var N=w8(x),_=N[0];!_||!kf(_)||(n.current=(k=window)==null?void 0:k.setTimeout(function(){r.current=!0,n.current=void 0,c(),a(x.target),o(_)},500))},[r,c,a,o]),p=h.exports.useCallback(function(){n.current?(clearTimeout(n.current),n.current=void 0):r.current&&requestAnimationFrame(function(){r.current=!1})},[r]);h.exports.useEffect(function(){if(!!e.current){var b=e.current;return b.addEventListener("click",S,{passive:!0}),b.addEventListener("mousedown",m,{passive:!0}),b.addEventListener("mouseup",p,{passive:!0}),function(){b==null||b.removeEventListener("click",S),b==null||b.removeEventListener("mousedown",m),b==null||b.removeEventListener("mouseup",p)}}},[e,S,m,p])}function w8(e){var t=e==null?void 0:e.target;return kke(t)?aS(t):[]}function Ake(e,t,n,a){var r=Eh(e);if(Iz(e)){var i=Sr(e);return{activeSkinTone:t,emoji:i,getImageUrl:function(){return e.imgUrl},imageUrl:e.imgUrl,isCustom:!0,names:r,unified:i,unifiedWithoutSkinTone:i}}var o=Sr(e,t);return{activeSkinTone:t,emoji:Dz(o),getImageUrl:function(l){return l===void 0&&(l=n!=null?n:Kr.APPLE),a(o,l)},imageUrl:a(o,n!=null?n:Kr.APPLE),isCustom:!1,names:r,unified:o,unifiedWithoutSkinTone:Sr(e)}}function Mh(e){return h.exports.createElement("button",Object.assign({type:"button"},e,{className:mn(Ike.button,e.className)}),e.children)}var Ike=ra.create({button:{".":"epr-btn",cursor:"pointer",border:"0",background:"none",outline:"none"}});function Oke(e){var t,n=e.emojiNames,a=e.unified,r=e.hidden,i=e.hiddenOnSearch,o=e.showVariations,c=o===void 0?!0:o,l=e.hasVariations,d=e.children,u=e.className,g=e.noBackground,y=g===void 0?!1:g;return h.exports.createElement(Mh,{className:mn(dv.emoji,r&&W5.hidden,i&&Qc.hiddenOnSearch,(t={},t[tn.visible]=!r&&!i,t),!!(l&&c)&&dv.hasVariations,y&&dv.noBackground,u),"data-unified":a,"aria-label":Pke(n),"data-full-name":n},d)}function Pke(e){var t;return e[0].match("flag-")&&(t=e[1])!=null?t:e[0]}var dv=ra.create({emoji:{".":tn.emoji,position:"relative",width:"var(--epr-emoji-fullsize)",height:"var(--epr-emoji-fullsize)",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",maxWidth:"var(--epr-emoji-fullsize)",maxHeight:"var(--epr-emoji-fullsize)",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s",":hover":{backgroundColor:"var(--epr-emoji-hover-color)"},":focus":{backgroundColor:"var(--epr-focus-bg-color)"}},noBackground:{background:"none",":hover":{backgroundColor:"transparent",background:"none"},":focus":{backgroundColor:"transparent",background:"none"}},hasVariations:{".":tn.emojiHasVariations,":after":{content:"",display:"block",width:"0",height:"0",right:"0px",bottom:"1px",position:"absolute",borderLeft:"4px solid transparent",borderRight:"4px solid transparent",transform:"rotate(135deg)",borderBottom:"4px solid var(--epr-emoji-variation-indicator-color)",zIndex:"var(--epr-emoji-variations-indictator-z-index)"},":hover:after":{borderBottom:"4px solid var(--epr-emoji-variation-indicator-color-hover)"}}}),rb=ra.create({external:{".":tn.external,fontSize:"0"},common:{alignSelf:"center",justifySelf:"center",display:"block"}});function v8(e){var t=e.emojiName,n=e.style,a=e.lazyLoad,r=a===void 0?!1:a,i=e.imgUrl,o=e.onError,c=e.className;return h.exports.createElement("img",{src:i,alt:t,className:mn(Rke.emojiImag,rb.external,rb.common,c),loading:r?"lazy":"eager",onError:o,style:n})}var Rke=ra.create({emojiImag:{".":"epr-emoji-img",maxWidth:"var(--epr-emoji-fullsize)",maxHeight:"var(--epr-emoji-fullsize)",minWidth:"var(--epr-emoji-fullsize)",minHeight:"var(--epr-emoji-fullsize)",padding:"var(--epr-emoji-padding)"}});function jke(e){var t=e.unified,n=e.style,a=e.className;return h.exports.createElement("span",{className:mn(zke.nativeEmoji,rb.common,rb.external,a),"data-unified":t,style:n},Dz(t))}var zke=ra.create({nativeEmoji:{".":"epr-emoji-native",fontFamily:'"Segoe UI Emoji", "Segoe UI Symbol", "Segoe UI", "Apple Color Emoji", "Twemoji Mozilla", "Noto Color Emoji", "EmojiOne Color", "Android Emoji"!important',position:"relative",lineHeight:"100%",fontSize:"var(--epr-emoji-size)",textAlign:"center",alignSelf:"center",justifySelf:"center",letterSpacing:"0",padding:"var(--epr-emoji-padding)"}});function d_(e){var t=e.emoji,n=e.unified,a=e.emojiStyle,r=e.size,i=e.lazyLoad,o=e.getEmojiUrl,c=o===void 0?$j:o,l=e.className,d=Xj(),u=d[1],g={};r&&(g.width=g.height=g.fontSize=r+"px");var y=t||Uu(n);if(!y)return null;if(Iz(y))return h.exports.createElement(v8,{style:g,emojiName:n,emojiStyle:Kr.NATIVE,lazyLoad:i,imgUrl:y.imgUrl,onError:w,className:l});return h.exports.createElement(h.exports.Fragment,null,a===Kr.NATIVE?h.exports.createElement(jke,{unified:n,style:g,className:l}):h.exports.createElement(v8,{style:g,emojiName:l_(y),emojiStyle:a,lazyLoad:i,imgUrl:c(n,a),onError:w,className:l}));function w(){u(function(v){return new Set(v).add(n)})}}function Tx(e){var t=e.emoji,n=e.unified,a=e.hidden,r=e.hiddenOnSearch,i=e.emojiStyle,o=e.showVariations,c=o===void 0?!0:o,l=e.size,d=e.lazyLoad,u=e.getEmojiUrl,g=e.className,y=e.noBackground,w=y===void 0?!1:y,v=kf(t);return h.exports.createElement(Oke,{hasVariations:v,showVariations:c,hidden:a,hiddenOnSearch:r,emojiNames:Eh(t),unified:n,noBackground:w},h.exports.createElement(d_,{unified:n,emoji:t,size:l,emojiStyle:i,lazyLoad:d,getEmojiUrl:u,className:g}))}var Fke="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjgwcHgiIHZpZXdCb3g9IjAgMCAyMCA4MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNNS43LDEwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsMTAuOSw2LjEsMTEsNi4zLDExaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjRWNi43YzAtMC4zLTAuMi0wLjUtMC41LTAuNQoJQzkuOCw2LDkuNiw2LjIsOS42LDYuNXYzLjRINi4yQzUuOSw5LjksNS43LDEwLjEsNS43LDEwLjRMNS43LDEwLjR6Ii8+CjxwYXRoIGZpbGw9IiMzMzcxQjciIGQ9Ik01LjcsMzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDMxLDYuMywzMWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuMgoJQzUuOSwyOS45LDUuNywzMC4xLDUuNywzMC40TDUuNywzMC40eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNNS43LDUwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsNTAuOSw2LjEsNTEsNi4zLDUxaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjR2LTMuNGMwLTAuMy0wLjItMC41LTAuNS0wLjUKCXMtMC41LDAuMi0wLjUsMC41djMuNEg2LjJDNS45LDQ5LjksNS43LDUwLjEsNS43LDUwLjRMNS43LDUwLjR6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik01LjcsNzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDcxLDYuMyw3MWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuNAoJQzUuOSw2OS45LDUuNyw3MC4xLDUuNyw3MC40TDUuNyw3MC40eiIvPgo8L3N2Zz4=";function $ke(){var e=wx(),t=e[1];return h.exports.createElement(Mh,{"aria-label":"Show all Emojis",title:"Show all Emojis",tabIndex:0,className:mn(Bke.plusSign),onClick:function(){return t(!1)}})}var Bke=ra.create(oa({plusSign:{fontSize:"20px",padding:"17px",color:"var(--epr-text-color)",borderRadius:"50%",textAlign:"center",lineHeight:"100%",width:"20px",height:"20px",display:"flex",justifyContent:"center",alignItems:"center",transition:"background-color 0.2s ease-in-out",":after":{content:"",minWidth:"20px",minHeight:"20px",backgroundImage:"url("+Fke+")",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",backgroundPositionY:"0"},":hover":{color:"var(--epr-highlight-color)",backgroundColor:"var(--epr-hover-bg-color-reduced-opacity)",":after":{backgroundPositionY:"-20px"}},":focus":{color:"var(--epr-highlight-color)",backgroundColor:"var(--epr-hover-bg-color-reduced-opacity)",":after":{backgroundPositionY:"-40px"}}}},Ol("plusSign",{":after":{backgroundPositionY:"-40px"},":hover:after":{backgroundPositionY:"-60px"}})));function Hke(){var e=wx(),t=e[0],n=ISe(),a=NSe();Oz(n,Mp.REACTIONS);var r=Jc(),i=Yj();return t?h.exports.createElement("ul",{className:mn(_8.list,!t&&W5.hidden),ref:n},a.map(function(o){return h.exports.createElement("li",{key:o},h.exports.createElement(Tx,{emoji:Uu(o),emojiStyle:r,unified:o,showVariations:!1,className:mn(_8.emojiButton),noBackground:!0}))}),i?h.exports.createElement("li",null,h.exports.createElement($ke,null)):null):null}var _8=ra.create({list:{listStyle:"none",margin:"0",padding:"0 5px",display:"flex",justifyContent:"space-between",alignItems:"center",height:"100%"},emojiButton:{":hover":{transform:"scale(1.2)"},":focus":{transform:"scale(1.2)"},":active":{transform:"scale(1.1)"},transition:"transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.5)"}});function Uke(e){var t=Kc();h.exports.useEffect(function(){var n=e.current;if(!n)return;n.addEventListener("scroll",a,{passive:!0});function a(){t()}return function(){n==null||n.removeEventListener("scroll",a)}},[e,t])}function Vke(){var e=Xj(),t=e[0],n=XSe();return function(a){var r=Sr(a),i=t.has(r),o=n(r);return{failedToLoad:i,filteredOut:o,hidden:i||o}}}function Pz(e){var t=e.categoryConfig,n=e.children,a=e.hidden,r=e.hiddenOnSearch,i=Y5(t),o=zj(t);return h.exports.createElement("li",{className:mn(uv.category,a&&W5.hidden,r&&Qc.hiddenOnSearch),"data-name":i,"aria-label":o},h.exports.createElement("h2",{className:mn(uv.label)},o),h.exports.createElement("div",{className:mn(uv.categoryContent)},n))}var uv=ra.create({category:{".":tn.category,":not(:has(.epr-visible))":{display:"none"}},categoryContent:{".":tn.categoryContent,display:"grid",gridGap:"0",gridTemplateColumns:"repeat(auto-fill, var(--epr-emoji-fullsize))",justifyContent:"space-between",margin:"var(--epr-category-padding)",position:"relative"},label:{".":tn.label,alignItems:"center",backdropFilter:"blur(3px)",backgroundColor:"var(--epr-category-label-bg-color)",color:"var(--epr-category-label-text-color)",display:"flex",fontSize:"16px",fontWeight:"bold",height:"var(--epr-category-label-height)",margin:"0",padding:"var(--epr-category-label-padding)",position:"sticky",textTransform:"capitalize",top:"0",width:"100%",zIndex:"var(--epr-category-label-z-index)"}}),fv=!1;function Wke(){var e=h.exports.useState(fv),t=e[0],n=e[1];return h.exports.useEffect(function(){n(!0),fv=!0},[]),t||fv}function Yke(e){var t=e.categoryConfig,n=ez(),a=n[0],r=Wke(),i=gSe(),o=Cf(),c=h.exports.useMemo(function(){var d;return(d=Az(i))!=null?d:[]},[a,i]),l=Jc();return r?h.exports.createElement(Pz,{categoryConfig:t,hiddenOnSearch:!0,hidden:c.length===0},c.map(function(d){var u=Uu(d.original);return u?h.exports.createElement(Tx,{showVariations:!1,unified:d.unified,emojiStyle:l,emoji:u,key:d.unified,getEmojiUrl:o}):null})):null}function Gke(){var e=qj(),t=h.exports.useRef(0);return h.exports.createElement("ul",{className:mn(Zke.emojiList)},e.map(function(n){var a=Y5(n);return a===Xt.SUGGESTED?h.exports.createElement(Yke,{key:a,categoryConfig:n}):h.exports.createElement(qke,{key:a,category:a,categoryConfig:n,renderdCategoriesCountRef:t})}))}function qke(e){var t=e.category,n=e.categoryConfig,a=e.renderdCategoriesCountRef,r=Vke(),i=bSe(),o=Jc(),c=MSe(),l=Q5(),d=l[0],u=CSe(),g=Cf(),y=!Gj(),w=!c&&a.current>0?[]:q5e(t);w.length>0&&a.current++;var v=0,S=w.map(function(m){var p=Sr(m,d),b=r(m),x=b.failedToLoad,k=b.filteredOut,N=b.hidden,_=u(m);return(N||_)&&v++,_?null:h.exports.createElement(Tx,{showVariations:y,key:p,emoji:m,unified:p,hidden:x,hiddenOnSearch:k,emojiStyle:o,lazyLoad:i,getEmojiUrl:g})});return h.exports.createElement(Pz,{categoryConfig:n,hidden:v===S.length},S)}var Zke=ra.create({emojiList:{".":tn.emojiList,listStyle:"none",margin:"0",padding:"0"}}),Qke="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI1MHB4IgoJIGhlaWdodD0iMTVweCIgdmlld0JveD0iMCAwIDUwIDE1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA1MCAxNSIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxnIGlkPSJMYXllcl8xIj4KPC9nPgo8ZyBpZD0iTGF5ZXJfMiI+Cgk8cGF0aCBmaWxsPSIjRkZGRkZGIiBzdHJva2U9IiNFOEU3RTciIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEuODYtMC40M2w5LjgzLDExLjUzYzAuNTksMC42OSwxLjU2LDAuNjksMi4xNCwwbDkuODMtMTEuNTMiLz4KCTxwYXRoIGZpbGw9IiMwMTAyMDIiIHN0cm9rZT0iIzE1MTYxNyIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMjYuODYtMC40M2w5LjgzLDExLjUzYzAuNTksMC42OSwxLjU2LDAuNjksMi4xNCwwbDkuODMtMTEuNTMiLz4KPC9nPgo8L3N2Zz4=",_u;(function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"})(_u||(_u={}));function Jke(){var e=Nx(),t=OSe(),n=Ef(),a=n[0],r=Jc(),i=Xke(t),o=i.getTop,c=i.getMenuDirection,l=sz(),d=Kke(t),u=Cf(),g=ei(e.current),y=Boolean(a&&g&&kf(a)&&g.classList.contains(tn.emojiHasVariations));h.exports.useEffect(function(){!y||kx(t.current)},[t,y,e]);var w,v;return!y&&e.current?l(null):(w=o(),v=d()),h.exports.createElement("div",{ref:t,className:mn(V0.variationPicker,c()===_u.Down&&V0.pointingUp,y&&V0.visible),style:{top:w}},y&&a?[Sr(a)].concat(Th(a)).slice(0,6).map(function(S){return h.exports.createElement(Tx,{key:S,emoji:a,unified:S,emojiStyle:r,showVariations:!1,getEmojiUrl:u})}):null,h.exports.createElement("div",{className:mn(V0.pointer),style:v}))}function Kke(e){var t=Nx();return function(){var a={};if(!e.current)return a;if(t.current){var r=ei(t.current),i=Eke(r);if(!r)return a;a.left=i+(r==null?void 0:r.clientWidth)/2}return a}}function Xke(e){var t=Nx(),n=Rs(),a=_u.Up;return{getMenuDirection:r,getTop:i};function r(){return a}function i(){a=_u.Up;var o=0;if(!e.current)return 0;var c=b8(e.current);if(t.current){var l,d=n.current,u=ei(t.current),g=b8(u);o=wz(u);var y=(l=d==null?void 0:d.scrollTop)!=null?l:0;y>o-c&&(a=_u.Down,o+=g+c)}return o-c}}var V0=ra.create(oa({variationPicker:{".":tn.variationPicker,position:"absolute",right:"15px",left:"15px",padding:"5px",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.2)",borderRadius:"3px",display:"flex",alignItems:"center",justifyContent:"space-around",opacity:"0",visibility:"hidden",pointerEvents:"none",top:"-100%",border:"1px solid var(--epr-picker-border-color)",height:"var(--epr-emoji-variation-picker-height)",zIndex:"var(--epr-skin-variation-picker-z-index)",background:"var(--epr-emoji-variation-picker-bg-color)",transform:"scale(0.9)",transition:"transform 0.1s ease-out, opacity 0.2s ease-out"},visible:{opacity:"1",visibility:"visible",pointerEvents:"all",transform:"scale(1)"},pointingUp:{".":"pointing-up",transformOrigin:"center 0%",transform:"scale(0.9)"},".pointing-up":{pointer:{top:"0",transform:"rotate(180deg) translateY(100%) translateX(18px)"}},pointer:{".":"epr-emoji-pointer",content:"",position:"absolute",width:"25px",height:"15px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"50px 15px",top:"100%",transform:"translateX(-18px)",backgroundImage:"url("+Qke+")"}},Ol("pointer",{backgroundPosition:"-25px 0"})));function eCe(){var e=Rs();return Uke(e),Oz(e,Mp.PICKER),YSe(),h.exports.createElement("div",{className:mn(tCe.body,Qc.hiddenOnReactions),ref:e},h.exports.createElement(Jke,null),h.exports.createElement(Gke,null))}var tCe=ra.create({body:{".":tn.scrollBody,flex:"1",overflowY:"scroll",overflowX:"hidden",position:"relative"}});function nCe(e,t){if(!e||!t)return 0;var n=e.getBoundingClientRect(),a=t.getBoundingClientRect();return a.height-(n.y-a.y)}function aCe(e,t){var n=Rs(),a=cz(),r=lz();h.exports.useEffect(function(){if(!e)return;var i=n.current;i==null||i.addEventListener("keydown",l,{passive:!0}),i==null||i.addEventListener("mouseover",d,!0),i==null||i.addEventListener("focus",o,!0),i==null||i.addEventListener("mouseout",c,{passive:!0}),i==null||i.addEventListener("blur",c,!0);function o(u){var g=ei(u.target);if(!g)return c();var y=kz(g),w=y.unified,v=y.originalUnified;if(!w||!v)return c();t({unified:w,originalUnified:v})}function c(u){if(u){var g=u.relatedTarget;if(!ei(g))return t(null)}t(null)}function l(u){u.key==="Escape"&&t(null)}function d(u){if(!a()){var g=ei(u.target);if(g){var y=nCe(g,i),w=g.getBoundingClientRect().height;if(y<w)return rCe(g,t);us(g)}}}return function(){i==null||i.removeEventListener("mouseover",d),i==null||i.removeEventListener("mouseout",c),i==null||i.removeEventListener("focus",o,!0),i==null||i.removeEventListener("blur",c,!0),i==null||i.removeEventListener("keydown",l)}},[n,e,t,a,r])}function rCe(e,t){var n,a=kz(e),r=a.unified,i=a.originalUnified;!r||!i||((n=document.activeElement)==null||n.blur==null||n.blur(),t({unified:r,originalUnified:i}))}var W0,Ip;(function(e){e.ROW="FlexRow",e.COLUMN="FlexColumn"})(Ip||(Ip={}));function Rz(e){var t=e.children,n=e.className,a=e.style,r=a===void 0?{}:a,i=e.direction,o=i===void 0?Ip.ROW:i;return h.exports.createElement("div",{style:oa({},r),className:mn(N8.flex,n,N8[o])},t)}var N8=ra.create((W0={flex:{display:"flex"}},W0[Ip.ROW]={flexDirection:"row"},W0[Ip.COLUMN]={flexDirection:"column"},W0));function sCe(e){var t=e.className,n=e.style,a=n===void 0?{}:n;return h.exports.createElement("div",{style:oa({flex:1},a),className:mn(t)})}function iCe(e){var t=e.children,n=e.className,a=e.style;return h.exports.createElement("div",{style:oa({},a,{position:"absolute"}),className:n},t)}function Lx(e){var t=e.children,n=e.className,a=e.style;return h.exports.createElement("div",{style:oa({},a,{position:"relative"}),className:n},t)}function oCe(e){var t=e.isOpen,n=e.onClick,a=e.isActive,r=e.skinToneVariation,i=e.style;return h.exports.createElement(Mh,{style:i,onClick:n,className:mn("epr-tone-"+r,mv.tone,!t&&mv.closedTone,a&&mv.active),tabIndex:t?0:-1,"aria-pressed":a,"aria-label":"Skin tone "+W5e[r]})}var mv=ra.create({closedTone:{opacity:"0",zIndex:"0"},active:{".":"epr-active",zIndex:"1",opacity:"1"},tone:{".":"epr-tone",":hover":{boxShadow:"0 0 0 3px var(--epr-active-skin-hover-color)"},":focus":{boxShadow:"0 0 0 3px var(--epr-focus-bg-color)"},"&.epr-tone-neutral":{backgroundColor:"#ffd225"},"&.epr-tone-1f3fb":{backgroundColor:"#ffdfbd"},"&.epr-tone-1f3fc":{backgroundColor:"#e9c197"},"&.epr-tone-1f3fd":{backgroundColor:"#c88e62"},"&.epr-tone-1f3fe":{backgroundColor:"#a86637"},"&.epr-tone-1f3ff":{backgroundColor:"#60463a"}}}),_m=28;function lCe(){return h.exports.createElement(Lx,{style:{height:_m}},h.exports.createElement(iCe,{style:{bottom:0,right:0}},h.exports.createElement(jz,{direction:Op.VERTICAL})))}function jz(e){var t=e.direction,n=t===void 0?Op.HORIZONTAL:t,a=J5(),r=Gj(),i=Lh(),o=i[0],c=i[1],l=Q5(),d=l[0],u=l[1],g=pSe(),y=Kc(),w=Xc();if(r)return null;var v=_m*tb.length+"px",S=o?v:_m+"px",m=n===Op.VERTICAL;return h.exports.createElement(Lx,{className:mn(um.skinTones,m&&um.vertical,o&&um.open,m&&o&&um.verticalShadow),style:m?{flexBasis:S,height:S}:{flexBasis:S}},h.exports.createElement("div",{className:mn(um.select),ref:a},tb.map(function(p,b){var x=p===d;return h.exports.createElement(oCe,{key:p,skinToneVariation:p,isOpen:o,style:{transform:mn(m?"translateY(-"+b*(o?_m:0)+"px)":"translateX(-"+b*(o?_m:0)+"px)",o&&x&&"scale(1.3)")},isActive:x,onClick:function(){o?(u(p),g(p),w()):c(!0),y()}})})))}var Op;(function(e){e.VERTICAL="epr-vertical",e.HORIZONTAL="epr-horizontal"})(Op||(Op={}));var um=ra.create({skinTones:{".":"epr-skin-tones","--":{"--epr-skin-tone-size":"15px"},display:"flex",alignItems:"center",justifyContent:"flex-end",transition:"all 0.3s ease-in-out",padding:"10px 0"},vertical:{padding:"9px",alignItems:"flex-end",flexDirection:"column",borderRadius:"6px",border:"1px solid var(--epr-bg-color)"},verticalShadow:{boxShadow:"0px 0 7px var(--epr-picker-border-color)"},open:{backdropFilter:"blur(5px)",background:"var(--epr-skin-tone-picker-menu-color)",".epr-active:after":{content:"",position:"absolute",top:"-2px",left:"-2px",right:"-2px",bottom:"-2px",borderRadius:"5px",border:"1px solid var(--epr-active-skin-tone-indicator-border-color)"}},select:{".":"epr-skin-tone-select",position:"relative",width:"var(--epr-skin-tone-size)",height:"var(--epr-skin-tone-size)","> button":{width:"var(--epr-skin-tone-size)",display:"block",cursor:"pointer",borderRadius:"4px",height:"var(--epr-skin-tone-size)",position:"absolute",right:"0",transition:"transform 0.3s ease-in-out, opacity 0.35s ease-in-out",zIndex:"0",boxShadow:"0 0 0 0px var(--epr-active-skin-hover-color)"}}});function cCe(){var e=Zj(),t=mz();return e.showPreview?h.exports.createElement(Rz,{className:mn(Ag.preview,Qc.hiddenOnReactions)},h.exports.createElement(dCe,null),h.exports.createElement(sCe,null),t?h.exports.createElement(lCe,null):null):null}function dCe(){var e,t=Zj(),n=h.exports.useState(null),a=n[0],r=n[1],i=Jc(),o=Ef(),c=o[0],l=Cf();aCe(t.showPreview,r);var d=Uu((e=a==null?void 0:a.unified)!=null?e:a==null?void 0:a.originalUnified),u=d!=null&&a!=null;return h.exports.createElement(g,null);function g(){var y=c!=null?c:Uu(t.defaultEmoji);if(!y)return null;var w=c?l_(c):t.defaultCaption;return h.exports.createElement(h.exports.Fragment,null,h.exports.createElement("div",null,u?h.exports.createElement(d_,{unified:a==null?void 0:a.unified,emoji:d,emojiStyle:i,size:45,getEmojiUrl:l,className:mn(Ag.emoji)}):y?h.exports.createElement(d_,{unified:Sr(y),emoji:y,emojiStyle:i,size:45,getEmojiUrl:l,className:mn(Ag.emoji)}):null),h.exports.createElement("div",{className:mn(Ag.label)},u?l_(d):w))}}var Ag=ra.create({preview:{alignItems:"center",borderTop:"1px solid var(--epr-preview-border-color)",height:"var(--epr-preview-height)",padding:"0 var(--epr-horizontal-padding)",position:"relative",zIndex:"var(--epr-preview-z-index)"},label:{color:"var(--epr-preview-text-color)",fontSize:"var(--epr-preview-text-size)",padding:"var(--epr-preview-text-padding)",textTransform:"capitalize"},emoji:{padding:"0"}});function uCe(e){var t;return(t=e==null?void 0:e.getAttribute("data-name"))!=null?t:null}function fCe(e){var t=Rs();h.exports.useEffect(function(){var n=new Map,a=t.current,r=new IntersectionObserver(function(i){if(!!a){for(var o=k5e(i),c;!(c=o()).done;){var l=c.value,d=uCe(l.target);n.set(d,l.intersectionRatio)}var u=Array.from(n),g=u[u.length-1];if(g[1]==1)return e(g[0]);for(var y=0,w=u;y<w.length;y++){var v=w[y],S=v[0],m=v[1];if(m){e(S);break}}}},{threshold:[0,1]});a==null||a.querySelectorAll(dr(tn.category)).forEach(function(i){r.observe(i)})},[t,e])}function mCe(){var e=Rs(),t=Dh();return function(a){var r;if(!!e.current){var i=(r=e.current)==null?void 0:r.querySelector('[data-name="'+a+'"]');if(!!i){var o=i.offsetTop||0;iz(t.current,o)}}}}function pCe(){var e=uSe();return e?e.length===0:!1}var hCe="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMDBweCIgaGVpZ2h0PSI4MHB4IiB2aWV3Qm94PSIwIDAgMjAwIDgwIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMDAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8ZyBpZD0iTGF5ZXJfMTEiPgoJPGc+CgkJPHBhdGggZmlsbD0iIzMzNzFCNyIgc3Ryb2tlPSIjMzM3MUI3IiBzdHJva2Utd2lkdGg9IjAuMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTIuOCwyOS41YzAuNiwwLDEuMS0wLjUsMS4xLTEuMQoJCQljMC0wLjYtMC41LTEuMi0xLjEtMS4yYy0wLjYsMC0xLjIsMC41LTEuMiwxLjJDMTEuNiwyOSwxMi4yLDI5LjUsMTIuOCwyOS41eiBNMTIuOCwyOGMwLjIsMCwwLjQsMC4yLDAuNCwwLjQKCQkJYzAsMC4yLTAuMiwwLjQtMC40LDAuNGMtMC4yLDAtMC40LTAuMi0wLjQtMC40QzEyLjQsMjguMSwxMi42LDI4LDEyLjgsMjh6Ii8+CgkJPHBhdGggZmlsbD0iIzMzNzFCNyIgc3Ryb2tlPSIjMzM3MUI3IiBzdHJva2Utd2lkdGg9IjAuMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTAsMjNjLTMuOCwwLTcsMy4xLTcsN2MwLDMuOCwzLjEsNyw3LDcKCQkJczctMy4xLDctN0MxNywyNi4yLDEzLjgsMjMsMTAsMjN6IE0xMCwzNi4yYy0zLjQsMC02LjItMi44LTYuMi02LjJjMC0zLjQsMi44LTYuMiw2LjItNi4yczYuMiwyLjgsNi4yLDYuMgoJCQlDMTYuMiwzMy40LDEzLjQsMzYuMiwxMCwzNi4yeiIvPgoJCTxwYXRoIGZpbGw9IiMzMzcxQjciIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTE0LjYsMzEuMmMtMC4xLTAuMS0wLjItMC4yLTAuMy0wLjJINS43CgkJCWMtMC4xLDAtMC4yLDAuMS0wLjMsMC4yYy0wLjEsMC4xLTAuMSwwLjIsMCwwLjRjMC43LDIsMi41LDMuMyw0LjYsMy4zczMuOS0xLjMsNC42LTMuM0MxNC43LDMxLjUsMTQuNywzMS4zLDE0LjYsMzEuMnogTTEwLDM0LjEKCQkJYy0xLjYsMC0zLTAuOS0zLjctMi4yaDcuM0MxMywzMy4yLDExLjYsMzQuMSwxMCwzNC4xeiIvPgoJCTxwYXRoIGZpbGw9IiMzMzcxQjciIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTcuMiwyOS41YzAuNiwwLDEuMi0wLjUsMS4yLTEuMQoJCQljMC0wLjYtMC41LTEuMi0xLjItMS4yYy0wLjYsMC0xLjEsMC41LTEuMSwxLjJDNi4xLDI5LDYuNiwyOS41LDcuMiwyOS41eiBNNy4yLDI4YzAuMiwwLDAuNCwwLjIsMC40LDAuNGMwLDAuMi0wLjIsMC40LTAuNCwwLjQKCQkJYy0wLjIsMC0wLjQtMC4yLTAuNC0wLjRDNi44LDI4LjEsNywyOCw3LjIsMjh6Ii8+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBkPSJNNjQuMSwzMy40bDIuMywwYzAuMiwwLDAuNCwwLjIsMC40LDAuNHYyLjFjMCwwLjItMC4yLDAuNC0wLjQsMC40aC0yLjMKCQkJCWMtMC4yLDAtMC40LTAuMi0wLjQtMC40di0yLjFDNjMuNywzMy42LDYzLjgsMzMuNCw2NC4xLDMzLjR6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgZD0iTTczLjUsMzMuNWgyLjRjMC4yLDAsMC40LDAuMiwwLjQsMC40djJjMCwwLjItMC4yLDAuNC0wLjQsMC40aC0yLjQKCQkJCWMtMC4yLDAtMC40LTAuMi0wLjQtMC40bDAtMkM3My4xLDMzLjYsNzMuMywzMy41LDczLjUsMzMuNXoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBkPSJNNjMuNywyOC40aDEyLjZ2NUg2My43VjI4LjR6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgZD0iTTY1LjUsMjMuNmg4LjljMSwwLDEuOSwwLjgsMS45LDEuOXYzLjFINjMuN3YtMy4xQzYzLjcsMjQuNSw2NC41LDIzLjYsNjUuNSwyMy42eiIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjMzM3MUI3IiBjeD0iNjYuMiIgY3k9IjMwLjkiIHJ4PSIwLjkiIHJ5PSIxIi8+CgkJCTxlbGxpcHNlIGZpbGw9IiMzMzcxQjciIGN4PSI3My44IiBjeT0iMzAuOSIgcng9IjAuOSIgcnk9IjEiLz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBkPSJNOTYuNCwzMGMwLDMuNi0yLjksNi41LTYuNCw2LjVzLTYuNC0yLjktNi40LTYuNXMyLjktNi41LDYuNC02LjVTOTYuNCwyNi40LDk2LjQsMzB6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgZD0iTTk2LjMsMjguNmMwLDAsMCwwLjEsMCwwLjFjLTAuOSwwLjEtMi45LDAuMS00LjYtMS4xYy0xLjEtMC44LTItMS43LTIuNi0yLjUKCQkJCWMtMC4zLTAuNC0wLjYtMC44LTAuNy0xYy0wLjEtMC4xLTAuMS0wLjEtMC4xLTAuMmMwLjUtMC4xLDEuMi0wLjIsMi0wLjFjMS4yLDAsMi41LDAuMywzLjUsMS4xYzEsMC44LDEuNywxLjgsMi4xLDIuOAoJCQkJQzk2LjEsMjcuOSw5Ni4yLDI4LjMsOTYuMywyOC42eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik04NCwzMi4yYzAsMCwwLTAuMSwwLTAuMWMwLjktMC4yLDIuOS0wLjQsNC43LDAuNmMxLjEsMC43LDEuOSwxLjUsMi40LDIuMwoJCQkJYzAuNCwwLjUsMC42LDEsMC43LDEuM2MtMC40LDAuMS0xLDAuMi0xLjcsMC4zYy0xLDAtMi4xLTAuMS0zLjItMC44cy0xLjktMS42LTIuNC0yLjVDODQuMiwzMi44LDg0LjEsMzIuNSw4NCwzMi4yeiIvPgoJCTwvZz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTExNi4zLDI2LjhsLTEuNCwybC0wLjgtMC44bC0wLjYtMC42bDAsMC45bC0wLjEsOC4yaC02LjgKCQkJCWwtMC4xLTguMmwwLTAuOWwtMC42LDAuNmwtMC44LDAuOGwtMS40LTJsMi42LTIuOWMwLjEtMC4xLDAuMi0wLjEsMC4zLTAuMWgxLjNsMC40LDAuN2MwLjcsMS4zLDIuNiwxLjMsMy4zLTAuMWwwLjMtMC42aDEuMgoJCQkJYzAuMSwwLDAuMiwwLDAuMywwLjFsMC4zLTAuM2wtMC4zLDAuM0wxMTYuMywyNi44eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik0xMTAuMSwyNy43aDJ2MC45YzAsMC40LTAuNCwwLjctMSwwLjdjLTAuNiwwLTEtMC4zLTEtMC43TDExMC4xLDI3LjdMMTEwLjEsMjcuN3oiLz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBkPSJNMTI2LjgsMzQuM2MwLDEuMi0xLDIuMi0yLjIsMi4ycy0yLjItMS0yLjItMi4yczEtMi4yLDIuMi0yLjJTMTI2LjgsMzMuMSwxMjYuOCwzNC4zeiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik0xMzcuNiwzNC4zYzAsMS4yLTEsMi4yLTIuMiwyLjJjLTEuMiwwLTIuMi0xLTIuMi0yLjJzMS0yLjIsMi4yLTIuMgoJCQkJQzEzNi42LDMyLjEsMTM3LjYsMzMuMSwxMzcuNiwzNC4zeiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik0xMjYuOCwyNC40djkuOSIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik0xMzcuNywyNC40djkuOSIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIGQ9Ik0xMjYuOCwyMy41aDEwLjh2Mi43aC0xMC44QzEyNi44LDI2LjIsMTI2LjgsMjMuNSwxMjYuOCwyMy41eiIvPgoJCTwvZz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSIjMzM3MUI3IiBkPSJNMTcwLjgsMjMuMUwxNzAuOCwyMy4xYy0wLjMsMC0wLjUsMC0wLjgsMGMtMi4xLDAtNCwxLTUuMywyLjVsLTAuMSwwbC0wLjEtMC4xbC0xLTEuMmwtMC4zLDMuNGwzLjQsMC4zCgkJCQlsLTEuMS0xLjNsLTAuMS0wLjFsMC4xLTAuMWMxLjEtMS41LDMtMi4zLDUtMi4xbDAsMGMzLjIsMC4zLDUuNSwzLjEsNS4yLDYuM2MtMC4zLDMtMy4xLDUuMy02LjEsNS4xYy0zLjEtMC4yLTUuNC0yLjktNS4zLTYKCQkJCWwtMS4zLTAuMWMtMC4yLDMuOCwyLjYsNy4xLDYuMyw3LjRjMy45LDAuMyw3LjMtMi42LDcuNi02LjVDMTc3LjIsMjYuOCwxNzQuNCwyMy41LDE3MC44LDIzLjF6Ii8+CgkJCTxwYXRoIGZpbGw9IiMzMzcxQjciIGQ9Ik0xNzAuMywyNy40YzAtMC4zLTAuMy0wLjYtMC42LTAuNnMtMC42LDAuMy0wLjYsMC42djMuMmMwLDAuMiwwLjEsMC4zLDAuMiwwLjRjMC4xLDAuMSwwLjMsMC4yLDAuNCwwLjIKCQkJCWgyLjRjMC40LDAsMC42LTAuMywwLjYtMC42YzAtMC40LTAuMy0wLjYtMC42LTAuNmgtMS42aC0wLjJ2LTAuMkwxNzAuMywyNy40TDE3MC4zLDI3LjR6Ii8+CgkJPC9nPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgZD0iTTE4Ni4yLDIzLjRoNy43YzEuNSwwLDIuNywxLjIsMi43LDIuN3Y3LjdjMCwxLjUtMS4yLDIuNy0yLjcsMi43aC03LjcKCQkJCWMtMS41LDAtMi43LTEuMi0yLjctMi43di03LjdDMTgzLjQsMjQuNiwxODQuNywyMy40LDE4Ni4yLDIzLjR6Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiMzMzcxQjciIGN4PSIxODYiIGN5PSIyOC45IiByeD0iMC43IiByeT0iMC43Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiMzMzcxQjciIGN4PSIxOTQiIGN5PSIyNi43IiByeD0iMC43IiByeT0iMC43Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMTg2LDMzLjNsMC40LTAuM2MwLjQtMC4zLDEtMC4zLDEuNS0wLjFsMSwwLjQKCQkJCWMwLjUsMC4yLDEsMC4yLDEuNS0wLjFsMC44LTAuNWMwLjQtMC4zLDEtMC4zLDEuNS0wLjFsMS44LDAuOCIvPgoJCTwvZz4KCTwvZz4KCTxwYXRoIGZpbGw9IiMzMzcxQjciIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLXdpZHRoPSIwLjI1IiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0xNTYsMjQuM2MtMC4yLTAuMS0wLjQtMC4xLTAuNSwwCgkJYzAsMC0wLjIsMC4xLTAuOSwwLjJjLTAuNywwLTIuNC0wLjEtMy44LTAuNmMtMC44LTAuMy0xLjctMC41LTIuNS0wLjVjLTAuMiwwLTAuNCwwLTAuNSwwYy0xLjMsMC0yLjUsMC4zLTMuNiwxCgkJYy0wLjIsMC4xLTAuMiwwLjItMC4yLDAuNHYxMS42YzAsMC4zLDAuMSwwLjUsMC4zLDAuNWMwLjYsMCwwLjUtMC40LDAuNS0wLjZ2LTUuN2MwLjctMC4zLDMuMi0xLjEsNS44LTAuMQoJCWMxLjYsMC42LDMuNSwwLjcsNC4zLDAuN2MwLjgsMCwxLjMtMC4zLDEuMy0wLjNjMC4yLTAuMSwwLjMtMC4yLDAuMy0wLjR2LTUuN0MxNTYuMiwyNC42LDE1Ni4xLDI0LjQsMTU2LDI0LjN6IE0xNTUuNiwzMC4yCgkJYy0wLjEsMC0wLjcsMC4xLTEsMC4xYy0wLjcsMC0yLjQtMC4xLTMuOC0wLjZjLTIuNS0xLTUtMC41LTYuMi0wLjF2LTQuOWMwLjktMC41LDIuMi0wLjcsMy4yLTAuN2MwLjEsMCwwLjMsMCwwLjQsMAoJCWMwLjcsMCwxLjUsMC4yLDIuMiwwLjRjMS42LDAuNiwzLjUsMC43LDQuMywwLjdjMC4yLDAsMC44LDAsMS0wLjFWMzAuMnoiLz4KCTxnPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgZD0iTTQ4LjEsMjMuNWgzLjdjMi41LDAsNC41LDIsNC41LDQuNWMwLDAuNS0wLjQsMC45LTAuOSwwLjlINDQuNWMtMC41LDAtMC45LTAuNC0wLjktMC45CgkJCUM0My42LDI1LjUsNDUuNiwyMy41LDQ4LjEsMjMuNXoiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTQzLjUsMjguOGMtMC4yLDAuMS0wLjUsMS4yLDAsMS41YzEuNCwxLDguNSwwLjgsMTEuMywwLjYKCQkJYzAuOC0wLjEsMS42LTAuNCwxLjctMS4yYzAtMC4zLTAuMS0wLjYtMC42LTAuOSIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSwzMC42TDQzLjMsMzFjLTAuMiwwLjUsMC4yLDEsMC43LDAuOWMwLjMtMC4xLDAuNSwwLDAuNywwLjMKCQkJbDAuMSwwLjJjMC4zLDAuNSwxLDAuNiwxLjUsMC4ybDAsMGMwLjMtMC4yLDAuNy0wLjMsMS0wLjJsMC44LDAuM2MwLjQsMC4yLDAuOCwwLjEsMS4yLDBsMC41LTAuMmMwLjQtMC4yLDAuOS0wLjIsMS4zLDBsMC41LDAuMgoJCQljMC40LDAuMiwwLjgsMC4yLDEuMiwwbDAuMi0wLjFjMC4zLTAuMiwwLjgtMC4yLDEuMSwwLjFsMC4yLDAuMmMwLjMsMC4zLDAuOCwwLjIsMS0wLjJsMC4xLTAuMmMwLjEtMC4yLDAtMC4zLDAuMi0wLjMKCQkJYzAuNSwwLDEuMi0wLjMsMS4xLTAuN2wtMC40LTEuMSIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSwzMi4yYy0wLjEsMC4yLTAuMywwLjgsMCwxLjFjMC4zLDAuNCwzLDEuMSw2LjQsMS4xCgkJCWMyLjIsMCw0LjYtMC4zLDYtMC42YzAuNS0wLjEsMC45LTAuNSwwLjgtMC45YzAtMC4yLTAuMi0wLjUtMC40LTAuNyIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSwzMy4zYzAsMC41LDAuNiwyLjMsMS4zLDIuN2MxLjgsMC44LDUuNywwLjcsOC4xLDAuNQoJCQljMS4zLTAuMSwyLjUtMC43LDMuMi0xLjhjMC4zLTAuNSwwLjUtMSwwLjUtMS40Ii8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjUxLjYiIGN5PSIyNi41IiByeD0iMC4zIiByeT0iMC40Ii8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjUzIiBjeT0iMjUiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjMzM3MUI3IiBjeD0iNTMiIGN5PSIyNy4yIiByeD0iMC4zIiByeT0iMC40Ii8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjU0LjMiIGN5PSIyNi41IiByeD0iMC4zIiByeT0iMC40Ii8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjUwLjkiIGN5PSIyNSIgcng9IjAuMyIgcnk9IjAuNCIvPgoJPC9nPgoJPGc+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBkPSJNMjQuMiwzMXYtNy42YzAuMSwwLjEsMC44LDAuOSwyLjgsMy4xYzIuNS0xLjYsNS42LTAuNyw2LjksMGwyLjQtMy4xdjcuMQoJCQljMCwxLjItMC4xLDIuNS0wLjksMy40Yy0xLDEuMi0yLjcsMi41LTUuMywyLjVjLTIuOSwwLTQuNS0xLjUtNS4zLTIuOUMyNC4yLDMyLjksMjQuMiwzMiwyNC4yLDMxeiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMjEuMiwzMGw1LjQsMS4yIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMzM3MUI3IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0yMS4yLDM0LjFsNS40LTEuMiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzguOCwzMGwtNS40LDEuMiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzMzNzFCNyIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzguOCwzNC4xbC01LjQtMS4yIi8+CgkJPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiMzMzcxQjciIGQ9Ik0yOS41LDMyLjRMMjksMzEuN2MtMC4yLTAuMywwLTAuNiwwLjMtMC42aDEuNAoJCQljMC4zLDAsMC41LDAuNCwwLjMsMC42bC0wLjcsMWwwLDBjLTAuNywxLjItMi42LDEuMS0zLjEtMC4zbC0wLjEtMC4yYy0wLjEtMC4yLDAtMC40LDAuMi0wLjVzMC40LDAsMC41LDAuMmwwLjEsMC4yCgkJCUMyOC4zLDMyLjgsMjkuMSwzMi45LDI5LjUsMzIuNHoiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiMzMzcxQjciIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTMyLjQsMzIuMWwtMC4xLDAuMmMtMC40LDEtMS44LDEuMS0yLjMsMC4yIi8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjI3LjYiIGN5PSIyOS43IiByeD0iMC43IiByeT0iMC43Ii8+CgkJPGVsbGlwc2UgZmlsbD0iIzMzNzFCNyIgY3g9IjMyLjQiIGN5PSIyOS43IiByeD0iMC43IiByeT0iMC43Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBmaWxsPSIjQzBDMEJGIiBzdHJva2U9IiNDMEMwQkYiIHN0cm9rZS13aWR0aD0iMC4xIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0xMi44LDQ5LjVjMC42LDAsMS4xLTAuNSwxLjEtMS4xCgkJCWMwLTAuNi0wLjUtMS4yLTEuMS0xLjJjLTAuNiwwLTEuMiwwLjUtMS4yLDEuMkMxMS42LDQ5LDEyLjIsNDkuNSwxMi44LDQ5LjV6IE0xMi44LDQ4YzAuMiwwLDAuNCwwLjIsMC40LDAuNAoJCQljMCwwLjItMC4yLDAuNC0wLjQsMC40Yy0wLjIsMC0wLjQtMC4yLTAuNC0wLjRDMTIuNCw0OC4xLDEyLjYsNDgsMTIuOCw0OHoiLz4KCQk8cGF0aCBmaWxsPSIjQzBDMEJGIiBzdHJva2U9IiNDMEMwQkYiIHN0cm9rZS13aWR0aD0iMC4xIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik0xNC42LDUxLjJjLTAuMS0wLjEtMC4yLTAuMi0wLjMtMC4ySDUuNwoJCQljLTAuMSwwLTAuMiwwLjEtMC4zLDAuMmMtMC4xLDAuMS0wLjEsMC4yLDAsMC40YzAuNywyLDIuNSwzLjMsNC42LDMuM3MzLjktMS4zLDQuNi0zLjNDMTQuNyw1MS41LDE0LjcsNTEuMywxNC42LDUxLjJ6IE0xMCw1NC4xCgkJCWMtMS42LDAtMy0wLjktMy43LTIuMmg3LjNDMTMsNTMuMiwxMS42LDU0LjEsMTAsNTQuMXoiLz4KCQk8cGF0aCBmaWxsPSIjQzBDMEJGIiBzdHJva2U9IiNDMEMwQkYiIHN0cm9rZS13aWR0aD0iMC4xIiBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiIGQ9Ik03LjIsNDkuNWMwLjYsMCwxLjItMC41LDEuMi0xLjEKCQkJYzAtMC42LTAuNS0xLjItMS4yLTEuMmMtMC42LDAtMS4xLDAuNS0xLjEsMS4yQzYuMSw0OSw2LjYsNDkuNSw3LjIsNDkuNXogTTcuMiw0OGMwLjIsMCwwLjQsMC4yLDAuNCwwLjRjMCwwLjItMC4yLDAuNC0wLjQsMC40CgkJCWMtMC4yLDAtMC40LTAuMi0wLjQtMC40QzYuOCw0OC4xLDcsNDgsNy4yLDQ4eiIvPgoJCTxwYXRoIGZpbGw9IiNDMEMwQkYiIHN0cm9rZT0iI0MwQzBCRiIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEwLDQzYy0zLjgsMC03LDMuMS03LDdjMCwzLjgsMy4xLDcsNyw3CgkJCXM3LTMuMSw3LTdDMTcsNDYuMiwxMy44LDQzLDEwLDQzeiBNMTAsNTYuMmMtMy40LDAtNi4yLTIuOC02LjItNi4yYzAtMy40LDIuOC02LjIsNi4yLTYuMnM2LjIsMi44LDYuMiw2LjIKCQkJQzE2LjIsNTMuNCwxMy40LDU2LjIsMTAsNTYuMnoiLz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIGQ9Ik02NC4xLDUzLjRsMi4zLDBjMC4yLDAsMC40LDAuMiwwLjQsMC40djIuMWMwLDAuMi0wLjIsMC40LTAuNCwwLjRoLTIuMwoJCQkJYy0wLjIsMC0wLjQtMC4yLTAuNC0wLjR2LTIuMUM2My43LDUzLjYsNjMuOCw1My40LDY0LjEsNTMuNHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBkPSJNNzMuNSw1My41aDIuNGMwLjIsMCwwLjQsMC4yLDAuNCwwLjR2MmMwLDAuMi0wLjIsMC40LTAuNCwwLjRoLTIuNAoJCQkJYy0wLjIsMC0wLjQtMC4yLTAuNC0wLjRsMC0yQzczLjEsNTMuNiw3My4zLDUzLjUsNzMuNSw1My41eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIGQ9Ik02My43LDQ4LjRoMTIuNnY1SDYzLjdWNDguNHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBkPSJNNjUuNSw0My42aDguOWMxLDAsMS45LDAuOCwxLjksMS45djMuMUg2My43di0zLjFDNjMuNyw0NC41LDY0LjUsNDMuNiw2NS41LDQzLjZ6Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiNDMEMwQkYiIGN4PSI2Ni4yIiBjeT0iNTAuOSIgcng9IjAuOSIgcnk9IjEiLz4KCQkJPGVsbGlwc2UgZmlsbD0iI0MwQzBCRiIgY3g9IjczLjgiIGN5PSI1MC45IiByeD0iMC45IiByeT0iMSIvPgoJCTwvZz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIGQ9Ik05Ni40LDUwYzAsMy42LTIuOSw2LjUtNi40LDYuNXMtNi40LTIuOS02LjQtNi41czIuOS02LjUsNi40LTYuNVM5Ni40LDQ2LjQsOTYuNCw1MHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBkPSJNOTYuMyw0OC42YzAsMCwwLDAuMSwwLDAuMWMtMC45LDAuMS0yLjksMC4xLTQuNi0xLjJjLTEuMS0wLjgtMi0xLjctMi42LTIuNQoJCQkJYy0wLjMtMC40LTAuNi0wLjgtMC43LTFjLTAuMS0wLjEtMC4xLTAuMi0wLjEtMC4yYzAuNS0wLjEsMS4yLTAuMiwyLTAuMmMxLjIsMCwyLjUsMC4zLDMuNSwxLjFjMSwwLjgsMS43LDEuOCwyLjEsMi44CgkJCQlDOTYuMSw0Ny45LDk2LjIsNDguMyw5Ni4zLDQ4LjZ6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTg0LDUyLjJjMCwwLDAtMC4xLDAtMC4xYzAuOS0wLjIsMi45LTAuNCw0LjcsMC42YzEuMSwwLjcsMS45LDEuNSwyLjQsMi4zCgkJCQljMC40LDAuNSwwLjYsMSwwLjcsMS4zYy0wLjQsMC4xLTEsMC4yLTEuNywwLjNjLTEsMC0yLjEtMC4xLTMuMi0wLjhzLTEuOS0xLjYtMi40LTIuNUM4NC4yLDUyLjgsODQuMSw1Mi41LDg0LDUyLjJ6Ii8+CgkJPC9nPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMTE2LjMsNDYuOGwtMS40LDJsLTAuOC0wLjhsLTAuNi0wLjdsMCwwLjlsLTAuMSw4LjJoLTYuOAoJCQkJbC0wLjEtOC4ybDAtMC45bC0wLjYsMC43bC0wLjgsMC44bC0xLjQtMmwyLjYtMi45YzAuMS0wLjEsMC4yLTAuMSwwLjMtMC4xaDEuM2wwLjQsMC43YzAuNywxLjMsMi42LDEuMywzLjMtMC4xbDAuMy0wLjZoMS4yCgkJCQljMC4xLDAsMC4yLDAsMC4zLDAuMWwwLjMtMC4zbC0wLjMsMC4zTDExNi4zLDQ2Ljh6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTExMC4xLDQ3LjdoMnYwLjljMCwwLjQtMC40LDAuNy0xLDAuN2MtMC42LDAtMS0wLjMtMS0wLjdMMTEwLjEsNDcuN0wxMTAuMSw0Ny43eiIvPgoJCTwvZz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIGQ9Ik0xMjYuOCw1NC4zYzAsMS4yLTEsMi4yLTIuMiwyLjJzLTIuMi0xLTIuMi0yLjJzMS0yLjIsMi4yLTIuMlMxMjYuOCw1My4xLDEyNi44LDU0LjN6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTEzNy42LDU0LjNjMCwxLjItMSwyLjItMi4yLDIuMmMtMS4yLDAtMi4yLTEtMi4yLTIuMnMxLTIuMiwyLjItMi4yCgkJCQlDMTM2LjYsNTIuMSwxMzcuNiw1My4xLDEzNy42LDU0LjN6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTEyNi44LDQ0LjR2OS45Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTEzNy43LDQ0LjR2OS45Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgZD0iTTEyNi44LDQzLjVoMTAuOHYyLjdoLTEwLjhDMTI2LjgsNDYuMiwxMjYuOCw0My41LDEyNi44LDQzLjV6Ii8+CgkJPC9nPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9IiNDMEMwQkYiIGQ9Ik0xNzAuOCw0My4xTDE3MC44LDQzLjFjLTAuMywwLTAuNSwwLTAuOCwwYy0yLjEsMC00LDEtNS4zLDIuNWwtMC4xLDBsLTAuMS0wLjFsLTEtMS4ybC0wLjMsMy40bDMuNCwwLjMKCQkJCWwtMS4xLTEuM2wtMC4xLTAuMWwwLjEtMC4xYzEuMS0xLjUsMy0yLjMsNS0yLjFsMCwwYzMuMiwwLjMsNS41LDMuMSw1LjIsNi4zYy0wLjMsMy0zLjEsNS4zLTYuMSw1LjFjLTMuMS0wLjItNS40LTIuOS01LjMtNgoJCQkJbC0xLjMtMC4xYy0wLjIsMy44LDIuNiw3LjEsNi4zLDcuNGMzLjksMC4zLDcuMy0yLjYsNy42LTYuNUMxNzcuMiw0Ni44LDE3NC40LDQzLjUsMTcwLjgsNDMuMXoiLz4KCQkJPHBhdGggZmlsbD0iI0MwQzBCRiIgZD0iTTE3MC4zLDQ3LjRjMC0wLjMtMC4zLTAuNi0wLjYtMC42cy0wLjYsMC4zLTAuNiwwLjZ2My4yYzAsMC4yLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMywwLjIsMC40LDAuMgoJCQkJaDIuNGMwLjQsMCwwLjYtMC4zLDAuNi0wLjZjMC0wLjMtMC4zLTAuNi0wLjYtMC42aC0xLjZoLTAuMnYtMC4yTDE3MC4zLDQ3LjRMMTcwLjMsNDcuNHoiLz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBkPSJNMTg2LjIsNDMuNGg3LjdjMS41LDAsMi43LDEuMiwyLjcsMi43djcuN2MwLDEuNS0xLjIsMi43LTIuNywyLjdoLTcuNwoJCQkJYy0xLjUsMC0yLjctMS4yLTIuNy0yLjd2LTcuN0MxODMuNCw0NC43LDE4NC43LDQzLjQsMTg2LjIsNDMuNHoiLz4KCQkJPGVsbGlwc2UgZmlsbD0iI0MwQzBCRiIgY3g9IjE4NiIgY3k9IjQ4LjkiIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQkJPGVsbGlwc2UgZmlsbD0iI0MwQzBCRiIgY3g9IjE5NCIgY3k9IjQ2LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0xODYsNTMuM2wwLjQtMC4zYzAuNC0wLjMsMS0wLjMsMS41LTAuMWwxLDAuNAoJCQkJYzAuNSwwLjIsMSwwLjIsMS41LTAuMWwwLjgtMC41YzAuNC0wLjMsMS0wLjMsMS41LTAuMWwxLjgsMC44Ii8+CgkJPC9nPgoJPC9nPgoJPHBhdGggZmlsbD0iI0MwQzBCRiIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2Utd2lkdGg9IjAuMjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTE1Niw0NC4zYy0wLjItMC4xLTAuNC0wLjEtMC41LDAKCQljMCwwLTAuMiwwLjEtMC45LDAuMmMtMC43LDAtMi40LTAuMS0zLjgtMC42Yy0wLjgtMC4zLTEuNy0wLjUtMi41LTAuNWMtMC4yLDAtMC40LDAtMC41LDBjLTEuMywwLTIuNSwwLjMtMy42LDEKCQljLTAuMiwwLjEtMC4yLDAuMi0wLjIsMC40djExLjZjMCwwLjMsMC4xLDAuNSwwLjMsMC41YzAuNiwwLDAuNS0wLjQsMC41LTAuNnYtNS43YzAuNy0wLjMsMy4yLTEuMSw1LjgtMC4xCgkJYzEuNiwwLjYsMy41LDAuNyw0LjMsMC43YzAuOCwwLDEuMy0wLjMsMS4zLTAuM2MwLjItMC4xLDAuMy0wLjIsMC4zLTAuNHYtNS43QzE1Ni4yLDQ0LjYsMTU2LjEsNDQuNCwxNTYsNDQuM3ogTTE1NS42LDUwLjIKCQljLTAuMSwwLTAuNywwLjEtMSwwLjFjLTAuNywwLTIuNC0wLjEtMy44LTAuNmMtMi41LTEtNS0wLjUtNi4yLTAuMXYtNC45YzAuOS0wLjUsMi4yLTAuNywzLjItMC43YzAuMSwwLDAuMywwLDAuNCwwCgkJYzAuNywwLDEuNSwwLjIsMi4yLDAuNGMxLjYsMC42LDMuNSwwLjcsNC4zLDAuN2MwLjIsMCwwLjgsMCwxLTAuMVY1MC4yeiIvPgoJPGc+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBkPSJNNDguMSw0My41aDMuN2MyLjUsMCw0LjUsMiw0LjUsNC41YzAsMC41LTAuNCwwLjktMC45LDAuOUg0NC41Yy0wLjUsMC0wLjktMC40LTAuOS0wLjkKCQkJQzQzLjYsNDUuNSw0NS42LDQzLjUsNDguMSw0My41eiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSw0OC44Yy0wLjIsMC4xLTAuNSwxLjIsMCwxLjVjMS40LDEsOC41LDAuOCwxMS4zLDAuNgoJCQljMC44LTAuMSwxLjYtMC40LDEuNy0xLjJjMC0wLjMtMC4xLTAuNi0wLjYtMC45Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDUwLjZMNDMuMyw1MWMtMC4yLDAuNSwwLjIsMSwwLjcsMC45YzAuMy0wLjEsMC41LDAsMC43LDAuMwoJCQlsMC4xLDAuMmMwLjMsMC41LDEsMC42LDEuNSwwLjJsMCwwYzAuMy0wLjIsMC43LTAuMywxLTAuMmwwLjgsMC4zYzAuNCwwLjIsMC44LDAuMSwxLjIsMGwwLjUtMC4yYzAuNC0wLjIsMC45LTAuMiwxLjMsMGwwLjUsMC4yCgkJCWMwLjQsMC4yLDAuOCwwLjIsMS4yLDBsMC4yLTAuMWMwLjMtMC4yLDAuOC0wLjIsMS4xLDAuMWwwLjIsMC4yYzAuMywwLjMsMC44LDAuMiwxLTAuMmwwLjEtMC4yYzAuMS0wLjIsMC0wLjMsMC4yLTAuMwoJCQljMC41LDAsMS4yLTAuMywxLjEtMC43bC0wLjQtMS4xIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDUyLjJjLTAuMSwwLjItMC4zLDAuOCwwLDEuMWMwLjMsMC40LDMsMS4xLDYuNCwxLjEKCQkJYzIuMiwwLDQuNi0wLjMsNi0wLjZjMC41LTAuMSwwLjktMC41LDAuOC0wLjljMC0wLjItMC4yLTAuNS0wLjQtMC43Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDUzLjNjMCwwLjUsMC42LDIuMywxLjMsMi43YzEuOCwwLjgsNS43LDAuNyw4LjEsMC41CgkJCWMxLjMtMC4xLDIuNS0wLjcsMy4yLTEuOGMwLjMtMC41LDAuNS0xLDAuNS0xLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iNTEuNiIgY3k9IjQ2LjUiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iNTMiIGN5PSI0NSIgcng9IjAuMyIgcnk9IjAuNCIvPgoJCTxlbGxpcHNlIGZpbGw9IiNDMEMwQkYiIGN4PSI1MyIgY3k9IjQ3LjIiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iNTQuMyIgY3k9IjQ2LjUiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iNTAuOSIgY3k9IjQ1IiByeD0iMC4zIiByeT0iMC40Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIGQ9Ik0yNC4yLDUxdi03LjZjMC4xLDAuMSwwLjgsMC45LDIuOCwzLjFjMi41LTEuNyw1LjYtMC43LDYuOSwwbDIuNC0zLjF2Ny4xCgkJCWMwLDEuMi0wLjEsMi41LTAuOSwzLjRjLTEsMS4yLTIuNywyLjUtNS4zLDIuNWMtMi45LDAtNC41LTEuNS01LjMtMi45QzI0LjIsNTIuOSwyNC4yLDUyLDI0LjIsNTF6Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0yMS4yLDUwbDUuNCwxLjIiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiNDMEMwQkYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTIxLjIsNTQuMWw1LjQtMS4yIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0zOC44LDUwbC01LjQsMS4yIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjQzBDMEJGIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0zOC44LDU0LjFsLTUuNC0xLjIiLz4KCQk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0MwQzBCRiIgZD0iTTI5LjUsNTIuNEwyOSw1MS43Yy0wLjItMC4zLDAtMC42LDAuMy0wLjZoMS40CgkJCWMwLjMsMCwwLjUsMC40LDAuMywwLjZsLTAuNywxbDAsMGMtMC43LDEuMi0yLjYsMS4xLTMuMS0wLjNsLTAuMS0wLjJjLTAuMS0wLjIsMC0wLjQsMC4yLTAuNXMwLjQsMCwwLjUsMC4ybDAuMSwwLjIKCQkJQzI4LjMsNTIuOCwyOS4xLDUyLjksMjkuNSw1Mi40eiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0MwQzBCRiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzIuNCw1Mi4xbC0wLjEsMC4yYy0wLjQsMS0xLjgsMS4xLTIuMywwLjIiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iMjcuNiIgY3k9IjQ5LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQk8ZWxsaXBzZSBmaWxsPSIjQzBDMEJGIiBjeD0iMzIuNCIgY3k9IjQ5LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCTwvZz4KCTxnPgoJCTxwYXRoIGZpbGw9IiM2QUE5REQiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTE0LjYsNzEuMmMtMC4xLTAuMS0wLjItMC4yLTAuMy0wLjJINS43CgkJCWMtMC4xLDAtMC4yLDAuMS0wLjMsMC4yYy0wLjEsMC4xLTAuMSwwLjIsMCwwLjRjMC43LDIsMi41LDMuMyw0LjYsMy4zczMuOS0xLjMsNC42LTMuM0MxNC43LDcxLjUsMTQuNyw3MS4zLDE0LjYsNzEuMnogTTEwLDc0LjEKCQkJYy0xLjYsMC0zLTAuOS0zLjctMi4yaDcuM0MxMyw3My4yLDExLjYsNzQuMSwxMCw3NC4xeiIvPgoJCTxwYXRoIGZpbGw9IiM2QUE5REQiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEyLjgsNjkuNWMwLjYsMCwxLjEtMC41LDEuMS0xLjEKCQkJYzAtMC42LTAuNS0xLjItMS4xLTEuMmMtMC42LDAtMS4yLDAuNS0xLjIsMS4yQzExLjYsNjksMTIuMiw2OS41LDEyLjgsNjkuNXogTTEyLjgsNjhjMC4yLDAsMC40LDAuMiwwLjQsMC40CgkJCWMwLDAuMi0wLjIsMC40LTAuNCwwLjRjLTAuMiwwLTAuNC0wLjItMC40LTAuNEMxMi40LDY4LjEsMTIuNiw2OCwxMi44LDY4eiIvPgoJCTxwYXRoIGZpbGw9IiM2QUE5REQiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTcuMiw2OS41YzAuNiwwLDEuMi0wLjUsMS4yLTEuMQoJCQljMC0wLjYtMC41LTEuMi0xLjItMS4yYy0wLjYsMC0xLjEsMC41LTEuMSwxLjJDNi4xLDY5LDYuNiw2OS41LDcuMiw2OS41eiBNNy4yLDY4YzAuMiwwLDAuNCwwLjIsMC40LDAuNGMwLDAuMi0wLjIsMC40LTAuNCwwLjQKCQkJYy0wLjIsMC0wLjQtMC4yLTAuNC0wLjRDNi44LDY4LjEsNyw2OCw3LjIsNjh6Ii8+CgkJPHBhdGggZmlsbD0iIzZBQTlERCIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2Utd2lkdGg9IjAuMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTAsNjNjLTMuOCwwLTcsMy4xLTcsN2MwLDMuOCwzLjEsNyw3LDcKCQkJczctMy4xLDctN0MxNyw2Ni4yLDEzLjgsNjMsMTAsNjN6IE0xMCw3Ni4yYy0zLjQsMC02LjItMi44LTYuMi02LjJjMC0zLjQsMi44LTYuMiw2LjItNi4yczYuMiwyLjgsNi4yLDYuMgoJCQlDMTYuMiw3My40LDEzLjQsNzYuMiwxMCw3Ni4yeiIvPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTY0LjEsNzMuNGwyLjMsMGMwLjIsMCwwLjQsMC4yLDAuNCwwLjR2Mi4xYzAsMC4yLTAuMiwwLjQtMC40LDAuNGgtMi4zCgkJCQljLTAuMiwwLTAuNC0wLjItMC40LTAuNHYtMi4xQzYzLjcsNzMuNiw2My44LDczLjQsNjQuMSw3My40eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIGQ9Ik03My41LDczLjVoMi40YzAuMiwwLDAuNCwwLjIsMC40LDAuNHYyLjFjMCwwLjItMC4yLDAuNC0wLjQsMC40aC0yLjQKCQkJCWMtMC4yLDAtMC40LTAuMi0wLjQtMC40bDAtMi4xQzczLjEsNzMuNiw3My4zLDczLjUsNzMuNSw3My41eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIGQ9Ik02My43LDY4LjRoMTIuNnY1SDYzLjdWNjguNHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBkPSJNNjUuNSw2My42aDguOWMxLDAsMS45LDAuOCwxLjksMS45djMuMUg2My43di0zLjFDNjMuNyw2NC41LDY0LjUsNjMuNiw2NS41LDYzLjZ6Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiM2QUE5REQiIGN4PSI2Ni4yIiBjeT0iNzAuOSIgcng9IjAuOSIgcnk9IjAuOSIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iNzMuOCIgY3k9IjcwLjkiIHJ4PSIwLjkiIHJ5PSIwLjkiLz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBkPSJNOTYuNCw3MGMwLDMuNi0yLjksNi41LTYuNCw2LjVzLTYuNC0yLjktNi40LTYuNXMyLjktNi41LDYuNC02LjVTOTYuNCw2Ni40LDk2LjQsNzB6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTk2LjMsNjguNmMwLDAsMCwwLjEsMCwwLjFjLTAuOSwwLjEtMi45LDAuMS00LjYtMS4yYy0xLjEtMC44LTItMS43LTIuNi0yLjUKCQkJCWMtMC4zLTAuNC0wLjYtMC44LTAuNy0xLjFjLTAuMS0wLjEtMC4xLTAuMi0wLjEtMC4yYzAuNS0wLjEsMS4yLTAuMiwyLTAuMmMxLjIsMCwyLjUsMC4zLDMuNSwxLjFjMSwwLjgsMS43LDEuOCwyLjEsMi44CgkJCQlDOTYuMSw2Ny45LDk2LjIsNjguMyw5Ni4zLDY4LjZ6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTg0LDcyLjJjMCwwLDAtMC4xLDAtMC4xYzAuOS0wLjIsMi45LTAuNCw0LjcsMC42YzEuMSwwLjcsMS45LDEuNSwyLjQsMi4zCgkJCQljMC40LDAuNSwwLjYsMSwwLjcsMS4zYy0wLjQsMC4xLTEsMC4yLTEuNywwLjNjLTEsMC0yLjEtMC4xLTMuMi0wLjhzLTEuOS0xLjYtMi40LTIuNUM4NC4yLDcyLjgsODQuMSw3Mi40LDg0LDcyLjJ6Ii8+CgkJPC9nPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMTE2LjMsNjYuOGwtMS40LDJsLTAuOC0wLjhsLTAuNi0wLjdsMCwwLjlsLTAuMSw4LjJoLTYuOAoJCQkJbC0wLjEtOC4ybDAtMC45bC0wLjYsMC43bC0wLjgsMC44bC0xLjQtMmwyLjYtMi45YzAuMS0wLjEsMC4yLTAuMSwwLjMtMC4xaDEuM2wwLjQsMC43YzAuNywxLjMsMi42LDEuMywzLjMtMC4xbDAuMy0wLjZoMS4yCgkJCQljMC4xLDAsMC4yLDAsMC4zLDAuMWwwLjMtMC4zbC0wLjMsMC4zTDExNi4zLDY2Ljh6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTExMC4xLDY3LjdoMnYwLjljMCwwLjQtMC40LDAuNy0xLDAuN2MtMC42LDAtMS0wLjMtMS0wLjdMMTEwLjEsNjcuN0wxMTAuMSw2Ny43eiIvPgoJCTwvZz4KCTwvZz4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIGQ9Ik0xMjYuOCw3NC4zYzAsMS4yLTEsMi4yLTIuMiwyLjJzLTIuMi0xLTIuMi0yLjJzMS0yLjIsMi4yLTIuMlMxMjYuOCw3My4xLDEyNi44LDc0LjN6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTEzNy42LDc0LjNjMCwxLjItMSwyLjItMi4yLDIuMmMtMS4yLDAtMi4yLTEtMi4yLTIuMnMxLTIuMiwyLjItMi4yCgkJCQlDMTM2LjYsNzIuMSwxMzcuNiw3My4xLDEzNy42LDc0LjN6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTEyNi44LDY0LjR2OS45Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTEzNy43LDY0LjR2OS45Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgZD0iTTEyNi44LDYzLjVoMTAuOHYyLjdoLTEwLjhDMTI2LjgsNjYuMiwxMjYuOCw2My41LDEyNi44LDYzLjV6Ii8+CgkJPC9nPgoJPC9nPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik0xNzAuOCw2My4xTDE3MC44LDYzLjFjLTAuMywwLTAuNSwwLTAuOCwwYy0yLjEsMC00LDEtNS4zLDIuNWwtMC4xLDBsLTAuMS0wLjFsLTEtMS4ybC0wLjMsMy40bDMuNCwwLjMKCQkJCWwtMS4xLTEuM2wtMC4xLTAuMWwwLjEtMC4xYzEuMS0xLjQsMy0yLjMsNS0yLjFsMCwwYzMuMiwwLjMsNS41LDMuMSw1LjIsNi4zYy0wLjMsMy0zLjEsNS4zLTYuMSw1LjFjLTMuMS0wLjItNS40LTIuOS01LjMtNgoJCQkJbC0xLjMtMC4xYy0wLjIsMy44LDIuNiw3LjEsNi4zLDcuNGMzLjksMC4zLDcuMy0yLjYsNy42LTYuNUMxNzcuMiw2Ni44LDE3NC40LDYzLjUsMTcwLjgsNjMuMXoiLz4KCQkJPHBhdGggZmlsbD0iIzZBQTlERCIgZD0iTTE3MC4zLDY3LjRjMC0wLjMtMC4zLTAuNi0wLjYtMC42cy0wLjYsMC4zLTAuNiwwLjZ2My4yYzAsMC4yLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMywwLjIsMC40LDAuMgoJCQkJaDIuNGMwLjQsMCwwLjYtMC4zLDAuNi0wLjZTMTcyLjQsNzAsMTcyLDcwaC0xLjZoLTAuMnYtMC4yTDE3MC4zLDY3LjRMMTcwLjMsNjcuNHoiLz4KCQk8L2c+Cgk8L2c+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBkPSJNMTg2LjIsNjMuNGg3LjdjMS41LDAsMi43LDEuMiwyLjcsMi43djcuN2MwLDEuNS0xLjIsMi43LTIuNywyLjdoLTcuNwoJCQkJYy0xLjUsMC0yLjctMS4yLTIuNy0yLjd2LTcuN0MxODMuNCw2NC43LDE4NC43LDYzLjQsMTg2LjIsNjMuNHoiLz4KCQkJPGVsbGlwc2UgZmlsbD0iIzZBQTlERCIgY3g9IjE4NiIgY3k9IjY4LjkiIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQkJPGVsbGlwc2UgZmlsbD0iIzZBQTlERCIgY3g9IjE5NCIgY3k9IjY2LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0xODYsNzMuM2wwLjQtMC4zYzAuNC0wLjMsMS0wLjMsMS41LTAuMWwxLDAuNAoJCQkJYzAuNSwwLjIsMSwwLjIsMS41LTAuMWwwLjgtMC41YzAuNC0wLjMsMS0wLjMsMS41LTAuMWwxLjgsMC44Ii8+CgkJPC9nPgoJPC9nPgoJPHBhdGggZmlsbD0iIzZBQTlERCIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2Utd2lkdGg9IjAuMjUiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTE1Niw2NC4zYy0wLjItMC4xLTAuNC0wLjEtMC41LDAKCQljMCwwLTAuMiwwLjEtMC45LDAuMmMtMC43LDAtMi40LTAuMS0zLjgtMC42Yy0wLjgtMC4zLTEuNy0wLjUtMi41LTAuNWMtMC4yLDAtMC40LDAtMC41LDBjLTEuMywwLTIuNSwwLjMtMy42LDEKCQljLTAuMiwwLjEtMC4yLDAuMi0wLjIsMC40djExLjZjMCwwLjMsMC4xLDAuNSwwLjMsMC41YzAuNiwwLDAuNS0wLjQsMC41LTAuNnYtNS43YzAuNy0wLjMsMy4yLTEuMSw1LjgtMC4xCgkJYzEuNiwwLjYsMy41LDAuNyw0LjMsMC43YzAuOCwwLDEuMy0wLjMsMS4zLTAuM2MwLjItMC4xLDAuMy0wLjIsMC4zLTAuNHYtNS43QzE1Ni4yLDY0LjYsMTU2LjEsNjQuNCwxNTYsNjQuM3ogTTE1NS42LDcwLjIKCQljLTAuMSwwLTAuNywwLjEtMSwwLjFjLTAuNywwLTIuNC0wLjEtMy44LTAuNmMtMi41LTEtNS0wLjUtNi4yLTAuMXYtNC45YzAuOS0wLjUsMi4yLTAuNywzLjItMC43YzAuMSwwLDAuMywwLDAuNCwwCgkJYzAuNywwLDEuNSwwLjIsMi4yLDAuNGMxLjYsMC42LDMuNSwwLjcsNC4zLDAuN2MwLjIsMCwwLjgsMCwxLTAuMVY3MC4yeiIvPgoJPGc+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBkPSJNNDguMSw2My41aDMuN2MyLjUsMCw0LjUsMiw0LjUsNC41YzAsMC41LTAuNCwwLjktMC45LDAuOUg0NC41Yy0wLjUsMC0wLjktMC40LTAuOS0wLjkKCQkJQzQzLjYsNjUuNSw0NS42LDYzLjUsNDguMSw2My41eiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSw2OC44Yy0wLjIsMC4xLTAuNSwxLjIsMCwxLjVjMS40LDAuOSw4LjUsMC44LDExLjMsMC42CgkJCWMwLjgtMC4xLDEuNi0wLjQsMS43LTEuMmMwLTAuMy0wLjEtMC42LTAuNi0wLjkiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTQzLjUsNzAuNkw0My4zLDcxYy0wLjIsMC41LDAuMiwxLDAuNywwLjljMC4zLTAuMSwwLjUsMC4xLDAuNywwLjMKCQkJbDAuMSwwLjJjMC4zLDAuNSwxLDAuNiwxLjUsMC4ybDAsMGMwLjMtMC4yLDAuNy0wLjMsMS0wLjJsMC44LDAuM2MwLjQsMC4yLDAuOCwwLjEsMS4yLDBsMC41LTAuMmMwLjQtMC4yLDAuOS0wLjIsMS4zLDBsMC41LDAuMgoJCQljMC40LDAuMiwwLjgsMC4yLDEuMi0wLjFsMC4yLTAuMWMwLjMtMC4yLDAuOC0wLjIsMS4xLDAuMWwwLjIsMC4yYzAuMywwLjMsMC44LDAuMiwxLTAuMmwwLjEtMC4yYzAuMS0wLjIsMC0wLjMsMC4yLTAuMwoJCQljMC41LDAsMS4yLTAuMywxLjEtMC43bC0wLjQtMS4xIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDcyLjJjLTAuMSwwLjItMC4zLDAuOCwwLDEuMWMwLjMsMC40LDMsMS4xLDYuNCwxLjEKCQkJYzIuMiwwLDQuNi0wLjMsNi0wLjZjMC41LTAuMSwwLjktMC40LDAuOC0wLjljMC0wLjItMC4yLTAuNS0wLjQtMC43Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDczLjNjMCwwLjUsMC42LDIuMywxLjMsMi43YzEuOCwwLjgsNS43LDAuNyw4LjEsMC41CgkJCWMxLjMtMC4xLDIuNS0wLjcsMy4yLTEuOGMwLjMtMC41LDAuNS0xLDAuNS0xLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iNTEuNiIgY3k9IjY2LjUiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iNTMiIGN5PSI2NSIgcng9IjAuMyIgcnk9IjAuNCIvPgoJCTxlbGxpcHNlIGZpbGw9IiM2QUE5REQiIGN4PSI1MyIgY3k9IjY3LjIiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iNTQuMyIgY3k9IjY2LjUiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iNTAuOSIgY3k9IjY1IiByeD0iMC4zIiByeT0iMC40Ii8+Cgk8L2c+Cgk8Zz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIGQ9Ik0yNC4yLDcxdi03LjZjMC4xLDAuMSwwLjgsMC45LDIuOCwzLjFjMi41LTEuNyw1LjYtMC43LDYuOSwwbDIuNC0zLjF2Ny4xCgkJCWMwLDEuMi0wLjEsMi41LTAuOSwzLjRjLTEsMS4yLTIuNywyLjUtNS4zLDIuNWMtMi45LDAtNC41LTEuNS01LjMtMi45QzI0LjIsNzIuOSwyNC4yLDcyLDI0LjIsNzF6Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNkFBOUREIiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0yMS4yLDcwLjFsNS40LDEuMiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMjEuMiw3NC4xbDUuNC0xLjIiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM2QUE5REQiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTM4LjgsNzAuMWwtNS40LDEuMiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzguOCw3NC4xbC01LjQtMS4yIi8+CgkJPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9IiM2QUE5REQiIGQ9Ik0yOS41LDcyLjRMMjksNzEuN2MtMC4yLTAuMywwLTAuNiwwLjMtMC42aDEuNAoJCQljMC4zLDAsMC41LDAuNCwwLjMsMC42bC0wLjcsMWwwLDBjLTAuNywxLjItMi42LDEuMS0zLjEtMC4zbC0wLjEtMC4yYy0wLjEtMC4yLDAtMC40LDAuMi0wLjVjMC4yLTAuMSwwLjQsMCwwLjUsMC4ybDAuMSwwLjIKCQkJQzI4LjMsNzIuOCwyOS4xLDcyLjksMjkuNSw3Mi40eiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzZBQTlERCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzIuNCw3Mi4xbC0wLjEsMC4yYy0wLjQsMS0xLjgsMS4xLTIuMywwLjIiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iMjcuNiIgY3k9IjY5LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCQk8ZWxsaXBzZSBmaWxsPSIjNkFBOUREIiBjeD0iMzIuNCIgY3k9IjY5LjciIHJ4PSIwLjciIHJ5PSIwLjciLz4KCTwvZz4KPC9nPgo8Zz4KCTxwYXRoIGZpbGw9IiM4Njg2ODYiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTEyLjgsOS41YzAuNiwwLDEuMS0wLjUsMS4xLTEuMgoJCWMwLTAuNi0wLjUtMS4xLTEuMS0xLjFjLTAuNiwwLTEuMiwwLjUtMS4yLDEuMVMxMi4yLDkuNSwxMi44LDkuNXogTTEyLjgsNy45YzAuMiwwLDAuNCwwLjIsMC40LDAuNGMwLDAuMi0wLjIsMC40LTAuNCwwLjQKCQljLTAuMiwwLTAuNC0wLjItMC40LTAuNEMxMi40LDguMSwxMi42LDcuOSwxMi44LDcuOXoiLz4KCTxwYXRoIGZpbGw9IiM4Njg2ODYiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLXdpZHRoPSIwLjEiIHN0cm9rZS1taXRlcmxpbWl0PSIxMCIgZD0iTTcuMiw5LjVjMC42LDAsMS4yLTAuNSwxLjItMS4yCgkJYzAtMC42LTAuNS0xLjEtMS4yLTEuMWMtMC42LDAtMS4xLDAuNS0xLjEsMS4xUzYuNiw5LjUsNy4yLDkuNXogTTcuMiw3LjljMC4yLDAsMC40LDAuMiwwLjQsMC40YzAsMC4yLTAuMiwwLjQtMC40LDAuNAoJCUM3LDguNyw2LjgsOC41LDYuOCw4LjNDNi44LDguMSw3LDcuOSw3LjIsNy45eiIvPgoJPHBhdGggZmlsbD0iIzg2ODY4NiIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2Utd2lkdGg9IjAuMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTQuNiwxMS4yYy0wLjEtMC4xLTAuMi0wLjItMC4zLTAuMkg1LjcKCQljLTAuMSwwLTAuMiwwLjEtMC4zLDAuMmMtMC4xLDAuMS0wLjEsMC4yLDAsMC40YzAuNywyLDIuNSwzLjMsNC42LDMuM3MzLjktMS4zLDQuNi0zLjNDMTQuNywxMS40LDE0LjcsMTEuMywxNC42LDExLjJ6IE0xMCwxNC4xCgkJYy0xLjYsMC0zLTAuOS0zLjctMi4yaDcuM0MxMywxMy4yLDExLjYsMTQuMSwxMCwxNC4xeiIvPgoJPHBhdGggZmlsbD0iIzg2ODY4NiIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2Utd2lkdGg9IjAuMSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTAsM2MtMy44LDAtNywzLjEtNyw3czMuMSw3LDcsN3M3LTMuMSw3LTcKCQlTMTMuOCwzLDEwLDN6IE0xMCwxNi4yYy0zLjQsMC02LjItMi44LTYuMi02LjJTNi42LDMuOCwxMCwzLjhzNi4yLDIuOCw2LjIsNi4yUzEzLjQsMTYuMiwxMCwxNi4yeiIvPgo8L2c+CjxnIGlkPSJDYXJfMDAwMDAwMTg5MzUzOTUwODU0MTM0MTM3NTAwMDAwMDA4MjUyNzM4Nzc4NDI3NzU3MTVfIj4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik02NC4xLDEzLjRsMi4zLDBjMC4yLDAsMC40LDAuMiwwLjQsMC40djIuMWMwLDAuMi0wLjIsMC40LTAuNCwwLjRoLTIuMwoJCQkJYy0wLjIsMC0wLjQtMC4yLTAuNC0wLjR2LTIuMUM2My43LDEzLjYsNjMuOCwxMy40LDY0LjEsMTMuNHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNNzMuNSwxMy40aDIuNGMwLjIsMCwwLjQsMC4yLDAuNCwwLjR2Mi4xYzAsMC4yLTAuMiwwLjQtMC40LDAuNGgtMi40CgkJCQljLTAuMiwwLTAuNC0wLjItMC40LTAuNGwwLTIuMUM3My4xLDEzLjYsNzMuMywxMy40LDczLjUsMTMuNHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNNjMuNyw4LjRoMTIuNnY1SDYzLjdWOC40eiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik02NS41LDMuNmg4LjljMSwwLDEuOSwwLjgsMS45LDEuOXYzLjFINjMuN1Y1LjVDNjMuNyw0LjQsNjQuNSwzLjYsNjUuNSwzLjZ6Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiM4Njg2ODYiIGN4PSI2Ni4yIiBjeT0iMTAuOSIgcng9IjAuOSIgcnk9IjAuOSIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjODY4Njg2IiBjeD0iNzMuOCIgY3k9IjEwLjkiIHJ4PSIwLjkiIHJ5PSIwLjkiLz4KCQk8L2c+Cgk8L2c+CjwvZz4KPGcgaWQ9IkFjdGl2aXRpZXMiPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgZD0iTTk2LjQsMTBjMCwzLjYtMi45LDYuNS02LjQsNi41cy02LjQtMi45LTYuNC02LjVzMi45LTYuNSw2LjQtNi41Uzk2LjQsNi40LDk2LjQsMTB6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgZD0iTTk2LjMsOC42YzAsMCwwLDAuMSwwLDAuMWMtMC45LDAuMS0yLjksMC4xLTQuNi0xLjJjLTEuMS0wLjgtMi0xLjctMi42LTIuNQoJCQkJYy0wLjMtMC40LTAuNi0wLjgtMC43LTEuMWMtMC4xLTAuMS0wLjEtMC4yLTAuMS0wLjJjMC41LTAuMSwxLjItMC4yLDItMC4yYzEuMiwwLDIuNSwwLjMsMy41LDEuMWMxLDAuOCwxLjcsMS44LDIuMSwyLjgKCQkJCUM5Ni4xLDcuOSw5Ni4yLDguMyw5Ni4zLDguNnoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNODQsMTIuMWMwLDAsMC0wLjEsMC0wLjFjMC45LTAuMiwyLjktMC40LDQuNywwLjZjMS4xLDAuNiwxLjksMS41LDIuNCwyLjMKCQkJCWMwLjQsMC41LDAuNiwxLDAuNywxLjNjLTAuNCwwLjEtMSwwLjItMS43LDAuM2MtMSwwLTIuMS0wLjEtMy4yLTAuOGMtMS4xLTAuNi0xLjktMS42LTIuNC0yLjVDODQuMiwxMi44LDg0LjEsMTIuNCw4NCwxMi4xeiIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8ZyBpZD0iT2JqZWN0c18wMDAwMDA2NDMxMjM3MTczOTEzMDMxNTI1MDAwMDAxMDIyNTg4OTAzMjIyODYzMjk3NV8iPgoJPGc+CgkJPGc+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMTE2LjMsNi44bC0xLjQsMkwxMTQuMSw4bC0wLjYtMC43bDAsMC45bC0wLjEsOC4yaC02LjhsLTAuMS04LjIKCQkJCWwwLTAuOUwxMDUuOSw4bC0wLjgsMC44bC0xLjQtMmwyLjYtMi45YzAuMS0wLjEsMC4yLTAuMSwwLjMtMC4xaDEuM2wwLjQsMC43YzAuNywxLjMsMi42LDEuMywzLjMtMC4xbDAuMy0wLjZoMS4yCgkJCQljMC4xLDAsMC4yLDAsMC4zLDAuMWwwLjMtMC4zbC0wLjMsMC4zTDExNi4zLDYuOHoiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNMTEwLjEsNy43aDJ2MC45YzAsMC40LTAuNCwwLjctMSwwLjdjLTAuNiwwLTEtMC4zLTEtMC43TDExMC4xLDcuN0wxMTAuMSw3Ljd6Ii8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnIGlkPSJTeW1ib2xzXzAwMDAwMDk2NzQ2OTA3ODY5OTI5OTIxMTgwMDAwMDA2NDg0ODEyODMwMjgyNTgyNDE2XyI+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNMTI2LjgsMTQuM2MwLDEuMi0xLDIuMi0yLjIsMi4ycy0yLjItMS0yLjItMi4yczEtMi4yLDIuMi0yLjJTMTI2LjgsMTMuMSwxMjYuOCwxNC4zeiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik0xMzcuNiwxNC4zYzAsMS4yLTEsMi4yLTIuMiwyLjJjLTEuMiwwLTIuMi0xLTIuMi0yLjJzMS0yLjIsMi4yLTIuMgoJCQkJQzEzNi42LDEyLjEsMTM3LjYsMTMuMSwxMzcuNiwxNC4zeiIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik0xMjYuOCw0LjR2OS45Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgZD0iTTEzNy43LDQuNHY5LjkiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBkPSJNMTI2LjgsMy41aDEwLjh2Mi43aC0xMC44QzEyNi44LDYuMiwxMjYuOCwzLjUsMTI2LjgsMy41eiIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8ZyBpZD0iUmVjZW50cyI+Cgk8Zz4KCQk8Zz4KCQkJPHBhdGggZmlsbD0iIzg2ODY4NiIgZD0iTTE3MC44LDMuMUwxNzAuOCwzLjFjLTAuMywwLTAuNSwwLTAuOCwwYy0yLjEsMC00LDEtNS4zLDIuNWwtMC4xLDBsLTAuMS0wLjFsLTEtMS4ybC0wLjMsMy40bDMuNCwwLjMKCQkJCWwtMS4xLTEuM2wtMC4xLTAuMWwwLjEtMC4xYzEuMS0xLjQsMy0yLjMsNS0yLjFsMCwwYzMuMiwwLjMsNS41LDMuMSw1LjIsNi4zYy0wLjMsMy0zLjEsNS4zLTYuMSw1LjFjLTMuMS0wLjItNS40LTIuOS01LjMtNgoJCQkJTDE2Myw5LjVjLTAuMiwzLjgsMi42LDcuMSw2LjMsNy40YzMuOSwwLjQsNy4zLTIuNiw3LjYtNi41QzE3Ny4yLDYuOCwxNzQuNCwzLjUsMTcwLjgsMy4xeiIvPgoJCQk8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNMTcwLjMsNy40YzAtMC4zLTAuMy0wLjYtMC42LTAuNlMxNjksNy4xLDE2OSw3LjR2My4yYzAsMC4yLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMywwLjIsMC40LDAuMgoJCQkJaDIuNGMwLjQsMCwwLjYtMC4zLDAuNi0wLjZzLTAuMy0wLjYtMC42LTAuNmgtMS42aC0wLjJWOS44TDE3MC4zLDcuNEwxNzAuMyw3LjR6Ii8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnIGlkPSJDdXN0b21fMDAwMDAxODEwODcyMjk0MzQzMDIzMzY3ODAwMDAwMDUxNTIyNzc5NDU5NDA2NzQ0ODhfIj4KCTxnPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik0xODYuMiwzLjRoNy43YzEuNSwwLDIuNywxLjIsMi43LDIuN3Y3LjdjMCwxLjUtMS4yLDIuNy0yLjcsMi43aC03LjcKCQkJCWMtMS41LDAtMi43LTEuMi0yLjctMi43VjYuMUMxODMuNCw0LjYsMTg0LjcsMy40LDE4Ni4yLDMuNHoiLz4KCQkJPGVsbGlwc2UgZmlsbD0iIzg2ODY4NiIgY3g9IjE4NiIgY3k9IjguOSIgcng9IjAuNyIgcnk9IjAuNyIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjODY4Njg2IiBjeD0iMTk0IiBjeT0iNi43IiByeD0iMC43IiByeT0iMC43Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMTg2LDEzLjNsMC40LTAuM2MwLjQtMC4zLDEtMC4zLDEuNS0wLjFsMSwwLjQKCQkJCWMwLjUsMC4yLDEsMC4yLDEuNS0wLjFsMC44LTAuNWMwLjQtMC4zLDEtMC4zLDEuNS0wLjFsMS44LDAuOCIvPgoJCTwvZz4KCTwvZz4KPC9nPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBzdHJva2U9IiM4Njg2ODYiIHN0cm9rZS13aWR0aD0iMC4yNSIgc3Ryb2tlLW1pdGVybGltaXQ9IjEwIiBkPSJNMTU2LDQuM2MtMC4yLTAuMS0wLjQtMC4xLTAuNSwwCgljMCwwLTAuMiwwLjEtMC45LDAuMWMtMC43LDAtMi40LTAuMS0zLjgtMC42Yy0wLjgtMC4zLTEuNy0wLjUtMi41LTAuNWMtMC4yLDAtMC40LDAtMC41LDBjLTEuMywwLTIuNSwwLjMtMy42LDEKCWMtMC4yLDAuMS0wLjIsMC4yLTAuMiwwLjR2MTEuNmMwLDAuMywwLjEsMC41LDAuMywwLjVjMC42LDAsMC41LTAuNCwwLjUtMC42di01LjdjMC43LTAuMywzLjItMS4xLDUuOC0wLjFjMS42LDAuNiwzLjUsMC43LDQuMywwLjcKCWMwLjgsMCwxLjMtMC4zLDEuMy0wLjNjMC4yLTAuMSwwLjMtMC4yLDAuMy0wLjRWNC43QzE1Ni4yLDQuNSwxNTYuMSw0LjQsMTU2LDQuM3ogTTE1NS42LDEwLjJjLTAuMSwwLTAuNywwLjEtMSwwLjEKCWMtMC43LDAtMi40LTAuMS0zLjgtMC42Yy0yLjUtMS01LTAuNS02LjItMC4xVjQuN2MwLjktMC41LDIuMi0wLjcsMy4yLTAuN2MwLjEsMCwwLjMsMCwwLjQsMGMwLjcsMCwxLjUsMC4yLDIuMiwwLjQKCWMxLjYsMC42LDMuNSwwLjcsNC4zLDAuN2MwLjIsMCwwLjgsMCwxLTAuMVYxMC4yeiIvPgo8ZyBpZD0iRm9vZCI+Cgk8ZyBpZD0iTGF5ZXJfMTIiPgoJCTxnPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIGQ9Ik00OC4xLDMuNWgzLjdjMi41LDAsNC41LDIsNC41LDQuNWMwLDAuNS0wLjQsMC45LTAuOSwwLjlINDQuNWMtMC41LDAtMC45LTAuNC0wLjktMC45CgkJCQlDNDMuNiw1LjUsNDUuNiwzLjUsNDguMSwzLjV6Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSw4LjdjLTAuMiwwLjEtMC41LDEuMiwwLDEuNWMxLjQsMC45LDguNSwwLjgsMTEuMywwLjYKCQkJCWMwLjgtMC4xLDEuNi0wLjQsMS43LTEuMmMwLTAuMy0wLjEtMC42LTAuNi0wLjkiLz4KCQkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik00My41LDEwLjZMNDMuMywxMWMtMC4yLDAuNSwwLjIsMSwwLjcsMC45CgkJCQljMC4zLTAuMSwwLjUsMC4xLDAuNywwLjNsMC4xLDAuMmMwLjMsMC41LDEsMC42LDEuNSwwLjJsMCwwYzAuMy0wLjIsMC43LTAuMywxLTAuMmwwLjgsMC4zYzAuNCwwLjEsMC44LDAuMSwxLjIsMGwwLjUtMC4yCgkJCQljMC40LTAuMiwwLjktMC4yLDEuMywwbDAuNSwwLjJjMC40LDAuMiwwLjgsMC4xLDEuMi0wLjFsMC4yLTAuMWMwLjMtMC4yLDAuOC0wLjEsMS4xLDAuMWwwLjIsMC4yYzAuMywwLjMsMC44LDAuMiwxLTAuMmwwLjEtMC4yCgkJCQljMC4xLTAuMiwwLTAuMywwLjItMC40YzAuNSwwLDEuMi0wLjMsMS4xLTAuN2wtMC40LTEuMSIvPgoJCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTQzLjUsMTIuMWMtMC4xLDAuMi0wLjMsMC44LDAsMS4xYzAuMywwLjQsMywxLjEsNi40LDEuMQoJCQkJYzIuMiwwLDQuNi0wLjMsNi0wLjZjMC41LTAuMSwwLjktMC40LDAuOC0wLjljMC0wLjItMC4yLTAuNS0wLjQtMC43Ii8+CgkJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNNDMuNSwxMy4zYzAsMC41LDAuNiwyLjQsMS4zLDIuNmMxLjgsMC44LDUuNywwLjcsOC4xLDAuNQoJCQkJYzEuMy0wLjEsMi41LTAuNywzLjItMS44YzAuMy0wLjUsMC41LTEsMC41LTEuNCIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjODY4Njg2IiBjeD0iNTEuNiIgY3k9IjYuNSIgcng9IjAuMyIgcnk9IjAuNCIvPgoJCQk8ZWxsaXBzZSBmaWxsPSIjODY4Njg2IiBjeD0iNTMiIGN5PSI0LjkiIHJ4PSIwLjMiIHJ5PSIwLjQiLz4KCQkJPGVsbGlwc2UgZmlsbD0iIzg2ODY4NiIgY3g9IjUzIiBjeT0iNy4yIiByeD0iMC4zIiByeT0iMC40Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiM4Njg2ODYiIGN4PSI1NC4zIiBjeT0iNi41IiByeD0iMC4zIiByeT0iMC40Ii8+CgkJCTxlbGxpcHNlIGZpbGw9IiM4Njg2ODYiIGN4PSI1MC45IiBjeT0iNC45IiByeD0iMC4zIiByeT0iMC40Ii8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnIGlkPSJBbmltYWxzIj4KCTxnPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgZD0iTTI0LjIsMTFWMy41YzAuMSwwLjEsMC44LDAuOSwyLjgsMy4xYzIuNS0xLjcsNS42LTAuNyw2LjksMGwyLjQtMy4xdjcuMQoJCQljMCwxLjItMC4xLDIuNS0wLjksMy40Yy0xLDEuMi0yLjcsMi41LTUuMywyLjVjLTIuOSwwLTQuNS0xLjUtNS4zLTIuOUMyNC4yLDEyLjksMjQuMiwxMS45LDI0LjIsMTF6Ii8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0yMS4yLDEwbDUuNCwxLjIiLz4KCQk8cGF0aCBmaWxsPSJub25lIiBzdHJva2U9IiM4Njg2ODYiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgZD0iTTIxLjIsMTQuMWw1LjQtMS4yIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0zOC44LDEwbC01LjQsMS4yIi8+CgkJPHBhdGggZmlsbD0ibm9uZSIgc3Ryb2tlPSIjODY4Njg2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIGQ9Ik0zOC44LDE0LjFsLTUuNC0xLjIiLz4KCQk8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzg2ODY4NiIgZD0iTTI5LjUsMTIuNEwyOSwxMS43Yy0wLjItMC4zLDAtMC42LDAuMy0wLjZoMS40CgkJCWMwLjMsMCwwLjUsMC40LDAuMywwLjZsLTAuNywxbDAsMGMtMC43LDEuMi0yLjYsMS4xLTMuMS0wLjNsLTAuMS0wLjJjLTAuMS0wLjIsMC0wLjQsMC4yLTAuNXMwLjQsMCwwLjUsMC4ybDAuMSwwLjIKCQkJQzI4LjMsMTIuNywyOS4xLDEyLjksMjkuNSwxMi40eiIvPgoJCTxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzg2ODY4NiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBkPSJNMzIuNCwxMi4xbC0wLjEsMC4yYy0wLjQsMS0xLjgsMS4xLTIuMywwLjIiLz4KCQk8ZWxsaXBzZSBmaWxsPSIjODY4Njg2IiBjeD0iMjcuNiIgY3k9IjkuNyIgcng9IjAuNyIgcnk9IjAuNyIvPgoJCTxlbGxpcHNlIGZpbGw9IiM4Njg2ODYiIGN4PSIzMi40IiBjeT0iOS43IiByeD0iMC43IiByeT0iMC43Ii8+Cgk8L2c+CjwvZz4KPC9zdmc+";function gCe(e){var t,n=e.isActiveCategory,a=e.category,r=e.allowNavigation,i=e.categoryConfig,o=e.onClick;return h.exports.createElement(Mh,{tabIndex:r?0:-1,className:mn(yCe.catBtn,Qc.categoryBtn,"epr-icn-"+a,(t={},t[tn.active]=n,t)),onClick:o,"aria-label":zj(i),"aria-selected":n,role:"tab","aria-controls":"epr-category-nav-id"})}var S8={backgroundPositionY:"calc(var(--epr-category-navigation-button-size) * 3)"},bCe={backgroundPositionY:"calc(var(--epr-category-navigation-button-size) * 2)"},k8={":not(.epr-search-active)":{catBtn:{":hover":S8,"&.epr-active":S8}}},yCe=ra.create(oa({catBtn:{".":"epr-cat-btn",display:"inline-block",transition:"opacity 0.2s ease-in-out",position:"relative",height:"var(--epr-category-navigation-button-size)",width:"var(--epr-category-navigation-button-size)",backgroundSize:"calc(var(--epr-category-navigation-button-size) * 10)",outline:"none",backgroundPosition:"0 0",backgroundImage:"url("+hCe+")",":focus:before":{content:"",position:"absolute",top:"-2px",left:"-2px",right:"-2px",bottom:"-2px",border:"2px solid var(--epr-category-icon-active-color)",borderRadius:"50%"},"&.epr-icn-suggested":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -8)"},"&.epr-icn-custom":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -9)"},"&.epr-icn-activities":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -4)"},"&.epr-icn-animals_nature":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -1)"},"&.epr-icn-flags":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -7)"},"&.epr-icn-food_drink":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -2)"},"&.epr-icn-objects":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -5)"},"&.epr-icn-smileys_people":{backgroundPositionX:"0px"},"&.epr-icn-symbols":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -6)"},"&.epr-icn-travel_places":{backgroundPositionX:"calc(var(--epr-category-navigation-button-size) * -3)"}}},Ol("catBtn",bCe),{".epr-dark-theme":oa({},k8),".epr-auto-theme":oa({},k8)}));function xCe(){var e=h.exports.useState(null),t=e[0],n=e[1],a=mCe();fCe(n);var r=_x(),i=qj(),o=K5(),c=pCe();return h.exports.createElement("div",{className:mn(wCe.nav),role:"tablist","aria-label":"Category navigation",id:"epr-category-nav-id",ref:o},i.map(function(l){var d=Y5(l),u=d===t;if(Mke(l)&&c)return null;var g=!r&&!u;return h.exports.createElement(gCe,{key:d,category:d,isActiveCategory:u,allowNavigation:g,categoryConfig:l,onClick:function(){n(d),a(d)}})}))}var wCe=ra.create({nav:{".":"epr-category-nav",display:"flex",flexDirection:"row",justifyContent:"space-around",padding:"var(--epr-header-padding)"},".epr-search-active":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}},".epr-main:has(input:not(:placeholder-shown))":{nav:{opacity:"0.3",cursor:"default",pointerEvents:"none"}}}),zz="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjgwcHgiIHZpZXdCb3g9IjAgMCAyMCA4MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNNi45OCwxMy41OWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVzMC4yNy0wLjA1LDAuMzctMC4xNWwyLjQyLTIuNDJsMi40MywyLjQzCgljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1YzAuMTQsMCwwLjI3LTAuMDUsMC4zNy0wLjE1YzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1bC0yLjQzLTIuNDNMMTMuMzIsOAoJYzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1Yy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMGwtMi40MiwyLjQyTDcuNzQsNy4yN2MtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDAKCWMtMC4yMSwwLjIxLTAuMjEsMC41NCwwLDAuNzVsMi40MSwyLjQxbC0yLjQyLDIuNDJDNi43NywxMy4wNSw2Ljc3LDEzLjM5LDYuOTgsMTMuNTlMNi45OCwxMy41OXoiLz4KPHBhdGggZmlsbD0iIzg2ODY4NiIgZD0iTTEwLjE1LDE4LjQzYzQuNDEsMCw4LTMuNTksOC04YzAtNC40MS0zLjU5LTgtOC04Yy00LjQxLDAtOCwzLjU5LTgsOEMyLjE1LDE0Ljg0LDUuNzQsMTguNDMsMTAuMTUsMTguNDN6CgkgTTEwLjE1LDMuNDljMy44MywwLDYuOTQsMy4xMSw2Ljk0LDYuOTRjMCwzLjgzLTMuMTEsNi45NC02Ljk0LDYuOTRjLTMuODMsMC02Ljk0LTMuMTEtNi45NC02Ljk0QzMuMjEsNi42LDYuMzMsMy40OSwxMC4xNSwzLjQ5CglMMTAuMTUsMy40OXoiLz4KPHBhdGggZmlsbD0iIzMzNzFCNyIgZD0iTTYuOTgsMzMuNTljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1czAuMjctMC4wNSwwLjM3LTAuMTVsMi40Mi0yLjQybDIuNDMsMi40MwoJYzAuMSwwLjEsMC4yNCwwLjE1LDAuMzcsMC4xNWMwLjE0LDAsMC4yNy0wLjA1LDAuMzctMC4xNWMwLjIxLTAuMjEsMC4yMS0wLjU0LDAtMC43NWwtMi40My0yLjQzTDEzLjMyLDI4CgljMC4yMS0wLjIxLDAuMjEtMC41NCwwLTAuNzVjLTAuMjEtMC4yMS0wLjU0LTAuMjEtMC43NSwwbC0yLjQyLDIuNDJsLTIuNDEtMi40MWMtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDAKCWMtMC4yMSwwLjIxLTAuMjEsMC41NCwwLDAuNzVsMi40MSwyLjQxbC0yLjQyLDIuNDJDNi43NywzMy4wNSw2Ljc3LDMzLjM5LDYuOTgsMzMuNTlMNi45OCwzMy41OXoiLz4KPHBhdGggZmlsbD0iIzMzNzFCNyIgZD0iTTEwLjE1LDM4LjQzYzQuNDEsMCw4LTMuNTksOC04YzAtNC40MS0zLjU5LTgtOC04Yy00LjQxLDAtOCwzLjU5LTgsOEMyLjE1LDM0Ljg0LDUuNzQsMzguNDMsMTAuMTUsMzguNDN6CgkgTTEwLjE1LDIzLjQ5YzMuODMsMCw2Ljk0LDMuMTEsNi45NCw2Ljk0YzAsMy44My0zLjExLDYuOTQtNi45NCw2Ljk0Yy0zLjgzLDAtNi45NC0zLjExLTYuOTQtNi45NAoJQzMuMjEsMjYuNiw2LjMzLDIzLjQ5LDEwLjE1LDIzLjQ5TDEwLjE1LDIzLjQ5eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNNi45OCw1My41OWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVzMC4yNy0wLjA1LDAuMzctMC4xNWwyLjQyLTIuNDJsMi40MywyLjQzCgljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1YzAuMTQsMCwwLjI3LTAuMDUsMC4zNy0wLjE1YzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1bC0yLjQzLTIuNDNMMTMuMzIsNDgKCWMwLjIxLTAuMjEsMC4yMS0wLjU0LDAtMC43NWMtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDBsLTIuNDIsMi40MmwtMi40MS0yLjQxYy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMAoJYy0wLjIxLDAuMjEtMC4yMSwwLjU0LDAsMC43NWwyLjQxLDIuNDFsLTIuNDIsMi40MkM2Ljc3LDUzLjA1LDYuNzcsNTMuMzksNi45OCw1My41OUw2Ljk4LDUzLjU5eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNMTAuMTUsNTguNDNjNC40MSwwLDgtMy41OSw4LThjMC00LjQxLTMuNTktOC04LThjLTQuNDEsMC04LDMuNTktOCw4QzIuMTUsNTQuODQsNS43NCw1OC40MywxMC4xNSw1OC40M3oKCSBNMTAuMTUsNDMuNDljMy44MywwLDYuOTQsMy4xMSw2Ljk0LDYuOTRjMCwzLjgzLTMuMTEsNi45NC02Ljk0LDYuOTRjLTMuODMsMC02Ljk0LTMuMTEtNi45NC02Ljk0CglDMy4yMSw0Ni42LDYuMzMsNDMuNDksMTAuMTUsNDMuNDlMMTAuMTUsNDMuNDl6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik02Ljk4LDczLjU5YzAuMSwwLjEsMC4yNCwwLjE1LDAuMzcsMC4xNXMwLjI3LTAuMDUsMC4zNy0wLjE1bDIuNDItMi40MmwyLjQzLDIuNDMKCWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVjMC4xNCwwLDAuMjctMC4wNSwwLjM3LTAuMTVjMC4yMS0wLjIxLDAuMjEtMC41NCwwLTAuNzVsLTIuNDMtMi40M0wxMy4zMiw2OAoJYzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1Yy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMGwtMi40MiwyLjQybC0yLjQxLTIuNDFjLTAuMjEtMC4yMS0wLjU0LTAuMjEtMC43NSwwCgljLTAuMjEsMC4yMS0wLjIxLDAuNTQsMCwwLjc1bDIuNDEsMi40MWwtMi40MiwyLjQyQzYuNzcsNzMuMDUsNi43Nyw3My4zOSw2Ljk4LDczLjU5TDYuOTgsNzMuNTl6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik0xMC4xNSw3OC40M2M0LjQxLDAsOC0zLjU5LDgtOGMwLTQuNDEtMy41OS04LTgtOGMtNC40MSwwLTgsMy41OS04LDhDMi4xNSw3NC44NCw1Ljc0LDc4LjQzLDEwLjE1LDc4LjQzegoJIE0xMC4xNSw2My40OWMzLjgzLDAsNi45NCwzLjExLDYuOTQsNi45NGMwLDMuODMtMy4xMSw2Ljk0LTYuOTQsNi45NGMtMy44MywwLTYuOTQtMy4xMS02Ljk0LTYuOTQKCUMzLjIxLDY2LjYsNi4zMyw2My40OSwxMC4xNSw2My40OUwxMC4xNSw2My40OXoiLz4KPC9zdmc+";function vCe(){var e=uz();return h.exports.createElement(Mh,{className:mn(C8.btnClearSearch,Qc.visibleOnSearchOnly),onClick:e,"aria-label":"Clear",title:"Clear"},h.exports.createElement("div",{className:mn(C8.icnClearnSearch)}))}var _Ce={":hover":{"> .epr-icn-clear-search":{backgroundPositionY:"-60px"}}},C8=ra.create(oa({btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearnSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:"url("+zz+")",":hover":{backgroundPositionY:"-20px"},":focus":{backgroundPositionY:"-20px"}}},Ol("icnClearnSearch",{backgroundPositionY:"-40px"}),Ol("btnClearSearch",_Ce))),pv=dr(tn.emojiPicker)+" "+dr(tn.emojiList),Fz=["button",dr(tn.emoji)].join(""),NCe=dr(tn.category);function SCe(e){var t=e.value;if(!t)return null;var n=kCe(t);return h.exports.createElement("style",null,`
`+pv+" "+Fz+` {
display: none;
}
`+pv+" "+n+` {
display: flex;
}
`+pv+" "+NCe+":not(:has("+n+`)) {
display: none;
}
`)}function kCe(e){return[Fz,'[data-full-name*="',c_(e),'"]'].join("")}var CCe="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCAyMCA0MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzg2ODY4NiIgZD0iTTEyLDguODFjMCwyLjA4LTEuNjgsMy43Ni0zLjc2LDMuNzZjLTIuMDgsMC0zLjc2LTEuNjgtMy43Ni0zLjc2CgljMC0yLjA4LDEuNjgtMy43NiwzLjc2LTMuNzZDMTAuMzIsNS4wNSwxMiw2LjczLDEyLDguODF6IE0xMS4yMywxMi43MmMtMC44MywwLjY0LTEuODcsMS4wMS0yLjk5LDEuMDFjLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTIKCWMwLTIuNzIsMi4yLTQuOTIsNC45Mi00LjkyYzIuNzIsMCw0LjkyLDIuMiw0LjkyLDQuOTJjMCwxLjEzLTAuMzgsMi4xNi0xLjAxLDIuOTlsMy45NCwzLjkzYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyCgljLTAuMjUsMC4yNS0wLjY2LDAuMjUtMC45MiwwTDExLjIzLDEyLjcyeiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0MwQzBCRiIgZD0iTTEyLDI4LjgxYzAsMi4wOC0xLjY4LDMuNzYtMy43NiwzLjc2Yy0yLjA4LDAtMy43Ni0xLjY4LTMuNzYtMy43NgoJYzAtMi4wOCwxLjY4LTMuNzYsMy43Ni0zLjc2QzEwLjMyLDI1LjA1LDEyLDI2LjczLDEyLDI4LjgxeiBNMTEuMjMsMzIuNzJjLTAuODMsMC42NC0xLjg3LDEuMDEtMi45OSwxLjAxCgljLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTJjMC0yLjcyLDIuMi00LjkyLDQuOTItNC45MmMyLjcyLDAsNC45MiwyLjIsNC45Miw0LjkyYzAsMS4xMy0wLjM4LDIuMTYtMS4wMSwyLjk5bDMuOTQsMy45MwoJYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyYy0wLjI1LDAuMjUtMC42NiwwLjI1LTAuOTIsMEwxMS4yMywzMi43MnoiLz4KPC9zdmc+";function ECe(){return h.exports.createElement("div",{className:mn(TCe.icnSearch)})}var TCe=ra.create(oa({icnSearch:{".":"epr-icn-search",content:"",position:"absolute",top:"50%",left:"var(--epr-search-bar-inner-padding)",transform:"translateY(-50%)",width:"20px",height:"20px",backgroundRepeat:"no-repeat",backgroundPosition:"0 0",backgroundSize:"20px",backgroundImage:"url("+CCe+")"}},Ol("icnSearch",{backgroundPositionY:"-20px"})));function LCe(){var e=Qj(),t=eS();return e?null:h.exports.createElement(Rz,{className:mn(Ig.overlay)},h.exports.createElement(DCe,null),t?h.exports.createElement(jz,null):null)}function DCe(){var e=h.exports.useState(0),t=e[0],n=e[1],a=Kc(),r=Gl(),i=lSe(),o=dSe(),c=QSe(),l=c.statusSearchResults,d=c.searchTerm,u=c.onChange,g=r==null?void 0:r.current,y=g==null?void 0:g.value;return h.exports.createElement(Lx,{className:mn(Ig.searchContainer)},h.exports.createElement(SCe,{value:y}),h.exports.createElement("input",{autoFocus:o,"aria-label":"Type to search for an emoji",onFocus:a,className:mn(Ig.search),type:"text","aria-controls":"epr-search-id",placeholder:i,onChange:function(v){n(t+1),setTimeout(function(){var S,m;u((S=v==null||(m=v.target)==null?void 0:m.value)!=null?S:y)})},ref:r}),d?h.exports.createElement("div",{role:"status",className:mn("epr-status-search-results",Ig.visuallyHidden),"aria-live":"polite",id:"epr-search-id","aria-atomic":"true"},l):null,h.exports.createElement(ECe,null),h.exports.createElement(vCe,null))}var Ig=ra.create(oa({overlay:{padding:"var(--epr-header-padding)",zIndex:"var(--epr-header-overlay-z-index)"},searchContainer:{".":"epr-search-container",flex:"1",display:"block",minWidth:"0"},visuallyHidden:{clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"},search:{outline:"none",transition:"all 0.2s ease-in-out",color:"var(--epr-search-input-text-color)",borderRadius:"var(--epr-search-input-border-radius)",padding:"var(--epr-search-input-padding)",height:"var(--epr-search-input-height)",backgroundColor:"var(--epr-search-input-bg-color)",border:"1px solid var(--epr-search-input-bg-color)",width:"100%",":focus":{backgroundColor:"var(--epr-search-input-bg-color-active)",border:"1px solid var(--epr-search-border-color)"},"::placeholder":{color:"var(--epr-search-input-placeholder-color)"}},btnClearSearch:{".":"epr-btn-clear-search",position:"absolute",right:"var(--epr-search-bar-inner-padding)",height:"30px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",top:"50%",transform:"translateY(-50%)",padding:"0",borderRadius:"50%",":hover":{background:"var(--epr-hover-bg-color)"},":focus":{background:"var(--epr-hover-bg-color)"}},icnClearnSearch:{".":"epr-icn-clear-search",backgroundColor:"transparent",backgroundRepeat:"no-repeat",backgroundSize:"20px",height:"20px",width:"20px",backgroundImage:"url("+zz+")",":hover":{backgroundPositionY:"-20px"},":focus":{backgroundPositionY:"-20px"}}},Ol("icnClearnSearch",{backgroundPositionY:"-40px"}),Ol("btnClearSearch",{":hover > .epr-icn-clear-search":{backgroundPositionY:"-60px"}})));function MCe(){return h.exports.createElement(Lx,{className:mn("epr-header",Qc.hiddenOnReactions)},h.exports.createElement(LCe,null),h.exports.createElement(xCe,null))}function ACe(e){return h.exports.createElement(ASe,null,h.exports.createElement(C5e,null),h.exports.createElement(sSe,Object.assign({},e),h.exports.createElement(ICe,null)))}function ICe(){var e=wx(),t=e[0],n=Yj(),a=h.exports.useState(!t),r=a[0],i=a[1],o=fSe();return h.exports.useEffect(function(){t&&!n||r||i(!0)},[r,n,t]),o?h.exports.createElement(hke,null,h.exports.createElement(Hke,null),h.exports.createElement(OCe,{renderAll:r})):null}function OCe(e){var t=e.renderAll;return t?h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(MCe,null),h.exports.createElement(eCe,null),h.exports.createElement(cCe,null)):null}var PCe=h.exports.memo(ACe,Pj),RCe=function(e){N5e(t,e);function t(a){var r;return r=e.call(this,a)||this,r.state={hasError:!1},r}t.getDerivedStateFromError=function(){return{hasError:!0}};var n=t.prototype;return n.componentDidCatch=function(r,i){console.error("Emoji Picker React failed to render:",r,i)},n.render=function(){return this.state.hasError?null:this.props.children},t}(h.exports.Component);function jCe(e){var t=oSe({onEmojiClick:e.onEmojiClick,onReactionClick:e.onReactionClick,onSkinToneChange:e.onSkinToneChange});return h.exports.createElement(RCe,null,h.exports.createElement(Vj.Provider,{value:t},h.exports.createElement(PCe,Object.assign({},e))))}var zCe=["2g1c","2 girls 1 cup","acrotomophilia","alabama hot pocket","alaskan pipeline","anal","anilingus","anus","apeshit","arsehole","ass","asshole","assmunch","auto erotic","autoerotic","babeland","baby batter","baby juice","ball gag","ball gravy","ball kicking","ball licking","ball sack","ball sucking","bangbros","bangbus","bareback","barely legal","barenaked","bastard","bastardo","bastinado","bbw","bdsm","beaner","beaners","beaver cleaver","beaver lips","beastiality","bestiality","big black","big breasts","big knockers","big tits","bimbos","birdlock","bitch","bitches","black cock","blonde action","blonde on blonde action","blowjob","blow job","blow your load","blue waffle","blumpkin","bollocks","bondage","boner","boob","boobs","booty call","brown showers","brunette action","bukkake","bulldyke","bullet vibe","bullshit","bung hole","bunghole","busty","butt","buttcheeks","butthole","camel toe","camgirl","camslut","camwhore","carpet muncher","carpetmuncher","chocolate rosebuds","cialis","circlejerk","cleveland steamer","clit","clitoris","clover clamps","clusterfuck","cock","cocks","coprolagnia","coprophilia","cornhole","coon","coons","creampie","cum","cumming","cumshot","cumshots","cunnilingus","cunt","darkie","date rape","daterape","deep throat","deepthroat","dendrophilia","dick","dildo","dingleberry","dingleberries","dirty pillows","dirty sanchez","doggie style","doggiestyle","doggy style","doggystyle","dog style","dolcett","domination","dominatrix","dommes","donkey punch","double dong","double penetration","dp action","dry hump","dvda","eat my ass","ecchi","ejaculation","erotic","erotism","escort","eunuch","fag","faggot","fecal","felch","fellatio","feltch","female squirting","femdom","figging","fingerbang","fingering","fisting","foot fetish","footjob","frotting","fuck","fuck buttons","fuckin","fucking","fucktards","fudge packer","fudgepacker","futanari","gangbang","gang bang","gay sex","genitals","giant cock","girl on","girl on top","girls gone wild","goatcx","goatse","god damn","gokkun","golden shower","goodpoop","goo girl","goregasm","grope","group sex","g-spot","guro","hand job","handjob","hard core","hardcore","hentai","homoerotic","honkey","hooker","horny","hot carl","hot chick","how to kill","how to murder","huge fat","humping","incest","intercourse","jack off","jail bait","jailbait","jelly donut","jerk off","jigaboo","jiggaboo","jiggerboo","jizz","juggs","kike","kinbaku","kinkster","kinky","knobbing","leather restraint","leather straight jacket","lemon party","livesex","lolita","lovemaking","make me come","male squirting","masturbate","masturbating","masturbation","menage a trois","milf","missionary position","mong","motherfucker","mound of venus","mr hands","muff diver","muffdiving","nambla","nawashi","negro","neonazi","nigga","nigger","nig nog","nimphomania","nipple","nipples","nsfw","nsfw images","nude","nudity","nutten","nympho","nymphomania","octopussy","omorashi","one cup two girls","one guy one jar","orgasm","orgy","paedophile","paki","panties","panty","pedobear","pedophile","pegging","penis","phone sex","piece of shit","pikey","pissing","piss pig","pisspig","playboy","pleasure chest","pole smoker","ponyplay","poof","poon","poontang","punany","poop chute","poopchute","porn","porno","pornography","prince albert piercing","pthc","pubes","pussy","queaf","queef","quim","raghead","raging boner","rape","raping","rapist","rectum","reverse cowgirl","rimjob","rimming","rosy palm","rosy palm and her 5 sisters","rusty trombone","sadism","santorum","scat","schlong","scissoring","semen","sex","sexcam","sexo","sexy","sexual","sexually","sexuality","shaved beaver","shaved pussy","shemale","shibari","shit","shitblimp","shitty","shota","shrimping","skeet","slanteye","slut","s&m","smut","snatch","snowballing","sodomize","sodomy","spastic","spic","splooge","splooge moose","spooge","spread legs","spunk","strap on","strapon","strappado","strip club","style doggy","suck","sucks","suicide girls","sultry women","swastika","swinger","tainted love","taste my","tea bagging","threesome","throating","thumbzilla","tied up","tight white","tit","tits","titties","titty","tongue in a","topless","tosser","towelhead","tranny","tribadism","tub girl","tubgirl","tushy","twat","twink","twinkie","two girls one cup","undressing","upskirt","urethra play","urophilia","vagina","venus mound","viagra","vibrator","violet wand","vorarephilia","voyeur","voyeurweb","voyuer","vulva","wank","wetback","wet dream","white power","whore","worldsex","wrapping men","wrinkled starfish","xx","xxx","yaoi","yellow showers","yiffy","zoophilia","\u{1F595}"];const FCe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xF6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",$Ce="\u03B5\u03BB1\u03C52\u0431\u04331\u0435\u043B3\u0434\u0435\u0442\u04384\u0435\u044E2\u043A\u0430\u0442\u043E\u043B\u0438\u043A6\u043E\u043C3\u043C\u043A\u04342\u043E\u043D1\u0441\u043A\u0432\u04306\u043E\u043D\u043B\u0430\u0439\u043D5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043A\u04403\u049B\u0430\u04373\u0570\u0561\u05753\u05D9\u05E9\u05E8\u05D0\u05DC5\u05E7\u05D5\u05DD3\u0627\u0628\u0648\u0638\u0628\u064A5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062F\u06464\u0628\u062D\u0631\u064A\u06465\u062C\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062F\u064A\u06296\u0639\u0644\u064A\u0627\u06465\u0645\u063A\u0631\u06285\u0645\u0627\u0631\u0627\u062A5\u06CC\u0631\u0627\u06465\u0628\u0627\u0631\u062A2\u0632\u0627\u06314\u064A\u062A\u06433\u06BE\u0627\u0631\u062A5\u062A\u0648\u0646\u06334\u0633\u0648\u062F\u0627\u06463\u0631\u064A\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064A\u06466\u0642\u0637\u06313\u0643\u0627\u062B\u0648\u0644\u064A\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064A\u0633\u064A\u06275\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067E\u0627\u06A9\u0633\u062A\u0627\u06467\u0680\u0627\u0631\u062A4\u0915\u0949\u092E3\u0928\u0947\u091F3\u092D\u093E\u0930\u09240\u092E\u094D3\u094B\u09245\u0938\u0902\u0917\u0920\u09285\u09AC\u09BE\u0982\u09B2\u09BE5\u09AD\u09BE\u09B0\u09A42\u09F0\u09A44\u0A2D\u0A3E\u0A30\u0A244\u0AAD\u0ABE\u0AB0\u0AA44\u0B2D\u0B3E\u0B30\u0B244\u0B87\u0BA8\u0BCD\u0BA4\u0BBF\u0BAF\u0BBE6\u0BB2\u0B99\u0BCD\u0B95\u0BC86\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD11\u0C2D\u0C3E\u0C30\u0C24\u0C4D5\u0CAD\u0CBE\u0CB0\u0CA44\u0D2D\u0D3E\u0D30\u0D24\u0D025\u0DBD\u0D82\u0D9A\u0DCF4\u0E04\u0E2D\u0E213\u0E44\u0E17\u0E223\u0EA5\u0EB2\u0EA73\u10D2\u10D42\u307F\u3093\u306A3\u30A2\u30DE\u30BE\u30F34\u30AF\u30E9\u30A6\u30C94\u30B0\u30FC\u30B0\u30EB4\u30B3\u30E02\u30B9\u30C8\u30A23\u30BB\u30FC\u30EB3\u30D5\u30A1\u30C3\u30B7\u30E7\u30F36\u30DD\u30A4\u30F3\u30C84\u4E16\u754C2\u4E2D\u4FE11\u56FD1\u570B1\u6587\u7F513\u4E9A\u9A6C\u900A3\u4F01\u4E1A2\u4F5B\u5C712\u4FE1\u606F2\u5065\u5EB72\u516B\u53662\u516C\u53F81\u76CA2\u53F0\u6E7E1\u70632\u5546\u57CE1\u5E971\u68072\u5609\u91CC0\u5927\u9152\u5E975\u5728\u7EBF2\u5927\u62FF2\u5929\u4E3B\u65593\u5A31\u4E502\u5BB6\u96FB2\u5E7F\u4E1C2\u5FAE\u535A2\u6148\u55842\u6211\u7231\u4F603\u624B\u673A2\u62DB\u80582\u653F\u52A11\u5E9C2\u65B0\u52A0\u57612\u95FB2\u65F6\u5C1A2\u66F8\u7C4D2\u673A\u67842\u6DE1\u9A6C\u95213\u6E38\u620F2\u6FB3\u95802\u70B9\u770B2\u79FB\u52A82\u7EC4\u7EC7\u673A\u67844\u7F51\u57401\u5E971\u7AD91\u7EDC2\u8054\u901A2\u8C37\u6B4C2\u8D2D\u72692\u901A\u8CA92\u96C6\u56E22\u96FB\u8A0A\u76C8\u79D14\u98DE\u5229\u6D663\u98DF\u54C12\u9910\u53852\u9999\u683C\u91CC\u62C93\u6E2F2\uB2F7\uB1371\uCEF42\uC0BC\uC1312\uD55C\uAD6D2",Wu=(e,t)=>{for(const n in t)e[n]=t[n];return e},u_="numeric",f_="ascii",m_="alpha",Og="asciinumeric",Y0="alphanumeric",p_="domain",$z="emoji",BCe="scheme",HCe="slashscheme",E8="whitespace";function UCe(e,t){return e in t||(t[e]=[]),t[e]}function yc(e,t,n){t[u_]&&(t[Og]=!0,t[Y0]=!0),t[f_]&&(t[Og]=!0,t[m_]=!0),t[Og]&&(t[Y0]=!0),t[m_]&&(t[Y0]=!0),t[Y0]&&(t[p_]=!0),t[$z]&&(t[p_]=!0);for(const a in t){const r=UCe(a,n);r.indexOf(e)<0&&r.push(e)}}function VCe(e,t){const n={};for(const a in t)t[a].indexOf(e)>=0&&(n[a]=!0);return n}function Gr(e){e===void 0&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}Gr.groups={};Gr.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let a=0;a<t.jr.length;a++){const r=t.jr[a][0],i=t.jr[a][1];if(i&&r.test(e))return i}return t.jd},has(e,t){return t===void 0&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,a){for(let r=0;r<e.length;r++)this.tt(e[r],t,n,a)},tr(e,t,n,a){a=a||Gr.groups;let r;return t&&t.j?r=t:(r=new Gr(t),n&&a&&yc(t,n,a)),this.jr.push([e,r]),r},ts(e,t,n,a){let r=this;const i=e.length;if(!i)return r;for(let o=0;o<i-1;o++)r=r.tt(e[o]);return r.tt(e[i-1],t,n,a)},tt(e,t,n,a){a=a||Gr.groups;const r=this;if(t&&t.j)return r.j[e]=t,t;const i=t;let o,c=r.go(e);if(c?(o=new Gr,Wu(o.j,c.j),o.jr.push.apply(o.jr,c.jr),o.jd=c.jd,o.t=c.t):o=new Gr,i){if(a)if(o.t&&typeof o.t=="string"){const l=Wu(VCe(o.t,a),n);yc(i,l,a)}else n&&yc(i,n,a);o.t=i}return r.j[e]=o,o}};const Jt=(e,t,n,a,r)=>e.ta(t,n,a,r),hs=(e,t,n,a,r)=>e.tr(t,n,a,r),T8=(e,t,n,a,r)=>e.ts(t,n,a,r),it=(e,t,n,a,r)=>e.tt(t,n,a,r),Zi="WORD",h_="UWORD",Pp="LOCALHOST",g_="TLD",b_="UTLD",Pg="SCHEME",zd="SLASH_SCHEME",cS="NUM",Bz="WS",dS="NL",Hm="OPENBRACE",Um="CLOSEBRACE",sb="OPENBRACKET",ib="CLOSEBRACKET",ob="OPENPAREN",lb="CLOSEPAREN",cb="OPENANGLEBRACKET",db="CLOSEANGLEBRACKET",ub="FULLWIDTHLEFTPAREN",fb="FULLWIDTHRIGHTPAREN",mb="LEFTCORNERBRACKET",pb="RIGHTCORNERBRACKET",hb="LEFTWHITECORNERBRACKET",gb="RIGHTWHITECORNERBRACKET",bb="FULLWIDTHLESSTHAN",yb="FULLWIDTHGREATERTHAN",xb="AMPERSAND",wb="APOSTROPHE",vb="ASTERISK",nl="AT",_b="BACKSLASH",Nb="BACKTICK",Sb="CARET",sl="COLON",uS="COMMA",kb="DOLLAR",hi="DOT",Cb="EQUALS",fS="EXCLAMATION",gi="HYPHEN",Eb="PERCENT",Tb="PIPE",Lb="PLUS",Db="POUND",Mb="QUERY",mS="QUOTE",pS="SEMI",bi="SLASH",Vm="TILDE",Ab="UNDERSCORE",Hz="EMOJI",Ib="SYM";var Uz=Object.freeze({__proto__:null,WORD:Zi,UWORD:h_,LOCALHOST:Pp,TLD:g_,UTLD:b_,SCHEME:Pg,SLASH_SCHEME:zd,NUM:cS,WS:Bz,NL:dS,OPENBRACE:Hm,CLOSEBRACE:Um,OPENBRACKET:sb,CLOSEBRACKET:ib,OPENPAREN:ob,CLOSEPAREN:lb,OPENANGLEBRACKET:cb,CLOSEANGLEBRACKET:db,FULLWIDTHLEFTPAREN:ub,FULLWIDTHRIGHTPAREN:fb,LEFTCORNERBRACKET:mb,RIGHTCORNERBRACKET:pb,LEFTWHITECORNERBRACKET:hb,RIGHTWHITECORNERBRACKET:gb,FULLWIDTHLESSTHAN:bb,FULLWIDTHGREATERTHAN:yb,AMPERSAND:xb,APOSTROPHE:wb,ASTERISK:vb,AT:nl,BACKSLASH:_b,BACKTICK:Nb,CARET:Sb,COLON:sl,COMMA:uS,DOLLAR:kb,DOT:hi,EQUALS:Cb,EXCLAMATION:fS,HYPHEN:gi,PERCENT:Eb,PIPE:Tb,PLUS:Lb,POUND:Db,QUERY:Mb,QUOTE:mS,SEMI:pS,SLASH:bi,TILDE:Vm,UNDERSCORE:Ab,EMOJI:Hz,SYM:Ib});const Nd=/[a-z]/,hv=/\p{L}/u,gv=/\p{Emoji}/u,bv=/\d/,L8=/\s/,D8=`
`,WCe="\uFE0F",YCe="\u200D";let G0=null,q0=null;function GCe(e){e===void 0&&(e=[]);const t={};Gr.groups=t;const n=new Gr;G0==null&&(G0=M8(FCe)),q0==null&&(q0=M8($Ce)),it(n,"'",wb),it(n,"{",Hm),it(n,"}",Um),it(n,"[",sb),it(n,"]",ib),it(n,"(",ob),it(n,")",lb),it(n,"<",cb),it(n,">",db),it(n,"\uFF08",ub),it(n,"\uFF09",fb),it(n,"\u300C",mb),it(n,"\u300D",pb),it(n,"\u300E",hb),it(n,"\u300F",gb),it(n,"\uFF1C",bb),it(n,"\uFF1E",yb),it(n,"&",xb),it(n,"*",vb),it(n,"@",nl),it(n,"`",Nb),it(n,"^",Sb),it(n,":",sl),it(n,",",uS),it(n,"$",kb),it(n,".",hi),it(n,"=",Cb),it(n,"!",fS),it(n,"-",gi),it(n,"%",Eb),it(n,"|",Tb),it(n,"+",Lb),it(n,"#",Db),it(n,"?",Mb),it(n,'"',mS),it(n,"/",bi),it(n,";",pS),it(n,"~",Vm),it(n,"_",Ab),it(n,"\\",_b);const a=hs(n,bv,cS,{[u_]:!0});hs(a,bv,a);const r=hs(n,Nd,Zi,{[f_]:!0});hs(r,Nd,r);const i=hs(n,hv,h_,{[m_]:!0});hs(i,Nd),hs(i,hv,i);const o=hs(n,L8,Bz,{[E8]:!0});it(n,D8,dS,{[E8]:!0}),it(o,D8),hs(o,L8,o);const c=hs(n,gv,Hz,{[$z]:!0});hs(c,gv,c),it(c,WCe,c);const l=it(c,YCe);hs(l,gv,c);const d=[[Nd,r]],u=[[Nd,null],[hv,i]];for(let g=0;g<G0.length;g++)qo(n,G0[g],g_,Zi,d);for(let g=0;g<q0.length;g++)qo(n,q0[g],b_,h_,u);yc(g_,{tld:!0,ascii:!0},t),yc(b_,{utld:!0,alpha:!0},t),qo(n,"file",Pg,Zi,d),qo(n,"mailto",Pg,Zi,d),qo(n,"http",zd,Zi,d),qo(n,"https",zd,Zi,d),qo(n,"ftp",zd,Zi,d),qo(n,"ftps",zd,Zi,d),yc(Pg,{scheme:!0,ascii:!0},t),yc(zd,{slashscheme:!0,ascii:!0},t),e=e.sort((g,y)=>g[0]>y[0]?1:-1);for(let g=0;g<e.length;g++){const y=e[g][0],v=e[g][1]?{[BCe]:!0}:{[HCe]:!0};y.indexOf("-")>=0?v[p_]=!0:Nd.test(y)?bv.test(y)?v[Og]=!0:v[f_]=!0:v[u_]=!0,T8(n,y,y,v)}return T8(n,"localhost",Pp,{ascii:!0}),n.jd=new Gr(Ib),{start:n,tokens:Wu({groups:t},Uz)}}function qCe(e,t){const n=ZCe(t.replace(/[A-Z]/g,c=>c.toLowerCase())),a=n.length,r=[];let i=0,o=0;for(;o<a;){let c=e,l=null,d=0,u=null,g=-1,y=-1;for(;o<a&&(l=c.go(n[o]));)c=l,c.accepts()?(g=0,y=0,u=c):g>=0&&(g+=n[o].length,y++),d+=n[o].length,i+=n[o].length,o++;i-=g,o-=y,d-=g,r.push({t:u.t,v:t.slice(i-d,i),s:i-d,e:i})}return r}function ZCe(e){const t=[],n=e.length;let a=0;for(;a<n;){let r=e.charCodeAt(a),i,o=r<55296||r>56319||a+1===n||(i=e.charCodeAt(a+1))<56320||i>57343?e[a]:e.slice(a,a+2);t.push(o),a+=o.length}return t}function qo(e,t,n,a,r){let i;const o=t.length;for(let c=0;c<o-1;c++){const l=t[c];e.j[l]?i=e.j[l]:(i=new Gr(a),i.jr=r.slice(),e.j[l]=i),e=i}return i=new Gr(n),i.jr=r.slice(),e.j[t[o-1]]=i,i}function M8(e){const t=[],n=[];let a=0,r="0123456789";for(;a<e.length;){let i=0;for(;r.indexOf(e[a+i])>=0;)i++;if(i>0){t.push(n.join(""));for(let o=parseInt(e.substring(a,a+i),10);o>0;o--)n.pop();a+=i}else n.push(e[a]),a++}return t}const Rp={defaultProtocol:"http",events:null,format:A8,formatHref:A8,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function hS(e,t){t===void 0&&(t=null);let n=Wu({},Rp);e&&(n=Wu(n,e instanceof hS?e.o:e));const a=n.ignoreTags,r=[];for(let i=0;i<a.length;i++)r.push(a[i].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=r}hS.prototype={o:Rp,ignoreTags:[],defaultRender(e){return e},check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const a=t!=null;let r=this.o[e];return r&&(typeof r=="object"?(r=n.t in r?r[n.t]:Rp[e],typeof r=="function"&&a&&(r=r(t,n))):typeof r=="function"&&a&&(r=r(t,n.t,n)),r)},getObj(e,t,n){let a=this.o[e];return typeof a=="function"&&t!=null&&(a=a(t,n.t,n)),a},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}};function A8(e){return e}function Vz(e,t){this.t="token",this.v=e,this.tk=t}Vz.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),a=e.get("format",t,this);return n&&a.length>n?a.substring(0,n)+"\u2026":a},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return e===void 0&&(e=Rp.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),a=e.get("formatHref",n,this),r=e.get("tagName",n,t),i=this.toFormattedString(e),o={},c=e.get("className",n,t),l=e.get("target",n,t),d=e.get("rel",n,t),u=e.getObj("attributes",n,t),g=e.getObj("events",n,t);return o.href=a,c&&(o.class=c),l&&(o.target=l),d&&(o.rel=d),u&&Wu(o,u),{tagName:r,attributes:o,content:i,eventListeners:g}}};function Dx(e,t){class n extends Vz{constructor(r,i){super(r,i),this.t=e}}for(const a in t)n.prototype[a]=t[a];return n.t=e,n}const I8=Dx("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),O8=Dx("text"),QCe=Dx("nl"),Z0=Dx("url",{isLink:!0,toHref(e){return e===void 0&&(e=Rp.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==Pp&&e[1].t===sl}}),gs=e=>new Gr(e);function JCe(e){let{groups:t}=e;const n=t.domain.concat([xb,vb,nl,_b,Nb,Sb,kb,Cb,gi,cS,Eb,Tb,Lb,Db,bi,Ib,Vm,Ab]),a=[wb,sl,uS,hi,fS,Mb,mS,pS,cb,db,Hm,Um,ib,sb,ob,lb,ub,fb,mb,pb,hb,gb,bb,yb],r=[xb,wb,vb,_b,Nb,Sb,kb,Cb,gi,Hm,Um,Eb,Tb,Lb,Db,Mb,bi,Ib,Vm,Ab],i=gs(),o=it(i,Vm);Jt(o,r,o),Jt(o,t.domain,o);const c=gs(),l=gs(),d=gs();Jt(i,t.domain,c),Jt(i,t.scheme,l),Jt(i,t.slashscheme,d),Jt(c,r,o),Jt(c,t.domain,c);const u=it(c,nl);it(o,nl,u),it(l,nl,u),it(d,nl,u);const g=it(o,hi);Jt(g,r,o),Jt(g,t.domain,o);const y=gs();Jt(u,t.domain,y),Jt(y,t.domain,y);const w=it(y,hi);Jt(w,t.domain,y);const v=gs(I8);Jt(w,t.tld,v),Jt(w,t.utld,v),it(u,Pp,v);const S=it(y,gi);Jt(S,t.domain,y),Jt(v,t.domain,y),it(v,hi,w),it(v,gi,S);const m=it(v,sl);Jt(m,t.numeric,I8);const p=it(c,gi),b=it(c,hi);Jt(p,t.domain,c),Jt(b,r,o),Jt(b,t.domain,c);const x=gs(Z0);Jt(b,t.tld,x),Jt(b,t.utld,x),Jt(x,t.domain,c),Jt(x,r,o),it(x,hi,b),it(x,gi,p),it(x,nl,u);const k=it(x,sl),N=gs(Z0);Jt(k,t.numeric,N);const _=gs(Z0),C=gs();Jt(_,n,_),Jt(_,a,C),Jt(C,n,_),Jt(C,a,C),it(x,bi,_),it(N,bi,_);const E=it(l,sl),T=it(d,sl),D=it(T,bi),P=it(D,bi);Jt(l,t.domain,c),it(l,hi,b),it(l,gi,p),Jt(d,t.domain,c),it(d,hi,b),it(d,gi,p),Jt(E,t.domain,_),it(E,bi,_),Jt(P,t.domain,_),Jt(P,n,_),it(P,bi,_);const M=[[Hm,Um],[sb,ib],[ob,lb],[cb,db],[ub,fb],[mb,pb],[hb,gb],[bb,yb]];for(let O=0;O<M.length;O++){const[F,z]=M[O],H=it(_,F);it(C,F,H),it(H,z,_);const A=gs(Z0);Jt(H,n,A);const j=gs();Jt(H,a),Jt(A,n,A),Jt(A,a,j),Jt(j,n,A),Jt(j,a,j),it(A,z,_),it(j,z,_)}return it(i,Pp,x),it(i,dS,QCe),{start:i,tokens:Uz}}function KCe(e,t,n){let a=n.length,r=0,i=[],o=[];for(;r<a;){let c=e,l=null,d=null,u=0,g=null,y=-1;for(;r<a&&!(l=c.go(n[r].t));)o.push(n[r++]);for(;r<a&&(d=l||c.go(n[r].t));)l=null,c=d,c.accepts()?(y=0,g=c):y>=0&&y++,r++,u++;if(y<0)r-=u,r<a&&(o.push(n[r]),r++);else{o.length>0&&(i.push(yv(O8,t,o)),o=[]),r-=y,u-=y;const w=g.t,v=n.slice(r-u,r);i.push(yv(w,t,v))}}return o.length>0&&i.push(yv(O8,t,o)),i}function yv(e,t,n){const a=n[0].s,r=n[n.length-1].e,i=t.slice(a,r);return new e(i,n)}const gr={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function XCe(){gr.scanner=GCe(gr.customSchemes);for(let e=0;e<gr.tokenQueue.length;e++)gr.tokenQueue[e][1]({scanner:gr.scanner});gr.parser=JCe(gr.scanner.tokens);for(let e=0;e<gr.pluginQueue.length;e++)gr.pluginQueue[e][1]({scanner:gr.scanner,parser:gr.parser});gr.initialized=!0}function e9e(e){return gr.initialized||XCe(),KCe(gr.parser.start,e,qCe(gr.scanner.start,e))}function t9e(e,t,n){if(t===void 0&&(t=null),n===void 0&&(n=null),t&&typeof t=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const a=new hS(n),r=e9e(e),i=[];for(let o=0;o<r.length;o++){const c=r[o];c.isLink&&(!t||c.t===t)&&a.check(c)&&i.push(c.toFormattedObject(a))}return i}const ur=()=>s("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M6.24984 10.2439L8.74984 12.7439L13.7498 7.74386M18.3332 10.2439C18.3332 14.8462 14.6022 18.5772 9.99984 18.5772C5.39746 18.5772 1.6665 14.8462 1.6665 10.2439C1.6665 5.64148 5.39746 1.91052 9.99984 1.91052C14.6022 1.91052 18.3332 5.64148 18.3332 10.2439Z",stroke:"#101828",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Zl=({items:e,direction:t,disabled:n,menuClassName:a,hidden:r})=>{const i=e.filter(o=>!o.notShow);return f(jt,{as:"div",className:`relative max-w-[150px] ${r?"hidden":""}`,onClick:o=>o.stopPropagation(),children:[s("div",{className:"",children:s(jt.Button,{disabled:n,className:"inline-flex justify-center px-1 py-3 text-sm font-medium text-gray-700 "+(t=="vert"?"rotate-90":""),children:s(ln,{type:"dots"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:`absolute right-0 z-10 mt-0 w-40 origin-top-right rounded-md bg-white ${i.length?"shadow-lg ring-1":""} ring-black ring-opacity-5 focus:outline-none ${a!=null?a:""}`,children:s("div",{className:i.length>0?"py-1":"",children:i.map((o,c)=>s(jt.Item,{children:({active:l})=>f("button",{onClick:o.onClick,className:`${l?"bg-gray-100 text-gray-900":"text-gray-700"} w-full text-center inline-flex gap-2 items-center px-4 py-2 text-sm whitespace-nowrap`,children:[o==null?void 0:o.icon,o.label]})},c))})})})]})},n9e=e=>{let t=Te(new Date),n=Te(e);return t.diff(n,"days")>1?Te(n).format("Do MMM"):Te(n).format("hh:mm A")};function P8({markMessagesAsRead:D,first:t,virtual:n,last:a,room:r,rooms:i,activeRoomId:o,setActiveRoom:c,setActiveBooking:l,setActiveProperty:d,setMobileChatSection:u,messages:g,deleteRoom:y,archiveRoom:w,unArchiveRoom:v}){const S=new AbortController;let m=new _e;const[p,b]=h.exports.useState(),[x,k]=h.exports.useState([]),[N,_]=lt();N.get("room_id");async function C(){var F,z;await m.setTable("user");const M={id:r==null?void 0:r.other_user_id},O=await m.callRestAPI(M,"GET");return b(((F=O==null?void 0:O.model)==null?void 0:F.is_photo_approved)!==1?null:(z=O==null?void 0:O.model)==null?void 0:z.photo),"yes"}async function E(M){const O=await m.getChats(M),F=O.model.filter(z=>z.unread===1&&z.chat.user_id!==Number(localStorage.getItem("user"))).map(z=>z.id);return D(r.id,F),O.model}async function T(M){const F=(await m.getChats(M)).model.filter(z=>z.unread===1&&z.chat.user_id!==Number(localStorage.getItem("user")));k(F)}async function D(M,O){m.setTable("chat"),await Promise.all(O.map(F=>m.callRestAPI({id:F,unread:0},"PUT"))),k(F=>O.length>F?0:F-O.length)}async function P(){if(d({}),l({}),(r==null?void 0:r.booking_id)!==null){await m.setTable("booking");const M={id:r==null?void 0:r.booking_id},O=await m.callRestAPI(M,"GET");l(O.model),d({})}else{const M=localStorage.getItem("user"),O=[`ergo_property_spaces.id = ${Number(r==null?void 0:r.property_id)} AND ergo_property_spaces.deleted_at IS NULL`],F=await m.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1,user_id:Number(M),where:O,all:!0},"POST",S.signal);Array.isArray(F.list)&&F.list.length>0?(d(F.list[0]),l({})):d({})}}return h.exports.useEffect(()=>{C()},[]),h.exports.useEffect(()=>{(r==null?void 0:r.id)!=="temp"&&T(r.id)},[r]),f("div",{className:`${r.id&&o==r.id?"chat-active ":""} lg:flex w-full justify-between items-center border-b p-3`,id:`chat-tile-btn-${r.id}`,children:[f("div",{onClick:()=>{c(r),u(!0),E(r.id),P()},className:"flex gap-2 mr-2 cursor-pointer items-center justify-between",children:[s("img",{src:p!=null?p:"/default.png",alt:"",className:"h-[48px] w-[48px] rounded-full border-2 border-[#D0D5DD] object-cover"}),f("div",{className:"flex flex-col items-start w-fit",children:[f("h5",{className:"text-sm font-semibold capitalize",children:[t||s(Ut,{width:100})," ",a]}),s("p",{className:"text-xs font-light",children:" "})]})]}),f("div",{className:"flex gap- items-center justify-end relative",children:[(r==null?void 0:r.id)!=="temp"&&x.length>0&&s("span",{className:"bg-my-gradient h-[20px] w-[20px] rounded-full text-center text-xs leading-[1.7] text-white flex items-center justify-center",children:x.length}),s("span",{style:{fontSize:"10px"},className:"font-light w-[50px] block text-center",children:n9e(r.update_at)}),s("div",{className:"block",children:s(Zl,{direction:"vert",items:[{label:"Delete chat",icon:null,onClick:()=>y(r.id)},{label:"Archive chat",icon:s(Se,{}),onClick:()=>w(r.id),notShow:r.is_archive==tl.IS_ARCHIVE},{label:"Unarchive chat",icon:s(Se,{}),onClick:()=>v(r.id),notShow:r.is_archive==tl.NOT_ARCHIVE}]})})]})]})}function a9e({messages:e,messageErr:t}){const{state:n}=h.exports.useContext(Ee);return s("div",{className:"",children:s("div",{className:"flex-grow flex-cols overflow-y-auto tiny-scroll normal-case",children:e&&f("div",{className:"py-2 relative",children:[e.map((a,r)=>{var i,o,c,l,d,u;return s("div",{className:"mb-4 flex",children:f("div",{className:`flex-1 px-2 ${((i=a==null?void 0:a.chat)==null?void 0:i.user_id)===n.user&&"text-right"}`,children:[s("div",{className:"inline-block",children:(o=a==null?void 0:a.chat)!=null&&o.message.startsWith("https://s3.us-east-2.amazonaws.com")?s("div",{className:`${((c=a==null?void 0:a.chat)==null?void 0:c.user_id)===n.user?"":"text-right"} border bg-[#F2F4F7] p-2 rounded-md`,children:s("img",{src:a==null?void 0:a.chat.message,className:"min-h-30 w-[150px] object-cover"})}):s("p",{className:`${((l=a==null?void 0:a.chat)==null?void 0:l.user_id)===n.user?"border-[#F2F4F7] border to-chat":"bg-[#15212A] text-white from-chat"} block text-start break-all rounded-xl p-2 px-6`,children:(d=a==null?void 0:a.chat)==null?void 0:d.message})}),s("div",{className:"pl-4 text-[#8E8E93] text-xs",children:s("small",{className:"text-gray-500",children:Te((u=a==null?void 0:a.chat)==null?void 0:u.timestamp).format("DD-MM, hh:mm A")})})]})},r)}),t&&s("div",{className:"fixed bottom-[6rem] left-0 w-full flex justify-center z-70",children:s("p",{className:"border text-center border-green-500 bg-green-100 text-green-800 text-sm p-3 rounded-xl",children:t})})]})})})}const r9e=({activeRoom:e,getRooms:t,setMessages:n,state:a,setRooms:r,spaceId:i,setShowImagePreviewModal:o,activeBooking:c})=>{const[l,d]=R.useState(""),[u,g]=R.useState(""),[y,w]=R.useState(),[v,S]=R.useState(!1),[m,p]=lt(),{state:b,dispatch:x}=h.exports.useContext(we),k=new _e,N=Qe({photo:ge()}).required(),{register:_,handleSubmit:C,setError:E,formState:{errors:T}}=Oe({resolver:Xe(N)});function D(M){M&&(w(M[0]),d(URL.createObjectURL(M[0])))}async function P(){if(l===""){g("Please select an Image");return}S(!0);const O=await(async F=>{const z=new FormData;z.append("file",F);try{return await k.uploadImage(z)}catch(H){return console.log("err",H),""}})(y);O!=null&&O.id&&S(!1);try{let F=new Date().toISOString().split("T")[0],z=new Date().toISOString().replace("T"," ").split(".")[0],H=null,A=e==null?void 0:e.is_temp_chat,j=m.get("room_id");A&&j==="temp"&&(k.setTable("room"),H=await k.callRestAPI({user_id:a.user,other_user_id:Number(e==null?void 0:e.other_user_id),booking_id:e.booking_id===null?null:Number(e==null?void 0:e.booking_id),property_id:i,user_update_at:z,other_user_update_at:z,chat_id:-1},"POST"),r(B=>{const Y=[...B];return Y[B.findIndex(U=>U==null?void 0:U.is_temp_chat)].id=H==null?void 0:H.message,Y}),setActiveRoom(B=>({...B,id:H.message}))),await k.postMessage({room_id:j==="temp"?H==null?void 0:H.message:Number(j),user_id:a.user,message:O.url,date:F,other_user_id:e.other_user_id});let I={room_id:e.id,chat:{message:O.url,user_id:a.user,is_image:!0,timestamp:new Date},unread:1,create_at:new Date().toISOString(),update_at:new Date().toISOString()};n(B=>{const Y={...B};return Y[j==="temp"?H==null?void 0:H.message:Number(j)]=[...Y[j==="temp"?H==null?void 0:H.message:Number(j)],I],Y}),S(!1),o(!1),t()}catch(F){console.log(F),x({type:"SHOW_ERROR",payload:{heading:"Sending image failed",message:F.message}})}S(!1)}return s(Se,{children:f("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:[s("div",{className:"fixed inset-0 w-full h-full bg-black opacity-40",onClick:()=>{o(!1),d("")}}),s("div",{className:"flex items-center min-h-screen px-4 mt-4 py-8",children:f("div",{className:"relative w-full max-w-lg p-4 mx-auto bg-white rounded-md shadow-lg",children:[s("div",{className:"flex mb-4",children:s("h1",{className:"text-2xl",children:"Please select an Image"})}),s("div",{className:"flex mb-4 text-red-600",children:s("span",{className:"text-xs",children:u})}),f("label",{htmlFor:"send-picture",className:"cursor-pointer border p-2.5 rounded-md",children:[s("input",{className:"hidden",onChange:M=>D(M.target.files),id:"send-picture",type:"file",accept:"image/png, image/gif, image/jpeg",name:"file"}),l===""?"Select Image":"Update Image"]}),s("div",{className:"mt-3 sm:flex w-full",children:f("form",{onSubmit:C(P),className:"mt-2 text-center sm:text-left w-full",children:[l&&s("img",{className:"block object-cover w-full h-[200px] md:h-[300px]",src:l}),f("div",{className:"items-center w-full mt-3 flex",children:[s("button",{className:"flex-1 rounded border border-[#667085] hover:bg-gray-200 !bg-gradient-to-r px-6 py-[10px] text-sm font-semibold text-[#667085] outline-none focus:outline-none",onClick:()=>{o(!1),d("")},children:"Cancel"}),y&&s(Ft,{loading:v,type:"submit",className:`ml-5 flex-1 block rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-[10px] text-sm font-semibold text-white outline-none focus:outline-none w-[150px] ${v?"py-[5px]":"py[12px]"}`,children:"Send"})]})]})})]})})]})})};let Fn=new _e,R8=new St;const j8=new AbortController,z8=()=>{var bt,Et,wt,At,Yt,xn,Bn,zn,Kn,ca,ht,Ht,Dt,Lt,Le,Ze,It,un,Ye,Ge,kt,vt,pn,da,Vn;const{state:e,dispatch:t}=h.exports.useContext(Ee),[n,a]=h.exports.useState(Array(4).fill({})),[r,i]=h.exports.useState([]),{state:o,dispatch:c}=h.exports.useContext(we),[l,d]=h.exports.useState(""),[u,g]=lt(),[y,w]=h.exports.useState({}),[v,S]=h.exports.useState({}),[m,p]=h.exports.useState({}),[b,x]=h.exports.useState(),[k,N]=h.exports.useState(""),[_,C]=h.exports.useState(!1),[E,T]=h.exports.useState(!1),[D,P]=h.exports.useState(!1),[M,O]=h.exports.useState(o.unreadMessages),[F,z]=h.exports.useState(0),[H,A]=h.exports.useState(!1),[j,I]=h.exports.useState(!1),[B,Y]=h.exports.useState(null),[U,W]=h.exports.useState(!1),[V,X]=h.exports.useState(!0);je();const[ne,oe]=h.exports.useState({}),[q,te]=h.exports.useState(!1),[G,J]=h.exports.useState(!1),[K,Q]=h.exports.useState(!1),Z=Me=>{var Ve=(Me!=null?Me:"").split(",");return Ve=Array.from(new Set(Ve)),Ve};v.booking_start_time&&v.status<ut.ONGOING&&new Date(v.booking_end_time)<Date.now();async function se(){try{const Me=await Fn.getMyRoom();Array.isArray(Me.messages)&&(O(Me.messages.filter(Ve=>{const He=JSON.parse(Ve.chat).user_id;return Number(He)!=Number(e.user)}).length),c({type:"SET_UNREAD_MESSAGES_COUNT",payload:Me.messages.filter(Ve=>{const He=JSON.parse(Ve.chat).user_id;return Number(He)!=Number(e.user)}).length})),a(Me==null?void 0:Me.list),i(Me==null?void 0:Me.messages),J(!0),c({type:"STOP_LOADING"})}catch(Me){me(t,Me.message),c({type:"SHOW_ERROR",payload:{heading:"Operation failed getting rooms",message:Me.message}})}}async function ce(){try{const Me=await R8.getList("room",{join:["user|other_user_id","booking"],filter:[`user_id,eq,${e.user}`]});z((Me==null?void 0:Me.list.filter(Ve=>Ve.is_archive==1)).length),a(Me.list.filter(Ve=>Ve.is_archive==1)),console.log((Me==null?void 0:Me.list.filter(Ve=>Ve.is_archive==1)).length),c({type:"STOP_LOADING"})}catch(Me){me(t,Me.message),c({type:"SHOW_ERROR",payload:{heading:"Operation failed getting rooms",message:Me.message}})}}async function le(Me){try{const Ve=await Fn.getChats(Me);return Array.isArray(Ve.model)&&oe(He=>{const at={...He};return at[Me]=Ve.model.sort(We),at}),Ve.model}catch(Ve){me(t,Ve.message),c({type:"SHOW_ERROR",payload:{heading:"Operation failed getting messages "+Me,message:Ve.message}})}}async function ae(){if(l=="")return;P(!1);const Me=l.toLowerCase();if(zCe.some(Tt=>new RegExp(`\\b${Tt.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(Me))){N("Your message contains inappropriate language.");return}if(t9e(l).length>0){N("Sharing links or URLs is not allowed.");return}const He=/(?:\+\d{1,3}[ -]?)?(?:\(\d{1,4}\)[ -]?)?(?:\d[ -]?){6,14}\d/,at=/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/;if(v.status!==ut.ONGOING){if(He.test(l)){N("Sharing phone numbers is not allowed unless the booking is ongoing.");return}if(at.test(l)){N("Sharing emails is not allowed unless the booking is ongoing.");return}}if(v.status!==ut.ONGOING){const Tt=y.id,ft=(ne[Tt]||[]).filter(qt=>qt.chat&&!qt.chat.is_image&&qt.chat.user_id===e.user);if(console.log(ft),ft.length>=3){N("You cannot send more than 3 messages unless the booking is ongoing.");return}}N(""),te(!0);try{let Tt=new Date().toISOString().split("T")[0],Gt=new Date().toISOString().replace("T"," ").split(".")[0],ft=null,qt=y.is_temp_chat,qe=u.get("room_id");qt&&qe==="temp"&&(Fn.setTable("room"),ft=await Fn.callRestAPI({user_id:e.user,other_user_id:Number(y.other_user_id),booking_id:y.booking_id===null?null:Number(y.booking_id),property_id:b,user_update_at:Gt,other_user_update_at:Gt,chat_id:-1},"POST"),a(Fe=>{const ot=[...Fe];return ot[Fe.findIndex(Nt=>Nt==null?void 0:Nt.is_temp_chat)].id=ft==null?void 0:ft.message,ot}),w(Fe=>({...Fe,id:ft.message}))),await Fn.postMessage({room_id:qe==="temp"?ft==null?void 0:ft.message:Number(qe),user_id:e.user,message:l,date:Tt,other_user_id:y.other_user_id});let ye={room_id:y.id,chat:{message:l,user_id:e.user,is_image:!1,timestamp:new Date},unread:1,create_at:new Date().toISOString(),update_at:new Date().toISOString()};oe(Fe=>{const ot={...Fe};return ot[qe==="temp"?ft==null?void 0:ft.message:Number(qe)]=[...ot[qe==="temp"?ft==null?void 0:ft.message:Number(qe)],ye],ot}),se(),ie(y.other_user_id,v.property_name,l,y.id),d("")}catch(Tt){console.log(Tt),c({type:"SHOW_ERROR",payload:{heading:"Sending message failed",message:Tt.message}})}te(!1)}async function ie(Me,Ve,He,at){var Tt;try{const Gt=await Fn.callRawAPI("/v2/api/custom/ergo/get-user",{id:Me},"POST");if(on(Gt.settings,{}).email_on_new_chat_message==!0){let ft=o.user.first_name+" "+o.user.last_name;const qt=await Fn.getEmailTemplate("chat-message-alert"),qe=(Tt=qt.html)==null?void 0:Tt.replace(new RegExp("{{{sender_name}}}","g"),ft).replace(new RegExp("{{{property_name}}}","g"),Ve).replace(new RegExp("{{{message}}}","g"),He).replace(new RegExp("{{{room_id}}}","g"),at);await Fn.sendEmail(Gt.email,qt.subject,qe)}}catch(Gt){console.log("ERROR",Gt)}}async function de(Me,Ve){const He={property_spaces_id:Me,user_id:Ve};Fn.setTable("user_property_spaces");try{const at=await Fn.callRestAPI({payload:He},"GETALL");if(Array.isArray(at.list)&&at.list.length>0)Y(at.list[0].id);else throw new Error("")}catch{Y(null)}c({type:"STOP_LOADING"})}async function fe(Me){Fn.setTable("room");try{const Ve=await Fn.callRestAPI({id:Me},"DELETE");Ve.error||(se(),w({}),S({}),p({}),pe(c,Ve.message,5e3))}catch(Ve){c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ve.message}})}}async function be(Me){Fn.setTable("room");try{const Ve=await Fn.callRestAPI({id:Me,is_archive:tl.IS_ARCHIVE},"PUT");Ve.error?pe(c,Ve.message||"Failed to archive chat.",4e3,"ERROR"):(a(He=>He.map(at=>at.id===Me?{...at,is_archive:tl.IS_ARCHIVE}:at)),g(He=>(He.set("message_tab","archive"),He)),pe(c,"Chat archived successfully!",4e3,"SUCCESS"),ce())}catch(Ve){pe(c,Ve.message||"Failed to archive chat.",4e3,"ERROR")}}async function he(Me){Fn.setTable("room");try{const Ve=await Fn.callRestAPI({id:Me,is_archive:tl.NOT_ARCHIVE},"PUT");Ve.error?pe(c,Ve.message||"Failed to unarchive chat.",4e3,"ERROR"):(a(He=>He.map(at=>at.id===Me?{...at,is_archive:tl.NOT_ARCHIVE}:at)),g(He=>(He.set("message_tab","inbox"),He)),pe(c,"Chat unarchived successfully!",4e3,"SUCCESS"),se())}catch(Ve){pe(c,Ve.message||"Failed to unarchive chat.",4e3,"ERROR")}}async function ve(){if(!(v!=null&&v.extrasFetched)){X(!0);try{const Me=await Fn.callRawAPI("/v2/api/custom/ergo/booking/details",{where:[`ergo_booking.id = ${y.booking_id} AND (ergo_booking.deleted_at IS NULL AND ergo_booking.status = ${ut.ONGOING} OR ergo_booking.status = ${ut.UPCOMING})`]},"POST");if(Me.list.id&&new Date(new Date(Me.list.booking_end_time).setDate(new Date(Me.list.booking_end_time).getDate()+1))>new Date){const Ve={...Me.list,...v,add_ons:Me.list.add_ons,property_name:Me.list.property_name,image:Me.list.image_url,address_line_1:Me.list.address_line_1,address_line_2:Me.list.address_line_2,extrasFetched:!0};a(He=>{const at=[...He],Tt=at.findIndex(Gt=>Gt.id==y.id);return Tt!=-1&&(at[Tt].booking=Ve),at}),w(He=>{const at={...He};return at.booking=Ve,at})}setTimeout(()=>{X(!1)},500)}catch(Me){me(t,Me.message),c({type:"SHOW_ERROR",payload:{heading:"Error fetching booking details",message:Me.message}})}}}async function Ce(Me,Ve){try{Fn.setTable("chat"),await Promise.all(Ve.map(He=>Fn.callRestAPI({id:He,unread:0},"PUT"))),oe(He=>{var Tt;const at={...He};return at[Me]=((Tt=at[Me])!=null?Tt:[]).map(Gt=>({...Gt,unread:0})),at}),O(He=>{const at=Ve.length>He?0:He-Ve.length;return c({type:"SET_UNREAD_MESSAGES_COUNT",payload:at}),at})}catch(He){me(t,He.message),c({type:"SHOW_ERROR",payload:{heading:"Error marking messages as read",message:He.message}})}}async function nt(Me){const Ve=localStorage.getItem("user"),He=[`ergo_property_spaces.id = ${Me} AND ergo_property_spaces.deleted_at IS NULL`];try{const at=await Fn.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1,user_id:Number(Ve),where:He,all:!0},"POST",j8.signal);Array.isArray(at.list)&&at.list.length>0?(p(at.list[0]),de(Number(at.list[0].id),Number(Ve))):p({})}catch(at){if(me(t,at.message),at.name=="AbortError")return;c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:at.message}})}c({type:"STOP_LOADING"})}async function Ae(Me,Ve,He){x(Number(He));try{const at=await R8.getOne("user",Me,{join:[]}),Tt={id:"temp",is_temp_chat:!0,user_id:e.user,other_user_id:Me,booking_id:Ve,is_archive:0,property_id:He,create_at:new Date,update_at:new Date,user_update_at:new Date,other_user_update_at:new Date,deleted_at:null,user:{id:Me,first_name:at.model.deleted_at==null?at.model.first_name:"[Deleted User]",last_name:at.model.deleted_at==null?at.model.last_name:"",photo:at.model.deleted_at==null?at.model.photo:null},booking:{id:Ve===null?null:Ve}};a(Gt=>[...Gt,Tt]),T(!0),w(Tt)}catch(at){me(t,at.message),c({type:"SHOW_ERROR",payload:{heading:"Failed to fetch other user data",message:at.message}})}}async function Je(){var Gt,ft,qt,qe,ye,Fe,ot;X(!0);const Me=u.get("room_id"),Ve=u.get("booking");if(p({}),S({}),Me==="temp"||Me===null)return;Fn.setTable("room");const He=await Fn.callRestAPI({id:Number(Me)},"GET");await Fn.setTable("booking");const Tt=(await Fn.callRestAPI({},"GETALL")).list.reverse().find(Nt=>{var Kt,Cn,Ea,fr,di;return(Nt.host_id===((Kt=He.model)==null?void 0:Kt.user_id)||Nt.host_id===((Cn=He.model)==null?void 0:Cn.other_user_id))&&(Nt.customer_id===((Ea=He.model)==null?void 0:Ea.user_id)||Nt.customer_id===((fr=He.model)==null?void 0:fr.other_user_id))&&Nt.property_space_id===((di=He==null?void 0:He.model)==null?void 0:di.property_id)&&(Nt.status===ut.UPCOMING||Nt.status===ut.ONGOING)});if(((Gt=He.model)==null?void 0:Gt.booking_id)!==null||Ve!==null||Tt!=null){if(Tt){S(Tt);return}await Fn.setTable("booking");const Nt={id:(qe=(qt=(ft=He.model)==null?void 0:ft.booking_id)!=null?qt:Ve)!=null?qe:Tt==null?void 0:Tt.id},Kt=await Fn.callRestAPI(Nt,"GET");S(((ye=Kt==null?void 0:Kt.model)==null?void 0:ye.status)===ut.ONGOING||((Fe=Kt==null?void 0:Kt.model)==null?void 0:Fe.status)===ut.UPCOMING?Kt.model:{})}else{const Nt=localStorage.getItem("user"),Kt=[`ergo_property_spaces.id = ${Number((ot=He.model)==null?void 0:ot.property_id)} AND ergo_property_spaces.deleted_at IS NULL`],Cn=await Fn.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1,user_id:Number(Nt),where:Kt,all:!0},"POST",j8.signal);Array.isArray(Cn.list)&&Cn.list.length>0?(p(Cn.list[0]),S({})):p({})}setTimeout(()=>{X(!1)},500)}h.exports.useEffect(()=>{Je()},[u.get("room_id")]),h.exports.useEffect(()=>{se()},[]),h.exports.useEffect(()=>{if(!G)return;const Me=u.get("room_id"),Ve=u.get("space");p({}),S({});let He=n.find(Gt=>Gt.id==Me);if(He){w(He);return}const at=u.get("other_user_id");if(!at)return;const Tt=u.get("booking");He=n.find(Gt=>Gt.booking_id===Tt&&Gt.other_user_id===at||Gt.property_id===Number(Ve)),He?w(He):(nt(Ve),Ae(at,Tt,Ve))},[G]),h.exports.useEffect(()=>{const Me=new AbortController;return()=>{clearInterval(5e3),Me.abort()}},[]);function ze(){Q(!0)}h.exports.useEffect(()=>{X(!0),c({type:"START_LOADING"}),p({}),S({}),y.id&&(u.set("room_id",y.id),u.set("booking",y.booking_id),u.get("booking")||u.delete("booking"),u.delete("space"),u.delete("other_user_id"),g(u),d(""),le(y.id).then(Me=>{const Ve=Me.filter(He=>He.unread===1&&He.chat.user_id!==e.user).map(He=>He.id);Ce(y.id,Ve)}),y.booking_id!==null&&ve(),y.id&&nt(y.property_id),setTimeout(()=>{X(!1)},500),c({type:"STOP_LOADING"}))},[y.id,U]);function We(Me,Ve){return new Date(Me.update_at)-new Date(Ve.update_at)}return s(Se,{children:f("div",{className:"relative -mx-4 flex h-[var(--messages-page-height)] border border-t-0 normal-case md:mx-0",onClick:()=>P(!1),children:[s("div",{className:"w-full md:w-[26%]",children:f("div",{className:"flex h-full flex-col",children:[f("div",{className:"nineteen-step flex border-b border-t",children:[f("button",{className:`${u.get("message_tab")!="archive"?"border-b-2 border-black font-semibold text-black":""} flex-grow px-[] py-[12px] text-[]`,onClick:()=>{u.set("message_tab","inbox"),g(u)},children:["Inbox (",M,")"]}),f("button",{className:`${u.get("message_tab")=="archive"?"border-b-2 border-black font-semibold text-black":""} flex-grow px-[] py-[12px] text-[]`,onClick:()=>{u.set("message_tab","archive"),g(u)},children:["Archive (",F,")"]})]}),G&&f("div",{className:"tiny-scroll flex-grow overflow-y-auto bg-white md:bg-[#f9fafb]",children:[u.get("message_tab")!="archive"&&n&&n.filter(Me=>Me.is_archive==tl.NOT_ARCHIVE).sort((Me,Ve)=>new Date(Ve.update_at)-new Date(Me.update_at)).map((Me,Ve)=>s(P8,{room:Me,rooms:n,virtual:E,roomUnread:r,activeRoomId:y.id,setActiveRoom:w,setActiveBooking:S,setActiveProperty:p,activeBooking:v,first:Me.first_name?Me.first_name:Me.user.first_name,last:Me.last_name?Me.last_name:Me.user.last_name,setMobileChatSection:A,markMessagesAsRead:()=>Ce,messages:ne,deleteRoom:fe,archiveRoom:be,unArchiveRoom:he},Ve)),u.get("message_tab")=="archive"&&n&&n.filter(Me=>Me.is_archive==tl.IS_ARCHIVE).sort((Me,Ve)=>new Date(Ve.update_at)-new Date(Me.update_at)).map((Me,Ve)=>s(P8,{room:Me,roomUnread:r,activeRoomId:y.id,setActiveRoom:w,setActiveBooking:S,setActiveProperty:p,activeBooking:v,first:Me.first_name?Me.first_name:Me.user.first_name,last:Me.last_name?Me.last_name:Me.user.last_name,setMobileChatSection:A,messages:ne,deleteRoom:fe,archiveRoom:be,unArchiveRoom:he},Ve))]})]})}),s("div",{className:`${j&&ne[y.id].length>0&&!V?"block":"hidden"} absolute -left-0 right-0 top-0 overflow-y-hidden bg-white md:static md:block md:max-h-[unset] md:w-[48%]`,children:s("div",{className:"flex h-full flex-col border-t",children:y!=null&&y.id?f(Se,{children:[s("div",{className:`${H?"md:hidden":"hidden"} pl-2`,children:f("button",{type:"button",onClick:()=>{A(!1),I(!1)},className:"mb-2 mr-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(cf,{className:"h-6 w-6"}),s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"flex justify-between border-b px-2 py-[13px] md:px-4",children:[f("h3",{className:"md:text-lg text-base font-semibold",children:["Chat with"," ",(y==null?void 0:y.first_name)===void 0?(Et=(bt=n[0])==null?void 0:bt.user)==null?void 0:Et.first_name:(y==null?void 0:y.first_name)+" "+(y==null?void 0:y.last_name)===void 0?(At=(wt=n[0])==null?void 0:wt.user)==null?void 0:At.last_name:y==null?void 0:y.last_name]}),H&&y.booking_id&&s("button",{onClick:()=>I(!0),className:"inline whitespace-nowrap bg-gradient-to-r from-primary to-primary-dark bg-clip-text text-xs font-bold text-transparent md:hidden",children:"Preview booking"})]}),f("div",{className:"hidden-scrollbar relative h-full w-full overflow-x-hidden",children:[s("div",{className:"z-10 h-[90%] overflow-auto pb-12 md:pb-0",children:s(a9e,{messageErr:k,messages:(Yt=ne[y.id])!=null?Yt:[]})}),f("div",{className:"z- fixed bottom-0 flex h-fit w-full items-center justify-start gap-4 overflow-hidden border border-l-0 border-r-0 bg-white px-[20px] py-[12px] md:absolute",children:[f("div",{className:"flex-gro flex items-center gap-2",children:[s("label",{onClick:()=>{[ut.PENDING,ut.COMPLETED,ut.DELETED,ut.DECLINED,ut.CANCELLED].includes(v.status)||!v.status?pe(c,"Without a booking, you can't send images or emojis.",4e3,"ERROR"):ze()},className:`cursor-pointer ${(v==null?void 0:v.status)!=ut.COMPLETED?"strike-opacity-50 pointer-events-non opacity-50":""}`,children:s(VA,{})}),s("button",{onClick:Me=>{[ut.PENDING,ut.COMPLETED,ut.DELETED,ut.DECLINED,ut.CANCELLED].includes(v.status)||!v.status?pe(c,"Without a booking, you can't send images or emojis.",4e3,"ERROR"):Me.stopPropagation(),P(!D)},className:"strike-opacity-50 relative disabled:opacity-50",children:s(f5e,{})})]}),f("form",{className:"relative w-full rounded-md border-[#E5E5EA]",onSubmit:Me=>{Me.preventDefault(),ae()},children:[s("input",{name:"message",className:"w-full border bg-[#F9FAFB] py-1 pl-2 pr-16 text-sm outline-none",rows:"1",placeholder:"Type a message...",value:l,onChange:Me=>d(Me.target.value),autoComplete:"off"}),s("button",{type:"submit",className:l?"absolute right-0 top-0 p-1 px-4 text-gray-900 duration-75 hover:text-primary":"hidden",children:q?f("svg",{className:"inline h-4 w-4 animate-spin text-primary",fill:"none",viewBox:"0 0 24 24",children:[s("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),s("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}):s(Dte,{className:"h-5 w-5 -rotate-45"})})]})]})]})]}):s("div",{className:"flex flex-grow items-center justify-center text-4xl text-gray-700 ",children:"Select a chat to view"})})}),s("div",{className:`${j&&ne[y.id].length>0&&!V?"block":"hidden"} absolute -left-0 right-0 top-0 max-h-[var(--messages-page-height)] w-full overflow-y-auto bg-white md:static md:block md:max-h-[unset] md:w-[26%] lg:block`,children:f("div",{className:"flex h-full max-h-[var(--messages-page-height)] flex-col border",children:[f("div",{className:"flex justify-between px-4 py-[12px]",children:[(y==null?void 0:y.booking_id)&&((xn=y==null?void 0:y.booking)==null?void 0:xn.id)&&s("h3",{className:"text-lg font-semibold",children:"Booking Preview"}),(y==null?void 0:y.booking_id)&&!((Bn=y==null?void 0:y.booking)!=null&&Bn.id)&&s("h3",{className:"text-lg font-semibold",children:"Property Preview"}),j&&s("button",{type:"button",onClick:()=>I(!1),className:"inline rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300 md:hidden",children:"\u2715"})]}),s("div",{className:"tiny-scroll flex-grow overflow-y-auto",children:f("div",{className:"min-h-[500px] px-[20px] py-4",children:[y.id&&!((zn=y==null?void 0:y.booking)!=null&&zn.id)?f("div",{className:"",children:[f("div",{className:"relative mb-[8px] rounded-lg bg-cover bg-center bg-no-repeat px-[8px] pb-[13px]",style:{backgroundImage:`url(${(Kn=m==null?void 0:m.url)!=null?Kn:"/default-property.jpg"})`,height:150},children:[s(ls,{space_id:m==null?void 0:m.id,user_property_spaces_id:B||(m==null?void 0:m.favourite),withLoader:!0,reRender:W,className:"float-right flex w-fit flex-grow justify-end pt-2"}),s("span",{className:"absolute mt-3 self-start rounded-lg bg-black px-2 py-1 text-xs font-bold text-white",children:(m==null?void 0:m.category)||"N/A"})]}),f("div",{className:"block w-full items-end justify-between py-6 lg:items-start lg:pl-0",children:[f("div",{className:"",children:[s("h2",{className:"mb-[6px] whitespace-normal text-[18px] font-semibold md:whitespace-nowrap",children:m==null?void 0:m.name}),s("p",{className:"mb-1 tracking-wider text-[#475467] md:truncate",children:m==null?void 0:m.city}),f("p",{className:"tracking-wider text-[#475467] md:truncate",children:[m==null?void 0:m.country," "]}),f("div",{className:"mt-[6px] flex justify-between lg:mt-[21px]",children:[f("p",{className:"mr-[31px]",children:["from:"," ",f("span",{className:"font-bold",children:["$",m==null?void 0:m.rate]}),"/",s("span",{className:"",children:"hour"})]}),f("div",{className:"flex items-center gap-2",children:[s(Zc,{}),s("span",{children:m==null?void 0:m.max_capacity})]})]})]}),f("div",{className:"grid items-start",children:[f("div",{className:"mt-3 flex items-center justify-between lg:mb-[9px]",children:[f("p",{className:"flex items-center gap-2 ",children:[s(ds,{}),f("strong",{className:"font-semibold",children:[(Number(m==null?void 0:m.average_space_rating)||0).toFixed(1),f("span",{className:"font-normal",children:["(",m==null?void 0:m.space_rating_count,")"]})]})]}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:Me=>{Me.stopPropagation(),Me.preventDefault(),C(!0)},children:"(view on map)"})]}),f("div",{className:"mt-6 flex flex-wrap gap-[12px] whitespace-nowrap lg:mt-[50px]",children:[Z(m==null?void 0:m.amenities).slice(0,3).map((Me,Ve)=>s("span",{className:"rounded-[3px] bg-[#F2F4F7] px-[8px] pb-[3px] pt-[2px] text-[14px] text-[#667085]",children:Me},Ve)),Z(m==null?void 0:m.amenities).length>3?f("span",{className:"rounded-[3px] bg-[#F2F4F7] px-[8px] pb-[3px] pt-[2px] text-[14px] text-[#667085]",children:["+",Z(m==null?void 0:m.amenities).length-3," ","more"]}):null]})]})]}),s("hr",{className:"my-4"})]}):null,(y==null?void 0:y.booking_id)&&((ca=y==null?void 0:y.booking)==null?void 0:ca.id)?f(Se,{children:[s("div",{className:"mb-[8px] rounded-lg bg-cover bg-center bg-no-repeat px-[8px] pb-[13px]",style:{backgroundImage:`url(${(Ht=(ht=y.booking)==null?void 0:ht.image_url)!=null?Ht:"/default-property.jpg"})`,height:150},children:s("span",{className:"mt-3 inline-flex self-start rounded-lg bg-black px-2 py-1 text-xs font-bold text-white",children:(Dt=y==null?void 0:y.booking)!=null&&Dt.space_category?(Lt=y==null?void 0:y.booking)==null?void 0:Lt.space_category:"N/A"})}),f("div",{className:"",children:[f("div",{className:"mb-6 flex justify-between",children:[s("p",{children:"Date"}),f("p",{className:"font-semibold",children:[" ",Rr[new Date((Le=y==null?void 0:y.booking)==null?void 0:Le.booking_start_time).getMonth()]+" "+new Date((Ze=y==null?void 0:y.booking)==null?void 0:Ze.booking_start_time).getDate()+"/"+new Date((It=y==null?void 0:y.booking)==null?void 0:It.booking_start_time).getFullYear()]})]}),f("div",{className:"mb-6 flex justify-between",children:[s("p",{children:"Time"}),f("p",{className:"font-semibold",children:[Pn((un=y.booking)==null?void 0:un.booking_start_time)," -"," ",Pn((Ye=y==null?void 0:y.booking)==null?void 0:Ye.booking_end_time)]})]}),f("div",{className:"flex justify-between",children:[s("p",{children:"Duration"}),f("p",{className:"font-semibold",children:[((Ge=y==null?void 0:y.booking)==null?void 0:Ge.duration)/3600," hours"]})]})]}),s("hr",{className:"my-4"}),s("h4",{className:"mb-6 text-xl font-semibold",children:"Add-ons:"}),s("div",{className:"",children:(vt=(kt=y==null?void 0:y.booking)==null?void 0:kt.add_ons)==null?void 0:vt.map((Me,Ve)=>f("div",{className:"mb-4 flex gap-[14px]",children:[s(ur,{}),s("p",{children:Me.name})]},Ve))}),s("hr",{className:"my-4"})]}):null,f("div",{className:"text-center",children:[(y==null?void 0:y.booking_id)&&((pn=y==null?void 0:y.booking)==null?void 0:pn.id)&&s($e,{to:"/account/my-bookings/"+((da=y.booking)==null?void 0:da.id),className:"my-text-gradient text-xs font-semibold uppercase tracking-wider",children:"View booking"}),y.id&&!((Vn=y==null?void 0:y.booking)!=null&&Vn.id)&&s($e,{to:"/property/"+(m==null?void 0:m.id),className:"my-text-gradient text-xs font-semibold uppercase tracking-wider",children:"View property"})]})]})})]})}),D&&s("div",{className:"absolute left-0 right-0 h-full w-full",children:s("div",{style:{left:"50px !important"},className:"emoji-picker flex h-full w-full items-center justify-center",children:s(jCe,{className:"absolute -top-10 bottom-0 left-0 right-0 z-[1000] md:top-10",onEmojiClick:Me=>{d(Ve=>Ve+Me.emoji),P(!1)},searchDisabled:!0})})}),K&&s(r9e,{activeRoom:y,getRooms:()=>se(),state:e,setMessages:oe,setActiveRoom:w,setRooms:a,spaceId:b,activeBooking:v,setShowImagePreviewModal:Q}),(y==null?void 0:y.booking_id)===null&&s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${m.address_line_1||""}, ${m.address_line_2||""}, ${m.city||""}, ${m.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${m.address_line_1||""}, ${m.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:_,closeModal:()=>C(!1)})]})})},s9e=()=>s("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M16 11.5V12.5C16 13.9001 16 14.6002 15.7275 15.135C15.4878 15.6054 15.1054 15.9878 14.635 16.2275C14.1002 16.5 13.4001 16.5 12 16.5H5C3.59987 16.5 2.8998 16.5 2.36502 16.2275C1.89462 15.9878 1.51217 15.6054 1.27248 15.135C1 14.6002 1 13.9001 1 12.5V11.5M12.6667 7.33333L8.5 11.5M8.5 11.5L4.33333 7.33333M8.5 11.5V1.5",stroke:"#667085",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),F8=[{header:"BOOKING DATE",accessor:"booking_start_time"},{header:"SPACE",accessor:"space"},{header:"PAYMENT METHOD",accessor:"payment_method"},{header:"AMOUNT",accessor:"amount"},{header:"RECEIPT",accessor:"receipt"},{header:"ACTION",accessor:""}],i9e=()=>{var ne,oe;const[e,t]=h.exports.useState(!1),n=cr(e,300),a=localStorage.getItem("role"),[r,i]=lt(),[o,c]=h.exports.useState(10),[l,d]=h.exports.useState(0),[u,g]=h.exports.useState(0),[y,w]=h.exports.useState(0),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState(!1),[b,x]=h.exports.useState("DESC"),[k,N]=h.exports.useState([]),[_,C]=h.exports.useState([]),{dispatch:E}=h.exports.useContext(we),[T,D]=h.exports.useState({}),P=h.exports.useRef(new Date);h.exports.useState(P.current),h.exports.useState(P.current);const{handleSubmit:M,register:O,reset:F,setValue:z,control:H,dirtyFields:A}=Oe({defaultValues:(()=>(Ue(r),{from:"",to:""}))()});function j(q){(async function(){c(q),await Y(0,q)})()}function I(){(async function(){await Y(y-1>0?y-1:0,o)})()}function B(){(async function(){await Y(y+1<=l?y+1:0,o)})()}async function Y(q,te){E({type:"START_LOADING"});const G=Ue(r),J=localStorage.getItem("user");var K=G==null?void 0:G.from,Q=G==null?void 0:G.to;const Z=[`${a=="host"?`ergo_booking.host_id = ${J}`:`ergo_booking.customer_id = ${J}`}
AND ${G.space_id?`ergo_property_spaces.id = ${G.space_id}`:"1"}
AND ergo_booking.status = 3 ${K?`AND ergo_booking.booking_start_time BETWEEN '${K}' AND '${Q}'`:""}`];try{const se=await _t("booking","post",{where:Z,page:q,limit:te,sortId:"update_at",direction:"DESC"},"PAGINATE"),{list:ce,total:le,limit:ae,num_pages:ie,page:de}=se;N(ce),c(ae),d(ie),w(de),g(le),S(de>1),p(de+1<=ie)}catch(se){E({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:se.message}})}E({type:"STOP_LOADING"})}async function U(){let q=localStorage.getItem("user"),te=[`ergo_property.host_id = ${q}`];try{const G=await _t("popular","post",{page:1,limit:1e3,user_id:q,where:te,all:!0,sortId:"update_at",direction:"DESC"},"PAGINATE");Array.isArray(G.list)&&C(G.list)}catch(G){E({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:G.message}})}}const W=async q=>{console.log(q);const te=qC(q.from),G=qC(q.to);r.set("from",q.from?te:""),r.set("to",q.to?G:new Date().toISOString().split("T")[0]),r.set("status",q.status),r.set("space_id",q.space_id),i(r),Y(1,o)};h.exports.useEffect(()=>{Y(1,o),U()},[]);const V=(q,te)=>b=="DESC"?new Date(te.update_at)-new Date(q.update_at):new Date(q.update_at)-new Date(te.update_at);function X(){var q=window.open("","PRINT","height=400,width=600");q.document.write("<html><head><title>"+document.title+"</title>"),q.document.write("</head><body >"),q.document.write("<h1>"+document.title+"</h1>"),q.document.write(document.getElementById("receipt").innerHTML),q.document.write("</body></html>"),q.document.close(),q.focus(),q.print()}return f("div",{className:"pt-[44px] min-h-screen",children:[f("div",{className:"",children:[s("div",{className:"flex justify-between items-center mb-0 sm:mb-[21px] flex-wrap",children:f("form",{onSubmit:M(W),className:"sm:flex gap-[12px] items-center w-full flex-wrap md:mb-0 mb-4",children:[s("div",{className:"z-10 min-w-[190px] rounded-md bg-white h-fit",children:s(No,{reset:()=>resetField("from",{keepDirty:!1,keepTouched:!1}),setValue:q=>z("from",q,{shouldDirty:!0}),control:H,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"Start",type:"space",min:new Date("2001-01-01")})}),s("div",{className:"z-10 min-w-[190px] rounded-md bg-white h-fit",children:s(No,{reset:()=>resetField("to",{keepDirty:!1,keepTouched:!1}),setValue:q=>z("to",q,{shouldDirty:!0}),control:H,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"End",type:"space",min:new Date("2001-01-01")})}),s(As,{options:_,name:"space_id",accessor:"name",valueAccessor:"id",register:O,setValue:z,formMode:!0,defaultValue:{name:"All Spaces",value:""},className:"min-w-[200px] mb- sm:mb-0",defaultOptionClassName:"text-[#667085]"}),f("div",{className:"flex items-center gap-6",children:[s("button",{type:"submit",className:"sm:mt-0 sm:mb-0 border-black border h-fit p-2 px-6 w-fit rounded-md",children:"Search"}),s("div",{className:"grid justify-start sm:flex sm:justify-end my-4",children:f(qy,{id:"test-table-xls-button",filename:"payout",data:k,className:"border-black border p-2 px-6 rounded-md flex gap-2",children:[s(s9e,{})," Export CSV"]})})]})]})}),f("div",{className:"flex justify-between mb-[16px] items-center",children:[f("h2",{className:"text-2xl",children:["Total Paid Out: ",f("strong",{children:["$",k.reduce((q,te)=>q+(te.total+te.addon_cost),0).toFixed(2)]})]}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:x,accessor:"label",valueAccessor:"value",className:"min-w-[200px]"})]})]}),s(Ln,{currentPage:y,pageSize:o,totalNumber:u,updatePageSize:j,noBorder:!0}),s("div",{className:"snap-scroll",children:f("table",{className:"min-w-full divide-y divide-gray-200 bg-white mt-1",children:[s("thead",{className:"bg-[#F9FAFB] border-t border-b border-[#EAECF0] cursor-pointer",children:s("tr",{className:"cursor-pointer",children:F8.map((q,te)=>s("th",{scope:"col",className:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer whitespace-nowrap",children:q.header},te))})}),s("tbody",{className:"divide-y divide-gray-200",children:k.sort(V).map((q,te)=>s("tr",{className:"py-4 text-sm",children:F8.map((G,J)=>{if(G.accessor==="")return s("td",{className:"px-6 py-6 whitespace-nowrap gap-3",children:s("button",{className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold",onClick:()=>{D(q),t(!0)},children:"View"})},J);if(G.accessor=="booking_start_time"){var K=new Date(q[G.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:Rr[K.getMonth()]+" "+K.getDate()+"/"+K.getFullYear()},J)}if(G.accessor=="space"){var K=new Date(q[G.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:q.property_name+" "+q.space_category},J)}if(G.accessor=="amount"){var K=new Date(q[G.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:"$"+(q.total+q.addon_cost).toFixed(2)},J)}return G.accessor=="receipt"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:q.id},J):G.accessor=="payment_method"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:"Credit Card"},J):s("td",{className:"px-6 py-4 whitespace-nowrap",children:q[G.accessor]},J)})},te))})]})}),s(vn,{currentPage:y,totalNumber:u,pageCount:l,pageSize:o,canPreviousPage:v,canNextPage:m,updatePageSize:j,previousPage:I,nextPage:B}),n&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>t(!1),children:f("div",{className:`${e?"pop-in":"pop-out"} bg-white p-5 md:px-5 px-3 rounded-lg w-[510px] max-w-[80%]`,onClick:q=>q.stopPropagation(),id:"receipt",children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s("h3",{className:"text-2xl font-semibold mb-[8px]",children:"Payment details"}),s("button",{type:"button",onClick:()=>t(!1),className:"p-1 border hover:bg-gray-200 duration-300 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]}),s("hr",{className:"mb-4"}),f("p",{className:"mb-[8px]",children:["Booking Started on: ",s("span",{children:gh(T.booking_start_time)})]}),f("p",{className:"mb-[8px]",children:["Space name: ",s("span",{children:T.property_name})]}),f("p",{className:"mb-[16px]",children:["Booking: ",f("span",{children:[" #",T.id]})," ",s($e,{to:"/account/my-bookings/"+T.id,className:"text-sm font-semibold underline",children:"(View booking details)"})]}),f("p",{className:"mb-[16px]",children:["Space: ",f("span",{children:[" #",T.property_space_id]})," ",s($e,{to:"/property/"+T.property_space_id,className:"text-sm font-semibold underline",children:"(View booking details)"})]}),f("p",{className:"mb-[8px]",children:["Total cost: ",f("span",{children:["$",(ne=T.total)==null?void 0:ne.toFixed(2)]})]}),f("p",{className:"mb-[8px]",children:["Total addon cost: ",f("span",{children:["$",(oe=T.addon_cost)==null?void 0:oe.toFixed(2)]})]}),s("button",{onClick:X,className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold focus:outline-none",children:"Print receipt"}),s("button",{className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 w-full",onClick:()=>t(!1),children:"Close"})]})})]})},o9e={category:"",name:"",rate:"",max_capacity:0,description:"",rule:"",zip:"",country:"",city:"",address_line_1:"",address_line_2:"",additional_guest_rate:"",size:0,pictures:[null,null,null,null,null,null],pictureIds:[],faqs:[{question:"",answer:""}],thumbnail:"",addons:[],amenities:[],customSlots:{},schedule_template:{}};function l9e(e){return Te(e).subtract(1,"week").format("MM/DD/YY")}function c9e(e){return Array.isArray(e)?e.map(t=>({start:Te(t.start).add(1,"week").toISOString(),end:Te(t.end).add(1,"week").toISOString()})):[]}const d9e=(e,t)=>{switch(t.type){case"SET_PROPERTY_ID":return{...e,property_id:t.payload};case"SET_DETAILS_ONE":return{...e,...t.payload};case"SET_DETAILS_TWO":return{...e,...t.payload};case"SET_THUMBNAIL":return{...e,thumbnail:t.payload};case"SET_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload.day]:t.payload.slots}};case"CLEAR_ALL_SLOTS":return{...e,customSlots:{}};case"CLEAR_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload]:void 0}};case"INHERIT_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload]:c9e(e.customSlots[l9e(t.payload)])}};case"SET_SCHEDULE_TEMPLATE":return{...e,schedule_template:t.payload};case"SET_DESCRIPTION":return{...e,description:t.payload};case"SET_PROPERTY_NAME":return{...e,name:t.payload};case"SET_AMENITIES":return{...e,amenities:t.payload};case"SET_ADDONS":return{...e,addons:t.payload};case"SET_RULE":return{...e,rule:t.payload};default:return e}},Wz=h.exports.createContext({}),u9e=({children:e})=>{const[t,n]=h.exports.useReducer(d9e,o9e);return s(Wz.Provider,{value:{spaceData:t,dispatch:n},children:e})},ji=()=>h.exports.useContext(Wz);var Yz=[{name:"Afghanistan",code:"AF"},{name:"\xC5land Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"AndorrA",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, The Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:'Cote D"Ivoire',code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and Mcdonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:'Korea, Democratic People"S Republic of',code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:'Lao People"S Democratic Republic',code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libyan Arab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory, Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"RWANDA",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia and Montenegro",code:"CS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"Viet Nam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}];function Gz({setValue:e,name:t,maxCount:n,minCount:a,control:r}){const{field:i,fieldState:o,formState:c}=Ii({control:r,name:t});return f("div",{className:"flex items-center gap-[10px] p-2 font-semibold",children:[s("button",{type:"button",className:"rounded-md border-2 border-black px-3 text-2xl disabled:border-[#D0D5DD]",onClick:()=>e(Number(i.value)-1),disabled:Number(i.value)<=(a||0),onBlur:i.onBlur,children:"-"}),s("span",{children:i.value}),s("button",{type:"button",className:"rounded-md border-2 border-black px-3 text-2xl disabled:border-[#D0D5DD]",onClick:()=>e(Number(i.value)+1),disabled:Number(i.value)>=n,onBlur:i.onBlur,children:"+"})]})}function f9e({isOpen:e,closeModal:t,templates:n,onSelect:a}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all mt-10",children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{className:"text-2xl font-semibold",children:"Select Rules template"}),s("button",{type:"button",onClick:t,className:"rounded-circle border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})]}),f("div",{className:"tiny-scroll flex max-h-[60vh] flex-col gap-4 overflow-y-auto",children:[n.map(r=>s("button",{onClick:()=>{var i;a((i=on(r.template,{}).paragraph)!=null?i:""),t()},className:"w-full rounded-lg border-2 p-3",children:r.template_name},r.id)),n.length==0&&f("p",{className:"flex h-32 items-center justify-center",children:[s(Za,{}),s("span",{className:"ml-2"})," No templates yet"]})]})]})})})})]})})}const Q0=new _e,m9e=()=>{var N,_,C,E,T,D,P,M,O,F,z,H,A,j,I,B,Y,U,W,V,X,ne,oe,q,te,G,J,K,Q,Z,se,ce,le,ae;const{spaceData:e,dispatch:t}=ji(),{ruleTemplates:n}=Mu(),{state:a,dispatch:r}=h.exports.useContext(we),[i,o]=h.exports.useState(!1),c=Qe({category:ge().required("This field is required"),name:ge().required("This field is required"),address_line_1:ge().required("This field is required"),address_line_2:ge(),city:ge().required("This field is required"),zip:ge(),rate:dt().typeError("Must be a number").positive().integer(),description:ge().required("This field is required"),rule:ge(),max_capacity:dt().required("This field is required").min(1,"Max capacity must be greater than 0").typeError("This field is required"),additional_guest_rate:dt().typeError("Must be a number").positive().integer()}),l=je(),{register:d,handleSubmit:u,setValue:g,watch:y,trigger:w,control:v,formState:{errors:S}}=Oe({resolver:Xe(c),defaultValues:{...e,category:Number(e.category)},mode:"all"}),m=y(),p=async ie=>{const de=W3(ie==null?void 0:ie.city);ie.city=de&&de[0],ie.country=de&&de[1],console.log("submitting",ie),t({type:"SET_DETAILS_ONE",payload:{...ie,amenities:[],addons:[]}}),l("/spaces/add/2")},b=async()=>{var he,ve;const ie=localStorage.getItem("user"),de=W3(m.city);if(m.city=de[0],m.country=de[1],!!await w()){r({type:"START_LOADING"});var be;try{e.property_id||(Q0.setTable("property"),be=await Q0.callRestAPI({address_line_1:m.address_line_1,address_line_2:m.address_line_2,city:m.city,country:m.country,zip:m.zip,status:1,verified:1,host_id:ie,name:m.name,rule:m.rule},"POST"),t({type:"SET_PROPERTY_ID",payload:be==null?void 0:be.message})),Q0.setTable("property_spaces"),await Q0.callRestAPI({property_id:(he=be==null?void 0:be.message)!=null?he:e.property_id,space_id:m.category,max_capacity:m.max_capacity,description:m.description,rate:m.rate,space_status:wo.UNDER_REVIEW,availability:Ti.VISIBLE,draft_status:Nn.PROPERTY_SPACE,size:x?m.size:ws.UNSET,additional_guest_rate:m.additional_guest_rate||void 0},"POST"),l("/account/my-spaces")}catch(Ce){Ce.message=="Validation Error"&&r({type:"SHOW_ERROR",payload:{heading:"Operation failed!!",message:`Space category "${(ve=a.spaceCategories.find(nt=>nt.id==m.category))==null?void 0:ve.category}" already exists for property "${m.name}"`}})}r({type:"STOP_LOADING"})}},x=((N=a.spaceCategories.find(ie=>ie.id==Number(m.category)))==null?void 0:N.has_sizes)==1,k=[{label:"All",value:ws.UNSET},{label:"Small",value:ws.SMALL},{label:"Medium",value:ws.MEDIUM},{label:"Large",value:ws.LARGE},{label:"X-Large",value:ws.X_LARGE}];return f("div",{className:"min-h-screen pb-40",children:[f("form",{className:"text-sm md:max-w-lg fifteen-ste",onSubmit:u(p),autoComplete:"off",children:[s("h1",{className:"mb-0 text-3xl font-bold md:text-4xl",children:"Space Details"}),s("p",{className:"mb-8",children:s("small",{children:"Fields marked with an asterisk are required"})}),f("div",{className:"mb-8 ",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:["Property name ",s("span",{className:"text-red-700",children:"*"})," ",(_=S.name)!=null&&_.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(C=S.name)==null?void 0:C.message}):""]}),s("input",{autoComplete:"off",placeholder:"",...d("name"),className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(E=S.name)!=null&&E.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_1",children:["Address Line 1 ",s("span",{className:"text-red-700",children:"*"})," ",(T=S.address_line_1)!=null&&T.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(D=S.address_line_1)==null?void 0:D.message}):""]}),s(Ci,{control:v,setValue:ie=>g("address_line_1",ie),name:"address_line_1",className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(P=S.address_line_1)!=null&&P.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["address"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_2",children:["Address Line 2 ",(M=S.address_line_2)!=null&&M.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(O=S.address_line_2)==null?void 0:O.message}):""]}),s(Ci,{control:v,setValue:ie=>g("address_line_2",ie),name:"address_line_2",className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(F=S.address_line_2)!=null&&F.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["address"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:["City ",s("span",{className:"text-red-700",children:"*"})," ",(z=S.city)!=null&&z.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(H=S.city)==null?void 0:H.message}):""]}),s(Ci,{control:v,setValue:ie=>g("city",ie),name:"city",className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(A=S.city)!=null&&A.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(regions)"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"zip",children:["Zip code ",(j=S.zip)!=null&&j.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(I=S.zip)==null?void 0:I.message}):""]}),s("input",{placeholder:"",...d("zip"),className:` focus:shadow-outline $ w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(B=S.zip)!=null&&B.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"category",children:["Category ",s("span",{className:"text-red-700",children:"*"})," ",(Y=S.category)!=null&&Y.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(U=S.category)==null?void 0:U.message}):""]}),s(fa,{items:a.spaceCategories,labelField:"category",valueField:"id",containerClassName:"",className:`w-full border py-2 px-3 ${(W=S.category)!=null&&W.message?"ring-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,openClassName:"ring-primary ring-2",placeholder:"Select a category",control:v,name:"category"})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:["Hourly rate ",s("span",{className:"text-red-700",children:"*"})," ",(V=S.rate)!=null&&V.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(X=S.rate)==null?void 0:X.message}):""]}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-100 px-4 text-sm",children:"$"}),s("input",{placeholder:"",type:"number",...d("rate"),className:`remove-arrow focus:shadow-outline w-full rounded rounded-l-none border py-2 px-3 leading-tight text-gray-700 ${(ne=S.rate)!=null&&ne.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"description",children:["Description ",s("span",{className:"text-red-700",children:"*"})," ",(oe=S.description)!=null&&oe.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(q=S.description)==null?void 0:q.message}):""]}),s("textarea",{placeholder:"",...d("description"),className:`w-full resize-none rounded border py-2 px-3 leading-tight text-gray-700 ${(te=S.description)!=null&&te.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rule",children:["Property rules"," ",n.length>0&&s("button",{type:"button",className:"ml-8 text-gray-500 underline",onClick:()=>o(!0),children:"Select from a template"})]}),s("textarea",{placeholder:"",...d("rule"),className:`w-full resize-none rounded border py-2 px-3 leading-tight text-gray-700 ${(G=S.rule)!=null&&G.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),f("div",{className:"mb-6 flex items-center justify-between",children:[f("p",{className:"font-semibold",children:["* Max number of guests ",s("span",{className:"text-red-700",children:"*"})," ",(J=S.max_capacity)!=null&&J.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(K=S.max_capacity)==null?void 0:K.message}):""]}),s(Gz,{name:"max_capacity",control:v,setValue:ie=>g("max_capacity",ie)})]}),x&&f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"size",children:["Size (",s("span",{className:"text-sm font-normal italic",children:"optional "}),") ",(Q=S.size)!=null&&Q.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(Z=S.size)==null?void 0:Z.message}):""]}),s(fa,{shouldUnregister:!1,items:k,labelField:"label",valueField:"value",containerClassName:"",className:`w-full border py-2 px-3 ${(se=S.size)!=null&&se.message?"ring-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,openClassName:"ring-primary ring-2",placeholder:"Select size",control:v,name:"size"})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"additional_guest_rate",children:["Hourly rate for additional ","guests"," (",s("span",{className:"text-sm font-normal italic",children:"optional "}),")"," ",(ce=S.additional_guest_rate)!=null&&ce.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(le=S.additional_guest_rate)==null?void 0:le.message}):""]}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-100 px-4 text-sm",children:"$"}),s("input",{placeholder:"",type:"number",...d("additional_guest_rate"),className:`remove-arrow w-full rounded rounded-l-none border py-2 px-3 leading-tight text-gray-700 ${(ae=S.additional_guest_rate)!=null&&ae.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]})]}),s("hr",{className:"my-[48px]"}),s("button",{type:"submit",className:"login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",children:"Continue"}),s("br",{}),s("button",{type:"button",id:"save-as-draft",className:"mt-[24px] rounded border-2 border-[#98A2B3] py-2 px-4 tracking-wide outline-none focus:outline-none",onClick:b,children:"Save draft and exit"})]}),s(f9e,{isOpen:i,closeModal:()=>o(!1),templates:n,onSelect:ie=>g("rule",ie)})]})};function p9e(e){function t(U,W,V,X,ne){for(var oe=0,q=0,te=0,G=0,J,K,Q=0,Z=0,se,ce=se=J=0,le=0,ae=0,ie=0,de=0,fe=V.length,be=fe-1,he,ve="",Ce="",nt="",Ae="",Je;le<fe;){if(K=V.charCodeAt(le),le===be&&q+G+te+oe!==0&&(q!==0&&(K=q===47?10:47),G=te=oe=0,fe++,be++),q+G+te+oe===0){if(le===be&&(0<ae&&(ve=ve.replace(y,"")),0<ve.trim().length)){switch(K){case 32:case 9:case 59:case 13:case 10:break;default:ve+=V.charAt(le)}K=59}switch(K){case 123:for(ve=ve.trim(),J=ve.charCodeAt(0),se=1,de=++le;le<fe;){switch(K=V.charCodeAt(le)){case 123:se++;break;case 125:se--;break;case 47:switch(K=V.charCodeAt(le+1)){case 42:case 47:e:{for(ce=le+1;ce<be;++ce)switch(V.charCodeAt(ce)){case 47:if(K===42&&V.charCodeAt(ce-1)===42&&le+2!==ce){le=ce+1;break e}break;case 10:if(K===47){le=ce+1;break e}}le=ce}}break;case 91:K++;case 40:K++;case 34:case 39:for(;le++<be&&V.charCodeAt(le)!==K;);}if(se===0)break;le++}switch(se=V.substring(de,le),J===0&&(J=(ve=ve.replace(g,"").trim()).charCodeAt(0)),J){case 64:switch(0<ae&&(ve=ve.replace(y,"")),K=ve.charCodeAt(1),K){case 100:case 109:case 115:case 45:ae=W;break;default:ae=H}if(se=t(W,ae,se,K,ne+1),de=se.length,0<j&&(ae=n(H,ve,ie),Je=c(3,se,ae,W,O,M,de,K,ne,X),ve=ae.join(""),Je!==void 0&&(de=(se=Je.trim()).length)===0&&(K=0,se="")),0<de)switch(K){case 115:ve=ve.replace(_,o);case 100:case 109:case 45:se=ve+"{"+se+"}";break;case 107:ve=ve.replace(b,"$1 $2"),se=ve+"{"+se+"}",se=z===1||z===2&&i("@"+se,3)?"@-webkit-"+se+"@"+se:"@"+se;break;default:se=ve+se,X===112&&(se=(Ce+=se,""))}else se="";break;default:se=t(W,n(W,ve,ie),se,X,ne+1)}nt+=se,se=ie=ae=ce=J=0,ve="",K=V.charCodeAt(++le);break;case 125:case 59:if(ve=(0<ae?ve.replace(y,""):ve).trim(),1<(de=ve.length))switch(ce===0&&(J=ve.charCodeAt(0),J===45||96<J&&123>J)&&(de=(ve=ve.replace(" ",":")).length),0<j&&(Je=c(1,ve,W,U,O,M,Ce.length,X,ne,X))!==void 0&&(de=(ve=Je.trim()).length)===0&&(ve="\0\0"),J=ve.charCodeAt(0),K=ve.charCodeAt(1),J){case 0:break;case 64:if(K===105||K===99){Ae+=ve+V.charAt(le);break}default:ve.charCodeAt(de-1)!==58&&(Ce+=r(ve,J,K,ve.charCodeAt(2)))}ie=ae=ce=J=0,ve="",K=V.charCodeAt(++le)}}switch(K){case 13:case 10:q===47?q=0:1+J===0&&X!==107&&0<ve.length&&(ae=1,ve+="\0"),0<j*B&&c(0,ve,W,U,O,M,Ce.length,X,ne,X),M=1,O++;break;case 59:case 125:if(q+G+te+oe===0){M++;break}default:switch(M++,he=V.charAt(le),K){case 9:case 32:if(G+oe+q===0)switch(Q){case 44:case 58:case 9:case 32:he="";break;default:K!==32&&(he=" ")}break;case 0:he="\\0";break;case 12:he="\\f";break;case 11:he="\\v";break;case 38:G+q+oe===0&&(ae=ie=1,he="\f"+he);break;case 108:if(G+q+oe+F===0&&0<ce)switch(le-ce){case 2:Q===112&&V.charCodeAt(le-3)===58&&(F=Q);case 8:Z===111&&(F=Z)}break;case 58:G+q+oe===0&&(ce=le);break;case 44:q+te+G+oe===0&&(ae=1,he+="\r");break;case 34:case 39:q===0&&(G=G===K?0:G===0?K:G);break;case 91:G+q+te===0&&oe++;break;case 93:G+q+te===0&&oe--;break;case 41:G+q+oe===0&&te--;break;case 40:if(G+q+oe===0){if(J===0)switch(2*Q+3*Z){case 533:break;default:J=1}te++}break;case 64:q+te+G+oe+ce+se===0&&(se=1);break;case 42:case 47:if(!(0<G+oe+te))switch(q){case 0:switch(2*K+3*V.charCodeAt(le+1)){case 235:q=47;break;case 220:de=le,q=42}break;case 42:K===47&&Q===42&&de+2!==le&&(V.charCodeAt(de+2)===33&&(Ce+=V.substring(de,le+1)),he="",q=0)}}q===0&&(ve+=he)}Z=Q,Q=K,le++}if(de=Ce.length,0<de){if(ae=W,0<j&&(Je=c(2,Ce,ae,U,O,M,de,X,ne,X),Je!==void 0&&(Ce=Je).length===0))return Ae+Ce+nt;if(Ce=ae.join(",")+"{"+Ce+"}",z*F!==0){switch(z!==2||i(Ce,2)||(F=0),F){case 111:Ce=Ce.replace(k,":-moz-$1")+Ce;break;case 112:Ce=Ce.replace(x,"::-webkit-input-$1")+Ce.replace(x,"::-moz-$1")+Ce.replace(x,":-ms-input-$1")+Ce}F=0}}return Ae+Ce+nt}function n(U,W,V){var X=W.trim().split(m);W=X;var ne=X.length,oe=U.length;switch(oe){case 0:case 1:var q=0;for(U=oe===0?"":U[0]+" ";q<ne;++q)W[q]=a(U,W[q],V).trim();break;default:var te=q=0;for(W=[];q<ne;++q)for(var G=0;G<oe;++G)W[te++]=a(U[G]+" ",X[q],V).trim()}return W}function a(U,W,V){var X=W.charCodeAt(0);switch(33>X&&(X=(W=W.trim()).charCodeAt(0)),X){case 38:return W.replace(p,"$1"+U.trim());case 58:return U.trim()+W.replace(p,"$1"+U.trim());default:if(0<1*V&&0<W.indexOf("\f"))return W.replace(p,(U.charCodeAt(0)===58?"":"$1")+U.trim())}return U+W}function r(U,W,V,X){var ne=U+";",oe=2*W+3*V+4*X;if(oe===944){U=ne.indexOf(":",9)+1;var q=ne.substring(U,ne.length-1).trim();return q=ne.substring(0,U).trim()+q+";",z===1||z===2&&i(q,1)?"-webkit-"+q+q:q}if(z===0||z===2&&!i(ne,1))return ne;switch(oe){case 1015:return ne.charCodeAt(10)===97?"-webkit-"+ne+ne:ne;case 951:return ne.charCodeAt(3)===116?"-webkit-"+ne+ne:ne;case 963:return ne.charCodeAt(5)===110?"-webkit-"+ne+ne:ne;case 1009:if(ne.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+ne+ne;case 978:return"-webkit-"+ne+"-moz-"+ne+ne;case 1019:case 983:return"-webkit-"+ne+"-moz-"+ne+"-ms-"+ne+ne;case 883:if(ne.charCodeAt(8)===45)return"-webkit-"+ne+ne;if(0<ne.indexOf("image-set(",11))return ne.replace(P,"$1-webkit-$2")+ne;break;case 932:if(ne.charCodeAt(4)===45)switch(ne.charCodeAt(5)){case 103:return"-webkit-box-"+ne.replace("-grow","")+"-webkit-"+ne+"-ms-"+ne.replace("grow","positive")+ne;case 115:return"-webkit-"+ne+"-ms-"+ne.replace("shrink","negative")+ne;case 98:return"-webkit-"+ne+"-ms-"+ne.replace("basis","preferred-size")+ne}return"-webkit-"+ne+"-ms-"+ne+ne;case 964:return"-webkit-"+ne+"-ms-flex-"+ne+ne;case 1023:if(ne.charCodeAt(8)!==99)break;return q=ne.substring(ne.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+q+"-webkit-"+ne+"-ms-flex-pack"+q+ne;case 1005:return v.test(ne)?ne.replace(w,":-webkit-")+ne.replace(w,":-moz-")+ne:ne;case 1e3:switch(q=ne.substring(13).trim(),W=q.indexOf("-")+1,q.charCodeAt(0)+q.charCodeAt(W)){case 226:q=ne.replace(N,"tb");break;case 232:q=ne.replace(N,"tb-rl");break;case 220:q=ne.replace(N,"lr");break;default:return ne}return"-webkit-"+ne+"-ms-"+q+ne;case 1017:if(ne.indexOf("sticky",9)===-1)break;case 975:switch(W=(ne=U).length-10,q=(ne.charCodeAt(W)===33?ne.substring(0,W):ne).substring(U.indexOf(":",7)+1).trim(),oe=q.charCodeAt(0)+(q.charCodeAt(7)|0)){case 203:if(111>q.charCodeAt(8))break;case 115:ne=ne.replace(q,"-webkit-"+q)+";"+ne;break;case 207:case 102:ne=ne.replace(q,"-webkit-"+(102<oe?"inline-":"")+"box")+";"+ne.replace(q,"-webkit-"+q)+";"+ne.replace(q,"-ms-"+q+"box")+";"+ne}return ne+";";case 938:if(ne.charCodeAt(5)===45)switch(ne.charCodeAt(6)){case 105:return q=ne.replace("-items",""),"-webkit-"+ne+"-webkit-box-"+q+"-ms-flex-"+q+ne;case 115:return"-webkit-"+ne+"-ms-flex-item-"+ne.replace(E,"")+ne;default:return"-webkit-"+ne+"-ms-flex-line-pack"+ne.replace("align-content","").replace(E,"")+ne}break;case 973:case 989:if(ne.charCodeAt(3)!==45||ne.charCodeAt(4)===122)break;case 931:case 953:if(D.test(U)===!0)return(q=U.substring(U.indexOf(":")+1)).charCodeAt(0)===115?r(U.replace("stretch","fill-available"),W,V,X).replace(":fill-available",":stretch"):ne.replace(q,"-webkit-"+q)+ne.replace(q,"-moz-"+q.replace("fill-",""))+ne;break;case 962:if(ne="-webkit-"+ne+(ne.charCodeAt(5)===102?"-ms-"+ne:"")+ne,V+X===211&&ne.charCodeAt(13)===105&&0<ne.indexOf("transform",10))return ne.substring(0,ne.indexOf(";",27)+1).replace(S,"$1-webkit-$2")+ne}return ne}function i(U,W){var V=U.indexOf(W===1?":":"{"),X=U.substring(0,W!==3?V:10);return V=U.substring(V+1,U.length-1),I(W!==2?X:X.replace(T,"$1"),V,W)}function o(U,W){var V=r(W,W.charCodeAt(0),W.charCodeAt(1),W.charCodeAt(2));return V!==W+";"?V.replace(C," or ($1)").substring(4):"("+W+")"}function c(U,W,V,X,ne,oe,q,te,G,J){for(var K=0,Q=W,Z;K<j;++K)switch(Z=A[K].call(u,U,Q,V,X,ne,oe,q,te,G,J)){case void 0:case!1:case!0:case null:break;default:Q=Z}if(Q!==W)return Q}function l(U){switch(U){case void 0:case null:j=A.length=0;break;default:if(typeof U=="function")A[j++]=U;else if(typeof U=="object")for(var W=0,V=U.length;W<V;++W)l(U[W]);else B=!!U|0}return l}function d(U){return U=U.prefix,U!==void 0&&(I=null,U?typeof U!="function"?z=1:(z=2,I=U):z=0),d}function u(U,W){var V=U;if(33>V.charCodeAt(0)&&(V=V.trim()),Y=V,V=[Y],0<j){var X=c(-1,W,V,V,O,M,0,0,0,0);X!==void 0&&typeof X=="string"&&(W=X)}var ne=t(H,V,W,0,0);return 0<j&&(X=c(-2,ne,V,V,O,M,ne.length,0,0,0),X!==void 0&&(ne=X)),Y="",F=0,M=O=1,ne}var g=/^\0+/g,y=/[\0\r\f]/g,w=/: */g,v=/zoo|gra/,S=/([,: ])(transform)/g,m=/,\r+?/g,p=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,x=/::(place)/g,k=/:(read-only)/g,N=/[svh]\w+-[tblr]{2}/,_=/\(\s*(.*)\s*\)/g,C=/([\s\S]*?);/g,E=/-self|flex-/g,T=/[^]*?(:[rp][el]a[\w-]+)[^]*/,D=/stretch|:\s*\w+\-(?:conte|avail)/,P=/([^-])(image-set\()/,M=1,O=1,F=0,z=1,H=[],A=[],j=0,I=null,B=0,Y="";return u.use=l,u.set=d,e!==void 0&&d(e),u}var h9e={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 g9e(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var b9e=/^((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|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)-.*))$/,$8=g9e(function(e){return b9e.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function co(){return(co=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}var B8=function(e,t){for(var n=[e[0]],a=0,r=t.length;a<r;a+=1)n.push(t[a],e[a+1]);return n},y_=function(e){return e!==null&&typeof e=="object"&&(e.toString?e.toString():Object.prototype.toString.call(e))==="[object Object]"&&!ix.exports.typeOf(e)},Ob=Object.freeze([]),Tl=Object.freeze({});function jp(e){return typeof e=="function"}function H8(e){return e.displayName||e.name||"Component"}function gS(e){return e&&typeof e.styledComponentId=="string"}var Yu=typeof process!="undefined"&&process.env!==void 0&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",bS=typeof window!="undefined"&&"HTMLElement"in window,y9e=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process!="undefined"&&process.env!==void 0&&({}.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&{}.REACT_APP_SC_DISABLE_SPEEDY!==""?{}.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&{}.REACT_APP_SC_DISABLE_SPEEDY:{}.SC_DISABLE_SPEEDY!==void 0&&{}.SC_DISABLE_SPEEDY!==""?{}.SC_DISABLE_SPEEDY!=="false"&&{}.SC_DISABLE_SPEEDY:!1));function Ah(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var x9e=function(){function e(n){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=n}var t=e.prototype;return t.indexOfGroup=function(n){for(var a=0,r=0;r<n;r++)a+=this.groupSizes[r];return a},t.insertRules=function(n,a){if(n>=this.groupSizes.length){for(var r=this.groupSizes,i=r.length,o=i;n>=o;)(o<<=1)<0&&Ah(16,""+n);this.groupSizes=new Uint32Array(o),this.groupSizes.set(r),this.length=o;for(var c=i;c<o;c++)this.groupSizes[c]=0}for(var l=this.indexOfGroup(n+1),d=0,u=a.length;d<u;d++)this.tag.insertRule(l,a[d])&&(this.groupSizes[n]++,l++)},t.clearGroup=function(n){if(n<this.length){var a=this.groupSizes[n],r=this.indexOfGroup(n),i=r+a;this.groupSizes[n]=0;for(var o=r;o<i;o++)this.tag.deleteRule(r)}},t.getGroup=function(n){var a="";if(n>=this.length||this.groupSizes[n]===0)return a;for(var r=this.groupSizes[n],i=this.indexOfGroup(n),o=i+r,c=i;c<o;c++)a+=this.tag.getRule(c)+`/*!sc*/
`;return a},e}(),Rg=new Map,Pb=new Map,Wm=1,J0=function(e){if(Rg.has(e))return Rg.get(e);for(;Pb.has(Wm);)Wm++;var t=Wm++;return Rg.set(e,t),Pb.set(t,e),t},w9e=function(e){return Pb.get(e)},v9e=function(e,t){t>=Wm&&(Wm=t+1),Rg.set(e,t),Pb.set(t,e)},_9e="style["+Yu+'][data-styled-version="5.3.11"]',N9e=new RegExp("^"+Yu+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),S9e=function(e,t,n){for(var a,r=n.split(","),i=0,o=r.length;i<o;i++)(a=r[i])&&e.registerName(t,a)},k9e=function(e,t){for(var n=(t.textContent||"").split(`/*!sc*/
`),a=[],r=0,i=n.length;r<i;r++){var o=n[r].trim();if(o){var c=o.match(N9e);if(c){var l=0|parseInt(c[1],10),d=c[2];l!==0&&(v9e(d,l),S9e(e,d,c[3]),e.getTag().insertRules(l,a)),a.length=0}else a.push(o)}}},C9e=function(){return typeof __webpack_nonce__!="undefined"?__webpack_nonce__:null},qz=function(e){var t=document.head,n=e||t,a=document.createElement("style"),r=function(c){for(var l=c.childNodes,d=l.length;d>=0;d--){var u=l[d];if(u&&u.nodeType===1&&u.hasAttribute(Yu))return u}}(n),i=r!==void 0?r.nextSibling:null;a.setAttribute(Yu,"active"),a.setAttribute("data-styled-version","5.3.11");var o=C9e();return o&&a.setAttribute("nonce",o),n.insertBefore(a,i),a},E9e=function(){function e(n){var a=this.element=qz(n);a.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var i=document.styleSheets,o=0,c=i.length;o<c;o++){var l=i[o];if(l.ownerNode===r)return l}Ah(17)}(a),this.length=0}var t=e.prototype;return t.insertRule=function(n,a){try{return this.sheet.insertRule(a,n),this.length++,!0}catch{return!1}},t.deleteRule=function(n){this.sheet.deleteRule(n),this.length--},t.getRule=function(n){var a=this.sheet.cssRules[n];return a!==void 0&&typeof a.cssText=="string"?a.cssText:""},e}(),T9e=function(){function e(n){var a=this.element=qz(n);this.nodes=a.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(n,a){if(n<=this.length&&n>=0){var r=document.createTextNode(a),i=this.nodes[n];return this.element.insertBefore(r,i||null),this.length++,!0}return!1},t.deleteRule=function(n){this.element.removeChild(this.nodes[n]),this.length--},t.getRule=function(n){return n<this.length?this.nodes[n].textContent:""},e}(),L9e=function(){function e(n){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(n,a){return n<=this.length&&(this.rules.splice(n,0,a),this.length++,!0)},t.deleteRule=function(n){this.rules.splice(n,1),this.length--},t.getRule=function(n){return n<this.length?this.rules[n]:""},e}(),U8=bS,D9e={isServer:!bS,useCSSOMInjection:!y9e},Zz=function(){function e(n,a,r){n===void 0&&(n=Tl),a===void 0&&(a={}),this.options=co({},D9e,{},n),this.gs=a,this.names=new Map(r),this.server=!!n.isServer,!this.server&&bS&&U8&&(U8=!1,function(i){for(var o=document.querySelectorAll(_9e),c=0,l=o.length;c<l;c++){var d=o[c];d&&d.getAttribute(Yu)!=="active"&&(k9e(i,d),d.parentNode&&d.parentNode.removeChild(d))}}(this))}e.registerId=function(n){return J0(n)};var t=e.prototype;return t.reconstructWithOptions=function(n,a){return a===void 0&&(a=!0),new e(co({},this.options,{},n),this.gs,a&&this.names||void 0)},t.allocateGSInstance=function(n){return this.gs[n]=(this.gs[n]||0)+1},t.getTag=function(){return this.tag||(this.tag=(r=(a=this.options).isServer,i=a.useCSSOMInjection,o=a.target,n=r?new L9e(o):i?new E9e(o):new T9e(o),new x9e(n)));var n,a,r,i,o},t.hasNameForId=function(n,a){return this.names.has(n)&&this.names.get(n).has(a)},t.registerName=function(n,a){if(J0(n),this.names.has(n))this.names.get(n).add(a);else{var r=new Set;r.add(a),this.names.set(n,r)}},t.insertRules=function(n,a,r){this.registerName(n,a),this.getTag().insertRules(J0(n),r)},t.clearNames=function(n){this.names.has(n)&&this.names.get(n).clear()},t.clearRules=function(n){this.getTag().clearGroup(J0(n)),this.clearNames(n)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(n){for(var a=n.getTag(),r=a.length,i="",o=0;o<r;o++){var c=w9e(o);if(c!==void 0){var l=n.names.get(c),d=a.getGroup(o);if(l&&d&&l.size){var u=Yu+".g"+o+'[id="'+c+'"]',g="";l!==void 0&&l.forEach(function(y){y.length>0&&(g+=y+",")}),i+=""+d+u+'{content:"'+g+`"}/*!sc*/
`}}}return i}(this)},e}(),M9e=/(a)(d)/gi,V8=function(e){return String.fromCharCode(e+(e>25?39:97))};function x_(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=V8(t%52)+n;return(V8(t%52)+n).replace(M9e,"$1-$2")}var su=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Qz=function(e){return su(5381,e)};function A9e(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(jp(n)&&!gS(n))return!1}return!0}var I9e=Qz("5.3.11"),O9e=function(){function e(t,n,a){this.rules=t,this.staticRulesId="",this.isStatic=(a===void 0||a.isStatic)&&A9e(t),this.componentId=n,this.baseHash=su(I9e,n),this.baseStyle=a,Zz.registerId(n)}return e.prototype.generateAndInjectStyles=function(t,n,a){var r=this.componentId,i=[];if(this.baseStyle&&i.push(this.baseStyle.generateAndInjectStyles(t,n,a)),this.isStatic&&!a.hash)if(this.staticRulesId&&n.hasNameForId(r,this.staticRulesId))i.push(this.staticRulesId);else{var o=Gu(this.rules,t,n,a).join(""),c=x_(su(this.baseHash,o)>>>0);if(!n.hasNameForId(r,c)){var l=a(o,"."+c,void 0,r);n.insertRules(r,c,l)}i.push(c),this.staticRulesId=c}else{for(var d=this.rules.length,u=su(this.baseHash,a.hash),g="",y=0;y<d;y++){var w=this.rules[y];if(typeof w=="string")g+=w;else if(w){var v=Gu(w,t,n,a),S=Array.isArray(v)?v.join(""):v;u=su(u,S+y),g+=S}}if(g){var m=x_(u>>>0);if(!n.hasNameForId(r,m)){var p=a(g,"."+m,void 0,r);n.insertRules(r,m,p)}i.push(m)}}return i.join(" ")},e}(),P9e=/^\s*\/\/.*$/gm,R9e=[":","[",".","#"];function j9e(e){var t,n,a,r,i=e===void 0?Tl:e,o=i.options,c=o===void 0?Tl:o,l=i.plugins,d=l===void 0?Ob:l,u=new p9e(c),g=[],y=function(S){function m(p){if(p)try{S(p+"}")}catch{}}return function(p,b,x,k,N,_,C,E,T,D){switch(p){case 1:if(T===0&&b.charCodeAt(0)===64)return S(b+";"),"";break;case 2:if(E===0)return b+"/*|*/";break;case 3:switch(E){case 102:case 112:return S(x[0]+b),"";default:return b+(D===0?"/*|*/":"")}case-2:b.split("/*|*/}").forEach(m)}}}(function(S){g.push(S)}),w=function(S,m,p){return m===0&&R9e.indexOf(p[n.length])!==-1||p.match(r)?S:"."+t};function v(S,m,p,b){b===void 0&&(b="&");var x=S.replace(P9e,""),k=m&&p?p+" "+m+" { "+x+" }":x;return t=b,n=m,a=new RegExp("\\"+n+"\\b","g"),r=new RegExp("(\\"+n+"\\b){2,}"),u(p||!m?"":m,k)}return u.use([].concat(d,[function(S,m,p){S===2&&p.length&&p[0].lastIndexOf(n)>0&&(p[0]=p[0].replace(a,w))},y,function(S){if(S===-2){var m=g;return g=[],m}}])),v.hash=d.length?d.reduce(function(S,m){return m.name||Ah(15),su(S,m.name)},5381).toString():"",v}var Jz=R.createContext();Jz.Consumer;var Kz=R.createContext(),z9e=(Kz.Consumer,new Zz),w_=j9e();function F9e(){return h.exports.useContext(Jz)||z9e}function $9e(){return h.exports.useContext(Kz)||w_}var B9e=function(){function e(t,n){var a=this;this.inject=function(r,i){i===void 0&&(i=w_);var o=a.name+i.hash;r.hasNameForId(a.id,o)||r.insertRules(a.id,o,i(a.rules,o,"@keyframes"))},this.toString=function(){return Ah(12,String(a.name))},this.name=t,this.id="sc-keyframes-"+t,this.rules=n}return e.prototype.getName=function(t){return t===void 0&&(t=w_),this.name+t.hash},e}(),H9e=/([A-Z])/,U9e=/([A-Z])/g,V9e=/^ms-/,W9e=function(e){return"-"+e.toLowerCase()};function W8(e){return H9e.test(e)?e.replace(U9e,W9e).replace(V9e,"-ms-"):e}var Y8=function(e){return e==null||e===!1||e===""};function Gu(e,t,n,a){if(Array.isArray(e)){for(var r,i=[],o=0,c=e.length;o<c;o+=1)(r=Gu(e[o],t,n,a))!==""&&(Array.isArray(r)?i.push.apply(i,r):i.push(r));return i}if(Y8(e))return"";if(gS(e))return"."+e.styledComponentId;if(jp(e)){if(typeof(d=e)!="function"||d.prototype&&d.prototype.isReactComponent||!t)return e;var l=e(t);return Gu(l,t,n,a)}var d;return e instanceof B9e?n?(e.inject(n,a),e.getName(a)):e:y_(e)?function u(g,y){var w,v,S=[];for(var m in g)g.hasOwnProperty(m)&&!Y8(g[m])&&(Array.isArray(g[m])&&g[m].isCss||jp(g[m])?S.push(W8(m)+":",g[m],";"):y_(g[m])?S.push.apply(S,u(g[m],m)):S.push(W8(m)+": "+(w=m,(v=g[m])==null||typeof v=="boolean"||v===""?"":typeof v!="number"||v===0||w in h9e||w.startsWith("--")?String(v).trim():v+"px")+";"));return y?[y+" {"].concat(S,["}"]):S}(e):e.toString()}var G8=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function Xz(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return jp(e)||y_(e)?G8(Gu(B8(Ob,[e].concat(n)))):n.length===0&&e.length===1&&typeof e[0]=="string"?e:G8(Gu(B8(e,n)))}var Y9e=function(e,t,n){return n===void 0&&(n=Tl),e.theme!==n.theme&&e.theme||t||n.theme},G9e=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,q9e=/(^-|-$)/g;function xv(e){return e.replace(G9e,"-").replace(q9e,"")}var Z9e=function(e){return x_(Qz(e)>>>0)};function K0(e){return typeof e=="string"&&!0}var v_=function(e){return typeof e=="function"||typeof e=="object"&&e!==null&&!Array.isArray(e)},Q9e=function(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"};function J9e(e,t,n){var a=e[n];v_(t)&&v_(a)?eF(a,t):e[n]=t}function eF(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];for(var r=0,i=n;r<i.length;r++){var o=i[r];if(v_(o))for(var c in o)Q9e(c)&&J9e(e,o[c],c)}return e}var tF=R.createContext();tF.Consumer;var wv={};function nF(e,t,n){var a=gS(e),r=!K0(e),i=t.attrs,o=i===void 0?Ob:i,c=t.componentId,l=c===void 0?function(b,x){var k=typeof b!="string"?"sc":xv(b);wv[k]=(wv[k]||0)+1;var N=k+"-"+Z9e("5.3.11"+k+wv[k]);return x?x+"-"+N:N}(t.displayName,t.parentComponentId):c,d=t.displayName,u=d===void 0?function(b){return K0(b)?"styled."+b:"Styled("+H8(b)+")"}(e):d,g=t.displayName&&t.componentId?xv(t.displayName)+"-"+t.componentId:t.componentId||l,y=a&&e.attrs?Array.prototype.concat(e.attrs,o).filter(Boolean):o,w=t.shouldForwardProp;a&&e.shouldForwardProp&&(w=t.shouldForwardProp?function(b,x,k){return e.shouldForwardProp(b,x,k)&&t.shouldForwardProp(b,x,k)}:e.shouldForwardProp);var v,S=new O9e(n,g,a?e.componentStyle:void 0),m=S.isStatic&&o.length===0,p=function(b,x){return function(k,N,_,C){var E=k.attrs,T=k.componentStyle,D=k.defaultProps,P=k.foldedComponentIds,M=k.shouldForwardProp,O=k.styledComponentId,F=k.target,z=function(X,ne,oe){X===void 0&&(X=Tl);var q=co({},ne,{theme:X}),te={};return oe.forEach(function(G){var J,K,Q,Z=G;for(J in jp(Z)&&(Z=Z(q)),Z)q[J]=te[J]=J==="className"?(K=te[J],Q=Z[J],K&&Q?K+" "+Q:K||Q):Z[J]}),[q,te]}(Y9e(N,h.exports.useContext(tF),D)||Tl,N,E),H=z[0],A=z[1],j=function(X,ne,oe,q){var te=F9e(),G=$9e(),J=ne?X.generateAndInjectStyles(Tl,te,G):X.generateAndInjectStyles(oe,te,G);return J}(T,C,H),I=_,B=A.$as||N.$as||A.as||N.as||F,Y=K0(B),U=A!==N?co({},N,{},A):N,W={};for(var V in U)V[0]!=="$"&&V!=="as"&&(V==="forwardedAs"?W.as=U[V]:(M?M(V,$8,B):!Y||$8(V))&&(W[V]=U[V]));return N.style&&A.style!==N.style&&(W.style=co({},N.style,{},A.style)),W.className=Array.prototype.concat(P,O,j!==O?j:null,N.className,A.className).filter(Boolean).join(" "),W.ref=I,h.exports.createElement(B,W)}(v,b,x,m)};return p.displayName=u,(v=R.forwardRef(p)).attrs=y,v.componentStyle=S,v.displayName=u,v.shouldForwardProp=w,v.foldedComponentIds=a?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):Ob,v.styledComponentId=g,v.target=a?e.target:e,v.withComponent=function(b){var x=t.componentId,k=function(_,C){if(_==null)return{};var E,T,D={},P=Object.keys(_);for(T=0;T<P.length;T++)E=P[T],C.indexOf(E)>=0||(D[E]=_[E]);return D}(t,["componentId"]),N=x&&x+"-"+(K0(b)?b:xv(H8(b)));return nF(b,co({},k,{attrs:y,componentId:N}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(b){this._foldedDefaultProps=a?eF({},e.defaultProps,b):b}}),Object.defineProperty(v,"toString",{value:function(){return"."+v.styledComponentId}}),r&&aj(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var __=function(e){return function t(n,a,r){if(r===void 0&&(r=Tl),!ix.exports.isValidElementType(a))return Ah(1,String(a));var i=function(){return n(a,r,Xz.apply(void 0,arguments))};return i.withConfig=function(o){return t(n,a,co({},r,{},o))},i.attrs=function(o){return t(n,a,co({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},i}(nF,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){__[e]=__(e)});var Mx=__;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var kc=function(){return kc=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},kc.apply(this,arguments)};function Ih(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var q8,Z8,Q8,J8,K8,K9e=Xz(q8||(q8=Ih([`
display: flex;
align-items: center;
min-width: 322px;
max-width: 508px;
height: 48px;
border: dashed 2px `,`;
padding: 8px 16px 8px 8px;
border-radius: 5px;
cursor: pointer;
flex-grow: 0;
&.is-disabled {
border: dashed 2px `,`;
cursor: no-drop;
svg {
fill: `,`;
color: `,`;
path {
fill: `,`;
color: `,`;
}
}
}
`],[`
display: flex;
align-items: center;
min-width: 322px;
max-width: 508px;
height: 48px;
border: dashed 2px `,`;
padding: 8px 16px 8px 8px;
border-radius: 5px;
cursor: pointer;
flex-grow: 0;
&.is-disabled {
border: dashed 2px `,`;
cursor: no-drop;
svg {
fill: `,`;
color: `,`;
path {
fill: `,`;
color: `,`;
}
}
}
`])),"#0658c2","#666","#666","#666","#666","#666"),X9e=Mx.label(Z8||(Z8=Ih([`
position: relative;
`,`;
&:focus-within {
outline: 2px solid black;
}
& > input {
display: block;
opacity: 0;
position: absolute;
pointer-events: none;
}
`],[`
position: relative;
`,`;
&:focus-within {
outline: 2px solid black;
}
& > input {
display: block;
opacity: 0;
position: absolute;
pointer-events: none;
}
`])),function(e){return e.overRide?"":K9e}),e7e=Mx.div(Q8||(Q8=Ih([`
border: dashed 2px `,`;
border-radius: 5px;
background-color: `,`;
opacity: 0.5;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
& > span {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
`],[`
border: dashed 2px `,`;
border-radius: 5px;
background-color: `,`;
opacity: 0.5;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
& > span {
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
`])),"#666","#999"),t7e=Mx.div(J8||(J8=Ih([`
display: flex;
justify-content: space-between;
flex-grow: 1;
& > span {
font-size: 12px;
color: `,`;
}
.file-types {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 100px;
}
`],[`
display: flex;
justify-content: space-between;
flex-grow: 1;
& > span {
font-size: 12px;
color: `,`;
}
.file-types {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 100px;
}
`])),function(e){return e.error?"red":"#666"}),n7e=Mx.span(K8||(K8=Ih([`
font-size: 14px;
color: `,`;
span {
text-decoration: underline;
}
`],[`
font-size: 14px;
color: `,`;
span {
text-decoration: underline;
}
`])),"#666"),X8=function(e){return e/1e3/1e3},a7e=function(e){return e===void 0?"":e.map(function(t){return".".concat(t.toLowerCase())}).join(",")};function r7e(e){var t=e.types,n=e.minSize,a=e.maxSize;if(t){var r=t.toString(),i="";return a&&(i+="size >= ".concat(a,", ")),n&&(i+="size <= ".concat(n,", ")),s("span",kc({title:"".concat(i,"types: ").concat(r),className:"file-types"},{children:r}),void 0)}return null}function s7e(){return f("svg",kc({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:[s("path",{d:"M5.33317 6.66667H22.6665V16H25.3332V6.66667C25.3332 5.196 24.1372 4 22.6665 4H5.33317C3.8625 4 2.6665 5.196 2.6665 6.66667V22.6667C2.6665 24.1373 3.8625 25.3333 5.33317 25.3333H15.9998V22.6667H5.33317V6.66667Z",fill:"#0658C2"},void 0),s("path",{d:"M10.6665 14.6667L6.6665 20H21.3332L15.9998 12L11.9998 17.3333L10.6665 14.6667Z",fill:"#0658C2"},void 0),s("path",{d:"M25.3332 18.6667H22.6665V22.6667H18.6665V25.3333H22.6665V29.3333H25.3332V25.3333H29.3332V22.6667H25.3332V18.6667Z",fill:"#0658C2"},void 0)]}),void 0)}var vv=0,i7e=function(e,t,n,a,r){return n?s("span",{children:"File type/size error, Hovered on types!"},void 0):s(n7e,{children:a?s("span",{children:"Upload disabled"},void 0):e||t?f(Se,{children:[s("span",{children:"Uploaded Successfully!"},void 0)," Upload another?"]},void 0):s(Se,{children:f(Se,r?{children:[s("span",{children:r.split(" ")[0]},void 0)," ",r.substr(r.indexOf(" ")+1)]}:{children:[s("span",{children:"Upload"},void 0)," or drop a file right here"]},void 0)},void 0)},void 0)},ti=function(e){var t=e.name,n=e.hoverTitle,a=e.types,r=e.handleChange,i=e.classes,o=e.children,c=e.maxSize,l=e.minSize,d=e.fileOrFiles,u=e.onSizeError,g=e.onTypeError,y=e.onSelect,w=e.onDrop,v=e.disabled,S=e.label,m=e.multiple,p=e.required,b=e.onDraggingStateChange,x=e.dropMessageStyle,k=h.exports.useRef(null),N=h.exports.useRef(null),_=h.exports.useState(!1),C=_[0],E=_[1],T=h.exports.useState(null),D=T[0],P=T[1],M=h.exports.useState(!1),O=M[0],F=M[1],z=function(j){return a&&!function(I,B){var Y=I.name.split(".").pop();return B.map(function(U){return U.toLowerCase()}).includes(Y.toLowerCase())}(j,a)?(F(!0),g&&g("File type is not supported"),!1):c&&X8(j.size)>c?(F(!0),u&&u("File size is too big"),!1):!(l&&X8(j.size)<l)||(F(!0),u&&u("File size is too small"),!1)},H=function(j){var I=!1;if(j){if(j instanceof File)I=!z(j);else for(var B=0;B<j.length;B++){var Y=j[B];I=!z(Y)||I}return!I&&(r&&r(j),P(j),E(!0),F(!1),!0)}return!1},A=function(j){var I=j.labelRef,B=j.inputRef,Y=j.multiple,U=j.handleChanges,W=j.onDrop,V=h.exports.useState(!1),X=V[0],ne=V[1],oe=h.exports.useCallback(function(){B.current.click()},[B]),q=h.exports.useCallback(function(K){K.preventDefault(),K.stopPropagation(),vv++,K.dataTransfer.items&&K.dataTransfer.items.length!==0&&ne(!0)},[]),te=h.exports.useCallback(function(K){K.preventDefault(),K.stopPropagation(),--vv>0||ne(!1)},[]),G=h.exports.useCallback(function(K){K.preventDefault(),K.stopPropagation()},[]),J=h.exports.useCallback(function(K){K.preventDefault(),K.stopPropagation(),ne(!1),vv=0;var Q=K.dataTransfer.files;if(Q&&Q.length>0){var Z=Y?Q:Q[0],se=U(Z);W&&se&&W(Z)}},[U]);return h.exports.useEffect(function(){var K=I.current;return K.addEventListener("click",oe),K.addEventListener("dragenter",q),K.addEventListener("dragleave",te),K.addEventListener("dragover",G),K.addEventListener("drop",J),function(){K.removeEventListener("click",oe),K.removeEventListener("dragenter",q),K.removeEventListener("dragleave",te),K.removeEventListener("dragover",G),K.removeEventListener("drop",J)}},[oe,q,te,G,J,I]),X}({labelRef:k,inputRef:N,multiple:m,handleChanges:H,onDrop:w});return h.exports.useEffect(function(){b==null||b(A)},[A]),h.exports.useEffect(function(){d?(E(!0),P(d)):(N.current&&(N.current.value=""),E(!1),P(null))},[d]),f(X9e,kc({overRide:o,className:"".concat(i||""," ").concat(v?"is-disabled":""),ref:k,htmlFor:t,onClick:function(j){j.preventDefault(),j.stopPropagation()}},{children:[s("input",{onClick:function(j){j.stopPropagation(),N&&N.current&&(N.current.value="",N.current.click())},onChange:function(j){var I=j.target.files,B=m?I:I[0],Y=H(B);y&&Y&&y(B)},accept:a7e(a),ref:N,type:"file",name:t,disabled:v,multiple:m,required:p},void 0),A&&s(e7e,kc({style:x},{children:s("span",{children:n||"Drop Here"},void 0)}),void 0),!o&&f(Se,{children:[s(s7e,{},void 0),f(t7e,kc({error:O},{children:[i7e(D,C,O,v,S),s(r7e,{types:a,minSize:l,maxSize:c},void 0)]}),void 0)]},void 0),o]}),void 0)};new _e;function aF(){const[e,t]=h.exports.useState("");async function n(){var i;new _e().setTable("cms");const r=await _t("cms","post",{payload:{content_key:"cancellation_policy"},limit:1e3,page:1},"PAGINATE");if(Array.isArray(r.list)&&r.list.length>0){t((i=r.list.find(o=>o.content_key=="cancellation_policy"))==null?void 0:i.content_value);return}}return h.exports.useEffect(()=>{n()},[]),e}function rF({setAddOnModal:e,getData:t}){var v,S;let n=new _e;const{state:a,dispatch:r}=R.useContext(we),[i,o]=R.useState(),c=Qe({name:ge().required("Name is required"),cost:dt().required().typeError("Cost must be a number")}).required(),{dispatch:l}=R.useContext(Ee);je();const{register:d,handleSubmit:u,setError:g,formState:{errors:y}}=Oe({resolver:Xe(c)});return s("div",{className:"popup-container flex items-center justify-center normal-case",children:s("div",{className:"w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5",onClick:m=>m.stopPropagation(),children:f("form",{className:" w-full max-w-lg",onSubmit:u(async m=>{o(!0);try{n.setTable("add_on");const p=await n.callRestAPI({name:m.name,cost:m.cost,creator_id:Number(localStorage.getItem("user")),space_id:m.space_id||null},"POST");if(!p.error)t(),pe(r,"Added"),o(!1),e(!1);else if(p.validation){const b=Object.keys(p.validation);for(let x=0;x<b.length;x++){const k=b[x];g(k,{type:"manual",message:p.validation[k]})}}}catch(p){o(!1),console.log("Error",p),g("name",{type:"manual",message:p.message}),me(l,p.message)}}),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"add_on_id",children:"Add-Ons"}),s("input",{type:"text",className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...d("name"),placeholder:"Addon Name"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(v=y.name)==null?void 0:v.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"add_on_cost",children:"Add-On Cost"}),s("input",{type:"number",className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...d("cost"),placeholder:"Addon Cost"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(S=y.cost)==null?void 0:S.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>e(!1),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:i,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${i?"py-1":"py-2"}`,children:"Save"})]})]})})})}new St;async function o7e(e){if(!e)return null;try{let n=await(await fetch(e)).blob(),a={type:"image/jpeg"};return new File([n],e.split("/").pop(),a)}catch{return null}}const l7e=()=>{const{spaceData:e,dispatch:t}=ji(),{dispatch:n}=h.exports.useContext(we),[a,r]=h.exports.useState([]),[i,o]=h.exports.useState(!1),[c,l]=h.exports.useState(!1),d=cr(c,100),u=aF(),[g,y]=h.exports.useState(!1),w=cr(g,100),{addons:v,amenities:S}=Mu(),m=new _e,{spaceCategories:p,ruleTemplates:b}=Mu(),x=je(),k=Qe({question:ge()}),{register:N,handleSubmit:_,getValues:C,setValue:E,watch:T,control:D,formState:{errors:P}}=Oe({resolver:Xe(k),defaultValues:e}),M=T(),O=T("amenities"),F=T("addons"),{fields:z,append:H,remove:A}=af({control:D,name:"faqs"}),j=async U=>{if(!U)return{url:"",id:null};const W=new FormData;W.append("file",U);try{return await m.uploadImage(W)}catch{return{url:"",id:null}}},I=async U=>{const W=[],V=[];n({type:"START_LOADING"});for(let X=0;X<a.length;X++){const ne=a[X],oe=["image/jpeg","image/png","image/webp","image/svg+xml"];if((ne==null?void 0:ne.type)&&!oe.includes(ne==null?void 0:ne.type)){pe(n,"Invalid file type. Only JPEG, PNG, WEBP, and SVG are allowed.",4e3,"ERROR");return}if((ne==null?void 0:ne.size)&&(ne==null?void 0:ne.size)>5*1024*1024){pe(n,"One or more of the image is too large. Max size is 5 MB.",4e3,"ERROR");return}const q=await j(ne);W[X]=q.url,V[X]=q.id,(ne==null?void 0:ne.name)==U.thumbnail&&t({type:"SET_THUMBNAIL",payload:q.id})}t({type:"SET_DETAILS_TWO",payload:{faqs:U.faqs,amenities:U.amenities,addons:U.addons,pictures:W,pictureIds:V}}),n({type:"STOP_LOADING"}),x("/spaces/add/3"),window.scrollTo({top:0,left:0})},B=async()=>{var X,ne,oe;const U=localStorage.getItem("user");n({type:"START_LOADING"});var W,V;try{e.property_id||(m.setTable("property"),W=await m.callRestAPI({address_line_1:e.address_line_1,address_line_2:e.address_line_2,city:e.city,country:e.country,zip:e.zip,status:1,verified:1,host_id:U,name:e.name,rule:e.rule},"POST"),t({type:"SET_PROPERTY_ID",payload:W.message})),e.property_space_id||(m.setTable("property_spaces"),V=await m.callRestAPI({property_id:(X=W==null?void 0:W.message)!=null?X:e.property_id,space_id:e.category,max_capacity:e.max_capacity,description:e.description,rate:e.rate,space_status:wo.UNDER_REVIEW,availability:Ti.VISIBLE,draft_status:Nn.IMAGES,additional_guest_rate:e.additional_guest_rate||void 0,size:e.size||void 0},"POST")),m.setTable("property_add_on");for(let q=0;q<M.addons.length;q++){const te=M.addons[q],G=await m.callRestAPI({property_id:(ne=W==null?void 0:W.message)!=null?ne:e.property_id,add_on_id:te},"POST")}for(let q=0;q<a.length;q++){m.setTable("property_spaces_images");const te=a[q],G=await j(te);if(G.id){const J=await m.callRestAPI({property_id:(oe=W==null?void 0:W.message)!=null?oe:e.property_id,property_spaces_id:V.message,photo_id:G.id,is_approved:rn.IN_REVIEW},"POST")}if((te==null?void 0:te.name)==M.thumbnail){m.setTable("property_spaces");const J=await m.callRestAPI({id:V.message,default_image_id:G.id},"PUT")}}m.setTable("property_space_faq");for(let q=0;q<M.faqs.length;q++){const te=M.faqs[q],G=await m.callRestAPI({property_space_id:V.message,question:te.question,answer:te.answer},"POST")}m.setTable("property_spaces_amenitites");for(let q=0;q<M.amenities.length;q++){const te=M.amenities[q],G=await m.callRestAPI({property_spaces_id:V.message,amenity_id:te},"POST")}x("/account/my-spaces")}catch(q){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:q.message}})}n({type:"STOP_LOADING"})};h.exports.useEffect(()=>{E("amenities",e.amenities)},[S]),h.exports.useEffect(()=>{E("addons",e.addons)},[v]),h.exports.useEffect(()=>{for(let U=0;U<e.pictures.length;U++){const W=e.pictures[U];o7e(W).then(V=>{r(X=>{var ne=[...X];return ne[U]=V,ne.filter(Boolean)})})}},[]);function Y(){const U=p.find(W=>Number(W.id)==Number(e.category));return(U==null?void 0:U.category)==="Others"}return f("div",{className:"min-h-screen pb-40 md:max-w-[656px]",children:[f("form",{onSubmit:_(I),autoComplete:"off",children:[s("h1",{className:"mb-8 text-3xl font-bold md:text-4xl",children:"Space Details"}),f("div",{className:"text-sm md:px-[20px] md:py-[32px]",children:[s("h3",{className:"text-xl font-semibold md:text-2xl",children:"* Photographs of the space"}),s("p",{className:"mb-8",children:"file type (jpeg/png/svg), max size (5MB), suggest resolution (640*480)"}),f("div",{className:"mb-8 flex flex-col justify-center gap-x-2 gap-y-4 md:gap-5",children:[s(ti,{multiple:!0,handleChange:U=>{const W=U instanceof FileList?Array.from(U):[U];if(a.length+W.length>6){pe(n,"You can only upload up to 6 images.",4e3,"ERROR");return}for(let V of W)if(V.size>1024*1024){pe(n,"Each image must not exceed 1MB.",4e3,"ERROR");return}r(V=>[...V,...W])},name:"images",types:["JPG","PNG","JPEG","SVG","WEBP"],maxSize:1}),s("div",{className:"eighteen-step-image flex flex-wrap gap-2",children:a.map((U,W)=>{const V=U instanceof File?URL.createObjectURL(U):U;return f("div",{className:"relative flex flex-col items-center",children:[s("img",{src:V,alt:`preview-${W+1}`,className:"mb-2 h-24 w-24 rounded border object-cover"}),s("button",{type:"button",className:"text-xs text-red-500 underline",onClick:()=>r(X=>X.filter((ne,oe)=>oe!==W)),children:"Remove"})]},W)})})]}),s("h3",{className:"mb-4 text-xl font-bold",children:"* Select thumbnail image"}),s(fa,{items:a.filter(U=>U==null?void 0:U.name),labelField:"name",valueField:"name",containerClassName:"mb-12",className:"w-full border px-3 py-2 focus:outline-primary",openClassName:"ring-primary ring-2",placeholder:"Select thumbnail",control:D,name:"thumbnail"}),f("h3",{className:"mb-4 text-xl font-bold",children:["What do you offer with the space"," ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("div",{className:"flex items-center gap-3",children:s("button",{type:"button",className:"mb-2 font-bold text-[#1570EF]",onClick:()=>l(!0),children:"+ Select items"})}),s("div",{className:"addons-grid mb-12",children:S==null?void 0:S.filter(U=>Array.isArray(O)?O==null?void 0:O.includes(String(U.id)):!1).sort((U,W)=>(U.space_id===null?-1:1)-(W.space_id===null?-1:1)).map(U=>f("li",{className:"mb-4 flex w-fit items-center gap-2 sm:mb-0",children:[s(ur,{}),U.name]},U.id))}),f("h3",{className:"mb-4 text-xl font-bold",children:["Add-ons"," ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("div",{className:"flex items-center gap-3",children:s("button",{type:"button",className:"mb-2 font-bold text-[#1570EF]",onClick:()=>y(!0),children:"+ Select items"})}),s("div",{className:"addons-grid mb-12",children:v==null?void 0:v.filter(U=>Array.isArray(F)?F==null?void 0:F.includes(String(U.id)):!1).sort((U,W)=>(U.space_id===null?-1:1)-(W.space_id===null?-1:1)).map(U=>f("li",{className:"mb-4 flex w-fit items-center gap-2 sm:mb-0",children:[s(ur,{}),U.name]},U.id))}),f("h3",{className:"mb-2 text-xl font-bold",children:["Frequently asked question"," ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("p",{children:"These FAQs will show as part of your space listing."}),f("div",{children:[z.map((U,W)=>f("div",{className:"p-[20px]",children:[f("div",{className:"flex justify-between",children:[f("label",{className:"mb-1 font-semibold",children:["* Question #",W+1]}),s("button",{className:"text-sm font-semibold text-[#667085]",onClick:()=>A(W),children:"Delete"})]}),s("input",{placeholder:"",autoComplete:"off",...N(`faqs.${W}.question`),className:"mb-4 w-full rounded border px-3 py-2 leading-tight text-gray-700 focus:outline-primary"}),s("br",{}),f("label",{className:"mb-2 font-semibold",children:["* Answer #",W+1]}),s(Mo,{width:"100%",height:"107px",onChange:V=>E(`faqs.${W}.answer`,V),placeholder:"",hideToolbar:!0,setOptions:{resizingBar:!1},defaultValue:C().faqs[W].answer})]},U.id)),s("button",{className:"mb-12 font-bold text-[#1570EF]",type:"button",id:"append_faq_btn",onClick:()=>H({question:"",answer:""}),children:"+ Add question"})]})]}),s("hr",{className:"my-[20px]"}),s("p",{className:"px-4 text-sm md:px-0",dangerouslySetInnerHTML:{__html:IM(u,400)}}),s("div",{className:"flex justify-end",children:s($e,{to:"/help/cancellation-policy",className:"mt-4 text-end text-sm font-semibold underline",target:"_blank",children:"View More"})}),s("hr",{className:"my-[30px]"}),s("button",{type:"submit",className:"login-btn-gradient rounded px-4 py-2 tracking-wide text-white outline-none focus:outline-none",children:"Continue"}),s("br",{}),s("div",{className:`${d?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>l(!1),children:f("div",{className:`${c?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:U=>U.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Select Amenities"}),s("button",{type:"button",onClick:()=>l(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("div",{className:"review-scroll max-h-[400px] overflow-y-auto",children:Y()?S.sort((U,W)=>(U.creator_id!==1?-1:1)-(W.creator_id!==1?-1:1)).map(U=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",className:"",...N("amenities"),id:"amenity"+U.id,value:U.id}),s("label",{htmlFor:"amenity"+U.id,children:U.name})]},U.id)):S.filter(U=>U.space_id===Number(e.category)||U.creator_id===Number(localStorage.getItem("user"))).sort((U,W)=>(U.creator_id!==1?-1:1)-(W.creator_id!==1?-1:1)).map(U=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",className:"",...N("amenities"),id:"amenity"+U.id,value:U.id}),s("label",{htmlFor:"amenity"+U.id,children:U.name})]},U.id))})]})}),s("div",{className:`${w?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>y(!1),children:f("div",{className:`${g?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:U=>U.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Select Addons"}),s("button",{type:"button",onClick:()=>y(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("div",{className:"review-scroll max-h-[400px] overflow-y-auto",children:Y()?v.sort((U,W)=>(U.creator_id!==1?-1:1)-(W.creator_id!==1?-1:1)).map(U=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",...N("addons"),id:"addon"+U.id,value:U.id}),f("label",{htmlFor:"addon"+U.id,children:[U.name," $",U.cost]})]},U.id)):v.sort((U,W)=>(U.creator_id!==1?-1:1)-(W.creator_id!==1?-1:1)).filter(U=>U.space_id===Number(e.category)||U.creator_id===Number(localStorage.getItem("user"))).map(U=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",...N("addons"),id:"addon"+U.id,value:U.id}),f("label",{htmlFor:"addon"+U.id,children:[U.name," $",U.cost]})]},U.id))})]})}),s("button",{type:"button",id:"save-as-draft",className:"mt-[24px] rounded border-2 border-[#98A2B3] px-4 py-2 tracking-wide outline-none focus:outline-none",onClick:()=>B(),children:"Save draft and exit"})]}),i&&s(rF,{setAddOnModal:o})]})},sF=()=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M7.875 1.5021C7.36871 1.50896 7.06477 1.53827 6.81901 1.66349C6.53677 1.8073 6.3073 2.03677 6.16349 2.31901C6.03827 2.56477 6.00896 2.86871 6.0021 3.375M14.625 1.5021C15.1313 1.50896 15.4352 1.53827 15.681 1.66349C15.9632 1.8073 16.1927 2.03677 16.3365 2.31901C16.4617 2.56477 16.491 2.86871 16.4979 3.37499M16.4979 10.125C16.491 10.6313 16.4617 10.9352 16.3365 11.181C16.1927 11.4632 15.9632 11.6927 15.681 11.8365C15.4352 11.9617 15.1313 11.991 14.625 11.9979M16.5 5.99999V7.49999M10.5 1.5H12M3.9 16.5H9.6C10.4401 16.5 10.8601 16.5 11.181 16.3365C11.4632 16.1927 11.6927 15.9632 11.8365 15.681C12 15.3601 12 14.9401 12 14.1V8.4C12 7.55992 12 7.13988 11.8365 6.81901C11.6927 6.53677 11.4632 6.3073 11.181 6.16349C10.8601 6 10.4401 6 9.6 6H3.9C3.05992 6 2.63988 6 2.31901 6.16349C2.03677 6.3073 1.8073 6.53677 1.66349 6.81901C1.5 7.13988 1.5 7.55992 1.5 8.4V14.1C1.5 14.9401 1.5 15.3601 1.66349 15.681C1.8073 15.9632 2.03677 16.1927 2.31901 16.3365C2.63988 16.5 3.05992 16.5 3.9 16.5Z",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),Ga=({stroke:e})=>s("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M1.66675 14.3329L5.36626 12.91C5.60289 12.819 5.7212 12.7735 5.83189 12.7141C5.93022 12.6613 6.02395 12.6004 6.11211 12.532C6.21136 12.4549 6.301 12.3653 6.48027 12.186L14.0001 4.66622C14.7365 3.92984 14.7365 2.73593 14.0001 1.99955C13.2637 1.26317 12.0698 1.26317 11.3334 1.99955L3.8136 9.51936C3.63433 9.69864 3.5447 9.78827 3.46768 9.88752C3.39926 9.97569 3.33835 10.0694 3.28557 10.1677C3.22615 10.2784 3.18065 10.3967 3.08964 10.6334L1.66675 14.3329ZM1.66675 14.3329L3.03883 10.7655C3.13701 10.5102 3.1861 10.3826 3.27031 10.3241C3.34389 10.273 3.43495 10.2537 3.52295 10.2705C3.62364 10.2898 3.72034 10.3865 3.91374 10.5799L5.4198 12.0859C5.6132 12.2793 5.7099 12.376 5.72912 12.4767C5.74593 12.5647 5.72661 12.6558 5.67551 12.7293C5.61705 12.8135 5.48941 12.8626 5.23413 12.9608L1.66675 14.3329Z",stroke:e!=null?e:"#101828",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),iF=()=>s("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M10.3333 0.666992L13 3.33366M13 3.33366L10.3333 6.00033M13 3.33366H3.66667C2.95942 3.33366 2.28115 3.61461 1.78105 4.11471C1.28095 4.6148 1 5.29308 1 6.00033V7.33366M3.66667 15.3337L1 12.667M1 12.667L3.66667 10.0003M1 12.667H10.3333C11.0406 12.667 11.7189 12.386 12.219 11.8859C12.719 11.3858 13 10.7076 13 10.0003V8.66699",stroke:"#98A2B3","stroke-width":"1.75","stroke-linecap":"round","stroke-linejoin":"round"})}),oF=()=>s("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M1.5 6.5C1.5 6.5 3.00374 4.45116 4.22538 3.22868C5.44702 2.0062 7.1352 1.25 9 1.25C12.7279 1.25 15.75 4.27208 15.75 8C15.75 11.7279 12.7279 14.75 9 14.75C5.92268 14.75 3.32633 12.6907 2.51382 9.875M1.5 6.5V2M1.5 6.5H6",stroke:"#98A2B3",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),lF=()=>f("svg",{width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M9.66667 1.33301V3.99967M4.33333 1.33301V3.99967M1 6.66634H13M2.33333 2.66634H11.6667C12.403 2.66634 13 3.26329 13 3.99967V13.333C13 14.0694 12.403 14.6663 11.6667 14.6663H2.33333C1.59695 14.6663 1 14.0694 1 13.333V3.99967C1 3.26329 1.59695 2.66634 2.33333 2.66634Z",stroke:"url(#paint0_linear_5194_8527)",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"}),s("defs",{children:f("linearGradient",{id:"paint0_linear_5194_8527",x1:"14.392",y1:"5.91967",x2:"5.85708",y2:"12.2098",gradientUnits:"userSpaceOnUse",children:[s("stop",{stopColor:"#33D4B7"}),s("stop",{offset:"1","stop-color":"#0D9895"})]})})]}),c7e=({selectedDate:e,date:t,view:n,activeStartDate:a,isDirty:r,setIsDirty:i,selectedTemplate:o})=>{const{spaceData:c,dispatch:l}=ji(),[d,u]=h.exports.useState(!1),[g,y]=h.exports.useState(!1),w=cr(g,300),v=Te(t).format("MM/DD/YY");let S=Array.isArray(c==null?void 0:c.customSlots[v])?c==null?void 0:c.customSlots[v]:o[sr[t.getDay()]]==1&&Array.isArray(on(o.slots))?on(o.slots):[],m=Array.isArray(c==null?void 0:c.customSlots[v]);const{handleSubmit:p,register:b,control:x,getValues:k,setValue:N}=Oe({defaultValues:{custom_slot:S.map(H=>({start:Pn(H.start),end:Pn(H.end)}))}}),{fields:_,append:C,prepend:E,remove:T,swap:D,move:P,insert:M}=af({control:x,name:"custom_slot"}),O=H=>{console.log("editing",H),l({type:"SET_DAY_SLOT",payload:{day:v,slots:H.custom_slot.map(A=>({start:new Date(`${v} ${A.start}`).toISOString(),end:new Date(`${v} ${A.end}`).toISOString()}))}}),y(!1)},F=H=>{H.stopPropagation(),l({type:"CLEAR_DAY_SLOT",payload:v})},z=H=>{H.stopPropagation(),l({type:"INHERIT_DAY_SLOT",payload:v})};return h.exports.useEffect(()=>{u(!1)},[e]),f("div",{className:` ${t.getDay()==0?"":"border-r-0"} schedule-day relative min-h-[180px] border border-t-0`,children:[f("div",{className:"flex justify-between border-b py-2 px-[14px]",children:[s("h5",{className:"font-semibold",children:t.getDate()}),m?s(lF,{}):s(iF,{})]}),f("div",{className:"flex flex-col items-start gap-3 px-[8px] py-4",children:[S.slice(0,3).map((H,A)=>s("p",{children:Pn(H.start)+" - "+Pn(H.end)},A)),S.length>3&&f("span",{className:"font-semibold",children:[" + ",S.length-3," More"]})]}),v==Te(e).format("MM/DD/YY")&&s("button",{className:"options-btn absolute bottom-4 flex w-full justify-end border-2 border-red-400 p-2",onClick:H=>{H.stopPropagation(),H.preventDefault(),u(!0)},children:s("div",{className:"rotate-90",children:s(ln,{type:"dots"})})}),d&&f("div",{className:`absolute top-1/2 ${t.getDay()==0?"-left-1/2":"left-1/2"} border[#EAECF0] schedule-options z-10 flex min-w-[223px] flex-col whitespace-nowrap rounded-md border bg-white`,children:[f("button",{className:"flex w-full gap-[15px] p-3 hover:bg-gray-200",onClick:()=>{y(!0),N("custom_slot",S.map(H=>({start:Pn(H.start),end:Pn(H.end)})))},children:[s(Ga,{stroke:"#98A2B3"}),s("span",{children:"Edit"})]}),o.template_name&&f("button",{className:"flex w-full gap-[15px] p-3 hover:bg-gray-200",onClick:F,children:[s(oF,{}),f("span",{children:["Reset to ",o.template_name]})]}),f("button",{className:"flex w-full gap-[15px] p-3 hover:bg-gray-200",onClick:z,children:[s(sF,{}),f("span",{children:["Copy from previous ",bR[t.getDay()]]})]})]}),s("div",{className:`${w?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>y(!1),children:f("form",{className:`${g?"pop-in":"pop-out"} w-[410px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:H=>H.stopPropagation(),onSubmit:p(O),children:[f("div",{className:"mb-[18px] flex h-[40px] items-center justify-between",children:[s("h3",{className:"text-2xl font-semibold",children:"Edit Day"}),s("button",{type:"button",onClick:()=>y(!1),className:"rounded-full border py-3 px-3 text-2xl font-normal duration-300 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),f("div",{className:"",children:[s("div",{className:"tiny-scroll max-h-[400px] min-h-[200px] overflow-y-auto",children:_.map((H,A)=>f("div",{className:"mb-[32px] flex gap-6",children:[f("div",{className:"flex flex-grow justify-between gap-2",children:[s("select",{className:"tiny-scroll flex-grow border bg-white p-2 px-2 focus:outline-none",...b(`custom_slot.${A}.start`),children:Xs.map(j=>s("option",{children:j},j))}),s("select",{className:"tiny-scroll flex-grow border bg-white p-2 px-2 focus:outline-none",...b(`custom_slot.${A}.end`),children:Xs.map(j=>s("option",{children:j},j))})]}),s("button",{type:"button",onClick:()=>T(A),children:"\u2715"})]},H.id))}),s("button",{type:"button",className:"mb-[32px] text-sm font-semibold text-[#1570EF]",onClick:()=>C({start:"05:00 am",end:"07:00 am"}),children:"+ Add another time slot"})]}),s("br",{}),s("button",{type:"submit",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",children:"Save"})]})})]})};function cF({modalOpen:e,closeModal:t,templates:n,clearAll:a,selectedTemplate:r,setSelectedTemplate:i}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{className:"text-2xl font-semibold",children:"Select Schedule template"}),s("button",{type:"button",onClick:t,className:"rounded-circle border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})]}),f("div",{className:"tiny-scroll flex max-h-[60vh] flex-col gap-4 overflow-y-auto",children:[n.map(o=>s("button",{onClick:()=>{a(),i(o),t()},className:`${r.id==o.id?"border-blue-200":""} w-full rounded-lg border-2 p-3`,children:o.template_name},o.id)),n.length==0&&f("p",{className:"flex h-32 items-center justify-center",children:[s(Za,{}),s("span",{className:"ml-2"})," No templates yet"]})]})]})})})})]})})}function dF({modalOpen:e,closeModal:t,onSuccess:n}){const[a,r]=h.exports.useState(!1),{handleSubmit:i,control:o,register:c,reset:l,formState:d,watch:u,setValue:g}=Oe({defaultValues:{template_time:[{from:"12:00 am",to:"01:00 am"}],template_name:"",selectedDays:[]}}),{fields:y,append:w,remove:v}=af({control:o,name:"template_time"}),S=u("template_time");async function m(p){const b=new _e;r(!0);const k={host_id:localStorage.getItem("user"),template_name:p.template_name};Array.isArray(p.selectedDays)?sr.forEach(N=>{k[N]=p.selectedDays.includes(N)?1:0}):sr.forEach(N=>{k[N]=0}),k.slots=JSON.stringify(p.template_time.map(N=>({start:new Date(`01/01/2001 ${N.from}`).toISOString(),end:new Date(`01/01/2001 ${N.to}`).toISOString()}))),b.setTable("schedule_template");try{await b.callRestAPI(k,"POST"),n(),l(),t()}catch(N){console.log("er",N),globalDispatch({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:N.message}})}r(!1)}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:i(m),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{className:"text-2xl font-semibold",children:"Create new template"}),s("button",{type:"button",onClick:t,className:"rounded-circle border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})]}),f("div",{children:[s("p",{className:"mb-[19px] pt-[10px] text-sm",children:"Set hours for: "}),s("div",{className:"mb-[16px] flex flex-wrap gap-4",children:sr.map(p=>f("div",{className:"checkbox-container mb-[12px]",children:[s(XM,{control:o,name:"selectedDays",render:({field:b})=>s("input",{type:"checkbox",id:p,value:p,checked:b.value.includes(p),onChange:()=>{let x=[...b.value];b.value.includes(p)?x=b.value.filter(k=>k!=p):x.push(p),b.onChange(x)},onBlur:b.onBlur})}),s("label",{htmlFor:p,className:"capitalize",children:p})]},p))}),s("div",{className:"tiny-scroll max-h-[200px] min-h-[200px] overflow-y-auto",children:y.map((p,b)=>f("div",{className:"mb-[32px] flex gap-6",children:[f("div",{className:"flex flex-grow justify-between gap-2 text-sm",children:[s("select",{className:"flex-grow cursor-pointer border bg-white px-4 py-2 focus:outline-primary",...c(`template_time.${b}.from`,{onChange:()=>{}}),children:Xs.slice(0,Xs.length-1).map(x=>s("option",{children:x},x))}),s("select",{className:"flex-grow cursor-pointer border bg-white px-4 py-2 focus:outline-primary",...c(`template_time.${b}.to`,{onChange:()=>{}}),children:Xs.filter(x=>new Date(`01/01/2001 ${x}`)>new Date(`01/01/2001 ${S[b].from}`)).map(x=>s("option",{children:x},x))})]}),s("button",{type:"button",onClick:()=>v(b),children:"\u2715"})]},p.id))}),s("button",{type:"button",className:"mb-[32px] text-sm font-semibold text-[#1570EF]",onClick:()=>w({from:"",to:""}),children:"+ Add another time slot"}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block",htmlFor:"template_name",children:"* Name template"}),s("input",{autoComplete:"off",id:"template_name",type:"text",...c("template_name",{required:"Template name field is required"}),className:'"resize-none w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-primary'}),Object.entries(d.errors).length>0?s("p",{className:"error-vibrate my-3 rounded-md border border-[#C42945] bg-white py-2 px-3 text-center text-sm normal-case text-[#C42945]",children:Object.values(d.errors)[0].message}):null]})]}),s(Ft,{loading:a,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${a?"py-1":"py-2"} mt-4 w-full`,children:"Create template"})]})})})})]})})}function uF({forceRender:e,selectedTemplate:t,setSelectedTemplate:n,data:a,modalOpen:r,closeModal:i,onSuccess:o}){var _;const[c,l]=h.exports.useState(!1),{dispatch:d}=h.exports.useContext(we),u=on(a.slots,[]),{handleSubmit:g,control:y,register:w,reset:v,formState:S,watch:m}=Oe({defaultValues:{template_time:u.map(C=>({from:Pn(C.start),to:Pn(C.end)})),template_name:a.template_name,selectedDays:sr.filter(C=>a[C]==1).map(C=>C)}});je();const{fields:p,append:b,remove:x}=af({control:y,name:"template_time"}),k=m("template_time");async function N(C){l(!0);const E=new _e,T={id:a.id,template_name:C.template_name};Array.isArray(C.selectedDays)?sr.forEach(D=>{T[D]=C.selectedDays.includes(D)?1:0}):sr.forEach(D=>{T[D]=0}),T.slots=JSON.stringify(C.template_time.filter(D=>D.from!=""&&D.to!="").map((D,P)=>({start:new Date(`01/01/2001 ${D.from}`).toISOString(),end:new Date(`01/01/2001 ${D.to}`).toISOString()}))),console.log("result"),E.setTable("schedule_template");try{const D=await E.callRestAPI(T,"PUT");console.log(D),(a==null?void 0:a.template_name)===(t==null?void 0:t.template_name)&&n(T),o(),i()}catch(D){d({type:"SHOW_ERROR",payload:{heading:"Operation faile",message:D.message}})}l(!1)}return s(ke,{appear:!0,show:r,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:i,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-screen items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md mt-16 transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:g(N),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{className:"text-2xl font-semibold",children:"Edit template"}),s("button",{type:"button",onClick:i,className:"rounded-circle border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})]}),f("div",{children:[s("p",{className:"mb-[19px] pt-[10px] text-sm",children:"Set hours for: "}),s("div",{className:"mb-[16px] flex flex-wrap gap-4",children:sr.map(C=>f("div",{className:"checkbox-container mb-[12px]",children:[s(XM,{control:y,name:"selectedDays",render:({field:E})=>s("input",{type:"checkbox",style:{accentColor:"white !important"},className:"accent-[#0D9895]",id:C,value:C,checked:E.value.includes(C),onChange:()=>{let T=[...E.value];E.value.includes(C)?T=E.value.filter(D=>D!=C):T.push(C),E.onChange(T)},onBlur:E.onBlur})}),s("label",{htmlFor:C,className:"capitalize",children:C})]},C))}),s("div",{className:"tiny-scroll max-h-[200px] min-h-[200px] overflow-y-auto",children:p.map((C,E)=>f("div",{className:"mb-[32px] flex gap-6",children:[f("div",{className:"flex flex-grow justify-between gap-2 text-sm",children:[s("select",{className:"flex-grow cursor-pointer border bg-white px-4 py-2 focus:outline-primary",...w(`template_time.${E}.from`),children:Xs.slice(0,Xs.length-1).map(T=>s("option",{disabled:k.some(D=>{if(D.from=="")return!1;var P=new Date(`01/01/2001 ${D.from}`),M=new Date(`01/01/2001 ${D.to}`),O=new Date(`01/01/2001 ${T}`);return P<=O&&M>=O}),children:T},T))}),s("select",{className:"flex-grow cursor-pointer border bg-white px-4 py-2 focus:outline-primary",...w(`template_time.${E}.to`),children:Xs.filter(T=>new Date(`01/01/2001 ${T}`)>new Date(`01/01/2001 ${k[E].from}`)).map(T=>s("option",{children:T},T))})]}),s("button",{type:"button",onClick:()=>x(E),children:"\u2715"})]},C.id))}),s("button",{type:"button",className:"mb-[32px] text-sm font-semibold text-[#1570EF]",onClick:()=>b({from:"",to:""}),children:"+ Add another time slot"}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block",htmlFor:"template_name",children:"* Name template"}),s("input",{autoComplete:"off",id:"template_name",type:"text",...w("template_name",{required:"This field is required"}),className:'"resize-none w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-primary'}),s("p",{className:"text-sm italic text-red-500",children:(_=S.errors.template_name)==null?void 0:_.message})]})]}),s(Ft,{loading:c,onClick:e,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${c?"py-1":"py-2"} mt-4 w-full`,children:"Edit template"})]})})})})]})})}const Rb=()=>s("svg",{width:"18",height:"20",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M12.3333 5.00033V4.33366C12.3333 3.40024 12.3333 2.93353 12.1517 2.57701C11.9919 2.2634 11.7369 2.00844 11.4233 1.84865C11.0668 1.66699 10.6001 1.66699 9.66667 1.66699H8.33333C7.39991 1.66699 6.9332 1.66699 6.57668 1.84865C6.26308 2.00844 6.00811 2.2634 5.84832 2.57701C5.66667 2.93353 5.66667 3.40024 5.66667 4.33366V5.00033M1.5 5.00033H16.5M14.8333 5.00033V14.3337C14.8333 15.7338 14.8333 16.4339 14.5608 16.9686C14.3212 17.439 13.9387 17.8215 13.4683 18.0612C12.9335 18.3337 12.2335 18.3337 10.8333 18.3337H7.16667C5.76654 18.3337 5.06647 18.3337 4.53169 18.0612C4.06129 17.8215 3.67883 17.439 3.43915 16.9686C3.16667 16.4339 3.16667 15.7338 3.16667 14.3337V5.00033",stroke:"#667085",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function d7e({data:e,forceRender:t}){const[n,a]=h.exports.useState(!1),{dispatch:r}=h.exports.useContext(we),i=on(e.slots,[]);async function o(c){r({type:"START_LOADING"});try{await _t("host/schedule-slot/template","delete",{id:c},""),t&&t(new Date)}catch(l){r({type:"STOP_LOADING"}),r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:l.message}})}}return f("div",{className:"mb-[44px] flex items-center justify-between rounded-lg border border-[#EAECF0] bg-[#F9FAFB] p-[12px]",children:[s("div",{className:"w-full",children:f("div",{className:"flex justify-between lg:justify-start",children:[f("div",{className:"lg:min-w-[370px]",children:[s("h3",{className:"text-xl font-semibold",children:e.template_name}),f("p",{className:"capitalize",children:["(",sr.filter(c=>e[c]==1).map((c,l,d)=>c+(l==d.length-1?"":", ")),")"]}),f("div",{className:"block md:hidden",children:[s("br",{}),s(Zl,{items:[{label:"Edit",icon:s(Ga,{}),onClick:()=>a(!0)},{label:"Delete",icon:s(Rb,{}),onClick:()=>o(e.id)}],menuClassName:"right-[unset] left-0 origin-top-left"})]})]}),s("div",{className:"flex flex-wrap justify-end gap-[32px] lg:flex-nowrap lg:justify-start",children:Array.isArray(i)&&i.slice(0,2).map((c,l)=>f("div",{className:"whitespace-nowrap",children:[f("p",{className:"text-sm",children:["Slot ",l+1,":"]}),f("p",{className:"font-semibold",children:[Pn(c.start)," - ",Pn(c.end)]})]},l))})]})}),f("div",{className:"hidden lg:flex",children:[f("button",{onClick:()=>a(!0),className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm",children:[s(Ga,{}),"Edit"]}),f("button",{onClick:()=>o(e.id),className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm",children:[s(Rb,{}),"Delete"]})]}),s(uF,{data:e,onSuccess:()=>{t&&t()},modalOpen:n,closeModal:()=>a(!1)})]})}let Oa=new _e;const u7e=()=>{const[e,t]=h.exports.useState(!1),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(new Date),{state:o,dispatch:c}=h.exports.useContext(we),[l,d]=h.exports.useState([]),[u,g]=h.exports.useState(new Date),[y,w]=h.exports.useState({}),{spaceData:v,dispatch:S}=ji(),[m,p]=h.exports.useState(!1),b=je();async function x(){const C={host_id:localStorage.getItem("user")};Oa.setTable("schedule_template");try{const E=await Oa.callRestAPI({payload:C},"GETALL");Array.isArray(E.list)&&(d(E.list),p(!0))}catch(E){c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:E.message}})}c({type:"STOP_LOADING"})}h.exports.useEffect(()=>{x()},[u]),h.exports.useEffect(()=>{var _;m&&((_=v==null?void 0:v.schedule_template)==null?void 0:_.id)&&w(l.find(C=>C.id==v.schedule_template.id))},[m]);async function k(){var _;if(((_=y==null?void 0:y.slots)==null?void 0:_.length)<1||(y==null?void 0:y.slots)==="[]"){c({type:"SHOW_ERROR",payload:{heading:"Template selected doesn't have a slot",message:"Click on Use Template and Add Slot Time"}});return}if(!y.id){c({type:"SHOW_ERROR",payload:{heading:"Template was not selected",message:"Click on Use Template and Select a Schedule Template"}});return}console.log(y),S({type:"SET_SCHEDULE_TEMPLATE",payload:y}),b("/spaces/add/4")}const N=async()=>{var T,D;if((y==null?void 0:y.slots)&&((T=y==null?void 0:y.slots)==null?void 0:T.length)<1||(y==null?void 0:y.slots)==="[]"){c({type:"SHOW_ERROR",payload:{heading:"Template selected doesn't have a slot",message:"Click on Use Template and Add Slot Time"}});return}if(!y.id&&(y==null?void 0:y.slots)){c({type:"SHOW_ERROR",payload:{heading:"Template was not selected",message:"Click on Use Template and Select a Schedule Template"}});return}const _=localStorage.getItem("user");c({type:"START_LOADING"});var C,E;v.property_id||(Oa.setTable("property"),C=await Oa.callRestAPI({address_line_1:v.address_line_1,address_line_2:v.address_line_2,city:v.city,country:v.country,zip:v.zip,status:1,verified:1,host_id:_,name:v.name,rule:v.rule},"POST"),S({type:"SET_PROPERTY_ID",payload:C==null?void 0:C.message})),v.property_space_id||(Oa.setTable("property_spaces"),E=await Oa.callRestAPI({property_id:(D=C==null?void 0:C.message)!=null?D:v.property_id,space_id:v.category,max_capacity:v.max_capacity,description:v.description,rate:v.rate,space_status:wo.UNDER_REVIEW,availability:Ti.VISIBLE,draft_status:Nn.SCHEDULING,additional_guest_rate:v.additional_guest_rate||void 0,size:v.size||void 0},"POST"));try{Oa.setTable("property_add_on");for(let P=0;P<v.addons.length;P++){const M=v.addons[P];await Oa.callRestAPI({property_id:C==null?void 0:C.message,add_on_id:M},"POST")}for(let P=0;P<v.pictureIds.length;P++){Oa.setTable("property_spaces_images");const M=v.pictureIds[P];M&&await Oa.callRestAPI({property_id:C.message,property_spaces_id:E.message,photo_id:M,is_approved:rn.IN_REVIEW},"POST"),M&&M==v.thumbnail&&(Oa.setTable("property_spaces"),await Oa.callRestAPI({id:E.message,default_image_id:v.thumbnail},"PUT"))}Oa.setTable("property_space_faq");for(let P=0;P<v.faqs.length;P++){const M=v.faqs[P];await Oa.callRestAPI({property_space_id:E.message,question:M.question,answer:M.answer},"POST")}Oa.setTable("property_spaces_amenitites");for(let P=0;P<v.amenities.length;P++){const M=v.amenities[P];await Oa.callRestAPI({property_spaces_id:E.message,amenity_id:M},"POST")}Oa.setTable("property_spaces_schedule_template"),await Oa.callRestAPI({property_spaces_id:E.message,schedule_template_id:y.id,custom_slots:JSON.stringify(v.customSlots)},"POST"),b("/account/my-spaces")}catch(P){c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:P.message}})}c({type:"STOP_LOADING"})};return f("div",{className:"min-h-screen bg-white pb-8",children:[s("h1",{className:"mb-8 text-4xl font-bold",children:"Space Details"}),f("div",{className:"mb-[32px] max-w-3xl rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-4 py-[16px] md:px-[24px]",children:[f("h3",{className:"text-lg flex items-center gap-2 font-semibold",children:[s(Za,{}),s("span",{children:"How it works"})]}),f("p",{className:"ml-6 max-w-2xl text-sm leading-relaxed",children:["You can predefine each day of the week in ",s("b",{children:"\u2019Templates\u2019"})," - those hours will be applied to each day of the week. On top of that you can customize each day according to your needs.",s("br",{}),s("br",{})," You will be able to edit and change the space availability anytime from in \u2018Spaces/space/edit availability\u2019."]})]}),f(On.Group,{children:[f(On.List,{className:"two-tab-menu smaller border-b",children:[s(On,{className:"py-2 px-4 ui-selected:font-semibold",children:"Calendar"}),s(On,{className:"py-2 px-4 ui-selected:font-semibold",children:"Templates"}),s("div",{className:"mover"})]}),f(On.Panels,{children:[f(On.Panel,{children:[s("div",{className:"py-8",onClick:_=>_.stopPropagation(),children:s(vh,{className:"scheduling-calendar eighteen-step-schedule",onChange:i,value:r,defaultValue:r,nextLabel:s(Se,{children:f("div",{className:"flex gap-4",children:[s("div",{className:"w-[40px] border p-[10px] px-[15px]",children:s(_o,{})}),s("button",{className:"use-template !hidden md:!inline bg-[linear-gradient(230.69deg, #33d4b7 9.11%, #0d9895 69.45%)]",onClick:_=>{_.stopPropagation(),a(!0)},children:"Use Template"})]})}),prevLabel:s(_h,{}),next2Label:s(Se,{children:s("button",{className:"use-template",style:{backgroundColor:"linear-gradient(230.69deg, #33d4b7 9.11%, #0d9895 69.45%) !important"},onClick:_=>{_.stopPropagation(),a(!0)},children:"Use Template"})}),prev2Label:s(Se,{}),navigationLabel:({date:_,label:C,locale:E,view:T})=>s(Se,{children:f("div",{className:"flex justify-center gap-4 border-2 py-2",onClick:D=>D.stopPropagation(),children:[s("span",{children:C}),s("div",{className:"rotate-90 duration-200",children:s(_o,{})})]})}),tileContent:({activeStartDate:_,date:C,view:E})=>s(c7e,{activeStartDate:_,date:C,view:E,selectedDate:r,selectedTemplate:y}),minDate:new Date,maxDetail:"month"})}),s(cF,{modalOpen:n,closeModal:()=>a(!1),clearAll:()=>S({type:"CLEAR_ALL_SLOTS"}),templates:l,selectedTemplate:y,setSelectedTemplate:w})]}),f(On.Panel,{className:"pt-[70px] text-sm md:text-base",children:[f("div",{className:"flex justify-between p-[12px]",children:[f("div",{className:"flex",children:[s("p",{className:"md:min-w-[370px]",children:"Template name & day(s)"}),s("p",{children:"Time slots"})]}),s("button",{className:"font-semibold text-[#1570EF]",onClick:()=>t(!0),children:"+ Create new template"})]}),l.map(_=>s(d7e,{data:_,forceRender:g},_.id)),l.length==0&&f("p",{className:"flex h-40 items-center justify-center",children:[s(Za,{}),s("span",{className:"ml-2"})," No templates yet"]}),s(dF,{modalOpen:e,closeModal:()=>t(!1),onSuccess:()=>x()})]})]})]}),f("p",{className:"flex gap-2 text-[#475467]",children:[s(Za,{})," Keep in mind it usually takes us 2 days to review new space. Once we approve it it wil be posted with the first date/time available"]}),s("hr",{className:"my-[30px]"}),s("button",{type:"button",className:"login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",onClick:k,children:"Continue"}),s("br",{}),s("button",{type:"button",id:"save-as-draft",className:"mt-[24px] rounded border-2 border-[#98A2B3] py-2 px-4 tracking-wide outline-none focus:outline-none",onClick:()=>N(),children:"Save draft and exit"})]})},Ax=({data:e})=>{const[t,n]=h.exports.useState(!1);return f("div",{className:"mb-[16px]",children:[s("div",{className:"mb-[12px]",children:f("button",{onClick:()=>n(a=>!a),className:"flex items-center",children:[s("svg",{width:"14",height:"8",viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:`${t?"rotate-180":"rotate-90"} duration-200`,children:s("path",{d:"M13 7L7 1L1 7",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),s("span",{className:"font-semibold ml-4 text-[16px]",children:e.question})]})}),s("p",{className:`ml-8 duration-500 overflow-hidden ${t?"pointer-events-auto max-h-[300px]":"max-h-0 pointer-events-none"}`,dangerouslySetInnerHTML:{__html:e.answer}})]})},jc=({defaultDate:e,register:t,fieldNames:n,setValue:a,showCalendar:r,setShowCalendar:i,toDefault:o,fromDefault:c,bookedSlots:l,scheduleTemplate:d,defaultMessage:u})=>{const[g,y]=h.exports.useState(e!=null?e:new Date),[w,v]=h.exports.useState(c!=null?c:""),[S,m]=h.exports.useState(o!=null?o:""),[p,b]=h.exports.useState(""),x=_=>{if(!l||!Array.isArray(l))return!1;const C=Te(g).format("YYYY-MM-DD");return l.some(E=>{const T=Te(E.start),D=Te(E.end);return T.format("YYYY-MM-DD")!==C?!1:_>=T.toDate()&&_<D.toDate()})},k=()=>{if(!w||!S)return!1;const _=Te(g).format("MM/DD/YY"),C=new Date(_+" "+w),E=new Date(_+" "+S);return C<E},N=()=>{if(!k()){b("Start time must be before end time.");return}b(""),a("from",w),a("to",S),a("selectedDate",g),i(!1)};return f("div",{className:r?"popup-mobile z-50":"",onClick:()=>i(_=>!_),children:[n.map((_,C)=>s("input",{type:"hidden",...t(_)},C)),f("button",{type:"button",className:`${r?"":"border-2"} flex w-full items-center gap-2 p-2 pr-16 md:relative md:border-2`,onClick:_=>{i(C=>!C),_.stopPropagation()},children:[s("div",{className:`md:inline ${r?"hidden":""}`,children:s(A5,{})}),s("span",{id:"booking-time",className:r?"hidden":"inline whitespace-nowrap text-sm md:text-base",children:w&&S?Rr[g.getMonth()]+" "+g.getDate()+"/"+g.getFullYear()+" - "+w+" to "+S:u!=null?u:"Select date and time"}),f("div",{className:`${r?"block":"hidden"} absolute bottom-[15px] left-0 right-0 top-[0%] mx-auto min-h-[55vh] w-[80vw] overflow-y-auto border-2 bg-white text-center text-sm shadow-lg md:-left-10 md:-top-[22.5rem] md:right-[unset] md:max-h-[unset] md:w-[unset] lg:left-[-150px] 2xl:-top-[20rem]`,onClick:_=>_.stopPropagation(),children:[f("div",{className:"flex items-center justify-between border-b p-[16px]",children:[s("h3",{className:"text-xl font-semibold",children:"Select date and time"}),s("button",{type:"button",onClick:()=>i(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),f("div",{className:"flex flex-col md:flex-row",children:[f("div",{className:"",children:[s(vh,{onChange:_=>{y(_),v(""),m("")},value:g,className:"custom-calendar",nextLabel:s(_o,{}),prevLabel:s(_h,{}),next2Label:s(Se,{}),prev2Label:s(Se,{}),tileDisabled:({date:_})=>{var E,T;let C=[];try{(d==null?void 0:d.custom_slots)&&((E=Object.keys(d==null?void 0:d.custom_slots))==null?void 0:E.length)>0&&(C=JSON.parse((d==null?void 0:d.custom_slots)||"[]"))}catch(D){console.error("Invalid JSON in custom_slots",D)}if(C.length>0&&((T=C[QG(_).toString()])==null?void 0:T.length)===0||(d==null?void 0:d.id)&&d[sr[_.getDay()]]!=1)return!0},minDate:new Date,maxDetail:"month"}),s("p",{className:"p-[16px] text-left text-[#667085]",children:"Pacific Time - US & Canada"}),f("div",{className:"hidden cursor-default px-[16px] py-1 text-left md:flex",children:[f("p",{className:"min-w-[150px]",children:["From - ",w]}),f("p",{children:["Until - ",S]})]})]}),f("div",{className:"p-2",children:[f("p",{className:"mb-4 text-center font-semibold",children:[s("span",{className:"capitalize",children:sr[g.getDay()]})," ",", ",yR[g.getMonth()]," ",g.getDate()]}),s("div",{className:"custom-calendar-scroll review-scroll flex max-h-[150px] flex-col gap-[12px] overflow-y-auto overflow-x-hidden px-3 text-[#667085] md:max-h-[270px] md:px-6",children:Xs.map((_,C)=>{var j,I;var E=Te(g).format("MM/DD/YY"),T=new Date(E+" "+w),D=new Date(E+" "+S),P=new Date(E+" "+_),M=new Date("01/01/2001 "+_),O=(j=d.custom_slots)!=null?j:"[]",F=on(O,{}),z=(I=F[E])!=null?I:[];z=z.map(B=>({fromTime:new Date(B.start),toTime:new Date(B.end)}));var H=Array.isArray(d.slots)?d.slots.map(B=>({fromTime:new Date(B.start),toTime:new Date(B.end)})):[];const A=x(P);return s("button",{type:"button",className:`${w==_||S==_?"border-2 border-black":"border border-[#EAECF0] disabled:bg-[#F2F4F7] disabled:line-through"} w-full py-[8px] text-center md:w-[152px] ${w&&S&&T<=P&&D>=P?"between-slots font-semibold":""}`,onClick:B=>{if(w==_){v(""),m(""),b("");return}if(S==_){m(""),b("");return}if(w=="")v(B.target.innerText),b("");else{const Y=Te(g).format("MM/DD/YY"),U=new Date(Y+" "+w);if(new Date(Y+" "+_)<=U){b("End time must be after start time.");return}else b(""),m(B.target.innerText)}},disabled:(()=>{if(P<new Date||A)return!0;if(z.length>0){var B=!1;for(let Y=0;Y<z.length;Y++){const U=z[Y];if(U.fromTime<=P&&U.toTime>=P){B=!1;break}else B=!0}if(B)return!0}else{var B=!1;for(let U=0;U<H.length;U++){const W=H[U];if(W.fromTime<=M&&W.toTime>=M){B=!1;break}else B=!0}if(B)return!0}})(),children:_},C)})}),p&&s("div",{className:"mt-2 text-sm text-red-500",children:p}),s("div",{className:"mt-8 px-6",children:s("button",{type:"button",className:"login-btn-gradient w-[152px] rounded-sm py-[8px] text-center text-white",disabled:w==""||S==""||!k(),onClick:N,children:"Apply"})}),f("div",{className:"mt-2 flex cursor-default px-1 py-1 text-left md:hidden",children:[f("p",{className:"min-w-[150px]",children:["From - ",w]}),f("p",{children:["Until - ",S]})]})]})]})]})]})]})};function fF({modalOpen:e,closeModal:t,spaceImages:n}){const[a,r]=h.exports.useState(0);return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"bg-white p-5 rounded-lg md:w-4/5 w-5/6 transform overflow-hidden shadow-xl transition-all",children:[f("div",{className:"flex justify-between md:mb-[24px] mb-4",children:[s("div",{}),n.length>0?f("p",{className:"self-center normal-case",children:["Images ",a+1," of ",n.length]}):s("p",{className:"self-center normal-case",children:"No approved images to preview"}),s("button",{onClick:t,className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]}),s("div",{className:"",children:s(Sh,{modules:[F5,$5,B5],spaceBetween:50,slidesPerView:1,loop:!0,navigation:!0,pagination:{clickable:!0,renderBullet:(i,o)=>`<img src="${n[i].photo_url||"/default-property.jpg"}" draggable="false" class="pagination-imag ${o}" />`},className:"property-swiper-slid",children:n.map((i,o)=>s(kh,{className:"md:pb-[120px]",children:({isActive:c})=>(c&&r(o),s("img",{src:(i==null?void 0:i.photo_url)||"/default-property.jpg",draggable:"false",className:"w-full property-swiper-image md:h-[600px] h-[300px]"}))},o))})})]})})})})]})})}function f7e({modalOpen:e,closeModal:t}){const{spaceData:n,dispatch:a}=ji();async function r(i){i.preventDefault();const c=new FormData(i.target).get("description");a({type:"SET_DESCRIPTION",payload:c}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:r,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Description"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"description",cols:"30",rows:"5",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:n.description}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function m7e({modalOpen:e,closeModal:t}){const{spaceData:n,dispatch:a}=ji(),{spaceCategories:r,amenities:i}=Mu();function o(){const l=r.find(d=>Number(d.id)==Number(n.category));return(l==null?void 0:l.category)==="Others"}function c(l){let d=[...n.amenities];if(d.includes(l)){const u=d.indexOf(l);u>-1&&d.splice(u,1)}else d.push(l);a({type:"SET_AMENITIES",payload:d})}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Amenities"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),o()?i.sort((l,d)=>(l.creator_id!==1?-1:1)-(d.creator_id!==1?-1:1)).map(l=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"amenities",id:"amenity"+l.id,value:l.id,checked:n.amenities.includes(String(l.id)),onChange:()=>c(String(l.id))}),s("label",{htmlFor:"amenity"+l.id,children:l.name})]},l.id)):i.filter(l=>l.space_id===Number(n.category)||l.creator_id===Number(localStorage.getItem("user"))).sort((l,d)=>(l.creator_id!==1?-1:1)-(d.creator_id!==1?-1:1)).map(l=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"amenities",id:"amenity"+l.id,value:l.id,checked:n.amenities.includes(String(l.id)),onChange:()=>c(String(l.id))}),s("label",{htmlFor:"amenity"+l.id,children:l.name})]},l.id))]})})})})]})})})}function p7e({modalOpen:e,closeModal:t}){const{spaceData:n,dispatch:a}=ji(),{spaceCategories:r,addons:i}=Mu();function o(){const l=r.find(d=>Number(d.id)==Number(n.category));return(l==null?void 0:l.category)==="Others"}function c(l){let d=[...n.addons];if(d.includes(l)){const u=d.indexOf(l);u>-1&&d.splice(u,1)}else d.push(l);a({type:"SET_ADDONS",payload:d})}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Addons"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),o()?i.sort((l,d)=>(l.creator_id!==1?-1:1)-(d.creator_id!==1?-1:1)).map(l=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"addons",id:"addon"+l.id,value:l.id,checked:n.addons.includes(String(l.id)),onChange:()=>c(String(l.id))}),s("label",{htmlFor:"addon"+l.id,children:l.name})]},l.id)):i.filter(l=>l.space_id===Number(n.category)||l.creator_id===Number(localStorage.getItem("user"))).sort((l,d)=>(l.creator_id!==1?-1:1)-(d.creator_id!==1?-1:1)).map(l=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"addons",id:"addon"+l.id,value:l.id,checked:n.addons.includes(String(l.id)),onChange:()=>c(String(l.id))}),s("label",{htmlFor:"addon"+l.id,children:l.name})]},l.id))]})})})})]})})})}function h7e({modalOpen:e,closeModal:t,rules:n}){const{spaceData:a,dispatch:r}=ji();async function i(o){o.preventDefault();const l=new FormData(o.target).get("rule");r({type:"SET_RULE",payload:l}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex z-10 min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:i,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Rule"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"rule",cols:"30",rows:"5",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:a==null?void 0:a.rule}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function g7e({modalOpen:e,closeModal:t}){const{spaceData:n,dispatch:a}=ji();async function r(i){i.preventDefault();const c=new FormData(i.target).get("name");a({type:"SET_PROPERTY_NAME",payload:c}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:r,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Space name"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"name",cols:"30",rows:"3",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:n.name}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function mF({modalOpen:e,closeModal:t,onSubmit:n}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed z-1000 inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden z-100 rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Host account not verified yet."}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"The host account needs to be verified for this space to be approved."})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s("button",{type:"button",className:"login-btn-gradient inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium text-white",onClick:a=>{n(a),t()},children:"Ok understood"})]})]})})})})]})})}function b7e({modalOpen:e,closeModal:t,spaceImages:n}){const[a,r]=h.exports.useState(0);return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"bg-white p-5 rounded-lg md:w-4/5 w-5/6 transform overflow-hidden shadow-xl transition-all",children:[f("div",{className:"flex justify-between md:mb-[24px] mb-4",children:[s("div",{}),f("p",{className:"self-center normal-case",children:["Images ",a+1," of ",n==null?void 0:n.filter(i=>i!=null&&i!="").length]}),s("button",{onClick:t,className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]}),s("div",{className:"",children:s(Sh,{modules:[F5,$5,B5],spaceBetween:50,slidesPerView:1,loop:!0,navigation:!0,pagination:{clickable:!0,renderBullet:(i,o)=>`<img src="${n[i]||"/default-property.jpg"}" draggable="false" class="pagination-imag ${o}" />`},className:"property-swiper-slid",children:n==null?void 0:n.filter(i=>i!=null&&i!="").map((i,o)=>s(kh,{className:"md:pb-[120px]",children:({isActive:c})=>(c&&r(o),s("img",{src:i||"/default-property.jpg",draggable:"false",className:"w-full property-swiper-image md:h-[600px] h-[300px"}))},o))})})]})})})})]})})}const y7e=()=>{var O,F,z,H,A,j;const[e,t]=h.exports.useState(!1),{amenities:n,addons:a}=Mu();h.exports.useState(!1);const[r,i]=h.exports.useState(!1),{spaceData:o,dispatch:c}=ji(),l=new _e,{dispatch:d,state:u}=h.exports.useContext(we),g=je(),{register:y,setValue:w}=Oe(),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState(!1),[b,x]=h.exports.useState(!1),[k,N]=h.exports.useState(!1),[_,C]=h.exports.useState(!1),[E,T]=h.exports.useState(!1),[D,P]=h.exports.useState(!1),M=async I=>{if(I&&I.preventDefault(),u.user.verificationStatus!=Rm.VERIFIED&&!D){P(!0);return}d({type:"START_LOADING"});const B=Number(localStorage.getItem("user"));try{l.setTable("property");const Y=await l.callRestAPI({address_line_1:o.address_line_1,address_line_2:o.address_line_2,city:o.city,country:o.country,zip:o.zip,status:1,verified:1,host_id:B,name:o.name,rule:o.rule},"POST");l.setTable("property_add_on");for(let W=0;W<o.addons.length;W++){const V=o.addons[W];await l.callRestAPI({property_id:Y.message,add_on_id:V},"POST")}l.setTable("property_spaces");const U=await l.callRestAPI({property_id:Y.message,space_id:o.category,max_capacity:o.max_capacity,description:o.description,rate:o.rate,availability:Ti.VISIBLE,draft_status:Nn.COMPLETED,space_status:wo.UNDER_REVIEW,additional_guest_rate:o.additional_guest_rate||void 0,size:o.size||void 0},"POST");for(let W=0;W<o.pictureIds.length;W++){l.setTable("property_spaces_images");const V=o.pictureIds[W];V&&await l.callRestAPI({property_id:Y.message,property_spaces_id:U.message,photo_id:V,is_approved:rn.IN_REVIEW},"POST"),V&&V==o.thumbnail&&(l.setTable("property_spaces"),await l.callRestAPI({id:U.message,default_image_id:o.thumbnail},"PUT"))}l.setTable("property_space_faq");for(let W=0;W<o.faqs.length;W++){const V=o.faqs[W];await l.callRestAPI({property_space_id:U.message,question:V.question,answer:V.answer},"POST")}l.setTable("property_spaces_amenitites");for(let W=0;W<o.amenities.length;W++){const V=o.amenities[W];await l.callRestAPI({property_spaces_id:U.message,amenity_id:V},"POST")}l.setTable("property_spaces_schedule_template"),await l.callRestAPI({property_spaces_id:U.message,schedule_template_id:o.schedule_template.id,custom_slots:JSON.stringify(o.customSlots)},"POST"),l.setTable("notification"),await l.callRestAPI({user_id:B,actor_id:null,action_id:U.message,notification_time:new Date().toISOString().split(".")[0],message:"New Space Created",type:za.CREATE_SPACE,status:rr.NOT_ADDRESSED},"POST"),g("/spaces/add/5")}catch(Y){d({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Y.message}})}d({type:"STOP_LOADING"}),window.scrollTo({top:0,left:0})};return f("div",{className:"min-h-screen bg-white pb-20 text-sm normal-case md:text-base",onClick:()=>{S(!1)},children:[s("h1",{className:"mb-4 text-4xl font-bold",children:"Review"}),s("p",{className:"mb-8",children:"Below is how people will see your listing:"}),s("div",{className:"mb-[18px] flex flex-col items-start justify-between px-[17px] md:flex-row md:items-center md:px-0",children:f("div",{className:"flex flex-col items-start gap-4 normal-case md:flex-row md:items-center",children:[s("h2",{className:"text-3xl font-semibold",children:o.name}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:()=>i(!0),children:"(view on map)"}),s("div",{className:"flex justify-end ",children:s("button",{onClick:()=>x(!0),children:s(Ga,{stroke:"#33d4b7"})})})]})}),f("div",{className:"snap-scroll relative mb-[66px] flex h-[381px] gap-[32px] px-[14px] md:px-0",children:[s("img",{src:o.pictures[0]||"/default-property.jpg",className:"h-full rounded-lg object-cover xl:min-w-[616px]"}),s("img",{src:o.pictures[1]||"/default-property.jpg",className:"h-full w-[292px] rounded-lg object-cover"}),f("div",{className:"flex min-w-[550px] flex-col gap-4 overflow-hidden md:gap-[32px]",children:[s("img",{src:o.pictures[2]||"/default-property.jpg",className:"h-1/2 rounded-lg object-cover md:w-full"}),s("img",{src:o.pictures[3]||"/default-property.jpg",className:"h-1/2 rounded-lg object-cover md:w-full"})]}),o.pictures.filter(I=>I!=null&&I!="").length>0&&s("button",{className:"sticky right-6 mb-[8px] min-w-[170px] self-end border bg-[#00000080] px-3 py-1 text-center text-sm text-white",onClick:()=>t(!0),children:f("span",{children:["View all photos (",o.pictures.filter(I=>I!=null&&I!="").length,")"]})})]}),f("section",{className:"relative flex flex-col items-start xl:flex-row xl:gap-12",children:[f("div",{className:"w-full px-2 md:px-0 xl:w-3/5",children:[f("div",{className:"py-12 px-3 flex items-center justify-between",children:[f("div",{children:[s("h3",{className:"mb-2 text-2xl font-semibold",children:"Description"}),s("p",{children:o.description})]}),s("div",{className:"",children:s("button",{onClick:()=>p(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("hr",{}),f("div",{className:"py-12 px-3 flex items-center justify-between",children:[f("div",{children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Amenities"}),s("ul",{className:"addons-grid list-disk-important",children:(O=n.sort((I,B)=>(I.creator_id!==1?-1:1)-(B.creator_id!==1?-1:1)))==null?void 0:O.filter(I=>o.amenities.includes(String(I.id))).map(I=>f("li",{className:"flex gap-4",children:[s(ur,{}),I.name]},I.id))})]}),s("div",{className:"",children:s("button",{onClick:()=>N(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("hr",{}),f("div",{className:"py-12 px-3 flex items-center justify-between",children:[f("div",{className:"w-full",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Add ons"}),s("ul",{className:"addons-grid list-disk-important",children:(F=a==null?void 0:a.sort((I,B)=>(I.creator_id!==1?-1:1)-(B.creator_id!==1?-1:1)))==null?void 0:F.filter(I=>o.addons.includes(String(I.id))).map(I=>f("li",{className:"flex",children:[f("span",{className:"w-full",children:[" ",f("div",{className:"flex w-fit gap-4",children:[s(ur,{})," ",I.name,f("strong",{className:"font-semibold",children:["$",I.cost,"/h"]})]})," "]})," "]},I.id))})]}),s("div",{className:"",children:s("button",{onClick:()=>C(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("hr",{}),f("div",{className:"py-12 px-3",children:[s("div",{className:"mb-[28px] flex flex-wrap items-center justify-between",children:s("h3",{className:"mb-2 text-2xl font-semibold md:mb-0",children:"About the host"})}),f("div",{className:"flex items-center justify-between gap-4 md:justify-start md:gap-[24px]",children:[s("img",{src:(z=u.user.photo)!=null?z:"/default.png",className:"h-[72px] w-[72px] rounded-full object-cover"}),f("div",{className:"space-y-3",children:[f("div",{className:"flex text-xl font-bold gap-1",children:[s("p",{className:"md:block",children:u.user.first_name}),s("p",{className:"md:block",children:u.user.last_name})]}),s("p",{className:"hidden md:block",children:u.user.about})]})]})]}),s("hr",{}),s("div",{className:"py-12 px-3",children:f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Reviews"}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],accessor:"label",valueAccessor:"value",className:"min-w-[200px]"})]})}),s("hr",{}),f("div",{className:"py-12 px-3",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"FAQs"}),o.faqs.map((I,B)=>s(Ax,{data:I},B))]}),s("hr",{}),f("div",{className:"py-12 px-3 flex items-center justify-between mb-20 sm:mb-0",children:[f("div",{children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Property rules"}),s("p",{className:"",children:o.rule})]}),s("div",{className:"",children:s("button",{onClick:()=>T(!0),children:s(Ga,{stroke:"#33d4b7"})})})]})]}),s("div",{className:"sticky bottom-0 hidden w-full flex-grow bg-white xl:top-16 xl:bottom-[unset] xl:block xl:w-[unset]",children:f("div",{className:"sticky-price-summary mx-auto max-w-2xl p-6 md:border-2",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:o.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",o==null?void 0:o.rate]}),"/h"]})]}),o.additional_guest_rate&&o.max_capacity>1?f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Additional guests"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",o.additional_guest_rate]}),"/h"]})]}):null,s("hr",{className:"my-[24px] hidden md:block"}),f("form",{className:"flex flex-col",children:[s("div",{className:"z-50 mb-3",children:s(jc,{register:y,setValue:w,fieldNames:["selectedDate","from","to"],showCalendar:v,setShowCalendar:S,fromDefault:"",toDefault:"",bookedSlots:[],scheduleTemplate:{...o.schedule_template,slots:on((H=o.schedule_template)==null?void 0:H.slots,[]),custom_slots:o.customSlots},defaultMessage:"Check Availability"})}),s("button",{type:"submit",className:"login-btn-gradient gap-2 rounded-tr rounded-br py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:!0,children:window.innerWidth>500?"Continue":"Check Availability"})]})]})}),f("div",{className:"mx-auto -mt-16 block w-full max-w-xl p-6 xl:hidden",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:(A=o.max_capacity)!=null?A:o==null?void 0:o.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",o.rate]}),"/h"]})]}),f("form",{className:"flex flex-col",children:[s("div",{className:"z-20 mb-3",children:s(jc,{register:y,setValue:w,fieldNames:["selectedDate","from","to"],showCalendar:v,setShowCalendar:S,fromDefault:"",toDefault:"",bookedSlots:[],scheduleTemplate:{...o.schedule_template,slots:on((j=o.schedule_template)==null?void 0:j.slots,[]),custom_slots:o.customSlots},defaultMessage:"Check Availability"})}),s("button",{type:"submit",className:"login-btn-gradient z-0 gap-2 rounded-tr rounded-br py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:!0,children:window.innerWidth>500?"Continue":"Check Availability"})]})]})]}),s(b7e,{spaceImages:o.pictures.filter(I=>I!=null&&I!=""),modalOpen:e,closeModal:()=>t(!1)}),s("hr",{className:"my-[30px]"}),s("button",{type:"button",className:"sixteen-step login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",onClick:M,children:"Submit"}),s("br",{}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${o.address_line_1||""}, ${o.address_line_2||""}, ${o.city||""}, ${o.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${o.address_line_1||""}, ${o.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:r,closeModal:()=>i(!1)}),s(f7e,{modalOpen:m,closeModal:()=>p(!1)}),s(g7e,{modalOpen:b,closeModal:()=>x(!1)}),s(m7e,{modalOpen:k,closeModal:()=>N(!1)}),s(p7e,{modalOpen:_,closeModal:()=>C(!1)}),s(h7e,{modalOpen:E,closeModal:()=>T(!1)}),s(mF,{modalOpen:D,closeModal:()=>P(!1),onSubmit:M})]})},x7e=()=>f("div",{className:"min-h-screen md:mt-0 mt-16",children:[f("div",{className:"flex justify-between items-center mb-[28px]",children:[f("div",{className:"flex items-center",children:[s(_f,{size:"35"}),s("h1",{className:"md:text-4xl text-2xl font-semibold",children:"Space successfully submitted"})]}),s($e,{to:"/account/my-spaces",className:"font-semibold text-[#344054] text-sm outline-none focus:outline-none rounded py-2 px-4 border-2 border-[#98A2B3] whitespace-nowrap",children:"Go to my spaces"})]}),f("div",{className:"bg-[#F9FAFB] border-[#EAECF0] rounded-lg border px-[24px] py-[16px] max-w-3xl mb-[32px]",children:[f("h3",{className:"text-lg font-semibold flex gap-2 items-center mb-2",children:[s("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M9.99935 13.3337V10.0003M9.99935 6.66699H10.0077M18.3327 10.0003C18.3327 14.6027 14.6017 18.3337 9.99935 18.3337C5.39698 18.3337 1.66602 14.6027 1.66602 10.0003C1.66602 5.39795 5.39698 1.66699 9.99935 1.66699C14.6017 1.66699 18.3327 5.39795 18.3327 10.0003Z",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),s("span",{children:"What's next?"})]}),s("p",{className:"ml-6 text-sm leading-relaxed",children:"Our team will review the space and get back to you shortly. It usually takes up to 24 hrs. We will email you when there\u2019s an update.."})]})]}),w7e=new AbortController;function Ix(e,t){const[n,a]=h.exports.useState([]),{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we);async function o(){let c=new _e;try{const l=await c.callRawAPI("/v2/api/custom/ergo/add_on/PAGINATE",{page:1,limit:1e3,where:["deleted_at IS NULL",`${t?e&&`space_id != ${e}`:e?`space_id = ${e}`:"1"} OR ${`creator_id = ${Number(localStorage.getItem("user"))}`}`]},"POST",w7e.signal);l.error||a(l.list)}catch(l){if(me(r,l.message),l.name=="AbortError")return;i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:l.message}})}}return h.exports.useEffect(()=>{o()},[e]),n}new AbortController;function v7e(e){const[t,n]=h.exports.useState([]),{dispatch:a}=h.exports.useContext(Ee),{dispatch:r}=h.exports.useContext(we);async function i(){let o=new St;try{let c=["deleted_at,is"];e&&c.push(`host_id,eq,${e}`);const l=await o.getList("property_space_rule_template",{filter:c,join:[]});l.error||n(l.list)}catch(c){if(me(a,c.message),c.name=="AbortError")return;r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:c.message}})}}return h.exports.useEffect(()=>{i()},[e]),t}new _e;const _7e=()=>{const e=je(),{pathname:t}=An(),n=t.split("/"),a=Number(n[n.length-1])||1,{state:r}=h.exports.useContext(we),i=Ch(),o=Ix(),c=v7e(r.user.id),l=r.spaceCategories;return s(u9e,{children:f("div",{className:"container mx-auto w-full px-4 pt-[100px] normal-case md:pt-[110px] 2xl:px-32",children:[a<5&&f("div",{className:"flex flex-wrap-reverse items-center",children:[f("button",{type:"button",onClick:()=>e(-1),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]}),f("div",{className:"mx-auto mb-3 flex max-w-full gap-1",children:[s("div",{className:`${a>1?"bg-my-gradient":"bg-[#F2F4F7]"} w-[80px] rounded-lg border py-1 md:w-24`}),s("div",{className:`${a>2?"bg-my-gradient":"bg-[#F2F4F7]"} w-[80px] rounded-lg border py-1 md:w-24`}),s("div",{className:`${a>3?"bg-my-gradient":"bg-[#F2F4F7]"} w-[80px] rounded-lg border py-1 md:w-24`}),s("div",{className:`${a>4?"bg-my-gradient":"bg-[#F2F4F7]"} w-[80px] rounded-lg border py-1 md:w-24`})]})]}),s(Xu,{context:{amenities:i,spaceCategories:l,addons:o,ruleTemplates:c}})]})})},N7e={category:"",name:"",rate:"",max_capacity:0,description:"",rule:"",zip:"",country:"",city:"",address_line_1:"",address_line_2:"",additional_guest_rate:"",size:0,pictures:[null,null,null,null,null,null],pictureIds:[],faqs:[{question:"",answer:""}],thumbnail:"",addons:[],amenities:[],customSlots:{},schedule_template:{}};function S7e(e){return Te(e).subtract(1,"week").format("MM/DD/YY")}function k7e(e){return Array.isArray(e)?e.map(t=>({start:Te(t.start).add(1,"week").toISOString(),end:Te(t.end).add(1,"week").toISOString()})):[]}const C7e=(e,t)=>{switch(t.type){case"SET_PROPERTY_ID":return{...e,property_id:t.payload};case"SET_DETAILS_ONE":return{...e,...t.payload};case"SET_DETAILS_TWO":return{...e,...t.payload};case"SET_THUMBNAIL":return{...e,thumbnail:t.payload};case"SET_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload.day]:t.payload.slots}};case"CLEAR_ALL_SLOTS":return{...e,customSlots:{}};case"CLEAR_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload]:void 0}};case"INHERIT_DAY_SLOT":return{...e,customSlots:{...e.customSlots,[t.payload]:k7e(e.customSlots[S7e(t.payload)])}};case"SET_SCHEDULE_TEMPLATE":return{...e,schedule_template:t.payload};case"SET_DESCRIPTION":return{...e,description:t.payload};case"SET_PROPERTY_NAME":return{...e,name:t.payload};case"SET_AMENITIES":return{...e,amenities:t.payload};case"SET_ADDONS":return{...e,addons:t.payload};case"SET_RULE":return{...e,rule:t.payload};default:return e}},pF=h.exports.createContext({}),hF=({children:e})=>{const[t,n]=h.exports.useReducer(C7e,N7e);return s(pF.Provider,{value:{spaceData:t,dispatch:n},children:e})},Ql=()=>h.exports.useContext(pF),_v=()=>s("div",{children:s(hF,{children:s(Xu,{})})}),yS=({data:e})=>{var t,n;return(t=localStorage.getItem("role"))!=null,f("div",{className:"flex md:gap-[24px] gap-[16px] text-[#667085] mb-[32px]",children:[s("img",{src:e.customer_photo_approved==rn.APPROVED&&(n=e.photo)!=null?n:"/default.png",className:"md:w-[40px] md:h-[40px] w-[30px] h-[30px] object-cover rounded-full"}),f("div",{className:"flex-grow",children:[f("div",{className:"flex justify-start items-center mb-[8px]",children:[s("p",{children:"Posted by -\xA0"}),s("p",{className:"flex gap-2 items-center",children:f("span",{className:"text-black font-semibold",children:[e==null?void 0:e.customer_last_name," ",e==null?void 0:e.customer_first_name]})})]}),f("div",{className:"flex justify-between items-center mb-[8px]",children:[s("p",{children:Te(e.post_date).format("MM/DD/YY")}),f("p",{className:"flex gap-2 items-center",children:[s(ds,{}),s("span",{className:"text-black font-semibold",children:(Number(e.space_rating)||0).toFixed(1)})]})]}),s("p",{className:"mb-[16px] md:text-base text-sm",children:e.comment}),s("div",{className:"flex gap-[8px] flex-wrap",children:e.hashtags!=null&&e.hashtags.split(",").map((a,r)=>s("span",{className:"text-[14px] bg-[#F2F4F7] rounded-[3px] pt-[2px] px-[8px] pb-[3px] whitespace-nowrap",children:a},r))})]})]})},X0=new _e,E7e=new AbortController;function gF({modalOpen:e,closeModal:t,onSuccess:n,booking:a}){const{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we),[o,c]=h.exports.useState(!1);async function l(u){u.preventDefault(),c(!0);const y=new FormData(u.target).get("reason");try{await X0.callRawAPI("/v2/api/custom/ergo/capture",{booking_id:a.id,status:4,stripe_payment_intent_id:a.stripe_payment_intent_id},"POST"),y&&d(a.customer_id,a.property_name,`from ${Te(a.booking_start_time).format("MM/DD/YYYY")} to ${Te(a.booking_end_time).format("MM/DD/YYYY")}`,y),t(),n()}catch(w){if(me(r,w.message),w.name=="AbortError"){c(!1);return}i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:w.message}})}c(!1)}async function d(u,g,y,w){var v;try{const S=await X0.callRawAPI("/v2/api/custom/ergo/get-user",{id:u},"POST",E7e.signal);if(on(S.settings,{}).email_on_booking_declined==!0){const m=await X0.getEmailTemplate("booking-decline"),p=(v=m.html)==null?void 0:v.replace(new RegExp("{{{reason}}}","g"),w).replace(new RegExp("{{{space_name}}}","g"),g).replace(new RegExp("{{{time}}}","g"),y);await X0.sendEmail(S.email,m.subject,p)}}catch{}}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",onSubmit:l,className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Are you sure?"}),f("div",{className:"mt-2",children:[f("p",{className:"mb-[16px]",children:["You are about to decline a booking from"," ",f("b",{children:[a.customer_first_name," ",a.customer_last_name]})," ","for ",f("b",{children:[a.property_name," "]}),"on"," ",s("b",{children:Rr[new Date(a.booking_start_time).getMonth()]+" "+new Date(a.booking_start_time).getDate()+"/"+new Date(a.booking_start_time).getFullYear()}),"."]})," "]}),s("label",{className:"mb-[8px] text-xl font-semibold",children:"Reason"}),s("textarea",{cols:"30",rows:"5",className:"w-full resize-none border p-3 focus:outline-none active:outline-none",name:"reason"}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:o,type:"submit",className:`inline-flex justify-center rounded-md ${o?"py-1 px-6":"py-2 px-4"} bg-red-500 text-sm font-medium text-white`,children:"Proceed"})]})]})})})})]})})}const eg=new _e,T7e=new AbortController;function bF({modalOpen:e,closeModal:t,booking:n,onSuccess:a}){const{dispatch:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(we),[o,c]=h.exports.useState(!1);async function l(){c(!0);try{await eg.callRawAPI("/v2/api/custom/ergo/capture",{booking_id:n.id,status:1,stripe_payment_intent_id:n.stripe_payment_intent_id},"POST"),d(n.customer_id,n.property_name,`from ${Te(n.booking_start_time).format("MM/DD/YYYY")} to ${Te(n.booking_end_time).format("MM/DD/YYYY")}`),t(),a()}catch(u){if(me(r,u.message),u.name=="AbortError"){c(!1);return}t(),i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:u.message}})}c(!1)}async function d(u,g,y){var w;try{const v=await eg.callRawAPI("/v2/api/custom/ergo/get-user",{id:u},"POST",T7e.signal);if(on(v.settings,{}).email_on_booking_accepted==!0){const S=await eg.getEmailTemplate("booking-accepted"),m=(w=S.html)==null?void 0:w.replace(new RegExp("{{{space_name}}}","g"),g).replace(new RegExp("{{{time}}}","g"),y);await eg.sendEmail(v.email,S.subject,m)}}catch{}}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Are you sure"}),f("div",{className:"mt-2",children:[f("p",{className:"text-sm text-gray-500",children:["You are about to accept a booking from"," ",f("b",{children:[n.customer_first_name," ",n.customer_last_name]})," ","for ",f("b",{children:[n.property_name," "]}),"on"," ",s("b",{children:Rr[new Date(n.booking_start_time).getMonth()]+" "+new Date(n.booking_start_time).getDate()+"/"+new Date(n.booking_start_time).getFullYear()}),"."]})," "]}),f("p",{className:"mt-2 text-sm text-gray-500",children:[s("strong",{children:"Note: "})," all other bookings within this time slot will be automatically declined"]}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:o,type:"button",className:`inline-flex justify-center rounded-md ${o?"py-1 px-6":"py-2 px-4"} login-btn-gradient text-sm font-medium text-white`,onClick:l,children:"Accept"})]})]})})})})]})})}let tg=new _e;function yF({tourReview:e,data:t,forceRender:n,favoriteId:a}){var x,k,N,_,C,E,T,D;const r=["Pending","Upcoming","Ongoing","Completed","Declined","Canceled","Expired"],i=["text-white","my-text-gradient","text-[yellow]","text-[#667085]","text-[#D92D20]","text-[#DC6803]","text-[#D92D20] !bg-[#F2F4F7]"],{dispatch:o,state:c}=h.exports.useContext(we),[l,d]=h.exports.useState(!1),[u,g]=h.exports.useState(!1),[y,w]=h.exports.useState({}),[v,S]=h.exports.useState(!1),m=t.booking_start_time&&t.status<2?new Date(t.booking_end_time)<Date.now():!1;async function p(P){const M={id:P,booked_unit:1,status:ut.CANCELLED};try{await _t("booking","post",M,"PUT"),t.status===ut.UPCOMING&&await tg.callRawAPI("/v2/api/custom/ergo/refund",{booking_id:t.id,stripe_payment_intent_id:t.stripe_payment_intent_id},"POST"),b(t.customer_id,t.property_name,`from ${Te(t.booking_start_time).format("MM/DD/YYYY")} to ${Te(t.booking_end_time).format("MM/DD/YYYY")}`,reason),n&&n(new Date)}catch(O){o({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}}async function b(P,M,O){var F,z;try{const H=await _t("get-user","post",{id:P},""),A=await tg.getEmailTemplate("booking-cancelled");if(on(H.settings,{}).email_on_booking_cancelled==!0){const j=(F=A.html)==null?void 0:F.replace(new RegExp("{{{space_name}}}","g"),M).replace(new RegExp("{{{time}}}","g"),O);await tg.sendEmail(H.email,A.subject,j)}if(on(c.user.settings,{}).email_on_booking_cancelled==!0){const j=(z=A.html)==null?void 0:z.replace(new RegExp("{{{space_name}}}","g"),M).replace(new RegExp("{{{time}}}","g"),O);await tg.sendEmail(c.user.email,A.subject,j)}}catch{}}return h.exports.useEffect(()=>{if(t.status!=ut.UPCOMING&&!m)return;let P=null;if(!t.booking_start_time)return()=>clearInterval(P);P=setInterval(()=>{const M=xR(t.booking_start_time);w(M)},1e3)},[t.booking_start_time]),f(Se,{children:[f("div",{className:"mb-10 hidden border lg:flex",children:[f("div",{className:"relative min-w-[16rem]",children:[s("img",{src:t.image_url,onLoad:()=>S(!0),alt:"",className:"absolute top-0 left-0 h-full w-full object-cover"}),t.status==ut.UPCOMING&&!m&&s("div",{className:"absolute inset-0 flex items-end justify-start px-4 py-2 normal-case",children:f("div",{className:"flex rounded-md bg-[#13131366] py-1 px-2 font-semibold text-white",children:[s(E1,{className:"h-6 w-6"})," : ",s("span",{className:"mx-1",children:y.timeLeft}),s("span",{className:"normal-case",children:y.format})]})}),s("div",{className:"absolute inset-0 px-2",children:s(ls,{className:"flex flex-grow justify-end pt-2",space_id:t.property_space_id,user_property_spaces_id:a,reRender:n,withLoader:!0})}),!v&&s(Ut,{className:"absolute -top-1 left-0 h-full w-full"})]}),f("div",{className:"flex flex-grow gap-16 px-8 py-6 xl:gap-24 2xl:gap-32",children:[f("div",{className:"flex max-w-sm flex-grow flex-col space-y-3",children:[s("h3",{className:"text-2xl font-semibold",children:t.property_name||s(Ut,{width:180})}),f("p",{className:"tracking-wider",children:[" ",t.property_name?t.address_line_1:s(Ut,{width:150})]}),f("p",{className:"tracking-wider",children:[" ",t.property_name?t.address_line_2:s(Ut,{width:150})]}),t.property_name?f("p",{className:"tracking-wider",children:[s("span",{children:"Guest"}),": ",t.customer_first_name," ",t.customer_last_name]}):s(Ut,{width:100})]}),f("div",{className:"flex flex-col justify-between",children:[t.booking_start_time?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Date"}),s("strong",{className:"whitespace-nowrap",children:Rr[new Date(t.booking_start_time).getMonth()]+" "+new Date(t.booking_start_time).getDate()+"/"+new Date(t.booking_start_time).getFullYear()})]}):s(Ut,{width:100}),t.duration?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Duration"}),s("strong",{className:"whitespace-nowrap",children:iy(t.duration)})]}):s(Ut,{width:100}),t.duration?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Total Price"}),f("strong",{className:"whitespace-nowrap",children:["$",(((x=t==null?void 0:t.total)!=null?x:0)+((k=t==null?void 0:t.addon_cost)!=null?k:0)).toFixed(2)]})]}):s(Ut,{width:100})]}),f("div",{className:"flex w-full items-end justify-between lg:w-[200px] lg:flex-col lg:items-end lg:justify-center",children:[f("span",{className:`${t.status==0?"bg-black":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${i[m?6:(N=t.status)!=null?N:0]} mb-[16px] whitespace-nowrap border text-sm font-semibold uppercase`,children:[" ",r[m?6:(_=t.status)!=null?_:0]]}),t.id&&s($e,{className:`mb-[32px] hidden text-sm font-semibold underline lg:inline w-full text-end ${e}`,to:"/account/my-bookings/"+t.id,children:"View details"}),(()=>{if(!m&&t.status==ut.PENDING)return f("div",{children:[t.status===ut.PENDING&&s("button",{className:"my-text-gradient text-sm font-semibold",onClick:()=>g(!0),children:"Accept"})," ","|"," ",s("button",{className:"text-sm font-semibold text-[#DC6803]",onClick:()=>d(!0),children:"Decline"})]});if(!m&&t.payment_status!==Pm.SUCCESSFUL)return s("button",{className:`${t.status<2?"inline":"hidden"} text-sm font-semibold text-[#667085]`,onClick:()=>p(t.id),children:"Cancel"})})()]})]})]}),f("div",{className:"mb-10 flex items-start justify-between border lg:hidden",children:[f("div",{className:"w-1/2",children:[f("div",{className:"relative h-40",children:[s("img",{src:t.image_url,onLoad:()=>S(!0),alt:"",className:"absolute top-0 left-0 h-full w-full object-cover"}),!v&&s(Ut,{className:"absolute -top-1 left-0 h-full w-full"}),t.status==ut.UPCOMING&&!m&&s("div",{className:"absolute inset-0 flex items-end justify-start px-4 py-2 normal-case",children:f("div",{className:"flex rounded-md bg-[#13131366] py-1 px-2 font-semibold text-white",children:[s(E1,{className:"h-6 w-6"})," : ",s("span",{className:"mx-1",children:y.timeLeft}),s("span",{className:"normal-case",children:y.format})]})})]}),f("div",{className:"p-4",children:[s("h3",{className:"mb-2 text-2xl font-semibold",children:t.property_name||s(Ut,{width:180})}),f("p",{className:"mb-2 tracking-wider",children:[" ",t.property_name?(C=[1,2].includes(t.status)&&!m?t.address_line_1:t.property_city)!=null?C:"N/A":s(Ut,{width:150})]}),f("p",{className:"mb-2 tracking-wider",children:[" ",t.property_name?(E=[1,2].includes(t.status)&&!m?t.address_line_2:t.property_country)!=null?E:"N/A":s(Ut,{width:150})]}),t.property_name?f("p",{className:"mb-2 tracking-wider",children:[s("span",{children:"Host"}),": ",t.host_first_name," ",t.host_last_name]}):s(Ut,{width:100})]})]}),f("div",{className:"flex flex-col items-center justify-center gap-4 pt-4 pr-3",children:[f("span",{className:`${t.status==0?"bg-black":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${i[m?6:(T=t.status)!=null?T:0]} mb-[16px] border text-sm font-semibold uppercase`,children:[" ",r[m?6:(D=t.status)!=null?D:0]]}),t.id&&s($e,{className:"mb-[32px] text-sm font-semibold underline",to:"/account/my-bookings/"+t.id,children:"View detail"}),!m&&t.status==0?f("div",{children:[t.payment_status===Pm.PENDING&&s("button",{className:"my-text-gradient text-sm font-semibold",onClick:()=>g(!0),children:"Accept"})," ","|"," ",s("button",{className:"text-sm font-semibold text-[#DC6803]",onClick:()=>d(!0),children:"Decline"})]}):!m&&t.payment_status!==Pm.SUCCESSFUL&&s("button",{className:`${t.status<2?"inline":"hidden"} text-sm font-semibold text-[#667085]`,onClick:()=>p(t.id),children:"Cancel"})]})]}),s(gF,{modalOpen:l,closeModal:()=>d(!1),onSuccess:()=>n(!0),booking:t}),s(bF,{modalOpen:u,closeModal:()=>g(!1),onSuccess:()=>n(!0),booking:t})]})}const Nv=new _e,L7e=new AbortController,D7e=({myBookings:e})=>{const{id:t}=Mt(),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(e||Array(4).fill({})),[o,c]=h.exports.useState(!1),{dispatch:l}=h.exports.useContext(we),{dispatch:d}=h.exports.useContext(Ee),[u,g]=lt(),[y,w]=h.exports.useState([]),{handleSubmit:v,register:S,watch:m,setValue:p,control:b,formState:x,resetField:k}=Oe({defaultValues:(()=>{var O,F,z,H,A,j;const M=Ue(u);return{id:(O=M.id)!=null?O:"",guest_name:(F=M.guest_name)!=null?F:"",from:En((z=M.from)!=null?z:"")?new Date(M.from):new Date,to:En((H=M.to)!=null?H:"")?new Date(M.to):new Date,space_name:(A=M.space_name)!=null?A:"",status:(j=M.status)!=null?j:"",direction:"DESC"}})()}),{dirtyFields:N}=x,_=m("direction"),C=m("from"),E=async M=>{window.innerWidth<700&&a(!1),console.log("submitting",M),i([]),u.set("id",M.id),u.set("guest_name",M.guest_name),u.set("status",M.status),u.set("from",N!=null&&N.from?M.from.toISOString().split("T")[0]:""),u.set("to",N!=null&&N.to?M.to.toISOString().split("T")[0]:""),g(u)};async function T(){var F;const O={user_id:Number((F=localStorage.getItem("user"))!=null?F:0)};Nv.setTable("user_property_spaces");try{const z=await Nv.callRestAPI({payload:O},"GETALL");Array.isArray(z.list)&&w(z.list)}catch(z){if(me(d,z.message),z.name=="AbortError"){l({type:"STOP_LOADING"});return}l({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:z.message}})}l({type:"STOP_LOADING"})}async function D(){i(Array(10).fill({}));const M=localStorage.getItem("user");var O=[`ergo_booking.host_id = ${M} AND ergo_booking.property_space_id = ${t} AND ergo_booking.deleted_at IS NULL`];const F=Ue(u);F.guest_name&&O.push(`(ergo_user.first_name LIKE '%${F.guest_name}%' OR ergo_user.last_name LIKE '%${F.guest_name}%'`),F.from&&O.push(`ergo_booking.booking_start_time >= date('${F.from}')`),F.to&&O.push(`ergo_booking.booking_end_time <= date('${F.to}')`),F.space_name&&O.push(`ergo_property.name LIKE '%${F.space_name}%'`),F.status&&(F.status=="expired"?O.push(`ergo_booking.booking_start_time < date('${new Date().toISOString()}')`):O.push(`ergo_booking.status = ${F.status}`)),F.id&&(O=[`ergo_booking.host_id = ${M} AND ergo_booking.id = ${F.id} AND ergo_booking.property_space_id = ${t} AND ergo_booking.deleted_at IS NULL`]),console.log("where",O);try{const z=await Nv.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:1e3,where:O,sortId:"update_at",direction:"DESC"},"POST",L7e.signal);Array.isArray(z.list)&&i(z.list)}catch(z){if(me(d,z),z.name=="AbortError")return;l({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:z.message}})}}h.exports.useEffect(()=>{T()},[]),h.exports.useEffect(()=>{i(e)},[e]),h.exports.useEffect(()=>{D()},[u]),h.exports.useEffect(()=>{o&&T()},[o]);const P=(M,O)=>_=="DESC"?new Date(O.id)-new Date(M.id):new Date(M.id)-new Date(O.id);return f("div",{className:"min-h-screen bg-white pt-[44px]",children:[s("section",{children:f("form",{onSubmit:v(E),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>a(M=>!M),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:b,name:"direction"})]}),f("div",{className:` ${n?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s("input",{type:"text",placeholder:"ID",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...S("id")}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>k("from",{keepDirty:!1,keepTouched:!1}),setValue:M=>p("from",M,{shouldDirty:!0}),control:b,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date("2001-01-01")})}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>k("to",{keepDirty:!1,keepTouched:!1}),setValue:M=>p("to",M,{shouldDirty:!0}),control:b,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:C})}),s("input",{type:"text",placeholder:"Guest name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...S("guest_name")}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...S("space_name")}),s(fa,{items:[{label:"All",value:""},{label:"Pending",value:0},{label:"Upcoming",value:1},{label:"Ongoing",value:2},{label:"Completed",value:3},{label:"Declined",value:4},{label:"Expired",value:"expired"}],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All",control:b,name:"status"}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),f("div",{children:[r.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," You have no bookings"]})}),r.sort(P).map((M,O)=>{var F,z,H;return s(yF,{data:M,forceRender:c,favoriteId:(z=(F=y.find(A=>A.property_spaces_id==M.property_space_id))==null?void 0:F.id)!=null?z:null},(H=M.id)!=null?H:O)})]})]})},M7e=({data:e,scheduleTemplate:t})=>f("div",{className:"flex relative mx-auto md:max-w-lg max-w-[300px] items-center justify-between mb-40 normal-case",children:[f("div",{className:"absolute left-0 absolute-middle bg-gray-300 right-0 flex",children:[s("div",{className:`${e.draft_status>=Nn.IMAGES?"login-btn-gradient":""} h-full flex-grow`}),s("div",{className:`${e.draft_status>Nn.SCHEDULING?"login-btn-gradient":""} h-full flex-grow`})]}),f("div",{className:"relative z-10",children:[s($e,{to:`/account/my-spaces/${e.id}/edit-${e.draft_status>=Nn.PROPERTY_SPACE?"property-space?mode=edit":"property-space?mode=create"}`,className:`draft-stage ${e.draft_status>=Nn.PROPERTY_SPACE?"complete":""}`,state:e,children:"1"}),s("p",{className:"absolute -left-6",children:"About location"})]}),f("div",{className:"relative z-10",children:[s($e,{to:`/account/my-spaces/${e.id}/edit-${e.draft_status>=Nn.IMAGES?"images?mode=edit":"images?mode=create"}`,className:`draft-stage ${e.draft_status>=Nn.IMAGES?"complete":""}`,state:e,children:"2"}),s("p",{className:"absolute md:w-[unset] -left-4 !w-[60px]",children:"Images, Addons, FAQs etc"})]}),f("div",{className:"relative z-10",children:[s($e,{to:`/account/my-spaces/${e.id}/edit-${t.id?"scheduling?mode=edit":"scheduling?mode=create"}`,className:`draft-stage ${e.draft_status>Nn.SCHEDULING?"complete":""}`,state:t,children:"3"}),s("p",{className:"absolute -left-8 md:!w-[unset] !w-[50px]",children:"Templates & Scheduling"})]})]});function Ox({loader:e,onCardDelete:t}){const[n,a]=h.exports.useState([]),[r,i]=h.exports.useState({}),o=new _e,{dispatch:c}=h.exports.useContext(we);h.exports.useContext(Ee);async function l(){var g;e&&c({type:"START_LOADING"});try{const y=await o.getCustomerStripeCards();Array.isArray((g=y.data)==null?void 0:g.data)&&a(y.data.data)}catch(y){c({type:"SHOW_ERROR",payload:{heading:"Unable to get payment methods",message:y.message}})}c({type:"STOP_LOADING"})}async function d(g){e&&c({type:"START_LOADING"});try{await o.setStripeCustomerDefaultCard(g),l()}catch{c({type:"STOP_LOADING"})}}async function u(g){e&&c({type:"START_LOADING"});try{await o.deleteCustomerStripeCard(g),t&&t(),l()}catch(y){c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:y.message}}),c({type:"STOP_LOADING"})}}return h.exports.useEffect(()=>{l()},[]),h.exports.useEffect(()=>{if(n.length>0){var g=n.find(y=>y.id==y.customer.default_source);i(g||{})}},[n]),{cards:n,defaultCard:r,changeDefaultCard:d,fetchCards:l,deleteCard:u}}const A7e=new _e,I7e=new AbortController;function Jl(e,t){const[n,a]=h.exports.useState({}),[r,i]=h.exports.useState(null),{dispatch:o}=h.exports.useContext(we),{dispatch:c}=h.exports.useContext(Ee);async function l(){const d=localStorage.getItem("user"),u=[`ergo_property_spaces.id = ${e} AND ergo_property_spaces.deleted_at IS NULL`];try{const g=await A7e.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1,user_id:Number(d),where:u,all:!0},"POST",I7e.signal);Array.isArray(g.list)&&g.list.length>0?a(g.list[0]):i(!0)}catch(g){if(me(c,g.message),g.name=="AbortError")return;o({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:g.message}})}o({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{isNaN(Number(e))||l()},[e]),h.exports.useEffect(()=>{!t||l()},[t]),{propertySpace:n,notFound:r}}const O7e=new AbortController;function P7e(e,t,n){const[a,r]=h.exports.useState([]),{dispatch:i}=h.exports.useContext(we),{dispatch:o}=h.exports.useContext(Ee);async function c(){n(!0);const l=[`property_spaces_id = ${e} AND ${t?`is_approved = ${rn.APPROVED}`:`is_approved = ${rn.IN_REVIEW}`} AND ergo_property_spaces_images.deleted_at IS NULL`];try{const u=await new _e().callRawAPI("/v2/api/custom/ergo/property-space-images/PAGINATE",{page:1,limit:7,where:l},"POST",O7e.signal);Array.isArray(u.list)&&r(u.list)}catch(d){if(me(o,d.message),d.name=="AbortError")return;i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:d.message}})}n(!1)}return h.exports.useEffect(()=>{isNaN(e)||c()},[e]),a}const R7e=new AbortController;function ed(e,t){const[n,a]=h.exports.useState([]),{dispatch:r}=h.exports.useContext(we),{dispatch:i}=h.exports.useContext(Ee);async function o(){const c=new _e,l=[`ergo_property.id = ${e} AND ergo_property_add_on.deleted_at IS NULL`];try{const d=await c.callRawAPI("/v2/api/custom/ergo/property-addons/PAGINATE",{page:1,limit:1e4,where:l},"POST",R7e.signal);Array.isArray(d.list)&&a(d.list)}catch(d){if(me(i,d.message),d.name=="AbortError")return;r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:d.message}})}}return h.exports.useEffect(()=>{e&&o()},[e,t]),n}const j7e=new AbortController,z7e=new _e;function Px(e){const[t,n]=h.exports.useState({}),{dispatch:a}=h.exports.useContext(we),{dispatch:r}=h.exports.useContext(Ee);async function i(){try{const o=await z7e.callRawAPI("/v2/api/custom/ergo/get-user",{id:e},"POST",j7e.signal);n({...o,photo:o.is_photo_approved==rn.APPROVED?o.photo:null})}catch(o){if(me(r,o.message),o.name=="AbortError")return;a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:o.message}})}}return h.exports.useEffect(()=>{isNaN(e)||i()},[e]),t}function xF(){const[e,t]=h.exports.useState(null),[n,a]=h.exports.useState(null),r=new _e,{dispatch:i}=h.exports.useContext(we);async function o(){var c,l;r.setTable("settings");try{const d=await r.callRestAPI({page:1,limit:2,payload:{}},"PAGINATE");Array.isArray(d.list)&&d.list.length>0&&(t((c=d.list.find(u=>u.key_name=="tax"))==null?void 0:c.key_value),a((l=d.list.find(u=>u.key_name=="commission"))==null?void 0:l.key_value))}catch(d){i({type:"SHOW_ERROR",payload:{heading:"Unable to determine tax amount",message:d.message}})}}return h.exports.useEffect(()=>{o()},[]),{tax:e,commission:n}}const F7e=new AbortController;function Oh(e,t){const[n,a]=h.exports.useState([]);h.exports.useContext(we);const{dispatch:r}=h.exports.useContext(Ee);async function i(){const o=new _e,c=[`ergo_property_spaces.id = ${e}`];try{const l=await o.callRawAPI("/v2/api/custom/ergo/property-spaces-amenitites/PAGINATE",{page:1,limit:1e3,where:c},"POST",F7e.signal);Array.isArray(l.list)&&a(l.list)}catch(l){if(me(r,l.message),l.name=="AbortError")return}}return h.exports.useEffect(()=>{isNaN(e)||i()},[e,t]),n}const $7e=new AbortController;function Rx(e){const[t,n]=h.exports.useState([]),{dispatch:a}=h.exports.useContext(we),{dispatch:r}=h.exports.useContext(Ee);async function i(){try{const c=await new _e().callRawAPI("/v2/api/custom/ergo/property_space_faq/PAGINATE",{page:1,limit:10,where:[`property_space_id = ${e} AND ergo_property_space_faq.deleted_at IS NULL`]},"POST",$7e.signal);Array.isArray(c.list)&&n(c.list)}catch(o){if(me(r,o.message),o.name=="AbortError")return;a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:o.message}})}}return h.exports.useEffect(()=>{isNaN(e)||i()},[e]),t}const B7e=new AbortController;function xS(e){const[t,n]=h.exports.useState([]),{dispatch:a}=h.exports.useContext(we),{state:r}=h.exports.useContext(Ee),{dispatch:i}=h.exports.useContext(Ee);async function o(){const c=[`ergo_review.property_spaces_id = ${e} AND ergo_review.status = 1 AND ergo_review.given_by = 'customer'`];try{const d=await new _e().callRawAPI("/v2/api/custom/ergo/review-hashtag/PAGINATE",{page:1,limit:1e3,where:c,user:r.role},"POST",B7e.signal);Array.isArray(d.list)&&n(d.list)}catch(l){if(me(i,l.message),l.name=="AbortError")return;a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:l.message}})}}return h.exports.useEffect(()=>{isNaN(e)||o()},[e]),t}function wF({modalOpen:e,closeModal:t,reviews:n,onDirectionChange:a}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-red-800"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-7xl transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f("div",{className:"flex md:flex-row flex-col gap-4 justify-between items-center",children:[f(De.Title,{as:"h3",className:"text-2xl font-bold leading-6 text-gray-900",children:["All Reviews (",n.length,")"]}),f("div",{className:"flex gap-8 items-start",children:[s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:a,accessor:"label",valueAccessor:"value",className:"min-w-[200px]"}),s("button",{onClick:t,className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]})]}),s("hr",{className:"my-8"}),s("section",{className:"overflow-y-auto h-[70vh] review-scroll pr-[13px]",children:n.map(r=>s(yS,{data:r},r.id))})]})})})})]})})}function H7e({modalOpen:e,closeModal:t,propertySpace:n}){const{dispatch:a,state:r}=h.exports.useContext(Ee),{state:i,dispatch:o}=h.exports.useContext(we),[c,l]=h.exports.useState(!1),d=je(),[u]=h.exports.useState(new AbortController);async function g(){l(!0);try{const y=new _e;y.setTable("property_spaces"),await y.callRestAPI({id:n.id},"DELETE",u.signal),t(),d("/account/my-spaces")}catch(y){if(y.name=="AbortError"){l(!1);return}me(a,y.message),o({type:"SHOW_ERROR",payload:{heading:"Delete Failed",message:y.message}})}l(!1)}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Are you sure?"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:" Are you sure you want to delete this space?. This change is not reversible"})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>{u.abort(),t()},children:"Cancel"}),s(Ft,{loading:c,type:"button",className:`inline-flex justify-center rounded-md ${c?"py-1 px-6":"py-2 px-4"} bg-red-500 text-sm font-medium text-white`,onClick:g,children:"Yes I'm sure"})]})]})})})})]})})}const U7e=new AbortController;function vF(e,t){const[n,a]=h.exports.useState([]),{dispatch:r}=h.exports.useContext(we),{dispatch:i}=h.exports.useContext(Ee);async function o(){const c=[`property_spaces_id = ${e} AND ergo_property_spaces_images.deleted_at IS NULL`];try{const d=await new _e().callRawAPI("/v2/api/custom/ergo/property-space-images/PAGINATE",{page:1,limit:7,where:c},"POST",U7e.signal);Array.isArray(d.list)&&a(d.list)}catch(l){if(me(i,l.message),l.name=="AbortError")return;r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:l.message}})}}return h.exports.useEffect(()=>{isNaN(e)||o()},[e]),n}let Sv=new _e,kv=new AbortController;const V7e=["Under Review","Active","Rejected"],W7e=["text-[#DC6803]","my-text-gradient","text-[#D92D20]"],Y7e=()=>{var oe,q,te,G,J,K,Q,Z,se,ce,le,ae,ie,de,fe,be,he,ve,Ce,nt,Ae,Je,ze,We,bt,Et,wt,At,Yt,xn,Bn,zn,Kn,ca,ht,Ht,Dt,Lt;const{state:e}=An(),{dispatch:t}=h.exports.useContext(we),{dispatch:n}=h.exports.useContext(Ee),[a,r]=h.exports.useState(!1),[i,o]=h.exports.useState(!1),c=je(),{id:l}=Mt(),[d,u]=h.exports.useState("DESC"),[g,y]=h.exports.useState([]),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState([]),{handleSubmit:p,register:b,setValue:x}=Oe(),[k,N]=h.exports.useState(!1),[_,C]=h.exports.useState(!1),[E,T]=h.exports.useState(!1);h.exports.useState(!0);const{propertySpace:D,notFound:P}=Jl(l,_),M=Px(D.host_id),O=vF(D.id),F=ed(D.property_id),z=Oh(D.id),H=Rx(D.id),A=xS(D.id),[j,I]=h.exports.useState(!1);async function B(Le){try{const Ze=await _t("customer/schedule","post",{property_spaces_id:Le},"",null,"v3");Array.isArray(Ze.list)&&y(Ze.list)}catch(Ze){t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ze.message}})}}async function Y(Le){var Ze,It;try{const un=await _t("property_spaces_schedule_template","post",{page:1,limit:1,where:[`property_spaces_id = ${Le}`]},"PAGINATE");if(Array.isArray(un.list)&&un.list.length>0&&v({custom_slots:un.list[0].custom_slots,schedule_id:un.list[0].id}),(Ze=un.list[0])!=null&&Ze.schedule_template_id){const Ye=await _t("schedule_template","post",{page:1,limit:1,where:[`id = ${un.list[0].schedule_template_id}`]},"PAGINATE");Array.isArray(Ye.list)&&((It=Ye.list[0])!=null?It:{})&&v(Ge=>({...Ge,...Ye.list[0]}))}}catch(un){t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:un.message}})}}async function U(){var Ze=[`ergo_booking.host_id = ${localStorage.getItem("user")} AND ergo_booking.property_space_id = ${l} AND ergo_booking.deleted_at IS NULL`];try{const It=await Sv.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:1e4,where:Ze},"POST",kv.signal);Array.isArray(It.list)&&m(It.list)}catch(It){if(me(n,It.message),It.name=="AbortError")return;t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:It.message}})}}async function W(Le){t({type:"START_LOADING"});try{await Sv.callRawAPI("/rest/property_spaces/PUT",{id:Le,availability:Ti.HIDDEN},"POST",kv.signal),C(new Date)}catch(Ze){if(me(n,Ze.message),Ze.name=="AbortError"){t({type:"STOP_LOADING"});return}t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ze.message}})}t({type:"STOP_LOADING"})}async function V(Le){t({type:"START_LOADING"});try{await Sv.callRawAPI("/rest/property_spaces/PUT",{id:Le,availability:Ti.VISIBLE},"POST",kv.signal),C(new Date)}catch(Ze){if(me(n,Ze.message),Ze.name=="AbortError"){t({type:"STOP_LOADING"});return}t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ze.message}})}t({type:"STOP_LOADING"})}const X=async Le=>{console.log("submitting ",Le)};h.exports.useEffect(()=>{B(l),Y(l),U()},[]);const ne=(Le,Ze)=>d=="DESC"?new Date(Ze.post_date)-new Date(Le.post_date):new Date(Le.post_date)-new Date(Ze.post_date);return P?s(wr,{to:"/not-found"}):f("div",{className:"-mt-2 text-sm normal-case md:-mt-10 md:text-base",onClick:()=>{N(!1)},children:[s("div",{children:f("button",{type:"button",onClick:()=>c(-1),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"mb-[22px] flex items-center justify-between",children:[s("h1",{className:"mr-3 text-2xl font-semibold text-[#101828] md:text-3xl",children:"Space Details"}),f("div",{className:"flex items-center gap-[16px]",children:[f("span",{className:`bg-[#F2F4F7] rounded-sm px-[16px] py-[8px] ${W7e[(q=(oe=D.space_status)!=null?oe:e==null?void 0:e.space_status)!=null?q:0]} border text-sm font-semibold uppercase`,children:[" ",((te=D.draft_status)!=null?te:e==null?void 0:e.draft_status)<Nn.COMPLETED?"DRAFT":V7e[(J=(G=D.space_status)!=null?G:e==null?void 0:e.space_status)!=null?J:0]]}),s("button",{onClick:()=>I(!0),className:`${((K=D.draft_status)!=null?K:e==null?void 0:e.draft_status)<Nn.COMPLETED?"block":"hidden"}`,children:"Delete draft"}),s(Zl,{disabled:((Q=D.draft_status)!=null?Q:e==null?void 0:e.draft_status)<Nn.COMPLETED,hidden:((Z=D.draft_status)!=null?Z:e==null?void 0:e.draft_status)<Nn.COMPLETED,items:[{label:"Activate Space",icon:s(Se,{}),onClick:()=>V(D.id),notShow:((se=D.space_status)!=null?se:e==null?void 0:e.space_status)==0||((ce=D.availability)!=null?ce:e==null?void 0:e.availability)==1},{label:"Deactivate Space",icon:s(Se,{}),onClick:()=>W(D.id),notShow:((le=D.availability)!=null?le:e==null?void 0:e.availability)==0},{label:"Edit Scheduling",icon:s(Se,{}),onClick:()=>{c(`/account/my-spaces/${l}/edit-scheduling?mode=edit`,{state:w})}},{label:"Edit Images, FAQs",icon:s(Se,{}),onClick:()=>{c(`/account/my-spaces/${l}/edit-images?mode=edit`)}},{label:"Edit Space Details",icon:s(Se,{}),onClick:()=>{c(`/account/my-spaces/${l}/edit-property-space?mode=edit`)}},{label:"Delete",icon:s(Se,{}),onClick:()=>I(!0)}]})]})]}),f(On.Group,{children:[f(On.List,{as:"div",className:"two-tab-menu mb-[32px] border-b",children:[s(On,{as:h.exports.Fragment,children:s("button",{className:"py-3 px-4 text-xl focus:outline-none ui-selected:font-semibold",children:"Space Listing"})})," ",s(On,{as:h.exports.Fragment,children:s("button",{className:"py-3 px-4 text-xl focus:outline-none ui-selected:font-semibold",children:"Booking History"})})," ",s("div",{className:"mover"})]}),f(On.Panels,{children:[s(On.Panel,{as:h.exports.Fragment,children:f("div",{className:"block",children:[((ae=D.id)!=null?ae:e==null?void 0:e.id)?f(Se,{children:[" ",((ie=D.draft_status)!=null?ie:e==null?void 0:e.draft_status)<Nn.COMPLETED?f(Se,{children:[s("p",{className:"mb-4",children:"Finish creating your space"}),s(M7e,{data:D!=null?D:e,scheduleTemplate:w})]}):f("div",{className:"mb-[40px] flex grid-cols-3 flex-col gap-[16px] md:grid",children:[f("div",{className:"flex justify-between border px-[16px] py-[8px]",children:[s("p",{children:"Space ID"}),s("p",{className:"font-semibold",children:l})]}),f("div",{className:"flex justify-between border px-[16px] py-[8px]",children:[s("p",{children:"Total Revenue"}),f("p",{className:"font-semibold",children:["$"," ",S.reduce((Le,Ze)=>{var It,un;return Le+((It=Ze.total)!=null?It:0)+((un=Ze.addon_cost)!=null?un:0)},0).toFixed(2)]})]}),f("div",{className:"flex justify-between border px-[16px] py-[8px]",children:[s("p",{children:"Total Bookings"}),s("p",{className:"font-semibold",children:S.length})]})]})]}):null,f("div",{className:"mb-[18px] flex flex-col items-start justify-between md:flex-row md:items-center",children:[f("div",{className:"flex flex-col items-start gap-4 normal-case md:flex-row md:items-center",children:[s("h2",{className:"text-3xl font-semibold",children:(de=D.name)!=null?de:e==null?void 0:e.name}),s("p",{className:"text-[#475467]",children:(fe=D.address_line_1)!=null?fe:e==null?void 0:e.address_line_1}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:()=>T(!0),children:"(view on map)"})]}),f("div",{className:"mt-[19px] flex w-full justify-center gap-4 md:mt-0 md:w-[unset]",children:[f("p",{className:"flex flex-grow items-center justify-center gap-2 rounded-sm border bg-[#F3F9F7] px-[14px] py-[10px]",children:[s(ds,{}),f("strong",{className:"font-semibold",children:[(Number((be=D.average_space_rating)!=null?be:e==null?void 0:e.average_space_rating)||0).toFixed(1),f("span",{className:"font-normal",children:["(",(he=D.space_rating_count)!=null?he:e==null?void 0:e.space_rating_count,")"]})]})]}),f("div",{className:"flex flex-grow items-center justify-center gap-2 rounded-sm border bg-[#F3F9F7] px-[14px] py-[10px]",children:[s(ls,{space_id:(ve=D.id)!=null?ve:e==null?void 0:e.id,user_property_spaces_id:(Ce=D.user_property_spaces_id)!=null?Ce:e==null?void 0:e.user_property_spaces_id,reRender:C,withLoader:!0,className:"-mb-1",buttonClassName:"",stroke:"#344054",favColor:"black"}),s("span",{children:"Save"})]})]})]}),f("div",{className:"snap-scroll relative mb-[66px] flex h-[381px] gap-[32px] px-[14px] md:px-0",children:[((nt=O[0])==null?void 0:nt.photo_url)&&s("img",{src:(Ae=O[0])==null?void 0:Ae.photo_url,className:"h-full rounded-lg object-cover xl:min-w-[616px]"}),((Je=O[1])==null?void 0:Je.photo_url)&&s("img",{src:(ze=O[1])==null?void 0:ze.photo_url,className:"h-full w-[292px] rounded-lg object-cover"}),f("div",{className:`${(We=O[3])!=null&&We.photo_url?"block":"flex min-w-[550px] flex-col"} "gap-4 overflow-hidden md:gap-[32px]"`,children:[((bt=O[2])==null?void 0:bt.photo_url)&&s("img",{src:(Et=O[2])==null?void 0:Et.photo_url,className:`${((wt=O[3])==null?void 0:wt.photo_url)&&"h-1/2"} "rounded-lg object-cover md:w-full"`}),((At=O[3])==null?void 0:At.photo_url)&&s("img",{src:(Yt=O[3])==null?void 0:Yt.photo_url,className:"h-1/2 rounded-lg object-cover md:w-full"})]}),((xn=O[4])==null?void 0:xn.photo_url)&&s("img",{src:(Bn=O[4])==null?void 0:Bn.photo_url,className:"h-full w-[292px] rounded-lg object-cover"}),f("button",{className:"sticky right-6 mb-[8px] min-w-[170px] self-end border bg-[#00000080] px-3 py-1 text-center text-sm text-white",onClick:()=>r(!0),children:["View all photos (",O.length,")"]})]}),f("section",{className:"relative flex flex-col items-start xl:flex-row xl:gap-12",children:[f("div",{className:"w-full px-2 md:px-0 xl:w-3/5",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Description"}),s("p",{className:"",children:(zn=D.description)!=null?zn:e==null?void 0:e.description}),s("hr",{className:"my-[47px]"}),s("h3",{className:"mb-[12px] text-2xl font-semibold",children:"Amenities"}),s("ul",{className:"addons-grid list-disk-important",children:z.map((Le,Ze)=>f("li",{className:"flex w-fit items-center gap-2 mb-4 sm:mb-0",children:[s(ur,{}),Le.amenity_name]},Ze))}),s("hr",{className:"my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Add ons"}),s("ul",{className:"addons-grid list-disk-important",children:F.map(Le=>f("li",{className:"flex w-fit sm:w-full items-center gap-2 mb-4 sm:mb-0",children:[f("span",{className:"w-fit",children:[" ",f("div",{className:"flex gap-4",children:[s(ur,{})," ",Le.add_on_name]})," "]})," ",f("strong",{className:"font-semibold",children:["$",Le.cost,"/h"]})]},Le.id))}),s("hr",{className:"my-[47px]"}),s("div",{className:"mb-[28px] flex flex-wrap items-center justify-between",children:s("h3",{className:"mb-2 text-xl font-semibold md:mb-0 md:text-2xl",children:"About the host"})}),f("div",{className:"flex items-center justify-between gap-4 md:justify-start md:gap-[24px]",children:[s("div",{className:"w-max-content",children:s("img",{src:(Kn=M.photo)!=null?Kn:"/default.png",className:"h-[72px] w-[72px] rounded-full object-cover"})}),f("div",{className:"space-y-3 w-[90%]",children:[f("div",{className:"flex text-xl font-bold gap-1",children:[s("p",{className:"md:block",children:M.first_name}),s("p",{className:"md:block",children:M.last_name})]}),s("p",{className:"hidden md:block",children:(ca=D.about)!=null?ca:e==null?void 0:e.about})]})]}),s("p",{className:"mt-4 block md:hidden",children:(ht=D.about)!=null?ht:e==null?void 0:e.about}),s("hr",{className:"my-[47px]"}),f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Reviews"}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:u,accessor:"label",valueAccessor:"value",className:"min-w-[200px]",listOptionClassName:"pl-4"})]}),f("section",{children:[A.length==0&&s("p",{children:"No reviews yet"}),A.sort(ne).slice(0,10).map(Le=>s(yS,{data:Le},Le.id)),s("div",{className:"text-center",children:A.length>10?f("button",{className:"font-semibold underline",onClick:()=>o(!0),children:["View more (",A.length,")"]}):null})]}),s("hr",{className:"my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"FAQs"}),H.map(Le=>s(Ax,{data:Le},Le.id)),s("hr",{className:"my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Property rules"}),s("p",{className:"mb-32",children:(Ht=D.rule)!=null?Ht:e==null?void 0:e.rule})]}),s("div",{className:"sticky bottom-0 w-full flex-grow bg-white xl:top-16 xl:bottom-[unset] xl:w-[unset]",children:f("div",{className:"sticky-price-summary mx-auto max-w-2xl p-6 md:border-2",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:(Dt=D.max_capacity)!=null?Dt:e==null?void 0:e.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",(Lt=D.rate)!=null?Lt:e==null?void 0:e.rate]}),"/h"]})]}),D.additional_guest_rate&&D.max_capacity>1?f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Additional guest"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",D.additional_guest_rate]}),"/h"]})]}):null,s("hr",{className:"my-[24px] hidden md:block"}),f("form",{className:"flex flex-col",onSubmit:p(X),children:[s("div",{className:"z-50 mb-3",children:s(jc,{register:b,setValue:x,fieldNames:["selectedDate","from","to"],showCalendar:k,setShowCalendar:N,fromDefault:"",toDefault:"",bookedSlots:g.map(Le=>({fromTime:new Date(Le.start_time),toTime:new Date(Le.end_time)})),scheduleTemplate:w,defaultMessage:"Check Availability"})}),s("button",{type:"submit",className:"login-btn-gradient gap-2 rounded-tr rounded-br py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:!0,children:window.innerWidth>500?"Continue":"Check Availability"})]})]})})]}),s(fF,{spaceImages:O,modalOpen:a,closeModal:()=>r(!1)}),s(wF,{modalOpen:i,closeModal:()=>o(!1),reviews:A,onDirectionChange:u})]})}),f(On.Panel,{children:[" ",s("div",{className:"block",children:s(D7e,{myBookings:S})})]})]})]}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${D.address_line_1||""}, ${D.address_line_2||""}, ${D.city||""}, ${D.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${D.address_line_1||""}, ${D.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:E,closeModal:()=>T(!1)}),s(H7e,{modalOpen:j,closeModal:()=>I(!1),propertySpace:D})]})},G7e=({data:e,forceRender:t,selectedTemplate:n,setSelectedTemplate:a})=>{const[r,i]=h.exports.useState(!1),{dispatch:o}=h.exports.useContext(we),c=on(e.slots,[]);async function l(d){o({type:"START_LOADING"});try{await _t("host/schedule-slot/template","delete",{id:d},""),t&&t(new Date)}catch(u){o({type:"STOP_LOADING"}),o({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:u.message}})}}return f("div",{className:"mb-[44px] flex items-center justify-between rounded-lg border border-[#EAECF0] bg-[#F9FAFB] p-[12px]",children:[s("div",{className:"w-full",children:f("div",{className:"flex justify-between lg:justify-start",children:[f("div",{className:"lg:min-w-[370px]",children:[s("h3",{className:"text-xl font-semibold",children:e.template_name}),f("p",{className:"capitalize",children:["(",sr.filter(d=>e[d]==1).map((d,u,g)=>d+(u==g.length-1?"":", ")),")"]}),f("div",{className:"block md:hidden",children:[s("br",{}),s(Zl,{items:[{label:"Edit",icon:s(Ga,{}),onClick:()=>i(!0)},{label:"Delete",icon:s(Rb,{}),onClick:()=>l(e.id)}],menuClassName:"right-[unset] left-0 origin-top-left"})]})]}),s("div",{className:"flex flex-wrap justify-end gap-[32px] lg:flex-nowrap lg:justify-start",children:Array.isArray(c)&&c.slice(0,2).map((d,u)=>f("div",{className:"whitespace-nowrap",children:[f("p",{className:"text-sm",children:["Slot ",u+1,":"]}),f("p",{className:"font-semibold",children:[Pn(d.start)," - ",Pn(d.end)]})]},u))})]})}),f("div",{className:"hidden lg:flex",children:[f("button",{onClick:()=>i(!0),className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm",children:[s(Ga,{}),"Edit"]}),f("button",{onClick:()=>l(e.id),className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm",children:[s(Rb,{}),"Delete"]})]}),s(uF,{data:e,selectedTemplate:n,setSelectedTemplate:a,forceRender:t,onSuccess:()=>{t&&t()},modalOpen:r,closeModal:()=>i(!1)})]})};let ng=new _e;const q7e=({selectedDate:e,date:t,id:n,schedule_id:a,selected_id:r,isDirty:i,setIsDirty:o,selectedTemplate:c,activeStartDate:l})=>{var Y,U,W;const{spaceData:d,dispatch:u}=Ql(),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState(!1),[S,m]=h.exports.useState([]),p=cr(w,300),b=Te(t).format("MM/DD/YY");async function x(){ng.setTable("property_spaces_schedule_template");const V=await ng.callRestAPI({},"GETALL"),X=V==null?void 0:V.list.find(ne=>ne.property_spaces_id===Number(n));X!=null&&X.customSlots&&m(JSON.parse(X==null?void 0:X.custom_slots))}h.exports.useEffect(()=>{x()},[w]);let k=Array.isArray((Y=d==null?void 0:d.customSlots[b])!=null?Y:S[b])?(U=d==null?void 0:d.customSlots[b])!=null?U:S[b]:c[sr[t.getDay()]]==1&&Array.isArray(on(c.slots))?on(c.slots):[],N=Array.isArray((W=d==null?void 0:d.customSlots[b])!=null?W:S[b]);const{handleSubmit:_,register:C,control:E,getValues:T,setValue:D}=Oe({defaultValues:{custom_slot:k.map(V=>({start:Pn(V.start),end:Pn(V.end)}))}}),{fields:P,append:M,prepend:O,remove:F,swap:z,move:H,insert:A}=af({control:E,name:"custom_slot"});h.exports.useEffect(()=>{y(!1)},[e]);const j=async V=>{u({type:"SET_DAY_SLOT",payload:{day:b,slots:V.custom_slot.map(X=>({start:new Date(`${b} ${X.start}`).toISOString(),end:new Date(`${b} ${X.end}`).toISOString()}))}}),ng.setTable("property_spaces_schedule_template"),await ng.callRestAPI({id:a&&a,schedule_template_id:r&&r,custom_slots:JSON.stringify(d==null?void 0:d.customSlots)},"PUT"),v(!1)},I=V=>{V.stopPropagation(),u({type:"CLEAR_DAY_SLOT",payload:b})},B=V=>{V.stopPropagation(),u({type:"INHERIT_DAY_SLOT",payload:b})};return f("div",{className:` ${t.getDay()==0?"":"border-r-0"} border relative min-h-[180px] border-t-0 schedule-day`,children:[f("div",{className:"border-b py-2 px-[14px] flex justify-between",children:[s("h5",{className:"font-semibold",children:t.getDate()}),N?s(lF,{}):s(iF,{})]}),f("div",{className:"px-[8px] py-4 flex flex-col items-start gap-3",children:[k.slice(0,3).map((V,X)=>s("p",{children:Pn(V.start)+" - "+Pn(V.end)},X)),k.length>3&&f("span",{className:"font-semibold",children:[" + ",k.length-3," More"]})]}),b==Te(e).format("MM/DD/YY")&&s("button",{className:"flex border-2 border-red-400 p-2 w-full justify-end bottom-4 absolute options-btn",onClick:V=>{V.stopPropagation(),V.preventDefault(),y(!0)},children:s("div",{className:"rotate-90",children:s(ln,{type:"dots"})})}),g&&f("div",{className:`pop-in absolute top-1/2 ${t.getDay()==0?"-left-1/2":"left-1/2"} min-w-[223px] border border[#EAECF0] flex flex-col bg-white z-10 rounded-md schedule-options whitespace-nowrap`,children:[f("button",{className:"flex gap-[15px] hover:bg-gray-200 w-full p-3",onClick:()=>{v(!0),D("custom_slot",k.map(V=>({start:Pn(V.start),end:Pn(V.end)})))},children:[s(Ga,{stroke:"#98A2B3"}),s("span",{children:"Edit"})]}),c.template_name&&f("button",{className:"flex gap-[15px] hover:bg-gray-200 w-full p-3",onClick:I,children:[s(oF,{}),f("span",{children:["Reset to ",c.template_name]})]}),f("button",{className:"flex gap-[15px] hover:bg-gray-200 w-full p-3",onClick:B,children:[s(sF,{}),f("span",{children:["Copy from previous ",bR[t.getDay()]]})]})]}),s("div",{className:`${p?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>v(!1),children:f("form",{className:`${w?"pop-in":"pop-out"} bg-white p-5 md:px-5 px-3 rounded-lg w-[410px] max-w-[80%]`,onClick:V=>V.stopPropagation(),onSubmit:_(j),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s("h3",{className:"text-2xl font-semibold",children:"Edit Day"}),s("button",{type:"button",onClick:()=>v(!1),children:"\u2716"})]}),f("div",{className:"",children:[s("div",{className:"review-scroll min-h-[200px] max-h-[40vh] overflow-y-auto custom-calendar-scroll",children:P.map((V,X)=>f("div",{className:"flex gap-6 mb-[32px]",children:[f("div",{className:"flex-grow flex justify-between",children:[s("select",{className:"border bg-white cursor-pointer py-2 px-2 min-w-[150px]",...C(`custom_slot.${X}.start`),children:Xs.map(ne=>s("option",{children:ne},ne))}),s("select",{className:"border bg-white cursor-pointer py-2 px-2 min-w-[150px]",...C(`custom_slot.${X}.end`),children:Xs.map(ne=>s("option",{children:ne},ne))})]}),s("button",{type:"button",onClick:()=>F(X),children:"\u2715"})]},V.id))}),s("button",{type:"button",className:"text-sm text-[#1570EF] font-semibold mb-[32px]",onClick:()=>M({start:"05:00 am",end:"07:00 am"}),children:"+ Add another time slot"})]}),s("br",{}),s("button",{type:"submit",className:"login-btn-gradient text-white tracking-wide outline-none focus:outline-none rounded py-2 mt-4 w-full",children:"Save"})]})})]})};let Sd=new _e;const Z7e=()=>{const{id:e}=Mt(),{state:t}=An(),[n,a]=h.exports.useState(new Date),{propertySpace:r,notFound:i}=Jl(e,n);console.log(t);const[o]=lt(),[c,l]=h.exports.useState(!1),[d,u]=h.exports.useState(!1),[g,y]=h.exports.useState(new Date),{dispatch:w}=h.exports.useContext(we),[v,S]=h.exports.useState([]),[m,p]=h.exports.useState(t),{spaceData:b,dispatch:x}=Ql(),k=ed(r.property_id),N=Oh(r.property_id);h.exports.useEffect(()=>{if(x({type:"SET_ADDONS",payload:k}),x({type:"SET_AMENITIES",payload:N}),t!=null&&t.custom_slots)for(let D=0;D<(Object==null?void 0:Object.keys(JSON.parse(t==null?void 0:t.custom_slots)).length);D++){const P=Object.keys(JSON.parse(t==null?void 0:t.custom_slots))[D],M=Object.values(JSON.parse(t==null?void 0:t.custom_slots))[D];x({type:"SET_DAY_SLOT",payload:{day:P,slots:M}})}},[]);const _=je();async function C(){const D=Number(localStorage.getItem("user"));Sd.setTable("schedule_template");try{const P=await Sd.callRestAPI({payload:{host_id:D}},"GETALL");Array.isArray(P.list)&&S(P.list)}catch(P){console.log("error",P),w({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:P.message}})}}async function E(D,P){try{const M=await Ac.post("https://ergo.mkdlabs.com/rest/property_spaces/PUT",{id:Number(D),draft_status:P},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`,"x-project":"ZXJnbzprNWdvNGw1NDhjaDRxazU5MTh4MnVsanV2OHJxcXAyYXM"}})}catch(M){w({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:M.message}})}}h.exports.useEffect(()=>{C()},[n]),h.exports.useEffect(()=>{x({type:"SET_INITIAL_SCHEDULING",payload:t})},[]);async function T(D){var M;if(((M=m==null?void 0:m.slots)==null?void 0:M.length)<1||(m==null?void 0:m.slots)==="[]"){w({type:"SHOW_ERROR",payload:{heading:"Template selected doesn't have a slot",message:"Click on Use Template and Add Slot Time"}});return}if(!m.id){w({type:"SHOW_ERROR",payload:{heading:"Template was not selected",message:"Click on Use Template and Select a Schedule Template"}});return}w({type:"START_LOADING"});const P=o.get("mode");try{Sd.setTable("property_spaces_schedule_template"),P=="create"?(await Sd.callRestAPI({property_spaces_id:Number(e),schedule_template_id:m.id,custom_slots:JSON.stringify(b==null?void 0:b.customSlots)},"POST"),await E(e,Nn.COMPLETED)):(Sd.setTable("property_spaces_schedule_template"),await Sd.callRestAPI({id:t.schedule_id,schedule_template_id:m.id,custom_slots:JSON.stringify(b==null?void 0:b.customSlots)},"PUT"))}catch(O){w({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}w({type:"STOP_LOADING"}),x({type:"SET_SCHEDULE_TEMPLATE",payload:m}),D==="continue"?_(`/account/my-spaces/${e}/edit-review`,{state:{selectedTemplate:m,spaceAmenities:N,spaceAddons:k}}):_(`/account/my-spaces/${e}`)}return f("div",{className:"min-h-screen bg-white pb-8 normal-case",children:[s("h1",{className:"mb-8 text-4xl font-bold",children:"Edit Scheduling"}),f("div",{className:"mb-[32px] max-w-3xl rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[24px] py-[16px]",children:[f("h3",{className:"text-lg flex items-center gap-2 font-semibold",children:[s(Za,{}),s("span",{children:"How it works"})]}),f("p",{className:"ml-6 max-w-2xl text-sm leading-relaxed",children:["You can predefine each day of the week in ",s("b",{children:"\u2019Templates\u2019"})," - those hours will be applied to each day of the week. On top of that you can customize each day according to your needs.",s("br",{}),s("br",{})," You will be able to edit and change the space availability anytime from in \u2018Spaces/space/edit availability\u2019."]})]}),f(On.Group,{children:[f(On.List,{className:"two-tab-menu smaller border-b",children:[s(On,{className:"p-2 px-4 focus:outline-none ui-selected:font-semibold",children:"Calendar"}),s(On,{className:"p-2 px-4 focus:outline-none ui-selected:font-semibold",children:"Templates"}),s("div",{className:"mover"})]}),f(On.Panels,{children:[f(On.Panel,{children:[f("div",{className:"py-8",onClick:D=>D.stopPropagation(),children:[s("div",{className:"pl-1 mb-2",children:s("button",{className:"use-template",onClick:D=>{u(!0)},children:"Use Template"})}),s(vh,{className:"scheduling-calendar",onChange:D=>{y(D)},value:g,defaultValue:g,nextLabel:s(Se,{children:s("div",{className:"flex gap-4",children:s("div",{className:"w-[40px] border p-[10px] px-[15px]",children:s(_o,{})})})}),prevLabel:s(_h,{}),navigationLabel:({date:D,label:P,locale:M,view:O})=>s(Se,{children:f("div",{className:"flex justify-center gap-4 border-2 py-2",onClick:F=>F.stopPropagation(),children:[s("span",{children:P}),s("div",{className:"rotate-90 duration-200"})]})}),tileContent:({activeStartDate:D,date:P,view:M})=>s(q7e,{activeStartDate:D,date:P,view:M,id:e,schedule_id:t==null?void 0:t.schedule_id,selected_id:m==null?void 0:m.id,selectedDate:g,selectedTemplate:m}),minDate:new Date})]}),s(cF,{modalOpen:d,dispatch:x,closeModal:()=>u(!1),clearAll:()=>x({type:"CLEAR_ALL_SLOTS"}),templates:v,selectedTemplate:m,setSelectedTemplate:p})]}),f(On.Panel,{className:"pt-[70px]",children:[f("div",{className:"flex flex-wrap-reverse justify-between p-[12px]",children:[f("div",{className:"flex",children:[s("p",{className:"w-[250px] md:w-[340px]",children:"Template name & day(s)"}),s("p",{children:"Time slots"})]}),s("button",{className:"mb-0 font-semibold text-[#1570EF] md:mb-4",onClick:()=>l(!0),children:"+ Create new template"})]}),v.map(D=>s(G7e,{data:D,forceRender:a,selectedTemplate:m,setSelectedTemplate:p},D.id)),v.length==0&&f("p",{className:"flex h-40 items-center justify-center",children:[s(Za,{}),s("span",{className:"ml-2"})," No templates yet"]}),s(dF,{modalOpen:c,closeModal:()=>l(!1),onSuccess:()=>C()})]})]})]}),f("p",{className:"flex gap-2 text-[#475467]",children:[s(Za,{})," Keep in mind it usually takes us 2 days to review new space. Once we approve it it wil be posted with the first date/time available"]}),s("hr",{className:"my-[30px]"}),s("button",{onClick:()=>T("continue"),type:"submit",className:"login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",children:"Continue"}),s("br",{}),s("button",{type:"button",className:"login-btn-gradient rounded mt-3 py-2 px-4 tracking-wide text-white outline-none focus:outline-none",onClick:()=>T("submit"),children:"Save"})]})},Q7e=()=>s(hF,{children:s(Z7e,{})}),J7e=()=>{var K;const[e]=lt(),t=(K=e.get("mode"))!=null?K:"edit",[n,a]=h.exports.useState(""),{dispatch:r}=h.exports.useContext(we);Ql();const[i,o]=h.exports.useState([null,null,null,null,null,null]),{id:c}=Mt(),{propertySpace:l,notFound:d}=Jl(c),[u,g]=h.exports.useState(!1),y=cr(u,100),[w,v]=h.exports.useState(!1),S=cr(w,100),[m,p]=h.exports.useState({}),b=aF(),x=Ch(l.space_id,l.category==="Others"),k=Ix(l.space_id,l.category==="Others"),N=Oh(c),_=ed(l.property_id),C=Rx(c),[E,T]=h.exports.useState([]),D=new _e,P=je(),M=Qe({question:ge()}),{register:O,handleSubmit:F,getValues:z,setValue:H,watch:A,control:j,formState:{errors:I}}=Oe({resolver:Xe(M),defaultValues:{amenities:[],addons:[],faqs:[],thumbnail:""}}),B=A("amenities"),Y=A("addons"),{fields:U,append:W,remove:V}=af({control:j,name:"faqs"});async function X(Q){if(Q.photo_url===void 0)return null;const Z=Q.photo_url.substring(Q.photo_url.lastIndexOf("/")+1);let ce=await(await D.fetchImage(Z)).blob(),le={type:Q.default_image};return new File([ce],Q.photo_url.split("/").pop(),le)}const ne=(Q,Z)=>{const se=new FileReader;se.onload=ce=>{document.getElementById(Z).src=ce.target.result},se.readAsDataURL(Q)},oe=async Q=>{if(!Q)return{url:"",id:null};const Z=new FormData;Z.append("file",Q);try{return await D.uploadImage(Z)}catch{return{url:"",id:null}}};async function q(Q,Z){try{const se=await Ac.post("https://ergo.mkdlabs.com/rest/property_spaces/PUT",{id:Number(Q),draft_status:Z},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`,"x-project":"ZXJnbzprNWdvNGw1NDhjaDRxazU5MTh4MnVsanV2OHJxcXAyYXM"}})}catch(se){r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:se.message}})}}async function te(Q){var Z,se;try{const ce=await _t("property_spaces_schedule_template","post",{page:1,limit:1,where:[`property_spaces_id = ${Q}`]},"PAGINATE");if(Array.isArray(ce.list)&&ce.list.length>0&&p({custom_slots:ce.list[0].custom_slots,schedule_id:ce.list[0].id}),(Z=ce.list[0])!=null&&Z.schedule_template_id){const le=await _t("schedule_template","post",{page:1,limit:1,where:[`id = ${ce.list[0].schedule_template_id}`]},"PAGINATE");Array.isArray(le.list)&&((se=le.list[0])!=null?se:{})&&p(ae=>({...ae,...le.list[0]}))}}catch(ce){r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:ce.message}})}}const G=async Q=>{r({type:"START_LOADING"});var Z=Q.addons.filter(de=>!_.map(fe=>String(fe.add_on_id)).includes(de)),se=_.filter(de=>!Q.addons.includes(String(de.add_on_id))).map(de=>de.id),ce=Q.amenities.filter(de=>!N.map(fe=>String(fe.amenity_id)).includes(de)),le=N.filter(de=>!Q.amenities.includes(String(de.amenity_id))).map(de=>de.id),ae=Q.faqs.filter(de=>!C.map(fe=>JSON.stringify(fe)).includes(JSON.stringify(de))),ie=C.filter(de=>!Q.faqs.map(fe=>JSON.stringify(fe)).includes(JSON.stringify(de))).map(de=>de.id);try{r({type:"SET_DETAILS_TWO",payload:{faqs:Q.faqs,amenities:Q.amenities,addons:Q.addons}}),D.setTable("property_add_on");for(let fe=0;fe<Z.length;fe++){const be=Z[fe];await D.callRestAPI({property_id:l==null?void 0:l.property_id,add_on_id:be},"POST")}D.setTable("property_add_on");for(let fe=0;fe<se.length;fe++){const be=se[fe];await D.callRestAPI({id:be},"DELETE")}D.setTable("property_spaces_amenitites");for(let fe=0;fe<ce.length;fe++){const be=ce[fe];await D.callRestAPI({property_spaces_id:c,amenity_id:be},"POST")}D.setTable("property_spaces_amenitites");for(let fe=0;fe<le.length;fe++){const be=le[fe];await D.callRestAPI({id:be},"DELETE")}D.setTable("property_space_faq");for(let fe=0;fe<ae.length;fe++){const be=ae[fe];await D.callRestAPI({property_space_id:c,question:be.question,answer:be.answer},"POST")}D.setTable("property_space_faq");for(let fe=0;fe<ie.length;fe++){const be=ie[fe];await D.callRestAPI({id:be},"DELETE")}let de=0;for(let fe=0;fe<i.length;fe++){D.setTable("property_spaces_images");const be=i[fe],he=await oe(be);he.id&&(await D.callRestAPI({property_id:l==null?void 0:l.property_id,property_spaces_id:c,photo_id:he.id,is_approved:(be==null?void 0:be.name)==Q.thumbnail?rn.APPROVED:rn.NOT_APPROVED},"POST"),de++),(be==null?void 0:be.name)==Q.thumbnail&&(D.setTable("property_spaces"),await D.callRestAPI({id:c,default_image_id:he.id},"PUT"))}de>0&&(D.setTable("notification"),await D.callRestAPI({user_id:localStorage.getItem("user"),action_id:c,actor_id:null,notification_time:new Date().toISOString().split(".")[0],message:"New Property Space Images Added",type:za.CREATE_PROPERTY_SPACE_IMAGE,status:rr.NOT_ADDRESSED},"POST")),D.setTable("property_spaces_images");for(let fe=0;fe<E.length;fe++){const be=E[fe];D.callRestAPI({id:be},"DELETE")}t=="create"&&await q(c,Nn.IMAGES),n==="continue"?P(`/account/my-spaces/${c}/edit-scheduling?mode=edit`,{state:m}):P(`/account/my-spaces/${c}`)}catch(de){r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:de.message}})}r({type:"STOP_LOADING"})};async function J(){const Q=new AbortController,Z=[`property_spaces_id = ${c} AND ergo_property_spaces_images.deleted_at IS NULL`];try{const se=await D.callRawAPI("/v2/api/custom/ergo/property-space-images/PAGINATE",{page:1,limit:7,where:Z},"POST",Q.signal);if(Array.isArray(se.list)){T(se.list.map(ce=>ce.id));for(let ce=0;ce<se.list.length;ce++){const le=se.list[ce],ae=await X(le);o(ie=>{var de=[...ie];return de[ce]=ae,de})}}}catch(se){console.log(se),r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:se.message}})}}return h.exports.useEffect(()=>{J(),te(c)},[]),h.exports.useEffect(()=>{x.length&&N.length&&H("amenities",N.map(Q=>String(Q.amenity_id)))},[x,N]),h.exports.useEffect(()=>{k.length&&_.length&&H("addons",_.map(Q=>String(Q.add_on_id)))},[k,_]),h.exports.useEffect(()=>{C.length&&H("faqs",C)},[C]),d?s(wr,{to:"/not-found"}):s("div",{className:"min-h-screen max-w-[656px] pb-40",children:f("form",{onSubmit:F(G),children:[s("h1",{className:"mb-8 px-4 text-4xl font-bold md:px-0",children:"Edit Space Images, Faqs, Addons & Amenities"}),f("div",{className:"px-[20px] py-[32px]",children:[s("h3",{className:"text-2xl font-semibold",children:"* Photographs of the space"}),s("p",{className:"mb-8",children:"Provide additional information on the files. file type, max size, suggest resolution etc."}),s("div",{className:"mb-8 flex flex-wrap gap-x-2 gap-y-4 md:gap-5",children:i.map((Q,Z)=>{var se;return s(ti,{multiple:!1,handleChange:ce=>{o(le=>{const ae=[...le];return ae[Z]=ce,ae})},types:["JPEG","PNG","JPG"],fileOrFiles:Q,children:s("div",{className:"flex h-[120px] w-[150px] max-w-full cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed border-[#D0D5DD] text-sm md:w-[189px]",children:(se=i[Z])!=null&&se.name?s("img",{src:ne(i[Z],`preview-${Z}`),id:`preview-${Z}`,className:"h-full w-full rounded-sm object-cover"}):s("h4",{className:"break-all text-xl text-[#98A2B3]",children:"+ Add Image"})},Z)},Z)})}),s("h3",{className:"mb-4 text-xl font-bold",children:"* Select thumbnail image"}),s(fa,{items:i.filter(Q=>Q==null?void 0:Q.name),labelField:"name",valueField:"name",containerClassName:"mb-12",className:"w-full border py-2 px-3 focus:outline-primary",openClassName:"ring-primary ring-2",placeholder:"Select thumbnail",control:j,name:"thumbnail"}),f("h3",{className:"mb-4 text-xl font-bold",children:["What do you offer with the space ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("button",{type:"button",className:"mb-2 font-bold text-[#1570EF]",onClick:()=>g(!0),children:"+ Select items"}),s("div",{className:"amenities-grid mb-12",children:x.filter(Q=>Array.isArray(B)?B==null?void 0:B.includes(String(Q.id)):!1).map(Q=>f("li",{className:"flex items-center gap-4",children:[s(ur,{}),Q.name]},Q.id))}),f("h3",{className:"mb-4 text-xl font-bold",children:["Add-ons ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("button",{type:"button",className:"mb-2 font-bold text-[#1570EF]",onClick:()=>v(!0),children:"+ Select items"}),s("div",{className:"amenities-grid mb-12",children:k.filter(Q=>Array.isArray(Y)?Y==null?void 0:Y.includes(String(Q.id)):!1).map(Q=>f("li",{className:"flex items-center gap-4",children:[s(ur,{}),Q.name]},Q.id))}),f("h3",{className:"mb-2 text-xl font-bold",children:["Frequently asked question ",s("span",{className:"text-sm font-normal italic text-gray-500",children:"(optional)"})]}),s("p",{children:"These FAQs will show as part of your space listing."}),f("div",{children:[U.map((Q,Z)=>f("div",{className:"p-[20px]",children:[f("div",{className:"flex justify-between",children:[f("label",{className:"font-semibold",children:["* Question #",Z+1]}),s("button",{className:"text-sm font-semibold text-[#667085]",onClick:()=>V(Z),children:"Delete"})]}),s("input",{placeholder:"",...O(`faqs.${Z}.question`),className:'"shadow focus:shadow-outline mb-4 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none'}),s("br",{}),f("label",{className:"font-semibold",children:["* Answer #",Z+1]}),s("br",{}),s(Mo,{width:"100%",height:"107px",onChange:se=>H(`faqs.${Z}.answer`,se),placeholder:"",hideToolbar:!0,setOptions:{resizingBar:!1,fontSize:16},defaultValue:z().faqs[Z].answer})]},Q.id)),s("button",{className:"mb-12 font-bold text-[#1570EF]",type:"button",onClick:()=>W({question:"",answer:""}),children:"+ Add question"})]})]}),s("hr",{className:"my-[20px]"}),s("p",{className:"px-4 text-sm md:px-0",dangerouslySetInnerHTML:{__html:IM(b,400)}}),s("div",{className:"flex justify-end",children:s($e,{to:"/help/cancellation-policy",className:"mt-4 text-end text-sm font-semibold underline",target:"_blank",children:"View More"})}),s("hr",{className:"my-[30px]"}),s("button",{onClick:()=>a("continue"),type:"submit",className:"login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",children:"Continue"}),s("br",{}),s("button",{onClick:()=>a("submit"),type:"submit",className:"login-btn-gradient ml-4 mt-3 rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none md:ml-0",children:"Save"}),s("br",{}),s("div",{className:`${y?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>g(!1),children:f("div",{className:`${u?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:Q=>Q.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Select Amenities"}),s("button",{type:"button",onClick:()=>g(!1),children:"\u2716"})]}),s("div",{className:"review-scroll max-h-[400px] overflow-y-auto",children:x.sort((Q,Z)=>(Q.creator_id!==1?-1:1)-(Z.creator_id!==1?-1:1)).map(Q=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",...O("amenities"),id:"amenity"+Q.id,value:Q.id}),s("label",{htmlFor:"amenity"+Q.id,children:Q.name})]},Q.id))})]})}),s("div",{className:`${S?"flex":"hidden"} popup-container items-center justify-center normal-case`,onClick:()=>v(!1),children:f("div",{className:`${w?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:Q=>Q.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Select Addons"}),s("button",{type:"button",onClick:()=>v(!1),children:"\u2716"})]}),s("div",{className:"review-scroll max-h-[400px] overflow-y-auto",children:k.sort((Q,Z)=>(Q.creator_id!==1?-1:1)-(Z.creator_id!==1?-1:1)).map(Q=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",...O("addons"),id:"addon"+Q.id,value:Q.id}),s("label",{htmlFor:"addon"+Q.id,children:Q.name})]},Q.id))})]})})]})})},ac=new _e,K7e=new AbortController,X7e=()=>{var E,T,D,P,M,O,F,z,H,A,j,I,B,Y,U,W,V,X,ne,oe,q,te,G,J,K,Q,Z,se,ce,le,ae,ie,de,fe;const{dispatch:e}=h.exports.useContext(Ee);Ql();const{dispatch:t,state:n}=h.exports.useContext(we),[a]=lt(),r=a.get("mode"),{id:i}=Mt(),[o,c]=h.exports.useState({}),[l,d]=h.exports.useState(""),u=Qe({category:ge(),name:ge().required("This field is required"),address_line_1:ge().required("This field is required"),address_line_2:ge(),city:ge().required("This field is required"),zip:ge(),rate:dt().typeError("Must be a number").positive().integer(),description:ge().required("This field is required"),rule:ge(),max_capacity:dt().required("This field is required").min(1).typeError("This field is required"),additional_guest_rate:ge()}),g=je(),{register:y,handleSubmit:w,control:v,watch:S,getValues:m,setValue:p,formState:{errors:b}}=Oe({resolver:Xe(u),defaultValues:{category:"",id:"",name:"",rate:"",max_capacity:0,description:"",rule:"",zip:"",country:"",city:"",address_line_1:"",address_line_2:"",additional_guest_rate:"",size:0},mode:"all"});async function x(){const be=[`ergo_property_spaces.id = ${i}`],he=localStorage.getItem("user");try{const ve=await ac.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1,user_id:Number(he),where:be,all:!0},"POST",K7e.signal);Array.isArray(ve.list)&&ve.list.length>0&&c(ve.list[0])}catch(ve){if(me(e,ve.message),ve.name=="AbortError")return;t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:ve.message}})}}h.exports.useEffect(()=>{r=="edit"&&x()},[]),h.exports.useEffect(()=>{var be,he,ve,Ce,nt,Ae,Je,ze,We,bt,Et,wt,At,Yt;r==="edit"&&o&&Object.keys(o).length>0&&(p("category",(be=o.space_id)!=null?be:""),p("id",(he=o.id)!=null?he:""),p("name",(ve=o.name)!=null?ve:""),p("rate",(Ce=o.rate)!=null?Ce:""),p("max_capacity",(nt=o.max_capacity)!=null?nt:0),p("description",(Ae=o.description)!=null?Ae:""),p("rule",(Je=o.rule)!=null?Je:""),p("zip",(ze=o.zip)!=null?ze:""),p("country",(We=o.country)!=null?We:""),p("city",(bt=o.city)!=null?bt:""),p("address_line_1",(Et=o.address_line_1)!=null?Et:""),p("address_line_2",(wt=o.address_line_2)!=null?wt:""),p("additional_guest_rate",(At=o.additional_guest_rate)!=null?At:""),p("size",(Yt=o.size)!=null?Yt:0))},[o,r,p]);const k=async be=>{const he=W3(be==null?void 0:be.city);be.city=he[0],be.country=he[1],console.log("submitting",be);const ve=localStorage.getItem("user");t({type:"START_LOADING"});try{if(r=="edit"){ac.setTable("property"),await ac.callRestAPI({id:o.property_id,address_line_1:be.address_line_1,address_line_2:be.address_line_2,city:be.city,country:be.country,zip:be.zip,status:0,verified:0,host_id:ve,name:be.name,rule:be.rule},"PUT"),ac.setTable("property_spaces");const Ce=await ac.callRestAPI({id:i,property_id:o.property_id,space_id:be.category,max_capacity:be.max_capacity,description:be.description,rate:be.rate,space_status:wo.UNDER_REVIEW,additional_guest_rate:be.additional_guest_rate,size:C?be.size:ws.UNSET},"PUT");ac.setTable("notification"),await ac.callRestAPI({user_id:ve,actor_id:null,action_id:Ce.message,notification_time:new Date().toISOString().split(".")[0],message:"Property Space Edited",type:za.EDIT_PROPERTY_SPACE,status:rr.NOT_ADDRESSED},"POST")}g(l==="continue"?`/account/my-spaces/${m("id")}/edit-images?mode=edit`:-1)}catch(Ce){me(e,Ce.message),t({type:"SHOW_ERROR",payload:{heading:"Edit Space Failed",message:Ce.message}})}t({type:"STOP_LOADING"})},N=[{label:"All",value:ws.UNSET},{label:"Small",value:ws.SMALL},{label:"Medium",value:ws.MEDIUM},{label:"Large",value:ws.LARGE},{label:"X-Large",value:ws.X_LARGE}],_=S("category"),C=((E=n.spaceCategories.find(be=>be.id==Number(_)))==null?void 0:E.has_sizes)==1;return s("div",{className:"min-h-screen pb-40",children:f("form",{className:"text-sm md:max-w-lg",onSubmit:w(k),autoComplete:"off",children:[s("h1",{className:"mb-8 text-3xl font-bold md:text-4xl",children:"Space Details"}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:["Property name"," ",(T=b.name)!=null&&T.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(D=b.name)==null?void 0:D.message}):""]}),s("input",{autoComplete:"off",placeholder:"",...y("name"),className:`w-full rounded border px-3 py-2 leading-tight text-gray-700 ${(P=b.name)!=null&&P.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_1",children:["Address Line 1"," ",(M=b.address_line_1)!=null&&M.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(O=b.address_line_1)==null?void 0:O.message}):""]}),s(Ci,{control:v,setValue:be=>p("address_line_1",be),name:"address_line_1",className:`w-full rounded border px-3 py-2 leading-tight text-gray-700 ${(F=b.address_line_1)!=null&&F.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(cities)"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"address_line_2",children:["Address Line 2"," ",(z=b.address_line_2)!=null&&z.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(H=b.address_line_2)==null?void 0:H.message}):""]}),s(Ci,{control:v,setValue:be=>p("address_line_2",be),name:"address_line_2",className:`w-full rounded border px-3 py-2 leading-tight text-gray-700 ${(A=b.address_line_2)!=null&&A.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(cities)"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:["City"," ",(j=b.city)!=null&&j.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(I=b.city)==null?void 0:I.message}):""]}),s(Ci,{control:v,setValue:be=>p("city",be),name:"city",className:`w-full rounded border px-3 py-2 leading-tight text-gray-700 ${(B=b.city)!=null&&B.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(cities)"]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"zip",children:["Zip code"," ",(Y=b.zip)!=null&&Y.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(U=b.zip)==null?void 0:U.message}):""]}),s("input",{placeholder:"",...y("zip"),className:` focus:shadow-outline $ w-full rounded border px-3 py-2 leading-tight text-gray-700 ${(W=b.zip)!=null&&W.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"category",children:["Category"," ",(V=b.category)!=null&&V.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(X=b.category)==null?void 0:X.message}):""]}),s(fa,{items:n.spaceCategories,labelField:"category",valueField:"id",containerClassName:"",className:`w-full border px-3 py-2 ${(ne=b.category)!=null&&ne.message?"ring-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,openClassName:"ring-primary ring-2",placeholder:"Select a category",control:v,name:"category"})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rate",children:["Hourly rate"," ",(oe=b.rate)!=null&&oe.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(q=b.rate)==null?void 0:q.message}):""]}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-100 px-4 text-sm",children:"$"}),s("input",{placeholder:"",type:"number",...y("rate"),className:`remove-arrow focus:shadow-outline w-full rounded rounded-l-none border px-3 py-2 leading-tight text-gray-700 ${(te=b.rate)!=null&&te.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"description",children:["Description"," ",(G=b.description)!=null&&G.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(J=b.description)==null?void 0:J.message}):""]}),s("textarea",{placeholder:"",...y("description"),className:`w-full resize-none rounded border px-3 py-2 leading-tight text-gray-700 ${(K=b.description)!=null&&K.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),f("div",{className:"mb-8",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"rule",children:"Property rules"}),s("textarea",{placeholder:"",...y("rule"),className:`w-full resize-none rounded border px-3 py-2 leading-tight text-gray-700 ${(Q=b.rule)!=null&&Q.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),f("div",{className:"mb-6 flex items-center justify-between",children:[f("p",{className:"font-semibold",children:["* Max number of guests"," ",(Z=b.max_capacity)!=null&&Z.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(se=b.max_capacity)==null?void 0:se.message}):""]}),s(Gz,{name:"max_capacity",control:v,setValue:be=>p("max_capacity",be)})]}),C&&f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"size",children:["Size (",s("span",{className:"text-sm font-normal italic",children:"optional "}),")"," ",(ce=b.size)!=null&&ce.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(le=b.size)==null?void 0:le.message}):""]}),s(fa,{shouldUnregister:!1,items:N,labelField:"label",valueField:"value",containerClassName:"",className:`w-full border px-3 py-2 ${(ae=b.size)!=null&&ae.message?"ring-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,openClassName:"ring-primary ring-2",placeholder:"Select size",control:v,name:"size"})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"additional_guest_rate",children:["Hourly rate for additional ","guests"," (",s("span",{className:"text-sm font-normal italic",children:"optional "}),")"," ",(ie=b.additional_guest_rate)!=null&&ie.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(de=b.additional_guest_rate)==null?void 0:de.message}):""]}),f("div",{className:"flex",children:[s("span",{className:"inline-flex items-center rounded-l-md border border-r-0 border-gray-300 bg-gray-100 px-4 text-sm",children:"$"}),s("input",{placeholder:"",type:"number",...y("additional_guest_rate"),className:`remove-arrow w-full rounded rounded-l-none border px-3 py-2 leading-tight text-gray-700 ${(fe=b.additional_guest_rate)!=null&&fe.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]})]}),s("hr",{className:"my-[48px]"}),s("button",{onClick:()=>d("continue"),type:"submit",className:"login-btn-gradient rounded px-4 py-2 tracking-wide text-white outline-none focus:outline-none",children:"Continue"}),s("br",{}),s("button",{onClick:()=>d("submit"),type:"submit",className:"login-btn-gradient mt-3 rounded px-4 py-2 tracking-wide text-white outline-none focus:outline-none",children:"Submit"})]})})},eEe={from:"",to:"",selectedDate:"",num_guests:0},tEe=(e,t)=>{switch(t.type){case"SET_BOOKING_DETAILS":return localStorage.setItem("booking_details",JSON.stringify(t.payload)),localStorage.setItem("booking_id",t.payload.id),{...e,...t.payload};case"SET_BOOKING_ID":return{...e,id:t.payload};default:return e}},_F=h.exports.createContext({}),nEe=({children:e})=>{const[t,n]=h.exports.useReducer(tEe,eEe);return s(_F.Provider,{value:{bookingData:t,dispatch:n},children:e})},wS=()=>h.exports.useContext(_F),Cv=()=>s(nEe,{children:s("div",{className:"bg-white",children:s(Xu,{})})}),aEe=new _e,rEe=new AbortController,sEe=[{label:"All Prices",value:""},{label:"$0 - $30",value:"$0 - $30"},{label:"$31 - $60",value:"$31 - $60"},{label:"$60 - $90",value:"$60 - $90"},{label:"$90 - $120",value:"$90 - $120"},{label:"$120 - $150",value:"$120 - $150"},{label:"$150 - $180",value:"$150 - $180"}],Ev=()=>{const{dispatch:e,state:t}=h.exports.useContext(we),{dispatch:n}=h.exports.useContext(Ee),[a,r]=h.exports.useState(Array(4).fill({})),[i,o]=h.exports.useState(!1),[c,l]=h.exports.useState(new Date),[d,u]=lt(),{handleSubmit:g,register:y,watch:w,setValue:v,control:S,formState:m,resetField:p}=Oe({defaultValues:(()=>{var T,D,P,M,O,F;const E=Ue(d);return{location:(T=E.location)!=null?T:"",from:En((D=E.from)!=null?D:"")?new Date(E.from):new Date,to:En((P=E.to)!=null?P:"")?new Date(E.to):new Date,space_name:(M=E.space_name)!=null?M:"",category:(O=E.category)!=null?O:"",price_range:(F=E.price_range)!=null?F:"",direction:"DESC"}})()}),{dirtyFields:b}=m,x=w("direction"),k=w("from");async function N(){r(Array(4).fill({}));const E=Ue(d),T=localStorage.getItem("user");var D,P;if(E.price_range){var M=E.price_range.split("-");M.length>1&&(D=M[0].trim().slice(1),P=M[1].trim().slice(1))}let O=[`ergo_property_spaces.space_status = ${wo.APPROVED} AND ergo_property_spaces.draft_status = ${Nn.COMPLETED} AND ergo_property_spaces.availability = ${Ti.VISIBLE} AND ergo_user_property_spaces.user_id = ${T} AND ergo_property_spaces.deleted_at IS NULL`];E.category&&O.push(`ergo_spaces.category = '${E.category}'`),E.space_name&&O.push(`ergo_property.name LIKE '%${E.space_name}%'`),E.price_range&&O.push(`ergo_property_spaces.rate BETWEEN ${D} AND ${P}`),E.location&&O.push(`(ergo_property.address_line_1 LIKE '%${E.location}%' OR ergo_property.address_line_2 LIKE '%${E.location}%' OR ergo_property.city LIKE '%${E.location}%' OR ergo_property.country LIKE '%${E.location}%' OR ergo_property.zip LIKE '%${E.location}%' OR ergo_property.name LIKE '%${E.location}%')`),console.log("favorites where ",O);try{const F=await aEe.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:1,limit:1e4,user_id:Number(T),where:O,booking_start_time:En(E.from||"")?new Date(E.from).toISOString():void 0,booking_end_time:En(E.to||"")?new Date(E.to).toISOString():void 0,sortId:x=="NONE"?void 0:"id",direction:x=="NONE"?void 0:x},"POST",rEe.signal);Array.isArray(F.list)&&r(F.list)}catch(F){if(me(n,F.message),F.name=="AbortError")return;e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:F.message}})}}h.exports.useEffect(()=>{N()},[d,c]);const _=async E=>{window.innerWidth<700&&o(!1),console.log("submitting ",E),d.set("category",E.category),d.set("price_range",E.price_range),d.set("space_name",E.space_name),d.set("location",E.location),d.set("from",b!=null&&b.from?E.from.toISOString():""),d.set("to",b!=null&&b.to?E.to.toISOString():""),u(d)},C=(E,T)=>x=="DESC"?new Date(T.id)-new Date(E.id):new Date(E.id)-new Date(T.id);return f(Se,{children:[f("section",{className:"container mx-auto min-h-screen bg-white px-6 pt-[120px] normal-case 2xl:px-16",children:[s("h1",{className:"mb-[40px] text-3xl font-semibold md:text-4xl",children:"My Favorite spaces"}),s("section",{children:f("form",{onSubmit:g(_),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>o(E=>!E),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:S,name:"direction"})]}),f("div",{className:` ${i?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s(fa,{items:[{label:"All Categories",value:""},...t.spaceCategories.map(E=>({label:E.category,value:E.category}))],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All Categories",control:S,name:"category"}),s(fa,{items:sEe,labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All Prices",control:S,name:"price_range"}),s(Ci,{control:S,setValue:E=>v("location",E,{shouldDirty:!0}),name:"location",className:"rounded border py-3 px-3 leading-tight text-gray-700 focus:outline-none",containerClassName:"w-[unset] flex-grow max-w-xs",placeholder:"Location",hideIcons:!0}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>p("from",{keepDirty:!1,keepTouched:!1}),setValue:E=>v("from",E,{shouldDirty:!0}),control:S,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date})}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>p("to",{keepDirty:!1,keepTouched:!1}),setValue:E=>v("to",E,{shouldDirty:!0}),control:S,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:k})}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...y("space_name")}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),f("div",{className:"property-space-grid pb-[100px]",children:[a.sort(C).map((E,T)=>{var D;return s(Cp,{data:E,forceRender:l},(D=E.id)!=null?D:T)}),a.length<4?f(Se,{children:[s("div",{className:"hidden 2xl:block"}),s("div",{className:"hidden lg:block"}),s("div",{className:"hidden md:block"})]}):null]})]}),s(Nj,{modalOpen:i,closeModal:()=>o(!1)})]})},N_=({register:e,setValue:t,name:n,initialValue:a,maxCount:r,minCount:i})=>{const[o,c]=h.exports.useState(Number(a)||0);return h.exports.useEffect(()=>{t(n,o)},[o]),h.exports.useEffect(()=>{c(a||0)},[a]),f("div",{className:"p-2 flex gap-[10px] items-center font-semibold",children:[s("button",{type:"button",className:"border-2 rounded-md px-3 text-2xl"+(o>(i||0)?" border-black":" border-[#D0D5DD]"),onClick:()=>c(l=>l==(i||0)?l:l-1),children:"-"}),s("span",{children:o}),s("button",{type:"button",className:"border-2 text-2xl rounded-md px-3"+(o>=r?" border-[#D0D5DD]":" border-black"),onClick:()=>c(l=>l+1>Number(r)?l:l+1),children:"+"}),s("input",{type:"hidden",...e(n)})]})};new _e;const Tv=()=>{var te,G,J,K,Q,Z,se,ce,le,ae,ie,de,fe,be,he,ve,Ce,nt,Ae,Je,ze,We,bt,Et,wt,At,Yt,xn,Bn,zn,Kn,ca;const{dispatch:e,state:t}=h.exports.useContext(we),{state:n,dispatch:a}=h.exports.useContext(Ee),{state:r}=An(),{bookingData:i,dispatch:o}=wS(),[c,l]=h.exports.useState(!1),[d,u]=h.exports.useState(!1),[g,y]=h.exports.useState(!0),w=je(),{id:v}=Mt(),S=(i==null?void 0:i.from)===""?i:JSON.parse(localStorage.getItem("booking_details")),[m,p]=h.exports.useState("DESC"),[b,x]=h.exports.useState([]),[k,N]=h.exports.useState({}),[_,C]=h.exports.useState(!1),{handleSubmit:E,register:T,setValue:D}=Oe({defaultValues:S}),[P,M]=h.exports.useState(!1),{propertySpace:O,notFound:F}=Jl(v,_),z=Px(O.host_id),H=P7e(O.id,!0,y),A=ed(O.property_id),j=Oh(O.id),I=Rx(O.id),B=xS(O.id),[Y,U]=h.exports.useState(!1),{pathname:W}=An();!g&&H.length===0&&w("*");async function V(ht){try{const Ht=await _t("customer/schedule","post",{property_spaces_id:ht},"",null,"v3");Array.isArray(Ht.list)&&x(Ht.list)}catch(Ht){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ht.message}})}}async function X(ht){var Ht,Dt;try{const Lt=await _t("property_spaces_schedule_template","post",{page:1,limit:1,where:[`property_spaces_id = ${ht}`]},"PAGINATE");if(Array.isArray(Lt.list)&&Lt.list.length>0&&N({custom_slots:Lt.list[0].custom_slots}),(Ht=Lt.list[0])!=null&&Ht.schedule_template_id){const Le=await _t("schedule_template","post",{page:1,limit:1,where:[`id = ${Lt.list[0].schedule_template_id}`]},"PAGINATE");Array.isArray(Le.list)&&((Dt=Le.list[0])!=null?Dt:{})&&N(Ze=>({...Ze,...Le.list[0]}))}}catch(Lt){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Lt.message}})}}function ne(){a({type:"SWITCH_TO_CUSTOMER"}),e({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a customer",btn:"Ok got it"}})}const oe=async ht=>{if(!n.isAuthenticated){w(`/login?redirect_uri=${W}`);return}if(n.user==O.host_id){e({type:"SHOW_ERROR",payload:{heading:"error",message:"Owners can't book their own spaces"}});return}if(t.user.verificationStatus!=1){e({type:"OPEN_NOT_VERIFIED_MODAL"});return}o({type:"SET_BOOKING_DETAILS",payload:{...ht,...O}}),w("booking-preview")};h.exports.useEffect(()=>{isNaN(v)||(V(v),X(v))},[]);const q=(ht,Ht)=>m=="DESC"?new Date(Ht.post_date)-new Date(ht.post_date):new Date(ht.post_date)-new Date(Ht.post_date);return F||isNaN(v)?s(wr,{to:"/not-found"}):f("div",{className:"container mx-auto min-h-screen pt-[140px] text-sm normal-case md:text-base 2xl:px-16",onClick:()=>{M(!1)},children:[f("div",{className:"mb-[18px] flex flex-col items-start justify-between px-[17px] md:flex-row md:items-center md:px-0",children:[f("div",{className:"flex flex-col items-start gap-4 normal-case md:flex-row md:items-center",children:[s("h2",{className:"text-3xl font-semibold",children:(te=O.name)!=null?te:r==null?void 0:r.name}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:()=>U(!0),children:"(view on map)"})]}),f("div",{className:"mt-[19px] flex w-full justify-center gap-4 md:mt-0 md:w-[unset]",children:[f("p",{className:"flex flex-grow items-center justify-center gap-2 rounded-sm border bg-[#F3F9F7] px-[14px] py-[10px]",children:[s(ds,{}),f("strong",{className:"font-semibold",children:[(Number((G=O.average_space_rating)!=null?G:r==null?void 0:r.average_space_rating)||0).toFixed(1),f("span",{className:"font-normal",children:["(",(J=O.space_rating_count)!=null?J:r==null?void 0:r.space_rating_count,")"]})]})]}),f("div",{className:"flex flex-grow items-center justify-center gap-2 rounded-sm border bg-[#F3F9F7] px-[14px] py-[10px]",children:[s(ls,{space_id:O.id,user_property_spaces_id:O.user_property_spaces_id,reRender:C,withLoader:!0,className:"-mb-1",buttonClassName:"",stroke:"#344054",favColor:"black"}),s("span",{children:"Save"})]})]})]}),f("div",{className:"snap-scroll relative mb-[66px] flex h-[381px] gap-[32px] px-[14px] md:px-0",children:[((K=H[0])==null?void 0:K.photo_url)&&s("img",{src:(Q=H[0])==null?void 0:Q.photo_url,className:"h-full rounded-lg object-cover xl:min-w-[616px]"}),((Z=H[1])==null?void 0:Z.photo_url)&&s("img",{src:(se=H[1])==null?void 0:se.photo_url,className:"h-full w-[292px] rounded-lg object-cover"}),f("div",{className:`${(ce=H[3])!=null&&ce.photo_url?"block":"flex min-w-[550px] flex-col"} "gap-4 overflow-hidden md:gap-[32px]"`,children:[((le=H[2])==null?void 0:le.photo_url)&&s("img",{src:(ae=H[2])==null?void 0:ae.photo_url,className:`${((ie=H[3])==null?void 0:ie.photo_url)&&"h-1/2"} "rounded-lg object-cover md:w-full"`}),((de=H[3])==null?void 0:de.photo_url)&&s("img",{src:(fe=H[3])==null?void 0:fe.photo_url,className:"h-1/2 rounded-lg object-cover md:w-full"})]}),((be=H[4])==null?void 0:be.photo_url)&&s("img",{src:(he=H[4])==null?void 0:he.photo_url,className:"h-full w-[292px] rounded-lg object-cover"}),f("button",{className:"sticky right-6 mb-[8px] min-w-[170px] self-end border bg-[#00000080] px-3 py-1 text-center text-sm text-white",onClick:()=>l(!0),children:["View all photos (",H.length,")"]})]}),f("section",{className:"relative flex flex-col items-start xl:flex-row xl:gap-12 lg:w-[90%] w-full mx-auto",children:[f("div",{className:"w-full md:px-0 xl:w-3/5 px-10",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Description"}),s("p",{className:"",children:(ve=O.description)!=null?ve:r==null?void 0:r.description}),s("hr",{className:"my-[32px] md:my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Amenities"}),s("ul",{className:"addons-grid list-disk-important",children:j.map((ht,Ht)=>f("li",{className:"flex w-fit items-center gap-2 mb-4 sm:mb-0",children:[s(ur,{}),ht.amenity_name]},Ht))}),s("hr",{className:"my-[32px] md:my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Add ons"}),s("ul",{className:"addons-grid list-disk-important",children:A.map(ht=>f("li",{className:"flex w-fit sm:w-full items-center gap-2 mb-4 sm:mb-0",children:[f("span",{className:"w-fit",children:[" ",f("div",{className:"flex gap-4",children:[s(ur,{})," ",ht.add_on_name]})," "]})," ",f("strong",{className:"font-semibold",children:["$",ht.cost,"/h"]})]},ht.id))}),s("hr",{className:"my-[32px] md:my-[47px]"}),f("div",{className:"mb-[28px] flex flex-wrap items-center justify-between",children:[s("h3",{className:"mb-2 text-xl font-semibold md:mb-0 md:text-2xl",children:"About the host"}),n.role=="customer"&&(O==null?void 0:O.id)&&s($e,{to:`/account/messages?other_user_id=${O.host_id}&space=${O.id}`,className:"my-text-gradient hidden w-[178px] whitespace-nowrap rounded-md border border-[#33D4B7] px-6 py-2 text-center font-semibold md:inline",id:"contact-host",children:"Contact the host"})]}),f("div",{className:"flex items-center justify-between gap-4 md:justify-start md:gap-[24px]",children:[s("div",{className:"w-max-content",children:s("img",{src:(Ce=z.photo)!=null?Ce:"/default.png",className:"h-[72px] w-[72px] rounded-full object-cover"})}),f("div",{className:"space-y-3 w-[90%]",children:[s("p",{className:"hidden text-xl font-bold md:block",children:O.first_name}),s("p",{className:"hidden md:block",children:(nt=O.about)!=null?nt:r==null?void 0:r.about})]}),n.role=="customer"&&(O==null?void 0:O.id)&&s($e,{to:`/account/messages?other_user_id=${O.host_id}&space=${O.id}`,className:"my-text-gradient inline whitespace-nowrap rounded-md border border-[#33D4B7] px-4 py-1 text-center text-sm font-semibold md:hidden",id:"contact-host",children:"Contact the host"})]}),s("p",{className:"mt-4 block md:hidden",children:(Ae=O.about)!=null?Ae:r==null?void 0:r.about}),s("hr",{className:"my-[32px] md:my-[47px]"}),f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Reviews"}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:p,accessor:"label",valueAccessor:"value",className:"min-w-[200px]",listOptionClassName:"pl-4"})]}),f("section",{children:[B.length==0&&s("p",{children:"No reviews yet"}),B.sort(q).slice(0,10).map(ht=>s(yS,{data:ht},ht.id)),s("div",{className:"text-center",children:B.length>10?f("button",{className:"font-semibold underline",onClick:()=>u(!0),children:["View more (",B.length,")"]}):null})]}),s("hr",{className:"my-[32px] md:my-[47px]"}),s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"FAQs"}),I.map(ht=>s(Ax,{data:ht},ht.id)),s("hr",{className:"my-[32px] md:my-[47px]"}),s("h3",{className:"mb-4 text-2xl font-semibold",children:"Property rules"}),s("p",{className:"mb-32",children:(Je=O.rule)!=null?Je:r==null?void 0:r.rule})]}),s("div",{className:"sticky bottom-0 hidden w-full flex-grow bg-white xl:top-16 xl:bottom-[unset] xl:block xl:w-[unset] ml-24",children:f("div",{className:"sticky-price-summary mx-auto max-w-2xl p-6 md:border-2",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:(ze=O.max_capacity)!=null?ze:r==null?void 0:r.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",(We=O.rate)!=null?We:r==null?void 0:r.rate]}),"/h"]})]}),f("form",{className:"flex flex-col",onSubmit:E(oe),children:[f("div",{className:"mb-[13px] flex items-center justify-between",children:[s("span",{className:"text-lg",children:"Number of guests"}),s(N_,{register:T,name:"num_guests",setValue:D,initialValue:S.num_guests||1,maxCount:(bt=O.max_capacity)!=null?bt:r==null?void 0:r.max_capacity,minCount:1})]}),s("hr",{className:"mb-[24px] hidden md:block"}),s("div",{className:"z-50 mb-3",children:s(jc,{register:T,setValue:D,fieldNames:["selectedDate","from","to"],showCalendar:P,setShowCalendar:M,fromDefault:S.from,toDefault:S.to,bookedSlots:b.map(ht=>({fromTime:new Date(ht.start_time),toTime:new Date(ht.end_time)})),scheduleTemplate:k,defaultDate:S.selectedDate||void 0})}),n.role!="customer"&&n.isAuthenticated?s("button",{type:"button",onClick:ne,className:"login-btn-gradient gap-2 rounded-sm py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",children:"Join as customer to book"}):s("button",{type:"submit",id:"proceed-to-preview",className:"login-btn-gradient gap-2 rounded-sm py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:(()=>{const ht=document.getElementById("booking-time");return!(ht&&!ht.innerText.includes("Select"))})(),children:window.innerWidth>500?"Continue":"Continue to checkout"})]})]})}),f("div",{className:"mx-auto -mt-16 block w-full max-w-xl p-6 xl:hidden",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:(Et=O.max_capacity)!=null?Et:r==null?void 0:r.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",(wt=O.rate)!=null?wt:r==null?void 0:r.rate]}),"/h"]})]}),f("form",{className:"flex flex-col",onSubmit:E(oe),children:[f("div",{className:"mb-[13px] flex items-center justify-between",children:[s("span",{className:"text-lg",children:"Number of guests"}),s(N_,{register:T,name:"num_guests",setValue:D,initialValue:S.num_guests||1,maxCount:(At=O.max_capacity)!=null?At:r==null?void 0:r.max_capacity,minCount:1})]}),s("hr",{className:"mb-[24px] hidden md:block"}),s("div",{className:"z-50 mb-3",children:s(jc,{register:T,setValue:D,fieldNames:["selectedDate","from","to"],showCalendar:P,setShowCalendar:M,fromDefault:S.from,toDefault:S.to,bookedSlots:b.map(ht=>({fromTime:new Date(ht.start_time),toTime:new Date(ht.end_time)})),scheduleTemplate:k})}),n.role!="customer"&&n.isAuthenticated?s("button",{type:"button",onClick:ne,className:"login-btn-gradient gap-2 rounded-sm py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",children:"Join as customer to book"}):f("button",{type:"submit",id:"proceed-to-preview",className:"login-btn-gradient gap-2 rounded-sm py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:(()=>{const ht=document.querySelectorAll("#booking-time");return Array.from(ht).every(Ht=>Ht.innerText.includes("Select"))})(),children:[window.innerWidth>500&&"Continue",window.innerWidth<500&&"Continue to checkout"]})]})]})]}),s(fF,{spaceImages:H,modalOpen:c,closeModal:()=>l(!1)}),s(wF,{modalOpen:d,closeModal:()=>u(!1),reviews:B,onDirectionChange:p}),s(bc,{anchorId:"proceed-to-preview",place:"bottom",content:"Proceed to book",noArrow:!0}),s(bc,{anchorId:"contact-host",place:"bottom",content:"Chat with Host",noArrow:!0}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${(Yt=O.address_line_1)!=null?Yt:""},${(xn=O.address_line_2)!=null?xn:""},${(Bn=O.city)!=null?Bn:""},${(zn=O.country)!=null?zn:""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${(Kn=O.address_line_1)!=null?Kn:""},${(ca=O.address_line_2)!=null?ca:""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:Y,closeModal:()=>U(!1)})]})};function eT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,a)}return n}function tT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eT(Object(n),!0).forEach(function(a){NF(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eT(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function jg(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?jg=function(t){return typeof t}:jg=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jg(e)}function NF(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zg(e,t){return iEe(e)||oEe(e,t)||lEe(e,t)||cEe()}function iEe(e){if(Array.isArray(e))return e}function oEe(e,t){var n=e&&(typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"]);if(n!=null){var a=[],r=!0,i=!1,o,c;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!(t&&a.length===t));r=!0);}catch(l){i=!0,c=l}finally{try{!r&&n.return!=null&&n.return()}finally{if(i)throw c}}return a}}function lEe(e,t){if(!!e){if(typeof e=="string")return nT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nT(e,t)}}function nT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function cEe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var S_=function(t){var n=R.useRef(t);return R.useEffect(function(){n.current=t},[t]),n.current},qu=function(t){return t!==null&&jg(t)==="object"},dEe=function(t){return qu(t)&&typeof t.then=="function"},uEe=function(t){return qu(t)&&typeof t.elements=="function"&&typeof t.createToken=="function"&&typeof t.createPaymentMethod=="function"&&typeof t.confirmCardPayment=="function"},aT="[object Object]",fEe=function e(t,n){if(!qu(t)||!qu(n))return t===n;var a=Array.isArray(t),r=Array.isArray(n);if(a!==r)return!1;var i=Object.prototype.toString.call(t)===aT,o=Object.prototype.toString.call(n)===aT;if(i!==o)return!1;if(!i&&!a)return t===n;var c=Object.keys(t),l=Object.keys(n);if(c.length!==l.length)return!1;for(var d={},u=0;u<c.length;u+=1)d[c[u]]=!0;for(var g=0;g<l.length;g+=1)d[l[g]]=!0;var y=Object.keys(d);if(y.length!==c.length)return!1;var w=t,v=n,S=function(p){return e(w[p],v[p])};return y.every(S)},SF=function(t,n,a){return qu(t)?Object.keys(t).reduce(function(r,i){var o=!qu(n)||!fEe(t[i],n[i]);return a.includes(i)?(o&&console.warn("Unsupported prop change: options.".concat(i," is not a mutable property.")),r):o?tT(tT({},r||{}),{},NF({},i,t[i])):r},null):null},mEe="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",rT=function(t){if(t===null||uEe(t))return t;throw new Error(mEe)},pEe=function(t){if(dEe(t))return{tag:"async",stripePromise:Promise.resolve(t).then(rT)};var n=rT(t);return n===null?{tag:"empty"}:{tag:"sync",stripe:n}},vS=R.createContext(null);vS.displayName="ElementsContext";var hEe=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},_S=R.createContext(null);_S.displayName="CartElementContext";var gEe=function(t,n){if(!t)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return t},kF=function(t){var n=t.stripe,a=t.options,r=t.children,i=R.useMemo(function(){return pEe(n)},[n]),o=R.useState(null),c=zg(o,2),l=c[0],d=c[1],u=R.useState(null),g=zg(u,2),y=g[0],w=g[1],v=R.useState(function(){return{stripe:i.tag==="sync"?i.stripe:null,elements:i.tag==="sync"?i.stripe.elements(a):null}}),S=zg(v,2),m=S[0],p=S[1];R.useEffect(function(){var k=!0,N=function(C){p(function(E){return E.stripe?E:{stripe:C,elements:C.elements(a)}})};return i.tag==="async"&&!m.stripe?i.stripePromise.then(function(_){_&&k&&N(_)}):i.tag==="sync"&&!m.stripe&&N(i.stripe),function(){k=!1}},[i,m,a]);var b=S_(n);R.useEffect(function(){b!==null&&b!==n&&console.warn("Unsupported prop change on Elements: You cannot change the `stripe` prop after setting it.")},[b,n]);var x=S_(a);return R.useEffect(function(){if(!!m.elements){var k=SF(a,x,["clientSecret","fonts"]);k&&m.elements.update(k)}},[a,x,m.elements]),R.useEffect(function(){var k=m.stripe;!k||!k._registerWrapper||!k.registerAppInfo||(k._registerWrapper({name:"react-stripe-js",version:"1.16.5"}),k.registerAppInfo({name:"react-stripe-js",version:"1.16.5",url:"https://stripe.com/docs/stripe-js/react"}))},[m.stripe]),R.createElement(vS.Provider,{value:m},R.createElement(_S.Provider,{value:{cart:l,setCart:d,cartState:y,setCartState:w}},r))};kF.propTypes={stripe:Ie.any,options:Ie.object};var jb=function(t){var n=R.useContext(vS);return hEe(n,t)},sT=function(t){var n=R.useContext(_S);return gEe(n,t)},bEe=function(){var t=jb("calls useElements()"),n=t.elements;return n},CF=function(){var t=jb("calls useStripe()"),n=t.stripe;return n};Ie.func.isRequired;var hr=function(t,n,a){var r=!!a,i=R.useRef(a);R.useEffect(function(){i.current=a},[a]),R.useEffect(function(){if(!r||!t)return function(){};var o=function(){i.current&&i.current.apply(i,arguments)};return t.on(n,o),function(){t.off(n,o)}},[r,n,t,i])},yEe=function(t){return t.charAt(0).toUpperCase()+t.slice(1)},ka=function(t,n){var a="".concat(yEe(t),"Element"),r=function(l){var d=l.id,u=l.className,g=l.options,y=g===void 0?{}:g,w=l.onBlur,v=l.onFocus,S=l.onReady,m=l.onChange,p=l.onEscape,b=l.onClick,x=l.onLoadError,k=l.onLoaderStart,N=l.onNetworksChange,_=l.onCheckout,C=l.onLineItemClick,E=l.onConfirm,T=l.onCancel,D=l.onShippingAddressChange,P=l.onShippingRateChange,M=jb("mounts <".concat(a,">")),O=M.elements,F=R.useState(null),z=zg(F,2),H=z[0],A=z[1],j=R.useRef(null),I=R.useRef(null),B=sT("mounts <".concat(a,">")),Y=B.setCart,U=B.setCartState;hr(H,"blur",w),hr(H,"focus",v),hr(H,"escape",p),hr(H,"click",b),hr(H,"loaderror",x),hr(H,"loaderstart",k),hr(H,"networkschange",N),hr(H,"lineitemclick",C),hr(H,"confirm",E),hr(H,"cancel",T),hr(H,"shippingaddresschange",D),hr(H,"shippingratechange",P);var W;t==="cart"?W=function(q){U(q),S&&S(q)}:S&&(t==="payButton"?W=S:W=function(){S(H)}),hr(H,"ready",W);var V=t==="cart"?function(oe){U(oe),m&&m(oe)}:m;hr(H,"change",V);var X=t==="cart"?function(oe){U(oe),_&&_(oe)}:_;hr(H,"checkout",X),R.useLayoutEffect(function(){if(j.current===null&&O&&I.current!==null){var oe=O.create(t,y);t==="cart"&&Y&&Y(oe),j.current=oe,A(oe),oe.mount(I.current)}},[O,y,Y]);var ne=S_(y);return R.useEffect(function(){if(!!j.current){var oe=SF(y,ne,["paymentRequest"]);oe&&j.current.update(oe)}},[y,ne]),R.useLayoutEffect(function(){return function(){j.current&&(j.current.destroy(),j.current=null)}},[]),R.createElement("div",{id:d,className:u,ref:I})},i=function(l){jb("mounts <".concat(a,">")),sT("mounts <".concat(a,">"));var d=l.id,u=l.className;return R.createElement("div",{id:d,className:u})},o=n?i:r;return o.propTypes={id:Ie.string,className:Ie.string,onChange:Ie.func,onBlur:Ie.func,onFocus:Ie.func,onReady:Ie.func,onEscape:Ie.func,onClick:Ie.func,onLoadError:Ie.func,onLoaderStart:Ie.func,onNetworksChange:Ie.func,onCheckout:Ie.func,onLineItemClick:Ie.func,onConfirm:Ie.func,onCancel:Ie.func,onShippingAddressChange:Ie.func,onShippingRateChange:Ie.func,options:Ie.object},o.displayName=a,o.__elementType=t,o},Ca=typeof window=="undefined";ka("auBankAccount",Ca);ka("card",Ca);var xEe=ka("cardNumber",Ca),wEe=ka("cardExpiry",Ca),vEe=ka("cardCvc",Ca);ka("fpxBank",Ca);ka("iban",Ca);ka("idealBank",Ca);ka("p24Bank",Ca);ka("epsBank",Ca);ka("payment",Ca);ka("payButton",Ca);ka("paymentRequestButton",Ca);ka("linkAuthentication",Ca);ka("address",Ca);ka("shippingAddress",Ca);ka("cart",Ca);ka("paymentMethodMessaging",Ca);ka("affirmMessage",Ca);ka("afterpayClearpayMessage",Ca);const Pl=()=>s("svg",{width:"26",height:"24",viewBox:"0 0 26 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M24.4833 13.75L22.1506 11.4167L19.8166 13.75M22.5 12C22.5 17.799 17.799 22.5 12 22.5C6.20101 22.5 1.5 17.799 1.5 12C1.5 6.20101 6.20101 1.5 12 1.5C15.8522 1.5 19.2199 3.57449 21.0469 6.66727M12 6.16667V12L15.5 14.3333",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function _Ee({modalOpen:e,closeModal:t,spaceId:n}){const[a,r]=h.exports.useState("");async function i(){const o=new _e;o.setTable("booking");try{const c=await o.callRestAPI({page:1,limit:1,payload:{property_space_id:n,customer_id:+localStorage.getItem("user"),status:ut.PENDING},sortId:"id",direction:"DESC"},"PAGINATE");Array.isArray(c.list)&&c.list.length>0&&r(c.list[0].id)}catch(c){console.log("err",c)}}return h.exports.useEffect(()=>{i()},[n]),s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-2xl font-medium leading-6 text-gray-900",children:"This is a duplicate request"}),s("div",{className:"my-4",children:s("p",{className:"text-lg text-gray-500",children:"Once your host approves this booking, you will be able to enjoy your reservation! "})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"OK got it"}),s($e,{to:"/account/my-bookings/"+a,className:"login-btn-gradient inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium text-white",children:"View Status"})]})]})})})})]})})}var EF="https://js.stripe.com/v3",NEe=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,iT="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",SEe=function(){for(var t=document.querySelectorAll('script[src^="'.concat(EF,'"]')),n=0;n<t.length;n++){var a=t[n];if(!!NEe.test(a.src))return a}return null},kEe=function(t){var n=t&&!t.advancedFraudSignals?"?advancedFraudSignals=false":"",a=document.createElement("script");a.src="".concat(EF).concat(n);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(a),a},CEe=function(t,n){!t||!t._registerWrapper||t._registerWrapper({name:"stripe-js",version:"1.54.2",startTime:n})},ag=null,EEe=function(t){return ag!==null||(ag=new Promise(function(n,a){if(typeof window=="undefined"||typeof document=="undefined"){n(null);return}if(window.Stripe&&t&&console.warn(iT),window.Stripe){n(window.Stripe);return}try{var r=SEe();r&&t?console.warn(iT):r||(r=kEe(t)),r.addEventListener("load",function(){window.Stripe?n(window.Stripe):a(new Error("Stripe.js not available"))}),r.addEventListener("error",function(){a(new Error("Failed to load Stripe.js"))})}catch(i){a(i);return}})),ag},TEe=function(t,n,a){if(t===null)return null;var r=t.apply(void 0,n);return CEe(r,a),r},TF=Promise.resolve().then(function(){return EEe(null)}),LF=!1;TF.catch(function(e){LF||console.warn(e)});var NS=function(){for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];LF=!0;var r=Date.now();return TF.then(function(i){return TEe(i,n,r)})};const oT="pk_test_51Ll5ukBgOlWo0lDUrBhA2W7EX2MwUH9AR5Y3KQoujf7PTQagZAJylWP1UOFbtH4UwxoufZbInwehQppWAq53kmNC00UIKSmebO",LEe={MasterCard:"/mastercard.jpg",Visa:"/visa.jpg","American Express":"/american-express.png",Discover:"/discover.png"};function DEe({setPaying:e,setConfirmPayment:t,setloadingBtn:n,selectedAddons:a,bookingData:r,modalOpen:i,closeModal:o,onSuccess:c,cards:l,booking_id:d}){const{dispatch:u,state:g}=h.exports.useContext(Ee),{dispatch:y,state:w}=h.exports.useContext(we),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState({}),[b,x]=h.exports.useState(!1),[k,N]=h.exports.useState(!0),[_,C]=h.exports.useState(null),E=An(),{id:T}=Mt(),D=localStorage.getItem("user"),P=je(),M=new _e;async function O(){var F,z,H,A,j,I,B;localStorage.setItem("card",JSON.stringify(m));try{const Y=Te(r.selectedDate).format("MM/DD/YY");let U=[];if(!b)pe(y,"Please select a card to proceed",5e3,"ERROR"),S(!1);else{S(!0),localStorage.setItem("paying",!0);for(const[ne,oe]of Object.entries(a)){const q=(F=document.querySelector(`input[name='${ne}']`))==null?void 0:F.getAttribute("id").replace("cb","");typeof oe=="string"&&U.push(Number(q))}localStorage.setItem("addons",JSON.stringify(U));const W=await M.callRawAPI("/v2/api/custom/ergo/pay-hold",{payment_method:m==null?void 0:m.id,stripe_uid:m==null?void 0:m.customer.id,booking_start_time:new Date(Y+" "+r.from).toISOString().slice(0,19).replace("T"," "),booking_end_time:new Date(Y+" "+r.to).toISOString().slice(0,19).replace("T"," "),customer_id:Number(D),host_id:r.host_id,property_space_id:Number(T),num_guests:r.num_guests,booking_addons:U},"POST"),V={headers:{Authorization:`Bearer ${oT}`,"Content-Type":"application/x-www-form-urlencoded"}},X=new URLSearchParams;X.append("payment_method",m==null?void 0:m.id),X.append("client_secret",(z=W==null?void 0:W.payment_intent)==null?void 0:z.client_secret),X.append("return_url",`https://ergo.mkdlabs.com/property/${T}/booking-preview`),W.message==="Action required!"&&await Ac.post(`https://api.stripe.com/v1/payment_intents/${(H=W==null?void 0:W.payment_intent)==null?void 0:H.id}/confirm`,X,V).then(async ne=>{var oe,q,te,G,J,K,Q,Z,se;ne.error?(y({type:"SHOW_ERROR",payload:{message:(oe=ne.error)!=null&&oe.message?(q=ne.error)==null?void 0:q.message:(G=(te=ne==null?void 0:ne.trace)==null?void 0:te.raw)==null?void 0:G.message}}),S(!1)):((J=ne==null?void 0:ne.data)==null?void 0:J.next_action)!==null?window.location.replace((Z=(Q=(K=ne==null?void 0:ne.data)==null?void 0:K.next_action)==null?void 0:Q.redirect_to_url)==null?void 0:Z.url):(await M.callRawAPI("/v2/api/custom/ergo/pay-hold",{payment_method:m==null?void 0:m.id,stripe_uid:m==null?void 0:m.customer.id,booking_start_time:new Date(Y+" "+r.from).toISOString().slice(0,19).replace("T"," "),booking_end_time:new Date(Y+" "+r.to).toISOString().slice(0,19).replace("T"," "),customer_id:Number(D),host_id:r.host_id,property_space_id:Number(T),num_guests:r.num_guests,booking_addons:U,payment_intent:(se=W==null?void 0:W.payment_intent)==null?void 0:se.id},"POST")).error||(o(),y({type:"SHOW_CONFIRMATION",payload:{heading:"Payment, awaiting Host Approval",message:"Booking successful",btn:"OK",onClose:()=>P("/account/my-bookings")}}),S(!1),n(!1))})}}catch(Y){S(!1),me(u,Y.message),pe(y,(A=Y==null?void 0:Y.response)!=null&&A.data?(B=(I=(j=Y==null?void 0:Y.response)==null?void 0:j.data)==null?void 0:I.error)==null?void 0:B.message:Y==null?void 0:Y.message,"5000","ERROR"),S(!1),localStorage.removeItem("paying")}}return h.exports.useEffect(()=>{const F=z=>z.slice(1).split("&").reduce((H,A)=>{const[j,I]=A.split("=");return H[j]=decodeURIComponent(I),H},{});if(E.search){const z=F(E.search);if(z.payment_intent){n(!0);const H={headers:{Authorization:`Bearer ${oT}`,"Content-Type":"application/x-www-form-urlencoded"}};new URLSearchParams().append("client_secret",z==null?void 0:z.payment_intent_client_secret),Ac.get(`https://api.stripe.com/v1/payment_intents/${z==null?void 0:z.payment_intent}?client_secret=${z==null?void 0:z.payment_intent_client_secret}`,H).then(async I=>{if(I.status!==200)pe(y,"Payment Unsuccessful","5000","ERROR"),S(!1);else{const B=Te(r.selectedDate).format("MM/DD/YY"),Y=JSON.parse(localStorage.getItem("card")),U=JSON.parse(localStorage.getItem("addons"));if(I.data.status==="requires_capture"){const W=await M.callRawAPI("/v2/api/custom/ergo/pay-hold",{payment_method:Y==null?void 0:Y.id,stripe_uid:Y==null?void 0:Y.customer.id,booking_start_time:new Date(B+" "+r.from).toISOString().slice(0,19).replace("T"," "),booking_end_time:new Date(B+" "+r.to).toISOString().slice(0,19).replace("T"," "),customer_id:Number(D),host_id:r.host_id,property_space_id:Number(T),num_guests:r.num_guests,booking_addons:U,payment_intent:z==null?void 0:z.payment_intent},"POST");console.log(W),W.error||(o(),y({type:"SHOW_CONFIRMATION",payload:{heading:"Payment, awaiting Host Approval",message:"Booking successful",btn:"OK",onClose:()=>P("/account/my-bookings")}}),S(!1),n(!1))}}}),C(z),N(!1)}}else N(!1)},[E.search]),s(ke,{appear:!0,show:i,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:o,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-lg transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-xl font-medium leading-6 text-gray-900",children:"Select Card"}),s("div",{className:"mt-4"}),l.map(F=>s("div",{className:`mb-[16px] flex cursor-pointer rounded-md border px-[16px] ${m.id===F.id?"border-transparent ring-2 ring-primary-dark ring-offset-2":""}`,onClick:()=>{p(F),x(!0)},children:f("div",{className:"flex flex-grow items-center justify-between px-[18px] py-[16px]",children:[s("div",{className:"h-[36px] w-[51px]",children:s("img",{src:LEe[F.brand],className:"h-full w-full object-cover"})}),f("div",{className:"flex h-full flex-col justify-between text-sm",children:[s("p",{className:"font-semibold",children:"Credit card"}),f("small",{className:"text-xs",children:["Expires: ",F.exp_month,"/",F.exp_year]})]}),s("li",{className:"font-semibold",children:F.last4})]})},F.id)),f("div",{className:"mt-6 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex w-1/2 justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>{o(),S(!1)},children:"Cancel"}),s(Ft,{loading:v,onClick:O,className:`inline-flex w-1/2 justify-center rounded-md ${v?"py-1 px-6":"py-2 px-4"} login-btn-gradient text-sm font-medium text-white`,children:"Pay"})]})]})})})})]})})}new _e;new AbortController;const Lv=()=>{var I,B,Y;localStorage.removeItem("paying");const{bookingData:e,dispatch:t}=wS();h.exports.useContext(Ee);const{id:n}=Mt(),a=je(),[r,i]=h.exports.useState(!1),o=(e==null?void 0:e.from)!==""?e:JSON.parse(localStorage.getItem("booking_details")),{register:c,watch:l}=Oe(),d=l(),{dispatch:u,state:g}=h.exports.useContext(we),[y,w]=h.exports.useState(!1),{cards:v}=Ox({loader:!1}),[S,m]=h.exports.useState(!1),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!!localStorage.getItem("paying"));h.exports.useState();const[N,_]=h.exports.useState(!1),[C,E]=h.exports.useState(void 0);if(NS("pk_test_51Ll5ukBgOlWo0lDUrBhA2W7EX2MwUH9AR5Y3KQoujf7PTQagZAJylWP1UOFbtH4UwxoufZbInwehQppWAq53kmNC00UIKSmebO"),n!=o.id)return s(wr,{to:`/property/${n}`});const T=CF(),[D,P]=h.exports.useState(null);h.exports.useEffect(()=>{(async()=>{if(T){const U=T.paymentRequest({country:"US",currency:"usd",total:{label:"Booking total",amount:Number(A+H+j)},requestPayerName:!0,requestPayerEmail:!0});U.canMakePayment().then(W=>{W&&(console.log("result",W),P(U))})}})()},[T]),D&&D.on("paymentmethod",async U=>{const{paymentIntent:W,error:V}=await T.confirmCardPayment(C,{payment_method:U.paymentMethod.id},{handleActions:!1});if(V)U.complete("fail");else if(U.complete("success"),W.status==="requires_action"){const{error:X}=await T.confirmCardPayment(C);X?u({type:"SHOW_ERROR",payload:{heading:"Payment failed",message:X.message}}):(await fetchBooking(n),u({type:"SHOW_CONFIRMATION",payload:{heading:"Payment success",message:"Your payment was successful",btn:"Ok got it"}}))}else await fetchBooking(n),u({type:"SHOW_CONFIRMATION",payload:{heading:"Payment success",message:"Your payment was successful",btn:"Ok got it"}})});const M=()=>{v.length>0?k(!0):pe(u,"Please add cards in your billing page",5e3,"ERROR")},{tax:O,commission:F}=xF(),z=ed(o.property_id),H=o.rate*eo(o.from,o.to),A=o.additional_guest_rate*eo(o.from,o.to)*(o.num_guests-1),j=Number(Object.entries(d).map(([U,W])=>W).reduce((U,W)=>{var V;return Number(U)+((V=Number(W))!=null?V:0)},0));return f("div",{className:"container mx-auto min-h-screen bg-white px-6 pt-[100px] pb-12 normal-case md:pt-[90px] 2xl:px-16",children:[f("button",{className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center font-semibold",onClick:()=>a(-1),children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]}),f("div",{className:"flex flex-col items-start justify-between md:flex-row",children:[f("div",{className:"w-full md:w-[43%]",children:[s("h2",{className:"mb-[20px] text-3xl font-semibold",children:"Review and payment"}),f("div",{className:"mb-[40px] flex flex-col gap-[24px] md:flex-row",children:[s("div",{className:"h-[150px] rounded-lg bg-cover bg-center pr-2 md:w-[204px]",style:{backgroundImage:`url(${(I=o.url)!=null?I:"/default-property.jpg"})`},children:s(ls,{space_id:o.id,user_property_spaces_id:o.user_property_spaces_id,reRender:null})}),s("div",{className:"",children:s("h3",{className:"mb-[6px] text-[18px] font-semibold",children:o.name})})]}),f("div",{className:"mb-[12px] flex justify-between",children:[f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("h4",{className:"text-lg font-semibold",children:"Date & time"})]}),s("button",{className:"text-sm font-semibold text-[#475467] underline",onClick:()=>a(-1),children:"Change"})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Date"}),f("p",{className:"font-semibold text-[#344054]",children:[" ",gh(o.selectedDate)]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Time"}),f("p",{className:"font-semibold text-[#344054]",children:[o.from," - ",o.to]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Duration"}),s("p",{className:"font-semibold text-[#344054]",children:eo(o.from,o.to)+" hours"})]}),f("div",{className:"mt-[40px] mb-[16px] flex gap-[10px]",children:[s(C1,{}),s("h4",{className:"text-lg font-semibold",children:"Add Ons"})]}),z.map(U=>s(wve,{data:U,register:c},U.id))]}),f("div",{className:"w-full md:w-[40%]",children:[f("div",{className:"flex flex-col rounded-md border border-[#33D4B7] p-[20px] md:border-2 md:p-[32px]",children:[s("h4",{className:"text-lg mb-4 font-semibold md:text-2xl",children:"Booking summary"}),s("hr",{className:"mb-8"}),f("div",{className:"tiny-scroll mb-4 max-h-[200px] overflow-y-auto pb-4 pr-4 md:max-h-[250px]",children:[f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Rate"}),f("p",{className:"font-semibold text-[#344054]",children:["$",o.rate.toFixed(2),"/h"]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Price"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",H.toFixed(2)]})]}),o.additional_guest_rate&&o.num_guests-1?f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Extra guests"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",A.toFixed(2)]})]}):null,Object.entries(d).map(([U,W],V)=>W?f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:U}),f("p",{className:"font-semibold text-[#344054]",children:[" $",Number(W).toFixed(2)]})]},V):null),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Tax"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",((A+H)*((B=o==null?void 0:o.tax)!=null?B:O)/100).toFixed(2)]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Total"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(A+H+j+(A+H)*((Y=o==null?void 0:o.tax)!=null?Y:O)/100).toFixed(2)]})]})]}),s(Ft,{loading:y,className:`login-btn-gradient mb-[12px] gap-2 rounded-md border border-[#33D4B7] px-2 text-center tracking-wide text-white outline-none focus:outline-none disabled:border-0 ${y?"loading py-2":"py-3"}`,onClick:()=>M(),disabled:O==null||F==null,children:"Make Payment"}),!C&&r&&s("p",{children:"Loading..."}),s("p",{className:"text-center text-sm",children:"(funds will be put on hold, pending when host accepts/rejects your booking)"})]}),s($e,{to:"/help/cancellation-policy",target:"_blank",className:"mt-[12px] block w-full text-center text-sm text-[#667085] underline",children:"Cancellation Policy"})]})]}),s(DEe,{modalOpen:x,setConfirmPayment:_,closeModal:()=>k(!1),cards:v,bookingData:o,selectedAddons:d,paying:p,setloadingBtn:w,setPaying:b}),s(_Ee,{modalOpen:S,closeModal:()=>m(!1),spaceId:n})]})},DF=()=>f("svg",{width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M7.99992 2.08363V17.917M14.6666 10.0003C14.6666 14.0907 10.205 17.0656 8.58158 18.0127C8.39708 18.1203 8.30484 18.1741 8.17465 18.2021C8.07362 18.2237 7.92622 18.2237 7.82519 18.2021C7.695 18.1741 7.60275 18.1203 7.41826 18.0127C5.79489 17.0656 1.33325 14.0907 1.33325 10.0003V6.01497C1.33325 5.34871 1.33325 5.01558 1.44222 4.72922C1.53848 4.47625 1.6949 4.25053 1.89797 4.07157C2.12783 3.869 2.43975 3.75203 3.06359 3.51809L7.53175 1.84253C7.705 1.77756 7.79162 1.74508 7.88074 1.7322C7.95978 1.72078 8.04006 1.72078 8.1191 1.7322C8.20821 1.74508 8.29484 1.77756 8.46808 1.84253L12.9362 3.51809C13.5601 3.75203 13.872 3.869 14.1019 4.07157C14.3049 4.25053 14.4614 4.47625 14.5576 4.72922C14.6666 5.01558 14.6666 5.34871 14.6666 6.01497V10.0003Z",stroke:"url(#paint0_linear_4734_2207)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s("defs",{children:f("linearGradient",{id:"paint0_linear_4734_2207",x1:"16.2133",y1:"7.3978",x2:"6.03765",y2:"14.1333",gradientUnits:"userSpaceOnUse",children:[s("stop",{stopColor:"#33D4B7"}),s("stop",{offset:"1",stopColor:"#0D9895"})]})})]});let fm=new _e;function MEe(){var D,P;const[e]=lt(),t=je(),n=Qe({expiry_date:ge().test("is-not-in-past","Not a valid date",M=>{if(M=="")return!1;const O=new Date(M);return O.setDate(O.getDate()-1)>new Date})}),{handleSubmit:a,register:r,watch:i,formState:{errors:o}}=Oe({defaultValues:{selectedType:"Driver's License"},resolver:Xe(n)}),[c,l]=h.exports.useState(null),[d,u]=h.exports.useState(null),[g,y]=h.exports.useState(null),[w,v]=h.exports.useState(!1),{dispatch:S,state:m}=h.exports.useContext(we),{dispatch:p}=h.exports.useContext(Ee),[b,x]=h.exports.useState(!1),k=cr(b,300),N=i("selectedType"),_=()=>!(N=="Driver's License"&&c&&d||N=="Passport"&&g),C=async M=>{const O=new FormData;O.append("file",M);try{return(await fm.uploadImage(O)).url}catch(F){return console.log("err",F),""}},E=async M=>{var O;try{v(!0),N=="Driver's License"?(M.frontImage=await C(c),M.backImage=await C(d)):M.frontImage=await C(g),fm.setTable("id_verification");const F=await fm.callRestAPI({id:m.user.verificationId,type:N,expiry_date:M.expiry_date,status:0,image_front:M.frontImage,image_back:(O=M.backImage)!=null?O:null,user_id:Number(localStorage.getItem("user"))},m.user.verificationId?"PUT":"POST");fm.setTable("notification"),await fm.callRestAPI({user_id:Number(localStorage.getItem("user")),actor_id:null,action_id:F.message,notification_time:new Date().toISOString().split(".")[0],message:"New ID Verification submitted",type:za.NEW_ID_VERIFICATION,status:rr.NOT_ADDRESSED},"POST"),x(!0)}catch(F){me(p,F.message),S({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:F.message}})}v(!1)},T=(M,O)=>{const F=new FileReader;F.onload=z=>{document.getElementById(O).src=z.target.result},F.readAsDataURL(M)};return f("div",{className:"pb-16 normal-case",children:[s("div",{children:f("button",{type:"button",onClick:()=>t(-1),className:"mb-2 mr-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),s("h1",{className:"mb-4 text-2xl font-semibold md:text-5xl",children:"Identity Verification"}),f("div",{className:"mb-[32px] max-w-3xl rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[24px] py-[16px]",children:[f("h3",{className:"text-lg flex items-center gap-2 font-semibold",children:[s(DF,{}),s("span",{children:"Safety is our priority"})]}),s("p",{className:"ml-5 max-w-xl text-sm leading-relaxed",children:"To establish trust for all parties we verify both hosts and guests. Your personal information is secure. We will never share your information with third parties."})]}),f("form",{onSubmit:a(E),children:[s("p",{className:"mb-2 font-semibold",children:"Verification Documents."}),f("div",{"data-tour":"sixth-step",className:"sixth-step radio-container mb-8 flex justify-between md:max-w-lg",children:[f("label",{htmlFor:"driversLicense",className:"cursor-pointer",children:[s("input",{type:"radio",id:"driversLicense",...r("selectedType"),className:"mr-2",value:"Driver's License"}),s("span",{}),"Driver's License"]}),f("label",{htmlFor:"passport",className:"cursor-pointer",children:[s("input",{type:"radio",id:"passport",...r("selectedType"),className:"mr-2",value:"Passport"}),s("span",{}),"Passport"]})]}),s("div",{className:"text-[#667085]",children:N=="Driver's License"?f("div",{className:"flex flex-col items-center gap-[16px] md:flex-row",children:[s(ti,{multiple:!1,handleChange:M=>{l(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:c!=null&&c.name?s("img",{src:T(c,"front-preview"),id:"front-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Front"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})}),s(ti,{multiple:!1,handleChange:M=>{u(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:d!=null&&d.name?s("img",{src:T(d,"back-preview"),id:"back-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Back"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})]}):s(ti,{multiple:!1,handleChange:M=>{y(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:g!=null&&g.name?s("img",{src:T(g,"passport-preview"),id:"passport-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Passport page with photo"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})}),f("div",{className:"my-8 max-w-lg",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"expiry_date",children:"Expiration Date"}),s("input",{type:"date",placeholder:"expiry_date",...r("expiry_date"),className:"focus:shadow-outline !min-h-[40px] w-full rounded border px-3 py-2 leading-tight text-gray-700 focus:outline-none"}),((D=o.expiry_date)==null?void 0:D.message)&&s("p",{className:"my-3 rounded-md border border-[#C42945] bg-white px-3 py-2 text-center text-sm normal-case text-[#C42945]",children:(P=o.expiry_date)==null?void 0:P.message})]}),s(Ft,{loading:w,type:"submit",className:`login-btn-gradient submit-doc-btn rounded tracking-wide text-white outline-none focus:outline-none ${w?"py-1":"py-2"} mt-8 w-[333px] max-w-full`,disabled:_(),"data-tour":"submit-doc-btn",children:"Submit Document"})]}),s("div",{className:k?"popup-container flex items-center justify-center normal-case":"hidden",children:f("div",{className:`${b?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:M=>M.stopPropagation(),children:[f("h2",{className:"mb-4 text-3xl font-semibold",children:[s(_f,{}),"Document received"]}),s("p",{className:"mb-4 text-sm text-gray-500",children:"Once we verify your document you will receive an email. It usually takes up to 24 hours."}),s("button",{type:"button",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",onClick:()=>{var M;x(!1),t((M=e.get("redirect_uri"))!=null?M:-1)},children:"Back to Profile"})]})})]})}let mm=new _e;function AEe(){var D,P;const[e]=lt(),t=je(),n=Qe({expiry_date:ge().test("is-not-in-past","Not a valid date",M=>{if(M=="")return!1;const O=new Date(M);return O.setDate(O.getDate()-1)>new Date})}),{handleSubmit:a,register:r,watch:i,formState:{errors:o}}=Oe({defaultValues:{selectedType:"Driver's License"},resolver:Xe(n)}),[c,l]=h.exports.useState(null),[d,u]=h.exports.useState(null),[g,y]=h.exports.useState(null),[w,v]=h.exports.useState(!1),{dispatch:S,state:m}=h.exports.useContext(we),{dispatch:p}=h.exports.useContext(Ee),[b,x]=h.exports.useState(!1),k=cr(b,300),N=i("selectedType"),_=()=>!(N=="Driver's License"&&c&&d||N=="Passport"&&g),C=async M=>{const O=new FormData;O.append("file",M);try{return(await mm.uploadImage(O)).url}catch(F){return console.log("err",F),""}},E=async M=>{var O;try{v(!0),N=="Driver's License"?(M.frontImage=await C(c),M.backImage=await C(d)):M.frontImage=await C(g),mm.setTable("id_verification");const F=await mm.callRestAPI({id:m.user.verificationId,type:N,expiry_date:M.expiry_date,status:0,image_front:M.frontImage,image_back:(O=M.backImage)!=null?O:null,user_id:Number(localStorage.getItem("user"))},m.user.verificationId?"PUT":"POST");mm.setTable("notification"),await mm.callRestAPI({user_id:Number(localStorage.getItem("user")),actor_id:null,action_id:F.message,notification_time:new Date().toISOString().split(".")[0],message:"New ID Verification submitted",type:za.NEW_ID_VERIFICATION,status:rr.NOT_ADDRESSED},"POST"),x(!0)}catch(F){me(p,F.message),S({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:F.message}})}v(!1)},T=(M,O)=>{const F=new FileReader;F.onload=z=>{document.getElementById(O).src=z.target.result},F.readAsDataURL(M)};return f("div",{className:"pb-16 normal-case",children:[s("div",{children:f("button",{type:"button",onClick:()=>t(-1),className:"mb-2 mr-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),s("h1",{className:"mb-4 text-2xl font-semibold md:text-5xl",children:"Identity Verification"}),f("div",{className:"mb-[32px] max-w-3xl rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[24px] py-[16px]",children:[f("h3",{className:"text-lg flex items-center gap-2 font-semibold",children:[s(DF,{}),s("span",{children:"Safety is our priority"})]}),s("p",{className:"ml-5 max-w-xl text-sm leading-relaxed",children:"To establish trust for all parties we verify both hosts and guests. Your personal information is secure. We will never share your information with third parties."})]}),f("form",{onSubmit:a(E),children:[s("p",{className:"mb-2 font-semibold",children:"Explain what document(s) are allowed."}),f("div",{"data-tour":"sixth-step",className:"radio-container sixth-step mb-8 flex justify-between md:max-w-lg",children:[f("label",{htmlFor:"driversLicense",className:"cursor-pointer",children:[s("input",{type:"radio",id:"driversLicense",...r("selectedType"),className:"mr-2",value:"Driver's License"}),s("span",{}),"Driver's License"]}),f("label",{htmlFor:"passport",className:"cursor-pointer",children:[s("input",{type:"radio",id:"passport",...r("selectedType"),className:"mr-2",value:"Passport"}),s("span",{}),"Passport"]})]}),s("div",{className:"text-[#667085]",children:N=="Driver's License"?f("div",{className:"flex flex-col items-center gap-[16px] md:flex-row",children:[s(ti,{multiple:!1,handleChange:M=>{l(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:c!=null&&c.name?s("img",{src:T(c,"front-preview"),id:"front-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Front"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})}),s(ti,{multiple:!1,handleChange:M=>{u(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:d!=null&&d.name?s("img",{src:T(d,"back-preview"),id:"back-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Back"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})]}):s(ti,{multiple:!1,handleChange:M=>{y(M)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:g!=null&&g.name?s("img",{src:T(g,"passport-preview"),id:"passport-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Passport page with photo"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," ","or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})}),f("div",{className:"my-8 max-w-lg",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"expiry_date",children:"Expiry Date"}),s("input",{type:"date",placeholder:"expiry_date",...r("expiry_date"),className:"focus:shadow-outline !min-h-[40px] w-full rounded border px-3 py-2 leading-tight text-gray-700 focus:outline-none"}),((D=o.expiry_date)==null?void 0:D.message)&&s("p",{className:"my-3 rounded-md border border-[#C42945] bg-white px-3 py-2 text-center text-sm normal-case text-[#C42945]",children:(P=o.expiry_date)==null?void 0:P.message})]}),s(Ft,{loading:w,type:"submit",className:`login-btn-gradient submit-doc-btn rounded tracking-wide text-white outline-none focus:outline-none ${w?"py-1":"py-2"} mt-8 w-[333px] max-w-full`,disabled:_(),"data-tour":"submit-doc-btn",children:"Submit Document"})]}),s("div",{className:k?"popup-container flex items-center justify-center normal-case":"hidden",children:f("div",{className:`${b?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:M=>M.stopPropagation(),children:[f("h2",{className:"mb-4 text-3xl font-semibold",children:[s(_f,{}),"Document received"]}),s("p",{className:"mb-4 text-sm text-gray-500",children:"Once we verify your document you will receive an email. It usually takes up to 24 hours."}),s("button",{type:"button",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",onClick:()=>{var M;x(!1),t((M=e.get("redirect_uri"))!=null?M:-1)},children:"Back to Profile"})]})})]})}new _e;const lT=()=>{var g,y,w,v,S,m,p,b,x;const{bookingData:e}=wS(),[t,n]=h.exports.useState({}),{id:a}=Mt(),r=je(),[i,o]=h.exports.useState(!1),[c,l]=h.exports.useState(!1),{propertySpace:d}=Jl(t.property_space_id,i);async function u(k){var _;const N=[`ergo_booking.id = ${k} AND ergo_booking.deleted_at IS NULL`];try{const C=await _t("booking/details","post",{where:N},"");n((_=C.list)!=null?_:{})}catch(C){globalDispatch({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:C.message}})}}return h.exports.useEffect(()=>{var k;u((k=e.id)!=null?k:a)},[]),f("div",{className:"container mx-auto px-6 pt-24 normal-case 2xl:px-16",children:[s("div",{children:f("button",{type:"button",onClick:()=>r(-1),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"mb-[22px] flex flex-col justify-between md:flex-row",children:[f("div",{className:"mb-6 flex flex-wrap items-center justify-center md:mb-0",children:[s(_f,{}),s("h1",{className:"mr-3 text-xl font-semibold text-[#101828] md:text-3xl",children:"Booking request successful"})]}),s($e,{to:"/account/my-bookings",className:"rounded-md border border-[#EAECF0] bg-[#F9FAFB] px-4 py-2 text-center text-[#101828]",children:"Go to my bookings"})]}),f("div",{className:"flex flex-wrap items-start md:gap-[24px]",children:[f("div",{className:"w-full md:w-[55%]",children:[s("div",{className:"mb-[32px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-2 py-[16px] text-sm md:px-[20px] md:text-base",children:f("div",{className:"flex items-start gap-[12px]",children:[s("svg",{width:"60",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M9.99984 13.3333V9.99996M9.99984 6.66663H10.0082M18.3332 9.99996C18.3332 14.6023 14.6022 18.3333 9.99984 18.3333C5.39746 18.3333 1.6665 14.6023 1.6665 9.99996C1.6665 5.39759 5.39746 1.66663 9.99984 1.66663C14.6022 1.66663 18.3332 5.39759 18.3332 9.99996Z",stroke:"#475467",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),f("div",{children:[s("h3",{className:"text-lg font-semibold text-[#101828]",children:"What's next"}),f("p",{className:"text-[#667085]",children:["Your booking has been sent to the host and will be reviewed within 2 hours. If you don\u2019t hear form the host withing 2h you can cancel your booking or reach out to them via"," ",s("span",{className:"font-semibold underline",children:"Messages"}),".",s("br",{}),s("span",{className:"font-semibold",children:"Note: Payment is only after the host accepts your booking"})]})]})]})}),s("li",{className:"mb-6 text-xl font-semibold",children:"Booking Time"}),f("div",{className:"mb-[32px] flex items-center justify-around rounded-lg border border-[#EAECF0] px-[20px] py-[16px]",children:[f("div",{className:"w-[80px] rounded-lg border text-center",children:[s("p",{className:"rounded-t-lg bg-black py-2 uppercase text-white",children:(g=Rr[new Date(t.booking_start_time).getMonth()])!=null?g:"N/A"}),s("strong",{className:"text-3xl",children:new Date(t.booking_start_time).getDate()||"N/A"}),s("p",{className:"uppercase text-[#667085]",children:(y=sr[new Date(t.booking_start_time).getDay()])!=null?y:"N/A"})]}),f("div",{className:"flex flex-col gap-[10px] md:flex-row md:gap-[67px]",children:[f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"From"}),s("strong",{children:e.from})]}),f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"Until"}),s("strong",{children:e.to})]})]})]}),s("li",{className:"mb-6 text-xl font-semibold",children:"Space"}),f("div",{className:"mb-[32px] flex max-w-full flex-col rounded-lg border border-[#EAECF0] bg-[#F9FAFB] lg:min-h-[167px] lg:w-[unset] lg:flex-row lg:gap-[32px]",children:[s("div",{className:"mb-[8px] flex h-[180px] w-full flex-col rounded-lg bg-cover bg-center bg-no-repeat px-[8px] pb-[13px] lg:w-[262px]",style:{backgroundImage:`url(${(v=(w=t.image_url)!=null?w:e.url)!=null?v:"/default-property.jpg"})`},children:s(ls,{space_id:e.id,user_property_spaces_id:d.user_property_spaces_id,reRender:o})}),f("div",{className:"flex flex-grow items-end justify-between py-6 pl-4 pr-4 lg:items-start lg:pl-0 lg:pr-8",children:[f("div",{className:"",children:[s("h2",{className:"mb-[6px] text-[18px] font-semibold",children:(S=t.property_name)!=null?S:e.name}),s("p",{className:"tracking-wider text-[#475467]",children:d.city}),s("p",{className:"tracking-wider text-[#475467]",children:d.country}),f("div",{className:"mt-[6px] flex lg:mt-[21px]",children:[f("p",{className:"mr-[31px]",children:["from: ",f("span",{className:"font-bold",children:["$",t.hourly_rate]}),"/",s("span",{className:"",children:"day"})]}),f("div",{className:"flex items-center gap-2",children:[s(Zc,{}),s("span",{children:d.max_capacity})]})]})]}),f("div",{className:"flex flex-col items-center",children:[f("p",{className:"flex items-center gap-2 lg:mb-[9px]",children:[s(ds,{}),s("strong",{className:"font-semibold",children:(Number(d.average_space_rating)||0).toFixed(1)})]}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:()=>l(!0),children:"(view on map)"})]})]})]}),s("li",{className:"mb-6 text-xl font-semibold",children:"Add-ons:"}),s("ul",{className:"w-full sm:flex flex-wrap gap-8",children:((m=t.add_ons)!=null?m:[]).map((k,N)=>f("li",{className:"flex w-fit sm:w-full items-center gap-2 mb-4 sm:mb-0",children:[f("span",{className:"w-fit",children:[" ",f("div",{className:"flex gap-4",children:[s(ur,{})," ",k.name]})," "]})," "]},N))})]}),f("div",{className:"max-w-full flex-grow",children:[f("div",{className:"mb-[16px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[20px] py-[24px] text-sm md:px-[32px] md:text-base",children:[s("h4",{className:"text-lg mb-[8px] font-semibold md:text-2xl",children:"Charges"}),s("p",{className:"mb-[16px] text-xs text-[#667085] md:text-sm",children:"(You will not be charged until the host accepts your booking)"}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Rate"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",t.hourly_rate]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Price"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",((p=t.hourly_rate)!=null?p:0)*(((b=t.duration)!=null?b:0)/3600)]})]}),((x=t.add_ons)!=null?x:[]).map(k=>f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:k.name}),f("p",{className:"font-semibold text-[#344054]",children:[" $",k.cost]})]},k.id)),f("div",{className:"mb-[16px] flex justify-between",children:[s("p",{children:"Tax"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",t.tax]})]}),f("div",{className:"-mx-3 mb-[12px] flex justify-between rounded-md bg-black p-3 font-bold text-white",children:[s("p",{children:"Total"}),f("p",{children:[" $",t.total]})]})]}),s($e,{to:"/help/cancellation-policy",target:"_blank",className:"block text-center font-semibold text-[#667085] underline",children:"Cancellation policy"})]})]}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${d.address_line_1||""}, ${d.address_line_2||""}, ${d.city||""}, ${d.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${d.address_line_1||""}, ${d.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:c,closeModal:()=>l(!1)})]})},kd=()=>{const[e]=lt(),[t,n]=h.exports.useState("Verifying your email..."),a=je(),{dispatch:r}=h.exports.useContext(we);let i=new _e;async function o(){var l;const c=e.get("token");try{const d=await i.verifyEmail(c);if(e.get("is_manual")!="true"){const u=await _t("get-user","post",{id:d.user_id},""),g=await i.getEmailTemplate("signup-confirmation"),y=(l=g.html)==null?void 0:l.replace(new RegExp("{{{first_name}}}","g"),u.first_name).replace(new RegExp("{{{last_name}}}","g"),u.last_name);await i.sendEmail(u.email,g.subject,y)}d.error||pe(r,"Email verified",3e3,"success"),n("Your account has been verified, You will be redirected to login page shortly"),setTimeout(()=>{a("/login")},4e3)}catch{}}return h.exports.useEffect(()=>{o()},[]),s("div",{className:"flex min-h-screen items-center justify-center",children:s("h1",{className:"text-5xl",children:t})})},IEe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];let Cd=new _e;const OEe=["Pending","Upcoming","Ongoing","Completed","Declined","Cancelled"],PEe=()=>{var C,E,T,D;const{dispatch:e}=R.useContext(Ee),[t,n]=R.useState([]),[a,r]=R.useState([]),{dispatch:i}=R.useContext(we),[o,c]=R.useState([]),[l,d]=R.useState([]),[u,g]=R.useState([]),y=Qe({start_date:ge(),end_date:ge(),report_type:ge(),status:ge()}),{register:w,handleSubmit:v,watch:S,formState:{errors:m}}=Oe({resolver:Xe(y)}),p=S("report_type"),b=P=>{switch(console.log("submitting",P),P.report_type){case"bookings":g("Bookings"),x(P.start_date,P.end_date,P.status),n(o);break;case"analytics":g("Analytics"),k(P.start_date,P.end_date),n(l);break;default:g(""),n([]),r([])}};async function x(P,M,O){const F=[`${P&&M?`ergo_booking.create_at BETWEEN '${P}' AND '${M} 23:59:59'`:"1"} AND ${O?`ergo_booking.status = ${O}`:"1"}`,"ergo_booking.deleted_at IS NULL"];console.log("where",F);try{const z=await _t("booking","post",{where:F,page:1,limit:1e5},"PAGINATE");Array.isArray(z.list)&&r(z.list)}catch(z){me(e,z.message),pe(i,z.message,4e3,"ERROR")}}async function k(P,M){Cd.setTable("analytic_log");try{const O=await Cd.callRestAPI({payload:{}},"GETALL");Array.isArray(O.list)&&r(O.list)}catch(O){me(e,O.message),pe(i,O.message,4e3,"ERROR")}}R.useEffect(()=>{i({type:"SETPATH",payload:{path:"reports"}}),N(),_()},[]);async function N(){var P;Cd.setTable("settings");try{const M=await Cd.callRestAPI({limit:1,page:1,payload:{key_name:"admin_booking_reports_column_order"}},"PAGINATE");Array.isArray(M.list)&&M.list.length>0&&c(va((P=M.list[0].optional_data)!=null?P:[],_a.admin_booking_report))}catch(M){me(e,M.message),pe(i,M.message,4e3,"ERROR")}}async function _(){var P;Cd.setTable("settings");try{const M=await Cd.callRestAPI({limit:1,page:1,payload:{key_name:"admin_analytics_column_order"}},"PAGINATE");Array.isArray(M.list)&&M.list.length>0&&d(va((P=M.list[0].optional_data)!=null?P:[],_a.admin_analytics))}catch(M){me(e,M.message),pe(i,M.message,4e3,"ERROR")}}return f(Se,{children:[f("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:v(b),children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Reports"})}),f("div",{className:"filter-form-holder mt-10 flex max-w-3xl flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Start date"}),s("input",{type:"date",placeholder:"Start date",...w("start_date"),className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(C=m.start_date)==null?void 0:C.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"End date"}),s("input",{type:"date",placeholder:"End date",...w("end_date"),className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(E=m.end_date)==null?void 0:E.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Report type"}),f("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...w("report_type"),children:[s("option",{value:"",children:"- Select -"}),s("option",{value:"bookings",children:"Bookings"})]}),s("p",{className:"text-xs italic text-red-500",children:(T=m.report_type)==null?void 0:T.message})]}),p=="bookings"&&f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Booking Status"}),f("select",{className:"mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...w("status"),children:[s("option",{value:"",children:"- Select -"}),OEe.map((P,M)=>s("option",{value:M,children:P},P))]}),s("p",{className:"text-xs italic text-red-500",children:(D=m.end_date)==null?void 0:D.message})]})]}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"submit",children:"Generate Report"})]}),f("div",{className:"flex justify-between bg-white p-5",children:[s("h1",{className:"text-3xl font-semibold",children:u}),f("div",{className:"flex",children:[s($e,{to:`/admin/column_order/${u=="Bookings"?"booking_reports":"analytics"}`,className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Change Column Order"}),s(Ka,{id:"test-table-xls-button",className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",table:"table-to-xls",filename:u,sheet:u,buttonText:"Export to xls"})]})]}),s("div",{className:"overflow-x-auto rounded bg-white shadow",children:s("div",{className:"overflow-x-auto border-b border-gray-200",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",id:"table-to-xls",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:s("tr",{className:"cursor-pointer",children:t.map((P,M)=>s("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:P.header},M))})}),s("tbody",{className:"divide-y divide-gray-200",children:a.map((P,M)=>s("tr",{className:"py-2 text-sm",children:t.map((O,F)=>{var H;if(O.mapping)return s("td",{className:"whitespace-nowrap px-6 py-4",children:O.mapping[P[O.accessor]]},F);if(O.formatDate){var z=new Date(P[O.accessor]);return s("td",{className:"whitespace-nowrap px-6 py-4",children:IEe[z.getMonth()]+" "+z.getDate()+"/"+z.getFullYear()},F)}if(O.isCountry)return s("td",{className:"whitespace-nowrap px-6 py-4",children:(H=Yz.find(A=>A.code==P[O.accessor]))==null?void 0:H.name},F);if(O.idPrefix)return s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:O.idPrefix+P[O.accessor]},F);if(O.joinFields){let[A,j]=O.accessor.split(",");return console.log(O.accessor.split(",")),s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:P[A]+" "+P[j==null?void 0:j.trim()]},F)}return s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:P[O.accessor]},F)})},M))})]})})})]})};function REe(){const{pathname:e}=An();return h.exports.useEffect(()=>{window.scrollTo(0,0)},[e]),null}const jEe=()=>{const{sectionId:e}=Mt(),{dispatch:t}=h.exports.useContext(we),[n,a]=h.exports.useState([]),[r,i]=h.exports.useState(null),o=je(),c=new _e,l=(w,v)=>w.orderNumber-v.orderNumber;async function d(){c.setTable("settings");const w={key_name:`admin_${e}_column_order`};try{const v=await c.callRestAPI({limit:1,page:1,payload:w},"PAGINATE");Array.isArray(v.list)&&v.list.length>0&&(a(on(v.list[0].optional_data,[])),console.log(on(v.list[0].optional_data,[])),i(v.list[0].id))}catch(v){t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:v.message}})}}const u=async()=>{c.setTable("settings");try{await c.callRestAPI({id:r,optional_data:JSON.stringify(n)},"PUT"),o(-1)}catch(w){t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:w.message}})}},g=(w,v)=>{v<1||a(S=>{const m=[...S];let p=S.reduce((b,x)=>x.orderNumber>b?x.orderNumber:b,0);return S.forEach((b,x)=>{b.orderNumber==v&&(m[x].orderNumber=S[w].orderNumber)}),v>=p?(m[S.length-1].orderNumber=S[w].orderNumber,m[w].orderNumber=p,m):(m[w].orderNumber=v,m)})},y=(w,v)=>{a(S=>{let m=[...S];return m[w].shouldShow=v,m})};return h.exports.useEffect(()=>{t({type:"SETPATH",payload:{path:e}}),d()},[]),f("div",{className:"p-5 font-normal",children:[s("div",{children:f("button",{type:"button",onClick:()=>o(-1),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),s("h1",{className:"mb-20 text-4xl font-semibold",children:e.replace(/([-_]\w)/g,w=>" "+w[1].toUpperCase())}),f("table",{className:"mb-8 w-full divide-y divide-gray-200",children:[s("thead",{children:f("tr",{children:[s("th",{children:"Column Name"}),s("th",{children:"Order Number"}),s("th",{children:"Should Display"})]})}),s("tbody",{className:"divide-y divide-gray-200",children:n.sort(l).map((w,v)=>f("tr",{className:"text-center",children:[s("td",{className:"py-4",children:w.header}),f("td",{className:"hover-show-edit py-4",children:[s("input",{type:"number",className:"remove-arrow w-[80px] focus:outline-none",defaultValue:w.orderNumber}),s("span",{children:w.orderNumber})," ",s("button",{onClick:S=>S.currentTarget.parentElement.classList.add("edit-mode"),className:"edit-btn ml-2",children:s(Ga,{})}),f("button",{onClick:S=>{let m=S.target.parentElement.querySelector("input").value;g(v,m),S.target.parentElement.classList.remove("edit-mode")},className:"save-btn absolute ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-1 text-xs font-semibold text-white outline-none focus:outline-none",children:[" ","Change"]})]}),f("td",{className:"py-4",children:[s("span",{children:w.shouldShow?"Yes":"No"}),s("input",{type:"checkbox",className:"remove-arrow w-[80px] focus:outline-none",checked:w.shouldShow,onChange:S=>y(v,S.target.checked)})]})]},w.orderNumber))})]}),s("div",{className:"flex justify-end",children:s("button",{onClick:u,className:"ml-5 mb-1 mr-3 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:"Save Order"})})]})},cT=()=>{const{state:e,dispatch:t}=h.exports.useContext(Ee),{dispatch:n}=h.exports.useContext(we),a=je(),{pathname:r}=An(),i=h.exports.useMemo(()=>["/admin","/login","/account/messages","/signup"],[]);function o(){t({type:"SWITCH_TO_HOST"}),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a host",btn:"Ok got it"}})}function c(){t({type:"SWITCH_TO_CUSTOMER"}),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"You are now signed in as a customer",btn:"Ok got it"}})}function l(){e.role=="host"?c():o(),a("/")}return i.some(d=>r.startsWith(d))?null:s("div",{className:"bg-white",children:s("div",{className:"header-light pb-10",children:f("div",{className:"container mx-auto px-4 py-[24px] text-white 2xl:px-16",children:[f("div",{className:"mb-[17px] hidden justify-between md:flex",children:[s($e,{to:"/",children:s(oy,{})}),s("div",{className:"flex gap-[24px]",children:(e.role=="host"||e.role=="customer")&&s(Se,{children:e.originalRole!="customer"?f("button",{className:"duration-200 hover:underline",onClick:l,children:["Join as ",e.role=="host"?"customer":"host"]}):s($e,{className:"duration-200 hover:underline",to:"/become-a-host",children:"Host Your Space"})})}),f("div",{className:"flex w-72 gap-[24px] pl-2",children:[s($e,{className:"duration-200 hover:underline",to:"/faq",children:"FAQs"}),s($e,{className:"duration-200 hover:underline",to:"/contact-us",children:"Contact us"})]})]}),f("div",{className:"mb-[17px] flex justify-between text-xs md:text-sm",children:[s("div",{className:"flex gap-[24px]",children:s("span",{children:"ergo \xA9 All rights reserved"})}),f("div",{className:"flex gap-[24px]",children:[s($e,{className:"duration-200 hover:underline",to:"/help/terms_and_conditions",children:"Terms and conditions"}),s($e,{className:"duration-200 hover:underline",to:"/help/privacy-policy",children:"Privacy and policy"})]})]})]})})})};function Dv(){const[e,t]=h.exports.useState(""),{dispatch:n}=h.exports.useContext(we);async function a(){var i;n({type:"START_LOADING"}),new _e().setTable("cms");try{const o=await _t("cms","post",{payload:{content_key:"privacy_policy"},limit:1e3,page:1},"PAGINATE");Array.isArray(o.list)&&o.list.length>0&&t((i=o.list.find(c=>c.content_key=="privacy_policy"))==null?void 0:i.content_value)}catch(o){n({type:"SHOW_ERROR",payload:{heading:"Cannot get Privacy policy",message:o.message}})}n({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{a()},[]),s("div",{className:"mt-[120px] min-h-screen normal-case text-sm",children:s("div",{className:"container mx-auto 2xl:px-32 px-4",children:s("article",{className:"sun-editor-editable",dangerouslySetInnerHTML:{__html:e}})})})}function Mv(){const{state:e,dispatch:t}=h.exports.useContext(Ee);return h.exports.useEffect(()=>{let n;return n=setTimeout(()=>{t({type:"DISALLOW_CHECK_VERIFICATION"})},1e4),()=>clearTimeout(n)},[]),e.allowCheckVerification?s("div",{className:"flex min-h-screen items-center justify-center normal-case",children:f("div",{className:"",children:[s("h1",{className:"text-4xl block text-center",children:"Account Created successfully. Please check your email to verify your account"}),s("p",{className:"text-center",children:"You'll be redirected to login page shortly"})]})}):s(wr,{to:"/login"})}function Av(){const[e,t]=h.exports.useState(""),{dispatch:n}=h.exports.useContext(we);async function a(){var i;n({type:"START_LOADING"}),new _e().setTable("cms");try{const o=await _t("cms","post",{payload:{content_key:"cancellation_policy"},limit:1e3,page:1},"PAGINATE");Array.isArray(o.list)&&o.list.length>0&&t((i=o.list.find(c=>c.content_key=="cancellation_policy"))==null?void 0:i.content_value)}catch(o){n({type:"SHOW_ERROR",payload:{heading:"Cannot get Cancellation policy",message:o.message}})}n({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{a()},[]),s("div",{className:"mt-[120px] min-h-screen normal-case text-sm",children:s("div",{className:"container mx-auto 2xl:px-32 px-4",children:s("article",{className:"sun-editor-editable",dangerouslySetInnerHTML:{__html:e}})})})}function Iv(){const[e,t]=h.exports.useState(""),{dispatch:n}=h.exports.useContext(we);async function a(){n({type:"START_LOADING"}),new _e().setTable("cms");try{const i=await _t("cms","post",{where:["content_key = 'terms_and_conditions'"],limit:1,page:1},"PAGINATE");Array.isArray(i.list)&&i.list.length>0&&t(i.list[0].content_value)}catch(i){n({type:"SHOW_ERROR",payload:{heading:"Cannot get Cancellation policy",message:i.message}})}n({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{a()},[]),s("div",{className:"mt-[120px] min-h-screen normal-case text-sm",children:s("div",{className:"container mx-auto 2xl:px-32 px-4",children:s("article",{className:"sun-editor-editable",dangerouslySetInnerHTML:{__html:e}})})})}new _e;const zEe=new St,MF=["NO","YES"],dT=["INACTIVE","ACTIVE"],uT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.DEVICE},{header:"User ID",accessor:"user_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.USER},{header:"Device UID",accessor:"uid",isSorted:!0,isSortedDesc:!0},{header:"Logged In",accessor:"active",isSorted:!0,isSortedDesc:!0,mapping:MF},{header:"Last Login",accessor:"last_login_time",isSorted:!0,isSortedDesc:!0,format:e=>q1(e).format("MM/DD/yyyy hh:mm:ss A")}];function FEe(){var oe,q,te,G,J,K,Q;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(uT),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState(!1),[N,_]=R.useState([]),[C,E]=R.useState(""),[T,D]=R.useState({}),[P,M]=R.useState(!1);je();const[O,F]=lt((oe=localStorage.getItem("admin_device_filter"))!=null?oe:""),{reset:z,register:H,handleSubmit:A,setError:j,formState:{errors:I}}=Oe({defaultValues:Ue(O)});function B(Z){const se=a,ce=se.findIndex(ie=>ie.accessor===Z),le=se[ce];le.isSortedDesc=!le.isSortedDesc,se.splice(ce,1,le),r(()=>[...se]);const ae=Y(i,le.isSortedDesc,Z);o(ae)}function Y(Z,se,ce){return(ce==null?void 0:ce.split(",").length)>1&&(ce=ce.split(",")[0]),Z.sort((le,ae)=>{var ie,de,fe,be;if(se)return isNaN(le[ce])?((ie=le[ce])==null?void 0:ie.toLowerCase())<((de=ae[ce])==null?void 0:de.toLowerCase())?1:-1:le[ce]<ae[ce]?1:-1;if(!se)return isNaN(le[ce])?((fe=le[ce])==null?void 0:fe.toLowerCase())<((be=ae[ce])==null?void 0:be.toLowerCase())?-1:1:le[ce]<ae[ce]?-1:1})}function U(Z){(async function(){l(Z),await X(0,Z)})()}function W(){(async function(){await X(w-1>0?w-1:0,c)})()}function V(){(async function(){await X(w+1<=d?w+1:0,c)})()}async function X(Z,se){var le;const ce=Ue(O);ce.id=(le=ce.id)==null?void 0:le.replace(mt.DEVICE,"");try{let ae=["deleted_at,is"];ce.id&&ae.push(`id,eq,'${ce.id}'`),ce.user_id&&ae.push(`user_id,eq,${ce.user_id}`),ce.active&&ae.push(`active,eq,${ce.active}`),ce.status&&ae.push(`status,eq,${ce.status}`);const ie=await zEe.getPaginate("device",{join:[],filter:ae,page:Z||1,size:se,order:"update_at"}),{list:de,total:fe,limit:be,num_pages:he,page:ve}=ie,Ce=Y(de,!1);o(Ce),l(be),u(he),v(ve),y(fe),m(ve>1),b(ve+1<=he)}catch(ae){me(e,ae.message),pe(n,ae.message,4e3,"ERROR")}}const ne=Z=>{O.set("id",Z.id),O.set("status",Z.status),O.set("active",Z.active),O.set("user_id",Z.user_id),F(O),localStorage.setItem("admin_device_filter",O.toString()),X(1,c)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"device"}}),X(1,c)},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:A(ne),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Notification"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...H("id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(q=I.id)!=null&&q.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(te=I.id)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"user_id",children:"User ID"}),s("input",{...H("user_id"),className:`"shadow focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(G=I.user_id)!=null&&G.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(J=I.user_id)==null?void 0:J.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"status",children:"Status"}),f("select",{className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...H("status"),children:[s("option",{value:"",children:"ALL"}),dT.map((Z,se)=>s("option",{name:"status",value:se,children:Z},se))]}),s("p",{className:"text-xs italic text-red-500",children:(K=I.status)==null?void 0:K.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"active",children:"Is Logged In"}),f("select",{className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",...H("active"),children:[s("option",{value:"",children:"ALL"}),MF.map((Z,se)=>s("option",{name:"active",value:se,children:Z},se))]}),s("p",{className:"text-xs italic text-red-500",children:(Q=I.active)==null?void 0:Q.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{z({id:"",status:"",active:"",user_id:""}),localStorage.removeItem("admin_device_filter"),Pt(O,F),X(w,c)},children:"Reset"})]})}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:U}),x&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.length!=i.length?_(i.map(Z=>Z.id)):_([])},checked:N.length==i.length&&i.length>0,onChange:()=>{}}),"Select All"]}),N.length>0?f("div",{className:"flex items-start gap-4",children:[f("select",{className:"mb-3 rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none",onChange:Z=>E(Z.target.value),children:[s("option",{value:"",className:"none",children:"NONE"}),dT.map((Z,se)=>s("option",{name:"status",value:se,children:Z},se))]}),s("button",{className:"whitespace-nowrap rounded-md !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white",onClick:bulkChangeStatus,children:"Bulk Save"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[x&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),uT.map((Z,se)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>B(Z.accessor),children:[Z.header,Z.isSorted,s("span",{children:Z.isSorted?Z.isSortedDesc?" \u25BC":" \u25B2":""})]},se))]})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((Z,se)=>f("tr",{className:"py-2 text-sm",children:[x&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{N.includes(Z.id)?_(ce=>{let le=[...ce];return le.splice(ce.findIndex(ae=>ae==Z.id),1),le}):_(ce=>[...ce,Z.id])},checked:N.includes(Z.id),onChange:()=>{}})}),a.map((ce,le)=>{var ae;return ce.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:ce.format(Z[ce.accessor])},le):ce.accessor==""?s("td",{className:"gap-3 whitespace-nowrap px-6 py-4",children:s("button",{className:"ml-2 border-r border-gray-200 px-1 pr-4 text-[#667085]",onClick:()=>{D(Z),M(!0)},children:"Logout"})},le):ce.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:ce.mapping[(ae=Z[ce.accessor])!=null?ae:0]},le):ce.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:ce.idPrefix+Z[ce.accessor]},le):s("td",{className:"whitespace-nowrap px-6 py-4",children:Z[ce.accessor]},le)})]},se))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:U,previousPage:W,nextPage:V})]})}function fT(){const{state:e,dispatch:t}=h.exports.useContext(we);return e.confirmation?s("div",{className:"popup-container z-100 flex items-center justify-center normal-case",children:f("div",{className:`${e.confirmation?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:n=>n.stopPropagation(),children:[f("h2",{className:"mb-4 text-3xl font-semibold",children:[s(_f,{}),e.confirmationHeading]}),s("p",{className:"mb-4 text-sm text-gray-500",children:e.confirmationMsg}),f("div",{className:"flex gap-4 *:w-1/2",children:[s("button",{type:"button",onClick:()=>{t({type:"CLOSE_CONFIRMATION"})},className:"mt-4 w-full rounded border-2 border-gray-300 py-2 tracking-wide text-black outline-none focus:outline-none",children:"Cancel"}),s("button",{type:"button",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",onClick:()=>{e.confirmationCloseFn&&e.confirmationCloseFn(),t({type:"CLOSE_CONFIRMATION"})},children:e.confirmationBtn})]})]})}):null}function mT(){const{state:e,dispatch:t}=h.exports.useContext(we);return e.error?s(ke,{appear:!0,show:e.error,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:()=>t({type:"CLOSE_ERROR"}),children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 z-50 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-lg transform overflow-hidden rounded-2xl bg-white p-6 text-center align-middle z-1000 shadow-xl transition-all",children:[s("div",{className:"flex justify-end",children:s("button",{onClick:()=>t({type:"CLOSE_ERROR"}),className:"text-gray-500 duration-100 hover:text-black",children:s(gne,{className:"h-6 w-6"})})}),s("div",{className:"mt-4 flex justify-center",children:s(PX,{className:"h-6 w-6 text-red-600"})}),s(De.Title,{as:"h3",className:"mt-8 text-2xl",children:e.errorHeading}),s("p",{className:"tiny-scroll mt-4 max-h-[300px] overflow-y-auto text-wrap break-normal text-sm text-gray-500",children:e.errorMsg})]})})})})]})}):null}function $Ee(){const{state:e}=h.exports.useContext(we);return e.loading?s("div",{className:"popup-container flex items-center justify-center",children:s("div",{className:"",children:s("svg",{style:{margin:"auto",background:"transparent",display:" block",shapeRendering:"auto"},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",className:"md:w-[100px] md:h-[100px] w-[80px] h-[80px]",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"6",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(0.8)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.882051282051282s",keyTimes:"0;1",values:"0;256.58892822265625"})})})})}):null}function BEe(){const{state:e,dispatch:t}=h.exports.useContext(Ee),{state:n,dispatch:a}=h.exports.useContext(Ee),{pathname:r}=An(),i=je();return h.exports.useEffect(()=>{let o;return e.sessionExpired&&(o=setTimeout(()=>{t({type:"LOGOUT"}),["superadmin","admin"].includes(localStorage.getItem("role"))?location.href=`/login?redirect_uri=${r}`:location.href=`/login?redirect_uri=${r}`},8e3)),()=>clearTimeout(o)},[e.sessionExpired]),e.sessionExpired?s("div",{className:"relative min-h-screen w-full",children:s(ke,{appear:!0,show:!0,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:()=>{},children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Session Expired"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"Your current login session has expired. Redirecting to login page shortly"})}),s("div",{className:"mt-4",children:s("button",{type:"button",className:"inline-flex justify-center rounded-md border border-transparent bg-blue-100 px-4 py-2 text-sm font-medium text-blue-900 hover:bg-blue-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",onClick:()=>{localStorage.clear(),t({type:"LOGOUT"}),a({type:"CLOSE_ERROR"}),i("/login")},children:"Got it, thanks!"})})]})})})})]})})}):null}function Ov(){const{dispatch:e}=y5(),t=je();function n(){e({type:"SET_ROLE",payload:"host"}),t("/signup")}function a(){e({type:"SET_ROLE",payload:"customer"}),t("/signup")}return s(Se,{children:s("div",{className:"w-full flex items-center justify-center normal-case",children:f("div",{className:"max-w-3xl mx-auto w-full text-center mb-40",children:[s("h1",{className:"text-5xl font-semibold mb-4",children:"Sign Up"}),s("p",{children:"Select an option below"}),s("br",{}),s("hr",{}),s("br",{}),f("div",{className:"flex flex-col gap-12 items-center",children:[s("button",{className:"py-4 px-4 shadow-sm w-full max-w-sm hover:shadow-lg duration-200 border rounded-xl hover:ring-2 ring-[#0d9895] focus:outline-none focus:ring-2",onClick:n,children:f("span",{className:"span flex justify-between items-center mb-4",children:[s("span",{className:"font-semibold text-2xl",children:"Sign up as host"}),s("span",{className:"",children:s(_o,{})})]})}),s("button",{className:"py-4 px-4 shadow-sm w-full max-w-sm hover:shadow-lg duration-200 border rounded-xl hover:ring-2 ring-[#0d9895] focus:outline-none focus:ring-2",onClick:a,children:f("span",{className:"span flex justify-between items-center mb-4",children:[s("span",{className:"font-semibold text-2xl",children:"Sign up as customer"}),s("span",{className:"",children:s(_o,{})})]})})]})]})})})}const Pv=(e,t)=>{const n=new FileReader;n.onload=a=>{document.getElementById(t).src=a.target.result},n.readAsDataURL(e)};async function pT(e){if(!e)return null;try{let n=await(await fetch(e)).blob(),a={type:"image/jpeg"};return new File([n],e.split("/").pop(),a)}catch{return null}}function HEe(){var D,P,M,O,F,z,H,A;const e=h.exports.useRef(new Date),{state:t,dispatch:n}=h.exports.useContext(we),{dispatch:a}=h.exports.useContext(Ee),[r,i]=h.exports.useState(null),[o,c]=h.exports.useState(null),[l,d]=h.exports.useState(null),[u,g]=h.exports.useState(!1),[y,w]=h.exports.useState(""),v=je(),S=Qe({expiry_date:ge().required("This field is required").test("is-not-in-past","Invalid expiry date",j=>{const I=new Date(j);return I.setDate(I.getDate()-1)>new Date}),city:ge().required("This field is required"),country:ge().required("This field is required"),selectedType:ge().required("This field is required"),about:ge().required("This field is required")}),{handleSubmit:m,register:p,setValue:b,control:x,watch:k,formState:{errors:N}}=Oe({defaultValues:{dob:t.user.dob?q1(t.user.dob).format("yyyy-MM-DD"):"",expiry_date:t.user.verificationExpiry?q1(t.user.verificationExpiry).format("yyyy-MM-DD"):"",city:t.user.city||"",country:t.user.country||"",selectedType:t.user.verificationType||"Driver's License",about:t.user.about||""},resolver:Xe(S)}),_=new _e,C=k("selectedType"),E=async j=>{const I=new FormData;I.append("file",j);try{return(await _.uploadImage(I)).url}catch(B){return console.log("err",B),""}};async function T(j){if(C=="Driver's License"&&(!r||!o)){w("Please upload required documents");return}if(C=="Passport"&&!l){w("Please upload required documents");return}console.log("submitting",j),g(!0);try{await _t("edit-self","post",{user:{role:["superadmin","admin"].includes(t.user.role)?void 0:"host"},profile:{city:j.city,country:j.country,about:j.about,getting_started:0}},""),C=="Driver's License"?(j.image_front=await E(r),j.image_back=await E(o)):j.image_front=await E(l),_.setTable("id_verification");const I=await _.callRestAPI({id:t.user.verificationId,type:C,expiry_date:j.expiry_date,status:0,image_front:j.image_front,image_back:j.image_back,user_id:Number(localStorage.getItem("user"))},t.user.verificationId?"PUT":"POST");_.setTable("notification"),await _.callRestAPI({user_id:Number(localStorage.getItem("user")),actor_id:null,action_id:I.message,notification_time:new Date().toISOString().split(".")[0],message:"New ID Verification submitted",type:za.NEW_ID_VERIFICATION,status:rr.NOT_ADDRESSED},"POST"),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Host account created, please re login to your account",btn:"Ok got it",onClose:()=>{_.logout(),a({type:"LOGOUT"}),v("/login")}}})}catch(I){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:I.message}})}g(!1)}return h.exports.useEffect(()=>{(async()=>{const j=await pT(t.user.verificationImageFront),I=await pT(t.user.verificationImageBack);t.user.verificationType=="Passport"?d(j):(i(j),c(I))})()},[]),t.user.id?s("div",{className:"mt-[120px] normal-case",children:f("form",{className:"mx-auto w-full max-w-5xl p-5",onSubmit:m(T),children:[s("h1",{className:"mb-2 text-5xl",children:"Become A Host"}),s("p",{className:"mb-8",children:"Gain the ability to rent your spaces by giving us some additional information"}),s("h3",{className:"mb-8 text-2xl font-semibold",children:"Location"}),f("div",{className:"mb-16 max-w-lg",children:[f("div",{className:"mb-8",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"city",children:"City"}),s(Ci,{control:x,setValue:j=>b("city",j),name:"city",className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(D=N.city)!=null&&D.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(cities)"]}),s("p",{className:"mt-2 text-sm italic text-red-600 empty:mt-0",children:(P=N.city)==null?void 0:P.message})]}),f("div",{className:"mb-8",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"country",children:"Country"}),s(BA,{control:x,name:"country",labelField:"name",valueField:"name",setValue:j=>b("country",j),items:Yz,containerClassName:"relative w-full",className:`w-full truncate border py-2 px-3 text-black ${(M=N.country)!=null&&M.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:""}),s("p",{className:"mt-2 text-sm italic text-red-600 empty:mt-0",children:(O=N.country)==null?void 0:O.message})]})]}),s("h3",{className:"mb-8 text-2xl font-semibold",children:"Profile Information"}),f("div",{className:`mb-16 max-w-lg ${t.user.dob,"hidden"}`,children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"dob",children:["Date of birth ",s("span",{className:"ml-4 text-sm font-normal italic text-red-500",children:(F=N.dob)==null?void 0:F.message})]}),s(No,{control:x,name:"dob",min:new Date("1950-01-01"),max:e.current,setValue:j=>b("dob",j)})]}),f("div",{className:"mb-16 max-w-lg",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"about",children:"About"}),s("textarea",{className:`focus:shadow-outline w-full rounded rounded-l-none border-2 py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(z=N.about)!=null&&z.message?"border-red-600":""}`,placeholder:"Tell us about yourself",...p("about"),cols:"30",rows:"10"}),s("p",{className:"mt-2 text-sm italic text-red-600 empty:mt-0",children:(H=N.about)==null?void 0:H.message})]}),s("h3",{className:"mb-8 text-2xl font-semibold",children:"Identity Verification"}),s("p",{className:"mb-2 font-semibold",children:"Explain what document(s) are allowed."}),f("div",{className:"radio-container mb-8 flex max-w-lg justify-between",children:[f("label",{htmlFor:"driversLicense",className:"cursor-pointer",children:[s("input",{type:"radio",id:"driversLicense",...p("selectedType"),className:"mr-2",value:"Driver's License"}),s("span",{}),"Driver's License"]}),f("label",{htmlFor:"passport",className:"cursor-pointer",children:[s("input",{type:"radio",id:"passport",...p("selectedType"),className:"mr-2",value:"Passport"}),s("span",{}),"Passport"]})]}),s("p",{className:"mb-2 text-sm italic text-red-600 empty:mb-0",children:y}),s("div",{className:"mb-8 text-[#667085]",children:C=="Driver's License"?f("div",{className:"flex flex-col items-center gap-[16px] md:flex-row",children:[s(ti,{multiple:!1,handleChange:j=>{i(j)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:r!=null&&r.name?s("img",{src:Pv(r,"front-preview"),id:"front-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Front"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})}),s(ti,{multiple:!1,handleChange:j=>{c(j)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:o!=null&&o.name?s("img",{src:Pv(o,"back-preview"),id:"back-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Back"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})]}):s(ti,{multiple:!1,handleChange:j=>{d(j)},types:["SVG","JPEG","PNG","GIF","JPG"],children:s("div",{className:"flex h-[130px] w-full max-w-full cursor-pointer flex-col items-center justify-center gap-[12px] border-2 border-dashed border-[#D0D5DD] text-sm md:w-[333px]",children:l!=null&&l.name?s("img",{src:Pv(l,"passport-preview"),id:"passport-preview",className:"h-full w-full rounded-sm object-cover"}):f(Se,{children:[s("h4",{className:"text-xl font-semibold",children:"Passport page with photo"}),f("p",{className:"px-[20px]",children:[s("strong",{className:"font-semibold underline",children:"Click to upload"})," or drag and drop SVG, PNG, JPG or GIF (max. 800x400px)"]})]})})})}),f("div",{className:"mb-16 max-w-lg",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"expiry_date",children:["Expiry date ",s("span",{className:"ml-4 text-sm font-normal italic text-red-500",children:(A=N.expiry_date)==null?void 0:A.message})]}),s(No,{control:x,name:"expiry_date",min:e.current,max:new Date("2050-01-01"),setValue:j=>b("expiry_date",j)})]}),f("div",{className:"mb-16 flex gap-4",children:[s($e,{to:-1,className:"rounded border-2 border-gray-700 py-2 px-4 tracking-wide outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:u,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${u?"bg-opacity-50 py-1 px-8":"py-2"} px-4`,children:"Continue"})]})]})}):s(wr,{to:"/"})}function hT(){return h.exports.useEffect(()=>{localStorage.clear()},[]),s("div",{className:"flex items-center justify-center min-h-screen",children:s("h1",{className:"text-4xl",children:"You have requested to delete your account. Please check your email to confirm this operation"})})}function rg(){const[e]=lt(),{dispatch:t}=h.exports.useContext(we),[n,a]=h.exports.useState("Deleting your account");async function r(){t({type:"START_LOADING"});try{const i=await _t("delete-account","post",{token:e.get("token")},"");a("Your account has been deleted"),localStorage.clear()}catch(i){t({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:i.message}})}t({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{r()},[]),e.get("token")?s("div",{className:"flex items-center justify-center min-h-screen",children:s("h1",{className:"text-2xl mb-32",children:n})}):s(wr,{to:"/"})}const UEe=[{label:"Pending",value:0},{label:"Upcoming",value:1},{label:"Ongoing",value:2},{label:"Completed",value:3},{label:"Declined",value:4},{label:"Expired",value:"expired"}];function VEe({modalOpen:e,closeModal:t}){const[n,a]=lt(),{handleSubmit:r,register:i,watch:o,reset:c,setValue:l,control:d,formState:u,resetField:g}=Oe({defaultValues:(()=>{var m,p,b,x,k,N;const S=Ue(n);return{guest_name:(m=S.guest_name)!=null?m:"",from:En((p=S.from)!=null?p:"")?new Date(S.from):new Date,to:En((b=S.to)!=null?b:"")?new Date(S.to):new Date,space_name:(x=S.space_name)!=null?x:"",status:(k=S.status)!=null?k:"",id:(N=S.id)!=null?N:"",direction:"DESC"}})()}),{dirtyFields:y}=u,w=o("from"),v=async S=>{console.log("submitting ",S),n.set("id",S.id),n.set("guest_name",S.guest_name),n.set("space_name",S.space_name),n.set("status",S.status),n.set("from",y!=null&&y.from?S.from.toISOString().split("T")[0]:""),n.set("to",y!=null&&y.to?S.to.toISOString().split("T")[0]:""),a(n),t()};return s(ke,{appear:!0,show:e&&window.innerWidth<700,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"tiny-scroll max-h-fit w-full max-w-md transform overflow-hidden overflow-y-auto rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:r(v),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[f("div",{className:"flex gap-4",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Filters"}),s("button",{type:"button",className:"text-sm text-gray-800 underline",onClick:()=>c({id:"",from:new Date,to:new Date,guest_name:"",status:"",space_name:"",direction:"DESC"},{keepDirty:!1}),children:"Clear"})]}),s("button",{type:"button",onClick:t,className:"text-lg rounded-full border p-1 px-3 font-normal duration-300 hover:bg-gray-200 md:text-2xl",children:"\u2715"})," "]}),s("hr",{className:"my-[10px]"}),f("div",{className:"space-y-6",children:[s("input",{type:"text",placeholder:"ID",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("id")}),f("div",{className:"my-[16px] flex gap-2",children:[s("div",{className:"flex w-1/2 items-center gap-2 whitespace-nowrap rounded-md border bg-white p-2",children:s(Ua,{reset:()=>g("from",{keepDirty:!1,keepTouched:!1}),setValue:S=>l("from",S,{shouldDirty:!0}),control:d,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date("2001-01-01")})}),s("div",{className:"flex w-1/2 items-center gap-2 rounded-md border bg-white p-2",children:s(Ua,{reset:()=>g("to",{keepDirty:!1,keepTouched:!1}),setValue:S=>l("to",S,{shouldDirty:!0}),control:d,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:w})})]}),s("input",{type:"text",placeholder:"Guest name",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("guest_name")}),s("input",{type:"text",placeholder:"Space name",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("space_name")}),f("select",{className:"w-full cursor-pointer border bg-white py-2 px-3 focus:outline-none",...i("status"),children:[s("option",{value:"",children:"All"}),UEe.map(S=>s("option",{value:S.value,children:S.label},S.value))]})]}),s("button",{type:"submit",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",children:"Apply and close"})]})})})})]})})}const Rv=new _e,gT=new AbortController;function WEe(){const[t,n]=h.exports.useState(!1),[a,r]=h.exports.useState([]),[i,o]=h.exports.useState(!1),[c,l]=lt(),[d,u]=h.exports.useState(100),{dispatch:g}=h.exports.useContext(we),{dispatch:y}=h.exports.useContext(Ee),[w,v]=h.exports.useState([]),S=+localStorage.getItem("user")||0,{handleSubmit:m,register:p,watch:b,reset:x,setValue:k,control:N,formState:_,resetField:C}=Oe({defaultValues:(()=>{var H,A,j,I,B,Y;const z=Ue(c);return{guest_name:(H=z.guest_name)!=null?H:"",from:En((A=z.from)!=null?A:"")?new Date(z.from):new Date,to:En((j=z.to)!=null?j:"")?new Date(z.to):new Date,space_name:(I=z.space_name)!=null?I:"",status:(B=z.status)!=null?B:"",id:(Y=z.id)!=null?Y:"",direction:"DESC"}})()}),{dirtyFields:E}=_,T=b("direction"),D=b("from"),P=async z=>{window.innerWidth<700&&n(!1),console.log("submitting",z),r([]),c.set("id",z.id),c.set("guest_name",z.guest_name),c.set("status",z.status),c.set("from",E!=null&&E.from?z.from.toISOString().split("T")[0]:""),c.set("to",E!=null&&E.to?z.to.toISOString().split("T")[0]:""),l(c)};async function M(z){a.every(j=>Object.keys(j).length>0)&&r(j=>{const I=d-j.length>12?12:Math.abs(d-j.length-12);return[...j,...Array(I).fill({})]});const H=Ue(c);var A=[`ergo_booking.host_id = ${S}`];H.guest_name&&A.push(`(ergo_user.first_name LIKE '%${H.guest_name}%' OR ergo_user.last_name LIKE '%${H.guest_name}%'`),H.from&&A.push(`ergo_booking.booking_start_time >= date('${H.from}')`),H.to&&A.push(`ergo_booking.booking_end_time <= date('${H.to}')`),H.space_name&&A.push(`ergo_property.name LIKE '%${H.space_name}%'`),H.status&&(H.status=="expired"?A.push(`ergo_booking.booking_start_time < date('${new Date().toISOString()}')`):A.push(`ergo_booking.status = ${H.status}`)),H.id&&(A=[`ergo_booking.host_id = ${S} AND ergo_booking.id = ${H.id}`]);try{const j=await Rv.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:z!=null?z:1,limit:12,where:A,sortId:"update_at",direction:"DESC"},"POST",gT.signal);Array.isArray(j.list)&&(r(I=>[...I.filter(B=>Object.keys(B).length>0),...j.list].filter((B,Y,U)=>U.findIndex(W=>W.id===B.id)===Y)),u(j.total))}catch(j){if(me(y,j.message),j.name=="AbortError")return;g({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:j.message}})}}async function O(){const z={user_id:`${S}`};Rv.setTable("user_property_spaces");try{const H=await Rv.callRestAPI({payload:z},"GETALL",gT.signal);Array.isArray(H.list)&&v(H.list)}catch(H){if(me(y,H.message),H.name=="AbortError"){g({type:"STOP_LOADING"});return}g({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:H.message}})}g({type:"STOP_LOADING"})}h.exports.useEffect(()=>{M()},[c]),h.exports.useEffect(()=>{i&&(O(),r([]),M(1))},[i]),h.exports.useEffect(()=>{O()},[]);const F=(z,H)=>T=="DESC"?new Date(H.id)-new Date(z.id):new Date(z.id)-new Date(H.id);return f("div",{className:"min-h-screen bg-white pt-[44px] pb-40 text-sm md:text-base",children:[s("section",{children:f("form",{onSubmit:m(P),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>n(z=>!z),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:N,name:"direction"})]}),f("div",{className:` ${t?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s("input",{type:"text",placeholder:"ID",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...p("id")}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>C("from",{keepDirty:!1,keepTouched:!1}),setValue:z=>k("from",z,{shouldDirty:!0}),control:N,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date("2001-01-01")})}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>C("to",{keepDirty:!1,keepTouched:!1}),setValue:z=>k("to",z,{shouldDirty:!0}),control:N,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:D})}),s("input",{type:"text",placeholder:"Guest name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...p("guest_name")}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...p("space_name")}),s(fa,{items:[{label:"All",value:""},{label:"Pending",value:0},{label:"Upcoming",value:1},{label:"Ongoing",value:2},{label:"Completed",value:3},{label:"Declined",value:4},{label:"Expired",value:"expired"}],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All",control:N,name:"status"}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),a.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," You have no bookings"]})}),s(Pc,{overflow:!0,dataLength:a.length,next:()=>{M(Math.round(a.length/12+1))},scrollThreshold:.9,hasMore:a.length<d,loader:s(Se,{}),endMessage:a.length>10&&s("p",{className:"text-center normal-case",children:s("b",{})}),children:a.sort(F).map((z,H)=>{var A,j,I;return s(yF,{data:z,tourReview:"twentyone-step",forceRender:o,favoriteId:(j=(A=w.find(B=>B.property_spaces_id==z.property_space_id))==null?void 0:A.id)!=null?j:null},(I=z.id)!=null?I:H)})}),s(VEe,{modalOpen:t,closeModal:()=>n(!1)})]})}const YEe=["Pending","Upcoming","Ongoing","Completed","Declined","Canceled","Expired"],GEe=["text-white","my-text-gradient","text-[#667085]","text-[#667085]","text-[#D92D20]","text-[#DC6803]","text-[#D92D20] !bg-[#F2F4F7]"];let Zo=new _e;function qEe(){var ne,oe,q,te,G,J,K,Q,Z,se,ce,le;const{dispatch:e,state:t}=h.exports.useContext(we),{state:n}=h.exports.useContext(Ee),a=je(),{id:r}=Mt(),[i,o]=h.exports.useState({}),[c,l]=h.exports.useState(!1),d=cr(c,100),[u,g]=h.exports.useState(0),[y,w]=h.exports.useState([{name:"Test",id:12}]),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState(!1),[b,x]=h.exports.useState(!1),k=i.booking_start_time&&i.status<ut.ONGOING?new Date(i.booking_start_time)<Date.now():!1,{register:N,handleSubmit:_,watch:C,reset:E}=Oe(),T=C("rating");C("host_rating");const D=C("hashtags",[]),[P,M]=h.exports.useState(!1),[O,F]=h.exports.useState(!1);h.exports.useEffect(()=>{Array.isArray(D)&&g(D==null?void 0:D.filter(Boolean).length)},[D]);const z=Px(i.customer_id),{propertySpace:H}=Jl(i.property_space_id,v);async function A(ae,ie){try{Zo.setTable("review_hashtag"),ae.map(de=>Zo.callRestAPI({hashtag_id:de,review_id:ie},"POST")),await Promise.all(ae)}catch(de){console.log("Error",de)}}const j=async ae=>{console.log("submitting",ae),p(!0);let ie={customer_id:i.customer_id,host_id:i.host_id,property_spaces_id:i.property_space_id,booking_id:i.id,comment:ae.comment,customer_rating:ae.rating,host_rating:null,space_rating:null,post_date:new Date().toISOString(),given_by:"host",received_by:"customer"};try{const de=await _t("review","post",ie,"POST");await A(ae.hashtags,de.message),Zo.setTable("notification"),await Zo.callRestAPI({user_id:Number(localStorage.getItem("user")),actor_id:null,action_id:de.message,notification_time:new Date().toISOString().split(".")[0],message:"New Review Added",type:za.ADD_REVIEW,status:rr.NOT_ADDRESSED},"POST"),p(!1),l(!1),e({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Review added successful",btn:"Ok got it"}}),E()}catch(de){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:de.message}})}p(!1)};async function I(ae){var de;e({type:"START_LOADING"});const ie=[`ergo_booking.id = ${ae}`];try{const fe=await _t("booking/details","post",{where:ie},"");o((de=fe.list)!=null?de:{})}catch(fe){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:fe.message}})}e({type:"STOP_LOADING"})}async function B(){try{const ae=await _t("hashtag","post",{page:1,limit:1e3},"PAGINATE");Array.isArray(ae.list)&&w(ae.list)}catch(ae){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:ae.message}})}}async function Y(ae){const ie={id:ae,booked_unit:1,status:ut.CANCELLED};try{await _t("booking","post",ie,"PUT"),data.status===ut.UPCOMING&&await Zo.callRawAPI("/v2/api/custom/ergo/refund",{booking_id:data.id,stripe_payment_intent_id:data.stripe_payment_intent_id},"POST"),U(i.customer_id,i.property_name,`from ${Te(i.booking_start_time).format("MM/DD/YYYY")} to ${Te(i.booking_end_time).format("MM/DD/YYYY")}`,reason),I(ae)}catch(de){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:de.message}})}}async function U(ae,ie,de){var fe,be;try{const he=await _t("get-user","post",{id:ae},""),ve=await Zo.getEmailTemplate("booking-cancelled");if(on(he.settings,{}).email_on_booking_cancelled==!0){const Ce=(fe=ve.html)==null?void 0:fe.replace(new RegExp("{{{space_name}}}","g"),ie).replace(new RegExp("{{{time}}}","g"),de);await Zo.sendEmail(he.email,ve.subject,Ce)}if(on(t.user.settings,{}).email_on_booking_cancelled==!0){const Ce=(be=ve.html)==null?void 0:be.replace(new RegExp("{{{space_name}}}","g"),ie).replace(new RegExp("{{{time}}}","g"),de);await Zo.sendEmail(t.user.email,ve.subject,Ce)}}catch{}}h.exports.useEffect(()=>{(async()=>(await I(r),B()))()},[]);const{latitude:W,longitude:V,done:X}=H5();return f("div",{className:"text-sm normal-case md:text-base",children:[s("div",{children:f("button",{type:"button",onClick:()=>a("/account/my-bookings"),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"mb-[22px] flex flex-col justify-between md:flex-row",children:[f("h1",{className:"mr-3 mb-[24px] text-3xl font-semibold text-[#101828] md:mb-0",children:["Booking - ",i.property_name]}),f("div",{className:"flex items-center gap-[16px]",children:[s("h4",{className:"font-semibold",children:"Status"}),f("span",{className:`${i.status==ut.PENDING?"bg-[#1D2939]":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${GEe[k?6:(ne=i.status)!=null?ne:0]} border text-sm font-semibold uppercase`,children:[" ",YEe[k?6:(oe=i.status)!=null?oe:0]]}),s("div",{className:"flex flex-grow justify-end",children:s("div",{className:`${k?"hidden":"block"} "border p-1 px-2 md:border-0"`,children:s(Zl,{items:[{label:"Cancel booking",icon:s(Se,{}),onClick:()=>Y(i.id),notShow:i.status==ut.COMPLETED||i.status==ut.PENDING||i.status==ut.CANCELLED||k},{label:"Accept booking",icon:s(Se,{}),onClick:()=>F(!0),notShow:i.status!==ut.PENDING||k},{label:"Decline booking",icon:s(Se,{}),onClick:()=>M(!0),notShow:i.status!==ut.PENDING||k},{label:"Review customer",icon:s(Se,{}),onClick:()=>l(!0),notShow:i.status!=ut.COMPLETED||k}]})})})]})]}),f("div",{className:"flex flex-wrap items-start md:gap-[24px]",children:[f("div",{className:"w-full md:w-[55%]",children:[s("div",{className:"mb-[32px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[20px] py-[16px]",children:f("div",{className:"flex items-start gap-[12px]",children:[s(Za,{width:60}),f("div",{children:[s("h3",{className:"text-lg font-semibold text-[#101828]",children:"What's next"}),f("p",{className:"text-[#667085]",children:["You booking has been sent to the host and will be reviewed within 2 hours. If you don\u2019t hear form the host withing 2h you can cancel your booking or reach out to them via"," ",s($e,{className:"font-semibold underline",to:`/account/messages?other_user_id=${i.customer_id}&booking=${i.id}&space=${i.property_space_id}`,children:"Messages"})," "]})]})]})}),s("li",{className:"mb-6 text-xl font-semibold",children:"Booking Time"}),f("div",{className:"mb-[32px] flex items-center justify-around rounded-lg border border-[#EAECF0] px-[20px] py-[16px]",children:[f("div",{className:"w-[80px] rounded-lg border text-center",children:[s("p",{className:"rounded-t-lg bg-black py-2 uppercase text-white",children:(q=Rr[new Date(i.booking_start_time).getMonth()])!=null?q:"N/A"}),s("strong",{className:"text-3xl",children:new Date(i.booking_start_time).getDate()||"N/A"}),s("p",{className:"uppercase text-[#667085]",children:(te=sr[new Date(i.booking_start_time).getDay()])!=null?te:"N/A"})]}),f("div",{className:"flex flex-col gap-[10px] md:flex-row md:gap-[67px]",children:[f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"From"}),s("strong",{children:Pn((G=i.booking_start_time)!=null?G:"01/01/01")})," "]}),f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"Until"}),s("strong",{children:Pn((J=i.booking_end_time)!=null?J:"01/01/01")})]})]})]}),f("div",{className:"mb-6 flex items-center justify-between",children:[s("li",{className:"text-xl font-semibold",children:"Space: "}),i.status==ut.COMPLETED?s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent",onClick:()=>{l(!0)},children:"Add Review"}):null]}),f("div",{className:"mb-[32px] flex max-w-full flex-col rounded-lg border border-[#EAECF0] bg-[#F9FAFB] lg:h-[167px] lg:w-[unset] lg:flex-row lg:gap-[32px]",children:[s("div",{className:"mb-[8px] flex h-[180px] w-full flex-col rounded-lg bg-cover bg-center bg-no-repeat px-[10px] pb-[13px] lg:h-full lg:w-[262px]",style:{backgroundImage:`url(${(K=i.image_url)!=null?K:"/default-property.jpg"})`},children:s(ls,{space_id:H.id,user_property_spaces_id:H.user_property_spaces_id,reRender:S,withLoader:!0})}),f("div",{className:"flex flex-grow items-end justify-between py-6 pl-4 pr-4 lg:items-start lg:pl-0 lg:pr-8",children:[f("div",{className:"",children:[s("h2",{className:"mb-[6px] text-[18px] font-semibold",children:i.property_name}),s("p",{className:"max-w-[250px] truncate text-sm tracking-wider text-[#475467]",children:[ut.UPCOMING,ut.ONGOING].includes(i.status)?H.address_line_1:H.city}),s("p",{className:"max-w-[250px] truncate text-sm tracking-wider text-[#475467]",children:[ut.UPCOMING,ut.ONGOING].includes(i.status)?H.address_line_2:H.country}),f("div",{className:"mt-[6px] flex lg:mt-[21px]",children:[f("p",{className:"mr-[31px]",children:["from: ",f("span",{className:"font-bold",children:["$",(Number(i.hourly_rate)||0).toFixed(2)]}),"/",s("span",{className:"",children:"day"})]}),f("div",{className:"flex items-center gap-2",children:[s(Zc,{}),s("span",{children:H.max_capacity})]})]})]}),f("div",{className:"flex flex-col items-center",children:[f("p",{className:"flex items-center gap-2 lg:mb-[9px]",children:[s(ds,{}),f("strong",{className:"font-semibold",children:[(Number(H.average_space_rating)||0).toFixed(1),f("span",{className:"font-normal",children:["(",H.space_rating_count,")"]})]})]}),[ut.COMPLETED,ut.ONGOING,ut.UPCOMING].includes(i.status)?s("a",{href:`https://www.google.com/maps/dir/?api=1&origin=${W+","+V}&destination=${H.address_line_1+", "+H.address_line_2+" "+H.city+" "+H.country}`,target:"_blank",className:"hidden whitespace-nowrap text-xs text-[#475467] underline lg:inline",children:"(view on map)"}):s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:ae=>{x(!0)},children:"(view on map)"})]})]})]}),i.add_ons!==void 0&&((Q=i==null?void 0:i.add_ons)==null?void 0:Q.length)>0&&s("li",{className:"mb-6 text-xl font-semibold",children:"Add-ons:"}),s("div",{className:"mb-32 flex flex-wrap gap-x-24 gap-y-4",children:((Z=i.add_ons)!=null?Z:[]).map((ae,ie)=>f("div",{className:"flex gap-[14px]",children:[s(ur,{}),s("p",{children:ae.name})]},ie))})]}),f("div",{className:"max-w-full flex-grow",children:[f("div",{className:"mb-[32px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[20px] py-[24px]",children:[s("h3",{className:"mb-[8px] font-semibold md:text-2xl",children:"Your Guest"}),f("div",{className:"flex flex-wrap items-center justify-between",children:[f("div",{className:"mb-4 flex items-center gap-4",children:[s("img",{src:z.photo||"/default.png",className:"h-[48px] w-[48px] rounded-full object-cover"}),s("p",{className:"font-semibold md:text-xl",children:((se=i.customer_first_name)!=null?se:"")+" "+((ce=i.customer_last_name)!=null?ce:"")})]}),s($e,{className:"my-text-gradient whitespace-nowrap rounded-md border border-[#33D4B7] px-4 py-2 text-center text-sm font-semibold md:w-[158px]",to:`/account/messages?other_user_id=${i.customer_id}&booking=${i.id}&space=${i.property_space_id}`,disabled:i.id==null,children:"Chat with customer"})]})]}),n.role=="customer"&&f("div",{className:"mb-[16px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] p-[20px] md:p-[32px]",children:[s("h4",{className:"mb-[8px] text-2xl font-semibold",children:"Charges"}),s("p",{className:"mb-[16px] text-sm text-[#667085]",children:"(You will not be charged until the host accepts your booking)"}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Rate"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(i.hourly_rate||0).toFixed(2)]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Price"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(i.hourly_rate*(i.duration/3600)||0).toFixed(2)]})]}),((le=i.add_ons)!=null?le:[]).map(ae=>f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:ae.name}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(ae.cost||0).toFixed(2)]})]},ae.id)),f("div",{className:"mb-[16px] flex justify-between",children:[s("p",{children:"Tax"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(i.tax||0).toFixed(2)]})]}),f("div",{className:"-mx-3 mb-[12px] flex justify-between bg-black p-3 font-bold text-white",children:[s("p",{children:"Total"}),f("p",{children:[" $",(i.total||0).toFixed(2)]})]})]}),s($e,{to:"/help/cancellation-policy",target:"_blank",className:"block text-center font-semibold text-[#667085] underline",children:"Cancellation policy"})]})]}),d&&s("div",{className:"popup-container flex items-center justify-center normal-case twentyone-step",onClick:()=>l(!1),children:f("form",{className:`${c?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:ae=>ae.stopPropagation(),onSubmit:_(j),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"text-2xl font-semibold",children:"Leave a review"}),s("button",{type:"button",onClick:()=>l(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("p",{className:"mb-[16px] text-sm text-[#475467]",children:"Leave a review to let others know about your experience with the space and the customer."}),f("div",{children:[s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Select rating"}),s("div",{className:"select-rating-container mb-[24px] flex gap-4",children:[1,2,3,4,5].map(ae=>f("label",{htmlFor:"rating_"+ae,children:[s("input",{type:"radio",...N("rating"),value:ae,id:"rating_"+ae}),s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:!T||T<ae?"none":"#33D4B7",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:!T||T<ae?"#98A2B3":"#33D4B7"})})]}))}),f("h4",{className:"mb-[8px] text-xl font-semibold",children:["Select Hashtags ",s("small",{className:"text-xs font-normal text-gray-600",children:"(max 3)"})]}),s("div",{className:"tiny-scroll mb-3 max-h-[150px] overflow-y-auto border p-4 text-sm",children:y.map((ae,ie)=>f("div",{className:" flex items-center gap-2 pb-4",children:[s("input",{type:"checkbox",...N("hashtags"),id:"hashtag_"+ae.id,disabled:D&&u>=3&&!D.includes(ae.id.toString()),value:ae.id}),s("label",{htmlFor:"hashtag_"+ae.id,className:"cursor-pointer",children:ae.name})]},ae.id))}),s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Comment"}),s("textarea",{...N("comment"),cols:"30",rows:"5",className:"w-full resize-none border p-3 text-sm focus:outline-none active:outline-none"}),s(Ft,{loading:m,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${m?"py-1":"py-2"} mt-4 w-full`,children:"Submit"})]})]})}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${H.address_line_1||""}, ${H.address_line_2||""}, ${H.city||""}, ${H.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${H.address_line_1||""}, ${H.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:b,closeModal:()=>x(!1)}),s(gF,{modalOpen:P,closeModal:()=>M(!1),onSuccess:()=>I(r),booking:i}),s(bF,{modalOpen:O,closeModal:()=>F(!1),onSuccess:()=>I(r),booking:i})]})}let pm=new _e;function ZEe({data:e,forceRender:t,favoriteId:n}){var v,S,m,p,b,x,k,N,_,C;const a=["Pending","Upcoming","Ongoing","Completed","Declined","Canceled","Expired"],r=["text-white","my-text-gradient","text-[yellow]","text-[#667085]","text-[#D92D20]","text-[#DC6803]","text-[#D92D20] !bg-[#F2F4F7]"],{dispatch:i,state:o}=h.exports.useContext(we),[c,l]=h.exports.useState(!1),d=e.booking_start_time&&e.status<2?new Date(e.booking_start_time)<Date.now():!1,[u,g]=h.exports.useState({});async function y(E){const T={id:E,booked_unit:1,status:ut.CANCELLED};try{await _t("booking","post",T,"PUT"),e.status===ut.UPCOMING?await pm.callRawAPI("/v2/api/custom/ergo/refund",{booking_id:e.id,stripe_payment_intent_id:e.stripe_payment_intent_id},"POST"):await pm.callRawAPI("/v2/api/custom/ergo/capture",{booking_id:e.id,status:5,stripe_payment_intent_id:e.stripe_payment_intent_id},"POST"),w(e.host_id,e.property_name,`from ${Te(e.booking_start_time).format("MM/DD/YYYY")} to ${Te(e.booking_end_time).format("MM/DD/YYYY")}`),t&&t(new Date)}catch(D){i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:D.message}})}}async function w(E,T,D){var P,M;try{const O=await _t("get-user","post",{id:E},""),F=await pm.getEmailTemplate("booking-cancelled");if(on(O.settings,{}).email_on_booking_cancelled==!0){const z=(P=F.html)==null?void 0:P.replace(new RegExp("{{{space_name}}}","g"),T).replace(new RegExp("{{{time}}}","g"),D);await pm.sendEmail(O.email,F.subject,z)}if(on(o.user.settings,{}).email_on_booking_cancelled==!0){const z=(M=F.html)==null?void 0:M.replace(new RegExp("{{{space_name}}}","g"),T).replace(new RegExp("{{{time}}}","g"),D);await pm.sendEmail(o.user.email,F.subject,z)}}catch{}}return h.exports.useEffect(()=>{if(e.status!=ut.UPCOMING&&!d)return;let E=null;if(!e.booking_start_time)return()=>clearInterval(E);E=setInterval(()=>{const T=xR(e.booking_start_time);g(T)},1e3)},[e.booking_start_time]),f(Se,{children:[f("div",{className:"mb-10 hidden border lg:flex",children:[f("div",{className:"relative min-w-[16rem]",children:[s("img",{src:e.image_url,onLoad:()=>l(!0),alt:"",className:"absolute top-0 left-0 h-full w-full object-cover"}),e.status==ut.UPCOMING&&!d&&s("div",{className:"absolute inset-0 flex items-end justify-start px-4 py-2 normal-case",children:f("div",{className:"flex rounded-md bg-[#13131366] py-1 px-2 font-semibold text-white",children:[s(E1,{className:"h-6 w-6"})," ",s("span",{className:"mx-1",children:u.timeLeft}),s("span",{className:"normal-case",children:u.format})]})}),s("div",{className:"absolute inset-0 px-2",children:s(ls,{className:"flex flex-grow justify-end pt-2",space_id:e.property_space_id,user_property_spaces_id:n,reRender:t,withLoader:!0})}),!c&&s(Ut,{className:"absolute -top-1 left-0 h-full w-full"})]}),f("div",{className:"flex flex-grow gap-16 px-8 py-6 xl:gap-24 2xl:gap-32",children:[f("div",{className:"flex max-w-sm flex-grow flex-col space-y-3",children:[s("h3",{className:"text-2xl font-semibold",children:e.property_name||s(Ut,{width:180})}),f("p",{className:"tracking-wider",children:[" ",e.property_name?(v=[1,2].includes(e.status)&&!d?e.address_line_1:e.property_city)!=null?v:"N/A":s(Ut,{width:150})]}),f("p",{className:"tracking-wider",children:[" ",e.property_name?(S=[1,2].includes(e.status)&&!d?e.address_line_2:e.property_country)!=null?S:"N/A":s(Ut,{width:150})]}),e.property_name?f("p",{className:"tracking-wider",children:[s("span",{children:"Host"}),": ",e.host_first_name," ",e.host_last_name]}):s(Ut,{width:100})]}),f("div",{className:"flex flex-col justify-between",children:[e.booking_start_time?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Date"}),s("strong",{className:"whitespace-nowrap",children:Rr[new Date(e.booking_start_time).getMonth()]+" "+new Date(e.booking_start_time).getDate()+"/"+new Date(e.booking_start_time).getFullYear()})]}):s(Ut,{width:100}),e.duration?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Duration"}),s("strong",{className:"whitespace-nowrap",children:iy(e.duration)})]}):s(Ut,{width:100}),e.duration?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Total Price"}),f("strong",{className:"whitespace-nowrap",children:["$",(((m=e==null?void 0:e.total)!=null?m:0)+((p=e==null?void 0:e.addon_cost)!=null?p:0)).toFixed(2)]})]}):s(Ut,{width:100})]}),f("div",{className:"flex w-full items-end justify-between lg:w-[200px] lg:flex-col lg:items-end lg:justify-center",children:[f("span",{className:`${e.status==0?"bg-black":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${r[d?6:(b=e.status)!=null?b:0]} mb-[16px] border text-sm font-semibold uppercase`,children:[" ",a[d?6:(x=e.status)!=null?x:0]]}),e.id&&s($e,{className:"mb-[32px] hidden text-sm font-semibold underline lg:inline w-full text-end",to:"/account/my-bookings/"+e.id,children:"View details"}),!d&&s("button",{className:`${e.status<2?"inline":"hidden"} text-sm font-semibold text-[#667085]`,onClick:()=>y(e.id),children:"Cancel"})]})]})]}),f("div",{className:"mb-10 flex items-start justify-between border lg:hidden",children:[f("div",{className:"w-1/2",children:[f("div",{className:"relative h-40",children:[s("img",{src:e.image_url,onLoad:()=>l(!0),alt:"",className:"absolute top-0 left-0 h-full w-full object-cover"}),!c&&s(Ut,{className:"absolute -top-1 left-0 h-full w-full"}),e.status==ut.UPCOMING&&!d&&s("div",{className:"absolute inset-0 flex items-end justify-start px-4 py-2 normal-case",children:f("div",{className:"flex rounded-md bg-[#13131366] py-1 px-2 font-semibold text-white",children:[s(E1,{className:"h-6 w-6"})," ",s("span",{className:"mx-1",children:u.timeLeft}),s("span",{className:"normal-case",children:u.format})]})})]}),f("div",{className:"p-4",children:[s("h3",{className:"mb-2 text-2xl font-semibold",children:e.property_name||s(Ut,{width:180})}),f("p",{className:"mb-2 tracking-wider",children:[" ",e.property_name?(k=[1,2].includes(e.status)&&!d?e.address_line_1:e.property_city)!=null?k:"N/A":s(Ut,{width:150})]}),f("p",{className:"mb-2 tracking-wider",children:[" ",e.property_name?(N=[1,2].includes(e.status)&&!d?e.address_line_2:e.property_country)!=null?N:"N/A":s(Ut,{width:150})]}),e.property_name?f("p",{className:"mb-2 tracking-wider",children:[s("span",{children:"Host"}),": ",e.host_first_name," ",e.host_last_name]}):s(Ut,{width:100})]})]}),f("div",{className:"flex flex-col items-center justify-center gap-4 pt-4 pr-3",children:[f("span",{className:`${e.status==0?"bg-black":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${r[d?6:(_=e.status)!=null?_:0]} mb-[16px] border text-sm font-semibold uppercase`,children:[" ",a[d?6:(C=e.status)!=null?C:0]]}),e.id&&s($e,{className:"mb-[32px] text-sm font-semibold underline",to:"/account/my-bookings/"+e.id,children:"View details"}),!d&&s("button",{className:`${e.status<2?"inline":"hidden"} text-sm font-semibold text-[#667085]`,onClick:()=>y(e.id),children:"Cancel"})]})]})]})}const QEe=[{label:"Pending",value:0},{label:"Upcoming",value:1},{label:"Ongoing",value:2},{label:"Completed",value:3},{label:"Declined",value:4},{label:"Expired",value:"expired"}];function JEe({modalOpen:e,closeModal:t}){const[n,a]=lt(),{handleSubmit:r,register:i,watch:o,reset:c,setValue:l,control:d,formState:u,resetField:g}=Oe({defaultValues:(()=>{var m,p,b,x,k,N;const S=Ue(n);return{host_name:(m=S.host_name)!=null?m:"",from:En((p=S.from)!=null?p:"")?new Date(S.from):new Date,to:En((b=S.to)!=null?b:"")?new Date(S.to):new Date,space_name:(x=S.space_name)!=null?x:"",status:(k=S.status)!=null?k:"",id:(N=S.id)!=null?N:"",direction:"DESC"}})()}),{dirtyFields:y}=u,w=o("from"),v=async S=>{console.log("submitting ",S),n.set("id",S.id),n.set("host_name",S.host_name),n.set("space_name",S.space_name),n.set("status",S.status),n.set("from",y!=null&&y.from?S.from.toISOString().split("T")[0]:""),n.set("to",y!=null&&y.to?S.to.toISOString().split("T")[0]:""),a(n),t()};return s(ke,{appear:!0,show:e&&window.innerWidth<700,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"tiny-scroll max-h-fit w-full max-w-md transform overflow-hidden overflow-y-auto rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:r(v),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[f("div",{className:"flex gap-4",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Filters"}),s("button",{type:"button",className:"text-sm text-gray-800 underline",onClick:()=>c({id:"",from:new Date,to:new Date,host_name:"",status:"",space_name:"",direction:"DESC"},{keepDirty:!1}),children:"Clear"})]}),s("button",{type:"button",onClick:t,className:"text-lg rounded-full border p-1 px-3 font-normal duration-300 hover:bg-gray-200 md:text-2xl",children:"\u2715"})," "]}),s("hr",{className:"my-[10px]"}),f("div",{className:"space-y-6",children:[s("input",{type:"text",placeholder:"ID",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("id")}),f("div",{className:"my-[16px] flex gap-2",children:[s("div",{className:"flex w-1/2 items-center gap-2 whitespace-nowrap rounded-md border bg-white p-2",children:s(Ua,{reset:()=>g("from",{keepDirty:!1,keepTouched:!1}),setValue:S=>l("from",S,{shouldDirty:!0}),control:d,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date("2001-01-01")})}),s("div",{className:"flex w-1/2 items-center gap-2 rounded-md border bg-white p-2",children:s(Ua,{reset:()=>g("to",{keepDirty:!1,keepTouched:!1}),setValue:S=>l("to",S,{shouldDirty:!0}),control:d,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:w})})]}),s("input",{type:"text",placeholder:"Host name",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("host_name")}),s("input",{type:"text",placeholder:"Space name",className:"my-[16px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...i("space_name")}),f("select",{className:"w-full cursor-pointer border bg-white py-2 px-3 focus:outline-none",...i("status"),children:[s("option",{value:"",children:"All"}),QEe.map(S=>s("option",{value:S.value,children:S.label},S.value))]})]}),s("button",{type:"submit",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",children:"Apply and close"})]})})})})]})})}const jv=new _e,KEe=new AbortController;function XEe(){const[t,n]=h.exports.useState(!1),[a,r]=h.exports.useState([]),[i,o]=h.exports.useState(!1),[c,l]=lt(),[d,u]=h.exports.useState(100),{dispatch:g}=h.exports.useContext(we),{dispatch:y}=h.exports.useContext(Ee),[w,v]=h.exports.useState([]),S=+localStorage.getItem("user")||0,{handleSubmit:m,register:p,watch:b,reset:x,setValue:k,control:N,formState:_,resetField:C}=Oe({defaultValues:(()=>{var H,A,j,I,B,Y;const z=Ue(c);return{host_name:(H=z.host_name)!=null?H:"",from:En((A=z.from)!=null?A:"")?new Date(z.from):new Date,to:En((j=z.to)!=null?j:"")?new Date(z.to):new Date,space_name:(I=z.space_name)!=null?I:"",status:(B=z.status)!=null?B:"",id:(Y=z.id)!=null?Y:"",direction:"DESC"}})()}),{dirtyFields:E}=_,T=b("direction"),D=b("from"),P=async z=>{window.innerWidth<700&&n(!1),console.log("submitting",z),r([]),c.set("id",z.id),c.set("host_name",z.host_name),c.set("status",z.status),c.set("from",E!=null&&E.from?z.from.toISOString().split("T")[0]:""),c.set("to",E!=null&&E.to?z.to.toISOString().split("T")[0]:""),l(c)};async function M(z){a.every(j=>Object.keys(j).length>0)&&r(j=>{const I=d-j.length>12?12:Math.abs(d-j.length-12);return[...j,...Array(I).fill({})]});const H=Ue(c);var A=[`ergo_booking.customer_id = ${S} AND ergo_booking.deleted_at IS NULL`];H.host_name&&A.push(`(ergo_user.first_name LIKE '%${H.host_name}%' OR ergo_user.last_name LIKE '%${H.host_name}%'`),H.from&&A.push(`ergo_booking.booking_start_time >= date('${H.from}')`),H.to&&A.push(`ergo_booking.booking_end_time <= date('${H.to}')`),H.space_name&&A.push(`ergo_property.name LIKE '%${H.space_name}%'`),H.status&&(H.status=="expired"?A.push(`ergo_booking.booking_start_time < date('${new Date().toISOString()}')`):A.push(`ergo_booking.status = ${H.status} AND ergo_booking.booking_start_time > date('${new Date().toISOString()}')`)),H.id&&(A=[`ergo_booking.customer_id = ${S} AND ergo_booking.id = ${H.id}`]);try{const j=await jv.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:z!=null?z:1,limit:12,where:A,sortId:"update_at",direction:"DESC"},"POST",KEe.signal);Array.isArray(j.list)&&(r(I=>[...I.filter(B=>Object.keys(B).length>0),...j.list].filter((B,Y,U)=>U.findIndex(W=>W.id===B.id)===Y)),u(j.total))}catch(j){if(me(y,j.message),j.name=="AbortError")return;g({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:j.message}})}}async function O(){const z={user_id:`${S}`};jv.setTable("user_property_spaces");try{const H=await jv.callRestAPI({payload:z},"GETALL");Array.isArray(H.list)&&v(H.list)}catch(H){if(me(y,H.message),H.name=="AbortError"){g({type:"STOP_LOADING"});return}g({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:H.message}})}g({type:"STOP_LOADING"})}h.exports.useEffect(()=>{M()},[c]),h.exports.useEffect(()=>{i&&(O(),r([]),M(1))},[i]),h.exports.useEffect(()=>{O()},[]);const F=(z,H)=>T=="DESC"?new Date(H.update_at)-new Date(z.update_at):new Date(z.update_at)-new Date(H.update_at);return f("div",{className:"min-h-screen bg-white pt-[44px] pb-40 text-sm md:text-base",children:[s("section",{children:f("form",{onSubmit:m(P),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>n(z=>!z),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:N,name:"direction"})]}),f("div",{className:` ${t?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>C("from",{keepDirty:!1,keepTouched:!1}),setValue:z=>k("from",z,{shouldDirty:!0}),control:N,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",min:new Date("2001-01-01")})}),s("div",{className:"z-10 flex min-w-[190px] items-center gap-2 rounded-md border bg-white px-2",children:s(Ua,{reset:()=>C("to",{keepDirty:!1,keepTouched:!1}),setValue:z=>k("to",z,{shouldDirty:!0}),control:N,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",min:D})}),s("input",{type:"text",placeholder:"Host name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...p("host_name")}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...p("space_name")}),s(fa,{items:[{label:"All",value:""},{label:"Pending",value:0},{label:"Upcoming",value:1},{label:"Ongoing",value:2},{label:"Completed",value:3},{label:"Declined",value:4},{label:"Expired",value:"expired"}],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"All",control:N,name:"status"}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),a.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," You have no bookings"]})}),s(Pc,{overflow:!0,dataLength:a.length,next:()=>{console.log("calling next",a.length/12+1),M(Math.round(a.length/12+1))},scrollThreshold:.9,hasMore:a.length<d,loader:s(Se,{}),endMessage:a.length>10&&s("p",{className:"text-center normal-case",children:s("b",{})}),children:a.sort(F).map((z,H)=>{var A,j,I;return s(ZEe,{data:z,forceRender:o,favoriteId:(j=(A=w.find(B=>B.property_spaces_id==z.property_space_id))==null?void 0:A.id)!=null?j:null},(I=z.id)!=null?I:H)})}),s(JEe,{modalOpen:t,closeModal:()=>n(!1)})]})}new _e;const e8e=["Pending","Upcoming","Ongoing","Completed","Declined","Canceled","Expired"],t8e=["text-white","my-text-gradient","text-[#667085]","text-[#667085]","text-[#D92D20]","text-[#DC6803]","text-[#D92D20] !bg-[#F2F4F7]"];let Pa=new _e,Ed=new AbortController;function n8e(){var J,K,Q,Z,se,ce,le,ae,ie,de,fe,be;const{dispatch:e,state:t}=h.exports.useContext(we),{dispatch:n,state:a}=h.exports.useContext(Ee),r=je(),{id:i}=Mt(),[o,c]=h.exports.useState({});h.exports.useState(),h.exports.useState(!1);const[l,d]=h.exports.useState(!1),u=cr(l,100),[g,y]=h.exports.useState(0),[w,v]=h.exports.useState([{name:"Test",id:12}]),[S,m]=h.exports.useState(!1),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);h.exports.useState(!1),h.exports.useState(void 0),h.exports.useState(!1),h.exports.useState(!1),Ox({loader:!1}),NS("pk_test_51Ll5ukBgOlWo0lDUrBhA2W7EX2MwUH9AR5Y3KQoujf7PTQagZAJylWP1UOFbtH4UwxoufZbInwehQppWAq53kmNC00UIKSmebO");const N=o.booking_start_time&&o.status<ut.ONGOING?new Date(o.booking_start_time)<Date.now():!1,{register:_,handleSubmit:C,watch:E,reset:T}=Oe(),D=E("rating"),P=E("host_rating"),M=E("hashtags",[]),[O,F]=h.exports.useState(!1),z=cr(O,300),[H,A]=h.exports.useState("");h.exports.useEffect(()=>{Array.isArray(M)&&y(M==null?void 0:M.filter(Boolean).length)},[M]);const j=Px(o.host_id),{propertySpace:I}=Jl(o.property_space_id,S);async function B(he,ve){try{Pa.setTable("review_hashtag"),he.map(Ce=>Pa.callRestAPI({hashtag_id:Ce,review_id:ve},"POST")),await Promise.all(he)}catch(Ce){console.log("Error",Ce)}}const Y=async he=>{console.log("submitting",he),b(!0);let ve={customer_id:o.customer_id,host_id:o.host_id,property_spaces_id:o.property_space_id,property_name:o.property_name,booking_id:o.id,comment:he.comment,customer_rating:null,host_rating:he.host_rating,space_rating:he.rating,post_date:new Date().toISOString(),given_by:"customer",received_by:"host"};try{const Ce=await Pa.callRawAPI("/v2/api/custom/ergo/review/POST",ve,"POST",Ed.signal);await B(he.hashtags,Ce.message),Pa.setTable("notification"),await Pa.callRestAPI({user_id:Number(localStorage.getItem("user")),actor_id:null,action_id:Ce.message,notification_time:new Date().toISOString().split(".")[0],message:"New Review Added",type:za.ADD_REVIEW,status:rr.NOT_ADDRESSED},"POST"),b(!1),d(!1),e({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Review added successful",btn:"Ok got it"}}),T()}catch(Ce){if(me(n,Ce.message),Ce.name=="AbortError"){b(!1);return}e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ce.message}})}b(!1)};async function U(he){var Ce,nt;e({type:"START_LOADING"});const ve=[`ergo_booking.id = ${he} AND ergo_booking.deleted_at IS NULL`];try{const Ae=await Pa.callRawAPI("/v2/api/custom/ergo/booking/details",{where:ve},"POST",Ed.signal);return c((Ce=Ae.list)!=null?Ce:{}),(nt=Ae.list)!=null?nt:{}}catch(Ae){if(me(n,Ae.message),Ae.name=="AbortError"){e({type:"STOP_LOADING"});return}e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ae.message}})}finally{e({type:"STOP_LOADING"})}}async function W(){try{const he=await Pa.callRawAPI("/v2/api/custom/ergo/hashtag/PAGINATE",{page:1,limit:1e3,where:["ergo_hashtag.deleted_at IS NULL"]},"POST",Ed.signal);Array.isArray(he.list)&&v(he.list)}catch(he){if(me(n,he.message),he.name=="AbortError")return;e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:he.message}})}}async function V(he){const ve={id:he,booked_unit:1,status:ut.CANCELLED};try{await Pa.callRawAPI("/v2/api/custom/ergo/booking/PUT",ve,"POST",Ed.signal),o.status===ut.UPCOMING?await Pa.callRawAPI("/v2/api/custom/ergo/refund",{booking_id:o.id,stripe_payment_intent_id:o.stripe_payment_intent_id},"POST"):await Pa.callRawAPI("/v2/api/custom/ergo/capture",{booking_id:o.id,status:5,stripe_payment_intent_id:o.stripe_payment_intent_id},"POST"),ne(o.host_id,o.property_name,`from ${Te(o.booking_start_time).format("MM/DD/YYYY")} to ${Te(o.booking_end_time).format("MM/DD/YYYY")}`,H),U(he)}catch(Ce){if(me(n,Ce.message),Ce.name=="AbortError")return;e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ce.message}})}}async function X(he){const ve={id:he};try{Pa.setTable("booking");const Ce=await Pa.callRestAPI(ve,"DELETE",Ed.signal);pe(e,Ce.message,5e3),r("/account/my-bookings")}catch(Ce){if(me(n,Ce.message),Ce.name=="AbortError")return;e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Ce.message}})}}async function ne(he,ve,Ce){var nt,Ae;try{const Je=await Pa.callRawAPI("/v2/api/custom/ergo/get-user",{id:he},"POST",Ed.signal),ze=await Pa.getEmailTemplate("booking-cancelled");if(on(Je.settings,{}).email_on_booking_cancelled==!0){const We=(nt=ze.html)==null?void 0:nt.replace(new RegExp("{{{space_name}}}","g"),ve).replace(new RegExp("{{{time}}}","g"),Ce);await Pa.sendEmail(Je.email,ze.subject,We)}if(on(t.user.settings,{}).email_on_booking_cancelled==!0){const We=(Ae=ze.html)==null?void 0:Ae.replace(new RegExp("{{{space_name}}}","g"),ve).replace(new RegExp("{{{time}}}","g"),Ce);await Pa.sendEmail(t.user.email,ze.subject,We)}}catch{}}async function oe(){var he;try{const ve=await Pa.getEmailTemplate("pending-booking-reminder");let Ce=`from ${Te(o.booking_start_time).format("MM/DD/YYYY")} to ${Te(o.booking_end_time).format("MM/DD/YYYY")}`;const nt=(he=ve.html)==null?void 0:he.replace(new RegExp("{{{space_name}}}","g"),o.property_name).replace(new RegExp("{{{time}}}","g"),Ce).replace(new RegExp("{{{booking_id}}}","g"),o.id).replace(new RegExp("{{{customer_name}}}","g"),`${o.customer_first_name} ${o.customer_last_name}`);await Pa.sendEmail(o.host_email,ve.subject,nt),e({type:"SHOW_CONFIRMATION",payload:{heading:"Email sent",message:"Email sent to host",btn:"Ok got it"}})}catch(ve){me(n,ve.message)}}h.exports.useEffect(()=>{U(i)},[]),h.exports.useEffect(()=>{(async()=>W())()},[]);const{latitude:q,longitude:te,done:G}=H5();return f("div",{className:"text-sm normal-case md:text-base",children:[s("div",{children:f("button",{type:"button",onClick:()=>r("/account/my-bookings"),className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]})}),f("div",{className:"mb-[22px] flex flex-col justify-between md:flex-row",children:[f("h1",{className:"mr-3 mb-[24px] text-3xl font-semibold text-[#101828] md:mb-0",children:["Booking - ",o.property_name]}),f("div",{className:"flex items-center gap-[16px]",children:[s("h4",{className:"font-semibold",children:"Status"}),f("span",{className:`${o.status==ut.PENDING?"bg-[#1D2939]":"bg-[#F2F4F7]"} rounded-sm px-[16px] py-[8px] ${t8e[N?6:(J=o.status)!=null?J:0]} border text-sm font-semibold uppercase`,children:[" ",e8e[N?6:(K=o.status)!=null?K:0]]}),s("div",{className:"flex flex-grow justify-end",children:s("div",{className:' "border p-1 px-2 md:border-0"',children:s(Zl,{items:[{label:"Delete booking",icon:s(Se,{}),onClick:()=>X(o.id),notShow:o.status==ut.ONGOING||o.status==ut.UPCOMING},{label:"Cancel booking",icon:s(Se,{}),onClick:()=>V(o.id),notShow:o.status==ut.COMPLETED||o.status==ut.ONGOING||N||o.status==ut.CANCELLED},{label:"Edit booking",icon:s(Se,{}),onClick:()=>r("/account/my-bookings/edit/"+o.id),notShow:o.status>ut.UPCOMING||N},{label:"Add a review",icon:s(Se,{}),onClick:()=>d(!0),notShow:o.status!=ut.COMPLETED||N}]})})})]})]}),f("div",{className:"flex flex-wrap items-start md:gap-[24px]",children:[f("div",{className:"w-full md:w-[55%]",children:[!N&&o.status!=ut.CANCELLED&&s("div",{className:"mb-[32px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[20px] py-[16px]",children:f("div",{className:"flex items-start gap-[12px]",children:[s(Za,{width:60}),f("div",{children:[s("h3",{className:"text-lg font-semibold text-[#101828]",children:"What's next"}),f("p",{className:"text-[#667085]",children:["You booking has been sent to the host and will be reviewed within 2 hours. If you don\u2019t hear form the host withing 2h you can cancel your booking or reach out to them via"," ",s($e,{className:"font-semibold underline",to:`/account/messages?other_user_id=${o.host_id}&booking=${o.id}&space=${o.property_space_id}`,children:"Messages"})," "]})]})]})}),s("li",{className:"mb-6 text-xl font-semibold",children:"Booking Time"}),f("div",{className:"mb-[32px] flex items-center justify-around rounded-lg border border-[#EAECF0] px-[20px] py-[16px]",children:[f("div",{className:"w-[80px] rounded-lg border text-center",children:[s("p",{className:"rounded-t-lg bg-black py-2 uppercase text-white",children:(Q=Rr[new Date(o.booking_start_time).getMonth()])!=null?Q:"N/A"}),s("strong",{className:"text-3xl",children:new Date(o.booking_start_time).getDate()||"N/A"}),s("p",{className:"uppercase text-[#667085]",children:(Z=sr[new Date(o.booking_start_time).getDay()])!=null?Z:"N/A"})]}),f("div",{className:"flex flex-col gap-[10px] md:flex-row md:gap-[67px]",children:[f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"From"}),s("strong",{children:Pn((se=o.booking_start_time)!=null?se:"01/01/01")})," "]}),f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("p",{className:"text-lg",children:"Until"}),s("strong",{children:Pn((ce=o.booking_end_time)!=null?ce:"01/01/01")})]})]})]}),f("div",{className:"mb-6 flex items-center justify-between",children:[s("li",{className:"text-xl font-semibold",children:"Space: "}),o.status==ut.COMPLETED?s("button",{className:"bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text pr-4 font-bold text-transparent",onClick:()=>{d(!0)},children:"Add Review"}):null]}),f("div",{className:"mb-[32px] flex max-w-full flex-col rounded-lg border border-[#EAECF0] bg-[#F9FAFB] lg:h-[167px] lg:w-[unset] lg:flex-row lg:gap-[32px]",children:[s("div",{className:"mb-[8px] flex h-[180px] w-full flex-col rounded-lg bg-cover bg-center bg-no-repeat px-[10px] pb-[13px] lg:h-full lg:w-[262px]",style:{backgroundImage:`url(${(le=o.image_url)!=null?le:"/default-property.jpg"})`},children:s(ls,{space_id:I.id,user_property_spaces_id:I.user_property_spaces_id,reRender:m,withLoader:!0})}),f("div",{className:"flex flex-grow items-end justify-between py-6 pl-4 pr-4 lg:items-start lg:pl-0 lg:pr-8",children:[f("div",{className:"",children:[s("h2",{className:"mb-[6px] text-[18px] font-semibold",children:o.property_name}),s("p",{className:"max-w-[250px] truncate text-sm tracking-wider text-[#475467]",children:[ut.UPCOMING,ut.ONGOING].includes(o.status)?I.address_line_1:I.city}),s("p",{className:"max-w-[250px] truncate text-sm tracking-wider text-[#475467]",children:[ut.UPCOMING,ut.ONGOING].includes(o.status)?I.address_line_2:I.country}),f("div",{className:"mt-[6px] flex lg:mt-[21px]",children:[f("p",{className:"mr-[31px]",children:["from: ",f("span",{className:"font-bold",children:["$",(Number(o.hourly_rate)||0).toFixed(2)]}),"/",s("span",{className:"",children:"day"})]}),f("div",{className:"flex items-center gap-2",children:[s(Zc,{}),s("span",{children:I.max_capacity})]})]})]}),f("div",{className:"flex flex-col items-center",children:[f("p",{className:"flex items-center gap-2 lg:mb-[9px]",children:[s(ds,{}),f("strong",{className:"font-semibold",children:[(Number(I.average_space_rating)||0).toFixed(1),f("span",{className:"font-normal",children:["(",I.space_rating_count,")"]})]})]}),[ut.COMPLETED,ut.ONGOING,ut.UPCOMING].includes(o.status)?s("a",{href:`https://www.google.com/maps/dir/?api=1&origin=${q+","+te}&destination=${I.address_line_1+", "+I.address_line_2+" "+I.city+" "+I.country}`,target:"_blank",className:"hidden whitespace-nowrap text-xs text-[#475467] underline lg:inline",children:"(view on map)"}):s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:he=>{k(!0)},children:"(view on map)"})]})]})]}),o.add_ons!==void 0&&((ae=o==null?void 0:o.add_ons)==null?void 0:ae.length)>0&&s("li",{className:"mb-6 text-xl font-semibold",children:"Add-ons:"}),s("div",{className:"addons-grid list-disk-important",children:((ie=o.add_ons)!=null?ie:[]).map((he,ve)=>f("div",{className:"flex gap-[14px]",children:[s(ur,{}),s("p",{children:he.name})]},ve))})]}),f("div",{className:"max-w-full flex-grow",children:[f("div",{className:"mb-[32px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] px-[20px] py-[24px]",children:[s("h3",{className:"mb-[8px] font-semibold md:text-2xl",children:"Your Host"}),f("div",{className:"flex flex-wrap items-center justify-between",children:[f("div",{className:"mb-4 flex items-center gap-4",children:[s("img",{src:j.photo||"/default.png",className:"h-[48px] w-[48px] rounded-full object-cover"}),s("p",{className:"font-semibold md:text-xl",children:((de=o.host_first_name)!=null?de:"")+" "+((fe=o.host_last_name)!=null?fe:"")})]}),s($e,{className:"my-text-gradient whitespace-nowrap rounded-md border border-[#33D4B7] px-4 py-2 text-center text-sm font-semibold md:w-[158px]",disabled:o.id==null,to:`/account/messages?other_user_id=${o.host_id}&booking=${o.id}&space=${o.property_space_id}`,children:"Chat with Host"})]}),o.status==ut.PENDING&&s("div",{className:"mt-4 flex items-center",children:f("p",{children:[s("button",{className:"font-semibold underline",onClick:oe,children:"Remind"})," ","host via email to review your booking"]})})]}),f("div",{className:"mb-[16px] rounded-lg border border-[#EAECF0] bg-[#F9FAFB] p-[20px] md:p-[32px]",children:[f("div",{className:"flex items-center",children:[s("h4",{className:"mb-[8px] text-2xl font-semibold",children:"Charges"}),o.payment_status===Pm.SUCCESSFUL&&s("span",{type:"button",className:"mb-[8px] ml-5 block login-btn-gradient text-white rounded-md px-8 py-2 font-semibold hover:cursor-default",children:"Paid"})]}),s("p",{className:"mb-[16px] text-sm text-[#667085]",children:"(funds will be put on hold, pending when host accepts/rejects your booking)"}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Rate"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(o.hourly_rate||0).toFixed(2)]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Price"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(o.hourly_rate*(o.duration/3600)||0).toFixed(2)]})]}),((be=o.add_ons)!=null?be:[]).map(he=>f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:he.name}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(he.cost||0).toFixed(2)]})]},he.id)),f("div",{className:"mb-[16px] flex justify-between",children:[s("p",{children:"Tax"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(o.tax||0).toFixed(2)]})]}),f("div",{className:"-mx-3 mb-[12px] flex justify-between bg-black p-3 font-bold text-white",children:[s("p",{children:"Total"}),f("p",{children:[" ",o.payment_status==Pm.SUCCESSFUL&&s("span",{className:"mr-2 bg-green-600 text-white rounded-full font-semibold px-4",children:"Paid"})," $",(o.total||0).toFixed(2)]})]})]}),s($e,{to:"/help/cancellation-policy",target:"_blank",className:"block mb-6 text-center font-semibold text-[#667085] underline",children:"Cancellation policy"})]})]}),u&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>d(!1),children:f("form",{className:`${l?"pop-in":"pop-out"} w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:he=>he.stopPropagation(),onSubmit:C(Y),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"text-2xl font-semibold",children:"Leave a review"}),s("button",{type:"button",onClick:()=>d(!1),className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),s("p",{className:"mb-[16px] text-sm text-[#475467]",children:"You have completed your booking! Leave a review to let others know about your experience with the space and the host."}),f("div",{children:[s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Select rating"}),s("div",{className:"select-rating-container mb-[24px] flex gap-4",children:[1,2,3,4,5].map(he=>f("label",{htmlFor:"rating_"+he,children:[s("input",{type:"radio",..._("rating"),value:he,id:"rating_"+he}),s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:!D||D<he?"none":"#33D4B7",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:!D||D<he?"#98A2B3":"#33D4B7"})})]}))}),f(Se,{children:[s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Host rating"}),s("div",{className:"select-rating-container mb-[24px] flex gap-4",children:[1,2,3,4,5].map(he=>f("label",{htmlFor:"host_rating_"+he,children:[s("input",{type:"radio",..._("host_rating"),value:he,id:"host_rating_"+he}),s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:!P||P<he?"none":"#33D4B7",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:!P||P<he?"#98A2B3":"#33D4B7"})})]}))})]}),f("h4",{className:"mb-[8px] text-xl font-semibold",children:["Select Hashtags ",s("small",{className:"text-xs font-normal text-gray-600",children:"(max 3)"})]}),s("div",{className:"tiny-scroll mb-3 max-h-[150px] overflow-y-auto border p-4 text-sm",children:w.map((he,ve)=>f("div",{className:" flex items-center gap-2 pb-4",children:[s("input",{type:"checkbox",..._("hashtags"),id:"hashtag_"+he.id,disabled:M&&g>=3&&!M.includes(he.id.toString()),value:he.id}),s("label",{htmlFor:"hashtag_"+he.id,className:"cursor-pointer",children:he.name})]},he.id))}),s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Comment"}),s("textarea",{..._("comment"),cols:"30",rows:"5",className:"w-full resize-none border p-3 text-sm focus:outline-none active:outline-none"}),s(Ft,{loading:p,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${p?"py-1":"py-2"} mt-4 w-full`,children:"Submit"})]})]})}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${I.address_line_1||""}, ${I.address_line_2||""}, ${I.city||""}, ${I.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${I.address_line_1||""}, ${I.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:x,closeModal:()=>k(!1)}),z&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>F(!1),children:f("div",{className:`${O?"pop-in":"pop-out"} w-[403px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5`,onClick:he=>he.stopPropagation(),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"text-2xl font-semibold",children:"Are you sure?"}),s("button",{className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",onClick:()=>F(!1),children:"\u2715"})]}),s("hr",{className:"mb-4"}),f("p",{className:"mb-[16px]",children:["You are about to decline a booking from"," ",f("b",{children:[o.customer_first_name," ",o.customer_last_name]})," ","for ",f("b",{children:[o.property_name," "]}),"on"," ",s("b",{children:Rr[new Date(o.booking_start_time).getMonth()]+" "+new Date(o.booking_start_time).getDate()+"/"+new Date(o.booking_start_time).getFullYear()}),"."]}),s("h4",{className:"mb-[8px] text-xl font-semibold",children:"Reason"}),s("textarea",{cols:"30",rows:"5",className:"w-full resize-none border p-3 focus:outline-none active:outline-none",value:H,onChange:he=>A(he.target.value)}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"mt-4 flex-grow rounded border-2 border-[#98A2B3] py-2 tracking-wide outline-none focus:outline-none",onClick:()=>F(!1),children:"Cancel"}),s("button",{type:"button",className:"mt-4 flex-grow rounded bg-[#D92D20] py-2 tracking-wide text-white outline-none focus:outline-none",onClick:()=>declineBooking(o.id),children:"Yes, decline"})]})]})})]})}const bT=[{header:"ID",accessor:"id"},{header:"BOOKING DATE",accessor:"booking_start_time"},{header:"SPACE",accessor:"name"},{header:"HOST",accessor:"host_full_name"},{header:"RATING",accessor:"rating"},{header:"STATUS",accessor:"status",mapping:["Under Review","Posted","Declined"]},{header:"ACTION",accessor:""}];function a8e(){var O,F,z,H;const[e,t]=h.exports.useState(0),[n,a]=h.exports.useState(!1),r=cr(n,100),[i,o]=h.exports.useState({}),[c,l]=h.exports.useState(10),[d,u]=h.exports.useState(0),[g,y]=h.exports.useState(0),[w,v]=h.exports.useState(0),[S,m]=h.exports.useState(!1),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState([]),[N,_]=h.exports.useState("DESC"),{dispatch:C}=h.exports.useContext(we);async function E(A,j){C({type:"START_LOADING"});const B=[`ergo_review.customer_id = ${localStorage.getItem("user")}`,`ergo_review.given_by = ${e==1?"'customer'":"'host'"}`];try{const Y=await _t("review-hashtag","post",{where:B,page:A,limit:j,user:"customer",sortId:"post_date",direction:"DESC"},"PAGINATE"),{list:U,total:W,limit:V,num_pages:X,page:ne}=Y;k(U),l(V),u(X),v(ne),y(W),m(ne>1),b(ne+1<=X)}catch(Y){C({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Y.message}})}C({type:"STOP_LOADING"})}function T(A){(async function(){l(A),await E(0,A)})()}function D(){(async function(){await E(w-1>0?w-1:0,c)})()}function P(){(async function(){await E(w+1<=d?w+1:0,c)})()}h.exports.useEffect(()=>{E(1,10)},[e]);const M=(A,j)=>N=="DESC"?new Date(j.update_at)-new Date(A.update_at):new Date(A.update_at)-new Date(j.update_at);return f("div",{className:"eighteen-step-summary pt-[44px] min-h-screen",children:[f("div",{className:"flex flex-wrap justify-between mb-[16px] items-start",children:[f("div",{className:"md:w-[unset] w-full mb-4 flex",children:[s("button",{className:`${e==0?"bg-[#F2F4F7] border":""} py-[8px] md:px-[12px] px-12 flex-grow rounded-sm mr-[16px]`,onClick:()=>t(0),children:"Received"}),s("button",{className:`${e==1?"bg-[#F2F4F7] border":""} py-[8px] md:px-[12px] px-12 flex-grow rounded-sm`,onClick:()=>t(1),children:"Given"})]}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:_,accessor:"label",valueAccessor:"value",className:"md:max-w-[200px] flex-grow",listOptionClassName:"pl-4"})]}),s("div",{className:"snap-scroll",children:s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:T,noBorder:!0})}),s("div",{className:"snap-scroll",children:f("table",{className:"min-w-full divide-y divide-gray-200 bg-white mt-1",children:[s("thead",{className:"bg-[#F9FAFB] border-t border-b border-[#EAECF0] cursor-pointer",children:s("tr",{className:"cursor-pointer",children:bT.map((A,j)=>s("th",{scope:"col",className:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer whitespace-nowrap",children:A.header},j))})}),s("tbody",{className:"divide-y divide-gray-200",children:x.sort(M).map((A,j)=>s("tr",{className:"py-4 text-sm",children:bT.map((I,B)=>I.accessor===""?s("td",{className:"px-6 py-6 whitespace-nowrap gap-3",children:s("button",{className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold",onClick:()=>{o(A),a(!0)},children:"View"})},B):I.accessor.includes("rating")?s("td",{className:"px-6 py-4 whitespace-nowrap",children:f("span",{className:"flex items-center gap-2",children:[s(ds,{}),(Number(e==0?A.customer_rating:A.space_rating)||0).toFixed(1)]})},B):I.accessor=="booking_start_time"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:Te(A[I.accessor]).format("MM/DD/YY")},B):I.accessor=="host_full_name"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:A.host_first_name+" "+A.host_last_name},B):I.mapping?s("td",{className:"px-6 py-4 whitespace-nowrap",children:f("span",{className:`${A[I.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full bg-[#F9FAFB] border border-[#EAECF0] py-[2px] px-[10px]`,children:[" ",I.mapping[A[I.accessor]]]})},B):s("td",{className:"px-6 py-4 whitespace-nowrap",children:A[I.accessor]},B))},j))})]})}),s("div",{className:"snap-scroll",children:s(vn,{currentPage:w,totalNumber:g,pageCount:d,pageSize:c,canPreviousPage:S,canNextPage:p,updatePageSize:T,previousPage:D,nextPage:P,className:"px-1 items-center"})}),r&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>a(!1),children:f("div",{className:`${n?"pop-in":"pop-out"} bg-white p-5 md:px-5 px-3 rounded-lg w-[510px] max-w-[80%]`,onClick:A=>A.stopPropagation(),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s("h3",{className:"text-2xl font-semibold",children:"Review details"}),s("button",{type:"button",onClick:()=>a(!1),className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),f("p",{className:"mb-[8px]",children:["Review posted on: ",f("span",{children:[" ",Te((O=i.booking_start_time)!=null?O:"11/11/11").format("MM/DD/YY")]})]}),f("p",{className:"mb-[8px]",children:["Space: ",s("span",{children:(F=i.name)!=null?F:""})]}),f("p",{className:"mb-[16px]",children:["Booking: ",f("span",{children:[" #",(z=i.booking_id)!=null?z:""]})," ",s($e,{to:`/account/my-bookings/${i.booking_id}`,className:"text-sm font-semibold underline",children:"(View details)"})]}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Rating"}),s("div",{className:"flex gap-6 mb-[24px]",children:[1,2,3,4,5].map(A=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:(e==1?i.space_rating:i.customer_rating)>=A?"#FEC84B":"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:(e==1?i.space_rating:i.customer_rating)>=A?"#FEC84B":"#98A2B3"})}))}),i.host_rating&&f(Se,{children:[s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Host rating"}),s("div",{className:"flex gap-6 mb-[24px]",children:[1,2,3,4,5].map(A=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:i.host_rating>=A?"#FEC84B":"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:i.host_rating>=A?"#FEC84B":"#98A2B3"})}))})]}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Hashtags"}),s("div",{className:"lg:flex hidden gap-[12px] whitespace-nowrap mb-[16px]",children:i.hashtags?i.hashtags.split(",").map((A,j)=>s("span",{className:"text-[14px] bg-[#F2F4F7] rounded-[3px] pt-[2px] px-[8px] pb-[3px] text-[#667085]",children:A},j)):s(Se,{})}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Comments"}),s("p",{className:"mb-2",children:(H=i.comment)!=null?H:""}),s("button",{className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 w-full",onClick:()=>a(!1),children:"Close"})]})})]})}const yT=[{header:"BOOKING DATE",accessor:"booking_start_time"},{header:"SPACE",accessor:"space"},{header:"PAYMENT METHOD",accessor:"payment_method"},{header:"AMOUNT",accessor:"amount"},{header:"RECEIPT",accessor:"receipt"},{header:"ACTION",accessor:""}];function r8e(){var M,O;const[e,t]=h.exports.useState(!1),n=cr(e,200),[a,r]=h.exports.useState(10),[i,o]=h.exports.useState(0),[c,l]=h.exports.useState(0),[d,u]=h.exports.useState(0),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState(!1),[S,m]=h.exports.useState("DESC"),[p,b]=h.exports.useState([]),{dispatch:x}=h.exports.useContext(we),[k,N]=h.exports.useState({});je();function _(F){(async function(){r(F),await T(0,F)})()}function C(){(async function(){await T(d-1>0?d-1:0,a)})()}function E(){(async function(){await T(d+1<=i?d+1:0,a)})()}async function T(F,z){x({type:"START_LOADING"});const A=[`ergo_booking.customer_id = ${localStorage.getItem("user")} AND ergo_booking.status = 3`];try{const j=await _t("booking","post",{where:A,page:F,limit:z,sortId:"update_at",direction:"DESC"},"PAGINATE"),{list:I,total:B,limit:Y,num_pages:U,page:W}=j;b(I),r(Y),o(U),u(W),l(B),y(W>1),v(W+1<=U)}catch(j){x({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:j.message}})}x({type:"STOP_LOADING"})}h.exports.useEffect(()=>{T(1,a)},[]);const D=(F,z)=>S=="DESC"?new Date(z.update_at)-new Date(F.update_at):new Date(F.update_at)-new Date(z.update_at);function P(){console.log("printing");var F=window.open("","PRINT","height=400,width=600");F.document.write("<html><head><title>"+document.title+"</title>"),F.document.write("</head><body >"),F.document.write("<h1>"+document.title+"</h1>"),F.document.write(document.getElementById("receipt").innerHTML),F.document.write("</body></html>"),F.document.close(),F.focus(),F.print()}return f("div",{className:"pt-[44px] min-h-screen",children:[s("div",{className:"flex justify-end mb-[16px]",children:s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:m,accessor:"label",valueAccessor:"value",className:"min-w-[200px]",listOptionClassName:"pl-4"})}),s(Ln,{currentPage:d,pageSize:a,totalNumber:c,updatePageSize:_,noBorder:!0}),s("div",{className:"snap-scroll",children:f("table",{className:"min-w-full divide-y divide-gray-200 bg-white mt-1",children:[s("thead",{className:"bg-[#F9FAFB] border-t border-b border-[#EAECF0] cursor-pointer",children:s("tr",{className:"cursor-pointer",children:yT.map((F,z)=>s("th",{scope:"col",className:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer whitespace-nowrap",children:F.header},z))})}),s("tbody",{className:"divide-y divide-gray-200",children:p.sort(D).map((F,z)=>s("tr",{className:"py-4 text-sm",children:yT.map((H,A)=>{if(H.accessor==="")return s("td",{className:"px-6 py-6 whitespace-nowrap gap-3",children:s("button",{className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold",onClick:()=>{N(F),t(!0)},children:"View"})},A);if(H.accessor=="booking_start_time"){var j=new Date(F[H.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:Rr[j.getMonth()]+" "+j.getDate()+"/"+j.getFullYear()},A)}if(H.accessor=="space"){var j=new Date(F[H.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:F.property_name+" "+F.space_category},A)}if(H.accessor=="amount"){var j=new Date(F[H.accessor]);return s("td",{className:"px-6 py-4 whitespace-nowrap",children:"$"+(F.total+F.addon_cost).toFixed(2)},A)}return H.accessor=="receipt"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:F.id},A):H.accessor=="payment_method"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:"Credit Card"},A):s("td",{className:"px-6 py-4 whitespace-nowrap",children:F[H.accessor]},A)})},z))})]})}),s(vn,{currentPage:d,totalNumber:c,pageCount:i,pageSize:a,canPreviousPage:g,canNextPage:w,updatePageSize:_,previousPage:C,nextPage:E,className:"px-1 items-center"}),n&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>t(!1),children:f("div",{className:`${e?"pop-in":"pop-out"} bg-white p-5 md:px-5 px-3 rounded-lg w-[510px] max-w-[80%]`,onClick:F=>F.stopPropagation(),id:"receipt",children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s("h3",{className:"text-2xl font-semibold mb-[8px]",children:"Payment details"}),s("button",{type:"button",onClick:()=>t(!1),className:"p-1 border hover:bg-gray-200 duration-300 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]}),s("hr",{className:"mb-4"}),f("p",{className:"mb-[8px]",children:["Booking Started on: ",s("span",{children:gh(k.booking_start_time)})]}),f("p",{className:"mb-[8px]",children:["Space name: ",s("span",{children:k.property_name})]}),f("p",{className:"mb-[16px]",children:["Booking: ",f("span",{children:[" #",k.id]})," ",s($e,{to:"/account/my-bookings/"+k.id,className:"text-sm font-semibold underline",children:"(View booking details)"})]}),f("p",{className:"mb-[16px]",children:["Space: ",f("span",{children:[" #",k.property_space_id]})," ",s($e,{to:"/property/"+k.property_space_id,className:"text-sm font-semibold underline",children:"(View booking details)"})]}),f("p",{className:"mb-[8px]",children:["Total cost: ",f("span",{children:["$",(M=k.total)==null?void 0:M.toFixed(2)]})]}),f("p",{className:"mb-[8px]",children:["Total addon cost: ",f("span",{children:["$",(O=k.addon_cost)==null?void 0:O.toFixed(2)]})]}),s("button",{onClick:P,className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold focus:outline-none",children:"Print receipt"}),s("button",{className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 w-full",onClick:()=>t(!1),children:"Close"})]})})]})}const xT=[{header:"ID",accessor:"id"},{header:"BOOKING DATE",accessor:"booking_start_time"},{header:"SPACE",accessor:"name"},{header:"GUEST",accessor:"host_full_name"},{header:"RATING",accessor:"rating"},{header:"STATUS",accessor:"status",mapping:["Under Review","Posted","Declined"]},{header:"ACTION",accessor:""}];function s8e(){var O,F,z,H;const[e,t]=h.exports.useState(0),[n,a]=h.exports.useState(!1),r=cr(n,100),[i,o]=h.exports.useState({}),[c,l]=h.exports.useState(10),[d,u]=h.exports.useState(0),[g,y]=h.exports.useState(0),[w,v]=h.exports.useState(0),[S,m]=h.exports.useState(!1),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState([]),[N,_]=h.exports.useState("DESC"),{dispatch:C}=h.exports.useContext(we);async function E(A,j){C({type:"START_LOADING"});const B=[`ergo_booking.host_id = ${localStorage.getItem("user")}`,`ergo_review.given_by = ${e==1?"'host'":"'customer'"}`];try{const Y=await _t("review-hashtag","post",{where:B,page:A,limit:j,user:"host",sortId:"post_date",direction:"DESC"},"PAGINATE"),{list:U,total:W,limit:V,num_pages:X,page:ne}=Y;k(U),l(V),u(X),v(ne),y(W),m(ne>1),b(ne+1<=X)}catch(Y){C({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Y.message}})}C({type:"STOP_LOADING"})}function T(A){(async function(){l(A),await E(0,A)})()}function D(){(async function(){await E(w-1>0?w-1:0,c)})()}function P(){(async function(){await E(w+1<=d?w+1:0,c)})()}h.exports.useEffect(()=>{E(1,10)},[e]);const M=(A,j)=>N=="DESC"?new Date(j.update_at)-new Date(A.update_at):new Date(A.update_at)-new Date(j.update_at);return f("div",{"data-tour":"customer_review",className:"pt-[44px] min-h-screen",children:[f("div",{className:"flex flex-wrap justify-between mb-[16px] items-start",children:[f("div",{className:"md:w-[unset] w-full mb-4 flex",children:[s("button",{className:`${e==0?"bg-[#F2F4F7] border":""} py-[8px] md:px-[12px] px-12 flex-grow rounded-sm mr-[16px] `,onClick:()=>t(0),children:"Received"}),s("button",{className:`${e==1?"bg-[#F2F4F7] border":""} py-[8px] md:px-[12px] px-12 flex-grow rounded-sm`,onClick:()=>t(1),children:"Given"})]}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],onChange:_,accessor:"label",valueAccessor:"value",className:"md:max-w-[200px] flex-grow",listOptionClassName:"pl-4"})]}),s("div",{className:"snap-scroll",children:s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:T,noBorder:!0})}),s("div",{className:"snap-scroll",children:f("table",{className:"min-w-full divide-y divide-gray-200 bg-white mt-1",children:[s("thead",{className:"bg-[#F9FAFB] border-t border-b border-[#EAECF0] cursor-pointer",children:s("tr",{className:"cursor-pointer",children:xT.map((A,j)=>s("th",{scope:"col",className:"px-6 py-4 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer whitespace-nowrap",children:A.header},j))})}),s("tbody",{className:"divide-y divide-gray-200",children:x.sort(M).map((A,j)=>s("tr",{className:"py-4 text-sm",children:xT.map((I,B)=>I.accessor===""?s("td",{className:"px-6 py-6 whitespace-nowrap gap-3",children:s("button",{className:"pr-4 bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text text-transparent font-bold",onClick:()=>{o(A),a(!0)},children:"View"})},B):I.accessor.includes("rating")?s("td",{className:"px-6 py-4 whitespace-nowrap",children:f("span",{className:"flex items-center gap-2",children:[s(ds,{}),(Number(e==0?A.space_rating:A.customer_rating)||0).toFixed(1)]})},B):I.accessor=="booking_start_time"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:Te(A[I.accessor]).format("MM/DD/YY")},B):I.accessor=="host_full_name"?s("td",{className:"px-6 py-4 whitespace-nowrap",children:A.customer_first_name+" "+A.customer_last_name},B):I.mapping?s("td",{className:"px-6 py-4 whitespace-nowrap",children:f("span",{className:`${A[I.accessor]===1?"text-black":"text-[#98A2B3]"} rounded-full bg-[#F9FAFB] border border-[#EAECF0] py-[2px] px-[10px]`,children:[" ",I.mapping[A[I.accessor]]]})},B):s("td",{className:"px-6 py-4 whitespace-nowrap",children:A[I.accessor]},B))},j))})]})}),s("div",{className:"snap-scroll",children:s(vn,{currentPage:w,totalNumber:g,pageCount:d,pageSize:c,canPreviousPage:S,canNextPage:p,updatePageSize:T,previousPage:D,nextPage:P,className:"px-1 items-center"})}),r&&s("div",{className:"popup-container flex items-center justify-center normal-case",onClick:()=>a(!1),children:f("div",{className:`${n?"pop-in":"pop-out"} bg-white p-5 md:px-5 px-3 rounded-lg w-[510px] max-w-[80%]`,onClick:A=>A.stopPropagation(),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s("h3",{className:"text-2xl font-semibold",children:"Review details"}),s("button",{type:"button",onClick:()=>a(!1),className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),f("p",{className:"mb-[8px]",children:["Review posted on: ",f("span",{children:[" ",Te((O=i.booking_start_time)!=null?O:"11/11/11").format("MM/DD/YY")]})]}),f("p",{className:"mb-[8px]",children:["Space: ",s("span",{children:(F=i.name)!=null?F:""})]}),f("p",{className:"mb-[16px]",children:["Booking: ",f("span",{children:[" #",(z=i.booking_id)!=null?z:""]})," ",s($e,{to:`/account/my-bookings/${i.booking_id}`,className:"text-sm font-semibold underline",children:"(View details)"})]}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Rating"}),s("div",{className:"flex gap-6 mb-[24px]",children:[1,2,3,4,5].map(A=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:(e==1?i.customer_rating:i.space_rating)>=A?"#FEC84B":"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:(e==1?i.customer_rating:i.space_rating)>=A?"#FEC84B":"#98A2B3"})}))}),i.host_rating&&f(Se,{children:[s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Host rating"}),s("div",{className:"flex gap-6 mb-[24px]",children:[1,2,3,4,5].map(A=>s("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:i.host_rating>=A?"#FEC84B":"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M14.1614 16.3677L13.7068 16.1595C13.6543 16.274 13.5845 16.3632 13.4966 16.4344C13.4273 16.4905 13.3479 16.524 13.2431 16.5331C13.1667 16.5398 13.0863 16.5237 12.9876 16.4582L12.9877 16.4581L12.9771 16.4515L8.82711 13.8473L8.56135 13.6805L8.29559 13.8473L4.14559 16.4515L4.1455 16.4513L4.13509 16.4582C4.03641 16.5237 3.956 16.5398 3.87959 16.5331C3.7748 16.524 3.69535 16.4905 3.6261 16.4344C3.53833 16.3633 3.46858 16.2743 3.41616 16.16C3.38464 16.0908 3.36936 15.9998 3.39942 15.8638C3.39945 15.8636 3.39948 15.8635 3.39951 15.8634L4.49931 10.9424L4.56306 10.6572L4.34582 10.4617L0.675047 7.15819C0.576587 7.06488 0.531828 6.97672 0.514002 6.89047L0.514006 6.89047L0.513604 6.88857C0.490262 6.7778 0.497009 6.67532 0.533413 6.57104C0.576075 6.44883 0.633362 6.3661 0.698165 6.30703C0.737553 6.27113 0.815759 6.22473 0.972179 6.19965L5.8068 5.75835L6.11051 5.73062L6.22487 5.44791L8.09987 0.812492L8.10059 0.810696C8.1474 0.693678 8.20855 0.628401 8.27973 0.586111L8.28045 0.585682C8.38637 0.522513 8.4778 0.5 8.56135 0.5C8.64484 0.5 8.73672 0.522488 8.84348 0.585824C8.91401 0.627946 8.97513 0.693252 9.02211 0.810696L9.02283 0.81249L10.8978 5.44791L11.0122 5.73062L11.3159 5.75835L16.1505 6.19965C16.3069 6.22473 16.3851 6.27113 16.4245 6.30703C16.4893 6.3661 16.5466 6.44883 16.5893 6.57105C16.6258 6.67572 16.6328 6.7786 16.6099 6.88955C16.5915 6.97634 16.5462 7.06483 16.4477 7.15818L12.7769 10.4617L12.5596 10.6572L12.6234 10.9424L13.7232 15.8634C13.7232 15.8635 13.7232 15.8636 13.7233 15.8637C13.7534 15.9999 13.738 16.0909 13.7065 16.1602L14.1614 16.3677ZM14.1614 16.3677C14.2447 16.1851 14.2613 15.9809 14.2113 15.7552L2.96135 16.3677C3.04468 16.5497 3.16135 16.7014 3.31135 16.8229C3.46135 16.9444 3.63635 17.0139 3.83635 17.0312C4.03635 17.0486 4.22802 16.9965 4.41135 16.875L8.56135 14.2708L12.7113 16.875C12.8947 16.9965 13.0864 17.0486 13.2864 17.0312C13.4864 17.0139 13.6614 16.9444 13.8113 16.8229C13.9613 16.7014 14.078 16.5497 14.1614 16.3677Z",stroke:i.host_rating>=A?"#FEC84B":"#98A2B3"})}))})]}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Hashtags"}),s("div",{className:"lg:flex hidden gap-[12px] whitespace-nowrap mb-[16px]",children:i.hashtags?i.hashtags.split(",").map((A,j)=>s("span",{className:"text-[14px] bg-[#F2F4F7] rounded-[3px] pt-[2px] px-[8px] pb-[3px] text-[#667085]",children:A},j)):s(Se,{})}),s("h4",{className:"text-xl font-semibold mb-[8px]",children:"Comments"}),s("p",{className:"mb-2",children:(H=i.comment)!=null?H:""}),s("button",{className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 w-full",onClick:()=>a(!1),children:"Close"})]})})]})}function i8e(){const{dispatch:e,state:t}=h.exports.useContext(we);h.exports.useContext(Ee);const{pathname:n}=An(),a=je();return s(ke,{appear:!0,show:t.notVerifiedModal,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:()=>e({type:"CLOSE_NOT_VERIFIED_MODAL"}),children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"User not verified"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"Please verify your account to proceed with booking"})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>e({type:"CLOSE_NOT_VERIFIED_MODAL"}),children:"Cancel"}),s("button",{type:"button",onClick:()=>{a(`/account/verification?redirect_uri=${n}`),e({type:"CLOSE_NOT_VERIFIED_MODAL"})},className:"login-btn-gradient inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium text-white",children:"Get verified"})]})]})})})})]})})}const hl=({stroke:e})=>s("svg",{width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:s("path",{d:"M4.10817 3.60866L15.8915 15.392M18.3332 9.50033C18.3332 14.1027 14.6022 17.8337 9.99984 17.8337C5.39746 17.8337 1.6665 14.1027 1.6665 9.50033C1.6665 4.89795 5.39746 1.16699 9.99984 1.16699C14.6022 1.16699 18.3332 4.89795 18.3332 9.50033Z",stroke:e!=null?e:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});function AF({isOpen:e,closeModal:t,isEnabled:n,onProceed:a,loading:r}){return f(Se,{children:[e&&s("div",{className:"fixed inset-0 flex items-center justify-center"}),s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:n?"Turn Off 2-Step Verification?":"Protect your account with 2-Step Verification"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:n?"Turning off 2-Step Verification will remove the extra security on your account, and you\u2019ll only use your password to sign in.":"Prevent hackers from accessing your account with an additional layer of security. When you sign in, 2-Step Verification helps make sure that your personal information stays private, safe and secure."})}),f("div",{className:"mt-4 flex gap-4 justify-end",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:r,type:"button",className:`inline-flex justify-center rounded-md ${r?"py-1 px-6":"py-2 px-4"} text-sm font-medium login-btn-gradient text-white`,onClick:a,children:"Proceed"})]})]})})})})]})})]})}function IF({modalOpen:e,closeModal:t}){const{state:n,dispatch:a}=h.exports.useContext(we),{handleSubmit:r,register:i}=Oe({defaultValues:{first_name:n.user.first_name,last_name:n.user.last_name}}),[o,c]=h.exports.useState(!1);async function l(d){console.log("submitting",d),c(!0);try{await _t("edit-self","post",{user:d},""),t(),a({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Name change successful",btn:"Ok got it"}}),a({type:"SET_USER_DATA",payload:{...n.user,first_name:d.first_name,last_name:d.last_name}})}catch(u){a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:u.message}})}c(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:r(l),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Edit Profile"}),s("button",{type:"button",onClick:t,className:"p-1 border hover:bg-gray-200 duration-300 px-3 text-2xl font-normal rounded-full",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"first_name",children:"First Name"}),s("input",{autoComplete:"off",id:"first_name",type:"text",...i("first_name"),className:"resize-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none"})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"last_name",children:"Last Name"}),s("input",{autoComplete:"off",id:"last_name",type:"text",...i("last_name"),className:"resize-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none"})]}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 flex-grow",onClick:t,children:"Cancel"}),s(Ft,{loading:o,type:"submit",className:`login-btn-gradient text-white tracking-wide outline-none focus:outline-none rounded ${o?"py-1 px-4":"py-2"} mt-4 flex-grow`,children:"Update"})]})]})})})})]})})})}function o8e({control:e,name:t,setValue:n,onClear:a,className:r,containerClassName:i,hideIcons:o,suggestionType:c,...l}){var w,v;const{field:d}=Ii({control:e,name:t}),{placePredictions:u,getPlacePredictions:g,isPlacePredictionsLoading:y}=lN({apiKey:"AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70",options:{types:c!=null?c:["(region)"]},debounce:200});return f(Rn,{as:"div",className:`relative w-full normal-case z-50 ${i!=null?i:""}`,value:(w=d.value)==null?void 0:w.replace(", undefined",""),children:[!o&&s(cN,{}),s(Rn.Input,{...l,autoComplete:"off",className:`w-full truncate text-black ${r!=null?r:""}`,onBlur:d.onBlur,value:(v=d.value)==null?void 0:v.replace(", undefined",""),onChange:S=>{d.onChange(S),g({input:S.target.value})}}),!o&&d.value&&s("button",{type:"button",onClick:()=>{n(""),a&&a()},children:"\u2715"}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:y?s("div",{className:"absolute left-0 right-0 top-full z-50 mt-2 flex w-full origin-top justify-center rounded-xl border bg-white py-8",children:s("svg",{style:{margin:"auto",background:"none",display:"block",shapeRendering:"auto"},width:"36px",height:"36px",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",children:s("path",{fill:"none",stroke:"#d0d5dd",strokeWidth:"10",strokeDasharray:"42.76482137044271 42.76482137044271",d:"M24.3 30C11.4 30 5 43.3 5 50s6.4 20 19.3 20c19.3 0 32.1-40 51.4-40 C88.6 30 95 43.3 95 50s-6.4 20-19.3 20C56.4 70 43.6 30 24.3 30z",strokeLinecap:"round",style:{transform:"scale(1)",transformOrigin:"50px 50px"},children:s("animate",{attributeName:"stroke-dashoffset",repeatCount:"indefinite",dur:"1.6666666666666667s",keyTimes:"0;1",values:"0;256.58892822265625"})})})}):s(Rn.Options,{className:`${u.length>0?"py-2 shadow-lg ring-1 sticky":""} absolute left-0 right-0 top-full z-50 mt-2 w-full origin-top cursor-pointer divide-y divide-gray-100 rounded-xl bg-white ring-black ring-opacity-5 focus:outline-none`,children:u.map((S,m)=>{var p,b,x;return s(Rn.Option,{className:"flex w-full items-center truncate rounded-pill px-3 py-3 pr-5 text-sm ui-active:bg-gray-100 ui-active:text-black ui-not-active:text-gray-800",value:S.structured_formatting.main_text,onClick:()=>{var k;return n((S==null?void 0:S.structured_formatting.main_text)+", "+((k=S.structured_formatting)==null?void 0:k.secondary_text))},children:s("span",{children:`${S.structured_formatting.main_text} ${(p=S.structured_formatting)!=null&&p.secondary_text?",":""} ${(b=S.structured_formatting)!=null&&b.secondary_text?(x=S.structured_formatting)==null?void 0:x.secondary_text:""}`})},m)})})})]})}function OF({modalOpen:e,closeModal:t}){var y;const{state:n,dispatch:a}=h.exports.useContext(we),{handleSubmit:r,register:i,setValue:o,control:c,formState:{errors:l}}=Oe({defaultValues:{city:n.user.city,country:n.user.country}}),[d,u]=h.exports.useState(!1);async function g(w){console.log("submitting",w),u(!0);try{await _t("edit-self","post",{profile:w},""),t(),a({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Location changed successful",btn:"Ok got it"}}),a({type:"SET_USER_DATA",payload:{...n.user,city:w.city,country:w.country}})}catch(v){a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:v.message}})}u(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto z-10 ",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:r(g),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Edit Location"}),s("button",{type:"button",onClick:t,className:"p-1 border hover:bg-gray-200 duration-300 px-3 text-2xl font-normal rounded-full",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),f("div",{className:"mb-4 ",children:[s("label",{className:"block text-gray-700 text-sm font-bold mb-2",htmlFor:"city",children:"Location"}),s(o8e,{control:c,setValue:w=>o("city",w),name:"city",className:`w-full z-20 rounded relative border py-2 px-3 leading-tight text-gray-700 ${(y=l.city)!=null&&y.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,placeholder:"",hideIcons:!0,suggestionType:["(cities)"]})]}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 flex-grow",onClick:t,children:"Cancel"}),s(Ft,{loading:d,type:"submit",className:`login-btn-gradient text-white tracking-wide outline-none focus:outline-none rounded ${d?"py-1 px-4":"py-2"} mt-4 flex-grow`,children:"Update"})]})]})})})})]})})})}function PF({modalOpen:e,closeModal:t}){const{dispatch:n,state:a}=h.exports.useContext(we),[r,i]=h.exports.useState(!1),[o,c]=h.exports.useState(!1),[l,d]=h.exports.useState(!1),u=Qe({current_password:ge().required("This field is required"),password:ge().required("Password is required").min(10,"Password must be at least 10 characters long").matches(/^(?=.*[0-9])/,"Password must contain at least one digit(0-9)").matches(/^(?=.*[a-z])/,"Password must contain at least one lowercase letter").matches(/^(?=.*[A-Z])/,"Password must contain at least one uppercase letter").matches(/^(?=.*[!@#\$%\^&\*])/,"Password must contain at least one symbol").test("is-not-dictionary","Password must not contain a common word",_=>fh.every(C=>!_.includes(C))).test("does-not-contain-user-info","Password must not contain your name or date of birth",_=>{const C=Te(a.user.dob);return[a.user.first_name,a.user.last_name,C.format("yyyyMMDD"),C.format("DDMMyyyy"),C.format("MMDDyyyy"),C.format("YYMMDD"),C.format("MMDDYY"),C.format("DDMMYY")].every(E=>E.trim()==""||!_.toLowerCase().includes(E.toLowerCase()))}),confirm_password:ge().oneOf([zu("password"),null],"Passwords don't match").required("This field is required")}),{handleSubmit:g,register:y,reset:w,trigger:v,formState:{errors:S,dirtyFields:m}}=Oe({defaultValues:{current_password:"",password:"",confirm_password:""},resolver:Xe(u),criteriaMode:"all"}),[p,b]=h.exports.useState(!1);async function x(_){console.log("submitting",_),b(!0);try{await _t("edit-self","post",{user:{password:_.password,oldPassword:_.current_password}},""),t(),w(),n({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"Password change successful",btn:"Ok got it"}})}catch(C){n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:C.message}})}b(!1)}function k(){var C,E,T,D,P,M,O;var _=[];return Array.isArray((C=S.password)==null?void 0:C.types.matches)&&(_=[...S.password.types.matches]),typeof((E=S.password)==null?void 0:E.types.matches)=="string"&&_.push(S.password.types.matches),(T=S.password)!=null&&T.types.min&&_.push(S.password.types.min),(D=S.password)!=null&&D.types["does-not-contain-user-info"]&&_.push((P=S.password)==null?void 0:P.types["does-not-contain-user-info"]),(M=S.password)!=null&&M.types["is-not-dictionary"]&&_.push((O=S.password)==null?void 0:O.types["is-not-dictionary"]),_}const N=k();return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:g(x),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Change Password"}),s("button",{type:"button",onClick:t,className:"rounded-full border p-1 px-3 text-2xl font-normal duration-300 hover:bg-gray-200",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),s("p",{className:"mb-4",children:"In order to set new password provide the current one:"}),s("div",{className:"mb-8",children:f("div",{className:"relative flex justify-between rounded-sm border bg-transparent",children:[s("input",{type:r?"text":"password",...y("current_password"),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Type current password"})," ",f("button",{type:"button",onClick:()=>i(_=>!_),className:"absolute right-1 top-[20%]",children:[" ",r?s("img",{src:"/show.png",alt:"",className:"mr-2 ml-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 ml-2 w-6"})]})]})}),s("hr",{className:"my-[32px] md:my-[32px]"}),f("div",{className:"mb-8",children:[f("div",{className:"relative mb-4 flex justify-between rounded-sm border bg-transparent",children:[s("input",{type:o?"text":"password",...y("password",{onChange:_=>{v("password")}}),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Type new password",autoComplete:"new-password"})," ",f("button",{type:"button",onClick:()=>c(_=>!_),className:"absolute right-1 top-[20%]",children:[" ",o?s("img",{src:"/show.png",alt:"",className:"mr-2 ml-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 ml-2 w-6"})]})]}),m.password&&s("div",{className:"fade-in mb-4 space-y-2 rounded-sm border border-[#C42945] p-3 text-sm normal-case text-[#C42945] empty:hidden",children:N.map(_=>s("p",{children:_}))})]}),f("div",{className:"mb-4",children:[f("div",{className:"relative flex justify-between rounded-sm border bg-transparent",children:[s("input",{type:l?"text":"password",...y("confirm_password"),className:"flex-grow border-0 p-2 px-4 focus:outline-none active:outline-none ",placeholder:"Retype new password"})," ",f("button",{type:"button",onClick:()=>d(_=>!_),className:"absolute right-1 top-[20%]",children:[" ",l?s("img",{src:"/show.png",alt:"",className:"mr-2 ml-2 w-6"}):s("img",{src:"/invisible.png",alt:"",className:"mr-2 ml-2 w-6"})]})]}),Object.entries(S).length>0&&m.password&&!S.password?s("p",{className:"error-vibrate my-3 rounded-md border border-[#C42945] bg-white py-2 px-3 text-center text-sm normal-case text-[#C42945]",children:Object.values(S)[0].message}):null]}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"mt-4 flex-grow rounded border-2 border-[#98A2B3] py-2 tracking-wide outline-none focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:p,type:"submit",className:`login-btn-gradient rounded tracking-wide text-white outline-none focus:outline-none ${p?"py-1 px-4":"py-2"} mt-4 flex-grow`,children:"Update"})]})]})})})})]})})})}function RF({modalOpen:e,closeModal:t}){const{state:n,dispatch:a}=h.exports.useContext(we),{handleSubmit:r,register:i}=Oe({defaultValues:{about:n.user.about}}),[o,c]=h.exports.useState(!1);async function l(d){console.log("submitting",d),c(!0);try{await _t("edit-self","post",{profile:d},""),t(),a({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:"About change successful",btn:"Ok got it"}}),a({type:"SET_USER_DATA",payload:{...n.user,about:d.about}})}catch(u){a({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:u.message}})}c(!1)}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:r(l),children:[f("div",{className:"flex justify-between items-center mb-[18px]",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Edit About"}),s("button",{type:"button",onClick:t,className:"p-1 border hover:bg-gray-200 duration-300 px-3 text-2xl font-normal rounded-full",children:"\u2715"})," "]}),s("hr",{className:"mb-4"}),s("textarea",{...i("about"),cols:"30",rows:"10",className:"w-full focus:outline-none border-2 p-2 resize-none text-sm text-gray-900"}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"tracking-wide outline-none focus:outline-none rounded py-2 border-2 border-[#98A2B3] mt-4 flex-grow",onClick:t,children:"Cancel"}),s(Ft,{loading:o,type:"submit",className:`login-btn-gradient text-white tracking-wide outline-none focus:outline-none rounded ${o?"py-1 px-4":"py-2"} mt-4 flex-grow`,children:"Update"})]})]})})})})]})})})}function jF({isOpen:e,closeModal:t}){const{state:n,dispatch:a}=h.exports.useContext(we),r=on(n.user.settings,{}).email_on_booking_declined==!0,[i,o]=h.exports.useState(!1);async function c(){o(!0);let l;r?l={...on(n.user.settings,{}),email_on_space_image_declined:!1,email_on_booking_declined:!1,email_on_profile_photo_declined:!1,email_on_new_chat_message:!1,email_on_space_booked:!1,email_on_booking_cancelled:!1,email_on_booking_accepted:!1}:l={...on(n.user.settings,{}),email_on_space_image_declined:!0,email_on_booking_declined:!0,email_on_profile_photo_declined:!0,email_on_new_chat_message:!0,email_on_space_booked:!0,email_on_booking_cancelled:!0,email_on_booking_accepted:!0};try{await _t("edit-self","post",{profile:{settings:JSON.stringify(l)}},""),t(),await AM(200),a({type:"SET_USER_DATA",payload:{...n.user,settings:JSON.stringify(l)}})}catch(d){a({type:"SHOW_ERROR",payload:{heading:"Operation Failed",message:d.message}})}o(!1)}return f(Se,{children:[e&&s("div",{className:"fixed inset-0 flex items-center justify-center"}),s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:r?"Turn Off Email Notifications":"Enable email notifications?"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:r?"Disabling email notifications on site activity":"Enable email notifications on site activity such as booking when booking is declined by host"})}),f("div",{className:"mt-4 flex gap-4 justify-end",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:t,children:"Cancel"}),s(Ft,{loading:i,type:"button",className:`inline-flex justify-center rounded-md ${i?"py-1 px-6":"py-2 px-4"} text-sm font-medium login-btn-gradient text-white`,onClick:c,children:"Proceed"})]})]})})})})]})})]})}function zF({modalOpen:e,modalImage:t,onConfirm:n,onCancel:a}){return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:a,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-sm transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s("img",{src:t||"/default.png",alt:"Profile Preview",className:"mb-4 h-64 w-full rounded object-cover"}),f("div",{className:"flex justify-center gap-4",children:[s("button",{className:"login-btn-gradient rounded px-4 py-2 text-white",onClick:n,children:"Confirm"}),s("button",{className:"rounded bg-gray-300 px-4 py-2 text-black",onClick:a,children:"Cancel"})]})]})})})})]})})}function l8e(e){switch(e){case rn.IN_REVIEW:return"We are currently reviewing your profile picture";case rn.APPROVED:return"This will be displayed on your profile";case rn.NOT_APPROVED:return"The image you uploaded was rejected after reviewing, please change it";default:return"Please upload a profile picture"}}function c8e(){var M;const{dispatch:e,state:t}=h.exports.useContext(we),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(!1),[o,c]=h.exports.useState(!1),[l,d]=h.exports.useState(!1),[u,g]=h.exports.useState(!1),[y,w]=h.exports.useState(!1),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState(!1);h.exports.useState(!1);const[b,x]=h.exports.useState(!1),[k,N]=h.exports.useState(null);let _=new _e;const C=O=>{const F=O.target.files&&O.target.files[0];F&&(N(F),x(!0))},E=async()=>{if(x(!1),!k)return;e({type:"START_LOADING"});const O=new FormData;O.append("file",k);try{const F=await _.uploadImage(O);_.setTable("user"),await _t("edit-self","post",{user:{photo:F.url,is_photo_approved:rn.IN_REVIEW}},""),e({type:"SET_USER_DATA",payload:{...t.user,photo:F.url,is_photo_approved:rn.IN_REVIEW}}),_.setTable("notification"),await _.callRestAPI({user_id:t.user.id,actor_id:null,action_id:t.user.id,notification_time:new Date().toISOString().split(".")[0],message:"Profile Picture Edited",type:za.EDIT_USER_PICTURE,status:rr.NOT_ADDRESSED},"POST")}catch(F){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:F.message}})}e({type:"STOP_LOADING"}),N(null)},T=()=>{x(!1),N(null)},D=async()=>{try{_.setTable("user"),await _t("edit-self","post",{user:{photo:null,is_photo_approved:null}},""),e({type:"SET_USER_DATA",payload:{...t.user,photo:null,is_photo_approved:null}})}catch(O){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}};async function P(){a(!0);try{await _t("edit-self","post",{user:{two_factor_authentication:r!=1?1:0}},""),c(!1),e({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:`Two factor Authentication ${r==1?"disabled":"enabled"}`,btn:"Ok got it"}}),i(O=>O==1?0:1)}catch(O){c(!1),e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}a(!1)}return f("div",{className:"pb-16 pt-[44px] normal-case text-[#475467]",children:[f("div",{className:"flex flex-wrap-reverse justify-between ",children:[f("div",{className:"flex max-w-3xl flex-grow flex-col justify-between md:flex-row md:items-center",children:[f("div",{className:"mb-[16px] flex flex-col",children:[s("h3",{className:"text-xl font-semibold",children:"Your photo"}),s("small",{className:"text-xs md:text-sm",children:l8e(t.user.is_photo_approved)})]}),f("div",{"data-tour":"photo-step",className:"flex items-center justify-between",children:[s("img",{src:(M=t.user.photo)!=null?M:"/default.png",alt:"",className:"photo-step h-[56px] w-[56px] rounded-full object-cover md:mr-[65px] md:h-[64px] md:w-[64px]"}),f("div",{children:[f("label",{className:"third-step mr-3 cursor-pointer font-semibold underline",htmlFor:"profilePic",children:["Update"," ",s("input",{type:"file",className:"hidden",id:"profilePic",onChange:C})]}),s("button",{className:"underline",onClick:()=>{e({type:"SHOW_CONFIRMATION",payload:{heading:"Remove Profile Picture?",message:"Are you sure you want to remove your profile picture?",btn:"Yes, Remove",onClose:()=>{D()}}})},children:"Remove"})]})]})]}),f("div",{className:"mb-12 flex w-full justify-between md:mb-0 md:w-[unset] md:flex-col md:justify-start",children:[s("p",{className:"mb-2 self-end",children:"Profile status"}),f("div",{"data-tour":"fourth-step",className:"fourth-step flex",children:[![0,1].includes(t.user.verificationStatus)&&s($e,{to:"/account/verification",className:"mr-3 font-semibold text-[#1570EF]",children:"Get verified"}),s("button",{className:`${t.user.verificationStatus==1?"login-btn-gradient":"bg-[#667085]"} flex min-w-[103px] items-center gap-1 rounded-md p-1 px-2 text-xs uppercase tracking-wider text-white`,children:(()=>{switch(t.user.verificationStatus){case 0:return f(Se,{children:[s(hl,{}),s("span",{children:"Pending"})]});case 1:return f(Se,{children:[s(hl,{}),s("span",{children:"Verified"})]});case 2:return f(Se,{children:[s(hl,{}),s("span",{children:"Verification Declined"})]});default:return f(Se,{children:[s(hl,{}),s("span",{children:"Not verified"})]})}})()})]})]})]}),s("hr",{className:"my-[37px]"}),s(IF,{closeModal:()=>w(!1),modalOpen:y}),s(PF,{closeModal:()=>g(!1),modalOpen:u}),s(RF,{closeModal:()=>S(!1),modalOpen:v}),s(OF,{closeModal:()=>p(!1),modalOpen:m}),s(AF,{isOpen:o,closeModal:()=>c(!1),isEnabled:r,onProceed:P,loading:n}),s(jF,{isOpen:l,closeModal:()=>d(!1)}),s(zF,{modalOpen:b,modalImage:k instanceof File?URL.createObjectURL(k):k,onConfirm:E,onCancel:T})]})}function d8e(e){switch(e){case rn.IN_REVIEW:return"We are currently reviewing your profile picture";case rn.APPROVED:return"This will be displayed on your profile";case rn.NOT_APPROVED:return"The image you uploaded was rejected after reviewing, please change it";default:return"Please upload a profile picture"}}function wT(){var M;const{dispatch:e,state:t}=h.exports.useContext(we),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState(!1),[o,c]=h.exports.useState(!1),[l,d]=h.exports.useState(!1),[u,g]=h.exports.useState(!1),[y,w]=h.exports.useState(!1),[v,S]=h.exports.useState(!1),[m,p]=h.exports.useState(!1);h.exports.useState(!1);const[b,x]=h.exports.useState(!1),[k,N]=h.exports.useState(null);let _=new _e;const C=O=>{const F=O.target.files&&O.target.files[0];F&&(N(F),x(!0))},E=async()=>{if(x(!1),!k)return;e({type:"START_LOADING"});const O=new FormData;O.append("file",k);try{const F=await _.uploadImage(O);_.setTable("user"),await _t("edit-self","post",{user:{photo:F.url,is_photo_approved:rn.IN_REVIEW}},""),e({type:"SET_USER_DATA",payload:{...t.user,photo:F.url,is_photo_approved:rn.IN_REVIEW}}),_.setTable("notification"),await _.callRestAPI({user_id:t.user.id,actor_id:null,action_id:t.user.id,notification_time:new Date().toISOString().split(".")[0],message:"Profile Picture Edited",type:za.EDIT_USER_PICTURE,status:rr.NOT_ADDRESSED},"POST")}catch(F){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:F.message}})}e({type:"STOP_LOADING"}),N(null)},T=()=>{x(!1),N(null)},D=async()=>{try{_.setTable("user"),await _t("edit-self","post",{user:{photo:null,is_photo_approved:null}},""),e({type:"SET_USER_DATA",payload:{...t.user,photo:null,is_photo_approved:null}})}catch(O){e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}};async function P(){a(!0);try{await _t("edit-self","post",{user:{two_factor_authentication:r!=1?1:0}},""),c(!1),e({type:"SHOW_CONFIRMATION",payload:{heading:"Success",message:`Two factor Authentication ${r==1?"disabled":"enabled"}`,btn:"Ok got it"}}),i(O=>O==1?0:1)}catch(O){c(!1),e({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}a(!1)}return f("div",{className:"pb-16 pt-[44px] normal-case text-[#475467]",children:[f("div",{className:"flex flex-wrap-reverse justify-between ",children:[f("div",{className:"flex max-w-3xl flex-grow flex-col justify-between md:flex-row md:items-center",children:[f("div",{className:"mb-[16px] flex flex-col",children:[s("h3",{className:"text-xl font-semibold",children:"Your photo"}),s("small",{className:"text-xs md:text-sm",children:d8e(t.user.is_photo_approved)})]}),f("div",{"data-tour":"photo-step",className:"flex items-center justify-between",children:[s("img",{src:(M=t.user.photo)!=null?M:"/default.png",alt:"",className:"h-[56px] w-[56px] rounded-full object-cover md:mr-[65px] md:h-[64px] md:w-[64px]"}),f("div",{children:[f("label",{className:"photo-step mr-3 cursor-pointer font-semibold underline",htmlFor:"profilePic",children:["Update"," ",s("input",{type:"file",className:"hidden",id:"profilePic",onChange:C})]}),s("button",{className:"underline",id:"remove_profile_pic",onClick:()=>{e({type:"SHOW_CONFIRMATION",payload:{heading:"Remove Profile Picture?",message:"Are you sure you want to remove your profile picture?",btn:"Yes, Remove",onClose:()=>{D()}}})},children:"Remove"})]})]})]}),f("div",{className:"mb-12 flex w-full justify-between md:mb-0 md:w-[unset] md:flex-col md:justify-start",children:[s("p",{className:"mb-2 self-end",children:"Profile status"}),f("div",{"data-tour":"fourth-step",className:"fourth-step flex",children:[![0,1].includes(t.user.verificationStatus)&&s($e,{to:"/account/verification",className:"mr-3 font-semibold text-[#1570EF]",children:"Get verified"}),s("button",{className:`${t.user.verificationStatus==1?"login-btn-gradient":"bg-[#667085]"} flex min-w-[103px] items-center gap-1 rounded-md p-1 px-2 text-xs uppercase tracking-wider text-white`,children:(()=>{switch(t.user.verificationStatus){case 0:return f(Se,{children:[s(hl,{}),s("span",{className:"",children:"Pending"})]});case 1:return f(Se,{children:[s(hl,{}),s("span",{className:"",children:"Verified"})]});case 2:return f(Se,{children:[s(hl,{}),s("span",{className:"",children:"Verification Declined"})]});default:return f(Se,{children:[s(hl,{}),s("span",{className:"",children:"Not verified"})]})}})()})]})]})]}),s("hr",{className:"my-[37px]"}),f("div",{className:"flex-co grid items-start gap-4 sm:flex",children:[s($e,{to:"/account/profile/rules-templates",className:"rounded-md border border-primary-dark px-4 py-2 text-sm text-black duration-200 hover:bg-primary-dark hover:text-white",children:"Manage Property Rules Template"}),s($e,{to:"/account/profile/rules-templates/add",className:"rounded-md border border-primary-dark px-4 py-2 text-sm text-black duration-200 hover:bg-primary-dark hover:text-white",children:"Add Property Rules Template"})]}),s(IF,{closeModal:()=>w(!1),modalOpen:y}),s(PF,{closeModal:()=>g(!1),modalOpen:u}),s(RF,{closeModal:()=>S(!1),modalOpen:v}),s(OF,{closeModal:()=>p(!1),modalOpen:m}),s(AF,{isOpen:o,closeModal:()=>c(!1),isEnabled:r,onProceed:P,loading:n}),s(jF,{isOpen:l,closeModal:()=>d(!1)}),s(zF,{modalOpen:b,modalImage:k instanceof File?URL.createObjectURL(k):k,onConfirm:E,onCancel:T})]})}function FF({modalOpen:e,closeModal:t,onSuccess:n}){const[a,r]=h.exports.useState(!1),i=CF(),o=bEe(),{dispatch:c,state:l}=h.exports.useContext(we),d=new _e,[u]=h.exports.useState(new AbortController),[g,y]=h.exports.useState(""),w=async v=>{r(!0),v.preventDefault(),y("");try{const S=o.getElement("cardNumber"),m=await i.createToken(S).then(async p=>{var b,x,k,N,_,C,E,T;p.error?(c({type:"SHOW_ERROR",payload:{message:(b=p.error)!=null&&b.message?(x=p.error)==null?void 0:x.message:(N=(k=p==null?void 0:p.trace)==null?void 0:k.raw)==null?void 0:N.message}}),y((_=p.error)!=null&&_.message?(C=p.error)==null?void 0:C.message:(T=(E=p==null?void 0:p.trace)==null?void 0:E.raw)==null?void 0:T.message)):(await d.createCustomerStripeCard({sourceToken:p?p.token.id:m.token.id},u.signal),t(),n())})}catch(S){if(S.name=="AbortError"){r(!1);return}console.log(S),c({type:"SHOW_ERROR",payload:{message:S!=null&&S.message?S==null?void 0:S.message:"Declined"}}),y(S!=null&&S.message?S==null?void 0:S.message:"Declined")}r(!1)};return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg mb-4 font-medium leading-6 text-gray-900",children:"Add New Card"}),f("form",{onSubmit:w,className:"space-y-4",children:[f("div",{children:[s("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Card Number"}),s("div",{className:"rounded border px-2 py-2",children:s(xEe,{options:{showIcon:!0}})})]}),f("div",{className:"flex gap-2",children:[f("div",{className:"w-1/2",children:[s("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"Expiry"}),s("div",{className:"rounded border px-2 py-2",children:s(wEe,{})})]}),f("div",{className:"w-1/2",children:[s("label",{className:"mb-1 block text-sm font-medium text-gray-700",children:"CVC"}),s("div",{className:"rounded border px-2 py-2",children:s(vEe,{})})]})]}),g&&s("div",{className:"text-sm text-red-500",children:g}),f("div",{className:"mt-4 flex justify-end gap-2",children:[s("button",{type:"button",className:"rounded bg-gray-200 px-4 py-2 text-gray-700 hover:bg-gray-300",onClick:t,disabled:a,children:"Cancel"}),s(Ft,{type:"submit",loading:a,className:"rounded !bg-primary-dark px-4 py-2 text-white hover:!bg-primary",children:"Add Card"})]})]})]})})})})]})})}function $F({modalOpen:e,closeModal:t,onSuccess:n,card:a}){const[r,i]=h.exports.useState(!1),{dispatch:o}=h.exports.useContext(Ee),{dispatch:c}=h.exports.useContext(we),l=new _e,[d]=h.exports.useState(new AbortController);async function u(g){i(!0),g.preventDefault();try{await l.deleteCustomerStripeCard(a.id,d.signal),t(),n()}catch(y){if(y.name=="AbortError"){i(!1);return}me(o,y.message),c({type:"SHOW_ERROR",payload:{heading:"Card Deletion Failed",message:y.message}})}i(!1)}return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:u,children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{as:"h3",className:"mb-[8px] text-2xl font-semibold",children:"Delete Payment Method"}),s("button",{onClick:t,className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",children:"\u2715"})]}),f("p",{children:["You are about to remove card ending with ",a.last4]}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"mt-4 flex-grow rounded border-2 border-[#98A2B3] py-2 tracking-wide outline-none focus:outline-none",onClick:()=>{d.abort(),t()},children:"Cancel"}),s(Ft,{loading:r,type:"submit",className:`mt-4 flex-grow rounded bg-[#D92D20] ${r?"py-1 px-4":"py-2"} tracking-wide text-white outline-none focus:outline-none`,children:"Yes, remove"})]})]})})})})]})})}const u8e={MasterCard:"/mastercard.jpg",Visa:"/visa.jpg","American Express":"/american-express.png",Discover:"/discover.png"};function f8e(){const[e,t]=h.exports.useState(!1),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState({}),{cards:o,changeDefaultCard:c,fetchCards:l}=Ox({loader:!0,onCardDelete:()=>a(!1)});return f(Se,{children:[f("div",{className:"min-h-screen pt-[30px] pb-16 normal-case",children:[f("div",{className:"max-w-lg",children:[f("div",{className:"mb-[12px] flex items-center justify-between",children:[s("h2",{className:"text-2xl font-semibold",children:"Payment Method"}),s("button",{className:"tenth-step text-sm font-semibold underline",onClick:()=>t(!0),children:"Add new"})]}),o.map(d=>f("div",{className:"radio-container mb-[16px] flex rounded-md border px-2 md:px-[16px]",children:[s("div",{className:"border-r py-[26px] pr-[12px]",children:f("label",{htmlFor:"default"+d.id,className:"cursor-pointer",children:[s("input",{type:"radio",name:"defaultPaymentMethod",id:"default"+d.id,checked:d.id==d.customer.default_source,value:d.id,onChange:u=>c(u.target.value)}),s("span",{}),s("b",{className:"hidden font-normal md:inline",children:"Default"})]})}),f("div",{className:"flex flex-grow items-center justify-between px-3 py-[16px] pr-0 md:px-[18px] md:pr-[18px]",children:[s("div",{className:"h-[36px] w-[51px]",children:s("img",{src:u8e[d.brand],className:"h-full w-full object-cover"})}),f("div",{className:"flex h-full flex-col justify-between text-sm",children:[s("p",{className:"font-semibold",children:"Credit card"}),f("small",{className:"text-xs",children:["Expires: ",d.exp_month,"/",d.exp_year]})]}),s("li",{className:"list-none md:list-disc md:font-semibold",children:d.last4}),f(jt,{as:"div",className:"relative max-w-[60px]",children:[s("div",{className:"",children:s(jt.Button,{className:"inline-flex justify-center px-1 py-3 text-sm font-medium text-gray-700",children:s(t4,{className:"h-6 w-6"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-40 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:f("button",{onClick:()=>{i(d),a(!0)},className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm ui-active:bg-gray-100 ui-active:text-gray-900 ui-not-active:text-gray-700",children:[s(Ru,{className:"h-6 w-6"}),"Delete"]})})})})})]})]})]},d.id))]}),o.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(WA,{className:"h-6 w-6"})," No cards yet"]})})]}),s(FF,{modalOpen:e,closeModal:()=>t(!1),onSuccess:()=>l()}),s($F,{modalOpen:n,closeModal:()=>{i({}),a(!1)},onSuccess:()=>l(),card:r})]})}function m8e({modalOpen:e,closeModal:t,onSuccess:n}){var S,m;const a=Qe({account_number:ge().required("Enter Account Number").label("Account Number"),account_number2:ge().oneOf([zu("account_number"),null],"Account Numbers Must Match"),routing_number:ge().required("Enter Routing Number").label("Routing Number"),routing_number2:ge().oneOf([zu("routing_number"),null],"Routing Numbers Must Match")}),{formState:r,handleSubmit:i,register:o,reset:c,formState:{errors:l}}=Oe({resolver:Xe(a),defaultValues:{routing_number:"",account_number:"",account_number2:"",account_name:""}}),{dispatch:d,state:u}=h.exports.useContext(we),{dispatch:g,state:y}=h.exports.useContext(Ee),[w]=h.exports.useState(new AbortController),v=async p=>{try{const b=new _e;b.setTable("payout_method"),await b.callRestAPI({host_id:y.user,account_name:p==null?void 0:p.account_name,account_number:p==null?void 0:p.account_number,routing_number:p==null?void 0:p.routing_number},"POST",w.signal),t(),n()}catch(b){if(me(g,b.message),b.name=="AbortError")return;c(),t(),d({type:"SHOW_ERROR",payload:{message:b.message}})}};return s(ke,{appear:!0,show:e||u.addPayoutMethodModal,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"eleventh-step w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:i(v),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[s(De.Title,{as:"h3",className:"text-lg font-semibold md:text-xl",children:"Add Payout Method"}),s("button",{type:"button",className:"rounded-full border p-1 px-3 text-2xl font-normal duration-100 hover:bg-gray-200 active:bg-gray-300",onClick:t,children:"\u2715"})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Routing number"}),s("input",{type:"text",required:!0,...o("routing_number"),className:"w-full rounded border py-2 px-3 text-sm leading-tight text-gray-700 focus:outline-none"})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Confirm Routing number"}),s("input",{type:"text",required:!0,...o("routing_number2"),className:"w-full rounded border py-2 px-3 text-sm leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-red-500 pt-2 text-xs italic",children:(S=l.routing_number2)==null?void 0:S.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Account number"}),s("input",{type:"text",required:!0,...o("account_number"),className:"w-full rounded border py-2 px-3 text-sm leading-tight text-gray-700 focus:outline-none"})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Confirm Account number"}),s("input",{type:"text",required:!0,...o("account_number2"),className:"w-full rounded border py-2 px-3 text-sm leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-red-500 pt-2 text-xs italic",children:(m=l.account_number2)==null?void 0:m.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",children:"Account holder name"}),s("input",{type:"text",required:!0,...o("account_name"),className:"w-full rounded border py-2 px-3 text-sm leading-tight text-gray-700 focus:outline-none"})]}),f("div",{className:"flex gap-4",children:[s("button",{type:"button",className:"mt-4 flex-grow rounded border-2 border-[#98A2B3] py-2 tracking-wide outline-none focus:outline-none",onClick:()=>{w.abort(),t()},children:"Cancel"}),s(Ft,{loading:r.isSubmitting,type:"submit",className:`login-btn-gradient mt-4 flex-grow rounded ${r.isSubmitting?"py-1 px-4":"py-2"} tracking-wide text-white outline-none focus:outline-none`,children:"Add payout method"})]})]})})})})]})})}const p8e={MasterCard:"/mastercard.jpg",Visa:"/visa.jpg","American Express":"/american-express.png",Discover:"/discover.png"};function h8e(){const[e,t]=h.exports.useState(!1),[n,a]=h.exports.useState(!1),[r,i]=h.exports.useState({}),{cards:o,changeDefaultCard:c,fetchCards:l}=Ox({loader:!0,onCardDelete:()=>a(!1)}),[d,u]=h.exports.useState(!1),{dispatch:g,state:y}=h.exports.useContext(Ee),{dispatch:w}=h.exports.useContext(we),[v,S]=h.exports.useState([]);async function m(){w({type:"START_LOADING"});try{const x=await new St().getList("payout_method",{join:[],filter:["deleted_at,is",`host_id,eq,${y.user}`]});Array.isArray(x.list)&&S(x.list)}catch(b){me(g,b.message),w({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:b.message}})}w({type:"STOP_LOADING"})}async function p(b){w({type:"START_LOADING"});try{await new St().delete("payout_method",b),m()}catch(x){me(g,x.message),w({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:x.message}})}w({type:"STOP_LOADING"})}return h.exports.useEffect(()=>{m()},[]),f(Se,{children:[f("div",{className:"min-h-screen pt-[30px] pb-16 normal-case",children:[f("div",{children:[f("div",{className:"max-w-lg",children:[f("div",{className:"mb-[12px] flex items-center justify-between",children:[s("h2",{className:"text-2xl font-semibold",children:"Payment Method"}),s("button",{className:"tenth-step text-sm font-semibold underline",onClick:()=>t(!0),children:"Add new"})]}),o.map(b=>f("div",{className:"radio-container mb-[16px] flex rounded-md border px-2 md:px-[16px]",children:[s("div",{className:"border-r py-[26px] pr-[12px]",children:f("label",{htmlFor:"default"+b.id,className:"cursor-pointer",children:[s("input",{type:"radio",name:"defaultPaymentMethod",id:"default"+b.id,checked:b.id==b.customer.default_source,value:b.id,onChange:x=>c(x.target.value)}),s("span",{}),s("b",{className:"hidden font-normal md:inline",children:"Default"})]})}),f("div",{className:"flex flex-grow items-center justify-between px-3 py-[16px] pr-0 md:px-[18px] md:pr-[18px]",children:[s("div",{className:"h-[36px] w-[51px]",children:s("img",{src:p8e[b.brand],className:"h-full w-full object-cover"})}),f("div",{className:"flex h-full flex-col justify-between text-sm",children:[s("p",{className:"font-semibold",children:"Credit card"}),f("small",{className:"text-xs",children:["Expires: ",b.exp_month,"/",b.exp_year]})]}),s("li",{className:"list-none md:list-disc md:font-semibold",children:b.last4}),f(jt,{as:"div",className:"relative max-w-[60px]",children:[s("div",{className:"",children:s(jt.Button,{className:"inline-flex justify-center px-1 py-3 text-sm font-medium text-gray-700",children:s(t4,{className:"h-6 w-6"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-40 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:f("button",{onClick:()=>{i(b),a(!0)},className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm ui-active:bg-gray-100 ui-active:text-gray-900 ui-not-active:text-gray-700",children:[s(Ru,{className:"h-6 w-6"}),"Delete"]})})})})})]})]})]},b.id))]}),o.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(WA,{className:"h-6 w-6"})," No cards yet"]})})]}),s("div",{className:"mt-16",children:f("div",{className:"max-w-lg",children:[f("div",{className:"flex items-center justify-between",children:[s("h2",{className:"text-2xl font-semibold",children:"Payout Method"}),s("button",{className:"tenth-step text-sm font-semibold underline",onClick:()=>u(!0),children:"Add new"})]}),s("div",{className:"mt-2 mb-4 text-sm text-gray-500",children:"Let us know where you'd like us to send your money"}),v.map(b=>s("div",{className:"radio-container mb-[16px] flex items-center rounded-md border px-2 md:px-[16px]",children:f("div",{className:"flex flex-grow items-center justify-between px-3 py-[16px] pr-0",children:[f("div",{className:"flex w-full flex-col gap-4 text-sm",children:[f("div",{className:"flex justify-between",children:[s("p",{children:"Routing number"}),s("p",{children:b.routing_number})]}),f("div",{className:"flex justify-between",children:[s("p",{children:"Account number"}),s("p",{children:b.account_number})]}),f("div",{className:"flex justify-between",children:[s("p",{children:"Account holder name"}),s("p",{children:b.account_name})]})]}),s("div",{className:"mr-2"}),f(jt,{as:"div",className:"relative",children:[s("div",{className:"",children:s(jt.Button,{className:"inline-flex justify-center px-1 py-3 text-sm font-medium text-gray-700",children:s(t4,{className:"h-6 w-6"})})}),s(ke,{as:h.exports.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:s(jt.Items,{className:"absolute right-0 z-10 mt-0 w-40 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:s("div",{className:"py-1",children:s(jt.Item,{children:f("button",{onClick:()=>{p(b.id)},className:"inline-flex w-full items-center gap-2 px-4 py-2 text-center text-sm ui-active:bg-gray-100 ui-active:text-gray-900 ui-not-active:text-gray-700",children:[s(Ru,{className:"h-6 w-6"}),"Delete"]})})})})})]})]})},b.id))]})})]}),s(FF,{modalOpen:e,closeModal:()=>t(!1),onSuccess:()=>l()}),s(m8e,{modalOpen:d,closeModal:()=>u(!1),onSuccess:()=>m()}),s($F,{modalOpen:n,closeModal:()=>{i({}),a(!1)},onSuccess:()=>l(),card:r})]})}function g8e({data:e,forceRender:t,reset:n}){var w;const a=je(),r=["Under review","Active","Rejected"],i=["text-[#667085]","my-text-gradient","text-[#DC6803]"],{dispatch:o}=h.exports.useContext(we),{dispatch:c}=h.exports.useContext(Ee),[l,d]=h.exports.useState(!1),u=new _e;async function g(v){try{await u.callRawAPI("/rest/property_spaces/PUT",{id:v,availability:Ti.HIDDEN},"POST"),t(new Date),n&&n()}catch(S){me(c,S.message),o({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:S.message}})}}async function y(v){try{await u.callRawAPI("/rest/property_spaces/PUT",{id:v,availability:Ti.VISIBLE},"POST"),t(new Date),n&&n()}catch(S){me(c,S.message),o({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:S.message}})}}return s(Se,{children:f("div",{className:"mx-auto mb-10 flex max-w-md flex-col border lg:max-w-none lg:flex-row",children:[f("div",{className:"relative h-40 min-w-[16rem] lg:h-[unset]",children:[!!e.url&&f(Se,{children:[s("img",{src:e.url,onLoad:()=>d(!0),alt:"",className:"absolute top-0 left-0 h-full w-full object-cover"}),s("div",{className:"absolute inset-0 px-2",children:s(ls,{className:"flex flex-grow justify-end pt-2",space_id:e.id,user_property_spaces_id:e.user_property_spaces_id,reRender:t})})]}),!e.url&&s(Ut,{className:"absolute -top-1 left-0 h-full w-full"})]}),f("div",{className:"flex flex-grow flex-col gap-8 px-4 py-6 lg:flex-row lg:gap-16 lg:px-8 xl:gap-24 2xl:gap-32",children:[f("div",{className:"flex w-full flex-grow flex-col justify-start space-y-3 lg:max-w-sm lg:justify-between lg:space-y-0",children:[s("h3",{className:"text-2xl font-semibold",children:e.name||s(Ut,{width:180})}),f("p",{className:"tracking-wider",children:[" ",e.address_line_1||s(Ut,{width:150})]}),e.id?f("div",{className:"flex items-end justify-between lowercase",children:[f("p",{className:"flex-grow",children:["from: ",f("span",{className:"font-bold",children:["$",e.rate]}),"/",s("span",{className:"",children:"h"})]}),f("div",{className:"flex justify-between gap-6 lg:flex-grow lg:gap-0",children:[f("div",{className:"ml-auto mr-5 flex items-center gap-2 md:ml-[unset] md:mr-[unset]",children:[s(Zc,{}),s("span",{children:e.max_capacity})]}),f("p",{className:"flex items-center gap-2",children:[s(ds,{}),s("span",{children:(Number(e.average_space_rating)||0).toFixed(1)})]})]})]}):s(Ut,{})]}),s("hr",{className:"block w-full lg:hidden"}),f("div",{className:"flex flex-col justify-between space-y-3 lg:space-y-0",children:[e.id?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Created"}),s("strong",{className:"whitespace-nowrap",children:Rr[new Date(e.create_at).getMonth()]+" "+new Date(e.create_at).getDate()+"/"+new Date(e.create_at).getFullYear()})]}):s(Ut,{width:100}),e.id?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Total Bookings"}),s("strong",{className:"whitespace-nowrap",children:e.booking_count})]}):s(Ut,{width:100}),e.id?f("div",{className:"flex justify-between gap-6",children:[s("p",{className:"whitespace-nowrap",children:"Reviews"}),s("strong",{className:"whitespace-nowrap",children:(w=e.space_rating_count)!=null?w:0})]}):s(Ut,{width:100})]}),s("hr",{className:"block w-full lg:hidden"}),f("div",{className:"flex w-full items-end justify-between lg:w-[200px] lg:flex-col lg:items-end lg:justify-center",children:[f("span",{className:`rounded-sm bg-[#F2F4F7] px-[17px] py-[8px] ${e.draft_status<Nn.COMPLETED?"text-[#DC6803]":i[e.space_status]} mb-[16px] whitespace-nowrap border text-sm font-semibold uppercase`,children:[" ",(e.draft_status<Nn.COMPLETED?"DRAFT":r[e.space_status])||s(Ut,{width:80})]}),e.id&&s($e,{to:"/account/my-spaces/"+e.id,className:"mb-[32px] hidden text-sm font-semibold underline lg:inline w-full text-end",state:e,children:"View details"}),(()=>{if(e.space_status==1&&e.availability==1&&e.draft_status>=Nn.COMPLETED)return s("button",{className:"hidden text-sm font-semibold text-[#667085] lg:inline",onClick:()=>g(e.id),children:"Deactivate"});if(e.space_status==1&&e.availability==0&&e.draft_status>=Nn.COMPLETED)return s("button",{className:"hidden text-sm font-semibold text-[#1570EF] lg:inline",onClick:()=>y(e.id),children:"Activate"})})(),s("div",{className:"inline border p-0.5 px-3 lg:hidden",children:s(Zl,{items:[{label:"Activate",icon:s(Se,{}),onClick:()=>y(e.id),notShow:!(e.space_status==1&&e.availability==0)},{label:"Deactivate",icon:s(Se,{}),onClick:()=>g(e.id),notShow:!(e.space_status==1&&e.availability==1)},{label:"View Details",icon:s(Se,{}),onClick:()=>{a("/account/my-spaces/"+e.id)}}]})})]})]})]})})}const b8e=new _e,y8e=new AbortController,x8e=[{label:"Under Review",value:0},{label:"Approved",value:1},{label:"Declined",value:2}],w8e=[{label:"Hidden",value:0},{label:"Visible",value:1}];function v8e({modalOpen:e,closeModal:t,setSpaces:n,FETCH_PER_SCROLL:a,spacesTotal:r,setSpacesTotal:i,forceRender:o}){const{dispatch:c}=h.exports.useContext(Ee),{dispatch:l}=h.exports.useContext(we),[d,u]=lt(),{handleSubmit:g,register:y,watch:w,reset:v,setValue:S,control:m,formState:p,resetField:b}=Oe({defaultValues:(()=>{var E,T,D,P,M,O;const C=Ue(d);return{id:(E=C.id)!=null?E:"",space_name:(T=C.space_name)!=null?T:"",from:En((D=C.from)!=null?D:"")?new Date(C.from):new Date,to:En((P=C.to)!=null?P:"")?new Date(C.to):new Date,space_status:(M=C.space_status)!=null?M:"",availability:(O=C.availability)!=null?O:"",direction:"DESC"}})()}),{dirtyFields:x}=p,k=w("from"),N=async C=>{const E=h1(C.to),T=h1(C.from);d.set("id",C.id),d.set("space_name",C.space_name),d.set("space_status",C.space_status),d.set("from",x!=null&&x.from?T:""),d.set("to",x!=null&&x.to?E:new Date().toISOString().split("T")[0]),d.set("availability",C.availability),u(d),_(),t()};async function _(C){const E=+localStorage.getItem("user");n(P=>{const M=r-P.length>a?a:Math.abs(r-P.length-a);return[...P,...Array(M).fill({})]});const T=Ue(d);var D=[`ergo_property.host_id = ${E} AND ergo_property_spaces.deleted_at IS NULL`];T.space_name&&D.push(`ergo_property.name LIKE '%${T.space_name}%'`),T.from&&T.to===void 0&&D.push(`ergo_property_spaces.create_at = ${T.from}`),T.to&&T.from===void 0&&D.push(`ergo_property_spaces.create_at = ${T.to}`),T.to&&T.from&&D.push(`ergo_property_spaces.create_at BETWEEN '${T.from}' AND '${T.to}'`),T.space_status&&D.push(`ergo_property_spaces.space_status = ${T.space_status} AND ergo_property_spaces.draft_status > 2`),T.availability==="1"&&D.push(`ergo_property_spaces.availability = ${T.availability} AND ergo_property_spaces.draft_status > 2 AND ergo_property_spaces.space_status = 1`),T.availability==="0"&&D.push(`ergo_property_spaces.availability = ${T.availability} AND ergo_property_spaces.draft_status > 2 `),T.id&&(D=[`ergo_property.host_id = ${E} AND ergo_property_spaces.id = ${T.id} AND ergo_property_spaces.deleted_at IS NULL`]);try{const P=await b8e.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:C!=null?C:1,limit:a,user_id:E,where:D,all:!0,sortId:"update_at",direction:"DESC"},"POST",y8e.signal);Array.isArray(P.list)&&(n(M=>[...M.filter(O=>Object.keys(O).length>0),...P.list].filter((O,F,z)=>z.findIndex(H=>H.id===O.id)===F)),i(P.total)),o(!0)}catch(P){if(me(c,P.message),P.name=="AbortError")return;l({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:P.message}})}}return s(ke,{appear:!0,show:e&&window.innerWidth<700,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"tiny-scroll max-h-fit w-full max-w-md transform overflow-hidden overflow-y-auto rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",as:"form",onSubmit:g(N),children:[f("div",{className:"mb-[18px] flex items-center justify-between",children:[f("div",{className:"flex gap-4",children:[s(De.Title,{as:"h3",className:"text-2xl font-semibold",children:"Filters"}),s("button",{type:"button",className:"text-sm text-gray-800 underline",onClick:()=>v({id:"",space_name:"",from:new Date,to:new Date,availability:"",space_status:"",direction:"DESC"},{keepDirty:!1}),children:"Clear"})]}),s("button",{type:"button",onClick:t,className:"text-lg rounded-full border p-1 px-3 font-normal duration-300 hover:bg-gray-200 md:text-2xl",children:"\u2715"})," "]}),s("hr",{className:"my-[10px]"}),f("div",{className:"space-y-6",children:[s("input",{type:"text",placeholder:"ID",autoComplete:"off",className:"mt-[24px] w-full rounded-md border p-2 focus:outline-none active:outline-none",...y("id")}),s("div",{className:"rounded-md bg-white",children:s(No,{reset:()=>b("from",{keepDirty:!1,keepTouched:!1}),setValue:C=>S("from",C,{shouldDirty:!0}),control:m,name:"from",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"From",type:"space",min:new Date("2001-01-01")})}),s("div",{className:"rounded-md bg-white",children:s(No,{reset:()=>b("to",{keepDirty:!1,keepTouched:!1}),setValue:C=>S("to",C,{shouldDirty:!0}),control:m,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",type:"space",min:k})}),s("input",{type:"text",placeholder:"Space name",className:"w-full rounded-md border px-2 py-3 focus:outline-none active:outline-none",...y("space_name")}),f("select",{className:"w-full cursor-pointer border bg-white py-3 rounded px-3 focus:outline-none",...y("space_status"),children:[s("option",{value:"",children:"Status: All"}),x8e.map(C=>s("option",{value:C.value,children:C.label},C.value))]}),f("select",{className:"w-full cursor-pointer border bg-white py-3 rounded px-3 focus:outline-none",...y("availability"),children:[s("option",{value:"",children:"Visibility: All"}),w8e.map(C=>s("option",{value:C.value,children:C.label},C.value))]})]}),s("button",{type:"submit",className:"login-btn-gradient mt-4 w-full rounded py-2 tracking-wide text-white outline-none focus:outline-none",children:"Apply and close"})]})})})})]})})}const _8e=new _e,N8e=new AbortController;function S8e(){const[t,n]=lt(),[a,r]=h.exports.useState([]),[i,o]=h.exports.useState(!1),[c,l]=h.exports.useState(!1),d=je(),{dispatch:u}=h.exports.useContext(we),{dispatch:g}=h.exports.useContext(Ee),[y,w]=h.exports.useState(100),{handleSubmit:v,register:S,watch:m,reset:p,setValue:b,control:x,formState:k,resetField:N}=Oe({defaultValues:(()=>{var M,O,F,z,H,A;const P=Ue(t);return{id:(M=P.id)!=null?M:"",space_name:(O=P.guest_name)!=null?O:"",from:En((F=P.from)!=null?F:"")?new Date(P.from):new Date,to:En((z=P.to)!=null?z:"")?new Date(P.to):new Date,availability:(H=P.availability)!=null?H:"",space_status:(A=P.space_status)!=null?A:"",direction:"DESC"}})()}),{dirtyFields:_}=k,C=m("direction");m("from");const E=async P=>{window.innerWidth<700&&o(!1),r([]);const M=h1(P.to),O=h1(P.from);t.set("id",P.id),t.set("space_name",P.space_name),t.set("space_status",P.space_status),t.set("from",_!=null&&_.from?O:""),t.set("to",_!=null&&_.to?M:new Date().toISOString().split("T")[0]),t.set("availability",P.availability),n(t),T()};async function T(P){const M=+localStorage.getItem("user");r(z=>{const H=y-z.length>12?12:Math.abs(y-z.length-12);return[...z,...Array(H).fill({})]});const O=Ue(t);let F=[`ergo_property.host_id = ${M} AND ergo_property_spaces.deleted_at IS NULL`];O.space_name&&F.push(`ergo_property.name LIKE '%${O.space_name}%'`),O.from!==void 0&&O.to===void 0&&F.push(`ergo_property_spaces.create_at = ${O.from}`),O.to===void 0&&O.from!==void 0&&F.push(`ergo_property_spaces.create_at = ${O.to}`),O.to&&O.from&&F.push(`ergo_property_spaces.create_at BETWEEN '${O.from}' AND '${O.to}'`),Number(O.space_status)<3&&F.push(`ergo_property_spaces.space_status = ${O.space_status} AND ergo_property_spaces.draft_status > 2`),Number(O.space_status)===3&&F.push("ergo_property_spaces.draft_status < 3"),O.availability==="1"&&F.push(`ergo_property_spaces.availability = ${O.availability} AND ergo_property_spaces.draft_status > 2 AND ergo_property_spaces.space_status = 1`),O.availability==="0"&&F.push(`ergo_property_spaces.availability = ${O.availability} AND ergo_property_spaces.draft_status > 2 AND ergo_property_spaces.space_status = 0`),O.id&&(F=[`ergo_property.host_id = ${M} AND ergo_property_spaces.id = ${O.id} AND ergo_property_spaces.deleted_at IS NULL`]);try{const z=await _8e.callRawAPI("/v2/api/custom/ergo/popular/PAGINATE",{page:P!=null?P:1,limit:12,user_id:M,where:F,all:!0,sortId:"update_at",direction:"DESC"},"POST",N8e.signal);Array.isArray(z.list)&&(r(H=>[...H.filter(A=>Object.keys(A).length>0),...z.list].filter((A,j,I)=>I.findIndex(B=>B.id===A.id)===j)),w(z.total))}catch(z){if(me(g,z.message),z.name=="AbortError")return;u({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:z.message}})}}h.exports.useEffect(()=>{T()},[]),h.exports.useEffect(()=>{c&&(r([]),T())},[c]);const D=(P,M)=>C=="DESC"?new Date(M.id)-new Date(P.id):new Date(P.id)-new Date(M.id);return f("div",{className:"min-h-screen bg-white px-3 pt-[20px]",children:[s("div",{className:"mb-8 flex justify-end fourteen-step",children:s("button",{className:"rounded-md border border-black hover:border-gray-200 p-2 px-6 hover:bg-gray-200",onClick:()=>d("/spaces/add"),children:"Add New Space"})}),s("section",{children:f("form",{onSubmit:v(E),className:"mb-8 text-sm md:text-base",children:[f("div",{className:"mb-[30px] flex justify-between gap-4 md:gap-0",children:[f("button",{type:"button",className:"flex flex-grow items-center justify-between gap-2 rounded-md border p-2 md:max-w-[120px]",onClick:()=>o(P=>!P),children:[s("span",{children:"Filters"}),s(lf,{className:"h-6 w-6"})]}),s(fa,{items:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],labelField:"label",valueField:"value",containerClassName:"h-full w-full max-w-[12rem]",className:"w-full border py-2 px-3",placeholder:"By Date: Newest First",control:x,name:"direction"})]}),f("div",{className:` ${i?"md:flex":"hidden"} animate-filter hidden flex-wrap gap-[12px] gap-y-[20px]`,children:[s("div",{className:"z-10 min-w-[190px] rounded-md bg-white h-fit",children:s(No,{reset:()=>N("from",{keepDirty:!1,keepTouched:!1}),setValue:P=>b("from",P,{shouldDirty:!0}),control:x,name:"from",labelClassName:"justify-between max-h-[50px] flex-grow flex-row-reverse",placeholder:"From",type:"space",min:new Date("2001-01-01")})}),s("div",{className:"z-10 min-w-[190px] rounded-md bg-white",children:s(No,{reset:()=>N("to",{keepDirty:!1,keepTouched:!1}),setValue:P=>b("to",P,{shouldDirty:!0}),control:x,name:"to",labelClassName:"justify-between flex-grow flex-row-reverse",placeholder:"To",type:"space",min:new Date("2001-01-01")})}),s("input",{type:"text",placeholder:"Space name",className:"max-w-[180px] rounded-md border p-2 focus:outline-none active:outline-none",...S("space_name")}),s(fa,{items:[{label:"Status: All",value:""},{label:"Under Review",value:0},{label:"Approved",value:1},{label:"Declined",value:2},{label:"Draft",value:3}],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"Status: All",control:x,name:"space_status"}),s(fa,{items:[{label:"Visibility: All",value:""},{label:"Hidden",value:0},{label:"Visible",value:1}],labelField:"label",valueField:"value",containerClassName:"flex-grow max-w-xs min-w-[10rem]",className:"w-full border py-2 px-3",placeholder:"Visibility: All",control:x,name:"availability"}),s("button",{type:"submit",className:"rounded-md border border-black p-2 px-6",children:"Search"})]})]})}),a.length==0&&s("div",{className:"flex min-h-[300px] items-center justify-center normal-case text-[#667085]",children:f("h2",{className:"flex gap-3",children:[s(Za,{})," You have no spaces"]})}),s(Pc,{dataLength:a.length,next:()=>{T(Math.round(a.length/12+1))},scrollThreshold:.9,hasMore:a.length<y,loader:s(Se,{}),endMessage:a.length>10&&s("p",{className:"text-center normal-case",children:s("b",{})}),className:"pb-20",children:a.sort(D).map((P,M)=>{var O;return s(g8e,{data:P,forceRender:l,reset:p},(O=P.id)!=null?O:M)})}),s(v8e,{modalOpen:i,closeModal:()=>o(!1),setSpaces:r,forceRender:l,spacesTotal:y,FETCH_PER_SCROLL:12,setSpacesTotal:w})]})}function k8e({property_space_id:e}){const[t,n]=h.exports.useState([]),[a,r]=h.exports.useState({}),{dispatch:i}=h.exports.useContext(we);async function o(l){try{const d=await _t("customer/schedule","post",{property_spaces_id:l},"",null,"v3");Array.isArray(d.list)&&n(d.list)}catch(d){i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:d.message}})}}async function c(l){var d,u;try{const g=await _t("property_spaces_schedule_template","post",{page:1,limit:1,where:[`property_spaces_id = ${l}`]},"PAGINATE");if(Array.isArray(g.list)&&g.list.length>0&&r({custom_slots:g.list[0].custom_slots}),(d=g.list[0])!=null&&d.schedule_template_id){const y=await _t("schedule_template","post",{page:1,limit:1,where:[`id = ${g.list[0].schedule_template_id}`]},"PAGINATE");Array.isArray(y.list)&&((u=y.list[0])!=null?u:{})&&r(w=>({...w,...y.list[0]}))}}catch(g){i({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:g.message}})}}return h.exports.useEffect(()=>{e&&(o(e),c(e))},[e]),{bookedSlots:t,scheduleTemplate:a}}function C8e({data:e,register:t,name:n}){const[a,r]=h.exports.useState(1);return f("div",{className:"flex justify-between mb-[12px]",children:[f("form",{className:"checkbox-container mb-[12px]",children:[s("input",{type:"checkbox",value:e.add_on_name,id:"cb"+e.id,...t(n)}),s("label",{htmlFor:"cb"+e.id,children:e.add_on_name})]}),f("div",{className:"flex gap-[32px] items-center",children:[e.showCounter&&f("div",{className:"border border-[#475467] rounded-xl p-2 flex gap-[10px] items-center",children:[s("button",{className:"border rounded-full px-2"+(a>0?" border-[#475467]":""),onClick:()=>r(i=>i==0?i:i-1),children:"-"}),s("span",{children:a}),s("button",{className:"border rounded-full px-2 border-[#475467]",onClick:()=>r(i=>i+1),children:"+"})]}),f("p",{className:"font-semibold text-[#344054]",children:[" $",e.cost*a]})]})]})}const Td=new _e,vT=new AbortController;function E8e(){var T,D;const{id:e}=Mt(),t=je(),{register:n,watch:a,handleSubmit:r,setValue:i}=Oe({defaultValues:{selectedAddons:[]}}),o=a(),{dispatch:c}=h.exports.useContext(we),{dispatch:l}=h.exports.useContext(Ee),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState(!1),{tax:S,commission:m}=xF(),{bookedSlots:p,scheduleTemplate:b}=k8e({property_space_id:d.property_space_id}),x=ed(d.property_id),[k,N]=h.exports.useState(!1);async function _(){var M;c({type:"START_LOADING"});const P=[`ergo_booking.id = ${e} AND ergo_booking.deleted_at IS NULL`];try{const O=await Td.callRawAPI("/v2/api/custom/ergo/booking/details",{where:P},"POST",vT.signal);u((M=O.list)!=null?M:{}),i("from",Pn(O.list.booking_start_time)),i("to",Pn(O.list.booking_end_time)),i("selectedDate",new Date(O.list.booking_start_time))}catch(O){if(me(l,O.message),O.name=="AbortError"){c({type:"STOP_LOADING"});return}c({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:O.message}})}c({type:"STOP_LOADING"})}h.exports.useEffect(()=>{_()},[]),h.exports.useEffect(()=>{x.length>0&&d.property_space_id&&i("selectedAddons",d.add_ons.map(P=>P.name))},[x.length,d]);async function C(P){console.log("submitting ",P),v(!0);const M=Te(P.selectedDate).format("MM/DD/YY"),O=localStorage.getItem("user");try{await Td.callRawAPI("/v2/api/custom/ergo/booking/PUT",{id:d.id,booked_unit:1,booking_start_time:new Date(M+" "+P.from).toISOString(),booking_end_time:new Date(M+" "+P.to).toISOString(),commission_rate:Number(m),customer_id:Number(O),duration:eo(P.from,P.to)*3600,host_id:d.host_id,payment_status:0,property_space_id:Number(d.property_space_id),status:0,num_guests:P.num_guests-1,tax_rate:Number(S!=null?S:d==null?void 0:d.tax)},"POST",vT.signal);let F=d.add_ons.filter(H=>!P.selectedAddons.includes(H.name)).map(H=>H.booking_addons_id),z=x.filter(H=>P.selectedAddons.includes(H.add_on_name)&&!d.add_ons.map(A=>A.name).includes(H.add_on_name)).map(H=>H.id);Td.setTable("booking_addons");for(const H of F){const A=await Td.callRestAPI({id:H},"DELETE");console.log("deleteResult",A)}for(const H of z)await Td.callRestAPI({booking_id:d.id,property_add_on_id:H},"POST");t(`/account/my-bookings/${d.id}`)}catch(F){if(me(l,F.message),F.name=="AbortError")return;c({type:"SHOW_ERROR",payload:{heading:"Edit Booking Failed",message:F.message}})}d.status==ut.UPCOMING&&await Td.sendEmail(d.host_email,"Booking Changed","The structure for this email will be changed shortly")}const E=new Date(o.selectedDate);return d.id?f("div",{className:"container mx-auto min-h-screen bg-white px-6 normal-case 2xl:px-16",onClick:()=>y(!1),children:[f("button",{className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center font-semibold",onClick:()=>t(-1),children:[s(ln,{type:"arrow",variant:"narrow-left",className:"h-4 w-4 stroke-[#667085]"})," ",s("span",{className:"ml-2",children:"Back"})]}),s("h2",{className:"mb-[20px] text-3xl font-semibold",children:"Edit Booking"}),f("div",{className:"flex flex-col items-start justify-between md:flex-row",children:[f("div",{className:"w-full md:w-[43%]",children:[f("div",{className:"mb-[40px] flex flex-col gap-[24px] md:flex-row",children:[s("div",{className:"h-[150px] rounded-lg bg-cover bg-center pr-2 md:w-[204px]",style:{backgroundImage:`url(${(T=d.image_url)!=null?T:"/default-property.jpg"})`},children:s(ls,{space_id:d.property_space_id,user_property_spaces_id:null,reRender:null})}),f("div",{className:"",children:[s("h3",{className:"mb-[6px] text-[18px] font-semibold",children:d.property_name}),s("p",{className:"mb-[6px] text-[#475467]",children:d.address_line_1}),s("p",{className:"mb-[6px] text-[#475467]",children:d.city+", "+d.address_line_2})]})]}),s("div",{className:"mb-[12px] flex justify-between",children:f("div",{className:"flex gap-[10px]",children:[s(Pl,{}),s("h4",{className:"text-lg font-semibold",children:"Date & time"})]})}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Date"}),f("p",{className:"font-semibold text-[#344054]",children:[" ",(E instanceof Date?yR[E.getMonth()]:"")+" "+E.getDate()+"/"+E.getFullYear()]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Time"}),f("p",{className:"font-semibold text-[#344054]",children:[o.from," - ",o.to]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Duration"}),f("p",{className:"font-semibold text-[#344054]",children:[eo(o.from,o.to)," hour(s)"]})]}),f("div",{className:"mt-[40px] mb-[16px] flex gap-[10px]",children:[s(C1,{}),s("h4",{className:"text-lg font-semibold",children:"Add Ons"})]}),x.map(P=>s(C8e,{data:P,register:n,name:"selectedAddons"},P.id))]}),f("div",{className:`${k?"hidden":"block"} sticky-price-summary ml-auto w-full bg-white p-4 md:w-[473px] md:border md:p-[32px]`,children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:d.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",d.rate]}),"/h"]})]}),f("div",{className:"flex flex-col",children:[f("div",{className:"mb-[13px] flex items-center justify-between",children:[s("span",{className:"text-lg",children:"Number of guests"}),s(N_,{register:n,name:"num_guests",setValue:i,initialValue:((D=d.num_guests)!=null?D:0)+1,maxCount:d.max_capacity})]}),s("hr",{className:"mb-[24px] hidden md:block"}),s("div",{className:"z-50 mb-3",children:s(jc,{register:n,setValue:i,fieldNames:["selectedDate","from","to"],showCalendar:g,setShowCalendar:y,fromDefault:Pn(d.booking_start_time),toDefault:Pn(d.booking_end_time),bookedSlots:p.map(P=>({fromTime:new Date(P.start_time),toTime:new Date(P.end_time)})),scheduleTemplate:b,defaultDate:E})}),s("button",{type:"button",id:"proceed-to-preview",className:"login-btn-gradient gap-2 rounded-tr rounded-br py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:(()=>{const P=document.getElementById("booking-time");return!(P&&!P.innerText.includes("Select"))})(),onClick:()=>N(!0),children:"Proceed"})]})]}),f("form",{className:`${k?"block":"hidden"} fadeIn w-full md:w-[40%]`,onSubmit:r(C),children:[f("div",{className:"flex flex-col rounded-sm border-2 border-[#33D4B7] p-[12px] pb-0 md:p-[32px]",children:[s("div",{className:"mb-[16px] flex justify-between text-[#101828]",children:s("h4",{className:"text-2xl font-semibold",children:"Charges"})}),f("div",{className:"tiny-scroll mb-2 max-h-[200px] overflow-y-auto pr-3",children:[f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Rate"}),f("p",{className:"font-semibold text-[#344054]",children:["$",d.rate.toFixed(2),"/h"]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Price"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",(d.rate*eo(o.from,o.to)).toFixed(2)]})]}),o.selectedAddons.map((P,M)=>{var F;let O=(F=x.find(z=>z.add_on_name==P))==null?void 0:F.cost;return O?f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:P}),f("p",{className:"font-semibold text-[#344054]",children:[" $",Number(O).toFixed(2)]})]},M):null}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Tax"}),f("p",{className:"font-semibold text-[#344054]",children:[" $",Number(d.rate*eo(o.from,o.to)*S/100).toFixed(2)]})]}),f("div",{className:"mb-[12px] flex justify-between",children:[s("p",{children:"Total"}),f("p",{className:"font-semibold text-[#344054]",children:[" ","$",(Number(x.reduce((P,M)=>{var O;return o.selectedAddons.includes(M.add_on_name)?Number(P)+((O=Number(M.cost))!=null?O:0):P},0))+Number(d.rate*eo(o.from,o.to)*S/100)+Number(d.rate*eo(o.from,o.to))).toFixed(2)]})]})]}),s(Ft,{type:"submit",loading:w,className:`login-btn-gradient mb-[12px] gap-2 rounded-tr rounded-br px-2 text-center tracking-wide text-white outline-none focus:outline-none ${w?"loading py-2":"py-3"}`,disabled:S==null||m==null,children:"Save"}),s("p",{className:"text-center text-sm",children:"(Note: this will affect the rates)"})]}),s("a",{href:"/",className:"mt-[12px] block text-center text-sm text-[#667085] underline",children:"Cancellation Policy"})]})]})]}):null}const T8e=()=>f("svg",{width:"19",height:"20",viewBox:"0 0 19 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[s("path",{d:"M10 1.875V3.95833M10 15V18.3333M4.79167 10H1.875M17.7083 10H16.4583",stroke:"url(#paint0_linear_5248_9363)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),s("defs",{children:f("linearGradient",{id:"paint0_linear_5248_9363",x1:"19.545",y1:"7.53667",x2:"8.8218",y2:"15.9842",gradientUnits:"userSpaceOnUse",children:[s("stop",{stopColor:"#33D4B7"}),s("stop",{offset:"1",stopColor:"#0D9895"})]})})]});function BF(){const[e,t]=h.exports.useState(null),{state:n}=h.exports.useContext(Ee),a=n.role,r=[{name:"My Bookings",route:"/account/my-bookings"},{name:"Messages",route:"/account/messages"},{name:"Reviews",route:"/account/reviews"},{name:"Profile",route:"/account/profile"},{name:"Payment",route:"/account/payments"},{name:"Billing",route:"/account/billing"}],i=[{name:"My Bookings",route:"/account/my-bookings"},{name:"Messages",route:"/account/messages"},{name:"Reviews",route:"/account/reviews"},{name:"My Spaces",route:"/account/my-spaces"},{name:"My Addons",route:"/account/my-addons"},{name:"My Amenities",route:"/account/my-amenities"},{name:"Profile",route:"/account/profile"},{name:"Payment",route:"/account/payments"},{name:"Billing",route:"/account/billing"}];return s("div",{className:"border-b",children:f(Sh,{slidesPerView:"auto",centeredSlides:!0,spaceBetween:0,mousewheel:!0,className:"navbar-slider",initialSlide:1,centeredSlidesBounds:!0,modules:[VNe],onSwiper:t,breakpoints:{640:{enabled:!1}},children:[(a=="host"?i:r).map((o,c)=>s(kh,{className:"!w-[120px] slider-menu text-center pb-3",children:s(Kd,{className:`${o.name==="Reviews"&&"thirteenth-step"} ${o.name==="Payment"&&"twelfth-step"} ${o.name==="My Bookings"&&"seventeen-step"}`,to:o.route,onClick:()=>e.slideTo(c),children:o.name})},o.route)),s("div",{className:"mover"})]})})}function L8e(){const{pathname:e}=An(),{state:t}=h.exports.useContext(we),n=["/account/verification","/account/my-bookings/","/account/my-spaces/"],[a,r]=h.exports.useState(!1);return h.exports.useEffect(()=>{r(t.user.getting_started==0)},[t.user.getting_started]),f("div",{className:"container mx-auto min-h-screen px-4 2xl:px-32",children:[f("header",{className:"bg-white pt-[120px] normal-case",children:[f("div",{className:`${a?"block":"hidden"} mb-[32px] rounded-xl border border-[#EAECF0] bg-[#F9FAFB] px-[21px] py-[19px]`,children:[f("div",{className:"mb-2 flex justify-between",children:[f("h1",{className:"flex gap-2",children:[s(T8e,{}),s("span",{className:"text-xl font-semibold",children:"Welcome to Ergo"})]}),s("button",{onClick:()=>r(!1),children:"\u2715"})]}),s("p",{className:"ml-7 max-w-3xl p-5 text-[#667085]",children:f(Se,{children:[" ","This is your host panel, where you can handle all things related to your spaces and bookings. NOTE: Before publishing space(s) you need to complete your"," ",s($e,{to:"/account/profile",className:"font-semibold underline",children:"\u2019Profile\u2019"})," ","and get verified."]})})]}),n.every(i=>!e.startsWith(i))&&s(BF,{})]}),s(Xu,{})]})}function D8e(){const{pathname:e}=An();return f("div",{className:"container mx-auto min-h-screen px-4 2xl:px-32",children:[s("header",{className:"bg-white pt-[120px] normal-case",children:["/account/verification","/account/my-bookings/","/account/my-spaces/"].every(n=>!e.startsWith(n))&&s(BF,{})}),s(Xu,{})]})}function M8e(){je();const{dispatch:e,state:t}=h.exports.useContext(we),{dispatch:n}=h.exports.useContext(Ee),[a,r]=h.exports.useState(!0),[i,o]=h.exports.useState();An();const c=new _e,{setIsOpen:l}=fN();async function d(){try{await c.callRawAPI("/v2/api/custom/ergo/edit-self",{profile:{getting_started:1}},"POST"),e({type:"SET_USER_DATA",payload:{...t.user,getting_started:1}})}catch(g){tokenExpireError(n,g.message),console.log("err",g)}}return t.user.id?((async()=>{var y;const g=await c.callRawAPI("/rest/profile/GETALL",{payload:{user_id:Number(t.user.id)},selectStr:"*"},"POST");o((y=g.list[0])==null?void 0:y.getting_started)})(),s(Se,{children:s(ke,{appear:!0,show:a&&i==0,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:()=>r(!1),children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"First time login?"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"Would you like a tour of the site?"})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>{r(!1),d()},children:"No thanks"}),s("button",{type:"button",className:"login-btn-gradient inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium text-white",onClick:()=>{r(!1),l(!0),e({type:"START_TOUR"})},children:"Yes please"})]})]})})})})]})})})):null}function A8e(){je();const{dispatch:e,state:t}=h.exports.useContext(we),{dispatch:n}=h.exports.useContext(Ee),[a,r]=h.exports.useState(!0),[i,o]=h.exports.useState(),c=new _e,{setIsOpen:l}=fN();async function d(){try{await c.callRawAPI("/v2/api/custom/ergo/edit-self",{profile:{getting_started:1}},"POST"),e({type:"SET_USER_DATA",payload:{...t.user,getting_started:1}})}catch(y){tokenExpireError(n,y.message),console.log("err",y)}}if(!t.user.id)return null;(async()=>{var w;const y=await c.callRawAPI("/rest/profile/GETALL",{payload:{user_id:Number(t.user.id)},selectStr:"*"},"POST");o((w=y.list[0])==null?void 0:w.getting_started)})();const g=()=>{r(!1),e({type:"START_TOUR"}),l(!0)};return s(Se,{children:s(ke,{appear:!0,show:a&&i==0,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:()=>r(!1),children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"First time login?"}),s("div",{className:"mt-2",children:s("p",{className:"text-sm text-gray-500",children:"Would you like a tour of the site?"})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>{r(!1),d()},children:"No thanks"}),s("button",{type:"button",className:"login-btn-gradient inline-flex justify-center rounded-md py-2 px-4 text-sm font-medium text-white",onClick:()=>{g()},children:"Yes please"})]})]})})})})]})})})}function I8e(){const[e,t]=h.exports.useState([]),{dispatch:n}=h.exports.useContext(we),{dispatch:a}=h.exports.useContext(Ee);async function r(){const i=new _e,o=new AbortController;try{const c=await i.callRawAPI("/v2/api/custom/ergo/spaces/PAGINATE",{page:1,limit:1e3,where:["deleted_at IS NULL"]},"POST",o.signal);Array.isArray(c.list)&&(t(c.list),n({type:"SET_SPACE_CATEGORIES",payload:c.list}))}catch(c){if(me(a,c.message),c.name=="AbortError")return;n({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:c.message}})}}return h.exports.useEffect(()=>{r()},[]),e}function O8e(){const[e,t]=h.exports.useState([]);h.exports.useState(!1);const{dispatch:n,state:a}=h.exports.useContext(Ee),{dispatch:r}=h.exports.useContext(we),i=je(),[o,c]=h.exports.useState({}),[l,d]=h.exports.useState(!1);async function u(){d(!0),r({type:"START_LOADING"});try{const w=await new St().getList("property_space_rule_template",{join:[],filter:["deleted_at,is",`host_id,eq,${a.user}`]});Array.isArray(w.list)&&t(w.list),d(!1)}catch(y){d(!1),me(n,y.message),r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:y.message}})}r({type:"STOP_LOADING"})}async function g(){d(!0);try{await new St().delete("property_space_rule_template",o.id),c({}),u()}catch(y){me(n,y.message),r({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:y.message}})}d(!1)}return h.exports.useEffect(()=>{u()},[]),f("div",{className:"container mx-auto min-h-screen px-4 pt-40 normal-case 2xl:px-32",children:[s("div",{className:"cursor-pointer",children:f($e,{to:"/account/profile",className:"mr-2 mb-2 inline-flex items-center pr-5 text-center text-sm font-semibold",children:[s(cf,{className:"h-4 w-6"}),s("span",{className:"ml-2",children:"Back"})]})}),!l&&e.length==0&&s("span",{className:"text-xl md:text-3xl text-center block w-full",children:"No Rules Templates Yet"}),s("div",{className:"mt-8 block pb-16 overflow-auto hidden-scrollbar space-y-6",children:e.map(y=>f(mu,{as:"div",className:"rounded-xl border border-gray-300 py-3 px-4",children:[f(mu.Button,{className:"flex w-full items-center justify-between gap-3 py-2 font-medium",children:[f("div",{className:"flex items-center gap-3 font-semibold",children:[s(Qee,{className:"h-6 w-6 text-gray-700 ui-open:rotate-0 ui-not-open:-rotate-90"}),y.template_name]}),s(Zl,{direction:"vert",items:[{label:"Edit",icon:s(Ite,{className:"h-5 w-5"}),onClick:()=>i(`/account/profile/edit-rules-templates/${y.id}`)},{label:"Delete",icon:s(Ru,{className:"h-5 w-5"}),onClick:()=>c(y)}]})]}),s(ke,{as:h.exports.Fragment,enter:"transition-all ease duration-500",enterFrom:"h-0",enterTo:"h-auto",leave:"transition-all ease duration-500",leaveFrom:"h-auto",leaveTo:"h-0",children:s(mu.Panel,{className:"overflow-hidden text-sm text-gray-500 duration-500",children:on(y.template,{}).paragraph})})]},y.id))}),s(ke,{appear:!0,show:o.id!=null,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:()=>c({}),children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[s(De.Title,{as:"h3",className:"text-lg font-medium leading-6 text-gray-900",children:"Are you sure"}),s("div",{className:"mt-2",children:f("p",{className:"text-sm text-gray-500",children:["Are you sure you want to delete ",s("b",{className:"font-medium text-gray-900",children:o.template_name}),"?"]})}),f("div",{className:"mt-4 flex justify-end gap-4",children:[s("button",{type:"button",className:"inline-flex justify-center rounded-md border px-4 py-2 text-sm font-medium focus:outline-none",onClick:()=>c({}),children:"Cancel"}),s(Ft,{loading:l,type:"button",className:`inline-flex justify-center rounded-md ${l?"py-1 px-6":"py-2 px-4"} login-btn-gradient text-sm font-medium text-white`,onClick:g,children:"Proceed"})]})]})})})})]})})]})}const _T=new _e;function P8e(){var g,y,w,v,S,m;const{dispatch:e,state:t}=h.exports.useContext(Ee),{dispatch:n}=h.exports.useContext(we),a=je(),r=Qe({template_name:ge().required("This field is required"),template:ge().required("This field is required")}),{register:i,handleSubmit:o,formState:{errors:c,isSubmitting:l,isValidating:d}}=Oe({resolver:Xe(r),defaultValues:{template:"",template_name:""},mode:"all"});async function u(p){console.log("submitting",p),_T.setTable("property_space_rule_template");try{await _T.callRestAPI({template_name:p.template_name,template:JSON.stringify({paragraph:p.template}),host_id:t.user},"POST"),n({type:"SHOW_CONFIRMATION",payload:{heading:"Successful",message:"Template created successfully",btn:"Back to profile",onClose:()=>a("/account/profile")}})}catch(b){me(e,b.message),n({type:"SHOW_ERROR",payload:{heading:"Failed to create template",message:b.message}})}}return f("div",{className:"container mx-auto min-h-screen px-4 pt-40 normal-case 2xl:px-32",children:[s("div",{children:f($e,{to:"/account/profile",className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(cf,{className:"h-4 w-6"}),s("span",{className:"ml-2",children:"Back"})]})}),f("form",{className:"text-sm md:max-w-lg mb-8",onSubmit:o(u),autoComplete:"off",children:[s("h1",{className:"mb-8 text-3xl font-bold md:text-4xl",children:"Create Rules Template"}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"template_name",children:["Name ",(g=c.template_name)!=null&&g.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(y=c.template_name)==null?void 0:y.message}):""]}),s("input",{autoComplete:"off",placeholder:"",...i("template_name"),className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(w=c.template_name)!=null&&w.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"template",children:["Template ",(v=c.template)!=null&&v.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(S=c.template)==null?void 0:S.message}):""]}),s("textarea",{placeholder:"",...i("template"),className:`w-full resize-none rounded border py-2 px-3 leading-tight text-gray-700 ${(m=c.template)!=null&&m.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),s("hr",{className:"my-[48px]"}),s("button",{type:"submit",disabled:l||d,className:"login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",children:"Save"})]})]})}new _e;let R8e=new St;const NT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.NOTIFICATION},{header:"Host ID",accessor:"host_id",isSorted:!0,isSortedDesc:!0,idPrefix:mt.HOST},{header:"Account Holder Name",accessor:"account_name",isSorted:!0,isSortedDesc:!0},{header:"Routing number",accessor:"routing_number",isSorted:!0,isSortedDesc:!0},{header:"Account Number",accessor:"account_number",isSorted:!0,isSortedDesc:!0},{header:"Host Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0}];function j8e(){var I,B,Y,U,W,V,X,ne,oe,q,te,G,J;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(NT),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=R.useState(!1);R.useState([]),R.useState("");const[N,_]=lt((I=localStorage.getItem("admin_payout_method_filter"))!=null?I:""),{reset:C,register:E,handleSubmit:T,setError:D,formState:{errors:P}}=Oe({defaultValues:Ue(N)});function M(K){const Q=a,Z=Q.findIndex(le=>le.accessor===K),se=Q[Z];se.isSortedDesc=!se.isSortedDesc,Q.splice(Z,1,se),r(()=>[...Q]);const ce=O(i,se.isSortedDesc,K);o(ce)}function O(K,Q,Z){return(Z==null?void 0:Z.split(",").length)>1&&(Z=Z.split(",")[0]),K.sort((se,ce)=>{var le,ae,ie,de;if(Q)return isNaN(se[Z])?((le=se[Z])==null?void 0:le.toLowerCase())<((ae=ce[Z])==null?void 0:ae.toLowerCase())?1:-1:se[Z]<ce[Z]?1:-1;if(!Q)return isNaN(se[Z])?((ie=se[Z])==null?void 0:ie.toLowerCase())<((de=ce[Z])==null?void 0:de.toLowerCase())?-1:1:se[Z]<ce[Z]?-1:1})}function F(K){(async function(){l(K),await A(0,K)})()}function z(){(async function(){await A(w-1>0?w-1:0,c)})()}function H(){(async function(){await A(w+1<=d?w+1:0,c)})()}async function A(K,Q){var se,ce;const Z=Ue(N);Z.id=(se=Z.id)==null?void 0:se.replace(mt.PAYMENT_METHOD,""),Z.host_id=(ce=Z.host_id)==null?void 0:ce.replace(mt.HOST,"");try{let le=[];Z.id&&le.push(`ergo_payout_method.id,eq,${Z.id}`),Z.host_id&&le.push(`ergo_payout_method.host_id,eq,${Z.host_id}`),Z.account_number&&le.push(`ergo_payout_method.account_number,cs,${Z.account_number}`),Z.account_name&&le.push(`ergo_payout_method.account_name,cs,${Z.account_name}`),Z.routing_number&&le.push(`ergo_payout_method.routing_number,cs,${Z.routing_number}`),Z.host_email&&le.push(`ergo_user.email,cs,${Z.host_email}`),console.log("filter",le);let ae=await R8e.getPaginate("payout_method",{filter:le,join:["user|host_id"],page:K||1,size:Q,order:"update_at"});console.log("res",ae);const{list:ie,total:de,limit:fe,num_pages:be,page:he}=ae,ve=O(ie,!1);o(ve),l(fe),u(be),v(he),y(de),m(he>1),b(he+1<=be)}catch(le){me(e,le.message),pe(n,le.message,4e3,"ERROR")}}const j=K=>{N.set("id",K.id),N.set("host_id",K.host_id),N.set("account_name",K.account_name),N.set("account_number",K.account_number),N.set("routing_number",K.routing_number),N.set("host_email",K.host_email),_(N),localStorage.setItem("admin_payout_method_filter",N.toString()),A(1,c)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"payout_method"}}),A(1,c)},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:T(j),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Payout methods"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...E("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(B=P.id)!=null&&B.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(Y=P.id)==null?void 0:Y.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_id",children:"Host ID"}),s("input",{...E("host_id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(U=P.host_id)!=null&&U.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(W=P.host_id)==null?void 0:W.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"host_email",children:"Host Email"}),s("input",{...E("host_email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(V=P.host_email)!=null&&V.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(X=P.host_email)==null?void 0:X.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"account_name",children:"Account Holder Name"}),s("input",{...E("account_name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=P.account_name)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(oe=P.account_name)==null?void 0:oe.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"account_number",children:"Account Number"}),s("input",{...E("account_number"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(q=P.account_number)!=null&&q.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(te=P.account_number)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"routing_number",children:"Routing Number"}),s("input",{...E("routing_number"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(G=P.routing_number)!=null&&G.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(J=P.routing_number)==null?void 0:J.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{C({id:"",host_id:"",host_email:"",account_name:"",account_number:"",routing_number:""}),localStorage.removeItem("admin_payout_method_filter"),Pt(N,_),A(w,c)},children:"Reset"})]})}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:F}),s("div",{className:"hidden justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:x,setEnabled:k})}),!1,s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[!1,NT.map((K,Q)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",onClick:()=>M(K.accessor),children:[K.header,K.isSorted,s("span",{children:K.isSorted?K.isSortedDesc?" \u25BC":" \u25B2":""})]},Q))]})}),s("tbody",{className:"divide-y divide-gray-200",children:i.map((K,Q)=>f("tr",{className:"py-2 text-sm",children:[!1,a.map((Z,se)=>{var ce;return Z.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Z.format(K[Z.accessor])},se):Z.accessor==""?s("td",{className:"gap-3 whitespace-nowrap px-6 py-4"},se):Z.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Z.mapping[(ce=K[Z.accessor])!=null?ce:0]},se):Z.idPrefix?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:Z.idPrefix+K[Z.accessor]},se):Z.nested?s("td",{className:"whitespace-nowrap px-6 py-4 normal-case",children:K[Z.nested][Z.accessor]},se):s("td",{className:"whitespace-nowrap px-6 py-4",children:K[Z.accessor]},se)})]},Q))})]})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:F,previousPage:z,nextPage:H})]})}const ST=new _e;function z8e(){var v,S,m,p,b,x;const{dispatch:e,state:t}=h.exports.useContext(Ee),{dispatch:n}=h.exports.useContext(we),a=je(),{id:r}=Mt(),i=Qe({template_name:ge().required("This field is required"),template:ge().required("This field is required")}),{register:o,handleSubmit:c,setValue:l,formState:{errors:d,isSubmitting:u,isValidating:g}}=Oe({resolver:Xe(i),defaultValues:{template:"",template_name:""},mode:"all"});async function y(k){console.log("submitting",k),ST.setTable("property_space_rule_template");try{await ST.callRestAPI({id:r,template_name:k.template_name,template:JSON.stringify({paragraph:k.template}),host_id:t.user},"PUT"),n({type:"SHOW_CONFIRMATION",payload:{heading:"Successful",message:"Template edited successfully",btn:"Go back",onClose:()=>a("/account/profile/rules-templates")}})}catch(N){me(e,N.message),n({type:"SHOW_ERROR",payload:{heading:"Failed to edit template",message:N.message}})}}async function w(){try{const N=await new St().getOne("property_space_rule_template",r,{join:[]});l("template_name",N.model.template_name),l("template",on(N.model.template,{}).paragraph)}catch(k){me(e,k.message),n({type:"SHOW_ERROR",payload:{heading:"Error fetching template",message:k.message}})}}return h.exports.useEffect(()=>{w()},[]),f("div",{className:"container mx-auto min-h-screen px-4 pt-40 normal-case 2xl:px-32",children:[s("div",{children:f($e,{to:"/account/profile",className:"mr-2 mb-2 inline-flex items-center py-2.5 pr-5 text-center text-sm font-semibold",children:[s(cf,{className:"h-4 w-6"}),s("span",{className:"ml-2",children:"Back"})]})}),f("form",{className:"text-sm md:max-w-lg",onSubmit:c(y),autoComplete:"off",children:[s("h1",{className:"mb-8 text-3xl font-bold md:text-4xl",children:"Edit Rules Template"}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"template_name",children:["Name ",(v=d.template_name)!=null&&v.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(S=d.template_name)==null?void 0:S.message}):""]}),s("input",{autoComplete:"off",placeholder:"",...o("template_name"),className:`w-full rounded border py-2 px-3 leading-tight text-gray-700 ${(m=d.template_name)!=null&&m.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`})]}),f("div",{className:"mb-8",children:[f("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"template",children:["Template ",(p=d.template)!=null&&p.message?s("span",{className:"text-xs font-normal italic text-red-500",children:(b=d.template)==null?void 0:b.message}):""]}),s("textarea",{placeholder:"",...o("template"),className:`w-full resize-none rounded border py-2 px-3 leading-tight text-gray-700 ${(x=d.template)!=null&&x.message?"border-red-500 focus:outline-red-500":"focus-within:outline-primary"}`,rows:10})]}),s("hr",{className:"my-[48px]"}),s("button",{type:"submit",disabled:u||g,className:"login-btn-gradient rounded py-2 mb-10 px-4 tracking-wide text-white outline-none focus:outline-none",children:"Save"})]})]})}function F8e({modalOpen:e,closeModal:t,spaceImages:n}){const[a,r]=h.exports.useState(0);return s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-50",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"bg-white p-5 rounded-lg md:w-4/5 w-5/6 transform overflow-hidden shadow-xl transition-all",children:[f("div",{className:"flex justify-between md:mb-[24px] mb-4",children:[s("div",{}),f("p",{className:"self-center normal-case",children:["Images ",a+1," of ",n.length]}),s("button",{onClick:t,className:"p-1 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full",children:"\u2715"})]}),s("div",{className:"",children:s(Sh,{modules:[F5,$5,B5],spaceBetween:50,slidesPerView:1,loop:!0,navigation:!0,pagination:{clickable:!0,renderBullet:(i,o)=>`<img src="${n[i].photo_url||"/default-property.jpg"}" draggable="false" class="pagination-image ${o}" />`},className:"property-swiper-slid",children:n.map((i,o)=>s(kh,{className:"md:pb-[120px]",children:({isActive:c})=>(c&&r(o),s("img",{src:i.photo_url||"/default-property.jpg",draggable:"false",className:"w-full property-swiper-image md:h-[600px] h-[300px"}))},o))})})]})})})})]})})}function $8e({modalOpen:e,closeModal:t,propertyDescription:n}){const{state:a,dispatch:r}=Ql();async function i(o){o.preventDefault();const l=new FormData(o.target).get("description");r({type:"SET_DESCRIPTION",payload:l}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:i,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Description"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"description",cols:"30",rows:"5",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:a!=null&&a.description?a==null?void 0:a.description:n}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function B8e({modalOpen:e,closeModal:t,name:n}){const{spaceData:a,dispatch:r}=Ql();async function i(o){o.preventDefault();const l=new FormData(o.target).get("name");r({type:"SET_PROPERTY_NAME",payload:l}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:i,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Space name"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"name",cols:"30",rows:"3",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:a!=null&&a.name?a==null?void 0:a.name:n}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function H8e({modalOpen:e,category:t,closeModal:n,propertyAddons:a,id:r,property_id:i,forceRender:o}){const c=Ix(r,t=="Others"),[l,d]=h.exports.useState(!1),u=Qe({name:ge()}).required(),{handleSubmit:g,formState:{errors:y}}=Oe({resolver:Xe(u)});let w=a,v=w.map(N=>Number(N.add_on_id));const S=new _e;async function m(N){const _=N.target,C=parseInt(_.value);if(_.checked)v.includes(C)||v.push(C);else{const E=v.indexOf(C);E!==-1&&v.splice(E,1)}}const p=()=>{const N=document.querySelectorAll(".addon-checkbox:checked");return Array.from(N).map(C=>parseInt(C.value))};function b(N,_){if(N.length!==_.length)return!1;const C=N.slice().sort(),E=_.slice().sort();return JSON.stringify(C)===JSON.stringify(E)}function x(N,_){const C=_.filter(T=>!N.includes(T)),E=N.filter(T=>!_.includes(T));return{toAdd:C,toRemove:E}}async function k(){d(!0),S.setTable("property_add_on");const N=w.map(C=>Number(C.add_on_id)),_=p();if(b(N,_)){d(!1),n();return}else{const{toAdd:C,toRemove:E}=x(N,_);for(const T of E){const D=w.find(P=>P.add_on_id===T);D&&await S.callRestAPI({id:Number(D.id)},"DELETE")}for(const T of C)await S.callRestAPI({property_id:i,add_on_id:Number(T)},"POST");d(!1),n(),o()}}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("form",{onSubmit:g(k),className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"w-full max-w-md mt-10 transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Addons"}),s("button",{type:"button",onClick:n,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),c.sort((N,_)=>(N.creator_id!==1?-1:1)-(_.creator_id!==1?-1:1)).map((N,_)=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"addons",id:"addon"+N.id,className:"addon-checkbox",value:N.id,defaultChecked:w.find(C=>C.add_on_id===N.id),onChange:C=>m(C)}),s("label",{htmlFor:"addon"+N.id,children:N.name})]},N.id)),f("div",{className:"flex justify-between",children:[s("button",{disabled:l,type:"button",onClick:n,className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:l,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${l?"py-1":"py-2"}`,children:"Update"})]})]})})})})]})})})}function U8e({modalOpen:e,closeModal:t,rules:n}){const{spaceData:a,dispatch:r}=Ql();async function i(o){o.preventDefault();const l=new FormData(o.target).get("rule");r({type:"SET_RULE",payload:l}),t()}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:t,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("div",{className:"flex z-10 min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"form",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",onSubmit:i,children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" "," ",s("span",{children:"Rule"}),s("button",{type:"button",onClick:t,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),s("textarea",{name:"rule",cols:"30",rows:"5",className:"w-full resize-none border-2 p-2 text-sm text-gray-900 focus:outline-none",defaultValue:a!=null&&a.rule?a==null?void 0:a.rule:n}),s("div",{className:"mt-4 flex justify-end gap-4",children:s("button",{type:"submit",className:"inline-flex justify-center rounded-md bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-4 py-2 text-sm font-medium text-white",children:"Save"})})]})})})})]})})})}function V8e({modalOpen:e,category:t,closeModal:n,propertyAmenities:a,id:r,oldAm:i,p_id:o,idAm:c,forceRender:l}){const d=Ch(r,t=="Others"),[u,g]=h.exports.useState(!1),y=Qe({name:ge()}).required(),{handleSubmit:w,formState:{errors:v}}=Oe({resolver:Xe(y)});let S=a,m=c;const p=new _e;async function b(C){const E=C.target,T=parseInt(E.value);if(E.checked)m.includes(T)||m.push(T);else{const D=m.indexOf(T);D!==-1&&m.splice(D,1)}}const x=()=>{const C=document.querySelectorAll(".amenity-checkbox:checked");return Array.from(C).map(T=>parseInt(T.value))};function k(C,E){return C.length!==E.length?!1:JSON.stringify(C.slice().sort())===JSON.stringify(E.slice().sort())}function N(C,E){const T=E.filter(P=>!C.includes(P)),D=C.filter(P=>!E.includes(P));return{toAdd:T,toRemove:D}}async function _(){g(!0),p.setTable("property_spaces_amenitites");const C=S.map(T=>Number(T.amenity_id)),E=x();if(k(C,E)){g(!1),n();return}else{const{toAdd:T,toRemove:D}=N(C,E);for(const P of D){const M=S.find(O=>O.amenity_id===P);M&&await p.callRestAPI({id:Number(M.id)},"DELETE")}for(const P of T)await p.callRestAPI({property_spaces_id:o,amenity_id:Number(P)},"POST");g(!1),n(),l()}}return s(Se,{children:s(ke,{appear:!0,show:e,as:h.exports.Fragment,children:f(De,{as:"div",className:"relative z-10",onClose:n,children:[s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:s("div",{className:"fixed inset-0 bg-black bg-opacity-25"})}),s("div",{className:"fixed inset-0 overflow-y-auto",children:s("form",{onSubmit:w(_),className:"flex min-h-full items-center justify-center p-4 text-center",children:s(ke.Child,{as:h.exports.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:f(De.Panel,{as:"div",className:"w-full max-w-md transform overflow-hidden rounded-2xl bg-white p-6 text-left align-middle shadow-xl transition-all",children:[f(De.Title,{as:"h3",className:"text-lg mb-8 font-medium leading-6 text-gray-900 flex w-full justify-between items-center",children:[" ",s("span",{children:"Amenities"}),s("button",{type:"button",onClick:n,className:"py-2 border hover:bg-gray-200 active:bg-gray-300 duration-100 px-3 text-2xl font-normal rounded-full flex justify-end",children:"\u2715"})]}),d.sort((C,E)=>(C.creator_id!==1?-1:1)-(E.creator_id!==1?-1:1)).map(C=>f("div",{className:"checkbox-container mb-4",children:[s("input",{type:"checkbox",name:"amenities",id:"amenity"+C.id,className:"amenity-checkbox",value:C.id,defaultChecked:S.find(E=>E.amenity_id===C.id),onChange:E=>b(E)}),s("label",{htmlFor:"amenity"+C.id,children:C.name})]},C.id)),f("div",{className:"flex justify-between",children:[s("button",{disabled:u,type:"button",onClick:n,className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:u,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${u?"py-1":"py-2"}`,children:"Update"})]})]})})})})]})})})}const W8e=()=>{var X,ne,oe,q,te,G,J;const{id:e}=Mt(),[t,n]=h.exports.useState(!1),[a,r]=h.exports.useState(!1),{propertySpace:i,notFound:o}=Jl(e,a),c=vF(i.id),{state:l}=An(),[d,u]=h.exports.useState(!1),[g,y]=h.exports.useState(!1),w=ed(i.property_id,g),v=Oh(i.id,d),S=Rx(i.id);xS(i.id),h.exports.useState(!1);const[m,p]=h.exports.useState(!1),{spaceData:b,dispatch:x}=Ql();let N=Ch(i==null?void 0:i.space_id,(i==null?void 0:i.category)=="Others").map(K=>Number(K.id)),C=Ix(i==null?void 0:i.space_id,(i==null?void 0:i.category)=="Others").map(K=>Number(K.id));const E=new _e,{dispatch:T,state:D}=h.exports.useContext(we),P=je(),{register:M,setValue:O}=Oe(),[F,z]=h.exports.useState(!1),[H,A]=h.exports.useState(!1),[j,I]=h.exports.useState(!1),[B,Y]=h.exports.useState(!1),[U,W]=h.exports.useState(!1);h.exports.useEffect(()=>{x({type:"SET_DESCRIPTION",payload:i.description}),x({type:"SET_ADDONS",payload:w}),x({type:"SET_AMENITIES",payload:v}),x({type:"SET_RULE",payload:i.rule}),x({type:"SET_PROPERTY_NAME",payload:i.name})},[]);const V=async K=>{if(K&&K.preventDefault(),console.log("submitting"),D.user.verificationStatus!=Rm.VERIFIED&&!U){W(!0);return}T({type:"START_LOADING"});const Q=Number(localStorage.getItem("user"));try{E.setTable("property");const Z=await E.callRestAPI({id:e,name:b!=null&&b.name?b==null?void 0:b.name:i==null?void 0:i.name,rule:b!=null&&b.rule?b==null?void 0:b.rule:i==null?void 0:i.rule},"PUT");await Ac.post("https://ergo.mkdlabs.com/rest/property_spaces/PUT",{id:Number(e),draft_status:Nn.COMPLETED},{headers:{Authorization:`Bearer ${localStorage.getItem("token")}`,"x-project":"ZXJnbzprNWdvNGw1NDhjaDRxazU5MTh4MnVsanV2OHJxcXAyYXM"}}),E.setTable("notification"),await E.callRestAPI({user_id:Q,actor_id:null,action_id:e,notification_time:new Date().toISOString().split(".")[0],message:"Space Draft Status Completed",type:za.CREATE_SPACE,status:rr.NOT_ADDRESSED},"POST"),P("/spaces/add/5")}catch(Z){T({type:"SHOW_ERROR",payload:{heading:"Operation failed",message:Z.message}})}T({type:"STOP_LOADING"}),window.scrollTo({top:0,left:0})};return f("div",{className:"min-h-screen bg-white pb-20 text-sm normal-case md:text-base",onClick:()=>{z(!1)},children:[s("h1",{className:"mb-4 text-4xl font-bold",children:"Review"}),s("p",{className:"mb-8",children:"Below is how people will see your listing:"}),s("div",{className:"mb-[18px] flex flex-col items-start justify-between px-[17px] md:flex-row md:items-center md:px-0",children:f("div",{className:"flex flex-col items-start gap-4 normal-case md:flex-row md:items-center",children:[s("h2",{className:"text-3xl font-semibold",children:b!=null&&b.name?b==null?void 0:b.name:i==null?void 0:i.name}),s("button",{className:"whitespace-nowrap text-sm underline",target:"_blank",onClick:()=>p(!0),children:"(view on map)"}),s("div",{className:"flex justify-end ",children:s("button",{onClick:()=>I(!0),children:s(Ga,{stroke:"#33d4b7"})})})]})}),f("div",{className:"snap-scroll relative mb-[66px] flex h-[381px] gap-[32px] px-[14px] md:px-0",children:[s("img",{src:((X=c[0])==null?void 0:X.photo_url)||"/default-property.jpg",className:"h-full rounded-lg object-cover xl:min-w-[616px]"}),s("img",{src:((ne=c[1])==null?void 0:ne.photo_url)||"/default-property.jpg",className:"h-full w-[292px] rounded-lg object-cover"}),f("div",{className:"flex min-w-[550px] flex-col gap-4 overflow-hidden md:gap-[32px]",children:[s("img",{src:((oe=c[2])==null?void 0:oe.photo_url)||"/default-property.jpg",className:"h-1/2 rounded-lg object-cover md:w-full"}),s("img",{src:((q=c[3])==null?void 0:q.photo_url)||"/default-property.jpg",className:"h-1/2 rounded-lg object-cover md:w-full"}),s("img",{src:((te=c[4])==null?void 0:te.photo_url)||"/default-property.jpg",className:"h-1/2 rounded-lg object-cover md:w-full"})]}),f("button",{className:"sticky right-6 mb-[8px] min-w-[170px] self-end border bg-[#00000080] px-3 py-1 text-center text-sm text-white",onClick:()=>n(!0),children:["View all photos (",c.filter(K=>K!=null).length,")"]})]}),f("section",{className:"relative flex flex-col items-start xl:flex-row xl:gap-12",children:[f("div",{className:"w-full px-2 md:px-0 xl:w-3/5",children:[f("div",{className:"py-12 px-3 flex items-center justify-between",children:[f("div",{children:[s("h3",{className:"mb-2 text-2xl font-semibold",children:"Description"}),s("p",{children:b!=null&&b.description?b==null?void 0:b.description:i==null?void 0:i.description})]}),s("div",{className:"",children:s("button",{onClick:()=>A(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("hr",{}),s("div",{className:"py-12 px-3 ",children:f("div",{children:[f("div",{className:"flex items-center justify-between w-full",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Amenities"}),s("div",{className:"",children:s("button",{onClick:()=>u(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("ul",{className:"addons-grid list-disk-important",children:v==null?void 0:v.map(K=>f("li",{className:"flex gap-[14px] w-[200px]",children:[s(ur,{}),K.amenity_name]},K.id))})]})}),s("hr",{}),s("div",{className:"py-12 px-3",children:f("div",{children:[f("div",{className:"flex items-center justify-between w-full",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Add ons"}),s("div",{className:"",children:s("button",{onClick:()=>y(!0),children:s(Ga,{stroke:"#33d4b7"})})})]}),s("ul",{className:"addons-grid",children:w==null?void 0:w.map(K=>{var Q;return f("li",{className:"flex w-fit gap-3",children:[s("span",{className:"w-fit",children:f("div",{className:"flex flex-wra gap-2",children:[s(ur,{})," ",(Q=K.add_on_name)!=null?Q:K.name]})}),f("strong",{className:"font-semibold",children:["$",K.cost,"/h"]})]},K.id)})})]})}),s("hr",{}),f("div",{className:"py-12 px-3",children:[s("div",{className:"mb-[28px] flex flex-wrap items-center justify-between",children:s("h3",{className:"mb-2 text-2xl font-semibold md:mb-0",children:"About the host"})}),f("div",{className:"flex items-center justify-between gap-4 md:justify-start md:gap-[24px]",children:[s("img",{src:(G=D.user.photo)!=null?G:"/default.png",className:"h-[72px] w-[72px] rounded-full object-cover"}),f("div",{className:"space-y-3",children:[f("div",{className:"flex text-xl font-bold gap-1",children:[s("p",{className:"md:block",children:D.user.first_name}),s("p",{className:"md:block",children:D.user.last_name})]}),s("p",{className:"hidden md:block",children:D.user.about})]})]})]}),s("hr",{}),s("div",{className:"py-12 px-3",children:f("div",{className:"mb-[18px] flex items-center justify-between",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Reviews"}),s(As,{options:[{label:"By Date: Newest First",value:"DESC"},{label:"By Date: Oldest First",value:"ASC"}],accessor:"label",valueAccessor:"value",className:"min-w-[200px]"})]})}),s("hr",{}),f("div",{className:"py-12 px-3",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"FAQs"}),S.map((K,Q)=>s(Ax,{data:K},Q))]}),s("hr",{}),f("div",{className:"py-12 px-3 flex items-center justify-between",children:[f("div",{children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Property rules"}),s("p",{children:b!=null&&b.rule?b==null?void 0:b.rule:i==null?void 0:i.rule})]}),s("div",{className:"",children:s("button",{onClick:()=>Y(!0),children:s(Ga,{stroke:"#33d4b7"})})})]})]}),f("div",{className:"mx-auto block w-full max-w-xl p-6 xl:hidden",children:[s("h3",{className:"mb-[8px] text-2xl font-semibold",children:"Price and availability"}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Max capacity"}),f("span",{children:[" ",s("strong",{className:"font-semibold",children:(J=i.max_capacity)!=null?J:i==null?void 0:i.max_capacity})," people"]})]}),f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Pricing from"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",i.rate]}),"/h"]})]}),i.additional_guest_rate&&i.max_capacity>1?f("div",{className:"mb-[13px] flex justify-between",children:[s("span",{className:"text-lg",children:"Additional guests"}),f("span",{children:["from: ",f("strong",{className:"font-semibold",children:["$",i.additional_guest_rate]}),"/h"]})]}):null,f("form",{className:"flex flex-col",children:[s("div",{className:"z-50 mb-3",children:s(jc,{register:M,setValue:O,fieldNames:["selectedDate","from","to"],showCalendar:F,setShowCalendar:z,fromDefault:"",toDefault:"",bookedSlots:[],scheduleTemplate:{...l,slots:on(l==null?void 0:l.slots,[]),custom_slots:l.customSlots},defaultMessage:"Check Availability"})}),s("button",{type:"submit",className:"login-btn-gradient gap-2 rounded-tr rounded-br py-3 px-2 text-center tracking-wide text-white outline-none focus:outline-none",disabled:!0,children:window.innerWidth>500?"Continue":"Check Availability"})]})]})]}),s(F8e,{spaceImages:c.filter(K=>K!=null),modalOpen:t,closeModal:()=>n(!1)}),s("hr",{className:"my-[30px]"}),s("button",{type:"button",className:"sixteen-step login-btn-gradient rounded py-2 px-4 tracking-wide text-white outline-none focus:outline-none",onClick:V,children:"Submit"}),s("br",{}),s(Oo,{modalImage:`https://maps.googleapis.com/maps/api/staticmap?center=${i.address_line_1||""}, ${i.address_line_2||""}, ${i.city||""}, ${i.country||""}&zoom=15&size=600x400&maptype=roadmap&markers=color:red|${i.address_line_1||""}, ${i.address_line_2||""}
&key=AIzaSyDDO29hDprF49HURTLsB7xnKjo-2qaOH70`,modalOpen:m,closeModal:()=>p(!1)}),s($8e,{modalOpen:H,propertyDescription:i==null?void 0:i.description,closeModal:()=>A(!1)}),s(B8e,{name:i==null?void 0:i.name,modalOpen:j,closeModal:()=>I(!1)}),s(V8e,{modalOpen:d,category:i==null?void 0:i.category,propertyAmenities:v,id:i==null?void 0:i.space_id,closeModal:()=>u(!1),idAm:N,p_id:e,forceRender:r}),s(H8e,{modalOpen:g,category:i==null?void 0:i.category,propertyAddons:w,id:i==null?void 0:i.space_id,closeModal:()=>y(!1),idAm:C,property_id:i==null?void 0:i.property_id,p_id:e,forceRender:r}),s(U8e,{modalOpen:B,rules:i==null?void 0:i.rule,closeModal:()=>Y(!1)}),s(mF,{modalOpen:U,closeModal:()=>W(!1),onSubmit:V})]})};let kT=new _e;function $r({modalOpen:e,closeModal:t,onSuccess:n,data:a}){const{dispatch:r}=R.useContext(we),{dispatch:i}=R.useContext(Ee);async function o(){try{kT.setTable(a.entity_type),await kT.callRestAPI({id:a.id,deleted_at:null},"PUT"),pe(r,"Restored successfully"),n(),t()}catch(c){tokenExpireError(i,c.message),pe(r,c.message,5e3,"ERROR")}}return s(Se,{children:e?f(Se,{children:[s("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto overflow-x-hidden outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-auto max-w-3xl md:min-w-[35rem]",children:f("div",{className:"relative flex w-full flex-col rounded-lg border-0 bg-white shadow-lg outline-none focus:outline-none",children:[f("div",{className:"flex items-start justify-between rounded-t border-solid border-slate-200 px-5 pt-6",children:[s("h3",{className:"text-xl font-semibold",children:"Are you sure?"}),s("button",{className:"float-right ml-auto border-0 bg-transparent p-1 text-3xl font-semibold leading-none text-black outline-none focus:outline-none",onClick:t,children:s("span",{className:"block h-6 w-6 bg-transparent text-2xl text-black outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:"relative flex-auto px-6 py-2",children:s("p",{className:"text-lg my-2 normal-case leading-relaxed text-slate-500",children:"Are you sure you want to restore this record?"})}),f("div",{className:"flex items-center justify-end rounded-b border-solid border-slate-200 px-6 pb-6",children:[s("button",{className:"background-transparent mr-1 mb-1 rounded border border-[##98A2B3] px-6 py-2 text-sm font-bold text-[#667085] outline-none focus:outline-none",type:"button",onClick:t,children:"Cancel"}),s("button",{className:"ml-5 mb-1 rounded border border-[##98A2B3] !bg-gradient-to-r from-primary to-primary-dark px-6 py-2 text-sm font-medium text-white outline-none focus:outline-none",type:"button",onClick:o,children:"Restore"})]})]})})}),s("div",{className:"fixed inset-0 z-40 bg-black opacity-25"})]}):null})}let Qo=new _e;function Br({modalOpen:e,closeModal:t,onSuccess:n,data:a,table:r}){const{dispatch:i}=R.useContext(we),{dispatch:o}=R.useContext(Ee);async function c(){try{if(r==="user"){var l=[`ergo_booking.host_id = ${a.id} OR ergo_booking.customer_id = ${a.id}`];const d=await Qo.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:999,where:l,sortId:"update_at",direction:"DESC"},"POST");(d==null?void 0:d.list.find(g=>g.status===2||g.status===1||g.status===0))===void 0?(Qo.setTable("user"),await Qo.callRestAPI({id:a.id},"DELETE"),pe(i,"User deleted successfully"),t(),n()):(pe(i,"User has active bookings",4e3,"ERROR"),t())}else if(r==="property_spaces"){var l=[`ergo_booking.property_space_id = ${a.space_id}`];const u=await Qo.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:999,where:l,sortId:"update_at",direction:"DESC"},"POST");(u==null?void 0:u.list.find(y=>y.status===2||y.status===1||y.status===0))===void 0?(Qo.setTable("property_spaces"),await Qo.callRestAPI({id:a.id},"DELETE"),pe(i,"Property Space deleted successfully"),t(),n()):(pe(i,"Property Space has active bookings",4e3,"ERROR"),t())}else Qo.setTable(r),await Qo.callRestAPI({id:a.id},"DELETE"),pe(i,"Record deleted successfully"),t(),n()}catch(d){me(o,d.message),pe(i,d.message,5e3,"ERROR")}}return s(Se,{children:e?f(Se,{children:[s("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto overflow-x-hidden outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-auto max-w-2xl md:min-w-[35rem]",children:f("div",{className:"relative flex w-full flex-col rounded-lg border-0 bg-white shadow-lg outline-none focus:outline-none",children:[f("div",{className:"flex items-start justify-between rounded-t border-solid border-slate-200 px-5 pt-6",children:[s("h3",{className:"text-xl font-semibold",children:"Warning!"}),s("button",{className:"float-right ml-auto border-0 bg-transparent p-1 text-3xl font-semibold leading-none text-black outline-none focus:outline-none",onClick:t,children:s("span",{className:"block h-6 w-6 bg-transparent text-2xl text-black outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:"relative flex-auto px-6 py-2",children:s("p",{className:"text-lg my-2 normal-case leading-relaxed text-slate-500",children:"Are you sure you want to delete this record permanently?. This action is not reversible"})}),f("div",{className:"flex items-center justify-end rounded-b border-solid border-slate-200 px-6 pb-6",children:[s("button",{className:"background-transparent mr-1 mb-1 rounded border border-[##98A2B3] px-6 py-2 text-sm font-bold text-[#667085] outline-none focus:outline-none",type:"button",onClick:t,children:"Cancel"}),s("button",{className:"ml-5 mb-1 rounded bg-red-500 px-6 py-2 text-sm font-medium text-white outline-none focus:outline-none",type:"button",onClick:c,children:"Delete"})]})]})})}),s("div",{className:"fixed inset-0 z-40 bg-black opacity-25"})]}):null})}let CT=new _e;function Hr({modalOpen:e,closeModal:t,onSuccess:n,records:a,table:r}){const{dispatch:i}=R.useContext(we),{dispatch:o}=R.useContext(Ee);async function c(){try{await Promise.all(a.map(l=>(CT.setTable(r),CT.callRestAPI({id:Number(l.id),deleted_at:null},"PUT")))),pe(i,"Restore Successful"),n(),t()}catch(l){tokenExpireError(o,l.message),pe(i,l.message,4e3,"ERROR")}}return s(Se,{children:e?f(Se,{children:[s("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto overflow-x-hidden outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-auto max-w-3xl md:min-w-[35rem]",children:f("div",{className:"relative flex w-full flex-col rounded-lg border-0 bg-white shadow-lg outline-none focus:outline-none",children:[f("div",{className:"flex items-start justify-between rounded-t border-solid border-slate-200 px-5 pt-6",children:[s("h3",{className:"text-xl font-semibold",children:"Are you sure?"}),s("button",{className:"float-right ml-auto border-0 bg-transparent p-1 text-3xl font-semibold leading-none text-black outline-none focus:outline-none",onClick:t,children:s("span",{className:"block h-6 w-6 bg-transparent text-2xl text-black outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:"relative flex-auto px-6 py-2",children:f("p",{className:"text-lg my-2 normal-case leading-relaxed text-slate-500",children:["Are you sure you want to restore ",a.length," records"]})}),f("div",{className:"flex items-center justify-end rounded-b border-solid border-slate-200 px-6 pb-6",children:[s("button",{className:"background-transparent mr-1 mb-1 rounded border border-[##98A2B3] px-6 py-2 text-sm font-bold text-[#667085] outline-none focus:outline-none",type:"button",onClick:t,children:"Cancel"}),s("button",{className:"ml-5 mb-1 rounded border border-[##98A2B3] !bg-gradient-to-r from-primary to-primary-dark px-6 py-2 text-sm font-medium text-white outline-none focus:outline-none",type:"button",onClick:c,children:"Restore All"})]})]})})}),s("div",{className:"fixed inset-0 z-40 bg-black opacity-25"})]}):null})}let Jo=new _e;function ci({modalOpen:e,closeModal:t,onSuccess:n,records:a,table:r}){const{dispatch:i}=R.useContext(we),{dispatch:o}=R.useContext(Ee);async function c(){try{if(r==="user")for(let d=0;d<a.length;d++){const u=a[d];var l=[`ergo_booking.host_id = ${u.id} OR ergo_booking.customer_id = ${u.id}`];const g=await Jo.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:999,where:l,sortId:"update_at",direction:"DESC"},"POST");(g==null?void 0:g.list.find(w=>w.status===2||w.status===1||w.status===0))===void 0?(Jo.setTable("user"),await Jo.callRestAPI({id:u.id},"DELETE"),t(),n()):(pe(i,"These other user(s) have an active booking",4e3,"ERROR"),t())}if(r==="property_spaces")for(let d=0;d<a.length;d++){const u=a[d];var l=[`ergo_booking.property_space_id = ${u.space_id} AND ergo_booking.deleted_at IS NULL`];const y=await Jo.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{page:1,limit:999,where:l,sortId:"update_at",direction:"DESC"},"POST");(y==null?void 0:y.list.find(v=>v.status===2||v.status===1))===void 0?(Jo.setTable("property_spaces"),await Jo.callRestAPI({id:u.id},"DELETE"),t(),n()):(pe(i,"One of the Properties has active bookings",4e3,"ERROR"),t())}else await Promise.all(a.map(d=>(Jo.setTable(r),Jo.callRestAPI({id:Number(d.id),deleted_at:null},"DELETE")))),pe(i,"Deleted Successful"),n(),t()}catch(d){tokenExpireError(o,d.message),pe(i,d.message,4e3,"ERROR")}}return s(Se,{children:e?f(Se,{children:[s("div",{className:"fixed inset-0 z-50 flex items-center justify-center overflow-y-auto overflow-x-hidden outline-none focus:outline-none",children:s("div",{className:"relative my-6 mx-auto w-auto max-w-3xl md:min-w-[35rem]",children:f("div",{className:"relative flex w-full flex-col rounded-lg border-0 bg-white shadow-lg outline-none focus:outline-none",children:[f("div",{className:"flex items-start justify-between rounded-t border-solid border-slate-200 px-5 pt-6",children:[s("h3",{className:"text-xl font-semibold",children:"Are you sure?"}),s("button",{className:"float-right ml-auto border-0 bg-transparent p-1 text-3xl font-semibold leading-none text-black outline-none focus:outline-none",onClick:t,children:s("span",{className:"block h-6 w-6 bg-transparent text-2xl text-black outline-none focus:outline-none",children:"\xD7"})})]}),s("div",{className:"relative flex-auto px-6 py-2",children:f("p",{className:"text-lg my-2 normal-case leading-relaxed text-slate-500",children:["Are you sure you want to delete ",a.length," records"]})}),f("div",{className:"flex items-center justify-end rounded-b border-solid border-slate-200 px-6 pb-6",children:[s("button",{className:"background-transparent mr-1 mb-1 rounded border border-[##98A2B3] px-6 py-2 text-sm font-bold text-[#667085] outline-none focus:outline-none",type:"button",onClick:t,children:"Cancel"}),s("button",{className:"ml-5 mb-1 rounded border border-[##98A2B3] !bg-gradient-to-r from-primary to-primary-dark px-6 py-2 text-sm font-medium text-white outline-none focus:outline-none",type:"button",onClick:c,children:"Delete All"})]})]})})}),s("div",{className:"fixed inset-0 z-40 bg-black opacity-25"})]}):null})}new St;const ET=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function Y8e(){var X,ne,oe,q,te,G;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((X=localStorage.getItem("admin_recycle_filter"))!=null?X:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState([]),[N,_]=h.exports.useState([]),[C,E]=h.exports.useState(),[T,D]=h.exports.useState(),[P,M]=h.exports.useState(!1);let O=new _e,F=new St;const{reset:z,register:H,handleSubmit:A,formState:{errors:j}}=Oe({defaultValues:Ue(c)});async function I(){let J=[];const K=await O.getProfile();E(K.email);const Q=await F.getList("user",{filter:J,join:[]});Q!=null&&Q.error||k(Q==null?void 0:Q.list)}async function B(){let J=[];const K=await F.getList("add_on",{filter:J,join:[]});K!=null&&K.error||_(K==null?void 0:K.list)}async function Y(){await O.setTable("property");const J=await O.callRestAPI({},"GETALL");J!=null&&J.error||D(J==null?void 0:J.list)}async function U(J){y(!0);try{let K=["ergo_user.deleted_at IS NOT NULL"];J!=null&&J.id&&K.push(`ergo_user.id = ${J==null?void 0:J.id}`),J!=null&&J.deleted_at&&(K[0]=`DATE_FORMAT(ergo_user.deleted_at, '%Y-%m-%d')= '${J==null?void 0:J.deleted_at}'`),J!=null&&J.email&&K.push(`ergo_user.email LIKE '${J==null?void 0:J.email}'`);const Q=await O.callRawAPI("/v2/api/custom/ergo/user/PAGINATE",{where:K,page:1,limit:10},"POST");u(Q.list)}catch(K){me(e,K.message),pe(n,K.message,4e3,"ERROR")}y(!1)}function W(J){const[K,Q]=h.exports.useState(J.user.status===1),{dispatch:Z}=h.exports.useContext(we);let se=new _e;async function ce(){const le=await se.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(J.user.id),entity:"user",type:"restore"},"POST");le.error||(pe(Z,le.message,4e3),U())}return f(Tr,{checked:K,onChange:()=>ce(),className:`${K?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${K?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const V=J=>{c.set("id",J.id),c.set("deleted_at",J.deleted_at),c.set("email",J.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),U(J)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_users"}}),U(),I(),Y(),B()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:A(V),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...H("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(ne=j.id)!=null&&ne.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(oe=j.id)==null?void 0:oe.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...H("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(q=j.email)!=null&&q.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(te=j.email)==null?void 0:te.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...H("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(G=j.deleted_at)==null?void 0:G.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{z({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),U()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(J=>({id:J.id,table:J.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),M(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),ET.map((J,K)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[J.header,J.isSorted,s("span",{children:J.isSorted?J.isSortedDesc?" \u25BC":" \u25B2":""})]},K))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((J,K)=>new Date(K.deleted_at)-new Date(J.deleted_at)).map((J,K)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(Q=>Q.id==J.id)?o(Q=>{let Z=[...Q];return Z.splice(Q.findIndex(se=>se.id==J.id),1),Z}):o(Q=>[...Q,{id:J.id,table:J.entity_type}])},checked:i.some(Q=>Q.id==J.id),onChange:()=>{}})}),ET.map((Q,Z)=>Q.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Q.format(J[Q.accessor])},Z):Q.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[J.email&&f("div",{className:"w-fit grid border-r border-gray-200 pr-4 text-[#667085]",children:[s(W,{user:J}),s("span",{children:"Restore"})]}),!J.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(J),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(J),children:"Delete Permanently"})]},Z):Q.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Q.mapping[J[Q.accessor]]},Z):s("td",{className:"whitespace-nowrap px-6 py-4",children:J[Q.accessor]},Z))]},K))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>U()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,table:"user",onSuccess:()=>{o([]),U()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>U(),table:"user"}),s(ci,{modalOpen:P,closeModal:()=>M(!1),records:i,table:"user",onSuccess:()=>{o([]),U()}})]})}new St;const TT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function G8e(){var q,te,G,J,K,Q;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((q=localStorage.getItem("admin_recycle_filter"))!=null?q:""),[d,u]=h.exports.useState([]),[g,y]=R.useState(10),[w,v]=R.useState(0),[S,m]=R.useState(0),[p,b]=R.useState(0),[x,k]=R.useState(!1),[N,_]=R.useState(!1),[C,E]=h.exports.useState(!1),[T,D]=h.exports.useState({}),[P,M]=h.exports.useState({}),[O,F]=h.exports.useState(!1),[z,H]=h.exports.useState(!1);let A=new _e;new St;const{reset:j,register:I,handleSubmit:B,formState:{errors:Y}}=Oe({defaultValues:Ue(c)});function U(Z){(async function(){y(Z),await X(0,Z)})()}function W(){(async function(){await X(p-1>0?p-1:0,g)})()}function V(){(async function(){await X(p+1<=w?p+1:0,g)})()}async function X(Z,se,ce){E(!0);try{let le=["ergo_device.deleted_at IS NOT NULL"];ce!=null&&ce.id&&le.push(`ergo_device.id = ${ce==null?void 0:ce.id}`),ce!=null&&ce.deleted_at&&(le[0]=`DATE_FORMAT(ergo_device.deleted_at, '%Y-%m-%d')= '${ce==null?void 0:ce.deleted_at}'`),ce!=null&&ce.email&&le.push(`ergo_user.email LIKE '${ce==null?void 0:ce.email}'`);const ae=await A.callRawAPI("/v2/api/custom/ergo/device/PAGINATE",{where:le,page:Z,limit:se},"POST"),{list:ie,total:de,limit:fe,num_pages:be,page:he}=ae;u(ie),y(fe),v(be),b(he),m(de),k(he>1),_(he+1<=be)}catch(le){me(e,le.message),pe(n,le.message,4e3,"ERROR")}E(!1)}function ne(Z){const[se,ce]=h.exports.useState(Z.user.status===1),{dispatch:le}=h.exports.useContext(we);let ae=new _e;ae.setTable("device");async function ie(){(await ae.callRestAPI({id:Number(Z.user.id),deleted_at:null},"PUT")).error||(pe(le,"Device Restored",4e3),X(p,g))}return f(Tr,{checked:se,onChange:()=>ie(),className:`${se?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${se?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const oe=Z=>{c.set("id",Z.id),c.set("deleted_at",Z.deleted_at),c.set("email",Z.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),X(p,g,Z)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_devices"}}),X(1,g)},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:B(oe),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Devices)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...I("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(te=Y.id)!=null&&te.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(G=Y.id)==null?void 0:G.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...I("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(J=Y.email)!=null&&J.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(K=Y.email)==null?void 0:K.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...I("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(Q=Y.deleted_at)==null?void 0:Q.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{j({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),X(1,g)},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(Z=>({id:Z.id,table:Z.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),H(!0)},children:"Delete All"}),s("button",{onClick:()=>F(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:C?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),TT.map((Z,se)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[Z.header,Z.isSorted,s("span",{children:Z.isSorted?Z.isSortedDesc?" \u25BC":" \u25B2":""})]},se))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((Z,se)=>new Date(se.deleted_at)-new Date(Z.deleted_at)).map((Z,se)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(ce=>ce.id==Z.id)?o(ce=>{let le=[...ce];return le.splice(ce.findIndex(ae=>ae.id==Z.id),1),le}):o(ce=>[...ce,{id:Z.id,table:Z.entity_type}])},checked:i.some(ce=>ce.id==Z.id),onChange:()=>{}})}),TT.map((ce,le)=>ce.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:ce.format(Z[ce.accessor])},le):ce.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[Z.email&&f("div",{className:"w-fit grid border-r border-gray-200 pr-4 text-[#667085]",children:[s(ne,{user:Z}),s("span",{children:"Restore"})]}),!Z.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>D(Z),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>M(Z),children:"Delete Permanently"})]},le):ce.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:ce.mapping[Z[ce.accessor]]},le):s("td",{className:"whitespace-nowrap px-6 py-4",children:Z[ce.accessor]},le))]},se))})]})})}),s(vn,{currentPage:p,totalNumber:S,pageCount:w,pageSize:g,canPreviousPage:x,canNextPage:N,updatePageSize:U,previousPage:W,nextPage:V}),s($r,{modalOpen:T.id!=null,closeModal:()=>D({}),data:T,onSuccess:()=>X(p,g)}),s(Hr,{modalOpen:O,closeModal:()=>F(!1),records:i,table:"device",onSuccess:()=>{o([]),X(p,g)}}),s(ci,{modalOpen:z,closeModal:()=>H(!1),records:i,table:"device",onSuccess:()=>{o([]),X(p,g)}}),s(Br,{modalOpen:P.id!=null,closeModal:()=>M({}),data:P,onSuccess:()=>X(p,g),table:"device"})]})}new St;const LT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function q8e(){var O,F,z,H,A,j;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(I){y(!0);try{let B=["ergo_property.deleted_at IS NOT NULL"];I!=null&&I.id&&B.push(`ergo_property.id = ${I==null?void 0:I.id}`),I!=null&&I.deleted_at&&(B[0]=`DATE_FORMAT(ergo_property.deleted_at, '%Y-%m-%d')= '${I==null?void 0:I.deleted_at}'`),I!=null&&I.email&&B.push(`ergo_user.email LIKE '${I==null?void 0:I.email}'`);const Y=await N.callRawAPI("/v2/api/custom/ergo/property/PAGINATE",{where:B,page:1,limit:10},"POST");u(Y.list)}catch(B){me(e,B.message),pe(n,B.message,4e3,"ERROR")}y(!1)}function P(I){const[B,Y]=h.exports.useState(I.user.status===1),{dispatch:U}=h.exports.useContext(we);let W=new _e;async function V(){const X=await W.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(I.user.id),entity:"property",type:"restore"},"POST");X.error||(pe(U,X.message,4e3),D())}return f(Tr,{checked:B,onChange:()=>V(),className:`${B?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${B?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=I=>{c.set("id",I.id),c.set("entity_type",I.entity_type),c.set("deleted_at",I.deleted_at),c.set("email",I.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(I)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties`"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Properties)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...C("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(H=T.email)!=null&&H.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(A=T.email)==null?void 0:A.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(j=T.deleted_at)==null?void 0:j.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(I=>({id:I.id,table:I.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),LT.map((I,B)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[I.header,I.isSorted,s("span",{children:I.isSorted?I.isSortedDesc?" \u25BC":" \u25B2":""})]},B))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((I,B)=>new Date(B.deleted_at)-new Date(I.deleted_at)).map((I,B)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(Y=>Y.id==I.id)?o(Y=>{let U=[...Y];return U.splice(Y.findIndex(W=>W.id==I.id),1),U}):o(Y=>[...Y,{id:I.id,table:I.entity_type}])},checked:i.some(Y=>Y.id==I.id),onChange:()=>{}})}),LT.map((Y,U)=>Y.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.format(I[Y.accessor])},U):Y.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[I.email&&f("div",{className:"w-fit grid border-r border-gray-200 pr-4 text-[#667085]",children:[s(P,{user:I}),s("span",{children:"Restore"})]}),!I.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(I),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(I),children:"Delete Permanently"})]},U):Y.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.mapping[I[Y.accessor]]},U):s("td",{className:"whitespace-nowrap px-6 py-4",children:I[Y.accessor]},U))]},B))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"property",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"property"})]})}new St;const DT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function Z8e(){var P,M,O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((P=localStorage.getItem("admin_recycle_filter"))!=null?P:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1);let x=new _e;new St;const{reset:k,register:N,handleSubmit:_,formState:{errors:C}}=Oe({defaultValues:Ue(c)});async function E(A){y(!0);try{let j=["ergo_property_spaces.deleted_at IS NOT NULL"];A!=null&&A.id&&j.push(`ergo_property_spaces.id = ${A==null?void 0:A.id}`),A!=null&&A.deleted_at&&(j[0]=`DATE_FORMAT(ergo_property_spaces.deleted_at, '%Y-%m-%d')= '${A==null?void 0:A.deleted_at}'`),A!=null&&A.email&&j.push(`ergo_property_spaces.email LIKE '${A==null?void 0:A.email}'`);const I=await x.callRawAPI("/v2/api/custom/ergo/property-spaces/PAGINATE",{where:j,page:1,limit:10},"POST");u(I.list)}catch(j){me(e,j.message),pe(n,j.message,4e3,"ERROR")}y(!1)}function T(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(A.user.id),entity:"user",type:"restore"},"POST");W.error||(pe(B,W.message,4e3),E())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const D=A=>{c.set("id",A.id),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),E(A)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties_spaces`"}}),E()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:_(D),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Property Spaces)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...N("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(M=C.id)!=null&&M.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(O=C.id)==null?void 0:O.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...N("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=C.email)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=C.email)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...N("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=C.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{k({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),E()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR")},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),DT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),DT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(T,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>E()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),E()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>E(),table:"property_spaces"})]})}new St;const MT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Image",nested:"image",accessor:"default_image",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function Q8e(){var O,F,z,H,A,j;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(I){y(!0);try{let B=["ergo_property_spaces_images.deleted_at IS NOT NULL"];I!=null&&I.id&&B.push(`ergo_property_spaces_images.id = ${I==null?void 0:I.id}`),I!=null&&I.deleted_at&&(B[0]=`DATE_FORMAT(ergo_property_spaces_images.deleted_at, '%Y-%m-%d')= '${I==null?void 0:I.deleted_at}'`),I!=null&&I.email&&B.push(`ergo_user.email LIKE '${I==null?void 0:I.email}'`);const Y=await N.callRawAPI("/v2/api/custom/ergo/property-space-images/PAGINATE",{where:B,page:1,limit:10},"POST");u(Y.list)}catch(B){me(e,B.message),pe(n,B.message,4e3,"ERROR")}y(!1)}function P(I){const[B,Y]=h.exports.useState(I.user.status===1),{dispatch:U}=h.exports.useContext(we);let W=new _e;async function V(){const X=await W.callRawAPI("/v2/api/custom/ergo/property-space-images",{id:Number(I.id),deleted_at:NULL},"PUT");X.error||(pe(U,X.message,4e3),D())}return f(Tr,{checked:B,onChange:()=>V(),className:`${B?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${B?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=I=>{c.set("id",I.id),c.set("deleted_at",I.deleted_at),c.set("email",I.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(I)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties_space_images"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Property Space Images)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...C("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(H=T.email)!=null&&H.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(A=T.email)==null?void 0:A.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(j=T.deleted_at)==null?void 0:j.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(I=>({id:I.id,table:I.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),MT.map((I,B)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[I.header,I.isSorted,s("span",{children:I.isSorted?I.isSortedDesc?" \u25BC":" \u25B2":""})]},B))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((I,B)=>new Date(B.deleted_at)-new Date(I.deleted_at)).map((I,B)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(Y=>Y.id==I.id)?o(Y=>{let U=[...Y];return U.splice(Y.findIndex(W=>W.id==I.id),1),U}):o(Y=>[...Y,{id:I.id,table:I.entity_type}])},checked:i.some(Y=>Y.id==I.id),onChange:()=>{}})}),MT.map((Y,U)=>Y.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.format(I[Y.accessor])},U):Y.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[I.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:I})}),!I.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(I),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(I),children:"Delete Permanently"})]},U):Y.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.mapping[I[Y.accessor]]},U):Y.nested==="image"?s("td",{className:"whitespace-nowrap px-6 py-4 h-16 object-cover",children:s("img",{src:I.photo_url,alt:"space_image"})},U):s("td",{className:"whitespace-nowrap px-6 py-4",children:I[Y.accessor]},U))]},B))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"property_spaces_images",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"property_spaces_images"})]})}new St;const AT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function J8e(){var O,F,z,H,A,j;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(){y(!0);try{let I=["ergo_property_spaces_amenitites.deleted_at IS NOT NULL"];d!=null&&d.id&&I.push(`ergo_property_spaces_amenitites.id = ${d==null?void 0:d.id}`),d!=null&&d.deleted_at&&(I[0]=`DATE_FORMAT(ergo_property_spaces_amenitites.deleted_at, '%Y-%m-%d')= '${d==null?void 0:d.deleted_at}'`),d!=null&&d.email&&I.push(`ergo_user.email LIKE '${d==null?void 0:d.email}'`);const B=await N.callRawAPI("/v2/api/custom/ergo/property-spaces-amenitites/PAGINATE",{where:I,page:1,limit:10},"POST");u(B.list)}catch(I){me(e,I.message),pe(n,I.message,4e3,"ERROR")}y(!1)}function P(I){const[B,Y]=h.exports.useState(I.user.status===1),{dispatch:U}=h.exports.useContext(we);let W=new _e;async function V(){const X=await W.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(I.user.id),entity:"user",type:"restore"},"POST");X.error||(pe(U,X.message,4e3),D())}return f(Tr,{checked:B,onChange:()=>V(),className:`${B?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${B?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=I=>{c.set("id",I.id),c.set("entity_type",I.entity_type),c.set("deleted_at",I.deleted_at),c.set("email",I.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D()};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties_space_amenities`"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Property Space Amenities)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...C("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(H=T.email)!=null&&H.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(A=T.email)==null?void 0:A.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(j=T.deleted_at)==null?void 0:j.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(I=>({id:I.id,table:I.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),AT.map((I,B)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[I.header,I.isSorted,s("span",{children:I.isSorted?I.isSortedDesc?" \u25BC":" \u25B2":""})]},B))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((I,B)=>new Date(B.deleted_at)-new Date(I.deleted_at)).map((I,B)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(Y=>Y.id==I.id)?o(Y=>{let U=[...Y];return U.splice(Y.findIndex(W=>W.id==I.id),1),U}):o(Y=>[...Y,{id:I.id,table:I.entity_type}])},checked:i.some(Y=>Y.id==I.id),onChange:()=>{}})}),AT.map((Y,U)=>Y.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.format(I[Y.accessor])},U):Y.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[I.email&&f("div",{className:"w-fit grid border-r border-gray-200 pr-4 text-[#667085]",children:[s(P,{user:I}),s("span",{children:"Restore"})]}),!I.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(I),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(I),children:"Delete Permanently"})]},U):Y.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.mapping[I[Y.accessor]]},U):s("td",{className:"whitespace-nowrap px-6 py-4",children:I[Y.accessor]},U))]},B))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"property_spaces_amenitites",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"property_spaces_amenitites"})]})}new St;const IT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Addon Name",accessor:"add_on_name",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function K8e(){var O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(A){y(!0);try{let j=["ergo_booking_addons.deleted_at IS NOT NULL"];A!=null&&A.id&&j.push(`ergo_booking_addons.id = ${A==null?void 0:A.id}`),A!=null&&A.deleted_at&&(j[0]=`DATE_FORMAT(ergo_booking_addons.deleted_at, '%Y-%m-%d')= '${A==null?void 0:A.deleted_at}'`),A!=null&&A.email&&j.push(`ergo_user.email LIKE '${A==null?void 0:A.email}'`);const I=await N.callRawAPI("/v2/api/custom/ergo/booking-addon/PAGINATE",{where:j,page:1,limit:10},"POST");u(I.list)}catch(j){me(e,j.message),pe(n,j.message,4e3,"ERROR")}y(!1)}function P(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;Y.setTable("device");async function U(){(await Y.callRestAPI({id:Number(A.user.id),deleted_at:null},"PUT")).error||(pe(B,"Booking Addon Restored",4e3),D())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=A=>{c.set("id",A.id),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(A)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_booking_addon"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Booking Addons)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=T.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),IT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),IT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,table:"booking_addons",onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"booking_addons",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"booking_addons"})]})}new St;const OT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function X8e(){var O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(A){y(!0);try{let j=["ergo_faq.deleted_at IS NOT NULL"];A!=null&&A.id&&j.push(`ergo_faq.id = ${A==null?void 0:A.id}`),A!=null&&A.deleted_at&&(j[0]=`DATE_FORMAT(ergo_faq.deleted_at, '%Y-%m-%d')= '${A==null?void 0:A.deleted_at}'`);const I=await N.callRawAPI("/v2/api/custom/ergo/faq/PAGINATE",{where:j,page:1,limit:10},"POST");u(I.list)}catch(j){me(e,j.message),pe(n,j.message,4e3,"ERROR")}y(!1)}function P(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(A.user.id),entity:"user",type:"restore"},"POST");W.error||(pe(B,W.message,4e3),D())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=A=>{c.set("id",A.id),c.set("entity_type",A.entity_type),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(A)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_faqs"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Faqs)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=T.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),OT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),OT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.accessor=="email"&&((A==null?void 0:A.user_id)||(A==null?void 0:A.host_id))?s("td",{className:"whitespace-nowrap px-6 py-4",children:getUserDetail((A==null?void 0:A.user_id)||(A==null?void 0:A.host_id))},B):I.accessor=="email"&&(A==null?void 0:A.email)?s("td",{className:"whitespace-nowrap px-6 py-4",children:getUserDetail(A==null?void 0:A.id)},B):I.accessor=="email"&&(!(A!=null&&A.user_id)||!(A!=null&&A.host_id))&&!(A!=null&&A.cost)?s("td",{className:"whitespace-nowrap px-6 py-4",children:getSpaceHost(A==null?void 0:A.property_id)},B):I.accessor=="email"&&(A==null?void 0:A.entity_type)=="add_on"?s("td",{className:"whitespace-nowrap px-6 py-4",children:getAddonOwner(A==null?void 0:A.id)},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"faq",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"faq"})]})}new St;const PT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function eTe(){var O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(A){y(!0);try{let j=["ergo_hashtag.deleted_at IS NOT NULL"];A!=null&&A.id&&j.push(`ergo_hashtag.id = ${A==null?void 0:A.id}`),A!=null&&A.deleted_at&&(j[0]=`ergo_hashtag.deleted_at = ${A==null?void 0:A.deleted_at}`),A!=null&&A.email&&(j[0]=`DATE_FORMAT(ergo_hashtag.deleted_at, '%Y-%m-%d')= '${A==null?void 0:A.deleted_at}'`);const I=await N.callRawAPI("/v2/api/custom/ergo/hashtag/PAGINATE",{where:j,page:1,limit:10},"POST");u(I.list)}catch(j){me(e,j.message),pe(n,j.message,4e3,"ERROR")}y(!1)}function P(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(A.user.id),entity:"user",type:"restore"},"POST");W.error||(pe(B,W.message,4e3),D())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=A=>{c.set("id",A.id),c.set("entity_type",A.entity_type),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(A)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_hashtag`"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Hashtags)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=T.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),PT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),PT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"hashtag",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"hashtag"})]})}new St;const RT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function tTe(){var O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(A){y(!0);try{let j=["ergo_spaces.deleted_at IS NOT NULL"];A!=null&&A.id&&j.push(`ergo_spaces.id = ${A==null?void 0:A.id}`),A!=null&&A.deleted_at&&(j[0]=`DATE_FORMAT(ergo_spaces.deleted_at, '%Y-%m-%d')= '${A==null?void 0:A.deleted_at}'`);const I=await N.callRawAPI("/v2/api/custom/ergo/spaces/PAGINATE",{where:j,page:1,limit:10},"POST");u(I.list)}catch(j){me(e,j.message),pe(n,j.message,4e3,"ERROR")}y(!1)}function P(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/spaces",{id:Number(A.id),deleted_at:NULL},"PUT");W.error||(pe(B,W.message,4e3),D())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=A=>{c.set("id",A.id),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(A)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_spaces`"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Spaces)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=T.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),RT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),RT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&f("div",{className:"w-fit grid border-r border-gray-200 pr-4 text-[#667085]",children:[s(P,{user:A}),s("span",{children:"Restore"})]}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"spaces",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D()})]})}new St;const jT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function nTe(){var P,M,O,F;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((P=localStorage.getItem("admin_recycle_filter"))!=null?P:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1);h.exports.useState([]),h.exports.useState([]),h.exports.useState(),h.exports.useState();let x=new _e;new St;const{reset:k,register:N,handleSubmit:_,formState:{errors:C}}=Oe({defaultValues:Ue(c)});async function E(z){y(!0);try{let H=["ergo_property_add_on.deleted_at IS NOT NULL"];z!=null&&z.id&&H.push(`ergo_property_add_on.id = ${z==null?void 0:z.id}`),z!=null&&z.deleted_at&&(H[0]=`DATE_FORMAT(ergo_property_add_on.deleted_at, '%Y-%m-%d')= '${z==null?void 0:z.deleted_at}'`),z!=null&&z.email&&H.push(`ergo_property_add_on.email LIKE '${z==null?void 0:z.email}'`);const A=await x.callRawAPI("/v2/api/custom/ergo/property_add_on/PAGINATE",{where:H,page:1,limit:10},"POST");u(A.list)}catch(H){me(e,H.message),pe(n,H.message,4e3,"ERROR")}y(!1)}function T(z){const[H,A]=h.exports.useState(z.user.status===1),{dispatch:j}=h.exports.useContext(we);let I=new _e;async function B(){const Y=await I.callRawAPI("/v2/api/custom/ergo/property_add_on",{id:Number(z.id),deleted_at:NULL},"PUT");Y.error||(pe(j,Y.message,4e3),E())}return f(Tr,{checked:H,onChange:()=>B(),className:`${H?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${H?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const D=z=>{c.set("id",z.id),c.set("entity_type",z.entity_type),c.set("deleted_at",z.deleted_at),c.set("email",z.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),E(z)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties_addon`"}}),E()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:_(D),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Property Addons)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...N("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(M=C.id)!=null&&M.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(O=C.id)==null?void 0:O.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...N("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(F=C.deleted_at)==null?void 0:F.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{k({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),E()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(z=>({id:z.id,table:z.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR")},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),jT.map((z,H)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[z.header,z.isSorted,s("span",{children:z.isSorted?z.isSortedDesc?" \u25BC":" \u25B2":""})]},H))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((z,H)=>new Date(H.deleted_at)-new Date(z.deleted_at)).map((z,H)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(A=>A.id==z.id)?o(A=>{let j=[...A];return j.splice(A.findIndex(I=>I.id==z.id),1),j}):o(A=>[...A,{id:z.id,table:z.entity_type}])},checked:i.some(A=>A.id==z.id),onChange:()=>{}})}),jT.map((A,j)=>A.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:A.format(z[A.accessor])},j):A.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[z.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(T,{user:z})}),!z.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(z),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(z),children:"Delete Permanently"})]},j):A.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:A.mapping[z[A.accessor]]},j):s("td",{className:"whitespace-nowrap px-6 py-4",children:z[A.accessor]},j))]},H))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>E()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),E()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>E(),table:"property_add_on"})]})}new St;const zT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function aTe(){var O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(){y(!0);try{let A=["ergo_property_space_faq.deleted_at IS NOT NULL"];d!=null&&d.id&&A.push(`ergo_property_space_faq.id = ${d==null?void 0:d.id}`),d!=null&&d.deleted_at&&(A[0]=`DATE_FORMAT(ergo_property_space_faq.deleted_at, '%Y-%m-%d')= '${d==null?void 0:d.deleted_at}'`),d!=null&&d.email&&A.push(`ergo_user.email LIKE '${d==null?void 0:d.email}'`);const j=await N.callRawAPI("/v2/api/custom/ergo/property_space_faq/PAGINATE",{where:A,page:1,limit:10},"POST");u(j.list)}catch(A){me(e,A.message),pe(n,A.message,4e3,"ERROR")}y(!1)}function P(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(A.user.id),entity:"user",type:"restore"},"POST");W.error||(pe(B,W.message,4e3),D())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=A=>{c.set("id",A.id),c.set("entity_type",A.entity_type),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D()};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_properties_space_faq`"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Space Faqs)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=T.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),zT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),zT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"property_space_faq",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"property_space_faq"})]})}new St;const FT=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"host_email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function rTe(){var P,M,O,F,z,H;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((P=localStorage.getItem("admin_recycle_filter"))!=null?P:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1);let x=new _e;new St;const{reset:k,register:N,handleSubmit:_,formState:{errors:C}}=Oe({defaultValues:Ue(c)});async function E(){y(!0);try{let A=["deleted_at,nis"];d!=null&&d.id&&A.push(`ergo_payout.id = ${d==null?void 0:d.id}`),d!=null&&d.deleted_at&&(A[0]=`DATE_FORMAT(ergo_payout.deleted_at, '%Y-%m-%d')= '${d==null?void 0:d.deleted_at}'`),d.email&&A.push(`ergo_user,cs,${d.email}`);const j=await x.callRawAPI("/v2/api/custom/ergo/payout/PAGINATE",{where:["ergo_payout.deleted_at IS NOT NULL"],page:1,limit:10},"POST");u(j.list)}catch(A){me(e,A.message),pe(n,A.message,4e3,"ERROR")}y(!1)}function T(A){const[j,I]=h.exports.useState(A.user.status===1),{dispatch:B}=h.exports.useContext(we);let Y=new _e;async function U(){const W=await Y.callRawAPI("/v2/api/custom/ergo/soft-delete",{id:Number(A.user.id),entity:"user",type:"restore"},"POST");W.error||(pe(B,W.message,4e3),E())}return f(Tr,{checked:j,onChange:()=>U(),className:`${j?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${j?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const D=A=>{c.set("id",A.id),c.set("entity_type",A.entity_type),c.set("deleted_at",A.deleted_at),c.set("email",A.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),E()};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_payout`"}}),E()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:_(D),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Payout)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...N("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(M=C.id)!=null&&M.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(O=C.id)==null?void 0:O.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...N("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=C.email)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=C.email)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...N("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(H=C.deleted_at)==null?void 0:H.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{k({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),E()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(A=>({id:A.id,table:A.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR")},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),FT.map((A,j)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[A.header,A.isSorted,s("span",{children:A.isSorted?A.isSortedDesc?" \u25BC":" \u25B2":""})]},j))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((A,j)=>new Date(j.deleted_at)-new Date(A.deleted_at)).map((A,j)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(I=>I.id==A.id)?o(I=>{let B=[...I];return B.splice(I.findIndex(Y=>Y.id==A.id),1),B}):o(I=>[...I,{id:A.id,table:A.entity_type}])},checked:i.some(I=>I.id==A.id),onChange:()=>{}})}),FT.map((I,B)=>I.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.format(A[I.accessor])},B):I.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[A.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(T,{user:A})}),!A.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(A),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(A),children:"Delete Permanently"})]},B):I.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:I.mapping[A[I.accessor]]},B):s("td",{className:"whitespace-nowrap px-6 py-4",children:A[I.accessor]},B))]},j))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>E()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,onSuccess:()=>{o([]),E()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>E()})]})}new St;const $T=[{header:"ID",accessor:"id",isSorted:!0,isSortedDesc:!0,idPrefix:!0},{header:"Email",nested:"user",accessor:"host_email",isSorted:!0,isSortedDesc:!0},{header:"Deleted At",accessor:"deleted_at",isSorted:!0,isSortedDesc:!0,format:e=>Te(e).format("MM/DD/yyyy hh:mm:ss A")},{header:"Actions",accessor:""}];function sTe(){var O,F,z,H,A,j;const{dispatch:e}=R.useContext(Ee),{state:t,dispatch:n}=R.useContext(we),[a,r]=R.useState(!1),[i,o]=R.useState([]),[c,l]=lt((O=localStorage.getItem("admin_recycle_filter"))!=null?O:""),[d,u]=h.exports.useState([]),[g,y]=h.exports.useState(!1),[w,v]=h.exports.useState({}),[S,m]=h.exports.useState({}),[p,b]=h.exports.useState(!1),[x,k]=h.exports.useState(!1);let N=new _e;new St;const{reset:_,register:C,handleSubmit:E,formState:{errors:T}}=Oe({defaultValues:Ue(c)});async function D(I){y(!0);try{let B=["ergo_booking.deleted_at IS NOT NULL"];I!=null&&I.id&&B.push(`ergo_booking.id = ${I==null?void 0:I.id}`),I!=null&&I.deleted_at&&(B[0]=`DATE_FORMAT(ergo_booking.deleted_at, '%Y-%m-%d')= '${I==null?void 0:I.deleted_at}'`),I!=null&&I.email&&B.push(`ergo_user.email LIKE '${I==null?void 0:I.email}'`);const Y=await N.callRawAPI("/v2/api/custom/ergo/booking/PAGINATE",{where:B,page:1,limit:10},"POST");u(Y.list)}catch(B){me(e,B.message),pe(n,B.message,4e3,"ERROR")}y(!1)}function P(I){const[B,Y]=h.exports.useState(I.user.status===1),{dispatch:U}=h.exports.useContext(we);let W=new _e;W.setTable("device");async function V(){(await W.callRestAPI({id:Number(I.user.id),deleted_at:null},"PUT")).error||(pe(U,"Booking Restored",4e3),D())}return f(Tr,{checked:B,onChange:()=>V(),className:`${B?"!bg-gradient-to-r from-primary-dark to-primary-dark":"bg-gray-300"}
relative inline-flex h-[28px] w-[55px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,children:[s("span",{className:"sr-only",children:"Use setting"}),s("span",{"aria-hidden":"true",className:`${B?"translate-x-7":"translate-x-0"}
pointer-events-none inline-block h-[24px] w-[24px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`})]})}const M=I=>{c.set("id",I.id),c.set("deleted_at",I.deleted_at),c.set("email",I.email),l(c),localStorage.setItem("admin_recycle_filter",c.toString()),D(I)};return R.useEffect(()=>{n({type:"SETPATH",payload:{path:"recycle_bin_booking"}}),D()},[]),f(Se,{children:[s("form",{className:"rounded rounded-b-none border border-b-0 bg-white p-5",onSubmit:E(M),children:f("div",{className:"max-w-5xl",children:[s("div",{className:"flex justify-between",children:s("h4",{className:"text-2xl font-medium",children:"Recycle Bin (Booking)"})}),f("div",{className:"filter-form-holder mt-10 flex flex-wrap",children:[f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"id",children:"ID"}),s("input",{...C("id"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(F=T.id)!=null&&F.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(z=T.id)==null?void 0:z.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"email",children:"Email"}),s("input",{...C("email"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(H=T.email)!=null&&H.message?"border-red-500":""}`}),s("p",{className:"text-xs italic text-red-500",children:(A=T.email)==null?void 0:A.message})]}),f("div",{className:"mb-4 w-full pr-2 pl-2 md:w-1/3",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"deleted_at",children:"Date Deleted"}),s("input",{type:"date",...C("deleted_at"),className:"none mb-3 w-full rounded border bg-white py-2 px-3 leading-tight text-gray-700 focus:outline-none"}),s("p",{className:"text-xs italic text-red-500",children:(j=T.deleted_at)==null?void 0:j.message})]})]}),s(dn,{text:"Search"}),s("button",{className:"font-inter ml-2 cursor-pointer rounded-md border border-[#33D4B7] bg-gradient-to-r from-[#33D4B7] to-[#0D9895] bg-clip-text px-[66px] py-[10px] text-transparent",type:"reset",onClick:()=>{_({id:"",entity_type:"",deleted_at:"",email:""}),localStorage.removeItem("admin_recycle_filter"),Pt(c,l),D()},children:"Reset"})]})}),s("div",{className:"flex justify-end bg-white px-6 pt-4",children:s(Xa,{enabled:a,setEnabled:r})}),a&&f("div",{className:"flex items-center justify-between bg-white py-4 pl-2 pr-6 font-medium text-[#667085]",children:[f("label",{className:"flex cursor-pointer items-center gap-2",children:[s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.length!=d.length?o(d.map(I=>({id:I.id,table:I.entity_type}))):o([])},checked:i.length==d.length&&d.length>0,onChange:()=>{}}),"Select All"]}),i.length>0?f("div",{className:"flex items-start gap-4",children:[" ",s("button",{onClick:()=>{pe(n,"Working on it",4e3,"ERROR"),k(!0)},children:"Delete All"}),s("button",{onClick:()=>b(!0),children:"Restore All"})]}):null]}),s("div",{className:"overflow-x-auto",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:g?s("div",{className:"flex items-center justify-center py-12",children:"Loading..."}):f("table",{className:"min-w-full divide-y divide-gray-200 border border-t-0 bg-white",children:[s("thead",{className:"cursor-pointer bg-gray-50",children:f("tr",{className:"cursor-pointer",children:[a&&s("th",{scope:"col",className:"px-2 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500"}),$T.map((I,B)=>f("th",{scope:"col",className:"cursor-pointer whitespace-nowrap px-6 py-4 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:[I.header,I.isSorted,s("span",{children:I.isSorted?I.isSortedDesc?" \u25BC":" \u25B2":""})]},B))]})}),s("tbody",{className:"divide-y divide-gray-200 normal-case",children:d.sort((I,B)=>new Date(B.deleted_at)-new Date(I.deleted_at)).map((I,B)=>f("tr",{className:"py-2 text-sm",children:[a&&s("td",{className:"whitespace-nowrap px-2 py-2",children:s("input",{type:"checkbox",name:"bulk-mode",id:"",onClick:()=>{i.some(Y=>Y.id==I.id)?o(Y=>{let U=[...Y];return U.splice(Y.findIndex(W=>W.id==I.id),1),U}):o(Y=>[...Y,{id:I.id,table:I.entity_type}])},checked:i.some(Y=>Y.id==I.id),onChange:()=>{}})}),$T.map((Y,U)=>Y.format?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.format(I[Y.accessor])},U):Y.accessor==""?f("td",{className:"gap-3 whitespace-nowrap flex items-center px-6 py-4",children:[I.email&&s("div",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",children:s(P,{user:I})}),!I.email&&s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>v(I),children:"Restore"}),s("button",{className:"w-fit border-r border-gray-200 pr-4 text-[#667085]",onClick:()=>m(I),children:"Delete Permanently"})]},U):Y.mapping?s("td",{className:"whitespace-nowrap px-6 py-4",children:Y.mapping[I[Y.accessor]]},U):s("td",{className:"whitespace-nowrap px-6 py-4",children:I[Y.accessor]},U))]},B))})]})})}),s($r,{modalOpen:w.id!=null,closeModal:()=>v({}),data:w,onSuccess:()=>D()}),s(Hr,{modalOpen:p,closeModal:()=>b(!1),records:i,table:"booking",onSuccess:()=>{o([]),D()}}),s(ci,{modalOpen:x,closeModal:()=>k(!1),records:i,table:"booking",onSuccess:()=>{o([]),D()}}),s(Br,{modalOpen:S.id!=null,closeModal:()=>m({}),data:S,onSuccess:()=>D(),table:"booking"})]})}if(typeof window!="undefined"){var BT={get passive(){}};window.addEventListener("testPassive",null,BT),window.removeEventListener("testPassive",null,BT)}typeof window!="undefined"&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||window.navigator.platform==="MacIntel"&&window.navigator.maxTouchPoints>1);let HT=new _e,UT=new St;const iTe=()=>{var j;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((j=localStorage.getItem("admin_addon_filter"))!=null?j:""),[N,_]=h.exports.useState(!1);h.exports.useState(!1);const[C,E]=R.useState([]),T=Qe({name:ge()});Oe({resolver:Xe(T),defaultValues:Ue(x)});function D(I){const B=a,Y=B.findIndex(V=>V.accessor===I),U=B[Y];U.isSortedDesc=!U.isSortedDesc,B.splice(Y,1,U),r(()=>[...B]);const W=P(i,U.isSortedDesc,I);o(W)}function P(I,B,Y){return(Y==null?void 0:Y.split(",").length)>1&&(Y=Y.split(",")[0]),I.sort((U,W)=>{var V,X,ne,oe;if(B)return isNaN(U[Y])?((V=U[Y])==null?void 0:V.toLowerCase())<((X=W[Y])==null?void 0:X.toLowerCase())?1:-1:U[Y]<W[Y]?1:-1;if(!B)return isNaN(U[Y])?((ne=U[Y])==null?void 0:ne.toLowerCase())<((oe=W[Y])==null?void 0:oe.toLowerCase())?-1:1:U[Y]<W[Y]?-1:1})}function M(I){(async function(){l(I),await z(0,I)})()}function O(){(async function(){await z(w-1>0?w-1:0,c)})()}function F(){(async function(){await z(w+1<=d?w+1:0,c)})()}async function z(I,B){var U;const Y=Ue(x);Y.id=(U=Y.id)==null?void 0:U.replace(mt.ADDON_CATEGORY,"");try{let W=["ergo_add_on.deleted_at,is"];Y.id&&W.push(`ergo_add_on.id,eq,${Y.id}`),Y.name&&W.push(`name,cs,${Y.name}`),Y.space_id&&W.push(`space_id,eq,${Y.space_id}`),W.push(`creator_id,eq,${localStorage.getItem("user")}`);let V=await UT.getPaginate("add_on",{filter:W,join:["spaces|space_id"],page:I||1,size:B,order:"update_at"});const{list:X,total:ne,limit:oe,num_pages:q,page:te}=V,G=P(X,!1);o(G),l(oe),u(q),v(te),y(ne),m(te>1),b(te+1<=q)}catch(W){me(e,W.message),pe(t,W.message,4e3,"ERROR")}t({type:"STOP_LOADING"})}async function H(){try{let I=["deleted_at,is"];const B=await UT.getList("spaces",{filter:I,join:[]});Array.isArray(B.list)&&E(B.list)}catch(I){me(e,I.message),pe(t,I.message,4e3,"ERROR")}}R.useEffect(()=>{t({type:"SETPATH",payload:{path:"add_on"}}),async function(){await A(),await H(),z(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),z(w,c))},[n.deleted]);async function A(){var B;t({type:"START_LOADING"}),HT.setTable("settings");const I={key_name:"host_addon_categories_column_order"};try{const Y=await HT.callRestAPI({limit:1,page:1,payload:I},"PAGINATE");Array.isArray(Y.list)&&Y.list.length>0&&r(va((B=Y.list[0].optional_data)!=null?B:[],_a.host_addon_categories))}catch(Y){me(e,Y.message),pe(t,Y.message,4e3,"ERROR")}}return f("div",{className:"mt-10",children:[f("div",{className:"flex justify-between mb-4",children:[s("h4",{className:"text-2xl font-medium",children:"Host Customized Add-ons"}),f("button",{onClick:()=>_(!0),className:"ml-5 mb-1 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:[s(pu,{className:"h-6 w-6"}),s("span",{className:"ml-2",children:"Add add-on"})]})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:M}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,tableType:"Add_on",table1:"add_on",type:"host",profile:!0,deleteMessage:"Are you sure you want to delete this add-on?",deleteTitle:"Confirm Delete",onSort:D,showDelete:!0,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:M,previousPage:O,nextPage:F}),N&&s(rF,{setAddOnModal:_,getData:z})]})};let Ld=new _e;const oTe=()=>{var b,x,k,N;const[e,t]=R.useState([]),{dispatch:n}=R.useContext(Ee),[a,r]=R.useState(),i=Qe({name:ge().required("Name is required"),cost:dt().required().typeError("Cost must be a number")}).required(),{dispatch:o}=R.useContext(we),c=je(),[l,d]=h.exports.useState(0),{register:u,handleSubmit:g,setError:y,setValue:w,formState:{errors:v}}=Oe({resolver:Xe(i)}),S=Mt();h.exports.useEffect(function(){(async function(){try{Ld.setTable("add_on");const _=await Ld.callRestAPI({id:Number(S==null?void 0:S.id)},"GET");_.error||(w("name",_.model.name),w("cost",_.model.cost),d(_.model.id))}catch(_){console.log("error",_),me(n,_.message)}})()},[]);async function m(){try{Ld.setTable("spaces");const _=await Ld.callRestAPI({},"GETALL");Array.isArray(_.list)&&t(_.list)}catch(_){me(n,_.message),pe(o,_.message,4e3,"ERROR")}}const p=async _=>{r(!0),Ld.setTable("add_on");try{const C=await Ld.callRestAPI({id:l,name:_.name,cost:_.cost},"PUT");if(!C.error)pe(o,"Updated"),r(!1),c("/account/my-addons");else if(C.validation){const E=Object.keys(C.validation);for(let T=0;T<E.length;T++){const D=E[T];y(D,{type:"manual",message:C.validation[D]})}}}catch(C){r(!1),console.log("Error",C),y("name",{type:"manual",message:C.message})}};return R.useEffect(()=>{o({type:"SETPATH",payload:{path:"add_on"}}),m()},[]),s("div",{className:"mt-10",children:s(Ja,{title:"Add-on",backTo:"my-addons",type:"host",showDelete:!1,children:f("form",{className:" w-full max-w-lg mt-10",onSubmit:g(p),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...u("name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=v.name)!=null&&b.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(x=v.name)==null?void 0:x.message})]}),f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"cost",children:"Cost"}),s("input",{type:"number",placeholder:"cost",...u("cost"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(k=v.cost)!=null&&k.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(N=v.cost)==null?void 0:N.message})]}),f("div",{className:"flex justify-between",children:[s("button",{disabled:a,onClick:()=>c("/account/my-addons"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:a,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${a?"py-1":"py-2"}`,children:"Save"})]})]})})})};function lTe({setAmenityModal:e,getData:t}){var v;let n=new _e;const{state:a,dispatch:r}=R.useContext(we),[i,o]=R.useState(),c=Qe({name:ge().required("Name is required")}).required(),{dispatch:l}=R.useContext(Ee),{register:d,handleSubmit:u,setError:g,formState:{errors:y}}=Oe({resolver:Xe(c)});return s("div",{className:"popup-container flex items-center justify-center normal-case",children:s("div",{className:"w-[510px] max-w-[80%] rounded-lg bg-white p-5 px-3 md:px-5",onClick:S=>S.stopPropagation(),children:f("form",{className:" w-full max-w-lg",onSubmit:u(async S=>{o(!0);try{n.setTable("amenity");const m=await n.callRestAPI({name:S.name,creator_id:Number(localStorage.getItem("user")),space_id:S.space_id||null},"POST");if(!m.error)t(),pe(r,"Amenity Added"),o(!1),e(!1);else if(m.validation){const p=Object.keys(m.validation);for(let b=0;b<p.length;b++){const x=p[b];g(x,{type:"manual",message:m.validation[x]})}}}catch(m){o(!1),console.log("Error",m),g("name",{type:"manual",message:m.message}),me(l,m.message)}}),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"add_on_id",children:"Amenity"}),s("input",{type:"text",className:"mb-3 w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none",...d("name"),placeholder:"Amenity Name"}),s("p",{className:"text-xs normal-case italic text-red-500",children:(v=y.name)==null?void 0:v.message})]}),f("div",{className:"flex justify-between",children:[s("button",{onClick:()=>e(!1),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:i,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${i?"py-1":"py-2"}`,children:"Save"})]})]})})})}let VT=new _e,WT=new St;const cTe=()=>{var j;const{dispatch:e}=R.useContext(Ee),{dispatch:t,state:n}=R.useContext(we),[a,r]=R.useState([]),[i,o]=R.useState([]),[c,l]=R.useState(10),[d,u]=R.useState(0),[g,y]=R.useState(0),[w,v]=R.useState(0),[S,m]=R.useState(!1),[p,b]=R.useState(!1),[x,k]=lt((j=localStorage.getItem("admin_addon_filter"))!=null?j:""),[N,_]=h.exports.useState(!1),[C,E]=R.useState([]),T=Qe({name:ge()});Oe({resolver:Xe(T),defaultValues:Ue(x)});function D(I){const B=a,Y=B.findIndex(V=>V.accessor===I),U=B[Y];U.isSortedDesc=!U.isSortedDesc,B.splice(Y,1,U),console.log(B),r(()=>[...B]);const W=P(i,U.isSortedDesc,I);o(W)}function P(I,B,Y){return(Y==null?void 0:Y.split(",").length)>1&&(Y=Y.split(",")[0]),I.sort((U,W)=>{var V,X,ne,oe;if(B)return isNaN(U[Y])?((V=U[Y])==null?void 0:V.toLowerCase())<((X=W[Y])==null?void 0:X.toLowerCase())?1:-1:U[Y]<W[Y]?1:-1;if(!B)return isNaN(U[Y])?((ne=U[Y])==null?void 0:ne.toLowerCase())<((oe=W[Y])==null?void 0:oe.toLowerCase())?-1:1:U[Y]<W[Y]?-1:1})}function M(I){(async function(){l(I),await z(0,I)})()}function O(){(async function(){await z(w-1>0?w-1:0,c)})()}function F(){(async function(){await z(w+1<=d?w+1:0,c)})()}async function z(I,B){var U;const Y=Ue(x);Y.id=(U=Y.id)==null?void 0:U.replace(mt.ADDON_CATEGORY,"");try{let W=["ergo_amenity.deleted_at,is"];Y.id&&W.push(`ergo_amenity.id,eq,${Y.id}`),Y.name&&W.push(`name,cs,${Y.name}`),Y.space_id&&W.push(`space_id,eq,${Y.space_id}`),W.push(`creator_id,eq,${localStorage.getItem("user")}`);let V=await WT.getPaginate("amenity",{filter:W,join:["spaces|space_id"],page:I||1,size:B,order:"update_at"});const{list:X,total:ne,limit:oe,num_pages:q,page:te}=V,G=P(X,!1);o(G),l(oe),u(q),v(te),y(ne),m(te>1),b(te+1<=q)}catch(W){me(e,W.message),pe(t,W.message,4e3,"ERROR")}t({type:"STOP_LOADING"})}async function H(){try{let I=["deleted_at,is"];const B=await WT.getList("spaces",{filter:I,join:[]});Array.isArray(B.list)&&E(B.list)}catch(I){me(e,I.message),pe(t,I.message,4e3,"ERROR")}}R.useEffect(()=>{t({type:"SETPATH",payload:{path:"add_on"}}),async function(){await A(),await H(),z(1,c)}()},[]),R.useEffect(()=>{n.deleted&&(t({type:"DELETED",payload:{deleted:!1}}),z(w,c))},[n.deleted]);async function A(){var B;t({type:"START_LOADING"}),VT.setTable("settings");const I={key_name:"host_addon_categories_column_order"};try{const Y=await VT.callRestAPI({limit:1,page:1,payload:I},"PAGINATE");Array.isArray(Y.list)&&Y.list.length>0&&r(va((B=Y.list[0].optional_data)!=null?B:[],_a.host_amenity_categories))}catch(Y){me(e,Y.message),pe(t,Y.message,4e3,"ERROR")}}return f("div",{className:"mt-10",children:[f("div",{className:"flex justify-between mb-4",children:[s("h4",{className:"text-2xl font-medium",children:"Host Customized Amenties"}),f("button",{onClick:()=>_(!0),className:"ml-5 mb-1 flex items-center rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none",children:[s(pu,{className:"h-6 w-6"}),s("span",{className:"ml-2",children:"Add amenity"})]})]}),s(Ln,{currentPage:w,pageSize:c,totalNumber:g,updatePageSize:M}),s("div",{className:"overflow-x-auto rounded",children:s("div",{className:"overflow-x-auto border-b border-gray-200 shadow ",children:s(zr,{columns:a,rows:i,tableType:"Amenity",table1:"amenity",type:"host",profile:!0,deleteMessage:"Are you sure you want to delete this amenity?",deleteTitle:"Confirm Delete",onSort:D,showDelete:!0,id:"table-to-xls"})})}),s(vn,{currentPage:w,pageCount:d,pageSize:c,totalNumber:g,canPreviousPage:S,canNextPage:p,updatePageSize:M,previousPage:O,nextPage:F}),N&&s(lTe,{setAmenityModal:_,getData:()=>z()})]})};let Dd=new _e;const dTe=()=>{var b,x;const[e,t]=R.useState([]),{dispatch:n}=R.useContext(Ee),[a,r]=R.useState(),i=Qe({name:ge().required("Name is required")}).required(),{dispatch:o}=R.useContext(we),c=je(),[l,d]=h.exports.useState(0),{register:u,handleSubmit:g,setError:y,setValue:w,formState:{errors:v}}=Oe({resolver:Xe(i)}),S=Mt();h.exports.useEffect(function(){(async function(){try{Dd.setTable("amenity");const k=await Dd.callRestAPI({id:Number(S==null?void 0:S.id)},"GET");k.error||(w("name",k.model.name),d(k.model.id))}catch(k){console.log("error",k),me(n,k.message)}})()},[]);async function m(){try{Dd.setTable("spaces");const k=await Dd.callRestAPI({},"GETALL");Array.isArray(k.list)&&t(k.list)}catch(k){me(n,k.message),pe(o,k.message,4e3,"ERROR")}}const p=async k=>{r(!0),Dd.setTable("amenity");try{const N=await Dd.callRestAPI({id:l,name:k.name,cost:k.cost,space_id:k.space_id},"PUT");if(!N.error)pe(o,"Updated"),r(!1),c("/account/my-amenities");else if(N.validation){const _=Object.keys(N.validation);for(let C=0;C<_.length;C++){const E=_[C];y(E,{type:"manual",message:N.validation[E]})}}}catch(N){r(!1),console.log("Error",N),y("name",{type:"manual",message:N.message})}};return R.useEffect(()=>{m()},[]),s("div",{className:"mt-10",children:f("form",{className:" w-full max-w-lg mt-10",onSubmit:g(p),children:[f("div",{className:"mb-4 ",children:[s("label",{className:"mb-2 block text-sm font-bold text-gray-700",htmlFor:"name",children:"Name"}),s("input",{placeholder:"Name",...u("name"),className:`focus:shadow-outline w-full rounded border py-2 px-3 leading-tight text-gray-700 focus:outline-none ${(b=v.name)!=null&&b.message?"border-red-500":""}`}),s("p",{className:"text-xs normal-case italic text-red-500",children:(x=v.name)==null?void 0:x.message})]}),f("div",{className:"flex justify-between",children:[s("button",{disabled:a,onClick:()=>c("/account/my-amenities"),className:"mb-1 flex-1 rounded border border-[#667085] !bg-gradient-to-r px-6 py-2 text-sm font-semibold text-[#667085] outline-none focus:outline-none",children:"Cancel"}),s(Ft,{loading:a,type:"submit",className:`ml-5 mb-1 flex-1 rounded !bg-gradient-to-r from-[#33D4B7] to-[#0D9895] px-6 py-2 text-sm font-semibold text-white outline-none focus:outline-none ${a?"py-1":"py-2"}`,children:"Save"})]})]})})};function YT(e){switch(e){case"superadmin":case"admin":return s(xne,{});case"host":return s(Lre,{});case"customer":return s(iie,{});default:return s(a4,{})}}function sg(e){switch(e){case"superadmin":case"admin":return f(m0,{children:[s(xe,{exact:!0,path:"/admin",element:s(G7,{})}),s(xe,{exact:!0,path:"/admin/dashboard",element:s(G7,{})}),s(xe,{exact:!0,path:"/admin/profile",element:s(Vxe,{})}),s(xe,{path:"/admin/faq",element:s(Qxe,{})}),s(xe,{path:"/admin/add-faq",element:s(v2e,{})}),s(xe,{path:"/admin/edit-faq/:id",element:s(_2e,{})}),s(xe,{path:"/admin/email",element:s(k2e,{})}),s(xe,{path:"/admin/add-email",element:s(C2e,{})}),s(xe,{path:"/admin/edit-email/:id",element:s(E2e,{})}),s(xe,{path:"/admin/view-email/:id",element:s(T2e,{})}),s(xe,{path:"/admin/add_on",element:s(B2e,{})}),s(xe,{path:"/admin/add-add_on",element:s(H2e,{})}),s(xe,{path:"/admin/edit-add_on/:id",element:s(U2e,{})}),s(xe,{path:"/admin/user",element:s(W2e,{})}),s(xe,{path:"/admin/add-user",element:s(Y2e,{})}),s(xe,{path:"/admin/edit-user/:id",element:s(G2e,{})}),s(xe,{path:"/admin/view-user/:id",element:s(q2e,{})}),s(xe,{path:"/admin/host",element:s(Z2e,{})}),s(xe,{path:"/admin/add-host",element:s(Q2e,{})}),s(xe,{path:"/admin/edit-host/:id",element:s(nE,{page:"edit"})}),s(xe,{path:"/admin/view-host/:id",element:s(nE,{page:"view"})}),s(xe,{path:"/admin/customer",element:s(twe,{})}),s(xe,{path:"/admin/add-customer",element:s(nwe,{})}),s(xe,{path:"/admin/edit-customer/:id",element:s(rE,{page:"edit"})}),s(xe,{path:"/admin/view-customer/:id",element:s(rE,{page:"view"})}),s(xe,{path:"/admin/review",element:s(iwe,{})}),s(xe,{path:"/admin/review/customer",element:s(swe,{})}),s(xe,{path:"/admin/add-review",element:s(owe,{})}),s(xe,{path:"/admin/edit-review/:id",element:s(lwe,{})}),s(xe,{path:"/admin/spaces",element:s(dwe,{})}),s(xe,{path:"/admin/add-spaces",element:s(uwe,{})}),s(xe,{path:"/admin/edit-spaces/:id",element:s(fwe,{})}),s(xe,{path:"/admin/property_spaces_amenitites",element:s(pwe,{})}),s(xe,{path:"/admin/add-property_spaces_amenitites",element:s(hwe,{})}),s(xe,{path:"/admin/edit-property_spaces_amenitites/:id",element:s(gwe,{})}),s(xe,{path:"/admin/payout",element:s(_we,{})}),s(xe,{path:"/admin/add-payout",element:s(lE,{})}),s(xe,{path:"/admin/edit-payout/:id",element:s(cE,{})}),s(xe,{path:"/admin/payout_method",element:s(j8e,{})}),s(xe,{path:"/admin/add-payout_method",element:s(lE,{})}),s(xe,{path:"/admin/edit-payout_method/:id",element:s(cE,{})}),s(xe,{path:"/admin/property",element:s(Nwe,{})}),s(xe,{path:"/admin/add-property",element:s(Swe,{})}),s(xe,{path:"/admin/edit-property/:id",element:s(dE,{page:"edit"})}),s(xe,{path:"/admin/view-property/:id",element:s(dE,{page:"view"})}),s(xe,{path:"/admin/booking_addons",element:s(Lwe,{})}),s(xe,{path:"/admin/add-booking_addons",element:s(Dwe,{})}),s(xe,{path:"/admin/edit-booking_addons/:id",element:s(Mwe,{})}),s(xe,{path:"/admin/property_spaces",element:s(Pwe,{})}),s(xe,{path:"/admin/add-property_spaces",element:s(Rwe,{})}),s(xe,{path:"/admin/edit-property_spaces/:id",element:s(jwe,{})}),s(xe,{path:"/admin/view-property_spaces/:id",element:s(zwe,{})}),s(xe,{path:"/admin/property_spaces_faq",element:s(bve,{})}),s(xe,{path:"/admin/add-property_spaces_faq",element:s(yve,{})}),s(xe,{path:"/admin/edit-property_spaces_faq/:id",element:s(xve,{})}),s(xe,{path:"/admin/settings",element:s(Bwe,{})}),s(xe,{path:"/admin/add-settings",element:s(Hwe,{})}),s(xe,{path:"/admin/edit-settings/:id",element:s(Uwe,{})}),s(xe,{path:"/admin/property_spaces_images",element:s(Ywe,{})}),s(xe,{path:"/admin/add-property_spaces_images",element:s(Gwe,{})}),s(xe,{path:"/admin/edit-property_spaces_images/:id",element:s(qwe,{})}),s(xe,{path:"/admin/id_verification",element:s(Qwe,{})}),s(xe,{path:"/admin/add-id_verification",element:s(Jwe,{})}),s(xe,{path:"/admin/edit-id_verification/:id",element:s(Kwe,{})}),s(xe,{path:"/admin/property_add_on",element:s(eve,{})}),s(xe,{path:"/admin/add-property_add_on",element:s(nve,{})}),s(xe,{path:"/admin/edit-property_add_on/:id",element:s(ave,{})}),s(xe,{path:"/admin/booking",element:s(rve,{})}),s(xe,{path:"/admin/add-booking",element:s(ive,{})}),s(xe,{path:"/admin/edit-booking/:id",element:s(ove,{})}),s(xe,{path:"/admin/view-booking/:id",element:s(lve,{})}),s(xe,{path:"/admin/amenity",element:s(cve,{})}),s(xe,{path:"/admin/add-amenity",element:s(dve,{})}),s(xe,{path:"/admin/edit-amenity/:id",element:s(uve,{})}),s(xe,{path:"/admin/hashtag",element:s(mve,{})}),s(xe,{path:"/admin/edit-hashtag/:id",element:s(hve,{})}),s(xe,{path:"/admin/add-hashtag",element:s(pve,{})}),s(xe,{path:"/admin/reports",element:s(PEe,{})}),s(xe,{path:"/admin/column_order/:sectionId",element:s(jEe,{})}),s(xe,{path:"/admin/privacy",element:s(m3e,{})}),s(xe,{path:"/admin/terms_and_conditions",element:s(p3e,{})}),s(xe,{path:"/admin/cancellation_policy",element:s(h3e,{})}),s(xe,{path:"/admin/notification",element:s(b3e,{})}),s(xe,{path:"/admin/recycle_bin_users",element:s(Y8e,{})}),s(xe,{path:"/admin/recycle_bin_devices",element:s(G8e,{})}),s(xe,{path:"/admin/recycle_bin_properties",element:s(q8e,{})}),s(xe,{path:"/admin/recycle_bin_properties_spaces",element:s(Z8e,{})}),s(xe,{path:"/admin/recycle_bin_booking",element:s(sTe,{})}),s(xe,{path:"/admin/recycle_bin_booking_addon",element:s(K8e,{})}),s(xe,{path:"/admin/recycle_bin_spaces",element:s(tTe,{})}),s(xe,{path:"/admin/recycle_bin_properties_space_images",element:s(Q8e,{})}),s(xe,{path:"/admin/recycle_bin_properties_space_amenities",element:s(J8e,{})}),s(xe,{path:"/admin/recycle_bin_properties_space_faq",element:s(aTe,{})}),s(xe,{path:"/admin/recycle_bin_properties_addon",element:s(nTe,{})}),s(xe,{path:"/admin/recycle_bin_hashtag",element:s(eTe,{})}),s(xe,{path:"/admin/recycle_bin_faqs",element:s(X8e,{})}),s(xe,{path:"/admin/recycle_bin_payout",element:s(rTe,{})}),s(xe,{path:"/admin/device",element:s(FEe,{})}),s(xe,{path:"*",element:s(wr,{to:"/admin"})||s(E0,{})})]});case"host":return f(m0,{children:[s(xe,{exact:!0,path:"/check-verification",element:s(Mv,{})}),s(xe,{path:"/login",exact:!0,element:s(Uw,{})}),s(xe,{path:"/request-reset",exact:!0,element:s(Vw,{})}),s(xe,{path:"/reset-password",exact:!0,element:s(Hw,{})}),s(xe,{path:"/login/oauth",exact:!0,element:s(vd,{})}),f(xe,{path:"/signup",exact:!0,element:s(Kw,{}),children:[s(xe,{path:"select-role",exact:!0,element:s(Ov,{})}),s(xe,{exact:!0,index:!0,element:s(Xw,{})}),s(xe,{path:"details",exact:!0,element:s(Jw,{})}),s(xe,{path:"oauth",exact:!0,element:s(vd,{})})]}),s(xe,{exact:!0,path:"/",element:s(sv,{})}),s(xe,{exact:!0,path:"/faq",element:s(iv,{})}),s(xe,{exact:!0,path:"/contact-us",element:s(lm,{})}),s(xe,{exact:!0,path:"/cancelation-policy",element:s(lm,{})}),s(xe,{exact:!0,path:"/explore",element:s(lv,{})}),s(xe,{exact:!0,path:"/search",element:s(cv,{})}),s(xe,{exact:!0,path:"/favorites",element:s(Ev,{})}),f(xe,{exact:!0,path:"/property/:id",element:s(Cv,{}),children:[s(xe,{exact:!0,index:!0,element:s(Tv,{})}),s(xe,{exact:!0,path:"booking-preview",element:s(Lv,{})}),s(xe,{exact:!0,path:"booking-confirmation",element:s(lT,{})})]}),f(xe,{path:"/account",element:s(L8e,{}),children:[s(xe,{path:"my-bookings",exact:!0,element:s(WEe,{})}),s(xe,{path:"my-bookings/:id",exact:!0,element:s(qEe,{})}),s(xe,{path:"messages",exact:!0,element:s(z8,{})}),s(xe,{path:"reviews",exact:!0,element:s(s8e,{})}),s(xe,{exact:!0,path:"profile",element:s(wT,{})}),f(xe,{exact:!0,path:"my-addons",element:s(_v,{}),children:[s(xe,{exact:!0,index:!0,element:s(iTe,{})}),s(xe,{exact:!0,path:"host/edit-add_on/:id",element:s(oTe,{})})]}),f(xe,{exact:!0,path:"my-amenities",element:s(_v,{}),children:[s(xe,{exact:!0,index:!0,element:s(cTe,{})}),s(xe,{exact:!0,path:"host/edit-amenity/:id",element:s(dTe,{})})]}),s(xe,{exact:!0,path:"profile",element:s(wT,{})}),f(xe,{exact:!0,path:"my-spaces",element:s(_v,{}),children:[s(xe,{exact:!0,index:!0,element:s(S8e,{})}),s(xe,{exact:!0,path:":id",element:s(Y7e,{})}),s(xe,{exact:!0,path:":id/edit-review",element:s(W8e,{})}),s(xe,{exact:!0,path:":id/edit-scheduling",element:s(Q7e,{})}),s(xe,{exact:!0,path:":id/edit-images",element:s(J7e,{})}),s(xe,{exact:!0,path:":id/edit-property-space",element:s(X7e,{})})]}),s(xe,{exact:!0,path:"payments",element:s(i9e,{})}),s(xe,{exact:!0,path:"billing",element:s(h8e,{})}),s(xe,{path:"verification",exact:!0,element:s(AEe,{})})]}),s(xe,{exact:!0,path:"/account/profile/rules-templates",element:s(O8e,{})}),s(xe,{exact:!0,path:"/account/profile/rules-templates/add",element:s(P8e,{})}),s(xe,{exact:!0,path:"/account/profile/edit-rules-templates/:id",element:s(z8e,{})}),s(xe,{exact:!0,path:"/account/delete/check",element:s(hT,{})}),s(xe,{exact:!0,path:"/host/confirm-delete",element:s(rg,{})}),f(xe,{path:"spaces",exact:!0,element:s(_7e,{}),children:[s(xe,{path:"add",exact:!0,element:s(m9e,{})}),s(xe,{path:"add/2",exact:!0,element:s(l7e,{})}),s(xe,{path:"add/3",exact:!0,element:s(u7e,{})}),s(xe,{path:"add/4",exact:!0,element:s(y7e,{})}),s(xe,{path:"add/5",exact:!0,element:s(x7e,{})})]}),s(xe,{path:"*",element:s(E0,{})}),s(xe,{exact:!0,path:"/customer/verify-email",element:s(kd,{role:"customer"})}),s(xe,{exact:!0,path:"/host/verify-email",element:s(kd,{role:"host"})}),s(xe,{exact:!0,path:"/help/privacy-policy",element:s(Dv,{})}),s(xe,{exact:!0,path:"/help/cancellation-policy",element:s(Av,{})}),s(xe,{exact:!0,path:"/help/terms_and_conditions",element:s(Iv,{})})]});case"customer":return f(m0,{children:[s(xe,{exact:!0,path:"/check-verification",element:s(Mv,{})}),s(xe,{path:"/login",exact:!0,element:s(Uw,{})}),s(xe,{path:"/request-reset",exact:!0,element:s(Vw,{})}),s(xe,{path:"/reset-password",exact:!0,element:s(Hw,{})}),s(xe,{path:"/login/oauth",exact:!0,element:s(vd,{})}),f(xe,{path:"/signup",exact:!0,element:s(Kw,{}),children:[s(xe,{path:"select-role",exact:!0,element:s(Ov,{})}),s(xe,{exact:!0,index:!0,element:s(Xw,{})}),s(xe,{path:"details",exact:!0,element:s(Jw,{})}),s(xe,{path:"oauth",exact:!0,element:s(vd,{})})]}),s(xe,{exact:!0,path:"/become-a-host",element:s(HEe,{})}),s(xe,{exact:!0,path:"/",element:s(sv,{})}),s(xe,{exact:!0,path:"/faq",element:s(iv,{})}),s(xe,{exact:!0,path:"/contact-us",element:s(lm,{})}),s(xe,{exact:!0,path:"/cancelation-policy",element:s(lm,{})}),s(xe,{exact:!0,path:"/explore",element:s(lv,{})}),s(xe,{exact:!0,path:"/search",element:s(cv,{})}),s(xe,{exact:!0,path:"/favorites",element:s(Ev,{})}),f(xe,{exact:!0,path:"/property/:id",element:s(Cv,{}),children:[s(xe,{exact:!0,index:!0,element:s(Tv,{})}),s(xe,{exact:!0,path:"booking-preview",element:s(Lv,{})}),s(xe,{exact:!0,path:"booking-confirmation",element:s(lT,{})})]}),f(xe,{path:"/account",element:s(D8e,{}),children:[s(xe,{path:"my-bookings",exact:!0,element:s(XEe,{})}),s(xe,{path:"my-bookings/edit/:id",exact:!0,element:s(E8e,{})}),s(xe,{path:"my-bookings/:id",exact:!0,element:s(n8e,{})}),s(xe,{path:"messages",exact:!0,element:s(z8,{})}),s(xe,{path:"reviews",exact:!0,element:s(a8e,{})}),s(xe,{exact:!0,path:"profile",element:s(c8e,{})}),s(xe,{exact:!0,path:"payments",element:s(r8e,{})}),s(xe,{exact:!0,path:"billing",element:s(f8e,{})}),s(xe,{path:"verification",exact:!0,element:s(MEe,{})})]}),s(xe,{exact:!0,path:"/account/delete/check",element:s(hT,{})}),s(xe,{exact:!0,path:"/customer/confirm-delete",element:s(rg,{})}),s(xe,{exact:!0,path:"/customer/verify-email",element:s(kd,{})}),s(xe,{exact:!0,path:"/host/verify-email",element:s(kd,{})}),s(xe,{exact:!0,path:"/help/privacy-policy",element:s(Dv,{})}),s(xe,{exact:!0,path:"/help/cancellation-policy",element:s(Av,{})}),s(xe,{exact:!0,path:"/help/terms_and_conditions",element:s(Iv,{})}),s(xe,{path:"*",element:s(E0,{})})]});default:return f(m0,{children:[s(xe,{exact:!0,path:"/admin/login",element:s(wr,{to:"/login"})}),s(xe,{exact:!0,path:"/superadmin/login",element:s(wr,{to:"/admin/login"})}),s(xe,{exact:!0,path:"/admin/forgot",element:s(Hxe,{})}),s(xe,{exact:!0,path:"/admin/reset/",element:s(Uxe,{})}),s(xe,{exact:!0,path:"/customer/login",element:s(wr,{to:"/login"})}),s(xe,{exact:!0,path:"/customer/reset",element:s(AE,{role:"customer"})}),s(xe,{exact:!0,path:"/host/login",element:s(wr,{to:"/login"})}),s(xe,{exact:!0,path:"/host/reset",element:s(AE,{role:"host"})}),s(xe,{path:"/login",exact:!0,element:s(Uw,{})}),s(xe,{path:"/request-reset",exact:!0,element:s(Vw,{})}),s(xe,{path:"/reset-password",exact:!0,element:s(Hw,{})}),s(xe,{path:"/login/oauth",exact:!0,element:s(vd,{})}),f(xe,{path:"/signup",exact:!0,element:s(Kw,{}),children:[s(xe,{path:"select-role",exact:!0,element:s(Ov,{})}),s(xe,{exact:!0,index:!0,element:s(Xw,{})}),s(xe,{path:"details",exact:!0,element:s(Jw,{})}),s(xe,{path:"oauth",exact:!0,element:s(vd,{})})]}),s(xe,{exact:!0,path:"/",element:s(sv,{})}),s(xe,{exact:!0,path:"/faq",element:s(iv,{})}),s(xe,{exact:!0,path:"/contact-us",element:s(lm,{})}),s(xe,{exact:!0,path:"/explore",element:s(lv,{})}),s(xe,{exact:!0,path:"/search",element:s(cv,{})}),s(xe,{exact:!0,path:"/favorites",element:s(Ev,{})}),f(xe,{exact:!0,path:"/property/:id",element:s(Cv,{}),children:[s(xe,{exact:!0,index:!0,element:s(Tv,{})}),s(xe,{exact:!0,path:"booking-preview",element:s(Lv,{})})]}),s(xe,{exact:!0,path:"/customer/verify-email",element:s(kd,{})}),s(xe,{exact:!0,path:"/check-verification",element:s(Mv,{})}),s(xe,{exact:!0,path:"/host/verify-email",element:s(kd,{})}),s(xe,{exact:!0,path:"/help/privacy-policy",element:s(Dv,{})}),s(xe,{exact:!0,path:"/help/cancellation-policy",element:s(Av,{})}),s(xe,{exact:!0,path:"/help/terms_and_conditions",element:s(Iv,{})}),s(xe,{exact:!0,path:"/customer/confirm-delete",element:s(rg,{})}),s(xe,{exact:!0,path:"/host/confirm-delete",element:s(rg,{})}),s(xe,{path:"*",exact:!0,element:s(E0,{})})]})}}function uTe(){const{state:e,dispatch:t}=R.useContext(Ee),{state:n,dispatch:a}=R.useContext(we),{pathname:r}=An(),o=h.exports.useMemo(()=>["/admin","/login","/signup","/account/messages"],[]).every(p=>!r.startsWith(p)),c=new _e;h.exports.useEffect(()=>{let p=document.getElementById("tidio-chat");!p||(o?p.style.display="block":p.style.display="none")},[r]),h.exports.useEffect(()=>{},[]),I8e();const l=je(),[d,u]=h.exports.useState(0),g=p=>{setTimeout(()=>{u(p)},1e3)};async function y(){try{await c.callRawAPI("/v2/api/custom/ergo/edit-self",{profile:{getting_started:1}},"POST"),a({type:"SET_USER_DATA",payload:{...n.user,getting_started:1}})}catch(p){me(t,p.message),console.log("err",p)}}const w=()=>{a({type:"END_TOUR"}),a({type:"CLOSE_MENU_ICON"}),a({type:"CLOSE_ADD_PAYMENT_METHOD"}),g(0),y()},v={highlightedArea:(p,{x:b,y:x})=>({...p,x:b+10,y:x+10,padding:"10px"}),maskArea:p=>({...p,rx:"10px"}),badge:p=>({...p,right:"-0.8125em"}),controls:p=>({...p,marginTop:100}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",padding:"30px",backgroundColor:"#dedede"})},maskWrapper:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",padding:"40px",backgroundColor:"#dedede"}),popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",padding:"40px",backgroundColor:"#dedede"}),badge:p=>({...p,color:"white",background:"#0ba68a"})},S=[{selector:".first-step",content:({goTo:p,inDOM:b,setCurrentStep:x,isHighlightingObserved:k})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-start text-[18px] font-semibold",children:"Navigate to the Profile menu"}),s("span",{className:"mt-1 text-sm font-semibold",children:"From the profile menu, users can manage their profile, view bookings, message hosts, view reviews, manage payments and billing information."}),s("button",{onClick:()=>x(1),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]}),action:()=>{g(0),n!=null&&n.menuIconOpen||a({type:"OPEN_MENU_ICON"})},position:"center",highlightedSelectors:[".first-step"],resizeObservables:[".first-step"],mutationObservables:['[data-tour="photo-step"]']},{selector:'[data-tour="photo-step"]',content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[f("span",{className:"mt-1 text-sm font-semibold",children:["Upload your photo. All photos are subject to approval. For further questions, please visit our"," ",s($e,{className:"text-blue-500 underline",to:"/faq",children:"FAQs"})," ","or",s($e,{className:"text-blue-500 underline",to:"/help/terms_and_conditions",children:"User Agreement page."})]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(0),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(2),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginLeft:"30px",marginTop:"30px",backgroundColor:"#dedede"})},position:"bottom",action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="photo-step"]']},{selector:'[data-tour="profile-step"]',content:({setCurrentStep:p})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("span",{className:"mt-1 text-sm font-semibold",children:"Complete your About Me and include information about yourself and/or your company."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>p(1),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{p(3),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginLeft:"30px",backgroundColor:"#dedede"})},action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="about-step"]']},{selector:'[data-tour="email-step"]',content:({setCurrentStep:p})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("span",{className:"mt-1 text-sm font-semibold",children:"Enable or disable Email Alerts for Site Activity if you want to be alerted via email on all site actions."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>p(2),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{p(4),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",backgroundColor:"#dedede"})},position:"center",action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="email-step"]']},{selector:'[data-tour="fourth-step"]',onTransition:{position:"center"},content:({goTo:p,inDOM:b,setCurrentStep:x,transition:k})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-sm font-semibold",children:"Click on Get Verified to submit your identity for verification."}),s("div",{className:"flex w-full justify-start gap-4",children:f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(3),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(5),k(!0)},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next Step"})]})})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",backgroundColor:"#dedede"})},action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="fourth-step"]']},{selector:".sixth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Select and Upload a Government issued ID or Passport."}),f("span",{className:"mt-1 text-sm font-semibold",children:["Identification is subject to approval. The image must be current, legible and expiration date must be valid. For further questions, please review our"," ",s($e,{className:"text-blue-500 underline",to:"/help/terms_and_conditions",children:"User Agreement"}),"."]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(4),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(6),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),action:()=>{l("/account/verification"),a({type:"CLOSE_MENU_ICON"})},position:"bottom",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",marginLeft:"30px",backgroundColor:"#dedede"})},mutationObservables:['[data-tour-id="mask-position-recompute"]']},{selector:".submit-doc-btn",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("h2",{className:"text-lg mb-2 font-bold",children:"Click the submit button"}),f("p",{className:"mb-2 text-sm font-semibold",children:["Once approved, you will receive an email with approval confirmation from our support team and your account will be activated. For questions or concerns, please navigate to the"," ",s($e,{to:"/faq",className:"text-blue-500 underline",children:"FAQs"})," ","page."]}),f("div",{className:"mt-2 flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(5),className:"rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(7),className:"rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"bottom",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",marginLeft:"30px",backgroundColor:"#dedede"})},mutationObservables:['[data-tour-id="mask-position-recompute"]'],action:()=>{l("/account/verification"),a({type:"CLOSE_MENU_ICON"})}},{selector:".tenth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Under Billing, please add your payment and payout methods"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(6),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(8)},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",backgroundColor:"#dedede"})},action:()=>{l("/account/billing"),a({type:"CLOSE_MENU_ICON"})}},{selector:".twelfth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Under Payments, view your payment history"}),s("span",{className:"mt-1 text-sm font-semibold",children:"Payments you've received from Customers after bookings are completed."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(7),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(9),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"bottom",action:()=>{r!="/account/payments"&&(l("/account/payments"),a({type:"CLOSE_MENU_ICON"}))}},{selector:".thirteenth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"See reviews given by your customers"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(8),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(10),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"top",styles:{popover:p=>({...p,marginLeft:"30px",marginTop:"30px"})},action:()=>{n.menuIconOpen&&a({type:"CLOSE_MENU_ICON"}),n.addPaymentMethodModal&&a({type:"CLOSE_ADD_PAYMENT_METHOD"}),r!="/account/reviews"&&l("/account/reviews")}},{selector:".seventeen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Manage all bookings made for your space"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(9),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(11),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"10px",backgroundColor:"#dedede"})},action:()=>{r!="/account/my-bookings"&&l("/account/my-bookings")}},{selector:".nineteen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Chat with your customers"}),s("span",{className:"mt-1 text-sm font-semibold",children:"You will be notified via email when new messages are received."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(10),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(12),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",backgroundColor:"#dedede"})},action:()=>{l("/account/messages")}},{selector:".fourteen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Add a new space"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(11),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(13),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",marginLeft:"30px",display:"flex",justify:"center",position:"center",backgroundColor:"#dedede"})},position:"center",action:()=>{l("/account/my-spaces")}},{selector:".fifteen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Input details of your space"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(12),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(14),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{r!="/spaces/add"&&l("/spaces/add")}},{selector:".eighteen-step-imag",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Add Images, Addons, Amenities, Faqs for your space"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(13),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(15),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"-30px",backgroundColor:"#dedede"})},action:()=>{r!="/spaces/add/2"&&l("/spaces/add/2")}},{selector:".eighteen-step-schedul",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Add available slots for your space"}),s("span",{className:"mt-1 text-sm font-semibold",children:"Customize and maintain the available slots for your space."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(14),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(16),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{r!="/spaces/add/3"&&l("/spaces/add/3")}},{selector:".eighteen-step-summary",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Review your space details"}),s("span",{className:"mt-1 text-sm font-semibold",children:"Review the final details for your space for approval and posting."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(15),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(17),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{r!="/spaces/add/4"&&l("/spaces/add/4")}},{selector:".sixteen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Submit your space for admin approval"}),f("span",{className:"mt-1 text-sm font-semibold",children:["Once approved, you will receive an email with approval confirmation from our support team and your account will be activated. For questions or concerns, please navigate to the"," ",s($e,{className:"text-blue-500 underline",to:"/faq",children:"FAQs"})," ","page."]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(16),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(18),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"-30px",marginLeft:"20px",backgroundColor:"#dedede"})},action:()=>{r!="/spaces/add/4"&&l("/spaces/add/4")}},{selector:"last_step",content:({goTo:p,inDOM:b,setIsOpen:x})=>s("div",{className:"flex flex-col items-center justify-center",children:s("button",{onClick:()=>{w(),x(!1),g(0)},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Done! You can now add your space ready"})}),position:"center",action:()=>{l("/")}}],m=[{selector:".first-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-start text-[18px] font-semibold",children:"Navigate to the Profile menu"}),s("span",{className:"mt-1 text-sm font-semibold",children:"From the profile menu, users can manage their profile, view bookings, message hosts, view reviews, manage payments and billing information."}),s("button",{onClick:()=>x(1),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]}),action:()=>{n!=null&&n.menuIconOpen||a({type:"OPEN_MENU_ICON"})},position:"center",highlightedSelectors:[".first-step"],resizeObservables:[".first-step2"],mutationObservables:[".first-step2"]},{selector:'[data-tour="photo-step"]',content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[f("span",{className:"mt-1 text-sm font-semibold",children:["Upload your photo. All photos are subject to approval. For further questions, please visit our"," ",s($e,{className:"text-blue-500 underline",to:"/faq",children:"FAQs"})," ","or",s($e,{className:"text-blue-500 underline",to:"/help/terms_and_conditions",children:"User Agreement page."})]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(0),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(2),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginLeft:"30px",marginTop:"30px",backgroundColor:"#dedede"})},position:"bottom",action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="photo-step"]']},{selector:'[data-tour="profile-step"]',content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("span",{className:"mt-1 text-sm font-semibold",children:"Complete your About Me and include information about yourself."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(1),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(3),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginLeft:"30px",backgroundColor:"#dedede"})},action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="about-step"]']},{selector:'[data-tour="email-step"]',content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("span",{className:"mt-1 text-sm font-semibold",children:"Enable or disable Email Alerts for Site Activity if you want to be alerted via email on all site actions."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(2),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(4),a({type:"CLOSE_MENU_ICON"})},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",backgroundColor:"#dedede"})},position:"center",action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="email-step"]']},{selector:'[data-tour="fourth-step"]',content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-sm font-semibold",children:"Click on Get Verified to submit your identity for verification."}),s("div",{className:"flex w-full justify-start gap-4",children:f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(3),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(5),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next Step"})]})})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",backgroundColor:"#dedede"})},action:()=>{l("/account/profile"),a({type:"CLOSE_MENU_ICON"})},mutationObservables:['[data-tour="fourth-step"]']},{selector:".sixth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Select and Upload a Government issued ID or Passport."}),f("span",{className:"mt-1 text-sm font-semibold",children:["Identification is subject to approval. The image must be current, legible and expiration date must be valid. For further questions, please review our"," ",s($e,{className:"text-blue-500 underline",to:"/help/terms_and_conditions",children:"User Agreement"}),"."]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(4),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(6),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),action:()=>{l("/account/verification"),a({type:"CLOSE_MENU_ICON"})},position:"bottom",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",marginLeft:"30px",backgroundColor:"#dedede"})},mutationObservables:['[data-tour-id="mask-position-recompute"]']},{selector:".submit-doc-btn",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("h2",{className:"text-lg mb-2 font-bold",children:"Click the submit button"}),f("p",{className:"mb-2 text-sm font-semibold",children:["Once approved, you will receive an email with approval confirmation from our support team and your account will be activated. For questions or concerns, please navigate to the"," ",s($e,{to:"/faq",className:"text-blue-500 underline",children:"FAQs"})," ","page."]}),f("div",{className:"mt-2 flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(5),className:"rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(7),className:"rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"bottom",styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",marginLeft:"30px",backgroundColor:"#dedede"})},mutationObservables:['[data-tour-id="mask-position-recompute"]'],action:()=>{l("/account/verification"),a({type:"CLOSE_MENU_ICON"})}},{selector:".tenth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Under Billing, please add your payment methods"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(6),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>{x(8)},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginTop:"30px",backgroundColor:"#dedede"})},action:()=>{r!="/account/billing"&&(l("/account/billing"),a({type:"CLOSE_MENU_ICON"}))}},{selector:".twelfth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"Under Payments, view your payment history"}),f("span",{className:"mt-1 text-sm font-semibold",children:[" ","Payments you've made after bookings are completed."]}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(7),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(9),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{r!="/account/payments"&&(l("/account/payments"),a({type:"CLOSE_MENU_ICON"}))}},{selector:".thirteenth-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"View your review history"}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(8),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(10),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{n.menuIconOpen&&a({type:"CLOSE_MENU_ICON"}),n.addPaymentMethodModal&&a({type:"CLOSE_ADD_PAYMENT_METHOD"}),r!="/account/reviews"&&l("/account/reviews")}},{selector:".seventeen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"View your booking history"}),f("div",{className:"flex w-full items-center justify-start gap-4",children:[s("button",{onClick:()=>x(9),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(11),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),position:"center",action:()=>{r!="/account/my-bookings"&&l("/account/my-bookings")}},{selector:".nineteen-step",content:({goTo:p,inDOM:b,setCurrentStep:x})=>f("div",{className:"flex flex-col items-center justify-center",children:[s("p",{className:"text-[18px] font-semibold",children:"View and manage your messages with your hosts"}),s("span",{className:"mt-1 text-sm font-semibold",children:"You will be notified via email when new messages are received."}),f("div",{className:"flex w-full justify-start gap-4",children:[s("button",{onClick:()=>x(10),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Prev step"}),s("button",{onClick:()=>x(12),className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Next step"})]})]}),styles:{popover:p=>({...p,boxShadow:"0 0 3em rgba(0, 0, 0, 0.5)",marginLeft:"10px",backgroundColor:"#dedede"})},action:()=>{r!="/account/messages"&&l("/account/messages")}},{selector:"last_step",content:({goTo:p,inDOM:b,setIsOpen:x,setCurrentStep:k})=>s("div",{className:"flex flex-col items-center justify-center",children:s("button",{onClick:()=>{w(),x(!1),k(0)},className:"mt-2 rounded-md bg-[#0ba68a] px-[10px] py-[7px] text-white",children:"Done! You are ready to search and book your new space"})}),position:"center",action:()=>{l("/")}}];return f("div",{className:"h-full",children:[s(REe,{}),e.role=="host"&&s(P9,{Wrapper:R.Fragment,styles:v,margin:4,showNavigation:!1,showButtons:!1,startAt:0,disableInteraction:!0,scrollSmooth:!0,transition:!0,onTransition:(p,b)=>[b.x,b.y],setCurrentStep:g,currentStep:d,accentColor:"#0ba68a",steps:S,onClickClose:({setIsOpen:p,setCurrentStep:b})=>{p(!1),a({type:"CLOSE_MENU_ICON"}),b(0)},onClickMask:({setIsOpen:p,setCurrentStep:b})=>{p(!1),a({type:"CLOSE_MENU_ICON"}),b(0)},isOpen:n==null?void 0:n.tourOpen,children:f("div",{className:"flex",children:[e.isAuthenticated?YT(e.role):s(a4,{}),f("div",{className:`w-full ${["superadmin","admin"].includes(e.role)?"bg-gray-100":"customer-section bg-white"}`,children:[e.isAuthenticated&&["superadmin","admin"].includes(e.role)?s(w9,{}):null,f("div",{className:`page-wrapper capitalize ${!e.isAuthenticated||!["superadmin","admin"].includes(e.role)?"max-w-screen":"md:max-w-[82vw]"} ${["superadmin","admin"].includes(e.role)?"h-screen px-5 py-10 pb-10 lg:max-h-screen lg:overflow-y-auto":"bg-[#F9FAFB]"} `,children:[e.isAuthenticated?sg(e.role):sg("none"),n.showModal?s(a7,{showModal:n.showModal,modalShowTitle:n.modalShowTitle,type:n.type,modalShowMessage:n.modalShowMessage,modalBtnText:n.modalBtnText,itemId:n.itemId,itemId2:n.itemId2,table1:n.table1,table2:n.table2,backTo:n.backTo}):null,n.showReview?s(r7,{showReview:n.showReview,review:n.review}):null,s(mT,{}),s(fT,{}),e.role=="host"&&s(A8e,{})]}),s(cT,{})]})]})}),e.role!="host"&&s(P9,{Wrapper:R.Fragment,styles:v,showNavigation:!1,showButtons:!1,startAt:0,disableInteraction:!0,scrollSmooth:!0,setCurrentStep:g,currentStep:d,accentColor:"#0ba68a",steps:m,onClickClose:({setIsOpen:p,setCurrentStep:b})=>{p(!1),a({type:"CLOSE_MENU_ICON"}),b(0)},onClickMask:({setIsOpen:p,setCurrentStep:b})=>{p(!1),a({type:"CLOSE_MENU_ICON"}),b(0)},isOpen:n==null?void 0:n.tourOpen,children:f("div",{className:"flex",children:[e.isAuthenticated?YT(e.role):s(a4,{}),f("div",{className:`w-full ${["superadmin","admin"].includes(e.role)?"bg-gray-100":"customer-section bg-white"}`,children:[e.isAuthenticated&&["superadmin","admin"].includes(e.role)?s(w9,{}):null,f("div",{className:`page-wrapper capitalize ${!e.isAuthenticated||!["superadmin","admin"].includes(e.role)?"max-w-screen":"md:max-w-[82vw]"} ${["superadmin","admin"].includes(e.role)?"h-screen px-5 py-10 pb-10 lg:max-h-screen lg:overflow-y-auto":"bg-[#F9FAFB]"} `,children:[e.isAuthenticated?sg(e.role):sg("none"),n.showModal?s(a7,{showModal:n.showModal,modalShowTitle:n.modalShowTitle,type:n.type,modalShowMessage:n.modalShowMessage,modalBtnText:n.modalBtnText,itemId:n.itemId,itemId2:n.itemId2,table1:n.table1,table2:n.table2,backTo:n.backTo}):null,n.showReview?s(r7,{showReview:n.showReview,review:n.review}):null,s(mT,{}),s(fT,{}),e.role=="customer"&&s(M8e,{})]}),s(cT,{})]})]})}),s(BEe,{}),s(i8e,{}),s(EG,{}),s($Ee,{})]})}function Ei(e){return Object.keys(e)}function zv(e){return e&&typeof e=="object"&&!Array.isArray(e)}function SS(e,t){const n={...e},a=t;return zv(e)&&zv(t)&&Object.keys(t).forEach(r=>{zv(a[r])&&r in e?n[r]=SS(n[r],a[r]):n[r]=a[r]}),n}function fTe(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}function mTe(e){var t;return typeof e!="string"||!e.includes("var(--mantine-scale)")?e:(t=e.match(/^calc\((.*?)\)$/))==null?void 0:t[1].split("*")[0].trim()}function pTe(e){const t=mTe(e);return typeof t=="number"?t:typeof t=="string"?t.includes("calc")||t.includes("var")?t:t.includes("px")?Number(t.replace("px","")):t.includes("rem")?Number(t.replace("rem",""))*16:t.includes("em")?Number(t.replace("em",""))*16:Number(t):NaN}function Fv(e){return e==="0rem"?"0rem":`calc(${e} * var(--mantine-scale))`}function HF(e,{shouldScale:t=!1}={}){function n(a){if(a===0||a==="0")return`0${e}`;if(typeof a=="number"){const r=`${a/16}${e}`;return t?Fv(r):r}if(typeof a=="string"){if(a===""||a.startsWith("calc(")||a.startsWith("clamp(")||a.includes("rgba("))return a;if(a.includes(","))return a.split(",").map(i=>n(i)).join(",");if(a.includes(" "))return a.split(" ").map(i=>n(i)).join(" ");if(a.includes(e))return t?Fv(a):a;const r=a.replace("px","");if(!Number.isNaN(Number(r))){const i=`${Number(r)/16}${e}`;return t?Fv(i):i}}return a}return n}const rt=HF("rem",{shouldScale:!0}),GT=HF("em");function kS(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function UF(e){return typeof e=="number"?!0:typeof e=="string"?e.startsWith("calc(")||e.startsWith("var(")||e.includes(" ")&&e.trim()!==""?!0:/[0-9]/.test(e.trim().replace("-","")[0]):!1}const hTe={app:100,modal:200,popover:300,overlay:400,max:9999};function gTe(e){return hTe[e]}function CS(e,t="size",n=!0){if(e!==void 0)return UF(e)?n?rt(e):e:`var(--${t}-${e})`}function VF(e){return e===void 0?"var(--mantine-radius-default)":CS(e,"mantine-radius")}function bTe(){return`mantine-${Math.random().toString(36).slice(2,11)}`}function yTe(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch{return e.addListener(t),()=>e.removeListener(t)}}function xTe(e,t){return typeof t=="boolean"?t:typeof window!="undefined"&&"matchMedia"in window?window.matchMedia(e).matches:!1}function wTe(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){const[a,r]=h.exports.useState(n?t:xTe(e)),i=h.exports.useRef();return h.exports.useEffect(()=>{if("matchMedia"in window)return i.current=window.matchMedia(e),r(i.current.matches),yTe(i.current,o=>r(o.matches))},[e]),a}const ES=typeof document!="undefined"?h.exports.useLayoutEffect:h.exports.useEffect;function vTe(e,t){const n=h.exports.useRef(!1);h.exports.useEffect(()=>()=>{n.current=!1},[]),h.exports.useEffect(()=>{if(n.current)return e();n.current=!0},t)}const _Te=e=>(e+1)%1e6;function NTe(){const[,e]=h.exports.useReducer(_Te,0);return e}function STe(e,t){typeof e=="function"?e(t):typeof e=="object"&&e!==null&&"current"in e&&(e.current=t)}function kTe(e,t){return wTe("(prefers-reduced-motion: reduce)",e,t)}const CTe={};function ETe(e){const t={};return e.forEach(n=>{Object.entries(n).forEach(([a,r])=>{t[a]?t[a]=li(t[a],r):t[a]=r})}),t}function TS({theme:e,classNames:t,props:n,stylesCtx:a}){const i=(Array.isArray(t)?t:[t]).map(o=>typeof o=="function"?o(e,n,a):o||CTe);return ETe(i)}function k_({theme:e,styles:t,props:n,stylesCtx:a}){return(Array.isArray(t)?t:[t]).reduce((i,o)=>typeof o=="function"?{...i,...o(e,n,a)}:{...i,...o},{})}const WF=h.exports.createContext(null);function td(){const e=h.exports.useContext(WF);if(!e)throw new Error("[@mantine/core] MantineProvider was not found in tree");return e}function TTe(){return td().cssVariablesResolver}function LTe(){return td().classNamesPrefix}function LS(){return td().getStyleNonce}function DTe(){return td().withStaticClasses}function MTe(){return td().headless}function ATe(){var e;return(e=td().stylesTransform)==null?void 0:e.sx}function ITe(){var e;return(e=td().stylesTransform)==null?void 0:e.styles}function OTe(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function PTe(e){let t=e.replace("#","");if(t.length===3){const o=t.split("");t=[o[0],o[0],o[1],o[1],o[2],o[2]].join("")}if(t.length===8){const o=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:o}}const n=parseInt(t,16),a=n>>16&255,r=n>>8&255,i=n&255;return{r:a,g:r,b:i,a:1}}function RTe(e){const[t,n,a,r]=e.replace(/[^0-9,./]/g,"").split(/[/,]/).map(Number);return{r:t,g:n,b:a,a:r||1}}function jTe(e){const t=/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i,n=e.match(t);if(!n)return{r:0,g:0,b:0,a:1};const a=parseInt(n[1],10),r=parseInt(n[2],10)/100,i=parseInt(n[3],10)/100,o=n[5]?parseFloat(n[5]):void 0,c=(1-Math.abs(2*i-1))*r,l=a/60,d=c*(1-Math.abs(l%2-1)),u=i-c/2;let g,y,w;return l>=0&&l<1?(g=c,y=d,w=0):l>=1&&l<2?(g=d,y=c,w=0):l>=2&&l<3?(g=0,y=c,w=d):l>=3&&l<4?(g=0,y=d,w=c):l>=4&&l<5?(g=d,y=0,w=c):(g=c,y=0,w=d),{r:Math.round((g+u)*255),g:Math.round((y+u)*255),b:Math.round((w+u)*255),a:o||1}}function DS(e){return OTe(e)?PTe(e):e.startsWith("rgb")?RTe(e):e.startsWith("hsl")?jTe(e):{r:0,g:0,b:0,a:1}}function ig(e,t){if(e.startsWith("var("))return`color-mix(in srgb, ${e}, black ${t*100}%)`;const{r:n,g:a,b:r,a:i}=DS(e),o=1-t,c=l=>Math.round(l*o);return`rgba(${c(n)}, ${c(a)}, ${c(r)}, ${i})`}function zp(e,t){return typeof e.primaryShade=="number"?e.primaryShade:t==="dark"?e.primaryShade.dark:e.primaryShade.light}function $v(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function zTe(e){const t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function FTe(e){if(e.startsWith("oklch("))return(zTe(e)||0)/100;const{r:t,g:n,b:a}=DS(e),r=t/255,i=n/255,o=a/255,c=$v(r),l=$v(i),d=$v(o);return .2126*c+.7152*l+.0722*d}function hm(e,t=.179){return e.startsWith("var(")?!1:FTe(e)>t}function Ph({color:e,theme:t,colorScheme:n}){if(typeof e!="string")throw new Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e==="bright")return{color:e,value:n==="dark"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:hm(n==="dark"?t.white:t.black,t.luminanceThreshold),variable:"--mantine-color-bright"};if(e==="dimmed")return{color:e,value:n==="dark"?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:hm(n==="dark"?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:"--mantine-color-dimmed"};if(e==="white"||e==="black")return{color:e,value:e==="white"?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:hm(e==="white"?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};const[a,r]=e.split("."),i=r?Number(r):void 0,o=a in t.colors;if(o){const c=i!==void 0?t.colors[a][i]:t.colors[a][zp(t,n||"light")];return{color:a,value:c,shade:i,isThemeColor:o,isLight:hm(c,t.luminanceThreshold),variable:r?`--mantine-color-${a}-${i}`:`--mantine-color-${a}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:hm(e,t.luminanceThreshold),shade:i,variable:void 0}}function zb(e,t){const n=Ph({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function qT(e,t){const n={from:(e==null?void 0:e.from)||t.defaultGradient.from,to:(e==null?void 0:e.to)||t.defaultGradient.to,deg:(e==null?void 0:e.deg)||t.defaultGradient.deg||0},a=zb(n.from,t),r=zb(n.to,t);return`linear-gradient(${n.deg}deg, ${a} 0%, ${r} 100%)`}function Qi(e,t){if(typeof e!="string"||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(")){const i=(1-t)*100;return`color-mix(in srgb, ${e}, transparent ${i}%)`}if(e.startsWith("oklch"))return e.includes("/")?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(")",` / ${t})`);const{r:n,g:a,b:r}=DS(e);return`rgba(${n}, ${a}, ${r}, ${t})`}const Md=Qi,$Te=({color:e,theme:t,variant:n,gradient:a,autoContrast:r})=>{const i=Ph({color:e,theme:t}),o=typeof r=="boolean"?r:t.autoContrast;if(n==="filled"){const c=o&&i.isLight?"var(--mantine-color-black)":"var(--mantine-color-white)";return i.isThemeColor?i.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:c,border:`${rt(1)} solid transparent`}:{background:`var(--mantine-color-${i.color}-${i.shade})`,hover:`var(--mantine-color-${i.color}-${i.shade===9?8:i.shade+1})`,color:c,border:`${rt(1)} solid transparent`}:{background:e,hover:ig(e,.1),color:c,border:`${rt(1)} solid transparent`}}if(n==="light"){if(i.isThemeColor){if(i.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${rt(1)} solid transparent`};const c=t.colors[i.color][i.shade];return{background:Qi(c,.1),hover:Qi(c,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${rt(1)} solid transparent`}}return{background:Qi(e,.1),hover:Qi(e,.12),color:e,border:`${rt(1)} solid transparent`}}if(n==="outline")return i.isThemeColor?i.shade===void 0?{background:"transparent",hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${rt(1)} solid var(--mantine-color-${e}-outline)`}:{background:"transparent",hover:Qi(t.colors[i.color][i.shade],.05),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${rt(1)} solid var(--mantine-color-${i.color}-${i.shade})`}:{background:"transparent",hover:Qi(e,.05),color:e,border:`${rt(1)} solid ${e}`};if(n==="subtle"){if(i.isThemeColor){if(i.shade===void 0)return{background:"transparent",hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${rt(1)} solid transparent`};const c=t.colors[i.color][i.shade];return{background:"transparent",hover:Qi(c,.12),color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${rt(1)} solid transparent`}}return{background:"transparent",hover:Qi(e,.12),color:e,border:`${rt(1)} solid transparent`}}return n==="transparent"?i.isThemeColor?i.shade===void 0?{background:"transparent",hover:"transparent",color:`var(--mantine-color-${e}-light-color)`,border:`${rt(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:`var(--mantine-color-${i.color}-${Math.min(i.shade,6)})`,border:`${rt(1)} solid transparent`}:{background:"transparent",hover:"transparent",color:e,border:`${rt(1)} solid transparent`}:n==="white"?i.isThemeColor?i.shade===void 0?{background:"var(--mantine-color-white)",hover:ig(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${rt(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ig(t.white,.01),color:`var(--mantine-color-${i.color}-${i.shade})`,border:`${rt(1)} solid transparent`}:{background:"var(--mantine-color-white)",hover:ig(t.white,.01),color:e,border:`${rt(1)} solid transparent`}:n==="gradient"?{background:qT(a,t),hover:qT(a,t),color:"var(--mantine-color-white)",border:"none"}:n==="default"?{background:"var(--mantine-color-default)",hover:"var(--mantine-color-default-hover)",color:"var(--mantine-color-default-color)",border:`${rt(1)} solid var(--mantine-color-default-border)`}:{}},BTe={dark:["#C9C9C9","#b8b8b8","#828282","#696969","#424242","#3b3b3b","#2e2e2e","#242424","#1f1f1f","#141414"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]},ZT="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",MS={scale:1,fontSmoothing:!0,focusRing:"auto",white:"#fff",black:"#000",colors:BTe,primaryShade:{light:6,dark:8},primaryColor:"blue",variantColorResolver:$Te,autoContrast:!1,luminanceThreshold:.3,fontFamily:ZT,fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",respectReducedMotion:!1,cursorType:"default",defaultGradient:{from:"blue",to:"cyan",deg:45},defaultRadius:"sm",activeClassName:"mantine-active",focusClassName:"",headings:{fontFamily:ZT,fontWeight:"700",textWrap:"wrap",sizes:{h1:{fontSize:rt(34),lineHeight:"1.3"},h2:{fontSize:rt(26),lineHeight:"1.35"},h3:{fontSize:rt(22),lineHeight:"1.4"},h4:{fontSize:rt(18),lineHeight:"1.45"},h5:{fontSize:rt(16),lineHeight:"1.5"},h6:{fontSize:rt(14),lineHeight:"1.5"}}},fontSizes:{xs:rt(12),sm:rt(14),md:rt(16),lg:rt(18),xl:rt(20)},lineHeights:{xs:"1.4",sm:"1.45",md:"1.55",lg:"1.6",xl:"1.65"},radius:{xs:rt(2),sm:rt(4),md:rt(8),lg:rt(16),xl:rt(32)},spacing:{xs:rt(10),sm:rt(12),md:rt(16),lg:rt(20),xl:rt(32)},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},shadows:{xs:`0 ${rt(1)} ${rt(3)} rgba(0, 0, 0, 0.05), 0 ${rt(1)} ${rt(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${rt(1)} ${rt(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rt(10)} ${rt(15)} ${rt(-5)}, rgba(0, 0, 0, 0.04) 0 ${rt(7)} ${rt(7)} ${rt(-5)}`,md:`0 ${rt(1)} ${rt(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rt(20)} ${rt(25)} ${rt(-5)}, rgba(0, 0, 0, 0.04) 0 ${rt(10)} ${rt(10)} ${rt(-5)}`,lg:`0 ${rt(1)} ${rt(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rt(28)} ${rt(23)} ${rt(-7)}, rgba(0, 0, 0, 0.04) 0 ${rt(12)} ${rt(12)} ${rt(-7)}`,xl:`0 ${rt(1)} ${rt(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${rt(36)} ${rt(28)} ${rt(-7)}, rgba(0, 0, 0, 0.04) 0 ${rt(17)} ${rt(17)} ${rt(-7)}`},other:{},components:{}};function QT(e){return e==="auto"||e==="dark"||e==="light"}function HTe({key:e="mantine-color-scheme-value"}={}){let t;return{get:n=>{if(typeof window=="undefined")return n;try{const a=window.localStorage.getItem(e);return QT(a)?a:n}catch{return n}},set:n=>{try{window.localStorage.setItem(e,n)}catch(a){console.warn("[@mantine/core] Local storage color scheme manager was unable to save color scheme.",a)}},subscribe:n=>{t=a=>{a.storageArea===window.localStorage&&a.key===e&&QT(a.newValue)&&n(a.newValue)},window.addEventListener("storage",t)},unsubscribe:()=>{window.removeEventListener("storage",t)},clear:()=>{window.localStorage.removeItem(e)}}}const UTe="[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more \u2013 https://mantine.dev/theming/colors/#primary-color",JT="[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }";function Bv(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function KT(e){if(!(e.primaryColor in e.colors))throw new Error(UTe);if(typeof e.primaryShade=="object"&&(!Bv(e.primaryShade.dark)||!Bv(e.primaryShade.light)))throw new Error(JT);if(typeof e.primaryShade=="number"&&!Bv(e.primaryShade))throw new Error(JT)}function VTe(e,t){var a;if(!t)return KT(e),e;const n=SS(e,t);return t.fontFamily&&!((a=t.headings)!=null&&a.fontFamily)&&(n.headings.fontFamily=t.fontFamily),KT(n),n}const AS=h.exports.createContext(null),WTe=()=>h.exports.useContext(AS)||MS;function nd(){const e=h.exports.useContext(AS);if(!e)throw new Error("@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app");return e}function YF({theme:e,children:t,inherit:n=!0}){const a=WTe(),r=h.exports.useMemo(()=>VTe(n?a:MS,e),[e,a,n]);return s(AS.Provider,{value:r,children:t})}YF.displayName="@mantine/core/MantineThemeProvider";function YTe(){const e=nd(),t=LS(),n=Ei(e.breakpoints).reduce((a,r)=>{const i=e.breakpoints[r].includes("px"),o=pTe(e.breakpoints[r]),c=i?`${o-.1}px`:GT(o-.1),l=i?`${o}px`:GT(o);return`${a}@media (max-width: ${c}) {.mantine-visible-from-${r} {display: none !important;}}@media (min-width: ${l}) {.mantine-hidden-from-${r} {display: none !important;}}`},"");return s("style",{"data-mantine-styles":"classes",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:n}})}function Hv(e){return Object.entries(e).map(([t,n])=>`${t}: ${n};`).join("")}function Uv(e,t){return(Array.isArray(e)?e:[e]).reduce((a,r)=>`${r}{${a}}`,t)}function GTe(e,t){const n=Hv(e.variables),a=n?Uv(t,n):"",r=Hv(e.dark),i=r?Uv(`${t}[data-mantine-color-scheme="dark"]`,r):"",o=Hv(e.light),c=o?Uv(`${t}[data-mantine-color-scheme="light"]`,o):"";return`${a}${i}${c}`}function qTe({color:e,theme:t,autoContrast:n}){return(typeof n=="boolean"?n:t.autoContrast)&&Ph({color:e||t.primaryColor,theme:t}).isLight?"var(--mantine-color-black)":"var(--mantine-color-white)"}function XT(e,t){return qTe({color:e.colors[e.primaryColor][zp(e,t)],theme:e,autoContrast:null})}function og({theme:e,color:t,colorScheme:n,name:a=t,withColorValues:r=!0}){if(!e.colors[t])return{};if(n==="light"){const c=zp(e,"light"),l={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-filled)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${c})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${c===9?8:c+1})`,[`--mantine-color-${a}-light`]:Md(e.colors[t][c],.1),[`--mantine-color-${a}-light-hover`]:Md(e.colors[t][c],.12),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${c})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${c})`,[`--mantine-color-${a}-outline-hover`]:Md(e.colors[t][c],.05)};return r?{[`--mantine-color-${a}-0`]:e.colors[t][0],[`--mantine-color-${a}-1`]:e.colors[t][1],[`--mantine-color-${a}-2`]:e.colors[t][2],[`--mantine-color-${a}-3`]:e.colors[t][3],[`--mantine-color-${a}-4`]:e.colors[t][4],[`--mantine-color-${a}-5`]:e.colors[t][5],[`--mantine-color-${a}-6`]:e.colors[t][6],[`--mantine-color-${a}-7`]:e.colors[t][7],[`--mantine-color-${a}-8`]:e.colors[t][8],[`--mantine-color-${a}-9`]:e.colors[t][9],...l}:l}const i=zp(e,"dark"),o={[`--mantine-color-${a}-text`]:`var(--mantine-color-${a}-4)`,[`--mantine-color-${a}-filled`]:`var(--mantine-color-${a}-${i})`,[`--mantine-color-${a}-filled-hover`]:`var(--mantine-color-${a}-${i===9?8:i+1})`,[`--mantine-color-${a}-light`]:Md(e.colors[t][Math.max(0,i-2)],.15),[`--mantine-color-${a}-light-hover`]:Md(e.colors[t][Math.max(0,i-2)],.2),[`--mantine-color-${a}-light-color`]:`var(--mantine-color-${a}-${Math.max(i-5,0)})`,[`--mantine-color-${a}-outline`]:`var(--mantine-color-${a}-${Math.max(i-4,0)})`,[`--mantine-color-${a}-outline-hover`]:Md(e.colors[t][Math.max(i-4,0)],.05)};return r?{[`--mantine-color-${a}-0`]:e.colors[t][0],[`--mantine-color-${a}-1`]:e.colors[t][1],[`--mantine-color-${a}-2`]:e.colors[t][2],[`--mantine-color-${a}-3`]:e.colors[t][3],[`--mantine-color-${a}-4`]:e.colors[t][4],[`--mantine-color-${a}-5`]:e.colors[t][5],[`--mantine-color-${a}-6`]:e.colors[t][6],[`--mantine-color-${a}-7`]:e.colors[t][7],[`--mantine-color-${a}-8`]:e.colors[t][8],[`--mantine-color-${a}-9`]:e.colors[t][9],...o}:o}function ZTe(e){return!!e&&typeof e=="object"&&"mantine-virtual-color"in e}function Ad(e,t,n){Ei(t).forEach(a=>Object.assign(e,{[`--mantine-${n}-${a}`]:t[a]}))}const GF=e=>{const t=zp(e,"light"),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:rt(e.defaultRadius),a={variables:{"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-color-scheme":"light dark","--mantine-webkit-font-smoothing":e.fontSmoothing?"antialiased":"unset","--mantine-moz-font-smoothing":e.fontSmoothing?"grayscale":"unset","--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-primary-color-contrast":XT(e,"light"),"--mantine-color-bright":"var(--mantine-color-black)","--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":"var(--mantine-color-red-6)","--mantine-color-placeholder":"var(--mantine-color-gray-5)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":"var(--mantine-color-white)","--mantine-color-default-hover":"var(--mantine-color-gray-0)","--mantine-color-default-color":"var(--mantine-color-black)","--mantine-color-default-border":"var(--mantine-color-gray-4)","--mantine-color-dimmed":"var(--mantine-color-gray-6)"},dark:{"--mantine-primary-color-contrast":XT(e,"dark"),"--mantine-color-bright":"var(--mantine-color-white)","--mantine-color-text":"var(--mantine-color-dark-0)","--mantine-color-body":"var(--mantine-color-dark-7)","--mantine-color-error":"var(--mantine-color-red-8)","--mantine-color-placeholder":"var(--mantine-color-dark-3)","--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":"var(--mantine-color-dark-6)","--mantine-color-default-hover":"var(--mantine-color-dark-5)","--mantine-color-default-color":"var(--mantine-color-white)","--mantine-color-default-border":"var(--mantine-color-dark-4)","--mantine-color-dimmed":"var(--mantine-color-dark-2)"}};Ad(a.variables,e.breakpoints,"breakpoint"),Ad(a.variables,e.spacing,"spacing"),Ad(a.variables,e.fontSizes,"font-size"),Ad(a.variables,e.lineHeights,"line-height"),Ad(a.variables,e.shadows,"shadow"),Ad(a.variables,e.radius,"radius"),e.colors[e.primaryColor].forEach((i,o)=>{a.variables[`--mantine-primary-color-${o}`]=`var(--mantine-color-${e.primaryColor}-${o})`}),Ei(e.colors).forEach(i=>{const o=e.colors[i];if(ZTe(o)){Object.assign(a.light,og({theme:e,name:o.name,color:o.light,colorScheme:"light",withColorValues:!0})),Object.assign(a.dark,og({theme:e,name:o.name,color:o.dark,colorScheme:"dark",withColorValues:!0}));return}o.forEach((c,l)=>{a.variables[`--mantine-color-${i}-${l}`]=c}),Object.assign(a.light,og({theme:e,color:i,colorScheme:"light",withColorValues:!1})),Object.assign(a.dark,og({theme:e,color:i,colorScheme:"dark",withColorValues:!1}))});const r=e.headings.sizes;return Ei(r).forEach(i=>{a.variables[`--mantine-${i}-font-size`]=r[i].fontSize,a.variables[`--mantine-${i}-line-height`]=r[i].lineHeight,a.variables[`--mantine-${i}-font-weight`]=r[i].fontWeight||e.headings.fontWeight}),a};function QTe({theme:e,generator:t}){const n=GF(e),a=t==null?void 0:t(e);return a?SS(n,a):n}const Vv=GF(MS);function JTe(e){const t={variables:{},light:{},dark:{}};return Ei(e.variables).forEach(n=>{Vv.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Ei(e.light).forEach(n=>{Vv.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Ei(e.dark).forEach(n=>{Vv.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function KTe(e){return`
${e}[data-mantine-color-scheme="dark"] { --mantine-color-scheme: dark; }
${e}[data-mantine-color-scheme="light"] { --mantine-color-scheme: light; }
`}function qF({cssVariablesSelector:e,deduplicateCssVariables:t}){const n=nd(),a=LS(),r=TTe(),i=QTe({theme:n,generator:r}),o=e===":root"&&t,c=o?JTe(i):i,l=GTe(c,e);return l?s("style",{"data-mantine-styles":!0,nonce:a==null?void 0:a(),dangerouslySetInnerHTML:{__html:`${l}${o?"":KTe(e)}`}}):null}qF.displayName="@mantine/CssVariables";function XTe(){const e=console.error;console.error=(...t)=>{t.length>1&&typeof t[0]=="string"&&t[0].toLowerCase().includes("extra attributes from the server")&&typeof t[1]=="string"&&t[1].toLowerCase().includes("data-mantine-color-scheme")||e(...t)}}function Id(e,t){var a;const n=e!=="auto"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";(a=t())==null||a.setAttribute("data-mantine-color-scheme",n)}function eLe({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:a}){const r=h.exports.useRef(),[i,o]=h.exports.useState(()=>e.get(t)),c=a||i,l=h.exports.useCallback(u=>{a||(Id(u,n),o(u),e.set(u))},[e.set,c,a]),d=h.exports.useCallback(()=>{o(t),Id(t,n),e.clear()},[e.clear,t]);return h.exports.useEffect(()=>(e.subscribe(l),e.unsubscribe),[e.subscribe,e.unsubscribe]),ES(()=>{Id(e.get(t),n)},[]),h.exports.useEffect(()=>{var g;if(a)return Id(a,n),()=>{};a===void 0&&Id(i,n),r.current=window.matchMedia("(prefers-color-scheme: dark)");const u=y=>{i==="auto"&&Id(y.matches?"dark":"light",n)};return(g=r.current)==null||g.addEventListener("change",u),()=>{var y;return(y=r.current)==null?void 0:y.removeEventListener("change",u)}},[i,a]),{colorScheme:c,setColorScheme:l,clearColorScheme:d}}function tLe({respectReducedMotion:e,getRootElement:t}){ES(()=>{var n;e&&((n=t())==null||n.setAttribute("data-respect-reduced-motion","true"))},[e])}XTe();function ZF({theme:e,children:t,getStyleNonce:n,withStaticClasses:a=!0,withGlobalClasses:r=!0,deduplicateCssVariables:i=!0,withCssVariables:o=!0,cssVariablesSelector:c=":root",classNamesPrefix:l="mantine",colorSchemeManager:d=HTe(),defaultColorScheme:u="light",getRootElement:g=()=>document.documentElement,cssVariablesResolver:y,forceColorScheme:w,stylesTransform:v}){const{colorScheme:S,setColorScheme:m,clearColorScheme:p}=eLe({defaultColorScheme:u,forceColorScheme:w,manager:d,getRootElement:g});return tLe({respectReducedMotion:(e==null?void 0:e.respectReducedMotion)||!1,getRootElement:g}),s(WF.Provider,{value:{colorScheme:S,setColorScheme:m,clearColorScheme:p,getRootElement:g,classNamesPrefix:l,getStyleNonce:n,cssVariablesResolver:y,cssVariablesSelector:c,withStaticClasses:a,stylesTransform:v},children:f(YF,{theme:e,children:[o&&s(qF,{cssVariablesSelector:c,deduplicateCssVariables:i}),r&&s(YTe,{}),t]})})}ZF.displayName="@mantine/core/MantineProvider";const nLe={always:"mantine-focus-always",auto:"mantine-focus-auto",never:"mantine-focus-never"};function aLe({theme:e,options:t,unstyled:n}){return li((t==null?void 0:t.focusable)&&!n&&(e.focusClassName||nLe[e.focusRing]),(t==null?void 0:t.active)&&!n&&e.activeClassName)}function rLe({selector:e,stylesCtx:t,options:n,props:a,theme:r}){return TS({theme:r,classNames:n==null?void 0:n.classNames,props:(n==null?void 0:n.props)||a,stylesCtx:t})[e]}function eL({selector:e,stylesCtx:t,theme:n,classNames:a,props:r}){return TS({theme:n,classNames:a,props:r,stylesCtx:t})[e]}function sLe({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function iLe({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function oLe({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:a}){return a===!1?[]:e.map(r=>`${t}-${r}-${n}`)}function lLe({themeName:e,theme:t,selector:n,props:a,stylesCtx:r}){return e.map(i=>{var o,c;return(c=TS({theme:t,classNames:(o=t.components[i])==null?void 0:o.classNames,props:a,stylesCtx:r}))==null?void 0:c[n]})}function cLe({options:e,classes:t,selector:n,unstyled:a}){return(e==null?void 0:e.variant)&&!a?t[`${n}--${e.variant}`]:void 0}function dLe({theme:e,options:t,themeName:n,selector:a,classNamesPrefix:r,classNames:i,classes:o,unstyled:c,className:l,rootSelector:d,props:u,stylesCtx:g,withStaticClasses:y,headless:w,transformedStyles:v}){return li(aLe({theme:e,options:t,unstyled:c||w}),lLe({theme:e,themeName:n,selector:a,props:u,stylesCtx:g}),cLe({options:t,classes:o,selector:a,unstyled:c}),eL({selector:a,stylesCtx:g,theme:e,classNames:i,props:u}),eL({selector:a,stylesCtx:g,theme:e,classNames:v,props:u}),rLe({selector:a,stylesCtx:g,options:t,props:u,theme:e}),sLe({rootSelector:d,selector:a,className:l}),iLe({selector:a,classes:o,unstyled:c||w}),y&&!w&&oLe({themeName:n,classNamesPrefix:r,selector:a,withStaticClass:t==null?void 0:t.withStaticClass}),t==null?void 0:t.className)}function uLe({theme:e,themeName:t,props:n,stylesCtx:a,selector:r}){return t.map(i=>{var o;return k_({theme:e,styles:(o=e.components[i])==null?void 0:o.styles,props:n,stylesCtx:a})[r]}).reduce((i,o)=>({...i,...o}),{})}function C_({style:e,theme:t}){return Array.isArray(e)?[...e].reduce((n,a)=>({...n,...C_({style:a,theme:t})}),{}):typeof e=="function"?e(t):e==null?{}:e}function fLe(e){return e.reduce((t,n)=>(n&&Object.keys(n).forEach(a=>{t[a]={...t[a],...kS(n[a])}}),t),{})}function mLe({vars:e,varsResolver:t,theme:n,props:a,stylesCtx:r,selector:i,themeName:o,headless:c}){var l;return(l=fLe([c?{}:t==null?void 0:t(n,a,r),...o.map(d=>{var u,g,y;return(y=(g=(u=n.components)==null?void 0:u[d])==null?void 0:g.vars)==null?void 0:y.call(g,n,a,r)}),e==null?void 0:e(n,a,r)]))==null?void 0:l[i]}function pLe({theme:e,themeName:t,selector:n,options:a,props:r,stylesCtx:i,rootSelector:o,styles:c,style:l,vars:d,varsResolver:u,headless:g,withStylesTransform:y}){return{...!y&&uLe({theme:e,themeName:t,props:r,stylesCtx:i,selector:n}),...!y&&k_({theme:e,styles:c,props:r,stylesCtx:i})[n],...!y&&k_({theme:e,styles:a==null?void 0:a.styles,props:(a==null?void 0:a.props)||r,stylesCtx:i})[n],...mLe({theme:e,props:r,stylesCtx:i,vars:d,varsResolver:u,selector:n,themeName:t,headless:g}),...o===n?C_({style:l,theme:e}):null,...C_({style:a==null?void 0:a.style,theme:e})}}function hLe({props:e,stylesCtx:t,themeName:n}){var o;const a=nd(),r=(o=ITe())==null?void 0:o();return{getTransformedStyles:c=>r?[...c.map(d=>r(d,{props:e,theme:a,ctx:t})),...n.map(d=>{var u;return r((u=a.components[d])==null?void 0:u.styles,{props:e,theme:a,ctx:t})})].filter(Boolean):[],withStylesTransform:!!r}}function Rh({name:e,classes:t,props:n,stylesCtx:a,className:r,style:i,rootSelector:o="root",unstyled:c,classNames:l,styles:d,vars:u,varsResolver:g}){const y=nd(),w=LTe(),v=DTe(),S=MTe(),m=(Array.isArray(e)?e:[e]).filter(x=>x),{withStylesTransform:p,getTransformedStyles:b}=hLe({props:n,stylesCtx:a,themeName:m});return(x,k)=>({className:dLe({theme:y,options:k,themeName:m,selector:x,classNamesPrefix:w,classNames:l,classes:t,unstyled:c,className:r,rootSelector:o,props:n,stylesCtx:a,withStaticClasses:v,headless:S,transformedStyles:b([k==null?void 0:k.styles,d])}),style:pLe({theme:y,themeName:m,selector:x,options:k,props:n,stylesCtx:a,rootSelector:o,styles:d,style:i,vars:u,varsResolver:g,headless:S,withStylesTransform:p})})}function Tf(e,t,n){var o;const a=nd(),r=(o=a.components[e])==null?void 0:o.defaultProps,i=typeof r=="function"?r(a):r;return{...t,...i,...kS(n)}}function Wv(e){return Ei(e).reduce((t,n)=>e[n]!==void 0?`${t}${fTe(n)}:${e[n]};`:t,"").trim()}function gLe({selector:e,styles:t,media:n,container:a}){const r=t?Wv(t):"",i=Array.isArray(n)?n.map(c=>`@media${c.query}{${e}{${Wv(c.styles)}}}`):[],o=Array.isArray(a)?a.map(c=>`@container ${c.query}{${e}{${Wv(c.styles)}}}`):[];return`${r?`${e}{${r}}`:""}${i.join("")}${o.join("")}`.trim()}function bLe(e){const t=LS();return s("style",{"data-mantine-styles":"inline",nonce:t==null?void 0:t(),dangerouslySetInnerHTML:{__html:gLe(e)}})}function yLe(e){const{m:t,mx:n,my:a,mt:r,mb:i,ml:o,mr:c,me:l,ms:d,p:u,px:g,py:y,pt:w,pb:v,pl:S,pr:m,pe:p,ps:b,bd:x,bg:k,c:N,opacity:_,ff:C,fz:E,fw:T,lts:D,ta:P,lh:M,fs:O,tt:F,td:z,w:H,miw:A,maw:j,h:I,mih:B,mah:Y,bgsz:U,bgp:W,bgr:V,bga:X,pos:ne,top:oe,left:q,bottom:te,right:G,inset:J,display:K,flex:Q,hiddenFrom:Z,visibleFrom:se,lightHidden:ce,darkHidden:le,sx:ae,...ie}=e;return{styleProps:kS({m:t,mx:n,my:a,mt:r,mb:i,ml:o,mr:c,me:l,ms:d,p:u,px:g,py:y,pt:w,pb:v,pl:S,pr:m,pe:p,ps:b,bd:x,bg:k,c:N,opacity:_,ff:C,fz:E,fw:T,lts:D,ta:P,lh:M,fs:O,tt:F,td:z,w:H,miw:A,maw:j,h:I,mih:B,mah:Y,bgsz:U,bgp:W,bgr:V,bga:X,pos:ne,top:oe,left:q,bottom:te,right:G,inset:J,display:K,flex:Q,hiddenFrom:Z,visibleFrom:se,lightHidden:ce,darkHidden:le,sx:ae}),rest:ie}}const xLe={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},ms:{type:"spacing",property:"marginInlineStart"},me:{type:"spacing",property:"marginInlineEnd"},mx:{type:"spacing",property:"marginInline"},my:{type:"spacing",property:"marginBlock"},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},ps:{type:"spacing",property:"paddingInlineStart"},pe:{type:"spacing",property:"paddingInlineEnd"},px:{type:"spacing",property:"paddingInline"},py:{type:"spacing",property:"paddingBlock"},bd:{type:"border",property:"border"},bg:{type:"color",property:"background"},c:{type:"textColor",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"fontFamily",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"lineHeight",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"},flex:{type:"identity",property:"flex"}};function IS(e,t){const n=Ph({color:e,theme:t});return n.color==="dimmed"?"var(--mantine-color-dimmed)":n.color==="bright"?"var(--mantine-color-bright)":n.variable?`var(${n.variable})`:n.color}function wLe(e,t){const n=Ph({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:IS(e,t)}function vLe(e,t){if(typeof e=="number")return rt(e);if(typeof e=="string"){const[n,a,...r]=e.split(" ").filter(o=>o.trim()!=="");let i=`${rt(n)}`;return a&&(i+=` ${a}`),r.length>0&&(i+=` ${IS(r.join(" "),t)}`),i.trim()}return e}const tL={text:"var(--mantine-font-family)",mono:"var(--mantine-font-family-monospace)",monospace:"var(--mantine-font-family-monospace)",heading:"var(--mantine-font-family-headings)",headings:"var(--mantine-font-family-headings)"};function _Le(e){return typeof e=="string"&&e in tL?tL[e]:e}const NLe=["h1","h2","h3","h4","h5","h6"];function SLe(e,t){return typeof e=="string"&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e=="string"&&NLe.includes(e)?`var(--mantine-${e}-font-size)`:typeof e=="number"||typeof e=="string"?rt(e):e}function kLe(e){return e}const CLe=["h1","h2","h3","h4","h5","h6"];function ELe(e,t){return typeof e=="string"&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e=="string"&&CLe.includes(e)?`var(--mantine-${e}-line-height)`:e}function TLe(e){return typeof e=="number"?rt(e):e}function LLe(e,t){if(typeof e=="number")return rt(e);if(typeof e=="string"){const n=e.replace("-","");if(!(n in t.spacing))return rt(e);const a=`--mantine-spacing-${n}`;return e.startsWith("-")?`calc(var(${a}) * -1)`:`var(${a})`}return e}const Yv={color:IS,textColor:wLe,fontSize:SLe,spacing:LLe,identity:kLe,size:TLe,lineHeight:ELe,fontFamily:_Le,border:vLe};function nL(e){return e.replace("(min-width: ","").replace("em)","")}function DLe({media:e,...t}){const a=Object.keys(e).sort((r,i)=>Number(nL(r))-Number(nL(i))).map(r=>({query:r,styles:e[r]}));return{...t,media:a}}function MLe(e){if(typeof e!="object"||e===null)return!1;const t=Object.keys(e);return!(t.length===1&&t[0]==="base")}function ALe(e){return typeof e=="object"&&e!==null?"base"in e?e.base:void 0:e}function ILe(e){return typeof e=="object"&&e!==null?Ei(e).filter(t=>t!=="base"):[]}function OLe(e,t){return typeof e=="object"&&e!==null&&t in e?e[t]:e}function PLe({styleProps:e,data:t,theme:n}){return DLe(Ei(e).reduce((a,r)=>{if(r==="hiddenFrom"||r==="visibleFrom"||r==="sx")return a;const i=t[r],o=Array.isArray(i.property)?i.property:[i.property],c=ALe(e[r]);if(!MLe(e[r]))return o.forEach(d=>{a.inlineStyles[d]=Yv[i.type](c,n)}),a;a.hasResponsiveStyles=!0;const l=ILe(e[r]);return o.forEach(d=>{c&&(a.styles[d]=Yv[i.type](c,n)),l.forEach(u=>{const g=`(min-width: ${n.breakpoints[u]})`;a.media[g]={...a.media[g],[d]:Yv[i.type](OLe(e[r],u),n)}})}),a},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function RLe(){return`__m__-${h.exports.useId().replace(/:/g,"")}`}function QF(e){return e.startsWith("data-")?e:`data-${e}`}function jLe(e){return Object.keys(e).reduce((t,n)=>{const a=e[n];return a===void 0||a===""||a===!1||a===null||(t[QF(n)]=e[n]),t},{})}function JF(e){return e?typeof e=="string"?{[QF(e)]:!0}:Array.isArray(e)?[...e].reduce((t,n)=>({...t,...JF(n)}),{}):jLe(e):null}function E_(e,t){return Array.isArray(e)?[...e].reduce((n,a)=>({...n,...E_(a,t)}),{}):typeof e=="function"?e(t):e==null?{}:e}function zLe({theme:e,style:t,vars:n,styleProps:a}){const r=E_(t,e),i=E_(n,e);return{...r,...i,...a}}const KF=h.exports.forwardRef(({component:e,style:t,__vars:n,className:a,variant:r,mod:i,size:o,hiddenFrom:c,visibleFrom:l,lightHidden:d,darkHidden:u,renderRoot:g,__size:y,...w},v)=>{var E;const S=nd(),m=e||"div",{styleProps:p,rest:b}=yLe(w),x=ATe(),k=(E=x==null?void 0:x())==null?void 0:E(p.sx),N=RLe(),_=PLe({styleProps:p,theme:S,data:xLe}),C={ref:v,style:zLe({theme:S,style:t,vars:n,styleProps:_.inlineStyles}),className:li(a,k,{[N]:_.hasResponsiveStyles,"mantine-light-hidden":d,"mantine-dark-hidden":u,[`mantine-hidden-from-${c}`]:c,[`mantine-visible-from-${l}`]:l}),"data-variant":r,"data-size":UF(o)?void 0:o||void 0,size:y,...JF(i),...b};return f(Se,{children:[_.hasResponsiveStyles&&s(bLe,{selector:`.${N}`,styles:_.styles,media:_.media}),typeof g=="function"?g(C):s(m,{...C})]})});KF.displayName="@mantine/core/Box";const So=KF;function XF(e){return e}function OS(e){const t=h.exports.forwardRef(e);return t.extend=XF,t}function e$(e){const t=h.exports.forwardRef(e);return t.extend=XF,t}var t$={root:"m_87cf2631"};const FLe={__staticSelector:"UnstyledButton"},PS=e$((e,t)=>{const n=Tf("UnstyledButton",FLe,e),{className:a,component:r="button",__staticSelector:i,unstyled:o,classNames:c,styles:l,style:d,...u}=n,g=Rh({name:i,props:n,classes:t$,className:a,style:d,classNames:c,styles:l,unstyled:o});return s(So,{...g("root",{focusable:!0}),component:r,ref:t,type:r==="button"?"button":void 0,...u})});PS.classes=t$;PS.displayName="@mantine/core/UnstyledButton";function $Le(e){const t=document.createElement("div");return t.setAttribute("data-portal","true"),typeof e.className=="string"&&t.classList.add(...e.className.split(" ").filter(Boolean)),typeof e.style=="object"&&Object.assign(t.style,e.style),typeof e.id=="string"&&t.setAttribute("id",e.id),t}const BLe={},n$=h.exports.forwardRef((e,t)=>{const{children:n,target:a,...r}=Tf("Portal",BLe,e),[i,o]=h.exports.useState(!1),c=h.exports.useRef(null);return ES(()=>(o(!0),c.current=a?typeof a=="string"?document.querySelector(a):a:$Le(r),STe(t,c.current),!a&&c.current&&document.body.appendChild(c.current),()=>{!a&&c.current&&document.body.removeChild(c.current)}),[a]),!i||!c.current?null:Rl.exports.createPortal(s(Se,{children:n}),c.current)});n$.displayName="@mantine/core/Portal";function a$({withinPortal:e=!0,children:t,...n}){return e?s(n$,{...n,children:t}):s(Se,{children:t})}a$.displayName="@mantine/core/OptionalPortal";var qs={root:"m_5ae2e3c",barsLoader:"m_7a2bd4cd",bar:"m_870bb79","bars-loader-animation":"m_5d2b3b9d",dotsLoader:"m_4e3f22d7",dot:"m_870c4af","loader-dots-animation":"m_aac34a1",ovalLoader:"m_b34414df","oval-loader-animation":"m_f8e89c4b"};const HLe=h.exports.forwardRef(({className:e,...t},n)=>f(So,{component:"span",className:li(qs.barsLoader,e),...t,ref:n,children:[s("span",{className:qs.bar}),s("span",{className:qs.bar}),s("span",{className:qs.bar})]})),ULe=h.exports.forwardRef(({className:e,...t},n)=>f(So,{component:"span",className:li(qs.dotsLoader,e),...t,ref:n,children:[s("span",{className:qs.dot}),s("span",{className:qs.dot}),s("span",{className:qs.dot})]})),VLe=h.exports.forwardRef(({className:e,...t},n)=>s(So,{component:"span",className:li(qs.ovalLoader,e),...t,ref:n})),r$={bars:HLe,oval:VLe,dots:ULe},WLe={loaders:r$,type:"oval"},YLe=(e,{size:t,color:n})=>({root:{"--loader-size":CS(t,"loader-size"),"--loader-color":n?zb(n,e):void 0}}),jx=OS((e,t)=>{const n=Tf("Loader",WLe,e),{size:a,color:r,type:i,vars:o,className:c,style:l,classNames:d,styles:u,unstyled:g,loaders:y,variant:w,children:v,...S}=n,m=Rh({name:"Loader",props:n,classes:qs,className:c,style:l,classNames:d,styles:u,unstyled:g,vars:o,varsResolver:YLe});return v?s(So,{...m("root"),ref:t,...S,children:v}):s(So,{...m("root"),ref:t,component:y[i],variant:w,size:a,...S})});jx.defaultLoaders=r$;jx.classes=qs;jx.displayName="@mantine/core/Loader";const s$=h.exports.forwardRef(({size:e="var(--cb-icon-size, 70%)",style:t,...n},a)=>s("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...t,width:e,height:e},ref:a,...n,children:s("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})}));s$.displayName="@mantine/core/CloseIcon";var i$={root:"m_86a44da5","root--subtle":"m_220c80f2"};const GLe={variant:"subtle"},qLe=(e,{size:t,radius:n,iconSize:a})=>({root:{"--cb-size":CS(t,"cb-size"),"--cb-radius":n===void 0?void 0:VF(n),"--cb-icon-size":rt(a)}}),RS=e$((e,t)=>{const n=Tf("CloseButton",GLe,e),{iconSize:a,children:r,vars:i,radius:o,className:c,classNames:l,style:d,styles:u,unstyled:g,"data-disabled":y,disabled:w,variant:v,icon:S,mod:m,...p}=n,b=Rh({name:"CloseButton",props:n,className:c,style:d,classes:i$,classNames:l,styles:u,unstyled:g,vars:i,varsResolver:qLe});return f(PS,{ref:t,...p,unstyled:g,variant:v,disabled:w,mod:[{disabled:w||y},m],...b("root",{variant:v,active:!w&&!y}),children:[S||s(s$,{}),r]})});RS.classes=i$;RS.displayName="@mantine/core/CloseButton";function T_(){return T_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},T_.apply(null,arguments)}function o$(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.indexOf(a)>=0)continue;n[a]=e[a]}return n}var l$={root:"m_a513464",icon:"m_a4ceffb",loader:"m_b0920b15",body:"m_a49ed24",title:"m_3feedf16",description:"m_3d733a3a",closeButton:"m_919a4d88"};const ZLe={withCloseButton:!0},QLe=(e,{radius:t,color:n})=>({root:{"--notification-radius":t===void 0?void 0:VF(t),"--notification-color":n?zb(n,e):void 0}}),jS=OS((e,t)=>{const n=Tf("Notification",ZLe,e),{className:a,color:r,radius:i,loading:o,withCloseButton:c,withBorder:l,title:d,icon:u,children:g,onClose:y,closeButtonProps:w,classNames:v,style:S,styles:m,unstyled:p,variant:b,vars:x,mod:k,...N}=n,_=Rh({name:"Notification",classes:l$,props:n,className:a,style:S,classNames:v,styles:m,unstyled:p,vars:x,varsResolver:QLe});return f(So,{..._("root"),mod:[{"data-with-icon":!!u||o,"data-with-border":l},k],ref:t,variant:b,...N,role:"alert",children:[u&&!o&&s("div",{..._("icon"),children:u}),o&&s(jx,{size:28,color:r,..._("loader")}),f("div",{..._("body"),children:[d&&s("div",{..._("title"),children:d}),s(So,{..._("description"),mod:{"data-with-title":!!d},children:g})]}),c&&s(RS,{iconSize:16,color:"gray",...w,unstyled:p,onClick:y,..._("closeButton")})]})});jS.classes=l$;jS.displayName="@mantine/core/Notification";function JLe(e){let t=e,n=!1;const a=new Set;return{getState(){return t},updateState(r){t=typeof r=="function"?r(t):r},setState(r){this.updateState(r),a.forEach(i=>i(t))},initialize(r){n||(t=r,n=!0)},subscribe(r){return a.add(r),()=>a.delete(r)}}}function KLe(e){return h.exports.useSyncExternalStore(e.subscribe,()=>e.getState(),()=>e.getState())}const XLe=()=>JLe({notifications:[],queue:[],limit:5}),ad=XLe(),eDe=(e=ad)=>KLe(e);function Lf(e,t){const n=e.getState(),a=t([...n.notifications,...n.queue]);e.setState({notifications:a.slice(0,n.limit),queue:a.slice(n.limit),limit:n.limit})}function tDe(e,t=ad){const n=e.id||bTe();return Lf(t,a=>e.id&&a.some(r=>r.id===e.id)?a:[...a,{...e,id:n}]),n}function c$(e,t=ad){return Lf(t,n=>n.filter(a=>{var r;return a.id===e?((r=a.onClose)==null||r.call(a,a),!1):!0})),e}function nDe(e,t=ad){return Lf(t,n=>n.map(a=>a.id===e.id?{...a,...e}:a)),e.id}function aDe(e=ad){Lf(e,()=>[])}function rDe(e=ad){Lf(e,t=>t.slice(0,e.getState().limit))}const Df={show:tDe,hide:c$,update:nDe,clean:aDe,cleanQueue:rDe,updateState:Lf};function L_(e,t){return L_=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},L_(e,t)}function d$(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,L_(e,t)}var aL={disabled:!1},Fb=R.createContext(null),sDe=function(t){return t.scrollTop},Nm="unmounted",cc="exited",dc="entering",Fd="entered",D_="exiting",Po=function(e){d$(t,e);function t(a,r){var i;i=e.call(this,a,r)||this;var o=r,c=o&&!o.isMounting?a.enter:a.appear,l;return i.appearStatus=null,a.in?c?(l=cc,i.appearStatus=dc):l=Fd:a.unmountOnExit||a.mountOnEnter?l=Nm:l=cc,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(r,i){var o=r.in;return o&&i.status===Nm?{status:cc}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==dc&&o!==Fd&&(i=dc):(o===dc||o===Fd)&&(i=D_)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r=this.props.timeout,i,o,c;return i=o=c=r,r!=null&&typeof r!="number"&&(i=r.exit,o=r.enter,c=r.appear!==void 0?r.appear:o),{exit:i,enter:o,appear:c}},n.updateStatus=function(r,i){if(r===void 0&&(r=!1),i!==null)if(this.cancelNextCallback(),i===dc){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:wm.findDOMNode(this);o&&sDe(o)}this.performEnter(r)}else this.performExit();else this.props.unmountOnExit&&this.state.status===cc&&this.setState({status:Nm})},n.performEnter=function(r){var i=this,o=this.props.enter,c=this.context?this.context.isMounting:r,l=this.props.nodeRef?[c]:[wm.findDOMNode(this),c],d=l[0],u=l[1],g=this.getTimeouts(),y=c?g.appear:g.enter;if(!r&&!o||aL.disabled){this.safeSetState({status:Fd},function(){i.props.onEntered(d)});return}this.props.onEnter(d,u),this.safeSetState({status:dc},function(){i.props.onEntering(d,u),i.onTransitionEnd(y,function(){i.safeSetState({status:Fd},function(){i.props.onEntered(d,u)})})})},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),c=this.props.nodeRef?void 0:wm.findDOMNode(this);if(!i||aL.disabled){this.safeSetState({status:cc},function(){r.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:D_},function(){r.props.onExiting(c),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:cc},function(){r.props.onExited(c)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(c){o&&(o=!1,i.nextCallback=null,r(c))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:wm.findDOMNode(this),c=r==null&&!this.props.addEndListener;if(!o||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=l[0],u=l[1];this.props.addEndListener(d,u)}r!=null&&setTimeout(this.nextCallback,r)},n.render=function(){var r=this.state.status;if(r===Nm)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var c=o$(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return R.createElement(Fb.Provider,{value:null},typeof o=="function"?o(r,c):R.cloneElement(R.Children.only(o),c))},t}(R.Component);Po.contextType=Fb;Po.propTypes={};function Od(){}Po.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Od,onEntering:Od,onEntered:Od,onExit:Od,onExiting:Od,onExited:Od};Po.UNMOUNTED=Nm;Po.EXITED=cc;Po.ENTERING=dc;Po.ENTERED=Fd;Po.EXITING=D_;var iDe=Po;function oDe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zS(e,t){var n=function(i){return t&&h.exports.isValidElement(i)?t(i):i},a=Object.create(null);return e&&h.exports.Children.map(e,function(r){return r}).forEach(function(r){a[r.key]=n(r)}),a}function lDe(e,t){e=e||{},t=t||{};function n(u){return u in t?t[u]:e[u]}var a=Object.create(null),r=[];for(var i in e)i in t?r.length&&(a[i]=r,r=[]):r.push(i);var o,c={};for(var l in t){if(a[l])for(o=0;o<a[l].length;o++){var d=a[l][o];c[a[l][o]]=n(d)}c[l]=n(l)}for(o=0;o<r.length;o++)c[r[o]]=n(r[o]);return c}function xc(e,t,n){return n[t]!=null?n[t]:e.props[t]}function cDe(e,t){return zS(e.children,function(n){return h.exports.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:xc(n,"appear",e),enter:xc(n,"enter",e),exit:xc(n,"exit",e)})})}function dDe(e,t,n){var a=zS(e.children),r=lDe(t,a);return Object.keys(r).forEach(function(i){var o=r[i];if(!!h.exports.isValidElement(o)){var c=i in t,l=i in a,d=t[i],u=h.exports.isValidElement(d)&&!d.props.in;l&&(!c||u)?r[i]=h.exports.cloneElement(o,{onExited:n.bind(null,o),in:!0,exit:xc(o,"exit",e),enter:xc(o,"enter",e)}):!l&&c&&!u?r[i]=h.exports.cloneElement(o,{in:!1}):l&&c&&h.exports.isValidElement(d)&&(r[i]=h.exports.cloneElement(o,{onExited:n.bind(null,o),in:d.props.in,exit:xc(o,"exit",e),enter:xc(o,"enter",e)}))}}),r}var uDe=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},fDe={component:"div",childFactory:function(t){return t}},FS=function(e){d$(t,e);function t(a,r){var i;i=e.call(this,a,r)||this;var o=i.handleExited.bind(oDe(i));return i.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},i}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(r,i){var o=i.children,c=i.handleExited,l=i.firstRender;return{children:l?cDe(r,c):dDe(r,o,c),firstRender:!1}},n.handleExited=function(r,i){var o=zS(this.props.children);r.key in o||(r.props.onExited&&r.props.onExited(i),this.mounted&&this.setState(function(c){var l=T_({},c.children);return delete l[r.key],{children:l}}))},n.render=function(){var r=this.props,i=r.component,o=r.childFactory,c=o$(r,["component","childFactory"]),l=this.state.contextValue,d=uDe(this.state.children).map(o);return delete c.appear,delete c.enter,delete c.exit,i===null?R.createElement(Fb.Provider,{value:l},d):R.createElement(Fb.Provider,{value:l},R.createElement(i,c,d))},t}(R.Component);FS.propTypes={};FS.defaultProps=fDe;var mDe=FS;const rL={left:"translateX(-100%)",right:"translateX(100%)","top-center":"translateY(-100%)","bottom-center":"translateY(100%)"},pDe={left:"translateX(0)",right:"translateX(0)","top-center":"translateY(0)","bottom-center":"translateY(0)"};function hDe({state:e,maxHeight:t,position:n,transitionDuration:a}){const[r,i]=n.split("-"),o=i==="center"?`${r}-center`:i,c={opacity:0,maxHeight:t,transform:rL[o],transitionDuration:`${a}ms, ${a}ms, ${a}ms`,transitionTimingFunction:"cubic-bezier(.51,.3,0,1.21), cubic-bezier(.51,.3,0,1.21), linear",transitionProperty:"opacity, transform, max-height"},l={opacity:1,transform:pDe[o]},d={opacity:0,maxHeight:0,transform:rL[o]};return{...c,...{entering:l,entered:l,exiting:d,exited:d}[e]}}function gDe(e,t){return typeof t=="number"?t:t===!1||e===!1?!1:e}const u$=h.exports.forwardRef(({data:e,onHide:t,autoClose:n,...a},r)=>{const{autoClose:i,message:o,...c}=e,l=gDe(n,e.autoClose),d=h.exports.useRef(),u=()=>window.clearTimeout(d.current),g=()=>{t(e.id),u()},y=()=>{typeof l=="number"&&(d.current=window.setTimeout(g,l))};return h.exports.useEffect(()=>{var w;(w=e.onOpen)==null||w.call(e,e)},[]),h.exports.useEffect(()=>(y(),u),[l]),s(jS,{...a,...c,onClose:g,ref:r,onMouseEnter:u,onMouseLeave:y,children:o})});u$.displayName="@mantine/notifications/NotificationContainer";var f$={root:"m_b37d9ac7",notification:"m_5ed0edd0"};const bDe=iDe,yDe={position:"bottom-right",autoClose:4e3,transitionDuration:250,containerWidth:440,notificationMaxHeight:200,limit:5,zIndex:gTe("overlay"),store:ad,withinPortal:!0},xDe=(e,{zIndex:t,position:n,containerWidth:a})=>{const[r,i]=n.split("-");return{root:{"--notifications-z-index":t==null?void 0:t.toString(),"--notifications-top":r==="top"?"var(--mantine-spacing-md)":void 0,"--notifications-bottom":r==="bottom"?"var(--mantine-spacing-md)":void 0,"--notifications-left":i==="left"?"var(--mantine-spacing-md)":i==="center"?"50%":void 0,"--notifications-right":i==="right"?"var(--mantine-spacing-md)":void 0,"--notifications-transform":i==="center"?"translateX(-50%)":void 0,"--notifications-container-width":rt(a)}}},Ro=OS((e,t)=>{const n=Tf("Notifications",yDe,e),{classNames:a,className:r,style:i,styles:o,unstyled:c,vars:l,position:d,autoClose:u,transitionDuration:g,containerWidth:y,notificationMaxHeight:w,limit:v,zIndex:S,store:m,portalProps:p,withinPortal:b,...x}=n,k=nd(),N=eDe(m),_=NTe(),C=kTe(),E=h.exports.useRef({}),T=h.exports.useRef(0),P=(k.respectReducedMotion?C:!1)?1:g,M=Rh({name:"Notifications",classes:f$,props:n,className:r,style:i,classNames:a,styles:o,unstyled:c,vars:l,varsResolver:xDe});h.exports.useEffect(()=>{m==null||m.updateState(F=>({...F,limit:v||5}))},[v]),vTe(()=>{N.notifications.length>T.current&&setTimeout(()=>_(),0),T.current=N.notifications.length},[N.notifications]);const O=N.notifications.map(({style:F,...z})=>s(bDe,{timeout:P,onEnter:()=>E.current[z.id].offsetHeight,nodeRef:{current:E.current[z.id]},children:H=>s(u$,{ref:A=>{E.current[z.id]=A},data:z,onHide:A=>c$(A,m),autoClose:u,...M("notification",{style:{...hDe({state:H,position:d,transitionDuration:P,maxHeight:w}),...F}})})},z.id));return s(a$,{withinPortal:b,...p,children:s(So,{...M("root"),ref:t,...x,children:s(mDe,{children:O})})})});Ro.classes=f$;Ro.displayName="@mantine/notifications/Notifications";Ro.show=Df.show;Ro.hide=Df.hide;Ro.update=Df.update;Ro.clean=Df.clean;Ro.cleanQueue=Df.cleanQueue;Ro.updateState=Df.updateState;const wDe=NS("pk_test_51Ll5ukBgOlWo0lDUrBhA2W7EX2MwUH9AR5Y3KQoujf7PTQagZAJylWP1UOFbtH4UwxoufZbInwehQppWAq53kmNC00UIKSmebO");function vDe(){return f(ZF,{theme:{primaryColor:"violet"},children:[s(Ro,{position:"top-right"}),s(yY,{children:s(vY,{children:s(vG,{children:s(kF,{stripe:wDe,children:s(uTe,{})})})})})]})}function _De(){"serviceWorker"in navigator&&window.addEventListener("load",()=>{navigator.serviceWorker.register("./src/service-worker.js",{type:"module"}).then(e=>{console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(e=>{console.error("ServiceWorker registration failed: ",e)})})}const NDe=Gv.createRoot(document.getElementById("root"));NDe.render(s(vDe,{}));_De()});export default SDe();