avada-feature-request 1.0.29 → 1.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */"production"===process.env.NODE_ENV?u.exports=function(){if(v)return p;v=1;var e=t,r=y(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return p.useSyncExternalStoreWithSelector=function(e,t,r,d,c){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=o(function(){function e(e){if(!a){if(a=!0,i=e,e=d(e),void 0!==c&&p.hasValue){var t=p.value;if(c(t,e))return s=t}return s=e}if(t=s,n(i,e))return t;var r=d(e);return void 0!==c&&c(t,r)?(i=e,t):(i=e,s=r)}var i,s,a=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,d,c]);var h=i(e,u[0],u[1]);return a(function(){p.hasValue=!0,p.value=h},[h]),l(h),h},p}():u.exports=(b||(b=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,r=y(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;S.useSyncExternalStoreWithSelector=function(e,t,r,d,c){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=o(function(){function e(e){if(!a){if(a=!0,i=e,e=d(e),void 0!==c&&p.hasValue){var t=p.value;if(c(t,e))return s=t}return s=e}if(t=s,n(i,e))return t;var r=d(e);return void 0!==c&&c(t,r)?(i=e,t):(i=e,s=r)}var i,s,a=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,d,c]);var h=i(e,u[0],u[1]);return a(function(){p.hasValue=!0,p.value=h},[h]),l(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),S);var x=d(u.exports);const{useDebugValue:_}=t,{useSyncExternalStoreWithSelector:A}=x;let T=!1;const E=e=>e;const C=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?l(e):l)(e):e,r=(e,r)=>function(e,t=E,r){r&&!T&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),T=!0);const n=A(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return _(n),n}(t,e,r);return Object.assign(r,t),r},k=["anhth@avada.io","anhnt@avada.io","sam@avada.io","lamln@avadagroup.com","nghiavt@avadagroup.com","nghiavt@avada.email","anhth01@avadagroup.com","truongnn@avadagroup.com","tranggt@avadagroup.com"],M=e=>k.includes(e),D="avada-feature-request";let L=null,O=null;const R=(e,t,n=D)=>{if(L)return L;if(t)return L=t,L;const i=r.getApps().find(e=>e.name===n);if(i)return L=i,L;if(!e)throw new Error(`Firebase config is required to initialize app "${n}". Pass firebaseConfig or firebaseApp to FeatureRequestProvider.`);return L=r.initializeApp(e,n),L},P=(e,t,r=D)=>{const i=R(e,t,r);return O||(O=n.getFirestore(i)),{app:i,db:O}},I={shopId:"",email:""},N=(F=e=>({appId:"",shopInfo:I,isAdmin:!1,isHydrated:!1,fnAfterSubmit:void 0,fnAfterLike:void 0,stage:"home",detailId:void 0,openComment:!1,setStage:(t,r)=>{var n;e({stage:t,detailId:null==r?void 0:r.detailId,openComment:null!==(n=null==r?void 0:r.openComment)&&void 0!==n&&n})},setConfig:t=>{const r={...I,...t.activeShop};e({appId:t.appId||"",shopInfo:r,fnAfterSubmit:t.fnAfterSubmit,fnAfterLike:t.fnAfterLike,isAdmin:M(r.email),isHydrated:!0})}}))?C(F):C;var F;const j=({children:r,firebaseConfig:n,firebaseApp:i,firebaseAppName:s,...a})=>{P(n,i,s);const o=N(e=>e.setConfig);return t.useEffect(()=>o(a),[a,o]),e.jsx(e.Fragment,{children:r})},Y=({children:t,icon:r,tone:n="info",size:i="medium",progress:s,className:a=""})=>{const o=["Avada-Badge",(e=>{switch(e){case"critical":return"Avada-Badge--tone-critical";case"warning":return"Avada-Badge--tone-warning";case"attention":return"Avada-Badge--tone-attention";case"success":return"Avada-Badge--tone-success";case"new":return"Avada-Badge--tone-new";case"read-only":return"Avada-Badge--tone-read-only";case"enabled":return"Avada-Badge--tone-enabled";default:return"Avada-Badge--tone-info"}})(n),(e=>{switch(e){case"small":return"Avada-Badge--size-small";case"large":return"Avada-Badge--size-large";default:return"Avada-Badge--size-medium"}})(i),(e=>{if(!e)return"";switch(e){case"incomplete":return"Avada-Badge--progress-incomplete";case"partially-complete":return"Avada-Badge--progress-partially-complete";case"complete":return"Avada-Badge--progress-complete";default:return""}})(s),a].filter(Boolean).join(" ");return e.jsxs("span",{className:o,children:[s?e.jsx("span",{className:"Avada-Badge__Pip",children:e.jsx("span",{className:"Avada-Badge__Progress"})}):null,r?e.jsx("span",{className:"Avada-Badge__Icon",children:e.jsx(r,{})}):null,t?e.jsx("span",{className:"Avada-Badge__Text",children:t}):null]})},B=[{id:"all",content:"All",value:0},{id:"new-feature",content:"New feature",value:1},{id:"improvement",content:"Improvement",value:2},{id:"bug-report",content:"Bug report",value:3},{id:"submitted",content:"Submitted",value:4}],z=e=>e.replace(/(https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*))/gi,e=>`<a href="${e}" target="_blank" rel="noopener noreferrer" class="Avada-FeatureReq-Link">${e}</a>`),q=[{label:"New feature",value:"new-feature"},{label:"Bug report",value:"bug-report"},{label:"Improvement",value:"improvement"}],H={sort:"Most recent",status:"all",limit:10,lastDoc:null},G=["Doing","Considering","Completed"];function W({status:t}){switch(t){case"Considering":default:return e.jsx("p",{style:{color:"#616161",fontStyle:"italic"},children:t});case"Doing":return e.jsx("p",{style:{color:"#0094D5",fontStyle:"italic"},children:t});case"Completed":return e.jsx("p",{style:{color:"#29845A",fontStyle:"italic"},children:t})}}function U({type:t}){const{icon:r,tone:n}=(e=>{switch(e){case"new-feature":return{icon:s.StarIcon,tone:"success"};case"bug-report":return{icon:s.BugIcon,tone:"critical"};default:return{icon:s.CodeIcon,tone:"info"}}})(t);return e.jsx(Y,{icon:r,tone:n,children:e.jsx("p",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",margin:0},children:(e=>e.replace(/^([a-z])|-(\w)/g,(e,t,r)=>t?t.toUpperCase():" "+r.toLowerCase()))(t)})})}const V=["truongnn@avadagroup.com","tranggt@avadagroup.com"];e.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("circle",{cx:"2.5",cy:"3",r:"2.5",fill:"#CCCCCC"})});const $=()=>{const e=N(e=>e.setStage);return{goToStage:t.useCallback((t,r)=>{e(t,r)},[e]),navigateTo:t.useCallback(t=>{if(t.startsWith("/feature-request/create"))e("create");else{if(t.startsWith("/feature-request/details/")){const r=t.replace("/feature-request/details/","").split("?")[0],n=t.includes("openComment=true");return void e("details",{detailId:r,openComment:n})}e("home")}},[e])}},Z=async(e,t)=>{const{method:r="GET",body:n,headers:i,credentials:s="omit"}=t||{},a=await fetch((e=>/^https?:\/\//i.test(e)?e:`https://proxy-rrhtb7w6rq-as.a.run.app/proxy${e.startsWith("/")?e:`/${e}`}`)(e),{method:r,headers:{"Content-Type":"application/json",...i},credentials:s,body:n?JSON.stringify(n):void 0}),o=a.headers.get("content-type")||"",l=await(async()=>{if(204!==a.status){if(o.includes("application/json"))try{return await a.json()}catch{return}return await a.text()}})();if(!a.ok){const e="string"==typeof l?l:(null==l?void 0:l.message)||a.statusText;throw new Error(e)}return l},X=()=>{const[e,r]=t.useState(!1),[n,i]=t.useState(null);return{fetchApi:t.useCallback(async(e,t,n)=>{r(!0),i(null);try{if(n){const e=n();if(!1===e)throw new Error("Validation failed");if("string"==typeof e)throw new Error(e)}return await Z(e,t)}catch(e){throw i(e),e}finally{r(!1)}},[]),loading:e,error:n,resetError:t.useCallback(()=>i(null),[])}},Q={title:"",description:"",featureType:"new-feature",isAnonymous:!1,commentCount:0,voteCount:0,status:"Considering",likedUserIds:[]};function K({isFullPage:r=!0}){var n,s;const{fetchApi:a,loading:o,error:l,resetError:d}=X(),{navigateTo:c}=$(),u=N(e=>e.shopInfo),p=N(e=>e.appId),h=N(e=>e.fnAfterSubmit),[f,m]=t.useState(Q),[g,v]=t.useState(""),w=t.useMemo(()=>JSON.stringify(f)!==JSON.stringify(Q),[f]),y=(e,t)=>{d(),m(r=>({...r,[e]:t}))},b=e.jsxs(i.LegacyCard,{sectioned:!0,children:[e.jsxs(i.BlockStack,{gap:"300",children:[e.jsx(i.TextField,{label:"Title",value:f.title,onChange:e=>y("title",e),onFocus:()=>{d(),v("")},autoComplete:"off",placeholder:"Brief overview of your suggestion (e.g., Internal link suggestion)",error:(null===(n=null==l?void 0:l.message)||void 0===n?void 0:n.includes("Title"))?l.message:void 0}),e.jsx("div",{className:"Avada-CreateFeatureReq-Select",children:e.jsx(i.Select,{label:"Type",onFocus:()=>{v("")},options:q,onChange:e=>y("featureType",e),value:f.featureType})}),e.jsx(i.TextField,{label:"Description",value:f.description,onChange:e=>y("description",e),onFocus:()=>{d(),v("")},multiline:4,autoComplete:"off",placeholder:"Detailed explanation of your suggestion and how it benefits users",error:(null===(s=null==l?void 0:l.message)||void 0===s?void 0:s.includes("Description"))?l.message:void 0}),e.jsx(i.Checkbox,{onFocus:()=>{v("")},label:"Anonymous submit",checked:f.isAnonymous,onChange:e=>y("isAnonymous",e),helpText:"Hide your name from this submission"})]}),e.jsx(i.PageActions,{primaryAction:{content:"Submit",disabled:!w,loading:o,onAction(){v(""),(async()=>{try{const e=await a("/feature-requests",{body:{data:{...f,shopOwner:u.name,description:z(f.description.replace(/\n/g,"<br>")),appId:p,shopId:u.shopId||u.id}},method:"POST"},()=>f.title.trim()?!!f.description.trim()||"Description is required":"Title is required");(null==e?void 0:e.success)&&("function"==typeof h&&(null==h||h()),setTimeout(()=>{c(`/feature-request/details/${null==e?void 0:e.data.id}`)},200))}catch(e){console.error("error handleCreateFeatureReq: ",e),v(e instanceof Error?e.message:"Something went wrong")}})()}}}),e.jsx(i.Text,{as:"p",tone:"critical",variant:"bodyMd",alignment:"end",fontWeight:"medium",children:g||""})]}),S=r?e.jsx(i.Page,{backAction:{content:"Submit a request",onAction:()=>c("/feature-request")},title:"Back",children:b}):b;return e.jsx(i.AppProvider,{i18n:{},children:S})}const J=()=>e.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M13.0887 10.9855L13.5826 8.12963C13.706 7.41635 13.1574 6.76394 12.4343 6.76394H8.80758C8.44813 6.76394 8.17441 6.4413 8.23259 6.08619L8.69647 3.25499C8.77182 2.79504 8.7503 2.3244 8.63328 1.87327C8.53633 1.49955 8.24799 1.19946 7.86879 1.07765L7.76732 1.04505C7.53814 0.971426 7.28801 0.988558 7.07194 1.09268C6.83411 1.20728 6.66012 1.41631 6.59563 1.66492L6.26264 2.94862C6.15669 3.35706 6.00235 3.75132 5.80336 4.12383C5.51262 4.66812 5.06309 5.10372 4.59582 5.50639L3.5887 6.37424C3.30474 6.61894 3.15561 6.98539 3.18793 7.35908L3.75644 13.934C3.80859 14.537 4.3128 15 4.91744 15H8.17148C10.6084 15 12.6881 13.3021 13.0887 10.9855Z",fill:"#005BD3"}),e.jsx("path",{d:"M1 6.76394L1.68012 14.6295C1.69735 14.8287 1.54045 15 1.34069 15C1.15253 15 1 14.8473 1 14.6589V6.76394Z",fill:"#005BD3"}),e.jsx("path",{d:"M13.5826 8.12963L12.8436 8.00183L12.8436 8.00183L13.5826 8.12963ZM13.0887 10.9855L13.8278 11.1133L13.8278 11.1133L13.0887 10.9855ZM3.75644 13.934L3.00923 13.9986L3.00923 13.9986L3.75644 13.934ZM3.18793 7.35908L3.93514 7.29447L3.93514 7.29447L3.18793 7.35908ZM8.69647 3.25499L9.4366 3.37626L9.4366 3.37626L8.69647 3.25499ZM8.23259 6.08619L8.97273 6.20745L8.97273 6.20745L8.23259 6.08619ZM3.5887 6.37424L3.09911 5.80609L3.09911 5.80609L3.5887 6.37424ZM4.59582 5.50639L5.08541 6.07454L5.08541 6.07454L4.59582 5.50639ZM6.26264 2.94862L5.53667 2.7603L5.53667 2.7603L6.26264 2.94862ZM6.59563 1.66492L7.32161 1.85324L7.32161 1.85324L6.59563 1.66492ZM7.76732 1.04505L7.53793 1.75911L7.53793 1.75911L7.76732 1.04505ZM7.86879 1.07765L8.09819 0.363589L8.09818 0.363588L7.86879 1.07765ZM5.80336 4.12383L6.4649 4.4772L6.4649 4.4772L5.80336 4.12383ZM8.63328 1.87327L7.9073 2.06159L7.9073 2.06159L8.63328 1.87327ZM7.07194 1.09268L6.74636 0.417028L6.74636 0.417028L7.07194 1.09268ZM1.68012 14.6295L0.932907 14.6941L0.932907 14.6941L1.68012 14.6295ZM1 6.76394L1.74721 6.69933C1.71261 6.29919 1.36893 5.99732 0.967665 6.01464C0.566401 6.03195 0.25 6.3623 0.25 6.76394L1 6.76394ZM12.8436 8.00183L12.3497 10.8577L13.8278 11.1133L14.3216 8.25744L12.8436 8.00183ZM8.17148 14.25H4.91744V15.75H8.17148V14.25ZM4.50365 13.8693L3.93514 7.29447L2.44071 7.42369L3.00923 13.9986L4.50365 13.8693ZM12.3497 10.8577C12.0146 12.7954 10.2634 14.25 8.17148 14.25V15.75C10.9534 15.75 13.3616 13.8087 13.8278 11.1133L12.3497 10.8577ZM7.95633 3.13373L7.49246 5.96492L8.97273 6.20745L9.4366 3.37626L7.95633 3.13373ZM4.07829 6.9424L5.08541 6.07454L4.10622 4.93823L3.09911 5.80609L4.07829 6.9424ZM6.98861 3.13694L7.32161 1.85324L5.86966 1.4766L5.53667 2.7603L6.98861 3.13694ZM7.53793 1.75911L7.63941 1.79171L8.09818 0.363588L7.99671 0.330989L7.53793 1.75911ZM6.4649 4.4772C6.69158 4.05284 6.86765 3.60322 6.98861 3.13694L5.53667 2.7603C5.44572 3.1109 5.31312 3.44979 5.14183 3.77046L6.4649 4.4772ZM7.6394 1.79171C7.78331 1.83794 7.87732 1.946 7.9073 2.06159L9.35925 1.68495C9.19535 1.0531 8.71268 0.560995 8.09819 0.363589L7.6394 1.79171ZM7.32161 1.85324C7.32899 1.82478 7.35192 1.79029 7.39752 1.76832L6.74636 0.417028C6.31631 0.624261 5.99126 1.00785 5.86966 1.4766L7.32161 1.85324ZM7.39752 1.76832C7.43966 1.74801 7.49109 1.74406 7.53793 1.75911L7.99671 0.330989C7.5852 0.198792 7.13635 0.229102 6.74636 0.417028L7.39752 1.76832ZM8.80758 7.51394H12.4343V6.01394H8.80758V7.51394ZM2.42733 14.5649L1.74721 6.69933L0.252788 6.82855L0.932907 14.6941L2.42733 14.5649ZM1.75 14.6589V6.76394H0.25V14.6589H1.75ZM0.932907 14.6941C0.912333 14.4562 1.09983 14.25 1.34069 14.25V15.75C1.98106 15.75 2.48236 15.2013 2.42733 14.5649L0.932907 14.6941ZM9.4366 3.37626C9.52884 2.81326 9.5025 2.23717 9.35925 1.68495L7.9073 2.06159C7.99811 2.41163 8.01481 2.77683 7.95633 3.13373L9.4366 3.37626ZM4.91744 14.25C4.70267 14.25 4.52233 14.0854 4.50365 13.8693L3.00923 13.9986C3.09484 14.9887 3.92293 15.75 4.91744 15.75V14.25ZM5.08541 6.07454C5.565 5.66126 6.10518 5.15062 6.4649 4.4772L5.14183 3.77046C4.92006 4.18562 4.56118 4.54619 4.10622 4.93823L5.08541 6.07454ZM14.3216 8.25744C14.5241 7.08665 13.6237 6.01394 12.4343 6.01394V7.51394C12.6911 7.51394 12.8878 7.74604 12.8436 8.00183L14.3216 8.25744ZM1.34069 14.25C1.56755 14.25 1.75 14.4339 1.75 14.6589H0.25C0.25 15.2607 0.737517 15.75 1.34069 15.75V14.25ZM7.49246 5.96492C7.35964 6.77558 7.98451 7.51394 8.80758 7.51394V6.01394C8.91175 6.01394 8.98918 6.10702 8.97273 6.20745L7.49246 5.96492ZM3.93514 7.29447C3.92357 7.16065 3.977 7.02968 4.07829 6.9424L3.09911 5.80609C2.63247 6.20819 2.38766 6.81013 2.44071 7.42369L3.93514 7.29447Z",fill:"#005BD3"})]}),ee="STORE_ONBOARD",te="STORE_REVIEW",re="STORE_TEST",ne=["BR","DZ","MA","PK","PT","PL"],ie=["IN","PK"],se=({shopifyPlan:e})=>["trial","affiliate","partner_test","staff","staff_business"].includes(e),ae=e=>{if(!e)return e;const t={...e};return e.createdAt&&"function"==typeof e.createdAt.toDate&&(t.createdAt=e.createdAt.toDate()),e.updatedAt&&"function"==typeof e.updatedAt.toDate&&(t.updatedAt=e.updatedAt.toDate()),t};class oe{constructor(e){this.initialize(e)}initialize({db:e,shop:t,appId:r}){this.featureReqRef=n.collection(e,"featureReq"),this.commentFeatureReqRef=n.collection(e,"commentFeatureReq"),this.support=n.collection(e,"support"),this.featureReqUsers=n.collection(e,"featureReqUsers"),this.db=e,this.shopId=(null==t?void 0:t.shopId)||(null==t?void 0:t.id),this.appId=r,this.shop=t,this.data=[],this.activeSubscriptions=new Set}async subscribeToDocumentCounts(e,t){var r;try{if(!(null==t?void 0:t.id))return;const i=(null==t?void 0:t.featureType)?n.doc(this.featureReqRef,t.id):n.doc(this.commentFeatureReqRef,t.id),s=n.onSnapshot(i,r=>{if(r.exists()){const n=ae(r.data())||{},i={voteCount:n.voteCount||0,likedUserIds:n.likedUserIds||[]};(null==t?void 0:t.featureType)?e(e=>({...e||{},...i,commentCount:n.commentCount||0})):(null==t?void 0:t.replies)?e(e=>({...e||{},...i})):e(e=>({...e||{},...i,commentCount:n.repliesCount||0}))}});return null===(r=this.activeSubscriptions)||void 0===r||r.add(s),()=>{var e;s(),null===(e=this.activeSubscriptions)||void 0===e||e.delete(s)}}catch(e){console.error("Error getting document:",e)}}async toggleVote({targetId:e,shopId:t,byFeatureReq:r}){try{const i=r?n.doc(this.featureReqRef,e):n.doc(this.commentFeatureReqRef,e),s=await n.getDoc(i);if(s.exists()){const e=s.data(),r=(e.likedUserIds||[]).includes(t),a=r?-1:1,o=r?n.arrayRemove(t):n.arrayUnion(t);return await n.updateDoc(i,{voteCount:n.increment(a),likedUserIds:o}),!r}console.error("Document does not exist:",e)}catch(e){console.error("Error voting like:",e)}}async subscribeToComments(e,t){try{if(!e)return void("function"==typeof t&&t([]));const r=n.query(this.commentFeatureReqRef,n.where("parentId","==",e),n.orderBy("createdAt","asc")),i=n.onSnapshot(r,e=>{if("function"!=typeof t)return;const r=e.docs.map(e=>{const t=e.data();return t.createdAt&&t.createdAt.toDate&&(t.createdAt=t.createdAt.toDate().toISOString()),{id:e.id,...t}});t(r)});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){console.error("subscribeToComments",e),"function"==typeof t&&t([])}}cleanup(){this.activeSubscriptions.forEach(e=>{"function"==typeof e&&e()}),this.activeSubscriptions.clear()}subscribeTrendingRequests(e,t=10){try{if(!this.appId)return e({data:[]}),()=>{};const r=n.query(this.featureReqRef,n.where("appId","==",this.appId),n.orderBy("createdAt","desc")),i=n.onSnapshot(r,r=>{if("function"==typeof e)if(r.empty)e({data:[]});else{const n=new Date,i=r.docs.map(e=>{const t={...ae(e.data()),id:e.id},r=new Date(t.createdAt),i=Math.max((n.getTime()-r.getTime())/864e5,1),s=(1*t.voteCount+2*t.commentCount)/i;return{...t,score:s}}).sort((e,t)=>(t.score||0)-(e.score||0)).slice(0,t);e({data:i})}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(t){return console.error("Error getting trending feature requests:",t),"function"==typeof e&&e({data:[]}),()=>{}}}subscribeFeatureRequests(e,t=H){var r;try{if(console.log(t),!this.appId)return e({data:[],lastDoc:null}),()=>{};let i=n.query(this.featureReqRef,n.where("appId","==",this.appId));["new-feature","improvement","bug-report"].includes(t.status)&&(i=n.query(i,n.where("featureType","==",t.status))),"submitted"===t.status&&(console.log("=========>",this.shopId),i=n.query(i,n.where("shopId","==",this.shopId))),"Most recent"===t.sort?i=n.query(i,n.orderBy("createdAt","desc")):"Top Voted"===t.sort&&(i=n.query(i,n.orderBy("voteCount","desc"))),i=n.query(i,n.limit(parseInt((null===(r=t.limit)||void 0===r?void 0:r.toString())||"0"))),t.lastDoc&&(i=n.query(i,n.startAfter(t.lastDoc)));const s=n.onSnapshot(i,t=>{if("function"==typeof e)if(t.empty)e({data:[],lastDoc:null});else{const r=t.docs[t.docs.length-1],n=t.docs.map(e=>({...ae(e.data()),id:e.id}));e({data:n,lastDoc:r})}},t=>{console.error("Error in snapshot listener:",t),e({data:[],lastDoc:null})});return this.activeSubscriptions.add(s),()=>{s(),this.activeSubscriptions.delete(s)}}catch(t){return console.error("Error getting feature requests:",t),"function"==typeof e&&e({data:[],lastDoc:null}),()=>{}}}subscribeFeatureRequest(e,t){try{if(!e)return()=>{};if(""===e.trim())return console.warn("Invalid or empty ID passed to subscribeFeatureRequest:",e),"function"==typeof t&&t({}),()=>{};const r=n.doc(this.featureReqRef,e),i=n.onSnapshot(r,r=>{if("function"==typeof t)if(r.exists()){const e={...ae(r.data()),id:r.id};t(e)}else console.log(`Feature request with ID ${e} not found`),t({})});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting feature request by ID:",e),"function"==typeof t&&t({}),()=>{}}}async removeFeatureRequest(e){try{if(!e)throw new Error("ID is required to delete feature request");const t=n.writeBatch(this.db),r=async(e,t,r)=>{const i=n.query(e,n.where(t,"==",r));return(await n.getDocs(i)).docs},i=await r(this.commentFeatureReqRef,"parentId",e),s=await Promise.all(i.map(e=>r(this.commentFeatureReqRef,"parentId",e.id))).then(e=>e.flat());[n.doc(this.featureReqRef,e),...i.map(e=>e.ref),...s.map(e=>e.ref)].forEach(e=>t.delete(e)),await t.commit()}catch(e){throw console.error("Error deleting feature request and related data:",e),e}}async updateFeatureRequest(e,t){try{if(!e)throw new Error("ID is required to update feature request");if(!t||"object"!=typeof t)throw new Error("Update data must be an object");const r=n.doc(this.featureReqRef,e);return await n.updateDoc(r,t),{success:!0,message:"Feature request updated successfully"}}catch(e){throw console.error("Error updating feature request:",e),e}}async removeComment(e,t){try{if(!e||!t)return;const r=n.doc(this.commentFeatureReqRef,e),i=await n.getDoc(r);if(!i.exists())return;const s=ae(i.data());if(!s||(null==s?void 0:s.shopId)!==t)return;const a=n.writeBatch(this.db),o=s.parentId;if(s.replies)a.update(n.doc(this.commentFeatureReqRef,o),{repliesCount:n.increment(-1)}),a.delete(r);else{(await n.getDocs(n.query(this.commentFeatureReqRef,n.where("parentId","==",e)))).docs.forEach(e=>a.delete(e.ref)),a.update(n.doc(this.featureReqRef,o),{commentCount:n.increment(-1)}),a.delete(r)}await a.commit()}catch(e){console.error("Error deleting comment:",e)}}subscribeSupport(e,t){try{if(!e)return()=>{};const r=n.query(this.support,n.where("shopId","==",e)),i=n.onSnapshot(r,e=>{if("function"==typeof t)if(e.empty)t({});else{const r=e.docs[0],n={...ae(r.data())||{},id:r.id};t(n)}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting support document by shopId:",e),"function"==typeof t&&t({}),()=>{}}}subscribeFeatureReqUser(e,t){try{if(!e||!this.appId)return()=>{};const r=n.query(this.featureReqUsers,n.where("shopId","==",e),n.where("appId","==",this.appId),n.limit(1)),i=n.onSnapshot(r,e=>{if("function"==typeof t)if(e.empty)t({});else{const r=e.docs[0],n={...ae(r.data())||{},id:r.id};t(n)}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting feature request user:",e),"function"==typeof t&&t({}),()=>{}}}}const le=()=>{const e=N(e=>e.shopInfo),r=N(e=>e.appId),n=N(e=>e.fnAfterLike),i=t.useMemo(()=>((e=D)=>P(void 0,void 0,e).db)(),[]),s=t.useMemo(()=>new oe({db:i,shop:e,appId:r}),[i,e,r]),[a,o]=t.useState(null),[l,d]=t.useState(!0),[c,u]=t.useState([]),[p,h]=t.useState({data:[],lastDoc:null}),[f,m]=t.useState(H),[g,v]=t.useState(!1),[w,y]=t.useState(!1),[b,S]=t.useState({featureRequestCount:0}),[x,_]=t.useState({}),A=t.useRef(null),T=t.useMemo(()=>!!V.includes(e.email)||![ee,re,te].includes((({countMonthCreateShop:e=3,country:t="US",shopifyPlan:r="",plan:n="free"})=>se({shopifyPlan:r})?re:e<3?ee:"free"!==n?"STORE_PRO":ie.includes(t)?"STORE_NOT_POTENTIAL":ne.includes(t)?te:e>3&&e<6&&!ie.includes(t)?"STORE_POTENTIAL":e<=12?"STORE_GROWING":"STORE_OLD")(e)),[e]),E=t.useCallback(e=>{m(t=>({...t,...e,lastDoc:e.sort||e.status?null:e.lastDoc}))},[]);t.useEffect(()=>{let e;return(async()=>{try{e=s.subscribeTrendingRequests(e=>{u(e.data)})}catch(e){console.error("Error fetching trending features:",e)}})().catch(console.error),()=>{e&&e()}},[s]),t.useEffect(()=>{let e;return(async()=>{try{f.lastDoc||d(!0),e=s.subscribeFeatureRequests(e=>{h(t=>({data:f.lastDoc?[...t.data,...e.data]:e.data,lastDoc:e.lastDoc})),d(!1),v(!1)},f)}catch(e){console.error("Error fetching feature requests:",e),d(!1),v(!1)}})().catch(console.error),()=>{e&&e()}},[s,f]);const C=t.useCallback(async()=>{if(p.lastDoc&&!g)try{v(!0),m(e=>({...e,lastDoc:p.lastDoc}))}catch(e){console.error(e),v(!1)}},[p.lastDoc,g]),k=t.useCallback(async e=>{d(!0);try{const t=await s.subscribeToDocumentCounts(o,e);return d(!1),t}catch(e){return d(!1),void console.error("Error fetching feature requests:",e)}},[s]),M=t.useCallback(async({parentId:t,replies:n,value:i})=>{if(t&&i.trim()&&r&&((null==e?void 0:e.shopId)||(null==e?void 0:e.id))){y(!0);try{const s=z(i.replace(/\n/g,"<br>"));await Z("/feature-requests/comments",{method:"POST",body:{data:{content:s,parentId:t,appId:r,shopId:e.shopId||e.id,replies:n,shopOwner:e.shopOwner,isTeamAvada:(e.email||"").endsWith("@avadagroup.com")}}})}finally{y(!1),(()=>{try{$crisp.push(["do","chat:open"])}catch(e){console.log("Cannot send open crisp modal")}})()}}},[r,e]),L=t.useCallback(async({targetId:e,shopId:t,byFeatureReq:r})=>{try{const i=await s.toggleVote({targetId:e,shopId:t,byFeatureReq:r});"function"==typeof n&&"boolean"==typeof i&&n()}catch(e){console.error("Error handleVoteLike:",e)}},[s,n]),O=t.useCallback((e,t)=>!(!e||!t)&&(Array.isArray(e.likedUserIds)&&e.likedUserIds.includes(t)),[]),R=t.useCallback(async(e,t)=>{try{if(!e)return;return await s.subscribeToComments(e,t)}catch(e){return void console.error("Error fetching all comments:",e)}},[s]),I=t.useCallback(async e=>{try{if(!e)return;await s.removeFeatureRequest(e)}catch(e){console.error("Error removeFeatureRequest:",e)}finally{m(e=>({...e}))}},[s]),F=t.useCallback(async t=>{if(t)try{await s.removeComment(t,e.shopId)}catch(e){console.error("Error removeComment:",e)}},[s,e.shopId]),j=t.useCallback(async(e,t)=>{try{if(!e)return;await s.updateFeatureRequest(e,t)}catch(e){console.error("Error updateFeatureRequest:",e)}},[s]),Y=t.useCallback(async(e,t)=>{try{return e&&""!==e.trim()?s.subscribeFeatureRequest(e,e=>{t(e)}):(console.warn("Invalid feature request ID provided:",e),void t({}))}catch(e){return console.error("Error getting feature request by ID:",e),void t({})}},[s]),B=t.useCallback(async e=>{try{if(!e)return;return s.subscribeSupport(e,e=>{S(e)})}catch(e){return void console.error("Error getting support document by ID:",e)}},[s]),q=t.useCallback(async e=>{try{if(!e)return;return s.subscribeFeatureReqUser(e,t=>{const r=t;_(t=>({...t,[e]:r}))})}catch(e){return void console.error("Error getting feature request user by shopId:",e)}},[s]);return t.useEffect(()=>{const t=(null==e?void 0:e.shopId)||(null==e?void 0:e.id);if(A.current&&(A.current(),A.current=null),t)return q(t).then(e=>{"function"==typeof e&&(A.current=e)}).catch(e=>console.error("Error subscribing to current user profile:",e)),()=>{A.current&&(A.current(),A.current=null)}},[null==e?void 0:e.id,null==e?void 0:e.shopId,q]),{checkRuleSubmit:T,updateQuery:E,queryParams:f,data:a,subscribeToDocumentCounts:k,loading:l,handleVoteLike:L,checkUserLiked:O,subscribeToComments:R,updateFeatureRequest:j,dataFeatureTrending:c,featureRequests:p.data,hasMore:!!p.lastDoc,loadMore:C,subscribeFeatureRequest:Y,subscribeSupport:B,subscribeFeatureReqUser:q,dataShopSupport:b,featureReqUsers:x,loadingMore:g,removeFeatureRequest:I,removeComment:F,loadingComment:w,handleComment:M}};var de=t.memo(({dataQuery:r,byFeatureReq:n=!0,handleComment:a,isReply:o=!1})=>{const{handleVoteLike:l,subscribeToDocumentCounts:d,data:c,checkUserLiked:u,featureReqUsers:p}=le(),h=N(e=>e.shopInfo),f=(null==h?void 0:h.shopId)||(null==h?void 0:h.id)||"",m=null==p?void 0:p[f],g=null==m?void 0:m.isUserBlocked;t.useEffect(()=>{let e;return(null==r?void 0:r.id)&&(async()=>{try{const t={id:null==r?void 0:r.id,featureType:n,replies:o},i=await d(t);e="function"==typeof i?i:void 0}catch(e){console.error("Error initializing subscriptions:",e)}})().catch(console.error),()=>{"function"==typeof e&&e()}},[null==r?void 0:r.id,n,o,d]);const v=t.useMemo(()=>u(c,h.shopId),[c,h.shopId,u]);return e.jsxs("div",{onClick:e=>e.stopPropagation(),className:"Avada-FeatureReq-Action "+(n?"":"Avada-FeatureReq-ActionComment"),children:[e.jsx(i.Tag,{onClick:()=>{f&&l({targetId:null==r?void 0:r.id,shopId:f,byFeatureReq:n})},children:n?e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx("span",{children:(null==r?void 0:r.voteCount)||0}),v?e.jsx(i.Icon,{source:J}):e.jsx(i.Icon,{source:s.ThumbsUpIcon})]}):e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[v?e.jsx(i.Icon,{source:J}):e.jsx(i.Icon,{source:s.ThumbsUpIcon}),e.jsxs("span",{children:[(null==r?void 0:r.voteCount)||0," ",(null==r?void 0:r.voteCount)>1?"likes":"like"]})]})}),!o&&e.jsx(i.Tag,{onClick:()=>a(),disabled:g,children:n?e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx("span",{children:null==r?void 0:r.commentCount}),e.jsx(i.Icon,{source:s.ChatIcon})]}):e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx(i.Icon,{source:s.ChatIcon}),e.jsxs("span",{children:[(null==r?void 0:r.commentCount)||0," ",(null==r?void 0:r.commentCount)>1?"Replies":"Reply"]})]})})]})});
28
+ */"production"===process.env.NODE_ENV?u.exports=function(){if(v)return p;v=1;var e=t,r=y(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;return p.useSyncExternalStoreWithSelector=function(e,t,r,d,c){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=o(function(){function e(e){if(!a){if(a=!0,i=e,e=d(e),void 0!==c&&p.hasValue){var t=p.value;if(c(t,e))return s=t}return s=e}if(t=s,n(i,e))return t;var r=d(e);return void 0!==c&&c(t,r)?(i=e,t):(i=e,s=r)}var i,s,a=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,d,c]);var h=i(e,u[0],u[1]);return a(function(){p.hasValue=!0,p.value=h},[h]),l(h),h},p}():u.exports=(b||(b=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,r=y(),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useSyncExternalStore,s=e.useRef,a=e.useEffect,o=e.useMemo,l=e.useDebugValue;S.useSyncExternalStoreWithSelector=function(e,t,r,d,c){var u=s(null);if(null===u.current){var p={hasValue:!1,value:null};u.current=p}else p=u.current;u=o(function(){function e(e){if(!a){if(a=!0,i=e,e=d(e),void 0!==c&&p.hasValue){var t=p.value;if(c(t,e))return s=t}return s=e}if(t=s,n(i,e))return t;var r=d(e);return void 0!==c&&c(t,r)?(i=e,t):(i=e,s=r)}var i,s,a=!1,o=void 0===r?null:r;return[function(){return e(t())},null===o?void 0:function(){return e(o())}]},[t,r,d,c]);var h=i(e,u[0],u[1]);return a(function(){p.hasValue=!0,p.value=h},[h]),l(h),h},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),S);var x=d(u.exports);const{useDebugValue:_}=t,{useSyncExternalStoreWithSelector:A}=x;let T=!1;const E=e=>e;const C=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?l(e):l)(e):e,r=(e,r)=>function(e,t=E,r){r&&!T&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),T=!0);const n=A(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return _(n),n}(t,e,r);return Object.assign(r,t),r},k=["anhth@avada.io","anhnt@avada.io","sam@avada.io","lamln@avadagroup.com","nghiavt@avadagroup.com","nghiavt@avada.email","anhth01@avadagroup.com","truongnn@avadagroup.com","tranggt@avadagroup.com"],M=e=>k.includes(e),D="avada-feature-request";let L=null,O=null;const R=(e,t,n=D)=>{if(L)return L;if(t)return L=t,L;const i=r.getApps().find(e=>e.name===n);if(i)return L=i,L;if(!e)throw new Error(`Firebase config is required to initialize app "${n}". Pass firebaseConfig or firebaseApp to FeatureRequestProvider.`);return L=r.initializeApp(e,n),L},P=(e,t,r=D)=>{const i=R(e,t,r);return O||(O=n.getFirestore(i)),{app:i,db:O}},I={shopId:"",email:""},N=(F=e=>({appId:"",shopInfo:I,isAdmin:!1,isHydrated:!1,fnAfterSubmit:void 0,fnAfterLike:void 0,stage:"home",detailId:void 0,openComment:!1,setStage:(t,r)=>{var n;e({stage:t,detailId:null==r?void 0:r.detailId,openComment:null!==(n=null==r?void 0:r.openComment)&&void 0!==n&&n})},setConfig:t=>{const r={...I,...t.activeShop};e({appId:t.appId||"",shopInfo:r,fnAfterSubmit:t.fnAfterSubmit,fnAfterLike:t.fnAfterLike,isAdmin:M(r.email),isHydrated:!0})}}))?C(F):C;var F;const j=({children:r,firebaseConfig:n,firebaseApp:i,firebaseAppName:s,...a})=>{P(n,i,s);const o=N(e=>e.setConfig);return t.useEffect(()=>o(a),[a,o]),e.jsx(e.Fragment,{children:r})},Y=({children:t,icon:r,tone:n="info",size:i="medium",progress:s,className:a=""})=>{const o=["Avada-Badge",(e=>{switch(e){case"critical":return"Avada-Badge--tone-critical";case"warning":return"Avada-Badge--tone-warning";case"attention":return"Avada-Badge--tone-attention";case"success":return"Avada-Badge--tone-success";case"new":return"Avada-Badge--tone-new";case"read-only":return"Avada-Badge--tone-read-only";case"enabled":return"Avada-Badge--tone-enabled";default:return"Avada-Badge--tone-info"}})(n),(e=>{switch(e){case"small":return"Avada-Badge--size-small";case"large":return"Avada-Badge--size-large";default:return"Avada-Badge--size-medium"}})(i),(e=>{if(!e)return"";switch(e){case"incomplete":return"Avada-Badge--progress-incomplete";case"partially-complete":return"Avada-Badge--progress-partially-complete";case"complete":return"Avada-Badge--progress-complete";default:return""}})(s),a].filter(Boolean).join(" ");return e.jsxs("span",{className:o,children:[s?e.jsx("span",{className:"Avada-Badge__Pip",children:e.jsx("span",{className:"Avada-Badge__Progress"})}):null,r?e.jsx("span",{className:"Avada-Badge__Icon",children:e.jsx(r,{})}):null,t?e.jsx("span",{className:"Avada-Badge__Text",children:t}):null]})},B=[{id:"all",content:"All",value:0},{id:"new-feature",content:"New feature",value:1},{id:"improvement",content:"Improvement",value:2},{id:"bug-report",content:"Bug report",value:3},{id:"submitted",content:"Submitted",value:4}],z=e=>e.replace(/(https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&//=]*))/gi,e=>`<a href="${e}" target="_blank" rel="noopener noreferrer" class="Avada-FeatureReq-Link">${e}</a>`),q=[{label:"New feature",value:"new-feature"},{label:"Bug report",value:"bug-report"},{label:"Improvement",value:"improvement"}],H={sort:"Most recent",status:"all",limit:10,lastDoc:null},G=["Doing","Considering","Completed"];function W({status:t}){switch(t){case"Considering":default:return e.jsx("p",{style:{color:"#616161",fontStyle:"italic"},children:t});case"Doing":return e.jsx("p",{style:{color:"#0094D5",fontStyle:"italic"},children:t});case"Completed":return e.jsx("p",{style:{color:"#29845A",fontStyle:"italic"},children:t})}}function U({type:t}){const{icon:r,tone:n}=(e=>{switch(e){case"new-feature":return{icon:s.StarIcon,tone:"success"};case"bug-report":return{icon:s.BugIcon,tone:"critical"};default:return{icon:s.CodeIcon,tone:"info"}}})(t);return e.jsx(Y,{icon:r,tone:n,children:e.jsx("p",{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",margin:0},children:(e=>e.replace(/^([a-z])|-(\w)/g,(e,t,r)=>t?t.toUpperCase():" "+r.toLowerCase()))(t)})})}const V=["truongnn@avadagroup.com","tranggt@avadagroup.com"];e.jsx("svg",{width:"5",height:"6",viewBox:"0 0 5 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("circle",{cx:"2.5",cy:"3",r:"2.5",fill:"#CCCCCC"})});const $=()=>{const e=N(e=>e.setStage);return{goToStage:t.useCallback((t,r)=>{e(t,r)},[e]),navigateTo:t.useCallback(t=>{if(t.startsWith("/feature-request/create"))e("create");else{if(t.startsWith("/feature-request/details/")){const r=t.replace("/feature-request/details/","").split("?")[0],n=t.includes("openComment=true");return void e("details",{detailId:r,openComment:n})}e("home")}},[e])}},Z=async(e,t)=>{const{method:r="GET",body:n,headers:i,credentials:s="omit"}=t||{},a=await fetch((e=>/^https?:\/\//i.test(e)?e:`https://avada-review-counter.web.app/proxy${e.startsWith("/")?e:`/${e}`}`)(e),{method:r,headers:{"Content-Type":"application/json",...i},credentials:s,body:n?JSON.stringify(n):void 0}),o=a.headers.get("content-type")||"",l=await(async()=>{if(204!==a.status){if(o.includes("application/json"))try{return await a.json()}catch{return}return await a.text()}})();if(!a.ok){const e="string"==typeof l?l:(null==l?void 0:l.message)||a.statusText;throw new Error(e)}return l},X=()=>{const[e,r]=t.useState(!1),[n,i]=t.useState(null);return{fetchApi:t.useCallback(async(e,t,n)=>{r(!0),i(null);try{if(n){const e=n();if(!1===e)throw new Error("Validation failed");if("string"==typeof e)throw new Error(e)}return await Z(e,t)}catch(e){throw i(e),e}finally{r(!1)}},[]),loading:e,error:n,resetError:t.useCallback(()=>i(null),[])}},Q={title:"",description:"",featureType:"new-feature",isAnonymous:!1,commentCount:0,voteCount:0,status:"Considering",likedUserIds:[]};function K({isFullPage:r=!0}){var n,s;const{fetchApi:a,loading:o,error:l,resetError:d}=X(),{navigateTo:c}=$(),u=N(e=>e.shopInfo),p=N(e=>e.appId),h=N(e=>e.fnAfterSubmit),[f,m]=t.useState(Q),[g,v]=t.useState(""),w=t.useMemo(()=>JSON.stringify(f)!==JSON.stringify(Q),[f]),y=(e,t)=>{d(),m(r=>({...r,[e]:t}))},b=e.jsxs(i.LegacyCard,{sectioned:!0,children:[e.jsxs(i.BlockStack,{gap:"300",children:[e.jsx(i.TextField,{label:"Title",value:f.title,onChange:e=>y("title",e),onFocus:()=>{d(),v("")},autoComplete:"off",placeholder:"Brief overview of your suggestion (e.g., Internal link suggestion)",error:(null===(n=null==l?void 0:l.message)||void 0===n?void 0:n.includes("Title"))?l.message:void 0}),e.jsx("div",{className:"Avada-CreateFeatureReq-Select",children:e.jsx(i.Select,{label:"Type",onFocus:()=>{v("")},options:q,onChange:e=>y("featureType",e),value:f.featureType})}),e.jsx(i.TextField,{label:"Description",value:f.description,onChange:e=>y("description",e),onFocus:()=>{d(),v("")},multiline:4,autoComplete:"off",placeholder:"Detailed explanation of your suggestion and how it benefits users",error:(null===(s=null==l?void 0:l.message)||void 0===s?void 0:s.includes("Description"))?l.message:void 0}),e.jsx(i.Checkbox,{onFocus:()=>{v("")},label:"Anonymous submit",checked:f.isAnonymous,onChange:e=>y("isAnonymous",e),helpText:"Hide your name from this submission"})]}),e.jsx(i.PageActions,{primaryAction:{content:"Submit",disabled:!w,loading:o,onAction(){v(""),(async()=>{try{const e=await a("/feature-requests",{body:{data:{...f,shopOwner:u.name,description:z(f.description.replace(/\n/g,"<br>")),appId:p,shopId:u.shopId||u.id}},method:"POST"},()=>f.title.trim()?!!f.description.trim()||"Description is required":"Title is required");(null==e?void 0:e.success)&&("function"==typeof h&&(null==h||h()),setTimeout(()=>{c(`/feature-request/details/${null==e?void 0:e.data.id}`)},200))}catch(e){console.error("error handleCreateFeatureReq: ",e),v(e instanceof Error?e.message:"Something went wrong")}})()}}}),e.jsx(i.Text,{as:"p",tone:"critical",variant:"bodyMd",alignment:"end",fontWeight:"medium",children:g||""})]}),S=r?e.jsx(i.Page,{backAction:{content:"Submit a request",onAction:()=>c("/feature-request")},title:"Back",children:b}):b;return e.jsx(i.AppProvider,{i18n:{},children:S})}const J=()=>e.jsxs("svg",{width:"15",height:"16",viewBox:"0 0 15 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M13.0887 10.9855L13.5826 8.12963C13.706 7.41635 13.1574 6.76394 12.4343 6.76394H8.80758C8.44813 6.76394 8.17441 6.4413 8.23259 6.08619L8.69647 3.25499C8.77182 2.79504 8.7503 2.3244 8.63328 1.87327C8.53633 1.49955 8.24799 1.19946 7.86879 1.07765L7.76732 1.04505C7.53814 0.971426 7.28801 0.988558 7.07194 1.09268C6.83411 1.20728 6.66012 1.41631 6.59563 1.66492L6.26264 2.94862C6.15669 3.35706 6.00235 3.75132 5.80336 4.12383C5.51262 4.66812 5.06309 5.10372 4.59582 5.50639L3.5887 6.37424C3.30474 6.61894 3.15561 6.98539 3.18793 7.35908L3.75644 13.934C3.80859 14.537 4.3128 15 4.91744 15H8.17148C10.6084 15 12.6881 13.3021 13.0887 10.9855Z",fill:"#005BD3"}),e.jsx("path",{d:"M1 6.76394L1.68012 14.6295C1.69735 14.8287 1.54045 15 1.34069 15C1.15253 15 1 14.8473 1 14.6589V6.76394Z",fill:"#005BD3"}),e.jsx("path",{d:"M13.5826 8.12963L12.8436 8.00183L12.8436 8.00183L13.5826 8.12963ZM13.0887 10.9855L13.8278 11.1133L13.8278 11.1133L13.0887 10.9855ZM3.75644 13.934L3.00923 13.9986L3.00923 13.9986L3.75644 13.934ZM3.18793 7.35908L3.93514 7.29447L3.93514 7.29447L3.18793 7.35908ZM8.69647 3.25499L9.4366 3.37626L9.4366 3.37626L8.69647 3.25499ZM8.23259 6.08619L8.97273 6.20745L8.97273 6.20745L8.23259 6.08619ZM3.5887 6.37424L3.09911 5.80609L3.09911 5.80609L3.5887 6.37424ZM4.59582 5.50639L5.08541 6.07454L5.08541 6.07454L4.59582 5.50639ZM6.26264 2.94862L5.53667 2.7603L5.53667 2.7603L6.26264 2.94862ZM6.59563 1.66492L7.32161 1.85324L7.32161 1.85324L6.59563 1.66492ZM7.76732 1.04505L7.53793 1.75911L7.53793 1.75911L7.76732 1.04505ZM7.86879 1.07765L8.09819 0.363589L8.09818 0.363588L7.86879 1.07765ZM5.80336 4.12383L6.4649 4.4772L6.4649 4.4772L5.80336 4.12383ZM8.63328 1.87327L7.9073 2.06159L7.9073 2.06159L8.63328 1.87327ZM7.07194 1.09268L6.74636 0.417028L6.74636 0.417028L7.07194 1.09268ZM1.68012 14.6295L0.932907 14.6941L0.932907 14.6941L1.68012 14.6295ZM1 6.76394L1.74721 6.69933C1.71261 6.29919 1.36893 5.99732 0.967665 6.01464C0.566401 6.03195 0.25 6.3623 0.25 6.76394L1 6.76394ZM12.8436 8.00183L12.3497 10.8577L13.8278 11.1133L14.3216 8.25744L12.8436 8.00183ZM8.17148 14.25H4.91744V15.75H8.17148V14.25ZM4.50365 13.8693L3.93514 7.29447L2.44071 7.42369L3.00923 13.9986L4.50365 13.8693ZM12.3497 10.8577C12.0146 12.7954 10.2634 14.25 8.17148 14.25V15.75C10.9534 15.75 13.3616 13.8087 13.8278 11.1133L12.3497 10.8577ZM7.95633 3.13373L7.49246 5.96492L8.97273 6.20745L9.4366 3.37626L7.95633 3.13373ZM4.07829 6.9424L5.08541 6.07454L4.10622 4.93823L3.09911 5.80609L4.07829 6.9424ZM6.98861 3.13694L7.32161 1.85324L5.86966 1.4766L5.53667 2.7603L6.98861 3.13694ZM7.53793 1.75911L7.63941 1.79171L8.09818 0.363588L7.99671 0.330989L7.53793 1.75911ZM6.4649 4.4772C6.69158 4.05284 6.86765 3.60322 6.98861 3.13694L5.53667 2.7603C5.44572 3.1109 5.31312 3.44979 5.14183 3.77046L6.4649 4.4772ZM7.6394 1.79171C7.78331 1.83794 7.87732 1.946 7.9073 2.06159L9.35925 1.68495C9.19535 1.0531 8.71268 0.560995 8.09819 0.363589L7.6394 1.79171ZM7.32161 1.85324C7.32899 1.82478 7.35192 1.79029 7.39752 1.76832L6.74636 0.417028C6.31631 0.624261 5.99126 1.00785 5.86966 1.4766L7.32161 1.85324ZM7.39752 1.76832C7.43966 1.74801 7.49109 1.74406 7.53793 1.75911L7.99671 0.330989C7.5852 0.198792 7.13635 0.229102 6.74636 0.417028L7.39752 1.76832ZM8.80758 7.51394H12.4343V6.01394H8.80758V7.51394ZM2.42733 14.5649L1.74721 6.69933L0.252788 6.82855L0.932907 14.6941L2.42733 14.5649ZM1.75 14.6589V6.76394H0.25V14.6589H1.75ZM0.932907 14.6941C0.912333 14.4562 1.09983 14.25 1.34069 14.25V15.75C1.98106 15.75 2.48236 15.2013 2.42733 14.5649L0.932907 14.6941ZM9.4366 3.37626C9.52884 2.81326 9.5025 2.23717 9.35925 1.68495L7.9073 2.06159C7.99811 2.41163 8.01481 2.77683 7.95633 3.13373L9.4366 3.37626ZM4.91744 14.25C4.70267 14.25 4.52233 14.0854 4.50365 13.8693L3.00923 13.9986C3.09484 14.9887 3.92293 15.75 4.91744 15.75V14.25ZM5.08541 6.07454C5.565 5.66126 6.10518 5.15062 6.4649 4.4772L5.14183 3.77046C4.92006 4.18562 4.56118 4.54619 4.10622 4.93823L5.08541 6.07454ZM14.3216 8.25744C14.5241 7.08665 13.6237 6.01394 12.4343 6.01394V7.51394C12.6911 7.51394 12.8878 7.74604 12.8436 8.00183L14.3216 8.25744ZM1.34069 14.25C1.56755 14.25 1.75 14.4339 1.75 14.6589H0.25C0.25 15.2607 0.737517 15.75 1.34069 15.75V14.25ZM7.49246 5.96492C7.35964 6.77558 7.98451 7.51394 8.80758 7.51394V6.01394C8.91175 6.01394 8.98918 6.10702 8.97273 6.20745L7.49246 5.96492ZM3.93514 7.29447C3.92357 7.16065 3.977 7.02968 4.07829 6.9424L3.09911 5.80609C2.63247 6.20819 2.38766 6.81013 2.44071 7.42369L3.93514 7.29447Z",fill:"#005BD3"})]}),ee="STORE_ONBOARD",te="STORE_REVIEW",re="STORE_TEST",ne=["BR","DZ","MA","PK","PT","PL"],ie=["IN","PK"],se=({shopifyPlan:e})=>["trial","affiliate","partner_test","staff","staff_business"].includes(e),ae=e=>{if(!e)return e;const t={...e};return e.createdAt&&"function"==typeof e.createdAt.toDate&&(t.createdAt=e.createdAt.toDate()),e.updatedAt&&"function"==typeof e.updatedAt.toDate&&(t.updatedAt=e.updatedAt.toDate()),t};class oe{constructor(e){this.initialize(e)}initialize({db:e,shop:t,appId:r}){this.featureReqRef=n.collection(e,"featureReq"),this.commentFeatureReqRef=n.collection(e,"commentFeatureReq"),this.support=n.collection(e,"support"),this.featureReqUsers=n.collection(e,"featureReqUsers"),this.db=e,this.shopId=(null==t?void 0:t.shopId)||(null==t?void 0:t.id),this.appId=r,this.shop=t,this.data=[],this.activeSubscriptions=new Set}async subscribeToDocumentCounts(e,t){var r;try{if(!(null==t?void 0:t.id))return;const i=(null==t?void 0:t.featureType)?n.doc(this.featureReqRef,t.id):n.doc(this.commentFeatureReqRef,t.id),s=n.onSnapshot(i,r=>{if(r.exists()){const n=ae(r.data())||{},i={voteCount:n.voteCount||0,likedUserIds:n.likedUserIds||[]};(null==t?void 0:t.featureType)?e(e=>({...e||{},...i,commentCount:n.commentCount||0})):(null==t?void 0:t.replies)?e(e=>({...e||{},...i})):e(e=>({...e||{},...i,commentCount:n.repliesCount||0}))}});return null===(r=this.activeSubscriptions)||void 0===r||r.add(s),()=>{var e;s(),null===(e=this.activeSubscriptions)||void 0===e||e.delete(s)}}catch(e){console.error("Error getting document:",e)}}async toggleVote({targetId:e,shopId:t,byFeatureReq:r}){try{const i=r?n.doc(this.featureReqRef,e):n.doc(this.commentFeatureReqRef,e),s=await n.getDoc(i);if(s.exists()){const e=s.data(),r=(e.likedUserIds||[]).includes(t),a=r?-1:1,o=r?n.arrayRemove(t):n.arrayUnion(t);return await n.updateDoc(i,{voteCount:n.increment(a),likedUserIds:o}),!r}console.error("Document does not exist:",e)}catch(e){console.error("Error voting like:",e)}}async subscribeToComments(e,t){try{if(!e)return void("function"==typeof t&&t([]));const r=n.query(this.commentFeatureReqRef,n.where("parentId","==",e),n.orderBy("createdAt","asc")),i=n.onSnapshot(r,e=>{if("function"!=typeof t)return;const r=e.docs.map(e=>{const t=e.data();return t.createdAt&&t.createdAt.toDate&&(t.createdAt=t.createdAt.toDate().toISOString()),{id:e.id,...t}});t(r)});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){console.error("subscribeToComments",e),"function"==typeof t&&t([])}}cleanup(){this.activeSubscriptions.forEach(e=>{"function"==typeof e&&e()}),this.activeSubscriptions.clear()}subscribeTrendingRequests(e,t=10){try{if(!this.appId)return e({data:[]}),()=>{};const r=n.query(this.featureReqRef,n.where("appId","==",this.appId),n.orderBy("createdAt","desc")),i=n.onSnapshot(r,r=>{if("function"==typeof e)if(r.empty)e({data:[]});else{const n=new Date,i=r.docs.map(e=>{const t={...ae(e.data()),id:e.id},r=new Date(t.createdAt),i=Math.max((n.getTime()-r.getTime())/864e5,1),s=(1*t.voteCount+2*t.commentCount)/i;return{...t,score:s}}).sort((e,t)=>(t.score||0)-(e.score||0)).slice(0,t);e({data:i})}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(t){return console.error("Error getting trending feature requests:",t),"function"==typeof e&&e({data:[]}),()=>{}}}subscribeFeatureRequests(e,t=H){var r;try{if(console.log(t),!this.appId)return e({data:[],lastDoc:null}),()=>{};let i=n.query(this.featureReqRef,n.where("appId","==",this.appId));["new-feature","improvement","bug-report"].includes(t.status)&&(i=n.query(i,n.where("featureType","==",t.status))),"submitted"===t.status&&(console.log("=========>",this.shopId),i=n.query(i,n.where("shopId","==",this.shopId))),"Most recent"===t.sort?i=n.query(i,n.orderBy("createdAt","desc")):"Top Voted"===t.sort&&(i=n.query(i,n.orderBy("voteCount","desc"))),i=n.query(i,n.limit(parseInt((null===(r=t.limit)||void 0===r?void 0:r.toString())||"0"))),t.lastDoc&&(i=n.query(i,n.startAfter(t.lastDoc)));const s=n.onSnapshot(i,t=>{if("function"==typeof e)if(t.empty)e({data:[],lastDoc:null});else{const r=t.docs[t.docs.length-1],n=t.docs.map(e=>({...ae(e.data()),id:e.id}));e({data:n,lastDoc:r})}},t=>{console.error("Error in snapshot listener:",t),e({data:[],lastDoc:null})});return this.activeSubscriptions.add(s),()=>{s(),this.activeSubscriptions.delete(s)}}catch(t){return console.error("Error getting feature requests:",t),"function"==typeof e&&e({data:[],lastDoc:null}),()=>{}}}subscribeFeatureRequest(e,t){try{if(!e)return()=>{};if(""===e.trim())return console.warn("Invalid or empty ID passed to subscribeFeatureRequest:",e),"function"==typeof t&&t({}),()=>{};const r=n.doc(this.featureReqRef,e),i=n.onSnapshot(r,r=>{if("function"==typeof t)if(r.exists()){const e={...ae(r.data()),id:r.id};t(e)}else console.log(`Feature request with ID ${e} not found`),t({})});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting feature request by ID:",e),"function"==typeof t&&t({}),()=>{}}}async removeFeatureRequest(e){try{if(!e)throw new Error("ID is required to delete feature request");const t=n.writeBatch(this.db),r=async(e,t,r)=>{const i=n.query(e,n.where(t,"==",r));return(await n.getDocs(i)).docs},i=await r(this.commentFeatureReqRef,"parentId",e),s=await Promise.all(i.map(e=>r(this.commentFeatureReqRef,"parentId",e.id))).then(e=>e.flat());[n.doc(this.featureReqRef,e),...i.map(e=>e.ref),...s.map(e=>e.ref)].forEach(e=>t.delete(e)),await t.commit()}catch(e){throw console.error("Error deleting feature request and related data:",e),e}}async updateFeatureRequest(e,t){try{if(!e)throw new Error("ID is required to update feature request");if(!t||"object"!=typeof t)throw new Error("Update data must be an object");const r=n.doc(this.featureReqRef,e);return await n.updateDoc(r,t),{success:!0,message:"Feature request updated successfully"}}catch(e){throw console.error("Error updating feature request:",e),e}}async removeComment(e,t){try{if(!e||!t)return;const r=n.doc(this.commentFeatureReqRef,e),i=await n.getDoc(r);if(!i.exists())return;const s=ae(i.data());if(!s||(null==s?void 0:s.shopId)!==t)return;const a=n.writeBatch(this.db),o=s.parentId;if(s.replies)a.update(n.doc(this.commentFeatureReqRef,o),{repliesCount:n.increment(-1)}),a.delete(r);else{(await n.getDocs(n.query(this.commentFeatureReqRef,n.where("parentId","==",e)))).docs.forEach(e=>a.delete(e.ref)),a.update(n.doc(this.featureReqRef,o),{commentCount:n.increment(-1)}),a.delete(r)}await a.commit()}catch(e){console.error("Error deleting comment:",e)}}subscribeSupport(e,t){try{if(!e)return()=>{};const r=n.query(this.support,n.where("shopId","==",e)),i=n.onSnapshot(r,e=>{if("function"==typeof t)if(e.empty)t({});else{const r=e.docs[0],n={...ae(r.data())||{},id:r.id};t(n)}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting support document by shopId:",e),"function"==typeof t&&t({}),()=>{}}}subscribeFeatureReqUser(e,t){try{if(!e||!this.appId)return()=>{};const r=n.query(this.featureReqUsers,n.where("shopId","==",e),n.where("appId","==",this.appId),n.limit(1)),i=n.onSnapshot(r,e=>{if("function"==typeof t)if(e.empty)t({});else{const r=e.docs[0],n={...ae(r.data())||{},id:r.id};t(n)}});return this.activeSubscriptions.add(i),()=>{i(),this.activeSubscriptions.delete(i)}}catch(e){return console.error("Error getting feature request user:",e),"function"==typeof t&&t({}),()=>{}}}}const le=()=>{const e=N(e=>e.shopInfo),r=N(e=>e.appId),n=N(e=>e.fnAfterLike),i=t.useMemo(()=>((e=D)=>P(void 0,void 0,e).db)(),[]),s=t.useMemo(()=>new oe({db:i,shop:e,appId:r}),[i,e,r]),[a,o]=t.useState(null),[l,d]=t.useState(!0),[c,u]=t.useState([]),[p,h]=t.useState({data:[],lastDoc:null}),[f,m]=t.useState(H),[g,v]=t.useState(!1),[w,y]=t.useState(!1),[b,S]=t.useState({featureRequestCount:0}),[x,_]=t.useState({}),A=t.useRef(null),T=t.useMemo(()=>!!V.includes(e.email)||![ee,re,te].includes((({countMonthCreateShop:e=3,country:t="US",shopifyPlan:r="",plan:n="free"})=>se({shopifyPlan:r})?re:e<3?ee:"free"!==n?"STORE_PRO":ie.includes(t)?"STORE_NOT_POTENTIAL":ne.includes(t)?te:e>3&&e<6&&!ie.includes(t)?"STORE_POTENTIAL":e<=12?"STORE_GROWING":"STORE_OLD")(e)),[e]),E=t.useCallback(e=>{m(t=>({...t,...e,lastDoc:e.sort||e.status?null:e.lastDoc}))},[]);t.useEffect(()=>{let e;return(async()=>{try{e=s.subscribeTrendingRequests(e=>{u(e.data)})}catch(e){console.error("Error fetching trending features:",e)}})().catch(console.error),()=>{e&&e()}},[s]),t.useEffect(()=>{let e;return(async()=>{try{f.lastDoc||d(!0),e=s.subscribeFeatureRequests(e=>{h(t=>({data:f.lastDoc?[...t.data,...e.data]:e.data,lastDoc:e.lastDoc})),d(!1),v(!1)},f)}catch(e){console.error("Error fetching feature requests:",e),d(!1),v(!1)}})().catch(console.error),()=>{e&&e()}},[s,f]);const C=t.useCallback(async()=>{if(p.lastDoc&&!g)try{v(!0),m(e=>({...e,lastDoc:p.lastDoc}))}catch(e){console.error(e),v(!1)}},[p.lastDoc,g]),k=t.useCallback(async e=>{d(!0);try{const t=await s.subscribeToDocumentCounts(o,e);return d(!1),t}catch(e){return d(!1),void console.error("Error fetching feature requests:",e)}},[s]),M=t.useCallback(async({parentId:t,replies:n,value:i})=>{if(t&&i.trim()&&r&&((null==e?void 0:e.shopId)||(null==e?void 0:e.id))){y(!0);try{const s=z(i.replace(/\n/g,"<br>"));await Z("/feature-requests/comments",{method:"POST",body:{data:{content:s,parentId:t,appId:r,shopId:e.shopId||e.id,replies:n,shopOwner:e.shopOwner,isTeamAvada:(e.email||"").endsWith("@avadagroup.com")}}})}finally{y(!1),(()=>{try{$crisp.push(["do","chat:open"])}catch(e){console.log("Cannot send open crisp modal")}})()}}},[r,e]),L=t.useCallback(async({targetId:e,shopId:t,byFeatureReq:r})=>{try{const i=await s.toggleVote({targetId:e,shopId:t,byFeatureReq:r});"function"==typeof n&&"boolean"==typeof i&&n()}catch(e){console.error("Error handleVoteLike:",e)}},[s,n]),O=t.useCallback((e,t)=>!(!e||!t)&&(Array.isArray(e.likedUserIds)&&e.likedUserIds.includes(t)),[]),R=t.useCallback(async(e,t)=>{try{if(!e)return;return await s.subscribeToComments(e,t)}catch(e){return void console.error("Error fetching all comments:",e)}},[s]),I=t.useCallback(async e=>{try{if(!e)return;await s.removeFeatureRequest(e)}catch(e){console.error("Error removeFeatureRequest:",e)}finally{m(e=>({...e}))}},[s]),F=t.useCallback(async t=>{if(t)try{await s.removeComment(t,e.shopId)}catch(e){console.error("Error removeComment:",e)}},[s,e.shopId]),j=t.useCallback(async(e,t)=>{try{if(!e)return;await s.updateFeatureRequest(e,t)}catch(e){console.error("Error updateFeatureRequest:",e)}},[s]),Y=t.useCallback(async(e,t)=>{try{return e&&""!==e.trim()?s.subscribeFeatureRequest(e,e=>{t(e)}):(console.warn("Invalid feature request ID provided:",e),void t({}))}catch(e){return console.error("Error getting feature request by ID:",e),void t({})}},[s]),B=t.useCallback(async e=>{try{if(!e)return;return s.subscribeSupport(e,e=>{S(e)})}catch(e){return void console.error("Error getting support document by ID:",e)}},[s]),q=t.useCallback(async e=>{try{if(!e)return;return s.subscribeFeatureReqUser(e,t=>{const r=t;_(t=>({...t,[e]:r}))})}catch(e){return void console.error("Error getting feature request user by shopId:",e)}},[s]);return t.useEffect(()=>{const t=(null==e?void 0:e.shopId)||(null==e?void 0:e.id);if(A.current&&(A.current(),A.current=null),t)return q(t).then(e=>{"function"==typeof e&&(A.current=e)}).catch(e=>console.error("Error subscribing to current user profile:",e)),()=>{A.current&&(A.current(),A.current=null)}},[null==e?void 0:e.id,null==e?void 0:e.shopId,q]),{checkRuleSubmit:T,updateQuery:E,queryParams:f,data:a,subscribeToDocumentCounts:k,loading:l,handleVoteLike:L,checkUserLiked:O,subscribeToComments:R,updateFeatureRequest:j,dataFeatureTrending:c,featureRequests:p.data,hasMore:!!p.lastDoc,loadMore:C,subscribeFeatureRequest:Y,subscribeSupport:B,subscribeFeatureReqUser:q,dataShopSupport:b,featureReqUsers:x,loadingMore:g,removeFeatureRequest:I,removeComment:F,loadingComment:w,handleComment:M}};var de=t.memo(({dataQuery:r,byFeatureReq:n=!0,handleComment:a,isReply:o=!1})=>{const{handleVoteLike:l,subscribeToDocumentCounts:d,data:c,checkUserLiked:u,featureReqUsers:p}=le(),h=N(e=>e.shopInfo),f=(null==h?void 0:h.shopId)||(null==h?void 0:h.id)||"",m=null==p?void 0:p[f],g=null==m?void 0:m.isUserBlocked;t.useEffect(()=>{let e;return(null==r?void 0:r.id)&&(async()=>{try{const t={id:null==r?void 0:r.id,featureType:n,replies:o},i=await d(t);e="function"==typeof i?i:void 0}catch(e){console.error("Error initializing subscriptions:",e)}})().catch(console.error),()=>{"function"==typeof e&&e()}},[null==r?void 0:r.id,n,o,d]);const v=t.useMemo(()=>u(c,h.shopId),[c,h.shopId,u]);return e.jsxs("div",{onClick:e=>e.stopPropagation(),className:"Avada-FeatureReq-Action "+(n?"":"Avada-FeatureReq-ActionComment"),children:[e.jsx(i.Tag,{onClick:()=>{f&&l({targetId:null==r?void 0:r.id,shopId:f,byFeatureReq:n})},children:n?e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx("span",{children:(null==r?void 0:r.voteCount)||0}),v?e.jsx(i.Icon,{source:J}):e.jsx(i.Icon,{source:s.ThumbsUpIcon})]}):e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[v?e.jsx(i.Icon,{source:J}):e.jsx(i.Icon,{source:s.ThumbsUpIcon}),e.jsxs("span",{children:[(null==r?void 0:r.voteCount)||0," ",(null==r?void 0:r.voteCount)>1?"likes":"like"]})]})}),!o&&e.jsx(i.Tag,{onClick:()=>a(),disabled:g,children:n?e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx("span",{children:null==r?void 0:r.commentCount}),e.jsx(i.Icon,{source:s.ChatIcon})]}):e.jsxs(i.LegacyStack,{spacing:"extraTight",children:[e.jsx(i.Icon,{source:s.ChatIcon}),e.jsxs("span",{children:[(null==r?void 0:r.commentCount)||0," ",(null==r?void 0:r.commentCount)>1?"Replies":"Reply"]})]})})]})});
29
29
  /*! @license DOMPurify 3.2.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.6/LICENSE */const{entries:ce,setPrototypeOf:ue,isFrozen:pe,getPrototypeOf:he,getOwnPropertyDescriptor:fe}=Object;let{freeze:me,seal:ge,create:ve}=Object,{apply:we,construct:ye}="undefined"!=typeof Reflect&&Reflect;me||(me=function(e){return e}),ge||(ge=function(e){return e}),we||(we=function(e,t,r){return e.apply(t,r)}),ye||(ye=function(e,t){return new e(...t)});const be=Ie(Array.prototype.forEach),Se=Ie(Array.prototype.lastIndexOf),xe=Ie(Array.prototype.pop),_e=Ie(Array.prototype.push),Ae=Ie(Array.prototype.splice),Te=Ie(String.prototype.toLowerCase),Ee=Ie(String.prototype.toString),Ce=Ie(String.prototype.match),ke=Ie(String.prototype.replace),Me=Ie(String.prototype.indexOf),De=Ie(String.prototype.trim),Le=Ie(Object.prototype.hasOwnProperty),Oe=Ie(RegExp.prototype.test),Re=(Pe=TypeError,function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return ye(Pe,t)});var Pe;function Ie(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return we(e,t,n)}}function Ne(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Te;ue&&ue(e,null);let n=t.length;for(;n--;){let i=t[n];if("string"==typeof i){const e=r(i);e!==i&&(pe(t)||(t[n]=e),i=e)}e[i]=!0}return e}function Fe(e){for(let t=0;t<e.length;t++){Le(e,t)||(e[t]=null)}return e}function je(e){const t=ve(null);for(const[r,n]of ce(e)){Le(e,r)&&(Array.isArray(n)?t[r]=Fe(n):n&&"object"==typeof n&&n.constructor===Object?t[r]=je(n):t[r]=n)}return t}function Ye(e,t){for(;null!==e;){const r=fe(e,t);if(r){if(r.get)return Ie(r.get);if("function"==typeof r.value)return Ie(r.value)}e=he(e)}return function(){return null}}const Be=me(["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"]),ze=me(["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"]),qe=me(["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"]),He=me(["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"]),Ge=me(["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"]),We=me(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ue=me(["#text"]),Ve=me(["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"]),$e=me(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Ze=me(["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"]),Xe=me(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Qe=ge(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ke=ge(/<%[\w\W]*|[\w\W]*%>/gm),Je=ge(/\$\{[\w\W]*/gm),et=ge(/^data-[\-\w.\u00B7-\uFFFF]+$/),tt=ge(/^aria-[\-\w]+$/),rt=ge(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nt=ge(/^(?:\w+script|data):/i),it=ge(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),st=ge(/^html$/i),at=ge(/^[a-z][.\w]*(-[.\w]+)+$/i);var ot=Object.freeze({__proto__:null,ARIA_ATTR:tt,ATTR_WHITESPACE:it,CUSTOM_ELEMENT:at,DATA_ATTR:et,DOCTYPE_NAME:st,ERB_EXPR:Ke,IS_ALLOWED_URI:rt,IS_SCRIPT_OR_DATA:nt,MUSTACHE_EXPR:Qe,TMPLIT_EXPR:Je});const lt=1,dt=3,ct=7,ut=8,pt=9,ht=function(){return"undefined"==typeof window?null:window};var ft=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ht();const r=t=>e(t);if(r.version="3.2.6",r.removed=[],!t||!t.document||t.document.nodeType!==pt||!t.Element)return r.isSupported=!1,r;let{document:n}=t;const i=n,s=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:l,Element:d,NodeFilter:c,NamedNodeMap:u=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:p,DOMParser:h,trustedTypes:f}=t,m=d.prototype,g=Ye(m,"cloneNode"),v=Ye(m,"remove"),w=Ye(m,"nextSibling"),y=Ye(m,"childNodes"),b=Ye(m,"parentNode");if("function"==typeof o){const e=n.createElement("template");e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let S,x="";const{implementation:_,createNodeIterator:A,createDocumentFragment:T,getElementsByTagName:E}=n,{importNode:C}=i;let k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof ce&&"function"==typeof b&&_&&void 0!==_.createHTMLDocument;const{MUSTACHE_EXPR:M,ERB_EXPR:D,TMPLIT_EXPR:L,DATA_ATTR:O,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:P,ATTR_WHITESPACE:I,CUSTOM_ELEMENT:N}=ot;let{IS_ALLOWED_URI:F}=ot,j=null;const Y=Ne({},[...Be,...ze,...qe,...Ge,...Ue]);let B=null;const z=Ne({},[...Ve,...$e,...Ze,...Xe]);let q=Object.seal(ve(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}})),H=null,G=null,W=!0,U=!0,V=!1,$=!0,Z=!1,X=!0,Q=!1,K=!1,J=!1,ee=!1,te=!1,re=!1,ne=!0,ie=!1,se=!0,ae=!1,oe={},le=null;const de=Ne({},["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 ue=null;const pe=Ne({},["audio","video","img","source","image","track"]);let he=null;const fe=Ne({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",we="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let Pe=ye,Ie=!1,Fe=null;const Qe=Ne({},[ge,we,ye],Ee);let Ke=Ne({},["mi","mo","mn","ms","mtext"]),Je=Ne({},["annotation-xml"]);const et=Ne({},["title","style","font","a","script"]);let tt=null;const nt=["application/xhtml+xml","text/html"];let it=null,at=null;const ft=n.createElement("form"),mt=function(e){return e instanceof RegExp||e instanceof Function},gt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!at||at!==e){if(e&&"object"==typeof e||(e={}),e=je(e),tt=-1===nt.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,it="application/xhtml+xml"===tt?Ee:Te,j=Le(e,"ALLOWED_TAGS")?Ne({},e.ALLOWED_TAGS,it):Y,B=Le(e,"ALLOWED_ATTR")?Ne({},e.ALLOWED_ATTR,it):z,Fe=Le(e,"ALLOWED_NAMESPACES")?Ne({},e.ALLOWED_NAMESPACES,Ee):Qe,he=Le(e,"ADD_URI_SAFE_ATTR")?Ne(je(fe),e.ADD_URI_SAFE_ATTR,it):fe,ue=Le(e,"ADD_DATA_URI_TAGS")?Ne(je(pe),e.ADD_DATA_URI_TAGS,it):pe,le=Le(e,"FORBID_CONTENTS")?Ne({},e.FORBID_CONTENTS,it):de,H=Le(e,"FORBID_TAGS")?Ne({},e.FORBID_TAGS,it):je({}),G=Le(e,"FORBID_ATTR")?Ne({},e.FORBID_ATTR,it):je({}),oe=!!Le(e,"USE_PROFILES")&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,U=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,$=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Z=e.SAFE_FOR_TEMPLATES||!1,X=!1!==e.SAFE_FOR_XML,Q=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,re=e.RETURN_TRUSTED_TYPE||!1,J=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,ie=e.SANITIZE_NAMED_PROPS||!1,se=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,F=e.ALLOWED_URI_REGEXP||rt,Pe=e.NAMESPACE||ye,Ke=e.MATHML_TEXT_INTEGRATION_POINTS||Ke,Je=e.HTML_INTEGRATION_POINTS||Je,q=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(q.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Z&&(U=!1),te&&(ee=!0),oe&&(j=Ne({},Ue),B=[],!0===oe.html&&(Ne(j,Be),Ne(B,Ve)),!0===oe.svg&&(Ne(j,ze),Ne(B,$e),Ne(B,Xe)),!0===oe.svgFilters&&(Ne(j,qe),Ne(B,$e),Ne(B,Xe)),!0===oe.mathMl&&(Ne(j,Ge),Ne(B,Ze),Ne(B,Xe))),e.ADD_TAGS&&(j===Y&&(j=je(j)),Ne(j,e.ADD_TAGS,it)),e.ADD_ATTR&&(B===z&&(B=je(B)),Ne(B,e.ADD_ATTR,it)),e.ADD_URI_SAFE_ATTR&&Ne(he,e.ADD_URI_SAFE_ATTR,it),e.FORBID_CONTENTS&&(le===de&&(le=je(le)),Ne(le,e.FORBID_CONTENTS,it)),se&&(j["#text"]=!0),Q&&Ne(j,["html","head","body"]),j.table&&(Ne(j,["tbody"]),delete H.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw Re('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw Re('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');S=e.TRUSTED_TYPES_POLICY,x=S.createHTML("")}else void 0===S&&(S=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let r=null;const n="data-tt-policy-suffix";t&&t.hasAttribute(n)&&(r=t.getAttribute(n));const i="dompurify"+(r?"#"+r:"");try{return e.createPolicy(i,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+i+" could not be created."),null}}(f,s)),null!==S&&"string"==typeof x&&(x=S.createHTML(""));me&&me(e),at=e}},vt=Ne({},[...ze,...qe,...He]),wt=Ne({},[...Ge,...We]),yt=function(e){_e(r.removed,{element:e});try{b(e).removeChild(e)}catch(t){v(e)}},bt=function(e,t){try{_e(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){_e(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(ee||te)try{yt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},St=function(e){let t=null,r=null;if(J)e="<remove></remove>"+e;else{const t=Ce(e,/^[\r\n\t ]+/);r=t&&t[0]}"application/xhtml+xml"===tt&&Pe===ye&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const i=S?S.createHTML(e):e;if(Pe===ye)try{t=(new h).parseFromString(i,tt)}catch(e){}if(!t||!t.documentElement){t=_.createDocument(Pe,"template",null);try{t.documentElement.innerHTML=Ie?x:i}catch(e){}}const s=t.body||t.documentElement;return e&&r&&s.insertBefore(n.createTextNode(r),s.childNodes[0]||null),Pe===ye?E.call(t,Q?"html":"body")[0]:Q?t.documentElement:s},xt=function(e){return A.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},_t=function(e){return e instanceof p&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof u)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},At=function(e){return"function"==typeof l&&e instanceof l};function Tt(e,t,n){be(e,e=>{e.call(r,t,n,at)})}const Et=function(e){let t=null;if(Tt(k.beforeSanitizeElements,e,null),_t(e))return yt(e),!0;const n=it(e.nodeName);if(Tt(k.uponSanitizeElement,e,{tagName:n,allowedTags:j}),X&&e.hasChildNodes()&&!At(e.firstElementChild)&&Oe(/<[/\w!]/g,e.innerHTML)&&Oe(/<[/\w!]/g,e.textContent))return yt(e),!0;if(e.nodeType===ct)return yt(e),!0;if(X&&e.nodeType===ut&&Oe(/<[/\w]/g,e.data))return yt(e),!0;if(!j[n]||H[n]){if(!H[n]&&kt(n)){if(q.tagNameCheck instanceof RegExp&&Oe(q.tagNameCheck,n))return!1;if(q.tagNameCheck instanceof Function&&q.tagNameCheck(n))return!1}if(se&&!le[n]){const t=b(e)||e.parentNode,r=y(e)||e.childNodes;if(r&&t){for(let n=r.length-1;n>=0;--n){const i=g(r[n],!0);i.__removalCount=(e.__removalCount||0)+1,t.insertBefore(i,w(e))}}}return yt(e),!0}return e instanceof d&&!function(e){let t=b(e);t&&t.tagName||(t={namespaceURI:Pe,tagName:"template"});const r=Te(e.tagName),n=Te(t.tagName);return!!Fe[e.namespaceURI]&&(e.namespaceURI===we?t.namespaceURI===ye?"svg"===r:t.namespaceURI===ge?"svg"===r&&("annotation-xml"===n||Ke[n]):Boolean(vt[r]):e.namespaceURI===ge?t.namespaceURI===ye?"math"===r:t.namespaceURI===we?"math"===r&&Je[n]:Boolean(wt[r]):e.namespaceURI===ye?!(t.namespaceURI===we&&!Je[n])&&!(t.namespaceURI===ge&&!Ke[n])&&!wt[r]&&(et[r]||!vt[r]):!("application/xhtml+xml"!==tt||!Fe[e.namespaceURI]))}(e)?(yt(e),!0):"noscript"!==n&&"noembed"!==n&&"noframes"!==n||!Oe(/<\/no(script|embed|frames)/i,e.innerHTML)?(Z&&e.nodeType===dt&&(t=e.textContent,be([M,D,L],e=>{t=ke(t,e," ")}),e.textContent!==t&&(_e(r.removed,{element:e.cloneNode()}),e.textContent=t)),Tt(k.afterSanitizeElements,e,null),!1):(yt(e),!0)},Ct=function(e,t,r){if(ne&&("id"===t||"name"===t)&&(r in n||r in ft))return!1;if(U&&!G[t]&&Oe(O,t));else if(W&&Oe(R,t));else if(!B[t]||G[t]){if(!(kt(e)&&(q.tagNameCheck instanceof RegExp&&Oe(q.tagNameCheck,e)||q.tagNameCheck instanceof Function&&q.tagNameCheck(e))&&(q.attributeNameCheck instanceof RegExp&&Oe(q.attributeNameCheck,t)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(t))||"is"===t&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Oe(q.tagNameCheck,r)||q.tagNameCheck instanceof Function&&q.tagNameCheck(r))))return!1}else if(he[t]);else if(Oe(F,ke(r,I,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==Me(r,"data:")||!ue[e]){if(V&&!Oe(P,ke(r,I,"")));else if(r)return!1}else;return!0},kt=function(e){return"annotation-xml"!==e&&Ce(e,N)},Mt=function(e){Tt(k.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||_t(e))return;const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:B,forceKeepAttr:void 0};let i=t.length;for(;i--;){const s=t[i],{name:a,namespaceURI:o,value:l}=s,d=it(a),c=l;let u="value"===a?c:De(c);if(n.attrName=d,n.attrValue=u,n.keepAttr=!0,n.forceKeepAttr=void 0,Tt(k.uponSanitizeAttribute,e,n),u=n.attrValue,!ie||"id"!==d&&"name"!==d||(bt(a,e),u="user-content-"+u),X&&Oe(/((--!?|])>)|<\/(style|title)/i,u)){bt(a,e);continue}if(n.forceKeepAttr)continue;if(!n.keepAttr){bt(a,e);continue}if(!$&&Oe(/\/>/i,u)){bt(a,e);continue}Z&&be([M,D,L],e=>{u=ke(u,e," ")});const p=it(e.nodeName);if(Ct(p,d,u)){if(S&&"object"==typeof f&&"function"==typeof f.getAttributeType)if(o);else switch(f.getAttributeType(p,d)){case"TrustedHTML":u=S.createHTML(u);break;case"TrustedScriptURL":u=S.createScriptURL(u)}if(u!==c)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),_t(e)?yt(e):xe(r.removed)}catch(t){bt(a,e)}}else bt(a,e)}Tt(k.afterSanitizeAttributes,e,null)},Dt=function e(t){let r=null;const n=xt(t);for(Tt(k.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)Tt(k.uponSanitizeShadowNode,r,null),Et(r),Mt(r),r.content instanceof a&&e(r.content);Tt(k.afterSanitizeShadowDOM,t,null)};return r.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null,s=null,o=null,d=null;if(Ie=!e,Ie&&(e="\x3c!--\x3e"),"string"!=typeof e&&!At(e)){if("function"!=typeof e.toString)throw Re("toString is not a function");if("string"!=typeof(e=e.toString()))throw Re("dirty is not a string, aborting")}if(!r.isSupported)return e;if(K||gt(t),r.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){const t=it(e.nodeName);if(!j[t]||H[t])throw Re("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof l)n=St("\x3c!----\x3e"),s=n.ownerDocument.importNode(e,!0),s.nodeType===lt&&"BODY"===s.nodeName||"HTML"===s.nodeName?n=s:n.appendChild(s);else{if(!ee&&!Z&&!Q&&-1===e.indexOf("<"))return S&&re?S.createHTML(e):e;if(n=St(e),!n)return ee?null:re?x:""}n&&J&&yt(n.firstChild);const c=xt(ae?e:n);for(;o=c.nextNode();)Et(o),Mt(o),o.content instanceof a&&Dt(o.content);if(ae)return e;if(ee){if(te)for(d=T.call(n.ownerDocument);n.firstChild;)d.appendChild(n.firstChild);else d=n;return(B.shadowroot||B.shadowrootmode)&&(d=C.call(i,d,!0)),d}let u=Q?n.outerHTML:n.innerHTML;return Q&&j["!doctype"]&&n.ownerDocument&&n.ownerDocument.doctype&&n.ownerDocument.doctype.name&&Oe(st,n.ownerDocument.doctype.name)&&(u="<!DOCTYPE "+n.ownerDocument.doctype.name+">\n"+u),Z&&be([M,D,L],e=>{u=ke(u,e," ")}),S&&re?S.createHTML(u):u},r.setConfig=function(){gt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),K=!0},r.clearConfig=function(){at=null,K=!1},r.isValidAttribute=function(e,t,r){at||gt({});const n=it(e),i=it(t);return Ct(n,i,r)},r.addHook=function(e,t){"function"==typeof t&&_e(k[e],t)},r.removeHook=function(e,t){if(void 0!==t){const r=Se(k[e],t);return-1===r?void 0:Ae(k[e],r,1)[0]}return xe(k[e])},r.removeHooks=function(e){k[e]=[]},r.removeAllHooks=function(){k={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}();const mt=({preview:r="https://cdnapps.avada.io/ag-blog/AvatarFeatureReq.png",src:n,alt:i,containerStyle:s,containerClassName:a,containerProps:o={},imageProps:l={},imageStyle:d={},objectFit:c="contain",imageClassName:u,children:p})=>{const[h,f]=t.useState(r),[m,g]=t.useState(!0),v=t.useCallback(e=>{if(!e)return;g(!0);const t=new Image;t.src=e,t.onload=()=>{f(e),g(!1)},t.onerror=()=>{f(r),g(!1)}},[r]);return t.useEffect(()=>v(n),[v,n]),e.jsxs("div",{...o,className:a,style:s,children:[p,e.jsx("img",{className:u,...l,style:{filter:""+(m?"blur(20px)":""),...d,transition:".2s filter linear",objectFit:c},src:h,alt:i})]})};function gt(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 vt,wt={exports:{}};(vt=wt).exports=function(){var e,t;function r(){return e.apply(null,arguments)}function n(t){e=t}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function l(e){return void 0===e}function d(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,t){var r,n=[],i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function p(e,t){for(var r in t)a(t,r)&&(e[r]=t[r]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function h(e,t,r,n){return $r(e,t,r,n,!0).utc()}function f(){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(e){return null==e._pf&&(e._pf=f()),e._pf}function g(e){var r=null,n=!1,i=e._d&&!isNaN(e._d.getTime());return i&&(r=m(e),n=t.call(r.parsedDateParts,function(e){return null!=e}),i=r.overflow<0&&!r.empty&&!r.invalidEra&&!r.invalidMonth&&!r.invalidWeekday&&!r.weekdayMismatch&&!r.nullInput&&!r.invalidFormat&&!r.userInvalidated&&(!r.meridiem||r.meridiem&&n),e._strict&&(i=i&&0===r.charsLeftOver&&0===r.unusedTokens.length&&void 0===r.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?i:(e._isValid=i,e._isValid)}function v(e){var t=h(NaN);return null!=e?p(m(t),e):m(t).userInvalidated=!0,t}t=Array.prototype.some?Array.prototype.some:function(e){var t,r=Object(this),n=r.length>>>0;for(t=0;t<n;t++)if(t in r&&e.call(this,r[t],t,r))return!0;return!1};var w=r.momentProperties=[],y=!1;function b(e,t){var r,n,i,s=w.length;if(l(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),l(t._i)||(e._i=t._i),l(t._f)||(e._f=t._f),l(t._l)||(e._l=t._l),l(t._strict)||(e._strict=t._strict),l(t._tzm)||(e._tzm=t._tzm),l(t._isUTC)||(e._isUTC=t._isUTC),l(t._offset)||(e._offset=t._offset),l(t._pf)||(e._pf=m(t)),l(t._locale)||(e._locale=t._locale),s>0)for(r=0;r<s;r++)l(i=t[n=w[r]])||(e[n]=i);return e}function S(e){b(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===y&&(y=!0,r.updateOffset(this),y=!1)}function x(e){return e instanceof S||null!=e&&null!=e._isAMomentObject}function _(e){!1===r.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function A(e,t){var n=!0;return p(function(){if(null!=r.deprecationHandler&&r.deprecationHandler(null,e),n){var i,s,o,l=[],d=arguments.length;for(s=0;s<d;s++){if(i="","object"==typeof arguments[s]){for(o in i+="\n["+s+"] ",arguments[0])a(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}_(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)},t)}var T,E={};function C(e,t){null!=r.deprecationHandler&&r.deprecationHandler(e,t),E[e]||(_(t),E[e]=!0)}function k(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function M(e){var t,r;for(r in e)a(e,r)&&(k(t=e[r])?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function D(e,t){var r,n=p({},e);for(r in t)a(t,r)&&(s(e[r])&&s(t[r])?(n[r]={},p(n[r],e[r]),p(n[r],t[r])):null!=t[r]?n[r]=t[r]:delete n[r]);for(r in e)a(e,r)&&!a(t,r)&&s(e[r])&&(n[r]=p({},n[r]));return n}function L(e){null!=e&&this.set(e)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null,T=Object.keys?Object.keys:function(e){var t,r=[];for(t in e)a(e,t)&&r.push(t);return r};var O={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function R(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return k(n)?n.call(t,r):n}function P(e,t,r){var n=""+Math.abs(e),i=t-n.length;return(e>=0?r?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+n}var I=/(\[[^\[]*\])|(\\)?([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,N=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,F={},j={};function Y(e,t,r,n){var i=n;"string"==typeof n&&(i=function(){return this[n]()}),e&&(j[e]=i),t&&(j[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),r&&(j[r]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function z(e){var t,r,n=e.match(I);for(t=0,r=n.length;t<r;t++)j[n[t]]?n[t]=j[n[t]]:n[t]=B(n[t]);return function(t){var i,s="";for(i=0;i<r;i++)s+=k(n[i])?n[i].call(t,e):n[i];return s}}function q(e,t){return e.isValid()?(t=H(t,e.localeData()),F[t]=F[t]||z(t),F[t](e)):e.localeData().invalidDate()}function H(e,t){var r=5;function n(e){return t.longDateFormat(e)||e}for(N.lastIndex=0;r>=0&&N.test(e);)e=e.replace(N,n),N.lastIndex=0,r-=1;return e}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 W(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(I).map(function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e}).join(""),this._longDateFormat[e])}var U="Invalid date";function V(){return this._invalidDate}var $="%d",Z=/\d{1,2}/;function X(e){return this._ordinal.replace("%d",e)}var Q={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 K(e,t,r,n){var i=this._relativeTime[r];return k(i)?i(e,t,r,n):i.replace(/%d/i,e)}function J(e,t){var r=this._relativeTime[e>0?"future":"past"];return k(r)?r(t):r.replace(/%s/i,t)}var ee={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 te(e){return"string"==typeof e?ee[e]||ee[e.toLowerCase()]:void 0}function re(e){var t,r,n={};for(r in e)a(e,r)&&(t=te(r))&&(n[t]=e[r]);return n}var ne={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 ie(e){var t,r=[];for(t in e)a(e,t)&&r.push({unit:t,priority:ne[t]});return r.sort(function(e,t){return e.priority-t.priority}),r}var se,ae=/\d/,oe=/\d\d/,le=/\d{3}/,de=/\d{4}/,ce=/[+-]?\d{6}/,ue=/\d\d?/,pe=/\d\d\d\d?/,he=/\d\d\d\d\d\d?/,fe=/\d{1,3}/,me=/\d{1,4}/,ge=/[+-]?\d{1,6}/,ve=/\d+/,we=/[+-]?\d+/,ye=/Z|[+-]\d\d:?\d\d/gi,be=/Z|[+-]\d\d(?::?\d\d)?/gi,Se=/[+-]?\d+(\.\d{1,3})?/,xe=/[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,_e=/^[1-9]\d?/,Ae=/^([1-9]\d|\d)/;function Te(e,t,r){se[e]=k(t)?t:function(e,n){return e&&r?r:t}}function Ee(e,t){return a(se,e)?se[e](t._strict,t._locale):new RegExp(Ce(e))}function Ce(e){return ke(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,r,n,i){return t||r||n||i}))}function ke(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Me(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function De(e){var t=+e,r=0;return 0!==t&&isFinite(t)&&(r=Me(t)),r}se={};var Le={};function Oe(e,t){var r,n,i=t;for("string"==typeof e&&(e=[e]),d(t)&&(i=function(e,r){r[t]=De(e)}),n=e.length,r=0;r<n;r++)Le[e[r]]=i}function Re(e,t){Oe(e,function(e,r,n,i){n._w=n._w||{},t(e,n._w,n,i)})}function Pe(e,t,r){null!=t&&a(Le,e)&&Le[e](t,r._a,r,e)}function Ie(e){return e%4==0&&e%100!=0||e%400==0}var Ne=0,Fe=1,je=2,Ye=3,Be=4,ze=5,qe=6,He=7,Ge=8;function We(e){return Ie(e)?366:365}Y("Y",0,0,function(){var e=this.year();return e<=9999?P(e,4):"+"+e}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),Te("Y",we),Te("YY",ue,oe),Te("YYYY",me,de),Te("YYYYY",ge,ce),Te("YYYYYY",ge,ce),Oe(["YYYYY","YYYYYY"],Ne),Oe("YYYY",function(e,t){t[Ne]=2===e.length?r.parseTwoDigitYear(e):De(e)}),Oe("YY",function(e,t){t[Ne]=r.parseTwoDigitYear(e)}),Oe("Y",function(e,t){t[Ne]=parseInt(e,10)}),r.parseTwoDigitYear=function(e){return De(e)+(De(e)>68?1900:2e3)};var Ue,Ve=Ze("FullYear",!0);function $e(){return Ie(this.year())}function Ze(e,t){return function(n){return null!=n?(Qe(this,e,n),r.updateOffset(this,t),this):Xe(this,e)}}function Xe(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Qe(e,t,r){var n,i,s,a,o;if(e.isValid()&&!isNaN(r)){switch(n=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(i?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(i?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(i?n.setUTCHours(r):n.setHours(r));case"Date":return void(i?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}s=r,a=e.month(),o=29!==(o=e.date())||1!==a||Ie(s)?o:28,i?n.setUTCFullYear(s,a,o):n.setFullYear(s,a,o)}}function Ke(e){return k(this[e=te(e)])?this[e]():this}function Je(e,t){if("object"==typeof e){var r,n=ie(e=re(e)),i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(k(this[e=te(e)]))return this[e](t);return this}function et(e,t){return(e%t+t)%t}function tt(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=et(t,12);return e+=(t-r)/12,1===r?Ie(e)?29:28:31-r%7%2}Ue=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Y("MMMM",0,0,function(e){return this.localeData().months(this,e)}),Te("M",ue,_e),Te("MM",ue,oe),Te("MMM",function(e,t){return t.monthsShortRegex(e)}),Te("MMMM",function(e,t){return t.monthsRegex(e)}),Oe(["M","MM"],function(e,t){t[Fe]=De(e)-1}),Oe(["MMM","MMMM"],function(e,t,r,n){var i=r._locale.monthsParse(e,n,r._strict);null!=i?t[Fe]=i:m(r).invalidMonth=e});var rt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),nt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),it=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,st=xe,at=xe;function ot(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||it).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone}function lt(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[it.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function dt(e,t,r){var n,i,s,a=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)s=h([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(s,"").toLocaleLowerCase();return r?"MMM"===t?-1!==(i=Ue.call(this._shortMonthsParse,a))?i:null:-1!==(i=Ue.call(this._longMonthsParse,a))?i:null:"MMM"===t?-1!==(i=Ue.call(this._shortMonthsParse,a))||-1!==(i=Ue.call(this._longMonthsParse,a))?i:null:-1!==(i=Ue.call(this._longMonthsParse,a))||-1!==(i=Ue.call(this._shortMonthsParse,a))?i:null}function ct(e,t,r){var n,i,s;if(this._monthsParseExact)return dt.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(i=h([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),r||this._monthsParse[n]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[n]=new RegExp(s.replace(".",""),"i")),r&&"MMMM"===t&&this._longMonthsParse[n].test(e))return n;if(r&&"MMM"===t&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function ut(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=De(t);else if(!d(t=e.localeData().monthsParse(t)))return e;var r=t,n=e.date();return n=n<29?n:Math.min(n,tt(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function pt(e){return null!=e?(ut(this,e),r.updateOffset(this,!0),this):Xe(this,"Month")}function ht(){return tt(this.year(),this.month())}function ft(e){return this._monthsParseExact?(a(this,"_monthsRegex")||wt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=st),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function mt(e){return this._monthsParseExact?(a(this,"_monthsRegex")||wt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=at),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function wt(){function e(e,t){return t.length-e.length}var t,r,n,i,s=[],a=[],o=[];for(t=0;t<12;t++)r=h([2e3,t]),n=ke(this.monthsShort(r,"")),i=ke(this.months(r,"")),s.push(n),a.push(i),o.push(i),o.push(n);s.sort(e),a.sort(e),o.sort(e),this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function yt(e,t,r,n,i,s,a){var o;return e<100&&e>=0?(o=new Date(e+400,t,r,n,i,s,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,r,n,i,s,a),o}function bt(e){var t,r;return e<100&&e>=0?((r=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function St(e,t,r){var n=7+t-r;return-(7+bt(e,0,n).getUTCDay()-t)%7+n-1}function xt(e,t,r,n,i){var s,a,o=1+7*(t-1)+(7+r-n)%7+St(e,n,i);return o<=0?a=We(s=e-1)+o:o>We(e)?(s=e+1,a=o-We(e)):(s=e,a=o),{year:s,dayOfYear:a}}function _t(e,t,r){var n,i,s=St(e.year(),t,r),a=Math.floor((e.dayOfYear()-s-1)/7)+1;return a<1?n=a+At(i=e.year()-1,t,r):a>At(e.year(),t,r)?(n=a-At(e.year(),t,r),i=e.year()+1):(i=e.year(),n=a),{week:n,year:i}}function At(e,t,r){var n=St(e,t,r),i=St(e+1,t,r);return(We(e)-n+i)/7}function Tt(e){return _t(e,this._week.dow,this._week.doy).week}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),Te("w",ue,_e),Te("ww",ue,oe),Te("W",ue,_e),Te("WW",ue,oe),Re(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=De(e)});var Et={dow:0,doy:6};function Ct(){return this._week.dow}function kt(){return this._week.doy}function Mt(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Dt(e){var t=_t(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function Lt(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}function Ot(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Rt(e,t){return e.slice(t,7).concat(e.slice(0,t))}Y("d",0,"do","day"),Y("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Y("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Y("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),Te("d",ue),Te("e",ue),Te("E",ue),Te("dd",function(e,t){return t.weekdaysMinRegex(e)}),Te("ddd",function(e,t){return t.weekdaysShortRegex(e)}),Te("dddd",function(e,t){return t.weekdaysRegex(e)}),Re(["dd","ddd","dddd"],function(e,t,r,n){var i=r._locale.weekdaysParse(e,n,r._strict);null!=i?t.d=i:m(r).invalidWeekday=e}),Re(["d","e","E"],function(e,t,r,n){t[n]=De(e)});var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),It="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Nt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ft=xe,jt=xe,Yt=xe;function Bt(e,t){var r=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Rt(r,this._week.dow):e?r[e.day()]:r}function zt(e){return!0===e?Rt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function qt(e){return!0===e?Rt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ht(e,t,r){var n,i,s,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)s=h([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(s,"").toLocaleLowerCase();return r?"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"dddd"===t?-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:"ddd"===t?-1!==(i=Ue.call(this._shortWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._minWeekdaysParse,a))?i:null:-1!==(i=Ue.call(this._minWeekdaysParse,a))||-1!==(i=Ue.call(this._weekdaysParse,a))||-1!==(i=Ue.call(this._shortWeekdaysParse,a))?i:null}function Gt(e,t,r){var n,i,s;if(this._weekdaysParseExact)return Ht.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(i=h([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[n]=new RegExp(s.replace(".",""),"i")),r&&"dddd"===t&&this._fullWeekdaysParse[n].test(e))return n;if(r&&"ddd"===t&&this._shortWeekdaysParse[n].test(e))return n;if(r&&"dd"===t&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Wt(e){if(!this.isValid())return null!=e?this:NaN;var t=Xe(this,"Day");return null!=e?(e=Lt(e,this.localeData()),this.add(e-t,"d")):t}function Ut(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Vt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=Ot(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ft),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Zt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jt),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Xt(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Yt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,r,n,i,s,a=[],o=[],l=[],d=[];for(t=0;t<7;t++)r=h([2e3,1]).day(t),n=ke(this.weekdaysMin(r,"")),i=ke(this.weekdaysShort(r,"")),s=ke(this.weekdays(r,"")),a.push(n),o.push(i),l.push(s),d.push(n),d.push(i),d.push(s);a.sort(e),o.sort(e),l.sort(e),d.sort(e),this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Kt(){return this.hours()%12||12}function Jt(){return this.hours()||24}function er(e,t){Y(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function tr(e,t){return t._meridiemParse}function rr(e){return"p"===(e+"").toLowerCase().charAt(0)}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Kt),Y("k",["kk",2],0,Jt),Y("hmm",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+Kt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)}),er("a",!0),er("A",!1),Te("a",tr),Te("A",tr),Te("H",ue,Ae),Te("h",ue,_e),Te("k",ue,_e),Te("HH",ue,oe),Te("hh",ue,oe),Te("kk",ue,oe),Te("hmm",pe),Te("hmmss",he),Te("Hmm",pe),Te("Hmmss",he),Oe(["H","HH"],Ye),Oe(["k","kk"],function(e,t,r){var n=De(e);t[Ye]=24===n?0:n}),Oe(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),Oe(["h","hh"],function(e,t,r){t[Ye]=De(e),m(r).bigHour=!0}),Oe("hmm",function(e,t,r){var n=e.length-2;t[Ye]=De(e.substr(0,n)),t[Be]=De(e.substr(n)),m(r).bigHour=!0}),Oe("hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Ye]=De(e.substr(0,n)),t[Be]=De(e.substr(n,2)),t[ze]=De(e.substr(i)),m(r).bigHour=!0}),Oe("Hmm",function(e,t,r){var n=e.length-2;t[Ye]=De(e.substr(0,n)),t[Be]=De(e.substr(n))}),Oe("Hmmss",function(e,t,r){var n=e.length-4,i=e.length-2;t[Ye]=De(e.substr(0,n)),t[Be]=De(e.substr(n,2)),t[ze]=De(e.substr(i))});var nr=/[ap]\.?m?\.?/i,ir=Ze("Hours",!0);function sr(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var ar,or={calendar:O,longDateFormat:G,invalidDate:U,ordinal:$,dayOfMonthOrdinalParse:Z,relativeTime:Q,months:rt,monthsShort:nt,week:Et,weekdays:Pt,weekdaysMin:Nt,weekdaysShort:It,meridiemParse:nr},lr={},dr={};function cr(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function ur(e){return e?e.toLowerCase().replace("_","-"):e}function pr(e){for(var t,r,n,i,s=0;s<e.length;){for(t=(i=ur(e[s]).split("-")).length,r=(r=ur(e[s+1]))?r.split("-"):null;t>0;){if(n=fr(i.slice(0,t).join("-")))return n;if(r&&r.length>=t&&cr(i,r)>=t-1)break;t--}s++}return ar}function hr(e){return!(!e||!e.match("^[^/\\\\]*$"))}function fr(e){var t=null;if(void 0===lr[e]&&vt&&vt.exports&&hr(e))try{t=ar._abbr,gt("./locale/"+e),mr(t)}catch(t){lr[e]=null}return lr[e]}function mr(e,t){var r;return e&&((r=l(t)?wr(e):gr(e,t))?ar=r:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ar._abbr}function gr(e,t){if(null!==t){var r,n=or;if(t.abbr=e,null!=lr[e])C("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."),n=lr[e]._config;else if(null!=t.parentLocale)if(null!=lr[t.parentLocale])n=lr[t.parentLocale]._config;else{if(null==(r=fr(t.parentLocale)))return dr[t.parentLocale]||(dr[t.parentLocale]=[]),dr[t.parentLocale].push({name:e,config:t}),null;n=r._config}return lr[e]=new L(D(n,t)),dr[e]&&dr[e].forEach(function(e){gr(e.name,e.config)}),mr(e),lr[e]}return delete lr[e],null}function vr(e,t){if(null!=t){var r,n,i=or;null!=lr[e]&&null!=lr[e].parentLocale?lr[e].set(D(lr[e]._config,t)):(null!=(n=fr(e))&&(i=n._config),t=D(i,t),null==n&&(t.abbr=e),(r=new L(t)).parentLocale=lr[e],lr[e]=r),mr(e)}else null!=lr[e]&&(null!=lr[e].parentLocale?(lr[e]=lr[e].parentLocale,e===mr()&&mr(e)):null!=lr[e]&&delete lr[e]);return lr[e]}function wr(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ar;if(!i(e)){if(t=fr(e))return t;e=[e]}return pr(e)}function yr(){return T(lr)}function br(e){var t,r=e._a;return r&&-2===m(e).overflow&&(t=r[Fe]<0||r[Fe]>11?Fe:r[je]<1||r[je]>tt(r[Ne],r[Fe])?je:r[Ye]<0||r[Ye]>24||24===r[Ye]&&(0!==r[Be]||0!==r[ze]||0!==r[qe])?Ye:r[Be]<0||r[Be]>59?Be:r[ze]<0||r[ze]>59?ze:r[qe]<0||r[qe]>999?qe:-1,m(e)._overflowDayOfYear&&(t<Ne||t>je)&&(t=je),m(e)._overflowWeeks&&-1===t&&(t=He),m(e)._overflowWeekday&&-1===t&&(t=Ge),m(e).overflow=t),e}var Sr=/^\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)?)?$/,xr=/^\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)?)?$/,_r=/Z|[+-]\d\d(?::?\d\d)?/,Ar=[["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]],Tr=[["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/]],Er=/^\/?Date\((-?\d+)/i,Cr=/^(?:(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}))$/,kr={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mr(e){var t,r,n,i,s,a,o=e._i,l=Sr.exec(o)||xr.exec(o),d=Ar.length,c=Tr.length;if(l){for(m(e).iso=!0,t=0,r=d;t<r;t++)if(Ar[t][1].exec(l[1])){i=Ar[t][0],n=!1!==Ar[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,r=c;t<r;t++)if(Tr[t][1].exec(l[3])){s=(l[2]||" ")+Tr[t][0];break}if(null==s)return void(e._isValid=!1)}if(!n&&null!=s)return void(e._isValid=!1);if(l[4]){if(!_r.exec(l[4]))return void(e._isValid=!1);a="Z"}e._f=i+(s||"")+(a||""),zr(e)}else e._isValid=!1}function Dr(e,t,r,n,i,s){var a=[Lr(e),nt.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(i,10)];return s&&a.push(parseInt(s,10)),a}function Lr(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Or(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rr(e,t,r){return!e||It.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(m(r).weekdayMismatch=!0,r._isValid=!1,!1)}function Pr(e,t,r){if(e)return kr[e];if(t)return 0;var n=parseInt(r,10),i=n%100;return(n-i)/100*60+i}function Ir(e){var t,r=Cr.exec(Or(e._i));if(r){if(t=Dr(r[4],r[3],r[2],r[5],r[6],r[7]),!Rr(r[1],t,e))return;e._a=t,e._tzm=Pr(r[8],r[9],r[10]),e._d=bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),m(e).rfc2822=!0}else e._isValid=!1}function Nr(e){var t=Er.exec(e._i);null===t?(Mr(e),!1===e._isValid&&(delete e._isValid,Ir(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:r.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Fr(e,t,r){return null!=e?e:null!=t?t:r}function jr(e){var t=new Date(r.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Yr(e){var t,r,n,i,s,a=[];if(!e._d){for(n=jr(e),e._w&&null==e._a[je]&&null==e._a[Fe]&&Br(e),null!=e._dayOfYear&&(s=Fr(e._a[Ne],n[Ne]),(e._dayOfYear>We(s)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),r=bt(s,0,e._dayOfYear),e._a[Fe]=r.getUTCMonth(),e._a[je]=r.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=n[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ye]&&0===e._a[Be]&&0===e._a[ze]&&0===e._a[qe]&&(e._nextDay=!0,e._a[Ye]=0),e._d=(e._useUTC?bt:yt).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ye]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}function Br(e){var t,r,n,i,s,a,o,l,d;null!=(t=e._w).GG||null!=t.W||null!=t.E?(s=1,a=4,r=Fr(t.GG,e._a[Ne],_t(Zr(),1,4).year),n=Fr(t.W,1),((i=Fr(t.E,1))<1||i>7)&&(l=!0)):(s=e._locale._week.dow,a=e._locale._week.doy,d=_t(Zr(),s,a),r=Fr(t.gg,e._a[Ne],d.year),n=Fr(t.w,d.week),null!=t.d?((i=t.d)<0||i>6)&&(l=!0):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),n<1||n>At(r,s,a)?m(e)._overflowWeeks=!0:null!=l?m(e)._overflowWeekday=!0:(o=xt(r,n,i,s,a),e._a[Ne]=o.year,e._dayOfYear=o.dayOfYear)}function zr(e){if(e._f!==r.ISO_8601)if(e._f!==r.RFC_2822){e._a=[],m(e).empty=!0;var t,n,i,s,a,o,l,d=""+e._i,c=d.length,u=0;for(l=(i=H(e._f,e._locale).match(I)||[]).length,t=0;t<l;t++)s=i[t],(n=(d.match(Ee(s,e))||[])[0])&&((a=d.substr(0,d.indexOf(n))).length>0&&m(e).unusedInput.push(a),d=d.slice(d.indexOf(n)+n.length),u+=n.length),j[s]?(n?m(e).empty=!1:m(e).unusedTokens.push(s),Pe(s,n,e)):e._strict&&!n&&m(e).unusedTokens.push(s);m(e).charsLeftOver=c-u,d.length>0&&m(e).unusedInput.push(d),e._a[Ye]<=12&&!0===m(e).bigHour&&e._a[Ye]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[Ye]=qr(e._locale,e._a[Ye],e._meridiem),null!==(o=m(e).era)&&(e._a[Ne]=e._locale.erasConvertYear(o,e._a[Ne])),Yr(e),br(e)}else Ir(e);else Mr(e)}function qr(e,t,r){var n;return null==r?t:null!=e.meridiemHour?e.meridiemHour(t,r):null!=e.isPM?((n=e.isPM(r))&&t<12&&(t+=12),n||12!==t||(t=0),t):t}function Hr(e){var t,r,n,i,s,a,o=!1,l=e._f.length;if(0===l)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)s=0,a=!1,t=b({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],zr(t),g(t)&&(a=!0),s+=m(t).charsLeftOver,s+=10*m(t).unusedTokens.length,m(t).score=s,o?s<n&&(n=s,r=t):(null==n||s<n||a)&&(n=s,r=t,a&&(o=!0));p(e,r||t)}function Gr(e){if(!e._d){var t=re(e._i),r=void 0===t.day?t.date:t.day;e._a=u([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Yr(e)}}function Wr(e){var t=new S(br(Ur(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Ur(e){var t=e._i,r=e._f;return e._locale=e._locale||wr(e._l),null===t||void 0===r&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new S(br(t)):(c(t)?e._d=t:i(r)?Hr(e):r?zr(e):Vr(e),g(e)||(e._d=null),e))}function Vr(e){var t=e._i;l(t)?e._d=new Date(r.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?Nr(e):i(t)?(e._a=u(t.slice(0),function(e){return parseInt(e,10)}),Yr(e)):s(t)?Gr(e):d(t)?e._d=new Date(t):r.createFromInputFallback(e)}function $r(e,t,r,n,a){var l={};return!0!==t&&!1!==t||(n=t,t=void 0),!0!==r&&!1!==r||(n=r,r=void 0),(s(e)&&o(e)||i(e)&&0===e.length)&&(e=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=a,l._l=r,l._i=e,l._f=t,l._strict=n,Wr(l)}function Zr(e,t,r,n){return $r(e,t,r,n,!1)}r.createFromInputFallback=A("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":""))}),r.ISO_8601=function(){},r.RFC_2822=function(){};var Xr=A("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()}),Qr=A("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Zr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()});function Kr(e,t){var r,n;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Zr();for(r=t[0],n=1;n<t.length;++n)t[n].isValid()&&!t[n][e](r)||(r=t[n]);return r}function Jr(){return Kr("isBefore",[].slice.call(arguments,0))}function en(){return Kr("isAfter",[].slice.call(arguments,0))}var tn=function(){return Date.now?Date.now():+new Date},rn=["year","quarter","month","week","day","hour","minute","second","millisecond"];function nn(e){var t,r,n=!1,i=rn.length;for(t in e)if(a(e,t)&&(-1===Ue.call(rn,t)||null!=e[t]&&isNaN(e[t])))return!1;for(r=0;r<i;++r)if(e[rn[r]]){if(n)return!1;parseFloat(e[rn[r]])!==De(e[rn[r]])&&(n=!0)}return!0}function sn(){return this._isValid}function an(){return Mn(NaN)}function on(e){var t=re(e),r=t.year||0,n=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,a=t.day||0,o=t.hour||0,l=t.minute||0,d=t.second||0,c=t.millisecond||0;this._isValid=nn(t),this._milliseconds=+c+1e3*d+6e4*l+1e3*o*60*60,this._days=+a+7*s,this._months=+i+3*n+12*r,this._data={},this._locale=wr(),this._bubble()}function ln(e){return e instanceof on}function dn(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function cn(e,t,r){var n,i=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0;for(n=0;n<i;n++)De(e[n])!==De(t[n])&&a++;return a+s}function un(e,t){Y(e,0,0,function(){var e=this.utcOffset(),r="+";return e<0&&(e=-e,r="-"),r+P(~~(e/60),2)+t+P(~~e%60,2)})}un("Z",":"),un("ZZ",""),Te("Z",be),Te("ZZ",be),Oe(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=hn(be,e)});var pn=/([\+\-]|\d\d)/gi;function hn(e,t){var r,n,i=(t||"").match(e);return null===i?null:0===(n=60*(r=((i[i.length-1]||[])+"").match(pn)||["-",0,0])[1]+De(r[2]))?0:"+"===r[0]?n:-n}function fn(e,t){var n,i;return t._isUTC?(n=t.clone(),i=(x(e)||c(e)?e.valueOf():Zr(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+i),r.updateOffset(n,!1),n):Zr(e).local()}function mn(e){return-Math.round(e._d.getTimezoneOffset())}function gn(e,t,n){var i,s=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"==typeof e){if(null===(e=hn(be,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=mn(this)),this._offset=e,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==e&&(!t||this._changeInProgress?Pn(this,Mn(e-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:mn(this)}function vn(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function wn(e){return this.utcOffset(0,e)}function yn(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(mn(this),"m")),this}function bn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=hn(ye,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Sn(e){return!!this.isValid()&&(e=e?Zr(e).utcOffset():0,(this.utcOffset()-e)%60==0)}function xn(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function _n(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return b(t,this),(t=Ur(t))._a?(e=t._isUTC?h(t._a):Zr(t._a),this._isDSTShifted=this.isValid()&&cn(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function An(){return!!this.isValid()&&!this._isUTC}function Tn(){return!!this.isValid()&&this._isUTC}function En(){return!!this.isValid()&&this._isUTC&&0===this._offset}r.updateOffset=function(){};var Cn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,kn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mn(e,t){var r,n,i,s=e,o=null;return ln(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(o=Cn.exec(e))?(r="-"===o[1]?-1:1,s={y:0,d:De(o[je])*r,h:De(o[Ye])*r,m:De(o[Be])*r,s:De(o[ze])*r,ms:De(dn(1e3*o[qe]))*r}):(o=kn.exec(e))?(r="-"===o[1]?-1:1,s={y:Dn(o[2],r),M:Dn(o[3],r),w:Dn(o[4],r),d:Dn(o[5],r),h:Dn(o[6],r),m:Dn(o[7],r),s:Dn(o[8],r)}):null==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=On(Zr(s.from),Zr(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),n=new on(s),ln(e)&&a(e,"_locale")&&(n._locale=e._locale),ln(e)&&a(e,"_isValid")&&(n._isValid=e._isValid),n}function Dn(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Ln(e,t){var r={};return r.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function On(e,t){var r;return e.isValid()&&t.isValid()?(t=fn(t,e),e.isBefore(t)?r=Ln(e,t):((r=Ln(t,e)).milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Rn(e,t){return function(r,n){var i;return null===n||isNaN(+n)||(C(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=r,r=n,n=i),Pn(this,Mn(r,n),e),this}}function Pn(e,t,n,i){var s=t._milliseconds,a=dn(t._days),o=dn(t._months);e.isValid()&&(i=null==i||i,o&&ut(e,Xe(e,"Month")+o*n),a&&Qe(e,"Date",Xe(e,"Date")+a*n),s&&e._d.setTime(e._d.valueOf()+s*n),i&&r.updateOffset(e,a||o))}Mn.fn=on.prototype,Mn.invalid=an;var In=Rn(1,"add"),Nn=Rn(-1,"subtract");function Fn(e){return"string"==typeof e||e instanceof String}function jn(e){return x(e)||c(e)||Fn(e)||d(e)||Bn(e)||Yn(e)||null==e}function Yn(e){var t,r,n=s(e)&&!o(e),i=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],d=l.length;for(t=0;t<d;t+=1)r=l[t],i=i||a(e,r);return n&&i}function Bn(e){var t=i(e),r=!1;return t&&(r=0===e.filter(function(t){return!d(t)&&Fn(e)}).length),t&&r}function zn(e){var t,r,n=s(e)&&!o(e),i=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<l.length;t+=1)r=l[t],i=i||a(e,r);return n&&i}function qn(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Hn(e,t){1===arguments.length&&(arguments[0]?jn(arguments[0])?(e=arguments[0],t=void 0):zn(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Zr(),i=fn(n,this).startOf("day"),s=r.calendarFormat(this,i)||"sameElse",a=t&&(k(t[s])?t[s].call(this,n):t[s]);return this.format(a||this.localeData().calendar(s,this,Zr(n)))}function Gn(){return new S(this)}function Wn(e,t){var r=x(e)?e:Zr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf())}function Un(e,t){var r=x(e)?e:Zr(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf())}function Vn(e,t,r,n){var i=x(e)?e:Zr(e),s=x(t)?t:Zr(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(n=n||"()")[0]?this.isAfter(i,r):!this.isBefore(i,r))&&(")"===n[1]?this.isBefore(s,r):!this.isAfter(s,r))}function $n(e,t){var r,n=x(e)?e:Zr(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=te(t)||"millisecond")?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf()))}function Zn(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Xn(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qn(e,t,r){var n,i,s;if(!this.isValid())return NaN;if(!(n=fn(e,this)).isValid())return NaN;switch(i=6e4*(n.utcOffset()-this.utcOffset()),t=te(t)){case"year":s=Kn(this,n)/12;break;case"month":s=Kn(this,n);break;case"quarter":s=Kn(this,n)/3;break;case"second":s=(this-n)/1e3;break;case"minute":s=(this-n)/6e4;break;case"hour":s=(this-n)/36e5;break;case"day":s=(this-n-i)/864e5;break;case"week":s=(this-n-i)/6048e5;break;default:s=this-n}return r?s:Me(s)}function Kn(e,t){if(e.date()<t.date())return-Kn(t,e);var r=12*(t.year()-e.year())+(t.month()-e.month()),n=e.clone().add(r,"months");return-(r+(t-n<0?(t-n)/(n-e.clone().add(r-1,"months")):(t-n)/(e.clone().add(r+1,"months")-n)))||0}function Jn(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ei(e){if(!this.isValid())return null;var t=!0!==e,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?q(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):k(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",q(r,"Z")):q(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,r,n,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",n=s+'[")]',this.format(e+t+r+n)}function ri(e){e||(e=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var t=q(this,e);return this.localeData().postformat(t)}function ni(e,t){return this.isValid()&&(x(e)&&e.isValid()||Zr(e).isValid())?Mn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ii(e){return this.from(Zr(),e)}function si(e,t){return this.isValid()&&(x(e)&&e.isValid()||Zr(e).isValid())?Mn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Zr(),e)}function oi(e){var t;return void 0===e?this._locale._abbr:(null!=(t=wr(e))&&(this._locale=t),this)}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var li=A("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function di(){return this._locale}var ci=1e3,ui=60*ci,pi=60*ui,hi=3506328*pi;function fi(e,t){return(e%t+t)%t}function mi(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-hi:new Date(e,t,r).valueOf()}function gi(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-hi:Date.UTC(e,t,r)}function vi(e){var t,n;if(void 0===(e=te(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gi:mi,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-=fi(t+(this._isUTC?0:this.utcOffset()*ui),pi);break;case"minute":t=this._d.valueOf(),t-=fi(t,ui);break;case"second":t=this._d.valueOf(),t-=fi(t,ci)}return this._d.setTime(t),r.updateOffset(this,!0),this}function wi(e){var t,n;if(void 0===(e=te(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?gi:mi,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+=pi-fi(t+(this._isUTC?0:this.utcOffset()*ui),pi)-1;break;case"minute":t=this._d.valueOf(),t+=ui-fi(t,ui)-1;break;case"second":t=this._d.valueOf(),t+=ci-fi(t,ci)-1}return this._d.setTime(t),r.updateOffset(this,!0),this}function yi(){return this._d.valueOf()-6e4*(this._offset||0)}function bi(){return Math.floor(this.valueOf()/1e3)}function Si(){return new Date(this.valueOf())}function xi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function _i(){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 Ai(){return this.isValid()?this.toISOString():null}function Ti(){return g(this)}function Ei(){return p({},m(this))}function Ci(){return m(this).overflow}function ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Mi(e,t){var n,i,s,a=this._eras||wr("en")._eras;for(n=0,i=a.length;n<i;++n)switch("string"==typeof a[n].since&&(s=r(a[n].since).startOf("day"),a[n].since=s.valueOf()),typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":s=r(a[n].until).startOf("day").valueOf(),a[n].until=s.valueOf()}return a}function Di(e,t,r){var n,i,s,a,o,l=this.eras();for(e=e.toUpperCase(),n=0,i=l.length;n<i;++n)if(s=l[n].name.toUpperCase(),a=l[n].abbr.toUpperCase(),o=l[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(a===e)return l[n];break;case"NNNN":if(s===e)return l[n];break;case"NNNNN":if(o===e)return l[n]}else if([s,a,o].indexOf(e)>=0)return l[n]}function Li(e,t){var n=e.since<=e.until?1:-1;return void 0===t?r(e.since).year():r(e.since).year()+(t-e.offset)*n}function Oi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].name;if(n[e].until<=r&&r<=n[e].since)return n[e].name}return""}function Ri(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].narrow;if(n[e].until<=r&&r<=n[e].since)return n[e].narrow}return""}function Pi(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e){if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until)return n[e].abbr;if(n[e].until<=r&&r<=n[e].since)return n[e].abbr}return""}function Ii(){var e,t,n,i,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(n=s[e].since<=s[e].until?1:-1,i=this.clone().startOf("day").valueOf(),s[e].since<=i&&i<=s[e].until||s[e].until<=i&&i<=s[e].since)return(this.year()-r(s[e].since).year())*n+s[e].offset;return this.year()}function Ni(e){return a(this,"_erasNameRegex")||Hi.call(this),e?this._erasNameRegex:this._erasRegex}function Fi(e){return a(this,"_erasAbbrRegex")||Hi.call(this),e?this._erasAbbrRegex:this._erasRegex}function ji(e){return a(this,"_erasNarrowRegex")||Hi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yi(e,t){return t.erasAbbrRegex(e)}function Bi(e,t){return t.erasNameRegex(e)}function zi(e,t){return t.erasNarrowRegex(e)}function qi(e,t){return t._eraYearOrdinalRegex||ve}function Hi(){var e,t,r,n,i,s=[],a=[],o=[],l=[],d=this.eras();for(e=0,t=d.length;e<t;++e)r=ke(d[e].name),n=ke(d[e].abbr),i=ke(d[e].narrow),a.push(r),s.push(n),o.push(i),l.push(r),l.push(n),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+a.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+o.join("|")+")","i")}function Gi(e,t){Y(0,[e,e.length],0,t)}function Wi(e){return Qi.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ui(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Vi(){return At(this.year(),1,4)}function $i(){return At(this.isoWeekYear(),1,4)}function Zi(){var e=this.localeData()._week;return At(this.year(),e.dow,e.doy)}function Xi(){var e=this.localeData()._week;return At(this.weekYear(),e.dow,e.doy)}function Qi(e,t,r,n,i){var s;return null==e?_t(this,n,i).year:(t>(s=At(e,n,i))&&(t=s),Ki.call(this,e,t,r,n,i))}function Ki(e,t,r,n,i){var s=xt(e,t,r,n,i),a=bt(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}function Ji(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),Te("N",Yi),Te("NN",Yi),Te("NNN",Yi),Te("NNNN",Bi),Te("NNNNN",zi),Oe(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var i=r._locale.erasParse(e,n,r._strict);i?m(r).era=i:m(r).invalidEra=e}),Te("y",ve),Te("yy",ve),Te("yyy",ve),Te("yyyy",ve),Te("yo",qi),Oe(["y","yy","yyy","yyyy"],Ne),Oe(["yo"],function(e,t,r,n){var i;r._locale._eraYearOrdinalRegex&&(i=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[Ne]=r._locale.eraYearOrdinalParse(e,i):t[Ne]=parseInt(e,10)}),Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Gi("gggg","weekYear"),Gi("ggggg","weekYear"),Gi("GGGG","isoWeekYear"),Gi("GGGGG","isoWeekYear"),Te("G",we),Te("g",we),Te("GG",ue,oe),Te("gg",ue,oe),Te("GGGG",me,de),Te("gggg",me,de),Te("GGGGG",ge,ce),Te("ggggg",ge,ce),Re(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=De(e)}),Re(["gg","GG"],function(e,t,n,i){t[i]=r.parseTwoDigitYear(e)}),Y("Q",0,"Qo","quarter"),Te("Q",ae),Oe("Q",function(e,t){t[Fe]=3*(De(e)-1)}),Y("D",["DD",2],"Do","date"),Te("D",ue,_e),Te("DD",ue,oe),Te("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),Oe(["D","DD"],je),Oe("Do",function(e,t){t[je]=De(e.match(ue)[0])});var es=Ze("Date",!0);function ts(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}Y("DDD",["DDDD",3],"DDDo","dayOfYear"),Te("DDD",fe),Te("DDDD",le),Oe(["DDD","DDDD"],function(e,t,r){r._dayOfYear=De(e)}),Y("m",["mm",2],0,"minute"),Te("m",ue,Ae),Te("mm",ue,oe),Oe(["m","mm"],Be);var rs=Ze("Minutes",!1);Y("s",["ss",2],0,"second"),Te("s",ue,Ae),Te("ss",ue,oe),Oe(["s","ss"],ze);var ns,is,ss=Ze("Seconds",!1);for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),Te("S",fe,ae),Te("SS",fe,oe),Te("SSS",fe,le),ns="SSSS";ns.length<=9;ns+="S")Te(ns,ve);function as(e,t){t[qe]=De(1e3*("0."+e))}for(ns="S";ns.length<=9;ns+="S")Oe(ns,as);function os(){return this._isUTC?"UTC":""}function ls(){return this._isUTC?"Coordinated Universal Time":""}is=Ze("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName");var ds=S.prototype;function cs(e){return Zr(1e3*e)}function us(){return Zr.apply(null,arguments).parseZone()}function ps(e){return e}ds.add=In,ds.calendar=Hn,ds.clone=Gn,ds.diff=Qn,ds.endOf=wi,ds.format=ri,ds.from=ni,ds.fromNow=ii,ds.to=si,ds.toNow=ai,ds.get=Ke,ds.invalidAt=Ci,ds.isAfter=Wn,ds.isBefore=Un,ds.isBetween=Vn,ds.isSame=$n,ds.isSameOrAfter=Zn,ds.isSameOrBefore=Xn,ds.isValid=Ti,ds.lang=li,ds.locale=oi,ds.localeData=di,ds.max=Qr,ds.min=Xr,ds.parsingFlags=Ei,ds.set=Je,ds.startOf=vi,ds.subtract=Nn,ds.toArray=xi,ds.toObject=_i,ds.toDate=Si,ds.toISOString=ei,ds.inspect=ti,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ds[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ds.toJSON=Ai,ds.toString=Jn,ds.unix=bi,ds.valueOf=yi,ds.creationData=ki,ds.eraName=Oi,ds.eraNarrow=Ri,ds.eraAbbr=Pi,ds.eraYear=Ii,ds.year=Ve,ds.isLeapYear=$e,ds.weekYear=Wi,ds.isoWeekYear=Ui,ds.quarter=ds.quarters=Ji,ds.month=pt,ds.daysInMonth=ht,ds.week=ds.weeks=Mt,ds.isoWeek=ds.isoWeeks=Dt,ds.weeksInYear=Zi,ds.weeksInWeekYear=Xi,ds.isoWeeksInYear=Vi,ds.isoWeeksInISOWeekYear=$i,ds.date=es,ds.day=ds.days=Wt,ds.weekday=Ut,ds.isoWeekday=Vt,ds.dayOfYear=ts,ds.hour=ds.hours=ir,ds.minute=ds.minutes=rs,ds.second=ds.seconds=ss,ds.millisecond=ds.milliseconds=is,ds.utcOffset=gn,ds.utc=wn,ds.local=yn,ds.parseZone=bn,ds.hasAlignedHourOffset=Sn,ds.isDST=xn,ds.isLocal=An,ds.isUtcOffset=Tn,ds.isUtc=En,ds.isUTC=En,ds.zoneAbbr=os,ds.zoneName=ls,ds.dates=A("dates accessor is deprecated. Use date instead.",es),ds.months=A("months accessor is deprecated. Use month instead",pt),ds.years=A("years accessor is deprecated. Use year instead",Ve),ds.zone=A("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",vn),ds.isDSTShifted=A("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",_n);var hs=L.prototype;function fs(e,t,r,n){var i=wr(),s=h().set(n,t);return i[r](s,e)}function ms(e,t,r){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return fs(e,t,r,"month");var n,i=[];for(n=0;n<12;n++)i[n]=fs(e,n,r,"month");return i}function gs(e,t,r,n){"boolean"==typeof e?(d(t)&&(r=t,t=void 0),t=t||""):(r=t=e,e=!1,d(t)&&(r=t,t=void 0),t=t||"");var i,s=wr(),a=e?s._week.dow:0,o=[];if(null!=r)return fs(t,(r+a)%7,n,"day");for(i=0;i<7;i++)o[i]=fs(t,(i+a)%7,n,"day");return o}function vs(e,t){return ms(e,t,"months")}function ws(e,t){return ms(e,t,"monthsShort")}function ys(e,t,r){return gs(e,t,r,"weekdays")}function bs(e,t,r){return gs(e,t,r,"weekdaysShort")}function Ss(e,t,r){return gs(e,t,r,"weekdaysMin")}hs.calendar=R,hs.longDateFormat=W,hs.invalidDate=V,hs.ordinal=X,hs.preparse=ps,hs.postformat=ps,hs.relativeTime=K,hs.pastFuture=J,hs.set=M,hs.eras=Mi,hs.erasParse=Di,hs.erasConvertYear=Li,hs.erasAbbrRegex=Fi,hs.erasNameRegex=Ni,hs.erasNarrowRegex=ji,hs.months=ot,hs.monthsShort=lt,hs.monthsParse=ct,hs.monthsRegex=mt,hs.monthsShortRegex=ft,hs.week=Tt,hs.firstDayOfYear=kt,hs.firstDayOfWeek=Ct,hs.weekdays=Bt,hs.weekdaysMin=qt,hs.weekdaysShort=zt,hs.weekdaysParse=Gt,hs.weekdaysRegex=$t,hs.weekdaysShortRegex=Zt,hs.weekdaysMinRegex=Xt,hs.isPM=rr,hs.meridiem=sr,mr("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;return e+(1===De(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),r.lang=A("moment.lang is deprecated. Use moment.locale instead.",mr),r.langData=A("moment.langData is deprecated. Use moment.localeData instead.",wr);var xs=Math.abs;function _s(){var e=this._data;return this._milliseconds=xs(this._milliseconds),this._days=xs(this._days),this._months=xs(this._months),e.milliseconds=xs(e.milliseconds),e.seconds=xs(e.seconds),e.minutes=xs(e.minutes),e.hours=xs(e.hours),e.months=xs(e.months),e.years=xs(e.years),this}function As(e,t,r,n){var i=Mn(t,r);return e._milliseconds+=n*i._milliseconds,e._days+=n*i._days,e._months+=n*i._months,e._bubble()}function Ts(e,t){return As(this,e,t,1)}function Es(e,t){return As(this,e,t,-1)}function Cs(e){return e<0?Math.floor(e):Math.ceil(e)}function ks(){var e,t,r,n,i,s=this._milliseconds,a=this._days,o=this._months,l=this._data;return s>=0&&a>=0&&o>=0||s<=0&&a<=0&&o<=0||(s+=864e5*Cs(Ds(o)+a),a=0,o=0),l.milliseconds=s%1e3,e=Me(s/1e3),l.seconds=e%60,t=Me(e/60),l.minutes=t%60,r=Me(t/60),l.hours=r%24,a+=Me(r/24),o+=i=Me(Ms(a)),a-=Cs(Ds(i)),n=Me(o/12),o%=12,l.days=a,l.months=o,l.years=n,this}function Ms(e){return 4800*e/146097}function Ds(e){return 146097*e/4800}function Ls(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if("month"===(e=te(e))||"quarter"===e||"year"===e)switch(t=this._days+n/864e5,r=this._months+Ms(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Ds(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return 24*t+n/36e5;case"minute":return 1440*t+n/6e4;case"second":return 86400*t+n/1e3;case"millisecond":return Math.floor(864e5*t)+n;default:throw new Error("Unknown unit "+e)}}function Os(e){return function(){return this.as(e)}}var Rs=Os("ms"),Ps=Os("s"),Is=Os("m"),Ns=Os("h"),Fs=Os("d"),js=Os("w"),Ys=Os("M"),Bs=Os("Q"),zs=Os("y"),qs=Rs;function Hs(){return Mn(this)}function Gs(e){return e=te(e),this.isValid()?this[e+"s"]():NaN}function Ws(e){return function(){return this.isValid()?this._data[e]:NaN}}var Us=Ws("milliseconds"),Vs=Ws("seconds"),$s=Ws("minutes"),Zs=Ws("hours"),Xs=Ws("days"),Qs=Ws("months"),Ks=Ws("years");function Js(){return Me(this.days()/7)}var ea=Math.round,ta={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ra(e,t,r,n,i){return i.relativeTime(t||1,!!r,e,n)}function na(e,t,r,n){var i=Mn(e).abs(),s=ea(i.as("s")),a=ea(i.as("m")),o=ea(i.as("h")),l=ea(i.as("d")),d=ea(i.as("M")),c=ea(i.as("w")),u=ea(i.as("y")),p=s<=r.ss&&["s",s]||s<r.s&&["ss",s]||a<=1&&["m"]||a<r.m&&["mm",a]||o<=1&&["h"]||o<r.h&&["hh",o]||l<=1&&["d"]||l<r.d&&["dd",l];return null!=r.w&&(p=p||c<=1&&["w"]||c<r.w&&["ww",c]),(p=p||d<=1&&["M"]||d<r.M&&["MM",d]||u<=1&&["y"]||["yy",u])[2]=t,p[3]=+e>0,p[4]=n,ra.apply(null,p)}function ia(e){return void 0===e?ea:"function"==typeof e&&(ea=e,!0)}function sa(e,t){return void 0!==ta[e]&&(void 0===t?ta[e]:(ta[e]=t,"s"===e&&(ta.ss=t-1),!0))}function aa(e,t){if(!this.isValid())return this.localeData().invalidDate();var r,n,i=!1,s=ta;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(i=e),"object"==typeof t&&(s=Object.assign({},ta,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=na(this,!i,s,r=this.localeData()),i&&(n=r.pastFuture(+this,n)),r.postformat(n)}var oa=Math.abs;function la(e){return(e>0)-(e<0)||+e}function da(){if(!this.isValid())return this.localeData().invalidDate();var e,t,r,n,i,s,a,o,l=oa(this._milliseconds)/1e3,d=oa(this._days),c=oa(this._months),u=this.asSeconds();return u?(e=Me(l/60),t=Me(e/60),l%=60,e%=60,r=Me(c/12),c%=12,n=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=u<0?"-":"",s=la(this._months)!==la(u)?"-":"",a=la(this._days)!==la(u)?"-":"",o=la(this._milliseconds)!==la(u)?"-":"",i+"P"+(r?s+r+"Y":"")+(c?s+c+"M":"")+(d?a+d+"D":"")+(t||e||l?"T":"")+(t?o+t+"H":"")+(e?o+e+"M":"")+(l?o+n+"S":"")):"P0D"}var ca=on.prototype;return ca.isValid=sn,ca.abs=_s,ca.add=Ts,ca.subtract=Es,ca.as=Ls,ca.asMilliseconds=Rs,ca.asSeconds=Ps,ca.asMinutes=Is,ca.asHours=Ns,ca.asDays=Fs,ca.asWeeks=js,ca.asMonths=Ys,ca.asQuarters=Bs,ca.asYears=zs,ca.valueOf=qs,ca._bubble=ks,ca.clone=Hs,ca.get=Gs,ca.milliseconds=Us,ca.seconds=Vs,ca.minutes=$s,ca.hours=Zs,ca.days=Xs,ca.weeks=Js,ca.months=Qs,ca.years=Ks,ca.humanize=aa,ca.toISOString=da,ca.toString=da,ca.toJSON=da,ca.locale=oi,ca.localeData=di,ca.toIsoString=A("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",da),ca.lang=li,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),Te("x",we),Te("X",Se),Oe("X",function(e,t,r){r._d=new Date(1e3*parseFloat(e))}),Oe("x",function(e,t,r){r._d=new Date(De(e))}),
30
30
  //! moment.js
31
31
  r.version="2.30.1",n(Zr),r.fn=ds,r.min=Jr,r.max=en,r.now=tn,r.utc=h,r.unix=cs,r.months=vs,r.isDate=c,r.locale=mr,r.invalid=v,r.duration=Mn,r.isMoment=x,r.weekdays=ys,r.parseZone=us,r.localeData=wr,r.isDuration=ln,r.monthsShort=ws,r.weekdaysMin=Ss,r.defineLocale=gr,r.updateLocale=vr,r.locales=yr,r.weekdaysShort=bs,r.normalizeUnits=te,r.relativeTimeRounding=ia,r.relativeTimeThreshold=sa,r.calendarFormat=qn,r.prototype=ds,r.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"},r}();var yt=d(wt.exports);const bt=e=>{const t="string"==typeof e?new Date(e):e,r=yt(t,"YYYYMMDD").fromNow(!1);return"a few seconds ago"===r?"Just now":r},St={ALLOWED_TAGS:["p","br","strong","em","a"],ALLOWED_ATTR:["href","target","rel","class"]};function xt({data:r,handleFunc:n,typeTrending:a=!1,isHover:o=!0}){const[l,d]=t.useState(!1),[c,u]=t.useState(!1),p=t.useRef(null),{subscribeFeatureReqUser:h,featureReqUsers:f,removeFeatureRequest:m,updateFeatureRequest:g}=le(),{navigateTo:v}=$(),w=N(e=>e.isAdmin),y=()=>u(e=>!e);t.useEffect(()=>()=>{p.current&&(p.current(),p.current=null)},[]);const b=e.jsx(i.Button,{variant:"tertiary",onClick:()=>y(),icon:s.ChevronDownIcon}),S=ft.sanitize((null==r?void 0:r.description)||"",St),x=(null==r?void 0:r.shopId)?null==f?void 0:f[r.shopId]:void 0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"Avada-FeatureReq-Card "+(o?"Avada-FeatureReq-CardHover":""),onClick:e=>{e.target.closest(".Avada-FeatureReq-Action")||v(`/feature-request/details/${r.id}`)},children:[e.jsxs("div",{className:"Avada-FeatureReq-Header",children:[e.jsxs("div",{className:"Avada-Feature-Header__Info",children:[e.jsx("div",{className:"Avada-FeatureReq-Avatar",children:e.jsx(mt,{objectFit:"cover",imageStyle:{maxHeight:"100px"},src:!(null==r?void 0:r.isAnonymous)&&(null==r?void 0:r.avatarShop)?r.avatarShop:"https://cdnapps.avada.io/ag-blog/AvatarFeatureReq.png",preview:"https://cdnapps.avada.io/ag-blog/AvatarFeatureReq.png",alt:""})}),e.jsxs("div",{className:"Avada-Feature-Header__Title",children:[e.jsxs("div",{style:{display:"flex"},children:[e.jsx("div",{onMouseEnter:()=>{(null==f?void 0:f[r.shopId])||p.current||h(r.shopId||r.id).then(e=>{"function"==typeof e&&(p.current=e)})},onMouseLeave:()=>{},children:(null==r?void 0:r.isAnonymous)?e.jsx(i.Text,{as:"p",fontWeight:"bold",children:"Anonymous"}):e.jsx(i.Tooltip,{content:e.jsx("div",{children:e.jsxs(i.BlockStack,{gap:"300",children:[e.jsxs(i.Text,{as:"p",tone:"subdued",children:["Submitted request: ",(null==x?void 0:x.featureRequestCount)||0]}),e.jsxs(i.Text,{as:"p",tone:"subdued",children:["Domain: ",(null==x?void 0:x.domain)||(null==r?void 0:r.domain)||""]})]})}),children:e.jsx(i.Text,{as:"p",fontWeight:"bold",children:(null==r?void 0:r.isAnonymous)?"Anonymous":null==r?void 0:r.shopOwner})})}),!a&&e.jsxs(e.Fragment,{children:[e.jsx(i.Icon,{source:s.BulletIcon,tone:"base"}),e.jsx(i.Text,{as:"p",fontWeight:"regular",tone:"subdued",children:bt(r.createdAt)})]})]}),e.jsx("div",{children:a?e.jsx(i.Text,{as:"p",fontWeight:"regular",tone:"subdued",children:bt(r.createdAt)}):e.jsxs(i.InlineStack,{gap:"200",children:[e.jsx(W,{status:null==r?void 0:r.status}),w&&e.jsx("div",{onClick:e=>e.stopPropagation(),children:e.jsx(i.Popover,{active:c,activator:b,autofocusTarget:"first-node",onClose:y,children:e.jsx(i.ActionList,{actionRole:"menuitem",items:G.filter(e=>e!==r.status).map(e=>({content:e,onAction:()=>{y(),g(r.id,{status:e}).catch(console.error)}}))})})})]})})]})]}),e.jsx("div",{children:e.jsx(U,{type:null==r?void 0:r.featureType})})]}),e.jsxs("div",{className:"Avada-FeatureReq-Body",children:[e.jsx("div",{className:"Avada-FeatureReq-Body__Title",children:null==r?void 0:r.title}),e.jsx("div",{className:"Avada-FeatureReq-Body__Descripstion",dangerouslySetInnerHTML:{__html:S}})]}),e.jsxs("div",{className:"Avada-FeatureReq-ActionItem",children:[e.jsx(de,{dataQuery:r,handleComment:n,byFeatureReq:!0,isReply:!1}),w&&e.jsx("div",{onClick:e=>e.stopPropagation(),children:e.jsx(i.Button,{icon:s.DeleteIcon,onClick:()=>d(!0),variant:"tertiary"})})]})]}),e.jsx(i.Modal,{open:l,onClose:()=>d(!1),title:"Delete request",primaryAction:{content:"Delete",onAction:()=>{try{if(!w)return;m(r.id).then(),v("/feature-request")}finally{d(!1)}},destructive:!0},secondaryActions:[{content:"Cancel",onAction:()=>d(!1)}],children:e.jsx(i.Modal.Section,{children:"This action will not be redone. Do you want to continue?"})})]})}const _t=()=>e.jsxs("svg",{width:"592",height:"162",viewBox:"0 0 622 176",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("rect",{width:"32",height:"32",rx:"16",fill:"#B5B5B5"}),e.jsx("rect",{x:"48",width:"133",height:"20",rx:"8",fill:"#E3E3E3"}),e.jsx("rect",{x:"48",y:"28",width:"76",height:"20",rx:"8",fill:"#E3E3E3"}),e.jsx("rect",{y:"60",width:"505",height:"20",rx:"8",fill:"#E3E3E3"}),e.jsx("rect",{y:"88",width:"267",height:"20",rx:"8",fill:"#E3E3E3"}),e.jsx("rect",{y:"116",width:"168",height:"20",rx:"8",fill:"#E3E3E3"}),e.jsx("rect",{y:"148",width:"61",height:"28",rx:"14",fill:"#F7F7F7"}),e.jsx("rect",{x:"69",y:"148",width:"61",height:"28",rx:"14",fill:"#F7F7F7"})]}),At={ADD_TAGS:["iframe","h1","h2","h3","h4","h5","h6","p","div","span","strong","em","u","b","i","ul","ol","li","a","img","blockquote","code","pre","hr","br"],ADD_ATTR:["src","width","height","frameborder","allowfullscreen","allow","style","href","target","class","id","align","data-alignment"],FORCE_BODY:!0,KEEP_CONTENT:!0,ALLOW_DATA_ATTR:!0,RETURN_DOM_FRAGMENT:!1,RETURN_DOM:!1,CUSTOM_ELEMENT_HANDLING:{attributeNameCheck:e=>["src","href","style","class","id","align","data-alignment"].includes(e)}},Tt=()=>e.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.6376 1.29665C5.13444 0.517405 6.00621 0 7 0C7.99379 0 8.86557 0.517412 9.36243 1.29667C10.2647 1.09696 11.247 1.34753 11.9498 2.05025C12.6525 2.75297 12.9031 3.73528 12.7034 4.63761C13.4826 5.13444 14 6.00621 14 7C14 7.99379 13.4826 8.86557 12.7034 9.36236C12.9031 10.2647 12.6525 11.247 11.9498 11.9498C11.247 12.6525 10.2647 12.903 9.36243 12.7033C8.86557 13.4826 7.99379 14 7 14C6.00621 14 5.13443 13.4826 4.6376 12.7033C3.73528 12.903 2.75299 12.6524 2.05028 11.9498C1.34757 11.247 1.09699 10.2647 1.29669 9.36243C0.517419 8.86557 0 7.99379 0 7C0 6.00621 0.517433 5.1344 1.29671 4.63757C1.09701 3.73526 1.3476 2.75296 2.0503 2.05025C2.753 1.34755 3.73529 1.09697 4.6376 1.29665ZM5.39503 6.50496L4.40508 7.4949L6.38498 9.47485L9.84977 6.00999L8.85983 5.02005L6.38498 7.4949L5.39503 6.50496Z",fill:"#005BD3"})}),Et=({id:r,isShow:n=!1})=>{var a;const[o,l]=t.useState([]),[d,c]=t.useState(""),[u,p]=t.useState(!1),[h,f]=t.useState(""),[m,g]=t.useState(""),[v,w]=t.useState({}),y=t.useRef({}),{subscribeToComments:b,removeComment:S,subscribeFeatureReqUser:x,featureReqUsers:_,handleComment:A,loadingComment:T}=le(),{fetchApi:E}=X(),C=N(e=>e.shopInfo),k=N(e=>e.isAdmin),M=N(e=>e.appId),D=null===(a=null==_?void 0:_[(null==C?void 0:C.shopId)||(null==C?void 0:C.id)||""])||void 0===a?void 0:a.isUserBlocked;t.useEffect(()=>{let e;return r&&(async()=>{try{const t=await b(r,e=>{l(e)});e=t||void 0}catch(e){console.error("Error initializing comments:",e)}})().catch(console.error),()=>{"function"==typeof e&&e(),Object.values(y.current).forEach(e=>{"function"==typeof e&&e()}),y.current={}}},[r,b]);const L=async e=>{try{await A(e),g(""),c("")}catch(e){console.error("Error submitting comment:",e)}},O=u?o:o.slice(0,3),R=!u&&o.length>3;return e.jsxs(e.Fragment,{children:[O.map(t=>{const r=ft.sanitize(t.content,At),a=null==_?void 0:_[t.shopId],o=k&&!(null==a?void 0:a.isUserBlocked);return e.jsx("div",{className:"Avada-FeatureReq-Card",children:e.jsx("div",{className:"Avada-FeatureReq-Header",children:e.jsxs("div",{className:"Avada-Feature-Header__Info",style:{width:"100%"},children:[e.jsx("div",{className:"Avada-FeatureReq-Avatar",children:e.jsx(mt,{src:null==t?void 0:t.avatarShop,alt:"User avatar"})}),e.jsxs("div",{style:{flex:10},children:[e.jsxs("div",{className:"Avada-Comment-HeaderRow",children:[e.jsxs("div",{onMouseEnter:()=>{return e=t.shopId,void((null==_?void 0:_[e])||y.current[e]||x(e).then(t=>{"function"==typeof t&&(y.current[e]=t)}).catch(e=>{console.error("Error fetching shop support:",e)}));var e},onMouseLeave:()=>{},style:{display:"flex",alignItems:"center",gap:"5px"},children:[e.jsx(i.Text,{as:"p",fontWeight:"bold",children:(null==t?void 0:t.isAnonymous)?"Anonymous":(null==t?void 0:t.isTeamAvada)?e.jsx(i.Text,{as:"p",fontWeight:"bold",children:null==t?void 0:t.shopOwner}):e.jsx(i.Tooltip,{content:e.jsxs(i.BlockStack,{gap:"300",children:[e.jsxs(i.Text,{as:"p",tone:"subdued",children:["Submitted request: ",(null==a?void 0:a.featureRequestCount)||0]}),e.jsxs(i.Text,{as:"p",tone:"subdued",children:["Domain: ",(null==a?void 0:a.domain)||(null==t?void 0:t.domain)||""]})]}),children:e.jsx(i.Text,{as:"p",fontWeight:"bold",children:null==t?void 0:t.shopOwner})})}),(null==t?void 0:t.isTeamAvada)&&e.jsx(Tt,{})]}),e.jsx("div",{children:e.jsx(i.Icon,{source:s.BulletIcon,tone:"base"})}),e.jsx(i.Text,{as:"p",fontWeight:"regular",tone:"subdued",children:bt(t.createdAt)}),o&&e.jsx(i.Button,{icon:s.DisabledIcon,onClick:()=>f(t.id),variant:"plain",loading:v[t.id]||!1,accessibilityLabel:"Block user"}),k&&e.jsx(i.Button,{icon:s.DeleteIcon,onClick:()=>S(t.id),variant:"plain",accessibilityLabel:"Delete comment"})]}),e.jsx("div",{style:{height:"auto"},dangerouslySetInnerHTML:{__html:r}}),e.jsxs(i.BlockStack,{gap:"300",children:[e.jsx(de,{dataQuery:t,byFeatureReq:!1,isReply:!!t.replies,handleComment:()=>c(t.id)}),d===t.id&&e.jsx(i.LegacyCard,{children:e.jsxs("div",{className:"Avada-Comment-Main",onKeyDown:e=>((e,t)=>{if("Enter"===e.key){if(e.shiftKey)return;e.preventDefault(),m.trim().length>0&&!T&&!D&&L({parentId:t,replies:!0,value:m})}})(e,t.id),children:[e.jsx(i.TextField,{value:m,autoFocus:!0,placeholder:"What do you think?",multiline:5,onChange:g,autoComplete:"off",label:"",disabled:D}),e.jsx(i.LegacyCard.Section,{actions:[{content:e.jsx(i.Button,{onClick:()=>{c(""),g("")},children:"Cancel"})},{content:e.jsx(i.Button,{variant:"primary",disabled:m.length<=0||D,loading:T,onClick:()=>{L({parentId:t.id,replies:!0,value:m})},children:"Reply"})}],subdued:!0})]})}),e.jsx(i.BlockStack,{gap:"300",children:n&&e.jsx(Et,{id:t.id})})]})]})]})})},t.id)}),R&&e.jsx("div",{style:{textAlign:"start"},children:e.jsx(i.Button,{icon:s.ChatIcon,variant:"tertiary",onClick:()=>p(!0),children:"More replies"})}),e.jsx(i.Modal,{open:!!h,onClose:()=>f(""),title:"Block user",primaryAction:{destructive:!0,content:"Block",onAction:()=>(async e=>{if((null==C?void 0:C.id)&&k)try{w(t=>({...t,[e]:!0})),await E("/feature-requests/block-user",{method:"POST",body:{data:{shopId:C.shopId||C.id,appId:M,blockUserReq:!0}}})}catch(e){console.error("Error blocking user:",e)}finally{w(t=>({...t,[e]:!1})),f("")}else console.error("Shop info not available or user is not admin")})(h)},secondaryActions:[{content:"Cancel",onAction:()=>f("")}],children:e.jsx(i.Box,{padding:"300",children:"This user will be blocked from all feature requests. Do you want to continue?"})})]})};var Ct=t.memo(Et);function kt(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function Mt(e,t){void 0===e&&(e={}),void 0===t&&(t={});const r=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>r.indexOf(e)<0).forEach(r=>{void 0===e[r]?e[r]=t[r]:kt(t[r])&&kt(e[r])&&Object.keys(t[r]).length>0&&Mt(e[r],t[r])})}const Dt={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Lt(){const e="undefined"!=typeof document?document:{};return Mt(e,Dt),e}const Ot={document:Dt,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Rt(){const e="undefined"!=typeof window?window:{};return Mt(e,Ot),e}function Pt(e,t){return void 0===t&&(t=0),setTimeout(e,t)}function It(){return Date.now()}function Nt(e,t){void 0===t&&(t="x");const r=Rt();let n,i,s;const a=function(e){const t=Rt();let r;return t.getComputedStyle&&(r=t.getComputedStyle(e,null)),!r&&e.currentStyle&&(r=e.currentStyle),r||(r=e.style),r}(e);return r.WebKitCSSMatrix?(i=a.transform||a.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(e=>e.replace(",",".")).join(", ")),s=new r.WebKitCSSMatrix("none"===i?"":i)):(s=a.MozTransform||a.OTransform||a.MsTransform||a.msTransform||a.transform||a.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),n=s.toString().split(",")),"x"===t&&(i=r.WebKitCSSMatrix?s.m41:16===n.length?parseFloat(n[12]):parseFloat(n[4])),"y"===t&&(i=r.WebKitCSSMatrix?s.m42:16===n.length?parseFloat(n[13]):parseFloat(n[5])),i||0}function Ft(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function jt(e){return"undefined"!=typeof window&&void 0!==window.HTMLElement?e instanceof HTMLElement:e&&(1===e.nodeType||11===e.nodeType)}function Yt(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let r=1;r<arguments.length;r+=1){const n=r<0||arguments.length<=r?void 0:arguments[r];if(null!=n&&!jt(n)){const r=Object.keys(Object(n)).filter(e=>t.indexOf(e)<0);for(let t=0,i=r.length;t<i;t+=1){const i=r[t],s=Object.getOwnPropertyDescriptor(n,i);void 0!==s&&s.enumerable&&(Ft(e[i])&&Ft(n[i])?n[i].__swiper__?e[i]=n[i]:Yt(e[i],n[i]):!Ft(e[i])&&Ft(n[i])?(e[i]={},n[i].__swiper__?e[i]=n[i]:Yt(e[i],n[i])):e[i]=n[i])}}}return e}function Bt(e,t,r){e.style.setProperty(t,r)}function zt(e){let{swiper:t,targetPosition:r,side:n}=e;const i=Rt(),s=-t.translate;let a,o=null;const l=t.params.speed;t.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(t.cssModeFrameID);const d=r>s?"next":"prev",c=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,u=()=>{a=(new Date).getTime(),null===o&&(o=a);const e=Math.max(Math.min((a-o)/l,1),0),d=.5-Math.cos(e*Math.PI)/2;let p=s+d*(r-s);if(c(p,r)&&(p=r),t.wrapperEl.scrollTo({[n]:p}),c(p,r))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:p})}),void i.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=i.requestAnimationFrame(u)};u()}function qt(e,t){void 0===t&&(t="");const r=Rt(),n=[...e.children];return r.HTMLSlotElement&&e instanceof HTMLSlotElement&&n.push(...e.assignedElements()),t?n.filter(e=>e.matches(t)):n}function Ht(e){try{return void console.warn(e)}catch(e){}}function Gt(e,t){void 0===t&&(t=[]);const r=document.createElement(e);return r.classList.add(...Array.isArray(t)?t:function(e){return void 0===e&&(e=""),e.trim().split(" ").filter(e=>!!e.trim())}(t)),r}function Wt(e,t){return Rt().getComputedStyle(e,null).getPropertyValue(t)}function Ut(e){let t,r=e;if(r){for(t=0;null!==(r=r.previousSibling);)1===r.nodeType&&(t+=1);return t}}function Vt(e,t){const r=[];let n=e.parentElement;for(;n;)t?n.matches(t)&&r.push(n):r.push(n),n=n.parentElement;return r}function $t(e,t,r){const n=Rt();return e["width"===t?"offsetWidth":"offsetHeight"]+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-right":"margin-top"))+parseFloat(n.getComputedStyle(e,null).getPropertyValue("width"===t?"margin-left":"margin-bottom"))}function Zt(e){return(Array.isArray(e)?e:[e]).filter(e=>!!e)}function Xt(e,t){void 0===t&&(t=""),"undefined"!=typeof trustedTypes?e.innerHTML=trustedTypes.createPolicy("html",{createHTML:e=>e}).createHTML(t):e.innerHTML=t}function Qt(e,t,r,n){return e.params.createElements&&Object.keys(n).forEach(i=>{if(!r[i]&&!0===r.auto){let s=qt(e.el,`.${n[i]}`)[0];s||(s=Gt("div",n[i]),s.className=n[i],e.el.append(s)),r[i]=s,t[i]=s}}),r}function Kt(e){let{swiper:t,extendParams:r,on:n,emit:i}=e;function s(e){let r;return e&&"string"==typeof e&&t.isElement&&(r=t.el.querySelector(e)||t.hostEl.querySelector(e),r)?r:(e&&("string"==typeof e&&(r=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&r&&r.length>1&&1===t.el.querySelectorAll(e).length?r=t.el.querySelector(e):r&&1===r.length&&(r=r[0])),e&&!r?e:r)}function a(e,r){const n=t.params.navigation;(e=Zt(e)).forEach(e=>{e&&(e.classList[r?"add":"remove"](...n.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=r),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass))})}function o(){const{nextEl:e,prevEl:r}=t.navigation;if(t.params.loop)return a(r,!1),void a(e,!1);a(r,t.isBeginning&&!t.params.rewind),a(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function d(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function c(){const e=t.params.navigation;if(t.params.navigation=Qt(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let r=s(e.nextEl),n=s(e.prevEl);Object.assign(t.navigation,{nextEl:r,prevEl:n}),r=Zt(r),n=Zt(n);const i=(r,n)=>{r&&r.addEventListener("click","next"===n?d:l),!t.enabled&&r&&r.classList.add(...e.lockClass.split(" "))};r.forEach(e=>i(e,"next")),n.forEach(e=>i(e,"prev"))}function u(){let{nextEl:e,prevEl:r}=t.navigation;e=Zt(e),r=Zt(r);const n=(e,r)=>{e.removeEventListener("click","next"===r?d:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(e=>n(e,"next")),r.forEach(e=>n(e,"prev"))}r({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null},n("init",()=>{!1===t.params.navigation.enabled?p():(c(),o())}),n("toEdge fromEdge lock unlock",()=>{o()}),n("destroy",()=>{u()}),n("enable disable",()=>{let{nextEl:e,prevEl:r}=t.navigation;e=Zt(e),r=Zt(r),t.enabled?o():[...e,...r].filter(e=>!!e).forEach(e=>e.classList.add(t.params.navigation.lockClass))}),n("click",(e,r)=>{let{nextEl:n,prevEl:s}=t.navigation;n=Zt(n),s=Zt(s);const a=r.target;let o=s.includes(a)||n.includes(a);if(t.isElement&&!o){const e=r.path||r.composedPath&&r.composedPath();e&&(o=e.find(e=>n.includes(e)||s.includes(e)))}if(t.params.navigation.hideOnClick&&!o){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;n.length?e=n[0].classList.contains(t.params.navigation.hiddenClass):s.length&&(e=s[0].classList.contains(t.params.navigation.hiddenClass)),i(!0===e?"navigationShow":"navigationHide"),[...n,...s].filter(e=>!!e).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});const p=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),u()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),o()},disable:p,update:o,init:c,destroy:u})}function Jt(e){return void 0===e&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function er(e){let{swiper:t,extendParams:r,on:n,emit:i}=e;const s="swiper-pagination";let a;r({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:e=>e,formatFractionTotal:e=>e,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),t.pagination={el:null,bullets:[]};let o=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function d(e,r){const{bulletActiveClass:n}=t.params.pagination;e&&(e=e[("prev"===r?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${n}-${r}`),(e=e[("prev"===r?"previous":"next")+"ElementSibling"])&&e.classList.add(`${n}-${r}-${r}`))}function c(e){const r=e.target.closest(Jt(t.params.pagination.bulletClass));if(!r)return;e.preventDefault();const n=Ut(r)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===n)return;const e=(i=t.realIndex,s=n,a=t.slides.length,(s%=a)===1+(i%=a)?"next":s===i-1?"previous":void 0);"next"===e?t.slideNext():"previous"===e?t.slidePrev():t.slideToLoop(n)}else t.slideTo(n);var i,s,a}function u(){const e=t.rtl,r=t.params.pagination;if(l())return;let n,s,c=t.pagination.el;c=Zt(c);const u=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,p=t.params.loop?Math.ceil(u/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(s=t.previousRealIndex||0,n=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(n=t.snapIndex,s=t.previousSnapIndex):(s=t.previousIndex||0,n=t.activeIndex||0),"bullets"===r.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const i=t.pagination.bullets;let l,u,p;if(r.dynamicBullets&&(a=$t(i[0],t.isHorizontal()?"width":"height"),c.forEach(e=>{e.style[t.isHorizontal()?"width":"height"]=a*(r.dynamicMainBullets+4)+"px"}),r.dynamicMainBullets>1&&void 0!==s&&(o+=n-(s||0),o>r.dynamicMainBullets-1?o=r.dynamicMainBullets-1:o<0&&(o=0)),l=Math.max(n-o,0),u=l+(Math.min(i.length,r.dynamicMainBullets)-1),p=(u+l)/2),i.forEach(e=>{const t=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(e=>`${r.bulletActiveClass}${e}`)].map(e=>"string"==typeof e&&e.includes(" ")?e.split(" "):e).flat();e.classList.remove(...t)}),c.length>1)i.forEach(e=>{const i=Ut(e);i===n?e.classList.add(...r.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),r.dynamicBullets&&(i>=l&&i<=u&&e.classList.add(...`${r.bulletActiveClass}-main`.split(" ")),i===l&&d(e,"prev"),i===u&&d(e,"next"))});else{const e=i[n];if(e&&e.classList.add(...r.bulletActiveClass.split(" ")),t.isElement&&i.forEach((e,t)=>{e.setAttribute("part",t===n?"bullet-active":"bullet")}),r.dynamicBullets){const e=i[l],t=i[u];for(let e=l;e<=u;e+=1)i[e]&&i[e].classList.add(...`${r.bulletActiveClass}-main`.split(" "));d(e,"prev"),d(t,"next")}}if(r.dynamicBullets){const n=Math.min(i.length,r.dynamicMainBullets+4),s=(a*n-a)/2-p*a,o=e?"right":"left";i.forEach(e=>{e.style[t.isHorizontal()?o:"top"]=`${s}px`})}}c.forEach((e,s)=>{if("fraction"===r.type&&(e.querySelectorAll(Jt(r.currentClass)).forEach(e=>{e.textContent=r.formatFractionCurrent(n+1)}),e.querySelectorAll(Jt(r.totalClass)).forEach(e=>{e.textContent=r.formatFractionTotal(p)})),"progressbar"===r.type){let i;i=r.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const s=(n+1)/p;let a=1,o=1;"horizontal"===i?a=s:o=s,e.querySelectorAll(Jt(r.progressbarFillClass)).forEach(e=>{e.style.transform=`translate3d(0,0,0) scaleX(${a}) scaleY(${o})`,e.style.transitionDuration=`${t.params.speed}ms`})}"custom"===r.type&&r.renderCustom?(Xt(e,r.renderCustom(t,n+1,p)),0===s&&i("paginationRender",e)):(0===s&&i("paginationRender",e),i("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass)})}function p(){const e=t.params.pagination;if(l())return;const r=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let n=t.pagination.el;n=Zt(n);let s="";if("bullets"===e.type){let n=t.params.loop?Math.ceil(r/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&n>r&&(n=r);for(let r=0;r<n;r+=1)e.renderBullet?s+=e.renderBullet.call(t,r,e.bulletClass):s+=`<${e.bulletElement} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],n.forEach(r=>{"custom"!==e.type&&Xt(r,s||""),"bullets"===e.type&&t.pagination.bullets.push(...r.querySelectorAll(Jt(e.bulletClass)))}),"custom"!==e.type&&i("paginationRender",n[0])}function h(){t.params.pagination=Qt(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let r;"string"==typeof e.el&&t.isElement&&(r=t.el.querySelector(e.el)),r||"string"!=typeof e.el||(r=[...document.querySelectorAll(e.el)]),r||(r=e.el),r&&0!==r.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(r)&&r.length>1&&(r=[...t.el.querySelectorAll(e.el)],r.length>1&&(r=r.find(e=>Vt(e,".swiper")[0]===t.el))),Array.isArray(r)&&1===r.length&&(r=r[0]),Object.assign(t.pagination,{el:r}),r=Zt(r),r.forEach(r=>{"bullets"===e.type&&e.clickable&&r.classList.add(...(e.clickableClass||"").split(" ")),r.classList.add(e.modifierClass+e.type),r.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(r.classList.add(`${e.modifierClass}${e.type}-dynamic`),o=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&r.classList.add(e.progressbarOppositeClass),e.clickable&&r.addEventListener("click",c),t.enabled||r.classList.add(e.lockClass)}))}function f(){const e=t.params.pagination;if(l())return;let r=t.pagination.el;r&&(r=Zt(r),r.forEach(r=>{r.classList.remove(e.hiddenClass),r.classList.remove(e.modifierClass+e.type),r.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&(r.classList.remove(...(e.clickableClass||"").split(" ")),r.removeEventListener("click",c))})),t.pagination.bullets&&t.pagination.bullets.forEach(t=>t.classList.remove(...e.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:r}=t.pagination;r=Zt(r),r.forEach(r=>{r.classList.remove(e.horizontalClass,e.verticalClass),r.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)})}),n("init",()=>{!1===t.params.pagination.enabled?m():(h(),p(),u())}),n("activeIndexChange",()=>{void 0===t.snapIndex&&u()}),n("snapIndexChange",()=>{u()}),n("snapGridLengthChange",()=>{p(),u()}),n("destroy",()=>{f()}),n("enable disable",()=>{let{el:e}=t.pagination;e&&(e=Zt(e),e.forEach(e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),n("lock unlock",()=>{u()}),n("click",(e,r)=>{const n=r.target,s=Zt(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&s&&s.length>0&&!n.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&n===t.navigation.nextEl||t.navigation.prevEl&&n===t.navigation.prevEl))return;const e=s[0].classList.contains(t.params.pagination.hiddenClass);i(!0===e?"paginationShow":"paginationHide"),s.forEach(e=>e.classList.toggle(t.params.pagination.hiddenClass))}});const m=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=Zt(e),e.forEach(e=>e.classList.add(t.params.pagination.paginationDisabledClass))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=Zt(e),e.forEach(e=>e.classList.remove(t.params.pagination.paginationDisabledClass))),h(),p(),u()},disable:m,render:p,update:u,init:h,destroy:f})}o('@font-face{font-family:swiper-icons;font-style:normal;font-weight:400;src:url("data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA")}:root{--swiper-theme-color:#007aff}:host{display:block;margin-left:auto;margin-right:auto;position:relative;z-index:1}.swiper{display:block;list-style:none;margin-left:auto;margin-right:auto;overflow:hidden;padding:0;position:relative;z-index:1}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{box-sizing:content-box;display:flex;height:100%;position:relative;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function,initial);width:100%;z-index:1}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{display:block;flex-shrink:0;height:100%;position:relative;transition-property:transform;width:100%}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{backface-visibility:hidden;transform:translateZ(0)}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-cube-shadow,.swiper-3d .swiper-slide{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{-ms-overflow-style:none;overflow:auto;scrollbar-width:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{height:var(--swiper-centered-offset-after);min-width:1px;width:100%}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-bottom,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top{height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(270deg,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(90deg,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(0deg,rgba(0,0,0,.5),transparent)}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(180deg,rgba(0,0,0,.5),transparent)}.swiper-lazy-preloader{border:4px solid var(--swiper-preloader-color,var(--swiper-theme-color));border-radius:50%;border-top:4px solid transparent;box-sizing:border-box;height:42px;left:50%;margin-left:-21px;margin-top:-21px;position:absolute;top:50%;transform-origin:50%;width:42px;z-index:10}.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader,.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader{animation:swiper-preloader-spin 1s linear infinite}.swiper-lazy-preloader-white{--swiper-preloader-color:#fff}.swiper-lazy-preloader-black{--swiper-preloader-color:#000}@keyframes swiper-preloader-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}');o(".swiper-pagination{position:absolute;text-align:center;transform:translateZ(0);transition:opacity .3s;z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal,.swiper-pagination-custom,.swiper-pagination-fraction{bottom:var(--swiper-pagination-bottom,8px);left:0;top:var(--swiper-pagination-top,auto);width:100%}.swiper-pagination-bullets-dynamic{font-size:0;overflow:hidden}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{position:relative;transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{background:var(--swiper-pagination-bullet-inactive-color,#000);border-radius:var(--swiper-pagination-bullet-border-radius,50%);display:inline-block;height:var(--swiper-pagination-bullet-height,var(--swiper-pagination-bullet-size,8px));opacity:var(--swiper-pagination-bullet-inactive-opacity,.2);width:var(--swiper-pagination-bullet-width,var(--swiper-pagination-bullet-size,8px))}button.swiper-pagination-bullet{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;box-shadow:none;margin:0;padding:0}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{background:var(--swiper-pagination-color,var(--swiper-theme-color));opacity:var(--swiper-pagination-bullet-opacity,1)}.swiper-pagination-vertical.swiper-pagination-bullets,.swiper-vertical>.swiper-pagination-bullets{left:var(--swiper-pagination-left,auto);right:var(--swiper-pagination-right,8px);top:50%;transform:translate3d(0,-50%,0)}.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet{display:block;margin:var(--swiper-pagination-bullet-vertical-gap,6px) 0}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:transform .2s,top .2s}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap,4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translateX(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,left .2s}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:transform .2s,right .2s}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color,inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color,rgba(0,0,0,.25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color,var(--swiper-theme-color));height:100%;left:0;position:absolute;top:0;transform:scale(0);transform-origin:left top;width:100%}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite{height:var(--swiper-pagination-progressbar-size,4px);left:0;top:0;width:100%}.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-vertical>.swiper-pagination-progressbar{height:100%;left:0;top:0;width:var(--swiper-pagination-progressbar-size,4px)}.swiper-pagination-lock{display:none}");let tr,rr,nr;function ir(){return tr||(tr=function(){const e=Rt(),t=Lt();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}()),tr}function sr(e){return void 0===e&&(e={}),rr||(rr=function(e){let{userAgent:t}=void 0===e?{}:e;const r=ir(),n=Rt(),i=n.navigator.platform,s=t||n.navigator.userAgent,a={ios:!1,android:!1},o=n.screen.width,l=n.screen.height,d=s.match(/(Android);?[\s\/]+([\d.]+)?/);let c=s.match(/(iPad).*OS\s([\d_]+)/);const u=s.match(/(iPod)(.*OS\s([\d_]+))?/),p=!c&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let f="MacIntel"===i;return!c&&f&&r.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${o}x${l}`)>=0&&(c=s.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),f=!1),d&&!h&&(a.os="android",a.android=!0),(c||p||u)&&(a.os="ios",a.ios=!0),a}(e)),rr}function ar(){return nr||(nr=function(){const e=Rt(),t=sr();let r=!1;function n(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}if(n()){const t=String(e.navigator.userAgent);if(t.includes("Version/")){const[e,n]=t.split("Version/")[1].split(" ")[0].split(".").map(e=>Number(e));r=e<16||16===e&&n<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),s=n();return{isSafari:r||s,needPerspectiveFix:r,need3dFix:s||i&&t.ios,isWebView:i}}()),nr}o(':root{--swiper-navigation-size:44px}.swiper-button-next,.swiper-button-prev{align-items:center;color:var(--swiper-navigation-color,var(--swiper-theme-color));cursor:pointer;display:flex;height:var(--swiper-navigation-size);justify-content:center;margin-top:calc(0px - var(--swiper-navigation-size)/2);position:absolute;top:var(--swiper-navigation-top-offset,50%);width:calc(var(--swiper-navigation-size)/44*27);z-index:10}.swiper-button-next.swiper-button-disabled,.swiper-button-prev.swiper-button-disabled{cursor:auto;opacity:.35;pointer-events:none}.swiper-button-next.swiper-button-hidden,.swiper-button-prev.swiper-button-hidden{cursor:auto;opacity:0;pointer-events:none}.swiper-navigation-disabled .swiper-button-next,.swiper-navigation-disabled .swiper-button-prev{display:none!important}.swiper-button-next svg,.swiper-button-prev svg{height:100%;-o-object-fit:contain;object-fit:contain;transform-origin:center;width:100%}.swiper-rtl .swiper-button-next svg,.swiper-rtl .swiper-button-prev svg{transform:rotate(180deg)}.swiper-button-prev,.swiper-rtl .swiper-button-next{left:var(--swiper-navigation-sides-offset,10px);right:auto}.swiper-button-lock{display:none}.swiper-button-next:after,.swiper-button-prev:after{font-family:swiper-icons;font-size:var(--swiper-navigation-size);font-variant:normal;letter-spacing:0;line-height:1;text-transform:none!important}.swiper-button-prev:after,.swiper-rtl .swiper-button-next:after{content:"prev"}.swiper-button-next,.swiper-rtl .swiper-button-prev{left:auto;right:var(--swiper-navigation-sides-offset,10px)}.swiper-button-next:after,.swiper-rtl .swiper-button-prev:after{content:"next"}');var or={on(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;const i=r?"unshift":"push";return e.split(" ").forEach(e=>{n.eventsListeners[e]||(n.eventsListeners[e]=[]),n.eventsListeners[e][i](t)}),n},once(e,t,r){const n=this;if(!n.eventsListeners||n.destroyed)return n;if("function"!=typeof t)return n;function i(){n.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];t.apply(n,s)}return i.__emitterProxy=t,n.on(e,i,r)},onAny(e,t){const r=this;if(!r.eventsListeners||r.destroyed)return r;if("function"!=typeof e)return r;const n=t?"unshift":"push";return r.eventsAnyListeners.indexOf(e)<0&&r.eventsAnyListeners[n](e),r},offAny(e){const t=this;if(!t.eventsListeners||t.destroyed)return t;if(!t.eventsAnyListeners)return t;const r=t.eventsAnyListeners.indexOf(e);return r>=0&&t.eventsAnyListeners.splice(r,1),t},off(e,t){const r=this;return!r.eventsListeners||r.destroyed?r:r.eventsListeners?(e.split(" ").forEach(e=>{void 0===t?r.eventsListeners[e]=[]:r.eventsListeners[e]&&r.eventsListeners[e].forEach((n,i)=>{(n===t||n.__emitterProxy&&n.__emitterProxy===t)&&r.eventsListeners[e].splice(i,1)})}),r):r},emit(){const e=this;if(!e.eventsListeners||e.destroyed)return e;if(!e.eventsListeners)return e;let t,r,n;for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];"string"==typeof s[0]||Array.isArray(s[0])?(t=s[0],r=s.slice(1,s.length),n=e):(t=s[0].events,r=s[0].data,n=s[0].context||e),r.unshift(n);return(Array.isArray(t)?t:t.split(" ")).forEach(t=>{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(e=>{e.apply(n,[t,...r])}),e.eventsListeners&&e.eventsListeners[t]&&e.eventsListeners[t].forEach(e=>{e.apply(n,r)})}),e}};const lr=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};const dr=(e,t,r)=>{t&&!e.classList.contains(r)?e.classList.add(r):!t&&e.classList.contains(r)&&e.classList.remove(r)};const cr=(e,t)=>{if(!e||e.destroyed||!e.params)return;const r=t.closest(e.isElement?"swiper-slide":`.${e.params.slideClass}`);if(r){let t=r.querySelector(`.${e.params.lazyPreloaderClass}`);!t&&e.isElement&&(r.shadowRoot?t=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(t=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),t&&t.remove())})),t&&t.remove()}},ur=(e,t)=>{if(!e.slides[t])return;const r=e.slides[t].querySelector('[loading="lazy"]');r&&r.removeAttribute("loading")},pr=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const r=e.slides.length;if(!r||!t||t<0)return;t=Math.min(t,r);const n="auto"===e.params.slidesPerView?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const r=i,s=[r-t];return s.push(...Array.from({length:t}).map((e,t)=>r+n+t)),void e.slides.forEach((t,r)=>{s.includes(t.column)&&ur(e,r)})}const s=i+n-1;if(e.params.rewind||e.params.loop)for(let n=i-t;n<=s+t;n+=1){const t=(n%r+r)%r;(t<i||t>s)&&ur(e,t)}else for(let n=Math.max(i-t,0);n<=Math.min(s+t,r-1);n+=1)n!==i&&(n>s||n<i)&&ur(e,n)};var hr={updateSize:function(){const e=this;let t,r;const n=e.el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:n.clientWidth,r=void 0!==e.params.height&&null!==e.params.height?e.params.height:n.clientHeight,0===t&&e.isHorizontal()||0===r&&e.isVertical()||(t=t-parseInt(Wt(n,"padding-left")||0,10)-parseInt(Wt(n,"padding-right")||0,10),r=r-parseInt(Wt(n,"padding-top")||0,10)-parseInt(Wt(n,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(r)&&(r=0),Object.assign(e,{width:t,height:r,size:e.isHorizontal()?t:r}))},updateSlides:function(){const e=this;function t(t,r){return parseFloat(t.getPropertyValue(e.getDirectionLabel(r))||0)}const r=e.params,{wrapperEl:n,slidesEl:i,size:s,rtlTranslate:a,wrongRTL:o}=e,l=e.virtual&&r.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,c=qt(i,`.${e.params.slideClass}, swiper-slide`),u=l?e.virtual.slides.length:c.length;let p=[];const h=[],f=[];let m=r.slidesOffsetBefore;"function"==typeof m&&(m=r.slidesOffsetBefore.call(e));let g=r.slidesOffsetAfter;"function"==typeof g&&(g=r.slidesOffsetAfter.call(e));const v=e.snapGrid.length,w=e.slidesGrid.length;let y=r.spaceBetween,b=-m,S=0,x=0;if(void 0===s)return;"string"==typeof y&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*s:"string"==typeof y&&(y=parseFloat(y)),e.virtualSize=-y,c.forEach(e=>{a?e.style.marginLeft="":e.style.marginRight="",e.style.marginBottom="",e.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(Bt(n,"--swiper-centered-offset-before",""),Bt(n,"--swiper-centered-offset-after",""));const _=r.grid&&r.grid.rows>1&&e.grid;let A;_?e.grid.initSlides(c):e.grid&&e.grid.unsetSlides();const T="auto"===r.slidesPerView&&r.breakpoints&&Object.keys(r.breakpoints).filter(e=>void 0!==r.breakpoints[e].slidesPerView).length>0;for(let n=0;n<u;n+=1){let i;if(A=0,c[n]&&(i=c[n]),_&&e.grid.updateSlide(n,i,c),!c[n]||"none"!==Wt(i,"display")){if("auto"===r.slidesPerView){T&&(c[n].style[e.getDirectionLabel("width")]="");const s=getComputedStyle(i),a=i.style.transform,o=i.style.webkitTransform;if(a&&(i.style.transform="none"),o&&(i.style.webkitTransform="none"),r.roundLengths)A=e.isHorizontal()?$t(i,"width"):$t(i,"height");else{const e=t(s,"width"),r=t(s,"padding-left"),n=t(s,"padding-right"),a=t(s,"margin-left"),o=t(s,"margin-right"),l=s.getPropertyValue("box-sizing");if(l&&"border-box"===l)A=e+a+o;else{const{clientWidth:t,offsetWidth:s}=i;A=e+r+n+a+o+(s-t)}}a&&(i.style.transform=a),o&&(i.style.webkitTransform=o),r.roundLengths&&(A=Math.floor(A))}else A=(s-(r.slidesPerView-1)*y)/r.slidesPerView,r.roundLengths&&(A=Math.floor(A)),c[n]&&(c[n].style[e.getDirectionLabel("width")]=`${A}px`);c[n]&&(c[n].swiperSlideSize=A),f.push(A),r.centeredSlides?(b=b+A/2+S/2+y,0===S&&0!==n&&(b=b-s/2-y),0===n&&(b=b-s/2-y),Math.abs(b)<.001&&(b=0),r.roundLengths&&(b=Math.floor(b)),x%r.slidesPerGroup===0&&p.push(b),h.push(b)):(r.roundLengths&&(b=Math.floor(b)),(x-Math.min(e.params.slidesPerGroupSkip,x))%e.params.slidesPerGroup===0&&p.push(b),h.push(b),b=b+A+y),e.virtualSize+=A+y,S=A,x+=1}}if(e.virtualSize=Math.max(e.virtualSize,s)+g,a&&o&&("slide"===r.effect||"coverflow"===r.effect)&&(n.style.width=`${e.virtualSize+y}px`),r.setWrapperSize&&(n.style[e.getDirectionLabel("width")]=`${e.virtualSize+y}px`),_&&e.grid.updateWrapperSize(A,p),!r.centeredSlides){const t=[];for(let n=0;n<p.length;n+=1){let i=p[n];r.roundLengths&&(i=Math.floor(i)),p[n]<=e.virtualSize-s&&t.push(i)}p=t,Math.floor(e.virtualSize-s)-Math.floor(p[p.length-1])>1&&p.push(e.virtualSize-s)}if(l&&r.loop){const t=f[0]+y;if(r.slidesPerGroup>1){const n=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/r.slidesPerGroup),i=t*r.slidesPerGroup;for(let e=0;e<n;e+=1)p.push(p[p.length-1]+i)}for(let n=0;n<e.virtual.slidesBefore+e.virtual.slidesAfter;n+=1)1===r.slidesPerGroup&&p.push(p[p.length-1]+t),h.push(h[h.length-1]+t),e.virtualSize+=t}if(0===p.length&&(p=[0]),0!==y){const t=e.isHorizontal()&&a?"marginLeft":e.getDirectionLabel("marginRight");c.filter((e,t)=>!(r.cssMode&&!r.loop)||t!==c.length-1).forEach(e=>{e.style[t]=`${y}px`})}if(r.centeredSlides&&r.centeredSlidesBounds){let e=0;f.forEach(t=>{e+=t+(y||0)}),e-=y;const t=e>s?e-s:0;p=p.map(e=>e<=0?-m:e>t?t+g:e)}if(r.centerInsufficientSlides){let e=0;f.forEach(t=>{e+=t+(y||0)}),e-=y;const t=(r.slidesOffsetBefore||0)+(r.slidesOffsetAfter||0);if(e+t<s){const r=(s-e-t)/2;p.forEach((e,t)=>{p[t]=e-r}),h.forEach((e,t)=>{h[t]=e+r})}}if(Object.assign(e,{slides:c,snapGrid:p,slidesGrid:h,slidesSizesGrid:f}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){Bt(n,"--swiper-centered-offset-before",-p[0]+"px"),Bt(n,"--swiper-centered-offset-after",e.size/2-f[f.length-1]/2+"px");const t=-e.snapGrid[0],r=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(e=>e+t),e.slidesGrid=e.slidesGrid.map(e=>e+r)}if(u!==d&&e.emit("slidesLengthChange"),p.length!==v&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==w&&e.emit("slidesGridLengthChange"),r.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!(l||r.cssMode||"slide"!==r.effect&&"fade"!==r.effect)){const t=`${r.containerModifierClass}backface-hidden`,n=e.el.classList.contains(t);u<=r.maxBackfaceHiddenSlides?n||e.el.classList.add(t):n&&e.el.classList.remove(t)}},updateAutoHeight:function(e){const t=this,r=[],n=t.virtual&&t.params.virtual.enabled;let i,s=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const a=e=>n?t.slides[t.getSlideIndexByData(e)]:t.slides[e];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(e=>{r.push(e)});else for(i=0;i<Math.ceil(t.params.slidesPerView);i+=1){const e=t.activeIndex+i;if(e>t.slides.length&&!n)break;r.push(a(e))}else r.push(a(t.activeIndex));for(i=0;i<r.length;i+=1)if(void 0!==r[i]){const e=r[i].offsetHeight;s=e>s?e:s}(s||0===s)&&(t.wrapperEl.style.height=`${s}px`)},updateSlidesOffset:function(){const e=this,t=e.slides,r=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let n=0;n<t.length;n+=1)t[n].swiperSlideOffset=(e.isHorizontal()?t[n].offsetLeft:t[n].offsetTop)-r-e.cssOverflowAdjustment()},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);const t=this,r=t.params,{slides:n,rtlTranslate:i,snapGrid:s}=t;if(0===n.length)return;void 0===n[0].swiperSlideOffset&&t.updateSlidesOffset();let a=-e;i&&(a=e),t.visibleSlidesIndexes=[],t.visibleSlides=[];let o=r.spaceBetween;"string"==typeof o&&o.indexOf("%")>=0?o=parseFloat(o.replace("%",""))/100*t.size:"string"==typeof o&&(o=parseFloat(o));for(let e=0;e<n.length;e+=1){const l=n[e];let d=l.swiperSlideOffset;r.cssMode&&r.centeredSlides&&(d-=n[0].swiperSlideOffset);const c=(a+(r.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),u=(a-s[0]+(r.centeredSlides?t.minTranslate():0)-d)/(l.swiperSlideSize+o),p=-(a-d),h=p+t.slidesSizesGrid[e],f=p>=0&&p<=t.size-t.slidesSizesGrid[e],m=p>=0&&p<t.size-1||h>1&&h<=t.size||p<=0&&h>=t.size;m&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e)),lr(l,m,r.slideVisibleClass),lr(l,f,r.slideFullyVisibleClass),l.progress=i?-c:c,l.originalProgress=i?-u:u}},updateProgress:function(e){const t=this;if(void 0===e){const r=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*r||0}const r=t.params,n=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:s,isEnd:a,progressLoop:o}=t;const l=s,d=a;if(0===n)i=0,s=!0,a=!0;else{i=(e-t.minTranslate())/n;const r=Math.abs(e-t.minTranslate())<1,o=Math.abs(e-t.maxTranslate())<1;s=r||i<=0,a=o||i>=1,r&&(i=0),o&&(i=1)}if(r.loop){const r=t.getSlideIndexByData(0),n=t.getSlideIndexByData(t.slides.length-1),i=t.slidesGrid[r],s=t.slidesGrid[n],a=t.slidesGrid[t.slidesGrid.length-1],l=Math.abs(e);o=l>=i?(l-i)/a:(l+a-s)/a,o>1&&(o-=1)}Object.assign(t,{progress:i,progressLoop:o,isBeginning:s,isEnd:a}),(r.watchSlidesProgress||r.centeredSlides&&r.autoHeight)&&t.updateSlidesProgress(e),s&&!l&&t.emit("reachBeginning toEdge"),a&&!d&&t.emit("reachEnd toEdge"),(l&&!s||d&&!a)&&t.emit("fromEdge"),t.emit("progress",i)},updateSlidesClasses:function(){const e=this,{slides:t,params:r,slidesEl:n,activeIndex:i}=e,s=e.virtual&&r.virtual.enabled,a=e.grid&&r.grid&&r.grid.rows>1,o=e=>qt(n,`.${r.slideClass}${e}, swiper-slide${e}`)[0];let l,d,c;if(s)if(r.loop){let t=i-e.virtual.slidesBefore;t<0&&(t=e.virtual.slides.length+t),t>=e.virtual.slides.length&&(t-=e.virtual.slides.length),l=o(`[data-swiper-slide-index="${t}"]`)}else l=o(`[data-swiper-slide-index="${i}"]`);else a?(l=t.find(e=>e.column===i),c=t.find(e=>e.column===i+1),d=t.find(e=>e.column===i-1)):l=t[i];l&&(a||(c=function(e,t){const r=[];for(;e.nextElementSibling;){const n=e.nextElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&!c&&(c=t[0]),d=function(e,t){const r=[];for(;e.previousElementSibling;){const n=e.previousElementSibling;t?n.matches(t)&&r.push(n):r.push(n),e=n}return r}(l,`.${r.slideClass}, swiper-slide`)[0],r.loop&&0===!d&&(d=t[t.length-1]))),t.forEach(e=>{dr(e,e===l,r.slideActiveClass),dr(e,e===c,r.slideNextClass),dr(e,e===d,r.slidePrevClass)}),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,r=t.rtlTranslate?t.translate:-t.translate,{snapGrid:n,params:i,activeIndex:s,realIndex:a,snapIndex:o}=t;let l,d=e;const c=e=>{let r=e-t.virtual.slidesBefore;return r<0&&(r=t.virtual.slides.length+r),r>=t.virtual.slides.length&&(r-=t.virtual.slides.length),r};if(void 0===d&&(d=function(e){const{slidesGrid:t,params:r}=e,n=e.rtlTranslate?e.translate:-e.translate;let i;for(let e=0;e<t.length;e+=1)void 0!==t[e+1]?n>=t[e]&&n<t[e+1]-(t[e+1]-t[e])/2?i=e:n>=t[e]&&n<t[e+1]&&(i=e+1):n>=t[e]&&(i=e);return r.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(t)),n.indexOf(r)>=0)l=n.indexOf(r);else{const e=Math.min(i.slidesPerGroupSkip,d);l=e+Math.floor((d-e)/i.slidesPerGroup)}if(l>=n.length&&(l=n.length-1),d===s&&!t.params.loop)return void(l!==o&&(t.snapIndex=l,t.emit("snapIndexChange")));if(d===s&&t.params.loop&&t.virtual&&t.params.virtual.enabled)return void(t.realIndex=c(d));const u=t.grid&&i.grid&&i.grid.rows>1;let p;if(t.virtual&&i.virtual.enabled&&i.loop)p=c(d);else if(u){const e=t.slides.find(e=>e.column===d);let r=parseInt(e.getAttribute("data-swiper-slide-index"),10);Number.isNaN(r)&&(r=Math.max(t.slides.indexOf(e),0)),p=Math.floor(r/i.grid.rows)}else if(t.slides[d]){const e=t.slides[d].getAttribute("data-swiper-slide-index");p=e?parseInt(e,10):d}else p=d;Object.assign(t,{previousSnapIndex:o,snapIndex:l,previousRealIndex:a,realIndex:p,previousIndex:s,activeIndex:d}),t.initialized&&pr(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(a!==p&&t.emit("realIndexChange"),t.emit("slideChange"))},updateClickedSlide:function(e,t){const r=this,n=r.params;let i=e.closest(`.${n.slideClass}, swiper-slide`);!i&&r.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(e=>{!i&&e.matches&&e.matches(`.${n.slideClass}, swiper-slide`)&&(i=e)});let s,a=!1;if(i)for(let e=0;e<r.slides.length;e+=1)if(r.slides[e]===i){a=!0,s=e;break}if(!i||!a)return r.clickedSlide=void 0,void(r.clickedIndex=void 0);r.clickedSlide=i,r.virtual&&r.params.virtual.enabled?r.clickedIndex=parseInt(i.getAttribute("data-swiper-slide-index"),10):r.clickedIndex=s,n.slideToClickedSlide&&void 0!==r.clickedIndex&&r.clickedIndex!==r.activeIndex&&r.slideToClickedSlide()}};var fr={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");const{params:t,rtlTranslate:r,translate:n,wrapperEl:i}=this;if(t.virtualTranslate)return r?-n:n;if(t.cssMode)return n;let s=Nt(i,e);return s+=this.cssOverflowAdjustment(),r&&(s=-s),s||0},setTranslate:function(e,t){const r=this,{rtlTranslate:n,params:i,wrapperEl:s,progress:a}=r;let o,l=0,d=0;r.isHorizontal()?l=n?-e:e:d=e,i.roundLengths&&(l=Math.floor(l),d=Math.floor(d)),r.previousTranslate=r.translate,r.translate=r.isHorizontal()?l:d,i.cssMode?s[r.isHorizontal()?"scrollLeft":"scrollTop"]=r.isHorizontal()?-l:-d:i.virtualTranslate||(r.isHorizontal()?l-=r.cssOverflowAdjustment():d-=r.cssOverflowAdjustment(),s.style.transform=`translate3d(${l}px, ${d}px, 0px)`);const c=r.maxTranslate()-r.minTranslate();o=0===c?0:(e-r.minTranslate())/c,o!==a&&r.updateProgress(e),r.emit("setTranslate",r.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,r,n,i){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===r&&(r=!0),void 0===n&&(n=!0);const s=this,{params:a,wrapperEl:o}=s;if(s.animating&&a.preventInteractionOnTransition)return!1;const l=s.minTranslate(),d=s.maxTranslate();let c;if(c=n&&e>l?l:n&&e<d?d:e,s.updateProgress(c),a.cssMode){const e=s.isHorizontal();if(0===t)o[e?"scrollLeft":"scrollTop"]=-c;else{if(!s.support.smoothScroll)return zt({swiper:s,targetPosition:-c,side:e?"left":"top"}),!0;o.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(s.setTransition(0),s.setTranslate(c),r&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionEnd"))):(s.setTransition(t),s.setTranslate(c),r&&(s.emit("beforeTransitionStart",t,i),s.emit("transitionStart")),s.animating||(s.animating=!0,s.onTranslateToWrapperTransitionEnd||(s.onTranslateToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onTranslateToWrapperTransitionEnd),s.onTranslateToWrapperTransitionEnd=null,delete s.onTranslateToWrapperTransitionEnd,s.animating=!1,r&&s.emit("transitionEnd"))}),s.wrapperEl.addEventListener("transitionend",s.onTranslateToWrapperTransitionEnd))),!0}};function mr(e){let{swiper:t,runCallbacks:r,direction:n,step:i}=e;const{activeIndex:s,previousIndex:a}=t;let o=n;o||(o=s>a?"next":s<a?"prev":"reset"),t.emit(`transition${i}`),r&&"reset"===o?t.emit(`slideResetTransition${i}`):r&&s!==a&&(t.emit(`slideChangeTransition${i}`),"next"===o?t.emit(`slideNextTransition${i}`):t.emit(`slidePrevTransition${i}`))}var gr={slideTo:function(e,t,r,n,i){void 0===e&&(e=0),void 0===r&&(r=!0),"string"==typeof e&&(e=parseInt(e,10));const s=this;let a=e;a<0&&(a=0);const{params:o,snapGrid:l,slidesGrid:d,previousIndex:c,activeIndex:u,rtlTranslate:p,wrapperEl:h,enabled:f}=s;if(!f&&!n&&!i||s.destroyed||s.animating&&o.preventInteractionOnTransition)return!1;void 0===t&&(t=s.params.speed);const m=Math.min(s.params.slidesPerGroupSkip,a);let g=m+Math.floor((a-m)/s.params.slidesPerGroup);g>=l.length&&(g=l.length-1);const v=-l[g];if(o.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*v),r=Math.floor(100*d[e]),n=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=r&&t<n-(n-r)/2?a=e:t>=r&&t<n&&(a=e+1):t>=r&&(a=e)}if(s.initialized&&a!==u){if(!s.allowSlideNext&&(p?v>s.translate&&v>s.minTranslate():v<s.translate&&v<s.minTranslate()))return!1;if(!s.allowSlidePrev&&v>s.translate&&v>s.maxTranslate()&&(u||0)!==a)return!1}let w;a!==(c||0)&&r&&s.emit("beforeSlideChangeStart"),s.updateProgress(v),w=a>u?"next":a<u?"prev":"reset";const y=s.virtual&&s.params.virtual.enabled;if(!(y&&i)&&(p&&-v===s.translate||!p&&v===s.translate))return s.updateActiveIndex(a),o.autoHeight&&s.updateAutoHeight(),s.updateSlidesClasses(),"slide"!==o.effect&&s.setTranslate(v),"reset"!==w&&(s.transitionStart(r,w),s.transitionEnd(r,w)),!1;if(o.cssMode){const e=s.isHorizontal(),r=p?v:-v;if(0===t)y&&(s.wrapperEl.style.scrollSnapType="none",s._immediateVirtual=!0),y&&!s._cssModeVirtualInitialSet&&s.params.initialSlide>0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{h[e?"scrollLeft":"scrollTop"]=r})):h[e?"scrollLeft":"scrollTop"]=r,y&&requestAnimationFrame(()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1});else{if(!s.support.smoothScroll)return zt({swiper:s,targetPosition:r,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:r,behavior:"smooth"})}return!0}const b=ar().isSafari;return y&&!i&&b&&s.isElement&&s.virtual.update(!1,!1,a),s.setTransition(t),s.setTranslate(v),s.updateActiveIndex(a),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,n),s.transitionStart(r,w),0===t?s.transitionEnd(r,w):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(e){s&&!s.destroyed&&e.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(r,w))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(e,t,r,n){if(void 0===e&&(e=0),void 0===r&&(r=!0),"string"==typeof e){e=parseInt(e,10)}const i=this;if(i.destroyed)return;void 0===t&&(t=i.params.speed);const s=i.grid&&i.params.grid&&i.params.grid.rows>1;let a=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)a+=i.virtual.slidesBefore;else{let e;if(s){const t=a*i.params.grid.rows;e=i.slides.find(e=>1*e.getAttribute("data-swiper-slide-index")===t).column}else e=i.getSlideIndexByData(a);const t=s?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:r}=i.params;let o=i.params.slidesPerView;"auto"===o?o=i.slidesPerViewDynamic():(o=Math.ceil(parseFloat(i.params.slidesPerView,10)),r&&o%2==0&&(o+=1));let l=t-e<o;if(r&&(l=l||e<Math.ceil(o/2)),n&&r&&"auto"!==i.params.slidesPerView&&!s&&(l=!1),l){const n=r?e<i.activeIndex?"prev":"next":e-i.activeIndex-1<i.params.slidesPerView?"next":"prev";i.loopFix({direction:n,slideTo:!0,activeSlideIndex:"next"===n?e+1:e-t+1,slideRealIndex:"next"===n?i.realIndex:void 0})}if(s){const e=a*i.params.grid.rows;a=i.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e).column}else a=i.getSlideIndexByData(a)}return requestAnimationFrame(()=>{i.slideTo(a,t,r,n)}),i},slideNext:function(e,t,r){void 0===t&&(t=!0);const n=this,{enabled:i,params:s,animating:a}=n;if(!i||n.destroyed)return n;void 0===e&&(e=n.params.speed);let o=s.slidesPerGroup;"auto"===s.slidesPerView&&1===s.slidesPerGroup&&s.slidesPerGroupAuto&&(o=Math.max(n.slidesPerViewDynamic("current",!0),1));const l=n.activeIndex<s.slidesPerGroupSkip?1:o,d=n.virtual&&s.virtual.enabled;if(s.loop){if(a&&!d&&s.loopPreventsSliding)return!1;if(n.loopFix({direction:"next"}),n._clientLeft=n.wrapperEl.clientLeft,n.activeIndex===n.slides.length-1&&s.cssMode)return requestAnimationFrame(()=>{n.slideTo(n.activeIndex+l,e,t,r)}),!0}return s.rewind&&n.isEnd?n.slideTo(0,e,t,r):n.slideTo(n.activeIndex+l,e,t,r)},slidePrev:function(e,t,r){void 0===t&&(t=!0);const n=this,{params:i,snapGrid:s,slidesGrid:a,rtlTranslate:o,enabled:l,animating:d}=n;if(!l||n.destroyed)return n;void 0===e&&(e=n.params.speed);const c=n.virtual&&i.virtual.enabled;if(i.loop){if(d&&!c&&i.loopPreventsSliding)return!1;n.loopFix({direction:"prev"}),n._clientLeft=n.wrapperEl.clientLeft}function u(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=u(o?n.translate:-n.translate),h=s.map(e=>u(e)),f=i.freeMode&&i.freeMode.enabled;let m=s[h.indexOf(p)-1];if(void 0===m&&(i.cssMode||f)){let e;s.forEach((t,r)=>{p>=t&&(e=r)}),void 0!==e&&(m=f?s[e]:s[e>0?e-1:e])}let g=0;if(void 0!==m&&(g=a.indexOf(m),g<0&&(g=n.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(g=g-n.slidesPerViewDynamic("previous",!0)+1,g=Math.max(g,0))),i.rewind&&n.isBeginning){const i=n.params.virtual&&n.params.virtual.enabled&&n.virtual?n.virtual.slides.length-1:n.slides.length-1;return n.slideTo(i,e,t,r)}return i.loop&&0===n.activeIndex&&i.cssMode?(requestAnimationFrame(()=>{n.slideTo(g,e,t,r)}),!0):n.slideTo(g,e,t,r)},slideReset:function(e,t,r){void 0===t&&(t=!0);const n=this;if(!n.destroyed)return void 0===e&&(e=n.params.speed),n.slideTo(n.activeIndex,e,t,r)},slideToClosest:function(e,t,r,n){void 0===t&&(t=!0),void 0===n&&(n=.5);const i=this;if(i.destroyed)return;void 0===e&&(e=i.params.speed);let s=i.activeIndex;const a=Math.min(i.params.slidesPerGroupSkip,s),o=a+Math.floor((s-a)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[o]){const e=i.snapGrid[o];l-e>(i.snapGrid[o+1]-e)*n&&(s+=i.params.slidesPerGroup)}else{const e=i.snapGrid[o-1];l-e<=(i.snapGrid[o]-e)*n&&(s-=i.params.slidesPerGroup)}return s=Math.max(s,0),s=Math.min(s,i.slidesGrid.length-1),i.slideTo(s,e,t,r)},slideToClickedSlide:function(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:r}=e,n="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let i,s=e.clickedIndex;const a=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;i=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?s<e.loopedSlides-n/2||s>e.slides.length-e.loopedSlides+n/2?(e.loopFix(),s=e.getSlideIndex(qt(r,`${a}[data-swiper-slide-index="${i}"]`)[0]),Pt(()=>{e.slideTo(s)})):e.slideTo(s):s>e.slides.length-n?(e.loopFix(),s=e.getSlideIndex(qt(r,`${a}[data-swiper-slide-index="${i}"]`)[0]),Pt(()=>{e.slideTo(s)})):e.slideTo(s)}else e.slideTo(s)}};var vr={loopCreate:function(e,t){const r=this,{params:n,slidesEl:i}=r;if(!n.loop||r.virtual&&r.params.virtual.enabled)return;const s=()=>{qt(i,`.${n.slideClass}, swiper-slide`).forEach((e,t)=>{e.setAttribute("data-swiper-slide-index",t)})},a=r.grid&&n.grid&&n.grid.rows>1,o=n.slidesPerGroup*(a?n.grid.rows:1),l=r.slides.length%o!==0,d=a&&r.slides.length%n.grid.rows!==0,c=e=>{for(let t=0;t<e;t+=1){const e=r.isElement?Gt("swiper-slide",[n.slideBlankClass]):Gt("div",[n.slideClass,n.slideBlankClass]);r.slidesEl.append(e)}};if(l){if(n.loopAddBlankSlides){c(o-r.slides.length%o),r.recalcSlides(),r.updateSlides()}else Ht("Swiper Loop Warning: The number of slides is not even to slidesPerGroup, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");s()}else if(d){if(n.loopAddBlankSlides){c(n.grid.rows-r.slides.length%n.grid.rows),r.recalcSlides(),r.updateSlides()}else Ht("Swiper Loop Warning: The number of slides is not even to grid.rows, loop mode may not function properly. You need to add more slides (or make duplicates, or empty slides)");s()}else s();r.loopFix({slideRealIndex:e,direction:n.centeredSlides?void 0:"next",initial:t})},loopFix:function(e){let{slideRealIndex:t,slideTo:r=!0,direction:n,setTranslate:i,activeSlideIndex:s,initial:a,byController:o,byMousewheel:l}=void 0===e?{}:e;const d=this;if(!d.params.loop)return;d.emit("beforeLoopFix");const{slides:c,allowSlidePrev:u,allowSlideNext:p,slidesEl:h,params:f}=d,{centeredSlides:m,initialSlide:g}=f;if(d.allowSlidePrev=!0,d.allowSlideNext=!0,d.virtual&&f.virtual.enabled)return r&&(f.centeredSlides||0!==d.snapIndex?f.centeredSlides&&d.snapIndex<f.slidesPerView?d.slideTo(d.virtual.slides.length+d.snapIndex,0,!1,!0):d.snapIndex===d.snapGrid.length-1&&d.slideTo(d.virtual.slidesBefore,0,!1,!0):d.slideTo(d.virtual.slides.length,0,!1,!0)),d.allowSlidePrev=u,d.allowSlideNext=p,void d.emit("loopFix");let v=f.slidesPerView;"auto"===v?v=d.slidesPerViewDynamic():(v=Math.ceil(parseFloat(f.slidesPerView,10)),m&&v%2==0&&(v+=1));const w=f.slidesPerGroupAuto?v:f.slidesPerGroup;let y=w;y%w!==0&&(y+=w-y%w),y+=f.loopAdditionalSlides,d.loopedSlides=y;const b=d.grid&&f.grid&&f.grid.rows>1;c.length<v+y||"cards"===d.params.effect&&c.length<v+2*y?Ht("Swiper Loop Warning: The number of slides is not enough for loop mode, it will be disabled or not function properly. You need to add more slides (or make duplicates) or lower the values of slidesPerView and slidesPerGroup parameters"):b&&"row"===f.grid.fill&&Ht("Swiper Loop Warning: Loop mode is not compatible with grid.fill = `row`");const S=[],x=[],_=b?Math.ceil(c.length/f.grid.rows):c.length,A=a&&_-g<v&&!m;let T=A?g:d.activeIndex;void 0===s?s=d.getSlideIndex(c.find(e=>e.classList.contains(f.slideActiveClass))):T=s;const E="next"===n||!n,C="prev"===n||!n;let k=0,M=0;const D=(b?c[s].column:s)+(m&&void 0===i?-v/2+.5:0);if(D<y){k=Math.max(y-D,w);for(let e=0;e<y-D;e+=1){const t=e-Math.floor(e/_)*_;if(b){const e=_-t-1;for(let t=c.length-1;t>=0;t-=1)c[t].column===e&&S.push(t)}else S.push(_-t-1)}}else if(D+v>_-y){M=Math.max(D-(_-2*y),w),A&&(M=Math.max(M,v-_+g+1));for(let e=0;e<M;e+=1){const t=e-Math.floor(e/_)*_;b?c.forEach((e,r)=>{e.column===t&&x.push(r)}):x.push(t)}}if(d.__preventObserver__=!0,requestAnimationFrame(()=>{d.__preventObserver__=!1}),"cards"===d.params.effect&&c.length<v+2*y&&(x.includes(s)&&x.splice(x.indexOf(s),1),S.includes(s)&&S.splice(S.indexOf(s),1)),C&&S.forEach(e=>{c[e].swiperLoopMoveDOM=!0,h.prepend(c[e]),c[e].swiperLoopMoveDOM=!1}),E&&x.forEach(e=>{c[e].swiperLoopMoveDOM=!0,h.append(c[e]),c[e].swiperLoopMoveDOM=!1}),d.recalcSlides(),"auto"===f.slidesPerView?d.updateSlides():b&&(S.length>0&&C||x.length>0&&E)&&d.slides.forEach((e,t)=>{d.grid.updateSlide(t,e,d.slides)}),f.watchSlidesProgress&&d.updateSlidesOffset(),r)if(S.length>0&&C){if(void 0===t){const e=d.slidesGrid[T],t=d.slidesGrid[T+k]-e;l?d.setTranslate(d.translate-t):(d.slideTo(T+Math.ceil(k),0,!1,!0),i&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else if(i){const e=b?S.length/f.grid.rows:S.length;d.slideTo(d.activeIndex+e,0,!1,!0),d.touchEventsData.currentTranslate=d.translate}}else if(x.length>0&&E)if(void 0===t){const e=d.slidesGrid[T],t=d.slidesGrid[T-M]-e;l?d.setTranslate(d.translate-t):(d.slideTo(T-M,0,!1,!0),i&&(d.touchEventsData.startTranslate=d.touchEventsData.startTranslate-t,d.touchEventsData.currentTranslate=d.touchEventsData.currentTranslate-t))}else{const e=b?x.length/f.grid.rows:x.length;d.slideTo(d.activeIndex-e,0,!1,!0)}if(d.allowSlidePrev=u,d.allowSlideNext=p,d.controller&&d.controller.control&&!o){const e={slideRealIndex:t,direction:n,setTranslate:i,activeSlideIndex:s,byController:!0};Array.isArray(d.controller.control)?d.controller.control.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix({...e,slideTo:t.params.slidesPerView===f.slidesPerView&&r})}):d.controller.control instanceof d.constructor&&d.controller.control.params.loop&&d.controller.control.loopFix({...e,slideTo:d.controller.control.params.slidesPerView===f.slidesPerView&&r})}d.emit("loopFix")},loopDestroy:function(){const e=this,{params:t,slidesEl:r}=e;if(!t.loop||!r||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const n=[];e.slides.forEach(e=>{const t=void 0===e.swiperSlideIndex?1*e.getAttribute("data-swiper-slide-index"):e.swiperSlideIndex;n[t]=e}),e.slides.forEach(e=>{e.removeAttribute("data-swiper-slide-index")}),n.forEach(e=>{r.append(e)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}};function wr(e,t,r){const n=Rt(),{params:i}=e,s=i.edgeSwipeDetection,a=i.edgeSwipeThreshold;return!s||!(r<=a||r>=n.innerWidth-a)||"prevent"===s&&(t.preventDefault(),!0)}function yr(e){const t=this,r=Lt();let n=e;n.originalEvent&&(n=n.originalEvent);const i=t.touchEventsData;if("pointerdown"===n.type){if(null!==i.pointerId&&i.pointerId!==n.pointerId)return;i.pointerId=n.pointerId}else"touchstart"===n.type&&1===n.targetTouches.length&&(i.touchId=n.targetTouches[0].identifier);if("touchstart"===n.type)return void wr(t,n,n.targetTouches[0].pageX);const{params:s,touches:a,enabled:o}=t;if(!o)return;if(!s.simulateTouch&&"mouse"===n.pointerType)return;if(t.animating&&s.preventInteractionOnTransition)return;!t.animating&&s.cssMode&&s.loop&&t.loopFix();let l=n.target;if("wrapper"===s.touchEventsTarget&&!function(e,t){const r=Rt();let n=t.contains(e);!n&&r.HTMLSlotElement&&t instanceof HTMLSlotElement&&(n=[...t.assignedElements()].includes(e),n||(n=function(e,t){const r=[t];for(;r.length>0;){const t=r.shift();if(e===t)return!0;r.push(...t.children,...t.shadowRoot?t.shadowRoot.children:[],...t.assignedElements?t.assignedElements():[])}}(e,t)));return n}(l,t.wrapperEl))return;if("which"in n&&3===n.which)return;if("button"in n&&n.button>0)return;if(i.isTouched&&i.isMoved)return;const d=!!s.noSwipingClass&&""!==s.noSwipingClass,c=n.composedPath?n.composedPath():n.path;d&&n.target&&n.target.shadowRoot&&c&&(l=c[0]);const u=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,p=!(!n.target||!n.target.shadowRoot);if(s.noSwiping&&(p?function(e,t){return void 0===t&&(t=this),function t(r){if(!r||r===Lt()||r===Rt())return null;r.assignedSlot&&(r=r.assignedSlot);const n=r.closest(e);return n||r.getRootNode?n||t(r.getRootNode().host):null}(t)}(u,l):l.closest(u)))return void(t.allowClick=!0);if(s.swipeHandler&&!l.closest(s.swipeHandler))return;a.currentX=n.pageX,a.currentY=n.pageY;const h=a.currentX,f=a.currentY;if(!wr(t,n,h))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),a.startX=h,a.startY=f,i.touchStartTime=It(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1);let m=!0;l.matches(i.focusableElements)&&(m=!1,"SELECT"===l.nodeName&&(i.isTouched=!1)),r.activeElement&&r.activeElement.matches(i.focusableElements)&&r.activeElement!==l&&("mouse"===n.pointerType||"mouse"!==n.pointerType&&!l.matches(i.focusableElements))&&r.activeElement.blur();const g=m&&t.allowTouchMove&&s.touchStartPreventDefault;!s.touchStartForcePreventDefault&&!g||l.isContentEditable||n.preventDefault(),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.animating&&!s.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",n)}function br(e){const t=Lt(),r=this,n=r.touchEventsData,{params:i,touches:s,rtlTranslate:a,enabled:o}=r;if(!o)return;if(!i.simulateTouch&&"mouse"===e.pointerType)return;let l,d=e;if(d.originalEvent&&(d=d.originalEvent),"pointermove"===d.type){if(null!==n.touchId)return;if(d.pointerId!==n.pointerId)return}if("touchmove"===d.type){if(l=[...d.changedTouches].find(e=>e.identifier===n.touchId),!l||l.identifier!==n.touchId)return}else l=d;if(!n.isTouched)return void(n.startMoving&&n.isScrolling&&r.emit("touchMoveOpposite",d));const c=l.pageX,u=l.pageY;if(d.preventedByNestedSwiper)return s.startX=c,void(s.startY=u);if(!r.allowTouchMove)return d.target.matches(n.focusableElements)||(r.allowClick=!1),void(n.isTouched&&(Object.assign(s,{startX:c,startY:u,currentX:c,currentY:u}),n.touchStartTime=It()));if(i.touchReleaseOnEdges&&!i.loop)if(r.isVertical()){if(u<s.startY&&r.translate<=r.maxTranslate()||u>s.startY&&r.translate>=r.minTranslate())return n.isTouched=!1,void(n.isMoved=!1)}else{if(a&&(c>s.startX&&-r.translate<=r.maxTranslate()||c<s.startX&&-r.translate>=r.minTranslate()))return;if(!a&&(c<s.startX&&r.translate<=r.maxTranslate()||c>s.startX&&r.translate>=r.minTranslate()))return}if(t.activeElement&&t.activeElement.matches(n.focusableElements)&&t.activeElement!==d.target&&"mouse"!==d.pointerType&&t.activeElement.blur(),t.activeElement&&d.target===t.activeElement&&d.target.matches(n.focusableElements))return n.isMoved=!0,void(r.allowClick=!1);n.allowTouchCallbacks&&r.emit("touchMove",d),s.previousX=s.currentX,s.previousY=s.currentY,s.currentX=c,s.currentY=u;const p=s.currentX-s.startX,h=s.currentY-s.startY;if(r.params.threshold&&Math.sqrt(p**2+h**2)<r.params.threshold)return;if(void 0===n.isScrolling){let e;r.isHorizontal()&&s.currentY===s.startY||r.isVertical()&&s.currentX===s.startX?n.isScrolling=!1:p*p+h*h>=25&&(e=180*Math.atan2(Math.abs(h),Math.abs(p))/Math.PI,n.isScrolling=r.isHorizontal()?e>i.touchAngle:90-e>i.touchAngle)}if(n.isScrolling&&r.emit("touchMoveOpposite",d),void 0===n.startMoving&&(s.currentX===s.startX&&s.currentY===s.startY||(n.startMoving=!0)),n.isScrolling||"touchmove"===d.type&&n.preventTouchMoveFromPointerMove)return void(n.isTouched=!1);if(!n.startMoving)return;r.allowClick=!1,!i.cssMode&&d.cancelable&&d.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&d.stopPropagation();let f=r.isHorizontal()?p:h,m=r.isHorizontal()?s.currentX-s.previousX:s.currentY-s.previousY;i.oneWayMovement&&(f=Math.abs(f)*(a?1:-1),m=Math.abs(m)*(a?1:-1)),s.diff=f,f*=i.touchRatio,a&&(f=-f,m=-m);const g=r.touchesDirection;r.swipeDirection=f>0?"prev":"next",r.touchesDirection=m>0?"prev":"next";const v=r.params.loop&&!i.cssMode,w="next"===r.touchesDirection&&r.allowSlideNext||"prev"===r.touchesDirection&&r.allowSlidePrev;if(!n.isMoved){if(v&&w&&r.loopFix({direction:r.swipeDirection}),n.startTranslate=r.getTranslate(),r.setTransition(0),r.animating){const e=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0,detail:{bySwiperTouchMove:!0}});r.wrapperEl.dispatchEvent(e)}n.allowMomentumBounce=!1,!i.grabCursor||!0!==r.allowSlideNext&&!0!==r.allowSlidePrev||r.setGrabCursor(!0),r.emit("sliderFirstMove",d)}if((new Date).getTime(),!1!==i._loopSwapReset&&n.isMoved&&n.allowThresholdMove&&g!==r.touchesDirection&&v&&w&&Math.abs(f)>=1)return Object.assign(s,{startX:c,startY:u,currentX:c,currentY:u,startTranslate:n.currentTranslate}),n.loopSwapReset=!0,void(n.startTranslate=n.currentTranslate);r.emit("sliderMove",d),n.isMoved=!0,n.currentTranslate=f+n.startTranslate;let y=!0,b=i.resistanceRatio;if(i.touchReleaseOnEdges&&(b=0),f>0?(v&&w&&n.allowThresholdMove&&n.currentTranslate>(i.centeredSlides?r.minTranslate()-r.slidesSizesGrid[r.activeIndex+1]-("auto"!==i.slidesPerView&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.activeIndex+1]+r.params.spaceBetween:0)-r.params.spaceBetween:r.minTranslate())&&r.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),n.currentTranslate>r.minTranslate()&&(y=!1,i.resistance&&(n.currentTranslate=r.minTranslate()-1+(-r.minTranslate()+n.startTranslate+f)**b))):f<0&&(v&&w&&n.allowThresholdMove&&n.currentTranslate<(i.centeredSlides?r.maxTranslate()+r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween+("auto"!==i.slidesPerView&&r.slides.length-i.slidesPerView>=2?r.slidesSizesGrid[r.slidesSizesGrid.length-1]+r.params.spaceBetween:0):r.maxTranslate())&&r.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:r.slides.length-("auto"===i.slidesPerView?r.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),n.currentTranslate<r.maxTranslate()&&(y=!1,i.resistance&&(n.currentTranslate=r.maxTranslate()+1-(r.maxTranslate()-n.startTranslate-f)**b))),y&&(d.preventedByNestedSwiper=!0),!r.allowSlideNext&&"next"===r.swipeDirection&&n.currentTranslate<n.startTranslate&&(n.currentTranslate=n.startTranslate),!r.allowSlidePrev&&"prev"===r.swipeDirection&&n.currentTranslate>n.startTranslate&&(n.currentTranslate=n.startTranslate),r.allowSlidePrev||r.allowSlideNext||(n.currentTranslate=n.startTranslate),i.threshold>0){if(!(Math.abs(f)>i.threshold||n.allowThresholdMove))return void(n.currentTranslate=n.startTranslate);if(!n.allowThresholdMove)return n.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,n.currentTranslate=n.startTranslate,void(s.diff=r.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&r.freeMode||i.watchSlidesProgress)&&(r.updateActiveIndex(),r.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&r.freeMode&&r.freeMode.onTouchMove(),r.updateProgress(n.currentTranslate),r.setTranslate(n.currentTranslate))}function Sr(e){const t=this,r=t.touchEventsData;let n,i=e;i.originalEvent&&(i=i.originalEvent);if("touchend"===i.type||"touchcancel"===i.type){if(n=[...i.changedTouches].find(e=>e.identifier===r.touchId),!n||n.identifier!==r.touchId)return}else{if(null!==r.touchId)return;if(i.pointerId!==r.pointerId)return;n=i}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(i.type)){if(!(["pointercancel","contextmenu"].includes(i.type)&&(t.browser.isSafari||t.browser.isWebView)))return}r.pointerId=null,r.touchId=null;const{params:s,touches:a,rtlTranslate:o,slidesGrid:l,enabled:d}=t;if(!d)return;if(!s.simulateTouch&&"mouse"===i.pointerType)return;if(r.allowTouchCallbacks&&t.emit("touchEnd",i),r.allowTouchCallbacks=!1,!r.isTouched)return r.isMoved&&s.grabCursor&&t.setGrabCursor(!1),r.isMoved=!1,void(r.startMoving=!1);s.grabCursor&&r.isMoved&&r.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const c=It(),u=c-r.touchStartTime;if(t.allowClick){const e=i.path||i.composedPath&&i.composedPath();t.updateClickedSlide(e&&e[0]||i.target,e),t.emit("tap click",i),u<300&&c-r.lastClickTime<300&&t.emit("doubleTap doubleClick",i)}if(r.lastClickTime=It(),Pt(()=>{t.destroyed||(t.allowClick=!0)}),!r.isTouched||!r.isMoved||!t.swipeDirection||0===a.diff&&!r.loopSwapReset||r.currentTranslate===r.startTranslate&&!r.loopSwapReset)return r.isTouched=!1,r.isMoved=!1,void(r.startMoving=!1);let p;if(r.isTouched=!1,r.isMoved=!1,r.startMoving=!1,p=s.followFinger?o?t.translate:-t.translate:-r.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:p});const h=p>=-t.maxTranslate()&&!t.params.loop;let f=0,m=t.slidesSizesGrid[0];for(let e=0;e<l.length;e+=e<s.slidesPerGroupSkip?1:s.slidesPerGroup){const t=e<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;void 0!==l[e+t]?(h||p>=l[e]&&p<l[e+t])&&(f=e,m=l[e+t]-l[e]):(h||p>=l[e])&&(f=e,m=l[l.length-1]-l[l.length-2])}let g=null,v=null;s.rewind&&(t.isBeginning?v=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(g=0));const w=(p-l[f])/m,y=f<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(w>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?g:f+y):t.slideTo(f)),"prev"===t.swipeDirection&&(w>1-s.longSwipesRatio?t.slideTo(f+y):null!==v&&w<0&&Math.abs(w)>s.longSwipesRatio?t.slideTo(v):t.slideTo(f))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(i.target===t.navigation.nextEl||i.target===t.navigation.prevEl)?i.target===t.navigation.nextEl?t.slideTo(f+y):t.slideTo(f):("next"===t.swipeDirection&&t.slideTo(null!==g?g:f+y),"prev"===t.swipeDirection&&t.slideTo(null!==v?v:f))}}function xr(){const e=this,{params:t,el:r}=e;if(r&&0===r.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:n,allowSlidePrev:i,snapGrid:s}=e,a=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const o=a&&t.loop;!("auto"===t.slidesPerView||t.slidesPerView>1)||!e.isEnd||e.isBeginning||e.params.centeredSlides||o?e.params.loop&&!a?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0):e.slideTo(e.slides.length-1,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=n,e.params.watchOverflow&&s!==e.snapGrid&&e.checkOverflow()}function _r(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function Ar(){const e=this,{wrapperEl:t,rtlTranslate:r,enabled:n}=e;if(!n)return;let i;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const s=e.maxTranslate()-e.minTranslate();i=0===s?0:(e.translate-e.minTranslate())/s,i!==e.progress&&e.updateProgress(r?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function Tr(e){const t=this;cr(t,e.target),t.params.cssMode||"auto"!==t.params.slidesPerView&&!t.params.autoHeight||t.update()}function Er(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const Cr=(e,t)=>{const r=Lt(),{params:n,el:i,wrapperEl:s,device:a}=e,o=!!n.nested,l="on"===t?"addEventListener":"removeEventListener",d=t;i&&"string"!=typeof i&&(r[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:o}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),r[l]("touchmove",e.onTouchMove,{passive:!1,capture:o}),r[l]("pointermove",e.onTouchMove,{passive:!1,capture:o}),r[l]("touchend",e.onTouchEnd,{passive:!0}),r[l]("pointerup",e.onTouchEnd,{passive:!0}),r[l]("pointercancel",e.onTouchEnd,{passive:!0}),r[l]("touchcancel",e.onTouchEnd,{passive:!0}),r[l]("pointerout",e.onTouchEnd,{passive:!0}),r[l]("pointerleave",e.onTouchEnd,{passive:!0}),r[l]("contextmenu",e.onTouchEnd,{passive:!0}),(n.preventClicks||n.preventClicksPropagation)&&i[l]("click",e.onClick,!0),n.cssMode&&s[l]("scroll",e.onScroll),n.updateOnWindowResize?e[d](a.ios||a.android?"resize orientationchange observerUpdate":"resize observerUpdate",xr,!0):e[d]("observerUpdate",xr,!0),i[l]("load",e.onLoad,{capture:!0}))};const kr=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var Mr={addClasses:function(){const e=this,{classNames:t,params:r,rtl:n,el:i,device:s}=e,a=function(e,t){const r=[];return e.forEach(e=>{"object"==typeof e?Object.keys(e).forEach(n=>{e[n]&&r.push(t+n)}):"string"==typeof e&&r.push(t+e)}),r}(["initialized",r.direction,{"free-mode":e.params.freeMode&&r.freeMode.enabled},{autoheight:r.autoHeight},{rtl:n},{grid:r.grid&&r.grid.rows>1},{"grid-column":r.grid&&r.grid.rows>1&&"column"===r.grid.fill},{android:s.android},{ios:s.ios},{"css-mode":r.cssMode},{centered:r.cssMode&&r.centeredSlides},{"watch-progress":r.watchSlidesProgress}],r.containerModifierClass);t.push(...a),i.classList.add(...t),e.emitContainerClasses()},removeClasses:function(){const{el:e,classNames:t}=this;e&&"string"!=typeof e&&(e.classList.remove(...t),this.emitContainerClasses())}};var Dr={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",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:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!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-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function Lr(e,t){return function(r){void 0===r&&(r={});const n=Object.keys(r)[0],i=r[n];"object"==typeof i&&null!==i?(!0===e[n]&&(e[n]={enabled:!0}),"navigation"===n&&e[n]&&e[n].enabled&&!e[n].prevEl&&!e[n].nextEl&&(e[n].auto=!0),["pagination","scrollbar"].indexOf(n)>=0&&e[n]&&e[n].enabled&&!e[n].el&&(e[n].auto=!0),n in e&&"enabled"in i?("object"!=typeof e[n]||"enabled"in e[n]||(e[n].enabled=!0),e[n]||(e[n]={enabled:!1}),Yt(t,r)):Yt(t,r)):Yt(t,r)}}const Or={eventsEmitter:or,update:hr,translate:fr,transition:{setTransition:function(e,t){const r=this;r.params.cssMode||(r.wrapperEl.style.transitionDuration=`${e}ms`,r.wrapperEl.style.transitionDelay=0===e?"0ms":""),r.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);const r=this,{params:n}=r;n.cssMode||(n.autoHeight&&r.updateAutoHeight(),mr({swiper:r,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e,t){void 0===e&&(e=!0);const r=this,{params:n}=r;r.animating=!1,n.cssMode||(r.setTransition(0),mr({swiper:r,runCallbacks:e,direction:t,step:"End"}))}},slide:gr,loop:vr,grabCursor:{setGrabCursor:function(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const r="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),r.style.cursor="move",r.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})},unsetGrabCursor:function(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}},events:{attachEvents:function(){const e=this,{params:t}=e;e.onTouchStart=yr.bind(e),e.onTouchMove=br.bind(e),e.onTouchEnd=Sr.bind(e),e.onDocumentTouchStart=Er.bind(e),t.cssMode&&(e.onScroll=Ar.bind(e)),e.onClick=_r.bind(e),e.onLoad=Tr.bind(e),Cr(e,"on")},detachEvents:function(){Cr(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{realIndex:t,initialized:r,params:n,el:i}=e,s=n.breakpoints;if(!s||s&&0===Object.keys(s).length)return;const a=Lt(),o="window"!==n.breakpointsBase&&n.breakpointsBase?"container":n.breakpointsBase,l=["window","container"].includes(n.breakpointsBase)||!n.breakpointsBase?e.el:a.querySelector(n.breakpointsBase),d=e.getBreakpoint(s,o,l);if(!d||e.currentBreakpoint===d)return;const c=(d in s?s[d]:void 0)||e.originalParams,u=kr(e,n),p=kr(e,c),h=e.params.grabCursor,f=c.grabCursor,m=n.enabled;u&&!p?(i.classList.remove(`${n.containerModifierClass}grid`,`${n.containerModifierClass}grid-column`),e.emitContainerClasses()):!u&&p&&(i.classList.add(`${n.containerModifierClass}grid`),(c.grid.fill&&"column"===c.grid.fill||!c.grid.fill&&"column"===n.grid.fill)&&i.classList.add(`${n.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!f?e.unsetGrabCursor():!h&&f&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(t=>{if(void 0===c[t])return;const r=n[t]&&n[t].enabled,i=c[t]&&c[t].enabled;r&&!i&&e[t].disable(),!r&&i&&e[t].enable()});const g=c.direction&&c.direction!==n.direction,v=n.loop&&(c.slidesPerView!==n.slidesPerView||g),w=n.loop;g&&r&&e.changeDirection(),Yt(e.params,c);const y=e.params.enabled,b=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),m&&!y?e.disable():!m&&y&&e.enable(),e.currentBreakpoint=d,e.emit("_beforeBreakpoint",c),r&&(v?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!w&&b?(e.loopCreate(t),e.updateSlides()):w&&!b&&e.loopDestroy()),e.emit("breakpoint",c)},getBreakpoint:function(e,t,r){if(void 0===t&&(t="window"),!e||"container"===t&&!r)return;let n=!1;const i=Rt(),s="window"===t?i.innerHeight:r.clientHeight,a=Object.keys(e).map(e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:s*t,point:e}}return{value:e,point:e}});a.sort((e,t)=>parseInt(e.value,10)-parseInt(t.value,10));for(let e=0;e<a.length;e+=1){const{point:s,value:o}=a[e];"window"===t?i.matchMedia(`(min-width: ${o}px)`).matches&&(n=s):o<=r.clientWidth&&(n=s)}return n||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:r}=e,{slidesOffsetBefore:n}=r;if(n){const t=e.slides.length-1,r=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*n;e.isLocked=e.size>r}else e.isLocked=1===e.snapGrid.length;!0===r.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===r.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:Mr},Rr={};let Pr=class e{constructor(){let t,r;for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];1===i.length&&i[0].constructor&&"Object"===Object.prototype.toString.call(i[0]).slice(8,-1)?r=i[0]:[t,r]=i,r||(r={}),r=Yt({},r),t&&!r.el&&(r.el=t);const a=Lt();if(r.el&&"string"==typeof r.el&&a.querySelectorAll(r.el).length>1){const t=[];return a.querySelectorAll(r.el).forEach(n=>{const i=Yt({},r,{el:n});t.push(new e(i))}),t}const o=this;o.__swiper__=!0,o.support=ir(),o.device=sr({userAgent:r.userAgent}),o.browser=ar(),o.eventsListeners={},o.eventsAnyListeners=[],o.modules=[...o.__modules__],r.modules&&Array.isArray(r.modules)&&o.modules.push(...r.modules);const l={};o.modules.forEach(e=>{e({params:r,swiper:o,extendParams:Lr(r,l),on:o.on.bind(o),once:o.once.bind(o),off:o.off.bind(o),emit:o.emit.bind(o)})});const d=Yt({},Dr,l);return o.params=Yt({},d,Rr,r),o.originalParams=Yt({},o.params),o.passedParams=Yt({},r),o.params&&o.params.on&&Object.keys(o.params.on).forEach(e=>{o.on(e,o.params.on[e])}),o.params&&o.params.onAny&&o.onAny(o.params.onAny),Object.assign(o,{enabled:o.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===o.params.direction,isVertical:()=>"vertical"===o.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:o.params.allowSlideNext,allowSlidePrev:o.params.allowSlidePrev,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:o.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:o.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),o.emit("_swiper"),o.params.init&&o.init(),o}getDirectionLabel(e){return this.isHorizontal()?e:{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"}[e]}getSlideIndex(e){const{slidesEl:t,params:r}=this,n=Ut(qt(t,`.${r.slideClass}, swiper-slide`)[0]);return Ut(e)-n}getSlideIndexByData(e){return this.getSlideIndex(this.slides.find(t=>1*t.getAttribute("data-swiper-slide-index")===e))}recalcSlides(){const{slidesEl:e,params:t}=this;this.slides=qt(e,`.${t.slideClass}, swiper-slide`)}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const r=this;e=Math.min(Math.max(e,0),1);const n=r.minTranslate(),i=(r.maxTranslate()-n)*e+n;r.translateTo(i,void 0===t?0:t),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter(t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return t.destroyed?"":e.className.split(" ").filter(e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass)).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.forEach(r=>{const n=e.getSlideClasses(r);t.push({slideEl:r,classNames:n}),e.emit("_slideClass",r,n)}),e.emit("_slideClasses",t)}slidesPerViewDynamic(e,t){void 0===e&&(e="current"),void 0===t&&(t=!1);const{params:r,slides:n,slidesGrid:i,slidesSizesGrid:s,size:a,activeIndex:o}=this;let l=1;if("number"==typeof r.slidesPerView)return r.slidesPerView;if(r.centeredSlides){let e,t=n[o]?Math.ceil(n[o].swiperSlideSize):0;for(let r=o+1;r<n.length;r+=1)n[r]&&!e&&(t+=Math.ceil(n[r].swiperSlideSize),l+=1,t>a&&(e=!0));for(let r=o-1;r>=0;r-=1)n[r]&&!e&&(t+=n[r].swiperSlideSize,l+=1,t>a&&(e=!0))}else if("current"===e)for(let e=o+1;e<n.length;e+=1){(t?i[e]+s[e]-i[o]<a:i[e]-i[o]<a)&&(l+=1)}else for(let e=o-1;e>=0;e-=1){i[o]-i[e]<a&&(l+=1)}return l}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:r}=e;function n(){const t=e.rtlTranslate?-1*e.translate:e.translate,r=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(r),e.updateActiveIndex(),e.updateSlidesClasses()}let i;if(r.breakpoints&&e.setBreakpoint(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete&&cr(e,t)}),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),r.freeMode&&r.freeMode.enabled&&!r.cssMode)n(),r.autoHeight&&e.updateAutoHeight();else{if(("auto"===r.slidesPerView||r.slidesPerView>1)&&e.isEnd&&!r.centeredSlides){const t=e.virtual&&r.virtual.enabled?e.virtual.slides:e.slides;i=e.slideTo(t.length-1,0,!1,!0)}else i=e.slideTo(e.activeIndex,0,!1,!0);i||n()}r.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t){void 0===t&&(t=!0);const r=this,n=r.params.direction;return e||(e="horizontal"===n?"vertical":"horizontal"),e===n||"horizontal"!==e&&"vertical"!==e||(r.el.classList.remove(`${r.params.containerModifierClass}${n}`),r.el.classList.add(`${r.params.containerModifierClass}${e}`),r.emitContainerClasses(),r.params.direction=e,r.slides.forEach(t=>{"vertical"===e?t.style.width="":t.style.height=""}),r.emit("changeDirection"),t&&r.update()),r}changeLanguageDirection(e){const t=this;t.rtl&&"rtl"===e||!t.rtl&&"ltr"===e||(t.rtl="rtl"===e,t.rtlTranslate="horizontal"===t.params.direction&&t.rtl,t.rtl?(t.el.classList.add(`${t.params.containerModifierClass}rtl`),t.el.dir="rtl"):(t.el.classList.remove(`${t.params.containerModifierClass}rtl`),t.el.dir="ltr"),t.update())}mount(e){const t=this;if(t.mounted)return!0;let r=e||t.params.el;if("string"==typeof r&&(r=document.querySelector(r)),!r)return!1;r.swiper=t,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===t.params.swiperElementNodeName.toUpperCase()&&(t.isElement=!0);const n=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let i=(()=>{if(r&&r.shadowRoot&&r.shadowRoot.querySelector){return r.shadowRoot.querySelector(n())}return qt(r,n())[0]})();return!i&&t.params.createElements&&(i=Gt("div",t.params.wrapperClass),r.append(i),qt(r,`.${t.params.slideClass}`).forEach(e=>{i.append(e)})),Object.assign(t,{el:r,wrapperEl:i,slidesEl:t.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:i,hostEl:t.isElement?r.parentNode.host:r,mounted:!0,rtl:"rtl"===r.dir.toLowerCase()||"rtl"===Wt(r,"direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===r.dir.toLowerCase()||"rtl"===Wt(r,"direction")),wrongRTL:"-webkit-box"===Wt(i,"display")}),!0}init(e){const t=this;if(t.initialized)return t;if(!1===t.mount(e))return t;t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.loop&&t.virtual&&t.params.virtual.enabled?t.slideTo(t.params.initialSlide+t.virtual.slidesBefore,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.params.loop&&t.loopCreate(void 0,!0),t.attachEvents();const r=[...t.el.querySelectorAll('[loading="lazy"]')];return t.isElement&&r.push(...t.hostEl.querySelectorAll('[loading="lazy"]')),r.forEach(e=>{e.complete?cr(t,e):e.addEventListener("load",e=>{cr(t,e.target)})}),pr(t),t.initialized=!0,pr(t),t.emit("init"),t.emit("afterInit"),t}destroy(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);const r=this,{params:n,el:i,wrapperEl:s,slides:a}=r;return void 0===r.params||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),n.loop&&r.loopDestroy(),t&&(r.removeClasses(),i&&"string"!=typeof i&&i.removeAttribute("style"),s&&s.removeAttribute("style"),a&&a.length&&a.forEach(e=>{e.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass,n.slideActiveClass,n.slideNextClass,n.slidePrevClass),e.removeAttribute("style"),e.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(e=>{r.off(e)}),!1!==e&&(r.el&&"string"!=typeof r.el&&(r.el.swiper=null),function(e){const t=e;Object.keys(t).forEach(e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}})}(r)),r.destroyed=!0),null}static extendDefaults(e){Yt(Rr,e)}static get extendedDefaults(){return Rr}static get defaults(){return Dr}static installModule(t){e.prototype.__modules__||(e.prototype.__modules__=[]);const r=e.prototype.__modules__;"function"==typeof t&&r.indexOf(t)<0&&r.push(t)}static use(t){return Array.isArray(t)?(t.forEach(t=>e.installModule(t)),e):(e.installModule(t),e)}};Object.keys(Or).forEach(e=>{Object.keys(Or[e]).forEach(t=>{Pr.prototype[t]=Or[e][t]})}),Pr.use([function(e){let{swiper:t,on:r,emit:n}=e;const i=Rt();let s=null,a=null;const o=()=>{t&&!t.destroyed&&t.initialized&&(n("beforeResize"),n("resize"))},l=()=>{t&&!t.destroyed&&t.initialized&&n("orientationchange")};r("init",()=>{t.params.resizeObserver&&void 0!==i.ResizeObserver?t&&!t.destroyed&&t.initialized&&(s=new ResizeObserver(e=>{a=i.requestAnimationFrame(()=>{const{width:r,height:n}=t;let i=r,s=n;e.forEach(e=>{let{contentBoxSize:r,contentRect:n,target:a}=e;a&&a!==t.el||(i=n?n.width:(r[0]||r).inlineSize,s=n?n.height:(r[0]||r).blockSize)}),i===r&&s===n||o()})}),s.observe(t.el)):(i.addEventListener("resize",o),i.addEventListener("orientationchange",l))}),r("destroy",()=>{a&&i.cancelAnimationFrame(a),s&&s.unobserve&&t.el&&(s.unobserve(t.el),s=null),i.removeEventListener("resize",o),i.removeEventListener("orientationchange",l)})},function(e){let{swiper:t,extendParams:r,on:n,emit:i}=e;const s=[],a=Rt(),o=function(e,r){void 0===r&&(r={});const n=new(a.MutationObserver||a.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length)return void i("observerUpdate",e[0]);const r=function(){i("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(r):a.setTimeout(r,0)});n.observe(e,{attributes:void 0===r.attributes||r.attributes,childList:t.isElement||(void 0===r.childList||r).childList,characterData:void 0===r.characterData||r.characterData}),s.push(n)};r({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=Vt(t.hostEl);for(let t=0;t<e.length;t+=1)o(e[t])}o(t.hostEl,{childList:t.params.observeSlideChildren}),o(t.wrapperEl,{attributes:!1})}}),n("destroy",()=>{s.forEach(e=>{e.disconnect()}),s.splice(0,s.length)})}]);const Ir=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_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","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Nr(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)&&!e.__swiper__}function Fr(e,t){const r=["__proto__","constructor","prototype"];Object.keys(t).filter(e=>r.indexOf(e)<0).forEach(r=>{void 0===e[r]?e[r]=t[r]:Nr(t[r])&&Nr(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Fr(e[r],t[r]):e[r]=t[r]})}function jr(e){return void 0===e&&(e={}),e.navigation&&void 0===e.navigation.nextEl&&void 0===e.navigation.prevEl}function Yr(e){return void 0===e&&(e={}),e.pagination&&void 0===e.pagination.el}function Br(e){return void 0===e&&(e={}),e.scrollbar&&void 0===e.scrollbar.el}function zr(e){void 0===e&&(e="");const t=e.split(" ").map(e=>e.trim()).filter(e=>!!e),r=[];return t.forEach(e=>{r.indexOf(e)<0&&r.push(e)}),r.join(" ")}function qr(e){return void 0===e&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hr.apply(this,arguments)}function Gr(e){return e.type&&e.type.displayName&&e.type.displayName.includes("SwiperSlide")}function Wr(e){const r=[];return t.Children.toArray(e).forEach(e=>{Gr(e)?r.push(e):e.props&&e.props.children&&Wr(e.props.children).forEach(e=>r.push(e))}),r}function Ur(e){const r=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return t.Children.toArray(e).forEach(e=>{if(Gr(e))r.push(e);else if(e.props&&e.props.slot&&n[e.props.slot])n[e.props.slot].push(e);else if(e.props&&e.props.children){const t=Wr(e.props.children);t.length>0?t.forEach(e=>r.push(e)):n["container-end"].push(e)}else n["container-end"].push(e)}),{slides:r,slots:n}}function Vr(e,r){return"undefined"==typeof window?t.useEffect(e,r):t.useLayoutEffect(e,r)}const $r=t.createContext(null),Zr=t.createContext(null),Xr=t.forwardRef(function(e,r){let{className:n,tag:i="div",wrapperTag:s="div",children:a,onSwiper:o,...l}=void 0===e?{}:e,d=!1;const[c,u]=t.useState("swiper"),[p,h]=t.useState(null),[f,m]=t.useState(!1),g=t.useRef(!1),v=t.useRef(null),w=t.useRef(null),y=t.useRef(null),b=t.useRef(null),S=t.useRef(null),x=t.useRef(null),_=t.useRef(null),A=t.useRef(null),{params:T,passedParams:E,rest:C,events:k}=function(e,t){void 0===e&&(e={}),void 0===t&&(t=!0);const r={on:{}},n={},i={};Fr(r,Dr),r._emitClasses=!0,r.init=!1;const s={},a=Ir.map(e=>e.replace(/_/,"")),o=Object.assign({},e);return Object.keys(o).forEach(o=>{void 0!==e[o]&&(a.indexOf(o)>=0?Nr(e[o])?(r[o]={},i[o]={},Fr(r[o],e[o]),Fr(i[o],e[o])):(r[o]=e[o],i[o]=e[o]):0===o.search(/on[A-Z]/)&&"function"==typeof e[o]?t?n[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:r.on[`${o[2].toLowerCase()}${o.substr(3)}`]=e[o]:s[o]=e[o])}),["navigation","pagination","scrollbar"].forEach(e=>{!0===r[e]&&(r[e]={}),!1===r[e]&&delete r[e]}),{params:r,passedParams:i,rest:s,events:n}}(l),{slides:M,slots:D}=Ur(a),L=()=>{m(!f)};Object.assign(T.on,{_containerClasses(e,t){u(t)}});const O=()=>{Object.assign(T.on,k),d=!0;const e={...T};if(delete e.wrapperClass,w.current=new Pr(e),w.current.virtual&&w.current.params.virtual.enabled){w.current.virtual.slides=M;const e={cache:!1,slides:M,renderExternal:h,renderExternalUpdate:!1};Fr(w.current.params.virtual,e),Fr(w.current.originalParams.virtual,e)}};v.current||O(),w.current&&w.current.on("_beforeBreakpoint",L);return t.useEffect(()=>()=>{w.current&&w.current.off("_beforeBreakpoint",L)}),t.useEffect(()=>{!g.current&&w.current&&(w.current.emitSlidesClasses(),g.current=!0)}),Vr(()=>{if(r&&(r.current=v.current),v.current)return w.current.destroyed&&O(),function(e,t){let{el:r,nextEl:n,prevEl:i,paginationEl:s,scrollbarEl:a,swiper:o}=e;jr(t)&&n&&i&&(o.params.navigation.nextEl=n,o.originalParams.navigation.nextEl=n,o.params.navigation.prevEl=i,o.originalParams.navigation.prevEl=i),Yr(t)&&s&&(o.params.pagination.el=s,o.originalParams.pagination.el=s),Br(t)&&a&&(o.params.scrollbar.el=a,o.originalParams.scrollbar.el=a),o.init(r)}({el:v.current,nextEl:S.current,prevEl:x.current,paginationEl:_.current,scrollbarEl:A.current,swiper:w.current},T),o&&!w.current.destroyed&&o(w.current),()=>{w.current&&!w.current.destroyed&&w.current.destroy(!0,!1)}},[]),Vr(()=>{!d&&k&&w.current&&Object.keys(k).forEach(e=>{w.current.on(e,k[e])});const e=function(e,t,r,n,i){const s=[];if(!t)return s;const a=e=>{s.indexOf(e)<0&&s.push(e)};if(r&&n){const e=n.map(i),t=r.map(i);e.join("")!==t.join("")&&a("children"),n.length!==r.length&&a("children")}return Ir.filter(e=>"_"===e[0]).map(e=>e.replace(/_/,"")).forEach(r=>{if(r in e&&r in t)if(Nr(e[r])&&Nr(t[r])){const n=Object.keys(e[r]),i=Object.keys(t[r]);n.length!==i.length?a(r):(n.forEach(n=>{e[r][n]!==t[r][n]&&a(r)}),i.forEach(n=>{e[r][n]!==t[r][n]&&a(r)}))}else e[r]!==t[r]&&a(r)}),s}(E,y.current,M,b.current,e=>e.key);return y.current=E,b.current=M,e.length&&w.current&&!w.current.destroyed&&function(e){let{swiper:t,slides:r,passedParams:n,changedParams:i,nextEl:s,prevEl:a,scrollbarEl:o,paginationEl:l}=e;const d=i.filter(e=>"children"!==e&&"direction"!==e&&"wrapperClass"!==e),{params:c,pagination:u,navigation:p,scrollbar:h,virtual:f,thumbs:m}=t;let g,v,w,y,b,S,x,_;i.includes("thumbs")&&n.thumbs&&n.thumbs.swiper&&!n.thumbs.swiper.destroyed&&c.thumbs&&(!c.thumbs.swiper||c.thumbs.swiper.destroyed)&&(g=!0),i.includes("controller")&&n.controller&&n.controller.control&&c.controller&&!c.controller.control&&(v=!0),i.includes("pagination")&&n.pagination&&(n.pagination.el||l)&&(c.pagination||!1===c.pagination)&&u&&!u.el&&(w=!0),i.includes("scrollbar")&&n.scrollbar&&(n.scrollbar.el||o)&&(c.scrollbar||!1===c.scrollbar)&&h&&!h.el&&(y=!0),i.includes("navigation")&&n.navigation&&(n.navigation.prevEl||a)&&(n.navigation.nextEl||s)&&(c.navigation||!1===c.navigation)&&p&&!p.prevEl&&!p.nextEl&&(b=!0);const A=e=>{t[e]&&(t[e].destroy(),"navigation"===e?(t.isElement&&(t[e].prevEl.remove(),t[e].nextEl.remove()),c[e].prevEl=void 0,c[e].nextEl=void 0,t[e].prevEl=void 0,t[e].nextEl=void 0):(t.isElement&&t[e].el.remove(),c[e].el=void 0,t[e].el=void 0))};i.includes("loop")&&t.isElement&&(c.loop&&!n.loop?S=!0:!c.loop&&n.loop?x=!0:_=!0),d.forEach(e=>{if(Nr(c[e])&&Nr(n[e]))Object.assign(c[e],n[e]),"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e||!("enabled"in n[e])||n[e].enabled||A(e);else{const t=n[e];!0!==t&&!1!==t||"navigation"!==e&&"pagination"!==e&&"scrollbar"!==e?c[e]=n[e]:!1===t&&A(e)}}),d.includes("controller")&&!v&&t.controller&&t.controller.control&&c.controller&&c.controller.control&&(t.controller.control=c.controller.control),i.includes("children")&&r&&f&&c.virtual.enabled?(f.slides=r,f.update(!0)):i.includes("virtual")&&f&&c.virtual.enabled&&(r&&(f.slides=r),f.update(!0)),i.includes("children")&&r&&c.loop&&(_=!0),g&&m.init()&&m.update(!0);v&&(t.controller.control=c.controller.control),w&&(!t.isElement||l&&"string"!=typeof l||(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(c.pagination.el=l),u.init(),u.render(),u.update()),y&&(!t.isElement||o&&"string"!=typeof o||(o=document.createElement("div"),o.classList.add("swiper-scrollbar"),o.part.add("scrollbar"),t.el.appendChild(o)),o&&(c.scrollbar.el=o),h.init(),h.updateSize(),h.setTranslate()),b&&(t.isElement&&(s&&"string"!=typeof s||(s=document.createElement("div"),s.classList.add("swiper-button-next"),Xt(s,t.hostEl.constructor.nextButtonSvg),s.part.add("button-next"),t.el.appendChild(s)),a&&"string"!=typeof a||(a=document.createElement("div"),a.classList.add("swiper-button-prev"),Xt(a,t.hostEl.constructor.prevButtonSvg),a.part.add("button-prev"),t.el.appendChild(a))),s&&(c.navigation.nextEl=s),a&&(c.navigation.prevEl=a),p.init(),p.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=n.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=n.allowSlidePrev),i.includes("direction")&&t.changeDirection(n.direction,!1),(S||_)&&t.loopDestroy(),(x||_)&&t.loopCreate(),t.update()}({swiper:w.current,slides:M,passedParams:E,changedParams:e,nextEl:S.current,prevEl:x.current,scrollbarEl:A.current,paginationEl:_.current}),()=>{k&&w.current&&Object.keys(k).forEach(e=>{w.current.off(e,k[e])})}}),Vr(()=>{var e;!(e=w.current)||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.emit("_virtualUpdated"),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())},[p]),t.createElement(i,Hr({ref:v,className:zr(`${c}${n?` ${n}`:""}`)},C),t.createElement(Zr.Provider,{value:w.current},D["container-start"],t.createElement(s,{className:qr(T.wrapperClass)},D["wrapper-start"],T.virtual?function(e,r,n){if(!n)return null;const i=e=>{let t=e;return e<0?t=r.length+e:t>=r.length&&(t-=r.length),t},s=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:a,to:o}=n,l=e.params.loop?-r.length:0,d=e.params.loop?2*r.length:r.length,c=[];for(let e=l;e<d;e+=1)e>=a&&e<=o&&c.push(r[i(e)]);return c.map((r,n)=>t.cloneElement(r,{swiper:e,style:s,key:r.props.virtualIndex||r.key||`slide-${n}`}))}(w.current,M,p):M.map((e,r)=>t.cloneElement(e,{swiper:w.current,swiperSlideIndex:r})),D["wrapper-end"]),jr(T)&&t.createElement(t.Fragment,null,t.createElement("div",{ref:x,className:"swiper-button-prev"}),t.createElement("div",{ref:S,className:"swiper-button-next"})),Br(T)&&t.createElement("div",{ref:A,className:"swiper-scrollbar"}),Yr(T)&&t.createElement("div",{ref:_,className:"swiper-pagination"}),D["container-end"]))});Xr.displayName="Swiper";const Qr=t.forwardRef(function(e,r){let{tag:n="div",children:i,className:s="",swiper:a,zoom:o,lazy:l,virtualIndex:d,swiperSlideIndex:c,...u}=void 0===e?{}:e;const p=t.useRef(null),[h,f]=t.useState("swiper-slide"),[m,g]=t.useState(!1);function v(e,t,r){t===p.current&&f(r)}Vr(()=>{if(void 0!==c&&(p.current.swiperSlideIndex=c),r&&(r.current=p.current),p.current&&a){if(!a.destroyed)return a.on("_slideClass",v),()=>{a&&a.off("_slideClass",v)};"swiper-slide"!==h&&f("swiper-slide")}}),Vr(()=>{a&&p.current&&!a.destroyed&&f(a.getSlideClasses(p.current))},[a]);const w={isActive:h.indexOf("swiper-slide-active")>=0,isVisible:h.indexOf("swiper-slide-visible")>=0,isPrev:h.indexOf("swiper-slide-prev")>=0,isNext:h.indexOf("swiper-slide-next")>=0},y=()=>"function"==typeof i?i(w):i;return t.createElement(n,Hr({ref:p,className:zr(`${h}${s?` ${s}`:""}`),"data-swiper-slide-index":d,onLoad:()=>{g(!0)}},u),o&&t.createElement($r.Provider,{value:w},t.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":"number"==typeof o?o:void 0},y(),l&&!m&&t.createElement("div",{className:"swiper-lazy-preloader"}))),!o&&t.createElement($r.Provider,{value:w},y(),l&&!m&&t.createElement("div",{className:"swiper-lazy-preloader"})))});Qr.displayName="SwiperSlide";const Kr=()=>e.jsxs("svg",{width:"66",height:"66",viewBox:"0 0 66 66",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M20.1172 33.0024H20.1462M32.9682 33.0024H32.9972M45.8482 33.0024H45.8772",stroke:"#4A4A4A",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M32.9992 65.1998C50.7828 65.1998 65.1992 50.7834 65.1992 32.9998C65.1992 15.2162 50.7828 0.799805 32.9992 0.799805C15.2156 0.799805 0.799218 15.2162 0.799218 32.9998C0.799218 38.1508 2.0087 43.0193 4.15916 47.3368C4.73064 48.4841 4.92085 49.7955 4.58954 51.0338L2.67168 58.2016C1.83913 61.3132 4.6858 64.1599 7.7974 63.3273L14.9652 61.4095C16.2035 61.0782 17.5149 61.2684 18.6623 61.8399C22.9798 63.9903 27.8482 65.1998 32.9992 65.1998Z",stroke:"#4A4A4A",strokeWidth:"1.5"})]});var Jr=t.memo(({isReply:r=!1,onNavigate:n})=>{var s;const{dataFeatureTrending:a}=le(),{goToStage:o}=$(),l=null!==(s=null==a?void 0:a.length)&&void 0!==s?s:0,d=t.useCallback(()=>{if("undefined"==typeof window)return 1;const e=window.innerWidth;return e>=1024?3:e>=640?2:1},[]),[c,u]=t.useState(()=>d());t.useEffect(()=>{if("undefined"==typeof window)return;const e=()=>u(d());return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[d]);const p=t.useCallback(e=>{n?n(`/feature-request/details/${e}?openComment=true`):o("details",{detailId:e,openComment:!0})},[o,n]),h=l>c;return l<=0?e.jsx(i.Card,{children:e.jsxs(i.BlockStack,{gap:"200",children:[e.jsx(i.InlineStack,{align:"center",children:e.jsx(i.Text,{variant:"headingLg",as:"p",children:"No requests found"})}),e.jsx(i.InlineStack,{align:"center",children:e.jsx(i.Text,{as:"p",alignment:"center",children:"Submit a request to help improve the functionality of SEO ON"})}),e.jsx(i.InlineStack,{align:"center",children:e.jsx(Kr,{})})]})}):e.jsx("div",{className:"Avada-FeatureReqTrending",children:r?e.jsx("div",{className:"Avada-CardFeatureReq-Main",children:e.jsx(Xr,{spaceBetween:10,loop:!0,pagination:{clickable:!0},navigation:h,modules:[er,Kt],className:"mySwiper",breakpoints:{0:{slidesPerView:1},640:{slidesPerView:2},1024:{slidesPerView:3}},children:a.map(t=>e.jsx(Qr,{children:e.jsx("div",{className:"Avada-CardFeatureReq-Slider",style:{height:"255px"},children:e.jsx(i.LegacyCard,{sectioned:!0,children:e.jsx(xt,{data:t,typeTrending:!0,handleFunc:()=>p(t.id)})})})},t.id))})}):e.jsx(i.LegacyCard,{title:e.jsx(i.Text,{variant:"headingMd",as:"p",children:"Trending"}),children:a.map(t=>e.jsxs("div",{children:[e.jsx(i.LegacyCard.Section,{children:e.jsx("div",{className:"Avada-CardFeatureReq-Slider",children:e.jsx(xt,{data:t,typeTrending:!0,handleFunc:()=>p(t.id)})})}),e.jsx(i.Divider,{})]},t.id))})})});var en=t.memo(function({featureRequestId:r,openComment:n}){var s,a;const{handleComment:o,loadingComment:l,subscribeFeatureRequest:d,featureReqUsers:c}=le(),{navigateTo:u}=$(),p=N(e=>e.shopInfo),[h,f]=t.useState(null),[m,g]=t.useState(!1),[v,w]=t.useState(""),[y,b]=t.useState(!1),S=t.useMemo(()=>{if(r)return r;if("undefined"==typeof window)return"";const e=window.location.pathname.match(/feature-request\/details\/([^/]+)/);return(null==e?void 0:e[1])||""},[r]),x=t.useMemo(()=>"boolean"==typeof n?n:"undefined"!=typeof window&&"true"===new URLSearchParams(window.location.search).get("openComment"),[n]);t.useEffect(()=>{let e;return(async()=>{try{if(!S)return;b(!0),e=await d(S,f)}finally{b(!1)}})().then(),()=>{"function"==typeof e&&e()}},[S,d]),t.useEffect(()=>{x&&g(!0)},[x]);const _=async()=>{if(!(!(null==h?void 0:h.id)||v.trim().length<=0||l))try{await o({parentId:h.id,replies:!1,value:v}),g(!1),w("")}catch(e){console.error("Error submitting comment:",e)}};return e.jsx(i.AppProvider,{i18n:{},children:e.jsx(i.Page,{backAction:{content:"Submit a request",onAction:()=>u("/feature-request")},title:"Back",children:e.jsxs(i.BlockStack,{gap:"300",children:[e.jsx(i.LegacyCard,{sectioned:!0,children:e.jsxs(i.BlockStack,{gap:"300",children:[y?e.jsx(_t,{}):h?e.jsx("div",{className:"Avada-FeatureReqDetails",children:e.jsx(xt,{data:h,isHover:!1,handleFunc:()=>g(!m)})}):e.jsx(i.Text,{as:"p",tone:"subdued",children:"Feature request not found."}),m?e.jsx(i.LegacyCard,{children:e.jsxs("div",{className:"Avada-Comment-Main",children:[e.jsx("div",{onKeyDown:e=>{if("Enter"===e.key){if(e.shiftKey)return;e.preventDefault(),_()}},children:e.jsx(i.TextField,{autoFocus:!0,value:v,placeholder:"What do you think?",multiline:5,onChange:e=>w(e),autoComplete:"off",label:"",disabled:null===(s=null==c?void 0:c[(null==p?void 0:p.shopId)||(null==p?void 0:p.id)||""])||void 0===s?void 0:s.isUserBlocked})}),e.jsx(i.LegacyCard.Section,{actions:[{content:e.jsx(i.Button,{onClick:()=>{g(!1),w("")},children:"Cancel"})},{content:e.jsx(i.Button,{variant:"primary",disabled:v.length<=0,loading:l,onClick:()=>{_()},children:"Reply"})}],subdued:!0})]})}):(null==p?void 0:p.blockUserReq)?e.jsx("div",{}):e.jsx("div",{className:"Polaris-Button Polaris-Button--pressable Polaris-Button--variantSecondary Polaris-Button--sizeMedium Polaris-Button--fullWidth ",style:{color:"#616161",opacity:(null===(a=null==c?void 0:c[(null==p?void 0:p.shopId)||(null==p?void 0:p.id)||""])||void 0===a?void 0:a.isUserBlocked)?.5:1},onClick:()=>{var e;(null===(e=null==c?void 0:c[(null==p?void 0:p.shopId)||(null==p?void 0:p.id)||""])||void 0===e?void 0:e.isUserBlocked)||g(!0)},children:"Write a reply"})]})}),e.jsxs(i.BlockStack,{gap:"300",children:[!y&&h&&e.jsx(Ct,{id:h.id,isShow:!0}),e.jsx("p",{style:{fontSize:"13px",fontWeight:"650",color:"#303030"},children:"Trending"}),!y&&e.jsx(Jr,{isReply:!0})]})]})})})}),tn=function(e,t){return tn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},tn(e,t)};