@qratilabs/qrati-connect 2.23.4 → 2.23.6
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/element/{DB68-h-C.js → 4VTPoA38.js} +1 -1
- package/element/{BmFX4pgV2.js → 7GXdePWm2.js} +10 -10
- package/element/{CJpmOICA.js → B14kCOq8.js} +1 -1
- package/{umd/CCm2-mcE2.js → element/B78xAjNG2.js} +4 -4
- package/element/{TV5seYRS.js → BItJQVdK.js} +3 -3
- package/element/{DcLlwdC6.js → BNEa3Uj4.js} +1 -1
- package/element/{Hfo3iOYG2.js → BQuhYd4G2.js} +2 -2
- package/element/{B7EvJYrt2.js → BdOzsWR32.js} +1 -1
- package/element/{DGHG5MsV.js → Be1e_ATJ.js} +1 -1
- package/{umd/CwE8D5S0.js → element/BglDIiFp.js} +1 -1
- package/{umd/WX3mhhd9.js → element/BkvtmX4K.js} +1 -1
- package/element/{BhWrOCDI2.js → Bm_xW_Mp2.js} +3 -3
- package/{umd/E5aJy_fH.js → element/BtN9y353.js} +1 -1
- package/element/{CKk0UYyd.js → Byk0pccK.js} +1 -1
- package/element/{CiryJz3K2.js → C3HKK1w_2.js} +85 -86
- package/element/C3uDEVBt.js +1 -0
- package/element/{DZ2f3-jO.js → C8_zGNAf.js} +1 -1
- package/element/{DcL9Mr2r.js → C9ak4yUT.js} +2 -3
- package/element/{YJHG0sOk.js → CCLXmMXp.js} +1 -1
- package/element/{CslFRHxJ2.js → CGc52QIP2.js} +14 -14
- package/{umd/DD6up6cl2.js → element/CXg838Gr2.js} +1 -1
- package/element/{CtYiLBXL.js → Cb1JRT_1.js} +1 -1
- package/{umd/DYU4JC0C2.js → element/CebL6kYV2.js} +4 -4
- package/{umd/DBS5eoAD.js → element/CiiNqDJq.js} +1 -1
- package/element/{CpBGzCRR2.js → Cj4nJyT42.js} +1 -1
- package/{umd/D5TvVWUK.js → element/CnoPTYOO.js} +1 -1
- package/element/{CpaT2goE2.js → CxgDoGDT2.js} +1 -1
- package/{umd/DiBNGdQS.js → element/D0VKfxwE.js} +10 -10
- package/element/{DP5TIAjd2.js → D5MjLaap2.js} +1 -1
- package/element/{DJWnpm1A2.js → D5YBxlTz2.js} +39 -39
- package/{umd/BCyTQnZ1.js → element/D9NypPiv.js} +1 -1
- package/element/{C9HFLidt.js → DIYUC8M3.js} +1 -1
- package/element/{Boh-45fW.js → DNAwNX6_.js} +2 -2
- package/{umd/BCu0TrNB2.js → element/DNG5BSHx2.js} +1 -1
- package/element/DXx41__x2.js +2 -0
- package/{umd/DnW7WNo1.js → element/Dgs_iVn3.js} +1 -1
- package/{umd/BNj7xAbL.js → element/DsvRTvCp.js} +1 -1
- package/element/{DWbLshVZ.js → DvTRhlvs.js} +1 -1
- package/element/{D9MdXU5q2.js → MpvHkxaz2.js} +1 -1
- package/element/R0dHh5Az2.js +9 -0
- package/{umd/u7SUQ9Kb2.js → element/VakK6fPh2.js} +1 -1
- package/element/{CnAKuO192.js → _bFyk49H2.js} +3 -3
- package/element/{DXrH_HhZ.js → _ty2jtjs.js} +1 -1
- package/element/{Crix9_9X.js → b6CwQBFC.js} +5 -5
- package/element/{BbWh89xA2.js → d_bA36WR2.js} +1 -1
- package/element/{CuRZaTn5.js → ekog7y-V.js} +1 -1
- package/{umd/D8Se70tP2.js → element/gjXXuILV2.js} +1 -1
- package/element/{DmSY4t_i.js → qWp4ucdT.js} +1 -1
- package/element/web.es.js +42 -42
- package/package.json +1 -1
- package/react/index.d.mts +6 -117
- package/react/index.d.ts +6 -117
- package/umd/{DB68-h-C.js → 4VTPoA38.js} +1 -1
- package/umd/{BmFX4pgV2.js → 7GXdePWm2.js} +10 -10
- package/umd/{CJpmOICA.js → B14kCOq8.js} +1 -1
- package/{element/CCm2-mcE2.js → umd/B78xAjNG2.js} +4 -4
- package/umd/{TV5seYRS.js → BItJQVdK.js} +3 -3
- package/umd/{DcLlwdC6.js → BNEa3Uj4.js} +1 -1
- package/umd/{Hfo3iOYG2.js → BQuhYd4G2.js} +2 -2
- package/umd/{B7EvJYrt2.js → BdOzsWR32.js} +1 -1
- package/umd/{DGHG5MsV.js → Be1e_ATJ.js} +1 -1
- package/{element/CwE8D5S0.js → umd/BglDIiFp.js} +1 -1
- package/{element/WX3mhhd9.js → umd/BkvtmX4K.js} +1 -1
- package/umd/{BhWrOCDI2.js → Bm_xW_Mp2.js} +3 -3
- package/{element/E5aJy_fH.js → umd/BtN9y353.js} +1 -1
- package/umd/{CKk0UYyd.js → Byk0pccK.js} +1 -1
- package/umd/{CiryJz3K2.js → C3HKK1w_2.js} +85 -86
- package/umd/C3uDEVBt.js +1 -0
- package/umd/{DZ2f3-jO.js → C8_zGNAf.js} +1 -1
- package/umd/{DcL9Mr2r.js → C9ak4yUT.js} +2 -3
- package/umd/{YJHG0sOk.js → CCLXmMXp.js} +1 -1
- package/umd/{CslFRHxJ2.js → CGc52QIP2.js} +14 -14
- package/{element/DD6up6cl2.js → umd/CXg838Gr2.js} +1 -1
- package/umd/{CtYiLBXL.js → Cb1JRT_1.js} +1 -1
- package/{element/DYU4JC0C2.js → umd/CebL6kYV2.js} +4 -4
- package/{element/DBS5eoAD.js → umd/CiiNqDJq.js} +1 -1
- package/umd/{CpBGzCRR2.js → Cj4nJyT42.js} +1 -1
- package/{element/D5TvVWUK.js → umd/CnoPTYOO.js} +1 -1
- package/umd/{CpaT2goE2.js → CxgDoGDT2.js} +1 -1
- package/{element/DiBNGdQS.js → umd/D0VKfxwE.js} +10 -10
- package/umd/{DP5TIAjd2.js → D5MjLaap2.js} +1 -1
- package/umd/{DJWnpm1A2.js → D5YBxlTz2.js} +39 -39
- package/{element/BCyTQnZ1.js → umd/D9NypPiv.js} +1 -1
- package/umd/{C9HFLidt.js → DIYUC8M3.js} +1 -1
- package/umd/{Boh-45fW.js → DNAwNX6_.js} +2 -2
- package/{element/BCu0TrNB2.js → umd/DNG5BSHx2.js} +1 -1
- package/umd/DXx41__x2.js +2 -0
- package/{element/DnW7WNo1.js → umd/Dgs_iVn3.js} +1 -1
- package/{element/BNj7xAbL.js → umd/DsvRTvCp.js} +1 -1
- package/umd/{DWbLshVZ.js → DvTRhlvs.js} +1 -1
- package/umd/{D9MdXU5q2.js → MpvHkxaz2.js} +1 -1
- package/umd/R0dHh5Az2.js +9 -0
- package/{element/u7SUQ9Kb2.js → umd/VakK6fPh2.js} +1 -1
- package/umd/{CnAKuO192.js → _bFyk49H2.js} +3 -3
- package/umd/{DXrH_HhZ.js → _ty2jtjs.js} +1 -1
- package/umd/{Crix9_9X.js → b6CwQBFC.js} +5 -5
- package/umd/{BbWh89xA2.js → d_bA36WR2.js} +1 -1
- package/umd/{CuRZaTn5.js → ekog7y-V.js} +1 -1
- package/{element/D8Se70tP2.js → umd/gjXXuILV2.js} +1 -1
- package/umd/{DmSY4t_i.js → qWp4ucdT.js} +1 -1
- package/umd/web.es.js +42 -42
- package/element/CkgIN-cn2.js +0 -9
- package/element/D9_lIXvx2.js +0 -3
- package/element/qbHuxVSe.js +0 -1
- package/umd/CkgIN-cn2.js +0 -9
- package/umd/D9_lIXvx2.js +0 -3
- package/umd/qbHuxVSe.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t,h as e,r as s,v as n}from"./qbHuxVSe.js";import{G as o,L as i,Z as r,et as a,it as c,l,q as h,tt as p}from"./TV5seYRS.js";import{n as d}from"./DB68-h-C.js";var u=class extends c{#t;#e=void 0;#s;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),a(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&h(e.mutationKey)!==h(this.options.mutationKey)?this.reset():"pending"===this.#s?.state.status&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#i(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#o(),this.#i()}mutate(t,e){return this.#n=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#o(){const t=this.#s?.state??d();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#i(t){o.batch(()=>{if(this.#n&&this.hasListeners()){const s=this.#e.variables,n=this.#e.context,o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===t?.type){try{this.#n.onSuccess?.(t.data,s,n,o)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(t.data,null,s,n,o)}catch(e){Promise.reject(e)}}else if("error"===t?.type){try{this.#n.onError?.(t.error,s,n,o)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,t.error,s,n,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(t=>{t(this.#e)})})}};function m(a,c){const l=i(c),[h]=e(()=>new u(l,a));t(()=>{h.setOptions(a)},[h,a]);const d=s(n(t=>h.subscribe(o.batchCalls(t)),[h]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),m=n((t,e)=>{h.mutate(t,e).catch(r)},[h]);if(d.error&&p(h.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:m,mutateAsync:d.mutate}}function g(t){return t?String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var v={[l.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[l.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[l.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[l.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[l.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[l.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'},f=class{constructor(t,e,s){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=s,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}getElementById(t){const e=this.getRootNode();return"function"==typeof e.getElementById?e.getElementById(t):e.querySelector?.(`#${t}`)||document.getElementById(t)}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full bg-transparent"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),this.captionOn=!this.captionOn;const e=this.querySelector("#pswp__icn-show-caption"),s=this.querySelector("#pswp__icn-hide-caption");e&&(e.style.display=this.captionOn?"inline":"none"),s&&(s.style.display=this.captionOn?"none":"inline")}createCaptionHTML(t){const{id:e,type:s,caption:n,title:o,description:i,targetType:r,targetText:a,targetUrl:c}=t||{},h=Boolean(r)&&String(r)!==String(l.NONE),p=h?r:l.LINK;switch("ad"===s&&this.captureAdImpression&&this.captureAdImpression(e),s){case"image":case"video":return n?.length>0?`\n <div class=" w-full bg-black/50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${g(n)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${g(o)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${g(i)}</h4>\n ${h?`<button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${g(e)}"\n data-target-type="${g(p)}"\n data-target-url="${g(c)}">\n ${v[p]}\n ${g(a)}\n </button>`:""}\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=this.getElementById("pswp-caption-container");if(!e)return;const s=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(s);const n=e.querySelector(".caption-action-button");n&&n.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,s=t.currentTarget.dataset.targetType,n=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,s,n)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=this.getElementById("pswp-caption-container");t&&(t.innerHTML="")}},T={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function w(t){return t&&t.data&&"video"===t.data.type}var q=class{constructor(t,e){this.options=e,this.initLightboxEvents(t),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(t,e,s)=>("video"===t.type&&s&&(s.dataset.pswpVideoSources?t.videoSources=JSON.parse(s.dataset.pswpVideoSources):s.dataset.pswpVideoSrc?t.videoSrc=s.dataset.pswpVideoSrc:t.videoSrc=s.href),t))}initPswpEvents(t){t.on("pointerDown",e=>{const s=t.currSlide;if(w(s)&&this.options.preventDragOffset){const n=e.originalEvent;if("pointerdown"===n.type){const o=Math.ceil(s.height*s.currZoomLevel)+s.bounds.center.y,i=n.pageY-t.offset.y;i>o-this.options.preventDragOffset&&i<o&&e.preventDefault()}}}),t.on("appendHeavy",t=>{w(t.slide)&&!t.slide.isActive&&t.preventDefault()}),t.on("close",()=>{w(t.currSlide.content)&&this.pauseVideo(t.currSlide.content)})}onContentDestroy({content:t}){w(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}onContentResize(t){if(w(t.content)){t.preventDefault();const e=t.width,s=t.height,n=t.content;if(n.element&&(n.element.style.width=`${e}px`,n.element.style.height=`${s}px`),n.slide&&n.slide.placeholder){const t=n.slide.placeholder.element.style;t.transform="none",t.width=`${e}px`,t.height=`${s}px`}}}isKeepingPlaceholder(t,e){return!w(e)&&t}isContentZoomable(t,e){return!w(e)&&t}onContentActivate({content:t}){w(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){w(t)&&this.pauseVideo(t)}onContentAppend(t){w(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}onContentLoad(t){const e=t.content;if(w(t.content)&&(t.preventDefault(),!e.element)){if(e.state="loading",e.type="video",e.element=document.createElement("video"),this.options.videoAttributes)for(let t in this.options.videoAttributes)e.element.setAttribute(t,this.options.videoAttributes[t]||"");e.element.setAttribute("poster",e.data.msrc),this.preloadVideoPoster(e,e.data.msrc),e.element.style.position="relative",e.element.style.left=0,e.element.style.top=0,e.data.videoSources?e.data.videoSources.forEach(t=>{let s=document.createElement("source");s.src=t.src,s.type=t.type,e.element.appendChild(s)}):e.data.videoSrc&&(e.element.src=e.data.videoSrc)}}preloadVideoPoster(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&t.element.play()}pauseVideo(t){t.element&&t.element.pause()}useContentPlaceholder(t,e){return!!w(e)||t}},y=class{constructor(t,e={}){new q(t,{...T,...e})}};export{f as n,m as r,y as t};
|
|
1
|
+
import{b as t,h as e,r as s,v as n}from"./C3uDEVBt.js";import{G as o,L as i,Z as r,et as a,it as c,l,q as h,tt as p}from"./BItJQVdK.js";import{n as d}from"./4VTPoA38.js";var u=class extends c{#t;#e=void 0;#s;#n;constructor(t,e){super(),this.#t=t,this.setOptions(e),this.bindMethods(),this.#o()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#t.defaultMutationOptions(t),a(this.options,e)||this.#t.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&h(e.mutationKey)!==h(this.options.mutationKey)?this.reset():"pending"===this.#s?.state.status&&this.#s.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#o(),this.#i(t)}getCurrentResult(){return this.#e}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#o(),this.#i()}mutate(t,e){return this.#n=e,this.#s?.removeObserver(this),this.#s=this.#t.getMutationCache().build(this.#t,this.options),this.#s.addObserver(this),this.#s.execute(t)}#o(){const t=this.#s?.state??d();this.#e={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#i(t){o.batch(()=>{if(this.#n&&this.hasListeners()){const s=this.#e.variables,n=this.#e.context,o={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};if("success"===t?.type){try{this.#n.onSuccess?.(t.data,s,n,o)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(t.data,null,s,n,o)}catch(e){Promise.reject(e)}}else if("error"===t?.type){try{this.#n.onError?.(t.error,s,n,o)}catch(e){Promise.reject(e)}try{this.#n.onSettled?.(void 0,t.error,s,n,o)}catch(e){Promise.reject(e)}}}this.listeners.forEach(t=>{t(this.#e)})})}};function m(a,c){const l=i(c),[h]=e(()=>new u(l,a));t(()=>{h.setOptions(a)},[h,a]);const d=s(n(t=>h.subscribe(o.batchCalls(t)),[h]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),m=n((t,e)=>{h.mutate(t,e).catch(r)},[h]);if(d.error&&p(h.options.throwOnError,[d.error]))throw d.error;return{...d,mutate:m,mutateAsync:d.mutate}}function g(t){return t?String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"):""}var v={[l.LINK]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h6q.425 0 .713.288T12 4t-.288.713T11 5H5v14h14v-6q0-.425.288-.712T20 12t.713.288T21 13v6q0 .825-.587 1.413T19 21zM19 6.4L10.4 15q-.275.275-.7.275T9 15t-.275-.7t.275-.7L17.6 5H15q-.425 0-.712-.288T14 4t.288-.712T15 3h5q.425 0 .713.288T21 4v5q0 .425-.288.713T20 10t-.712-.288T19 9z"/></svg>',[l.EMAIL]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12v1.45q0 1.475-1.012 2.513T18.5 17q-.875 0-1.65-.375t-1.3-1.075q-.725.725-1.638 1.088T12 17q-2.075 0-3.537-1.463T7 12t1.463-3.537T12 7t3.538 1.463T17 12v1.45q0 .65.425 1.1T18.5 15t1.075-.45t.425-1.1V12q0-3.35-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20h4q.425 0 .713.288T17 21t-.288.713T16 22zm0-7q1.25 0 2.125-.875T15 12t-.875-2.125T12 9t-2.125.875T9 12t.875 2.125T12 15"/></svg>',[l.PHONE]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="M19.95 21q-3.125 0-6.175-1.362t-5.55-3.863t-3.862-5.55T3 4.05q0-.45.3-.75t.75-.3H8.1q.35 0 .625.238t.325.562l.65 3.5q.05.4-.025.675T9.4 8.45L6.975 10.9q.5.925 1.187 1.787t1.513 1.663q.775.775 1.625 1.438T13.1 17l2.35-2.35q.225-.225.588-.337t.712-.063l3.45.7q.35.1.575.363T21 15.9v4.05q0 .45-.3.75t-.75.3M6.025 9l1.65-1.65L7.25 5H5.025q.125 1.025.35 2.025T6.025 9m8.95 8.95q.975.425 1.988.675T19 18.95v-2.2l-2.35-.475zm0 0"/></svg>',[l.SMS]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24"><path fill="currentColor" d="m6 18l-2.3 2.3q-.475.475-1.088.213T2 19.575V4q0-.825.588-1.412T4 2h16q.825 0 1.413.588T22 4v12q0 .825-.587 1.413T20 18zm-.85-2H20V4H4v13.125zM4 16V4zm4-5q.425 0 .713-.288T9 10t-.288-.712T8 9t-.712.288T7 10t.288.713T8 11m4 0q.425 0 .713-.288T13 10t-.288-.712T12 9t-.712.288T11 10t.288.713T12 11m4 0q.425 0 .713-.288T17 10t-.288-.712T16 9t-.712.288T15 10t.288.713T16 11"/></svg>',[l.WHATSAPP]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 258"><defs><linearGradient id="logosWhatsappIcon0" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#1faf38"/><stop offset="100%" stop-color="#60d669"/></linearGradient><linearGradient id="logosWhatsappIcon1" x1="50%" x2="50%" y1="100%" y2="0%"><stop offset="0%" stop-color="#f9f9f9"/><stop offset="100%" stop-color="#fff"/></linearGradient></defs><path fill="url(#logosWhatsappIcon0)" d="M5.463 127.456c-.006 21.677 5.658 42.843 16.428 61.499L4.433 252.697l65.232-17.104a123 123 0 0 0 58.8 14.97h.054c67.815 0 123.018-55.183 123.047-123.01c.013-32.867-12.775-63.773-36.009-87.025c-23.23-23.25-54.125-36.061-87.043-36.076c-67.823 0-123.022 55.18-123.05 123.004"/><path fill="url(#logosWhatsappIcon1)" d="M1.07 127.416c-.007 22.457 5.86 44.38 17.014 63.704L0 257.147l67.571-17.717c18.618 10.151 39.58 15.503 60.91 15.511h.055c70.248 0 127.434-57.168 127.464-127.423c.012-34.048-13.236-66.065-37.3-90.15C194.633 13.286 162.633.014 128.536 0C58.276 0 1.099 57.16 1.071 127.416m40.24 60.376l-2.523-4.005c-10.606-16.864-16.204-36.352-16.196-56.363C22.614 69.029 70.138 21.52 128.576 21.52c28.3.012 54.896 11.044 74.9 31.06c20.003 20.018 31.01 46.628 31.003 74.93c-.026 58.395-47.551 105.91-105.943 105.91h-.042c-19.013-.01-37.66-5.116-53.922-14.765l-3.87-2.295l-40.098 10.513z"/><path fill="#fff" d="M96.678 74.148c-2.386-5.303-4.897-5.41-7.166-5.503c-1.858-.08-3.982-.074-6.104-.074c-2.124 0-5.575.799-8.492 3.984c-2.92 3.188-11.148 10.892-11.148 26.561s11.413 30.813 13.004 32.94c1.593 2.123 22.033 35.307 54.405 48.073c26.904 10.609 32.379 8.499 38.218 7.967c5.84-.53 18.844-7.702 21.497-15.139c2.655-7.436 2.655-13.81 1.859-15.142c-.796-1.327-2.92-2.124-6.105-3.716s-18.844-9.298-21.763-10.361c-2.92-1.062-5.043-1.592-7.167 1.597c-2.124 3.184-8.223 10.356-10.082 12.48c-1.857 2.129-3.716 2.394-6.9.801c-3.187-1.598-13.444-4.957-25.613-15.806c-9.468-8.442-15.86-18.867-17.718-22.056c-1.858-3.184-.199-4.91 1.398-6.497c1.431-1.427 3.186-3.719 4.78-5.578c1.588-1.86 2.118-3.187 3.18-5.311c1.063-2.126.531-3.986-.264-5.579c-.798-1.593-6.987-17.343-9.819-23.64"/></svg>',[l.MESSENGER]:'<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 256 256"><defs><radialGradient id="logosMessenger0" cx="19.247%" cy="99.465%" r="108.96%" fx="19.247%" fy="99.465%"><stop offset="0%" stop-color="#09f"/><stop offset="60.975%" stop-color="#a033ff"/><stop offset="93.482%" stop-color="#ff5280"/><stop offset="100%" stop-color="#ff7061"/></radialGradient></defs><path fill="url(#logosMessenger0)" d="M128 0C55.894 0 0 52.818 0 124.16c0 37.317 15.293 69.562 40.2 91.835c2.09 1.871 3.352 4.493 3.438 7.298l.697 22.77c.223 7.262 7.724 11.988 14.37 9.054L84.111 243.9a10.22 10.22 0 0 1 6.837-.501c11.675 3.21 24.1 4.92 37.052 4.92c72.106 0 128-52.818 128-124.16S200.106 0 128 0"/><path fill="#fff" d="m51.137 160.47l37.6-59.653c5.98-9.49 18.788-11.853 27.762-5.123l29.905 22.43a7.68 7.68 0 0 0 9.252-.027l40.388-30.652c5.39-4.091 12.428 2.36 8.82 8.085l-37.6 59.654c-5.981 9.489-18.79 11.852-27.763 5.122l-29.906-22.43a7.68 7.68 0 0 0-9.25.027l-40.39 30.652c-5.39 4.09-12.427-2.36-8.818-8.085"/></svg>'},f=class{constructor(t,e,s){this.lightbox=t,this.captureAdImpression=e,this.captureAdClick=s,this.captionOn=!0,this.options={captionButtonOrder:8},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}getElementById(t){const e=this.getRootNode();return"function"==typeof e.getElementById?e.getElementById(t):e.querySelector?.(`#${t}`)||document.getElementById(t)}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("uiRegister",()=>{t.ui.registerElement({name:"caption-toggle-button",title:"Toggle caption view",order:this.options.captionButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn p-0.5" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-show-caption"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-caption"/><path id="pswp__icn-show-caption" d="M5 20q-.825 0-1.412-.587T3 18V6q0-.825.588-1.412T5 4h14q.825 0 1.413.588T21 6v12q0 .825-.587 1.413T19 20zm0-2h14V6H5zm2-3h3q.425 0 .713-.288T11 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T11 10.5V10q0-.425-.288-.712T10 9H7q-.425 0-.712.288T6 10v4q0 .425.288.713T7 15m10-6h-3q-.425 0-.712.288T13 10v4q0 .425.288.713T14 15h3q.425 0 .713-.288T18 14v-.5q0-.225-.15-.375t-.375-.15h-.45q-.225 0-.375.15t-.15.375h-2v-3h2q0 .225.15.375t.375.15h.45q.225 0 .375-.15T18 10.5V10q0-.425-.288-.712T17 9M5 18V6z"/><path id="pswp__icn-hide-caption" style="display:none" d="m9.025 9l1.5 1.5H7.5v3h2q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375v.5q0 .425-.288.713T10 15H7q-.425 0-.712-.288T6 14v-4q0-.425.288-.712T7 9zM21 6v10q0 .5-.325.763t-.7.262t-.675-.262T19 16V6H8.975q-.5 0-.75-.312T7.975 5t.25-.687t.75-.313H19q.825 0 1.413.588T21 6m-3 8q0 .225-.088.438t-.262.337L16.375 13.5h.125q0-.225.15-.375t.375-.15h.45q.225 0 .375.15t.15.375zm-1-5q.425 0 .713.288T18 10v.5q0 .225-.15.375t-.375.15h-.45q-.225 0-.375-.15t-.15-.375h-2v1.125l-1.5-1.5V10q0-.425.288-.712T14 9zM5 20q-.825 0-1.412-.587T3 18V6q0-.625.338-1.112t.862-.713L6.025 6H5v12h10.175L1.375 4.225q-.3-.3-.3-.712t.3-.713t.713-.3t.712.3l18.375 18.375q.3.3.3.713t-.3.712t-.712.3t-.713-.3L17.175 20z"/></svg>',onClick:()=>{this.toggleCaption(t)}}),t.ui.registerElement({name:"custom-caption",isButton:!1,appendTo:"root",html:'<div id="pswp-caption-container" class=" absolute bottom-0 w-full bg-transparent"></div>'})}),t.on("change",()=>{this.captionOn&&this.updateCaption(t)}),t.on("close",()=>{this.clearCaption()})}toggleCaption(t){this.captionOn?this.clearCaption():this.updateCaption(t),this.captionOn=!this.captionOn;const e=this.querySelector("#pswp__icn-show-caption"),s=this.querySelector("#pswp__icn-hide-caption");e&&(e.style.display=this.captionOn?"inline":"none"),s&&(s.style.display=this.captionOn?"none":"inline")}createCaptionHTML(t){const{id:e,type:s,caption:n,title:o,description:i,targetType:r,targetText:a,targetUrl:c}=t||{},h=Boolean(r)&&String(r)!==String(l.NONE),p=h?r:l.LINK;switch("ad"===s&&this.captureAdImpression&&this.captureAdImpression(e),s){case"image":case"video":return n?.length>0?`\n <div class=" w-full bg-black/50 p-4 text-gray-300">\n <h3 class=" text-center sm:text-lg">${g(n)}</h3>\n </div>\n `:"";case"ad":return`\n <div class=" w-full bg-black/85 p-4 text-white">\n <div class=" mx-auto w-full max-w-2xl space-y-2 text-center">\n <h3 class=" text-center sm:text-lg">${g(o)}</h3>\n <h4 class=" pb-2 text-center text-sm sm:text-base">${g(i)}</h4>\n ${h?`<button\n class=" flex w-full items-center justify-center gap-3 rounded-md bg-white py-1 text-lg text-black caption-action-button"\n data-id="${g(e)}"\n data-target-type="${g(p)}"\n data-target-url="${g(c)}">\n ${v[p]}\n ${g(a)}\n </button>`:""}\n </div>\n </div>\n `;default:return""}}updateCaption(t){try{const e=this.getElementById("pswp-caption-container");if(!e)return;const s=t.currSlide?.data;e.innerHTML=this.createCaptionHTML(s);const n=e.querySelector(".caption-action-button");n&&n.addEventListener("click",t=>{const e=t.currentTarget.dataset.id,s=t.currentTarget.dataset.targetType,n=t.currentTarget.dataset.targetUrl;this.captureAdClick&&e&&this.captureAdClick(e,s,n)})}catch(e){console.error("Error rendering caption:",e)}}clearCaption(){const t=this.getElementById("pswp-caption-container");t&&(t.innerHTML="")}},T={videoAttributes:{controls:"",playsinline:"",muted:"",preload:"auto"},autoplay:!0,preventDragOffset:40};function w(t){return t&&t.data&&"video"===t.data.type}var q=class{constructor(t,e){this.options=e,this.initLightboxEvents(t),t.on("init",()=>{this.initPswpEvents(t.pswp)})}initLightboxEvents(t){t.on("contentLoad",this.onContentLoad.bind(this)),t.on("contentDestroy",this.onContentDestroy.bind(this)),t.on("contentActivate",this.onContentActivate.bind(this)),t.on("contentDeactivate",this.onContentDeactivate.bind(this)),t.on("contentAppend",this.onContentAppend.bind(this)),t.on("contentResize",this.onContentResize.bind(this)),t.addFilter("isKeepingPlaceholder",this.isKeepingPlaceholder.bind(this)),t.addFilter("isContentZoomable",this.isContentZoomable.bind(this)),t.addFilter("useContentPlaceholder",this.useContentPlaceholder.bind(this)),t.addFilter("domItemData",(t,e,s)=>("video"===t.type&&s&&(s.dataset.pswpVideoSources?t.videoSources=JSON.parse(s.dataset.pswpVideoSources):s.dataset.pswpVideoSrc?t.videoSrc=s.dataset.pswpVideoSrc:t.videoSrc=s.href),t))}initPswpEvents(t){t.on("pointerDown",e=>{const s=t.currSlide;if(w(s)&&this.options.preventDragOffset){const n=e.originalEvent;if("pointerdown"===n.type){const o=Math.ceil(s.height*s.currZoomLevel)+s.bounds.center.y,i=n.pageY-t.offset.y;i>o-this.options.preventDragOffset&&i<o&&e.preventDefault()}}}),t.on("appendHeavy",t=>{w(t.slide)&&!t.slide.isActive&&t.preventDefault()}),t.on("close",()=>{w(t.currSlide.content)&&this.pauseVideo(t.currSlide.content)})}onContentDestroy({content:t}){w(t)&&t._videoPosterImg&&(t._videoPosterImg.onload=t._videoPosterImg.onerror=null,t._videoPosterImg=null)}onContentResize(t){if(w(t.content)){t.preventDefault();const e=t.width,s=t.height,n=t.content;if(n.element&&(n.element.style.width=`${e}px`,n.element.style.height=`${s}px`),n.slide&&n.slide.placeholder){const t=n.slide.placeholder.element.style;t.transform="none",t.width=`${e}px`,t.height=`${s}px`}}}isKeepingPlaceholder(t,e){return!w(e)&&t}isContentZoomable(t,e){return!w(e)&&t}onContentActivate({content:t}){w(t)&&this.options.autoplay&&this.playVideo(t)}onContentDeactivate({content:t}){w(t)&&this.pauseVideo(t)}onContentAppend(t){w(t.content)&&(t.preventDefault(),t.content.isAttached=!0,t.content.appendImage())}onContentLoad(t){const e=t.content;if(w(t.content)&&(t.preventDefault(),!e.element)){if(e.state="loading",e.type="video",e.element=document.createElement("video"),this.options.videoAttributes)for(let t in this.options.videoAttributes)e.element.setAttribute(t,this.options.videoAttributes[t]||"");e.element.setAttribute("poster",e.data.msrc),this.preloadVideoPoster(e,e.data.msrc),e.element.style.position="relative",e.element.style.left=0,e.element.style.top=0,e.data.videoSources?e.data.videoSources.forEach(t=>{let s=document.createElement("source");s.src=t.src,s.type=t.type,e.element.appendChild(s)}):e.data.videoSrc&&(e.element.src=e.data.videoSrc)}}preloadVideoPoster(t,e){!t._videoPosterImg&&e&&(t._videoPosterImg=new Image,t._videoPosterImg.src=e,t._videoPosterImg.complete?t.onLoaded():t._videoPosterImg.onload=t._videoPosterImg.onerror=()=>{t.onLoaded()})}playVideo(t){t.element&&t.element.play()}pauseVideo(t){t.element&&t.element.pause()}useContentPlaceholder(t,e){return!!w(e)||t}},y=class{constructor(t,e={}){new q(t,{...T,...e})}};export{f as n,m as r,y as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as a,t as e}from"./
|
|
1
|
+
import{h as a,t as e}from"./C3uDEVBt.js";import{D as o,n as s}from"./BItJQVdK.js";import{c as l,t as r}from"./b6CwQBFC.js";import{t as i}from"./Cb1JRT_1.js";import{n as t}from"./DvTRhlvs.js";import{t as n}from"./D9NypPiv.js";import{i as d,s as p,t as m}from"./DXx41__x2.js";import{n as c,r as g,t as u}from"./VakK6fPh2.js";var f=()=>{const{t:f}=t(),h=l(),[w,v]=a(""),[b,y]=a(""),[j,C]=a(!1),[N,k]=a(null),[A,P]=a(!1),[S,x]=a({}),{loginUsingEmail:D,loginWithGoogle:E,loginWithApple:F}=s(),[L,O]=a({google:!1,apple:!1}),W=a=>{x(e=>e[a]?{...e,[a]:void 0}:e)},G=async(a,e)=>{O(e=>({...e,[a]:!0})),k(null);try{await(e?.())}catch(o){o instanceof Error?k(o.message):k(`Failed to login with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{O(e=>({...e,[a]:!1}))}};/* @__PURE__ */
|
|
2
2
|
return e("div",{className:"bg-background w-full space-y-6",children:[/* @__PURE__ */e("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const e=d(w),o=p(b);if(e||o)return void x({email:e,password:o});x({}),C(!0),k(null);const s=await(D?.(w.toLowerCase(),b));s?.error&&k(s.error),C(!1)},className:"space-y-6",children:[
|
|
3
3
|
/* @__PURE__ */e("div",{className:"space-y-9",children:[/* @__PURE__ */e(m,{label:f("auth.email","Email address"),name:"email",disabled:j,type:"email",value:w,onChange:a=>{v(a.target.value),W("email")},autoComplete:"email",error:S.email}),/* @__PURE__ */e(m,{label:f("auth.password","Password"),name:"password",disabled:j,type:A?"text":"password",value:b,onChange:a=>{y(a.target.value),W("password")},autoComplete:"current-password",error:S.password,actionLabel:A?"Hide password":"Show password",actionIcon:/* @__PURE__ */e(A?u:c,{className:"size-5"}),onActionClick:()=>P(!A)})]}),N&&/* @__PURE__ */e(i,{align:"center",color:"error",className:"font-medium",children:N}),
|
|
4
4
|
/* @__PURE__ */e("div",{className:"flex justify-end",children:/* @__PURE__ */e(r,{to:o.FORGOT_PASSWORD,state:{from:h.pathname},children:/* @__PURE__ */e(i,{variant:"h6",className:"w-fit",children:f("button.forgotPassword","Forgot Password?")})})}),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
return
|
|
6
|
-
return
|
|
7
|
-
return
|
|
8
|
-
/* @__PURE__ */
|
|
9
|
-
return
|
|
10
|
-
return
|
|
1
|
+
import{E as e,S as t,T as r,b as a,f as n,h as o,p as s,t as l,v as i,w as d,y as c}from"./C3uDEVBt.js";import{a as p,i as m,n as u,s as f}from"./BItJQVdK.js";import{t as h}from"./b6CwQBFC.js";import{r as b}from"./Cb1JRT_1.js";import{t as v}from"./BkvtmX4K.js";var g=b("inline-flex h-fit flex-auto cursor-pointer items-center justify-center border transition-all duration-200 focus:outline-none active:scale-95",{variants:{size:{sm:"gap-1.5 p-1.5 text-xs",md:"gap-3 px-3 py-2 text-sm",lg:"gap-3 px-4 py-3 text-base"}},defaultVariants:{size:"md"}}),x=({size:e,buttons:t=[],onChange:r,selected:a,className:n})=>/* @__PURE__ */l("div",{className:m("button-group-overlap shadow-outer z-0 flex h-fit rounded",n),children:t.map((n,o)=>{const s=0===o,i=o===t.length-1,d=n.value===a;/* @__PURE__ */
|
|
2
|
+
return l("button",{type:"button",onClick:()=>r?.(n.value),className:m(g({size:e}),d?n.activeClassName?n.activeClassName:"bg-primary border-primary text-primary-foreground hover:bg-primary/90 border":"hover:bg-muted/50 active:bg-muted border-border border",s&&"rounded-l",i&&"rounded-r"),children:[!n.icon&&/* @__PURE__ */l("span",{className:"font-medium sm:py-0.5",children:n.text}),n.icon&&/* @__PURE__ */l("div",{className:"size-6",children:n.icon})]},n.value)})}),N=()=>{const{initializing:e,orgRole:t,user:r,loadingUser:a}=u();return{role:t??void 0,isSuper:Boolean(r?.isSuper),loading:Boolean(a||e),isOwner:t===f.OWNER,isAdmin:t===f.ADMIN,isModerator:t===f.MODERATOR}};function q({content:e,children:t,position:r="top",className:a,contentClassName:n}){const[s,i]=o(!1),{organization:d}=u();/* @__PURE__ */
|
|
3
|
+
return l("div",{className:m("relative inline-block",a),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onClick:()=>i(!1),onBlur:()=>i(!1),children:[t,s&&/* @__PURE__ */l("div",{className:m("bg-popover text-popover-foreground border-border animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 pointer-events-auto absolute z-50 rounded border px-3 py-2 text-sm whitespace-nowrap shadow-md",{top:"bottom-full left-1/2 -translate-x-1/2 mb-2",right:"left-full top-1/2 -translate-y-1/2 ml-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2"}[r],n),"data-side":r,style:p(d),role:"tooltip",children:[e,/* @__PURE__ */l("div",{className:m("border-popover absolute h-0 w-0 border-4",{top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent"}[r])})]})]})}function w({className:e}){/* @__PURE__ */
|
|
4
|
+
return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */l("path",{fill:"currentColor",d:"M10.825 22q-.675 0-1.162-.45t-.588-1.1L8.85 18.8q-.325-.125-.612-.3t-.563-.375l-1.55.65q-.625.275-1.25.05t-.975-.8l-1.175-2.05q-.35-.575-.2-1.225t.675-1.075l1.325-1Q4.5 12.5 4.5 12.337v-.675q0-.162.025-.337l-1.325-1Q2.675 9.9 2.525 9.25t.2-1.225L3.9 5.975q.35-.575.975-.8t1.25.05l1.55.65q.275-.2.575-.375t.6-.3l.225-1.65q.1-.65.588-1.1T10.825 2h2.35q.675 0 1.163.45t.587 1.1l.225 1.65q.325.125.613.3t.562.375l1.55-.65q.625-.275 1.25-.05t.975.8l1.175 2.05q.35.575.2 1.225t-.675 1.075l-1.325 1q.025.175.025.338v.674q0 .163-.05.338l1.325 1q.525.425.675 1.075t-.2 1.225l-1.2 2.05q-.35.575-.975.8t-1.25-.05l-1.5-.65q-.275.2-.575.375t-.6.3l-.225 1.65q-.1.65-.587 1.1t-1.163.45zM11 20h1.975l.35-2.65q.775-.2 1.438-.587t1.212-.938l2.475 1.025l.975-1.7l-2.15-1.625q.125-.35.175-.737T17.5 12t-.05-.787t-.175-.738l2.15-1.625l-.975-1.7l-2.475 1.05q-.55-.575-1.212-.962t-1.438-.588L13 4h-1.975l-.35 2.65q-.775.2-1.437.588t-1.213.937L5.55 7.15l-.975 1.7l2.15 1.6q-.125.375-.175.75t-.05.8q0 .4.05.775t.175.75l-2.15 1.625l.975 1.7l2.475-1.05q.55.575 1.213.963t1.437.587zm1.05-4.5q1.45 0 2.475-1.025T15.55 12t-1.025-2.475T12.05 8.5q-1.475 0-2.487 1.025T8.55 12t1.013 2.475T12.05 15.5M12 12"})})}var y=e({open:!1,setOpen:()=>{}});function C({children:e,className:t,open:r,defaultOpen:a=!1,onOpenChange:n}){const[d,c]=o(a),p=void 0!==r?r:d,u=i(e=>{c(e),n?.(e)},[n]),f=s(()=>({open:p,setOpen:u}),[p,u]);/* @__PURE__ */
|
|
5
|
+
return l(y.Provider,{value:f,children:/* @__PURE__ */l("div",{className:m("relative",t),children:e})})}function T({children:e,className:a,asChild:n=!1}){const{open:o,setOpen:s}=c(y),d=i(e=>{e.stopPropagation(),s(!o)},[o,s]);if(n){const n=t(e)[0];return n?r(n,{onClick:e=>{d(e),n.props?.onClick?.(e)},className:m(n.props?.className,a,"cursor-pointer")}):null}/* @__PURE__ */
|
|
6
|
+
return l("span",{onClick:d,className:m("cursor-pointer",a),children:e})}function k({children:e,className:t,align:r="end",side:o="bottom",sideOffset:s=4}){const{open:i,setOpen:d}=c(y),f=n(null),{organization:h}=u();if(a(()=>{if(!i)return;const e=e=>{f.current&&!f.current.contains(e.target)&&d(!1)},t=e=>{"Escape"===e.key&&d(!1)};return document.addEventListener("click",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[i,d]),!i)return null;const b="start"===r?"left-0":"end"===r?"right-0":"left-1/2 -translate-x-1/2",v="bottom"===o?{top:`calc(100% + ${s}px)`}:{bottom:`calc(100% + ${s}px)`};/* @__PURE__ */
|
|
7
|
+
return l("div",{ref:f,style:{...p(h),...v},className:m("bg-popover text-popover-foreground border-border absolute z-50 min-w-32 rounded border p-1 shadow-md","animate-in fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",b,t),"data-side":o,children:e})}function z({children:e,className:a,href:n,onClick:o,onSelect:s,disabled:p,icon:u,title:f,variant:b="default",isChecked:g,isBeta:x,suffix:N,asChild:q}){const{setOpen:w}=c(y),C=m("hover:bg-primary/20 relative flex w-full cursor-pointer items-center gap-3 rounded px-3 py-2 text-left text-sm transition-colors outline-none select-none",p&&"pointer-events-none opacity-50","destructive"===b&&"text-destructive hover:bg-destructive/10 focus:bg-destructive/10",a),T=e??/* @__PURE__ */l(d,{children:[u,
|
|
8
|
+
/* @__PURE__ */l("span",{className:"flex-1 truncate font-medium",children:f}),g&&/* @__PURE__ */l(v,{className:"text-primary size-5"}),x&&/* @__PURE__ */l("span",{className:"bg-primary text-primary-foreground rounded px-1.5 py-0.5 text-[10px]",children:"BETA"}),N&&/* @__PURE__ */l("span",{children:N})]}),k=i(e=>{p||(s?.(e),o?.(),w(!1))},[p,s,o,w]);if(q&&e){const a=t(e)[0];return a?r(a,{onClick:e=>{k(e),a.props?.onClick?.(e)},className:m(a.props?.className,C)}):null}return n?/* @__PURE__ */l(h,{to:n,onClick:k,className:C,children:T}):/* @__PURE__ */l("button",{onClick:k,className:C,disabled:p,type:"button",children:T})}function O({className:e}){/* @__PURE__ */
|
|
9
|
+
return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */l("path",{fill:"currentColor",d:"M9.5 16q-2.725 0-4.612-1.888T3 9.5t1.888-4.612T9.5 3t4.613 1.888T16 9.5q0 1.1-.35 2.075T14.7 13.3l5.6 5.6q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-5.6-5.6q-.75.6-1.725.95T9.5 16m0-2q1.875 0 3.188-1.312T14 9.5t-1.312-3.187T9.5 5T6.313 6.313T5 9.5t1.313 3.188T9.5 14"})})}function M({className:e}){/* @__PURE__ */
|
|
10
|
+
return l("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:[/* @__PURE__ */l("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"}),/* @__PURE__ */l("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:/* @__PURE__ */l("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}export{z as a,q as c,k as i,N as l,O as n,T as o,C as r,w as s,M as t,x as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,s as r,t,v as o}from"./
|
|
1
|
+
import{d as e,s as r,t,v as o}from"./C3uDEVBt.js";import{D as l,n as s}from"./BItJQVdK.js";import{l as i}from"./b6CwQBFC.js";var n=e(()=>import("./Bm_xW_Mp2.js")),a=e(()=>import("./B78xAjNG2.js")),c=e(()=>import("./_bFyk49H2.js")),d=e(()=>import("./CebL6kYV2.js")),p=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"text-center",children:[
|
|
2
2
|
/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground mx-auto mb-3 size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:[/* @__PURE__ */t("path",{d:"M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z"}),/* @__PURE__ */t("circle",{cx:"12",cy:"9",r:"2.5"})]}),
|
|
3
3
|
/* @__PURE__ */t("p",{class:"text-foreground",children:"No location data available."}),
|
|
4
4
|
/* @__PURE__ */t("p",{class:"text-muted-foreground mt-1 text-xs",children:"Events need location data to appear on the map."})]})}),m=()=>/* @__PURE__ */t("div",{class:"flex h-full items-center justify-center",children:/* @__PURE__ */t("div",{class:"border-primary size-8 animate-spin rounded-full border-4 border-t-transparent"})}),g=({events:e,isLoading:g=!1})=>{const{organization:x}=s(),f=i(),h=x?.integrationSettings??{},u=h.mapProvider??"openstreetmap",v=o(e=>{f(l.GALLERY(e))},[f]);if("openstreetmap_free"===u)/* @__PURE__ */return t("div",{class:"relative mt-3 h-screen sm:mt-6",children:/* @__PURE__ */t(r,{fallback:/* @__PURE__ */t(m,{}),children:/* @__PURE__ */t(n,{onExplore:v,logoUrl:x?.logoUrl})})});const y=h.mapTilerApiKey??"",b=h.googleMapsApiKey??"",w=h.mapboxApiKey??"",j=e.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);/* @__PURE__ */
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return
|
|
3
|
-
return
|
|
4
|
-
return
|
|
5
|
-
/* @__PURE__ */
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
-
return
|
|
9
|
-
return
|
|
10
|
-
return
|
|
11
|
-
return
|
|
12
|
-
return
|
|
13
|
-
return
|
|
14
|
-
return
|
|
15
|
-
return
|
|
16
|
-
return
|
|
17
|
-
return
|
|
18
|
-
return
|
|
19
|
-
return
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */o("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),Oe=({position:e,gamConfig:n,eventId:a,organizationId:i})=>{const{trackGamAnalytics:s}=ie(),l=r(null),d=`gam-${e}-banner-${a??"ev"}`,u=n.placementCategories?.[e];return t(()=>{let e=!1,t=null,r=null,o=null,m=null,g=null,h=null;const p=u?[u]:[],f=document.createElement("div");f.id=d,document.body.appendChild(f);const v=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(d);const l=window.googletag.defineSlot(n.adUnitPath,[[728,90]],d)?.addService(window.googletag.pubads());l&&(t=l,m=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&l.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===l&&s({eventId:a,organizationId:i,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===l&&s({eventId:a,organizationId:i,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),o=ce({container:f,onClick:()=>{s({eventId:a,organizationId:i,type:c.GAM_CLICK})}}),ae(),window.googletag.display(d),r=window.setTimeout(()=>{e||(v(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==r&&window.clearTimeout(r),o?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const n=t;t=null,n&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([n])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,n.adUnitPath,i,u,e,d]),/* @__PURE__ */o("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */o("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},je=({gamConfig:e,eventId:n,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),s=r(null),l=`gam-right-${n??"ev"}`,d=e.placementCategories?.right??e.placementCategories?.sidebar;return t(()=>{let t=!1,r=null,o=null,u=null,m=null,g=null,h=null;const p=d?[d]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const v=()=>{const e=s.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),t||window.googletag.cmd.push(()=>{if(t)return;oe(l);const s=window.googletag.defineSlot(e.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());s&&(r=s,m=window.googletag.pubads(),n?s.setConfig({targeting:{qrati_event:n,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&s.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===s&&i({eventId:n,organizationId:a,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===s&&i({eventId:n,organizationId:a,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=ce({container:f,onClick:()=>{i({eventId:n,organizationId:a,type:c.GAM_CLICK})}}),ae(),window.googletag.display(l),o=window.setTimeout(()=>{t||(v(),s.getResponseInformation?.()||window.googletag.pubads().refresh([s]))},1500))})})(),()=>{t=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==o&&window.clearTimeout(o),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const e=r;r=null,e&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([e])}),f.parentNode&&f.parentNode.removeChild(f)}},[n,e.adUnitPath,a,d,l]),/* @__PURE__ */o("div",{ref:s,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},Fe=n(()=>import("./BmFX4pgV2.js")),Be=()=>{const n=R().eventSlug,{loadingUser:l,organization:c}=C(),p=u(),[f,w]=a(""),[b,S]=a(void 0),[z,P]=a(N),[O,F]=a(v),[B,H]=a("undefined"!=typeof window&&window.innerWidth<768?q.SINGLE:q.GRID),U=r(null),{event:G,ads:$,gamConfig:D}=te({eventSlug:n}),{loading:W,isError:K,error:Y,refetch:J,contentsWithAds:ne,hasNextPage:re,fetchNextPage:ae,isFetchingNextPage:se}=(({event:e,ads:t=[],gamConfig:n,sort:r=N,order:a=v,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:d,user:u}=C(),p=c?.organizationId,{isLoading:f,isError:w,error:T,data:q,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S,refetch:L}=M({queryKey:[h.CONTENTS_BY_EVENT(e?._id??""),p??"",r,a,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await g.get(I.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${m[a].sortOrder}${y[r].sortField}`,limit:l},headers:{"x-org-id":p,...u?{Authorization:`Bearer ${u.token}`}:{}}}).json()}catch(T){throw new Error(T instanceof Error?T.message:String(T)||"Failed to fetch contents")}},enabled:!d&&!!e,staleTime:6e4,gcTime:3e5,initialPageParam:1,getPreviousPageParam:e=>A(e),getNextPageParam:_}),z=i(()=>q?.pages?.flatMap(e=>e?.data??[])??[],[q]);return{contents:z,contentsWithAds:i(()=>"gam"===e?.adMode?n?.inGalleryEnabled?((e=[],t,n)=>{if(!n||n<=0)return e;const[r,a]=t.sizes[0]??[300,250];let i=0;const s=[];for(let o=0;o<e.length;o++)s.push(e[o]),n>0&&(o+1)%n===0&&(s.push({_id:`gam-ad-slot-${i}`,type:E.GAM_AD,slotIndex:i,width:r,height:a}),i++);return s})(z,n,e?.adPosition??5):z:((e=[],t=[],n)=>{if(!n||n<=0)return e;let r=0;const a=[];for(let i=0;i<(e?.length||0);i++)a.push(e[i]),t.length>0&&n>0&&(i+1)%n===0&&(a.push({...t[r],type:E.AD,adType:t[r].type}),r=(r+1)%t.length);return a})(z,t,e?.adPosition),[t,z,e?.adMode,e?.adPosition,n]),loading:f,isError:w,error:T,refetch:L,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S}})({event:G,ads:$,gamConfig:D,sort:z,order:O,keywords:f,face:b}),{incrementEventView:oe}=ie(),{start:le,initializing:ce,running:de}=(({ref:e,onBottomReached:n,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const l=r(1),c=r(null),d=r(null),u=r(null),m=r(null),g=r(!1),h=r(),p=r(),[f,v]=a(!1),[w,T]=a(!1),y=()=>{null!==u.current&&u.current.release().then(()=>{u.current=null}).catch(()=>{u.current=null}),m.current&&(document.removeEventListener("visibilitychange",m.current),m.current=null),v(!1),T(!1),e.current&&(e.current.scrollTop=0),c.current&&(window.cancelAnimationFrame(c.current),c.current=null),d.current&&(window.clearTimeout(d.current),d.current=null),g.current&&(h.current&&document.removeEventListener("keydown",h.current),p.current&&document.removeEventListener("fullscreenchange",p.current),g.current=!1)},N=r(e=>{"+"===e.key&&(l.current=Math.min(l.current+1,10)),"-"===e.key&&(l.current=Math.max(l.current-1,1))});N.current=e=>{"+"===e.key&&(l.current=Math.min(l.current+1,10)),"-"===e.key&&(l.current=Math.max(l.current-1,1))};const q=r(()=>{document.fullscreenElement||y()});q.current=()=>{document.fullscreenElement||y()};const x=()=>{e.current&&(e.current.scrollTop+=l.current,i&&!o&&s&&e.current.scrollTop+e.current.clientHeight>=.5*e.current.scrollHeight&&s(),e.current.scrollTop+e.current.clientHeight>=e.current.scrollHeight?(v(!1),c.current&&(window.cancelAnimationFrame(c.current),c.current=null),d.current=window.setTimeout(()=>{T(!0),n?.(),d.current=window.setTimeout(()=>{e.current&&(e.current.scrollTop=0),T(!1),v(!0)},1e3)},1e3)):c.current=window.requestAnimationFrame(x))};return t(()=>(f&&(d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{c.current=window.requestAnimationFrame(x)},300)),()=>{c.current&&window.cancelAnimationFrame(c.current)}),[f,i,o,s,n]),t(()=>()=>{y()},[]),{start:()=>{if(e?.current?.requestFullscreen)e.current.requestFullscreen();else{const t=e.current;t?.webkitRequestFullscreen?t.webkitRequestFullscreen():t?.mozRequestFullScreen?t.mozRequestFullScreen():t?.msRequestFullscreen&&t.msRequestFullscreen()}(async()=>{try{if("wakeLock"in navigator){u.current=await navigator.wakeLock.request("screen");const e=async()=>{null!==u.current&&"visible"===document.visibilityState&&(u.current=await navigator.wakeLock.request("screen"))};m.current=e,document.addEventListener("visibilitychange",e)}}catch(e){}})(),v(!0),g.current||(h.current=e=>N.current(e),p.current=()=>q.current(),document.addEventListener("keydown",h.current),document.addEventListener("fullscreenchange",p.current),g.current=!0)},initializing:w,running:f}})({ref:U,hasNextPage:re,fetchNextPage:ae,isFetchingNextPage:se,onBottomReached:()=>G?._id&&p.refetchQueries({queryKey:[h.CONTENTS_BY_EVENT(G._id)]})});t(()=>{G?.slug&&oe(G.slug)},[G?.slug,oe]);const ue=i(()=>B===q.SINGLE,[B]),ge=i(()=>/* @__PURE__ */o(Le,{event:G,onAutoscrollClick:le}),[G,le]),he=r(null),pe=r(null);t(()=>(he.current&&he.current.disconnect(),he.current=new IntersectionObserver(e=>{e[0].isIntersecting&&re&&!se&&!W&&ae()},{rootMargin:"200px"}),pe.current&&he.current.observe(pe.current),()=>{he.current&&(he.current.disconnect(),he.current=null)}),[re,se,W,ae]);const fe=D?.bannerPositions??[],ve=c?._id,Te=D&&fe.includes("right"),ye=Boolean(c?.integrationSettings?.showQuickSearch);/* @__PURE__ */
|
|
33
|
-
return
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
1
|
+
import{b as e,d as t,f as n,h as r,p as a,s as i,t as s,v as o,w as l}from"./C3uDEVBt.js";import{C as c,D as d,L as u,M as m,N as g,O as h,P as p,S as f,_ as v,b as w,d as T,f as y,g as N,h as q,i as x,j as b,m as E,n as C,p as S,u as I,v as L,x as z,y as k}from"./BItJQVdK.js";import{n as A,r as M,t as _}from"./C8_zGNAf.js";import{t as P,u as R}from"./b6CwQBFC.js";import{t as V}from"./ekog7y-V.js";import{n as O,t as j}from"./Cb1JRT_1.js";import{a as F,c as B,i as H,l as U,n as G,o as $,r as D,s as W,t as Q,u as K}from"./D0VKfxwE.js";import{t as Z}from"./CCLXmMXp.js";import{r as Y}from"./DvTRhlvs.js";import{n as J,t as X}from"./D9NypPiv.js";import{t as ee}from"./DIYUC8M3.js";import{t as te}from"./qWp4ucdT.js";import{t as ne}from"./B14kCOq8.js";import{a as re,i as ae,n as ie,o as se,r as oe,s as le,t as ce}from"./CiiNqDJq.js";import{n as de,r as ue,t as me}from"./gjXXuILV2.js";import{n as ge,t as he}from"./DXx41__x2.js";function pe({className:e}){/* @__PURE__ */
|
|
2
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm0-2h14V5H5zm0 0V5zm2-2h10q.3 0 .45-.275t-.05-.525l-2.75-3.675q-.15-.2-.4-.2t-.4.2L11.25 16L9.4 13.525q-.15-.2-.4-.2t-.4.2l-2 2.675q-.2.25-.05.525T7 17"})})}function fe({className:e}){/* @__PURE__ */
|
|
3
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M15.188 14.688Q16.5 13.375 16.5 11.5t-1.312-3.187T12 7T8.813 8.313T7.5 11.5t1.313 3.188T12 16t3.188-1.312m-5.1-1.276Q9.3 12.625 9.3 11.5t.788-1.912T12 8.8t1.913.788t.787 1.912t-.787 1.913T12 14.2t-1.912-.787m-4.2 3.787q-2.763-1.8-4.363-4.75q-.125-.225-.187-.462t-.063-.488t.063-.488t.187-.462q1.6-2.95 4.363-4.75T12 4t6.113 1.8t4.362 4.75q.125.225.188.463t.062.487t-.062.488t-.188.462q-1.6 2.95-4.362 4.75T12 19t-6.113-1.8m11.3-1.687Q19.55 14.025 20.8 11.5q-1.25-2.525-3.613-4.012T12 6T6.813 7.488T3.2 11.5q1.25 2.525 3.613 4.013T12 17t5.188-1.487"})})}var ve=({description:t,maxLines:a=2,className:i})=>{const[o,l]=r(!1),[c,d]=r(!1),u=n(null),m=n(null);return e(()=>{l(!1)},[t]),e(()=>{if(!u.current||!t)return void d(!1);const e=u.current,n=()=>{const t=window.getComputedStyle(e),r=Math.max(0,Math.floor(e.getBoundingClientRect().width));if(!r)return void(m.current=window.requestAnimationFrame(n));const i=t.lineHeight,s=parseFloat(t.fontSize)||16;let o=1.2*s;i&&"normal"!==i&&(o=i.endsWith("px")?parseFloat(i):parseFloat(i)*s);const l=document.createElement("div");l.style.position="absolute",l.style.visibility="hidden",l.style.pointerEvents="none",l.style.whiteSpace="normal",l.style.width=`${r}px`,l.style.boxSizing=t.boxSizing,l.style.padding=t.padding,l.style.margin=t.margin,l.style.fontSize=t.fontSize,l.style.fontFamily=t.fontFamily,l.style.fontWeight=t.fontWeight,l.style.lineHeight=t.lineHeight,l.style.letterSpacing=t.letterSpacing,l.style.wordBreak="break-word",l.innerText=e.innerText||"",document.body.appendChild(l);const c=l.scrollHeight;document.body.removeChild(l),d(c>o*a+1)},r=()=>{null!==m.current&&window.cancelAnimationFrame(m.current),m.current=window.requestAnimationFrame(n)};let i;r(),window.addEventListener("resize",r);try{i=new MutationObserver(r),i.observe(e,{characterData:!0,childList:!0,subtree:!0})}catch{}return()=>{window.removeEventListener("resize",r),null!==m.current&&window.cancelAnimationFrame(m.current),i?.disconnect()}},[t,a]),t?/* @__PURE__ */s("div",{className:x("relative w-full",i),children:[/* @__PURE__ */s("p",{ref:u,className:x(O({variant:"body2",color:"muted",align:"center"}),"w-full",o?void 0:`line-clamp-${a}`),children:[t,c&&o&&/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!1),className:"text-primary ml-2 text-sm font-medium hover:underline cursor-pointer",children:"see less"})]}),c&&!o&&/* @__PURE__ */s("span",{className:"bg-background absolute right-0 bottom-0 inline-flex items-center pl-2",children:[/* @__PURE__ */s("span",{className:"text-muted-foreground",children:"..."}),/* @__PURE__ */s("button",{type:"button",onClick:()=>l(!0),className:"text-primary ml-1 text-sm font-medium hover:underline cursor-pointer",children:"see more"})]})]}):null},we=()=>{const{t:e}=Y(),{eventSlug:t}=R(),{event:n}=te({eventSlug:t}),{props:r,organization:a}=C(),{curateLabel:i,leaderboardLabel:o}=r??{},{eventViews:l,contentCount:c,curationCount:u}=(({event:e})=>{const{props:t,organization:n}=C(),r=t?.organizationId,{isLoading:a,data:i}=p({queryKey:["event-stats",r??"",e?._id??""],queryFn:async()=>{try{return(await g.get(I.GET_EVENT_STATISTICS,{searchParams:{eventSlug:e?.slug},headers:{"x-org-id":r}}).json()).data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch event stats")}},enabled:!!e&&Boolean(n?.integrationSettings?.showEventStats)});return{isLoading:a,eventViews:"number"==typeof i?.eventViews?i.eventViews:i?.eventViews?.views??0,contentCount:i?.contentCount||0,curationCount:i?.curationCount||0}})({event:n});/* @__PURE__ */
|
|
4
|
+
return s("div",{className:"w-full space-y-3",children:[
|
|
5
|
+
/* @__PURE__ */s("div",{className:"space-y-2 md:-mt-8",children:[/* @__PURE__ */s(j,{variant:"h4",align:"center",immutable:!0,className:"mx-auto max-w-2xl",children:n?.name}),/* @__PURE__ */s(ve,{description:n?.description})]}),a?.integrationSettings?.showEventStats&&/* @__PURE__ */s("div",{className:"flex justify-center",children:/* @__PURE__ */s("div",{className:"flex items-center gap-6",children:[
|
|
6
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(fe,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:l??0})]}),
|
|
7
|
+
/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(pe,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:c})]}),n?.engagementStyle===L.CONTEST&&/* @__PURE__ */s("div",{className:"flex items-center gap-2",children:[/* @__PURE__ */s(le,{className:"text-primary"}),/* @__PURE__ */s(j,{variant:"body1",className:"font-medium",children:u})]})]})}),(n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0||n?.status===k.OPEN&&n?.engagementStyle===L.CONTEST||n?.engagementStyle===L.REACTION&&n?.showLeaderboard||n?.engagementStyle===L.CONTEST)&&/* @__PURE__ */s("div",{className:"flex w-full flex-wrap justify-center gap-3",children:[n?.status===k.OPEN&&n?.uploadLimit&&n.uploadLimit>0&&/* @__PURE__ */s(P,{to:d.UPLOAD(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(ue,{className:"size-5"}),children:e("content.upload","Upload")})}),n?.status===k.OPEN&&n?.engagementStyle===L.CONTEST&&/* @__PURE__ */s(P,{to:d.CURATE(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(le,{className:"size-5"}),children:i||e("content.curate","Curate")})}),n?.showLeaderboard&&/* @__PURE__ */s(P,{to:d.LEADERBOARD(n?.slug??""),children:/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(ne,{className:"size-5"}),children:o||e("content.leaderboard","Leaderboard")})})]})]})},Te=(e,t)=>["in-review-count",e??"",t??""];function ye({className:e}){/* @__PURE__ */
|
|
8
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12.275 9H19.4q-.675-1.725-2.062-2.963T14.15 4.3l-2.3 3.95q-.15.25 0 .5t.425.25m-3.6 1.25q.15.25.425.25t.425-.25L13.1 4.1q-.275-.05-.55-.075T12 4q-1.65 0-3.075.625T6.4 6.3zM4.25 14h4.575q.275 0 .438-.25t.012-.5L5.7 7.1q-.8 1.025-1.25 2.263T4 12q0 .525.063 1.013T4.25 14m5.6 5.7l2.275-3.95q.15-.25-.012-.5t-.438-.25H4.6q.675 1.725 2.063 2.963T9.85 19.7M12 20q1.65 0 3.075-.625T17.6 17.7l-2.275-3.95q-.15-.25-.425-.25t-.425.25L10.9 19.9q.275.05.538.075T12 20m6.3-3.1q.8-1.025 1.25-2.262T20 12q0-.525-.062-1.012T19.75 10h-4.575q-.275 0-.437.25t-.013.5zM12 22q-2.05 0-3.875-.788t-3.187-2.15t-2.15-3.187T2 12q0-2.075.788-3.887t2.15-3.175t3.187-2.15T12 2q2.075 0 3.888.788t3.174 2.15t2.15 3.175T22 12q0 2.05-.788 3.875t-2.15 3.188t-3.175 2.15T12 22"})})}function Ne({className:e}){/* @__PURE__ */
|
|
9
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M11.25 16L9.6 13.8q-.225-.3-.6-.3t-.6.3l-1.8 2.4q-.2.25-.05.525T7 17h10q.3 0 .45-.275t-.05-.525l-2.475-3.3q-.275-.05-.563-.125T13.8 12.6zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h4q.425 0 .713.288T10 4t-.288.713T9 5H5v14h14v-3.325q0-.425.288-.712t.712-.288t.713.288t.287.712V19q0 .825-.587 1.413T19 21zm11.05-10q-1.85 0-3.15-1.312T11.6 6.5t1.313-3.187T16.1 2t3.188 1.313T20.6 6.5q0 .675-.2 1.3t-.5 1.15l2.35 2.35q.275.275.275.7t-.275.7t-.7.275t-.7-.275l-2.4-2.4q-.525.35-1.125.525T16.05 11m.05-2q1.05 0 1.775-.725T18.6 6.5t-.725-1.775T16.1 4t-1.775.725T13.6 6.5t.725 1.775T16.1 9"})})}function qe({className:e}){/* @__PURE__ */
|
|
10
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M7 21q-.425 0-.712-.288T6 20t.288-.712T7 19h4v-3H4q-.825 0-1.412-.587T2 14V5q0-.825.588-1.412T4 3h16q.825 0 1.413.588T22 5v9q0 .825-.587 1.413T20 16h-7v3h4q.425 0 .713.288T18 20t-.288.713T17 21zm-3-7h16V5H4zm0 0V5z"})})}function xe({className:e}){/* @__PURE__ */
|
|
11
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M12 20q-.825 0-1.412-.587T10 18t.588-1.412T12 16t1.413.588T14 18t-.587 1.413T12 20m0-6q-.825 0-1.412-.587T10 12t.588-1.412T12 10t1.413.588T14 12t-.587 1.413T12 14m0-6q-.825 0-1.412-.587T10 6t.588-1.412T12 4t1.413.588T14 6t-.587 1.413T12 8"})})}function be({className:e}){/* @__PURE__ */
|
|
12
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M9 20v-4q-1.275-.1-2.5-.275t-2.45-.45q-.425-.1-.675-.475T3.25 14t.513-.625t.812-.1q1.825.425 3.688.575T12 14t3.738-.15t3.687-.575q.45-.1.825.1t.5.625t-.137.8t-.688.475q-1.225.275-2.45.45T15 16v4q0 .425-.287.713T14 21h-4q-.425 0-.712-.288T9 20m3-7q-.85 0-1.425-.575T10 11q0-.825.575-1.412T12 9q.825 0 1.413.588T14 11q0 .85-.587 1.425T12 13m-7.5-3q-.65 0-1.075-.425T3 8.5q0-.625.425-1.062T4.5 7q.625 0 1.063.438T6 8.5q0 .65-.437 1.075T4.5 10m15 0q-.65 0-1.075-.425T18 8.5q0-.625.425-1.062T19.5 7q.625 0 1.063.438T21 8.5q0 .65-.437 1.075T19.5 10M7.25 6.25q-.65 0-1.075-.425T5.75 4.75q0-.625.425-1.062T7.25 3.25q.625 0 1.063.438T8.75 4.75q0 .65-.437 1.075T7.25 6.25m9.5 0q-.65 0-1.075-.425T15.25 4.75q0-.625.425-1.062t1.075-.438q.625 0 1.063.438t.437 1.062q0 .65-.437 1.075t-1.063.425M12 5q-.65 0-1.075-.425T10.5 3.5q0-.625.425-1.062T12 2q.625 0 1.063.438T13.5 3.5q0 .65-.437 1.075T12 5"})})}function Ee({className:e}){/* @__PURE__ */
|
|
13
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M11 12q-1.65 0-2.825-1.175T7 8t1.175-2.825T11 4t2.825 1.175T15 8t-1.175 2.825T11 12m0-2q.825 0 1.413-.587T13 8t-.587-1.412T11 6t-1.412.588T9 8t.588 1.413T11 10m10.4 12.8l-2.5-2.5q-.525.3-1.125.5T16.5 21q-1.875 0-3.187-1.312T12 16.5t1.313-3.187T16.5 12t3.188 1.313T21 16.5q0 .675-.2 1.275t-.5 1.125l2.5 2.5q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-3.125-4.525Q19 17.55 19 16.5t-.725-1.775T16.5 14t-1.775.725T14 16.5t.725 1.775T16.5 19t1.775-.725M3 18v-.775q0-.85.425-1.575t1.175-1.1q1.05-.55 2.338-.962t2.637-.538q.425-.05.725.25t.3.725t-.3.738t-.725.362q-1.425.175-2.4.525t-1.65.7q-.25.125-.387.363T5 17.225V18h4.6q.425 0 .713.288T10.6 19t-.287.713T9.6 20H5q-.825 0-1.412-.587T3 18m7.175 0"})})}function Ce({className:e}){/* @__PURE__ */
|
|
14
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M5 11q-.825 0-1.412-.587T3 9V5q0-.825.588-1.412T5 3h4q.825 0 1.413.588T11 5v4q0 .825-.587 1.413T9 11zm0 10q-.825 0-1.412-.587T3 19v-4q0-.825.588-1.412T5 13h4q.825 0 1.413.588T11 15v4q0 .825-.587 1.413T9 21zm10-10q-.825 0-1.412-.587T13 9V5q0-.825.588-1.412T15 3h4q.825 0 1.413.588T21 5v4q0 .825-.587 1.413T19 11zm0 10q-.825 0-1.412-.587T13 19v-4q0-.825.588-1.412T15 13h4q.825 0 1.413.588T21 15v4q0 .825-.587 1.413T19 21zM5 9h4V5H5zm10 0h4V5h-4zm0 10h4v-4h-4zM5 19h4v-4H5zM9 9"})})}function Se({className:e}){/* @__PURE__ */
|
|
15
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 3c4.97 0 9 4.03 9 9",children:/* @__PURE__ */s("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})})}var Ie=({event:e})=>{const t=u(),{user:n,props:a}=C(),i=a?.organizationId,[o,l]=r(!1);/* @__PURE__ */
|
|
16
|
+
return s(D,{children:[/* @__PURE__ */s($,{children:/* @__PURE__ */s(o?Se:Ce,{className:"size-6"})}),/* @__PURE__ */s(H,{align:"end",side:"bottom",className:"w-44",children:Object.values(f).map(r=>/* @__PURE__ */s(F,{onClick:()=>(async r=>{l(!0);try{const a=new FormData;a.append("eventId",e?._id??""),a.append("galleryLayout",r),await g.post(I.UPDATE_EVENT_LAYOUT,{body:a,headers:{"x-org-id":i,Authorization:n?`Bearer ${n.token}`:void 0}}),t.invalidateQueries({queryKey:[`event-data-${i??""}-${e?.slug??""}`]})}catch(a){console.error(a)}l(!1)})(r),isChecked:e?.galleryLayout===r,title:ge(r)},r))})]})},Le=({event:e,onAutoscrollClick:t})=>{const{t:n}=Y(),{isSuper:r,isOwner:i,isAdmin:o,isModerator:l}=U(),{inReviewCount:c}=(e=>{const t=u(),{props:n}=C(),r=n?.organizationId,{role:a,isSuper:i}=U(),{isLoading:s,data:o,isError:l,error:c}=p({queryKey:Te(r,e?.slug),queryFn:async()=>{try{const t=await g.get(I.GET_CONTENTS_COUNT,{searchParams:{eventSlug:e?.slug,filter:`status:${S.IN_REVIEW}`},headers:{"x-org-id":r}}).json();if(t.error)throw new Error(t.error);return t.data}catch(t){throw new Error(t instanceof Error?t.message:String(t)||"Failed to fetch in review count")}},staleTime:0,enabled:Boolean(a)||Boolean(i)});return{loading:s,inReviewCount:o,error:l?c:null,increment:()=>{t.setQueryData(Te(r,e?.slug),e=>(e??0)+1)},decrement:()=>{t.setQueryData(Te(r,e?.slug),e=>Math.max(0,(e??0)-1))}}})(e),d=r||i||o||l,m=r||i||o,h=a(()=>{const t=[];return m&&t.push({title:n("event.shot_inspector","Shot Inspector"),icon:ye,href:z.EVENT_SHOT_INSPECTOR(e?.slug??"")}),e?.visibility===w.PRIVATE&&d&&t.push({title:n("event.access_requests","Access Requests"),icon:Ee,href:z.EVENT_ACCESS_REQUESTS(e?.slug??"")}),e?.engagementStyle===L.CONTEST&&m&&t.push({title:n("event.curation_details","Curation Details"),icon:be,href:z.EVENT_CURATION_DETAILS(e?.slug??"")}),m&&t.push({title:n("event.edit_event","Edit Event"),icon:W,href:z.EVENT_SETTINGS_BASIC_DETAILS(e?.slug??"")}),t},[e,m,d]);/* @__PURE__ */
|
|
17
|
+
return s("div",{className:"text-muted-foreground sm:text-foreground flex flex-row items-center justify-end gap-6 pr-1 sm:justify-between sm:pr-4",children:["undefined"!=typeof document&&document?.fullscreenEnabled&&t&&/* @__PURE__ */s(B,{content:n("event.kiosk_mode","Kiosk Mode"),children:/* @__PURE__ */s("button",{onClick:t,className:"hidden sm:block",children:/* @__PURE__ */s(qe,{className:"size-6"})})}),"undefined"!=typeof document&&document?.fullscreenEnabled&&m&&/* @__PURE__ */s(Ie,{event:e}),d&&/* @__PURE__ */s(B,{content:n("event.review_contents","Review Contents"),children:/* @__PURE__ */s("a",{target:"_blank",rel:"noreferrer",href:z.EVENT_REVIEW_CONTENTS(e?.slug??""),className:"relative",children:[/* @__PURE__ */s(Ne,{className:"size-6"}),Number(c)>0&&/* @__PURE__ */s("div",{className:"bg-primary text-primary-foreground absolute -top-2 -right-2 rounded-lg px-1 py-0 text-xs",children:c})]})}),h.length>0&&/* @__PURE__ */s(D,{children:[/* @__PURE__ */s($,{children:/* @__PURE__ */s(xe,{className:"size-6"})}),/* @__PURE__ */s(H,{align:"end",side:"bottom",className:"w-48",children:h.map(e=>/* @__PURE__ */s(F,{href:e.href,icon:/* @__PURE__ */s(e.icon,{className:"text-primary"}),title:e.title,suffix:e?.chip?/* @__PURE__ */s("span",{className:"bg-primary text-primary-foreground rounded-full px-1.5 py-0.5 text-[0.5rem] font-medium sm:text-xs",children:e.chip}):void 0,isBeta:"BETA"===e?.chip},e.href??e.title))})]})]})};function ze({className:e}){/* @__PURE__ */
|
|
18
|
+
return s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h16q.425 0 .713.288T21 17t-.288.713T20 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h16q.425 0 .713.288T21 12t-.288.713T20 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}var ke=({engagementStyle:e,sort:t=N,order:n=v,onSortChange:r,onSortOrderChange:i})=>{const{t:o}=Y(),l=a(()=>{const t=Object.keys(y).map(e=>({text:o(`content.sortby_${y[e].label.toLowerCase()}`,y[e].label),value:e,activeClassName:"bg-primary text-primary-foreground"}));return e===L.CONTEST?t:t.filter(e=>e.value!==T.POPULAR)},[e,o]);/* @__PURE__ */
|
|
19
|
+
return s("div",{className:"relative flex w-auto items-center gap-2",children:[/* @__PURE__ */s("button",{type:"button",className:"bg-background rounded p-1",onClick:i,children:/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:x("text-foreground w-7 -scale-x-100 transition-transform",n===b.ASC&&"-scale-y-100"),viewBox:"0 0 24 24",children:/* @__PURE__ */s("path",{fill:"currentColor",d:"M4 18q-.425 0-.712-.288T3 17t.288-.712T4 16h4q.425 0 .713.288T9 17t-.288.713T8 18zm0-5q-.425 0-.712-.288T3 12t.288-.712T4 11h10q.425 0 .713.288T15 12t-.288.713T14 13zm0-5q-.425 0-.712-.288T3 7t.288-.712T4 6h16q.425 0 .713.288T21 7t-.288.713T20 8z"})})}),/* @__PURE__ */s(K,{className:"flex-1 lg:flex-none",selected:t,buttons:l,onChange:e=>r&&r(e)})]})},Ae=["jpg","jpeg","png","webp","heic","tiff","bmp"],Me=({value:t,onChange:i})=>{const[o,l]=r(!1),c=n(null),d=a(()=>t?URL.createObjectURL(t):null,[t]);return e(()=>()=>{d&&URL.revokeObjectURL(d)},[d]),e(()=>{!t&&c.current&&(c.current.value="")},[t]),/* @__PURE__ */s("div",{className:"flex items-center gap-3",children:[!t&&/* @__PURE__ */s("div",{className:"flex items-center gap-4",children:/* @__PURE__ */s("button",{type:"button",onClick:()=>c.current?.click(),className:"border-border flex items-center gap-2 rounded border px-3 py-2.5 "+(o?"bg-opacity-75 cursor-not-allowed":"hover:cursor-pointer"),children:/* @__PURE__ */s(o?J:se,{})})}),t&&d&&/* @__PURE__ */s("img",{src:d,alt:"Facial Search",className:"size-10 rounded object-cover"}),
|
|
20
|
+
/* @__PURE__ */s("input",{ref:c,type:"file",accept:"image/*",className:"hidden",onChange:e=>{const t=e.target?.files?.[0]??null;if(!t)return;const n=(t.name.split(".").pop()||"").toLowerCase();if(!Ae.includes(n))return i(null);(async e=>{if(!e)return;l(!0);let t=e;try{e.size/1024/1024>1&&(t=await de(e,{maxSizeMB:1,maxWidthOrHeight:1600,useWebWorker:!0,preserveExif:!1,maxIteration:3}))}catch(n){console.error(n)}l(!1),i(t)})(t)}})]})},_e={[q.GRID]:{icon:/* @__PURE__ */s(Ce,{className:"size-full text-inherit"})},[q.SINGLE]:{icon:/* @__PURE__ */s(ze,{className:"size-full text-inherit"})}},Pe=Object.keys(_e).map(e=>({icon:_e[e].icon,value:e})),Re=({engagementStyle:t,disabled:a,mode:i,onModeChange:l,sort:c,onSortChange:d,sortOrder:u,onSortOrderChange:m,handleChange:g,face:h,onFaceImageChange:p})=>{const{t:f}=Y(),{organization:v}=C(),[w,T]=r(""),[y,N]=r(null),q=n(null),x=o(()=>{q.current&&(URL.revokeObjectURL(q.current),q.current=null)},[]),b=o(e=>{if(N(e),x(),e){const t=URL.createObjectURL(e);q.current=t,p?.(t)}else p?.(void 0)},[p,x]),E=o(e=>{T(e.target.value)},[]),S=o(e=>{const t=e.key;"Enter"===t?g&&g(w.length>0?w:""):"Escape"===t&&(T(""),g&&g(""))},[w,g]),I=o(()=>{T(""),g&&g("")},[g]),L=o(()=>{g&&g(w)},[w,g]);return e(()=>{h||N(null)},[h]),e(()=>()=>{x()},[x]),/* @__PURE__ */s("div",{className:"mb-3 grid grid-cols-3 md:space-y-0 md:space-x-4",children:[
|
|
21
|
+
/* @__PURE__ */s("div",{className:"col-span-3 flex items-center gap-4 md:col-span-1",children:[v?.integrationSettings?.showGridViewToggle&&/* @__PURE__ */s(K,{buttons:Pe,selected:i,onChange:l}),v?.integrationSettings?.showKeywordSearch&&/* @__PURE__ */s("div",{className:"flex-auto",children:/* @__PURE__ */s("div",{className:"relative min-w-32 sm:min-w-48",children:[
|
|
22
|
+
/* @__PURE__ */s(he,{placeholder:f("content.search_placeholder","Search using text"),value:w,className:"py-2",onChange:E,onKeyUp:S}),w?.length>0&&/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-10 flex items-center",onClick:I,children:/* @__PURE__ */s(ee,{className:"text-foreground w-5"})}),
|
|
23
|
+
/* @__PURE__ */s("button",{className:"absolute inset-y-0 right-3 flex items-center",onClick:L,children:/* @__PURE__ */s(G,{className:"text-foreground w-5"})})]})}),v?.integrationSettings?.showFacialSearch&&/* @__PURE__ */s(Me,{value:y,onChange:b})]}),
|
|
24
|
+
/* @__PURE__ */s("div",{className:"col-span-3 md:col-span-1"}),
|
|
25
|
+
/* @__PURE__ */s("div",{className:"col-span-3 mt-3 md:col-span-1 md:mt-0 lg:justify-self-end",children:/* @__PURE__ */s(ke,{engagementStyle:t,sort:c,order:u,onSortChange:d,onSortOrderChange:m})})]})},Ve=()=>/* @__PURE__ */s("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-full",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-hidden":"true",children:/* @__PURE__ */s("g",{transform:"translate(-443.142 -257.876)",children:[
|
|
26
|
+
/* @__PURE__ */s("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),
|
|
27
|
+
/* @__PURE__ */s("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),
|
|
28
|
+
/* @__PURE__ */s("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),
|
|
29
|
+
/* @__PURE__ */s("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),
|
|
30
|
+
/* @__PURE__ */s("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),
|
|
31
|
+
/* @__PURE__ */s("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),
|
|
32
|
+
/* @__PURE__ */s("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(319.149 22.09)",fill:"none",stroke:"#d6d6e3",strokeWidth:"1.833"})]})}),Oe=({position:t,gamConfig:r,eventId:a,organizationId:i})=>{const{trackGamAnalytics:o}=ie(),l=n(null),d=`gam-${t}-banner-${a??"ev"}`,u=r.placementCategories?.[t];return e(()=>{let e=!1,t=null,n=null,s=null,m=null,g=null,h=null;const p=u?[u]:[],f=document.createElement("div");f.id=d,document.body.appendChild(f);const v=()=>{const e=l.current;if(!e)return;const t=e.getBoundingClientRect(),n=t.width>0&&t.height>0;f.style.display=n?"block":"none",n&&(f.style.position="fixed",f.style.top=`${t.top}px`,f.style.left=`${t.left}px`,f.style.width="728px",f.style.height="90px",f.style.zIndex="20")};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(d);const l=window.googletag.defineSlot(r.adUnitPath,[[728,90]],d)?.addService(window.googletag.pubads());l&&(t=l,m=window.googletag.pubads(),a?l.setConfig({targeting:{qrati_event:a,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&l.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===l&&o({eventId:a,organizationId:i,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),s=ce({container:f,onClick:()=>{o({eventId:a,organizationId:i,type:c.GAM_CLICK})}}),ae(),window.googletag.display(d),n=window.setTimeout(()=>{e||(v(),l.getResponseInformation?.()||window.googletag.pubads().refresh([l]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==n&&window.clearTimeout(n),s?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const r=t;t=null,r&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([r])}),f.parentNode&&f.parentNode.removeChild(f)}},[a,r.adUnitPath,i,u,t,d]),/* @__PURE__ */s("div",{className:"flex w-full items-center justify-center overflow-x-auto py-2",children:/* @__PURE__ */s("div",{ref:l,style:{width:728,height:90,minWidth:728}})})},je=({gamConfig:t,eventId:r,organizationId:a})=>{const{trackGamAnalytics:i}=ie(),o=n(null),l=`gam-right-${r??"ev"}`,d=t.placementCategories?.right??t.placementCategories?.sidebar;return e(()=>{let e=!1,n=null,s=null,u=null,m=null,g=null,h=null;const p=d?[d]:[],f=document.createElement("div");f.id=l,document.body.appendChild(f);const v=()=>{const e=o.current;if(!e)return;const t=e.getBoundingClientRect(),n=e.parentElement?.getBoundingClientRect(),r=t.width>0&&t.height>0;if(f.style.display=r?"block":"none",!r)return;const a=t.top<=0&&n?Math.min(0,n.bottom-600):t.top;f.style.position="fixed",f.style.top=`${a}px`,f.style.left=`${t.left}px`,f.style.width="160px",f.style.height="600px",f.style.zIndex="20"};return v(),window.addEventListener("scroll",v,{passive:!0}),window.addEventListener("resize",v),(async()=>{await re(),e||window.googletag.cmd.push(()=>{if(e)return;oe(l);const o=window.googletag.defineSlot(t.adUnitPath,[[160,600]],l)?.addService(window.googletag.pubads());o&&(n=o,m=window.googletag.pubads(),r?o.setConfig({targeting:{qrati_event:r,...p.length>0?{qrati_category:p}:{}}}):p.length>0&&o.setConfig({targeting:{qrati_category:p}}),g=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:c.GAM_IMPRESSION,creativeId:String(e.creativeId??""),lineItemId:String(e.lineItemId??""),advertiserId:String(e.advertiserId??""),isEmpty:e.isEmpty??!1})},m.addEventListener("slotRenderEnded",g),h=e=>{e.slot===o&&i({eventId:r,organizationId:a,type:c.GAM_VIEWABLE})},m.addEventListener("impressionViewable",h),u=ce({container:f,onClick:()=>{i({eventId:r,organizationId:a,type:c.GAM_CLICK})}}),ae(),window.googletag.display(l),s=window.setTimeout(()=>{e||(v(),o.getResponseInformation?.()||window.googletag.pubads().refresh([o]))},1500))})})(),()=>{e=!0,window.removeEventListener("scroll",v),window.removeEventListener("resize",v),null!==s&&window.clearTimeout(s),u?.(),m&&"function"==typeof m.removeEventListener&&(g&&m.removeEventListener("slotRenderEnded",g),h&&m.removeEventListener("impressionViewable",h));const t=n;n=null,t&&window.googletag?.cmd?.push(()=>{window.googletag.destroySlots([t])}),f.parentNode&&f.parentNode.removeChild(f)}},[r,t.adUnitPath,a,d,l]),/* @__PURE__ */s("div",{ref:o,style:{width:160,height:600},className:"hidden shrink-0 self-start lg:block"})},Fe=t(()=>import("./7GXdePWm2.js")),Be=()=>{const t=R().eventSlug,{loadingUser:o,organization:c}=C(),p=u(),[f,w]=r(""),[b,S]=r(void 0),[z,P]=r(N),[O,F]=r(v),[B,H]=r("undefined"!=typeof window&&window.innerWidth<768?q.SINGLE:q.GRID),U=n(null),{event:G,ads:$,gamConfig:D}=te({eventSlug:t}),{loading:W,isError:K,error:Y,refetch:J,contentsWithAds:ne,hasNextPage:re,fetchNextPage:ae,isFetchingNextPage:se}=(({event:e,ads:t=[],gamConfig:n,sort:r=N,order:i=v,keywords:s,face:o,limit:l=20})=>{const{props:c,loadingUser:d,user:u}=C(),p=c?.organizationId,{isLoading:f,isError:w,error:T,data:q,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S,refetch:L}=M({queryKey:[h.CONTENTS_BY_EVENT(e?._id??""),p??"",r,i,s,o,String(l)],queryFn:async({pageParam:t=1})=>{try{return await g.get(I.GET_CONTENTS,{searchParams:{eventId:e?._id,page:t,keywords:s,faceImageUrl:o,sort:`${m[i].sortOrder}${y[r].sortField}`,limit:l},headers:{"x-org-id":p,...u?{Authorization:`Bearer ${u.token}`}:{}}}).json()}catch(T){throw new Error(T instanceof Error?T.message:String(T)||"Failed to fetch contents")}},enabled:!d&&!!e,staleTime:6e4,gcTime:3e5,initialPageParam:1,getPreviousPageParam:e=>A(e),getNextPageParam:_}),z=a(()=>q?.pages?.flatMap(e=>e?.data??[])??[],[q]);return{contents:z,contentsWithAds:a(()=>"gam"===e?.adMode?n?.inGalleryEnabled?((e=[],t,n)=>{if(!n||n<=0)return e;const[r,a]=t.sizes[0]??[300,250];let i=0;const s=[];for(let o=0;o<e.length;o++)s.push(e[o]),n>0&&(o+1)%n===0&&(s.push({_id:`gam-ad-slot-${i}`,type:E.GAM_AD,slotIndex:i,width:r,height:a}),i++);return s})(z,n,e?.adPosition??5):z:((e=[],t=[],n)=>{if(!n||n<=0)return e;let r=0;const a=[];for(let i=0;i<(e?.length||0);i++)a.push(e[i]),t.length>0&&n>0&&(i+1)%n===0&&(a.push({...t[r],type:E.AD,adType:t[r].type}),r=(r+1)%t.length);return a})(z,t,e?.adPosition),[t,z,e?.adMode,e?.adPosition,n]),loading:f,isError:w,error:T,refetch:L,hasNextPage:x,fetchNextPage:b,isFetchingNextPage:S}})({event:G,ads:$,gamConfig:D,sort:z,order:O,keywords:f,face:b}),{incrementEventView:oe}=ie(),{start:le,initializing:ce,running:de}=(({ref:t,onBottomReached:a,hasNextPage:i,fetchNextPage:s,isFetchingNextPage:o})=>{const l=n(1),c=n(null),d=n(null),u=n(null),m=n(null),g=n(!1),h=n(),p=n(),[f,v]=r(!1),[w,T]=r(!1),y=()=>{null!==u.current&&u.current.release().then(()=>{u.current=null}).catch(()=>{u.current=null}),m.current&&(document.removeEventListener("visibilitychange",m.current),m.current=null),v(!1),T(!1),t.current&&(t.current.scrollTop=0),c.current&&(window.cancelAnimationFrame(c.current),c.current=null),d.current&&(window.clearTimeout(d.current),d.current=null),g.current&&(h.current&&document.removeEventListener("keydown",h.current),p.current&&document.removeEventListener("fullscreenchange",p.current),g.current=!1)},N=n(e=>{"+"===e.key&&(l.current=Math.min(l.current+1,10)),"-"===e.key&&(l.current=Math.max(l.current-1,1))});N.current=e=>{"+"===e.key&&(l.current=Math.min(l.current+1,10)),"-"===e.key&&(l.current=Math.max(l.current-1,1))};const q=n(()=>{document.fullscreenElement||y()});q.current=()=>{document.fullscreenElement||y()};const x=()=>{t.current&&(t.current.scrollTop+=l.current,i&&!o&&s&&t.current.scrollTop+t.current.clientHeight>=.5*t.current.scrollHeight&&s(),t.current.scrollTop+t.current.clientHeight>=t.current.scrollHeight?(v(!1),c.current&&(window.cancelAnimationFrame(c.current),c.current=null),d.current=window.setTimeout(()=>{T(!0),a?.(),d.current=window.setTimeout(()=>{t.current&&(t.current.scrollTop=0),T(!1),v(!0)},1e3)},1e3)):c.current=window.requestAnimationFrame(x))};return e(()=>(f&&(d.current&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{c.current=window.requestAnimationFrame(x)},300)),()=>{c.current&&window.cancelAnimationFrame(c.current)}),[f,i,o,s,a]),e(()=>()=>{y()},[]),{start:()=>{if(t?.current?.requestFullscreen)t.current.requestFullscreen();else{const e=t.current;e?.webkitRequestFullscreen?e.webkitRequestFullscreen():e?.mozRequestFullScreen?e.mozRequestFullScreen():e?.msRequestFullscreen&&e.msRequestFullscreen()}(async()=>{try{if("wakeLock"in navigator){u.current=await navigator.wakeLock.request("screen");const e=async()=>{null!==u.current&&"visible"===document.visibilityState&&(u.current=await navigator.wakeLock.request("screen"))};m.current=e,document.addEventListener("visibilitychange",e)}}catch(e){}})(),v(!0),g.current||(h.current=e=>N.current(e),p.current=()=>q.current(),document.addEventListener("keydown",h.current),document.addEventListener("fullscreenchange",p.current),g.current=!0)},initializing:w,running:f}})({ref:U,hasNextPage:re,fetchNextPage:ae,isFetchingNextPage:se,onBottomReached:()=>G?._id&&p.refetchQueries({queryKey:[h.CONTENTS_BY_EVENT(G._id)]})});e(()=>{G?.slug&&oe(G.slug)},[G?.slug,oe]);const ue=a(()=>B===q.SINGLE,[B]),ge=a(()=>/* @__PURE__ */s(Le,{event:G,onAutoscrollClick:le}),[G,le]),he=n(null),pe=n(null);e(()=>(he.current&&he.current.disconnect(),he.current=new IntersectionObserver(e=>{e[0].isIntersecting&&re&&!se&&!W&&ae()},{rootMargin:"200px"}),pe.current&&he.current.observe(pe.current),()=>{he.current&&(he.current.disconnect(),he.current=null)}),[re,se,W,ae]);const fe=D?.bannerPositions??[],ve=c?._id,Te=D&&fe.includes("right"),ye=Boolean(c?.integrationSettings?.showQuickSearch);/* @__PURE__ */
|
|
33
|
+
return s("div",{className:"bg-background mx-auto min-h-[80vh]",children:[
|
|
34
|
+
/* @__PURE__ */s("div",{className:"flex flex-row justify-end gap-4 pt-2",children:ge}),
|
|
35
|
+
/* @__PURE__ */s("div",{className:"pb-3",children:/* @__PURE__ */s(we,{})}),D&&fe.includes("top")&&/* @__PURE__ */s(Oe,{position:"top",gamConfig:D,eventId:G?._id,organizationId:ve}),
|
|
36
|
+
/* @__PURE__ */s(Re,{engagementStyle:G?.engagementStyle,disabled:o||W,mode:B,onModeChange:e=>H(e),sort:z,sortOrder:O,onSortChange:e=>P(e),onSortOrderChange:()=>F("asc"===O?"desc":"asc"),handleChange:w,face:b,onFaceImageChange:e=>S(e)}),b&&/* @__PURE__ */s("div",{className:"flex gap-4 py-2",children:[/* @__PURE__ */s("div",{className:"space-y-2",children:[/* @__PURE__ */s(j,{variant:"h4",children:"Searching using"}),/* @__PURE__ */s("img",{src:b,alt:"face",className:"h-32 rounded"})]}),/* @__PURE__ */s("div",{className:"flex flex-col justify-end gap-2",children:/* @__PURE__ */s(X,{color:"error",icon:/* @__PURE__ */s(ee,{className:"size-5"}),onClick:()=>S(void 0),children:"Clear search"})})]}),
|
|
37
|
+
/* @__PURE__ */s("div",{className:"flex items-start gap-4",children:[/* @__PURE__ */s("div",{className:"min-w-0 flex-1",children:[o||W?/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(V,{className:"h-72"},t))}):K?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(Z,{title:Y?.message?.toLowerCase().includes("timed out")?"Request timed out":"Failed to load",description:/* @__PURE__ */s("div",{className:"flex flex-col items-center gap-4",children:[/* @__PURE__ */s(j,{variant:"body2",color:"muted",align:"center",children:Y?.message?.toLowerCase().includes("timed out")?"The search took too long to respond. Please try again.":"Something went wrong while loading content."}),/* @__PURE__ */s(X,{icon:/* @__PURE__ */s(me,{className:"size-5"}),onClick:()=>{J()},children:"Retry"})]})})}):ne?.length<=0?/* @__PURE__ */s("div",{className:"my-16 flex flex-col items-center gap-4",children:/* @__PURE__ */s(Z,{title:"No Contents",description:"Check back soon for amazing contents.",iconSvg:/* @__PURE__ */s(Ve,{})})}):/* @__PURE__ */s(l,{children:[
|
|
38
|
+
/* @__PURE__ */s("div",{ref:U,className:x(ue?"flex w-full justify-center":"",ce?"opacity-0":"opacity-100",de?"scrollbar-hide pointer-events-none transition-opacity duration-300":"pointer-events-auto transition-none","relative size-full overflow-auto"),children:/* @__PURE__ */s(i,{fallback:/* @__PURE__ */s("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Array.from({length:8}).map((e,t)=>/* @__PURE__ */s(V,{className:"h-72"},t))}),children:/* @__PURE__ */s(Fe,{event:G,contents:ne,gamConfig:D,singleColumnMode:ue,kioskMode:de,timestampField:z===T.CAPTURE_TIME?"capturedAt":void 0,curateLink:G?.engagementStyle===L.CONTEST&&G.status===k.OPEN&&G.slug?d.CURATE(G.slug):void 0,onChangeFaceUrl:e=>S(e),showQuickSearch:ye})})}),
|
|
39
|
+
/* @__PURE__ */s("div",{ref:pe,className:"h-4 w-full","aria-hidden":"true"}),se&&/* @__PURE__ */s("div",{className:"mx-auto my-6 w-fit",children:/* @__PURE__ */s(Q,{className:"text-2xl"})})]}),D&&fe.includes("bottom")&&/* @__PURE__ */s(Oe,{position:"bottom",gamConfig:D,eventId:G?._id,organizationId:ve})]}),Te&&/* @__PURE__ */s(je,{gamConfig:D,eventId:G?._id,organizationId:ve})]})]})};export{Be as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{T as r,t as e}from"./C3uDEVBt.js";import{i as t}from"./BItJQVdK.js";import{r as a}from"./Cb1JRT_1.js";function i({className:r}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:r,"aria-hidden":"true",focusable:"false",children:[
|
|
3
3
|
/* @__PURE__ */e("circle",{cx:"18",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".67",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
4
4
|
/* @__PURE__ */e("circle",{cx:"12",cy:"12",r:"0",fill:"currentColor",children:/* @__PURE__ */e("animate",{attributeName:"r",begin:".33",calcMode:"spline",dur:"1.5s",keySplines:"0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8",repeatCount:"indefinite",values:"0;2;0;0"})}),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./
|
|
1
|
+
import{t}from"./C3uDEVBt.js";function l({className:l}){/* @__PURE__ */
|
|
2
2
|
return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:l,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */t("path",{fill:"currentColor",d:"m12 13.4l-4.9 4.9q-.275.275-.7.275t-.7-.275t-.275-.7t.275-.7l4.9-4.9l-4.9-4.9q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l4.9 4.9l4.9-4.9q.275-.275.7-.275t.7.275t.275.7t-.275.7L13.4 12l4.9 4.9q.275.275.275.7t-.275.7t-.7.275t-.7-.275z"})})}export{l as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
return s(l,{as:"div",className:i(P,"relative overflow-hidden"),threshold:a,rootMargin:h,onChange:e=>k(e),children:[N&&!y&&/* @__PURE__ */s(j,{className:"size-full blur-2xl",hash:v}),
|
|
1
|
+
import{D as e,a as t,b as r,f as o,h as n,t as s}from"./C3uDEVBt.js";import{i}from"./BItJQVdK.js";import{n as a}from"./BkIDQGIs.js";var l=({as:t="div",className:n,threshold:s=.5,rootMargin:i="0px",triggerOnce:a,onChange:l,onClick:h,children:c})=>{const u=o(null),d=o(!1),p=o(l);return p.current=l,r(()=>{const e=u.current;if(!e)return;d.current=!1;const t=new IntersectionObserver(e=>{e.forEach(e=>{a&&d.current||(e.isIntersecting&&(d.current=!0),p.current?.(e.isIntersecting))})},{threshold:s,rootMargin:i});return t.observe(e),()=>t.disconnect()},[s,i,a]),e(t,{ref:u,className:n,onClick:h},c)},h=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,g=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&g(e,r,t[r]);if(d)for(var r of d(t))f.call(t,r)&&g(e,r,t[r]);return e},b=(e,t)=>c(e,u(t)),w=(e,t)=>{var r={};for(var o in e)p.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&d)for(var o of d(e))t.indexOf(o)<0&&f.call(e,o)&&(r[o]=e[o]);return r},v=class extends t{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:r,width:o}=this.props;if(this.canvas){let n=a(e,o,t,r),s=this.canvas.getContext("2d"),i=s.createImageData(o,t);i.data.set(n),s.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let t=this.props,{hash:r,height:o,width:n}=t,s=w(t,["hash","height","width"]);return e("canvas",b(m({},s),{height:o,width:n,ref:this.handleRef}))}};v.defaultProps={height:128,width:128};var y={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"};(class extends t{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let t=this.props,{hash:r,height:o,width:n,punch:s,resolutionX:i,resolutionY:a,style:l}=t,h=w(t,["hash","height","width","punch","resolutionX","resolutionY","style"]);return e("div",b(m({},h),{style:b(m({display:"inline-block",height:o,width:n},l),{position:"relative"})}),e(v,{hash:r,height:a,width:i,punch:s,style:y}))}}).defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var j=v,O=({src:e,alt:t,threshold:a=.1,rootMargin:h="200px 0px",blurhash:c,containerClassName:u="size-full",wrapperClassName:d,imgClassName:p="",sizeMode:f="cover",position:g="center",delayMs:m=100,delayTime:b,onClick:w})=>{const v=c&&c.length>=6?c:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[y,O]=n(!1),[C,x]=n(!1),[N,k]=n(!1),z=o(null);r(()=>{O(!1),x(!1)},[e]);const M="number"==typeof b?b:m,P=d??u;r(()=>{if(!y)return N?z.current=window.setTimeout(()=>{x(!0)},M):z.current&&(clearTimeout(z.current),z.current=null),()=>{z.current&&clearTimeout(z.current)}},[N,y,M]);const D=C&&N||y;/* @__PURE__ */
|
|
2
|
+
return s(l,{as:"div",className:i(P,"relative overflow-hidden"),threshold:a,rootMargin:h,onChange:e=>k(e),children:[N&&!y&&/* @__PURE__ */s(j,{className:"size-full blur-2xl",hash:v}),D&&e&&/* @__PURE__ */s("img",{alt:t,src:e,loading:"lazy",decoding:"async",onLoad:()=>O(!0),className:i("absolute top-0 left-0 size-full object-center transition-all duration-300",y?"scale-100 opacity-100":"scale-95 opacity-0","contain"===f?"object-contain":"object-cover","top"===g?"object-top":"bottom"===g?"object-bottom":"object-center",p),onClick:e=>w?.(e)})]})};export{l as n,O as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t}from"./
|
|
1
|
+
import{t}from"./C3uDEVBt.js";function e({className:e}){/* @__PURE__ */
|
|
2
2
|
return t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24",className:e,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */t("path",{fill:"currentColor",d:"M12.713 16.713Q13 16.425 13 16t-.288-.712T12 15t-.712.288T11 16t.288.713T12 17t.713-.288m0-4Q13 12.425 13 12V8q0-.425-.288-.712T12 7t-.712.288T11 8v4q0 .425.288.713T12 13t.713-.288M12 22q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22"})})}export{e as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./C3uDEVBt.js";import{i as r}from"./BItJQVdK.js";import{t as a}from"./Cb1JRT_1.js";var s=e=>e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"",t=e=>e.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)?void 0:"Enter a valid email":"Please enter your email",o=e=>e?e.length<8?"Min password length is 8":void 0:"Please enter your password",i=e=>{if(!e.trim())return"First name is required"},n=e=>{if(!e.trim())return"Last name is required"},d=(e,r)=>e?e!==r?"Passwords do not match":void 0:"Please confirm your password",l=({label:s,type:t="text",disabled:o,error:i,iconSVG:n,actionIcon:d,onActionClick:l,actionLabel:m,className:c="",step:u,...p})=>/* @__PURE__ */e("div",{className:"relative",children:[s&&/* @__PURE__ */e(a,{variant:"body1",className:"sm:mb-1",children:s}),
|
|
2
|
+
/* @__PURE__ */e("div",{className:"relative",children:[n&&/* @__PURE__ */e("div",{className:r("pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3",o?"text-muted-foreground":" "),children:n}),/* @__PURE__ */e("input",{type:t,disabled:o,step:"number"===t?u:void 0,"aria-invalid":!!i,className:r("border-border shadow-outer focus:border-primary peer w-full rounded border px-4 py-2 focus:border focus:ring-0 focus:outline-none",o?"text-muted-foreground bg-transparent":"bg-input",i?"border-destructive animate-pulse":"border-border animate-none",n?"pl-9":"",c),...p,value:p.value??""})]}),i&&/* @__PURE__ */e(a,{variant:"caption",color:"error","data-testid":"input-error",children:i})]});export{i as a,t as i,s as n,n as o,d as r,o as s,l as t};
|