@qratilabs/qrati-connect 2.23.9 → 2.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +84 -54
- package/element/2CMH9VMM.js +4 -0
- package/element/{BqHk5hDM.js → BDrHm_qM.js} +3 -3
- package/element/BKDqpSN62.js +3 -0
- package/element/{lrjV8c1G2.js → BM9ujORR2.js} +1 -1
- package/element/{BYEF5Khs.js → BOqkzZ92.js} +1 -1
- package/element/{-p_JqYFM2.js → BP2rYgya2.js} +9 -9
- package/element/BZu3c37u.js +1 -0
- package/element/Bh8kXbe92.js +93 -0
- package/{umd/BvNf2yif2.js → element/Bow6F3212.js} +29 -29
- package/{umd/BkvtmX4K.js → element/BsYbcfkG.js} +1 -1
- package/element/BxErY-nv.js +7 -0
- package/element/{C8_zGNAf.js → C12iSy3L.js} +1 -1
- package/element/{D9NypPiv.js → C3dOFk9A.js} +1 -1
- package/element/C52SUIvC2.js +35 -0
- package/element/{DIYUC8M3.js → CAETItHr.js} +1 -1
- package/element/{Cb1JRT_1.js → CATr-3VW.js} +1 -1
- package/element/{Byk0pccK.js → CFnGGYmq.js} +1 -1
- package/element/CHTzn6mh2.js +4 -0
- package/element/CL_evx_l.js +1 -0
- package/element/{e_wwJ5wx2.js → CLdpUOLk2.js} +4 -4
- package/element/{qWp4ucdT.js → CM46vluW.js} +1 -1
- package/{umd/BtN9y353.js → element/CVRTTCyF.js} +1 -1
- package/{umd/9QY9BKOL2.js → element/CWhnvMey2.js} +8 -8
- package/{umd/B14kCOq8.js → element/CZ9iaxjO.js} +1 -1
- package/element/CaX2xgrP.js +41 -0
- package/element/{b6CwQBFC.js → ChJXhA9c.js} +5 -5
- package/element/{4VTPoA38.js → CqBk9L5O.js} +1 -1
- package/{umd/CiiNqDJq.js → element/CsfDBJh72.js} +1 -1
- package/element/{_ty2jtjs.js → D35mTuTT.js} +1 -1
- package/element/D5TKEdBd2.js +3 -0
- package/element/{CCLXmMXp.js → DF0LxcV7.js} +1 -1
- package/element/{DvTRhlvs.js → DGGc10Cy.js} +1 -1
- package/element/{ekog7y-V.js → DGbyGc8b.js} +1 -1
- package/element/DN26AtHL2.js +4 -0
- package/element/{DsvRTvCp.js → DWBbTgnB.js} +1 -1
- package/element/{BQuhYd4G2.js → DZtaQWVG2.js} +1 -1
- package/{umd/D0VKfxwE.js → element/DdOwRfWG.js} +2 -2
- package/element/DkG0zv7_2.js +9 -0
- package/{umd/gk4TX_a62.js → element/DlRUi0u42.js} +1 -1
- package/element/{DXx41__x2.js → DlqJDAie2.js} +1 -1
- package/element/DnIueBGr2.js +1 -0
- package/element/{BglDIiFp.js → DnQ6XaLR.js} +2 -2
- package/element/DrrpB4Om.js +1 -0
- package/element/DtRwaUYF2.js +85 -0
- package/element/{CSO2IaJ1.js → LYboLIEU.js} +2 -2
- package/{umd/DNG5BSHx2.js → element/N4HKgEC52.js} +1 -1
- package/element/Rcen6i0h.js +80 -0
- package/element/{MpvHkxaz2.js → Z0-Tddye2.js} +1 -1
- package/element/dT6WSX65.js +1 -0
- package/element/h4ZjZXfe2.js +1 -0
- package/element/kiL9JENf2.js +3 -0
- package/element/{BdOzsWR32.js → lcKuIs2T2.js} +1 -1
- package/element/{DdmVPlUC2.js → mIANlVHi2.js} +1 -1
- package/element/mQzpzQ_t.js +3 -0
- package/element/web.es.js +26 -105
- package/package.json +3 -15
- package/react/index.d.mts +182 -6
- package/react/index.d.ts +182 -6
- package/element/9QY9BKOL2.js +0 -8
- package/element/B14kCOq8.js +0 -2
- package/element/BItJQVdK.js +0 -41
- package/element/BYoa-kpQ2.js +0 -9
- package/element/Be1e_ATJ.js +0 -1
- package/element/BfkCwRAR2.js +0 -3
- package/element/BkvtmX4K.js +0 -2
- package/element/BsT0vqml.js +0 -1
- package/element/BtN9y353.js +0 -1
- package/element/BvNf2yif2.js +0 -39
- package/element/C030L_Hu2.js +0 -4
- package/element/C0MGOytI.js +0 -1
- package/element/C3tT7YRo2.js +0 -37
- package/element/C3uDEVBt.js +0 -1
- package/element/CJ5ChvJ52.js +0 -93
- package/element/CiiNqDJq.js +0 -3
- package/element/CnoPTYOO.js +0 -1
- package/element/D0VKfxwE.js +0 -10
- package/element/D4apO9G62.js +0 -4
- package/element/DB1jhaAe2.js +0 -85
- package/element/DNG5BSHx2.js +0 -2
- package/element/LJWh_4Di.js +0 -2
- package/element/gjXXuILV2.js +0 -3
- package/element/gk4TX_a62.js +0 -7
- package/element/qNDy94Dr2.js +0 -3
- package/element/srDF4VyG.js +0 -9
- package/element/styles.css +0 -288
- package/umd/-p_JqYFM2.js +0 -14
- package/umd/4VTPoA38.js +0 -1
- package/umd/BCTYvPrD.js +0 -1
- package/umd/BItJQVdK.js +0 -41
- package/umd/BQuhYd4G2.js +0 -2
- package/umd/BYEF5Khs.js +0 -1
- package/umd/BYoa-kpQ2.js +0 -9
- package/umd/BdOzsWR32.js +0 -9
- package/umd/Be1e_ATJ.js +0 -1
- package/umd/BfkCwRAR2.js +0 -3
- package/umd/BglDIiFp.js +0 -3
- package/umd/BkIDQGIs.js +0 -1
- package/umd/Bki5T_lb.js +0 -1
- package/umd/BqHk5hDM.js +0 -9
- package/umd/BsT0vqml.js +0 -1
- package/umd/Byk0pccK.js +0 -1
- package/umd/C030L_Hu2.js +0 -4
- package/umd/C0MGOytI.js +0 -1
- package/umd/C3tT7YRo2.js +0 -37
- package/umd/C3uDEVBt.js +0 -1
- package/umd/C8_zGNAf.js +0 -1
- package/umd/CCLXmMXp.js +0 -3
- package/umd/CJ5ChvJ52.js +0 -93
- package/umd/CSO2IaJ1.js +0 -2
- package/umd/Cb1JRT_1.js +0 -1
- package/umd/CfMNBPpx2.js +0 -1
- package/umd/CgUphJWo.js +0 -1
- package/umd/Cko4QHwX.js +0 -1
- package/umd/CnoPTYOO.js +0 -1
- package/umd/D4apO9G62.js +0 -4
- package/umd/D9NypPiv.js +0 -7
- package/umd/DB1jhaAe2.js +0 -85
- package/umd/DIYUC8M3.js +0 -2
- package/umd/DXx41__x2.js +0 -2
- package/umd/DdmVPlUC2.js +0 -13
- package/umd/DsvRTvCp.js +0 -8
- package/umd/DvTRhlvs.js +0 -2
- package/umd/LJWh_4Di.js +0 -2
- package/umd/MpvHkxaz2.js +0 -16
- package/umd/_ty2jtjs.js +0 -2
- package/umd/b6CwQBFC.js +0 -5
- package/umd/e_wwJ5wx2.js +0 -5
- package/umd/ekog7y-V.js +0 -1
- package/umd/gjXXuILV2.js +0 -3
- package/umd/index.d.ts +0 -14
- package/umd/lrjV8c1G2.js +0 -8
- package/umd/qNDy94Dr2.js +0 -3
- package/umd/qWp4ucdT.js +0 -1
- package/umd/rtH8O6Hc.js +0 -1
- package/umd/srDF4VyG.js +0 -9
- package/umd/web.es.js +0 -122
- package/umd/web.umd.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{t as a}from"./
|
|
1
|
+
import{t as a}from"./DrrpB4Om.js";import{D as t,n as s}from"./CaX2xgrP.js";import{i as e,n as r,u as o}from"./ChJXhA9c.js";import{t as i}from"./DF0LxcV7.js";import{t as n}from"./DGbyGc8b.js";import{t as l}from"./DGGc10Cy.js";import{n as m,t as c}from"./BxErY-nv.js";import{t as g}from"./C3dOFk9A.js";import{t as d}from"./CM46vluW.js";import{t as p}from"./DnQ6XaLR.js";var f=()=>{const f=o(),{organization:v,props:h}=s(),u=h?.organizationId,{loading:N,event:j}=d({eventSlug:f.eventSlug});if(N)/* @__PURE__ */return a("div",{children:[
|
|
2
2
|
/* @__PURE__ */a(n,{className:"mx-auto mt-4 h-8 w-64"}),
|
|
3
3
|
/* @__PURE__ */a(n,{className:"mx-auto mt-6 h-6 w-72"}),
|
|
4
4
|
/* @__PURE__ */a(n,{className:"mx-auto mt-6 h-8 w-72"}),
|
|
5
5
|
/* @__PURE__ */a("div",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:8}).map((t,s)=>/* @__PURE__ */a(n,{className:"h-72"},s))})]});const w=j?.organizationId?.toString?.()||j?.organizationId,x=u?.toString?.()||u;/* @__PURE__ */
|
|
6
|
-
return a("div",j&&w===x?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */a(l,{locale:j?.language??"en",translations:j?.translations,children:[
|
|
6
|
+
return a("div",j&&w===x?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */a(l,{locale:j?.language??"en",translations:j?.translations,children:[v?.navigationSettings?.enableNavbar&&/* @__PURE__ */a(m,{}),
|
|
7
7
|
/* @__PURE__ */a(p,{}),
|
|
8
8
|
/* @__PURE__ */a(e,{}),
|
|
9
|
-
/* @__PURE__ */a(c,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */a(i,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */a("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */a(r,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */a(g,{children:"All events"})})]})};export{
|
|
9
|
+
/* @__PURE__ */a(c,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */a(i,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */a("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */a(r,{to:t.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */a(g,{children:"All events"})})]})};export{f as default};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e}from"./Cko4QHwX.js";import{C as t,_ as o,f as l,h as r,p as a,t as n}from"./DrrpB4Om.js";import{I as i,a as f,n as c,w as p}from"./CaX2xgrP.js";import{t as s}from"./BZu3c37u.js";import{t as d}from"./DF0LxcV7.js";import{t as u}from"./Rcen6i0h.js";import{t as m}from"./h4ZjZXfe2.js";import{a as g,i as b,n as h,r as x,t as v}from"./DkG0zv7_2.js";import{t as k}from"./CfMNBPpx2.js";var y=[[90,-180],[-90,180]],w=[20,0],z="#fb8500",A={topLeft:[276,60],bottomRight:[60,60]},E=new s,L=e=>e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),R=({onExplore:s,logoUrl:R})=>{const C=l(null),T=l(null),O=l(null),M=l(null),I=l(null),W=l(null),j=l(null),S=l(!1),Z=l(!1),q=a(()=>(()=>{try{const e=sessionStorage.getItem(p);if(!e)return null;const t=JSON.parse(e);if("number"==typeof t?.center?.lat&&"number"==typeof t?.center?.lng&&"number"==typeof t?.zoom)return t}catch{}return null})(),[]),[D,B]=r(!0),[H,N]=r(!1),{folderTree:P,activeFolderId:U,activeFolder:F,visibleEvents:Y,setActiveFolderId:J,isLoadingEvents:G}=m(),{organization:Q}=c();return o(()=>{if(!C.current||T.current)return;k("leaflet",'.leaflet-pane,.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-tile-container,.leaflet-pane>svg,.leaflet-pane>canvas,.leaflet-zoom-box,.leaflet-image-layer,.leaflet-layer{position:absolute;top:0;left:0}.leaflet-container{overflow:hidden}.leaflet-tile,.leaflet-marker-icon,.leaflet-marker-shadow{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}.leaflet-tile::selection{background:0 0}.leaflet-safari .leaflet-tile{image-rendering:-webkit-optimize-contrast}.leaflet-safari .leaflet-tile-container{-webkit-transform-origin:0 0;width:1600px;height:1600px}.leaflet-marker-icon,.leaflet-marker-shadow{display:block}.leaflet-container .leaflet-overlay-pane svg{max-width:none!important;max-height:none!important}.leaflet-container .leaflet-marker-pane img,.leaflet-container .leaflet-shadow-pane img,.leaflet-container .leaflet-tile-pane img,.leaflet-container img.leaflet-image-layer,.leaflet-container .leaflet-tile{width:auto;padding:0;max-width:none!important;max-height:none!important}.leaflet-container img.leaflet-tile{mix-blend-mode:plus-lighter}.leaflet-container.leaflet-touch-zoom{-ms-touch-action:pan-x pan-y;touch-action:pan-x pan-y}.leaflet-container.leaflet-touch-drag{-ms-touch-action:pinch-zoom;touch-action:none;touch-action:pinch-zoom}.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom{-ms-touch-action:none;touch-action:none}.leaflet-container{-webkit-tap-highlight-color:transparent}.leaflet-container a{-webkit-tap-highlight-color:#33b5e566}.leaflet-tile{filter:inherit;visibility:hidden}.leaflet-tile-loaded{visibility:inherit}.leaflet-zoom-box{box-sizing:border-box;z-index:800;width:0;height:0}.leaflet-overlay-pane svg{-moz-user-select:none}.leaflet-pane{z-index:400}.leaflet-tile-pane{z-index:200}.leaflet-overlay-pane{z-index:400}.leaflet-shadow-pane{z-index:500}.leaflet-marker-pane{z-index:600}.leaflet-tooltip-pane{z-index:650}.leaflet-popup-pane{z-index:700}.leaflet-map-pane canvas{z-index:100}.leaflet-map-pane svg{z-index:200}.leaflet-vml-shape{width:1px;height:1px}.lvml{behavior:url(#default#VML);display:inline-block;position:absolute}.leaflet-control{z-index:800;pointer-events:visiblePainted;pointer-events:auto;position:relative}.leaflet-top,.leaflet-bottom{z-index:1000;pointer-events:none;position:absolute}.leaflet-top{top:0}.leaflet-right{right:0}.leaflet-bottom{bottom:0}.leaflet-left{left:0}.leaflet-control{float:left;clear:both}.leaflet-right .leaflet-control{float:right}.leaflet-top .leaflet-control{margin-top:10px}.leaflet-bottom .leaflet-control{margin-bottom:10px}.leaflet-left .leaflet-control{margin-left:10px}.leaflet-right .leaflet-control{margin-right:10px}.leaflet-fade-anim .leaflet-popup{opacity:0;transition:opacity .2s linear}.leaflet-fade-anim .leaflet-map-pane .leaflet-popup{opacity:1}.leaflet-zoom-animated{transform-origin:0 0}svg.leaflet-zoom-animated{will-change:transform}.leaflet-zoom-anim .leaflet-zoom-animated{-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1);-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1);transition:transform .25s cubic-bezier(0,0,.25,1)}.leaflet-zoom-anim .leaflet-tile,.leaflet-pan-anim .leaflet-tile{transition:none}.leaflet-zoom-anim .leaflet-zoom-hide{visibility:hidden}.leaflet-interactive{cursor:pointer}.leaflet-grab{cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.leaflet-crosshair,.leaflet-crosshair .leaflet-interactive{cursor:crosshair}.leaflet-popup-pane,.leaflet-control{cursor:auto}.leaflet-dragging .leaflet-grab,.leaflet-dragging .leaflet-grab .leaflet-interactive,.leaflet-dragging .leaflet-marker-draggable{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.leaflet-marker-icon,.leaflet-marker-shadow,.leaflet-image-layer,.leaflet-pane>svg path,.leaflet-tile-container{pointer-events:none}.leaflet-marker-icon.leaflet-interactive,.leaflet-image-layer.leaflet-interactive,.leaflet-pane>svg path.leaflet-interactive,svg.leaflet-image-layer.leaflet-interactive path{pointer-events:visiblePainted;pointer-events:auto}.leaflet-container{outline-offset:1px;background:#ddd}.leaflet-container a{color:#0078a8}.leaflet-zoom-box{background:#ffffff80;border:2px dotted #38f}.leaflet-container{font-family:Helvetica Neue,Arial,Helvetica,sans-serif;font-size:.75rem;line-height:1.5}.leaflet-bar{border-radius:4px;box-shadow:0 1px 5px #000000a6}.leaflet-bar a{text-align:center;color:#000;background-color:#fff;border-bottom:1px solid #ccc;width:26px;height:26px;line-height:26px;text-decoration:none;display:block}.leaflet-bar a,.leaflet-control-layers-toggle{background-position:50%;background-repeat:no-repeat;display:block}.leaflet-bar a:hover,.leaflet-bar a:focus{background-color:#f4f4f4}.leaflet-bar a:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.leaflet-bar a:last-child{border-bottom:none;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.leaflet-bar a.leaflet-disabled{cursor:default;color:#bbb;background-color:#f4f4f4}.leaflet-touch .leaflet-bar a{width:30px;height:30px;line-height:30px}.leaflet-touch .leaflet-bar a:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.leaflet-touch .leaflet-bar a:last-child{border-bottom-right-radius:2px;border-bottom-left-radius:2px}.leaflet-control-zoom-in,.leaflet-control-zoom-out{text-indent:1px;font:700 18px Lucida Console,Monaco,monospace}.leaflet-touch .leaflet-control-zoom-in,.leaflet-touch .leaflet-control-zoom-out{font-size:22px}.leaflet-control-layers{background:#fff;border-radius:5px;box-shadow:0 1px 5px #0006}.leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAACf0lEQVR4AY1UM3gkARTePdvdoTxXKc+qTl3aU5U6b2Kbkz3Gtq3Zw6ziLGNPzrYx7946Tr6/ee/XeCQ4D3ykPtL5tHno4n0d/h3+xfuWHGLX81cn7r0iTNzjr7LrlxCqPtkbTQEHeqOrTy4Yyt3VCi/IOB0v7rVC7q45Q3Gr5K6jt+3Gl5nCoDD4MtO+j96Wu8atmhGqcNGHObuf8OM/x3AMx38+4Z2sPqzCxRFK2aF2e5Jol56XTLyggAMTL56XOMoS1W4pOyjUcGGQdZxU6qRh7B9Zp+PfpOFlqt0zyDZckPi1ttmIp03jX8gyJ8a/PG2yutpS/Vol7peZIbZcKBAEEheEIAgFbDkz5H6Zrkm2hVWGiXKiF4Ycw0RWKdtC16Q7qe3X4iOMxruonzegJzWaXFrU9utOSsLUmrc0YjeWYjCW4PDMADElpJSSQ0vQvA1Tm6/JlKnqFs1EGyZiFCqnRZTEJJJiKRYzVYzJck2Rm6P4iH+cmSY0YzimYa8l0EtTODFWhcMIMVqdsI2uiTvKmTisIDHJ3od5GILVhBCarCfVRmo4uTjkhrhzkiBV7SsaqS+TzrzM1qpGGUFt28pIySQHR6h7F6KSwGWm97ay+Z+ZqMcEjEWebE7wxCSQwpkhJqoZA5ivCdZDjJepuJ9IQjGGUmuXJdBFUygxVqVsxFsLMbDe8ZbDYVCGKxs+W080max1hFCarCfV+C1KATwcnvE9gRRuMP2prdbWGowm1KB1y+zwMMENkM755cJ2yPDtqhTI6ED1M/82yIDtC/4j4BijjeObflpO9I9MwXTCsSX8jWAFeHr05WoLTJ5G8IQVS/7vwR6ohirYM7f6HzYpogfS3R2OAAAAAElFTkSuQmCC);width:36px;height:36px}.leaflet-retina .leaflet-control-layers-toggle{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADQAAAA0CAQAAABvcdNgAAAEsklEQVR4AWL4TydIhpZK1kpWOlg0w3ZXP6D2soBtG42jeI6ZmQTHzAxiTbSJsYLjO9HhP+WOmcuhciVnmHVQcJnp7DFvScowZorad/+V/fVzMdMT2g9Cv9guXGv/7pYOrXh2U+RRR3dSd9JRx6bIFc/ekqHI29JC6pJ5ZEh1yWkhkbcFeSjxgx3L2m1cb1C7bceyxA+CNjT/Ifff+/kDk2u/w/33/IeCMOSaWZ4glosqT3DNnNZQ7Cs58/3Ce5HL78iZH/vKVIaYlqzfdLu8Vi7dnvUbEza5Idt36tquZFldl6N5Z/POLof0XLK61mZCmJSWjVF9tEjUluu74IUXvgttuVIHE7YxSkaYhJZam7yiM9Pv82JYfl9nptxZaxMJE4YSPty+vF0+Y2up9d3wwijfjZbabqm/3bZ9ecKHsiGmRflnn1MW4pjHf9oLufyn2z3y1D6n8g8TZhxyzipLNPnAUpsOiuWimg52psrTZYnOWYNDTMuWBWa0tJb4rgq1UvmutpaYEbZlwU3CLJm/ayYjHW5/h7xWLn9Hh1vepDkyf7dE7MtT5LR4e7yYpHrkhOUpEfssBLq2pPhAqoSWKUkk7EDqkmK6RrCEzqDjhNDWNE+XSMvkJRDWlZTmCW0l0PHQGRZY5t1L83kT0Y3l2SItk5JAWHl2dCOBm+fPu3fo5/3v61RMCO9Jx2EEYYhb0rmNQMX/vm7gqOEJLcXTGw3CAuRNeyaPWwjR8PRqKQ1PDA/dpv+on9Shox52WFnx0KY8onHayrJzm87i5h9xGw/tfkev0jGsQizqezUKjk12hBMKJ4kbCqGPVNXudyyrShovGw5CgxsRICxF6aRmSjlBnHRzg7Gx8fKqEubI2rahQYdR1YgDIRQO7JvQyD52hoIQx0mxa0ODtW2Iozn1le2iIRdzwWewedyZzewidueOGqlsn1MvcnQpuVwLGG3/IR1hIKxCjelIDZ8ldqWz25jWAsnldEnK0Zxro19TGVb2ffIZEsIO89EIEDvKMPrzmBOQcKQ+rroye6NgRRxqR4U8EAkz0CL6uSGOm6KQCdWjvjRiSP1BPalCRS5iQYiEIvxuBMJEWgzSoHADcVMuN7IuqqTeyUPq22qFimFtxDyBBJEwNyt6TM88blFHao/6tWWhuuOM4SAK4EI4QmFHA+SEyWlp4EQoJ13cYGzMu7yszEIBOm2rVmHUNqwAIQabISNMRstmdhNWcFLsSm+0tjJH1MdRxO5Nx0WDMhCtgD6OKgZeljJqJKc9po8juskR9XN0Y1lZ3mWjLR9JCO1jRDMd0fpYC2VnvjBSEFg7wBENc0R9HFlb0xvF1+TBEpF68d+DHR6IOWVv2BECtxo46hOFUBd/APU57WIoEwJhIi2CdpyZX0m93BZicktMj1AS9dClteUFAUNUIEygRZCtik5zSxI9MubTBH1GOiHsiLJ3OCoSZkILa9PxiN0EbvhsAo8tdAf9Seepd36lGWHmtNANTv5Jd0z4QYyeo/UEJqxKRpg5LZx6btLPsOaEmdMyxYdlc8LMaJnikDlhclqmPiQnTEpLUIZEwkRagjYkEibQErwhkTAKCLQEbUgkzJQWc/0PstHHcfEdQ+UAAAAASUVORK5CYII=);background-size:26px 26px}.leaflet-touch .leaflet-control-layers-toggle{width:44px;height:44px}.leaflet-control-layers .leaflet-control-layers-list,.leaflet-control-layers-expanded .leaflet-control-layers-toggle{display:none}.leaflet-control-layers-expanded .leaflet-control-layers-list{display:block;position:relative}.leaflet-control-layers-expanded{color:#333;background:#fff;padding:6px 10px 6px 6px}.leaflet-control-layers-scrollbar{padding-right:5px;overflow:hidden scroll}.leaflet-control-layers-selector{margin-top:2px;position:relative;top:1px}.leaflet-control-layers label{font-size:1.08333em;display:block}.leaflet-control-layers-separator{border-top:1px solid #ddd;height:0;margin:5px -10px 5px -6px}.leaflet-default-icon-path{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=)}.leaflet-container .leaflet-control-attribution{background:#fffc;margin:0}.leaflet-control-attribution,.leaflet-control-scale-line{color:#333;padding:0 5px;line-height:1.4}.leaflet-control-attribution a{text-decoration:none}.leaflet-control-attribution a:hover,.leaflet-control-attribution a:focus{text-decoration:underline}.leaflet-attribution-flag{width:1em;height:.6669em;vertical-align:baseline!important;display:inline!important}.leaflet-left .leaflet-control-scale{margin-left:5px}.leaflet-bottom .leaflet-control-scale{margin-bottom:5px}.leaflet-control-scale-line{white-space:nowrap;box-sizing:border-box;text-shadow:1px 1px #fff;background:#fffc;border:2px solid #777;border-top:none;padding:2px 5px 1px;line-height:1.1}.leaflet-control-scale-line:not(:first-child){border-top:2px solid #777;border-bottom:none;margin-top:-2px}.leaflet-control-scale-line:not(:first-child):not(:last-child){border-bottom:2px solid #777}.leaflet-touch .leaflet-control-attribution,.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{box-shadow:none}.leaflet-touch .leaflet-control-layers,.leaflet-touch .leaflet-bar{background-clip:padding-box;border:2px solid #0003}.leaflet-popup{text-align:center;margin-bottom:20px;position:absolute}.leaflet-popup-content-wrapper{text-align:left;border-radius:12px;padding:1px}.leaflet-popup-content{min-height:1px;margin:13px 24px 13px 20px;font-size:1.08333em;line-height:1.3}.leaflet-popup-content p{margin:1.3em 0}.leaflet-popup-tip-container{pointer-events:none;width:40px;height:20px;margin-top:-1px;margin-left:-20px;position:absolute;left:50%;overflow:hidden}.leaflet-popup-tip{pointer-events:auto;width:17px;height:17px;margin:-10px auto 0;padding:1px;transform:rotate(45deg)}.leaflet-popup-content-wrapper,.leaflet-popup-tip{color:#333;background:#fff;box-shadow:0 3px 14px #0006}.leaflet-container a.leaflet-popup-close-button{text-align:center;color:#757575;background:0 0;border:none;width:24px;height:24px;font:16px/24px Tahoma,Verdana,sans-serif;text-decoration:none;position:absolute;top:0;right:0}.leaflet-container a.leaflet-popup-close-button:hover,.leaflet-container a.leaflet-popup-close-button:focus{color:#585858}.leaflet-popup-scrolled{overflow:auto}.leaflet-oldie .leaflet-popup-content-wrapper{-ms-zoom:1}.leaflet-oldie .leaflet-popup-tip{-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";width:24px;filter:progid:DXImageTransform.Microsoft.Matrix(M11=.707107, M12=.707107, M21=-.707107, M22=.707107);margin:0 auto}.leaflet-oldie .leaflet-control-zoom,.leaflet-oldie .leaflet-control-layers,.leaflet-oldie .leaflet-popup-content-wrapper,.leaflet-oldie .leaflet-popup-tip{border:1px solid #999}.leaflet-div-icon{background:#fff;border:1px solid #666}.leaflet-tooltip{color:#222;white-space:nowrap;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#fff;border:1px solid #fff;border-radius:3px;padding:6px;position:absolute;box-shadow:0 1px 3px #0006}.leaflet-tooltip.leaflet-interactive{cursor:pointer;pointer-events:auto}.leaflet-tooltip-top:before,.leaflet-tooltip-bottom:before,.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{pointer-events:none;content:"";background:0 0;border:6px solid #0000;position:absolute}.leaflet-tooltip-bottom{margin-top:6px}.leaflet-tooltip-top{margin-top:-6px}.leaflet-tooltip-bottom:before,.leaflet-tooltip-top:before{margin-left:-6px;left:50%}.leaflet-tooltip-top:before{border-top-color:#fff;margin-bottom:-12px;bottom:0}.leaflet-tooltip-bottom:before{border-bottom-color:#fff;margin-top:-12px;margin-left:-6px;top:0}.leaflet-tooltip-left{margin-left:-6px}.leaflet-tooltip-right{margin-left:6px}.leaflet-tooltip-left:before,.leaflet-tooltip-right:before{margin-top:-6px;top:50%}.leaflet-tooltip-left:before{border-left-color:#fff;margin-right:-12px;right:0}.leaflet-tooltip-right:before{border-right-color:#fff;margin-left:-12px;left:0}@media print{.leaflet-control{-webkit-print-color-adjust:exact;print-color-adjust:exact}}'),k("marker-cluster",".leaflet-cluster-anim .leaflet-marker-icon,.leaflet-cluster-anim .leaflet-marker-shadow{transition:transform .3s ease-out,opacity .3s ease-in}.leaflet-cluster-spider-leg{transition:stroke-dashoffset .3s ease-out,stroke-opacity .3s ease-in}.marker-cluster-small{background-color:#b5e28c99}.marker-cluster-small div{background-color:#6ecc3999}.marker-cluster-medium{background-color:#f1d35799}.marker-cluster-medium div{background-color:#f0c20c99}.marker-cluster-large{background-color:#fd9c7399}.marker-cluster-large div{background-color:#f1801799}.leaflet-oldie .marker-cluster-small{background-color:#b5e28c}.leaflet-oldie .marker-cluster-small div{background-color:#6ecc39}.leaflet-oldie .marker-cluster-medium{background-color:#f1d357}.leaflet-oldie .marker-cluster-medium div{background-color:#f0c20c}.leaflet-oldie .marker-cluster-large{background-color:#fd9c73}.leaflet-oldie .marker-cluster-large div{background-color:#f18017}.marker-cluster{background-clip:padding-box;border-radius:20px}.marker-cluster div{text-align:center;border-radius:15px;width:30px;height:30px;margin-top:5px;margin-left:5px}.marker-cluster span{line-height:30px}");let t,o=!1;return(async()=>{try{const l=await import("./BCTYvPrD.js").then(t=>/* @__PURE__ */e(t.default,1));if(o)return;if("undefined"!=typeof window&&(window.L=l),await Promise.all([import("./CgUphJWo.js").then(t=>/* @__PURE__ */e(t.default,1)),import("./rtH8O6Hc.js")]),o)return;const r=window.L??l;if(!C.current)return;const a=l.map(C.current,{center:q?.center?[q.center.lat??w[0],q.center.lng??w[1]]:w,zoom:q?.zoom??3,minZoom:3,zoomControl:!0,worldCopyJump:!1,maxBounds:l.latLngBounds(y),maxBoundsViscosity:1});l.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"© OpenStreetMap contributors",maxZoom:19,noWrap:!0}).addTo(a);const n=l.layerGroup().addTo(a),i="function"==typeof r.heatLayer?r.heatLayer([],{radius:30,blur:30,maxZoom:10,minOpacity:.35}):null;i?.addTo(a);const f="function"==typeof r.markerClusterGroup?r.markerClusterGroup({chunkedLoading:!0,showCoverageOnHover:!1,spiderfyOnMaxZoom:!0,zoomToBoundsOnClick:!0,maxClusterRadius:48}):l.layerGroup();f.addTo(a);const c=()=>{j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{try{sessionStorage.setItem(p,JSON.stringify({center:a.getCenter(),zoom:a.getZoom()}))}catch{}},250)};let s;a.on("zoomend",c),a.on("moveend",c),T.current=a,O.current=r,M.current=n,W.current=i,I.current=f,"undefined"!=typeof ResizeObserver&&C.current&&(s=new ResizeObserver(()=>a.invalidateSize(!1)),s.observe(C.current)),requestAnimationFrame(()=>a.invalidateSize(!1)),N(!0),B(!1),t=()=>{s?.disconnect(),j.current&&clearTimeout(j.current),a.off("zoomend",c),a.off("moveend",c),a.remove(),O.current=null,T.current=null,M.current=null,W.current=null,I.current=null}}finally{o||B(!1)}})(),()=>{o=!0,t?.()}},[q]),o(()=>{if(!H)return;const e=O.current;if(!e)return;const o=T.current;if(M.current?.clearLayers(),I.current?.clearLayers(),null===U&&P.length>0){o&&W.current&&(W.current.setLatLngs?.([]),o.hasLayer(W.current)&&o.removeLayer(W.current));const t=o=>{for(const l of o)if(l.centroid){const[t,o]=l.centroid,r=e.divIcon({className:"",html:`<div style="transform:translate(-50%,-50%);background:${x(l.color,z)};color:#fff;border-radius:20px;padding:5px 10px;font-size:12px;font-weight:600;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);cursor:pointer;display:inline-flex;align-items:center;gap:6px;"><span>${L(l.folder.name)}</span><span style="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;">${l.eventCount}</span></div>`,iconSize:[0,0],iconAnchor:[0,0]});e.marker([o,t],{icon:r}).on("click",()=>J(l.folder._id)).addTo(M.current)}else l.children.length>0&&t(l.children)};t(P)}else{if(0===Y.length)return;const l=0===P.length&&null===U,r=x(F?.color,z);if(o&&W.current&&(l&&!o.hasLayer(W.current)?W.current.addTo(o):l||(W.current.setLatLngs?.([]),o.hasLayer(W.current)&&o.removeLayer(W.current))),Y.forEach(o=>{const l=o.location.x,a=o.location.y,f=e.divIcon({className:"qrati-leaflet-marker-wrapper",html:`<div style="width:36px;height:36px;cursor:pointer;background:${r};border-radius:50% 50% 50% 0;transform:rotate(-45deg);border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);display:flex;align-items:center;justify-content:center;overflow:hidden;">${b(R)?`<img src="${b(R)}" style="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);" />`:""}</div>`,iconSize:[36,36],iconAnchor:[18,36],popupAnchor:[0,-36]}),c=e.marker([a,l],{icon:f}),p=document.createElement("div");p.style.width="fit-content",((e,o,l)=>{t(/* @__PURE__ */n(i,{client:E,children:/* @__PURE__ */n(g,{event:e,onExplore:l})}),o)})(o,p,s),c.bindPopup(p,{closeButton:!0,maxWidth:256}),I.current?.addLayer(c)}),l&&W.current){const e=Y.reduce((e,t)=>Math.max(e,t.views??0),1),t=Y.map(e=>[e.location.y,e.location.x,e.views??1]);W.current.setOptions?.({radius:30,blur:30,maxZoom:10,minOpacity:.35,max:e}),W.current.setLatLngs?.(t)}if(l&&!Z.current&&o&&(Z.current=!0,!q)){const t=e.latLngBounds([]);Y.forEach(e=>t.extend([e.location.y,e.location.x])),t.isValid()&&o.fitBounds(t,{paddingTopLeft:A.topLeft,paddingBottomRight:A.bottomRight,maxZoom:8})}}},[U,P,Y,H,s,R,J,F,q]),o(()=>{if(!H)return;const e=T.current,t=O.current;if(!e||!t)return;if(!S.current&&q)return void(S.current=!0);S.current=!0;const o={paddingTopLeft:A.topLeft,paddingBottomRight:A.bottomRight,duration:3,easeLinearity:1};if(U){const l=h(P,U);if(!l?.folder.boundary?.length)return;const r=t.latLngBounds([]);for(const e of l.folder.boundary)r.extend([e.y,e.x]);r.isValid()&&e.flyToBounds(r,{...o,maxZoom:14})}else{const l=t.latLngBounds([]),r=e=>{for(const t of e)t.centroid?l.extend([t.centroid[1],t.centroid[0]]):r(t.children)};r(P),l.isValid()&&e.flyToBounds(l,{...o,maxZoom:8})}},[U,P,H,q]),/* @__PURE__ */n("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:f(Q),children:[
|
|
2
|
+
/* @__PURE__ */n(v,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:P,activeFolderId:U,setActiveFolderId:J}),G&&/* @__PURE__ */n("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */n("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),D&&/* @__PURE__ */n("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */n("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */n("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */n("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),!G&&0===Y.length&&(0===P.length||null!==U)&&/* @__PURE__ */n("div",{class:"absolute inset-0 z-30 flex items-center justify-center bg-white/90",children:/* @__PURE__ */n(d,{title:"No Events",description:"Check back later for our awesome events!",iconSvg:/* @__PURE__ */n(u,{})})}),
|
|
3
|
+
/* @__PURE__ */n("div",{ref:C,class:"h-full w-full rounded-xl border border-slate-200"})]})};export{R as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,s as r,t,v as o}from"./
|
|
1
|
+
import{d as e,s as r,t,v as o}from"./DrrpB4Om.js";import{D as l,n as s}from"./CaX2xgrP.js";import{l as i}from"./ChJXhA9c.js";import"./h4ZjZXfe2.js";var n=e(()=>import("./BKDqpSN62.js")),a=e(()=>import("./DN26AtHL2.js")),c=e(()=>import("./kiL9JENf2.js")),d=e(()=>import("./CHTzn6mh2.js")),p=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
|
|
2
2
|
/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */t("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */t("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
3
3
|
/* @__PURE__ */t("p",{class:"text-foreground",children:"No location data available."}),
|
|
4
4
|
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),m=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"})}),g=({events:e,isLoading:g=!1})=>{const{organization:x}=s(),f=i(),h=x?.integrationSettings??{},u=h.mapProvider??"openstreetmap",v=o(e=>{f(l.GALLERY(e))},[f]);if("openstreetmap_free"===u)/* @__PURE__ */return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(n,{onExplore:v,logoUrl:x?.logoUrl})})});const y=h.mapTilerApiKey??"",b=h.googleMapsApiKey??"",w=h.mapboxApiKey??"",j=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,t as i,w as e}from"./C3uDEVBt.js";import{m as s}from"./BItJQVdK.js";import{t as n}from"./b6CwQBFC.js";import{t as o}from"./CSO2IaJ1.js";import{t as a}from"./Bki5T_lb.js";var r=({url:r,alt:h="",thumbnailUrl:l,blurhash:p,pswpData:d={},curateLink:c,onClick:m})=>{const u=t(()=>(t=>Object.keys(t).reduce((i,e)=>{const s=t[e];return null==s||""===s||(i[`data-pswp-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=s),i;var n},{}))(d),[d]),_=/* @__PURE__ */i(e,{children:[/* @__PURE__ */i(o,{threshold:.1,src:l||r,blurhash:p,alt:h}),d.type===s.VIDEO&&/* @__PURE__ */i("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */i("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});if(m)/* @__PURE__ */return i("button",{className:"h-full w-full",onClick:m,children:_});if(c)/* @__PURE__ */return i(n,{to:c,className:"h-full w-full",children:_});const g=r&&a(r,["http:","https:"])?r:void 0;return g?/* @__PURE__ */i("a",{href:g,className:"pswp-item block h-full w-full",...u,...l?{"data-pswp-thumbnail-url":l}:{},...p?{"data-pswp-blurhash":p}:{},target:"_blank",rel:"noreferrer",children:_}):/* @__PURE__ */i("span",{className:"pswp-item block h-full w-full",...u,...l?{"data-pswp-thumbnail-url":l}:{},...p?{"data-pswp-blurhash":p}:{},children:_})};function h(t,i,e){const s=document.createElement(i);return t&&(s.className=t),e&&e.appendChild(s),s}function l(t,i){return t.x=i.x,t.y=i.y,void 0!==i.id&&(t.id=i.id),t}function p(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function d(t,i){const e=Math.abs(t.x-i.x),s=Math.abs(t.y-i.y);return Math.sqrt(e*e+s*s)}function c(t,i){return t.x===i.x&&t.y===i.y}function m(t,i,e){return Math.min(Math.max(t,i),e)}function u(t,i,e){let s=`translate3d(${t}px,${i||0}px,0)`;return void 0!==e&&(s+=` scale3d(${e},${e},1)`),s}function _(t,i,e,s){t.style.transform=u(i,e,s)}function g(t,i,e,s){t.style.transition=i?`${i} ${e}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function v(t,i,e){t.style.width="number"==typeof i?`${i}px`:i,t.style.height="number"==typeof e?`${e}px`:e}var y="loading",w="loaded",f="error";function x(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function P(t,i,e=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:i;n&&(s=Array.from(e.querySelectorAll(n)))}return s}function S(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var b=class{constructor(t,i){if(this.element=h("pswp__img pswp__img--placeholder",t?"img":"div",i),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&("IMG"===this.element.tagName?(v(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=u(0,0,t/250)):v(this.element,t,i))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},C=class{constructor(t,i,e){this.instance=i,this.data=t,this.index=e,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new b(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=h("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=h("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const i=this.element;this.updateSrcsetSizes(),this.data.srcset&&(i.srcset=this.data.srcset),i.src=this.data.src??"",i.alt=this.data.alt??"",this.state=y,i.complete?this.onLoaded():(i.onload=()=>{this.onLoaded()},i.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=w,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==w&&this.state!==f||this.removePlaceholder())}onError(){this.state=f,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===y,this)}isError(){return this.state===f}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(v(this.element,t,i),this.isImageContent()&&!this.isError()))){const e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==f,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${i}px`,t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let t=h("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=h("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===f)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||S())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!S()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==w&&this.state!==f||this.removePlaceholder()))}};function L(t,i){if(t.getViewportSizeFn){const e=t.getViewportSizeFn(t,i);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function z(t,i,e,s,n){let o=0;if(i.paddingFn)o=i.paddingFn(e,s,n)[t];else if(i.padding)o=i.padding[t];else{const e=`padding${t[0].toUpperCase()}${t.slice(1)}`;i[e]&&(o=i[e])}return Number(o)||0}function I(t,i,e,s){return{x:i.x-z("left",t,i,e,s)-z("right",t,i,e,s),y:i.y-z("top",t,i,e,s)-z("bottom",t,i,e,s)}}var A=class{constructor(t,i,e,s){this.pswp=s,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){const s={x:t,y:i};this.elementSize=s,this.panAreaSize=e;const n=e.x/s.x,o=e.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const i=`${t}ZoomLevel`,e=this.options[i];if(e)return"function"==typeof e?e(this):"fill"===e?this.fill:"fit"===e?this.fit:Number(e)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function T(t,i,e){const s=i.createContentFromData(t,e);let n;const{options:o}=i;if(o){let a;n=new A(o,t,-1),a=i.pswp?i.pswp.viewportSize:L(o,i);const r=I(o,a,t,e);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function Z(t,i){const e=i.getItemData(t);if(!i.dispatch("lazyLoadSlide",{index:t,itemData:e}).defaultPrevented)return T(e,i,t)}var O=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:i}=this;if(i.dispatch("lazyLoad").defaultPrevented)return;const{preload:e}=i.options,s=void 0===t||t>=0;let n;for(n=0;n<=e[1];n++)this.loadSlideByIndex(i.currIndex+(s?n:-n));for(n=1;n<=e[0];n++)this.loadSlideByIndex(i.currIndex+(s?-n:n))}loadSlideByIndex(t){const i=this.pswp.getLoopedIndex(t);let e=this.getContentByIndex(i);e||(e=Z(i,this.pswp),e&&this.addToCache(e))}getContentBySlide(t){let i=this.getContentByIndex(t.index);return i||(i=this.pswp.createContentFromData(t.data,t.index),this.addToCache(i)),i.setSlide(t),i}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const i=this._cachedItems.findIndex(i=>i.index===t);-1!==i&&this._cachedItems.splice(i,1)}getContentByIndex(t){return this._cachedItems.find(i=>i.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},E=class{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},D=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,i,e=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:i,priority:e}),this._filters[t]?.sort((t,i)=>t.priority-i.priority),this.pswp?.addFilter(t,i,e)}removeFilter(t,i){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==i)),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){return this._filters[t]?.forEach(t=>{i[0]=t.fn.apply(this,i)}),i[0]}on(t,i){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(i),this.pswp?.on(t,i)}off(t,i){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>i!==t)),this.pswp?.off(t,i)}dispatch(t,i){if(this.pswp)return this.pswp.dispatch(t,i);const e=new E(t,i);return this._listeners[t]?.forEach(t=>{t.call(this,e)}),e}},M=class extends D{getNumItems(){let t=0;const i=this.options?.dataSource;i&&"length"in i?t=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(t=i.items.length));const e=this.dispatch("numItems",{dataSource:i,numItems:t});return this.applyFilters("numItems",e.numItems,i)}createContentFromData(t,i){return new C(t,this,i)}getItemData(t){const i=this.options?.dataSource;let e={};Array.isArray(i)?e=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),e=i.items[t]);let s=e;s instanceof Element&&(s=this._domElementToItemData(s));const n=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",n.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?P(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const i={element:t},e="A"===t.tagName?t:t.querySelector("a");if(e){i.src=e.dataset.pswpSrc||e.href,e.dataset.pswpSrcset&&(i.srcset=e.dataset.pswpSrcset),i.width=e.dataset.pswpWidth?parseInt(e.dataset.pswpWidth,10):0,i.height=e.dataset.pswpHeight?parseInt(e.dataset.pswpHeight,10):0,e.dataset.pswpType&&(i.type=e.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(i.msrc=s.currentSrc||s.src,i.alt=s.getAttribute("alt")??""),(e.dataset.pswpCropped||e.dataset.cropped)&&(i.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(e.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{i[this._toLowerCaseFirstLetter(t.slice(4))]=e.dataset[t]})}return this.applyFilters("domItemData",i,t,e)}lazyLoadData(t,i){return T(t,this,i)}},F=class extends M{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){P(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(x(t)||window.pswp)return;let i={x:t.clientX,y:t.clientY};i.x||i.y||(i=null);let e=this.getClickedIndex(t);e=this.applyFilters("clickedIndex",e,t,this);const s={gallery:t.currentTarget};e>=0&&(t.preventDefault(),this.loadAndOpen(e,s,i))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const i=t.target,e=P(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===i||t.contains(i));return-1!==e?e:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,i,e){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){const t=P(this.options.gallery);t[0]&&(i={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=e,this.shouldOpen=!0,this.preload(t,i),!0}preload(t,i){const{options:e}=this;i&&(e.dataSource=i);const s=[],n=typeof e.pswpModule;if("function"==typeof(o=e.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(e.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(e.pswpModule())}var o;"function"==typeof e.openPromise&&s.push(e.openPromise()),!1!==e.preloadFirstSlide&&t>=0&&(this._preloadedContent=Z(t,this));const a=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const i=t[0];this._openPhotoswipe(i,a)}})}_openPhotoswipe(t,i){if(i!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const e="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=e,window.pswp=e,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(i=>{e.on(t,i)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(i=>{e.addFilter(t,i.fn,i.priority)})}),this._preloadedContent&&(e.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),e.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),e.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},P(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},B=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&l(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:i,dragAxis:e}=this.gestures,{currSlide:s}=this.pswp;if("y"===e&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const e=s.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:e}).defaultPrevented){this._setPanWithFriction("y",e,.6);const t=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(p(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:e}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),i.isShifted()){const e=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&e<0||t.x<.1&&e<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&e>0||t.x>-.1&&e>.5)&&(s=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(s,!0,t.x,!0)}e&&e.currZoomLevel>e.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:e}=this.pswp;if(!e)return;const{pan:s,bounds:n}=e,o=s[t],a=this.pswp.bgOpacity<1&&"y"===t,r=o+i[t]*.995/(1-.995);if(a){const t=this._getVerticalDragRatio(o),i=this._getVerticalDragRatio(r);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const h=n.correctPan(t,r);if(o===h)return;const l=h===r?1:.82,p=this.pswp.bgOpacity,d=h-o;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:o,end:h,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(a&&this.pswp.bgOpacity<1){const t=1-(h-i)/d;this.pswp.applyBgOpacity(m(p+(1-p)*t,0,1))}s[t]=Math.floor(i),e.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:e,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,r=i[t]-s[t],h=a.x+r;if(!r||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return a.moveTo(h,!0),!0;const{bounds:l}=o,p=o.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===e&&"x"===t&&!n){const i=a.getCurrSlideX(),e=a.x-i,s=r>0,n=!s;if(p>l.min[t]&&s){if(l.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(p<l.max[t]&&n){if(this.startPan[t]<=l.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(0!==e){if(e>0)return a.moveTo(Math.max(h,i),!0),!0;if(e<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,p)}else"y"===t&&(a.isShifted()||l.min.y===l.max.y)||this._setPanWithFriction(t,p);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,e){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,i)!==i||e){const s=Math.round(i-n[t]);n[t]+=s*(e||.35)}else n[t]=i}};function k(t){return!!t.target.closest(".pswp__container")}var R=class{constructor(t){this.gestures=t}click(t,i){const e=i.target.classList,s=e.contains("pswp__img"),n=e.contains("pswp__item")||e.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,i):n&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){k(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){k(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,e){const{pswp:s}=this.gestures,{currSlide:n}=s,o=`${t}Action`,a=s.options[o];if(!s.dispatch(o,{point:i,originalEvent:e}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":s[a]();break;case"zoom":n?.toggleZoom(i);break;case"zoom-or-close":n?.isZoomable()&&n.zoomLevels.secondary!==n.zoomLevels.initial?n.toggleZoom(i):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(s,i,e)}};function H(t,i,e){return t.x=(i.x+e.x)/2,t.y=(i.y+e.y)/2,t}var N=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,l(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:e,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;if(!o)return;const a=o.zoomLevels.min,r=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;H(this._startZoomPoint,i,s),H(this._zoomPoint,t,e);let h=1/d(i,s)*d(t,e)*this._startZoomLevel;if(h>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<a)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const t=1-(a-h)/(a/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else h=a-.15*(a-h);else h>r&&(h=r+.05*(h-r));o.pan.x=this._calculatePanForZoomLevel("x",h),o.pan.y=this._calculatePanForZoomLevel("y",h),o.setZoomLevel(h),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const e=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*e}correctZoomPan(t){const{pswp:i}=this.gestures,{currSlide:e}=i;if(!e?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const s=e.currZoomLevel;let n,o=!0;s<e.zoomLevels.initial?n=e.zoomLevels.initial:s>e.zoomLevels.max?n=e.zoomLevels.max:(o=!1,n=s);const a=i.bgOpacity,r=i.bgOpacity<1,h=l({x:0,y:0},e.pan);let p=l({x:0,y:0},h);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,l(this._startPan,h)),o&&(p={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),e.setZoomLevel(n),p={x:e.bounds.correctPan("x",p.x),y:e.bounds.correctPan("y",p.y)},e.setZoomLevel(s);const d=!c(p,h);if(!d&&!o&&!r)return e._setResolution(n),void e.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,d||o){if(d&&(e.pan.x=h.x+(p.x-h.x)*t,e.pan.y=h.y+(p.y-h.y)*t),o){const i=s+(n-s)*t;e.setZoomLevel(i)}e.applyCurrentZoomPan()}r&&i.bgOpacity<1&&i.applyBgOpacity(m(a+(1-a)*t,0,1))},onComplete:()=>{e._setResolution(n),e.applyCurrentZoomPan()}})}},W=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new B(this),this.zoomLevels=new N(this),this.tapHandler=new R(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,e,s){const{pswp:n}=this,{events:o}=n,a=s?t+s:"";o.add(n.scrollWrap,t+i,this.onPointerDown.bind(this)),o.add(window,`${t}move`,this.onPointerMove.bind(this)),o.add(window,t+e,this.onPointerUp.bind(this)),a&&o.add(n.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:e}=this;e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(e.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),e.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,l(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,l(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?c(this.p1,this.prevP1)||this.drag.change():c(this.p1,this.prevP1)&&c(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const i=Date.now(),e=i-this._intervalTime;e<50&&!t||(this.velocity.x=this._getVelocity("x",e),this.velocity.y=this._getVelocity("y",e),this._intervalTime=i,l(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const e=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),d(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(l(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},e))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const e=this.p1[t]-this._intervalP1[t];return Math.abs(e)>1&&i>5?e/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(t,i){if(this._pointerEventEnabled){const e=t,s=this._ongoingPointers.findIndex(t=>t.id===e.pointerId);"up"===i&&s>-1?this._ongoingPointers.splice(s,1):"down"===i&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(e,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(e,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&l(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&l(this.p2,this._ongoingPointers[1])}else{const e=t;this._numActivePoints=0,e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(this._convertEventPosToPoint(e.touches[0],this.p1),this._numActivePoints++,e.touches.length>1&&(this._convertEventPosToPoint(e.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===i?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){l(this.prevP1,this.p1),l(this.prevP2,this.p2)}_updateStartPoints(){l(this.startP1,this.p1),l(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},V=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,e=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=z("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-e)/2)+s,this.max[t]=e>n?Math.round(n-e)+s:this.center[t],this.min[t]=e>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return m(i,this.max[t],this.min[t])}},q=class{constructor(t,i,e){this.data=t,this.index=i,this.pswp=e,this.isActive=i===e.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!e.opener.isOpen,this.zoomLevels=new A(e.options,t,i,e),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=h("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new V(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const e=Math.round(this.width*i)||this.pswp.viewportSize.x,s=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(e,s)||t)&&this.content.setDisplayedSize(e,s)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,i,e,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:e}),n.animations.stopAllPan();const o=this.currZoomLevel;s||(t=m(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,o),this.pan.y=this.calculateZoomToPanOffset("y",i,o),p(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};e?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:e,easing:n.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,e){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),e||(e=this.zoomLevels.initial);const s=this.currZoomLevel/e;return this.bounds.correctPan(t,(this.pan[t]-i[t])*s+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),l(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,e){e/=this.currentResolution||this.zoomLevels.initial,_(this.container,t,i,e)}calculateSize(){const{pswp:t}=this;l(this.panAreaSize,I(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return u(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function $(t,i,e){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=e?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}var U={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:$},G={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{$(t,i,!0)}},j={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},K={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},X={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},Y={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let e,s=null;const n=i=>{var s;e!==i&&(e=i,s=i,t.classList.toggle("pswp__preloader--active",s))},o=()=>{if(!i.currSlide?.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{n(Boolean(i.currSlide?.content.isLoading())),s=null},i.options.preloaderDelay))};i.on("change",o),i.on("loadComplete",t=>{i.currSlide===t.slide&&o()}),i.ui&&(i.ui.updatePreloaderVisibility=o)}},J=class{constructor(t,i){const e=i.name||i.className;let s=i.html;if(!1===t.options[e])return;"string"==typeof t.options[`${e}SVG`]&&(s=t.options[`${e}SVG`]),t.dispatch("uiElementCreate",{data:i});let n="";i.isButton?(n+="pswp__button ",n+=i.className||`pswp__button--${i.name}`):n+=i.className||`pswp__${i.name}`;let o=i.isButton?i.tagName||"button":i.tagName||"div";o=o.toLowerCase();const a=h(n,o);if(i.isButton){"button"===o&&(a.type="button");let{title:s}=i;const{ariaLabel:n}=i;"string"==typeof t.options[`${e}Title`]&&(s=t.options[`${e}Title`]),s&&(a.title=s);const r=n||s;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(i.size||32),i.outlineID&&(e+=`<use class="pswp__icn-shadow" xlink:href="#${i.outlineID}"/>`),e+=i.inner,e+="</svg>",e}(s),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=e=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(e,a,t)});const r=i.appendTo||"bar";let l=t.element;"bar"===r?(t.topBar||(t.topBar=h("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",a,i))}};function Q(t,i){t.classList.toggle("pswp--zoomed-in",i)}var tt=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[j,U,G,K,Y,X],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new J(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:e}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:s}=i;if(this.pswp.opener.isOpen||(s=i.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(n)<.01||!i.isZoomable())return Q(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),Q(t,(s===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=s),"zoom"!==e.imageClickAction&&"zoom-or-close"!==e.imageClickAction||t.classList.add("pswp--click-to-zoom")}},it="cubic-bezier(.4,0,.22,1)",et=class{constructor(t){this.props=t;const{target:i,onComplete:e,transform:s,onFinish:n=()=>{},duration:o=333,easing:a=it}=t;this.onFinish=n;const r=s?"transform":"opacity",h=t[r]??"";this._target=i,this._onComplete=e,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{g(i,r,o,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},o+500),i.style[r]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),g(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},st=class{constructor(t,i,e){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=e||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let e,s=0;i/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)e=this.velocity+this._naturalFrequency*t,s=(t+e*i)*n,this.velocity=s*-this._naturalFrequency+e*n;else if(this._dampingRatio<1){e=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);s=n*(t*o+e*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*a+this._dampedFrequency*e*o)}return s}},nt=class{constructor(t){this.props=t,this._raf=0;const{start:i,end:e,velocity:s,onUpdate:n,onComplete:o,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const l=new st(s,r,h);let p=Date.now(),d=i-e;const c=()=>{this._raf&&(d=l.easeFrame(d,Date.now()-p),Math.abs(d)<1&&Math.abs(l.velocity)<50?(n(e),o&&o(),this.onFinish()):(p=Date.now(),n(d+e),this._raf=requestAnimationFrame(c)))};this._raf=requestAnimationFrame(c)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},ot=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const e=i?new nt(t):new et(t);return this.activeAnimations.push(e),e.onFinish=()=>this.stop(e),e}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},at=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{at=!0}}))}catch(yt){}var rt=class{constructor(){this._pool=[]}add(t,i,e,s){this._toggleListener(t,i,e,s)}remove(t,i,e,s){this._toggleListener(t,i,e,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,e,s,n,o){if(!t)return;const a=n?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){o||(n?this._pool=this._pool.filter(s=>s.type!==i||s.listener!==e||s.target!==t):this._pool.push({target:t,type:i,listener:e,passive:s}));const r=!!at&&{passive:s||!1};t[a](i,e,r)}})}},ht={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},lt=(t,i)=>i?t:ht[t],pt=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(x(t))return;let e,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case lt("Escape",o):i.options.escKey&&(e="close");break;case lt("z",o):e="toggleZoom";break;case lt("ArrowLeft",o):s="x";break;case lt("ArrowUp",o):s="y";break;case lt("ArrowRight",o):s="x",n=!0;break;case lt("ArrowDown",o):n=!0,s="y";break;case lt("Tab",o):this._focusRoot()}if(s){t.preventDefault();const{currSlide:o}=i;i.options.arrowKeys&&"x"===s&&i.getNumItems()>1?e=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}e&&(t.preventDefault(),i[e]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},dt=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,e=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),s=e!==this.slideWidth;s&&(this.slideWidth=e,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,e)=>{s&&_(i.el,(e+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=h("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,e){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const i=(t+o)%o;t=i<=o/2?i:i-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:e||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const i=(t+o)%o;t=i<=o/2?i:i-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let e,s=Math.abs(i);s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let n=0;n<s;n++)i>0?(e=this.itemHolders.shift(),e&&(this.itemHolders[2]=e,this._containerShiftIndex++,_(e.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(e,t.currIndex-s+n+2))):(e=this.itemHolders.pop(),e&&(this.itemHolders.unshift(e),this._containerShiftIndex--,_(e.el,this._containerShiftIndex*this.slideWidth),t.setContent(e,t.currIndex+s-n-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const e=Math.round(t-this.x);(i<0&&e>0||i>=this.pswp.getNumItems()-1&&e<0)&&(t=this.x+.35*e)}this.x=t,this.pswp.container&&_(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}},ct=.003,mt=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:e}=t;if("fade"===e.showHideAnimationType?(e.showHideOpacity=!0,this._thumbBounds=void 0):"none"===e.showHideAnimationType?(e.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=e.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>ct,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(ct)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(ct)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(ct)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(ct)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,e=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,i)=>{s.onload=()=>t(s),s.onerror=i})).finally(()=>{i=!0,e||t(!0)}),setTimeout(()=>{e=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:i}=this,{innerRect:e}=this._thumbBounds,{currSlide:s,viewportSize:n}=i;if(this._croppedZoom&&e&&this._cropContainer1&&this._cropContainer2){const i=-n.x+(this._thumbBounds.x-e.x)+e.w,s=-n.y+(this._thumbBounds.y-e.y)+e.h,o=n.x-e.w,a=n.y-e.h;t?(this._animateTo(this._cropContainer1,"transform",u(i,s)),this._animateTo(this._cropContainer2,"transform",u(o,a))):(_(this._cropContainer1,i,s),_(this._cropContainer2,o,a))}s&&(l(s.pan,e||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,i,e){if(!this._duration)return void(t.style[i]=e);const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[i]=e,s.startTransition(n)}},ut=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:e,deltaY:s}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let e=-s;1===t.deltaMode?e*=.05:e*=t.deltaMode?1:.002,e=2**e;const n=i.currZoomLevel*e;i.zoomTo(n,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(e*=18,s*=18),i.panTo(i.pan.x-e,i.pan.y-s))}},_t={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},gt=class extends M{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new rt,this.animations=new ot,this.mainScroll=new dt(this),this.gestures=new W(this),this.opener=new mt(this),this.keyboard=new pt(this),this.contentLoader=new O(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new ut(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),m(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,e)=>{let s=(this.currSlide?.index??0)-1+e;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(i,t,!0),1===e&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,e){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!e)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(i<0||i>=this.getNumItems())||(t.slide=new q(this.getItemData(i),i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el))}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=L(this.options,this);!t&&c(i,this._prevViewportSize)||(l(this._prevViewportSize,i),this.dispatch("beforeResize"),l(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=h("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=h("pswp__bg","div",this.element),this.scrollWrap=h("pswp__scroll-wrap","section",this.element),this.container=h("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new tt(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,e){const s=e.dispatch("thumbBounds",{index:t,itemData:i,instance:e});if(s.thumbBounds)return s.thumbBounds;const{element:n}=i;let o,a;if(n&&!1!==e.options.thumbSelector){const t=e.options.thumbSelector||"img";a=n.matches(t)?n:n.querySelector(t)}return a=e.applyFilters("thumbEl",a,i,t),a&&(o=i.thumbCropped?function(t,i,e){const s=t.getBoundingClientRect(),n=s.width/i,o=s.height/e,a=n>o?n:o,r=(s.width-i*a)/2,h=(s.height-e*a)/2,l={x:s.left+r,y:s.top+h,w:i*a};return l.innerRect={w:s.width,h:s.height,x:r,y:h},l}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),e.applyFilters("thumbBounds",o,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{..._t,...t}}},vt=()=>Promise.resolve(gt);export{F as n,r,vt as t};
|
|
1
|
+
import{p as t,t as i,w as e}from"./DrrpB4Om.js";import{m as s}from"./CaX2xgrP.js";import{t as n}from"./ChJXhA9c.js";import{t as o}from"./LYboLIEU.js";import{t as a}from"./Bki5T_lb.js";var r=({url:r,alt:h="",thumbnailUrl:l,blurhash:p,pswpData:d={},curateLink:c,onClick:m})=>{const u=t(()=>(t=>Object.keys(t).reduce((i,e)=>{const s=t[e];return null==s||""===s||(i[`data-pswp-${n=e,n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=s),i;var n},{}))(d),[d]),_=/* @__PURE__ */i(e,{children:[/* @__PURE__ */i(o,{threshold:.1,src:l||r,blurhash:p,alt:h}),d.type===s.VIDEO&&/* @__PURE__ */i("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */i("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */i("path",{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})})]});if(m)/* @__PURE__ */return i("button",{className:"h-full w-full",onClick:m,children:_});if(c)/* @__PURE__ */return i(n,{to:c,className:"h-full w-full",children:_});const g=r&&a(r,["http:","https:"])?r:void 0;return g?/* @__PURE__ */i("a",{href:g,className:"pswp-item block h-full w-full",...u,...l?{"data-pswp-thumbnail-url":l}:{},...p?{"data-pswp-blurhash":p}:{},target:"_blank",rel:"noreferrer",children:_}):/* @__PURE__ */i("span",{className:"pswp-item block h-full w-full",...u,...l?{"data-pswp-thumbnail-url":l}:{},...p?{"data-pswp-blurhash":p}:{},children:_})};function h(t,i,e){const s=document.createElement(i);return t&&(s.className=t),e&&e.appendChild(s),s}function l(t,i){return t.x=i.x,t.y=i.y,void 0!==i.id&&(t.id=i.id),t}function p(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function d(t,i){const e=Math.abs(t.x-i.x),s=Math.abs(t.y-i.y);return Math.sqrt(e*e+s*s)}function c(t,i){return t.x===i.x&&t.y===i.y}function m(t,i,e){return Math.min(Math.max(t,i),e)}function u(t,i,e){let s=`translate3d(${t}px,${i||0}px,0)`;return void 0!==e&&(s+=` scale3d(${e},${e},1)`),s}function _(t,i,e,s){t.style.transform=u(i,e,s)}function g(t,i,e,s){t.style.transition=i?`${i} ${e}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function v(t,i,e){t.style.width="number"==typeof i?`${i}px`:i,t.style.height="number"==typeof e?`${e}px`:e}var y="loading",w="loaded",f="error";function x(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function P(t,i,e=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:i;n&&(s=Array.from(e.querySelectorAll(n)))}return s}function S(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var b=class{constructor(t,i){if(this.element=h("pswp__img pswp__img--placeholder",t?"img":"div",i),t){const i=this.element;i.decoding="async",i.alt="",i.src=t,i.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,i){this.element&&("IMG"===this.element.tagName?(v(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=u(0,0,t/250)):v(this.element,t,i))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},C=class{constructor(t,i,e){this.instance=i,this.data=t,this.index=e,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state="idle",this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.hash=this.data.hash,this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(t,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new b(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=h("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=h("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const i=this.element;this.updateSrcsetSizes(),this.data.srcset&&(i.srcset=this.data.srcset),i.src=this.data.src??"",i.alt=this.data.alt??"",this.state=y,i.complete?this.onLoaded():(i.onload=()=>{this.onLoaded()},i.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=w,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),this.state!==w&&this.state!==f||this.removePlaceholder())}onError(){this.state=f,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===y,this)}isError(){return this.state===f}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,i),!this.instance.dispatch("contentResize",{content:this,width:t,height:i}).defaultPrevented&&(v(this.element,t,i),this.isImageContent()&&!this.isError()))){const e=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=i,e?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==f,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||i>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${i}px`,t.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented||(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){let t=h("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=h("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===f)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||S())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){!this.instance.dispatch("contentActivate",{content:this}).defaultPrevented&&this.slide&&(this.isImageContent()&&this.isDecoding&&!S()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,this.instance.dispatch("contentRemove",{content:this}).defaultPrevented||(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),this.state!==w&&this.state!==f||this.removePlaceholder()))}};function L(t,i){if(t.getViewportSizeFn){const e=t.getViewportSizeFn(t,i);if(e)return e}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function z(t,i,e,s,n){let o=0;if(i.paddingFn)o=i.paddingFn(e,s,n)[t];else if(i.padding)o=i.padding[t];else{const e=`padding${t[0].toUpperCase()}${t.slice(1)}`;i[e]&&(o=i[e])}return Number(o)||0}function I(t,i,e,s){return{x:i.x-z("left",t,i,e,s)-z("right",t,i,e,s),y:i.y-z("top",t,i,e,s)-z("bottom",t,i,e,s)}}var A=class{constructor(t,i,e,s){this.pswp=s,this.options=t,this.itemData=i,this.index=e,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,i,e){const s={x:t,y:i};this.elementSize=s,this.panAreaSize=e;const n=e.x/s.x,o=e.y/s.y;this.fit=Math.min(1,n<o?n:o),this.fill=Math.min(1,n>o?n:o),this.vFill=Math.min(1,o),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const i=`${t}ZoomLevel`,e=this.options[i];if(e)return"function"==typeof e?e(this):"fill"===e?this.fill:"fit"===e?this.fit:Number(e)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>4e3&&(t=4e3/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}};function T(t,i,e){const s=i.createContentFromData(t,e);let n;const{options:o}=i;if(o){let a;n=new A(o,t,-1),a=i.pswp?i.pswp.viewportSize:L(o,i);const r=I(o,a,t,e);n.update(s.width,s.height,r)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function Z(t,i){const e=i.getItemData(t);if(!i.dispatch("lazyLoadSlide",{index:t,itemData:e}).defaultPrevented)return T(e,i,t)}var O=class{constructor(t){this.pswp=t,this.limit=Math.max(t.options.preload[0]+t.options.preload[1]+1,5),this._cachedItems=[]}updateLazy(t){const{pswp:i}=this;if(i.dispatch("lazyLoad").defaultPrevented)return;const{preload:e}=i.options,s=void 0===t||t>=0;let n;for(n=0;n<=e[1];n++)this.loadSlideByIndex(i.currIndex+(s?n:-n));for(n=1;n<=e[0];n++)this.loadSlideByIndex(i.currIndex+(s?-n:n))}loadSlideByIndex(t){const i=this.pswp.getLoopedIndex(t);let e=this.getContentByIndex(i);e||(e=Z(i,this.pswp),e&&this.addToCache(e))}getContentBySlide(t){let i=this.getContentByIndex(t.index);return i||(i=this.pswp.createContentFromData(t.data,t.index),this.addToCache(i)),i.setSlide(t),i}addToCache(t){if(this.removeByIndex(t.index),this._cachedItems.push(t),this._cachedItems.length>this.limit){const t=this._cachedItems.findIndex(t=>!t.isAttached&&!t.hasSlide);-1!==t&&this._cachedItems.splice(t,1)[0].destroy()}}removeByIndex(t){const i=this._cachedItems.findIndex(i=>i.index===t);-1!==i&&this._cachedItems.splice(i,1)}getContentByIndex(t){return this._cachedItems.find(i=>i.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},E=class{constructor(t,i){this.type=t,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}},D=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,i,e=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:i,priority:e}),this._filters[t]?.sort((t,i)=>t.priority-i.priority),this.pswp?.addFilter(t,i,e)}removeFilter(t,i){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==i)),this.pswp&&this.pswp.removeFilter(t,i)}applyFilters(t,...i){return this._filters[t]?.forEach(t=>{i[0]=t.fn.apply(this,i)}),i[0]}on(t,i){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(i),this.pswp?.on(t,i)}off(t,i){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>i!==t)),this.pswp?.off(t,i)}dispatch(t,i){if(this.pswp)return this.pswp.dispatch(t,i);const e=new E(t,i);return this._listeners[t]?.forEach(t=>{t.call(this,e)}),e}},M=class extends D{getNumItems(){let t=0;const i=this.options?.dataSource;i&&"length"in i?t=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(t=i.items.length));const e=this.dispatch("numItems",{dataSource:i,numItems:t});return this.applyFilters("numItems",e.numItems,i)}createContentFromData(t,i){return new C(t,this,i)}getItemData(t){const i=this.options?.dataSource;let e={};Array.isArray(i)?e=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),e=i.items[t]);let s=e;s instanceof Element&&(s=this._domElementToItemData(s));const n=this.dispatch("itemData",{itemData:s||{},index:t});return this.applyFilters("itemData",n.itemData,t)}_getGalleryDOMElements(t){return this.options?.children||this.options?.childSelector?P(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const i={element:t},e="A"===t.tagName?t:t.querySelector("a");if(e){i.src=e.dataset.pswpSrc||e.href,e.dataset.pswpSrcset&&(i.srcset=e.dataset.pswpSrcset),i.width=e.dataset.pswpWidth?parseInt(e.dataset.pswpWidth,10):0,i.height=e.dataset.pswpHeight?parseInt(e.dataset.pswpHeight,10):0,e.dataset.pswpType&&(i.type=e.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(i.msrc=s.currentSrc||s.src,i.alt=s.getAttribute("alt")??""),(e.dataset.pswpCropped||e.dataset.cropped)&&(i.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(e.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{i[this._toLowerCaseFirstLetter(t.slice(4))]=e.dataset[t]})}return this.applyFilters("domItemData",i,t,e)}lazyLoadData(t,i){return T(t,this,i)}},F=class extends M{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){P(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(x(t)||window.pswp)return;let i={x:t.clientX,y:t.clientY};i.x||i.y||(i=null);let e=this.getClickedIndex(t);e=this.applyFilters("clickedIndex",e,t,this);const s={gallery:t.currentTarget};e>=0&&(t.preventDefault(),this.loadAndOpen(e,s,i))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const i=t.target,e=P(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===i||t.contains(i));return-1!==e?e:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,i,e){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){const t=P(this.options.gallery);t[0]&&(i={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=e,this.shouldOpen=!0,this.preload(t,i),!0}preload(t,i){const{options:e}=this;i&&(e.dataSource=i);const s=[],n=typeof e.pswpModule;if("function"==typeof(o=e.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(e.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(e.pswpModule())}var o;"function"==typeof e.openPromise&&s.push(e.openPromise()),!1!==e.preloadFirstSlide&&t>=0&&(this._preloadedContent=Z(t,this));const a=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const i=t[0];this._openPhotoswipe(i,a)}})}_openPhotoswipe(t,i){if(i!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const e="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=e,window.pswp=e,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(i=>{e.on(t,i)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(i=>{e.addFilter(t,i.fn,i.priority)})}),this._preloadedContent&&(e.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),e.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),e.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},P(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},B=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&l(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:i,dragAxis:e}=this.gestures,{currSlide:s}=this.pswp;if("y"===e&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const e=s.pan.y+(t.y-i.y);if(!this.pswp.dispatch("verticalDrag",{panY:e}).defaultPrevented){this._setPanWithFriction("y",e,.6);const t=1-Math.abs(this._getVerticalDragRatio(s.pan.y));this.pswp.applyBgOpacity(t),s.applyCurrentZoomPan()}}else this._panOrMoveMainScroll("x")||(this._panOrMoveMainScroll("y"),s&&(p(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:i,currSlide:e}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),i.isShifted()){const e=(i.x-i.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&e<0||t.x<.1&&e<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&e>0||t.x>-.1&&e>.5)&&(s=-1,t.x=Math.max(t.x,0)),i.moveIndexBy(s,!0,t.x,!0)}e&&e.currZoomLevel>e.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:i}=this.gestures,{currSlide:e}=this.pswp;if(!e)return;const{pan:s,bounds:n}=e,o=s[t],a=this.pswp.bgOpacity<1&&"y"===t,r=o+i[t]*.995/(1-.995);if(a){const t=this._getVerticalDragRatio(o),i=this._getVerticalDragRatio(r);if(t<0&&i<-.4||t>0&&i>.4)return void this.pswp.close()}const h=n.correctPan(t,r);if(o===h)return;const l=h===r?1:.82,p=this.pswp.bgOpacity,d=h-o;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:o,end:h,velocity:i[t],dampingRatio:l,onUpdate:i=>{if(a&&this.pswp.bgOpacity<1){const t=1-(h-i)/d;this.pswp.applyBgOpacity(m(p+(1-p)*t,0,1))}s[t]=Math.floor(i),e.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:i,dragAxis:e,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:a}=this.pswp,r=i[t]-s[t],h=a.x+r;if(!r||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return a.moveTo(h,!0),!0;const{bounds:l}=o,p=o.pan[t]+r;if(this.pswp.options.allowPanToNext&&"x"===e&&"x"===t&&!n){const i=a.getCurrSlideX(),e=a.x-i,s=r>0,n=!s;if(p>l.min[t]&&s){if(l.min[t]<=this.startPan[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(p<l.max[t]&&n){if(this.startPan[t]<=l.max[t])return a.moveTo(h,!0),!0;this._setPanWithFriction(t,p)}else if(0!==e){if(e>0)return a.moveTo(Math.max(h,i),!0),!0;if(e<0)return a.moveTo(Math.min(h,i),!0),!0}else this._setPanWithFriction(t,p)}else"y"===t&&(a.isShifted()||l.min.y===l.max.y)||this._setPanWithFriction(t,p);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,i,e){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,i)!==i||e){const s=Math.round(i-n[t]);n[t]+=s*(e||.35)}else n[t]=i}};function k(t){return!!t.target.closest(".pswp__container")}var R=class{constructor(t){this.gestures=t}click(t,i){const e=i.target.classList,s=e.contains("pswp__img"),n=e.contains("pswp__item")||e.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,i):n&&this._doClickOrTapAction("bgClick",t,i)}tap(t,i){k(i)&&this._doClickOrTapAction("tap",t,i)}doubleTap(t,i){k(i)&&this._doClickOrTapAction("doubleTap",t,i)}_doClickOrTapAction(t,i,e){const{pswp:s}=this.gestures,{currSlide:n}=s,o=`${t}Action`,a=s.options[o];if(!s.dispatch(o,{point:i,originalEvent:e}).defaultPrevented)if("function"!=typeof a)switch(a){case"close":case"next":s[a]();break;case"zoom":n?.toggleZoom(i);break;case"zoom-or-close":n?.isZoomable()&&n.zoomLevels.secondary!==n.zoomLevels.initial?n.toggleZoom(i):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else a.call(s,i,e)}};function H(t,i,e){return t.x=(i.x+e.x)/2,t.y=(i.y+e.y)/2,t}var N=class{constructor(t){this.gestures=t,this._startPan={x:0,y:0},this._startZoomPoint={x:0,y:0},this._zoomPoint={x:0,y:0},this._wasOverFitZoomLevel=!1,this._startZoomLevel=1}start(){const{currSlide:t}=this.gestures.pswp;t&&(this._startZoomLevel=t.currZoomLevel,l(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:i,p2:e,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;if(!o)return;const a=o.zoomLevels.min,r=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;H(this._startZoomPoint,i,s),H(this._zoomPoint,t,e);let h=1/d(i,s)*d(t,e)*this._startZoomLevel;if(h>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),h<a)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const t=1-(a-h)/(a/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else h=a-.15*(a-h);else h>r&&(h=r+.05*(h-r));o.pan.x=this._calculatePanForZoomLevel("x",h),o.pan.y=this._calculatePanForZoomLevel("y",h),o.setZoomLevel(h),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:i}=t;(!i||i.currZoomLevel<i.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,i){const e=i/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*e}correctZoomPan(t){const{pswp:i}=this.gestures,{currSlide:e}=i;if(!e?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const s=e.currZoomLevel;let n,o=!0;s<e.zoomLevels.initial?n=e.zoomLevels.initial:s>e.zoomLevels.max?n=e.zoomLevels.max:(o=!1,n=s);const a=i.bgOpacity,r=i.bgOpacity<1,h=l({x:0,y:0},e.pan);let p=l({x:0,y:0},h);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,l(this._startPan,h)),o&&(p={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),e.setZoomLevel(n),p={x:e.bounds.correctPan("x",p.x),y:e.bounds.correctPan("y",p.y)},e.setZoomLevel(s);const d=!c(p,h);if(!d&&!o&&!r)return e._setResolution(n),void e.applyCurrentZoomPan();i.animations.stopAllPan(),i.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,d||o){if(d&&(e.pan.x=h.x+(p.x-h.x)*t,e.pan.y=h.y+(p.y-h.y)*t),o){const i=s+(n-s)*t;e.setZoomLevel(i)}e.applyCurrentZoomPan()}r&&i.bgOpacity<1&&i.applyBgOpacity(m(a+(1-a)*t,0,1))},onComplete:()=>{e._setResolution(n),e.applyCurrentZoomPan()}})}},W=class{constructor(t){this.pswp=t,this.dragAxis=null,this.p1={x:0,y:0},this.p2={x:0,y:0},this.prevP1={x:0,y:0},this.prevP2={x:0,y:0},this.startP1={x:0,y:0},this.startP2={x:0,y:0},this.velocity={x:0,y:0},this._lastStartP1={x:0,y:0},this._intervalP1={x:0,y:0},this._numActivePoints=0,this._ongoingPointers=[],this._touchEventEnabled="ontouchstart"in window,this._pointerEventEnabled=!!window.PointerEvent,this.supportsTouch=this._touchEventEnabled||this._pointerEventEnabled&&navigator.maxTouchPoints>1,this._numActivePoints=0,this._intervalTime=0,this._velocityCalculated=!1,this.isMultitouch=!1,this.isDragging=!1,this.isZooming=!1,this.raf=null,this._tapTimer=null,this.supportsTouch||(t.options.allowPanToNext=!1),this.drag=new B(this),this.zoomLevels=new N(this),this.tapHandler=new R(this),t.on("bindEvents",()=>{t.events.add(t.scrollWrap,"click",this._onClick.bind(this)),this._pointerEventEnabled?this._bindEvents("pointer","down","up","cancel"):this._touchEventEnabled?(this._bindEvents("touch","start","end","cancel"),t.scrollWrap&&(t.scrollWrap.ontouchmove=()=>{},t.scrollWrap.ontouchend=()=>{})):this._bindEvents("mouse","down","up")})}_bindEvents(t,i,e,s){const{pswp:n}=this,{events:o}=n,a=s?t+s:"";o.add(n.scrollWrap,t+i,this.onPointerDown.bind(this)),o.add(window,`${t}move`,this.onPointerMove.bind(this)),o.add(window,t+e,this.onPointerUp.bind(this)),a&&o.add(n.scrollWrap,a,this.onPointerUp.bind(this))}onPointerDown(t){const i="mousedown"===t.type||"mouse"===t.pointerType;if(i&&t.button>0)return;const{pswp:e}=this;e.opener.isOpen?e.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(i&&(e.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),e.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,l(this.startP1,this.p1)),this._numActivePoints>1?(this._clearTapTimer(),this.isMultitouch=!0):this.isMultitouch=!1):t.preventDefault()}onPointerMove(t){this._preventPointerEventBehaviour(t,"move"),this._numActivePoints&&(this._updatePoints(t,"move"),this.pswp.dispatch("pointerMove",{originalEvent:t}).defaultPrevented||(1!==this._numActivePoints||this.isDragging?this._numActivePoints>1&&!this.isZooming&&(this._finishDrag(),this.isZooming=!0,this._updateStartPoints(),this.zoomLevels.start(),this._rafStopLoop(),this._rafRenderLoop()):(this.dragAxis||this._calculateDragDirection(),this.dragAxis&&!this.isDragging&&(this.isZooming&&(this.isZooming=!1,this.zoomLevels.end()),this.isDragging=!0,this._clearTapTimer(),this._updateStartPoints(),this._intervalTime=Date.now(),this._velocityCalculated=!1,l(this._intervalP1,this.p1),this.velocity.x=0,this.velocity.y=0,this.drag.start(),this._rafStopLoop(),this._rafRenderLoop()))))}_finishDrag(){this.isDragging&&(this.isDragging=!1,this._velocityCalculated||this._updateVelocity(!0),this.drag.end(),this.dragAxis=null)}onPointerUp(t){this._numActivePoints&&(this._updatePoints(t,"up"),this.pswp.dispatch("pointerUp",{originalEvent:t}).defaultPrevented||(0===this._numActivePoints&&(this._rafStopLoop(),this.isDragging?this._finishDrag():this.isZooming||this.isMultitouch||this._finishTap(t)),this._numActivePoints<2&&this.isZooming&&(this.isZooming=!1,this.zoomLevels.end(),1===this._numActivePoints&&(this.dragAxis=null,this._updateStartPoints()))))}_rafRenderLoop(){(this.isDragging||this.isZooming)&&(this._updateVelocity(),this.isDragging?c(this.p1,this.prevP1)||this.drag.change():c(this.p1,this.prevP1)&&c(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const i=Date.now(),e=i-this._intervalTime;e<50&&!t||(this.velocity.x=this._getVelocity("x",e),this.velocity.y=this._getVelocity("y",e),this._intervalTime=i,l(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:i}=this.pswp;if(i.isShifted())return void i.moveIndexBy(0,!0);if(t.type.indexOf("cancel")>0)return;if("mouseup"===t.type||"mouse"===t.pointerType)return void this.tapHandler.click(this.startP1,t);const e=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),d(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(l(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},e))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,i){const e=this.p1[t]-this._intervalP1[t];return Math.abs(e)>1&&i>5?e/i:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,i){this.pswp.applyFilters("preventPointerEvent",!0,t,i)&&t.preventDefault()}_updatePoints(t,i){if(this._pointerEventEnabled){const e=t,s=this._ongoingPointers.findIndex(t=>t.id===e.pointerId);"up"===i&&s>-1?this._ongoingPointers.splice(s,1):"down"===i&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(e,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(e,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&l(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&l(this.p2,this._ongoingPointers[1])}else{const e=t;this._numActivePoints=0,e.type.indexOf("touch")>-1?e.touches&&e.touches.length>0&&(this._convertEventPosToPoint(e.touches[0],this.p1),this._numActivePoints++,e.touches.length>1&&(this._convertEventPosToPoint(e.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===i?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){l(this.prevP1,this.p1),l(this.prevP2,this.p2)}_updateStartPoints(){l(this.startP1,this.p1),l(this.startP2,this.p2),this._updatePrevPoints()}_calculateDragDirection(){if(this.pswp.mainScroll.isShifted())this.dragAxis="x";else{const t=Math.abs(this.p1.x-this.startP1.x)-Math.abs(this.p1.y-this.startP1.y);if(0!==t){const i=t>0?"x":"y";Math.abs(this.p1[i]-this.startP1[i])>=10&&(this.dragAxis=i)}}}_convertEventPosToPoint(t,i){return i.x=t.pageX-this.pswp.offset.x,i.y=t.pageY-this.pswp.offset.y,"pointerId"in t?i.id=t.pointerId:void 0!==t.identifier&&(i.id=t.identifier),i}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},V=class{constructor(t){this.slide=t,this.currZoomLevel=1,this.center={x:0,y:0},this.max={x:0,y:0},this.min={x:0,y:0}}update(t){this.currZoomLevel=t,this.slide.width?(this._updateAxis("x"),this._updateAxis("y"),this.slide.pswp.dispatch("calcBounds",{slide:this.slide})):this.reset()}_updateAxis(t){const{pswp:i}=this.slide,e=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=z("x"===t?"left":"top",i.options,i.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-e)/2)+s,this.max[t]=e>n?Math.round(n-e)+s:this.center[t],this.min[t]=e>n?s:this.center[t]}reset(){this.center.x=0,this.center.y=0,this.max.x=0,this.max.y=0,this.min.x=0,this.min.y=0}correctPan(t,i){return m(i,this.max[t],this.min[t])}},q=class{constructor(t,i,e){this.data=t,this.index=i,this.pswp=e,this.isActive=i===e.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!e.opener.isOpen,this.zoomLevels=new A(e.options,t,i,e),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:i}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=h("pswp__zoom-wrap","div"),this.holderElement=null,this.currZoomLevel=1,this.width=this.content.width,this.height=this.content.height,this.heavyAppended=!1,this.bounds=new V(this),this.prevDisplayedWidth=-1,this.prevDisplayedHeight=-1,this.pswp.dispatch("slideInit",{slide:this})}setIsActive(t){t&&!this.isActive?this.activate():!t&&this.isActive&&this.deactivate()}append(t){this.holderElement=t,this.container.style.transformOrigin="0 0",this.data&&(this.calculateSize(),this.load(),this.updateContentSize(),this.appendHeavy(),this.holderElement.appendChild(this.container),this.zoomAndPanToInitial(),this.pswp.dispatch("firstZoomPan",{slide:this}),this.applyCurrentZoomPan(),this.pswp.dispatch("afterSetContent",{slide:this}),this.isActive&&this.activate())}load(){this.content.load(!1),this.pswp.dispatch("slideLoad",{slide:this})}appendHeavy(){const{pswp:t}=this;!this.heavyAppended&&t.opener.isOpen&&!t.mainScroll.isShifted()&&(this.isActive,1)&&(this.pswp.dispatch("appendHeavy",{slide:this}).defaultPrevented||(this.heavyAppended=!0,this.content.append(),this.pswp.dispatch("appendHeavyContent",{slide:this})))}activate(){this.isActive=!0,this.appendHeavy(),this.content.activate(),this.pswp.dispatch("slideActivate",{slide:this})}deactivate(){this.isActive=!1,this.content.deactivate(),this.currZoomLevel!==this.zoomLevels.initial&&this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize(),this.pswp.dispatch("slideDeactivate",{slide:this})}destroy(){this.content.hasSlide=!1,this.content.remove(),this.container.remove(),this.pswp.dispatch("slideDestroy",{slide:this})}resize(){this.currZoomLevel!==this.zoomLevels.initial&&this.isActive?(this.calculateSize(),this.bounds.update(this.currZoomLevel),this.panTo(this.pan.x,this.pan.y)):(this.calculateSize(),this.currentResolution=0,this.zoomAndPanToInitial(),this.applyCurrentZoomPan(),this.updateContentSize())}updateContentSize(t){const i=this.currentResolution||this.zoomLevels.initial;if(!i)return;const e=Math.round(this.width*i)||this.pswp.viewportSize.x,s=Math.round(this.height*i)||this.pswp.viewportSize.y;(this.sizeChanged(e,s)||t)&&this.content.setDisplayedSize(e,s)}sizeChanged(t,i){return(t!==this.prevDisplayedWidth||i!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=i,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,i,e,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:i,transitionDuration:e}),n.animations.stopAllPan();const o=this.currZoomLevel;s||(t=m(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",i,o),this.pan.y=this.calculateZoomToPanOffset("y",i,o),p(this.pan);const a=()=>{this._setResolution(t),this.applyCurrentZoomPan()};e?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:a,duration:e,easing:n.options.easing}):a()}toggleZoom(t){this.zoomTo(this.currZoomLevel===this.zoomLevels.initial?this.zoomLevels.secondary:this.zoomLevels.initial,t,this.pswp.options.zoomAnimationDuration)}setZoomLevel(t){this.currZoomLevel=t,this.bounds.update(this.currZoomLevel)}calculateZoomToPanOffset(t,i,e){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];i||(i=this.pswp.getViewportCenterPoint()),e||(e=this.zoomLevels.initial);const s=this.currZoomLevel/e;return this.bounds.correctPan(t,(this.pan[t]-i[t])*s+i[t])}panTo(t,i){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",i),this.applyCurrentZoomPan()}isPannable(){return Boolean(this.width)&&this.currZoomLevel>this.zoomLevels.fit}isZoomable(){return Boolean(this.width)&&this.content.isZoomable()}applyCurrentZoomPan(){this._applyZoomTransform(this.pan.x,this.pan.y,this.currZoomLevel),this===this.pswp.currSlide&&this.pswp.dispatch("zoomPanUpdate",{slide:this})}zoomAndPanToInitial(){this.currZoomLevel=this.zoomLevels.initial,this.bounds.update(this.currZoomLevel),l(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,i,e){e/=this.currentResolution||this.zoomLevels.initial,_(this.container,t,i,e)}calculateSize(){const{pswp:t}=this;l(this.panAreaSize,I(t.options,t.viewportSize,this.data,this.index)),this.zoomLevels.update(this.width,this.height,this.panAreaSize),t.dispatch("calcSlideSize",{slide:this})}getCurrentTransform(){const t=this.currZoomLevel/(this.currentResolution||this.zoomLevels.initial);return u(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function $(t,i,e){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),i.on("change",()=>{i.options.loop||(t.disabled=e?!(i.currIndex<i.getNumItems()-1):!(i.currIndex>0))})}var U={name:"arrowPrev",className:"pswp__button--arrow--prev",title:"Previous",order:10,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<path d="M29 43l-3 3-16-16 16-16 3 3-13 13 13 13z" id="pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"prev",onInit:$},G={name:"arrowNext",className:"pswp__button--arrow--next",title:"Next",order:11,isButton:!0,appendTo:"wrapper",html:{isCustomSVG:!0,size:60,inner:'<use xlink:href="#pswp__icn-arrow"/>',outlineID:"pswp__icn-arrow"},onClick:"next",onInit:(t,i)=>{$(t,i,!0)}},j={name:"close",title:"Close",order:20,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M24 10l-2-2-6 6-6-6-2 2 6 6-6 6 2 2 6-6 6 6 2-2-6-6z" id="pswp__icn-close"/>',outlineID:"pswp__icn-close"},onClick:"close"},K={name:"zoom",title:"Zoom",order:10,isButton:!0,html:{isCustomSVG:!0,inner:'<path d="M17.426 19.926a6 6 0 1 1 1.5-1.5L23 22.5 21.5 24l-4.074-4.074z" id="pswp__icn-zoom"/><path fill="currentColor" class="pswp__zoom-icn-bar-h" d="M11 16v-2h6v2z"/><path fill="currentColor" class="pswp__zoom-icn-bar-v" d="M13 12h2v6h-2z"/>',outlineID:"pswp__icn-zoom"},onClick:"toggleZoom"},X={name:"counter",order:5,onInit:(t,i)=>{i.on("change",()=>{t.innerText=i.currIndex+1+i.options.indexIndicatorSep+i.getNumItems()})}},Y={name:"preloader",appendTo:"bar",order:7,html:{isCustomSVG:!0,inner:'<path fill-rule="evenodd" clip-rule="evenodd" d="M21.2 16a5.2 5.2 0 1 1-5.2-5.2V8a8 8 0 1 0 8 8h-2.8Z" id="pswp__icn-loading"/>',outlineID:"pswp__icn-loading"},onInit:(t,i)=>{let e,s=null;const n=i=>{var s;e!==i&&(e=i,s=i,t.classList.toggle("pswp__preloader--active",s))},o=()=>{if(!i.currSlide?.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{n(Boolean(i.currSlide?.content.isLoading())),s=null},i.options.preloaderDelay))};i.on("change",o),i.on("loadComplete",t=>{i.currSlide===t.slide&&o()}),i.ui&&(i.ui.updatePreloaderVisibility=o)}},J=class{constructor(t,i){const e=i.name||i.className;let s=i.html;if(!1===t.options[e])return;"string"==typeof t.options[`${e}SVG`]&&(s=t.options[`${e}SVG`]),t.dispatch("uiElementCreate",{data:i});let n="";i.isButton?(n+="pswp__button ",n+=i.className||`pswp__button--${i.name}`):n+=i.className||`pswp__${i.name}`;let o=i.isButton?i.tagName||"button":i.tagName||"div";o=o.toLowerCase();const a=h(n,o);if(i.isButton){"button"===o&&(a.type="button");let{title:s}=i;const{ariaLabel:n}=i;"string"==typeof t.options[`${e}Title`]&&(s=t.options[`${e}Title`]),s&&(a.title=s);const r=n||s;r&&a.setAttribute("aria-label",r)}a.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const i=t;let e='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return e=e.split("%d").join(i.size||32),i.outlineID&&(e+=`<use class="pswp__icn-shadow" xlink:href="#${i.outlineID}"/>`),e+=i.inner,e+="</svg>",e}(s),i.onInit&&i.onInit(a,t),i.onClick&&(a.onclick=e=>{"string"==typeof i.onClick?t[i.onClick]():"function"==typeof i.onClick&&i.onClick(e,a,t)});const r=i.appendTo||"bar";let l=t.element;"bar"===r?(t.topBar||(t.topBar=h("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(a.classList.add("pswp__hide-on-close"),"wrapper"===r&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",a,i))}};function Q(t,i){t.classList.toggle("pswp--zoomed-in",i)}var tt=class{constructor(t){this.pswp=t,this.isRegistered=!1,this.uiElementsData=[],this.items=[],this.updatePreloaderVisibility=()=>{},this._lastUpdatedZoomLevel=void 0}init(){const{pswp:t}=this;this.isRegistered=!1,this.uiElementsData=[j,U,G,K,Y,X],t.dispatch("uiRegister"),this.uiElementsData.sort((t,i)=>(t.order||0)-(i.order||0)),this.items=[],this.isRegistered=!0,this.uiElementsData.forEach(t=>{this.registerElement(t)}),t.on("change",()=>{t.element?.classList.toggle("pswp--one-slide",1===t.getNumItems())}),t.on("zoomPanUpdate",()=>this._onZoomPanUpdate())}registerElement(t){this.isRegistered?this.items.push(new J(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:i,options:e}=this.pswp;if(this.pswp.opener.isClosing||!t||!i)return;let{currZoomLevel:s}=i;if(this.pswp.opener.isOpen||(s=i.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=i.zoomLevels.initial-i.zoomLevels.secondary;if(Math.abs(n)<.01||!i.isZoomable())return Q(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),Q(t,(s===i.zoomLevels.initial?i.zoomLevels.secondary:i.zoomLevels.initial)<=s),"zoom"!==e.imageClickAction&&"zoom-or-close"!==e.imageClickAction||t.classList.add("pswp--click-to-zoom")}},it="cubic-bezier(.4,0,.22,1)",et=class{constructor(t){this.props=t;const{target:i,onComplete:e,transform:s,onFinish:n=()=>{},duration:o=333,easing:a=it}=t;this.onFinish=n;const r=s?"transform":"opacity",h=t[r]??"";this._target=i,this._onComplete=e,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{g(i,r,o,a),this._helperTimeout=setTimeout(()=>{i.addEventListener("transitionend",this._onTransitionEnd,!1),i.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},o+500),i.style[r]=h},30)},0)}_onTransitionEnd(t){t.target===this._target&&this._finalizeAnimation()}_finalizeAnimation(){this._finished||(this._finished=!0,this.onFinish(),this._onComplete&&this._onComplete())}destroy(){this._helperTimeout&&(clearTimeout(this._helperTimeout),this._helperTimeout=null),g(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},st=class{constructor(t,i,e){this.velocity=1e3*t,this._dampingRatio=i||.75,this._naturalFrequency=e||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,i){let e,s=0;i/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*i);if(1===this._dampingRatio)e=this.velocity+this._naturalFrequency*t,s=(t+e*i)*n,this.velocity=s*-this._naturalFrequency+e*n;else if(this._dampingRatio<1){e=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*i),a=Math.sin(this._dampedFrequency*i);s=n*(t*o+e*a),this.velocity=s*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*a+this._dampedFrequency*e*o)}return s}},nt=class{constructor(t){this.props=t,this._raf=0;const{start:i,end:e,velocity:s,onUpdate:n,onComplete:o,onFinish:a=()=>{},dampingRatio:r,naturalFrequency:h}=t;this.onFinish=a;const l=new st(s,r,h);let p=Date.now(),d=i-e;const c=()=>{this._raf&&(d=l.easeFrame(d,Date.now()-p),Math.abs(d)<1&&Math.abs(l.velocity)<50?(n(e),o&&o(),this.onFinish()):(p=Date.now(),n(d+e),this._raf=requestAnimationFrame(c)))};this._raf=requestAnimationFrame(c)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},ot=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,i){const e=i?new nt(t):new et(t);return this.activeAnimations.push(e),e.onFinish=()=>this.stop(e),e}stop(t){t.destroy();const i=this.activeAnimations.indexOf(t);i>-1&&this.activeAnimations.splice(i,1)}stopAll(){this.activeAnimations.forEach(t=>{t.destroy()}),this.activeAnimations=[]}stopAllPan(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isPan||(t.destroy(),!1))}stopMainScroll(){this.activeAnimations=this.activeAnimations.filter(t=>!t.props.isMainScroll||(t.destroy(),!1))}isPanRunning(){return this.activeAnimations.some(t=>t.props.isPan)}},at=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{at=!0}}))}catch(yt){}var rt=class{constructor(){this._pool=[]}add(t,i,e,s){this._toggleListener(t,i,e,s)}remove(t,i,e,s){this._toggleListener(t,i,e,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,i,e,s,n,o){if(!t)return;const a=n?"removeEventListener":"addEventListener";i.split(" ").forEach(i=>{if(i){o||(n?this._pool=this._pool.filter(s=>s.type!==i||s.listener!==e||s.target!==t):this._pool.push({target:t,type:i,listener:e,passive:s}));const r=!!at&&{passive:s||!1};t[a](i,e,r)}})}},ht={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},lt=(t,i)=>i?t:ht[t],pt=class{constructor(t){this.pswp=t,this._wasFocused=!1,t.on("bindEvents",()=>{t.options.trapFocus&&(t.options.initialPointerPos||this._focusRoot(),t.events.add(document,"focusin",this._onFocusIn.bind(this))),t.events.add(document,"keydown",this._onKeyDown.bind(this))});const i=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&i&&this._wasFocused&&i.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:i}=this;if(i.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(x(t))return;let e,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case lt("Escape",o):i.options.escKey&&(e="close");break;case lt("z",o):e="toggleZoom";break;case lt("ArrowLeft",o):s="x";break;case lt("ArrowUp",o):s="y";break;case lt("ArrowRight",o):s="x",n=!0;break;case lt("ArrowDown",o):n=!0,s="y";break;case lt("Tab",o):this._focusRoot()}if(s){t.preventDefault();const{currSlide:o}=i;i.options.arrowKeys&&"x"===s&&i.getNumItems()>1?e=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}e&&(t.preventDefault(),i[e]())}_onFocusIn(t){const{template:i}=this.pswp;i&&document!==t.target&&i!==t.target&&!i.contains(t.target)&&i.focus()}},dt=class{constructor(t){this.pswp=t,this.x=0,this.slideWidth=0,this._currPositionIndex=0,this._prevPositionIndex=0,this._containerShiftIndex=-1,this.itemHolders=[]}resize(t){const{pswp:i}=this,e=Math.round(i.viewportSize.x+i.viewportSize.x*i.options.spacing),s=e!==this.slideWidth;s&&(this.slideWidth=e,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((i,e)=>{s&&_(i.el,(e+this._containerShiftIndex)*this.slideWidth),t&&i.slide&&i.slide.resize()})}resetPosition(){this._currPositionIndex=0,this._prevPositionIndex=0,this.slideWidth=0,this._containerShiftIndex=-1}appendHolders(){this.itemHolders=[];for(let t=0;t<3;t++){const i=h("pswp__item","div",this.pswp.container);i.setAttribute("role","group"),i.setAttribute("aria-roledescription","slide"),i.setAttribute("aria-hidden","true"),i.style.display=1===t?"block":"none",this.itemHolders.push({el:i})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,i,e){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const i=(t+o)%o;t=i<=o/2?i:i-o}else n<0?n=0:n>=o&&(n=o-1),t=n-s.potentialIndex;s.potentialIndex=n,this._currPositionIndex-=t,s.animations.stopMainScroll();const a=this.getCurrSlideX();if(i){s.animations.startSpring({isMainScroll:!0,start:this.x,end:a,velocity:e||0,naturalFrequency:30,dampingRatio:1,onUpdate:t=>{this.moveTo(t)},onComplete:()=>{this.updateCurrItem(),s.appendHeavy()}});let t=s.potentialIndex-s.currIndex;if(s.canLoop()){const i=(t+o)%o;t=i<=o/2?i:i-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(a),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,i=this._prevPositionIndex-this._currPositionIndex;if(!i)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let e,s=Math.abs(i);s>=3&&(this._containerShiftIndex+=i+(i>0?-3:3),s=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let n=0;n<s;n++)i>0?(e=this.itemHolders.shift(),e&&(this.itemHolders[2]=e,this._containerShiftIndex++,_(e.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(e,t.currIndex-s+n+2))):(e=this.itemHolders.pop(),e&&(this.itemHolders.unshift(e),this._containerShiftIndex--,_(e.el,this._containerShiftIndex*this.slideWidth),t.setContent(e,t.currIndex+s-n-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,i)=>{t.slide&&t.slide.setIsActive(1===i)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(i),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,i){if(!this.pswp.canLoop()&&i){let i=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;i+=this.pswp.currIndex;const e=Math.round(t-this.x);(i<0&&e>0||i>=this.pswp.getNumItems()-1&&e<0)&&(t=this.x+.35*e)}this.x=t,this.pswp.container&&_(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:i??!1})}},ct=.003,mt=class{constructor(t){this.pswp=t,this.isClosed=!0,this.isOpen=!1,this.isClosing=!1,this.isOpening=!1,this._duration=void 0,this._useAnimation=!1,this._croppedZoom=!1,this._animateRootOpacity=!1,this._animateBgOpacity=!1,this._placeholder=void 0,this._opacityElement=void 0,this._cropContainer1=void 0,this._cropContainer2=void 0,this._thumbBounds=void 0,this._prepareOpen=this._prepareOpen.bind(this),t.on("firstZoomPan",this._prepareOpen)}open(){this._prepareOpen(),this._start()}close(){if(this.isClosed||this.isClosing||this.isOpening)return;const t=this.pswp.currSlide;this.isOpen=!1,this.isOpening=!1,this.isClosing=!0,this._duration=this.pswp.options.hideAnimationDuration,t&&t.currZoomLevel*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps(),setTimeout(()=>{this._start()},this._croppedZoom?30:0)}_prepareOpen(){if(this.pswp.off("firstZoomPan",this._prepareOpen),!this.isOpening){const t=this.pswp.currSlide;this.isOpening=!0,this.isClosing=!1,this._duration=this.pswp.options.showAnimationDuration,t&&t.zoomLevels.initial*t.width>=this.pswp.options.maxWidthToAnimate&&(this._duration=0),this._applyStartProps()}}_applyStartProps(){const{pswp:t}=this,i=this.pswp.currSlide,{options:e}=t;if("fade"===e.showHideAnimationType?(e.showHideOpacity=!0,this._thumbBounds=void 0):"none"===e.showHideAnimationType?(e.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=i?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&i?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=e.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&i&&(i.zoomAndPanToInitial(),i.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>ct,this._opacityElement=this._animateRootOpacity?t.element:t.bg,!this._useAnimation)return this._duration=0,this._animateZoom=!1,this._animateBgOpacity=!1,this._animateRootOpacity=!0,void(this.isOpening&&(t.element&&(t.element.style.opacity=String(ct)),t.applyBgOpacity(1)));this._animateZoom&&this._thumbBounds&&this._thumbBounds.innerRect?(this._croppedZoom=!0,this._cropContainer1=this.pswp.container,this._cropContainer2=this.pswp.currSlide?.holderElement,t.container&&(t.container.style.overflow="hidden",t.container.style.width=`${t.viewportSize.x}px`)):this._croppedZoom=!1,this.isOpening?(this._animateRootOpacity?(t.element&&(t.element.style.opacity=String(ct)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(ct)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(ct)))):this.isClosing&&(t.mainScroll.itemHolders[0]&&(t.mainScroll.itemHolders[0].el.style.display="none"),t.mainScroll.itemHolders[2]&&(t.mainScroll.itemHolders[2].el.style.display="none"),this._croppedZoom&&0!==t.mainScroll.x&&(t.mainScroll.resetPosition(),t.mainScroll.resize()))}_start(){this.isOpening&&this._useAnimation&&this._placeholder&&"IMG"===this._placeholder.tagName?new Promise(t=>{let i=!1,e=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,i)=>{s.onload=()=>t(s),s.onerror=i})).finally(()=>{i=!0,e||t(!0)}),setTimeout(()=>{e=!1,i&&t(!0)},50),setTimeout(t,250)}).finally(()=>this._initiate()):this._initiate()}_initiate(){this.pswp.element?.style.setProperty("--pswp-transition-duration",`${this._duration}ms`),this.pswp.dispatch(this.isOpening?"openingAnimationStart":"closingAnimationStart"),this.pswp.dispatch("initialZoom"+(this.isOpening?"In":"Out")),this.pswp.element?.classList.toggle("pswp--ui-visible",this.isOpening),this.isOpening?(this._placeholder&&(this._placeholder.style.opacity="1"),this._animateToOpenState()):this.isClosing&&this._animateToClosedState(),this._useAnimation||this._onAnimationComplete()}_onAnimationComplete(){const{pswp:t}=this;this.isOpen=this.isOpening,this.isClosed=this.isClosing,this.isOpening=!1,this.isClosing=!1,t.dispatch(this.isOpen?"openingAnimationEnd":"closingAnimationEnd"),t.dispatch("initialZoom"+(this.isOpen?"InEnd":"OutEnd")),this.isClosed?t.destroy():this.isOpen&&(this._animateZoom&&t.container&&(t.container.style.overflow="visible",t.container.style.width="100%"),t.currSlide?.applyCurrentZoomPan())}_animateToOpenState(){const{pswp:t}=this;this._animateZoom&&(this._croppedZoom&&this._cropContainer1&&this._cropContainer2&&(this._animateTo(this._cropContainer1,"transform","translate3d(0,0,0)"),this._animateTo(this._cropContainer2,"transform","none")),t.currSlide&&(t.currSlide.zoomAndPanToInitial(),this._animateTo(t.currSlide.container,"transform",t.currSlide.getCurrentTransform()))),this._animateBgOpacity&&t.bg&&this._animateTo(t.bg,"opacity",String(t.options.bgOpacity)),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","1")}_animateToClosedState(){const{pswp:t}=this;this._animateZoom&&this._setClosedStateZoomPan(!0),this._animateBgOpacity&&t.bgOpacity>.01&&t.bg&&this._animateTo(t.bg,"opacity","0"),this._animateRootOpacity&&t.element&&this._animateTo(t.element,"opacity","0")}_setClosedStateZoomPan(t){if(!this._thumbBounds)return;const{pswp:i}=this,{innerRect:e}=this._thumbBounds,{currSlide:s,viewportSize:n}=i;if(this._croppedZoom&&e&&this._cropContainer1&&this._cropContainer2){const i=-n.x+(this._thumbBounds.x-e.x)+e.w,s=-n.y+(this._thumbBounds.y-e.y)+e.h,o=n.x-e.w,a=n.y-e.h;t?(this._animateTo(this._cropContainer1,"transform",u(i,s)),this._animateTo(this._cropContainer2,"transform",u(o,a))):(_(this._cropContainer1,i,s),_(this._cropContainer2,o,a))}s&&(l(s.pan,e||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,i,e){if(!this._duration)return void(t.style[i]=e);const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[i]=e,s.startTransition(n)}},ut=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:i}=this.pswp;let{deltaX:e,deltaY:s}=t;if(i&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(i.isZoomable()){let e=-s;1===t.deltaMode?e*=.05:e*=t.deltaMode?1:.002,e=2**e;const n=i.currZoomLevel*e;i.zoomTo(n,{x:t.clientX,y:t.clientY})}}else i.isPannable()&&(1===t.deltaMode&&(e*=18,s*=18),i.panTo(i.pan.x-e,i.pan.y-s))}},_t={allowPanToNext:!0,spacing:.1,loop:!0,pinchToClose:!0,closeOnVerticalDrag:!0,hideAnimationDuration:333,showAnimationDuration:333,zoomAnimationDuration:333,escKey:!0,arrowKeys:!0,trapFocus:!0,returnFocus:!0,maxWidthToAnimate:4e3,clickToCloseNonZoomable:!0,imageClickAction:"zoom-or-close",bgClickAction:"close",tapAction:"toggle-controls",doubleTapAction:"zoom",indexIndicatorSep:" / ",preloaderDelay:2e3,bgOpacity:.8,index:0,errorMsg:"The image cannot be loaded",preload:[1,2],easing:"cubic-bezier(.4,0,.22,1)"},gt=class extends M{constructor(t){super(),this.options=this._prepareOptions(t||{}),this.offset={x:0,y:0},this._prevViewportSize={x:0,y:0},this.viewportSize={x:0,y:0},this.bgOpacity=1,this.currIndex=0,this.potentialIndex=0,this.isOpen=!1,this.isDestroying=!1,this.hasMouse=!1,this._initialItemData={},this._initialThumbBounds=void 0,this.topBar=void 0,this.element=void 0,this.template=void 0,this.container=void 0,this.scrollWrap=void 0,this.currSlide=void 0,this.events=new rt,this.animations=new ot,this.mainScroll=new dt(this),this.gestures=new W(this),this.opener=new mt(this),this.keyboard=new pt(this),this.contentLoader=new O(this)}init(){if(this.isOpen||this.isDestroying)return!1;this.isOpen=!0,this.dispatch("init"),this.dispatch("beforeOpen"),this._createMainStructure();let t="pswp--open";return this.gestures.supportsTouch&&(t+=" pswp--touch"),this.options.mainClass&&(t+=` ${this.options.mainClass}`),this.element&&(this.element.className+=` ${t}`),this.currIndex=this.options.index||0,this.potentialIndex=this.currIndex,this.dispatch("firstUpdate"),this.scrollWheel=new ut(this),(Number.isNaN(this.currIndex)||this.currIndex<0||this.currIndex>=this.getNumItems())&&(this.currIndex=0),this.gestures.supportsTouch||this.mouseDetected(),this.updateSize(),this.offset.y=window.pageYOffset,this._initialItemData=this.getItemData(this.currIndex),this.dispatch("gettingData",{index:this.currIndex,data:this._initialItemData,slide:void 0}),this._initialThumbBounds=this.getThumbBounds(),this.dispatch("initialLayout"),this.on("openingAnimationEnd",()=>{const{itemHolders:t}=this.mainScroll;t[0]&&(t[0].el.style.display="block",this.setContent(t[0],this.currIndex-1)),t[2]&&(t[2].el.style.display="block",this.setContent(t[2],this.currIndex+1)),this.appendHeavy(),this.contentLoader.updateLazy(),this.events.add(window,"resize",this._handlePageResize.bind(this)),this.events.add(window,"scroll",this._updatePageScrollOffset.bind(this)),this.dispatch("bindEvents")}),this.mainScroll.itemHolders[1]&&this.setContent(this.mainScroll.itemHolders[1],this.currIndex),this.dispatch("change"),this.opener.open(),this.dispatch("afterInit"),!0}getLoopedIndex(t){const i=this.getNumItems();return this.options.loop&&(t>i-1&&(t-=i),t<0&&(t+=i)),m(t,0,i-1)}appendHeavy(){this.mainScroll.itemHolders.forEach(t=>{t.slide?.appendHeavy()})}goTo(t){this.mainScroll.moveIndexBy(this.getLoopedIndex(t)-this.potentialIndex,!0)}next(){this.goTo(this.potentialIndex+1)}prev(){this.goTo(this.potentialIndex-1)}zoomTo(...t){this.currSlide?.zoomTo(...t)}toggleZoom(){this.currSlide?.toggleZoom()}close(){this.opener.isOpen&&!this.isDestroying&&(this.isDestroying=!0,this.dispatch("close"),this.events.removeAll(),this.opener.close())}destroy(){if(!this.isDestroying)return this.options.showHideAnimationType="none",void this.close();this.dispatch("destroy"),this._listeners={},this.scrollWrap&&(this.scrollWrap.ontouchmove=null,this.scrollWrap.ontouchend=null),this.element?.remove(),this.mainScroll.itemHolders.forEach(t=>{t.slide?.destroy()}),this.contentLoader.destroy(),this.events.removeAll()}refreshSlideContent(t){this.contentLoader.removeByIndex(t),this.mainScroll.itemHolders.forEach((i,e)=>{let s=(this.currSlide?.index??0)-1+e;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(i,t,!0),1===e&&(this.currSlide=i.slide,i.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,i,e){if(this.canLoop()&&(i=this.getLoopedIndex(i)),t.slide){if(t.slide.index===i&&!e)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(i<0||i>=this.getNumItems())||(t.slide=new q(this.getItemData(i),i,this),i===this.currIndex&&(this.currSlide=t.slide),t.slide.append(t.el))}getViewportCenterPoint(){return{x:this.viewportSize.x/2,y:this.viewportSize.y/2}}updateSize(t){if(this.isDestroying)return;const i=L(this.options,this);!t&&c(i,this._prevViewportSize)||(l(this._prevViewportSize,i),this.dispatch("beforeResize"),l(this.viewportSize,this._prevViewportSize),this._updatePageScrollOffset(),this.dispatch("viewportSize"),this.mainScroll.resize(this.opener.isOpen),!this.hasMouse&&window.matchMedia("(any-hover: hover)").matches&&this.mouseDetected(),this.dispatch("resize"))}applyBgOpacity(t){this.bgOpacity=Math.max(t,0),this.bg&&(this.bg.style.opacity=String(this.bgOpacity*this.options.bgOpacity))}mouseDetected(){this.hasMouse||(this.hasMouse=!0,this.element?.classList.add("pswp--has_mouse"))}_handlePageResize(){this.updateSize(),/iPhone|iPad|iPod/i.test(window.navigator.userAgent)&&setTimeout(()=>{this.updateSize()},500)}_updatePageScrollOffset(){this.setScrollOffset(0,window.pageYOffset)}setScrollOffset(t,i){this.offset.x=t,this.offset.y=i,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=h("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=h("pswp__bg","div",this.element),this.scrollWrap=h("pswp__scroll-wrap","section",this.element),this.container=h("pswp__container","div",this.scrollWrap),this.scrollWrap.setAttribute("aria-roledescription","carousel"),this.container.setAttribute("aria-live","off"),this.container.setAttribute("id","pswp__items"),this.mainScroll.appendHolders(),this.ui=new tt(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,i,e){const s=e.dispatch("thumbBounds",{index:t,itemData:i,instance:e});if(s.thumbBounds)return s.thumbBounds;const{element:n}=i;let o,a;if(n&&!1!==e.options.thumbSelector){const t=e.options.thumbSelector||"img";a=n.matches(t)?n:n.querySelector(t)}return a=e.applyFilters("thumbEl",a,i,t),a&&(o=i.thumbCropped?function(t,i,e){const s=t.getBoundingClientRect(),n=s.width/i,o=s.height/e,a=n>o?n:o,r=(s.width-i*a)/2,h=(s.height-e*a)/2,l={x:s.left+r,y:s.top+h,w:i*a};return l.innerRect={w:s.width,h:s.height,x:r,y:h},l}(a,i.width||i.w||0,i.height||i.h||0):function(t){const i=t.getBoundingClientRect();return{x:i.left,y:i.top,w:i.width}}(a)),e.applyFilters("thumbBounds",o,i,t)}(this.currIndex,this.currSlide?this.currSlide.data:this._initialItemData,this)}canLoop(){return this.options.loop&&this.getNumItems()>2}_prepareOptions(t){return window.matchMedia("(prefers-reduced-motion), (update: slow)").matches&&(t.showHideAnimationType="none",t.zoomAnimationDuration=0),{..._t,...t}}},vt=()=>Promise.resolve(gt);export{F as n,r,vt as t};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return r(
|
|
3
|
-
return r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */r("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})})}var R={[m.APPROVED]:{color:"text-success",bgColor:"bg-success/20",icon:/* @__PURE__ */r(
|
|
1
|
+
import{_ as e,f as t,h as a,p as n,t as r,w as o}from"./DrrpB4Om.js";import{L as s,N as i,O as l,i as c,n as d,p as m,u}from"./CaX2xgrP.js";import{n as p,r as h,t as g}from"./C12iSy3L.js";import{n as f,r as v,t as x}from"./dT6WSX65.js";import{c as N,l as y}from"./ChJXhA9c.js";import{t as w}from"./CATr-3VW.js";import{t as b}from"./DF0LxcV7.js";import{t as T}from"./DGbyGc8b.js";import{t as D}from"./C3dOFk9A.js";import{n as P,r as C,t as j}from"./BOqkzZ92.js";import{t as I}from"./DnQ6XaLR.js";import{n as E,o as S,r as z,t as A}from"./DZtaQWVG2.js";import{t as U}from"./N4HKgEC52.js";import{a as q,i as _,n as M,r as O,t as k}from"./lcKuIs2T2.js";var $=({content:e,onDeleted:t,onClose:a})=>{const n=function(){const e=s(),{user:t,props:a}=d(),n=a?.organizationId,r=t?.token;return v({mutationKey:["delete-upload",r??null],mutationFn:async({contentId:e})=>{const t=await i.post(u.DELETE_CONTENT,{json:{contentId:e},headers:{"x-org-id":n,...r?{Authorization:`Bearer ${r}`}:{}}}).json();if(t?.error)throw new Error(t.error);return{contentId:e}},onMutate:async({contentId:t})=>{await e.cancelQueries({queryKey:[l.USER_UPLOADS],exact:!1});const a=e.getQueriesData({queryKey:[l.USER_UPLOADS],exact:!1});return e.setQueriesData({queryKey:[l.USER_UPLOADS],exact:!1},e=>e?.pages?{...e,pages:e.pages.map(e=>({...e,data:e.data.filter(e=>e._id!==t),meta:{...e.meta,totalCount:Math.max(0,(e.meta.totalCount??0)-1)}}))}:e),{previousData:a}},onError:(t,a,n)=>{n?.previousData?.forEach(([t,a])=>{e.setQueryData(t,a)})}})}(),o=e?.rateCount??0,c=o<=0,m=c?null:`This photo has ${o} rating${o>1?"s":""}. Photos with at least 1 rating cannot be deleted.`;/* @__PURE__ */
|
|
2
|
+
return r(O,{open:Boolean(e),onOpenChange:e=>{e||a()},title:"Delete content?",description:m??"Are you sure you want to delete this content? This operation is permanent and cannot be undone.",cancelText:"Cancel",confirmText:c?"Delete":"Got it",confirmColor:c?"error":"primary",onCancel:a,onConfirm:c?()=>{if(!e||!c)return;const a=e.eventId,r=e._id;t(),n.mutate({contentId:r,eventId:a})}:a})};function L({className:e}){/* @__PURE__ */
|
|
3
|
+
return r("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */r("path",{fill:"currentColor",d:"M7 21q-.825 0-1.412-.587T5 19V6q-.425 0-.712-.288T4 5t.288-.712T5 4h4q0-.425.288-.712T10 3h4q.425 0 .713.288T15 4h4q.425 0 .713.288T20 5t-.288.713T19 6v13q0 .825-.587 1.413T17 21zM17 6H7v13h10zm-7 11q.425 0 .713-.288T11 16V9q0-.425-.288-.712T10 8t-.712.288T9 9v7q0 .425.288.713T10 17m4 0q.425 0 .713-.288T15 16V9q0-.425-.288-.712T14 8t-.712.288T13 9v7q0 .425.288.713T14 17M7 6v13z"})})}var R={[m.APPROVED]:{color:"text-success",bgColor:"bg-success/20",icon:/* @__PURE__ */r(k,{className:"size-full"}),title:"Approved",description:"Your upload has been approved and is now visible to everyone viewing this event."},[m.IN_REVIEW]:{color:"text-warning",bgColor:"bg-warning/20",icon:/* @__PURE__ */r(_,{className:"size-full"}),title:"In Review",description:"Your upload is currently being reviewed. It will be visible once approved by the event admin."},[m.REJECTED]:{color:"text-destructive",bgColor:"bg-destructive/20",icon:/* @__PURE__ */r(U,{className:"size-full"}),title:"Rejected",description:"Your upload was not approved as it may not meet the content guidelines. Please upload appropriate content."}},F=e=>{const t=new Date(e).getTime();if(Number.isNaN(t))return"";const a=Math.max(0,Math.floor((Date.now()-t)/1e3)),n=[[60,"second"],[60,"minute"],[24,"hour"],[30,"day"],[12,"month"],[Number.POSITIVE_INFINITY,"year"]];let r=a,o="second";for(const[s,i]of n){if(r<s){o=i;break}r=Math.floor(r/s),o=i}return"second"===o&&r<30?"just now":`${r} ${o}${1===r?"":"s"} ago`},V=({content:e,onDelete:t,onStatusClick:a})=>{const n=e.status,o=R[n];/* @__PURE__ */
|
|
4
4
|
return r("div",{className:"group relative size-full overflow-hidden sm:rounded",children:/* @__PURE__ */r("div",{className:"relative size-full",children:[
|
|
5
5
|
/* @__PURE__ */r(C,{url:e.url||"",alt:e.caption||"",thumbnailUrl:e.thumbnailUrl||void 0,blurhash:e.blurhash||void 0,pswpData:{id:e._id,type:e.type,hash:e._id,width:e.dimension?.width,height:e.dimension?.height,thumbnailUrl:e.thumbnailUrl||void 0,caption:e.caption||""}}),
|
|
6
|
-
/* @__PURE__ */r("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-between bg-gradient-to-t from-black/50 to-transparent pl-3",children:[/* @__PURE__ */r(
|
|
7
|
-
/* @__PURE__ */r("button",{type:"button","aria-label":`Status: ${o?.title||"Unknown"}`,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(n)},className:c("pointer-events-auto absolute top-1 right-1 cursor-pointer rounded-full p-1 transition-opacity hover:opacity-80",o?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */r("span",{className:c("block size-5",o?.color||"text-gray-500"),children:o?.icon||null})})]})})},B=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),K=e=>{if(0===e.length)return"";if(1===e.length)return B(e[0].createdAt);const{minTime:t,maxTime:a}=e.reduce((e,t)=>{const a=new Date(t.createdAt).getTime();return{minTime:Math.min(e.minTime,a),maxTime:Math.max(e.maxTime,a)}},{minTime:1/0,maxTime:-1/0}),n=B(new Date(t).toISOString()),r=B(new Date(a).toISOString());return n===r?n:`${n} - ${r}`},Y=()=>{const s=
|
|
6
|
+
/* @__PURE__ */r("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-center justify-between bg-gradient-to-t from-black/50 to-transparent pl-3",children:[/* @__PURE__ */r(w,{variant:"caption",className:"text-xs text-white opacity-90 sm:text-sm",children:F(e.createdAt)}),/* @__PURE__ */r(M,{icon:/* @__PURE__ */r(L,{className:"size-5"}),color:"error",size:"sm",className:"pointer-events-auto","aria-label":"Delete upload",tooltip:"Delete",onClick:e=>{e.stopPropagation(),e.preventDefault(),t()}})]}),
|
|
7
|
+
/* @__PURE__ */r("button",{type:"button","aria-label":`Status: ${o?.title||"Unknown"}`,onClick:e=>{e.stopPropagation(),e.preventDefault(),a(n)},className:c("pointer-events-auto absolute top-1 right-1 cursor-pointer rounded-full p-1 transition-opacity hover:opacity-80",o?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */r("span",{className:c("block size-5",o?.color||"text-gray-500"),children:o?.icon||null})})]})})},B=e=>new Date(e).toLocaleDateString("en-US",{month:"short",year:"numeric"}),K=e=>{if(0===e.length)return"";if(1===e.length)return B(e[0].createdAt);const{minTime:t,maxTime:a}=e.reduce((e,t)=>{const a=new Date(t.createdAt).getTime();return{minTime:Math.min(e.minTime,a),maxTime:Math.max(e.maxTime,a)}},{minTime:1/0,maxTime:-1/0}),n=B(new Date(t).toISOString()),r=B(new Date(a).toISOString());return n===r?n:`${n} - ${r}`},Y=()=>{const s=y(),m=N(),{user:v,loadingUser:C,portalContainer:U}=d(),_=t(null),M=t(null),O=t(null),[k,L]=a(null),[F,B]=a(null),{contents:Y,loading:Q,hasNextPage:G,fetchNextPage:H,isFetchingNextPage:J}=function({sort:e="-createdAt",limit:t=20}={}){const{user:a,loadingUser:r,props:o}=d(),s=o?.organizationId,c=a?.token,m=a?._id??a?.uid??null,{data:f,isLoading:v,isError:x,error:N,isFetchingNextPage:y,hasNextPage:w,fetchNextPage:b,refetch:T}=h({queryKey:[l.USER_UPLOADS,s??"",m,t,e],queryFn:async({pageParam:a=1})=>await i.get(u.MY_UPLOADS,{searchParams:{page:a,limit:t,sort:e},headers:{"x-org-id":s,...c?{Authorization:`Bearer ${c}`}:{}}}).json(),initialPageParam:1,getPreviousPageParam:p,getNextPageParam:g,staleTime:12e4,gcTime:3e5,enabled:!r&&!!a});return{contents:n(()=>f?.pages?.flatMap(e=>e?.data??[])??[],[f]),loading:v,isError:x,error:N,isFetchingNextPage:y,hasNextPage:!!w,fetchNextPage:b,refetch:T,totalCount:f?.pages?.[0]?.meta?.totalCount??0}}({sort:"-createdAt",limit:20});e(()=>{C||v||s("/auth/login",{state:{referrer:m.pathname},replace:!0})},[C,v]);const W=Y.length>0,Z=!Q&&!W,X=n(()=>{if(!Y.length)return[];const e={};return Y.forEach(t=>{const a=t.eventId||"unknown";e[a]||(e[a]={eventId:a,eventName:t.event?.name||"Event",uploads:[]}),e[a].uploads.push(t)}),Object.values(e).sort((e,t)=>{const a=new Date(e.uploads[0]?.createdAt||0).getTime();return new Date(t.uploads[0]?.createdAt||0).getTime()-a})},[Y]);e(()=>{const e=M.current;if(!e)return;const t=new P({gallery:e,children:"a",counter:!1,bgOpacity:1,wheelToZoom:!0,pinchToClose:!0,zoom:!1,pswpModule:j,appendToEl:U??document.body});return _.current=t,new x(t),new f(t),t.init(),()=>{t.destroy(),_.current=null}},[U]),e(()=>{const e=O.current;if(!e||!G)return;const t=new IntersectionObserver(e=>{e[0]?.isIntersecting&&G&&!J&&H()},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[G,J,H]);const ee=n(()=>Y.find(e=>e._id===k)??null,[k,Y]),te=F?R[F]:null;/* @__PURE__ */
|
|
8
8
|
return r("div",{className:"bg-background mx-auto min-h-screen max-w-5xl px-3 pt-16 pb-12 lg:px-0",children:[
|
|
9
|
-
/* @__PURE__ */r("div",{className:"relative mb-6 flex items-center justify-center",children:[/* @__PURE__ */r(I,{}),/* @__PURE__ */r(
|
|
9
|
+
/* @__PURE__ */r("div",{className:"relative mb-6 flex items-center justify-center",children:[/* @__PURE__ */r(I,{}),/* @__PURE__ */r(w,{variant:"h4",align:"center",children:"My Uploads"})]}),
|
|
10
10
|
/* @__PURE__ */r("section",{className:"space-y-3",children:Q?/* @__PURE__ */r("div",{className:"space-y-8 py-4",children:Array.from({length:2}).map((e,t)=>/* @__PURE__ */r("div",{className:"space-y-4",children:[/* @__PURE__ */r("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */r(T,{className:"h-6 w-48"}),/* @__PURE__ */r(T,{className:"h-5 w-24"})]}),/* @__PURE__ */r("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:Array.from({length:4}).map((e,t)=>/* @__PURE__ */r(T,{className:"h-52 w-full lg:h-64"},t))})]},t))}):Z?/* @__PURE__ */r(b,{className:"py-12",title:"No uploads yet",description:"Photos and videos you upload to events will appear here."}):/* @__PURE__ */r(o,{children:[
|
|
11
|
-
/* @__PURE__ */r("div",{ref:
|
|
12
|
-
/* @__PURE__ */r("div",{ref:
|
|
13
|
-
/* @__PURE__ */r(
|
|
11
|
+
/* @__PURE__ */r("div",{ref:M,className:"space-y-8 py-4",children:X.map(e=>/* @__PURE__ */r("div",{className:"space-y-4",children:[/* @__PURE__ */r("div",{className:"flex items-center justify-between",children:[/* @__PURE__ */r(w,{variant:"h5",color:"muted",children:e.eventName}),/* @__PURE__ */r("span",{className:"text-muted-foreground text-sm font-light uppercase sm:text-base",children:K(e.uploads)})]}),/* @__PURE__ */r("div",{className:"grid grid-cols-2 gap-1 sm:grid-cols-3 sm:gap-3 lg:grid-cols-4",children:e.uploads.map(e=>/* @__PURE__ */r("div",{className:"h-52 lg:h-64",children:/* @__PURE__ */r(V,{content:e,onDelete:()=>L(e._id),onStatusClick:e=>B(e)})},e._id))})]},e.eventId))}),
|
|
12
|
+
/* @__PURE__ */r("div",{ref:O,className:"h-px w-full"}),J&&/* @__PURE__ */r("div",{className:"my-6 w-full",children:/* @__PURE__ */r(q,{})})]})}),
|
|
13
|
+
/* @__PURE__ */r($,{content:ee,onClose:()=>L(null),onDeleted:()=>L(null)}),
|
|
14
14
|
/* @__PURE__ */r(A,{open:Boolean(F),onOpenChange:e=>!e&&B(null),children:/* @__PURE__ */r(E,{className:"w-full max-w-lg",children:[/* @__PURE__ */r("div",{className:"flex flex-col gap-4 p-2 sm:flex-row sm:items-start sm:p-4",children:[/* @__PURE__ */r("div",{className:c("mx-auto flex size-12 shrink-0 items-center justify-center rounded-full sm:mx-0 sm:size-10",te?.bgColor||"bg-gray-500/20"),children:/* @__PURE__ */r("span",{className:c("size-6",te?.color||"text-gray-500"),children:te?.icon||null})}),/* @__PURE__ */r("div",{className:"flex-1 space-y-2 text-center sm:text-left",children:[/* @__PURE__ */r(S,{children:te?.title||"Unknown Status"}),/* @__PURE__ */r(z,{children:te?.description||"Status information unavailable."})]})]}),/* @__PURE__ */r("div",{className:"flex justify-end p-4",children:/* @__PURE__ */r(D,{variant:"outlined",color:"foreground",onClick:()=>B(null),children:"Got it"})})]})})]})};export{Y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as t,G as e,J as s,K as i,Q as r,W as u,X as n,Y as a,Z as o,et as h,it as c,q as l,tt as f,z as y}from"./CaX2xgrP.js";import{t as d}from"./CqBk9L5O.js";var m=class extends l{constructor(t={}){super(),this.config=t,this.#t=/* @__PURE__ */new Map}#t;build(t,e,s){const i=e.queryKey,r=e.queryHash??n(i,e);let u=this.get(r);return u||(u=new y({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(u)),u}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#t.get(t.queryHash);e&&(t.destroy(),e===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){e.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(t=>r(e,t))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(e=>r(t,e)):e}notify(t){e.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){e.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){e.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},p=class extends l{constructor(t={}){super(),this.config=t,this.#e=/* @__PURE__ */new Set,this.#s=/* @__PURE__ */new Map,this.#i=0}#e;#s;#i;build(t,e,s){const i=new d({client:t,mutationCache:this,mutationId:++this.#i,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);const e=q(t);if("string"==typeof e){const s=this.#s.get(e);s?s.push(t):this.#s.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=q(t);if("string"==typeof e){const s=this.#s.get(e);if(s)if(s.length>1){const e=s.indexOf(t);-1!==e&&s.splice(e,1)}else s[0]===t&&this.#s.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=q(t);if("string"==typeof e){const s=this.#s.get(e)?.find(t=>"pending"===t.state.status);return!s||s===t}return!0}runNext(t){const e=q(t);return"string"==typeof e?(this.#s.get(e)?.find(e=>e!==t&&e.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){e.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#s.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(t=>o(e,t))}findAll(t={}){return this.getAll().filter(e=>o(t,e))}notify(t){e.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const s=this.getAll().filter(t=>t.state.isPaused);return e.batch(()=>Promise.all(s.map(e=>e.continue().catch(t))))}};function q(t){return t.options.scope?.id}var g=class{#r;#u;#n;#a;#o;#h;#c;#l;constructor(t={}){this.#r=t.queryCache||new m,this.#u=t.mutationCache||new p,this.#n=t.defaultOptions||{},this.#a=/* @__PURE__ */new Map,this.#o=/* @__PURE__ */new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#c=i.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onFocus())}),this.#l=u.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#r.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#r.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#u.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#r.build(this,e),i=s.state.data;return void 0===i?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(f(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#r.findAll(t).map(({queryKey:t,state:e})=>[t,e.data])}setQueryData(t,e,i){const r=this.defaultQueryOptions({queryKey:t}),u=this.#r.get(r.queryHash)?.state.data,n=s(e,u);if(void 0!==n)return this.#r.build(this,r).setData(n,{...i,manual:!0})}setQueriesData(t,s,i){return e.batch(()=>this.#r.findAll(t).map(({queryKey:t})=>[t,this.setQueryData(t,s,i)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#r.get(e.queryHash)?.state}removeQueries(t){const s=this.#r;e.batch(()=>{s.findAll(t).forEach(t=>{s.remove(t)})})}resetQueries(t,s){const i=this.#r;return e.batch(()=>(i.findAll(t).forEach(t=>{t.reset()}),this.refetchQueries({type:"active",...t},s)))}cancelQueries(s,i={}){const r={revert:!0,...i},u=e.batch(()=>this.#r.findAll(s).map(t=>t.cancel(r)));return Promise.all(u).then(t).catch(t)}invalidateQueries(t,s={}){return e.batch(()=>(this.#r.findAll(t).forEach(t=>{t.invalidate()}),"none"===t?.refetchType?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},s)))}refetchQueries(s,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},u=e.batch(()=>this.#r.findAll(s).filter(t=>!t.isDisabled()&&!t.isStatic()).map(e=>{let s=e.fetch(void 0,r);return r.throwOnError||(s=s.catch(t)),"paused"===e.state.fetchStatus?Promise.resolve():s}));return Promise.all(u).then(t)}fetchQuery(t){const e=this.defaultQueryOptions(t);void 0===e.retry&&(e.retry=!1);const s=this.#r.build(this,e);return s.isStaleByTime(f(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(t).catch(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(t).catch(t)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return u.isOnline()?this.#u.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#r}getMutationCache(){return this.#u}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,e){this.#a.set(a(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#a.values()],s={};return e.forEach(e=>{h(t,e.queryKey)&&Object.assign(s,e.defaultOptions)}),s}setMutationDefaults(t,e){this.#o.set(a(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#o.values()],s={};return e.forEach(e=>{h(t,e.mutationKey)&&Object.assign(s,e.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=n(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.throwOnError&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===c&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#r.clear(),this.#u.clear()}};export{g as t};
|