@qratilabs/qrati-connect 2.23.0-beta.2 → 2.23.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -131
- package/element/1dmOpMwn2.js +1 -0
- package/{umd/CU_-C7Pt2.js → element/B04BM8Ax2.js} +9 -9
- package/element/B45gcsxb.js +8 -0
- package/element/{B5BVTFlf.js → BCQyxXhG.js} +2 -2
- package/element/BItKl1T42.js +9 -0
- package/element/BNaRcekR2.js +1 -0
- package/element/BUDCYszs.js +1 -0
- package/element/BWP-4cpS.js +9 -0
- package/element/Bb7aA27_2.js +16 -0
- package/element/Be1kxf1X.js +1 -0
- package/element/BgQoyn-N2.js +24 -0
- package/{umd/CYQ06kUR.js → element/Bgs5C4HD.js} +1 -1
- package/element/BhkJLPA42.js +39 -0
- package/element/BhxijXQM.js +3 -0
- package/element/{fwDYCLiL.js → BlknxKzR.js} +1 -1
- package/element/Bo39kG4k2.js +1 -0
- package/{umd/WX3mhhd9.js → element/BsYbcfkG.js} +1 -1
- package/element/{CMQUiMWC2.js → BurXvsRl2.js} +2 -2
- package/element/BwwxqSTC2.js +1 -0
- package/element/C5zfotWt2.js +93 -0
- package/{umd/CgUphJWo.js → element/C7zv6hcG.js} +1 -1
- package/{umd/C9HFLidt.js → element/CAETItHr.js} +1 -1
- package/element/CAGI3w1m2.js +1 -0
- package/element/CBLQRRGX2.js +3 -0
- package/element/{CKk0UYyd.js → CFnGGYmq.js} +1 -1
- package/element/{BekfKWcG.js → CILYMBwp.js} +1 -1
- package/element/CKhD3GGu2.js +5 -0
- package/element/CL_evx_l.js +1 -0
- package/element/{wuONdFBI2.js → CObeYQ-T.js} +4 -4
- package/element/{DPmrTFJt.js → CPK30X_R.js} +2 -2
- package/{umd/CJpmOICA.js → element/CZ9iaxjO2.js} +1 -1
- package/element/ChKwv0LI.js +3 -0
- package/element/CiRDwfEo.js +14 -0
- package/element/CnXoEQ4O.js +41 -0
- package/element/CpYO5bBq.js +3 -0
- package/element/Cqm7RQaC2.js +1 -0
- package/element/CtxIOzTC2.js +1 -0
- package/element/{DXrH_HhZ.js → D35mTuTT.js} +1 -1
- package/element/DBYSpPDT.js +4 -0
- package/element/DC180L58.js +1 -0
- package/element/DDsXvZQf2.js +1 -0
- package/element/DDy6e4u1.js +1 -0
- package/element/DG0xITSs2.js +36 -0
- package/element/DG2ImKMr2.js +3 -0
- package/element/{DWbLshVZ.js → DGGc10Cy.js} +1 -1
- package/element/DH3iGq80.js +11 -0
- package/element/DM971zPD.js +3 -0
- package/element/DPg_DKOi.js +5 -0
- package/element/DSeZQTI82.js +3 -0
- package/{umd/9VAO1NmP.js → element/DTNXbVBR.js} +1 -1
- package/{umd/Wun_Og5n2.js → element/DTl-ou-l2.js} +5 -9
- package/element/DdACKOZr.js +1 -0
- package/element/DjMXpQHg.js +8 -0
- package/element/{u7SUQ9Kb2.js → DlRUi0u42.js} +2 -2
- package/element/DmpmrPE5.js +1 -0
- package/element/DnIueBGr.js +1 -0
- package/element/Dpi8tX5M.js +1 -0
- package/element/DrrpB4Om.js +1 -0
- package/element/L4hWU3Nc.js +1 -0
- package/{umd/BCu0TrNB2.js → element/N4HKgEC52.js} +1 -1
- package/element/{BCTYvPrD.js → OnH8Izqn.js} +1 -1
- package/element/Ot24jlyb2.js +1 -0
- package/element/RVKBpT2F.js +87 -0
- package/element/Rcen6i0h.js +80 -0
- package/element/SOYsF7q9.js +1 -0
- package/element/{lVJD5cJY.js → TlERMTWp.js} +5 -5
- package/element/X0P7ujR0.js +4 -0
- package/element/{2SYk3iBo.js → oS3-bnne2.js} +1 -1
- package/element/qIS4OV76.js +1 -0
- package/element/tdnQ0RcT.js +5 -0
- package/element/web.es.js +40 -125
- package/element/zcb-9fSo.js +4 -0
- package/package.json +1 -10
- package/react/index.cjs +1 -1
- package/react/index.d.mts +65 -0
- package/react/index.d.ts +65 -0
- package/react/index.mjs +1 -1
- package/element/8nf23RYF2.js +0 -93
- package/element/9VAO1NmP.js +0 -1
- package/element/B2KTsK_w.js +0 -3
- package/element/BCu0TrNB2.js +0 -2
- package/element/Be-K0dao.js +0 -9
- package/element/BiO2AH5s2.js +0 -8
- package/element/BmCwXyo_2.js +0 -3
- package/element/BnWKlftk2.js +0 -16
- package/element/BqPEscWs2.js +0 -5
- package/element/BsT0vqml.js +0 -1
- package/element/BxeYKf-v2.js +0 -86
- package/element/C0MGOytI.js +0 -1
- package/element/C0vZ8zxT.js +0 -1
- package/element/C6SiAA6Z2.js +0 -2
- package/element/C9HFLidt.js +0 -2
- package/element/C9U01_vP2.js +0 -39
- package/element/CAGYFwGT2.js +0 -4
- package/element/CJpmOICA.js +0 -2
- package/element/CU_-C7Pt2.js +0 -13
- package/element/CYQ06kUR.js +0 -1
- package/element/CbpHG7X52.js +0 -9
- package/element/CgE_bYp32.js +0 -37
- package/element/CgUphJWo.js +0 -1
- package/element/Cko4QHwX.js +0 -1
- package/element/D8Se70tP2.js +0 -3
- package/element/DIYTs0k3.js +0 -10
- package/element/DVO71jbn2.js +0 -3
- package/element/DYUfJm8F.js +0 -9
- package/element/DibuO0dP.js +0 -1
- package/element/LJWh_4Di.js +0 -2
- package/element/O530RtWA.js +0 -1
- package/element/WX3mhhd9.js +0 -2
- package/element/WtQ5axEj.js +0 -41
- package/element/Wun_Og5n2.js +0 -9
- package/element/hJxQiXVJ2.js +0 -4
- package/element/htkJ94ea2.js +0 -14
- package/element/j7EIoFjZ.js +0 -1
- package/element/qJYsRQFB.js +0 -1
- package/element/qbHuxVSe.js +0 -1
- package/element/styles.css +0 -288
- package/element/we0Hcb5C.js +0 -3
- package/element/x2Vs8ihf.js +0 -8
- package/umd/2SYk3iBo.js +0 -7
- package/umd/8nf23RYF2.js +0 -93
- package/umd/B2KTsK_w.js +0 -3
- package/umd/B5BVTFlf.js +0 -3
- package/umd/BCTYvPrD.js +0 -1
- package/umd/Be-K0dao.js +0 -9
- package/umd/BekfKWcG.js +0 -1
- package/umd/BiO2AH5s2.js +0 -8
- package/umd/BkIDQGIs.js +0 -1
- package/umd/Bki5T_lb.js +0 -1
- package/umd/BmCwXyo_2.js +0 -3
- package/umd/BnWKlftk2.js +0 -16
- package/umd/BqPEscWs2.js +0 -5
- package/umd/BsT0vqml.js +0 -1
- package/umd/BxeYKf-v2.js +0 -86
- package/umd/C0MGOytI.js +0 -1
- package/umd/C0vZ8zxT.js +0 -1
- package/umd/C6SiAA6Z2.js +0 -2
- package/umd/C9U01_vP2.js +0 -39
- package/umd/CAGYFwGT2.js +0 -4
- package/umd/CKk0UYyd.js +0 -1
- package/umd/CMQUiMWC2.js +0 -2
- package/umd/CbpHG7X52.js +0 -9
- package/umd/CfMNBPpx2.js +0 -1
- package/umd/CgE_bYp32.js +0 -37
- package/umd/Cko4QHwX.js +0 -1
- package/umd/D8Se70tP2.js +0 -3
- package/umd/DIYTs0k3.js +0 -10
- package/umd/DPmrTFJt.js +0 -2
- package/umd/DVO71jbn2.js +0 -3
- package/umd/DWbLshVZ.js +0 -2
- package/umd/DXrH_HhZ.js +0 -2
- package/umd/DYUfJm8F.js +0 -9
- package/umd/DibuO0dP.js +0 -1
- package/umd/LJWh_4Di.js +0 -2
- package/umd/O530RtWA.js +0 -1
- package/umd/WtQ5axEj.js +0 -41
- package/umd/fwDYCLiL.js +0 -1
- package/umd/hJxQiXVJ2.js +0 -4
- package/umd/htkJ94ea2.js +0 -14
- package/umd/index.d.ts +0 -14
- package/umd/j7EIoFjZ.js +0 -1
- package/umd/lVJD5cJY.js +0 -5
- package/umd/qJYsRQFB.js +0 -1
- package/umd/qbHuxVSe.js +0 -1
- package/umd/rtH8O6Hc.js +0 -1
- package/umd/u7SUQ9Kb2.js +0 -7
- package/umd/we0Hcb5C.js +0 -3
- package/umd/web.es.js +0 -125
- package/umd/web.umd.js +0 -1
- package/umd/wuONdFBI2.js +0 -8
- package/umd/x2Vs8ihf.js +0 -8
- /package/element/{CfMNBPpx2.js → CfMNBPpx.js} +0 -0
package/README.md
CHANGED
|
@@ -1,156 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
Qrati Connect is a drop-in, embeddable event/gallery widget. It ships as three friendly bundles:
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
- **`<qrati-connect>` Web Component** — shadow-DOM isolated, ~3 KB.
|
|
4
|
+
- **React wrapper** — external React, lazy-loads the custom element.
|
|
5
|
+
- **Embed loader** — one `<script>` tag, no bundler needed.
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
Styles self-inject at runtime, so hosts never import a stylesheet.
|
|
6
8
|
|
|
7
|
-
- **Interactive Media Gallery :** Integrate Qrati's powerful interactive media gallery into your own site without a hassle.
|
|
8
|
-
- **Media Upload :** Users can directly upload content from your host site.
|
|
9
|
-
- **Reaction :** Engage your users with a completely customizable set of emojis.
|
|
10
|
-
- **Curation :** Want to host a photo contest? Our curation feature can be a one stop solution for that.
|
|
11
|
-
- **Leaderboard :** Gamify your contest with a precise and fun leaderboard.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Install `qrati-connect` using npm, yarn, pnpm or bun:
|
|
10
|
+
## Install
|
|
16
11
|
|
|
17
12
|
```bash
|
|
18
13
|
npm install @qratilabs/qrati-connect
|
|
19
|
-
# or
|
|
20
|
-
yarn add @qratilabs/qrati-connect
|
|
21
|
-
# or
|
|
22
|
-
pnpm add @qratilabs/qrati-connect
|
|
23
|
-
# or
|
|
24
|
-
bun install @qratilabs/qrati-connect
|
|
25
14
|
```
|
|
26
15
|
|
|
27
|
-
|
|
16
|
+
## Use it
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
import QratiConnect from '@qratilabs/qrati-connect/react';
|
|
31
|
-
import '@qratilabs/qrati-connect/react/styles.css';
|
|
18
|
+
### React
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<QratiConnect
|
|
36
|
-
organizationId=<org_id>
|
|
37
|
-
/>
|
|
38
|
-
);
|
|
39
|
-
};
|
|
20
|
+
```tsx
|
|
21
|
+
import { QratiConnect } from '@qratilabs/qrati-connect';
|
|
40
22
|
|
|
41
|
-
|
|
23
|
+
<QratiConnect
|
|
24
|
+
organizationId="your-org-id"
|
|
25
|
+
router="hash"
|
|
26
|
+
theme="light"
|
|
27
|
+
onError={(err) => console.error(err)}
|
|
28
|
+
/>
|
|
42
29
|
```
|
|
43
30
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
# Available props
|
|
47
|
-
|
|
48
|
-
- **router :** Custom router configuration for internal navigation ('memory or 'hash').
|
|
49
|
-
- **organizationId :** Unique identifier for your organization inside Qrati.
|
|
50
|
-
- **fontClassName :** Classes to control custom font for the component.
|
|
51
|
-
- **textClassName :** Classes to apply any additional styling to texts inside the component.
|
|
52
|
-
- **emptyStateImage :** Link or path to image which will be shown for any empty state in the component.
|
|
53
|
-
- **curateLabel :** Label to show in place of 'Curate' in header for contest type events.
|
|
54
|
-
- **leaderboardLabel :** Label to show in place of 'Leaders' in header for contest type events.
|
|
55
|
-
- **uid :** User id for your application user (applicable for custom auth only).
|
|
56
|
-
- **fname :** First name for your application user (applicable for custom auth only).
|
|
57
|
-
- **lname :** Last name for your application user (applicable for custom auth only).
|
|
58
|
-
- **loginUrl :** The page url inside your web app where we should redirect when authentication is required for user intended action (applicable for custom auth only).
|
|
59
|
-
|
|
60
|
-
# Qrati Connect Element (Web Component)
|
|
61
|
-
|
|
62
|
-
Qrati Connect is also available as a Web Component (Custom Element) that you can use directly in your HTML without React. This is useful for non-React applications or when you want to embed Qrati Connect in static HTML pages.
|
|
63
|
-
|
|
64
|
-
## Installation via CDN (jsDelivr)
|
|
65
|
-
|
|
66
|
-
Add the following script and stylesheet tags to your HTML:
|
|
31
|
+
### Script tag
|
|
67
32
|
|
|
68
33
|
```html
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
34
|
+
<script
|
|
35
|
+
async
|
|
36
|
+
src="https://cdn.jsdelivr.net/npm/@qratilabs/qrati-connect/embed/embed.js"
|
|
37
|
+
data-organization-id="your-org-id"
|
|
38
|
+
data-router="hash"
|
|
39
|
+
data-theme="light"
|
|
40
|
+
></script>
|
|
73
41
|
```
|
|
74
42
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
The simplest integration: one `async` tag, config in `data-*` attributes. Mounts
|
|
78
|
-
where the tag sits, or into the element matched by `data-target`.
|
|
79
|
-
|
|
80
|
-
```html
|
|
81
|
-
<script async
|
|
82
|
-
src="https://cdn.jsdelivr.net/npm/@qratilabs/qrati-connect/embed/embed.js"
|
|
83
|
-
data-organization-id="your-org-id"
|
|
84
|
-
data-router="hash"></script>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Supported `data-*` attributes: `data-organization-id` (required), `data-router`,
|
|
88
|
-
`data-uid`, `data-fname`, `data-lname`, `data-theme`, and `data-target` (CSS
|
|
89
|
-
selector for the mount container).
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
Once imported, you can use the custom element tag `<qrati-connect>` in your HTML:
|
|
94
|
-
|
|
95
|
-
| Prop / Attribute | Type | Default | Description |
|
|
96
|
-
| ------------------- | ------------------------ | ---------- | -------------------------------------- |
|
|
97
|
-
| `organizationId` \* | `string` | — | Your Qrati organization ID (required) |
|
|
98
|
-
| `router` | `'memory' \| 'hash'` | `'memory'` | Routing strategy for navigation |
|
|
99
|
-
| `uid` | `string` | — | Pre-authenticated user ID |
|
|
100
|
-
| `fname` | `string` | — | Pre-authenticated user first name |
|
|
101
|
-
| `lname` | `string` | — | Pre-authenticated user last name |
|
|
102
|
-
| `theme` | `'light' \| 'dark'` | `'light'` | Color scheme |
|
|
103
|
-
| `onError` | `(error: Error) => void` | — | Error callback for handling SDK errors |
|
|
104
|
-
|
|
105
|
-
Note: When using the Web Component version, props are passed as HTML attributes with kebab-case naming (e.g., `organization-id` instead of `organizationId`).
|
|
43
|
+
Use a **classic** `<script>` tag — not `type="module"` — so the loader can read `document.currentScript`.
|
|
106
44
|
|
|
107
|
-
|
|
45
|
+
### Web Component (programmatic)
|
|
108
46
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
text-secondary -> text-muted-foreground
|
|
112
|
-
bg-brand, text-brand -> bg-primary, text-primary
|
|
113
|
-
qc-text-lg, qc-bg-red-500 -> qc:text-lg, qc:bg-red-500
|
|
47
|
+
```ts
|
|
48
|
+
import { renderComponent } from '@qratilabs/qrati-connect/element';
|
|
114
49
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
We optimize for small initial loads and lazy-load heavy features:
|
|
122
|
-
|
|
123
|
-
- Initial: ~139 KB gzipped (core UI + essentials)
|
|
124
|
-
- Upload feature: +~73 KB gzipped (lazy)
|
|
125
|
-
- HEIC conversion (heic2any): large dependency loaded only on-demand (~345 KB gzipped)
|
|
126
|
-
|
|
127
|
-
---
|
|
128
|
-
|
|
129
|
-
## Development
|
|
130
|
-
|
|
131
|
-
Common commands for contributors:
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
pnpm build # Build all distribution targets (element → umd → react → embed)
|
|
135
|
-
pnpm test:unit # Run Vitest unit tests in watch mode
|
|
136
|
-
pnpm test:unit:run # Run Vitest unit tests once
|
|
137
|
-
pnpm test:production # Build and run Playwright production regression tests
|
|
138
|
-
pnpm type-check # TypeScript type checking (no emit)
|
|
139
|
-
pnpm lint # ESLint
|
|
50
|
+
renderComponent('#qrati-host', {
|
|
51
|
+
organizationId: 'your-org-id',
|
|
52
|
+
router: 'memory',
|
|
53
|
+
theme: 'dark'
|
|
54
|
+
});
|
|
140
55
|
```
|
|
141
56
|
|
|
142
|
-
## Support
|
|
143
|
-
|
|
144
|
-
- Report bugs or request features via GitHub Issues: https://github.com/qrati-labs/qrati-connect-ts/issues
|
|
145
|
-
- See `docs/` for architecture, component, and hook references
|
|
146
|
-
- For commercial support: support@qrati.com
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## License
|
|
151
|
-
|
|
152
|
-
Proprietary © Qrati Labs — https://qrati.com. All rights reserved.
|
|
153
|
-
|
|
154
57
|
---
|
|
155
58
|
|
|
156
|
-
|
|
59
|
+
Built with a little bit of Shadow DOM magic.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=class{constructor(e,t={}){this.lightbox=e,this.autoHideTimer=null,this.uiVisible=!0,this.options=Object.assign({defaultDelayMs:4e3,playPauseButtonOrder:9,progressBarPosition:"top",progressBarTransition:"ease",restartOnSlideChange:!0,autoHideProgressBar:!0},t),this.setSlideshowLength(Number(localStorage.getItem("pswp_delay"))||this.options.defaultDelayMs),this.slideshowIsRunning=!1,this.slideshowTimerID=null,this.wakeLockIsRunning=!1,this.wakeLockSentinel=null,this.lightbox.on("init",()=>{this.init(this.lightbox.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}querySelector(e){return this.getRootNode().querySelector?.(e)||document.querySelector(e)}injectProgressBarStyles(){const e=this.getRootNode(),t=e===document?document.head:e;if(!t||t.querySelector("style[data-pswp-slideshow]"))return;const s=document.createElement("style");s.setAttribute("data-pswp-slideshow",""),s.textContent=`.pswp__progress-bar{position:fixed;${this.options.progressBarPosition}:0;width:0;height:0}.pswp__progress-bar.running{width:100%;height:2px;transition-property:width;background:#ff4800}`,t.appendChild(s)}init(e){e.on("uiRegister",()=>{this.injectProgressBarStyles(),e.ui.registerElement({name:"playpause-button",title:"Toggle slideshow (Space)\nChange delay with +/- while running",order:this.options.playPauseButtonOrder,isButton:!0,html:'<svg aria-hidden="true" class="pswp__icn" viewBox="0 0 24 24"><use class="pswp__icn-shadow" xlink:href="#pswp__icn-play"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-stop"/><path id="pswp__icn-play" d="M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"/><path id="pswp__icn-stop" style="display:none" d="M16 19q-.825 0-1.412-.587T14 17V7q0-.825.588-1.412T16 5t1.413.588T18 7v10q0 .825-.587 1.413T16 19m-8 0q-.825 0-1.412-.587T6 17V7q0-.825.588-1.412T8 5t1.413.588T10 7v10q0 .825-.587 1.413T8 19"/></svg>',onClick:()=>{this.setSlideshowState()}}),e.ui.registerElement({name:"playtime",appendTo:"wrapper",tagName:"div",className:"pswp__progress-bar"}),e.events.add(document,"keydown",e=>{switch(e.code){case"Space":this.setSlideshowState(),e.preventDefault();break;case"ArrowUp":case"NumpadAdd":case"Equal":this.changeSlideshowLength(1e3),e.preventDefault();break;case"ArrowDown":case"NumpadSubtract":case"Minus":this.changeSlideshowLength(-1e3),e.preventDefault()}})}),this.lightbox.on("change",()=>{this.slideshowIsRunning&&this.options.restartOnSlideChange&&this.goToNextSlideAfterTimeout()}),this.lightbox.on("close",()=>{this.slideshowIsRunning&&this.setSlideshowState()})}showUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.add("pswp--ui-visible"),this.uiVisible=!0}stopAutoHideTimer(){this.autoHideTimer&&(clearTimeout(this.autoHideTimer),this.autoHideTimer=null)}hideUI(){this.lightbox&&this.lightbox.pswp&&this.lightbox.pswp.element&&this.lightbox.pswp.element.classList.remove("pswp--ui-visible"),this.uiVisible=!1}resetAutoHideTimer(){this.autoHideTimer&&clearTimeout(this.autoHideTimer),this.autoHideTimer=setTimeout(()=>{this.slideshowIsRunning&&this.hideUI(),this.autoHideTimer=null},[3e3])}setSlideshowState(){this.slideshowIsRunning=!this.slideshowIsRunning,this.slideshowIsRunning?(this.goToNextSlideAfterTimeout(),this.showUI(),this.resetAutoHideTimer(),document.addEventListener("touchstart",()=>{this.stopAutoHideTimer(),this.showUI()}),document.addEventListener("touchend",()=>{this.resetAutoHideTimer()}),document.addEventListener("mousemove",()=>{this.uiVisible||this.showUI(),this.resetAutoHideTimer()})):(this.showUI(),this.resetSlideshow(),this.stopAutoHideTimer());const e=this.querySelector("#pswp__icn-stop"),t=this.querySelector("#pswp__icn-play");e&&(e.style.display=this.slideshowIsRunning?"inline":"none"),t&&(t.style.display=this.slideshowIsRunning?"none":"inline");const s=this.querySelector(".pswp__progress-bar");s&&(s.style.opacity=this.options.autoHideProgressBar?null:1),this.toggleWakeLock()}setSlideshowLength(e){this.options.defaultDelayMs=Math.min(Math.max(e,1e3),2147483647),this.options.defaultDelayMs!=e&&localStorage.setItem("pswp_delay",this.options.defaultDelayMs)}changeSlideshowLength(e){if(!this.slideshowIsRunning)return;this.setSlideshowLength(this.options.defaultDelayMs+e),localStorage.setItem("pswp_delay",this.options.defaultDelayMs);const t=this.querySelector(".pswp__counter");t&&(t.innerHTML=this.options.defaultDelayMs/1e3+"s"),this.goToNextSlideAfterTimeout()}isVideoContent(e){return"video"===e?.data?.type}getSlideTimeout(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;if(t.paused)return this.options.defaultDelayMs;const s=t.duration,i=t.currentTime;return isNaN(s)||isNaN(i)?this.options.defaultDelayMs:1e3*(s-i)}return this.options.defaultDelayMs}slideContentHasLoaded(){const e=this.lightbox.pswp.currSlide.content;if(this.isVideoContent(e)){const t=e.element;return t.ended||t.readyState===HTMLMediaElement.HAVE_ENOUGH_DATA&&[HTMLMediaElement.NETWORK_IDLE,HTMLMediaElement.NETWORK_LOADING].includes(t.networkState)}return!e.isLoading()}goToNextSlideAfterTimeout(){if(this.resetSlideshow(),this.slideContentHasLoaded()){const e=this.getSlideTimeout();this.slideshowTimerID=setTimeout(()=>{this.lightbox.pswp.next(),this.options.restartOnSlideChange||this.goToNextSlideAfterTimeout()},e),setTimeout(()=>{this.slideshowIsRunning&&this.toggleProgressBar(e)},100)}else this.slideshowTimerID=setTimeout(()=>{this.goToNextSlideAfterTimeout()},200)}getSlideTransition(){return this.isVideoContent(this.lightbox.pswp.currSlide.content)?"linear":this.options.progressBarTransition}toggleProgressBar(e){const t=this.querySelector(".pswp__progress-bar");t&&(e?(t.style.transitionTimingFunction=this.getSlideTransition(),t.style.transitionDuration=`${e}ms`,t.classList.add("running")):t.classList.remove("running"))}toggleWakeLock(){this.wakeLockIsRunning!=this.slideshowIsRunning&&("keepAwake"in screen?screen.keepAwake=this.slideshowIsRunning:"wakeLock"in navigator&&(this.wakeLockSentinel?this.wakeLockSentinel.release().then(()=>(this.wakeLockSentinel=null,!0)).catch(e=>console.error(e)):navigator.wakeLock.request("screen").then(e=>(this.wakeLockSentinel=e,this.wakeLockSentinel.addEventListener("release",()=>{this.wakeLockSentinel=null,this.wakeLockIsRunning=!1}),!0)).catch(e=>{})),this.wakeLockIsRunning=this.slideshowIsRunning)}resetSlideshow(){this.toggleProgressBar(),this.slideshowTimerID&&(clearTimeout(this.slideshowTimerID),this.slideshowTimerID=null)}};export{e as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{t as e,v as r}from"./
|
|
1
|
+
import{t as e,v as r}from"./DrrpB4Om.js";import{i as a,n as t,s as l}from"./CnXoEQ4O.js";import{t as i}from"./DmpmrPE5.js";import{f as o,i as n}from"./DDy6e4u1.js";import{u as s}from"./TlERMTWp.js";import{t as d}from"./CILYMBwp.js";import{t as c}from"./BlknxKzR.js";import{n as m}from"./DGGc10Cy.js";import{t as g}from"./Cqm7RQaC2.js";import{t as h}from"./CZ9iaxjO2.js";import{t as f}from"./N4HKgEC52.js";function p({className:r}){/* @__PURE__ */
|
|
2
2
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m12 152a8 8 0 0 1-16 0V95l-11.56 7.71a8 8 0 1 1-8.88-13.32l24-16A8 8 0 0 1 140 80Z"})})}function b({className:r}){/* @__PURE__ */
|
|
3
3
|
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m-4 164a35.7 35.7 0 0 1-25.71-10.81A8 8 0 1 1 109.71 166A20 20 0 1 0 124 132a8 8 0 0 1-6.55-12.59L136.63 92H104a8 8 0 0 1 0-16h48a8 8 0 0 1 6.55 12.59l-21 30A36 36 0 0 1 124 188"})})}function x({className:r}){/* @__PURE__ */
|
|
4
|
-
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var u=e=>{if(!e)return"";const r=e.trim().split(/\s+/);return 1===r.length?r[0]:`${r[0]} ${r[1]?.[0]?`${r[1][0]}.`:""}`},v={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},N=(e,r)=>{const a=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===a?"—":a.toFixed(r?2:0)},w=({entry:
|
|
5
|
-
return e("div",{className:
|
|
6
|
-
return e("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */e("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */e(h,{className:"text-primary size-6"}),/* @__PURE__ */e(
|
|
7
|
-
/* @__PURE__ */e("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:
|
|
4
|
+
return e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 256",className:r,"aria-hidden":"true",focusable:"false",children:/* @__PURE__ */e("path",{fill:"currentColor",d:"M128 24a104 104 0 1 0 104 104A104.11 104.11 0 0 0 128 24m24 144a8 8 0 0 1 0 16h-48a8 8 0 0 1-6.4-12.8l43.17-57.56a16 16 0 1 0-27.86-15a8 8 0 0 1-15.09-5.34a32 32 0 1 1 55.74 29.93L120 168Z"})})}var u=e=>{if(!e)return"";const r=e.trim().split(/\s+/);return 1===r.length?r[0]:`${r[0]} ${r[1]?.[0]?`${r[1][0]}.`:""}`},v={first:{size:"size-28",imageSize:"size-24",borderColor:"border-amber-400",gradient:"from-amber-400/20 via-yellow-300/10 to-transparent"},second:{size:"size-20",imageSize:"size-16",borderColor:"border-slate-400",gradient:"from-slate-400/20 via-slate-300/10 to-transparent"},third:{size:"size-20",imageSize:"size-16",borderColor:"border-amber-600",gradient:"from-amber-600/20 via-amber-500/10 to-transparent"}},N=(e,r)=>{const a=void 0===e.totalPoint?e.maxScore:e.totalPoint;return void 0===a?"—":a.toFixed(r?2:0)},w=({entry:t,position:l,showFloatingPoint:i,hidePictures:o})=>{const n=1===l?v.first:2===l?v.second:v.third,s={1:p,2:x,3:b}[l],c={1:{bg:"bg-amber-400",border:"border-amber-600",text:"text-amber-900"},2:{bg:"bg-slate-300",border:"border-slate-500",text:"text-slate-700"},3:{bg:"bg-amber-600",border:"border-amber-800",text:"text-amber-100"}},m=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
|
|
5
|
+
return e("div",{className:a("flex w-full flex-col items-center justify-center rounded-xl p-4 text-center sm:min-w-36","bg-linear-to-b",n.gradient),children:[o?/* @__PURE__ */e(s,{className:a(n.size,{1:"text-amber-400",2:"text-slate-400",3:"text-amber-600"}[l])}):/* @__PURE__ */e("div",{className:"relative",children:[/* @__PURE__ */e("img",{className:a(n.imageSize,"shadow-card scale-100 rounded-full border-4 object-cover",n.borderColor),src:t.image,alt:t.name??"",loading:"lazy",onError:m}),/* @__PURE__ */e("span",{className:a("shadow-card absolute -bottom-2 left-1/2 z-10 flex size-7 -translate-x-1/2 items-center justify-center rounded-full border-2 text-sm font-bold",c[l].bg,c[l].border,c[l].text),children:l})]}),/* @__PURE__ */e("div",{className:"mt-3 space-y-3 text-center",children:[/* @__PURE__ */e(d,{variant:"h6",lines:2,className:"max-w-24",align:"center",children:u(t.name)}),/* @__PURE__ */e("div",{className:"text-primary text-lg font-bold",children:N(t,i)})]})]})},y=({title:t,entries:l=[],showFloatingPoint:i=!1,hidePictures:o=!0})=>{const{t:n}=m(),s=t.replace(/\s+/g,"-").toLowerCase(),c=r(e=>{e.currentTarget.style.display="none"},[]);/* @__PURE__ */
|
|
6
|
+
return e("div",{className:"border-border mx-auto flex max-w-2xl flex-col rounded border p-4 sm:p-5 lg:p-6",children:[/* @__PURE__ */e("div",{className:"mb-4 flex items-center justify-center gap-2",children:[/* @__PURE__ */e(h,{className:"text-primary size-6"}),/* @__PURE__ */e(d,{variant:"h4",align:"center",color:"primary",children:t})]}),0===l.length?/* @__PURE__ */e("div",{className:"py-16 text-center",children:[/* @__PURE__ */e(d,{variant:"h5",align:"center",color:"error",children:n("leaderboard.not_available","No data available")}),/* @__PURE__ */e(d,{variant:"body2",align:"center",color:"muted",className:"mt-2",children:n("leaderboard.come_back_later","Check back later for updates.")})]}):/* @__PURE__ */e("div",{children:[/* @__PURE__ */e("div",{className:"flex items-end justify-center gap-2 lg:gap-8",children:[l.length>1&&/* @__PURE__ */e(w,{entry:l[1],position:2,showFloatingPoint:i,hidePictures:o}),l.length>0&&/* @__PURE__ */e(w,{entry:l[0],position:1,showFloatingPoint:i,hidePictures:o}),l.length>2&&/* @__PURE__ */e(w,{entry:l[2],position:3,showFloatingPoint:i,hidePictures:o})]}),/* @__PURE__ */e("div",{className:"mt-6 overflow-hidden rounded ring-1 ring-black/5",children:/* @__PURE__ */e("div",{className:"divide-border divide-y",children:l.slice(3).map((r,t)=>/* @__PURE__ */e("div",{className:a("hover:bg-primary/5 flex items-center gap-4 px-4 py-3",t%2==0?"bg-primary/5":"bg-background"),children:[
|
|
7
|
+
/* @__PURE__ */e("span",{className:"text-muted-foreground w-8 text-center text-sm font-medium",children:t+4}),!o&&/* @__PURE__ */e("img",{className:"ring-border size-10 rounded-full object-cover ring-2",src:r.image,alt:r.name??"",loading:"lazy",onError:c}),
|
|
8
8
|
/* @__PURE__ */e("div",{className:"min-w-0 flex-1",children:/* @__PURE__ */e("div",{className:"truncate font-medium",children:u(r.name)})}),
|
|
9
|
-
/* @__PURE__ */e("div",{className:"text-primary text-right font-semibold",children:N(r,i)})]},`${s}-${
|
|
10
|
-
return e("div",u||v?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e(
|
|
9
|
+
/* @__PURE__ */e("div",{className:"text-primary text-right font-semibold",children:N(r,i)})]},`${s}-${r.name??""}-${r.totalPoint??r.maxScore??""}-${r.image??t}`))})})]})]})},z=()=>{const{eventSlug:r}=s(),{props:h}=t(),{t:p}=m(),b=h?.organizationId,{event:x,loading:u}=g({eventSlug:r}),{isLoading:v,isError:N,error:w,data:z}=l({queryKey:[`leaderboard-${b}-${x?._id}`],queryFn:async()=>(await i.get(n.GET_LEADERBOARD,{headers:{"x-org-id":b??""},searchParams:{eventId:x?._id??"",projection:"connect"}}).json()).data,enabled:Boolean(x),staleTime:3e4,gcTime:3e5});/* @__PURE__ */
|
|
10
|
+
return e("div",u||v?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e(c,{className:"h-5 w-28 rounded-full"}),/* @__PURE__ */e(c,{className:"h-10 w-64 rounded"})]}),/* @__PURE__ */e("div",{className:a("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:[/* @__PURE__ */e(c,{className:"h-72 w-full rounded"}),/* @__PURE__ */e(c,{className:"mt-4 h-72 w-full rounded"})]}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(c,{className:"h-72 w-full rounded"})})]})]}:N?{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col items-center justify-center gap-4 px-2 py-4 text-center sm:px-0 lg:py-8",children:[
|
|
11
11
|
/* @__PURE__ */e(f,{className:"size-9 text-destructive"}),
|
|
12
|
-
/* @__PURE__ */e(
|
|
13
|
-
/* @__PURE__ */e(
|
|
12
|
+
/* @__PURE__ */e(d,{variant:"h4",color:"error",align:"center",children:p("common.error","Something went wrong")}),
|
|
13
|
+
/* @__PURE__ */e(d,{variant:"body2",color:"muted",align:"center",children:w instanceof Error?w.message:p("common.try_again","Please try again later.")})]}:{className:"bg-background mt-4 flex min-h-[80vh] w-full flex-col gap-6 px-2 py-4 sm:px-0 lg:py-8",children:[/* @__PURE__ */e("div",{className:"flex flex-col items-center gap-2 text-center",children:[/* @__PURE__ */e("div",{className:"text-primary flex items-center gap-2",children:/* @__PURE__ */e(d,{variant:"h5",color:"primary",children:p("leaderboard.leaderboard","Leaderboard")})}),/* @__PURE__ */e(d,{variant:"h4",align:"center",color:"foreground",children:x?.name})]}),/* @__PURE__ */e("div",{className:a("flex w-full gap-8 lg:gap-0",x?.engagementStyle===o.REACTION?"flex-col-reverse md:flex-row-reverse md:justify-between":"flex-col md:flex-row"),children:[/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:p("leaderboard.point_leaders","Top Points Leaders"),entries:z?.leaderboardByPoint?.topRankers||[],pointName:x?.pointName})}),/* @__PURE__ */e("div",{className:"flex-1",children:/* @__PURE__ */e(y,{title:x?.engagementStyle===o.REACTION?p("leaderboard.reaction_counts","Top Reactions"):p("leaderboard.top_rated_photos","Top Rated Photos"),showFloatingPoint:x?.engagementStyle===o.CONTEST,entries:z?.leaderboardByScore?.topRankers||[],pointName:x?.pointName})})]})]})};export{z as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{h as a,t as s}from"./DrrpB4Om.js";import{n as o}from"./CnXoEQ4O.js";import{x as e}from"./DDy6e4u1.js";import{c as r,t as l}from"./TlERMTWp.js";import{t as i}from"./CILYMBwp.js";import{n as t}from"./DGGc10Cy.js";import{t as n}from"./oS3-bnne2.js";import{a as d,i as m,o as p,r as c,s as w,t as g}from"./DG2ImKMr2.js";import{n as h,r as f,t as u}from"./DlRUi0u42.js";var P=()=>{const{t:P}=t(),[b,v]=a(""),[C,y]=a(""),[N,j]=a(""),[x,k]=a(""),[z,A]=a(""),[S,F]=a(null),[L,E]=a({}),[O,R]=a(!1),[W,D]=a({google:!1,apple:!1}),[G,H]=a({showPassword:!1,showConfirmPassword:!1}),I=r(),{registerUsingEmail:U,loginWithGoogle:B,loginWithApple:T}=o(),V=a=>{E(s=>s[a]?{...s,[a]:void 0}:s)},X=async(a,s)=>{D(s=>({...s,[a]:!0})),F(null);try{await(s?.())}catch(o){o instanceof Error?F(o.message):F(`Failed to sign up with ${a.charAt(0).toUpperCase()+a.slice(1)}`)}finally{D(s=>({...s,[a]:!1}))}};/* @__PURE__ */
|
|
2
|
+
return s("div",{className:"bg-background w-full space-y-8",children:[/* @__PURE__ */s("form",{noValidate:!0,onSubmit:async a=>{a.preventDefault();const s=d(b),o=p(C),e=m(N),r=w(x),l=c(z,x);if(s||o||e||r||l)return void E({fname:s,lname:o,email:e,password:r,confirmPassword:l});E({}),R(!0),F(null);const i=await(U?.(N.toLowerCase(),x,b,C));i?.error&&F(i.error),R(!1)},className:"space-y-4",children:[
|
|
3
|
+
/* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-4",children:[/* @__PURE__ */s(g,{label:P("auth.firstName","First name"),name:"fname",disabled:O,type:"text",value:b,onChange:a=>{v(a.target.value),V("fname")},error:L.fname}),/* @__PURE__ */s(g,{label:P("auth.lastName","Last name"),name:"lname",disabled:O,type:"text",value:C,onChange:a=>{y(a.target.value),V("lname")},error:L.lname})]}),
|
|
4
|
+
/* @__PURE__ */s(g,{label:P("auth.email","Email address"),name:"email",disabled:O,type:"email",value:N,onChange:a=>{j(a.target.value),V("email")},autoComplete:"email",error:L.email}),
|
|
5
|
+
/* @__PURE__ */s(g,{label:P("auth.password","Password"),name:"password",disabled:O,type:G.showPassword?"text":"password",value:x,onChange:a=>{k(a.target.value),V("password")},autoComplete:"new-password",error:L.password,actionLabel:G.showPassword?"Hide password":"Show password",actionIcon:G.showPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showPassword:!a.showPassword}))}),
|
|
6
|
+
/* @__PURE__ */s(g,{label:P("auth.confirmPassword","Confirm password"),name:"confirmPassword",disabled:O,type:G.showConfirmPassword?"text":"password",value:z,onChange:a=>{A(a.target.value),V("confirmPassword")},autoComplete:"new-password",error:L.confirmPassword,actionLabel:G.showConfirmPassword?"Hide password":"Show password",actionIcon:G.showConfirmPassword?/* @__PURE__ */s(u,{className:"size-5"}):/* @__PURE__ */s(h,{className:"size-5"}),onActionClick:()=>H(a=>({...a,showConfirmPassword:!a.showConfirmPassword}))}),S&&/* @__PURE__ */s(i,{align:"center",color:"error",className:"font-medium",children:S}),
|
|
7
|
+
/* @__PURE__ */s("div",{className:"flex justify-end",children:/* @__PURE__ */s(l,{to:e.FORGOT_PASSWORD,state:{from:I.pathname},children:/* @__PURE__ */s(i,{variant:"h6",className:"w-fit",children:P("button.forgotPassword","Forgot Password?")})})}),
|
|
8
|
+
/* @__PURE__ */s(n,{type:"submit",color:"primary",className:"w-full",disabled:O,loading:O,children:P("button.register","Register")})]}),/* @__PURE__ */s("div",{className:"grid grid-cols-2 gap-2",children:[/* @__PURE__ */s(f,{disabled:O||W.google||W.apple,loading:W.google,onClick:()=>X("google",B),provider:"google"}),/* @__PURE__ */s(f,{disabled:O||W.google||W.apple,loading:W.apple,onClick:()=>X("apple",T),provider:"apple"})]})]})};export{P as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t}from"./
|
|
1
|
+
import{t}from"./DrrpB4Om.js";import{x as e}from"./DDy6e4u1.js";import{l as s}from"./TlERMTWp.js";function o({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:"m7.825 13l4.9 4.9q.3.3.288.7t-.313.7q-.3.275-.7.288t-.7-.288l-6.6-6.6q-.15-.15-.213-.325T4.426 12t.063-.375t.212-.325l6.6-6.6q.275-.275.688-.275t.712.275q.3.3.3.713t-.3.712L7.825 11H19q.425 0 .713.288T20 12t-.288.713T19 13z"})})}var r=()=>{const r=s();/* @__PURE__ */
|
|
3
|
-
return t("button",{type:"button",onClick:()=>{window.history.length>1?r(-1):r(e.PUBLIC_EVENTS,{state:{internalNavigation:!0}})},className:"text-
|
|
3
|
+
return t("button",{type:"button",onClick:()=>{window.history.length>1?r(-1):r(e.PUBLIC_EVENTS,{state:{internalNavigation:!0}})},className:"text-foreground absolute top-0 left-0",children:/* @__PURE__ */t(o,{className:"size-6"})})};export{r as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{t}from"./DrrpB4Om.js";import{n as s}from"./CnXoEQ4O.js";import{x as a}from"./DDy6e4u1.js";import{i as r,n as o,u as e}from"./TlERMTWp.js";import{t as i}from"./DM971zPD.js";import{t as n}from"./BlknxKzR.js";import{t as m}from"./tdnQ0RcT.js";import{t as l}from"./BCQyxXhG.js";import{t as c}from"./DGGc10Cy.js";import{t as g}from"./Cqm7RQaC2.js";import{t as d}from"./oS3-bnne2.js";var p=()=>{const p=e(),{props:f}=s(),h=f?.organizationId,{loading:v,event:u}=g({eventSlug:p.eventSlug});if(v)/* @__PURE__ */return t("div",{children:[
|
|
2
|
+
/* @__PURE__ */t(n,{className:"mx-auto mt-4 h-8 w-64"}),
|
|
3
|
+
/* @__PURE__ */t(n,{className:"mx-auto mt-6 h-6 w-72"}),
|
|
4
|
+
/* @__PURE__ */t(n,{className:"mx-auto mt-6 h-8 w-72"}),
|
|
5
|
+
/* @__PURE__ */t("div",{className:"mt-8 grid grid-cols-1 gap-4 sm:grid-cols-3",children:Array.from({length:8}).map((s,a)=>/* @__PURE__ */t(n,{className:"h-72"},a))})]});const j=u?.organizationId?.toString?.()||u?.organizationId,N=h?.toString?.()||h;/* @__PURE__ */
|
|
6
|
+
return t("div",u&&j===N?{className:"bg-background relative min-h-screen",children:/* @__PURE__ */t(c,{locale:u?.language??"en",translations:u?.translations,children:[
|
|
7
|
+
/* @__PURE__ */t(l,{}),
|
|
8
|
+
/* @__PURE__ */t(r,{}),
|
|
9
|
+
/* @__PURE__ */t(m,{})]})}:{className:"flex w-full flex-col items-center gap-8",children:[/* @__PURE__ */t(i,{className:"mt-16",title:"Event not found",description:"Please check the provided link",iconSvg:/* @__PURE__ */t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"size-full",viewBox:"0 0 997.86122 450.8081",role:"img"})}),/* @__PURE__ */t(o,{to:a.PUBLIC_EVENTS,state:{internalNavigation:!0},children:/* @__PURE__ */t(d,{children:"All events"})})]})};export{p as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as t}from"./BkIDQGIs.js";var e='url("https://res.cloudinary.com/dectzk2b2/image/upload/v1736933014/black_rpie3v.png")',n=class{constructor(t){this.backdropOn=!1,this.lightbox=t,this.backgroundElement=null,this.backgroundVideoElement=null,this.referenceVideoElement=null,this.options={toggleBackdropButtonOrder:7},t.on("init",()=>{this.initPswpEvents(t.pswp)})}getRootNode(){return this.lightbox?.pswp?.element?.getRootNode?.()||document}querySelector(t){return this.getRootNode().querySelector?.(t)||document.querySelector(t)}initPswpEvents(t){t.on("afterInit",()=>{setTimeout(()=>{this.backgroundElement.style.display="block",this.backgroundVideoElement.style.display="block"},[500])}),t.on("uiRegister",()=>{t.ui.registerElement({name:"toggle-backdrop-button",title:"Toggle blur backdrop",order:this.options.toggleBackdropButtonOrder,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-backdrop"/><use class="pswp__icn-shadow" xlink:href="#pswp__icn-hide-backdrop"/><path id="pswp__icn-show-backdrop" style="display:none" d="M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m0-4q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m0-4q-.425 0-.712-.288T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m0-4q-.425 0-.712-.288T5 6t.288-.712T6 5t.713.288T7 6t-.288.713T6 7m4 8.5q-.625 0-1.062-.437T8.5 14t.438-1.062T10 12.5t1.063.438T11.5 14t-.437 1.063T10 15.5m0-4q-.625 0-1.062-.437T8.5 10t.438-1.062T10 8.5t1.063.438T11.5 10t-.437 1.063T10 11.5m0 7.5q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m0-12q-.425 0-.712-.288T9 6t.288-.712T10 5t.713.288T11 6t-.288.713T10 7m0 14.5q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 12q-.625 0-1.062-.437T12.5 14t.438-1.062T14 12.5t1.063.438T15.5 14t-.437 1.063T14 15.5m0-4q-.625 0-1.062-.437T12.5 10t.438-1.062T14 8.5t1.063.438T15.5 10t-.437 1.063T14 11.5m0 7.5q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m0-12q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m0 14.5q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-18q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M18 19q-.425 0-.712-.288T17 18t.288-.712T18 17t.713.288T19 18t-.288.713T18 19m0-4q-.425 0-.712-.288T17 14t.288-.712T18 13t.713.288T19 14t-.288.713T18 15m0-4q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m0-4q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m3 7.5q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m0-4q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15"/><path id="pswp__icn-hide-backdrop" d="m19.1 21.9l-17-17q-.275-.275-.275-.7t.275-.7t.7-.275t.7.275l17 17q.275.275.275.7t-.275.7t-.7.275t-.7-.275m-9.1-.4q-.2 0-.35-.15T9.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 21t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M6 19q-.425 0-.712-.288T5 18t.288-.712T6 17t.713.288T7 18t-.288.713T6 19m4 0q-.425 0-.712-.288T9 18t.288-.712T10 17t.713.288T11 18t-.288.713T10 19m4 0q-.425 0-.712-.288T13 18t.288-.712T14 17t.713.288T15 18t-.288.713T14 19m-4-3.5q-.65 0-1.075-.425T8.5 14t.425-1.075T10 12.5t1.075.425T11.5 14t-.425 1.075T10 15.5M6 15q-.425 0-.712-.288T5 14t.288-.712T6 13t.713.288T7 14t-.288.713T6 15m11.8-.025l-.775-.775q-.1-.5.213-.85T18 13q.425 0 .713.288T19 14q0 .45-.35.763t-.85.212M3 14.5q-.2 0-.35-.15T2.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 14t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m-6.7-3.05L12.55 9.7q.125-.525.5-.862T14 8.5q.65 0 1.075.425T15.5 10q0 .575-.35.963t-.85.487M6 11q-.425 0-.712-.287T5 10t.288-.712T6 9t.713.288T7 10t-.288.713T6 11m12 0q-.425 0-.712-.288T17 10t.288-.712T18 9t.713.288T19 10t-.288.713T18 11m-15-.5q-.2 0-.35-.15T2.5 10t.15-.35T3 9.5t.35.15t.15.35t-.15.35t-.35.15m18 0q-.2 0-.35-.15T20.5 10t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15M14 7q-.425 0-.712-.288T13 6t.288-.712T14 5t.713.288T15 6t-.288.713T14 7m-4.175-.025l-.8-.8q-.075-.5.225-.837T10 5q.425 0 .712.287T11 6q0 .45-.337.75t-.838.225M18 7q-.425 0-.712-.288T17 6t.288-.712T18 5t.713.288T19 6t-.288.713T18 7m-8-3.5q-.2 0-.35-.15T9.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15m4 0q-.2 0-.35-.15T13.5 3t.15-.35t.35-.15t.35.15t.15.35t-.15.35t-.35.15" /></svg>',onClick:()=>{this.toggleBackdrop(t)}}),this.createBlurBackground(t)}),t.on("change",()=>{this.backdropOn&&this.updateBlurBackground(t)}),t.on("close",()=>{this.removeBlurBackground(),this.backdropOn=!1})}createBlurBackground(t){const n=t.element;if(!this.backgroundElement){const t=document.createElement("div");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.backgroundSize="cover",t.style.backgroundPosition="center",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.transition="background-image 0.5s ease, opacity 0.5s ease",t.style.display="none",t.style.backgroundImage=e,n.append(t),this.backgroundElement=t}if(!this.backgroundVideoElement){const t=document.createElement("video");t.style.position="fixed",t.style.top=0,t.style.left=0,t.style.width="100vw",t.style.height="100vh",t.style.objectFit="cover",t.style.filter="blur(44px)",t.style.zIndex=-1,t.style.display="none",t.style.transition="opacity 0.5s ease",t.muted=!0,t.loop=!0,t.autoplay=!1,t.muted=!0,t.volume=0,n.append(t),this.backgroundVideoElement=t}}toggleBackdrop(t){this.backdropOn?(this.backgroundElement.style.backgroundImage=e,this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.pause(),this.backdropOn=!1):(this.updateBlurBackground(t),this.backdropOn=!0);const n=this.querySelector("#pswp__icn-hide-backdrop"),o=this.querySelector("#pswp__icn-show-backdrop");n&&(n.style.display=this.backdropOn?"none":"inline"),o&&(o.style.display=this.backdropOn?"inline":"none")}updateBlurBackground(n){const o=n.currSlide;if(o?.data)if("video"===o.data.type){const t=this.backgroundVideoElement,e=o.content.element;"video"===e?.tagName?.toLowerCase()&&(this.referenceVideoElement=e,this.registerVideoEvents(e,t)),t.style.opacity=0,setTimeout(()=>{t.src=o.data.src,t.load(),this.initBackgroundVideo(),t.style.opacity=1},500),this.backgroundElement&&(this.backgroundElement.style.opacity=0)}else{if(this.backgroundElement){const n=((e,n=32,o=32)=>{if(!e||e.length<6||"undefined"==typeof document)return null;try{const i=t(e,n,o),s=document.createElement("canvas");s.width=n,s.height=o;const r=s.getContext("2d");if(!r)return null;const a=r.createImageData(n,o);return a.data.set(i),r.putImageData(a,0,0),s.toDataURL()}catch(i){return console.warn("[PhotoSwipeBackdrop] Failed to decode blurhash:",i),null}})(o.data.blurhash)||o.data.thumbnailUrl||o.data.src;this.backgroundElement.style.backgroundImage=n?`url("${n}")`:e,this.backgroundElement.style.backgroundColor="transparent",this.backgroundElement.style.opacity=1}this.backgroundVideoElement&&(this.backgroundVideoElement.style.opacity=0,this.backgroundVideoElement.src="")}}initBackgroundVideo(){this.referenceVideoElement&&(this.backgroundVideoElement.currentTime=this.referenceVideoElement.currentTime,this.referenceVideoElement.currentTime>0&&!this.referenceVideoElement.paused&&!this.referenceVideoElement.ended&&this.referenceVideoElement.readyState>2&&this.backgroundVideoElement.play())}removeBlurBackground(){this.backgroundElement&&(this.backgroundElement.remove(),this.backgroundVideoElement.remove(),this.backgroundElement=null,this.backgroundVideoElement=null)}registerVideoEvents(t,e){this.foregroundVideoElement=t,t.addEventListener("play",()=>{e.currentTime=t.currentTime,e.play()}),t.addEventListener("pause",()=>{e.pause()}),t.addEventListener("ended",()=>{e.pause(),e.currentTime=0})}};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],e=/* @__PURE__ */new Uint32Array(96),s=class s{static from(e){if(!e||void 0===e.byteLength||e.buffer)throw new Error("Data must be an instance of ArrayBuffer or SharedArrayBuffer.");const[n,i]=new Uint8Array(e,0,2);if(219!==n)throw new Error("Data does not appear to be in a KDBush format.");const o=i>>4;if(1!==o)throw new Error(`Got v${o} data when expected v1.`);const r=t[15&i];if(!r)throw new Error("Unrecognized array type.");const[h]=new Uint16Array(e,2,1),[a]=new Uint32Array(e,4,1);return new s(a,h,r,void 0,e)}constructor(e,s=64,n=Float64Array,i=ArrayBuffer,o){if(isNaN(e)||e<0)throw new Error(`Unexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+s,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;const r=t.indexOf(this.ArrayType),h=2*e*this.ArrayType.BYTES_PER_ELEMENT,a=e*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-a%8)%8;if(r<0)throw new Error(`Unexpected typed array class: ${n}.`);if(o)this.data=o,this.ids=new this.IndexArrayType(o,8,e),this.coords=new n(o,8+a+c,2*e),this._pos=2*e,this._finished=!0;else{const t=this.data=new i(8+h+a+c);this.ids=new this.IndexArrayType(t,8,e),this.coords=new n(t,8+a+c,2*e),this._pos=0,this._finished=!1,new Uint8Array(t,0,2).set([219,16+r]),new Uint16Array(t,2,1)[0]=s,new Uint32Array(t,4,1)[0]=e}}add(t,e){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=e,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return n(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,s,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:r,nodeSize:h}=this;e[0]=0,e[1]=o.length-1,e[2]=0;let a=3;const c=[];for(;a>0;){const d=e[--a],u=e[--a],p=e[--a];if(u-p<=h){for(let e=p;e<=u;e++){const h=r[2*e],a=r[2*e+1];h>=t&&h<=n&&a>=s&&a<=i&&c.push(o[e])}continue}const l=p+u>>1,f=r[2*l],m=r[2*l+1];f>=t&&f<=n&&m>=s&&m<=i&&c.push(o[l]),(0===d?t<=f:s<=m)&&(e[a++]=p,e[a++]=l-1,e[a++]=1-d),(0===d?n>=f:i>=m)&&(e[a++]=l+1,e[a++]=u,e[a++]=1-d)}return c}within(t,e,s){const n=[];return this.withinInto(t,e,s,n),n}withinInto(t,s,n,i){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:r,nodeSize:a}=this;e[0]=0,e[1]=o.length-1,e[2]=0;let c=3,d=0;const u=n*n;for(;c>0;){const p=e[--c],l=e[--c],f=e[--c];if(l-f<=a){for(let e=f;e<=l;e++)h(r[2*e],r[2*e+1],t,s)<=u&&(i[d++]=o[e]);continue}const m=f+l>>1,g=r[2*m],y=r[2*m+1];h(g,y,t,s)<=u&&(i[d++]=o[m]),(0===p?t-n<=g:s-n<=y)&&(e[c++]=f,e[c++]=m-1,e[c++]=1-p),(0===p?t+n>=g:s+n>=y)&&(e[c++]=m+1,e[c++]=l,e[c++]=1-p)}return d}};function n(t,e,s,o,r,h){if(r-o<=s)return;const a=o+r>>1;i(t,e,a,o,r,h),n(t,e,s,o,a-1,1-h),n(t,e,s,a+1,r,1-h)}function i(t,e,s,n,r,h){for(;r>n;){if(r-n>600){const o=r-n+1,a=s-n+1,c=Math.log(o),d=.5*Math.exp(2*c/3),u=.5*Math.sqrt(c*d*(o-d)/o)*(a-o/2<0?-1:1);i(t,e,s,Math.max(n,Math.floor(s-a*d/o+u)),Math.min(r,Math.floor(s+(o-a)*d/o+u)),h)}const a=e[2*s+h];let c=n,d=r;for(o(t,e,n,s),e[2*r+h]>a&&o(t,e,n,r);c<d;){for(o(t,e,c,d),c++,d--;e[2*c+h]<a;)c++;for(;e[2*d+h]>a;)d--}e[2*n+h]===a?o(t,e,n,d):(d++,o(t,e,d,r)),d<=s&&(n=d+1),s<=d&&(r=d-1)}}function o(t,e,s,n){r(t,s,n),r(e,2*s,2*n),r(e,2*s+1,2*n+1)}function r(t,e,s){const n=t[e];t[e]=t[s],t[s]=n}function h(t,e,s,n){const i=t-s,o=e-n;return i*i+o*o}var a,c={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},d=Math.fround||(a=/* @__PURE__ */new Float32Array(1),t=>(a[0]=+t,a[0])),u=class{constructor(t){this.options=Object.assign(Object.create(c),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:s,maxZoom:n}=this.options;e&&console.time("total time");const i=`prepare ${t.length} points`;e&&console.time(i),this.points=t;const o=[];for(let h=0;h<t.length;h++){const e=t[h];if(!e.geometry)continue;const[s,n]=e.geometry.coordinates,i=d(f(s)),r=d(m(n));o.push(i,r,1/0,h,-1,1),this.options.reduce&&o.push(0)}let r=this.trees[n+1]=this._createTree(o);e&&console.timeEnd(i);for(let h=n;h>=s;h--){const t=+Date.now();r=this.trees[h]=this._createTree(this._cluster(r,h)),e&&console.log("z%d: %d clusters in %dms",h,r.numItems,+Date.now()-t)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const n=Math.max(-90,Math.min(90,t[1]));let i=180===t[2]?180:((t[2]+180)%360+360)%360-180;const o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,i=180;else if(s>i){const t=this.getClusters([s,n,180,o],e),r=this.getClusters([-180,n,i,o],e);return t.concat(r)}const r=this.trees[this._limitZoom(e)],h=r.range(f(s),m(o),f(i),m(n)),a=r.data,c=[];for(const d of h){const t=this.stride*d;c.push(a[t+5]>1?p(a,t,this.clusterProps):this.points[a[t+3]])}return c}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),n="No cluster with the specified id.",i=this.trees[s];if(!i)throw new Error(n);const o=i.data;if(e*this.stride>=o.length)throw new Error(n);const r=this.options.radius/(this.options.extent*Math.pow(2,s-1)),h=o[e*this.stride],a=o[e*this.stride+1],c=i.within(h,a,r),d=[];for(const u of c){const e=u*this.stride;o[e+4]===t&&d.push(o[e+5]>1?p(o,e,this.clusterProps):this.points[o[e+3]])}if(0===d.length)throw new Error(n);return d}getLeaves(t,e,s){e=e||10,s=s||0;const n=[];return this._appendLeaves(n,t,e,s,0),n}getTile(t,e,s){const n=this.trees[this._limitZoom(t)],i=Math.pow(2,t),{extent:o,radius:r}=this.options,h=r/o,a=(s-h)/i,c=(s+1+h)/i,d={features:[]};return this._addTileFeatures(n.range((e-h)/i,a,(e+1+h)/i,c),n.data,e,s,i,d),0===e&&this._addTileFeatures(n.range(1-h/i,a,1,c),n.data,i,s,i,d),e===i-1&&this._addTileFeatures(n.range(0,a,h/i,c),n.data,-1,s,i,d),d.features.length?d:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,n,i){const o=this.getChildren(e);for(const r of o){const e=r.properties;if(e&&e.cluster?i+e.point_count<=n?i+=e.point_count:i=this._appendLeaves(t,e.cluster_id,s,n,i):i<n?i++:t.push(r),t.length===s)break}return i}_createTree(t){const e=new s(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<t.length;s+=this.stride)e.add(t[s],t[s+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,s,n,i,o){for(const r of t){const t=r*this.stride,h=e[t+5]>1;let a,c,d;if(h)a=l(e,t,this.clusterProps),c=e[t],d=e[t+1];else{const s=this.points[e[t+3]];a=s.properties;const[n,i]=s.geometry.coordinates;c=f(n),d=m(i)}const u={type:1,geometry:[[Math.round(this.options.extent*(c*i-s)),Math.round(this.options.extent*(d*i-n))]],tags:a};let p;p=h||this.options.generateId?e[t+3]:this.points[e[t+3]].id,void 0!==p&&(u.id=p),o.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:s,extent:n,reduce:i,minPoints:o}=this.options,r=s/(n*Math.pow(2,e)),h=t.data,a=[],c=this.stride;for(let d=0;d<h.length;d+=c){if(h[d+2]<=e)continue;h[d+2]=e;const s=h[d],n=h[d+1],u=t.within(h[d],h[d+1],r),p=h[d+5];let l=p;for(const t of u){const s=t*c;h[s+2]>e&&(l+=h[s+5])}if(l>p&&l>=o){let t,o=s*p,r=n*p,f=-1;const m=(d/c<<5)+(e+1)+this.points.length;for(const s of u){const n=s*c;if(h[n+2]<=e)continue;h[n+2]=e;const a=h[n+5];o+=h[n]*a,r+=h[n+1]*a,h[n+4]=m,i&&(t||(t=this._map(h,d,!0),f=this.clusterProps.length,this.clusterProps.push(t)),i(t,this._map(h,n)))}h[d+4]=m,a.push(o/l,r/l,1/0,m,-1,l),i&&a.push(f)}else{for(let t=0;t<c;t++)a.push(h[d+t]);if(l>1)for(const t of u){const s=t*c;if(!(h[s+2]<=e)){h[s+2]=e;for(let t=0;t<c;t++)a.push(h[s+t])}}}}return a}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,s){if(t[e+5]>1){const n=this.clusterProps[t[e+6]];return s?Object.assign({},n):n}const n=this.points[t[e+3]].properties,i=this.options.map(n);return s&&i===n?Object.assign({},i):i}};function p(t,e,s){return{type:"Feature",id:t[e+3],properties:l(t,e,s),geometry:{type:"Point",coordinates:[(n=t[e],360*(n-.5)),g(t[e+1])]}};var n}function l(t,e,s){const n=t[e+5],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,o=t[e+6],r=-1===o?{}:Object.assign({},s[o]);return Object.assign(r,{cluster:!0,cluster_id:t[e+3],point_count:n,point_count_abbreviated:i})}function f(t){return t/360+.5}function m(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function g(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}export{u as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{_ as e,h as t,t as l,w as n}from"./DrrpB4Om.js";import{i as r}from"./CnXoEQ4O.js";import{t as s}from"./CPK30X_R.js";var a=()=>/* @__PURE__ */l("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */l("path",{d:"m15 18-6-6 6-6"})}),o=()=>/* @__PURE__ */l("svg",{className:"size-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:/* @__PURE__ */l("path",{d:"m9 18 6-6-6-6"})});function i({items:s,autoplayInterval:i=3e3,showControls:d=!1,className:c}){const[u,h]=t(0);return e(()=>{if(s.length<=1)return;const e=setInterval(()=>h(e=>(e+1)%s.length),i);return()=>clearInterval(e)},[s.length,i]),0===s.length?null:/* @__PURE__ */l("div",{className:r("relative size-full overflow-hidden",c),children:[s.map((e,t)=>/* @__PURE__ */l("div",{className:r("absolute inset-0 transition-opacity duration-500",t===u?"opacity-100":"opacity-0"),children:e},t)),s.length>1&&/* @__PURE__ */l("div",{className:"absolute bottom-2 left-1/2 z-10 flex -translate-x-1/2 gap-1",children:s.map((e,t)=>/* @__PURE__ */l("button",{onClick:()=>h(t),className:r("h-1.5 rounded-full transition-all",t===u?"w-4 bg-white":"w-1.5 bg-white/50 hover:bg-white/75"),"aria-label":`Go to slide ${t+1}`},t))}),d&&s.length>1&&/* @__PURE__ */l(n,{children:[/* @__PURE__ */l("button",{onClick:()=>h(e=>0===e?s.length-1:e-1),className:"absolute top-1/2 left-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Previous",children:/* @__PURE__ */l(a,{})}),/* @__PURE__ */l("button",{onClick:()=>h(e=>(e+1)%s.length),className:"absolute top-1/2 right-2 z-10 flex size-8 -translate-y-1/2 items-center justify-center rounded-full bg-black/40 text-white hover:bg-black/60","aria-label":"Next",children:/* @__PURE__ */l(o,{})})]})]})}var d=({event:e,onExplore:t})=>{const n=(e.contents||[]).map(t=>/* @__PURE__ */l(s,{alt:e.name,src:t.thumbnailUrl||t.url,containerClassName:"size-full",imgClassName:"rounded"},t._id)),r=e?.status?.toUpperCase();/* @__PURE__ */
|
|
2
|
+
return l("div",{className:"w-40 rounded pt-2 pl-1",children:[
|
|
3
|
+
/* @__PURE__ */l("div",{className:"relative h-32 w-full overflow-hidden rounded",children:[/* @__PURE__ */l(i,{items:n,autoplayInterval:3e3}),"OPEN"===r&&/* @__PURE__ */l("span",{className:"absolute top-2 left-2 inline-flex items-center gap-1 rounded-full bg-green-500 px-2 py-0.5 text-[10px] font-medium text-white",children:[/* @__PURE__ */l("span",{className:"size-1.5 animate-pulse rounded-full bg-white"}),"Open"]})]}),
|
|
4
|
+
/* @__PURE__ */l("div",{className:"line-clamp-2 pt-2 pb-0.5 text-sm font-medium text-black",children:e.name}),
|
|
5
|
+
/* @__PURE__ */l("div",{className:"pb-2 text-xs text-gray-600",children:e.location?.label}),
|
|
6
|
+
/* @__PURE__ */l("button",{type:"button",onClick:()=>t?.(e.slug||""),className:"bg-primary text-primary-foreground flex w-full items-center justify-center rounded py-1",children:"Explore"})]})},c=(e,t)=>e&&(/^#[0-9a-fA-F]{3,8}$/.test(e)||/^rgb\(\s*\d+\s*,\s*\d+\s*,\s*\d+\s*\)$/.test(e))?e:t,u=e=>{if(e)try{const{protocol:t}=new URL(e);return"https:"===t||"http:"===t?e:void 0}catch{return}},h=({node:e,depth:n,activeFolderId:r,onSelect:s})=>{const[a,o]=t(!1),i=e.folder._id===r,d=e.children.length>0,c=e.eventCount>0;/* @__PURE__ */
|
|
7
|
+
return l("li",{children:[/* @__PURE__ */l("div",{class:"flex items-center gap-1 py-1.5 pr-2 rounded-lg "+(i?"bg-foreground/20":"hover:bg-foreground/20"),style:{paddingLeft:8+14*n+"px"},children:[/* @__PURE__ */l("button",{type:"button",class:"flex w-4 shrink-0 items-center justify-center text-slate-400 text-xs",onClick:e=>{e.stopPropagation(),d&&o(e=>!e)},children:d?a?"▾":"▸":/* @__PURE__ */l("span",{class:"size-1.5 rounded-full bg-slate-300 inline-block"})}),/* @__PURE__ */l("button",{type:"button",class:"flex flex-1 min-w-0 items-center gap-2 cursor-pointer",onClick:()=>{c?s(i?null:e.folder._id):o(e=>!e)},children:[
|
|
8
|
+
/* @__PURE__ */l("span",{class:"size-2 shrink-0 rounded-full",style:{background:e.color}}),
|
|
9
|
+
/* @__PURE__ */l("span",{class:"flex-1 truncate text-left text-sm",children:e.folder.name}),c&&/* @__PURE__ */l("span",{class:"text-xs tabular-nums text-slate-400",children:e.eventCount})]})]}),d&&a&&/* @__PURE__ */l("ul",{children:e.children.map(e=>/* @__PURE__ */l(h,{node:e,depth:n+1,activeFolderId:r,onSelect:s},e.folder._id))})]})},p=(e,t)=>{for(const l of e){if(l.folder._id===t)return l;const e=p(l.children,t);if(e)return e}return null},f=({folderTree:e,activeFolderId:t,setActiveFolderId:n,positionClass:r})=>0===e.length?null:/* @__PURE__ */l("div",{class:`${r??""} w-[min(92%,260px)] overflow-hidden rounded-xl bg-background shadow-lg backdrop-blur-sm`,children:[/* @__PURE__ */l("div",{class:"flex items-center justify-between border-b border-slate-100 px-3 py-2.5",children:[/* @__PURE__ */l("p",{class:"text-xs font-semibold uppercase tracking-wide",children:"Destinations"}),t&&/* @__PURE__ */l("button",{type:"button",onClick:()=>n(null),class:"text-xs text-foreground",children:"Show all"})]}),/* @__PURE__ */l("ul",{class:"max-h-[60vh] overflow-y-auto py-1",children:e.map(e=>/* @__PURE__ */l(h,{node:e,depth:0,activeFolderId:t,onSelect:n},e.folder._id))})]});export{d as a,u as i,p as n,c as r,f as t};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import{h as e,p as a,t as r}from"./DrrpB4Om.js";import{n as s}from"./CnXoEQ4O.js";import{x as i}from"./DDy6e4u1.js";import{l as o}from"./TlERMTWp.js";import{t}from"./CILYMBwp.js";import{n as l}from"./DGGc10Cy.js";import{t as n}from"./oS3-bnne2.js";import{i as d,s as c,t as u}from"./DG2ImKMr2.js";var m=({count:e=1,currentStep:a=0,disabled:s,onStepClick:i})=>{const o=s||!i;/* @__PURE__ */
|
|
2
|
+
return r("ol",{className:"flex items-center space-x-6 pl-1.5",children:Array.from({length:e}).map((e,s)=>/* @__PURE__ */r("li",{children:/* @__PURE__ */r("button",s<a?{type:"button",className:"bg-primary block h-3 w-3 rounded-full",disabled:o,onClick:()=>i?.(s)}:s===a?{type:"button",className:"relative flex items-center justify-center","aria-current":"step",disabled:o,onClick:()=>i?.(s),children:[/* @__PURE__ */r("span",{className:"absolute flex size-6 p-px","aria-hidden":"true",children:/* @__PURE__ */r("span",{className:"bg-primary/40 size-full rounded-full"})}),/* @__PURE__ */r("span",{className:"bg-primary relative block size-3 rounded-full","aria-hidden":"true"})]}:{type:"button",className:"bg-muted block size-3 rounded-full",disabled:o,onClick:()=>i?.(s)})},`progress-dot-${s}`))})},h=({onCodeSent:a})=>{const{t:i}=l(),{sendPasswordResetCode:o}=s(),[c,m]=e(""),[h,f]=e(!1),[p,y]=e(null),[w,v]=e(null);/* @__PURE__ */
|
|
3
|
+
return r("div",{className:"space-y-4",children:[
|
|
4
|
+
/* @__PURE__ */r(t,{variant:"h4",children:i("auth.forgotPassword","Forgot Password")}),
|
|
5
|
+
/* @__PURE__ */r(u,{type:"email",name:"email",value:c,onChange:e=>{m(e.target.value),p&&y(null),w&&v(null)},placeholder:i("auth.emailPlaceholder","Enter your email address"),error:p??void 0,disabled:h}),w&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:w}),
|
|
6
|
+
/* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{y(null),v(null);const e=c.trim().toLowerCase(),r=d(e);if(r)y(r);else{f(!0);try{const r=await o(e);r?.error?v(r.error):a(e)}catch(s){v(s instanceof Error?s.message:String(s))}finally{f(!1)}}},fullWidth:!0,loading:h,disabled:h,children:i("auth.sendVerificationCode","Send verification code")})})]})},f=({email:a,onCodeVerified:i})=>{const{t:o}=l(),{verifyPasswordResetCode:d}=s(),[c,m]=e(""),[h,f]=e(!1),[p,y]=e(null);/* @__PURE__ */
|
|
7
|
+
return r("div",{className:"space-y-4 sm:space-y-6",children:[
|
|
8
|
+
/* @__PURE__ */r("div",{className:"space-y-2",children:[/* @__PURE__ */r(t,{variant:"h4",children:o("auth.verifyCode","Verify Code")}),/* @__PURE__ */r(t,{variant:"body1",children:[o("auth.enterCodeSentTo","Enter the 6-digit code sent to")," ",a]})]}),
|
|
9
|
+
/* @__PURE__ */r(u,{value:c,name:"code",onChange:e=>m(e.target.value),placeholder:o("auth.codePlaceholder","Enter verification code"),disabled:h}),p&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:p}),
|
|
10
|
+
/* @__PURE__ */r("div",{className:"flex gap-2",children:/* @__PURE__ */r(n,{onClick:async()=>{if(y(null),a)if(c.trim()){f(!0);try{const e=await d(a,c.trim());e?.error?y(e.error):e?.data?i(e.data):y(o("auth.codeVerifyFailed","Failed to verify code"))}catch(e){y(e instanceof Error?e.message:String(e))}finally{f(!1)}}else y(o("auth.codeRequired","Please enter the verification code"));else y(o("auth.emailMissing","Email address is missing"))},fullWidth:!0,loading:h,disabled:h,children:o("auth.verify","Verify")})})]})},p=({email:i,passwordResetCodeId:o,onPasswordReset:d})=>{const{t:m}=l(),{resetPassword:h}=s(),[f,p]=e(""),[y,w]=e(""),[v,g]=e(null),[b,C]=e(!1),P=a(()=>c(f),[f]),N=f&&f===y&&!P;/* @__PURE__ */
|
|
11
|
+
return r("div",{className:"space-y-4",children:[
|
|
12
|
+
/* @__PURE__ */r(t,{variant:"h4",children:m("auth.resetPassword","Reset Password")}),
|
|
13
|
+
/* @__PURE__ */r(u,{type:"password",name:"password",autoComplete:"new-password",value:f,onChange:e=>{p(e.target.value),v&&g(null)},placeholder:m("auth.newPassword","New password"),disabled:b,error:P}),
|
|
14
|
+
/* @__PURE__ */r(u,{type:"password",name:"confirmPassword",autoComplete:"new-password",value:y,onChange:e=>{w(e.target.value),v&&g(null)},placeholder:m("auth.confirmNewPassword","Confirm new password"),disabled:b}),v&&/* @__PURE__ */r(t,{variant:"body2",color:"error",children:v}),
|
|
15
|
+
/* @__PURE__ */r("div",{children:/* @__PURE__ */r(n,{onClick:async()=>{if(g(null),i)if(o)if(N){C(!0);try{const e=await h(o,f);e?.error?g(e.error):d()}catch(e){g(e instanceof Error?e.message:String(e))}finally{C(!1)}}else g(m("auth.passwordsDoNotMatch","Passwords do not match"));else g(m("auth.codeIdMissing","Verification code ID is missing"));else g(m("auth.emailMissing","Email address is missing"))},disabled:!N||b,fullWidth:!0,loading:b,children:m("auth.resetPasswordButton","Reset Password")})})]})},y=()=>{const a=o(),[s,t]=e(null),[l,n]=e(null),[d,c]=e(0);/* @__PURE__ */
|
|
16
|
+
return r("div",{className:"bg-background min-h-[60vh]",children:[(({index:e})=>{switch(e){case 0:/* @__PURE__ */return r(h,{onCodeSent:e=>{t(e),c(1)}});case 1:/* @__PURE__ */return r(f,{email:s,onCodeVerified:e=>{n(e),c(2)}});case 2:/* @__PURE__ */return r(p,{email:s,passwordResetCodeId:l,onPasswordReset:()=>{a(i.LOGIN)}})}})({index:d}),/* @__PURE__ */r("div",{className:"mt-8 flex justify-center",children:/* @__PURE__ */r(m,{count:3,currentStep:d})})]})};export{y as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t,h as e,v as s}from"./CnXoEQ4O.js";var i=class extends e{#t;#e;#s;#i;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#e=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(e){const s=()=>{this.#a({type:"continue"})},i={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=t({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(/* @__PURE__ */new Error("No mutationFn found")),onFail:(t,e)=>{this.#a({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#a({type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)});const a="pending"===this.state.status,o=!this.#i.canStart();try{if(a)s();else{this.#a({type:"pending",variables:e,isPaused:o}),this.#s.config.onMutate&&await this.#s.config.onMutate(e,this,i);const t=await(this.options.onMutate?.(e,i));t!==this.state.context&&this.#a({type:"pending",context:t,variables:e,isPaused:o})}const t=await this.#i.start();return await(this.#s.config.onSuccess?.(t,e,this.state.context,this,i)),await(this.options.onSuccess?.(t,e,this.state.context,i)),await(this.#s.config.onSettled?.(t,null,this.state.variables,this.state.context,this,i)),await(this.options.onSettled?.(t,null,e,this.state.context,i)),this.#a({type:"success",data:t}),t}catch(r){try{await(this.#s.config.onError?.(r,e,this.state.context,this,i))}catch(n){Promise.reject(n)}try{await(this.options.onError?.(r,e,this.state.context,i))}catch(n){Promise.reject(n)}try{await(this.#s.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this,i))}catch(n){Promise.reject(n)}try{await(this.options.onSettled?.(void 0,r,e,this.state.context,i))}catch(n){Promise.reject(n)}throw this.#a({type:"error",error:r}),r}finally{this.#s.runNext(this)}}#a(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),s.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function a(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}export{a as n,i as t};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{t as c}from"./DrrpB4Om.js";import{t as e}from"./DmpmrPE5.js";import{i as l}from"./DDy6e4u1.js";var a={bing:{id:"bing",label:"Bing",policyUrl:"https://privacy.microsoft.com/en-us/privacystatement",buildUrl:c=>`https://www.bing.com/images/search?view=detailv2&iss=sbi&form=SBIVSP&sbisrc=UrlPaste&q=imgurl:${encodeURIComponent(c)}`},google:{id:"google",label:"Google Lens",policyUrl:"https://policies.google.com/privacy",buildUrl:c=>`https://lens.google.com/uploadbyurl?url=${encodeURIComponent(c)}`},yandex:{id:"yandex",label:"Yandex",policyUrl:"https://yandex.com/legal/confidential/",buildUrl:c=>`https://yandex.com/images/search?rpt=imageview&url=${encodeURIComponent(c)}`},tineye:{id:"tineye",label:"TinEye",policyUrl:"https://tineye.com/privacy",buildUrl:c=>`https://tineye.com/search?url=${encodeURIComponent(c)}`}},i=Object.keys(a);function o(c){return i.includes(c)}var t=[],r={bing:function({className:e}){/* @__PURE__ */
|
|
2
|
+
return c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 256 388",className:e,children:[
|
|
3
|
+
/* @__PURE__ */c("defs",{children:[
|
|
4
|
+
/* @__PURE__ */c("radialGradient",{id:"bingIconGradA",cx:"93.717%",cy:"77.818%",r:"143.121%",fx:"93.717%",fy:"77.818%",gradientTransform:"matrix(-.65486 -.5438 .75575 -.4712 .963 1.654)",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00cacc"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#048fce"})]}),
|
|
5
|
+
/* @__PURE__ */c("radialGradient",{id:"bingIconGradB",cx:"13.893%",cy:"71.448%",r:"150.086%",fx:"13.893%",fy:"71.448%",gradientTransform:"matrix(.55155 -.39387 .23634 .91917 -.107 .112)",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00bbec"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#2756a9"})]}),
|
|
6
|
+
/* @__PURE__ */c("linearGradient",{id:"bingIconGradC",x1:"50%",x2:"50%",y1:"0%",y2:"100%",children:[/* @__PURE__ */c("stop",{offset:"0%","stop-color":"#00bbec"}),/* @__PURE__ */c("stop",{offset:"100%","stop-color":"#2756a9"})]})]}),
|
|
7
|
+
/* @__PURE__ */c("path",{fill:"url(#bingIconGradA)",d:"M129.424 122.047c-7.133.829-12.573 6.622-13.079 13.928c-.218 3.147-.15 3.36 6.986 21.722c16.233 41.774 20.166 51.828 20.827 53.243c1.603 3.427 3.856 6.65 6.672 9.544c2.16 2.22 3.585 3.414 5.994 5.024c4.236 2.829 6.337 3.61 22.818 8.49c16.053 4.754 24.824 7.913 32.381 11.664c9.791 4.86 16.623 10.387 20.944 16.946c3.1 4.706 5.846 13.145 7.04 21.64c.468 3.321.47 10.661.006 13.663c-1.008 6.516-3.021 11.976-6.101 16.545c-1.638 2.43-1.068 2.023 1.313-.939c6.74-8.379 13.605-22.7 17.108-35.687c4.24-15.718 4.817-32.596 1.66-48.57c-6.147-31.108-25.786-57.955-53.444-73.06c-1.738-.95-8.357-4.42-17.331-9.085a1633 1633 0 0 1-4.127-2.154c-.907-.477-2.764-1.447-4.126-2.154c-1.362-.708-5.282-2.75-8.711-4.539l-8.528-4.446a6021 6021 0 0 1-8.344-4.357c-8.893-4.655-12.657-6.537-13.73-6.863c-1.125-.343-3.984-.782-4.701-.723c-.152.012-.838.088-1.527.168"}),
|
|
8
|
+
/* @__PURE__ */c("path",{fill:"url(#bingIconGradB)",d:"M148.81 277.994c-.493.292-1.184.714-1.537.938c-.354.225-1.137.712-1.743 1.083a8315 8315 0 0 0-13.204 8.137a2848 2848 0 0 0-8.07 4.997a388 388 0 0 1-3.576 2.198c-.454.271-2.393 1.465-4.31 2.654a2652 2652 0 0 1-7.427 4.586a3958 3958 0 0 0-8.62 5.316a3011 3011 0 0 1-7.518 4.637c-1.564.959-3.008 1.885-3.21 2.058c-.3.257-14.205 8.87-21.182 13.121c-5.3 3.228-11.43 5.387-17.705 6.235c-2.921.395-8.45.396-11.363.003c-7.9-1.067-15.176-4.013-21.409-8.666c-2.444-1.826-7.047-6.425-8.806-8.8c-4.147-5.598-6.829-11.602-8.218-18.396c-.32-1.564-.622-2.884-.672-2.935c-.13-.13.105 2.231.528 5.319c.44 3.211 1.377 7.856 2.387 11.829c7.814 30.743 30.05 55.749 60.15 67.646c8.668 3.424 17.415 5.582 26.932 6.64c3.576.4 13.699.56 17.43.276c17.117-1.296 32.02-6.334 47.308-15.996c1.362-.86 3.92-2.474 5.685-3.585a877 877 0 0 0 4.952-3.14c.958-.615 2.114-1.341 2.567-1.614a91 91 0 0 0 2.018-1.268c.656-.424 3.461-2.2 6.235-3.944l11.092-7.006l3.809-2.406l.137-.086l.42-.265l.199-.126l2.804-1.771l9.69-6.121c12.348-7.759 16.03-10.483 21.766-16.102c2.392-2.342 5.997-6.34 6.176-6.848c.037-.104.678-1.092 1.424-2.197c3.036-4.492 5.06-9.995 6.064-16.484c.465-3.002.462-10.342-.005-13.663c-.903-6.42-2.955-13.702-5.167-18.339c-3.627-7.603-11.353-14.512-22.453-20.076c-3.065-1.537-6.23-2.943-6.583-2.924c-.168.009-10.497 6.322-22.954 14.03c-12.457 7.71-23.268 14.4-24.025 14.87s-2.056 1.263-2.888 1.764z"}),
|
|
9
|
+
/* @__PURE__ */c("path",{fill:"url(#bingIconGradC)",d:"m.053 241.013l.054 53.689l.695 3.118c2.172 9.747 5.937 16.775 12.482 23.302c3.078 3.07 5.432 4.922 8.768 6.896c7.06 4.177 14.657 6.238 22.978 6.235c8.716-.005 16.256-2.179 24.025-6.928c1.311-.801 6.449-3.964 11.416-7.029l9.032-5.572v-127.4l-.002-58.273c-.002-37.177-.07-59.256-.188-60.988c-.74-10.885-5.293-20.892-12.948-28.461c-2.349-2.323-4.356-3.875-10.336-7.99a25160 25160 0 0 1-12.104-8.336L28.617 5.835C22.838 1.85 22.386 1.574 20.639.949C18.367.136 15.959-.163 13.67.084C6.998.804 1.657 5.622.269 12.171C.053 13.191.013 26.751.01 100.35l-.003 86.975H0z"})]})},google:function({className:e}){/* @__PURE__ */
|
|
10
|
+
return c("svg",{className:e,focusable:"false",viewBox:"24 24 144 144",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",children:[/* @__PURE__ */c("rect",{fill:"none",height:"192",width:"192"}),/* @__PURE__ */c("g",{children:[
|
|
11
|
+
/* @__PURE__ */c("circle",{fill:"#34A853",cx:"144.07",cy:"144",r:"16"}),
|
|
12
|
+
/* @__PURE__ */c("circle",{fill:"#4285F4",cx:"96.07",cy:"104",r:"24"}),
|
|
13
|
+
/* @__PURE__ */c("path",{fill:"#EA4335",d:"M24,135.2c0,18.11,14.69,32.8,32.8,32.8H96v-16l-40.1-0.1c-8.8,0-15.9-8.19-15.9-17.9v-18H24V135.2z"}),
|
|
14
|
+
/* @__PURE__ */c("path",{fill:"#FBBC05",d:"M168,72.8c0-18.11-14.69-32.8-32.8-32.8H116l20,16c8.8,0,16,8.29,16,18v30h16V72.8z"}),
|
|
15
|
+
/* @__PURE__ */c("path",{fill:"#4285F4",d:"M112,24l-32,0L68,40H56.8C38.69,40,24,54.69,24,72.8V92h16V74c0-9.71,7.2-18,16-18h80L112,24z"})]})]})},yandex:function({className:e}){/* @__PURE__ */
|
|
16
|
+
return c("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,width:"1em",height:"1em",viewBox:"0 0 512 512",children:[/* @__PURE__ */c("path",{d:"M0 0h512v512H0z",fill:"none"}),/* @__PURE__ */c("path",{fill:"#fc3f1d",d:"M215.4 512v-51.6c0-70-8.1-104.6-36.2-165L42.5 0h94.6l116 252.7c34 73.7 48.8 112 48.8 196.7V512zm55.4-264.5L378.6 0h90.9L360.2 247.5z"})]})},tineye:function({className:e}){/* @__PURE__ */
|
|
17
|
+
return c("svg",{viewBox:"1 1 1068.602 1130.289",className:e,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",children:[
|
|
18
|
+
/* @__PURE__ */c("path",{d:"M1 146.465c1.012-3.903 1.838-7.409 3.07-10.766 5.624-15.345 16.325-25.676 31.703-30.943 17.155-5.875 33.28-3.237 47.818 7.437 16.318 11.982 22.46 28.84 20.238 48.376-2.052 18.038-12.097 31.13-28.646 39.863 0-1.39-.118-2.196.038-2.945.121-.585.582-1.099 1.068-1.954-7.978-4.868-15.508-9.882-25.418-9.679-5.159.106-7.615 2.867-8.59 6.88-.82 3.38-.169 7.119-.169 10.678-15.082.424-38.897-18.662-40.722-43.27C1 155.642 1 151.285 1 146.464zM697.563 1c3.152.66 5.846 1.434 8.586 1.962 21.387 4.124 36.727 21.703 39.678 42.526 2.322 16.39-2.362 31.39-13.7 43.634-3.924 4.238-9.373 7.064-14.794 11.024V86.514c-8.367-2.075-16.536-6.866-26.074-4.537-6.647 1.623-8.387 4.166-7.21 10.652.674 3.714 1.697 7.365 2.568 11.069-23.52-2.48-45.548-23.77-43.578-54.88 1.495-23.6 20.856-45.936 47.813-47.423C693.042 1 695.083 1 697.562 1z",fill:"#ff8e4d"}),
|
|
19
|
+
/* @__PURE__ */c("path",{d:"M833.776 655.58c-10.198 10.224-20.302 20.53-27.821 33.009-.845 1.402-1.502 2.918-1.834 4.622 19.7-22.734 40.135-44.277 69.395-55.173-3.002 7.006-6.19 13.825-8.871 20.84-4.69 12.265-8.02 24.904-8.616 38.099-.485 10.743-1.676 21.576-.832 32.232 1.972 24.88 8.432 48.532 22.772 69.482 9.841 14.377 22.553 24.875 40.261 27.128 12.076 1.536 22.903-3.039 32.61-10.162 11.464-8.413 18.832-20.01 25.134-32.428 1.015-1.999 1.977-4.024 3.16-6.435 3.462 1.316 6.734 2.41 9.853 3.84.898.41 1.98 1.83 1.917 2.71-.816 11.438-1.7 22.875-2.824 34.286-.83 8.425-1.606 16.893-3.166 25.2-3.51 18.704-7.07 37.418-11.386 55.947-5.88 25.242-16.105 49.031-26.748 72.517-7.348 16.217-15.96 31.923-24.895 47.343-8.305 14.334-19.022 26.979-31.267 38.22-12.997 11.93-27.803 20.952-44.338 27.097-12.342 4.587-25.07 6.994-38.231 8.246-15.726 1.496-31.241.584-46.78-1.242-12.261-1.441-24.662-2.456-36.66-5.171-13.244-2.998-26.222-7.358-39.091-11.78-15.205-5.225-28.167-14.694-41.412-23.493-9.622-6.391-20.643-8.736-31.506-11.436-21.082-5.238-42.684-6.441-64.165-4.817-19.712 1.491-38.637 6.86-55.184 18.671-9.74 6.952-17.283 15.785-24.144 25.464-13.112 18.498-28.924 34.11-49.937 43.535-13.625 6.11-28.204 9.358-42.883 6.8-20.243-3.526-39.004-11.365-55.833-23.652-16.86-12.308-30.797-26.983-41.591-44.967-8.502-14.164-14.824-29.127-20.083-44.668-6.874-20.315-13.436-40.75-20.89-60.853-8.184-22.07-16.908-43.955-26.017-65.66-5.701-13.584-11.68-27.197-19.108-39.874-8.543-14.576-18.478-28.385-28.435-42.072-13.246-18.208-30.907-31.683-49.654-43.726-13.449-8.64-28.179-14.483-43.703-18.219-7.177-1.728-14.458-3.024-22.076-4.595.232-14.352 4.716-27.508 11.967-39.735 10.145-17.104 24.47-29.948 42.045-39.022 12.592-6.501 25.934-10.992 39.912-13.76 21.243-4.205 42.73-6.09 64.225-4.73 32.393 2.051 64.226 7.228 93.188 23.455 19.679 11.026 35.886 25.733 48.805 44.249 13.232 18.965 29.348 34.85 50.806 44.414 10.33 4.604 21.108 8 32.504 8.64 9.738.547 19.514 1.23 29.243.922 14.455-.456 28.58-3.25 42.498-7.357 18.897-5.576 35.259-15.42 48.973-29.285 12.7-12.84 22.52-28.006 32.437-43.073a1466.113 1466.113 0 0 1 35.434-51.417c6.192-8.588 12.99-16.884 20.458-24.371 9.269-9.293 18.948-18.377 29.472-26.17 15.528-11.499 31.456-22.645 48.152-32.32 15.104-8.754 31.1-16.27 47.368-22.63 18.478-7.223 37.565-13 56.638-18.546 11.712-3.405 23.842-5.473 35.873-7.651 23.644-4.28 47.586-4.891 71.484-3.91 23.363.959 46.105 5.144 67.855 14.681 17.212 7.548 31.471 18.688 43.382 32.658 7.468 8.759 12.993 19.172 19.418 28.824 2.862 4.3 5.794 8.553 8.568 12.64l-27.055 14.844c-8.802-7.399-17.266-15.134-26.382-22.002-9.389-7.073-20.492-10.987-31.998-12.606-10.873-1.53-22.022-2.578-32.941-1.947-17.924 1.035-35.542 4.802-52.31 11.431-11.769 4.653-23.328 9.9-34.717 15.423-6.627 3.214-13.073 7.052-18.941 11.481-3.194 2.41-4.626 7.023-7.528 9.979-5.936 6.045-12.084 11.936-18.588 17.357-10.634 8.86-22.608 16.338-32.174 26.188-8.913 9.178-15.89 20.388-22.893 31.238-13.673 21.186-23.306 44.306-30.348 68.458-3.638 12.476-6.514 25.175-9.703 37.78-.157.621-.02 1.317-.02 3.079 1.318-1.914 2.148-2.964 2.813-4.11 13.397-23.077 26.412-46.387 40.267-69.187 12.027-19.79 25.918-38.324 42.665-54.45 6.49-6.248 13.345-12.349 23-14.775.733.24.88.344 1.027.448m-32.505 40.628c-.785 1.906-1.569 3.813-2.914 5.913l-.121 1.619c.44-.315.879-.63 1.878-1.424.885-1.91 1.77-3.818 3.216-6.215l.76-2.262-.984-.397c-.394.827-.789 1.654-1.835 2.766z",fill:"#2c71a1"}),
|
|
20
|
+
/* @__PURE__ */c("path",{d:"M111.274 531.919c-1.425-2.304-2.883-4.587-4.267-6.914-6.663-11.196-14.614-21.852-19.626-33.745-6.375-15.128-11.098-31.076-15.144-47.022-3.174-12.51-4.482-25.522-6.163-38.37-1.374-10.505-3.456-21.193-2.74-31.629.992-14.457 3.509-28.946 6.886-43.06 2.776-11.599 6.764-23.155 12-33.857 7.262-14.839 17.008-28.15 28.216-40.56 16.136-17.864 34.4-32.98 54.856-45.321 15.683-9.462 32.147-17.63 48.289-26.329.5-.27 1.274-.034 2.357-.034-6.557 12.2-10.399 24.806-9.872 39.006 10.55-1.929 20.784-3.912 31.06-5.645 9.599-1.618 19.24-2.979 28.866-4.437 10.91-1.652 21.804-3.434 32.742-4.883 9.383-1.242 18.819-2.075 28.227-3.124 11.671-1.302 23.335-2.676 35.01-3.945 4.238-.46 8.496-.76 12.751-1.04 15.587-1.025 31.178-1.987 46.763-3.032 2.756-.185 5.616-.286 8.19-1.141 1.363-.453 2.604-2.279 3.239-3.767 8.277-19.404 20.902-35.287 39.157-45.93 13.107-7.642 27.702-8.734 42.6-6.323 2.597.42 5.346-.13 7.96.23 10.593 1.464 21.227 2.76 31.72 4.777 12.325 2.37 24.687 4.843 36.723 8.336a336.134 336.134 0 0 1 36.653 12.97c12.702 5.346 25.388 11.062 37.208 18.086 13.702 8.143 26.668 17.6 39.413 27.204 2.245 1.69 2.33 6.872 2.567 10.497 1.183 18.076 2.13 36.168 3.006 54.262.077 1.599-.49 3.719-1.56 4.807-9.856 10.019-16.62 21.46-17.384 35.853-.952 17.956 1.755 34.995 15.008 48.278 3.72 3.729 9.444 6.317 14.682 7.482a53.559 53.559 0 0 0 27.013-.97c9.915-2.969 16.342-10.268 19.165-19.798 7.535-25.441 3.02-48.47-15.62-68.054-1.33-1.397-2.909-2.674-4.598-3.59-8.758-4.752-10.2-13.713-12.5-21.998-2.093-7.535-3.397-15.29-4.296-23.5 3.045 3.265 6.42 6.284 9.074 9.84 8.51 11.401 17.147 22.74 25.01 34.584 12.224 18.418 20.751 38.61 27.103 59.774 4.034 13.439 7.075 26.985 6.993 41.104-.058 10.003.715 20.072-.18 29.996-1.367 15.159-6.268 29.186-16.355 41.103-9.711 11.474-21.865 19.756-34.937 26.61-16.19 8.488-32.696 16.389-49.227 24.2-12.315 5.82-24.892 11.085-37.337 16.63-1.019.453-1.928 1.153-3.437 2.06-11.006 5.07-21.508 9.721-31.899 14.61-4.036 1.9-7.82 4.335-11.72 6.526-5.516 2.17-11.126 4.13-16.53 6.551-13.01 5.83-25.846 12.054-38.9 17.783-13.787 6.05-27.527 12.32-41.684 17.39a854.019 854.019 0 0 1-55.83 17.861c-10.218 2.886-20.923 4.317-31.507 5.57-12.69 1.504-25.478 2.227-38.238 3.082-8.07.54-16.17.638-24.25 1.055-11.674.603-23.37 2.176-35.006 1.801-23.602-.76-46.949-3.724-70.058-9.165-20.113-4.736-38.798-13.253-58.266-19.643-10.038-3.294-20.61-5.183-30.314-9.218-15.067-6.264-29.406-14.109-41.517-25.423-2.854-2.665-6.02-4.995-9.414-7.896-3.625-3.797-6.878-7.176-10.131-10.555m73.558-223.68c-1.957.918-3.883 1.906-5.873 2.743-20.59 8.662-39.373 20.002-54.226 37.019-2.474 2.835-4.878 6.043-6.214 9.504-4.8 12.437-7.296 25.488-7.29 38.777.006 11.572.882 23.173 1.934 34.71 1.411 15.463 5.677 30.27 12.6 44.154 12.145 24.355 32.196 40.286 56.833 50.359 29.439 12.036 60.666 16.402 92.158 17.14 26.376.618 52.813-.85 79.207-1.824a483.46 483.46 0 0 0 39.068-3.048c18.999-2.253 38.009-4.661 56.847-7.958 24.862-4.352 49.655-9.203 74.307-14.616a567.756 567.756 0 0 0 83.14-25.058c15.603-6.037 30.865-12.955 46.237-19.576 1.24-.534 2.146-1.845 3.207-2.795-.88-.849-1.666-1.831-2.655-2.525-5.937-4.168-12.375-7.749-17.806-12.487-18.845-16.442-28.918-38.217-35.25-61.762-4.044-15.042-8.05-30.257-7.175-46.145.045-.809-.316-1.635-.317-2.454-.02-13.269-.305-26.546.087-39.804.288-9.74 1.627-19.445 2.076-29.184.064-1.37-2.163-3.982-3.514-4.112-23.36-2.246-46.715-4.981-70.141-5.964-19.903-.834-39.896.37-59.846.795-6.79.144-13.588.486-20.357 1.037-14.823 1.207-29.63 2.597-44.443 3.928-11.357 1.021-22.737 1.855-34.064 3.154-15.241 1.75-30.458 3.746-45.654 5.856-16.343 2.27-32.75 4.263-48.95 7.326-28.293 5.348-56.174 12.428-83.926 22.81z",fill:"#2c71a1"}),
|
|
21
|
+
/* @__PURE__ */c("path",{d:"M185.21 308.158c27.374-10.3 55.255-17.38 83.548-22.73 16.2-3.062 32.607-5.055 48.95-7.325 15.196-2.11 30.413-4.107 45.654-5.856 11.327-1.299 22.707-2.133 34.064-3.154 14.813-1.331 29.62-2.721 44.443-3.928 6.77-.55 13.566-.893 20.357-1.037 19.95-.424 39.943-1.63 59.846-.795 23.426.983 46.781 3.718 70.141 5.964 1.35.13 3.578 2.742 3.514 4.112-.45 9.74-1.788 19.445-2.076 29.184-.392 13.258-.107 26.535-.087 39.804 0 .819.362 1.645.317 2.454-.876 15.888 3.131 31.103 7.176 46.145 6.33 23.545 16.404 45.32 35.249 61.762 5.431 4.738 11.869 8.319 17.806 12.487.989.694 1.775 1.676 2.655 2.525-1.061.95-1.967 2.26-3.207 2.795-15.372 6.621-30.634 13.54-46.236 19.576a567.756 567.756 0 0 1-83.14 25.058c-24.653 5.413-49.446 10.264-74.308 14.616-18.838 3.297-37.848 5.705-56.847 7.958a483.46 483.46 0 0 1-39.068 3.048c-26.394.975-52.831 2.442-79.207 1.824-31.492-.738-62.72-5.104-92.158-17.14-24.637-10.073-44.688-26.004-56.833-50.359-6.923-13.884-11.189-28.69-12.6-44.154-1.052-11.537-1.928-23.138-1.934-34.71-.006-13.29 2.49-26.34 7.29-38.777 1.336-3.46 3.74-6.67 6.214-9.504 14.853-17.017 33.635-28.357 54.226-37.019 1.99-.837 3.916-1.825 6.251-2.824m201.146 114.733c3.146 6.947 5.851 14.138 9.519 20.798 11.592 21.054 26.994 38.551 49.189 48.882 24.235 11.28 46.022 5.832 61.441-13.842 16.128-20.578 19.654-45.064 17.3-70.257-1.75-18.72-7.447-36.601-16.597-53.217-11.632-21.12-27.003-38.54-49.269-48.838-17.506-8.097-34.753-7.824-50.904 3.538-9.657 6.795-15.44 16.686-20.256 27.253-8.104 17.78-9.529 36.447-6.972 55.437 1.337 9.936 4.121 19.677 6.549 30.246m-205.288 6.26c.279.95.58 1.896.834 2.855 8.37 31.684 24.064 58.327 52.575 76.068 10.332 6.429 21.605 10.803 33.816 9.782 15.072-1.262 26.844-9.179 34.787-21.995 12.524-20.21 15.326-42.372 11.611-65.506-2.51-15.637-7.657-30.41-15.519-44.222-11.426-20.073-26.468-36.252-47.802-46.146-21.335-9.894-40.216-5.203-53.795 9.063-12.745 13.39-17.955 30.418-18.49 48.578-.301 10.198 1.181 20.449 1.983 31.522z"}),
|
|
22
|
+
/* @__PURE__ */c("path",{d:"M386.208 422.521c-2.28-10.199-5.064-19.94-6.401-29.876-2.557-18.99-1.132-37.658 6.972-55.437 4.817-10.567 10.599-20.458 20.256-27.253 16.15-11.362 33.398-11.635 50.904-3.538 22.266 10.298 37.637 27.718 49.269 48.838 9.15 16.616 14.848 34.497 16.597 53.217 2.354 25.193-1.172 49.679-17.3 70.257-15.419 19.674-37.206 25.123-61.441 13.842-22.195-10.33-37.597-27.828-49.19-48.882-3.667-6.66-6.372-13.85-9.666-21.168m25.884-3.891c-.513 8.802.736 17.129 6.055 24.535 9.544 13.288 26.966 12.323 35.396.758 8.54-11.714 9.476-24.526 4.363-37.58-5.39-13.761-18.67-20.01-30.185-14.433-10.514 5.093-14.972 14.421-15.629 26.72zM181.007 428.727c-.74-10.65-2.223-20.901-1.923-31.1.536-18.16 5.746-35.187 18.491-48.577 13.579-14.266 32.46-18.957 53.795-9.063 21.334 9.894 36.376 26.073 47.802 46.146 7.862 13.811 13.009 28.585 15.52 44.222 3.714 23.134.912 45.296-11.612 65.506-7.943 12.816-19.715 20.733-34.787 21.995-12.21 1.021-23.484-3.353-33.816-9.782-28.511-17.741-44.204-44.384-52.575-76.068-.253-.959-.555-1.904-.895-3.28m22.423 22.124c.91 3.328 1.434 6.827 2.808 9.951 3.527 8.018 9.159 13.987 18.316 15.025 9.436 1.07 16.428-2.542 21.25-11.198 8.09-14.52 8.726-28.544-.864-42.536-7.955-11.606-26.807-11.4-35 .093-6.043 8.476-7.465 17.831-6.51 28.665z",fill:"#fff"}),
|
|
23
|
+
/* @__PURE__ */c("path",{d:"M412.092 418.16c.657-11.829 5.115-21.157 15.63-26.25 11.515-5.577 24.794.672 30.184 14.433 5.113 13.054 4.178 25.866-4.363 37.58-8.43 11.565-25.852 12.53-35.396-.758-5.319-7.406-6.568-15.733-6.055-25.006zM203.28 450.427c-.805-10.41.617-19.766 6.66-28.242 8.193-11.492 27.045-11.699 35-.093 9.59 13.992 8.954 28.016.865 42.536-4.823 8.656-11.815 12.268-21.25 11.198-9.158-1.038-14.79-7.007-18.317-15.025-1.374-3.124-1.897-6.623-2.958-10.374z"})]})}};function n({providers:i,imageUrl:t,className:n,surface:s,organizationId:d,eventId:p,contentId:h}){const m=i.filter(o);return 0===m.length?null:/* @__PURE__ */c("div",{className:"flex flex-row gap-2",children:m.map(i=>{const o=r[i];/* @__PURE__ */
|
|
24
|
+
return c("button",{className:n??"bg-background cursor-pointer bg-opacity-50 rounded-full p-1 opacity-50 transition-all sm:p-1.5 sm:hover:scale-110 sm:hover:opacity-100",onClick:()=>(c=>{window.open(a[c].buildUrl(t),"_blank","noopener,noreferrer"),d&&p&&e.post(l.TRACK_EVENT,{json:{kind:"image-search",organizationId:d,eventId:p,contentId:h,provider:c,surface:s},headers:{"x-org-id":d}}).catch(()=>{})})(i),"aria-label":`Search this image on ${a[i].label}`,children:/* @__PURE__ */c(o,{})},i)})})}export{o as i,t as n,a as r,n as t};
|