notificare-react-preview-components 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2025 Notificare BV (https://notificare.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ [<img src="https://raw.githubusercontent.com/notificare/notificare-react-preview-components/main/.assets/logo.png"/>](https://notificare.com)
2
+
3
+ # Notificare React Preview Components
4
+
5
+ [![GitHub release](https://img.shields.io/github/v/release/notificare/notificare-react-preview-components)](https://github.com/notificare/notificare-react-preview-components/releases)
6
+ [![License](https://img.shields.io/github/license/notificare/notificare-react-preview-components)](https://github.com/notificare/notificare-react-preview-components/blob/main/LICENSE)
7
+
8
+ The **Notificare React Preview Components** consists of a collection of React components that allows you to visualize how a Notificare Push Notification, In-App Message (*coming soon...*) or Wallet Pass (*coming soon...*) will appear in a user's device.
9
+
10
+ # Table of contents
11
+
12
+ - [Features](#features)
13
+ - [Installation](#installation)
14
+ - [Getting Started](#getting-started)
15
+ - [Theming](#theming)
16
+
17
+ ## Features
18
+
19
+ **Push Notifications**: Easily preview how a Notificare push notification will appear across various platforms and devices. With very intuitive UI controls, you can seamlessly switch between different preview variants to see how it looks like in various platforms and form-factors.
20
+
21
+ ## Installation
22
+
23
+ Install the library through NPM with the following command:
24
+
25
+ ```shell
26
+ npm install notificare-react-preview-components
27
+ ```
28
+
29
+ ## Getting Started
30
+
31
+ Getting up and running with this component library is quick and easy. Each component is designed to be modular and flexible, so you can integrate them seamlessly into your existing React application. Whether you’re building something small or scaling up a larger project, the process is the same: simply import the components you need and place them wherever they make the most sense in your UI.
32
+
33
+ Below are basic examples for each component to show how they work. Be sure to check the documentation for each component to explore available props and customization options.
34
+
35
+ ### Push Notifications
36
+
37
+ A push notification preview can be generated through the `NotificareNotificationPreview` component.
38
+
39
+ ```tsx
40
+ import { NotificareNotificationPreview } from 'notificare-react-preview-components';
41
+
42
+ export default function NotificationComposer() {
43
+ return (
44
+ <NotificareNotificationPreview
45
+ applicationId="..."
46
+ notification={...}
47
+ serviceKey="..."
48
+ />
49
+ )
50
+ }
51
+ ```
52
+
53
+ Check the component [documentation](https://github.com/notificare/notificare-react-preview-components/blob/main/docs/push.md) for more information.
54
+
55
+ ## Theming
56
+
57
+ Our React component library is designed with both flexibility and reliability in mind. All components are easy to customize—styles can be effortlessly overridden using your own CSS, allowing seamless integration with your app or website’s design system.
58
+
59
+ We’ve also prioritized style isolation to prevent conflicts. By using scoped, predictable class naming conventions, the library ensures that its styles won’t clash with your existing codebase.
60
+
61
+ For example, to adjust the size of the loading animation, you can simply add the following CSS:
62
+
63
+ ```css
64
+ .notificare .notificare__push__webshot-loading-icon-svg {
65
+ width: 48px;
66
+ height: 48px;
67
+ }
68
+ ```
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("react-dom");function i(e,t,n,i){return new(n||(n=Promise))((function(a,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function r(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,r)}c((i=i.apply(e,t||[])).next())}))}function a(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&i.firstChild?i.insertBefore(a,i.firstChild):i.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}"function"==typeof SuppressedError&&SuppressedError;a("@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');\n\n.notificare {\n font-family: proxima-nova, Helvetica, Arial, sans-serif;\n color: #232c2a;\n}\n\n.notificare * {\n border: 0;\n margin: 0;\n box-sizing: border-box;\n}");a(".notificare .notificare__push__preview {\n margin-top: 20px;\n}\n\n.notificare .notificare__push__preview-wrapper {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: max-content;\n}");a(".notificare .notificare__push__preview-controls {\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 350px;\n row-gap: 14px;\n}\n\n.notificare .notificare__push__preview-controls-preview {\n margin-top: 14px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-groups {\n display: flex;\n align-items: center;\n column-gap: 30px;\n align-self: start;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divider {\n width: 20px;\n height: 20px;\n animation: fadeIn 0.3s ease-out;\n}\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}");function o({options:n,selected:i,setSelected:a}){var o;const[s,r]=t.useState(!1),c=t.useRef(null);if(t.useEffect((()=>{r(!1),n.find((e=>e.key===i))&&i||a(n[0].key)}),[]),t.useEffect((()=>{function e(e){c.current&&!c.current.contains(e.target)&&r(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),n.length>0)return e.jsxs("div",{className:"notificare__push__preview-controls-selector",children:[e.jsx("p",{className:"notificare__push__preview-controls-selector-label",children:"Variant"}),e.jsxs("button",{className:"notificare__push__preview-controls-selector-button",onClick:()=>r(!s),children:[null===(o=n.find((e=>e.key===i)))||void 0===o?void 0:o.label,e.jsx("svg",{className:"notificare__push__preview-controls-selector-button-expand-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})]}),s&&e.jsx("div",{className:"notificare__push__preview-controls-selector-options",ref:c,children:n.map((t=>e.jsx("button",{className:"notificare__push__preview-controls-selector-option-button "+(i===t.key?"notificare__push__preview-controls-selector-option-button--selected":""),onClick:()=>{a(t.key),r(!1)},"data-testid":`selector-option-${t.key}`,children:t.label},t.key)))})]})}a(".notificare .notificare__push__preview-controls-selector {\n position: relative;\n}\n\n.notificare .notificare__push__preview-controls-selector-label {\n font-size: 14px;\n color: #6e6e6e;\n margin-bottom: 7px;\n}\n\n.notificare .notificare__push__preview-controls-selector-button {\n width: 350px;\n height: 42px;\n background-color: #F6F6F6;\n color: #1c1c1c;\n border: 1px solid #E8E8E8;\n text-align: left;\n padding-left: 14px;\n font-size: 16px;\n display: flex;\n align-items: center;\n}\n\n.notificare .notificare__push__preview-controls-selector-button:hover {\n cursor: pointer;\n}\n\n.notificare .notificare__push__preview-controls-selector-button-expand-icon {\n width: 16px;\n height: 16px;\n margin-left: auto;\n margin-right: 14px;\n}\n\n.notificare .notificare__push__preview-controls-selector-options {\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 63px;\n z-index: 1;\n box-shadow: 0 14px 10px -10px rgba(0, 0, 0, 0.2);\n}\n\n.notificare .notificare__push__preview-controls-selector-option-button {\n width: 350px;\n height: 42px;\n background-color: #ececec;\n color: #151515;\n border: 0;\n font-size: 15px;\n text-align: left;\n padding-left: 14px;\n}\n\n.notificare .notificare__push__preview-controls-selector-option-button--selected {\n background-color: #c8c8c8;\n}\n\n.notificare .notificare__push__preview-controls-selector-option-button:hover {\n background-color: #5E5E5E;\n color: white;\n cursor: pointer;\n}");function s({label:n,options:i,selected:a,setSelected:o}){return t.useEffect((()=>{a||o(i[0].key)}),[]),e.jsxs("div",{className:"notificare__push__preview-controls-toggle-group",children:[e.jsxs("p",{className:"notificare__push__preview-controls-toggle-group-label",children:[" ",n," "]}),e.jsx("div",{className:"notificare__push__preview-controls-toggle-group-options",children:i.map(((n,s)=>e.jsxs(t.Fragment,{children:[e.jsx("button",{className:"notificare__push__preview-controls-toggle-group-option "+(a===n.key?"notificare__push__preview-controls-toggle-group-option--selected":""),onClick:()=>o(n.key),"aria-label":`Button with option '${n.key}'`,"data-testid":`toggle-option-${n.key}`,children:e.jsx("div",{className:"notificare__push__preview-controls-toggle-group-option-icon "+(a===n.key?"notificare__push__preview-controls-toggle-group-option-icon--selected":""),children:n.icon})}),s!==i.length-1&&e.jsx("div",{className:"notificare__push__preview-controls-toggle-group-divisor"})]},n.key)))})]})}function r({platform:t,mobileVariant:n,webDevice:i,webMobileType:a,webDesktopOS:r,setPlatform:c,setMobileVariant:_,setWebDevice:l,setWebMobileType:d,setWebDesktopOS:p}){const u=[{key:"android",icon:e.jsx("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1 -24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1 -24 24m273.7-144.5 47.9-83a10 10 0 1 0 -17.3-10h0l-48.5 84.1a301.3 301.3 0 0 0 -246.6 0L116.2 64.5a10 10 0 1 0 -17.3 10h0l47.9 83C64.5 202.2 8.2 285.6 0 384H576c-8.2-98.5-64.5-181.8-146.9-226.6"})},"Android Icon")},{key:"ios",icon:e.jsx("svg",{width:"20px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:e.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})},"iOS Icon")},{key:"web",icon:e.jsx("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:e.jsx("path",{d:"M0 32l34.9 395.8L191.5 480l157.6-52.2L384 32H0zm308.2 127.9H124.4l4.1 49.4h175.6l-13.6 148.4-97.9 27v.3h-1.1l-98.7-27.3-6-75.8h47.7L138 320l53.5 14.5 53.7-14.5 6-62.2H84.3L71.5 112.2h241.1l-4.4 47.7z"})},"Web Icon")}],h=[{key:"desktop",icon:e.jsx("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{d:"M64 0C28.7 0 0 28.7 0 64L0 352c0 35.3 28.7 64 64 64l176 0-10.7 32L160 448c-17.7 0-32 14.3-32 32s14.3 32 32 32l256 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-69.3 0L336 416l176 0c35.3 0 64-28.7 64-64l0-288c0-35.3-28.7-64-64-64L64 0zM512 64l0 288L64 352 64 64l448 0z"})},"Desktop Icon")},{key:"phone",icon:e.jsx("svg",{width:"19px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:e.jsx("path",{d:"M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM224 448a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM304 64L80 64l0 320 224 0 0-320z"})},"Phone Icon")}],f=[{key:"android",icon:e.jsx("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{d:"M420.6 301.9a24 24 0 1 1 24-24 24 24 0 0 1 -24 24m-265.1 0a24 24 0 1 1 24-24 24 24 0 0 1 -24 24m273.7-144.5 47.9-83a10 10 0 1 0 -17.3-10h0l-48.5 84.1a301.3 301.3 0 0 0 -246.6 0L116.2 64.5a10 10 0 1 0 -17.3 10h0l47.9 83C64.5 202.2 8.2 285.6 0 384H576c-8.2-98.5-64.5-181.8-146.9-226.6"})},"iOS Icon")},{key:"iphone",icon:e.jsx("svg",{width:"20px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:e.jsx("path",{d:"M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"})},"iOS Icon")}];return e.jsxs("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e.jsxs("div",{className:"notificare__push__preview-controls-toggle-groups",children:[e.jsx(s,{label:"Platform",options:u.map((e=>e)),selected:t,setSelected:c}),"web"===t&&e.jsxs(e.Fragment,{children:[e.jsx(s,{label:"Form Factor",options:h.map((e=>e)),selected:i,setSelected:l}),"phone"===i&&e.jsx(s,{label:"Phone Model",options:f.map((e=>e)),selected:a,setSelected:d})]})]}),("ios"===t||"android"===t)&&e.jsx(o,{options:[{key:"lockscreen",label:"Lock Screen"},{key:"lockscreen-expanded",label:"Lock Screen Expanded"},{key:"app-ui",label:"App UI"}],selected:n,setSelected:_}),"web"===t&&e.jsxs(e.Fragment,{children:["phone"===i&&e.jsx(o,{options:[{key:"app-ui",label:"App UI"}],selected:n,setSelected:_}),"desktop"===i&&e.jsx(o,{options:[{key:"macOS",label:"macOS"}],selected:r,setSelected:p})]})]})}function c({options:t,children:n}){return e.jsx(l.Provider,{value:{options:t},children:n})}a(".notificare .notificare__push__preview-controls-toggle-group {\n display: flex;\n flex-direction: column;\n row-gap: 7px;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-label {\n font-size: 14px;\n color: #6e6e6e;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-options {\n display: flex;\n border-radius: 8px;\n border: 1px solid #DADADA;\n width: max-content;\n overflow: hidden;\n background-color: #F6F6F6;\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-option {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n transition: all 0.3s;\n background: #f6f6f6;\n color: #374151;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-option--selected {\n background: #5E5E5E;\n color: #ffffff;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-option-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n fill: #C0C0C0;\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-option-icon--selected {\n fill: #FFF\n}\n\n.notificare .notificare__push__preview-controls-toggle-group-divisor {\n width: 1px;\n height: 40px;\n background: #DADADA;\n}");const _=()=>{const e=t.useContext(l);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e},l=t.createContext(void 0);function d(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}a(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function p({children:t,theme:n}){return e.jsxs("div",{className:"notificare__push__android__phone-background "+("dark"===n?"notificare__push__android__phone-background--dark":""),"data-testid":"android-phone-background",children:[e.jsx("div",{className:"notificare__push__android__phone-background-camera"}),e.jsx("div",{className:"notificare__push__android__phone-background-content",children:t})]})}a(".notificare .notificare__push__android__phone-background {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__phone-background--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__push__android__phone-background-camera {\n width: 20px;\n height: 20px;\n background: #c6c6c6;\n border-radius: 50%;\n margin: 20px auto 10px;\n}\n\n.notificare .notificare__push__android__phone-background-content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");function u({message:t,showConsoleWarning:n}){return e.jsxs("div",{"data-testid":"notificare-push-unavailable-preview",children:[e.jsxs("div",{className:"notificare__push__unavailable-preview-warning",children:[e.jsx("svg",{className:"notificare__push__unavailable-preview-alert-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),e.jsxs("div",{className:"notificare__push__unavailable-preview-text-container",children:[e.jsx("div",{className:"notificare__push__unavailable-preview-title",children:"Preview could not be loaded"}),e.jsx("div",{className:"notificare__push__unavailable-preview-reason-text","data-testid":"notificare-push-unavailable-preview-reason-text",children:t})]})]}),n&&e.jsx("div",{className:"notificare__push__unavailable-preview-check-console-text",children:"Check console for more information"})]})}a(".notificare .notificare__push__unavailable-preview-warning {\n width: 350px;\n background-color: #fff1cc;\n border: 1px solid #d5d5d5;\n display: flex;\n align-items: center;\n padding: 14px;\n border-radius: 10px;\n column-gap: 14px;\n}\n\n.notificare .notificare__push__unavailable-preview-text-container {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 100%;\n}\n\n.notificare .notificare__push__unavailable-preview-title {\n font-size: 15px;\n color: #232323;\n font-weight: bold;\n}\n\n.notificare .notificare__push__unavailable-preview-reason-text {\n font-size: 13px;\n color: #bd6868;\n}\n\n.notificare .notificare__push__unavailable-preview-alert-icon {\n width: 40px;\n}\n\n.notificare .notificare__push__unavailable-preview-check-console-text {\n font-size: 12px;\n color: #989898;\n text-align: right;\n margin-top: 6px;\n margin-right: 3px;\n font-style: italic;\n}");a("");a(".notificare .notificare__push__webshot-background {\n background-color: #fff;\n}");function h(){return e.jsx("div",{className:"notificare__push__webshot-loading-icon","data-testid":"loading-icon",children:e.jsx("svg",{className:"notificare__push__webshot-loading-icon-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z",fill:"#64706e"})})})}a("@keyframes notificare-push-webshot-loading-icon-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.notificare .notificare__push__webshot-loading-icon {\n width: 100%;\n display: flex;\n justify-content: center;\n padding-top: 50px;\n}\n\n.notificare .notificare__push__webshot-loading-icon-svg {\n width: 60px;\n height: 60px;\n animation: notificare-push-webshot-loading-icon-spin 2s linear infinite;\n}");function f({message:t}){return e.jsxs("div",{className:"notificare__push__preview-error","data-testid":"preview-error",children:[e.jsx("svg",{className:"notificare__push__preview-error-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),e.jsxs("p",{className:"notificare__push__preview-error-text",children:["Preview could not be generated",t&&e.jsxs(e.Fragment,{children:[e.jsx("br",{})," ",e.jsx("br",{})," ",t]})]})]})}function m({url:n,platform:a,width:o,height:s,onLoadingChange:r,canShow:c=!0}){const{serviceKey:l}=_().options,[d,p]=t.useState(""),[u,m]=t.useState(!1),[g,x]=t.useState(!0);return t.useEffect((()=>{if(!l)return m(!0),void console.error("The service key is missing");if(!function(e){try{return new URL(e),!0}catch(e){return!1}}(n))return m(!0),void console.error("The URL is invalid");let e;x(!0),null==r||r(!0),m(!1);const t=setTimeout((()=>i(this,void 0,void 0,(function*(){try{const t=yield function(e,t,n,a,o){return i(this,void 0,void 0,(function*(){const i=yield fetch(`https://push.notifica.re/webshot?apiKey=${o}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:a,type:"png",params:{width:t,height:n}})});return(yield i.json()).webshot.id}))}(n,o,s,a,l);e=setInterval((()=>i(this,void 0,void 0,(function*(){const n=yield function(e,t){return i(this,void 0,void 0,(function*(){const n=yield fetch(`https://push.notifica.re/webshot/${e}?apiKey=${t}`);return(yield n.json()).webshot.status}))}(t,l);if("error"===n)m(!0),x(!1),null==r||r(!1),clearInterval(e);else if("finished"===n){const n=yield function(e,t){return i(this,void 0,void 0,(function*(){const n=yield fetch(`https://push.notifica.re/webshot/${e}/result?apiKey=${t}`),i=yield n.blob();return URL.createObjectURL(i)}))}(t,l);p(n),x(!1),null==r||r(!1),clearInterval(e)}}))),3e3)}catch(e){console.error(e),m(!0),x(!1),null==r||r(!1)}}))),3e3);return()=>{clearTimeout(t),clearInterval(e)}}),[n]),e.jsx("div",{className:"notificare__push__webshot-background",style:{width:o,height:s},children:u?e.jsx(f,{}):g||!c?e.jsx(h,{}):e.jsx("img",{src:d,alt:"Webshot","data-testid":"webshot"})})}a(".notificare .notificare__push__preview-error {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: column;\n width: 100%;\n height: 440px;\n text-align: center;\n padding: 0 20px;\n}\n\n.notificare .notificare__push__preview-error-icon {\n width: 72px;\n margin-bottom: 20px;\n}\n\n.notificare .notificare__push__preview-error-text {\n font-weight: 700;\n font-size: 16px;\n color: #232c2a;\n}");function g({appName:t,title:n,showOptions:i}){return e.jsxs("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[e.jsx("svg",{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:e.jsx("path",{d:"M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"})}),e.jsx("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:n||t}),i&&e.jsx("svg",{className:"notificare__push__android__app-ui__navigation-bar-options-button",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 128 512","data-testid":"android-app-ui-navigation-bar-options-button",children:e.jsx("path",{d:"M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"})})]})}function x({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[e.jsx(g,{appName:n,title:t.title,showOptions:!1}),e.jsx(m,{url:b(t.content[0]),platform:"Android",width:338,height:570})]})}function b(e){switch(e.type){case"re.notifica.content.GooglePlayDetails":return`https://play.google.com/store/apps/details?id=${e.data}`;case"re.notifica.content.GooglePlayDeveloper":return`https://play.google.com/store/apps/dev?id=${e.data}`;case"re.notifica.content.GooglePlayCollection":return`https://play.google.com/store/apps/collection/${e.data}`;case"re.notifica.content.GooglePlaySearch":return`https://play.google.com/store/search?q=${e.data}&c=apps`;default:return""}}a(".notificare .notificare__push__android__app-ui__navigation-bar {\n display: flex;\n width: 338px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n justify-content: flex-start;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-arrow-icon {\n margin-right: 20px;\n height: 24px;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-title {\n width: 100%;\n font-size: 18px;\n font-weight: 700;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__app-ui__navigation-bar-options-button {\n margin-left: auto;\n height: 24px;\n}");function v(e){return!!(e.actions&&e.actions.length>0)}function y(e){return!(!e.actions||1!==e.actions.length)}function w(e){return!!(e.actions&&e.actions.length>1)}function k(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function j({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"android-app-ui-passbook-notification",children:[e.jsx(g,{appName:n,title:t.title,showOptions:v(t)}),e.jsx(m,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}a("");function N({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"android-app-ui-images-notification",children:[e.jsx(g,{appName:n,title:t.title,showOptions:v(t)}),e.jsx("div",{className:"notificare__push__android__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__android__image__app-ui__image-slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))})})]})}a(".notificare .notificare__push__android__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 570px;\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__android__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");a("");function C(e){try{const t=new URL(e).hostname,n=t.split(".");return n.length>2?n.slice(-2).join("."):t}catch(e){return console.error("Invalid URL:",e),""}}function S(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function T({url:n,onLoadingChange:a,canShow:o}){const[s,r]=t.useState(""),[c,l]=t.useState(!1),{serviceKey:d}=_().options;return t.useEffect((()=>{(()=>{i(this,void 0,void 0,(function*(){l(!0);const e=yield function(e,t){return i(this,void 0,void 0,(function*(){var n,i;try{const a=new URLSearchParams({apiKey:e,url:t}),o=yield fetch(`https://push.notifica.re/proxy/?${a.toString()}`),s=yield o.text(),r=new DOMParser;return null!==(i=null===(n=r.parseFromString(s,"text/html").querySelector("title"))||void 0===n?void 0:n.textContent)&&void 0!==i?i:""}catch(e){return console.error("Error getting page title: ",e),""}}))}(d,n);r(e),l(!1),null==a||a(!1)}))})()}),[n]),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[e.jsx("svg",{className:"notificare__push__android__in-app-browser__app-ui__x-mark-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:e.jsx("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})}),S(n)?e.jsx("svg",{className:"notificare__push__android__in-app-browser__app-ui__bar-lock-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:e.jsx("path",{d:"M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"})}):e.jsx("svg",{className:"notificare__push__android__in-app-browser__app-ui__loading-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"})}),e.jsxs("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!c&&o?s:"Loading..."}),e.jsx("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:C(n)})]})]})}function A({notification:n}){const[i,a]=t.useState(!0),[o,s]=t.useState(!0),r=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[e.jsx(T,{url:r,onLoadingChange:a,canShow:!o}),e.jsx(m,{url:r,platform:"Android",width:338,height:570,onLoadingChange:s,canShow:!i})]})}a(".notificare .notificare__push__android__in-app-browser__app-ui__bar {\n display: flex;\n width: 334px;\n height: 45px;\n padding: 0 15px;\n align-items: center;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__x-mark-icon {\n margin-right: 20px;\n height: 24px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-lock-icon {\n margin-right: 7px;\n height: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__loading-icon {\n margin-right: 7px;\n height: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-domain {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-width: 0;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--title {\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__in-app-browser__app-ui__bar-text--url {\n font-size: 12px;\n}");function E({notification:t,appName:n,appIcon:i,expanded:a}){var o,s;return e.jsxs("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[e.jsx("div",{className:"notificare__push__android__lock-screen__app-icon",children:e.jsx("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:i})}),e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__text-content-top",children:[e.jsxs("div",{className:"notificare__push__android__lock-screen__title-and-subtitle "+(k(t)&&!a?"notificare__push__android__lock-screen__title-and-subtitle--has-media":""),children:[e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:a?n:t.title||n}),t.subtitle&&!k(t)&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:t.subtitle})]}),e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:"now"})]}),a&&e.jsx("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:t.title}),e.jsx("p",{className:`notificare__push__android__lock-screen__text ${a?"notificare__push__android__lock-screen__text--expanded-message":""} ${k(t)&&!a?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:t.message}),k(t)&&a&&e.jsx("div",{className:"notificare__push__android__lock-screen__expanded-media","data-testid":"android-lock-screen-notification-expanded-media",children:e.jsx("img",{className:"notificare__push__android__lock-screen__expanded-media-image",src:null===(o=t.attachments)||void 0===o?void 0:o[0].uri,alt:"Expanded media"})})]}),k(t)&&!a&&e.jsx("div",{className:"notificare__push__android__lock-screen__media","data-testid":"android-lock-screen-notification-media",children:e.jsx("img",{className:"notificare__push__android__lock-screen__media-image",src:null===(s=t.attachments)||void 0===s?void 0:s[0].uri,alt:"Media icon"})})]})}a(".notificare .notificare__push__android__lock-screen {\n position: absolute;\n font-family: 'Roboto', sans-serif;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n padding: 10px;\n display: flex;\n flex-direction: row;\n column-gap: 11px;\n left: 50%;\n transform: translateX(-50%);\n top: 40px;\n}\n\n.notificare .notificare__push__android__lock-screen__wrapper {\n position: relative;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__android__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__lock-screen__app-icon-image {\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__android__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n}\n\n.notificare .notificare__push__android__lock-screen__text-content-top {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle {\n display: flex;\n overflow: hidden;\n column-gap: 6px;\n max-width: 223px;\n}\n\n.notificare .notificare__push__android__lock-screen__title-and-subtitle--has-media {\n max-width: 160px;\n}\n\n.notificare .notificare__push__android__lock-screen__text {\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__android__lock-screen__text--title {\n font-weight: 700;\n font-size: 14px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-title {\n font-weight: 700;\n font-size: 14px;\n margin-top: 5px;\n width: 223px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--subtitle {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n font-weight: 400;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-without-media {\n font-size: 14px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--message-with-media {\n font-size: 14px;\n width: 191px;\n}\n\n.notificare .notificare__push__android__lock-screen__text--expanded-message {\n font-size: 14px;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 3;\n word-break: break-word;\n width: 252px;\n white-space: wrap;\n}\n\n/* Media */\n\n.notificare .notificare__push__android__lock-screen__media {\n display: flex;\n width: 50px;\n}\n\n.notificare .notificare__push__android__lock-screen__media-image {\n width: 50px;\n border-radius: 5px;\n object-fit: cover;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media {\n margin-top: 5px;\n width: 252px;\n}\n\n.notificare .notificare__push__android__lock-screen__expanded-media-image {\n width: 100%;\n max-height: 168px;\n border-radius: 15px;\n}\n");a("");var O,P;function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}a("");var M=I(P?O:(P=1,O=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var i,a,o;if(Array.isArray(t)){if((i=t.length)!=n.length)return!1;for(a=i;0!=a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((i=(o=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=i;0!=a--;)if(!Object.prototype.hasOwnProperty.call(n,o[a]))return!1;for(a=i;0!=a--;){var s=o[a];if(!e(t[s],n[s]))return!1}return!0}return t!=t&&n!=n}));function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},L.apply(null,arguments)}function Z(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function z(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:t+""}const R="NOT_LOADED",D="LOADING",$="LOADED",F="FAILED",V="AUTH_FAILURE";class B{static async load(e,t){var n;const i=e.libraries?e.libraries.split(","):[],a=this.serializeParams(e);this.listeners.push(t),null!=(n=window.google)&&null!=(n=n.maps)&&n.importLibrary?(this.serializedApiParams||(this.loadingStatus=$),this.notifyLoadingStatusListeners()):(this.serializedApiParams=a,this.initImportLibrary(e)),this.serializedApiParams&&this.serializedApiParams!==a&&console.warn("[google-maps-api-loader] The maps API has already been loaded with different parameters and will not be loaded again. Refresh the page for new values to have effect.");const o=["maps",...i];await Promise.all(o.map((e=>google.maps.importLibrary(e))))}static serializeParams(e){return[e.v,e.key,e.language,e.region,e.authReferrerPolicy,e.solutionChannel].join("/")}static initImportLibrary(e){if(window.google||(window.google={}),window.google.maps||(window.google.maps={}),window.google.maps.importLibrary)return void console.error("[google-maps-api-loader-internal]: initImportLibrary must only be called once");let t=null;const n=()=>t||(t=new Promise(((t,n)=>{var i;const a=document.createElement("script"),o=new URLSearchParams;for(const[t,n]of Object.entries(e)){const e=t.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase()));o.set(e,String(n))}o.set("loading","async"),o.set("callback","__googleMapsCallback__"),a.async=!0,a.src="https://maps.googleapis.com/maps/api/js?"+o.toString(),a.nonce=(null==(i=document.querySelector("script[nonce]"))?void 0:i.nonce)||"",a.onerror=()=>{this.loadingStatus=F,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=$,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=V,this.notifyLoadingStatusListeners()},this.loadingStatus=D,this.notifyLoadingStatusListeners(),document.head.append(a)})),t);google.maps.importLibrary=e=>n().then((()=>google.maps.importLibrary(e)))}static notifyLoadingStatusListeners(){for(const e of this.listeners)e(this.loadingStatus)}}B.loadingStatus=R,B.serializedApiParams=void 0,B.listeners=[];const U=["onLoad","onError","apiKey","version","libraries"],K=["children"],W=t.createContext(null);const G=e=>{const{children:n}=e,i=Z(e,K),{mapInstances:a,addMapInstance:o,removeMapInstance:s,clearMapInstances:r}=function(){const[e,n]=t.useState({});return{mapInstances:e,addMapInstance:(e,t="default")=>{n((n=>L({},n,{[t]:e})))},removeMapInstance:(e="default")=>{n((t=>Z(t,[e].map(z))))},clearMapInstances:()=>{n({})}}}(),{status:c,loadedLibraries:_,importLibrary:l}=function(e){const{onLoad:n,onError:i,apiKey:a,version:o,libraries:s=[]}=e,r=Z(e,U),[c,_]=t.useState(B.loadingStatus),[l,d]=t.useReducer(((e,t)=>e[t.name]?e:L({},e,{[t.name]:t.value})),{}),p=t.useMemo((()=>null==s?void 0:s.join(",")),[s]),u=t.useMemo((()=>JSON.stringify(L({apiKey:a,version:o},r))),[a,o,r]),h=t.useCallback((async e=>{var t;if(l[e])return l[e];if(null==(t=google)||null==(t=t.maps)||!t.importLibrary)throw new Error("[api-provider-internal] importLibrary was called before google.maps.importLibrary was defined.");const n=await window.google.maps.importLibrary(e);return d({name:e,value:n}),n}),[l]);return t.useEffect((()=>{(async()=>{try{const e=L({key:a},r);o&&(e.v=o),(null==p?void 0:p.length)>0&&(e.libraries=p),(void 0===e.channel||e.channel<0||e.channel>999)&&delete e.channel,void 0===e.solutionChannel?e.solutionChannel="GMP_visgl_rgmlibrary_v1_default":""===e.solutionChannel&&delete e.solutionChannel,await B.load(e,(e=>_(e)));for(const e of["core","maps",...s])await h(e);n&&n()}catch(e){i?i(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[a,p,u]),{status:c,loadedLibraries:l,importLibrary:h}}(i),d=t.useMemo((()=>({mapInstances:a,addMapInstance:o,removeMapInstance:s,clearMapInstances:r,status:c,loadedLibraries:_,importLibrary:l})),[a,o,s,r,c,_,l]);return t.createElement(W.Provider,{value:d},n)};function H(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(J.includes(e)){const e=i,n=t.getCenter(),a=t.getZoom(),o=t.getHeading()||0,s=t.getTilt()||0,r=t.getBounds();return n&&r&&Number.isFinite(a)||console.warn("[createEvent] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),e.detail={center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:a||0,heading:o,tilt:s,bounds:(null==r?void 0:r.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(Y.includes(e)){var a;if(!n)throw new Error("[createEvent] mouse events must provide a srcEvent");const e=i;return e.domEvent=n.domEvent,e.stoppable=!0,e.stop=()=>n.stop(),e.detail={latLng:(null==(a=n.latLng)?void 0:a.toJSON())||null,placeId:n.placeId},e}return i}const q={onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onContextmenu:"contextmenu",onDblclick:"dblclick",onDrag:"drag",onDragend:"dragend",onDragstart:"dragstart",onHeadingChanged:"heading_changed",onIdle:"idle",onIsFractionalZoomEnabledChanged:"isfractionalzoomenabled_changed",onMapCapabilitiesChanged:"mapcapabilities_changed",onMapTypeIdChanged:"maptypeid_changed",onMousemove:"mousemove",onMouseout:"mouseout",onMouseover:"mouseover",onProjectionChanged:"projection_changed",onRenderingTypeChanged:"renderingtype_changed",onTilesLoaded:"tilesloaded",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed",onCameraChanged:"bounds_changed"},J=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],Y=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],X=Object.keys(q);const Q=new Set(["backgroundColor","clickableIcons","controlSize","disableDefaultUI","disableDoubleClickZoom","draggable","draggableCursor","draggingCursor","fullscreenControl","fullscreenControlOptions","gestureHandling","headingInteractionEnabled","isFractionalZoomEnabled","keyboardShortcuts","mapTypeControl","mapTypeControlOptions","mapTypeId","maxZoom","minZoom","noClear","panControl","panControlOptions","restriction","rotateControl","rotateControlOptions","scaleControl","scaleControlOptions","scrollwheel","streetView","streetViewControl","streetViewControlOptions","styles","tiltInteractionEnabled","zoomControl","zoomControlOptions"]);function ee(e,n){const i={},a=Object.keys(n);for(const e of a)Q.has(e)&&(i[e]=n[e]);!function(e,n){const i=t.useRef(void 0);i.current&&M(n,i.current)||(i.current=n),t.useEffect(e,i.current)}((()=>{e&&e.setOptions(i)}),[i])}function te(){var e;return(null==(e=t.useContext(W))?void 0:e.status)||R}function ne(e){return function(e){return!(!e||"object"!=typeof e)&&"lat"in e&&"lng"in e&&Number.isFinite(e.lat)&&Number.isFinite(e.lng)}(e)?e:e.toJSON()}const ie=()=>t.createElement("div",{style:{position:"absolute",top:0,left:0,bottom:0,right:0,zIndex:999,display:"flex",flexFlow:"column nowrap",textAlign:"center",justifyContent:"center",fontSize:".8rem",color:"rgba(0,0,0,0.6)",background:"#dddddd",padding:"1rem 1.5rem"}},t.createElement("h2",null,"Error: AuthFailure"),t.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",t.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function ae(){return te()===$}function oe(e){const n=function(){const[,e]=t.useReducer((e=>e+1),0);return e}(),i=t.useRef({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return t.useEffect((()=>{if(!e)return;const t=google.maps.event.addListener(e,"bounds_changed",(()=>{!function(e,t){const n=e.getCenter(),i=e.getZoom(),a=e.getHeading()||0,o=e.getTilt()||0,s=e.getBounds();n&&s&&Number.isFinite(i)||console.warn("[useTrackedCameraState] at least one of the values from the map returned undefined. This is not expected to happen. Please report an issue at https://github.com/visgl/react-google-maps/issues/new"),Object.assign(t.current,{center:(null==n?void 0:n.toJSON())||{lat:0,lng:0},zoom:i||0,heading:a,tilt:o})}(e,i),n()}));return()=>t.remove()}),[e,n]),i}const se=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],re=["padding"];class ce{static has(e){return this.entries[e]&&this.entries[e].length>0}static pop(e){return this.entries[e]&&this.entries[e].pop()||null}static push(e,t){this.entries[e]||(this.entries[e]=[]),this.entries[e].push(t)}}function _e(e,n){const i=ae(),[a,o]=t.useState(null),[s,r]=function(){const[e,n]=t.useState(null);return[e,t.useCallback((e=>n(e)),[n])]}(),c=oe(a),{id:_,defaultBounds:l,defaultCenter:d,defaultZoom:p,defaultHeading:u,defaultTilt:h,reuseMaps:f,renderingType:m,colorScheme:g}=e,x=Z(e,se),b=void 0!==e.zoom||void 0!==e.defaultZoom,v=void 0!==e.center||void 0!==e.defaultCenter;l||b&&v||console.warn("<Map> component is missing configuration. You have to provide zoom and center (via the `zoom`/`defaultZoom` and `center`/`defaultCenter` props) or specify the region to show using `defaultBounds`. See https://visgl.github.io/react-google-maps/docs/api-reference/components/map#required"),!x.center&&d&&(x.center=d),!x.zoom&&Number.isFinite(p)&&(x.zoom=p),!x.heading&&Number.isFinite(u)&&(x.heading=u),!x.tilt&&Number.isFinite(h)&&(x.tilt=h);for(const e of Object.keys(x))void 0===x[e]&&delete x[e];const y=t.useRef(void 0);return t.useEffect((()=>{if(!s||!i)return;const{addMapInstance:t,removeMapInstance:a}=n,{mapId:r}=e,d=`${r||"default"}:${m||"default"}:${g||"LIGHT"}`;let p,u;if(f&&ce.has(d)?(u=ce.pop(d),p=u.getDiv(),s.appendChild(p),u.setOptions(x),setTimeout((()=>u.setCenter(u.getCenter())),0)):(p=document.createElement("div"),p.style.height="100%",s.appendChild(p),u=new google.maps.Map(p,L({},x,m?{renderingType:m}:{},g?{colorScheme:g}:{}))),o(u),t(u,_),l){const{padding:e}=l,t=Z(l,re);u.fitBounds(t,e)}else b&&v||u.fitBounds({east:180,west:-180,south:-90,north:90});if(y.current){const{mapId:e,cameraState:t}=y.current;e!==r&&u.setOptions(t)}return()=>{y.current={mapId:r,cameraState:c.current},p.remove(),f?ce.push(d,u):google.maps.event.clearInstanceListeners(u),o(null),a(_)}}),[s,i,_,e.mapId,e.renderingType,e.colorScheme]),[a,r,c]}ce.entries={};const le=t.createContext(null),de=e=>{const{children:n,id:i,className:a,style:o}=e,s=t.useContext(W),r=te();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[c,_,l]=_e(e,s);!function(e,n,i){const a=i.center?ne(i.center):null;let o=null,s=null;a&&Number.isFinite(a.lat)&&Number.isFinite(a.lng)&&(o=a.lat,s=a.lng);const r=Number.isFinite(i.zoom)?i.zoom:null,c=Number.isFinite(i.heading)?i.heading:null,_=Number.isFinite(i.tilt)?i.tilt:null;t.useLayoutEffect((()=>{if(!e)return;const t={};let i=!1;null===o||null===s||n.current.center.lat===o&&n.current.center.lng===s||(t.center={lat:o,lng:s},i=!0),null!==r&&n.current.zoom!==r&&(t.zoom=r,i=!0),null!==c&&n.current.heading!==c&&(t.heading=c,i=!0),null!==_&&n.current.tilt!==_&&(t.tilt=_,i=!0),i&&e.moveCamera(t)}))}(c,l,e),function(e,n){for(const i of X){const a=n[i],o=q[i];t.useEffect((()=>{if(!e)return;if(!a)return;const t=google.maps.event.addListener(e,o,(t=>{a(H(o,e,t))}));return()=>t.remove()}),[e,o,a])}}(c,e),ee(c,e);const d=function(e,n){const{viewport:i,viewState:a}=n,o=!!i;return t.useLayoutEffect((()=>{if(!e||!a)return;const{latitude:t,longitude:n,bearing:i,pitch:o,zoom:s}=a;e.moveCamera({center:{lat:t,lng:n},heading:i,tilt:o,zoom:s+1})}),[e,a]),o}(c,e),p=!!e.controlled;t.useEffect((()=>{if(c)return d&&c.setOptions({disableDefaultUI:!0}),(d||p)&&c.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{c.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[c,d,p,e.gestureHandling,e.keyboardShortcuts]);const u=e.center?ne(e.center):null;let h=null,f=null;u&&Number.isFinite(u.lat)&&Number.isFinite(u.lng)&&(h=u.lat,f=u.lng);const m=t.useMemo((()=>{var t,n,i,a,o;return{center:{lat:null!=(t=h)?t:0,lng:null!=(n=f)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(a=e.heading)?a:0,tilt:null!=(o=e.tilt)?o:0}}),[h,f,e.zoom,e.heading,e.tilt]);t.useLayoutEffect((()=>{if(!c||!p)return;c.moveCamera(m);const e=c.addListener("bounds_changed",(()=>{c.moveCamera(m)}));return()=>e.remove()}),[c,p,m]);const g=t.useMemo((()=>L({width:"100%",height:"100%",position:"relative",zIndex:d?-1:0},o)),[o,d]),x=t.useMemo((()=>({map:c})),[c]);return r===V?t.createElement("div",{style:L({position:"relative"},a?{}:g),className:a},t.createElement(ie,null)):t.createElement("div",L({ref:_,"data-testid":"map",style:a?void 0:g,className:a},i?{id:i}:{}),c?t.createElement(le.Provider,{value:x},n):null)};de.deckGLViewProps=!0;const pe=new Set;const ue=(e=null)=>{const n=t.useContext(W),{map:i}=t.useContext(le)||{};if(null===n)return function(...e){const t=JSON.stringify(e);pe.has(t)||(pe.add(t),console.error(...e))}("useMap(): failed to retrieve APIProviderContext. Make sure that the <APIProvider> component exists and that the component you are calling `useMap()` from is a sibling of the <APIProvider>."),null;const{mapInstances:a}=n;return null!==e?a[e]||null:i||(a.default||null)};function he(e,n,i){t.useEffect((()=>{if(!e||!n||!i)return;const t=google.maps.event.addListener(e,n,i);return()=>t.remove()}),[e,n,i])}function fe(e,n,i){t.useEffect((()=>{e&&(e[n]=i)}),[e,n,i])}function me(e,n,i){t.useEffect((()=>{if(e&&n&&i)return e.addEventListener(n,i),()=>e.removeEventListener(n,i)}),[e,n,i])}const ge=t.createContext(null),xe={BOTTOM:["50%","100%"]},be=({children:e,styles:n,className:i,anchorPoint:a})=>{const[o,s]=null!=a?a:xe.BOTTOM;let r=`-${o}`,c=`-${s}`;o.trimStart().startsWith("-")&&(r=o.substring(1)),s.trimStart().startsWith("-")&&(c=s.substring(1));const _=`translate(50%, 100%) translate(${r}, ${c})`;return t.createElement("div",{style:{transform:_}},t.createElement("div",{className:i,style:n},e))};function ve(e){const[n,i]=t.useState(null),[a,o]=t.useState(null),s=ue(),r=function(e){const n=ae(),i=t.useContext(W);return t.useEffect((()=>{n&&i&&i.importLibrary(e)}),[n,i,e]),(null==i?void 0:i.loadedLibraries[e])||null}("marker"),{children:c,onClick:_,className:l,onMouseEnter:d,onMouseLeave:p,onDrag:u,onDragStart:h,onDragEnd:f,collisionBehavior:m,clickable:g,draggable:x,position:b,title:v,zIndex:y}=e,w=t.Children.count(c);return t.useEffect((()=>{if(!s||!r)return;const e=new r.AdvancedMarkerElement;e.map=s,i(e);let t=null;return w>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,o(t)),()=>{var n;e.map=null,null==(n=t)||n.remove(),i(null),o(null)}}),[s,r,w]),t.useEffect((()=>{!n||!n.content||w>0||(n.content.className=l||"")}),[n,l,w]),fe(n,"position",b),fe(n,"title",null!=v?v:""),fe(n,"zIndex",y),fe(n,"collisionBehavior",m),t.useEffect((()=>{n&&(n.gmpDraggable=void 0!==x?x:!!(u||h||f))}),[n,x,u,f,h]),t.useEffect((()=>{if(!n)return;const e=void 0!==g||Boolean(_)||Boolean(d)||Boolean(p);n.gmpClickable=e,e&&null!=n&&n.content&&n.content.nodeType===Node.ELEMENT_NODE&&(n.content.style.pointerEvents="none",n.content.firstElementChild&&(n.content.firstElementChild.style.pointerEvents="all"))}),[n,g,_,d,p]),he(n,"click",_),he(n,"drag",u),he(n,"dragstart",h),he(n,"dragend",f),me(null==n?void 0:n.element,"mouseenter",d),me(null==n?void 0:n.element,"mouseleave",p),[n,a]}t.forwardRef(((e,i)=>{const{children:a,style:o,className:s,anchorPoint:r}=e,[c,_]=ve(e),l=t.useMemo((()=>c?{marker:c}:null),[c]);return t.useImperativeHandle(i,(()=>c),[c]),_?t.createElement(ge.Provider,{value:l},n.createPortal(t.createElement(be,{anchorPoint:r,styles:o,className:s},a),_)):null}));const ye=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const we=t.forwardRef(((e,n)=>{const i=function(e){const[n,i]=t.useState(null),a=ue(),{onClick:o,onDrag:s,onDragStart:r,onDragEnd:c,onMouseOver:_,onMouseOut:l}=e,d=Z(e,ye),{position:p,draggable:u}=d;return t.useEffect((()=>{if(!a)return void(void 0===a&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(d);return e.setMap(a),i(e),()=>{e.setMap(null),i(null)}}),[a]),t.useEffect((()=>{if(!n)return;const e=n,t=google.maps.event;return o&&t.addListener(e,"click",o),s&&t.addListener(e,"drag",s),r&&t.addListener(e,"dragstart",r),c&&t.addListener(e,"dragend",c),_&&t.addListener(e,"mouseover",_),l&&t.addListener(e,"mouseout",l),n.setDraggable(Boolean(u)),()=>{t.clearInstanceListeners(e)}}),[n,u,o,s,r,c,_,l]),t.useEffect((()=>{n&&d&&n.setOptions(d)}),[n,d]),t.useEffect((()=>{!u&&p&&n&&n.setPosition(p)}),[u,p,n]),n}(e);return t.useImperativeHandle(n,(()=>i),[i]),t.createElement(t.Fragment,null)}));function ke({notification:n,width:i,height:a}){const{googleMapsAPIKey:o}=_().options,s=function(e){const t=[];return e.content.forEach((e=>{t.push({title:e.data.title,latitude:e.data.latitude,longitude:e.data.longitude})})),t}(n).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title}))),[r,c]=t.useState(!1),l=t.useMemo((()=>s.length>0?{lat:s[0].lat,lng:s[0].lng}:{lat:0,lng:0}),[s]);return t.useEffect((()=>{c(!0)}),[]),0!==s.length&&r?e.jsx("div",{"data-testid":"map-notification",children:e.jsx(G,{apiKey:o||"",children:e.jsx(je,{markers:s,center:l,width:i,height:a})})}):e.jsx(h,{})}function je({markers:t,center:n,width:i,height:a}){const o=te();return e.jsxs("div",{style:{width:i,height:a,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[o===D&&e.jsx(h,{}),o===V&&e.jsx(f,{message:"Authentication failure. Your Google Maps API key might be invalid. Check console for more information."}),o===F&&e.jsx(f,{message:"Google Maps failed to be loaded. Check console for more information."}),o===$&&e.jsx(de,{style:{width:i,height:a},defaultCenter:n,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:t.map((t=>e.jsx(we,{position:{lat:t.lat,lng:t.lng},title:t.title},t.id)))})]})}function Ne({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"android-app-ui-map-notification",children:[e.jsx(g,{appName:n,showOptions:v(t)}),e.jsx(ke,{notification:t,width:"100%",height:"570px"})]})}function Ce({notification:t,appName:n,appAndroidPackageName:i}){return e.jsxs("div",{"data-testid":"android-app-ui-rate-notification",children:[e.jsx(g,{appName:n,title:t.title,showOptions:!1}),e.jsx(m,{url:`https://play.google.com/store/apps/details?id=${i}&hl=en`,platform:"Android",width:338,height:570})]})}a("");function Se({notification:t,appName:n,appIcon:i}){var a;return e.jsx("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e.jsxs("div",{className:"notificare__push__android__alert__app-ui__header",children:[e.jsx("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:e.jsx("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:i})}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__title",children:t.title||n})]}),e.jsx("p",{className:"notificare__push__android__alert__app-ui__message",children:t.message}),v(t)&&e.jsxs("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(a=t.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsx("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n}`,children:t.label},n))),e.jsx("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:"Cancel"},"cancel-button-label")]})]})})}a(".notificare .notificare__push__android__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__android__alert__app-ui__wrapper {\n position: relative;\n background-color: #fff;\n width: 290px;\n border-radius: 2px;\n box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;\n}\n\n/* Header - App Icon and Title */\n\n.notificare .notificare__push__android__alert__app-ui__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n width: 32px;\n height: 32px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__android__alert__app-ui__app-icon-image {\n width: 100%;\n}\n\n.notificare .notificare__push__android__alert__app-ui__header {\n display: flex;\n align-items: center;\n column-gap: 10px;\n padding: 20px 20px 0;\n}\n\n.notificare .notificare__push__android__alert__app-ui__title {\n font-weight: 700;\n font-size: 18px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n width: 208px;\n}\n\n/* Message */\n\n.notificare .notificare__push__android__alert__app-ui__message {\n font-size: 16px;\n margin-top: 20px;\n margin-bottom: 0;\n word-break: break-all;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 8;\n padding: 0 20px 20px;\n}\n\n/* Actions */\n\n.notificare .notificare__push__android__alert__app-ui__actions {\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__android__alert__app-ui__action-label {\n font-size: 14px;\n font-weight: 600;\n padding: 15px 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.notificare .notificare__push__android__alert__app-ui__cancel-label {\n font-size: 14px;\n font-weight: 600;\n color: #64706e;\n padding: 15px 20px 20px;\n}");function Te(e,t){return i(this,void 0,void 0,(function*(){try{const n=new URLSearchParams({apiKey:e,url:t});return(yield fetch(`https://push.notifica.re/proxy/?${n.toString()}`)).text()}catch(e){return console.error("Error fetching website",e),""}}))}function Ae(e){const t=(new DOMParser).parseFromString(e,"text/html").querySelectorAll("a");let n=!1;return t.forEach((e=>{new URL(e.href,window.location.origin).searchParams.has("notificareOpenAction")&&(n=!0)})),n}function Ee({notification:n,appName:a}){const o=n.content[0].data,[s,r]=t.useState(""),{serviceKey:c}=_().options;return t.useEffect((()=>{(()=>{i(this,void 0,void 0,(function*(){r(yield Te(c,o))}))})()}),[]),e.jsxs("div",{"data-testid":"android-app-ui-url-notification",children:[e.jsx(g,{appName:a,title:n.title,showOptions:v(n)&&!Ae(s)}),e.jsx(m,{url:o,platform:"Android",width:338,height:570})]})}a("");a("");function Oe({videoData:t,width:n,height:i}){const a=()=>{switch(t.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${t.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${t.data}`;case"re.notifica.content.HTML5Video":return t.data;default:return""}};return"re.notifica.content.YouTube"===t.type||"re.notifica.content.Vimeo"===t.type?e.jsx("iframe",{className:"notificare__push__video-rich-content",src:a(),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",width:n,height:i}):e.jsx("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:e.jsx("source",{src:a(),type:"video/mp4"})})}function Pe(t){const{notification:n,appName:i}=t;return e.jsxs("div",{"data-testid":"android-app-ui-video-notification",children:[e.jsx(g,{appName:i,title:n.title,showOptions:v(n)}),e.jsx(Oe,{videoData:n.content[0],width:"100%",height:"570px"})]})}a(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function Ie(t){const{notification:n,appName:i}=t,a=n.content[0].data;return e.jsxs("div",{"data-testid":"android-app-ui-web-view-notification",children:[e.jsx(g,{appName:i,title:n.title,showOptions:v(n)&&!Ae(a)}),e.jsx("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:a,sandbox:"allow-same-origin"})]})}function Me({notification:t,application:n,mobileVariant:i}){const{googleMapsAPIKey:a}=_().options;return"re.notifica.notification.Map"!==t.type||a||"app-ui"!==i?e.jsx(p,{theme:Le(t.type,i),children:e.jsxs("div",{className:"notificare__push__android__preview",children:[("lockscreen"===i||"lockscreen-expanded"===i)&&e.jsx(E,{notification:t,appName:n.name,appIcon:d(n.websitePushConfig.icon),expanded:"lockscreen-expanded"===i}),"app-ui"===i&&(()=>{switch(t.type){case"re.notifica.notification.Alert":return e.jsx(Se,{notification:t,appName:n.name,appIcon:d(n.websitePushConfig.icon)});case"re.notifica.notification.WebView":return e.jsx(Ie,{notification:t,appName:n.name});case"re.notifica.notification.URL":return e.jsx(Ee,{notification:t,appName:n.name});case"re.notifica.notification.InAppBrowser":return e.jsx(A,{notification:t,appName:n.name});case"re.notifica.notification.Image":return e.jsx(N,{notification:t,appName:n.name});case"re.notifica.notification.Map":return e.jsx(Ne,{notification:t,appName:n.name});case"re.notifica.notification.Rate":return e.jsx(Ce,{notification:t,appName:n.name,appAndroidPackageName:n.androidPackageName});case"re.notifica.notification.Passbook":return e.jsx(j,{notification:t,appName:n.name});case"re.notifica.notification.Video":return e.jsx(Pe,{notification:t,appName:n.name});case"re.notifica.notification.Store":return e.jsx(x,{notification:t,appName:n.name})}})()]})}):e.jsx(u,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1})}function Le(e,t){if("app-ui"!==t)return"light";return["re.notifica.notification.Alert"].includes(e)?"dark":"light"}a(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n}");a(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");function Ze({children:t,theme:n}){return e.jsxs("div",{className:"notificare__push__ios__phone-background "+("dark"===n?"notificare__push__ios__phone-background--dark":""),"data-testid":"ios-phone-background",children:[e.jsx("div",{className:"notificare__push__ios__phone-background-camera"}),e.jsx("div",{className:"notificare__push__ios__phone-background-content",children:t})]})}a(".notificare .notificare__push__ios__phone-background {\n width: 350px;\n border-radius: 40px;\n border: 6px solid #c6c6c6;\n background-color: #fff;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__phone-background--dark {\n background-color: #9ea2a1;\n border-color: #eaeaea;\n}\n\n.notificare .notificare__push__ios__phone-background-camera {\n width: 80px;\n height: 20px;\n background: #c6c6c6;\n margin: 20px auto 10px;\n border-radius: 20px;\n}\n\n.notificare .notificare__push__ios__phone-background-content {\n width: 100%;\n height: 615px;\n overflow: hidden;\n position: relative;\n}");a("/* Top Bar */\n\n.notificare .notificare__push__ios__store__app-ui__bar {\n display: flex;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n font-size: 14px;\n font-weight: 700;\n padding: 11px 15px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n background-color: #fff;\n margin-top: 10px;\n}\n\n/* --- App Recommendation Content --- */\n\n.notificare .notificare__push__ios__store__app-ui {\n height: 566px;\n background-color: #fff;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page {\n width: 100%;\n overflow: hidden;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__store__app-ui__page-header {\n width: 100%;\n padding: 15px;\n display: flex;\n column-gap: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__app-icon {\n width: 90px;\n height: 90px;\n border-radius: 15px;\n overflow: hidden;\n flex-shrink: 0;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-info {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-name {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-app-category {\n font-size: 12px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-install {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n padding: 7px 12px;\n background: #3b82f6;\n color: #fff;\n border-radius: 15px;\n width: max-content;\n}\n\n/* Other info */\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info-wrapper {\n padding: 0 15px;\n width: calc(100% - 15px);\n overflow: hidden;\n position: relative;\n margin-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-other-app-info {\n display: flex;\n width: 1000px;\n border-bottom: 1px solid #f2f4f6;\n border-top: 1px solid #f2f4f6;\n position: relative;\n box-sizing: border-box;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block {\n padding: 5px;\n width: 85px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-title {\n font-size: 10px;\n font-weight: 600;\n text-transform: uppercase;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-value {\n font-size: 30px;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-icon {\n height: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-info-block-bottom-text {\n font-size: 11px;\n text-align: center;\n}\n\n/* History */\n\n.notificare .notificare__push__ios__store__app-ui__page-history {\n margin: 0 15px;\n border-bottom: 1px solid #f2f4f6;\n padding-bottom: 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version-last-update {\n display: flex;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-version {\n font-size: 12px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-last-update {\n font-size: 11px;\n color: #64706e;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-history-notes {\n margin-top: 5px;\n font-size: 12px;\n max-height: 60px;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n padding-right: 5px;\n word-break: break-word;\n}\n\n/* Previews */\n\n.notificare .notificare__push__ios__store__app-ui__page-previews {\n margin-top: 15px;\n padding: 0 15px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-title {\n font-size: 16px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-previews-images {\n display: flex;\n max-height: 400px;\n overflow: hidden;\n column-gap: 8px;\n margin-top: 10px;\n}\n\n.notificare .notificare__push__ios__store__app-ui__page-preview-image {\n border-radius: 15px;\n width: 150px;\n}");function ze(t){const{rating:n}=t,i=[];for(let t=1;t<=5;t++)t<=n?i.push(e.jsx(Re,{},t)):t-.5<=n?i.push(e.jsx(De,{},t)):i.push(e.jsx($e,{},t));return e.jsx("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}a(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}");const Re=()=>e.jsx("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})}),De=()=>e.jsxs("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:"halfGrad",children:[e.jsx("stop",{offset:"50%",stopColor:"#1e3050"}),e.jsx("stop",{offset:"50%",stopColor:"#ccc"})]})}),e.jsx("path",{fill:"url(#halfGrad)",d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})]}),$e=()=>e.jsx("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{fill:"#EAEAEA",d:"M316.9 18C311.6 7 300.4 0 288.1 0s-23.4 7-28.8 18L195 150.3 51.4 171.5c-12 1.8-22 10.2-25.7 21.7s-.7 24.2 7.9 32.7L137.8 329 113.2 474.7c-2 12 3 24.2 12.9 31.3s23 8 33.8 2.3l128.3-68.5 128.3 68.5c10.8 5.7 23.9 4.9 33.8-2.3s14.9-19.3 12.9-31.3L438.5 329 542.7 225.9c8.6-8.5 11.7-21.2 7.9-32.7s-13.7-19.9-25.7-21.7L381.2 150.3 316.9 18z"})});function Fe({notification:n}){const a=n.content[0],[o,s]=t.useState(!1),[r,c]=t.useState(),[_,l]=t.useState(!1);return t.useEffect((()=>{(()=>{i(this,void 0,void 0,(function*(){if(l(!0),"re.notifica.content.AppStore"===a.type&&"string"!=typeof a.data)try{const e=yield fetch(`https://itunes.apple.com/lookup?country=GB&id=${a.data.identifier}`),t=yield e.json();c(t),0===(null==r?void 0:r.resultCount)&&s(!0)}catch(e){s(!0)}else s(!0);l(!1)}))})()}),[a.data]),e.jsxs("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[e.jsx("div",{className:"notificare__push__ios__store__app-ui__bar",children:"Done"}),e.jsx("div",{className:"notificare__push__ios__store__app-ui",children:o?e.jsx(f,{}):_?e.jsx(h,{}):r&&e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[e.jsx("img",{src:r.results[0].artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e.jsxs("div",{children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:r.results[0].trackName}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:r.results[0].primaryGenreName})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-install",children:"Install"})]})]}),e.jsx("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsxs("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:[Be(r.results[0].userRatingCount)," RATINGS"]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.results[0].averageUserRating.toFixed(1)}),e.jsx(ze,{rating:r.results[0].averageUserRating})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"AGE"}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:r.results[0].trackContentRating}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:"Years Old"})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"CATEGORY"}),e.jsx("svg",{className:"notificare__push__ios__store__app-ui__page-info-block-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:e.jsx("path",{d:"M264.5 5.2c14.9-6.9 32.1-6.9 47 0l218.6 101c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 149.8C37.4 145.8 32 137.3 32 128s5.4-17.9 13.9-21.8L264.5 5.2zM476.9 209.6l53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 277.8C37.4 273.8 32 265.3 32 256s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0l152-70.2zm-152 198.2l152-70.2 53.2 24.6c8.5 3.9 13.9 12.4 13.9 21.8s-5.4 17.9-13.9 21.8l-218.6 101c-14.9 6.9-32.1 6.9-47 0L45.9 405.8C37.4 401.8 32 393.3 32 384s5.4-17.9 13.9-21.8l53.2-24.6 152 70.2c23.4 10.8 50.4 10.8 73.8 0z"})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.results[0].primaryGenreName})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"DEVELOPER"}),e.jsx("svg",{className:"notificare__push__ios__store__app-ui__page-info-block-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"})}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:r.results[0].sellerName})]})]})}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:"What's New"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e.jsxs("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:["Version ",r.results[0].version]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:Ve(r.results[0].currentVersionReleaseDate)})]}),e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:r.results[0].releaseNotes})]}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[e.jsx("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:"Preview"}),e.jsxs("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[e.jsx("img",{src:r.results[0].screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),e.jsx("img",{src:r.results[0].screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})})]})}function Ve(e){var t;const n=new Date(e),i=new Date,a=Math.floor((i.getTime()-n.getTime())/1e3),o=[{value:60,label:"second"},{value:3600,label:"minute"},{value:86400,label:"hour"},{value:604800,label:"day"},{value:2592e3,label:"week"},{value:31536e3,label:"month"},{value:1/0,label:"year"}];for(let e=0;e<o.length;e++){const{value:n,label:i}=o[e];if(a<n){const n=Math.floor(a/((null===(t=o[e-1])||void 0===t?void 0:t.value)||1));return n<=1?`a ${i} ago`:`${n} ${i}s ago`}}return"a long time ago"}function Be(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString()}a("");function Ue({appName:t,title:n,showOptions:i}){return e.jsxs("div",{className:"notificare__push__ios__app-ui__title-bar",children:[e.jsx("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:n||t}),i&&e.jsx("svg",{className:"notificare__push__ios__app-ui__title-bar-options-button",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512","data-testid":"ios-app-ui-title-bar-options-button",children:e.jsx("path",{d:"M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"})})]})}function Ke({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"ios-app-ui-passbook-notification",children:[e.jsx(Ue,{appName:n,title:t.title,showOptions:v(t)}),e.jsx(m,{url:`https://push.notifica.re/pass/web/${t.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}a(".notificare .notificare__push__ios__app-ui__title-bar {\n display: flex;\n align-items: center;\n width: 100%;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n background-color: #fff;\n margin-top: 10px;\n position: relative;\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-text {\n padding: 11px 25px;\n font-size: 14px;\n font-weight: 700;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n max-width: 255px;\n position: relative;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.notificare .notificare__push__ios__app-ui__title-bar-options-button {\n width: 20px;\n margin-left: auto;\n margin-right: 12px;\n}");function We({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"ios-app-ui-images-notification",children:[e.jsx(Ue,{appName:n,title:t.title,showOptions:v(t)}),e.jsx("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:e.jsx("div",{className:"notificare__push__ios__image__app-ui__slider",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:t.data,alt:"Slider image"},n)))})})]})}a(".notificare .notificare__push__ios__image__app-ui__rich-content {\n display: flex;\n align-items: center;\n width: 100%;\n height: 566px;\n background-color: white;\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scrollbar-width: none; /* Hide in Firefox */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider::-webkit-scrollbar {\n display: none; /* Hide in Chrome and Safari */\n}\n\n.notificare .notificare__push__ios__image__app-ui__slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}");a("");function Ge(t){const{url:n}=t;return e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:" Done "}),e.jsxs("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[S(n)?e.jsx(e.Fragment,{children:e.jsx("svg",{className:"notificare__push__ios__in-app-browser__app-ui__bar-lock-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:e.jsx("path",{d:"M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"})})}):e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:"Not Secure —"}),e.jsx("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:C(n)})]})]})}function He({notification:t}){const n=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[e.jsx(Ge,{url:n}),e.jsx(m,{url:n,platform:"iOS",width:338,height:564})]})}a(".notificare .notificare__push__ios__in-app-browser__app-ui__bar {\n display: flex;\n width: 100%;\n padding: 12px 0;\n border-radius: 20px 20px 0 0;\n border-bottom: 1px solid #f4f6f7;\n margin-top: 10px;\n background-color: #fff;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-done-button {\n font-size: 14px;\n font-weight: 700;\n position: absolute;\n left: 0;\n margin-left: 15px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-lock-icon {\n height: 14px;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-domain {\n display: flex;\n column-gap: 5px;\n font-size: 14px;\n font-weight: 700;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-not-secure {\n color: #64706e;\n font-weight: 400;\n}\n\n.notificare .notificare__push__ios__in-app-browser__app-ui__bar-url {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}");function qe(t){var n,i;const{notification:a,appName:o,appIcon:s,expanded:r}=t;return e.jsxs("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__ios__lock-screen__app-icon",children:e.jsx("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:s})}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e.jsxs("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(r?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:a.title||o}),e.jsx("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:"Now"})]}),a.subtitle&&e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(r?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:a.subtitle}),e.jsxs("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[e.jsx("p",{className:"notificare__push__ios__lock-screen__text "+(k(a)&&!r?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:a.message}),k(a)&&!r&&e.jsx("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(n=a.attachments)||void 0===n?void 0:n[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),k(a)&&r&&e.jsx("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(i=a.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}a(".notificare .notificare__push__ios__lock-screen {\n position: absolute;\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n left: 50%;\n transform: translateX(-50%);\n bottom: 80px;\n background-color: #f2f4f6;\n width: 315px;\n border-radius: 20px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__main-content {\n width: 100%;\n display: flex;\n align-items: center;\n column-gap: 11px;\n padding: 10px;\n}\n\n/* App Icon */\n\n.notificare .notificare__push__ios__lock-screen__app-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 10px;\n width: 35px;\n height: 35px;\n overflow: hidden;\n}\n\n.notificare .notificare__push__ios__lock-screen__app-icon-image {\n width: 100%;\n}\n\n/* Text Content */\n\n.notificare .notificare__push__ios__lock-screen__text-content {\n display: flex;\n flex-direction: column;\n row-gap: 2px;\n width: 249px;\n}\n\n.notificare .notificare__push__ios__lock-screen__title-and-time {\n display: flex;\n column-gap: 5px;\n margin-top: 0;\n margin-bottom: 0;\n position: relative;\n width: 100%;\n justify-content: space-between;\n}\n\n.notificare .notificare__push__ios__lock-screen__text {\n font-size: 13px;\n margin-top: 0;\n margin-bottom: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--title-or-subtitle {\n font-weight: 700;\n width: 218px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--expanded-title-or-subtitle {\n font-weight: 700;\n width: 218px;\n white-space: wrap;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--time {\n color: #64706e;\n font-size: 12px;\n text-align: right;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-without-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 242px;\n}\n\n.notificare .notificare__push__ios__lock-screen__text--message-with-media {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n -webkit-line-clamp: 4;\n width: 210px;\n}\n\n/* Media */\n\n.notificare .notificare__push__ios__lock-screen__message-and-media {\n display: flex;\n column-gap: 7px;\n}\n\n.notificare .notificare__push__ios__lock-screen__media-image {\n border-radius: 5px;\n object-fit: cover;\n width: 32px;\n height: 32px;\n align-self: flex-start;\n justify-self: flex-end;\n}\n\n.notificare .notificare__push__ios__lock-screen__expanded-media {\n object-fit: cover;\n width: 100%;\n max-height: 275px;\n overflow: hidden;\n display: block;\n}\n");function Je({notification:t,appName:n}){return e.jsxs("div",{"data-testid":"ios-app-ui-map-notification",children:[e.jsx(Ue,{appName:n,title:t.title,showOptions:v(t)}),e.jsx(ke,{notification:t,width:"100%",height:"566px"})]})}a("");function Ye({appName:t,title:n}){return e.jsx("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e.jsxs("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[e.jsx("p",{className:"notificare__push__ios__rate__app-ui__header",children:n||t}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:"Yes, I'll Rate Now"}),e.jsx("div",{className:"notificare__push__ios__rate__app-ui__action",children:"No, Thanks"})]})})}a(".notificare .notificare__push__ios__rate__app-ui {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__ios__rate__app-ui__wrapper {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header */\n\n.notificare .notificare__push__ios__rate__app-ui__header {\n padding: 20px;\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n word-break: break-word;\n}\n\n/* Actions */\n\n.notificare .notificare__push__ios__rate__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-top: 1px solid #f2f4f6;\n font-size: 14px;\n font-weight: 700;\n}");function Xe({notification:t,appName:n}){var i,a;return e.jsx("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[e.jsx("p",{className:"notificare__push__ios__alert__app-ui__title",children:t.title||n}),e.jsx("p",{className:"notificare__push__ios__alert__app-ui__message",children:t.message})]}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__actions",children:y(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[e.jsx("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:"Cancel"}),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--single","data-testid":"ios-app-ui-text-alert-notification-single-action",children:null===(i=t.actions)||void 0===i?void 0:i[0].label})]}):w(t)?e.jsxs("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(a=t.actions)||void 0===a?void 0:a.map(((t,n)=>e.jsx("div",{className:"notificare__push__ios__alert__app-ui__action notificare__push__ios__alert__app-ui__action--multiple","data-testid":`ios-app-ui-text-alert-notification-action-${n}`,children:t.label},n))),e.jsx("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:"Cancel"})]}):e.jsx("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:"OK"})})]})})}a(".notificare .notificare__push__ios__alert__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__background {\n width: 300px;\n background: #fff;\n border-radius: 20px;\n overflow: hidden;\n border: 1px solid #f2f4f6;\n}\n\n/* Header - Title and Message */\n\n.notificare .notificare__push__ios__alert__app-ui__title-and-message {\n padding: 20px;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n word-break: break-word;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__title {\n font-size: 16px;\n font-weight: 700;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__message {\n margin-top: 3px;\n font-size: 12px;\n font-weight: 500;\n text-align: center;\n}\n\n/* --- Actions --- */\n\n.notificare .notificare__push__ios__alert__app-ui__actions {\n font-size: 14px;\n font-weight: 700;\n border-top: 1px solid #f2f4f6;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action {\n padding: 10px 20px;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Single Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-single {\n display: flex;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__single-cancel {\n padding: 10px 20px;\n border-right: 1px solid #f2f4f6;\n width: 50%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--single {\n width: 50%;\n}\n\n/* Multiple Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__actions-multiple {\n display: flex;\n flex-direction: column;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__multiple-cancel {\n padding: 10px 20px;\n width: 100%;\n text-align: center;\n}\n\n.notificare .notificare__push__ios__alert__app-ui__action--multiple {\n width: 100%;\n border-bottom: 1px solid #f2f4f6;\n}\n\n/* No Actions */\n\n.notificare .notificare__push__ios__alert__app-ui__no-actions {\n width: 100%;\n text-align: center;\n padding: 10px 20px;\n}");function Qe({notification:n,appName:a}){const o=n.content[0].data,[s,r]=t.useState(""),{serviceKey:c}=_().options;return t.useEffect((()=>{(()=>{i(this,void 0,void 0,(function*(){r(yield Te(c,o))}))})()}),[]),e.jsxs("div",{"data-testid":"ios-app-ui-url-notification",children:[e.jsx(Ue,{appName:a,title:n.title,showOptions:v(n)&&!Ae(s)}),e.jsx(m,{url:o,platform:"iOS",width:338,height:566})]})}a("");function et({notification:t,appName:n}){const i=t.content[0];return e.jsxs("div",{"data-testid":"ios-app-ui-video-notification",children:[e.jsx(Ue,{appName:n,title:t.title,showOptions:v(t)}),e.jsx(Oe,{videoData:i,width:"100%",height:"566px"})]})}a("");function tt({notification:t,appName:n}){const i=t.content[0].data;return e.jsxs("div",{"data-testid":"ios-app-ui-web-view-notification",children:[e.jsx(Ue,{appName:n,title:t.title,showOptions:v(t)&&!Ae(i)}),e.jsx("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:i,sandbox:"allow-same-origin"})]})}function nt({notification:t,application:n,mobileVariant:i}){const{googleMapsAPIKey:a}=_().options;return"re.notifica.notification.Map"!==t.type||a||"app-ui"!==i?e.jsx(Ze,{theme:it(t.type,i),children:e.jsxs("div",{className:"notificare__push__ios__preview",children:[("lockscreen"===i||"lockscreen-expanded"===i)&&e.jsx(qe,{notification:t,appName:n.name,appIcon:d(n.websitePushConfig.icon),expanded:"lockscreen-expanded"===i}),"app-ui"===i&&(()=>{switch(t.type){case"re.notifica.notification.Alert":return e.jsx(Xe,{notification:t,appName:n.name});case"re.notifica.notification.WebView":return e.jsx(tt,{notification:t,appName:n.name});case"re.notifica.notification.URL":return e.jsx(Qe,{notification:t,appName:n.name});case"re.notifica.notification.InAppBrowser":return e.jsx(He,{notification:t});case"re.notifica.notification.Image":return e.jsx(We,{notification:t,appName:n.name});case"re.notifica.notification.Map":return e.jsx(Je,{notification:t,appName:n.name});case"re.notifica.notification.Rate":return e.jsx(Ye,{title:t.title,appName:n.name});case"re.notifica.notification.Passbook":return e.jsx(Ke,{notification:t,appName:n.name});case"re.notifica.notification.Video":return e.jsx(et,{notification:t,appName:n.name});case"re.notifica.notification.Store":return e.jsx(Fe,{notification:t})}})()]})}):e.jsx(u,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1})}function it(e,t){if("app-ui"!==t)return"light";return["re.notifica.notification.Alert","re.notifica.notification.WebView","re.notifica.notification.URL","re.notifica.notification.InAppBrowser","re.notifica.notification.Image","re.notifica.notification.Rate","re.notifica.notification.Passbook","re.notifica.notification.Video","re.notifica.notification.Store","re.notifica.notification.Map"].includes(e)?"dark":"light"}a(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n}");a("/* Preview Wrapper */\n\n.notificare .notificare__push__web__desktop__lock-screen {\n position: relative;\n background-color: #f4f4f4;\n width: 340px;\n border-radius: 15px;\n border: 1px solid #e4e4e4;\n box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.1);\n transition: height 0.3s ease-in-out;\n align-self: start;\n}\n\n/* Expand Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-container {\n position: absolute;\n top: 8px;\n right: 8px;\n animation: fadeIn 0.5s ease-out forwards;\n}\n\n/* --- MAIN CONTENT --- */\n\n.notificare .notificare__push__web__desktop__lock-screen__main-content {\n width: 100%;\n display: flex;\n flex-direction: row;\n column-gap: 10px;\n padding: 14px;\n}\n\n/* Browser Icon */\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-background {\n background-color: #ffffff;\n border-radius: 10px;\n padding: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__browser-icon-image {\n width: 30px;\n}\n\n/* Text */\n\n.notificare .notificare__push__web__desktop__lock-screen__text-content {\n width: 219px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text {\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin-top: 0;\n margin-bottom: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--title {\n font-weight: 700;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--domain {\n font-weight: 700;\n margin-top: 2px;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--message {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n margin-top: 2px;\n -webkit-line-clamp: 3;\n line-height: 1.2;\n transition: height 0.3s ease-in-out;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__text--expandable-message {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n word-break: break-word;\n white-space: wrap;\n margin-top: 2px;\n line-height: 1.2;\n transition: height 0.3s ease-in-out;\n}\n\n/* Small Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__small-media {\n position: absolute;\n display: flex;\n justify-content: flex-end;\n width: 38px;\n height: 38px;\n border-radius: 25%;\n object-fit: cover;\n animation: fadeIn 0.5s ease-out forwards;\n right: 14px;\n bottom: 10px;\n}\n\n/* Expanded Media */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-media {\n width: 100%;\n display: block;\n}\n\n/* Time */\n\n.notificare .notificare__push__web__desktop__lock-screen__time-container {\n position: absolute;\n top: 8px;\n right: 14px;\n animation: fadeIn 0.5s ease-out forwards;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__time {\n font-size: 12px;\n color: #64706e;\n}\n\n/* SETTINGS */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-container {\n position: absolute;\n bottom: 10px;\n right: 14px;\n z-index: 10;\n}\n\n/* Settings Button */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button {\n min-width: 70px;\n display: flex;\n background-color: #d6d6d6;\n border-radius: 7px;\n border: 0;\n padding: 5px 10px 5px;\n font-size: 13px;\n justify-content: center;\n box-shadow: -5px -7px 10px 10px rgba(242, 244, 246, 1);\n animation: fadeIn 0.5s ease-out forwards;\n position: relative;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-button-expand-icon {\n width: 9px;\n margin-left: 4px;\n color: #000000;\n}\n\n/* Settings Selector */\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector {\n background-color: #eaeaea;\n border-radius: 7px;\n box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);\n padding: 4px;\n display: flex;\n flex-direction: column;\n position: absolute;\n top: 32px;\n width: max-content;\n right: 0;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option {\n min-width: 70px;\n background-color: transparent;\n border-radius: 7px;\n font-size: 13px;\n border: 0;\n padding: 5px 10px;\n flex: 1;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__settings-selector-option:hover {\n background-color: #3b82f6;\n color: #fff;\n}\n\n/* Expanded Options - Actions & Settings */\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-content {\n padding: 0 14px 14px;\n width: 100%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n width: 102%;\n margin-left: -1%;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button {\n font-size: 14px;\n border-radius: 7px;\n width: 100%;\n border: 0;\n padding: 8px;\n background-color: transparent;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-button:hover {\n background-color: #efefef;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor {\n border: none;\n border-top: 1px solid #d6d6d6;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent {\n border-top: 1px solid transparent;\n}\n\n\n\n/* keyframes */\n\n@keyframes fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n\n\n\n");function at(t){const{open:n,disabled:i,onToggle:a}=t;return e.jsx("button",{disabled:i,className:"notificare__push__web__desktop__lock-screen__expand-button "+(n?"notificare__push__web__desktop__lock-screen__expand-button--rotated":""),onClick:a,"data-testid":"web-desktop-expand-button",children:e.jsx("svg",{className:"notificare__push__web__desktop__lock-screen__expand-button-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:e.jsx("path",{d:"M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"})})})}function ot({notification:n,appName:i,appDomain:a}){var o,s,r;const[c,_]=t.useState(!1),[l,d]=t.useState(!1),[p,u]=t.useState(-1),[h,f]=t.useState(!1),[m,g]=t.useState(!1),[x,b]=t.useState(!1),[v,y]=t.useState(!1),[w,j]=t.useState(""),N=t.useRef(null),C=t.useRef(null);return t.useEffect((()=>{if(N.current&&C.current){const e=C.current.scrollHeight;f(e>3*16.7);const t=`${N.current.scrollHeight}px`;N.current.style.height=t,j(t)}k(n)&&f(!0)}),[]),e.jsxs("div",{ref:N,className:"notificare__push__web__desktop__lock-screen",onMouseEnter:()=>d((()=>!0)),onMouseLeave:()=>d((()=>m)),"data-testid":"web-desktop-notification",children:[(h&&l||c||x)&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container",children:e.jsx(at,{open:c,disabled:x||v,onToggle:()=>{const e=N.current,t=C.current;e&&t&&(c?(e.style.backgroundColor="#f4f4f4",e.style.height=w,b(!0),_(!1),setTimeout((()=>{b(!1),e.style.overflow=""}),300)):(e.style.backgroundColor="#fff",e.style.overflow="hidden",y(!0),_(!0),setTimeout((()=>{e.style.height=`${e.scrollHeight-t.clientHeight+t.scrollHeight}px`}),10),setTimeout((()=>{y(!1)}),300)),g(!1))}})}),!l&&!c&&!x&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__time-container",children:e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__time",children:" now "})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__browser-icon-image",src:"https://upload.wikimedia.org/wikipedia/commons/e/e1/Google_Chrome_icon_%28February_2022%29.svg",alt:"Google Chrome Icon"})})}),e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:n.title||i}),e.jsx("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:st(a)}),e.jsx("p",{ref:C,className:"notificare__push__web__desktop__lock-screen__text "+(c||x?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--message"),children:n.message})]}),k(n)&&!c&&!x&&!l&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__small-media",src:null===(o=n.attachments)||void 0===o?void 0:o[0].uri,alt:"Small media icon"}),l&&!c&&!x&&e.jsx("div",{className:"notificare__push__web__desktop__lock-screen__settings-button-container",children:n.actions&&n.actions.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>g((e=>!e)),"data-testid":"web-desktop-settings-button",children:["Options",e.jsx("svg",{className:"notificare__push__web__desktop__lock-screen__settings-button-expand-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})})]}),m&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[n.actions.map(((t,n)=>e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option","data-testid":`web-desktop-options-action-${n}`,children:t.label},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",children:"Settings"})]})]}):e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",children:"Settings"})})]}),(c||x)&&e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content",children:[k(n)&&e.jsx("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(s=n.attachments)||void 0===s?void 0:s[0].uri,alt:"Expanded media"}),e.jsx("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(r=n.actions)||void 0===r?void 0:r.map(((t,n)=>e.jsxs("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>u(n),onMouseLeave:()=>u(-1),"data-testid":`web-desktop-expanded-action-${n}`,children:t.label}),e.jsx("hr",{className:`notificare__push__web__desktop__lock-screen__expanded-buttons-divisor ${(p===n||p-1===n)&&"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent"}`})]},n))),e.jsx("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e;return u((null===(e=n.actions)||void 0===e?void 0:e.length)||-1)},onMouseLeave:()=>u(-1),children:"Settings"})]})]})}function st(e){try{return new URL(e).hostname}catch(e){return""}}a(".notificare .notificare__push__web__desktop__lock-screen__expand-button {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: transform 0.3s ease;\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button--rotated {\n transform: rotate(90deg);\n}\n\n.notificare .notificare__push__web__desktop__lock-screen__expand-button-svg {\n width: 11px;\n height: 11px;\n fill: #9e9e9e;\n}");var rt,ct;function _t({notification:t,appName:n,appIcon:i}){var a;if("re.notifica.notification.Alert"===t.type||"re.notifica.notification.Map"===t.type||"re.notifica.notification.WebView"===t.type||"re.notifica.notification.URL"===t.type||"re.notifica.notification.Video"===t.type||"re.notifica.notification.Image"===t.type)return e.jsx("div",{className:"notificare__web__phone__app-ui",children:e.jsxs("div",{className:"notificare__web__phone__app-ui__background",children:[e.jsxs("div",{className:"notificare__web__phone__app-ui__header",children:[e.jsx("img",{className:"notificare__web__phone__app-ui__app-icon",src:i,alt:"App icon"}),e.jsx("p",{className:"notificare__web__phone__app-ui__app-name",children:n}),e.jsx("button",{className:"notificare__web__phone__app-ui__close-button",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",className:"notificare__web__phone__app-ui__close-button-icon",children:e.jsx("path",{d:"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"})})})]}),"re.notifica.notification.Alert"===t.type&&e.jsxs("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[k(t)&&e.jsx("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(a=t.attachments)||void 0===a?void 0:a[0].uri,alt:"Notification attachment"}),e.jsxs("div",{children:[e.jsx("p",{className:"notificare__web__phone__alert__app-ui__title",children:t.title}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:t.subtitle}),e.jsx("p",{className:"notificare__web__phone__alert__app-ui__message",children:t.message})]})]}),"re.notifica.notification.WebView"===t.type&&e.jsx("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:t.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"}),"re.notifica.notification.Map"===t.type&&e.jsx(ke,{notification:t,width:"100%",height:"400px"}),"re.notifica.notification.URL"==t.type&&e.jsx("div",{"data-testid":"web-mobile-app-ui-url-notification",children:e.jsx(m,{url:t.content[0].data,platform:"Web",width:268,height:430})}),"re.notifica.notification.Video"===t.type&&e.jsx("div",{"data-testid":"web-mobile-app-ui-video-notification",children:e.jsx(Oe,{videoData:t.content[0],width:"100%",height:"430px"})}),"re.notifica.notification.Image"===t.type&&e.jsx("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:t.content.map(((t,n)=>e.jsx("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:t.data,alt:"Slider image"},n)))}),t.actions&&e.jsx("div",{className:""+(t.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row"),children:t.actions.map(((t,n)=>e.jsx("button",{className:"notificare__web__phone__app-ui__action "+(0===n?"notificare__web__phone__app-ui__action--primary":"notificare__web__phone__app-ui__action--secondary"),"data-testid":`web-mobile-app-ui-action-${n}`,children:t.label},n)))})]})})}function lt({notification:t,application:n,mobileVariant:i,webDevice:a,webMobileType:o,webDesktopOS:s}){const{googleMapsAPIKey:r}=_().options;if("desktop"===a&&"macOS"===s)return e.jsx(ot,{notification:t,appName:n.name,appDomain:n.websitePushConfig.allowedDomains[0]},t.message);if("phone"===a&&"app-ui"===i){if("re.notifica.notification.Alert"!==t.type&&"re.notifica.notification.Map"!==t.type&&"re.notifica.notification.WebView"!==t.type&&"re.notifica.notification.URL"!==t.type&&"re.notifica.notification.Video"!==t.type&&"re.notifica.notification.Image"!==t.type)return e.jsx(u,{message:`→ The preview for the notification type '${t.type}' does not exist in this variant`,showConsoleWarning:!1});if("re.notifica.notification.Map"===t.type&&!r)return e.jsx(u,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1});const i="android"===o?p:"iphone"===o?Ze:null;if(i)return e.jsx(i,{theme:dt(t.type),children:e.jsx(_t,{notification:t,appName:n.name,appIcon:d(n.websitePushConfig.icon)})})}}function dt(e){return["re.notifica.notification.Alert","re.notifica.notification.Map","re.notifica.notification.WebView","re.notifica.notification.URL","re.notifica.notification.Video","re.notifica.notification.Image"].includes(e)?"dark":"light"}a("/* MAIN */\n\n.notificare .notificare__web__phone__app-ui {\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.notificare .notificare__web__phone__app-ui__background {\n width: 300px;\n background-color: white;\n border-radius: 4px;\n padding: 16px;\n display: flex;\n flex-direction: column;\n row-gap: 16px;\n}\n\n/* Header */\n\n.notificare .notificare__web__phone__app-ui__header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n column-gap: 16px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-icon {\n border-radius: 4px;\n height: 32px;\n width: 32px;\n}\n\n.notificare .notificare__web__phone__app-ui__app-name {\n font-size: 18px;\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button {\n width: 32px;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: transparent;\n border: none;\n cursor: pointer;\n border-radius: 4px;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button:hover {\n transition: background-color .3s ease-in-out, border-radius .3s ease-in-out;\n background-color: #f4f5f9;\n}\n\n.notificare .notificare__web__phone__app-ui__close-button-icon {\n width: 24px;\n height: 24px;\n}\n\n/* TEXT ALERT */\n\n.notificare .notificare__web__phone__alert__app-ui__media {\n max-width: 100%;\n max-height: 250px;\n aspect-ratio: 16 / 9;\n margin-bottom: 10px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__title {\n font-size: 16px;\n font-weight: 600;\n margin-bottom: 8px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__subtitle {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n}\n\n.notificare .notificare__web__phone__alert__app-ui__message {\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n/* Actions */\n\n.notificare .notificare__web__phone__app-ui__actions-row {\n display: flex;\n flex-wrap: wrap;\n column-gap: 8px;\n row-gap: 8px;\n flex-direction: row-reverse;\n}\n\n.notificare .notificare__web__phone__app-ui__actions-column {\n display: flex;\n flex-direction: column;\n row-gap: 8px;\n align-items: stretch;\n}\n\n.notificare .notificare__web__phone__app-ui__action {\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n overflow: hidden;\n padding: 8px 16px;\n text-overflow: ellipsis;\n transition: background-color .3s ease-in-out, color .3s ease-in-out;\n white-space: nowrap;\n border-radius: 4px;\n border: 0;\n cursor: pointer;\n}\n\n.notificare .notificare__web__phone__app-ui__action--full-width {\n width: 100%\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary {\n background-color: #2b42f7;\n color: #ffffffde;\n}\n\n.notificare .notificare__web__phone__app-ui__action--primary:hover {\n background-color: #071cc3;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary {\n background-color: transparent;\n color: #2b42f7;\n}\n\n.notificare .notificare__web__phone__app-ui__action--secondary:hover {\n background-color: #f4f5f9;\n}\n\n/* WEB VIEW */\n\n.notificare .notificare__web__phone__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 360px;\n background-color: #fff;\n}\n\n/* IMAGE */\n\n.notificare .notificare__web__phone__image__app-ui__image-slider {\n display: flex;\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n scroll-behavior: smooth;\n scrollbar-width: thin; /* Firefox */\n scrollbar-color: #bbb transparent; /* Firefox */\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-item {\n display: flex;\n min-width: 100%;\n scroll-snap-align: start;\n}\n\n/* For Chrome, Edge and Safari */\n.notificare .notificare__web__phone__image__app-ui__image-slider::-webkit-scrollbar {\n height: 4px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-thumb {\n background: #999;\n border-radius: 10px;\n}\n\n.notificare .notificare__web__phone__image__app-ui__image-slider-webkit-scrollbar-track {\n background: transparent;\n}\n\n"),function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter((e=>"number"!=typeof t[t[e]])),i={};for(const e of n)i[e]=t[e];return e.objectValues(i)},e.objectValues=t=>e.objectKeys(t).map((function(e){return t[e]})),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map((e=>"string"==typeof e?`'${e}'`:e)).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(rt||(rt={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(ct||(ct={}));const pt=rt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ut=e=>{switch(typeof e){case"undefined":return pt.undefined;case"string":return pt.string;case"number":return isNaN(e)?pt.nan:pt.number;case"boolean":return pt.boolean;case"function":return pt.function;case"bigint":return pt.bigint;case"symbol":return pt.symbol;case"object":return Array.isArray(e)?pt.array:null===e?pt.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?pt.promise:"undefined"!=typeof Map&&e instanceof Map?pt.map:"undefined"!=typeof Set&&e instanceof Set?pt.set:"undefined"!=typeof Date&&e instanceof Date?pt.date:pt.object;default:return pt.unknown}},ht=rt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class ft extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},i=e=>{for(const a of e.issues)if("invalid_union"===a.code)a.unionErrors.map(i);else if("invalid_return_type"===a.code)i(a.returnTypeError);else if("invalid_arguments"===a.code)i(a.argumentsError);else if(0===a.path.length)n._errors.push(t(a));else{let e=n,i=0;for(;i<a.path.length;){const n=a.path[i];i===a.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(a))):e[n]=e[n]||{_errors:[]},e=e[n],i++}}};return i(this),n}static assert(e){if(!(e instanceof ft))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,rt.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):n.push(e(i));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}ft.create=e=>new ft(e);const mt=(e,t)=>{let n;switch(e.code){case ht.invalid_type:n=e.received===pt.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case ht.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,rt.jsonStringifyReplacer)}`;break;case ht.unrecognized_keys:n=`Unrecognized key(s) in object: ${rt.joinValues(e.keys,", ")}`;break;case ht.invalid_union:n="Invalid input";break;case ht.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${rt.joinValues(e.options)}`;break;case ht.invalid_enum_value:n=`Invalid enum value. Expected ${rt.joinValues(e.options)}, received '${e.received}'`;break;case ht.invalid_arguments:n="Invalid function arguments";break;case ht.invalid_return_type:n="Invalid function return type";break;case ht.invalid_date:n="Invalid date";break;case ht.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:rt.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case ht.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case ht.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case ht.custom:n="Invalid input";break;case ht.invalid_intersection_types:n="Intersection results could not be merged";break;case ht.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case ht.not_finite:n="Number must be finite";break;default:n=t.defaultError,rt.assertNever(e)}return{message:n}};let gt=mt;function xt(){return gt}const bt=e=>{const{data:t,path:n,errorMaps:i,issueData:a}=e,o=[...n,...a.path||[]],s={...a,path:o};if(void 0!==a.message)return{...a,path:o,message:a.message};let r="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)r=e(s,{data:t,defaultError:r}).message;return{...a,path:o,message:r}};function vt(e,t){const n=xt(),i=bt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===mt?void 0:mt].filter((e=>!!e))});e.common.issues.push(i)}class yt{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const i of t){if("aborted"===i.status)return wt;"dirty"===i.status&&e.dirty(),n.push(i.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const e of t){const t=await e.key,i=await e.value;n.push({key:t,value:i})}return yt.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const i of t){const{key:t,value:a}=i;if("aborted"===t.status)return wt;if("aborted"===a.status)return wt;"dirty"===t.status&&e.dirty(),"dirty"===a.status&&e.dirty(),"__proto__"===t.value||void 0===a.value&&!i.alwaysSet||(n[t.value]=a.value)}return{status:e.value,value:n}}}const wt=Object.freeze({status:"aborted"}),kt=e=>({status:"dirty",value:e}),jt=e=>({status:"valid",value:e}),Nt=e=>"aborted"===e.status,Ct=e=>"dirty"===e.status,St=e=>"valid"===e.status,Tt=e=>"undefined"!=typeof Promise&&e instanceof Promise;function At(e,t,n,i){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Et(e,t,n,i,a){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var Ot,Pt,It;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(Ot||(Ot={}));class Mt{constructor(e,t,n,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Lt=(e,t)=>{if(St(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ft(e.common.issues);return this._error=t,this._error}}};function Zt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:i,description:a}=e;if(t&&(n||i))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:a};return{errorMap:(t,a)=>{var o,s;const{message:r}=e;return"invalid_enum_value"===t.code?{message:null!=r?r:a.defaultError}:void 0===a.data?{message:null!==(o=null!=r?r:i)&&void 0!==o?o:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(s=null!=r?r:n)&&void 0!==s?s:a.defaultError}},description:a}}class zt{get description(){return this._def.description}_getType(e){return ut(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:ut(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new yt,ctx:{common:e.parent.common,data:e.data,parsedType:ut(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Tt(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){var n;const i={common:{issues:[],async:null!==(n=null==t?void 0:t.async)&&void 0!==n&&n,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ut(e)},a=this._parseSync({data:e,path:i.path,parent:i});return Lt(i,a)}"~validate"(e){var t,n;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ut(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:i});return St(t)?{value:t.value}:{issues:i.common.issues}}catch(e){(null===(n=null===(t=null==e?void 0:e.message)||void 0===t?void 0:t.toLowerCase())||void 0===n?void 0:n.includes("encountered"))&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:i}).then((e=>St(e)?{value:e.value}:{issues:i.common.issues}))}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:ut(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(Tt(i)?i:Promise.resolve(i));return Lt(n,a)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement(((t,i)=>{const a=e(t),o=()=>i.addIssue({code:ht.custom,...n(t)});return"undefined"!=typeof Promise&&a instanceof Promise?a.then((e=>!!e||(o(),!1))):!!a||(o(),!1)}))}refinement(e,t){return this._refinement(((n,i)=>!!e(n)||(i.addIssue("function"==typeof t?t(n,i):t),!1)))}_refinement(e){return new Rn({schema:this,typeName:Yn.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Dn.create(this,this._def)}nullable(){return $n.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return bn.create(this)}promise(){return zn.create(this,this._def)}or(e){return wn.create([this,e],this._def)}and(e){return Cn.create(this,e,this._def)}transform(e){return new Rn({...Zt(this._def),schema:this,typeName:Yn.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Fn({...Zt(this._def),innerType:this,defaultValue:t,typeName:Yn.ZodDefault})}brand(){return new Kn({typeName:Yn.ZodBranded,type:this,...Zt(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Vn({...Zt(this._def),innerType:this,catchValue:t,typeName:Yn.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Wn.create(this,e)}readonly(){return Gn.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Rt=/^c[^\s-]{8,}$/i,Dt=/^[0-9a-z]+$/,$t=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Ft=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Vt=/^[a-z0-9_-]{21}$/i,Bt=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ut=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Kt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let Wt;const Gt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ht=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,qt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Jt=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Qt="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",en=new RegExp(`^${Qt}$`);function tn(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function nn(e){let t=`${Qt}T${tn(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function an(e,t){if(!Bt.test(e))return!1;try{const[n]=e.split("."),i=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(i));return"object"==typeof a&&null!==a&&(!(!a.typ||!a.alg)&&(!t||a.alg===t))}catch(e){return!1}}function on(e,t){return!("v4"!==t&&t||!Ht.test(e))||!("v6"!==t&&t||!Jt.test(e))}class sn extends zt{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==pt.string){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.string,received:t.parsedType}),wt}const t=new yt;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("max"===o.kind)e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),t.dirty());else if("length"===o.kind){const i=e.data.length>o.value,a=e.data.length<o.value;(i||a)&&(n=this._getOrReturnCtx(e,n),i?vt(n,{code:ht.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&vt(n,{code:ht.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)Kt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"email",code:ht.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)Wt||(Wt=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),Wt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"emoji",code:ht.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)Ft.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"uuid",code:ht.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)Vt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"nanoid",code:ht.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)Rt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"cuid",code:ht.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)Dt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"cuid2",code:ht.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)$t.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"ulid",code:ht.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(i){n=this._getOrReturnCtx(e,n),vt(n,{validation:"url",code:ht.invalid_string,message:o.message}),t.dirty()}else if("regex"===o.kind){o.regex.lastIndex=0;o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"regex",code:ht.invalid_string,message:o.message}),t.dirty())}else if("trim"===o.kind)e.data=e.data.trim();else if("includes"===o.kind)e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),t.dirty());else if("toLowerCase"===o.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===o.kind)e.data=e.data.toUpperCase();else if("startsWith"===o.kind)e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:{startsWith:o.value},message:o.message}),t.dirty());else if("endsWith"===o.kind)e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){nn(o).test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){en.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){new RegExp(`^${tn(o)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?Ut.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"duration",code:ht.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(i=e.data,("v4"!==(a=o.version)&&a||!Gt.test(i))&&("v6"!==a&&a||!qt.test(i))&&(n=this._getOrReturnCtx(e,n),vt(n,{validation:"ip",code:ht.invalid_string,message:o.message}),t.dirty())):"jwt"===o.kind?an(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"jwt",code:ht.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?on(e.data,o.version)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"cidr",code:ht.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?Yt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"base64",code:ht.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?Xt.test(e.data)||(n=this._getOrReturnCtx(e,n),vt(n,{validation:"base64url",code:ht.invalid_string,message:o.message}),t.dirty()):rt.assertNever(o);var i,a;return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement((t=>e.test(t)),{validation:t,code:ht.invalid_string,...Ot.errToObj(n)})}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Ot.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Ot.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Ot.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Ot.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Ot.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Ot.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Ot.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Ot.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Ot.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Ot.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Ot.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Ot.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Ot.errToObj(e)})}datetime(e){var t,n;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(n=null==e?void 0:e.local)&&void 0!==n&&n,...Ot.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...Ot.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Ot.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Ot.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Ot.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Ot.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Ot.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Ot.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Ot.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Ot.errToObj(t)})}nonempty(e){return this.min(1,Ot.errToObj(e))}trim(){return new sn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((e=>"datetime"===e.kind))}get isDate(){return!!this._def.checks.find((e=>"date"===e.kind))}get isTime(){return!!this._def.checks.find((e=>"time"===e.kind))}get isDuration(){return!!this._def.checks.find((e=>"duration"===e.kind))}get isEmail(){return!!this._def.checks.find((e=>"email"===e.kind))}get isURL(){return!!this._def.checks.find((e=>"url"===e.kind))}get isEmoji(){return!!this._def.checks.find((e=>"emoji"===e.kind))}get isUUID(){return!!this._def.checks.find((e=>"uuid"===e.kind))}get isNANOID(){return!!this._def.checks.find((e=>"nanoid"===e.kind))}get isCUID(){return!!this._def.checks.find((e=>"cuid"===e.kind))}get isCUID2(){return!!this._def.checks.find((e=>"cuid2"===e.kind))}get isULID(){return!!this._def.checks.find((e=>"ulid"===e.kind))}get isIP(){return!!this._def.checks.find((e=>"ip"===e.kind))}get isCIDR(){return!!this._def.checks.find((e=>"cidr"===e.kind))}get isBase64(){return!!this._def.checks.find((e=>"base64"===e.kind))}get isBase64url(){return!!this._def.checks.find((e=>"base64url"===e.kind))}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function rn(e,t){const n=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,a=n>i?n:i;return parseInt(e.toFixed(a).replace(".",""))%parseInt(t.toFixed(a).replace(".",""))/Math.pow(10,a)}sn.create=e=>{var t;return new sn({checks:[],typeName:Yn.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Zt(e)})};class cn extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==pt.number){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.number,received:t.parsedType}),wt}let t;const n=new yt;for(const i of this._def.checks)if("int"===i.kind)rt.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.invalid_type,expected:"integer",received:"float",message:i.message}),n.dirty());else if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==rn(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.not_finite,message:i.message}),n.dirty()):rt.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Ot.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ot.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ot.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ot.toString(t))}setLimit(e,t,n,i){return new cn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ot.toString(i)}]})}_addCheck(e){return new cn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Ot.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ot.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ot.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ot.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ot.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ot.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Ot.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ot.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ot.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find((e=>"int"===e.kind||"multipleOf"===e.kind&&rt.isInteger(e.value)))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}cn.create=e=>new cn({checks:[],typeName:Yn.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Zt(e)});class _n extends zt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch(t){return this._getInvalidInput(e)}if(this._getType(e)!==pt.bigint)return this._getInvalidInput(e);let t;const n=new yt;for(const i of this._def.checks)if("min"===i.kind){(i.inclusive?e.data<i.value:e.data<=i.value)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else if("max"===i.kind){(i.inclusive?e.data>i.value:e.data>=i.value)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),n.dirty())}else"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),vt(t,{code:ht.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):rt.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.bigint,received:t.parsedType}),wt}gte(e,t){return this.setLimit("min",e,!0,Ot.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Ot.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Ot.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Ot.toString(t))}setLimit(e,t,n,i){return new _n({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Ot.toString(i)}]})}_addCheck(e){return new _n({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ot.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ot.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ot.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ot.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Ot.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}_n.create=e=>{var t;return new _n({checks:[],typeName:Yn.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Zt(e)})};class ln extends zt{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==pt.boolean){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.boolean,received:t.parsedType}),wt}return jt(e.data)}}ln.create=e=>new ln({typeName:Yn.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Zt(e)});class dn extends zt{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==pt.date){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.date,received:t.parsedType}),wt}if(isNaN(e.data.getTime())){return vt(this._getOrReturnCtx(e),{code:ht.invalid_date}),wt}const t=new yt;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),t.dirty()):"max"===i.kind?e.data.getTime()>i.value&&(n=this._getOrReturnCtx(e,n),vt(n,{code:ht.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):rt.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new dn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Ot.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Ot.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}dn.create=e=>new dn({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:Yn.ZodDate,...Zt(e)});class pn extends zt{_parse(e){if(this._getType(e)!==pt.symbol){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.symbol,received:t.parsedType}),wt}return jt(e.data)}}pn.create=e=>new pn({typeName:Yn.ZodSymbol,...Zt(e)});class un extends zt{_parse(e){if(this._getType(e)!==pt.undefined){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.undefined,received:t.parsedType}),wt}return jt(e.data)}}un.create=e=>new un({typeName:Yn.ZodUndefined,...Zt(e)});class hn extends zt{_parse(e){if(this._getType(e)!==pt.null){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.null,received:t.parsedType}),wt}return jt(e.data)}}hn.create=e=>new hn({typeName:Yn.ZodNull,...Zt(e)});class fn extends zt{constructor(){super(...arguments),this._any=!0}_parse(e){return jt(e.data)}}fn.create=e=>new fn({typeName:Yn.ZodAny,...Zt(e)});class mn extends zt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return jt(e.data)}}mn.create=e=>new mn({typeName:Yn.ZodUnknown,...Zt(e)});class gn extends zt{_parse(e){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.never,received:t.parsedType}),wt}}gn.create=e=>new gn({typeName:Yn.ZodNever,...Zt(e)});class xn extends zt{_parse(e){if(this._getType(e)!==pt.undefined){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.void,received:t.parsedType}),wt}return jt(e.data)}}xn.create=e=>new xn({typeName:Yn.ZodVoid,...Zt(e)});class bn extends zt{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==pt.array)return vt(t,{code:ht.invalid_type,expected:pt.array,received:t.parsedType}),wt;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,a=t.data.length<i.exactLength.value;(e||a)&&(vt(t,{code:e?ht.too_big:ht.too_small,minimum:a?i.exactLength.value:void 0,maximum:e?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),n.dirty())}if(null!==i.minLength&&t.data.length<i.minLength.value&&(vt(t,{code:ht.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),n.dirty()),null!==i.maxLength&&t.data.length>i.maxLength.value&&(vt(t,{code:ht.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map(((e,n)=>i.type._parseAsync(new Mt(t,e,t.path,n))))).then((e=>yt.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>i.type._parseSync(new Mt(t,e,t.path,n))));return yt.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new bn({...this._def,minLength:{value:e,message:Ot.toString(t)}})}max(e,t){return new bn({...this._def,maxLength:{value:e,message:Ot.toString(t)}})}length(e,t){return new bn({...this._def,exactLength:{value:e,message:Ot.toString(t)}})}nonempty(e){return this.min(1,e)}}function vn(e){if(e instanceof yn){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=Dn.create(vn(i))}return new yn({...e._def,shape:()=>t})}return e instanceof bn?new bn({...e._def,type:vn(e.element)}):e instanceof Dn?Dn.create(vn(e.unwrap())):e instanceof $n?$n.create(vn(e.unwrap())):e instanceof Sn?Sn.create(e.items.map((e=>vn(e)))):e}bn.create=(e,t)=>new bn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Yn.ZodArray,...Zt(t)});class yn extends zt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=rt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==pt.object){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.object,received:t.parsedType}),wt}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof gn&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||o.push(e);const s=[];for(const e of a){const t=i[e],a=n.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new Mt(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof gn){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)s.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(vt(n,{code:ht.unrecognized_keys,keys:o}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of o){const i=n.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new Mt(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of s){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>yt.mergeObjectSync(t,e))):yt.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return Ot.errToObj,new yn({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var i,a,o,s;const r=null!==(o=null===(a=(i=this._def).errorMap)||void 0===a?void 0:a.call(i,t,n).message)&&void 0!==o?o:n.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=Ot.errToObj(e).message)&&void 0!==s?s:r}:{message:r}}}:{}})}strip(){return new yn({...this._def,unknownKeys:"strip"})}passthrough(){return new yn({...this._def,unknownKeys:"passthrough"})}extend(e){return new yn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new yn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Yn.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new yn({...this._def,catchall:e})}pick(e){const t={};return rt.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new yn({...this._def,shape:()=>t})}omit(e){const t={};return rt.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new yn({...this._def,shape:()=>t})}deepPartial(){return vn(this)}partial(e){const t={};return rt.objectKeys(this.shape).forEach((n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()})),new yn({...this._def,shape:()=>t})}required(e){const t={};return rt.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Dn;)e=e._def.innerType;t[n]=e}})),new yn({...this._def,shape:()=>t})}keyof(){return Mn(rt.objectKeys(this.shape))}}yn.create=(e,t)=>new yn({shape:()=>e,unknownKeys:"strip",catchall:gn.create(),typeName:Yn.ZodObject,...Zt(t)}),yn.strictCreate=(e,t)=>new yn({shape:()=>e,unknownKeys:"strict",catchall:gn.create(),typeName:Yn.ZodObject,...Zt(t)}),yn.lazycreate=(e,t)=>new yn({shape:e,unknownKeys:"strip",catchall:gn.create(),typeName:Yn.ZodObject,...Zt(t)});class wn extends zt{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map((async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}}))).then((function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const n of e)if("dirty"===n.result.status)return t.common.issues.push(...n.ctx.common.issues),n.result;const n=e.map((e=>new ft(e.ctx.common.issues)));return vt(t,{code:ht.invalid_union,unionErrors:n}),wt}));{let e;const i=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},o=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:n}),n.common.issues.length&&i.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const a=i.map((e=>new ft(e)));return vt(t,{code:ht.invalid_union,unionErrors:a}),wt}}get options(){return this._def.options}}wn.create=(e,t)=>new wn({options:e,typeName:Yn.ZodUnion,...Zt(t)});const kn=e=>e instanceof Pn?kn(e.schema):e instanceof Rn?kn(e.innerType()):e instanceof In?[e.value]:e instanceof Ln?e.options:e instanceof Zn?rt.objectValues(e.enum):e instanceof Fn?kn(e._def.innerType):e instanceof un?[void 0]:e instanceof hn?[null]:e instanceof Dn?[void 0,...kn(e.unwrap())]:e instanceof $n?[null,...kn(e.unwrap())]:e instanceof Kn||e instanceof Gn?kn(e.unwrap()):e instanceof Vn?kn(e._def.innerType):[];class jn extends zt{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==pt.object)return vt(t,{code:ht.invalid_type,expected:pt.object,received:t.parsedType}),wt;const n=this.discriminator,i=t.data[n],a=this.optionsMap.get(i);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._parseSync({data:t.data,path:t.path,parent:t}):(vt(t,{code:ht.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),wt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,n){const i=new Map;for(const n of t){const t=kn(n.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const a of t){if(i.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);i.set(a,n)}}return new jn({typeName:Yn.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Zt(n)})}}function Nn(e,t){const n=ut(e),i=ut(t);if(e===t)return{valid:!0,data:e};if(n===pt.object&&i===pt.object){const n=rt.objectKeys(t),i=rt.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of i){const i=Nn(e[n],t[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===pt.array&&i===pt.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const a=Nn(e[i],t[i]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===pt.date&&i===pt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Cn extends zt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if(Nt(e)||Nt(i))return wt;const a=Nn(e.value,i.value);return a.valid?((Ct(e)||Ct(i))&&t.dirty(),{status:t.value,value:a.data}):(vt(n,{code:ht.invalid_intersection_types}),wt)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then((([e,t])=>i(e,t))):i(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}Cn.create=(e,t,n)=>new Cn({left:e,right:t,typeName:Yn.ZodIntersection,...Zt(n)});class Sn extends zt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==pt.array)return vt(n,{code:ht.invalid_type,expected:pt.array,received:n.parsedType}),wt;if(n.data.length<this._def.items.length)return vt(n,{code:ht.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),wt;!this._def.rest&&n.data.length>this._def.items.length&&(vt(n,{code:ht.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const i=[...n.data].map(((e,t)=>{const i=this._def.items[t]||this._def.rest;return i?i._parse(new Mt(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>yt.mergeArray(t,e))):yt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Sn({...this._def,rest:e})}}Sn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Sn({items:e,typeName:Yn.ZodTuple,rest:null,...Zt(t)})};class Tn extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==pt.object)return vt(n,{code:ht.invalid_type,expected:pt.object,received:n.parsedType}),wt;const i=[],a=this._def.keyType,o=this._def.valueType;for(const e in n.data)i.push({key:a._parse(new Mt(n,e,n.path,e)),value:o._parse(new Mt(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?yt.mergeObjectAsync(t,i):yt.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return new Tn(t instanceof zt?{keyType:e,valueType:t,typeName:Yn.ZodRecord,...Zt(n)}:{keyType:sn.create(),valueType:e,typeName:Yn.ZodRecord,...Zt(t)})}}class An extends zt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==pt.map)return vt(n,{code:ht.invalid_type,expected:pt.map,received:n.parsedType}),wt;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map((([e,t],o)=>({key:i._parse(new Mt(n,e,n.path,[o,"key"])),value:a._parse(new Mt(n,t,n.path,[o,"value"]))})));if(n.common.async){const e=new Map;return Promise.resolve().then((async()=>{for(const n of o){const i=await n.key,a=await n.value;if("aborted"===i.status||"aborted"===a.status)return wt;"dirty"!==i.status&&"dirty"!==a.status||t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}}))}{const e=new Map;for(const n of o){const i=n.key,a=n.value;if("aborted"===i.status||"aborted"===a.status)return wt;"dirty"!==i.status&&"dirty"!==a.status||t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}}}}An.create=(e,t,n)=>new An({valueType:t,keyType:e,typeName:Yn.ZodMap,...Zt(n)});class En extends zt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==pt.set)return vt(n,{code:ht.invalid_type,expected:pt.set,received:n.parsedType}),wt;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(vt(n,{code:ht.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),t.dirty()),null!==i.maxSize&&n.data.size>i.maxSize.value&&(vt(n,{code:ht.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());const a=this._def.valueType;function o(e){const n=new Set;for(const i of e){if("aborted"===i.status)return wt;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const s=[...n.data.values()].map(((e,t)=>a._parse(new Mt(n,e,n.path,t))));return n.common.async?Promise.all(s).then((e=>o(e))):o(s)}min(e,t){return new En({...this._def,minSize:{value:e,message:Ot.toString(t)}})}max(e,t){return new En({...this._def,maxSize:{value:e,message:Ot.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}En.create=(e,t)=>new En({valueType:e,minSize:null,maxSize:null,typeName:Yn.ZodSet,...Zt(t)});class On extends zt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==pt.function)return vt(t,{code:ht.invalid_type,expected:pt.function,received:t.parsedType}),wt;function n(e,n){return bt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xt(),mt].filter((e=>!!e)),issueData:{code:ht.invalid_arguments,argumentsError:n}})}function i(e,n){return bt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,xt(),mt].filter((e=>!!e)),issueData:{code:ht.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof zn){const e=this;return jt((async function(...t){const s=new ft([]),r=await e._def.args.parseAsync(t,a).catch((e=>{throw s.addIssue(n(t,e)),s})),c=await Reflect.apply(o,this,r);return await e._def.returns._def.type.parseAsync(c,a).catch((e=>{throw s.addIssue(i(c,e)),s}))}))}{const e=this;return jt((function(...t){const s=e._def.args.safeParse(t,a);if(!s.success)throw new ft([n(t,s.error)]);const r=Reflect.apply(o,this,s.data),c=e._def.returns.safeParse(r,a);if(!c.success)throw new ft([i(r,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new On({...this._def,args:Sn.create(e).rest(mn.create())})}returns(e){return new On({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new On({args:e||Sn.create([]).rest(mn.create()),returns:t||mn.create(),typeName:Yn.ZodFunction,...Zt(n)})}}class Pn extends zt{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Pn.create=(e,t)=>new Pn({getter:e,typeName:Yn.ZodLazy,...Zt(t)});class In extends zt{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return vt(t,{received:t.data,code:ht.invalid_literal,expected:this._def.value}),wt}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Mn(e,t){return new Ln({values:e,typeName:Yn.ZodEnum,...Zt(t)})}In.create=(e,t)=>new In({value:e,typeName:Yn.ZodLiteral,...Zt(t)});class Ln extends zt{constructor(){super(...arguments),Pt.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return vt(t,{expected:rt.joinValues(n),received:t.parsedType,code:ht.invalid_type}),wt}if(At(this,Pt)||Et(this,Pt,new Set(this._def.values)),!At(this,Pt).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return vt(t,{received:t.data,code:ht.invalid_enum_value,options:n}),wt}return jt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ln.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ln.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Pt=new WeakMap,Ln.create=Mn;class Zn extends zt{constructor(){super(...arguments),It.set(this,void 0)}_parse(e){const t=rt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==pt.string&&n.parsedType!==pt.number){const e=rt.objectValues(t);return vt(n,{expected:rt.joinValues(e),received:n.parsedType,code:ht.invalid_type}),wt}if(At(this,It)||Et(this,It,new Set(rt.getValidEnumValues(this._def.values))),!At(this,It).has(e.data)){const e=rt.objectValues(t);return vt(n,{received:n.data,code:ht.invalid_enum_value,options:e}),wt}return jt(e.data)}get enum(){return this._def.values}}It=new WeakMap,Zn.create=(e,t)=>new Zn({values:e,typeName:Yn.ZodNativeEnum,...Zt(t)});class zn extends zt{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==pt.promise&&!1===t.common.async)return vt(t,{code:ht.invalid_type,expected:pt.promise,received:t.parsedType}),wt;const n=t.parsedType===pt.promise?t.data:Promise.resolve(t.data);return jt(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}zn.create=(e,t)=>new zn({type:e,typeName:Yn.ZodPromise,...Zt(t)});class Rn extends zt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Yn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=this._def.effect||null,a={addIssue:e=>{vt(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===i.type){const e=i.transform(n.data,a);if(n.common.async)return Promise.resolve(e).then((async e=>{if("aborted"===t.value)return wt;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?wt:"dirty"===i.status||"dirty"===t.value?kt(i.value):i}));{if("aborted"===t.value)return wt;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?wt:"dirty"===i.status||"dirty"===t.value?kt(i.value):i}}if("refinement"===i.type){const e=e=>{const t=i.refinement(e,a);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const i=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===i.status?wt:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((n=>"aborted"===n.status?wt:("dirty"===n.status&&t.dirty(),e(n.value).then((()=>({status:t.value,value:n.value}))))))}if("transform"===i.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!St(e))return e;const o=i.transform(e.value,a);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then((e=>St(e)?Promise.resolve(i.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}rt.assertNever(i)}}Rn.create=(e,t,n)=>new Rn({schema:e,typeName:Yn.ZodEffects,effect:t,...Zt(n)}),Rn.createWithPreprocess=(e,t,n)=>new Rn({schema:t,effect:{type:"preprocess",transform:e},typeName:Yn.ZodEffects,...Zt(n)});class Dn extends zt{_parse(e){return this._getType(e)===pt.undefined?jt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Dn.create=(e,t)=>new Dn({innerType:e,typeName:Yn.ZodOptional,...Zt(t)});class $n extends zt{_parse(e){return this._getType(e)===pt.null?jt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$n.create=(e,t)=>new $n({innerType:e,typeName:Yn.ZodNullable,...Zt(t)});class Fn extends zt{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===pt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Fn.create=(e,t)=>new Fn({innerType:e,typeName:Yn.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Zt(t)});class Vn extends zt{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Tt(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ft(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new ft(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Vn.create=(e,t)=>new Vn({innerType:e,typeName:Yn.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Zt(t)});class Bn extends zt{_parse(e){if(this._getType(e)!==pt.nan){const t=this._getOrReturnCtx(e);return vt(t,{code:ht.invalid_type,expected:pt.nan,received:t.parsedType}),wt}return{status:"valid",value:e.data}}}Bn.create=e=>new Bn({typeName:Yn.ZodNaN,...Zt(e)});const Un=Symbol("zod_brand");class Kn extends zt{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Wn extends zt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?wt:"dirty"===e.status?(t.dirty(),kt(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?wt:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Wn({in:e,out:t,typeName:Yn.ZodPipeline})}}class Gn extends zt{_parse(e){const t=this._def.innerType._parse(e),n=e=>(St(e)&&(e.value=Object.freeze(e.value)),e);return Tt(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function Hn(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function qn(e,t={},n){return e?fn.create().superRefine(((i,a)=>{var o,s;const r=e(i);if(r instanceof Promise)return r.then((e=>{var o,s;if(!e){const e=Hn(t,i),r=null===(s=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===s||s;a.addIssue({code:"custom",...e,fatal:r})}}));if(!r){const e=Hn(t,i),r=null===(s=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===s||s;a.addIssue({code:"custom",...e,fatal:r})}})):fn.create()}Gn.create=(e,t)=>new Gn({innerType:e,typeName:Yn.ZodReadonly,...Zt(t)});const Jn={object:yn.lazycreate};var Yn;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(Yn||(Yn={}));const Xn=sn.create,Qn=cn.create,ei=Bn.create,ti=_n.create,ni=ln.create,ii=dn.create,ai=pn.create,oi=un.create,si=hn.create,ri=fn.create,ci=mn.create,_i=gn.create,li=xn.create,di=bn.create,pi=yn.create,ui=yn.strictCreate,hi=wn.create,fi=jn.create,mi=Cn.create,gi=Sn.create,xi=Tn.create,bi=An.create,vi=En.create,yi=On.create,wi=Pn.create,ki=In.create,ji=Ln.create,Ni=Zn.create,Ci=zn.create,Si=Rn.create,Ti=Dn.create,Ai=$n.create,Ei=Rn.createWithPreprocess,Oi=Wn.create,Pi={string:e=>sn.create({...e,coerce:!0}),number:e=>cn.create({...e,coerce:!0}),boolean:e=>ln.create({...e,coerce:!0}),bigint:e=>_n.create({...e,coerce:!0}),date:e=>dn.create({...e,coerce:!0})},Ii=wt;var Mi=Object.freeze({__proto__:null,defaultErrorMap:mt,setErrorMap:function(e){gt=e},getErrorMap:xt,makeIssue:bt,EMPTY_PATH:[],addIssueToContext:vt,ParseStatus:yt,INVALID:wt,DIRTY:kt,OK:jt,isAborted:Nt,isDirty:Ct,isValid:St,isAsync:Tt,get util(){return rt},get objectUtil(){return ct},ZodParsedType:pt,getParsedType:ut,ZodType:zt,datetimeRegex:nn,ZodString:sn,ZodNumber:cn,ZodBigInt:_n,ZodBoolean:ln,ZodDate:dn,ZodSymbol:pn,ZodUndefined:un,ZodNull:hn,ZodAny:fn,ZodUnknown:mn,ZodNever:gn,ZodVoid:xn,ZodArray:bn,ZodObject:yn,ZodUnion:wn,ZodDiscriminatedUnion:jn,ZodIntersection:Cn,ZodTuple:Sn,ZodRecord:Tn,ZodMap:An,ZodSet:En,ZodFunction:On,ZodLazy:Pn,ZodLiteral:In,ZodEnum:Ln,ZodNativeEnum:Zn,ZodPromise:zn,ZodEffects:Rn,ZodTransformer:Rn,ZodOptional:Dn,ZodNullable:$n,ZodDefault:Fn,ZodCatch:Vn,ZodNaN:Bn,BRAND:Un,ZodBranded:Kn,ZodPipeline:Wn,ZodReadonly:Gn,custom:qn,Schema:zt,ZodSchema:zt,late:Jn,get ZodFirstPartyTypeKind(){return Yn},coerce:Pi,any:ri,array:di,bigint:ti,boolean:ni,date:ii,discriminatedUnion:fi,effect:Si,enum:ji,function:yi,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>qn((t=>t instanceof e),t),intersection:mi,lazy:wi,literal:ki,map:bi,nan:ei,nativeEnum:Ni,never:_i,null:si,nullable:Ai,number:Qn,object:pi,oboolean:()=>ni().optional(),onumber:()=>Qn().optional(),optional:Ti,ostring:()=>Xn().optional(),pipeline:Oi,preprocess:Ei,promise:Ci,record:xi,set:vi,strictObject:ui,string:Xn,symbol:ai,transformer:Si,tuple:gi,undefined:oi,union:hi,unknown:ci,void:li,NEVER:Ii,ZodIssueCode:ht,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:ft});const Li=Mi.object({type:Mi.string({message:"Action property 'type' should be a string"}),label:Mi.string({message:"Action property 'label' should be a string"}),target:Mi.string({message:"Action property 'target' should be a string"}).optional(),camera:Mi.boolean({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:Mi.boolean({message:"Action property 'keyboard' should be a boolean"}).optional()}),Zi=Mi.object({mimeType:Mi.string({message:"Attachment property 'mimeType' should be a string"}),uri:Mi.string({message:"Attachment property 'uri' should be a string"}).url("Attachment 'uri' property should be a valid URL")}),zi=Mi.object({type:Mi.literal("re.notifica.notification.Alert"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Ri=Mi.object({type:Mi.literal("re.notifica.notification.Image"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.enum(["re.notifica.content.PNG","re.notifica.content.JPEG","re.notifica.content.GIF"],{message:"Content objects should be of type 're.notifica.content.PNG', 're.notifica.content.JPEG' or 're.notifica.content.GIF'"}),data:Mi.string({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Di=Mi.object({type:Mi.literal("re.notifica.notification.InAppBrowser"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.literal("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:Mi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),$i=Mi.object({type:Mi.literal("re.notifica.notification.Map"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.literal("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:Mi.object({title:Mi.string({message:"Content object data property 'title' should be a string"}),description:Mi.string({message:"Content object data property 'description' should be a string"}),latitude:Mi.number({message:"Content object data property 'latitude' should be a number"}).min(-90,"Content object data property 'latitude' should be a minimum of -90").max(90,"Content object data property 'latitude' should be a maximum of 90"),longitude:Mi.number({message:"Content object data property 'longitude' should be a number"}).min(-180,"Content object data property 'longitude' must be at least -180").max(180,"Content object data property 'longitude' must be at most 180")})})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Fi=Mi.object({type:Mi.literal("re.notifica.notification.Passbook"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.literal("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:Mi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Vi=Mi.object({type:Mi.literal("re.notifica.notification.Rate"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.string({message:"Content object type should be a string"}),data:Mi.unknown()})).optional(),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Bi=Mi.object({type:Mi.literal("re.notifica.notification.Store"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.string({message:"Content object type should be a string"}),data:Mi.union([Mi.string().nonempty("Content object data is mandatory"),Mi.object({identifier:Mi.string({message:"Content object data property 'identifier' should be a string"}),campaignToken:Mi.string({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:Mi.string({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:Mi.string({message:"Content object data property 'providerToken' should be a string"}).optional()})])})).superRefine(((e,t)=>{e.forEach(((e,n)=>{["re.notifica.content.GooglePlayDetails","re.notifica.content.GooglePlayDeveloper","re.notifica.content.GooglePlayCollection","re.notifica.content.GooglePlaySearch","re.notifica.content.AppGalleryDetails","re.notifica.content.AppGallerySearch","re.notifica.content.AppStore"].includes(e.type)||t.addIssue({code:Mi.ZodIssueCode.custom,message:"Content object type should be one of: 're.notifica.content.GooglePlayDetails', 're.notifica.content.GooglePlayDeveloper', 're.notifica.content.GooglePlayCollection', 're.notifica.content.GooglePlaySearch', 're.notifica.content.AppGalleryDetails', 're.notifica.content.AppGallerySearch', 're.notifica.content.AppStore'",path:["content",n,"type"]}),"re.notifica.content.AppStore"===e.type&&"object"!=typeof e.data&&t.addIssue({code:Mi.ZodIssueCode.custom,message:"AppStore content object data must be an object with 'identifier' (mandatory), 'campaignToken', 'affiliateToken', or 'providerToken'",path:["content",n,"data"]}),"re.notifica.content.AppStore"!==e.type&&"string"!=typeof e.data&&t.addIssue({code:Mi.ZodIssueCode.custom,message:"GooglePlay and AppGallery content object data must be a string",path:["content",n,"data"]})}))})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Ui=Mi.object({type:Mi.literal("re.notifica.notification.URL"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.literal("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:Mi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Ki=Mi.object({type:Mi.literal("re.notifica.notification.Video"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:Mi.array(Mi.object({type:Mi.string({message:"Content object type should be a string"}),data:Mi.string().nonempty("Content object data is mandatory")})).superRefine(((e,t)=>{e.forEach(((e,n)=>{if(["re.notifica.content.YouTube","re.notifica.content.Vimeo","re.notifica.content.HTML5Video"].includes(e.type)||t.addIssue({code:Mi.ZodIssueCode.custom,message:"Content object should be of type 're.notifica.content.YouTube', 're.notifica.content.Vimeo' or 're.notifica.content.HTML5Video'",path:["content",n,"type"]}),"re.notifica.content.HTML5Video"===e.type)try{new URL(e.data)}catch(e){t.addIssue({code:Mi.ZodIssueCode.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Wi=Mi.object({type:Mi.literal("re.notifica.notification.WebView"),title:Mi.string({message:"Property 'title' should be a string"}).optional(),subtitle:Mi.string({message:"Property 'subtitle' should be a string"}).optional(),message:Mi.string({message:"Property 'message' should be a string"}).nonempty("Message is mandatory"),content:Mi.array(Mi.object({type:Mi.literal("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:Mi.string({message:"Content data should be a string containing the HTML markup"})})),actions:Mi.array(Li).optional(),attachments:Mi.array(Zi).optional()}),Gi=Mi.discriminatedUnion("type",[zi,Wi,Ui,Di,Ri,$i,Vi,Fi,Ki,Bi]),Hi={name:"My App",androidPackageName:"com.example.app",websitePushConfig:{icon:"https://avatars.githubusercontent.com/u/1728060?s=200&v=4",allowedDomains:["https://my-app.com/"]}};exports.NotificareNotificationPreview=function({notification:n,applicationId:a,showControls:o=!0,variant:s="android-lockscreen",serviceKey:_,googleMapsAPIKey:l}){var d,p,f,m,g;const[x,b]=t.useState();t.useEffect((()=>{!function(){i(this,void 0,void 0,(function*(){if(a)try{const e=yield fetch(`https://push.notifica.re/application/${a}/info?apiKey=${_}`);if(e.ok){const{application:t}=yield e.json();b(t)}else{const{error:t}=yield e.json();console.error(`There was an error trying to get the application: ${t}`),b(Hi)}}catch(e){console.error("Error fetching the application: ",e),b(Hi)}else b(Hi)}))}()}),[a,_]);const v=new Map([["android-lockscreen",{platform:"android",mobileVariant:"lockscreen"}],["android-lockscreen-expanded",{platform:"android",mobileVariant:"lockscreen-expanded"}],["android-app-ui",{platform:"android",mobileVariant:"app-ui"}],["ios-lockscreen",{platform:"ios",mobileVariant:"lockscreen"}],["ios-lockscreen-expanded",{platform:"ios",mobileVariant:"lockscreen-expanded"}],["ios-app-ui",{platform:"ios",mobileVariant:"app-ui"}],["web-desktop-macos",{platform:"web",webDevice:"desktop",webDesktopOS:"macOS"}],["web-iphone-app-ui",{platform:"web",webDevice:"phone",webMobileType:"iphone",mobileVariant:"app-ui"}],["web-android-app-ui",{platform:"web",webDevice:"phone",webMobileType:"android",mobileVariant:"app-ui"}]]),[y,w]=t.useState(null===(d=v.get(s))||void 0===d?void 0:d.platform),[k,j]=t.useState(null===(p=v.get(s))||void 0===p?void 0:p.mobileVariant),[N,C]=t.useState(null===(f=v.get(s))||void 0===f?void 0:f.webDevice),[S,T]=t.useState(null===(m=v.get(s))||void 0===m?void 0:m.webMobileType),[A,E]=t.useState(null===(g=v.get(s))||void 0===g?void 0:g.webDesktopOS),O=Gi.safeParse(n);return O.success||function(e){if(e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")))){const e=Gi.options.map((e=>e.shape.type.value));console.error(`Notification error: \n\nInvalid notification type. Expected one of: ${e.join(", ")}`)}else{const t=e.map((e=>e.message));console.error("Notification errors:\n\n"+t.join("\n"))}}(O.error.errors),e.jsx(c,{options:{serviceKey:_,googleMapsAPIKey:l},children:e.jsx("div",{className:"notificare",children:e.jsxs("div",{className:"notificare__push__preview-wrapper",children:[o&&e.jsx(r,{platform:y,mobileVariant:k,webDevice:N,webMobileType:S,webDesktopOS:A,setPlatform:w,setMobileVariant:j,setWebDesktopOS:E,setWebDevice:C,setWebMobileType:T}),x?e.jsx("div",{className:"notificare__push__preview",children:O.success?e.jsxs(e.Fragment,{children:["android"===y&&e.jsx(Me,{notification:O.data,application:x,mobileVariant:k}),"ios"===y&&e.jsx(nt,{notification:O.data,application:x,mobileVariant:k}),"web"===y&&e.jsx(lt,{notification:O.data,application:x,mobileVariant:k,webDevice:N,webMobileType:S,webDesktopOS:A})]}):e.jsx(u,{message:"→ Invalid Notification",showConsoleWarning:!0})}):e.jsx(h,{})]})})})};
2
+ //# sourceMappingURL=index.js.map