@qratilabs/qrati-connect 2.7.0-beta.21 → 2.7.0-beta.22
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/CHANGELOG.md +7 -0
- package/element/ApyjFWKp.js +1 -0
- package/element/B4hg-Jzn.js +1 -0
- package/element/{DGuOrd-J.js → Bu-UssyO.js} +3 -3
- package/element/C73GNwh3.js +8 -0
- package/element/CoFGfneL.js +1 -0
- package/element/D8g89do5.js +46 -0
- package/element/DJSvG_Nj.js +4 -0
- package/element/DKsx0Y8e.js +1 -0
- package/element/Dp3VaoZ-.js +3 -0
- package/element/Dp5jqmjn.js +4 -0
- package/element/M8Us9cU9.js +2 -0
- package/element/Nlxbxype.js +19 -0
- package/element/V5NTL9Q8.js +8 -0
- package/element/ts3zQh2I.js +3 -0
- package/element/web.es.js +426 -421
- package/element/zVkCODn-.js +1 -0
- package/package.json +1 -1
- package/react/{BiCzDvPj.js → AapCUC-0.js} +1 -1
- package/react/{BMKU_9Dv.js → BA-rmyyP.js} +1 -1
- package/react/{1Ikk7UFc.js → BFeys-t9.js} +1 -1
- package/react/{DE1Dpj--.js → BJuTpMwr.js} +1 -1
- package/react/{B6PQAfDy.js → BNq5z2O6.js} +1 -1
- package/react/{rdtnGUzO.js → BSqusAcm.js} +1 -1
- package/react/{De1I5osG.js → BWSvzAIN.js} +1 -1
- package/react/{lO7A5UtA.js → CH6vqA5t.js} +1 -1
- package/react/{DBByV_MA.js → CIMTZgx2.js} +1 -1
- package/react/{B4OqjpeZ.js → CMNwX5MM.js} +3 -3
- package/react/{DEml42Wf.js → CRqKn_Cg.js} +1 -1
- package/react/CS1Kg8-a.js +1 -0
- package/react/CWGMt62d.js +1 -0
- package/react/{DZCz7kl3.js → CdVkPkqy.js} +1 -1
- package/react/Cn5QS0_5.js +1 -0
- package/react/Cqdhu1W9.js +1 -0
- package/react/{Bv-1NjQE.js → CwlQ8z66.js} +1 -1
- package/react/{Dnp2RfXx.js → DEsmg9S6.js} +1 -1
- package/react/{DDcelZeN.js → DMmZTL_c.js} +1 -1
- package/react/DSiikjS9.js +1 -0
- package/react/{BjBT1ihN.js → DZ_wJszu.js} +1 -1
- package/react/{DJtDMWy2.js → DsQDSY49.js} +1 -1
- package/react/{Bg0TKkPl.js → DyShHlxS.js} +1 -1
- package/react/K73cs4am.js +1 -0
- package/react/RkYXaQ5u.js +1 -0
- package/react/{BNYjlts5.js → Y9MAVRwK.js} +1 -1
- package/react/{CM-f5bOF.js → bAxGEsnX.js} +1 -1
- package/react/{BSXFijrL.js → bia7_YIN.js} +1 -1
- package/react/index.cjs +1 -1
- package/react/index.mjs +114 -109
- package/umd/web.umd.js +1 -1
- package/element/Bl3RFWpg.js +0 -3
- package/element/Bmvot7Mx.js +0 -3
- package/element/C0wQndW7.js +0 -19
- package/element/CCEtowI9.js +0 -46
- package/element/CUGl86v2.js +0 -8
- package/element/CUfhicE8.js +0 -1
- package/element/DCFrvyiS.js +0 -2
- package/element/DCbRXtK8.js +0 -4
- package/element/DI_rRNLa.js +0 -4
- package/element/dcV4od5T.js +0 -8
- package/react/BarCxWTX.js +0 -1
- /package/element/{CMbOX_GS.js → BAMB7Uoo.js} +0 -0
- /package/element/{C6TX_i0I.js → BzIJspY1.js} +0 -0
- /package/element/{DgGPkDRT.js → CjmNvKgB.js} +0 -0
- /package/element/{BxbCvlCo.js → D1zX23l-.js} +0 -0
- /package/element/{CzSmu5XM.js → DUJAMyRv.js} +0 -0
- /package/element/{CIcND0Dg.js → PPVqva_9.js} +0 -0
- /package/element/{Cdux6g1i.js → tPk8Ov5I.js} +0 -0
- /package/react/{Cdux6g1i.js → BJ85RnFv.js} +0 -0
- /package/react/{BvVjd_UK.js → Bp3BRlhW.js} +0 -0
- /package/react/{BCc5Yj_f.js → BszowxAR.js} +0 -0
- /package/react/{BH8UJKb5.js → BtTYXVAR.js} +0 -0
- /package/react/{DJTeOMQR.js → BvT0jQ3V.js} +0 -0
- /package/react/{BAKN93OB.js → Byq3TC8k.js} +0 -0
- /package/react/{qy2OAEht.js → C5dmblnS.js} +0 -0
- /package/react/{fwmxAw7l.js → D2h6qyms.js} +0 -0
- /package/react/{DlCuoz_e.js → D7BzZEsL.js} +0 -0
- /package/react/{C8D6WaBQ.js → DSaIeQ30.js} +0 -0
- /package/react/{DiysJlOc.js → DYeIUbVU.js} +0 -0
- /package/react/{I7IwY3sd.js → Y-mDLYqW.js} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{At as t,Ct as e,Et as r,V as n,et as s,g as o,jt as i,p as a,r as c,wt as l,y as u}from"./BMKU_9Dv.js";import{t as h}from"./rdtnGUzO.js";import{a as p,i as d,n as f,o as m,r as g,t as y}from"./DE1Dpj--.js";var{getOwnPropertyNames:b,getOwnPropertySymbols:w}=Object,{hasOwnProperty:x}=Object.prototype;function k(t,e){return function(r,n,s){return t(r,n,s)&&e(r,n,s)}}function E(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);const{cache:s}=n,o=s.get(e),i=s.get(r);if(o&&i)return o===r&&i===e;s.set(e,r),s.set(r,e);const a=t(e,r,n);return s.delete(e),s.delete(r),a}}function v(t){return b(t).concat(w(t))}var M=Object.hasOwn||((t,e)=>x.call(t,e));function A(t,e){return t===e||!t&&!e&&t!=t&&e!=e}var{getOwnPropertyDescriptor:C,keys:_}=Object;function j(t,e){return t.byteLength===e.byteLength&&N(new Uint8Array(t),new Uint8Array(e))}function L(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function I(t,e){return t.byteLength===e.byteLength&&N(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function O(t,e){return A(t.getTime(),e.getTime())}function q(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function T(t,e){return t===e}function P(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.entries();let i,a,c=0;for(;(i=o.next())&&!i.done;){const n=e.entries();let o=!1,l=0;for(;(a=n.next())&&!a.done;){if(s[l]){l++;continue}const n=i.value,u=a.value;if(r.equals(n[0],u[0],c,l,t,e,r)&&r.equals(n[1],u[1],n[0],u[0],t,e,r)){o=s[l]=!0;break}l++}if(!o)return!1;c++}return!0}var S=A;function z(t,e,r){const n=_(t);let s=n.length;if(_(e).length!==s)return!1;for(;s-- >0;)if(!$(t,e,r,n[s]))return!1;return!0}function U(t,e,r){const n=v(t);let s,o,i,a=n.length;if(v(e).length!==a)return!1;for(;a-- >0;){if(s=n[a],!$(t,e,r,s))return!1;if(o=C(t,s),i=C(e,s),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function Z(t,e){return A(t.valueOf(),e.valueOf())}function B(t,e){return t.source===e.source&&t.flags===e.flags}function F(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.values();let i,a;for(;(i=o.next())&&!i.done;){const n=e.values();let o=!1,c=0;for(;(a=n.next())&&!a.done;){if(!s[c]&&r.equals(i.value,a.value,i.value,a.value,t,e,r)){o=s[c]=!0;break}c++}if(!o)return!1}return!0}function N(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function D(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||M(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var R={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},V=Object.prototype.toString;var G=K();function K(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:s=!1}=t,o=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:h,areTypedArraysEqual:p,areUrlsEqual:d,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;const b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);const w=m.constructor;if(w!==g.constructor)return!1;if(w===Object)return c(m,g,y);if(Array.isArray(m))return e(m,g,y);if(w===Date)return n(m,g,y);if(w===RegExp)return u(m,g,y);if(w===Map)return i(m,g,y);if(w===Set)return h(m,g,y);const x=V.call(m);if("[object Date]"===x)return n(m,g,y);if("[object RegExp]"===x)return u(m,g,y);if("[object Map]"===x)return i(m,g,y);if("[object Set]"===x)return h(m,g,y);if("[object Object]"===x)return"function"!=typeof m.then&&"function"!=typeof g.then&&c(m,g,y);if("[object URL]"===x)return d(m,g,y);if("[object Error]"===x)return s(m,g,y);if("[object Arguments]"===x)return c(m,g,y);if(R[x])return p(m,g,y);if("[object ArrayBuffer]"===x)return t(m,g,y);if("[object DataView]"===x)return r(m,g,y);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return l(m,g,y);if(f){let t=f[x];if(!t){const e=null!=(k=m)?k[Symbol.toStringTag]:void 0;e&&(t=f[e])}if(t)return t(m,g,y)}var k;return!1}}(function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:j,areArraysEqual:r?U:L,areDataViewsEqual:I,areDatesEqual:O,areErrorsEqual:q,areFunctionsEqual:T,areMapsEqual:r?k(P,U):P,areNumbersEqual:S,areObjectsEqual:r?U:z,arePrimitiveWrappersEqual:Z,areRegExpsEqual:B,areSetsEqual:r?k(F,U):F,areTypedArraysEqual:r?k(N,U):N,areUrlsEqual:D,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const t=E(n.areArraysEqual),e=E(n.areMapsEqual),r=E(n.areObjectsEqual),s=E(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:s})}return n}(t));return function({circular:t,comparator:e,createState:r,equals:n,strict:s}){if(r)return function(o,i){const{cache:a=(t?/* @__PURE__ */new WeakMap:void 0),meta:c}=r();return e(o,i,{cache:a,equals:n,meta:c,strict:s})};if(t)return function(t,r){return e(t,r,{cache:/* @__PURE__ */new WeakMap,equals:n,meta:void 0,strict:s})};const o={cache:void 0,equals:n,meta:void 0,strict:s};return function(t,r){return e(t,r,o)}}({circular:e,comparator:o,createState:n,equals:r?r(o):(i=o,function(t,e,r,n,s,o,a){return i(t,e,a)}),strict:s});var i}K({strict:!0}),K({circular:!0}),K({circular:!0,strict:!0}),K({createInternalComparator:()=>A}),K({strict:!0,createInternalComparator:()=>A}),K({circular:!0,createInternalComparator:()=>A}),K({circular:!0,createInternalComparator:()=>A,strict:!0});var W=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],X=class t{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(219!==r)throw new Error("Data does not appear to be in a KDBush format.");const s=n>>4;if(1!==s)throw new Error(`Got v${s} data when expected v1.`);const o=W[15&n];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new t(a,i,o,e)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=W.indexOf(this.ArrayType),o=2*t*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+o+i+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+s]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this,a=[0,s.length-1,0],c=[];for(;a.length;){const l=a.pop()||0,u=a.pop()||0,h=a.pop()||0;if(u-h<=i){for(let i=h;i<=u;i++){const a=o[2*i],l=o[2*i+1];a>=t&&a<=r&&l>=e&&l<=n&&c.push(s[i])}continue}const p=h+u>>1,d=o[2*p],f=o[2*p+1];d>=t&&d<=r&&f>=e&&f<=n&&c.push(s[p]),(0===l?t<=d:e<=f)&&(a.push(h),a.push(p-1),a.push(1-l)),(0===l?r>=d:n>=f)&&(a.push(p+1),a.push(u),a.push(1-l))}return c}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:s,nodeSize:o}=this,i=[0,n.length-1,0],a=[],c=r*r;for(;i.length;){const l=i.pop()||0,u=i.pop()||0,h=i.pop()||0;if(u-h<=o){for(let r=h;r<=u;r++)tt(s[2*r],s[2*r+1],t,e)<=c&&a.push(n[r]);continue}const p=h+u>>1,d=s[2*p],f=s[2*p+1];tt(d,f,t,e)<=c&&a.push(n[p]),(0===l?t-r<=d:e-r<=f)&&(i.push(h),i.push(p-1),i.push(1-l)),(0===l?t+r>=d:e+r>=f)&&(i.push(p+1),i.push(u),i.push(1-l))}return a}};function J(t,e,r,n,s,o){if(s-n<=r)return;const i=n+s>>1;Y(t,e,i,n,s,o),J(t,e,r,n,i-1,1-o),J(t,e,r,i+1,s,1-o)}function Y(t,e,r,n,s,o){for(;s>n;){if(s-n>600){const i=s-n+1,a=r-n+1,c=Math.log(i),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(i-l)/i)*(a-i/2<0?-1:1);Y(t,e,r,Math.max(n,Math.floor(r-a*l/i+u)),Math.min(s,Math.floor(r+(i-a)*l/i+u)),o)}const i=e[2*r+o];let a=n,c=s;for(H(t,e,n,r),e[2*s+o]>i&&H(t,e,n,s);a<c;){for(H(t,e,a,c),a++,c--;e[2*a+o]<i;)a++;for(;e[2*c+o]>i;)c--}e[2*n+o]===i?H(t,e,n,c):(c++,H(t,e,c,s)),c<=r&&(n=c+1),r<=c&&(s=c-1)}}function H(t,e,r,n){Q(t,r,n),Q(e,2*r,2*n),Q(e,2*r+1,2*n+1)}function Q(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function tt(t,e,r,n){const s=t-r,o=e-n;return s*s+o*o}var et,rt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},nt=Math.fround||(et=new Float32Array(1),t=>(et[0]=+t,et[0])),st=class{constructor(t){this.options=Object.assign(Object.create(rt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const s=`prepare ${t.length} points`;e&&console.time(s),this.points=t;const o=[];for(let a=0;a<t.length;a++){const e=t[a];if(!e.geometry)continue;const[r,n]=e.geometry.coordinates,s=nt(at(r)),i=nt(ct(n));o.push(s,i,1/0,a,-1,1),this.options.reduce&&o.push(0)}let i=this.trees[n+1]=this._createTree(o);e&&console.timeEnd(s);for(let a=n;a>=r;a--){const t=+Date.now();i=this.trees[a]=this._createTree(this._cluster(i,a)),e&&console.log("z%d: %d clusters in %dms",a,i.numItems,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let s=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const t=this.getClusters([r,n,180,o],e),i=this.getClusters([-180,n,s,o],e);return t.concat(i)}const i=this.trees[this._limitZoom(e)],a=i.range(at(r),ct(o),at(s),ct(n)),c=i.data,l=[];for(const u of a){const t=this.stride*u;l.push(c[t+5]>1?ot(c,t,this.clusterProps):this.points[c[t+3]])}return l}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(n);const o=s.data;if(e*this.stride>=o.length)throw new Error(n);const i=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=o[e*this.stride],c=o[e*this.stride+1],l=s.within(a,c,i),u=[];for(const h of l){const e=h*this.stride;o[e+4]===t&&u.push(o[e+5]>1?ot(o,e,this.clusterProps):this.points[o[e+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:o,radius:i}=this.options,a=i/o,c=(r-a)/s,l=(r+1+a)/s,u={features:[]};return this._addTileFeatures(n.range((e-a)/s,c,(e+1+a)/s,l),n.data,e,r,s,u),0===e&&this._addTileFeatures(n.range(1-a/s,c,1,l),n.data,s,r,s,u),e===s-1&&this._addTileFeatures(n.range(0,c,a/s,l),n.data,-1,r,s,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,s){const o=this.getChildren(e);for(const i of o){const e=i.properties;if(e&&e.cluster?s+e.point_count<=n?s+=e.point_count:s=this._appendLeaves(t,e.cluster_id,r,n,s):s<n?s++:t.push(i),t.length===r)break}return s}_createTree(t){const e=new X(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,s,o){for(const i of t){const t=i*this.stride,a=e[t+5]>1;let c,l,u;if(a)c=it(e,t,this.clusterProps),l=e[t],u=e[t+1];else{const r=this.points[e[t+3]];c=r.properties;const[n,s]=r.geometry.coordinates;l=at(n),u=ct(s)}const h={type:1,geometry:[[Math.round(this.options.extent*(l*s-r)),Math.round(this.options.extent*(u*s-n))]],tags:c};let p;p=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(h.id=p),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:s,minPoints:o}=this.options,i=r/(n*Math.pow(2,e)),a=t.data,c=[],l=this.stride;for(let u=0;u<a.length;u+=l){if(a[u+2]<=e)continue;a[u+2]=e;const r=a[u],n=a[u+1],h=t.within(a[u],a[u+1],i),p=a[u+5];let d=p;for(const t of h){const r=t*l;a[r+2]>e&&(d+=a[r+5])}if(d>p&&d>=o){let t,o=r*p,i=n*p,f=-1;const m=(u/l<<5)+(e+1)+this.points.length;for(const r of h){const n=r*l;if(a[n+2]<=e)continue;a[n+2]=e;const c=a[n+5];o+=a[n]*c,i+=a[n+1]*c,a[n+4]=m,s&&(t||(t=this._map(a,u,!0),f=this.clusterProps.length,this.clusterProps.push(t)),s(t,this._map(a,n)))}a[u+4]=m,c.push(o/d,i/d,1/0,m,-1,d),s&&c.push(f)}else{for(let t=0;t<l;t++)c.push(a[u+t]);if(d>1)for(const t of h){const r=t*l;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<l;t++)c.push(a[r+t])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return r?Object.assign({},n):n}const n=this.points[t[e+3]].properties,s=this.options.map(n);return r&&s===n?Object.assign({},s):s}};function ot(t,e,r){return{type:"Feature",id:t[e+3],properties:it(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),lt(t[e+1])]}};var n}function it(t,e,r){const n=t[e+5],s=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+6],i=-1===o?{}:Object.assign({},r[o]);return Object.assign(i,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:s})}function at(t){return t/360+.5}function ct(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function lt(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var ut=class{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}},ht=class{constructor({markers:t,position:e}){this.markers=[],t&&(this.markers=t),e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(ut.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>ut.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(ut.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}};function pt(t,e="assertion failed"){if(null==t)throw Error(e)}var dt,ft=class{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return mt(t)}},mt=t=>t.map(t=>new ht({position:ut.getPosition(t),markers:[t]})),gt=class extends ft{constructor(t){var{maxZoom:e,radius:r=60}=t,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]])}return r}(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new st(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(t){let e=!1,r=t.map.getZoom();pt(r),r=Math.round(r);const n={zoom:r};if(!G(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map(t=>{const e=ut.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!G(this.state,n)),this.state=n,0===t.markers.length?(this.clusters=[],{clusters:this.clusters,changed:e}):(e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e})}cluster({map:t}){const e=t.getZoom();return pt(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new ht({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});const n=r.marker;return new ht({markers:[n],position:ut.getPosition(n)})}},yt=class{constructor(t,e){this.markers={sum:t.length};const r=e.map(t=>t.count),n=r.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}},bt=class{render({count:t,position:e},r,n){const s=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,o=`Cluster of ${t} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+t;if(ut.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const r={map:n,position:e,zIndex:i,title:o,content:t};return new google.maps.marker.AdvancedMarkerElement(r)}const a={position:e,zIndex:i,title:o,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}},wt=class t{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}};!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(dt||(dt={}));var xt=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)},kt=class extends wt{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:n=new gt(r),renderer:s=new bt,onClusterClick:o=xt}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(t=>{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(ut.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach(t=>{r=this.removeMarker(t,!0)||r}),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,dt.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=/* @__PURE__ */new Set;for(const n of e)1==n.markers.length&&t.add(n.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||ut.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>r.forEach(t=>ut.setMap(t,null)))}google.maps.event.trigger(this,dt.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();pt(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>ut.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new yt(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach(t=>ut.setMap(t,null)),this.onClusterClick){const t=ut.isAdvancedMarker(r.marker)?dt.GMP_CLICK:dt.CLUSTER_CLICK;r.marker.addListener(t,t=>{google.maps.event.trigger(this,dt.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)})}ut.setMap(r.marker,e)})}},Et={top:60,bottom:60,left:276,right:60},vt="#fb8500",Mt=new h,At=(t,e,r)=>{i(/* @__PURE__ */u(s,{client:Mt,children:/* @__PURE__ */u(c,{children:/* @__PURE__ */u(p,{event:t,onExplore:r})})}),e)},Ct=t=>{const e=document.createElement("div");e.style.cssText=`\n background:${g(t.color,"#fb8500")};color:#fff;border-radius:20px;padding:5px 10px;\n font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;\n box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);\n display:inline-flex;align-items:center;gap:6px;\n `;const r=document.createElement("span");r.textContent=t.folder.name;const n=document.createElement("span");return n.style.cssText="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;",n.textContent=String(t.eventCount),e.appendChild(r),e.appendChild(n),e},_t=(t,e)=>{const r=document.createElement("div");if(r.style.cssText=`\n width:36px;height:36px;cursor:pointer;\n background:${t};border-radius:50% 50% 50% 0;transform:rotate(-45deg);\n border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);\n display:flex;align-items:center;justify-content:center;overflow:hidden;\n `,e){const t=document.createElement("img");t.src=d(e)??"",t.style.cssText="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);",r.appendChild(t)}return r},jt=({apiKey:s,onExplore:i,logoUrl:c})=>{const h=e(null),p=e(null),d=e(null),g=e(null),b=e([]),w=e([]),x=e(null),k=e(null),E=e(!1),v=e(!1),M=l(()=>(()=>{try{const t=sessionStorage.getItem(n);if(!t)return null;const e=JSON.parse(t);if(Array.isArray(e?.center)&&"number"==typeof e.zoom)return e}catch{}return null})(),[]),[A,C]=r(!1),[_,j]=r(!0),{folderTree:L,activeFolderId:I,activeFolder:O,visibleEvents:q,setActiveFolderId:T,isLoadingEvents:P}=m(),{organization:S}=a(),z=()=>{b.current.forEach(t=>{t.map=null}),b.current=[]},U=()=>{x.current&&(x.current.clearMarkers(),x.current=null),w.current.forEach(t=>{t.map=null}),w.current=[]};return t(()=>{if(!h.current||p.current)return;let t=!1;return(async()=>{try{const{setOptions:e,importLibrary:r}=await import("./DWXBt4gg.js");if(t)return;if(e({key:s,v:"weekly"}),await Promise.all([r("maps"),r("marker"),r("visualization")]),t||!h.current)return;const o=window.google.maps;d.current=o;const i=M?.center?{lng:M.center[0],lat:M.center[1]}:{lat:20,lng:0},a=M?.zoom??3,c=new o.Map(h.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:i,zoom:a,mapTypeControl:!1,streetViewControl:!1});p.current=c,g.current=new o.InfoWindow({maxWidth:280}),k.current=new o.visualization.HeatmapLayer({data:[],map:null,radius:30,opacity:.8});const l=()=>{try{const t=c.getCenter();if(!t)return;sessionStorage.setItem(n,JSON.stringify({center:[t.lng(),t.lat()],zoom:c.getZoom()}))}catch{}};c.addListener("idle",l),j(!1),C(!0)}finally{t||j(!1)}})(),()=>{t=!0,z(),U(),k.current&&(k.current.setMap(null),k.current=null),g.current?.close(),p.current=null,d.current=null}},[s]),t(()=>{if(!A)return;const t=p.current,e=d.current;if(t&&e)if(z(),U(),g.current?.close(),null===I&&L.length>0){k.current?.setMap(null);const r=n=>{for(const s of n)if(s.centroid){const r=Ct(s),n=new e.marker.AdvancedMarkerElement({map:t,position:{lng:s.centroid[0],lat:s.centroid[1]},content:r,gmpClickable:!0});n.addListener("click",()=>T(s.folder._id)),b.current.push(n)}else s.children.length>0&&r(s.children)};r(L)}else{const r=0===L.length&&null===I;if(0===q.length)return;if(r){const r=[],n=q.map(n=>{const s=n.location.y,o=n.location.x;r.push({location:new e.LatLng(s,o),weight:(n.views||0)+1});const a=_t(vt,c),l=new e.marker.AdvancedMarkerElement({map:t,position:{lat:s,lng:o},content:a,gmpClickable:!0});return l.addListener("click",()=>{const e=document.createElement("div");At(n,e,i),g.current.close(),g.current.setContent(e),g.current.open({anchor:l,map:t})}),l});if(w.current=n,x.current=new kt({markers:n,map:t,renderer:{render:({count:t,position:r})=>{const n=document.createElement("div"),s=t<10?28:t<30?34:40;return n.style.cssText=`\n width:${s}px;height:${s}px;border-radius:50%;cursor:pointer;\n background:${vt};color:#fff;\n display:flex;align-items:center;justify-content:center;\n font-size:13px;font-weight:700;\n box-shadow:0 2px 8px rgba(0,0,0,0.3);\n border:2px solid rgba(255,255,255,0.6);\n `,n.textContent=String(t),new e.marker.AdvancedMarkerElement({position:r,content:n,gmpClickable:!0,zIndex:Number(e.Marker?.MAX_ZINDEX??0)+t})}}}),k.current&&(k.current.setData(r),k.current.setMap(t)),!v.current&&(v.current=!0,!M)){const r=new e.LatLngBounds;q.forEach(t=>r.extend({lat:t.location.y,lng:t.location.x})),r.isEmpty()||t.fitBounds(r,Et)}}else{k.current?.setMap(null);const r=O?.color||vt,n=new e.LatLngBounds;q.forEach(s=>{const o=s.location.y,a=s.location.x;n.extend({lat:o,lng:a});const l=_t(r,c),u=new e.marker.AdvancedMarkerElement({map:t,position:{lat:o,lng:a},content:l,gmpClickable:!0});u.addListener("click",()=>{const e=document.createElement("div");At(s,e,i),g.current.close(),g.current.setContent(e),g.current.open({anchor:u,map:t})}),w.current.push(u)})}}},[I,L,q,A,i,c,T,O,M]),t(()=>{if(!A)return;const t=p.current,e=d.current;if(t&&e)if(E.current||!M){if(E.current=!0,I){const r=f(L,I);if(!r?.folder.boundary?.length)return;const n=new e.LatLngBounds;for(const t of r.folder.boundary)n.extend({lat:t.y,lng:t.x});n.isEmpty()||t.fitBounds(n,{...Et,maxZoom:14})}else if(L.length>0){const r=new e.LatLngBounds,n=t=>{for(const e of t)e.centroid?r.extend({lng:e.centroid[0],lat:e.centroid[1]}):n(e.children)};n(L),r.isEmpty()||t.fitBounds(r,{...Et,maxZoom:8})}}else E.current=!0},[I,L,A,M]),/* @__PURE__ */u("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:o(S),children:[
|
|
1
|
+
import{At as t,Ct as e,Et as r,V as n,et as s,g as o,jt as i,p as a,r as c,wt as l,y as u}from"./BA-rmyyP.js";import{t as h}from"./BSqusAcm.js";import{a as p,i as d,n as f,o as m,r as g,t as y}from"./BJuTpMwr.js";var{getOwnPropertyNames:b,getOwnPropertySymbols:w}=Object,{hasOwnProperty:x}=Object.prototype;function k(t,e){return function(r,n,s){return t(r,n,s)&&e(r,n,s)}}function E(t){return function(e,r,n){if(!e||!r||"object"!=typeof e||"object"!=typeof r)return t(e,r,n);const{cache:s}=n,o=s.get(e),i=s.get(r);if(o&&i)return o===r&&i===e;s.set(e,r),s.set(r,e);const a=t(e,r,n);return s.delete(e),s.delete(r),a}}function v(t){return b(t).concat(w(t))}var M=Object.hasOwn||((t,e)=>x.call(t,e));function A(t,e){return t===e||!t&&!e&&t!=t&&e!=e}var{getOwnPropertyDescriptor:C,keys:_}=Object;function j(t,e){return t.byteLength===e.byteLength&&N(new Uint8Array(t),new Uint8Array(e))}function L(t,e,r){let n=t.length;if(e.length!==n)return!1;for(;n-- >0;)if(!r.equals(t[n],e[n],n,n,t,e,r))return!1;return!0}function I(t,e){return t.byteLength===e.byteLength&&N(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}function O(t,e){return A(t.getTime(),e.getTime())}function q(t,e){return t.name===e.name&&t.message===e.message&&t.cause===e.cause&&t.stack===e.stack}function T(t,e){return t===e}function P(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.entries();let i,a,c=0;for(;(i=o.next())&&!i.done;){const n=e.entries();let o=!1,l=0;for(;(a=n.next())&&!a.done;){if(s[l]){l++;continue}const n=i.value,u=a.value;if(r.equals(n[0],u[0],c,l,t,e,r)&&r.equals(n[1],u[1],n[0],u[0],t,e,r)){o=s[l]=!0;break}l++}if(!o)return!1;c++}return!0}var S=A;function z(t,e,r){const n=_(t);let s=n.length;if(_(e).length!==s)return!1;for(;s-- >0;)if(!$(t,e,r,n[s]))return!1;return!0}function U(t,e,r){const n=v(t);let s,o,i,a=n.length;if(v(e).length!==a)return!1;for(;a-- >0;){if(s=n[a],!$(t,e,r,s))return!1;if(o=C(t,s),i=C(e,s),(o||i)&&(!o||!i||o.configurable!==i.configurable||o.enumerable!==i.enumerable||o.writable!==i.writable))return!1}return!0}function Z(t,e){return A(t.valueOf(),e.valueOf())}function B(t,e){return t.source===e.source&&t.flags===e.flags}function F(t,e,r){const n=t.size;if(n!==e.size)return!1;if(!n)return!0;const s=new Array(n),o=t.values();let i,a;for(;(i=o.next())&&!i.done;){const n=e.values();let o=!1,c=0;for(;(a=n.next())&&!a.done;){if(!s[c]&&r.equals(i.value,a.value,i.value,a.value,t,e,r)){o=s[c]=!0;break}c++}if(!o)return!1}return!0}function N(t,e){let r=t.byteLength;if(e.byteLength!==r||t.byteOffset!==e.byteOffset)return!1;for(;r-- >0;)if(t[r]!==e[r])return!1;return!0}function D(t,e){return t.hostname===e.hostname&&t.pathname===e.pathname&&t.protocol===e.protocol&&t.port===e.port&&t.hash===e.hash&&t.username===e.username&&t.password===e.password}function $(t,e,r,n){return!("_owner"!==n&&"__o"!==n&&"__v"!==n||!t.$$typeof&&!e.$$typeof)||M(e,n)&&r.equals(t[n],e[n],n,n,t,e,r)}var R={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},V=Object.prototype.toString;var G=K();function K(t={}){const{circular:e=!1,createInternalComparator:r,createState:n,strict:s=!1}=t,o=function({areArrayBuffersEqual:t,areArraysEqual:e,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:s,areFunctionsEqual:o,areMapsEqual:i,areNumbersEqual:a,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:h,areTypedArraysEqual:p,areUrlsEqual:d,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;const b=typeof m;if(b!==typeof g)return!1;if("object"!==b)return"number"===b?a(m,g,y):"function"===b&&o(m,g,y);const w=m.constructor;if(w!==g.constructor)return!1;if(w===Object)return c(m,g,y);if(Array.isArray(m))return e(m,g,y);if(w===Date)return n(m,g,y);if(w===RegExp)return u(m,g,y);if(w===Map)return i(m,g,y);if(w===Set)return h(m,g,y);const x=V.call(m);if("[object Date]"===x)return n(m,g,y);if("[object RegExp]"===x)return u(m,g,y);if("[object Map]"===x)return i(m,g,y);if("[object Set]"===x)return h(m,g,y);if("[object Object]"===x)return"function"!=typeof m.then&&"function"!=typeof g.then&&c(m,g,y);if("[object URL]"===x)return d(m,g,y);if("[object Error]"===x)return s(m,g,y);if("[object Arguments]"===x)return c(m,g,y);if(R[x])return p(m,g,y);if("[object ArrayBuffer]"===x)return t(m,g,y);if("[object DataView]"===x)return r(m,g,y);if("[object Boolean]"===x||"[object Number]"===x||"[object String]"===x)return l(m,g,y);if(f){let t=f[x];if(!t){const e=null!=(k=m)?k[Symbol.toStringTag]:void 0;e&&(t=f[e])}if(t)return t(m,g,y)}var k;return!1}}(function({circular:t,createCustomConfig:e,strict:r}){let n={areArrayBuffersEqual:j,areArraysEqual:r?U:L,areDataViewsEqual:I,areDatesEqual:O,areErrorsEqual:q,areFunctionsEqual:T,areMapsEqual:r?k(P,U):P,areNumbersEqual:S,areObjectsEqual:r?U:z,arePrimitiveWrappersEqual:Z,areRegExpsEqual:B,areSetsEqual:r?k(F,U):F,areTypedArraysEqual:r?k(N,U):N,areUrlsEqual:D,unknownTagComparators:void 0};if(e&&(n=Object.assign({},n,e(n))),t){const t=E(n.areArraysEqual),e=E(n.areMapsEqual),r=E(n.areObjectsEqual),s=E(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:t,areMapsEqual:e,areObjectsEqual:r,areSetsEqual:s})}return n}(t));return function({circular:t,comparator:e,createState:r,equals:n,strict:s}){if(r)return function(o,i){const{cache:a=(t?/* @__PURE__ */new WeakMap:void 0),meta:c}=r();return e(o,i,{cache:a,equals:n,meta:c,strict:s})};if(t)return function(t,r){return e(t,r,{cache:/* @__PURE__ */new WeakMap,equals:n,meta:void 0,strict:s})};const o={cache:void 0,equals:n,meta:void 0,strict:s};return function(t,r){return e(t,r,o)}}({circular:e,comparator:o,createState:n,equals:r?r(o):(i=o,function(t,e,r,n,s,o,a){return i(t,e,a)}),strict:s});var i}K({strict:!0}),K({circular:!0}),K({circular:!0,strict:!0}),K({createInternalComparator:()=>A}),K({strict:!0,createInternalComparator:()=>A}),K({circular:!0,createInternalComparator:()=>A}),K({circular:!0,createInternalComparator:()=>A,strict:!0});var W=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],X=class t{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[r,n]=new Uint8Array(e,0,2);if(219!==r)throw new Error("Data does not appear to be in a KDBush format.");const s=n>>4;if(1!==s)throw new Error(`Got v${s} data when expected v1.`);const o=W[15&n];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new t(a,i,o,e)}constructor(t,e=64,r=Float64Array,n){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=r,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const s=W.indexOf(this.ArrayType),o=2*t*this.ArrayType.BYTES_PER_ELEMENT,i=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-i%8)%8;if(s<0)throw new Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+o+i+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+i+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+s]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=t,this.coords[this._pos++]=e,r}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return J(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,r,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:s,coords:o,nodeSize:i}=this,a=[0,s.length-1,0],c=[];for(;a.length;){const l=a.pop()||0,u=a.pop()||0,h=a.pop()||0;if(u-h<=i){for(let i=h;i<=u;i++){const a=o[2*i],l=o[2*i+1];a>=t&&a<=r&&l>=e&&l<=n&&c.push(s[i])}continue}const p=h+u>>1,d=o[2*p],f=o[2*p+1];d>=t&&d<=r&&f>=e&&f<=n&&c.push(s[p]),(0===l?t<=d:e<=f)&&(a.push(h),a.push(p-1),a.push(1-l)),(0===l?r>=d:n>=f)&&(a.push(p+1),a.push(u),a.push(1-l))}return c}within(t,e,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:n,coords:s,nodeSize:o}=this,i=[0,n.length-1,0],a=[],c=r*r;for(;i.length;){const l=i.pop()||0,u=i.pop()||0,h=i.pop()||0;if(u-h<=o){for(let r=h;r<=u;r++)tt(s[2*r],s[2*r+1],t,e)<=c&&a.push(n[r]);continue}const p=h+u>>1,d=s[2*p],f=s[2*p+1];tt(d,f,t,e)<=c&&a.push(n[p]),(0===l?t-r<=d:e-r<=f)&&(i.push(h),i.push(p-1),i.push(1-l)),(0===l?t+r>=d:e+r>=f)&&(i.push(p+1),i.push(u),i.push(1-l))}return a}};function J(t,e,r,n,s,o){if(s-n<=r)return;const i=n+s>>1;Y(t,e,i,n,s,o),J(t,e,r,n,i-1,1-o),J(t,e,r,i+1,s,1-o)}function Y(t,e,r,n,s,o){for(;s>n;){if(s-n>600){const i=s-n+1,a=r-n+1,c=Math.log(i),l=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*l*(i-l)/i)*(a-i/2<0?-1:1);Y(t,e,r,Math.max(n,Math.floor(r-a*l/i+u)),Math.min(s,Math.floor(r+(i-a)*l/i+u)),o)}const i=e[2*r+o];let a=n,c=s;for(H(t,e,n,r),e[2*s+o]>i&&H(t,e,n,s);a<c;){for(H(t,e,a,c),a++,c--;e[2*a+o]<i;)a++;for(;e[2*c+o]>i;)c--}e[2*n+o]===i?H(t,e,n,c):(c++,H(t,e,c,s)),c<=r&&(n=c+1),r<=c&&(s=c-1)}}function H(t,e,r,n){Q(t,r,n),Q(e,2*r,2*n),Q(e,2*r+1,2*n+1)}function Q(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function tt(t,e,r,n){const s=t-r,o=e-n;return s*s+o*o}var et,rt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},nt=Math.fround||(et=new Float32Array(1),t=>(et[0]=+t,et[0])),st=class{constructor(t){this.options=Object.assign(Object.create(rt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:r,maxZoom:n}=this.options;e&&console.time("total time");const s=`prepare ${t.length} points`;e&&console.time(s),this.points=t;const o=[];for(let a=0;a<t.length;a++){const e=t[a];if(!e.geometry)continue;const[r,n]=e.geometry.coordinates,s=nt(at(r)),i=nt(ct(n));o.push(s,i,1/0,a,-1,1),this.options.reduce&&o.push(0)}let i=this.trees[n+1]=this._createTree(o);e&&console.timeEnd(s);for(let a=n;a>=r;a--){const t=+Date.now();i=this.trees[a]=this._createTree(this._cluster(i,a)),e&&console.log("z%d: %d clusters in %dms",a,i.numItems,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let r=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let s=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,s=180;else if(r>s){const t=this.getClusters([r,n,180,o],e),i=this.getClusters([-180,n,s,o],e);return t.concat(i)}const i=this.trees[this._limitZoom(e)],a=i.range(at(r),ct(o),at(s),ct(n)),c=i.data,l=[];for(const u of a){const t=this.stride*u;l.push(c[t+5]>1?ot(c,t,this.clusterProps):this.points[c[t+3]])}return l}getChildren(t){const e=this._getOriginId(t),r=this._getOriginZoom(t),n="No cluster with the specified id.",s=this.trees[r];if(!s)throw new Error(n);const o=s.data;if(e*this.stride>=o.length)throw new Error(n);const i=this.options.radius/(this.options.extent*Math.pow(2,r-1)),a=o[e*this.stride],c=o[e*this.stride+1],l=s.within(a,c,i),u=[];for(const h of l){const e=h*this.stride;o[e+4]===t&&u.push(o[e+5]>1?ot(o,e,this.clusterProps):this.points[o[e+3]])}if(0===u.length)throw new Error(n);return u}getLeaves(t,e,r){e=e||10,r=r||0;const n=[];return this._appendLeaves(n,t,e,r,0),n}getTile(t,e,r){const n=this.trees[this._limitZoom(t)],s=Math.pow(2,t),{extent:o,radius:i}=this.options,a=i/o,c=(r-a)/s,l=(r+1+a)/s,u={features:[]};return this._addTileFeatures(n.range((e-a)/s,c,(e+1+a)/s,l),n.data,e,r,s,u),0===e&&this._addTileFeatures(n.range(1-a/s,c,1,l),n.data,s,r,s,u),e===s-1&&this._addTileFeatures(n.range(0,c,a/s,l),n.data,-1,r,s,u),u.features.length?u:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e}_appendLeaves(t,e,r,n,s){const o=this.getChildren(e);for(const i of o){const e=i.properties;if(e&&e.cluster?s+e.point_count<=n?s+=e.point_count:s=this._appendLeaves(t,e.cluster_id,r,n,s):s<n?s++:t.push(i),t.length===r)break}return s}_createTree(t){const e=new X(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<t.length;r+=this.stride)e.add(t[r],t[r+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,r,n,s,o){for(const i of t){const t=i*this.stride,a=e[t+5]>1;let c,l,u;if(a)c=it(e,t,this.clusterProps),l=e[t],u=e[t+1];else{const r=this.points[e[t+3]];c=r.properties;const[n,s]=r.geometry.coordinates;l=at(n),u=ct(s)}const h={type:1,geometry:[[Math.round(this.options.extent*(l*s-r)),Math.round(this.options.extent*(u*s-n))]],tags:c};let p;p=a||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(h.id=p),o.features.push(h)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:r,extent:n,reduce:s,minPoints:o}=this.options,i=r/(n*Math.pow(2,e)),a=t.data,c=[],l=this.stride;for(let u=0;u<a.length;u+=l){if(a[u+2]<=e)continue;a[u+2]=e;const r=a[u],n=a[u+1],h=t.within(a[u],a[u+1],i),p=a[u+5];let d=p;for(const t of h){const r=t*l;a[r+2]>e&&(d+=a[r+5])}if(d>p&&d>=o){let t,o=r*p,i=n*p,f=-1;const m=(u/l<<5)+(e+1)+this.points.length;for(const r of h){const n=r*l;if(a[n+2]<=e)continue;a[n+2]=e;const c=a[n+5];o+=a[n]*c,i+=a[n+1]*c,a[n+4]=m,s&&(t||(t=this._map(a,u,!0),f=this.clusterProps.length,this.clusterProps.push(t)),s(t,this._map(a,n)))}a[u+4]=m,c.push(o/d,i/d,1/0,m,-1,d),s&&c.push(f)}else{for(let t=0;t<l;t++)c.push(a[u+t]);if(d>1)for(const t of h){const r=t*l;if(!(a[r+2]<=e)){a[r+2]=e;for(let t=0;t<l;t++)c.push(a[r+t])}}}}return c}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,r){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return r?Object.assign({},n):n}const n=this.points[t[e+3]].properties,s=this.options.map(n);return r&&s===n?Object.assign({},s):s}};function ot(t,e,r){return{type:"Feature",id:t[e+3],properties:it(t,e,r),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),lt(t[e+1])]}};var n}function it(t,e,r){const n=t[e+5],s=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+6],i=-1===o?{}:Object.assign({},r[o]);return Object.assign(i,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:s})}function at(t){return t/360+.5}function ct(t){const e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function lt(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var ut=class{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(Number.isFinite(t.position.lat)&&Number.isFinite(t.position.lng))return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}},ht=class{constructor({markers:t,position:e}){this.markers=[],t&&(this.markers=t),e&&(e instanceof google.maps.LatLng?this._position=e:this._position=new google.maps.LatLng(e))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(ut.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter(t=>ut.getVisible(t)).length}push(t){this.markers.push(t)}delete(){this.marker&&(ut.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}};function pt(t,e="assertion failed"){if(null==t)throw Error(e)}var dt,ft=class{constructor({maxZoom:t=16}){this.maxZoom=t}noop({markers:t}){return mt(t)}},mt=t=>t.map(t=>new ht({position:ut.getPosition(t),markers:[t]})),gt=class extends ft{constructor(t){var{maxZoom:e,radius:r=60}=t,n=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]])}return r}(t,["maxZoom","radius"]);super({maxZoom:e}),this.markers=[],this.clusters=[],this.state={zoom:-1},this.superCluster=new st(Object.assign({maxZoom:this.maxZoom,radius:r},n))}calculate(t){let e=!1,r=t.map.getZoom();pt(r),r=Math.round(r);const n={zoom:r};if(!G(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map(t=>{const e=ut.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}});this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(e=!G(this.state,n)),this.state=n,0===t.markers.length?(this.clusters=[],{clusters:this.clusters,changed:e}):(e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e})}cluster({map:t}){const e=t.getZoom();return pt(e),this.superCluster.getClusters([-180,-90,180,90],Math.round(e)).map(t=>this.transformCluster(t))}transformCluster({geometry:{coordinates:[t,e]},properties:r}){if(r.cluster)return new ht({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map(t=>t.properties.marker),position:{lat:e,lng:t}});const n=r.marker;return new ht({markers:[n],position:ut.getPosition(n)})}},yt=class{constructor(t,e){this.markers={sum:t.length};const r=e.map(t=>t.count),n=r.reduce((t,e)=>t+e,0);this.clusters={count:e.length,markers:{mean:n/e.length,sum:n,min:Math.min(...r),max:Math.max(...r)}}}},bt=class{render({count:t,position:e},r,n){const s=`<svg fill="${t>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${t}</text>\n</svg>`,o=`Cluster of ${t} markers`,i=Number(google.maps.Marker.MAX_ZINDEX)+t;if(ut.isAdvancedMarkerAvailable(n)){const t=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const r={map:n,position:e,zIndex:i,title:o,content:t};return new google.maps.marker.AdvancedMarkerElement(r)}const a={position:e,zIndex:i,title:o,icon:{url:`data:image/svg+xml;base64,${btoa(s)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(a)}},wt=class t{constructor(){!function(t,e){for(let r in e.prototype)t.prototype[r]=e.prototype[r]}(t,google.maps.OverlayView)}};!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click",t.GMP_CLICK="gmp-click"}(dt||(dt={}));var xt=(t,e,r)=>{e.bounds&&r.fitBounds(e.bounds)},kt=class extends wt{constructor({map:t,markers:e=[],algorithmOptions:r={},algorithm:n=new gt(r),renderer:s=new bt,onClusterClick:o=xt}){super(),this.map=null,this.idleListener=null,this.markers=[...e],this.clusters=[],this.algorithm=n,this.renderer=s,this.onClusterClick=o,t&&this.setMap(t)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach(t=>{this.addMarker(t,!0)}),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(ut.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let r=!1;return t.forEach(t=>{r=this.removeMarker(t,!0)||r}),r&&!e&&this.render(),r}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,dt.CLUSTERING_BEGIN,this);const{clusters:e,changed:r}=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()});if(r||null==r){const t=/* @__PURE__ */new Set;for(const n of e)1==n.markers.length&&t.add(n.markers[0]);const r=[];for(const e of this.clusters)null!=e.marker&&(1==e.markers.length?t.has(e.marker)||ut.setMap(e.marker,null):r.push(e.marker));this.clusters=e,this.renderClusters(),requestAnimationFrame(()=>r.forEach(t=>ut.setMap(t,null)))}google.maps.event.trigger(this,dt.CLUSTERING_END,this)}}onAdd(){const t=this.getMap();pt(t),this.idleListener=t.addListener("idle",this.render.bind(this)),this.render()}onRemove(){this.idleListener&&google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach(t=>ut.setMap(t,null)),this.clusters.forEach(t=>t.delete()),this.clusters=[]}renderClusters(){const t=new yt(this.markers,this.clusters),e=this.getMap();this.clusters.forEach(r=>{if(1===r.markers.length)r.marker=r.markers[0];else if(r.marker=this.renderer.render(r,t,e),r.markers.forEach(t=>ut.setMap(t,null)),this.onClusterClick){const t=ut.isAdvancedMarker(r.marker)?dt.GMP_CLICK:dt.CLUSTER_CLICK;r.marker.addListener(t,t=>{google.maps.event.trigger(this,dt.CLUSTER_CLICK,r),this.onClusterClick(t,r,e)})}ut.setMap(r.marker,e)})}},Et={top:60,bottom:60,left:276,right:60},vt="#fb8500",Mt=new h,At=(t,e,r)=>{i(/* @__PURE__ */u(s,{client:Mt,children:/* @__PURE__ */u(c,{children:/* @__PURE__ */u(p,{event:t,onExplore:r})})}),e)},Ct=t=>{const e=document.createElement("div");e.style.cssText=`\n background:${g(t.color,"#fb8500")};color:#fff;border-radius:20px;padding:5px 10px;\n font-size:12px;font-weight:600;white-space:nowrap;cursor:pointer;\n box-shadow:0 2px 8px rgba(0,0,0,0.25);border:2px solid rgba(255,255,255,0.4);\n display:inline-flex;align-items:center;gap:6px;\n `;const r=document.createElement("span");r.textContent=t.folder.name;const n=document.createElement("span");return n.style.cssText="background:rgba(0,0,0,0.18);border-radius:10px;padding:1px 5px;font-size:10px;",n.textContent=String(t.eventCount),e.appendChild(r),e.appendChild(n),e},_t=(t,e)=>{const r=document.createElement("div");if(r.style.cssText=`\n width:36px;height:36px;cursor:pointer;\n background:${t};border-radius:50% 50% 50% 0;transform:rotate(-45deg);\n border:2px solid white;box-shadow:0 2px 8px rgba(0,0,0,0.3);\n display:flex;align-items:center;justify-content:center;overflow:hidden;\n `,e){const t=document.createElement("img");t.src=d(e)??"",t.style.cssText="width:24px;height:24px;border-radius:50%;object-fit:cover;transform:rotate(45deg);",r.appendChild(t)}return r},jt=({apiKey:s,onExplore:i,logoUrl:c})=>{const h=e(null),p=e(null),d=e(null),g=e(null),b=e([]),w=e([]),x=e(null),k=e(null),E=e(!1),v=e(!1),M=l(()=>(()=>{try{const t=sessionStorage.getItem(n);if(!t)return null;const e=JSON.parse(t);if(Array.isArray(e?.center)&&"number"==typeof e.zoom)return e}catch{}return null})(),[]),[A,C]=r(!1),[_,j]=r(!0),{folderTree:L,activeFolderId:I,activeFolder:O,visibleEvents:q,setActiveFolderId:T,isLoadingEvents:P}=m(),{organization:S}=a(),z=()=>{b.current.forEach(t=>{t.map=null}),b.current=[]},U=()=>{x.current&&(x.current.clearMarkers(),x.current=null),w.current.forEach(t=>{t.map=null}),w.current=[]};return t(()=>{if(!h.current||p.current)return;let t=!1;return(async()=>{try{const{setOptions:e,importLibrary:r}=await import("./DWXBt4gg.js");if(t)return;if(e({key:s,v:"weekly"}),await Promise.all([r("maps"),r("marker"),r("visualization")]),t||!h.current)return;const o=window.google.maps;d.current=o;const i=M?.center?{lng:M.center[0],lat:M.center[1]}:{lat:20,lng:0},a=M?.zoom??3,c=new o.Map(h.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:i,zoom:a,mapTypeControl:!1,streetViewControl:!1});p.current=c,g.current=new o.InfoWindow({maxWidth:280}),k.current=new o.visualization.HeatmapLayer({data:[],map:null,radius:30,opacity:.8});const l=()=>{try{const t=c.getCenter();if(!t)return;sessionStorage.setItem(n,JSON.stringify({center:[t.lng(),t.lat()],zoom:c.getZoom()}))}catch{}};c.addListener("idle",l),j(!1),C(!0)}finally{t||j(!1)}})(),()=>{t=!0,z(),U(),k.current&&(k.current.setMap(null),k.current=null),g.current?.close(),p.current=null,d.current=null}},[s]),t(()=>{if(!A)return;const t=p.current,e=d.current;if(t&&e)if(z(),U(),g.current?.close(),null===I&&L.length>0){k.current?.setMap(null);const r=n=>{for(const s of n)if(s.centroid){const r=Ct(s),n=new e.marker.AdvancedMarkerElement({map:t,position:{lng:s.centroid[0],lat:s.centroid[1]},content:r,gmpClickable:!0});n.addListener("click",()=>T(s.folder._id)),b.current.push(n)}else s.children.length>0&&r(s.children)};r(L)}else{const r=0===L.length&&null===I;if(0===q.length)return;if(r){const r=[],n=q.map(n=>{const s=n.location.y,o=n.location.x;r.push({location:new e.LatLng(s,o),weight:(n.views||0)+1});const a=_t(vt,c),l=new e.marker.AdvancedMarkerElement({map:t,position:{lat:s,lng:o},content:a,gmpClickable:!0});return l.addListener("click",()=>{const e=document.createElement("div");At(n,e,i),g.current.close(),g.current.setContent(e),g.current.open({anchor:l,map:t})}),l});if(w.current=n,x.current=new kt({markers:n,map:t,renderer:{render:({count:t,position:r})=>{const n=document.createElement("div"),s=t<10?28:t<30?34:40;return n.style.cssText=`\n width:${s}px;height:${s}px;border-radius:50%;cursor:pointer;\n background:${vt};color:#fff;\n display:flex;align-items:center;justify-content:center;\n font-size:13px;font-weight:700;\n box-shadow:0 2px 8px rgba(0,0,0,0.3);\n border:2px solid rgba(255,255,255,0.6);\n `,n.textContent=String(t),new e.marker.AdvancedMarkerElement({position:r,content:n,gmpClickable:!0,zIndex:Number(e.Marker?.MAX_ZINDEX??0)+t})}}}),k.current&&(k.current.setData(r),k.current.setMap(t)),!v.current&&(v.current=!0,!M)){const r=new e.LatLngBounds;q.forEach(t=>r.extend({lat:t.location.y,lng:t.location.x})),r.isEmpty()||t.fitBounds(r,Et)}}else{k.current?.setMap(null);const r=O?.color||vt,n=new e.LatLngBounds;q.forEach(s=>{const o=s.location.y,a=s.location.x;n.extend({lat:o,lng:a});const l=_t(r,c),u=new e.marker.AdvancedMarkerElement({map:t,position:{lat:o,lng:a},content:l,gmpClickable:!0});u.addListener("click",()=>{const e=document.createElement("div");At(s,e,i),g.current.close(),g.current.setContent(e),g.current.open({anchor:u,map:t})}),w.current.push(u)})}}},[I,L,q,A,i,c,T,O,M]),t(()=>{if(!A)return;const t=p.current,e=d.current;if(t&&e)if(E.current||!M){if(E.current=!0,I){const r=f(L,I);if(!r?.folder.boundary?.length)return;const n=new e.LatLngBounds;for(const t of r.folder.boundary)n.extend({lat:t.y,lng:t.x});n.isEmpty()||t.fitBounds(n,{...Et,maxZoom:14})}else if(L.length>0){const r=new e.LatLngBounds,n=t=>{for(const e of t)e.centroid?r.extend({lng:e.centroid[0],lat:e.centroid[1]}):n(e.children)};n(L),r.isEmpty()||t.fitBounds(r,{...Et,maxZoom:8})}}else E.current=!0},[I,L,A,M]),/* @__PURE__ */u("div",{class:"relative h-screen w-full sm:h-[calc(100vh-4rem)]",style:o(S),children:[
|
|
2
2
|
/* @__PURE__ */u(y,{positionClass:"absolute top-3 left-16 z-[1000]",folderTree:L,activeFolderId:I,setActiveFolderId:T}),P&&/* @__PURE__ */u("div",{class:"absolute inset-0 z-10 flex items-center justify-center bg-white/60",children:/* @__PURE__ */u("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"})}),_&&/* @__PURE__ */u("div",{class:"absolute inset-0 z-20 flex items-center justify-center bg-white/85",children:/* @__PURE__ */u("div",{class:"flex flex-col items-center gap-3",children:[/* @__PURE__ */u("div",{class:"border-primary size-10 animate-spin rounded-full border-4 border-t-transparent"}),/* @__PURE__ */u("p",{class:"text-sm font-medium text-slate-700",children:"Loading map…"})]})}),
|
|
3
3
|
/* @__PURE__ */u("div",{ref:h,class:"size-full"})]})};export{jt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./
|
|
1
|
+
const e=require("./Cn5QS0_5.js"),t=require("./BFeys-t9.js");var n=(e,t)=>e.filter(e=>(e.parentFolderId??null)===t).map(t=>{return{folder:t,children:n(e,t._id),eventCount:t.boundary?.length??0,centroid:(l=t.boundary,l?.length?[l.reduce((e,t)=>e+t.x,0)/l.length,l.reduce((e,t)=>e+t.y,0)/l.length]:null),color:t.color||"#fb8500"};var l}).filter(e=>e.eventCount>0||e.children.length>0),l=e=>e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y),r=()=>{const{folders:t,organization:r}=e.useSession(),[o,i]=e.d(null),a=Boolean(r?.integrationSettings?.enableFolderView),s=e.T(()=>a?n(t??[],null):[],[t,a]),d=e.useQuery({queryKey:["map-all-events",r?._id],queryFn:async()=>l((await e.ky.get(e.API_ROUTES.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{includeAllFolders:!0,limit:500,sort:"-views",contentLimit:3}}).json()).data??[]),enabled:Boolean(r?._id)&&!a,staleTime:3e5,retry:!1}),u=e.useQuery({queryKey:["map-folder-events",r?._id,o],queryFn:async()=>l((await e.ky.get(e.API_ROUTES.PUBLIC_EVENTS,{headers:{"x-org-id":r?._id??""},searchParams:{folderId:o,limit:500,sort:"-views",contentLimit:3}}).json()).data??[]),enabled:Boolean(r?._id)&&a&&Boolean(o),staleTime:3e5,retry:!1}),c=e.T(()=>(t??[]).find(e=>e._id===o)??null,[t,o]);e.y(()=>{a||i(null)},[a]);const h=e.q(e=>{i(e)},[]);return{folderTree:s,activeFolderId:o,activeFolder:c,visibleEvents:a?u.data??[]:d.data??[],setActiveFolderId:h,isLoadingEvents:a?Boolean(o)&&(u.isLoading||u.isFetching):d.isLoading||d.isFetching}},o=()=>e.u("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.u("path",{d:"m15 18-6-6 6-6"})}),i=()=>e.u("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.u("path",{d:"m9 18 6-6-6-6"})});function a({items:t,autoplayInterval:n=3e3,showControls:l=!1,className:r}){const[a,s]=e.d(0);return e.y(()=>{if(t.length<=1)return;const e=setInterval(()=>s(e=>(e+1)%t.length),n);return()=>clearInterval(e)},[t.length,n]),0===t.length?null:e.u("div",{className:e.cn("relative size-full overflow-hidden",r),children:[t.map((t,n)=>e.u("div",{className:e.cn("absolute inset-0 transition-opacity duration-500",n===a?"opacity-100":"opacity-0"),children:t},n)),t.length>1&&e.u("div",{className:"absolute bottom-2 left-1/2 z-10 flex -translate-x-1/2 gap-1",children:t.map((t,n)=>e.u("button",{onClick:()=>s(n),className:e.cn("h-1.5 rounded-full transition-all",n===a?"w-4 bg-white":"w-1.5 bg-white/50 hover:bg-white/75"),"aria-label":`Go to slide ${n+1}`},n))}),l&&t.length>1&&e.u(e.S,{children:[e.u("button",{onClick:()=>s(e=>0===e?t.length-1:e-1),className:"absolute top-1/2 left-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Previous",children:e.u(o,{})}),e.u("button",{onClick:()=>s(e=>(e+1)%t.length),className:"absolute top-1/2 right-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Next",children:e.u(i,{})})]})]})}var s=({event:n,onExplore:l})=>e.u("div",{className:"w-40 rounded pt-2 pl-1",children:[e.u("div",{className:"h-32 w-full overflow-hidden rounded",children:e.u(a,{items:(n.contents||[]).map(l=>e.u(t.LazyLoadImage,{alt:n.name,src:l.thumbnailUrl||l.url,containerClassName:"size-full",imgClassName:"rounded"},l._id)),autoplayInterval:3e3})}),e.u("div",{className:"line-clamp-2 pt-2 pb-0.5 text-sm font-medium text-black",children:n.name}),e.u("div",{className:"pb-2 text-xs text-gray-600",children:n.location?.label}),e.u("button",{type:"button",onClick:()=>l?.(n.slug||""),className:"bg-primary text-primary-foreground flex w-full items-center justify-center rounded py-1",children:"Explore"})]}),d=(e,t)=>e&&(/^#[0-9a-fA-F]{3,8}$/.test(e)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))?e:t,u=e=>{if(e)try{const{protocol:t}=new URL(e);return"https:"===t||"http:"===t?e:void 0}catch{return}},c=({node:t,depth:n,activeFolderId:l,onSelect:r})=>{const[o,i]=e.d(!1),a=t.folder._id===l,s=t.children.length>0,d=t.eventCount>0;return e.u("li",{children:[e.u("div",{class:"flex items-center gap-1 py-1.5 pr-2 rounded-lg "+(a?"bg-foreground/20":"hover:bg-foreground/20"),style:{paddingLeft:8+14*n+"px"},children:[e.u("button",{type:"button",class:"flex w-4 shrink-0 items-center justify-center text-slate-400 text-xs",onClick:e=>{e.stopPropagation(),s&&i(e=>!e)},children:s?o?"▾":"▸":e.u("span",{class:"size-1.5 rounded-full bg-slate-300 inline-block"})}),e.u("button",{type:"button",class:"flex flex-1 min-w-0 items-center gap-2 cursor-pointer",onClick:()=>{d?r(a?null:t.folder._id):i(e=>!e)},children:[e.u("span",{class:"size-2 shrink-0 rounded-full",style:{background:t.color}}),e.u("span",{class:"flex-1 truncate text-left text-sm",children:t.folder.name}),d&&e.u("span",{class:"text-xs tabular-nums text-slate-400",children:t.eventCount})]})]}),s&&o&&e.u("ul",{children:t.children.map(t=>e.u(c,{node:t,depth:n+1,activeFolderId:l,onSelect:r},t.folder._id))})]})},h=(e,t)=>{for(const n of e){if(n.folder._id===t)return n;const e=h(n.children,t);if(e)return e}return null},f=({folderTree:t,activeFolderId:n,setActiveFolderId:l,positionClass:r})=>0===t.length?null:e.u("div",{class:`${r??""} w-[min(92%,260px)] overflow-hidden rounded-xl bg-background shadow-lg backdrop-blur-sm`,children:[e.u("div",{class:"flex items-center justify-between border-b border-slate-100 px-3 py-2.5",children:[e.u("p",{class:"text-xs font-semibold uppercase tracking-wide",children:"Destinations"}),n&&e.u("button",{type:"button",onClick:()=>l(null),class:"text-xs text-foreground",children:"Show all"})]}),e.u("ul",{class:"max-h-[60vh] overflow-y-auto py-1",children:t.map(t=>e.u(c,{node:t,depth:0,activeFolderId:n,onSelect:l},t.folder._id))})]});Object.defineProperty(exports,"EventPreviewCard",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"FolderTreeSidebar",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"findNodeById",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"safeCssColor",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"safeImageUrl",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"useFolderMap",{enumerable:!0,get:function(){return r}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require("./CH5eh9L8.js");let e=require("react"),t=require("react/jsx-runtime");var r,n="itemOne",i="--rcs-raw-position",o="--rcs-current-position",a="--rcs-bounds-padding",l="--rcs-handle-color",s={capture:!1,passive:!0},d={capture:!0,passive:!1},c=((r={}).ARROW_LEFT="ArrowLeft",r.ARROW_RIGHT="ArrowRight",r.ARROW_UP="ArrowUp",r.ARROW_DOWN="ArrowDown",r),u=(t,r,n,i)=>{let o=(0,e.useRef)(void 0);(0,e.useEffect)(()=>{o.current=r},[r]),(0,e.useEffect)(()=>{if(!n?.addEventListener)return;let e=e=>o.current?.(e);return n.addEventListener(t,e,i),()=>{n.removeEventListener(t,e,i)}},[t,n,i])},p=(0,e.createContext)(null),h=({children:e,...r})=>(0,t.jsx)(p.Provider,{value:r,children:e}),g=()=>{let t=(0,e.useContext)(p);if(!t)throw Error("useReactCompareSliderContext must be used within the Provider component");return t},v=({flip:e})=>(0,t.jsx)("div",{"aria-hidden":"true",className:"__rcs-handle-arrow",style:{width:"0.85rem",height:"0.85rem",clipPath:"polygon(100% 0%, 100% 100%, 30% 50%)",rotate:e?"180deg":"0deg",outline:`0.5rem solid var(${l})`,outlineOffset:"-0.5rem"}}),b=({className:e="__rcs-handle-root",buttonStyle:r,linesStyle:n,style:i,...o})=>{let{disabled:a,portrait:s}=g(),d={boxSizing:"border-box",position:"relative",display:"inline-flex",flexDirection:s?"row":"column",placeItems:"center",width:s?"100%":void 0,height:s?void 0:"100%",cursor:a?"not-allowed":s?"ns-resize":"ew-resize",pointerEvents:"none",[l]:"rgba(255, 255, 255, 1)",...i},c={flexGrow:1,height:s?2:"100%",width:s?"100%":2,outline:`1px solid var(${l})`,outlineOffset:-1,pointerEvents:"auto",boxShadow:"0 0 4px rgba(0,0,0,.5)",...n},u={direction:"ltr",display:"grid",gridAutoFlow:"column",gap:"0.5rem",placeContent:"center",flexShrink:0,width:"3.5rem",height:"3.5rem",borderRadius:"50%",border:`2px solid var(${l})`,color:"inherit",pointerEvents:"auto",backdropFilter:"blur(0.5rem)",WebkitBackdropFilter:"blur(0.5rem)",backgroundColor:"rgba(0, 0, 0, 0.125)",boxShadow:"0 0 4px rgba(0,0,0,.35)",transform:s?"rotate(90deg)":void 0,...r};return(0,t.jsxs)("div",{"data-rcs":"handle",...o,className:e,style:d,children:[(0,t.jsx)("div",{className:"__rcs-handle-line",style:c}),(0,t.jsxs)("div",{className:"__rcs-handle-button",style:u,children:[(0,t.jsx)(v,{}),(0,t.jsx)(v,{flip:!0})]}),(0,t.jsx)("div",{className:"__rcs-handle-line",style:c})]})},m=({style:e,...r})=>{let{disabled:n,portrait:i,position:a,handleRootRef:l,onHandleRootClick:s,onHandleRootKeyDown:c}=g(),p={WebkitAppearance:"none",MozAppearance:"none",WebkitTapHighlightColor:"transparent",boxSizing:"border-box",position:"absolute",display:"flex",flexDirection:i?"row":"column",placeItems:"center",contain:"layout",top:i?"-50%":void 0,left:i?void 0:"-50%",width:"100%",height:"100%",background:"none",border:0,padding:0,pointerEvents:"none",appearance:"none",outline:0,zIndex:1,translate:i?`0 var(${o}) 0`:`var(${o}) 0 0`,backfaceVisibility:"hidden",willChange:"translate",...e};return u("keydown",c,l.current,d),u("click",s,l.current,d),(0,t.jsx)("div",{ref:l,tabIndex:0,"aria-label":"Click and drag or focus and use arrow keys to change the position of the slider","aria-orientation":i?"vertical":"horizontal","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a.current,"aria-disabled":n,"data-rcs":"handle-root",role:"slider",style:p,...r})},x=({itemClip:e,portrait:t})=>e===n?t?`inset(0px 0px calc(100% - var(${o})) 0px)`:`inset(0px calc(100% - var(${o})) 0px 0px)`:"itemTwo"===e?t?`inset(var(${o}) 0px 0px 0px)`:`inset(0px 0px 0px var(${o}))`:"none",f=({item:e,style:r,...i})=>{let{clip:o,portrait:a}=g(),l={KhtmlUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",gridArea:"1 / 1",maxWidth:"100%",overflow:"hidden",clipPath:x({itemClip:"all"===o||o===e?e:void 0,portrait:a}),boxSizing:"border-box",transform:"translateZ(0)",userSelect:"none",zIndex:e===n?1:void 0,willChange:"clip-path",...r};return(0,t.jsx)("div",{"data-rcs":"item","data-rcs-item":e,...i,style:l})},y=`clamp(var(${a}), var(${i}) - var(${a}) + var(${a}), calc(100% - var(${a})))`,w=({style:r,...n})=>{let{browsingContext:l,boundsPadding:c,changePositionOnHover:p,clip:h,isDragging:v,portrait:b,position:m,onTouchEnd:x,onPointerDown:f,onPointerMove:w,onPointerUp:R,interactiveTarget:k,rootRef:C,transition:P,canTransition:S}=g(),E={position:"relative",boxSizing:"border-box",display:"grid",maxWidth:"100%",maxHeight:"100%",overflow:"hidden",cursor:v?b?"ns-resize":"ew-resize":void 0,touchAction:"pan-y",userSelect:"none",KhtmlUserSelect:"none",msUserSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",transition:S&&P?`${i} ${P}`:"none",[i]:`${m.current}%`,[a]:c,[o]:y,...r};return u("touchend",x,k,d),u("pointerdown",f,k,d),(0,e.useEffect)(()=>{let e=C.current,t=e=>{v||R(e)};return p&&(e.addEventListener("pointermove",w,s),e.addEventListener("pointerleave",t,s)),()=>{e.removeEventListener("pointermove",w),e.removeEventListener("pointerleave",t)}},[p,w,R,v,C]),(0,e.useEffect)(()=>{if(v)return l.addEventListener("pointermove",w,s),l.addEventListener("pointerup",R,s),()=>{l?.removeEventListener("pointermove",w),l?.removeEventListener("pointerup",R)}},[w,R,v,l]),(0,t.jsx)("div",{ref:C,style:E,"data-rcs":"root","data-rcs-clip":h,...n})};(()=>{try{typeof CSS<"u"&&CSS.registerProperty({name:i,syntax:"<percentage>",inherits:!0,initialValue:"50%"})}catch(r){console.debug("[react-compare-slider] register CSS property:",r)}})();var R=()=>globalThis.matchMedia?.("(prefers-reduced-motion: no-preference)")?.matches?"0.15s ease-out":"none",k=()=>!!globalThis.matchMedia?.("(pointer: coarse)")?.matches,C=({boundsPadding:t="0px",browsingContext:r=globalThis,changePositionOnHover:n=!1,clip:o="all",defaultPosition:a=50,disabled:l=!1,keyboardIncrement:s="5%",onlyHandleDraggable:d=k(),onPositionChange:u,portrait:p=!1,transition:h=R()}={})=>{let g=(0,e.useRef)(null),v=(0,e.useRef)(null),b=(0,e.useRef)(a),[m,x]=(0,e.useState)(!1),[f,y]=(0,e.useState)(!0),[w,C]=(0,e.useState)(null),P=(0,e.useCallback)(e=>{let t=Math.min(Math.max(e,0),100);g.current?.style.setProperty(i,`${t}%`),v.current?.setAttribute("aria-valuenow",`${Math.round(t)}`),b.current=t,u?.(t)},[u]),S=(0,e.useCallback)(function({x:e,y:t}){let{width:n,height:i,top:o,left:a}=g.current.getBoundingClientRect();0===n||0===i||P((p?t-o-r.scrollY:e-a-r.scrollX)/(p?i:n)*100)},[r,p,P]),E=(0,e.useCallback)(e=>{e.preventDefault(),!l&&0===e.button&&(S({x:e.pageX,y:e.pageY}),x(!0),y(!0))},[l,S]),O=(0,e.useCallback)(function(e){y(!1),S({x:e.pageX,y:e.pageY})},[S]),j=(0,e.useCallback)(e=>{x(!1),y(!0)},[]),$=(0,e.useCallback)(e=>{x(!1),y(!0)},[]),A=(0,e.useCallback)(e=>{e.preventDefault(),e.currentTarget?.focus()},[]),D=(0,e.useCallback)(e=>{if(!Object.values(c).includes(e.key))return;e.preventDefault(),y(!0);let t="string"==typeof s?Number.parseFloat(s):s/g.current?.getBoundingClientRect().width*100;P((p?e.key===c.ARROW_LEFT||e.key===c.ARROW_DOWN:e.key===c.ARROW_RIGHT||e.key===c.ARROW_UP)?b.current+t:b.current-t)},[s,p,P]);return(0,e.useLayoutEffect)(()=>{C(d?v.current:g.current)},[d]),(0,e.useEffect)(()=>{P(a)},[a,P]),{boundsPadding:t,browsingContext:r,changePositionOnHover:n,clip:o,defaultPosition:a,disabled:l,keyboardIncrement:s,onlyHandleDraggable:d,portrait:p,transition:h,onHandleRootKeyDown:D,onPointerDown:E,onPointerMove:O,onPointerUp:j,onTouchEnd:$,onHandleRootClick:A,canTransition:f,isDragging:m,position:b,setPosition:P,setPositionFromBounds:S,rootRef:g,handleRootRef:v,interactiveTarget:w}};exports.ReactCompareSlider=({boundsPadding:e,browsingContext:r,changePositionOnHover:n,clip:i,defaultPosition:o,disabled:a,handle:l,itemOne:s,itemTwo:d,keyboardIncrement:c,onPositionChange:u,onlyHandleDraggable:p,portrait:g,transition:v,...x})=>(0,t.jsx)(h,{...C({boundsPadding:e,browsingContext:r,changePositionOnHover:n,clip:i,defaultPosition:o,disabled:a,keyboardIncrement:c,onPositionChange:u,onlyHandleDraggable:p,portrait:g,transition:v}),children:(0,t.jsxs)(w,{...x,children:[(0,t.jsx)(f,{item:"itemOne",children:s}),(0,t.jsx)(f,{item:"itemTwo",children:d}),(0,t.jsx)(m,{children:l||(0,t.jsx)(b,{})})]})});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{At as t,Ct as e,Et as i,J as s,Mt as n,Nt as o,Pt as r,S as a,_ as l,g as h,h as c,k as d,kt as p,m as u,n as m,p as f,w as g,x as v,y}from"./BMKU_9Dv.js";import{t as w}from"./DZCz7kl3.js";import _,{createElement as x,forwardRef as b,isValidElement as S,useEffect as P,useLayoutEffect as I,useRef as C,useState as L}from"react";var T=Object.freeze({left:0,top:0,width:16,height:16}),z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...T,...z}),E=Object.freeze({...A,body:"",hidden:!1});function O(t,e){const i=function(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(i.rotate=s),i}(t,e);for(const s in E)s in z?s in t&&!(s in i)&&(i[s]=z[s]):s in e?i[s]=e[s]:s in t&&(i[s]=t[s]);return i}function k(t,e,i){const s=t.icons,n=t.aliases||Object.create(null);let o={};function r(t){o=O(s[t]||n[t],o)}return r(e),i.forEach(r),O(t,o)}function Z(t,e){const i=[];if("object"!=typeof t||"object"!=typeof t.icons)return i;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),i.push(t)});const s=function(t){const e=t.icons,i=t.aliases||Object.create(null),s=Object.create(null);return Object.keys(e).concat(Object.keys(i)).forEach(function t(n){if(e[n])return s[n]=[];if(!(n in s)){s[n]=null;const e=i[n]&&i[n].parent,o=e&&t(e);o&&(s[n]=[e].concat(o))}return s[n]}),s}(t);for(const n in s){const o=s[n];o&&(e(n,k(t,n,o)),i.push(n))}return i}var D={provider:"",aliases:{},not_found:{},...T};function F(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function M(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!F(t,D))return null;const i=e.icons;for(const n in i){const t=i[n];if(!n||"string"!=typeof t.body||!F(t,E))return null}const s=e.aliases||Object.create(null);for(const n in s){const t=s[n],e=t.parent;if(!n||"string"!=typeof e||!i[e]&&!s[e]||!F(t,E))return null}return e}var N=Object.create(null);function B(t,e){const i=N[t]||(N[t]=Object.create(null));return i[e]||(i[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function R(t,e){return M(e)?Z(e,(e,i)=>{i?t.icons[e]=i:t.missing.add(e)}):[]}var j=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(t,e,i,s="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),i=n.pop(),o={provider:n.length>0?n[0]:s,prefix:i,name:t};return e&&!W(o)?null:o}const o=n[0],r=o.split("-");if(r.length>1){const t={provider:s,prefix:r.shift(),name:r.join("-")};return e&&!W(t)?null:t}if(i&&""===s){const t={provider:s,prefix:"",name:o};return e&&!W(t,i)?null:t}return null},W=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),$=!1;function V(t){return"boolean"==typeof t&&($=t),$}function q(t){const e="string"==typeof t?H(t,!0,$):t;if(e){const t=B(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}var U=Object.freeze({width:null,height:null}),G=Object.freeze({...U,...z}),K=/(-?[0-9.]*[0-9]+[0-9.]*)/g,X=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Y(t,e,i){if(1===e)return t;if(i=i||100,"number"==typeof t)return Math.ceil(t*e*i)/i;if("string"!=typeof t)return t;const s=t.split(K);if(null===s||!s.length)return t;const n=[];let o=s.shift(),r=X.test(o);for(;;){if(r){const t=parseFloat(o);isNaN(t)?n.push(o):n.push(Math.ceil(t*e*i)/i)}else n.push(o);if(o=s.shift(),void 0===o)return n.join("");r=!r}}var Q=/\sid="(\S+)"/g,J="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),tt=0;function et(t,e=J){const i=[];let s;for(;s=Q.exec(t);)i.push(s[1]);if(!i.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(i=>{const s="function"==typeof e?e(i):e+(tt++).toString(),o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var it=Object.create(null);function st(t){return it[t]||it[""]}function nt(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var ot=Object.create(null),rt=["https://api.simplesvg.com","https://api.unisvg.com"],at=[];rt.length>0;)1===rt.length||Math.random()>.5?at.push(rt.shift()):at.push(rt.pop());function lt(t,e){const i=nt(e);return null!==i&&(ot[t]=i,!0)}function ht(t){return ot[t]}ot[""]=nt({resources:["https://api.iconify.design"].concat(at)});var ct=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),dt={prepare:(t,e,i)=>{const s=[],n=function(t,e){const i=ht(t);if(!i)return 0;let s;if(i.maxURL){let t=0;i.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";s=i.maxURL-t-i.path.length-n.length}else s=0;return s}(t,e),o="icons";let r={type:o,provider:t,prefix:e,icons:[]},a=0;return i.forEach((i,l)=>{a+=i.length+1,a>=n&&l>0&&(s.push(r),r={type:o,provider:t,prefix:e,icons:[]},a=i.length),r.icons.push(i)}),s.push(r),s},send:(t,e,i)=>{if(!ct)return void i("abort",424);let s=function(t){if("string"==typeof t){const e=ht(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,i=e.icons.join(",");s+=t+".json?"+new URLSearchParams({icons:i}).toString();break}case"custom":{const t=e.uri;s+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void i("abort",400)}let n=503;ct(t+s).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{i(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{i("success",t)}):setTimeout(()=>{404===t?i("abort",t):i("next",n)})}).catch(()=>{i("next",n)})}};function pt(t,e){t.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(t=>t.id!==e))})}var ut=0,mt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ft(t){const e={...mt,...t};let i=[];function s(){i=i.filter(t=>"pending"===t().status)}return{query:function(t,n,o){const r=function(t,e,i,s){const n=t.resources.length,o=t.random?Math.floor(Math.random()*n):t.index;let r;if(t.random){let e=t.resources.slice(0);for(r=[];e.length>1;){const t=Math.floor(Math.random()*e.length);r.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}r=r.concat(e)}else r=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l,h="pending",c=0,d=null,p=[],u=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===h&&(h="aborted"),m(),p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function g(t,e){e&&(u=[]),"function"==typeof t&&u.push(t)}function v(){h="failed",u.forEach(t=>{t(void 0,l)})}function y(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}return"function"==typeof s&&u.push(s),setTimeout(function s(){if("pending"!==h)return;m();const n=r.shift();if(void 0===n)return p.length?void(d=setTimeout(()=>{m(),"pending"===h&&(y(),v())},t.timeout)):void v();const o={status:"pending",resource:n,callback:(e,i)=>{!function(e,i,n){const o="success"!==i;switch(p=p.filter(t=>t!==e),h){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===i)return l=n,void v();if(o)return l=n,void(p.length||(r.length?s():v()));if(m(),y(),!t.random){const i=t.resources.indexOf(e.resource);-1!==i&&i!==t.index&&(t.index=i)}h="completed",u.forEach(t=>{t(n)})}(o,e,i)}};p.push(o),c++,d=setTimeout(s,t.rotate),i(n,e,o.callback)}),function(){return{startTime:a,payload:e,status:h,queriesSent:c,queriesPending:p.length,subscribe:g,abort:f}}}(e,t,n,(t,e)=>{s(),o&&o(t,e)});return i.push(r),r},find:function(t){return i.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:s}}function gt(){}var vt=Object.create(null);function yt(){}function wt(t,e,i){function s(){const i=t.pendingIcons;e.forEach(e=>{i&&i.delete(e),t.icons[e]||t.missing.add(e)})}if(i&&"object"==typeof i)try{if(!R(t,i).length)return void s()}catch(n){console.error(n)}s(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const s=t.provider,n=t.prefix;e.forEach(e=>{const o=e.icons,r=o.pending.length;o.pending=o.pending.filter(e=>{if(e.prefix!==n)return!0;const r=e.name;if(t.icons[r])o.loaded.push({provider:s,prefix:n,name:r});else{if(!t.missing.has(r))return i=!0,!0;o.missing.push({provider:s,prefix:n,name:r})}return!1}),o.pending.length!==r&&(i||pt([t],e.id),e.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),e.abort))})}))}(t)}))}(t)}function _t(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function xt(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:i}=t,s=t.iconsToLoad;if(delete t.iconsToLoad,!s||!s.length)return;const n=t.loadIcon;if(t.loadIcons&&(s.length>1||!n))return void _t(t.loadIcons(s,i,e),e=>{wt(t,s,e)});if(n)return void s.forEach(s=>{_t(n(s,i,e),e=>{wt(t,[s],e?{prefix:i,icons:{[s]:e}}:null)})});const{valid:o,invalid:r}=function(t){const e=[],i=[];return t.forEach(t=>{(t.match(j)?e:i).push(t)}),{valid:e,invalid:i}}(s);if(r.length&&wt(t,r,null),!o.length)return;const a=i.match(j)?st(e):null;a?a.prepare(e,i,o).forEach(i=>{!function(t,e,i){let s,n;if("string"==typeof t){const e=st(t);if(!e)return i(void 0,424),gt;n=e.send;const o=function(t){if(!vt[t]){const e=ht(t);if(!e)return;vt[t]={config:e,redundancy:ft(e)}}return vt[t]}(t);o&&(s=o.redundancy)}else{const e=nt(t);if(e){s=ft(e);const i=st(t.resources?t.resources[0]:"");i&&(n=i.send)}}s&&n?s.query(e,n,i)().abort:i(void 0,424)}(e,i,e=>{wt(t,i.icons,e)})}):wt(t,o,null)}))}var bt,St=(t,e)=>{const i=function(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let s={provider:"",prefix:"",name:""};return t.forEach(t=>{if(s.name===t.name&&s.prefix===t.prefix&&s.provider===t.provider)return;s=t;const n=t.provider,o=t.prefix,r=t.name,a=i[n]||(i[n]=Object.create(null)),l=a[o]||(a[o]=B(n,o));let h;h=r in l.icons?e.loaded:""===o||l.missing.has(r)?e.missing:e.pending;const c={provider:n,prefix:o,name:r};h.push(c)}),e}(function(t,e=!0,i=!1){const s=[];return t.forEach(t=>{const n="string"==typeof t?H(t,e,i):t;n&&s.push(n)}),s}(t,!0,V()));if(!i.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(i.loaded,i.missing,i.pending,yt)}),()=>{t=!1}}const s=Object.create(null),n=[];let o,r;return i.pending.forEach(t=>{const{provider:e,prefix:i}=t;if(i===r&&e===o)return;o=e,r=i,n.push(B(e,i));const a=s[e]||(s[e]=Object.create(null));a[i]||(a[i]=[])}),i.pending.forEach(t=>{const{provider:e,prefix:i,name:n}=t,o=B(e,i),r=o.pendingIcons||(o.pendingIcons=/* @__PURE__ */new Set);r.has(n)||(r.add(n),s[e][i].push(n))}),n.forEach(t=>{const e=s[t.provider][t.prefix];e.length&&xt(t,e)}),e?function(t,e,i){const s=ut++,n=pt.bind(null,i,s);if(!e.pending.length)return n;const o={id:s,icons:e,callback:t,abort:n};return i.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(o)}),n}(e,i,n):yt},Pt=/[\s,]+/;function It(t,e){e.split(Pt).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function Ct(t,e=0){const i=t.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(""===i){const e=parseInt(t);return isNaN(e)?0:s(e)}if(i!==t){let e=0;switch(i){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-i.length));return isNaN(n)?0:(n/=e,n%1==0?s(n):0)}}return e}function Lt(t){return void 0===bt&&function(){try{bt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){bt=null}}(),bt?bt.createHTML(t):t}var Tt={...G,inline:!1},zt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},At={display:"inline-block"},Et={backgroundColor:"currentColor"},Ot={backgroundColor:"transparent"},kt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Zt={WebkitMask:Et,mask:Et,background:Ot};for(const Wi in Zt){const t=Zt[Wi];for(const e in kt)t[Wi+e]=kt[e]}var Dt={...Tt,inline:!0};function Ft(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var Mt;if(V(!0),Mt=dt,it[""]=Mt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,i="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),$&&!e&&!t.prefix){let e=!1;return M(t)&&(t.prefix="",Z(t,(t,s)=>{(function(t,e){const s=H(t,!0,$);if(!s)return!1;const n=B(s.provider,s.prefix);return e?function(t,e,s){try{if("string"==typeof s.body)return t.icons[e]={...s},!0}catch(i){}return!1}(n,s.name,e):(n.missing.add(s.name),!0)})(t,s)&&(e=!0)})),e}const s=t.prefix;return!!W({prefix:s,name:"a"})&&!!R(B(e,s),t)}(t))&&console.error(i)}catch(e){console.error(i)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const i="IconifyProviders["+t+"] is invalid.";try{const s=e[t];if("object"!=typeof s||!s||void 0===s.resources)continue;lt(t,s)||console.error(i)}catch(Hi){console.error(i)}}}}function Nt(t){const[e,i]=L(!!t.ssr),[s,n]=L({}),[o,r]=L(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const i=q(e);if(i)return{name:e,data:i}}return{name:""}}(!!t.ssr));function a(){const t=s.callback;t&&(t(),n({}))}function l(t){if(JSON.stringify(o)!==JSON.stringify(t))return a(),r(t),!0}function h(){var e;const i=t.icon;if("object"==typeof i)return void l({name:"",data:i});const s=q(i);l({name:i,data:s})&&(void 0===s?n({callback:St([i],h)}):s&&(null===(e=t.onLoad)||void 0===e||e.call(t,i)))}P(()=>(i(!0),a),[]),P(()=>{e&&h()},[t.icon,e]);const{name:c,data:d}=o;return d?((t,e,i)=>{const s=e.inline?Dt:Tt,n=function(t,e){const i={...t};for(const s in e){const t=e[s],n=typeof t;s in U?(null===t||t&&("string"===n||"number"===n))&&(i[s]=t):n===typeof i[s]&&(i[s]="rotate"===s?t%4:t)}return i}(s,e),o=e.mode||"svg",r={},a=e.style||{},l={..."svg"===o?zt:{}};if(i){const t=H(i,!1,!0);if(t){const e=["iconify"];for(const i of["provider","prefix"])t[i]&&e.push("iconify--"+t[i]);l.className=e.join(" ")}}for(let v in e){const t=e[v];if(void 0!==t)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=t;break;case"className":l[v]=(l[v]?l[v]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":n[v]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&It(n,t);break;case"color":r.color=t;break;case"rotate":"string"==typeof t?n[v]=Ct(t):"number"==typeof t&&(n[v]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete l["aria-hidden"];break;default:void 0===s[v]&&(l[v]=t)}}const h=function(t,e){const i={...A,...t},s={...G,...e},n={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,s].forEach(t=>{const e=[],i=t.hFlip,s=t.vFlip;let r,a=t.rotate;switch(i?s?a+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):s&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:r=n.height/2+n.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:r=n.width/2+n.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}a%2==1&&(n.left!==n.top&&(r=n.left,n.left=n.top,n.top=r),n.width!==n.height&&(r=n.width,n.width=n.height,n.height=r)),e.length&&(o=function(t,e){const i=function(t,e="defs"){let i="";const s=t.indexOf("<"+e);for(;s>=0;){const n=t.indexOf(">",s),o=t.indexOf("</"+e);if(-1===n||-1===o)break;const r=t.indexOf(">",o);if(-1===r)break;i+=t.slice(n+1,o).trim(),t=t.slice(0,s).trim()+t.slice(r+1)}return{defs:i,content:t}}(t);return s=i.defs,n=e+i.content+"</g>",s?"<defs>"+s+"</defs>"+n:n;var s,n}(o,'<g transform="'+e.join(" ")+'">'))});const r=s.width,a=s.height,l=n.width,h=n.height;let c,d;null===r?(d=null===a?"1em":"auto"===a?h:a,c=Y(d,l/h)):(c="auto"===r?l:r,d=null===a?Y(c,h/l):"auto"===a?h:a);const p={},u=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};u("width",c),u("height",d);const m=[n.left,n.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:o}}(t,n),c=h.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),"svg"===o){l.style={...r,...a},Object.assign(l,c);let t=0,i=e.id;return"string"==typeof i&&(i=i.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Lt(et(h.body,i?()=>i+"ID"+t++:"iconifyReact"))},x("svg",l)}const{body:d,width:p,height:u}=t,m="mask"===o||"bg"!==o&&-1!==d.indexOf("currentColor"),f=function(t,e){let i=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+t+"</svg>"}(d,{...c,width:p+"",height:u+""});var g;return l.style={...r,"--svg":(g=f,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(g)+'")'),width:Ft(c.width),height:Ft(c.height),...At,...m?Et:Ot,...a},x("span",l)})({...A,...d},t,c):t.children?t.children:t.fallback?t.fallback:x("span",{})}var Bt=b((t,e)=>Nt({...t,_ref:e})),Rt=(b((t,e)=>Nt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),jt=l,Ht=(t,e)=>i=>{var s;if(null==(null==e?void 0:e.variants))return jt(t,null==i?void 0:i.class,null==i?void 0:i.className);const{variants:n,defaultVariants:o}=e,r=Object.keys(n).map(t=>{const e=null==i?void 0:i[t],s=null==o?void 0:o[t];if(null===e)return null;const r=Rt(e)||Rt(s);return n[t][r]}),a=i&&Object.entries(i).reduce((t,e)=>{let[i,s]=e;return void 0===s||(t[i]=s),t},{});return jt(t,r,null==e||null===(s=e.compoundVariants)||void 0===s?void 0:s.reduce((t,e)=>{let{class:i,className:s,...n}=e;return Object.entries(n).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...o,...a}[e]):{...o,...a}[e]===i})?[...t,i,s]:t},[]),null==i?void 0:i.class,null==i?void 0:i.className)},Wt=Ht("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),$t=({className:t,color:e="foreground",size:i="md",variant:s="default",name:n="line-md:iconify1",...o})=>/* @__PURE__ */y(Bt,{icon:n,className:c(Wt({color:e,size:i,variant:s,className:t})),...o});function Vt({children:t,asChild:e=!1,...i}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return o(e,{...i,...e.props})}/* @__PURE__ */
|
|
1
|
+
import{At as t,Ct as e,Et as i,J as s,Mt as n,Nt as o,Pt as r,S as a,_ as l,g as h,h as c,k as d,kt as p,m as u,n as m,p as f,w as g,x as v,y}from"./BA-rmyyP.js";import{t as w}from"./CdVkPkqy.js";import _,{createElement as x,forwardRef as b,isValidElement as S,useEffect as P,useLayoutEffect as I,useRef as C,useState as L}from"react";var T=Object.freeze({left:0,top:0,width:16,height:16}),z=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...T,...z}),E=Object.freeze({...A,body:"",hidden:!1});function O(t,e){const i=function(t,e){const i={};!t.hFlip!=!e.hFlip&&(i.hFlip=!0),!t.vFlip!=!e.vFlip&&(i.vFlip=!0);const s=((t.rotate||0)+(e.rotate||0))%4;return s&&(i.rotate=s),i}(t,e);for(const s in E)s in z?s in t&&!(s in i)&&(i[s]=z[s]):s in e?i[s]=e[s]:s in t&&(i[s]=t[s]);return i}function k(t,e,i){const s=t.icons,n=t.aliases||Object.create(null);let o={};function r(t){o=O(s[t]||n[t],o)}return r(e),i.forEach(r),O(t,o)}function Z(t,e){const i=[];if("object"!=typeof t||"object"!=typeof t.icons)return i;t.not_found instanceof Array&&t.not_found.forEach(t=>{e(t,null),i.push(t)});const s=function(t){const e=t.icons,i=t.aliases||Object.create(null),s=Object.create(null);return Object.keys(e).concat(Object.keys(i)).forEach(function t(n){if(e[n])return s[n]=[];if(!(n in s)){s[n]=null;const e=i[n]&&i[n].parent,o=e&&t(e);o&&(s[n]=[e].concat(o))}return s[n]}),s}(t);for(const n in s){const o=s[n];o&&(e(n,k(t,n,o)),i.push(n))}return i}var D={provider:"",aliases:{},not_found:{},...T};function F(t,e){for(const i in e)if(i in t&&typeof t[i]!=typeof e[i])return!1;return!0}function M(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;if(!F(t,D))return null;const i=e.icons;for(const n in i){const t=i[n];if(!n||"string"!=typeof t.body||!F(t,E))return null}const s=e.aliases||Object.create(null);for(const n in s){const t=s[n],e=t.parent;if(!n||"string"!=typeof e||!i[e]&&!s[e]||!F(t,E))return null}return e}var N=Object.create(null);function B(t,e){const i=N[t]||(N[t]=Object.create(null));return i[e]||(i[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:/* @__PURE__ */new Set}}(t,e))}function R(t,e){return M(e)?Z(e,(e,i)=>{i?t.icons[e]=i:t.missing.add(e)}):[]}var j=/^[a-z0-9]+(-[a-z0-9]+)*$/,H=(t,e,i,s="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;s=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),i=n.pop(),o={provider:n.length>0?n[0]:s,prefix:i,name:t};return e&&!W(o)?null:o}const o=n[0],r=o.split("-");if(r.length>1){const t={provider:s,prefix:r.shift(),name:r.join("-")};return e&&!W(t)?null:t}if(i&&""===s){const t={provider:s,prefix:"",name:o};return e&&!W(t,i)?null:t}return null},W=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),$=!1;function V(t){return"boolean"==typeof t&&($=t),$}function q(t){const e="string"==typeof t?H(t,!0,$):t;if(e){const t=B(e.provider,e.prefix),i=e.name;return t.icons[i]||(t.missing.has(i)?null:void 0)}}var U=Object.freeze({width:null,height:null}),G=Object.freeze({...U,...z}),K=/(-?[0-9.]*[0-9]+[0-9.]*)/g,X=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Y(t,e,i){if(1===e)return t;if(i=i||100,"number"==typeof t)return Math.ceil(t*e*i)/i;if("string"!=typeof t)return t;const s=t.split(K);if(null===s||!s.length)return t;const n=[];let o=s.shift(),r=X.test(o);for(;;){if(r){const t=parseFloat(o);isNaN(t)?n.push(o):n.push(Math.ceil(t*e*i)/i)}else n.push(o);if(o=s.shift(),void 0===o)return n.join("");r=!r}}var Q=/\sid="(\S+)"/g,J="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),tt=0;function et(t,e=J){const i=[];let s;for(;s=Q.exec(t);)i.push(s[1]);if(!i.length)return t;const n="suffix"+(16777216*Math.random()|Date.now()).toString(16);return i.forEach(i=>{const s="function"==typeof e?e(i):e+(tt++).toString(),o=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+s+n+"$3")}),t=t.replace(new RegExp(n,"g"),"")}var it=Object.create(null);function st(t){return it[t]||it[""]}function nt(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:!0===t.random,index:t.index||0,dataAfterTimeout:!1!==t.dataAfterTimeout}}for(var ot=Object.create(null),rt=["https://api.simplesvg.com","https://api.unisvg.com"],at=[];rt.length>0;)1===rt.length||Math.random()>.5?at.push(rt.shift()):at.push(rt.pop());function lt(t,e){const i=nt(e);return null!==i&&(ot[t]=i,!0)}function ht(t){return ot[t]}ot[""]=nt({resources:["https://api.iconify.design"].concat(at)});var ct=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(e){}})(),dt={prepare:(t,e,i)=>{const s=[],n=function(t,e){const i=ht(t);if(!i)return 0;let s;if(i.maxURL){let t=0;i.resources.forEach(e=>{t=Math.max(t,e.length)});const n=e+".json?icons=";s=i.maxURL-t-i.path.length-n.length}else s=0;return s}(t,e),o="icons";let r={type:o,provider:t,prefix:e,icons:[]},a=0;return i.forEach((i,l)=>{a+=i.length+1,a>=n&&l>0&&(s.push(r),r={type:o,provider:t,prefix:e,icons:[]},a=i.length),r.icons.push(i)}),s.push(r),s},send:(t,e,i)=>{if(!ct)return void i("abort",424);let s=function(t){if("string"==typeof t){const e=ht(t);if(e)return e.path}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,i=e.icons.join(",");s+=t+".json?"+new URLSearchParams({icons:i}).toString();break}case"custom":{const t=e.uri;s+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void i("abort",400)}let n=503;ct(t+s).then(t=>{const e=t.status;if(200===e)return n=501,t.json();setTimeout(()=>{i(function(t){return 404===t}(e)?"abort":"next",e)})}).then(t=>{"object"==typeof t&&null!==t?setTimeout(()=>{i("success",t)}):setTimeout(()=>{404===t?i("abort",t):i("next",n)})}).catch(()=>{i("next",n)})}};function pt(t,e){t.forEach(t=>{const i=t.loaderCallbacks;i&&(t.loaderCallbacks=i.filter(t=>t.id!==e))})}var ut=0,mt={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function ft(t){const e={...mt,...t};let i=[];function s(){i=i.filter(t=>"pending"===t().status)}return{query:function(t,n,o){const r=function(t,e,i,s){const n=t.resources.length,o=t.random?Math.floor(Math.random()*n):t.index;let r;if(t.random){let e=t.resources.slice(0);for(r=[];e.length>1;){const t=Math.floor(Math.random()*e.length);r.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}r=r.concat(e)}else r=t.resources.slice(o).concat(t.resources.slice(0,o));const a=Date.now();let l,h="pending",c=0,d=null,p=[],u=[];function m(){d&&(clearTimeout(d),d=null)}function f(){"pending"===h&&(h="aborted"),m(),p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}function g(t,e){e&&(u=[]),"function"==typeof t&&u.push(t)}function v(){h="failed",u.forEach(t=>{t(void 0,l)})}function y(){p.forEach(t=>{"pending"===t.status&&(t.status="aborted")}),p=[]}return"function"==typeof s&&u.push(s),setTimeout(function s(){if("pending"!==h)return;m();const n=r.shift();if(void 0===n)return p.length?void(d=setTimeout(()=>{m(),"pending"===h&&(y(),v())},t.timeout)):void v();const o={status:"pending",resource:n,callback:(e,i)=>{!function(e,i,n){const o="success"!==i;switch(p=p.filter(t=>t!==e),h){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===i)return l=n,void v();if(o)return l=n,void(p.length||(r.length?s():v()));if(m(),y(),!t.random){const i=t.resources.indexOf(e.resource);-1!==i&&i!==t.index&&(t.index=i)}h="completed",u.forEach(t=>{t(n)})}(o,e,i)}};p.push(o),c++,d=setTimeout(s,t.rotate),i(n,e,o.callback)}),function(){return{startTime:a,payload:e,status:h,queriesSent:c,queriesPending:p.length,subscribe:g,abort:f}}}(e,t,n,(t,e)=>{s(),o&&o(t,e)});return i.push(r),r},find:function(t){return i.find(e=>t(e))||null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:s}}function gt(){}var vt=Object.create(null);function yt(){}function wt(t,e,i){function s(){const i=t.pendingIcons;e.forEach(e=>{i&&i.delete(e),t.icons[e]||t.missing.add(e)})}if(i&&"object"==typeof i)try{if(!R(t,i).length)return void s()}catch(n){console.error(n)}s(),function(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,function(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const e=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!e.length)return;let i=!1;const s=t.provider,n=t.prefix;e.forEach(e=>{const o=e.icons,r=o.pending.length;o.pending=o.pending.filter(e=>{if(e.prefix!==n)return!0;const r=e.name;if(t.icons[r])o.loaded.push({provider:s,prefix:n,name:r});else{if(!t.missing.has(r))return i=!0,!0;o.missing.push({provider:s,prefix:n,name:r})}return!1}),o.pending.length!==r&&(i||pt([t],e.id),e.callback(o.loaded.slice(0),o.missing.slice(0),o.pending.slice(0),e.abort))})}))}(t)}))}(t)}function _t(t,e){t instanceof Promise?t.then(t=>{e(t)}).catch(()=>{e(null)}):e(t)}function xt(t,e){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(e).sort():t.iconsToLoad=e,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:e,prefix:i}=t,s=t.iconsToLoad;if(delete t.iconsToLoad,!s||!s.length)return;const n=t.loadIcon;if(t.loadIcons&&(s.length>1||!n))return void _t(t.loadIcons(s,i,e),e=>{wt(t,s,e)});if(n)return void s.forEach(s=>{_t(n(s,i,e),e=>{wt(t,[s],e?{prefix:i,icons:{[s]:e}}:null)})});const{valid:o,invalid:r}=function(t){const e=[],i=[];return t.forEach(t=>{(t.match(j)?e:i).push(t)}),{valid:e,invalid:i}}(s);if(r.length&&wt(t,r,null),!o.length)return;const a=i.match(j)?st(e):null;a?a.prepare(e,i,o).forEach(i=>{!function(t,e,i){let s,n;if("string"==typeof t){const e=st(t);if(!e)return i(void 0,424),gt;n=e.send;const o=function(t){if(!vt[t]){const e=ht(t);if(!e)return;vt[t]={config:e,redundancy:ft(e)}}return vt[t]}(t);o&&(s=o.redundancy)}else{const e=nt(t);if(e){s=ft(e);const i=st(t.resources?t.resources[0]:"");i&&(n=i.send)}}s&&n?s.query(e,n,i)().abort:i(void 0,424)}(e,i,e=>{wt(t,i.icons,e)})}):wt(t,o,null)}))}var bt,St=(t,e)=>{const i=function(t){const e={loaded:[],missing:[],pending:[]},i=Object.create(null);t.sort((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name));let s={provider:"",prefix:"",name:""};return t.forEach(t=>{if(s.name===t.name&&s.prefix===t.prefix&&s.provider===t.provider)return;s=t;const n=t.provider,o=t.prefix,r=t.name,a=i[n]||(i[n]=Object.create(null)),l=a[o]||(a[o]=B(n,o));let h;h=r in l.icons?e.loaded:""===o||l.missing.has(r)?e.missing:e.pending;const c={provider:n,prefix:o,name:r};h.push(c)}),e}(function(t,e=!0,i=!1){const s=[];return t.forEach(t=>{const n="string"==typeof t?H(t,e,i):t;n&&s.push(n)}),s}(t,!0,V()));if(!i.pending.length){let t=!0;return e&&setTimeout(()=>{t&&e(i.loaded,i.missing,i.pending,yt)}),()=>{t=!1}}const s=Object.create(null),n=[];let o,r;return i.pending.forEach(t=>{const{provider:e,prefix:i}=t;if(i===r&&e===o)return;o=e,r=i,n.push(B(e,i));const a=s[e]||(s[e]=Object.create(null));a[i]||(a[i]=[])}),i.pending.forEach(t=>{const{provider:e,prefix:i,name:n}=t,o=B(e,i),r=o.pendingIcons||(o.pendingIcons=/* @__PURE__ */new Set);r.has(n)||(r.add(n),s[e][i].push(n))}),n.forEach(t=>{const e=s[t.provider][t.prefix];e.length&&xt(t,e)}),e?function(t,e,i){const s=ut++,n=pt.bind(null,i,s);if(!e.pending.length)return n;const o={id:s,icons:e,callback:t,abort:n};return i.forEach(t=>{(t.loaderCallbacks||(t.loaderCallbacks=[])).push(o)}),n}(e,i,n):yt},Pt=/[\s,]+/;function It(t,e){e.split(Pt).forEach(e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}})}function Ct(t,e=0){const i=t.replace(/^-?[0-9.]*/,"");function s(t){for(;t<0;)t+=4;return t%4}if(""===i){const e=parseInt(t);return isNaN(e)?0:s(e)}if(i!==t){let e=0;switch(i){case"%":e=25;break;case"deg":e=90}if(e){let n=parseFloat(t.slice(0,t.length-i.length));return isNaN(n)?0:(n/=e,n%1==0?s(n):0)}}return e}function Lt(t){return void 0===bt&&function(){try{bt=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch(t){bt=null}}(),bt?bt.createHTML(t):t}var Tt={...G,inline:!1},zt={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},At={display:"inline-block"},Et={backgroundColor:"currentColor"},Ot={backgroundColor:"transparent"},kt={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},Zt={WebkitMask:Et,mask:Et,background:Ot};for(const Wi in Zt){const t=Zt[Wi];for(const e in kt)t[Wi+e]=kt[e]}var Dt={...Tt,inline:!0};function Ft(t){return t+(t.match(/^[-0-9.]+$/)?"px":"")}var Mt;if(V(!0),Mt=dt,it[""]=Mt,"undefined"!=typeof document&&"undefined"!=typeof window){const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,i="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach(t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e=t.provider||""),$&&!e&&!t.prefix){let e=!1;return M(t)&&(t.prefix="",Z(t,(t,s)=>{(function(t,e){const s=H(t,!0,$);if(!s)return!1;const n=B(s.provider,s.prefix);return e?function(t,e,s){try{if("string"==typeof s.body)return t.icons[e]={...s},!0}catch(i){}return!1}(n,s.name,e):(n.missing.add(s.name),!0)})(t,s)&&(e=!0)})),e}const s=t.prefix;return!!W({prefix:s,name:"a"})&&!!R(B(e,s),t)}(t))&&console.error(i)}catch(e){console.error(i)}})}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const i="IconifyProviders["+t+"] is invalid.";try{const s=e[t];if("object"!=typeof s||!s||void 0===s.resources)continue;lt(t,s)||console.error(i)}catch(Hi){console.error(i)}}}}function Nt(t){const[e,i]=L(!!t.ssr),[s,n]=L({}),[o,r]=L(function(e){if(e){const e=t.icon;if("object"==typeof e)return{name:"",data:e};const i=q(e);if(i)return{name:e,data:i}}return{name:""}}(!!t.ssr));function a(){const t=s.callback;t&&(t(),n({}))}function l(t){if(JSON.stringify(o)!==JSON.stringify(t))return a(),r(t),!0}function h(){var e;const i=t.icon;if("object"==typeof i)return void l({name:"",data:i});const s=q(i);l({name:i,data:s})&&(void 0===s?n({callback:St([i],h)}):s&&(null===(e=t.onLoad)||void 0===e||e.call(t,i)))}P(()=>(i(!0),a),[]),P(()=>{e&&h()},[t.icon,e]);const{name:c,data:d}=o;return d?((t,e,i)=>{const s=e.inline?Dt:Tt,n=function(t,e){const i={...t};for(const s in e){const t=e[s],n=typeof t;s in U?(null===t||t&&("string"===n||"number"===n))&&(i[s]=t):n===typeof i[s]&&(i[s]="rotate"===s?t%4:t)}return i}(s,e),o=e.mode||"svg",r={},a=e.style||{},l={..."svg"===o?zt:{}};if(i){const t=H(i,!1,!0);if(t){const e=["iconify"];for(const i of["provider","prefix"])t[i]&&e.push("iconify--"+t[i]);l.className=e.join(" ")}}for(let v in e){const t=e[v];if(void 0!==t)switch(v){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":case"fallback":break;case"_ref":l.ref=t;break;case"className":l[v]=(l[v]?l[v]+" ":"")+t;break;case"inline":case"hFlip":case"vFlip":n[v]=!0===t||"true"===t||1===t;break;case"flip":"string"==typeof t&&It(n,t);break;case"color":r.color=t;break;case"rotate":"string"==typeof t?n[v]=Ct(t):"number"==typeof t&&(n[v]=t);break;case"ariaHidden":case"aria-hidden":!0!==t&&"true"!==t&&delete l["aria-hidden"];break;default:void 0===s[v]&&(l[v]=t)}}const h=function(t,e){const i={...A,...t},s={...G,...e},n={left:i.left,top:i.top,width:i.width,height:i.height};let o=i.body;[i,s].forEach(t=>{const e=[],i=t.hFlip,s=t.vFlip;let r,a=t.rotate;switch(i?s?a+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):s&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),a<0&&(a-=4*Math.floor(a/4)),a%=4,a){case 1:r=n.height/2+n.top,e.unshift("rotate(90 "+r.toString()+" "+r.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:r=n.width/2+n.left,e.unshift("rotate(-90 "+r.toString()+" "+r.toString()+")")}a%2==1&&(n.left!==n.top&&(r=n.left,n.left=n.top,n.top=r),n.width!==n.height&&(r=n.width,n.width=n.height,n.height=r)),e.length&&(o=function(t,e){const i=function(t,e="defs"){let i="";const s=t.indexOf("<"+e);for(;s>=0;){const n=t.indexOf(">",s),o=t.indexOf("</"+e);if(-1===n||-1===o)break;const r=t.indexOf(">",o);if(-1===r)break;i+=t.slice(n+1,o).trim(),t=t.slice(0,s).trim()+t.slice(r+1)}return{defs:i,content:t}}(t);return s=i.defs,n=e+i.content+"</g>",s?"<defs>"+s+"</defs>"+n:n;var s,n}(o,'<g transform="'+e.join(" ")+'">'))});const r=s.width,a=s.height,l=n.width,h=n.height;let c,d;null===r?(d=null===a?"1em":"auto"===a?h:a,c=Y(d,l/h)):(c="auto"===r?l:r,d=null===a?Y(c,h/l):"auto"===a?h:a);const p={},u=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(p[t]=e.toString())};u("width",c),u("height",d);const m=[n.left,n.top,l,h];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:o}}(t,n),c=h.attributes;if(n.inline&&(r.verticalAlign="-0.125em"),"svg"===o){l.style={...r,...a},Object.assign(l,c);let t=0,i=e.id;return"string"==typeof i&&(i=i.replace(/-/g,"_")),l.dangerouslySetInnerHTML={__html:Lt(et(h.body,i?()=>i+"ID"+t++:"iconifyReact"))},x("svg",l)}const{body:d,width:p,height:u}=t,m="mask"===o||"bg"!==o&&-1!==d.indexOf("currentColor"),f=function(t,e){let i=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const s in e)i+=" "+s+'="'+e[s]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+i+">"+t+"</svg>"}(d,{...c,width:p+"",height:u+""});var g;return l.style={...r,"--svg":(g=f,'url("'+function(t){return"data:image/svg+xml,"+function(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}(t)}(g)+'")'),width:Ft(c.width),height:Ft(c.height),...At,...m?Et:Ot,...a},x("span",l)})({...A,...d},t,c):t.children?t.children:t.fallback?t.fallback:x("span",{})}var Bt=b((t,e)=>Nt({...t,_ref:e})),Rt=(b((t,e)=>Nt({inline:!0,...t,_ref:e})),t=>"boolean"==typeof t?`${t}`:0===t?"0":t),jt=l,Ht=(t,e)=>i=>{var s;if(null==(null==e?void 0:e.variants))return jt(t,null==i?void 0:i.class,null==i?void 0:i.className);const{variants:n,defaultVariants:o}=e,r=Object.keys(n).map(t=>{const e=null==i?void 0:i[t],s=null==o?void 0:o[t];if(null===e)return null;const r=Rt(e)||Rt(s);return n[t][r]}),a=i&&Object.entries(i).reduce((t,e)=>{let[i,s]=e;return void 0===s||(t[i]=s),t},{});return jt(t,r,null==e||null===(s=e.compoundVariants)||void 0===s?void 0:s.reduce((t,e)=>{let{class:i,className:s,...n}=e;return Object.entries(n).every(t=>{let[e,i]=t;return Array.isArray(i)?i.includes({...o,...a}[e]):{...o,...a}[e]===i})?[...t,i,s]:t},[]),null==i?void 0:i.class,null==i?void 0:i.className)},Wt=Ht("",{variants:{variant:{default:"border-none",outline:"rounded",solid:"bg-background"},size:{sm:"size-4",md:"size-5",lg:"size-6",xl:"size-7","2xl":"size-8","3xl":"size-9"},color:{foreground:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",a11y:"text-primary-foreground",inherit:""}},compoundVariants:[{variant:"outline",color:"primary",class:"border-primary"},{variant:"outline",color:"secondary",class:"border-border"},{variant:"outline",color:"info",class:"border-info"},{variant:"outline",color:"warning",class:"border-warning"},{variant:"outline",color:"success",class:"border-success"},{variant:"outline",color:"error",class:"border-destructive"},{variant:"solid",color:"primary",class:"bg-background text-foreground"},{variant:"solid",color:"secondary",class:"bg-background text-muted-foreground"},{variant:"solid",color:"info",class:"bg-info text-foreground text-text-primary-dark"},{variant:"solid",color:"warning",class:"bg-warning text-foreground text-text-primary-dark"},{variant:"solid",color:"success",class:"bg-success text-foreground text-text-primary-dark"},{variant:"solid",color:"error",class:"bg-destructive text-foreground text-text-primary-dark"}],defaultVariants:{variant:"default",size:"md",color:"foreground"}}),$t=({className:t,color:e="foreground",size:i="md",variant:s="default",name:n="line-md:iconify1",...o})=>/* @__PURE__ */y(Bt,{icon:n,className:c(Wt({color:e,size:i,variant:s,className:t})),...o});function Vt({children:t,asChild:e=!1,...i}){if(e){const e=Array.isArray(t)?t[0]:t;if(e&&e.type)return o(e,{...i,...e.props})}/* @__PURE__ */
|
|
2
2
|
return y("button",{...i,children:t})}var qt=Ht("shadow-outer inline-flex size-fit cursor-pointer items-center justify-center rounded font-medium transition-all duration-200 active:scale-95 disabled:pointer-events-none disabled:opacity-50",{variants:{size:{sm:"gap-1 p-2 text-sm",md:"gap-2 px-4 py-2 text-sm sm:text-base",lg:"gap-2 px-4 py-3 text-lg",icon:"h-9 w-9 p-0"},color:{foreground:"bg-background text-foreground hover:bg-muted active:bg-muted/80",primary:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",info:"bg-info hover:bg-info/90 active:bg-info/80 text-white",warning:"bg-warning hover:bg-warning/90 active:bg-warning/80 text-white",success:"bg-success hover:bg-success/90 active:bg-success/80 text-white",error:"bg-destructive hover:bg-destructive/90 active:bg-destructive/80 text-white"},variant:{default:"",outlined:"bg-transparent hover:bg-current/10 active:bg-current/15",ghost:"border-transparent bg-transparent shadow-none hover:bg-current/10 active:bg-current/15"}},compoundVariants:[{variant:"default",color:"primary",class:"border-primary border"},{variant:"default",color:"info",class:"border-info border"},{variant:"default",color:"warning",class:"border-warning border"},{variant:"default",color:"success",class:"border-success border"},{variant:"default",color:"error",class:"border-destructive border"},{variant:"outlined",color:"foreground",class:"text-foreground border-muted-foreground hover:bg-foreground/10 border bg-transparent"},{variant:"outlined",color:"primary",class:"border-primary text-primary hover:bg-primary/10 border bg-transparent"},{variant:"outlined",color:"info",class:"border-info text-info hover:bg-info/10 border bg-transparent"},{variant:"outlined",color:"warning",class:"border-warning text-warning hover:bg-warning/10 border bg-transparent"},{variant:"outlined",color:"success",class:"border-success text-success hover:bg-success/10 border bg-transparent"},{variant:"outlined",color:"error",class:"border-destructive text-destructive hover:bg-destructive/10 border bg-transparent"},{variant:"ghost",color:"primary",class:"text-primary hover:bg-primary/10"},{variant:"ghost",color:"info",class:"text-info hover:bg-info/10"},{variant:"ghost",color:"warning",class:"text-warning hover:bg-warning/10"},{variant:"ghost",color:"success",class:"text-success hover:bg-success/10"},{variant:"ghost",color:"error",class:"text-destructive hover:bg-destructive/10"}],defaultVariants:{variant:"default",size:"md",color:"primary"}}),Ut=({className:t,type:e="button",disabled:i,loading:s,fullWidth:n,color:o,size:r,variant:a,icon:l,iconName:h,iconSvg:d,asChild:p=!1,immutable:u,elementRef:m,children:f,...g})=>{const v=p?Vt:"button",w=p?{asChild:!0}:{},_=d||l||(h?/* @__PURE__ */y($t,{name:h,className:"text-primary-foreground"}):null);/* @__PURE__ */
|
|
3
3
|
return y(v,{ref:m,type:e,disabled:i||s,className:c(qt({color:o,size:r,variant:a}),t,n&&"w-full"),...w,...g,children:[/* @__PURE__ */y("div",{className:c(s?"collapse":"visible flex items-center gap-3"),children:[_&&!s&&_,f]}),s&&/* @__PURE__ */y("span",{className:"icon-[eos-icons--three-dots-loading] absolute size-6"})]})},Gt={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",blockquote:"blockquote",body1:"p",body2:"p",body3:"p",caption:"span",overline:"span",lead:"p"},Kt=Ht("antialiased",{variants:{variant:{h1:"scroll-m-20 text-4xl font-bold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-bold tracking-tight lg:text-4xl",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold",h5:"scroll-m-20 text-lg font-semibold",h6:"scroll-m-20 text-base font-semibold",body1:"text-base leading-relaxed font-medium",body2:"text-sm leading-relaxed",body3:"text-sm leading-relaxed sm:text-base",p:"text-base leading-7",lead:"text-muted-foreground text-xl leading-relaxed",blockquote:"border-primary/30 text-muted-foreground border-l-4 pl-4 text-base italic",caption:"text-muted-foreground text-xs",overline:"text-muted-foreground text-xs font-medium tracking-widest uppercase"},color:{foreground:"text-foreground",muted:"text-muted-foreground",primary:"text-primary",info:"text-info",warning:"text-warning",success:"text-success",error:"text-destructive",inherit:"text-inherit",secondary:"text-muted-foreground",white:"text-white",black:"text-black",a11y:"text-primary-foreground",light:"text-text-primary-light"},align:{left:"text-left",right:"text-right",center:"text-center",justify:"text-justify"},weight:{normal:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"}},defaultVariants:{variant:"body1",color:"foreground",align:"left"}}),Xt=({variant:t="body1",color:e,align:i,weight:s,transform:n,lines:o,shadow:r,noWrap:a,className:l,immutable:h,...d})=>/* @__PURE__ */y(Gt[t],{className:c(Kt({variant:t,color:e,align:i,weight:s}),n,o&&o>0?`line-clamp-${o}`:void 0,r&&"drop-shadow-[0_1px_2px_rgba(0,0,0,0.5)]",a&&"truncate",l),...d,children:d.children}),Yt=null,Qt=!1,Jt=()=>Yt||(Yt=new Promise(t=>{if("undefined"==typeof window)return void t();if(window.googletag=window.googletag||{cmd:[]},document.querySelector('script[src*="gpt.js"]'))return void t();const e=document.createElement("script");e.src="https://securepubads.g.doubleclick.net/tag/js/gpt.js",e.async=!0,e.crossOrigin="anonymous",e.onload=()=>t(),e.onerror=()=>t(),document.head.appendChild(e)})),te=()=>{Qt||(Qt=!0,window.googletag.enableServices())},ee=t=>{try{const e=(window.googletag.pubads().getSlots?.()??[]).find(e=>e.getSlotElementId?.()===t);e&&window.googletag.destroySlots([e])}catch{}},ie=async()=>{const t=await u();return"string"==typeof t?t:t?.fingerprint},se=()=>{const t=e(null),{props:i,sessionId:n,user:o}=f(),r=i?.organizationId,l=e(null),h=e(null),c=async(e,i)=>{if(e&&i&&(t.current||(t.current=await ie()),t.current))try{await s.post(g.UPDATE_AD_ANALYTICS,{json:{adId:e,type:i,browserFingerprint:t.current},headers:{"x-org-id":r}})}catch(Hi){console.error(Hi)}},d=async t=>{if(n)try{await s.post(g.UPDATE_SESSION,{headers:{"x-org-id":r},json:{sessionId:n,pageViews:t}})}catch(Hi){console.error(Hi)}};return{incrementEventView:async e=>{if(e&&(t.current||(t.current=await ie()),t.current))try{await s.post(g.INCREMENT_EVENT_VIEW,{json:{eventSlug:e,browserFingerprint:t.current},headers:{"x-org-id":r,Authorization:o?`Bearer ${o.token}`:void 0}})}catch(Hi){console.error(Hi)}},captureAdImpression:async t=>c(t,v.AD_IMPRESSION),captureAdEngagement:async t=>c(t,v.AD_ENGAGEMENT),captureAdClick:(t,e,i)=>{if(c(t,v.AD_CLICK),i)switch(e){case a.LINK:window.open(String(i),"_blank");break;case a.EMAIL:window.location.href=`mailto:${String(i)}`;break;case a.PHONE:window.location.href=`tel:${String(i)}`;break;case a.SMS:window.location.href=`sms:${String(i)}`;break;case a.WHATSAPP:window.location.href=`https://wa.me/${String(i)}`;break;case a.MESSENGER:window.location.href=`https://m.me/${String(i)}`;break;default:window.open(String(i),"_blank")}},trackPageView:t=>{l.current&&h.current&&d([{page:l.current,entryTime:h.current,exitTime:Date.now()}]),l.current=t??null,h.current=Date.now()},exportPageViewsData:d,trackGamAnalytics:async({eventId:e,organizationId:i,type:n,creativeId:o,lineItemId:a,advertiserId:l,isEmpty:h})=>{if(!e||!n)return;if(t.current||(t.current=await ie()),!t.current)return;const c=i||r;if(c)try{await s.post(g.UPDATE_GAM_ANALYTICS,{json:{eventId:e,organizationId:c,type:n,browserFingerprint:t.current,...o?{creativeId:o}:{},...a?{lineItemId:a}:{},...l?{advertiserId:l}:{},...void 0!==h?{isEmpty:h}:{}},headers:{"x-org-id":c}})}catch(Hi){console.error(Hi)}}}},ne=({container:t,onClick:e})=>{let i=!1,s=!1,n=0,o=null;const r=()=>{i=!0,n=Date.now()},a=()=>{i=!1},l=()=>{null!==o&&(window.clearTimeout(o),o=null)},h=()=>{o=window.setTimeout(()=>{const o=document.activeElement,r=o instanceof HTMLIFrameElement&&t.contains(o),a=Date.now()-n<=1500;!s&&(r||i&&a)&&(s=!0,e())},0)};return t.addEventListener("pointerenter",r),t.addEventListener("pointerleave",a),window.addEventListener("blur",h),window.addEventListener("focus",l),()=>{t.removeEventListener("pointerenter",r),t.removeEventListener("pointerleave",a),window.removeEventListener("blur",h),window.removeEventListener("focus",l),null!==o&&window.clearTimeout(o)}},oe=r(null),re=({open:e,onOpenChange:s,children:n})=>{const[o,r]=i(!!e);return t(()=>{"boolean"==typeof e&&r(e)},[e]),/* @__PURE__ */y(oe.Provider,{value:{open:o,setOpen:t=>{r(t),s?.(t)}},children:n})},ae=({children:t})=>/* @__PURE__ */y(n,{children:t}),le=({className:t,...e})=>/* @__PURE__ */y("div",{"data-state":p(oe)?.open?"open":"closed",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-2001 bg-black/15 backdrop-blur-md",t),...e}),he=({className:e,children:i,...s})=>{const{organization:n}=f(),o=p(oe);return t(()=>{if(!o?.open)return;const t=t=>{"Escape"===t.key&&o.setOpen(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[o?.open]),o?.open?/* @__PURE__ */y(ae,{children:[/* @__PURE__ */y(le,{onClick:()=>o.setOpen(!1)}),/* @__PURE__ */y("div",{role:"dialog","aria-modal":"true","data-state":o?.open?"open":"closed",className:c("border-border bg-background shadow-outer data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95 max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom fixed top-[50%] left-[50%] z-2002 h-fit w-auto max-w-5xl translate-x-[-50%] translate-y-[-50%] overflow-hidden rounded-t border duration-300 max-sm:top-auto max-sm:bottom-0 max-sm:left-0 max-sm:w-full max-sm:translate-x-0 max-sm:translate-y-0 max-sm:border-x-0 max-sm:border-b-0 sm:rounded",e),style:h(n),...s,children:i})]}):null},ce=({className:t,...e})=>/* @__PURE__ */y("div",{className:c("flex flex-col space-y-1 p-3 text-center sm:text-left",t),...e}),de=({className:t,...e})=>/* @__PURE__ */y("div",{className:c("p- flex justify-end space-x-3",t),...e}),pe=({className:t,...e})=>/* @__PURE__ */y("h2",{className:c("text-center text-lg font-semibold",t),...e}),ue=({className:t,...e})=>/* @__PURE__ */y("p",{className:c("text-muted-foreground text-center text-sm",t),...e}),me=t=>"number"==typeof t&&!isNaN(t),fe=t=>"string"==typeof t,ge=t=>"function"==typeof t;function ve({enter:t,exit:e,appendPosition:i=!1,collapse:s=!0,collapseDuration:n=300}){return function({children:o,position:r,preventExitTransition:a,done:l,nodeRef:h,isIn:c,playToast:d}){let p=i?`${t}--${r}`:t,u=i?`${e}--${r}`:e,m=C(0);return I(()=>{let t=h.current,e=p.split(" "),i=s=>{s.target===h.current&&(d(),t.removeEventListener("animationend",i),t.removeEventListener("animationcancel",i),0===m.current&&"animationcancel"!==s.type&&t.classList.remove(...e))};t.classList.add(...e),t.addEventListener("animationend",i),t.addEventListener("animationcancel",i)},[]),P(()=>{let t=h.current,e=()=>{t.removeEventListener("animationend",e),s?function(t,e,i=300){let{scrollHeight:s,style:n}=t;requestAnimationFrame(()=>{n.minHeight="initial",n.height=s+"px",n.transition=`all ${i}ms`,requestAnimationFrame(()=>{n.height="0",n.padding="0",n.margin="0",setTimeout(e,i)})})}(t,l,n):l()};c||(a?e():(m.current=1,t.className+=` ${u}`,t.addEventListener("animationend",e)))},[c]),_.createElement(_.Fragment,null,o)}}var ye=1,we=()=>""+ye++,_e=/* @__PURE__ */new Map,xe=[],be=/* @__PURE__ */new Set,Se=()=>_e.size>0;function Pe(t,e){_e.forEach(i=>{(null==e||null==e||!e.containerId||(null==e?void 0:e.containerId)===i.id)&&i.toggle(t,null==e?void 0:e.id)})}function Ie(t){return t&&(fe(t.toastId)||me(t.toastId))?t.toastId:we()}function Ce(t,e){return function(t,e){(t=>S(t)||fe(t)||ge(t)||me(t))(t)&&(Se()||xe.push({content:t,options:e}),_e.forEach(i=>{i.buildToast(t,e)}))}(t,e),e.toastId}function Le(t,e){return{...e,type:e&&e.type||t,toastId:Ie(e)}}function Te(t){return(e,i)=>Ce(e,Le(t,i))}function ze(t,e){return Ce(t,Le("default",e))}ze.loading=(t,e)=>Ce(t,Le("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...e})),ze.promise=function(t,{pending:e,error:i,success:s},n){let o;e&&(o=fe(e)?ze.loading(e,n):ze.loading(e.render,{...n,...e}));let r={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},a=(t,e,i)=>{if(null==e)return void ze.dismiss(o);let s={type:t,...r,...n,data:i},a=fe(e)?{render:e}:e;return o?ze.update(o,{...s,...a}):ze(a.render,{...s,...a}),i},l=ge(t)?t():t;return l.then(t=>a("success",s,t)).catch(t=>a("error",i,t)),l},ze.success=Te("success"),ze.info=Te("info"),ze.error=Te("error"),ze.warning=Te("warning"),ze.warn=ze.warning,ze.dark=(t,e)=>Ce(t,Le("default",{theme:"dark",...e})),ze.dismiss=function(t){!function(t){if(Se()){if(null==t||(t=>fe(t)||me(t))(t))_e.forEach(e=>{e.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){let e=_e.get(t.containerId);e?e.removeToast(t.id):_e.forEach(e=>{e.removeToast(t.id)})}}else xe=xe.filter(e=>null!=t&&e.options.toastId!==t)}(t)},ze.clearWaitingQueue=(t={})=>{_e.forEach(e=>{e.props.limit&&(!t.containerId||e.id===t.containerId)&&e.clearQueue()})},ze.isActive=function(t,e){var i;if(e)return!(null==(i=_e.get(e))||!i.isToastActive(t));let s=!1;return _e.forEach(e=>{e.isToastActive(t)&&(s=!0)}),s},ze.update=(t,e={})=>{let i=((t,{containerId:e})=>{var i;return null==(i=_e.get(e||1))?void 0:i.toasts.get(t)})(t,e);if(i){let{props:s,content:n}=i,o={delay:100,...s,...e,toastId:e.toastId||t,updateId:we()};o.toastId!==t&&(o.staleId=t);let r=o.render||n;delete o.render,Ce(r,o)}},ze.done=t=>{ze.update(t,{progress:1})},ze.onChange=function(t){return be.add(t),()=>{be.delete(t)}},ze.play=t=>Pe(!0,t),ze.pause=t=>Pe(!1,t);var Ae=(t,e=!1)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:e}),Ee=(ve(Ae("bounce",!0)),ve(Ae("slide",!0)),ve(Ae("zoom")),ve(Ae("flip")),({url:t,alt:e="",thumbnailUrl:i,blurhash:s,pswpData:o={},curateLink:r,onClick:a})=>{const l=/* @__PURE__ */y(n,{children:[/* @__PURE__ */y(w,{threshold:.1,src:i||t,blurhash:s,alt:e}),o.type===d.VIDEO&&/* @__PURE__ */y("div",{className:"absolute inset-0 top-0 left-0 flex items-center justify-center opacity-75",children:/* @__PURE__ */y("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-16 text-white lg:w-24",viewBox:"0 0 24 24",children:/* @__PURE__ */y("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"})})})]});return a?/* @__PURE__ */y("button",{className:"h-full w-full",onClick:a,children:l}):r?/* @__PURE__ */y(m,{to:r,className:"h-full w-full",children:l}):/* @__PURE__ */y("a",{href:t,className:"pswp-item block h-full w-full",...Object.keys(o).reduce((t,e)=>{const i=o[e];return null==i||""===i||(t[`data-pswp-${s=e,s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=i),t;var s},{}),...i?{"data-pswp-thumbnail-url":i}:{},...s?{"data-pswp-blurhash":s}:{},target:"_blank",rel:"noreferrer",children:l})});function Oe(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function ke(t,e){return t.x=e.x,t.y=e.y,void 0!==e.id&&(t.id=e.id),t}function Ze(t){t.x=Math.round(t.x),t.y=Math.round(t.y)}function De(t,e){const i=Math.abs(t.x-e.x),s=Math.abs(t.y-e.y);return Math.sqrt(i*i+s*s)}function Fe(t,e){return t.x===e.x&&t.y===e.y}function Me(t,e,i){return Math.min(Math.max(t,e),i)}function Ne(t,e,i){let s=`translate3d(${t}px,${e||0}px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function Be(t,e,i,s){t.style.transform=Ne(e,i,s)}function Re(t,e,i,s){t.style.transition=e?`${e} ${i}ms ${s||"cubic-bezier(.4,0,.22,1)"}`:"none"}function je(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}var He="loading",We="loaded",$e="error";function Ve(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function qe(t,e,i=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:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function Ue(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}var Ge=class{constructor(t,e){if(this.element=Oe("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(je(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=Ne(0,0,t/250)):je(this.element,t,e))}destroy(){this.element?.parentNode&&this.element.remove(),this.element=null}},Ke=class{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,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,e){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 Ge(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=Oe("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=Oe("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const e=this.element;this.updateSrcsetSizes(),this.data.srcset&&(e.srcset=this.data.srcset),e.src=this.data.src??"",e.alt=this.data.alt??"",this.state=He,e.complete?this.onLoaded():(e.onload=()=>{this.onLoaded()},e.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=We,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!==We&&this.state!==$e||this.removePlaceholder())}onError(){this.state=$e,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===He,this)}isError(){return this.state===$e}isImageContent(){return"image"===this.type||"ad"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(je(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==$e,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=`${e}px`,t.dataset.largestUsedSize=String(e))}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=Oe("pswp__error-msg","div");t.innerText=this.instance.options?.errorMsg??"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=Oe("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===$e)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||Ue())?(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&&!Ue()?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!==We&&this.state!==$e||this.removePlaceholder()))}};function Xe(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function Ye(t,e,i,s,n){let o=0;if(e.paddingFn)o=e.paddingFn(i,s,n)[t];else if(e.padding)o=e.padding[t];else{const i=`padding${t[0].toUpperCase()}${t.slice(1)}`;e[i]&&(o=e[i])}return Number(o)||0}function Qe(t,e,i,s){return{x:e.x-Ye("left",t,e,i,s)-Ye("right",t,e,i,s),y:e.y-Ye("top",t,e,i,s)-Ye("bottom",t,e,i,s)}}var Je=class{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,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,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,o=i.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 e=`${t}ZoomLevel`,i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_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 ti(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:o}=e;if(o){let r;n=new Je(o,t,-1),r=e.pswp?e.pswp.viewportSize:Xe(o,e);const a=Qe(o,r,t,i);n.update(s.width,s.height,a)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function ei(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return ti(i,e,t)}var ii=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:e}=this;if(e.dispatch("lazyLoad").defaultPrevented)return;const{preload:i}=e.options,s=void 0===t||t>=0;let n;for(n=0;n<=i[1];n++)this.loadSlideByIndex(e.currIndex+(s?n:-n));for(n=1;n<=i[0];n++)this.loadSlideByIndex(e.currIndex+(s?-n:n))}loadSlideByIndex(t){const e=this.pswp.getLoopedIndex(t);let i=this.getContentByIndex(e);i||(i=ei(e,this.pswp),i&&this.addToCache(i))}getContentBySlide(t){let e=this.getContentByIndex(t.index);return e||(e=this.pswp.createContentFromData(t.data,t.index),this.addToCache(e)),e.setSlide(t),e}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 e=this._cachedItems.findIndex(e=>e.index===t);-1!==e&&this._cachedItems.splice(e,1)}getContentByIndex(t){return this._cachedItems.find(e=>e.index===t)}destroy(){this._cachedItems.forEach(t=>t.destroy()),this._cachedItems=[]}},si=class{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}},ni=class{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){this._filters[t]||(this._filters[t]=[]),this._filters[t]?.push({fn:e,priority:i}),this._filters[t]?.sort((t,e)=>t.priority-e.priority),this.pswp?.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter(t=>t.fn!==e)),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){return this._filters[t]?.forEach(t=>{e[0]=t.fn.apply(this,e)}),e[0]}on(t,e){this._listeners[t]||(this._listeners[t]=[]),this._listeners[t]?.push(e),this.pswp?.on(t,e)}off(t,e){this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter(t=>e!==t)),this.pswp?.off(t,e)}dispatch(t,e){if(this.pswp)return this.pswp.dispatch(t,e);const i=new si(t,e);return this._listeners[t]?.forEach(t=>{t.call(this,i)}),i}},oi=class extends ni{getNumItems(){let t=0;const e=this.options?.dataSource;e&&"length"in e?t=e.length:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),e.items&&(t=e.items.length));const i=this.dispatch("numItems",{dataSource:e,numItems:t});return this.applyFilters("numItems",i.numItems,e)}createContentFromData(t,e){return new Ke(t,this,e)}getItemData(t){const e=this.options?.dataSource;let i={};Array.isArray(e)?i=e[t]:e&&"gallery"in e&&(e.items||(e.items=this._getGalleryDOMElements(e.gallery)),i=e.items[t]);let s=i;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?qe(this.options.children,this.options.childSelector,t)||[]:[t]}_toLowerCaseFirstLetter(t){return t?t.charAt(0).toLowerCase()+t.slice(1):t}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,i.dataset.pswpType&&(e.type=i.dataset.pswpType.toLowerCase());const s=t.querySelector("img");s&&(e.msrc=s.currentSrc||s.src,e.alt=s.getAttribute("alt")??""),(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0);const n=["element","src","srcset","width","height","type","msrc","alt","thumbCropped"];Object.keys(i.dataset).filter(t=>t.startsWith("pswp")&&!n.includes(this._toLowerCaseFirstLetter(t.slice(4)))).forEach(t=>{e[this._toLowerCaseFirstLetter(t.slice(4))]=i.dataset[t]})}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return ti(t,this,e)}},ri=class extends oi{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){qe(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(t){if(Ve(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};e.x||e.y||(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=qe(this.options.children,this.options.childSelector,t.currentTarget).findIndex(t=>t===e||t.contains(e));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=qe(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if("function"==typeof(o=i.pswpModule)&&o.prototype&&o.prototype.goTo)s.push(Promise.resolve(i.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(i.pswpModule())}var o;"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=ei(t,this));const r=++this._uid;Promise.all(s).then(t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,r)}})}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen)return;if(this.shouldOpen=!1,window.pswp)return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach(t=>{this._listeners[t]?.forEach(e=>{i.on(t,e)})}),Object.keys(this._filters).forEach(t=>{this._filters[t]?.forEach(e=>{i.addFilter(t,e.fn,e.priority)})}),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),i.init()}destroy(){this.pswp?.destroy(),this.shouldOpen=!1,this._listeners={},qe(this.options.gallery,this.options.gallerySelector).forEach(t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)})}},ai=class{constructor(t){this.gestures=t,this.pswp=t.pswp,this.startPan={x:0,y:0}}start(){this.pswp.currSlide&&ke(this.startPan,this.pswp.currSlide.pan),this.pswp.animations.stopAll()}change(){const{p1:t,prevP1:e,dragAxis:i}=this.gestures,{currSlide:s}=this.pswp;if("y"===i&&this.pswp.options.closeOnVerticalDrag&&s&&s.currZoomLevel<=s.zoomLevels.fit&&!this.gestures.isMultitouch){const i=s.pan.y+(t.y-e.y);if(!this.pswp.dispatch("verticalDrag",{panY:i}).defaultPrevented){this._setPanWithFriction("y",i,.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&&(Ze(s.pan),s.applyCurrentZoomPan()))}end(){const{velocity:t}=this.gestures,{mainScroll:e,currSlide:i}=this.pswp;let s=0;if(this.pswp.animations.stopAll(),e.isShifted()){const i=(e.x-e.getCurrSlideX())/this.pswp.viewportSize.x;t.x<-.5&&i<0||t.x<.1&&i<-.5?(s=1,t.x=Math.min(t.x,0)):(t.x>.5&&i>0||t.x>-.1&&i>.5)&&(s=-1,t.x=Math.max(t.x,0)),e.moveIndexBy(s,!0,t.x,!0)}i&&i.currZoomLevel>i.zoomLevels.max||this.gestures.isMultitouch?this.gestures.zoomLevels.correctZoomPan(!0):(this._finishPanGestureForAxis("x"),this._finishPanGestureForAxis("y"))}_finishPanGestureForAxis(t){const{velocity:e}=this.gestures,{currSlide:i}=this.pswp;if(!i)return;const{pan:s,bounds:n}=i,o=s[t],r=this.pswp.bgOpacity<1&&"y"===t,a=o+e[t]*.995/(1-.995);if(r){const t=this._getVerticalDragRatio(o),e=this._getVerticalDragRatio(a);if(t<0&&e<-.4||t>0&&e>.4)return void this.pswp.close()}const l=n.correctPan(t,a);if(o===l)return;const h=l===a?1:.82,c=this.pswp.bgOpacity,d=l-o;this.pswp.animations.startSpring({name:`panGesture${t}`,isPan:!0,start:o,end:l,velocity:e[t],dampingRatio:h,onUpdate:e=>{if(r&&this.pswp.bgOpacity<1){const t=1-(l-e)/d;this.pswp.applyBgOpacity(Me(c+(1-c)*t,0,1))}s[t]=Math.floor(e),i.applyCurrentZoomPan()}})}_panOrMoveMainScroll(t){const{p1:e,dragAxis:i,prevP1:s,isMultitouch:n}=this.gestures,{currSlide:o,mainScroll:r}=this.pswp,a=e[t]-s[t],l=r.x+a;if(!a||!o)return!1;if("x"===t&&!o.isPannable()&&!n)return r.moveTo(l,!0),!0;const{bounds:h}=o,c=o.pan[t]+a;if(this.pswp.options.allowPanToNext&&"x"===i&&"x"===t&&!n){const e=r.getCurrSlideX(),i=r.x-e,s=a>0,n=!s;if(c>h.min[t]&&s){if(h.min[t]<=this.startPan[t])return r.moveTo(l,!0),!0;this._setPanWithFriction(t,c)}else if(c<h.max[t]&&n){if(this.startPan[t]<=h.max[t])return r.moveTo(l,!0),!0;this._setPanWithFriction(t,c)}else if(0!==i){if(i>0)return r.moveTo(Math.max(l,e),!0),!0;if(i<0)return r.moveTo(Math.min(l,e),!0),!0}else this._setPanWithFriction(t,c)}else"y"===t&&(r.isShifted()||h.min.y===h.max.y)||this._setPanWithFriction(t,c);return!1}_getVerticalDragRatio(t){return(t-(this.pswp.currSlide?.bounds.center.y??0))/(this.pswp.viewportSize.y/3)}_setPanWithFriction(t,e,i){const{currSlide:s}=this.pswp;if(!s)return;const{pan:n,bounds:o}=s;if(o.correctPan(t,e)!==e||i){const s=Math.round(e-n[t]);n[t]+=s*(i||.35)}else n[t]=e}};function li(t){return!!t.target.closest(".pswp__container")}var hi=class{constructor(t){this.gestures=t}click(t,e){const i=e.target.classList,s=i.contains("pswp__img"),n=i.contains("pswp__item")||i.contains("pswp__zoom-wrap");s?this._doClickOrTapAction("imageClick",t,e):n&&this._doClickOrTapAction("bgClick",t,e)}tap(t,e){li(e)&&this._doClickOrTapAction("tap",t,e)}doubleTap(t,e){li(e)&&this._doClickOrTapAction("doubleTap",t,e)}_doClickOrTapAction(t,e,i){const{pswp:s}=this.gestures,{currSlide:n}=s,o=`${t}Action`,r=s.options[o];if(!s.dispatch(o,{point:e,originalEvent:i}).defaultPrevented)if("function"!=typeof r)switch(r){case"close":case"next":s[r]();break;case"zoom":n?.toggleZoom(e);break;case"zoom-or-close":n?.isZoomable()&&n.zoomLevels.secondary!==n.zoomLevels.initial?n.toggleZoom(e):s.options.clickToCloseNonZoomable&&s.close();break;case"toggle-controls":this.gestures.pswp.element?.classList.toggle("pswp--ui-visible")}else r.call(s,e,i)}};function ci(t,e,i){return t.x=(e.x+i.x)/2,t.y=(e.y+i.y)/2,t}var di=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,ke(this._startPan,t.pan)),this.gestures.pswp.animations.stopAllPan(),this._wasOverFitZoomLevel=!1}change(){const{p1:t,startP1:e,p2:i,startP2:s,pswp:n}=this.gestures,{currSlide:o}=n;if(!o)return;const r=o.zoomLevels.min,a=o.zoomLevels.max;if(!o.isZoomable()||n.mainScroll.isShifted())return;ci(this._startZoomPoint,e,s),ci(this._zoomPoint,t,i);let l=1/De(e,s)*De(t,i)*this._startZoomLevel;if(l>o.zoomLevels.initial+o.zoomLevels.initial/15&&(this._wasOverFitZoomLevel=!0),l<r)if(n.options.pinchToClose&&!this._wasOverFitZoomLevel&&this._startZoomLevel<=o.zoomLevels.initial){const t=1-(r-l)/(r/1.2);n.dispatch("pinchClose",{bgOpacity:t}).defaultPrevented||n.applyBgOpacity(t)}else l=r-.15*(r-l);else l>a&&(l=a+.05*(l-a));o.pan.x=this._calculatePanForZoomLevel("x",l),o.pan.y=this._calculatePanForZoomLevel("y",l),o.setZoomLevel(l),o.applyCurrentZoomPan()}end(){const{pswp:t}=this.gestures,{currSlide:e}=t;(!e||e.currZoomLevel<e.zoomLevels.initial)&&!this._wasOverFitZoomLevel&&t.options.pinchToClose?t.close():this.correctZoomPan()}_calculatePanForZoomLevel(t,e){const i=e/this._startZoomLevel;return this._zoomPoint[t]-(this._startZoomPoint[t]-this._startPan[t])*i}correctZoomPan(t){const{pswp:e}=this.gestures,{currSlide:i}=e;if(!i?.isZoomable())return;0===this._zoomPoint.x&&(t=!0);const s=i.currZoomLevel;let n,o=!0;s<i.zoomLevels.initial?n=i.zoomLevels.initial:s>i.zoomLevels.max?n=i.zoomLevels.max:(o=!1,n=s);const r=e.bgOpacity,a=e.bgOpacity<1,l=ke({x:0,y:0},i.pan);let h=ke({x:0,y:0},l);t&&(this._zoomPoint.x=0,this._zoomPoint.y=0,this._startZoomPoint.x=0,this._startZoomPoint.y=0,this._startZoomLevel=s,ke(this._startPan,l)),o&&(h={x:this._calculatePanForZoomLevel("x",n),y:this._calculatePanForZoomLevel("y",n)}),i.setZoomLevel(n),h={x:i.bounds.correctPan("x",h.x),y:i.bounds.correctPan("y",h.y)},i.setZoomLevel(s);const c=!Fe(h,l);if(!c&&!o&&!a)return i._setResolution(n),void i.applyCurrentZoomPan();e.animations.stopAllPan(),e.animations.startSpring({isPan:!0,start:0,end:1e3,velocity:0,dampingRatio:1,naturalFrequency:40,onUpdate:t=>{if(t/=1e3,c||o){if(c&&(i.pan.x=l.x+(h.x-l.x)*t,i.pan.y=l.y+(h.y-l.y)*t),o){const e=s+(n-s)*t;i.setZoomLevel(e)}i.applyCurrentZoomPan()}a&&e.bgOpacity<1&&e.applyBgOpacity(Me(r+(1-r)*t,0,1))},onComplete:()=>{i._setResolution(n),i.applyCurrentZoomPan()}})}},pi=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 ai(this),this.zoomLevels=new di(this),this.tapHandler=new hi(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,e,i,s){const{pswp:n}=this,{events:o}=n,r=s?t+s:"";o.add(n.scrollWrap,t+e,this.onPointerDown.bind(this)),o.add(window,`${t}move`,this.onPointerMove.bind(this)),o.add(window,t+i,this.onPointerUp.bind(this)),r&&o.add(n.scrollWrap,r,this.onPointerUp.bind(this))}onPointerDown(t){const e="mousedown"===t.type||"mouse"===t.pointerType;if(e&&t.button>0)return;const{pswp:i}=this;i.opener.isOpen?i.dispatch("pointerDown",{originalEvent:t}).defaultPrevented||(e&&(i.mouseDetected(),this._preventPointerEventBehaviour(t,"down")),i.animations.stopAll(),this._updatePoints(t,"down"),1===this._numActivePoints&&(this.dragAxis=null,ke(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,ke(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?Fe(this.p1,this.prevP1)||this.drag.change():Fe(this.p1,this.prevP1)&&Fe(this.p2,this.prevP2)||this.zoomLevels.change(),this._updatePrevPoints(),this.raf=requestAnimationFrame(this._rafRenderLoop.bind(this)))}_updateVelocity(t){const e=Date.now(),i=e-this._intervalTime;i<50&&!t||(this.velocity.x=this._getVelocity("x",i),this.velocity.y=this._getVelocity("y",i),this._intervalTime=e,ke(this._intervalP1,this.p1),this._velocityCalculated=!0)}_finishTap(t){const{mainScroll:e}=this.pswp;if(e.isShifted())return void e.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 i=this.pswp.options.doubleTapAction?300:0;this._tapTimer?(this._clearTapTimer(),De(this._lastStartP1,this.startP1)<25&&this.tapHandler.doubleTap(this.startP1,t)):(ke(this._lastStartP1,this.startP1),this._tapTimer=setTimeout(()=>{this.tapHandler.tap(this.startP1,t),this._clearTapTimer()},i))}_clearTapTimer(){this._tapTimer&&(clearTimeout(this._tapTimer),this._tapTimer=null)}_getVelocity(t,e){const i=this.p1[t]-this._intervalP1[t];return Math.abs(i)>1&&e>5?i/e:0}_rafStopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=null)}_preventPointerEventBehaviour(t,e){this.pswp.applyFilters("preventPointerEvent",!0,t,e)&&t.preventDefault()}_updatePoints(t,e){if(this._pointerEventEnabled){const i=t,s=this._ongoingPointers.findIndex(t=>t.id===i.pointerId);"up"===e&&s>-1?this._ongoingPointers.splice(s,1):"down"===e&&-1===s?this._ongoingPointers.push(this._convertEventPosToPoint(i,{x:0,y:0})):s>-1&&this._convertEventPosToPoint(i,this._ongoingPointers[s]),this._numActivePoints=this._ongoingPointers.length,this._numActivePoints>0&&ke(this.p1,this._ongoingPointers[0]),this._numActivePoints>1&&ke(this.p2,this._ongoingPointers[1])}else{const i=t;this._numActivePoints=0,i.type.indexOf("touch")>-1?i.touches&&i.touches.length>0&&(this._convertEventPosToPoint(i.touches[0],this.p1),this._numActivePoints++,i.touches.length>1&&(this._convertEventPosToPoint(i.touches[1],this.p2),this._numActivePoints++)):(this._convertEventPosToPoint(t,this.p1),"up"===e?this._numActivePoints=0:this._numActivePoints++)}}_updatePrevPoints(){ke(this.prevP1,this.p1),ke(this.prevP2,this.p2)}_updateStartPoints(){ke(this.startP1,this.p1),ke(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 e=t>0?"x":"y";Math.abs(this.p1[e]-this.startP1[e])>=10&&(this.dragAxis=e)}}}_convertEventPosToPoint(t,e){return e.x=t.pageX-this.pswp.offset.x,e.y=t.pageY-this.pswp.offset.y,"pointerId"in t?e.id=t.pointerId:void 0!==t.identifier&&(e.id=t.identifier),e}_onClick(t){this.pswp.mainScroll.isShifted()&&(t.preventDefault(),t.stopPropagation())}},ui=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:e}=this.slide,i=this.slide["x"===t?"width":"height"]*this.currZoomLevel,s=Ye("x"===t?"left":"top",e.options,e.viewportSize,this.slide.data,this.slide.index),n=this.slide.panAreaSize[t];this.center[t]=Math.round((n-i)/2)+s,this.max[t]=i>n?Math.round(n-i)+s:this.center[t],this.min[t]=i>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,e){return Me(e,this.max[t],this.min[t])}},mi=class{constructor(t,e,i){this.data=t,this.index=e,this.pswp=i,this.isActive=e===i.currIndex,this.currentResolution=0,this.panAreaSize={x:0,y:0},this.pan={x:0,y:0},this.isFirstSlide=this.isActive&&!i.opener.isOpen,this.zoomLevels=new Je(i.options,t,e,i),this.pswp.dispatch("gettingData",{slide:this,data:this.data,index:e}),this.content=this.pswp.contentLoader.getContentBySlide(this),this.container=Oe("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 ui(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 e=this.currentResolution||this.zoomLevels.initial;if(!e)return;const i=Math.round(this.width*e)||this.pswp.viewportSize.x,s=Math.round(this.height*e)||this.pswp.viewportSize.y;(this.sizeChanged(i,s)||t)&&this.content.setDisplayedSize(i,s)}sizeChanged(t,e){return(t!==this.prevDisplayedWidth||e!==this.prevDisplayedHeight)&&(this.prevDisplayedWidth=t,this.prevDisplayedHeight=e,!0)}getPlaceholderElement(){return this.content.placeholder?.element}zoomTo(t,e,i,s){const{pswp:n}=this;if(!this.isZoomable()||n.mainScroll.isShifted())return;n.dispatch("beforeZoomTo",{destZoomLevel:t,centerPoint:e,transitionDuration:i}),n.animations.stopAllPan();const o=this.currZoomLevel;s||(t=Me(t,this.zoomLevels.min,this.zoomLevels.max)),this.setZoomLevel(t),this.pan.x=this.calculateZoomToPanOffset("x",e,o),this.pan.y=this.calculateZoomToPanOffset("y",e,o),Ze(this.pan);const r=()=>{this._setResolution(t),this.applyCurrentZoomPan()};i?n.animations.startTransition({isPan:!0,name:"zoomTo",target:this.container,transform:this.getCurrentTransform(),onComplete:r,duration:i,easing:n.options.easing}):r()}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,e,i){if(this.bounds.max[t]-this.bounds.min[t]===0)return this.bounds.center[t];e||(e=this.pswp.getViewportCenterPoint()),i||(i=this.zoomLevels.initial);const s=this.currZoomLevel/i;return this.bounds.correctPan(t,(this.pan[t]-e[t])*s+e[t])}panTo(t,e){this.pan.x=this.bounds.correctPan("x",t),this.pan.y=this.bounds.correctPan("y",e),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),ke(this.pan,this.bounds.center),this.pswp.dispatch("initialZoomPan",{slide:this})}_applyZoomTransform(t,e,i){i/=this.currentResolution||this.zoomLevels.initial,Be(this.container,t,e,i)}calculateSize(){const{pswp:t}=this;ke(this.panAreaSize,Qe(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 Ne(this.pan.x,this.pan.y,t)}_setResolution(t){t!==this.currentResolution&&(this.currentResolution=t,this.updateContentSize(),this.pswp.dispatch("resolutionChanged"))}};function fi(t,e,i){t.classList.add("pswp__button--arrow"),t.setAttribute("aria-controls","pswp__items"),e.on("change",()=>{e.options.loop||(t.disabled=i?!(e.currIndex<e.getNumItems()-1):!(e.currIndex>0))})}var gi={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:fi},vi={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,e)=>{fi(t,e,!0)}},yi={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"},wi={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"},_i={name:"counter",order:5,onInit:(t,e)=>{e.on("change",()=>{t.innerText=e.currIndex+1+e.options.indexIndicatorSep+e.getNumItems()})}},xi={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,e)=>{let i,s=null;const n=e=>{var s;i!==e&&(i=e,s=e,t.classList.toggle("pswp__preloader--active",s))},o=()=>{if(!e.currSlide?.content.isLoading())return n(!1),void(s&&(clearTimeout(s),s=null));s||(s=setTimeout(()=>{n(Boolean(e.currSlide?.content.isLoading())),s=null},e.options.preloaderDelay))};e.on("change",o),e.on("loadComplete",t=>{e.currSlide===t.slide&&o()}),e.ui&&(e.ui.updatePreloaderVisibility=o)}},bi=class{constructor(t,e){const i=e.name||e.className;let s=e.html;if(!1===t.options[i])return;"string"==typeof t.options[`${i}SVG`]&&(s=t.options[`${i}SVG`]),t.dispatch("uiElementCreate",{data:e});let n="";e.isButton?(n+="pswp__button ",n+=e.className||`pswp__button--${e.name}`):n+=e.className||`pswp__${e.name}`;let o=e.isButton?e.tagName||"button":e.tagName||"div";o=o.toLowerCase();const r=Oe(n,o);if(e.isButton){"button"===o&&(r.type="button");let{title:s}=e;const{ariaLabel:n}=e;"string"==typeof t.options[`${i}Title`]&&(s=t.options[`${i}Title`]),s&&(r.title=s);const a=n||s;a&&r.setAttribute("aria-label",a)}r.innerHTML=function(t){if("string"==typeof t)return t;if(!t||!t.isCustomSVG)return"";const e=t;let i='<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 %d %d" width="%d" height="%d">';return i=i.split("%d").join(e.size||32),e.outlineID&&(i+=`<use class="pswp__icn-shadow" xlink:href="#${e.outlineID}"/>`),i+=e.inner,i+="</svg>",i}(s),e.onInit&&e.onInit(r,t),e.onClick&&(r.onclick=i=>{"string"==typeof e.onClick?t[e.onClick]():"function"==typeof e.onClick&&e.onClick(i,r,t)});const a=e.appendTo||"bar";let l=t.element;"bar"===a?(t.topBar||(t.topBar=Oe("pswp__top-bar pswp__hide-on-close","div",t.scrollWrap)),l=t.topBar):(r.classList.add("pswp__hide-on-close"),"wrapper"===a&&(l=t.scrollWrap)),l?.appendChild(t.applyFilters("uiElement",r,e))}};function Si(t,e){t.classList.toggle("pswp--zoomed-in",e)}var Pi=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=[yi,gi,vi,wi,xi,_i],t.dispatch("uiRegister"),this.uiElementsData.sort((t,e)=>(t.order||0)-(e.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 bi(this.pswp,t)):this.uiElementsData.push(t)}_onZoomPanUpdate(){const{template:t,currSlide:e,options:i}=this.pswp;if(this.pswp.opener.isClosing||!t||!e)return;let{currZoomLevel:s}=e;if(this.pswp.opener.isOpen||(s=e.zoomLevels.initial),s===this._lastUpdatedZoomLevel)return;this._lastUpdatedZoomLevel=s;const n=e.zoomLevels.initial-e.zoomLevels.secondary;if(Math.abs(n)<.01||!e.isZoomable())return Si(t,!1),void t.classList.remove("pswp--zoom-allowed");t.classList.add("pswp--zoom-allowed"),Si(t,(s===e.zoomLevels.initial?e.zoomLevels.secondary:e.zoomLevels.initial)<=s),"zoom"!==i.imageClickAction&&"zoom-or-close"!==i.imageClickAction||t.classList.add("pswp--click-to-zoom")}},Ii="cubic-bezier(.4,0,.22,1)",Ci=class{constructor(t){this.props=t;const{target:e,onComplete:i,transform:s,onFinish:n=()=>{},duration:o=333,easing:r=Ii}=t;this.onFinish=n;const a=s?"transform":"opacity",l=t[a]??"";this._target=e,this._onComplete=i,this._finished=!1,this._onTransitionEnd=this._onTransitionEnd.bind(this),this._helperTimeout=setTimeout(()=>{Re(e,a,o,r),this._helperTimeout=setTimeout(()=>{e.addEventListener("transitionend",this._onTransitionEnd,!1),e.addEventListener("transitioncancel",this._onTransitionEnd,!1),this._helperTimeout=setTimeout(()=>{this._finalizeAnimation()},o+500),e.style[a]=l},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),Re(this._target),this._target.removeEventListener("transitionend",this._onTransitionEnd,!1),this._target.removeEventListener("transitioncancel",this._onTransitionEnd,!1),this._finished||this._finalizeAnimation()}},Li=class{constructor(t,e,i){this.velocity=1e3*t,this._dampingRatio=e||.75,this._naturalFrequency=i||12,this._dampedFrequency=this._naturalFrequency,this._dampingRatio<1&&(this._dampedFrequency*=Math.sqrt(1-this._dampingRatio*this._dampingRatio))}easeFrame(t,e){let i,s=0;e/=1e3;const n=Math.E**(-this._dampingRatio*this._naturalFrequency*e);if(1===this._dampingRatio)i=this.velocity+this._naturalFrequency*t,s=(t+i*e)*n,this.velocity=s*-this._naturalFrequency+i*n;else if(this._dampingRatio<1){i=1/this._dampedFrequency*(this._dampingRatio*this._naturalFrequency*t+this.velocity);const o=Math.cos(this._dampedFrequency*e),r=Math.sin(this._dampedFrequency*e);s=n*(t*o+i*r),this.velocity=s*-this._naturalFrequency*this._dampingRatio+n*(-this._dampedFrequency*t*r+this._dampedFrequency*i*o)}return s}},Ti=class{constructor(t){this.props=t,this._raf=0;const{start:e,end:i,velocity:s,onUpdate:n,onComplete:o,onFinish:r=()=>{},dampingRatio:a,naturalFrequency:l}=t;this.onFinish=r;const h=new Li(s,a,l);let c=Date.now(),d=e-i;const p=()=>{this._raf&&(d=h.easeFrame(d,Date.now()-c),Math.abs(d)<1&&Math.abs(h.velocity)<50?(n(i),o&&o(),this.onFinish()):(c=Date.now(),n(d+i),this._raf=requestAnimationFrame(p)))};this._raf=requestAnimationFrame(p)}destroy(){this._raf>=0&&cancelAnimationFrame(this._raf),this._raf=0}},zi=class{constructor(){this.activeAnimations=[]}startSpring(t){this._start(t,!0)}startTransition(t){this._start(t)}_start(t,e){const i=e?new Ti(t):new Ci(t);return this.activeAnimations.push(i),i.onFinish=()=>this.stop(i),i}stop(t){t.destroy();const e=this.activeAnimations.indexOf(t);e>-1&&this.activeAnimations.splice(e,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)}},Ai=!1;try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>{Ai=!0}}))}catch(Hi){}var Ei=class{constructor(){this._pool=[]}add(t,e,i,s){this._toggleListener(t,e,i,s)}remove(t,e,i,s){this._toggleListener(t,e,i,s,!0)}removeAll(){this._pool.forEach(t=>{this._toggleListener(t.target,t.type,t.listener,t.passive,!0,!0)}),this._pool=[]}_toggleListener(t,e,i,s,n,o){if(!t)return;const r=n?"removeEventListener":"addEventListener";e.split(" ").forEach(e=>{if(e){o||(n?this._pool=this._pool.filter(s=>s.type!==e||s.listener!==i||s.target!==t):this._pool.push({target:t,type:e,listener:i,passive:s}));const a=!!Ai&&{passive:s||!1};t[r](e,i,a)}})}},Oi={Escape:27,z:90,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Tab:9},ki=(t,e)=>e?t:Oi[t],Zi=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 e=document.activeElement;t.on("destroy",()=>{t.options.returnFocus&&e&&this._wasFocused&&e.focus()})}_focusRoot(){!this._wasFocused&&this.pswp.element&&(this.pswp.element.focus(),this._wasFocused=!0)}_onKeyDown(t){const{pswp:e}=this;if(e.dispatch("keydown",{originalEvent:t}).defaultPrevented)return;if(Ve(t))return;let i,s,n=!1;const o="key"in t;switch(o?t.key:t.keyCode){case ki("Escape",o):e.options.escKey&&(i="close");break;case ki("z",o):i="toggleZoom";break;case ki("ArrowLeft",o):s="x";break;case ki("ArrowUp",o):s="y";break;case ki("ArrowRight",o):s="x",n=!0;break;case ki("ArrowDown",o):n=!0,s="y";break;case ki("Tab",o):this._focusRoot()}if(s){t.preventDefault();const{currSlide:o}=e;e.options.arrowKeys&&"x"===s&&e.getNumItems()>1?i=n?"next":"prev":o&&o.currZoomLevel>o.zoomLevels.fit&&(o.pan[s]+=n?-80:80,o.panTo(o.pan.x,o.pan.y))}i&&(t.preventDefault(),e[i]())}_onFocusIn(t){const{template:e}=this.pswp;e&&document!==t.target&&e!==t.target&&!e.contains(t.target)&&e.focus()}},Di=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:e}=this,i=Math.round(e.viewportSize.x+e.viewportSize.x*e.options.spacing),s=i!==this.slideWidth;s&&(this.slideWidth=i,this.moveTo(this.getCurrSlideX())),this.itemHolders.forEach((e,i)=>{s&&Be(e.el,(i+this._containerShiftIndex)*this.slideWidth),t&&e.slide&&e.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 e=Oe("pswp__item","div",this.pswp.container);e.setAttribute("role","group"),e.setAttribute("aria-roledescription","slide"),e.setAttribute("aria-hidden","true"),e.style.display=1===t?"block":"none",this.itemHolders.push({el:e})}}canBeSwiped(){return this.pswp.getNumItems()>1}moveIndexBy(t,e,i){const{pswp:s}=this;let n=s.potentialIndex+t;const o=s.getNumItems();if(s.canLoop()){n=s.getLoopedIndex(n);const e=(t+o)%o;t=e<=o/2?e:e-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 r=this.getCurrSlideX();if(e){s.animations.startSpring({isMainScroll:!0,start:this.x,end:r,velocity:i||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 e=(t+o)%o;t=e<=o/2?e:e-o}Math.abs(t)>1&&this.updateCurrItem()}else this.moveTo(r),this.updateCurrItem();return Boolean(t)}getCurrSlideX(){return this.slideWidth*this._currPositionIndex}isShifted(){return this.x!==this.getCurrSlideX()}updateCurrItem(){const{pswp:t}=this,e=this._prevPositionIndex-this._currPositionIndex;if(!e)return;this._prevPositionIndex=this._currPositionIndex,t.currIndex=t.potentialIndex;let i,s=Math.abs(e);s>=3&&(this._containerShiftIndex+=e+(e>0?-3:3),s=3,this.itemHolders.forEach(t=>{t.slide?.destroy(),t.slide=void 0}));for(let n=0;n<s;n++)e>0?(i=this.itemHolders.shift(),i&&(this.itemHolders[2]=i,this._containerShiftIndex++,Be(i.el,(this._containerShiftIndex+2)*this.slideWidth),t.setContent(i,t.currIndex-s+n+2))):(i=this.itemHolders.pop(),i&&(this.itemHolders.unshift(i),this._containerShiftIndex--,Be(i.el,this._containerShiftIndex*this.slideWidth),t.setContent(i,t.currIndex+s-n-2)));Math.abs(this._containerShiftIndex)>50&&!this.isShifted()&&(this.resetPosition(),this.resize()),t.animations.stopAllPan(),this.itemHolders.forEach((t,e)=>{t.slide&&t.slide.setIsActive(1===e)}),t.currSlide=this.itemHolders[1]?.slide,t.contentLoader.updateLazy(e),t.currSlide&&t.currSlide.applyCurrentZoomPan(),t.dispatch("change")}moveTo(t,e){if(!this.pswp.canLoop()&&e){let e=(this.slideWidth*this._currPositionIndex-t)/this.slideWidth;e+=this.pswp.currIndex;const i=Math.round(t-this.x);(e<0&&i>0||e>=this.pswp.getNumItems()-1&&i<0)&&(t=this.x+.35*i)}this.x=t,this.pswp.container&&Be(this.pswp.container,t),this.pswp.dispatch("moveMainScroll",{x:t,dragging:e??!1})}},Fi=.003,Mi=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,e=this.pswp.currSlide,{options:i}=t;if("fade"===i.showHideAnimationType?(i.showHideOpacity=!0,this._thumbBounds=void 0):"none"===i.showHideAnimationType?(i.showHideOpacity=!1,this._duration=0,this._thumbBounds=void 0):this.isOpening&&t._initialThumbBounds?this._thumbBounds=t._initialThumbBounds:this._thumbBounds=this.pswp.getThumbBounds(),this._placeholder=e?.getPlaceholderElement(),t.animations.stopAll(),this._useAnimation=Boolean(this._duration&&this._duration>50),this._animateZoom=Boolean(this._thumbBounds)&&e?.content.usePlaceholder()&&(!this.isClosing||!t.mainScroll.isShifted()),this._animateZoom?this._animateRootOpacity=i.showHideOpacity??!1:(this._animateRootOpacity=!0,this.isOpening&&e&&(e.zoomAndPanToInitial(),e.applyCurrentZoomPan())),this._animateBgOpacity=!this._animateRootOpacity&&this.pswp.options.bgOpacity>Fi,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(Fi)),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(Fi)),t.applyBgOpacity(1)):(this._animateBgOpacity&&t.bg&&(t.bg.style.opacity=String(Fi)),t.element&&(t.element.style.opacity="1")),this._animateZoom&&(this._setClosedStateZoomPan(),this._placeholder&&(this._placeholder.style.willChange="transform",this._placeholder.style.opacity=String(Fi)))):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 e=!1,i=!0;var s;(s=this._placeholder,"decode"in s?s.decode().catch(()=>{}):s.complete?Promise.resolve(s):new Promise((t,e)=>{s.onload=()=>t(s),s.onerror=e})).finally(()=>{e=!0,i||t(!0)}),setTimeout(()=>{i=!1,e&&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:e}=this,{innerRect:i}=this._thumbBounds,{currSlide:s,viewportSize:n}=e;if(this._croppedZoom&&i&&this._cropContainer1&&this._cropContainer2){const e=-n.x+(this._thumbBounds.x-i.x)+i.w,s=-n.y+(this._thumbBounds.y-i.y)+i.h,o=n.x-i.w,r=n.y-i.h;t?(this._animateTo(this._cropContainer1,"transform",Ne(e,s)),this._animateTo(this._cropContainer2,"transform",Ne(o,r))):(Be(this._cropContainer1,e,s),Be(this._cropContainer2,o,r))}s&&(ke(s.pan,i||this._thumbBounds),s.currZoomLevel=this._thumbBounds.w/s.width,t?this._animateTo(s.container,"transform",s.getCurrentTransform()):s.applyCurrentZoomPan())}_animateTo(t,e,i){if(!this._duration)return void(t.style[e]=i);const{animations:s}=this.pswp,n={duration:this._duration,easing:this.pswp.options.easing,onComplete:()=>{s.activeAnimations.length||this._onAnimationComplete()},target:t};n[e]=i,s.startTransition(n)}},Ni=class{constructor(t){this.pswp=t,t.events.add(t.element,"wheel",this._onWheel.bind(this))}_onWheel(t){t.preventDefault();const{currSlide:e}=this.pswp;let{deltaX:i,deltaY:s}=t;if(e&&!this.pswp.dispatch("wheel",{originalEvent:t}).defaultPrevented)if(t.ctrlKey||this.pswp.options.wheelToZoom){if(e.isZoomable()){let i=-s;1===t.deltaMode?i*=.05:i*=t.deltaMode?1:.002,i=2**i;const n=e.currZoomLevel*i;e.zoomTo(n,{x:t.clientX,y:t.clientY})}}else e.isPannable()&&(1===t.deltaMode&&(i*=18,s*=18),e.panTo(e.pan.x-i,e.pan.y-s))}},Bi={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)"},Ri=class extends oi{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 Ei,this.animations=new zi,this.mainScroll=new Di(this),this.gestures=new pi(this),this.opener=new Mi(this),this.keyboard=new Zi(this),this.contentLoader=new ii(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 Ni(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 e=this.getNumItems();return this.options.loop&&(t>e-1&&(t-=e),t<0&&(t+=e)),Me(t,0,e-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((e,i)=>{let s=(this.currSlide?.index??0)-1+i;this.canLoop()&&(s=this.getLoopedIndex(s)),s===t&&(this.setContent(e,t,!0),1===i&&(this.currSlide=e.slide,e.slide?.setIsActive(!0)))}),this.dispatch("change")}setContent(t,e,i){if(this.canLoop()&&(e=this.getLoopedIndex(e)),t.slide){if(t.slide.index===e&&!i)return;t.slide.destroy(),t.slide=void 0}!this.canLoop()&&(e<0||e>=this.getNumItems())||(t.slide=new mi(this.getItemData(e),e,this),e===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 e=Xe(this.options,this);!t&&Fe(e,this._prevViewportSize)||(ke(this._prevViewportSize,e),this.dispatch("beforeResize"),ke(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,e){this.offset.x=t,this.offset.y=e,this.dispatch("updateScrollOffset")}_createMainStructure(){this.element=Oe("pswp","div"),this.element.setAttribute("tabindex","-1"),this.element.setAttribute("role","dialog"),this.template=this.element,this.bg=Oe("pswp__bg","div",this.element),this.scrollWrap=Oe("pswp__scroll-wrap","section",this.element),this.container=Oe("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 Pi(this),this.ui.init(),(this.options.appendToEl||document.body).appendChild(this.element)}getThumbBounds(){return function(t,e,i){const s=i.dispatch("thumbBounds",{index:t,itemData:e,instance:i});if(s.thumbBounds)return s.thumbBounds;const{element:n}=e;let o,r;if(n&&!1!==i.options.thumbSelector){const t=i.options.thumbSelector||"img";r=n.matches(t)?n:n.querySelector(t)}return r=i.applyFilters("thumbEl",r,e,t),r&&(o=e.thumbCropped?function(t,e,i){const s=t.getBoundingClientRect(),n=s.width/e,o=s.height/i,r=n>o?n:o,a=(s.width-e*r)/2,l=(s.height-i*r)/2,h={x:s.left+a,y:s.top+l,w:e*r};return h.innerRect={w:s.width,h:s.height,x:a,y:l},h}(r,e.width||e.w||0,e.height||e.h||0):function(t){const e=t.getBoundingClientRect();return{x:e.left,y:e.top,w:e.width}}(r)),i.applyFilters("thumbBounds",o,e,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),{...Bi,...t}}},ji=()=>Promise.resolve(Ri);export{Kt as _,re as a,Ht as b,de as c,ne as d,se as f,Xt as g,Jt as h,ze as i,ce as l,te as m,ri as n,he as o,ee as p,Ee as r,ue as s,ji as t,pe as u,Ut as v,$t as y};
|