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.
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import i,{useState as a,useRef as o,useEffect as r,Fragment as s,createContext as c,useContext as _,forwardRef as l,useMemo as d,useImperativeHandle as p,Children as u,useReducer as h,useCallback as f,useLayoutEffect as m}from"react";import{createPortal as g}from"react-dom";function b(e,t,n,i){return new(n||(n=Promise))((function(a,o){function r(e){try{c(i.next(e))}catch(e){o(e)}}function s(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(r,s)}c((i=i.apply(e,t||[])).next())}))}function v(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;v("@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}");v(".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}");v(".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 y({options:n,selected:i,setSelected:s}){var c;const[_,l]=a(!1),d=o(null);if(r((()=>{l(!1),n.find((e=>e.key===i))&&i||s(n[0].key)}),[]),r((()=>{function e(e){d.current&&!d.current.contains(e.target)&&l(!1)}return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]),n.length>0)return e("div",{className:"notificare__push__preview-controls-selector",children:[t("p",{className:"notificare__push__preview-controls-selector-label",children:"Variant"}),e("button",{className:"notificare__push__preview-controls-selector-button",onClick:()=>l(!_),children:[null===(c=n.find((e=>e.key===i)))||void 0===c?void 0:c.label,t("svg",{className:"notificare__push__preview-controls-selector-button-expand-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t("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"})})]}),_&&t("div",{className:"notificare__push__preview-controls-selector-options",ref:d,children:n.map((e=>t("button",{className:"notificare__push__preview-controls-selector-option-button "+(i===e.key?"notificare__push__preview-controls-selector-option-button--selected":""),onClick:()=>{s(e.key),l(!1)},"data-testid":`selector-option-${e.key}`,children:e.label},e.key)))})]})}v(".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 w({label:n,options:i,selected:a,setSelected:o}){return r((()=>{a||o(i[0].key)}),[]),e("div",{className:"notificare__push__preview-controls-toggle-group",children:[e("p",{className:"notificare__push__preview-controls-toggle-group-label",children:[" ",n," "]}),t("div",{className:"notificare__push__preview-controls-toggle-group-options",children:i.map(((n,r)=>e(s,{children:[t("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:t("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})}),r!==i.length-1&&t("div",{className:"notificare__push__preview-controls-toggle-group-divisor"})]},n.key)))})]})}function x({platform:i,mobileVariant:a,webDevice:o,webMobileType:r,webDesktopOS:s,setPlatform:c,setMobileVariant:_,setWebDevice:l,setWebMobileType:d,setWebDesktopOS:p}){const u=[{key:"android",icon:t("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t("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:t("svg",{width:"20px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:t("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:t("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:t("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:t("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t("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:t("svg",{width:"19px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:t("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:t("svg",{width:"22px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t("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:t("svg",{width:"20px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",children:t("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("div",{className:"notificare__push__preview-controls","data-testid":"controls",children:[e("div",{className:"notificare__push__preview-controls-toggle-groups",children:[t(w,{label:"Platform",options:u.map((e=>e)),selected:i,setSelected:c}),"web"===i&&e(n,{children:[t(w,{label:"Form Factor",options:h.map((e=>e)),selected:o,setSelected:l}),"phone"===o&&t(w,{label:"Phone Model",options:f.map((e=>e)),selected:r,setSelected:d})]})]}),("ios"===i||"android"===i)&&t(y,{options:[{key:"lockscreen",label:"Lock Screen"},{key:"lockscreen-expanded",label:"Lock Screen Expanded"},{key:"app-ui",label:"App UI"}],selected:a,setSelected:_}),"web"===i&&e(n,{children:["phone"===o&&t(y,{options:[{key:"app-ui",label:"App UI"}],selected:a,setSelected:_}),"desktop"===o&&t(y,{options:[{key:"macOS",label:"macOS"}],selected:s,setSelected:p})]})]})}function k({options:e,children:n}){return t(C.Provider,{value:{options:e},children:n})}v(".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 N=()=>{const e=_(C);if(!e)throw new Error("useOptions should be used inside an OptionsProvider");return e},C=c(void 0);function S(e){return e.startsWith("https://")||e.startsWith("http://")?e:`https://push.notifica.re/upload${e}`}v(".notificare .notificare__push__android__preview {\n font-family: 'Roboto', sans-serif;\n height: 100%;\n}");function T({children:n,theme:i}){return e("div",{className:"notificare__push__android__phone-background "+("dark"===i?"notificare__push__android__phone-background--dark":""),"data-testid":"android-phone-background",children:[t("div",{className:"notificare__push__android__phone-background-camera"}),t("div",{className:"notificare__push__android__phone-background-content",children:n})]})}v(".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 A({message:n,showConsoleWarning:i}){return e("div",{"data-testid":"notificare-push-unavailable-preview",children:[e("div",{className:"notificare__push__unavailable-preview-warning",children:[t("svg",{className:"notificare__push__unavailable-preview-alert-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t("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("div",{className:"notificare__push__unavailable-preview-text-container",children:[t("div",{className:"notificare__push__unavailable-preview-title",children:"Preview could not be loaded"}),t("div",{className:"notificare__push__unavailable-preview-reason-text","data-testid":"notificare-push-unavailable-preview-reason-text",children:n})]})]}),i&&t("div",{className:"notificare__push__unavailable-preview-check-console-text",children:"Check console for more information"})]})}v(".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}");v("");v(".notificare .notificare__push__webshot-background {\n background-color: #fff;\n}");function O(){return t("div",{className:"notificare__push__webshot-loading-icon","data-testid":"loading-icon",children:t("svg",{className:"notificare__push__webshot-loading-icon-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t("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"})})})}v("@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 j({message:i}){return e("div",{className:"notificare__push__preview-error","data-testid":"preview-error",children:[t("svg",{className:"notificare__push__preview-error-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:t("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("p",{className:"notificare__push__preview-error-text",children:["Preview could not be generated",i&&e(n,{children:[t("br",{})," ",t("br",{})," ",i]})]})]})}function P({url:e,platform:n,width:i,height:o,onLoadingChange:s,canShow:c=!0}){const{serviceKey:_}=N().options,[l,d]=a(""),[p,u]=a(!1),[h,f]=a(!0);return r((()=>{if(!_)return u(!0),void console.error("The service key is missing");if(!function(e){try{return new URL(e),!0}catch(e){return!1}}(e))return u(!0),void console.error("The URL is invalid");let t;f(!0),null==s||s(!0),u(!1);const a=setTimeout((()=>b(this,void 0,void 0,(function*(){try{const a=yield function(e,t,n,i,a){return b(this,void 0,void 0,(function*(){const o=yield fetch(`https://push.notifica.re/webshot?apiKey=${a}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e,delay:3e3,platform:i,type:"png",params:{width:t,height:n}})});return(yield o.json()).webshot.id}))}(e,i,o,n,_);t=setInterval((()=>b(this,void 0,void 0,(function*(){const e=yield function(e,t){return b(this,void 0,void 0,(function*(){const n=yield fetch(`https://push.notifica.re/webshot/${e}?apiKey=${t}`);return(yield n.json()).webshot.status}))}(a,_);if("error"===e)u(!0),f(!1),null==s||s(!1),clearInterval(t);else if("finished"===e){const e=yield function(e,t){return b(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)}))}(a,_);d(e),f(!1),null==s||s(!1),clearInterval(t)}}))),3e3)}catch(e){console.error(e),u(!0),f(!1),null==s||s(!1)}}))),3e3);return()=>{clearTimeout(a),clearInterval(t)}}),[e]),t("div",{className:"notificare__push__webshot-background",style:{width:i,height:o},children:p?t(j,{}):h||!c?t(O,{}):t("img",{src:l,alt:"Webshot","data-testid":"webshot"})})}v(".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 I({appName:n,title:i,showOptions:a}){return e("div",{className:"notificare__push__android__app-ui__navigation-bar",children:[t("svg",{className:"notificare__push__android__app-ui__navigation-bar-arrow-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",children:t("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"})}),t("div",{className:"notificare__push__android__app-ui__navigation-bar-title",children:i||n}),a&&t("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:t("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 L({notification:n,appName:i}){return e("div",{"data-testid":"android-app-ui-app-recommendation-notification",children:[t(I,{appName:i,title:n.title,showOptions:!1}),t(P,{url:M(n.content[0]),platform:"Android",width:338,height:570})]})}function M(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""}}v(".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 E(e){return!!(e.actions&&e.actions.length>0)}function Z(e){return!(!e.actions||1!==e.actions.length)}function z(e){return!!(e.actions&&e.actions.length>1)}function R(e){var t;return!!(null===(t=e.attachments)||void 0===t?void 0:t[0])}function D({notification:n,appName:i}){return e("div",{"data-testid":"android-app-ui-passbook-notification",children:[t(I,{appName:i,title:n.title,showOptions:E(n)}),t(P,{url:`https://push.notifica.re/pass/web/${n.content[0].data.split("/")[5]}`,platform:"Android",width:338,height:570}),")"]})}v("");function $({notification:n,appName:i}){return e("div",{"data-testid":"android-app-ui-images-notification",children:[t(I,{appName:i,title:n.title,showOptions:E(n)}),t("div",{className:"notificare__push__android__image__app-ui__rich-content",children:t("div",{className:"notificare__push__android__image__app-ui__image-slider",children:n.content.map(((e,n)=>t("img",{className:"notificare__push__android__image__app-ui__image-slider-item",src:e.data,alt:"Slider image"},n)))})})]})}v(".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}");v("");function F(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 V(e){try{return"https:"===new URL(e).protocol}catch(e){return!1}}function B({url:n,onLoadingChange:i,canShow:o}){const[s,c]=a(""),[_,l]=a(!1),{serviceKey:d}=N().options;return r((()=>{(()=>{b(this,void 0,void 0,(function*(){l(!0);const e=yield function(e,t){return b(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()}`),r=yield o.text(),s=new DOMParser;return null!==(i=null===(n=s.parseFromString(r,"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);c(e),l(!1),null==i||i(!1)}))})()}),[n]),e("div",{className:"notificare__push__android__in-app-browser__app-ui__bar",children:[t("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:t("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"})}),V(n)?t("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:t("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"})}):t("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:t("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("div",{className:"notificare__push__android__in-app-browser__app-ui__bar-domain",children:[t("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--title",children:!_&&o?s:"Loading..."}),t("p",{className:"notificare__push__android__in-app-browser__app-ui__bar-text notificare__push__android__in-app-browser__app-ui__bar-text--url",children:F(n)})]})]})}function U({notification:n}){const[i,o]=a(!0),[r,s]=a(!0),c=n.content[0].data;return e("div",{"data-testid":"android-app-ui-in-app-browser-notification",children:[t(B,{url:c,onLoadingChange:o,canShow:!r}),t(P,{url:c,platform:"Android",width:338,height:570,onLoadingChange:s,canShow:!i})]})}v(".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 K({notification:n,appName:i,appIcon:a,expanded:o}){var r,s;return e("div",{className:"notificare__push__android__lock-screen","data-testid":"android-lock-screen-notification",children:[t("div",{className:"notificare__push__android__lock-screen__app-icon",children:t("img",{className:"notificare__push__android__lock-screen__app-icon-image",alt:"App icon",src:a})}),e("div",{className:"notificare__push__android__lock-screen__text-content",children:[e("div",{className:"notificare__push__android__lock-screen__text-content-top",children:[e("div",{className:"notificare__push__android__lock-screen__title-and-subtitle "+(R(n)&&!o?"notificare__push__android__lock-screen__title-and-subtitle--has-media":""),children:[t("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--title",children:o?i:n.title||i}),n.subtitle&&!R(n)&&t("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--subtitle",children:n.subtitle})]}),t("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--time",children:"now"})]}),o&&t("p",{className:"notificare__push__android__lock-screen__text notificare__push__android__lock-screen__text--expanded-title",children:n.title}),t("p",{className:`notificare__push__android__lock-screen__text ${o?"notificare__push__android__lock-screen__text--expanded-message":""} ${R(n)&&!o?"notificare__push__android__lock-screen__text--message-with-media":"notificare__push__android__lock-screen__text--message-without-media"}`,children:n.message}),R(n)&&o&&t("div",{className:"notificare__push__android__lock-screen__expanded-media","data-testid":"android-lock-screen-notification-expanded-media",children:t("img",{className:"notificare__push__android__lock-screen__expanded-media-image",src:null===(r=n.attachments)||void 0===r?void 0:r[0].uri,alt:"Expanded media"})})]}),R(n)&&!o&&t("div",{className:"notificare__push__android__lock-screen__media","data-testid":"android-lock-screen-notification-media",children:t("img",{className:"notificare__push__android__lock-screen__media-image",src:null===(s=n.attachments)||void 0===s?void 0:s[0].uri,alt:"Media icon"})})]})}v(".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");v("");var W,G;function H(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}v("");var q=H(G?W:(G=1,W=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 r=o[a];if(!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}));function J(){return J=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},J.apply(null,arguments)}function Y(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 X(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 Q="NOT_LOADED",ee="LOADING",te="LOADED",ne="FAILED",ie="AUTH_FAILURE";class ae{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=te),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=ne,this.notifyLoadingStatusListeners(),n(new Error("The Google Maps JavaScript API could not load."))},window.__googleMapsCallback__=()=>{this.loadingStatus=te,this.notifyLoadingStatusListeners(),t()},window.gm_authFailure=()=>{this.loadingStatus=ie,this.notifyLoadingStatusListeners()},this.loadingStatus=ee,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)}}ae.loadingStatus=Q,ae.serializedApiParams=void 0,ae.listeners=[];const oe=["onLoad","onError","apiKey","version","libraries"],re=["children"],se=i.createContext(null);const ce=e=>{const{children:t}=e,n=Y(e,re),{mapInstances:o,addMapInstance:s,removeMapInstance:c,clearMapInstances:_}=function(){const[e,t]=a({});return{mapInstances:e,addMapInstance:(e,n="default")=>{t((t=>J({},t,{[n]:e})))},removeMapInstance:(e="default")=>{t((t=>Y(t,[e].map(X))))},clearMapInstances:()=>{t({})}}}(),{status:l,loadedLibraries:p,importLibrary:u}=function(e){const{onLoad:t,onError:n,apiKey:i,version:o,libraries:s=[]}=e,c=Y(e,oe),[_,l]=a(ae.loadingStatus),[p,u]=h(((e,t)=>e[t.name]?e:J({},e,{[t.name]:t.value})),{}),m=d((()=>null==s?void 0:s.join(",")),[s]),g=d((()=>JSON.stringify(J({apiKey:i,version:o},c))),[i,o,c]),b=f((async e=>{var t;if(p[e])return p[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 u({name:e,value:n}),n}),[p]);return r((()=>{(async()=>{try{const e=J({key:i},c);o&&(e.v=o),(null==m?void 0:m.length)>0&&(e.libraries=m),(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 ae.load(e,(e=>l(e)));for(const e of["core","maps",...s])await b(e);t&&t()}catch(e){n?n(e):console.error("<ApiProvider> failed to load the Google Maps JavaScript API",e)}})()}),[i,m,g]),{status:_,loadedLibraries:p,importLibrary:b}}(n),m=d((()=>({mapInstances:o,addMapInstance:s,removeMapInstance:c,clearMapInstances:_,status:l,loadedLibraries:p,importLibrary:u})),[o,s,c,_,l,p,u]);return i.createElement(se.Provider,{value:m},t)};function _e(e,t,n){const i={type:e,map:t,detail:{},stoppable:!1,stop:()=>{}};if(de.includes(e)){const e=i,n=t.getCenter(),a=t.getZoom(),o=t.getHeading()||0,r=t.getTilt()||0,s=t.getBounds();return n&&s&&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:r,bounds:(null==s?void 0:s.toJSON())||{north:90,east:180,south:-90,west:-180}},e}if(pe.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 le={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"},de=["bounds_changed","center_changed","heading_changed","tilt_changed","zoom_changed"],pe=["click","contextmenu","dblclick","mousemove","mouseout","mouseover"],ue=Object.keys(le);const he=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 fe(e,t){const n={},i=Object.keys(t);for(const e of i)he.has(e)&&(n[e]=t[e]);!function(e,t){const n=o(void 0);n.current&&q(t,n.current)||(n.current=t),r(e,n.current)}((()=>{e&&e.setOptions(n)}),[n])}function me(){var e;return(null==(e=_(se))?void 0:e.status)||Q}function ge(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 be=()=>i.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"}},i.createElement("h2",null,"Error: AuthFailure"),i.createElement("p",null,"A problem with your API key prevents the map from rendering correctly. Please make sure the value of the ",i.createElement("code",null,"APIProvider.apiKey")," prop is correct. Check the error-message in the console for further details."));function ve(){return me()===te}function ye(e){const t=function(){const[,e]=h((e=>e+1),0);return e}(),n=o({center:{lat:0,lng:0},heading:0,tilt:0,zoom:0});return r((()=>{if(!e)return;const i=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,r=e.getBounds();n&&r&&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,n),t()}));return()=>i.remove()}),[e,t]),n}const we=["id","defaultBounds","defaultCenter","defaultZoom","defaultHeading","defaultTilt","reuseMaps","renderingType","colorScheme"],xe=["padding"];class ke{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 Ne(e,t){const n=ve(),[i,s]=a(null),[c,_]=function(){const[e,t]=a(null);return[e,f((e=>t(e)),[t])]}(),l=ye(i),{id:d,defaultBounds:p,defaultCenter:u,defaultZoom:h,defaultHeading:m,defaultTilt:g,reuseMaps:b,renderingType:v,colorScheme:y}=e,w=Y(e,we),x=void 0!==e.zoom||void 0!==e.defaultZoom,k=void 0!==e.center||void 0!==e.defaultCenter;p||x&&k||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"),!w.center&&u&&(w.center=u),!w.zoom&&Number.isFinite(h)&&(w.zoom=h),!w.heading&&Number.isFinite(m)&&(w.heading=m),!w.tilt&&Number.isFinite(g)&&(w.tilt=g);for(const e of Object.keys(w))void 0===w[e]&&delete w[e];const N=o(void 0);return r((()=>{if(!c||!n)return;const{addMapInstance:i,removeMapInstance:a}=t,{mapId:o}=e,r=`${o||"default"}:${v||"default"}:${y||"LIGHT"}`;let _,u;if(b&&ke.has(r)?(u=ke.pop(r),_=u.getDiv(),c.appendChild(_),u.setOptions(w),setTimeout((()=>u.setCenter(u.getCenter())),0)):(_=document.createElement("div"),_.style.height="100%",c.appendChild(_),u=new google.maps.Map(_,J({},w,v?{renderingType:v}:{},y?{colorScheme:y}:{}))),s(u),i(u,d),p){const{padding:e}=p,t=Y(p,xe);u.fitBounds(t,e)}else x&&k||u.fitBounds({east:180,west:-180,south:-90,north:90});if(N.current){const{mapId:e,cameraState:t}=N.current;e!==o&&u.setOptions(t)}return()=>{N.current={mapId:o,cameraState:l.current},_.remove(),b?ke.push(r,u):google.maps.event.clearInstanceListeners(u),s(null),a(d)}}),[c,n,d,e.mapId,e.renderingType,e.colorScheme]),[i,_,l]}ke.entries={};const Ce=i.createContext(null),Se=e=>{const{children:t,id:n,className:a,style:o}=e,s=_(se),c=me();if(!s)throw new Error("<Map> can only be used inside an <ApiProvider> component.");const[l,p,u]=Ne(e,s);!function(e,t,n){const i=n.center?ge(n.center):null;let a=null,o=null;i&&Number.isFinite(i.lat)&&Number.isFinite(i.lng)&&(a=i.lat,o=i.lng);const r=Number.isFinite(n.zoom)?n.zoom:null,s=Number.isFinite(n.heading)?n.heading:null,c=Number.isFinite(n.tilt)?n.tilt:null;m((()=>{if(!e)return;const n={};let i=!1;null===a||null===o||t.current.center.lat===a&&t.current.center.lng===o||(n.center={lat:a,lng:o},i=!0),null!==r&&t.current.zoom!==r&&(n.zoom=r,i=!0),null!==s&&t.current.heading!==s&&(n.heading=s,i=!0),null!==c&&t.current.tilt!==c&&(n.tilt=c,i=!0),i&&e.moveCamera(n)}))}(l,u,e),function(e,t){for(const n of ue){const i=t[n],a=le[n];r((()=>{if(!e)return;if(!i)return;const t=google.maps.event.addListener(e,a,(t=>{i(_e(a,e,t))}));return()=>t.remove()}),[e,a,i])}}(l,e),fe(l,e);const h=function(e,t){const{viewport:n,viewState:i}=t,a=!!n;return m((()=>{if(!e||!i)return;const{latitude:t,longitude:n,bearing:a,pitch:o,zoom:r}=i;e.moveCamera({center:{lat:t,lng:n},heading:a,tilt:o,zoom:r+1})}),[e,i]),a}(l,e),f=!!e.controlled;r((()=>{if(l)return h&&l.setOptions({disableDefaultUI:!0}),(h||f)&&l.setOptions({gestureHandling:"none",keyboardShortcuts:!1}),()=>{l.setOptions({gestureHandling:e.gestureHandling,keyboardShortcuts:e.keyboardShortcuts})}}),[l,h,f,e.gestureHandling,e.keyboardShortcuts]);const g=e.center?ge(e.center):null;let b=null,v=null;g&&Number.isFinite(g.lat)&&Number.isFinite(g.lng)&&(b=g.lat,v=g.lng);const y=d((()=>{var t,n,i,a,o;return{center:{lat:null!=(t=b)?t:0,lng:null!=(n=v)?n:0},zoom:null!=(i=e.zoom)?i:0,heading:null!=(a=e.heading)?a:0,tilt:null!=(o=e.tilt)?o:0}}),[b,v,e.zoom,e.heading,e.tilt]);m((()=>{if(!l||!f)return;l.moveCamera(y);const e=l.addListener("bounds_changed",(()=>{l.moveCamera(y)}));return()=>e.remove()}),[l,f,y]);const w=d((()=>J({width:"100%",height:"100%",position:"relative",zIndex:h?-1:0},o)),[o,h]),x=d((()=>({map:l})),[l]);return c===ie?i.createElement("div",{style:J({position:"relative"},a?{}:w),className:a},i.createElement(be,null)):i.createElement("div",J({ref:p,"data-testid":"map",style:a?void 0:w,className:a},n?{id:n}:{}),l?i.createElement(Ce.Provider,{value:x},t):null)};Se.deckGLViewProps=!0;const Te=new Set;const Ae=(e=null)=>{const t=_(se),{map:n}=_(Ce)||{};if(null===t)return function(...e){const t=JSON.stringify(e);Te.has(t)||(Te.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:i}=t;return null!==e?i[e]||null:n||(i.default||null)};function Oe(e,t,n){r((()=>{if(!e||!t||!n)return;const i=google.maps.event.addListener(e,t,n);return()=>i.remove()}),[e,t,n])}function je(e,t,n){r((()=>{e&&(e[t]=n)}),[e,t,n])}function Pe(e,t,n){r((()=>{if(e&&t&&n)return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}),[e,t,n])}const Ie=i.createContext(null),Le={BOTTOM:["50%","100%"]},Me=({children:e,styles:t,className:n,anchorPoint:a})=>{const[o,r]=null!=a?a:Le.BOTTOM;let s=`-${o}`,c=`-${r}`;o.trimStart().startsWith("-")&&(s=o.substring(1)),r.trimStart().startsWith("-")&&(c=r.substring(1));const _=`translate(50%, 100%) translate(${s}, ${c})`;return i.createElement("div",{style:{transform:_}},i.createElement("div",{className:n,style:t},e))};function Ee(e){const[t,n]=a(null),[i,o]=a(null),s=Ae(),c=function(e){const t=ve(),n=_(se);return r((()=>{t&&n&&n.importLibrary(e)}),[t,n,e]),(null==n?void 0:n.loadedLibraries[e])||null}("marker"),{children:l,onClick:d,className:p,onMouseEnter:h,onMouseLeave:f,onDrag:m,onDragStart:g,onDragEnd:b,collisionBehavior:v,clickable:y,draggable:w,position:x,title:k,zIndex:N}=e,C=u.count(l);return r((()=>{if(!s||!c)return;const e=new c.AdvancedMarkerElement;e.map=s,n(e);let t=null;return C>0&&(t=document.createElement("div"),t.isCustomMarker=!0,e.content=t,o(t)),()=>{var i;e.map=null,null==(i=t)||i.remove(),n(null),o(null)}}),[s,c,C]),r((()=>{!t||!t.content||C>0||(t.content.className=p||"")}),[t,p,C]),je(t,"position",x),je(t,"title",null!=k?k:""),je(t,"zIndex",N),je(t,"collisionBehavior",v),r((()=>{t&&(t.gmpDraggable=void 0!==w?w:!!(m||g||b))}),[t,w,m,b,g]),r((()=>{if(!t)return;const e=void 0!==y||Boolean(d)||Boolean(h)||Boolean(f);t.gmpClickable=e,e&&null!=t&&t.content&&t.content.nodeType===Node.ELEMENT_NODE&&(t.content.style.pointerEvents="none",t.content.firstElementChild&&(t.content.firstElementChild.style.pointerEvents="all"))}),[t,y,d,h,f]),Oe(t,"click",d),Oe(t,"drag",m),Oe(t,"dragstart",g),Oe(t,"dragend",b),Pe(null==t?void 0:t.element,"mouseenter",h),Pe(null==t?void 0:t.element,"mouseleave",f),[t,i]}l(((e,t)=>{const{children:n,style:a,className:o,anchorPoint:r}=e,[s,c]=Ee(e),_=d((()=>s?{marker:s}:null),[s]);return p(t,(()=>s),[s]),c?i.createElement(Ie.Provider,{value:_},g(i.createElement(Me,{anchorPoint:r,styles:a,className:o},n),c)):null}));const Ze=["onClick","onDrag","onDragStart","onDragEnd","onMouseOver","onMouseOut"];const ze=l(((e,t)=>{const n=function(e){const[t,n]=a(null),i=Ae(),{onClick:o,onDrag:s,onDragStart:c,onDragEnd:_,onMouseOver:l,onMouseOut:d}=e,p=Y(e,Ze),{position:u,draggable:h}=p;return r((()=>{if(!i)return void(void 0===i&&console.error("<Marker> has to be inside a Map component."));const e=new google.maps.Marker(p);return e.setMap(i),n(e),()=>{e.setMap(null),n(null)}}),[i]),r((()=>{if(!t)return;const e=t,n=google.maps.event;return o&&n.addListener(e,"click",o),s&&n.addListener(e,"drag",s),c&&n.addListener(e,"dragstart",c),_&&n.addListener(e,"dragend",_),l&&n.addListener(e,"mouseover",l),d&&n.addListener(e,"mouseout",d),t.setDraggable(Boolean(h)),()=>{n.clearInstanceListeners(e)}}),[t,h,o,s,c,_,l,d]),r((()=>{t&&p&&t.setOptions(p)}),[t,p]),r((()=>{!h&&u&&t&&t.setPosition(u)}),[h,u,t]),t}(e);return p(t,(()=>n),[n]),i.createElement(i.Fragment,null)}));function Re({notification:e,width:n,height:i}){const{googleMapsAPIKey:o}=N().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}(e).map(((e,t)=>({id:t,lat:e.latitude,lng:e.longitude,title:e.title}))),[c,_]=a(!1),l=d((()=>s.length>0?{lat:s[0].lat,lng:s[0].lng}:{lat:0,lng:0}),[s]);return r((()=>{_(!0)}),[]),0!==s.length&&c?t("div",{"data-testid":"map-notification",children:t(ce,{apiKey:o||"",children:t(De,{markers:s,center:l,width:n,height:i})})}):t(O,{})}function De({markers:n,center:i,width:a,height:o}){const r=me();return e("div",{style:{width:a,height:o,backgroundColor:"white",position:"relative",overflow:"hidden"},children:[r===ee&&t(O,{}),r===ie&&t(j,{message:"Authentication failure. Your Google Maps API key might be invalid. Check console for more information."}),r===ne&&t(j,{message:"Google Maps failed to be loaded. Check console for more information."}),r===te&&t(Se,{style:{width:a,height:o},defaultCenter:i,defaultZoom:10,gestureHandling:"greedy",disableDefaultUI:!0,children:n.map((e=>t(ze,{position:{lat:e.lat,lng:e.lng},title:e.title},e.id)))})]})}function $e({notification:n,appName:i}){return e("div",{"data-testid":"android-app-ui-map-notification",children:[t(I,{appName:i,showOptions:E(n)}),t(Re,{notification:n,width:"100%",height:"570px"})]})}function Fe({notification:n,appName:i,appAndroidPackageName:a}){return e("div",{"data-testid":"android-app-ui-rate-notification",children:[t(I,{appName:i,title:n.title,showOptions:!1}),t(P,{url:`https://play.google.com/store/apps/details?id=${a}&hl=en`,platform:"Android",width:338,height:570})]})}v("");function Ve({notification:n,appName:i,appIcon:a}){var o;return t("div",{className:"notificare__push__android__alert__app-ui","data-testid":"android-app-ui-text-alert-notification",children:e("div",{className:"notificare__push__android__alert__app-ui__wrapper",children:[e("div",{className:"notificare__push__android__alert__app-ui__header",children:[t("div",{className:"notificare__push__android__alert__app-ui__app-icon",children:t("img",{className:"notificare__push__android__alert__app-ui__app-icon-image",alt:"App icon",src:a})}),t("p",{className:"notificare__push__android__alert__app-ui__title",children:n.title||i})]}),t("p",{className:"notificare__push__android__alert__app-ui__message",children:n.message}),E(n)&&e("div",{className:"notificare__push__android__alert__app-ui__actions",children:[null===(o=n.actions)||void 0===o?void 0:o.map(((e,n)=>t("p",{className:"notificare__push__android__alert__app-ui__action-label","data-testid":`android-app-ui-text-alert-notification-action-${n}`,children:e.label},n))),t("p",{className:"notificare__push__android__alert__app-ui__cancel-label",children:"Cancel"},"cancel-button-label")]})]})})}v(".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 Be(e,t){return b(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 Ue(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 Ke({notification:n,appName:i}){const o=n.content[0].data,[s,c]=a(""),{serviceKey:_}=N().options;return r((()=>{(()=>{b(this,void 0,void 0,(function*(){c(yield Be(_,o))}))})()}),[]),e("div",{"data-testid":"android-app-ui-url-notification",children:[t(I,{appName:i,title:n.title,showOptions:E(n)&&!Ue(s)}),t(P,{url:o,platform:"Android",width:338,height:570})]})}v("");v("");function We({videoData:e,width:n,height:i}){const a=()=>{switch(e.type){case"re.notifica.content.YouTube":return`https://www.youtube.com/embed/${e.data}`;case"re.notifica.content.Vimeo":return`https://player.vimeo.com/video/${e.data}`;case"re.notifica.content.HTML5Video":return e.data;default:return""}};return"re.notifica.content.YouTube"===e.type||"re.notifica.content.Vimeo"===e.type?t("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}):t("video",{className:"notificare__push__video-rich-content",width:n,height:i,autoPlay:!0,controls:!0,children:t("source",{src:a(),type:"video/mp4"})})}function Ge(n){const{notification:i,appName:a}=n;return e("div",{"data-testid":"android-app-ui-video-notification",children:[t(I,{appName:a,title:i.title,showOptions:E(i)}),t(We,{videoData:i.content[0],width:"100%",height:"570px"})]})}v(".notificare .notificare__push__video-rich-content {\n border: 0;\n background-color: #fff;\n}");function He(n){const{notification:i,appName:a}=n,o=i.content[0].data;return e("div",{"data-testid":"android-app-ui-web-view-notification",children:[t(I,{appName:a,title:i.title,showOptions:E(i)&&!Ue(o)}),t("iframe",{className:"notificare__push__android__web-view__app-ui__content",srcDoc:o,sandbox:"allow-same-origin"})]})}function qe({notification:n,application:i,mobileVariant:a}){const{googleMapsAPIKey:o}=N().options;return"re.notifica.notification.Map"!==n.type||o||"app-ui"!==a?t(T,{theme:Je(n.type,a),children:e("div",{className:"notificare__push__android__preview",children:[("lockscreen"===a||"lockscreen-expanded"===a)&&t(K,{notification:n,appName:i.name,appIcon:S(i.websitePushConfig.icon),expanded:"lockscreen-expanded"===a}),"app-ui"===a&&(()=>{switch(n.type){case"re.notifica.notification.Alert":return t(Ve,{notification:n,appName:i.name,appIcon:S(i.websitePushConfig.icon)});case"re.notifica.notification.WebView":return t(He,{notification:n,appName:i.name});case"re.notifica.notification.URL":return t(Ke,{notification:n,appName:i.name});case"re.notifica.notification.InAppBrowser":return t(U,{notification:n,appName:i.name});case"re.notifica.notification.Image":return t($,{notification:n,appName:i.name});case"re.notifica.notification.Map":return t($e,{notification:n,appName:i.name});case"re.notifica.notification.Rate":return t(Fe,{notification:n,appName:i.name,appAndroidPackageName:i.androidPackageName});case"re.notifica.notification.Passbook":return t(D,{notification:n,appName:i.name});case"re.notifica.notification.Video":return t(Ge,{notification:n,appName:i.name});case"re.notifica.notification.Store":return t(L,{notification:n,appName:i.name})}})()]})}):t(A,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1})}function Je(e,t){if("app-ui"!==t)return"light";return["re.notifica.notification.Alert"].includes(e)?"dark":"light"}v(".notificare .notificare__push__android__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 570px;\n background-color: #fff;\n}");v(".notificare .notificare__push__ios__preview {\n font-family: -apple-system, BlinkMacSystemFont, sans-serif;\n height: 100%;\n}");function Ye({children:n,theme:i}){return e("div",{className:"notificare__push__ios__phone-background "+("dark"===i?"notificare__push__ios__phone-background--dark":""),"data-testid":"ios-phone-background",children:[t("div",{className:"notificare__push__ios__phone-background-camera"}),t("div",{className:"notificare__push__ios__phone-background-content",children:n})]})}v(".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}");v("/* 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 Xe(e){const{rating:n}=e,i=[];for(let e=1;e<=5;e++)e<=n?i.push(t(Qe,{},e)):e-.5<=n?i.push(t(et,{},e)):i.push(t(tt,{},e));return t("div",{className:"notificare__push__ios__store__app-ui__star-rating",children:i})}v(".notificare .notificare__push__ios__store__app-ui__star-rating {\n display: inline-flex;\n flex-grow: 0;\n position: relative;\n}");const Qe=()=>t("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t("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"})}),et=()=>e("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:[t("defs",{children:e("linearGradient",{id:"halfGrad",children:[t("stop",{offset:"50%",stopColor:"#1e3050"}),t("stop",{offset:"50%",stopColor:"#ccc"})]})}),t("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"})]}),tt=()=>t("svg",{width:"10px",height:"10px",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",children:t("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 nt({notification:n}){const i=n.content[0],[o,s]=a(!1),[c,_]=a(),[l,d]=a(!1);return r((()=>{(()=>{b(this,void 0,void 0,(function*(){if(d(!0),"re.notifica.content.AppStore"===i.type&&"string"!=typeof i.data)try{const e=yield fetch(`https://itunes.apple.com/lookup?country=GB&id=${i.data.identifier}`),t=yield e.json();_(t),0===(null==c?void 0:c.resultCount)&&s(!0)}catch(e){s(!0)}else s(!0);d(!1)}))})()}),[i.data]),e("div",{"data-testid":"ios-app-ui-app-recommendation-notification",children:[t("div",{className:"notificare__push__ios__store__app-ui__bar",children:"Done"}),t("div",{className:"notificare__push__ios__store__app-ui",children:o?t(j,{}):l?t(O,{}):c&&e("div",{className:"notificare__push__ios__store__app-ui__page",children:[e("div",{className:"notificare__push__ios__store__app-ui__page-header",children:[t("img",{src:c.results[0].artworkUrl512,className:"notificare__push__ios__store__app-ui__app-icon",alt:"App icon"}),e("div",{className:"notificare__push__ios__store__app-ui__page-app-info",children:[e("div",{children:[t("p",{className:"notificare__push__ios__store__app-ui__page-app-name",children:c.results[0].trackName}),t("p",{className:"notificare__push__ios__store__app-ui__page-app-category",children:c.results[0].primaryGenreName})]}),t("div",{className:"notificare__push__ios__store__app-ui__page-install",children:"Install"})]})]}),t("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info-wrapper",children:e("div",{className:"notificare__push__ios__store__app-ui__page-other-app-info",children:[e("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[e("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:[at(c.results[0].userRatingCount)," RATINGS"]}),t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:c.results[0].averageUserRating.toFixed(1)}),t(Xe,{rating:c.results[0].averageUserRating})]}),e("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"AGE"}),t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-value",children:c.results[0].trackContentRating}),t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:"Years Old"})]}),e("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"CATEGORY"}),t("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:t("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"})}),t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:c.results[0].primaryGenreName})]}),e("div",{className:"notificare__push__ios__store__app-ui__page-info-block",children:[t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-title",children:"DEVELOPER"}),t("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:t("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"})}),t("p",{className:"notificare__push__ios__store__app-ui__page-info-block-bottom-text",children:c.results[0].sellerName})]})]})}),e("div",{className:"notificare__push__ios__store__app-ui__page-history",children:[t("p",{className:"notificare__push__ios__store__app-ui__page-history-title",children:"What's New"}),e("div",{className:"notificare__push__ios__store__app-ui__page-history-version-last-update",children:[e("p",{className:"notificare__push__ios__store__app-ui__page-history-version",children:["Version ",c.results[0].version]}),t("p",{className:"notificare__push__ios__store__app-ui__page-history-last-update",children:it(c.results[0].currentVersionReleaseDate)})]}),t("p",{className:"notificare__push__ios__store__app-ui__page-history-notes",children:c.results[0].releaseNotes})]}),e("div",{className:"notificare__push__ios__store__app-ui__page-previews",children:[t("p",{className:"notificare__push__ios__store__app-ui__page-previews-title",children:"Preview"}),e("div",{className:"notificare__push__ios__store__app-ui__page-previews-images",children:[t("img",{src:c.results[0].screenshotUrls[0],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"}),t("img",{src:c.results[0].screenshotUrls[1],className:"notificare__push__ios__store__app-ui__page-preview-image",alt:"App preview"})]})]})]})})]})}function it(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 at(e){return e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e.toString()}v("");function ot({appName:n,title:i,showOptions:a}){return e("div",{className:"notificare__push__ios__app-ui__title-bar",children:[t("div",{className:"notificare__push__ios__app-ui__title-bar-text",children:i||n}),a&&t("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:t("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 rt({notification:n,appName:i}){return e("div",{"data-testid":"ios-app-ui-passbook-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)}),t(P,{url:`https://push.notifica.re/pass/web/${n.content[0].data.split("/")[5]}`,platform:"Web",width:338,height:566})]})}v(".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 st({notification:n,appName:i}){return e("div",{"data-testid":"ios-app-ui-images-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)}),t("div",{className:"notificare__push__ios__image__app-ui__rich-content",children:t("div",{className:"notificare__push__ios__image__app-ui__slider",children:n.content.map(((e,n)=>t("img",{className:"notificare__push__ios__image__app-ui__slider-item",src:e.data,alt:"Slider image"},n)))})})]})}v(".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}");v("");function ct(i){const{url:a}=i;return e("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar",children:[t("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-done-button",children:" Done "}),e("div",{className:"notificare__push__ios__in-app-browser__app-ui__bar-domain",children:[V(a)?t(n,{children:t("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:t("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"})})}):t("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-not-secure",children:"Not Secure —"}),t("p",{className:"notificare__push__ios__in-app-browser__app-ui__bar-url",children:F(a)})]})]})}function _t({notification:n}){const i=n.content[0].data;return e("div",{"data-testid":"ios-app-ui-in-app-browser-notification",children:[t(ct,{url:i}),t(P,{url:i,platform:"iOS",width:338,height:564})]})}v(".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 lt(n){var i,a;const{notification:o,appName:r,appIcon:s,expanded:c}=n;return e("div",{className:"notificare__push__ios__lock-screen","data-testid":"ios-lock-screen-notification",children:[e("div",{className:"notificare__push__ios__lock-screen__main-content",children:[t("div",{className:"notificare__push__ios__lock-screen__app-icon",children:t("img",{className:"notificare__push__ios__lock-screen__app-icon-image",alt:"App icon",src:s})}),e("div",{className:"notificare__push__ios__lock-screen__text-content",children:[e("div",{className:"notificare__push__ios__lock-screen__title-and-time",children:[t("p",{className:"notificare__push__ios__lock-screen__text "+(c?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:o.title||r}),t("p",{className:"notificare__push__ios__lock-screen__text notificare__push__ios__lock-screen__text--time",children:"Now"})]}),o.subtitle&&t("p",{className:"notificare__push__ios__lock-screen__text "+(c?"notificare__push__ios__lock-screen__text--expanded-title-or-subtitle":"notificare__push__ios__lock-screen__text--title-or-subtitle"),children:o.subtitle}),e("div",{className:"notificare__push__ios__lock-screen__message-and-media",children:[t("p",{className:"notificare__push__ios__lock-screen__text "+(R(o)&&!c?"notificare__push__ios__lock-screen__text--message-with-media":"notificare__push__ios__lock-screen__text--message-without-media"),children:o.message}),R(o)&&!c&&t("img",{className:"notificare__push__ios__lock-screen__media-image",src:null===(i=o.attachments)||void 0===i?void 0:i[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-media"})]})]})]}),R(o)&&c&&t("img",{className:"notificare__push__ios__lock-screen__expanded-media",src:null===(a=o.attachments)||void 0===a?void 0:a[0].uri,alt:"Media icon","data-testid":"ios-lock-screen-notification-expanded-media"})]})}v(".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 dt({notification:n,appName:i}){return e("div",{"data-testid":"ios-app-ui-map-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)}),t(Re,{notification:n,width:"100%",height:"566px"})]})}v("");function pt({appName:n,title:i}){return t("div",{className:"notificare__push__ios__rate__app-ui","data-testid":"ios-app-ui-rate-notification",children:e("div",{className:"notificare__push__ios__rate__app-ui__wrapper",children:[t("p",{className:"notificare__push__ios__rate__app-ui__header",children:i||n}),t("div",{className:"notificare__push__ios__rate__app-ui__action",children:"Yes, I'll Rate Now"}),t("div",{className:"notificare__push__ios__rate__app-ui__action",children:"No, Thanks"})]})})}v(".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 ut({notification:n,appName:i}){var a,o;return t("div",{className:"notificare__push__ios__alert__app-ui","data-testid":"ios-app-ui-text-alert-notification",children:e("div",{className:"notificare__push__ios__alert__app-ui__background",children:[e("div",{className:"notificare__push__ios__alert__app-ui__title-and-message",children:[t("p",{className:"notificare__push__ios__alert__app-ui__title",children:n.title||i}),t("p",{className:"notificare__push__ios__alert__app-ui__message",children:n.message})]}),t("div",{className:"notificare__push__ios__alert__app-ui__actions",children:Z(n)?e("div",{className:"notificare__push__ios__alert__app-ui__actions-single",children:[t("div",{className:"notificare__push__ios__alert__app-ui__single-cancel",children:"Cancel"}),t("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===(a=n.actions)||void 0===a?void 0:a[0].label})]}):z(n)?e("div",{className:"notificare__push__ios__alert__app-ui__actions-multiple",children:[null===(o=n.actions)||void 0===o?void 0:o.map(((e,n)=>t("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:e.label},n))),t("div",{className:"notificare__push__ios__alert__app-ui__multiple-cancel",children:"Cancel"})]}):t("div",{className:"notificare__push__ios__alert__app-ui__no-actions",children:"OK"})})]})})}v(".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 ht({notification:n,appName:i}){const o=n.content[0].data,[s,c]=a(""),{serviceKey:_}=N().options;return r((()=>{(()=>{b(this,void 0,void 0,(function*(){c(yield Be(_,o))}))})()}),[]),e("div",{"data-testid":"ios-app-ui-url-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)&&!Ue(s)}),t(P,{url:o,platform:"iOS",width:338,height:566})]})}v("");function ft({notification:n,appName:i}){const a=n.content[0];return e("div",{"data-testid":"ios-app-ui-video-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)}),t(We,{videoData:a,width:"100%",height:"566px"})]})}v("");function mt({notification:n,appName:i}){const a=n.content[0].data;return e("div",{"data-testid":"ios-app-ui-web-view-notification",children:[t(ot,{appName:i,title:n.title,showOptions:E(n)&&!Ue(a)}),t("iframe",{className:"notificare__push__ios__web-view__app-ui__content",srcDoc:a,sandbox:"allow-same-origin"})]})}function gt({notification:n,application:i,mobileVariant:a}){const{googleMapsAPIKey:o}=N().options;return"re.notifica.notification.Map"!==n.type||o||"app-ui"!==a?t(Ye,{theme:bt(n.type,a),children:e("div",{className:"notificare__push__ios__preview",children:[("lockscreen"===a||"lockscreen-expanded"===a)&&t(lt,{notification:n,appName:i.name,appIcon:S(i.websitePushConfig.icon),expanded:"lockscreen-expanded"===a}),"app-ui"===a&&(()=>{switch(n.type){case"re.notifica.notification.Alert":return t(ut,{notification:n,appName:i.name});case"re.notifica.notification.WebView":return t(mt,{notification:n,appName:i.name});case"re.notifica.notification.URL":return t(ht,{notification:n,appName:i.name});case"re.notifica.notification.InAppBrowser":return t(_t,{notification:n});case"re.notifica.notification.Image":return t(st,{notification:n,appName:i.name});case"re.notifica.notification.Map":return t(dt,{notification:n,appName:i.name});case"re.notifica.notification.Rate":return t(pt,{title:n.title,appName:i.name});case"re.notifica.notification.Passbook":return t(rt,{notification:n,appName:i.name});case"re.notifica.notification.Video":return t(ft,{notification:n,appName:i.name});case"re.notifica.notification.Store":return t(nt,{notification:n})}})()]})}):t(A,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1})}function bt(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"}v(".notificare .notificare__push__ios__web-view__app-ui__content {\n border: 0;\n width: 100%;\n height: 566px;\n background-color: #fff;\n}");v("/* 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 vt(e){const{open:n,disabled:i,onToggle:a}=e;return t("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:t("svg",{className:"notificare__push__web__desktop__lock-screen__expand-button-svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",children:t("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 yt({notification:i,appName:s,appDomain:c}){var _,l,d;const[p,u]=a(!1),[h,f]=a(!1),[m,g]=a(-1),[b,v]=a(!1),[y,w]=a(!1),[x,k]=a(!1),[N,C]=a(!1),[S,T]=a(""),A=o(null),O=o(null);return r((()=>{if(A.current&&O.current){const e=O.current.scrollHeight;v(e>3*16.7);const t=`${A.current.scrollHeight}px`;A.current.style.height=t,T(t)}R(i)&&v(!0)}),[]),e("div",{ref:A,className:"notificare__push__web__desktop__lock-screen",onMouseEnter:()=>f((()=>!0)),onMouseLeave:()=>f((()=>y)),"data-testid":"web-desktop-notification",children:[(b&&h||p||x)&&t("div",{className:"notificare__push__web__desktop__lock-screen__expand-button-container",children:t(vt,{open:p,disabled:x||N,onToggle:()=>{const e=A.current,t=O.current;e&&t&&(p?(e.style.backgroundColor="#f4f4f4",e.style.height=S,k(!0),u(!1),setTimeout((()=>{k(!1),e.style.overflow=""}),300)):(e.style.backgroundColor="#fff",e.style.overflow="hidden",C(!0),u(!0),setTimeout((()=>{e.style.height=`${e.scrollHeight-t.clientHeight+t.scrollHeight}px`}),10),setTimeout((()=>{C(!1)}),300)),w(!1))}})}),!h&&!p&&!x&&t("div",{className:"notificare__push__web__desktop__lock-screen__time-container",children:t("p",{className:"notificare__push__web__desktop__lock-screen__time",children:" now "})}),e("div",{className:"notificare__push__web__desktop__lock-screen__main-content",children:[t("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon",children:t("div",{className:"notificare__push__web__desktop__lock-screen__browser-icon-background",children:t("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("div",{className:"notificare__push__web__desktop__lock-screen__text-content",children:[t("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--title",children:i.title||s}),t("p",{className:"notificare__push__web__desktop__lock-screen__text notificare__push__web__desktop__lock-screen__text--domain",children:wt(c)}),t("p",{ref:O,className:"notificare__push__web__desktop__lock-screen__text "+(p||x?"notificare__push__web__desktop__lock-screen__text--expandable-message":"notificare__push__web__desktop__lock-screen__text--message"),children:i.message})]}),R(i)&&!p&&!x&&!h&&t("img",{className:"notificare__push__web__desktop__lock-screen__small-media",src:null===(_=i.attachments)||void 0===_?void 0:_[0].uri,alt:"Small media icon"}),h&&!p&&!x&&t("div",{className:"notificare__push__web__desktop__lock-screen__settings-button-container",children:i.actions&&i.actions.length>0?e(n,{children:[e("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",onClick:()=>w((e=>!e)),"data-testid":"web-desktop-settings-button",children:["Options",t("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:t("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"})})]}),y&&e("div",{className:"notificare__push__web__desktop__lock-screen__settings-selector",children:[i.actions.map(((e,n)=>t("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option","data-testid":`web-desktop-options-action-${n}`,children:e.label},n))),t("button",{className:"notificare__push__web__desktop__lock-screen__settings-selector-option",children:"Settings"})]})]}):t("button",{className:"notificare__push__web__desktop__lock-screen__settings-button",children:"Settings"})})]}),(p||x)&&e("div",{className:"notificare__push__web__desktop__lock-screen__expanded-content",children:[R(i)&&t("img",{className:"notificare__push__web__desktop__lock-screen__expanded-media",src:null===(l=i.attachments)||void 0===l?void 0:l[0].uri,alt:"Expanded media"}),t("hr",{className:"notificare__push__web__desktop__lock-screen__expanded-divisor"}),null===(d=i.actions)||void 0===d?void 0:d.map(((n,i)=>e("div",{className:"notificare__push__web__desktop__lock-screen__action",children:[t("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>g(i),onMouseLeave:()=>g(-1),"data-testid":`web-desktop-expanded-action-${i}`,children:n.label}),t("hr",{className:`notificare__push__web__desktop__lock-screen__expanded-buttons-divisor ${(m===i||m-1===i)&&"notificare__push__web__desktop__lock-screen__expanded-buttons-divisor--transparent"}`})]},i))),t("button",{className:"notificare__push__web__desktop__lock-screen__expanded-button",onMouseEnter:()=>{var e;return g((null===(e=i.actions)||void 0===e?void 0:e.length)||-1)},onMouseLeave:()=>g(-1),children:"Settings"})]})]})}function wt(e){try{return new URL(e).hostname}catch(e){return""}}v(".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 xt,kt;function Nt({notification:n,appName:i,appIcon:a}){var o;if("re.notifica.notification.Alert"===n.type||"re.notifica.notification.Map"===n.type||"re.notifica.notification.WebView"===n.type||"re.notifica.notification.URL"===n.type||"re.notifica.notification.Video"===n.type||"re.notifica.notification.Image"===n.type)return t("div",{className:"notificare__web__phone__app-ui",children:e("div",{className:"notificare__web__phone__app-ui__background",children:[e("div",{className:"notificare__web__phone__app-ui__header",children:[t("img",{className:"notificare__web__phone__app-ui__app-icon",src:a,alt:"App icon"}),t("p",{className:"notificare__web__phone__app-ui__app-name",children:i}),t("button",{className:"notificare__web__phone__app-ui__close-button",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",className:"notificare__web__phone__app-ui__close-button-icon",children:t("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"===n.type&&e("div",{"data-testid":"web-mobile-app-ui-text-alert-notification",children:[R(n)&&t("img",{className:"notificare__web__phone__alert__app-ui__media",src:null===(o=n.attachments)||void 0===o?void 0:o[0].uri,alt:"Notification attachment"}),e("div",{children:[t("p",{className:"notificare__web__phone__alert__app-ui__title",children:n.title}),t("p",{className:"notificare__web__phone__alert__app-ui__subtitle",children:n.subtitle}),t("p",{className:"notificare__web__phone__alert__app-ui__message",children:n.message})]})]}),"re.notifica.notification.WebView"===n.type&&t("iframe",{className:"notificare__web__phone__web-view__app-ui__content",srcDoc:n.content[0].data,sandbox:"allow-same-origin","data-testid":"web-mobile-app-ui-web-view-notification"}),"re.notifica.notification.Map"===n.type&&t(Re,{notification:n,width:"100%",height:"400px"}),"re.notifica.notification.URL"==n.type&&t("div",{"data-testid":"web-mobile-app-ui-url-notification",children:t(P,{url:n.content[0].data,platform:"Web",width:268,height:430})}),"re.notifica.notification.Video"===n.type&&t("div",{"data-testid":"web-mobile-app-ui-video-notification",children:t(We,{videoData:n.content[0],width:"100%",height:"430px"})}),"re.notifica.notification.Image"===n.type&&t("div",{className:"notificare__web__phone__image__app-ui__image-slider","data-testid":"web-mobile-app-ui-image-notification",children:n.content.map(((e,n)=>t("img",{className:"notificare__web__phone__image__app-ui__image-slider-item",src:e.data,alt:"Slider image"},n)))}),n.actions&&t("div",{className:""+(n.actions.length>=3?"notificare__web__phone__app-ui__actions-column":"notificare__web__phone__app-ui__actions-row"),children:n.actions.map(((e,n)=>t("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:e.label},n)))})]})})}function Ct({notification:e,application:n,mobileVariant:i,webDevice:a,webMobileType:o,webDesktopOS:r}){const{googleMapsAPIKey:s}=N().options;if("desktop"===a&&"macOS"===r)return t(yt,{notification:e,appName:n.name,appDomain:n.websitePushConfig.allowedDomains[0]},e.message);if("phone"===a&&"app-ui"===i){if("re.notifica.notification.Alert"!==e.type&&"re.notifica.notification.Map"!==e.type&&"re.notifica.notification.WebView"!==e.type&&"re.notifica.notification.URL"!==e.type&&"re.notifica.notification.Video"!==e.type&&"re.notifica.notification.Image"!==e.type)return t(A,{message:`→ The preview for the notification type '${e.type}' does not exist in this variant`,showConsoleWarning:!1});if("re.notifica.notification.Map"===e.type&&!s)return t(A,{message:"→ A Google Maps API key should be provided",showConsoleWarning:!1});const i="android"===o?T:"iphone"===o?Ye:null;if(i)return t(i,{theme:St(e.type),children:t(Nt,{notification:e,appName:n.name,appIcon:S(n.websitePushConfig.icon)})})}}function St(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"}v("/* 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}(xt||(xt={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(kt||(kt={}));const Tt=xt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),At=e=>{switch(typeof e){case"undefined":return Tt.undefined;case"string":return Tt.string;case"number":return isNaN(e)?Tt.nan:Tt.number;case"boolean":return Tt.boolean;case"function":return Tt.function;case"bigint":return Tt.bigint;case"symbol":return Tt.symbol;case"object":return Array.isArray(e)?Tt.array:null===e?Tt.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?Tt.promise:"undefined"!=typeof Map&&e instanceof Map?Tt.map:"undefined"!=typeof Set&&e instanceof Set?Tt.set:"undefined"!=typeof Date&&e instanceof Date?Tt.date:Tt.object;default:return Tt.unknown}},Ot=xt.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 jt 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 jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,xt.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()}}jt.create=e=>new jt(e);const Pt=(e,t)=>{let n;switch(e.code){case Ot.invalid_type:n=e.received===Tt.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case Ot.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,xt.jsonStringifyReplacer)}`;break;case Ot.unrecognized_keys:n=`Unrecognized key(s) in object: ${xt.joinValues(e.keys,", ")}`;break;case Ot.invalid_union:n="Invalid input";break;case Ot.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${xt.joinValues(e.options)}`;break;case Ot.invalid_enum_value:n=`Invalid enum value. Expected ${xt.joinValues(e.options)}, received '${e.received}'`;break;case Ot.invalid_arguments:n="Invalid function arguments";break;case Ot.invalid_return_type:n="Invalid function return type";break;case Ot.invalid_date:n="Invalid date";break;case Ot.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}"`:xt.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case Ot.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 Ot.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 Ot.custom:n="Invalid input";break;case Ot.invalid_intersection_types:n="Intersection results could not be merged";break;case Ot.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ot.not_finite:n="Number must be finite";break;default:n=t.defaultError,xt.assertNever(e)}return{message:n}};let It=Pt;function Lt(){return It}const Mt=e=>{const{data:t,path:n,errorMaps:i,issueData:a}=e,o=[...n,...a.path||[]],r={...a,path:o};if(void 0!==a.message)return{...a,path:o,message:a.message};let s="";const c=i.filter((e=>!!e)).slice().reverse();for(const e of c)s=e(r,{data:t,defaultError:s}).message;return{...a,path:o,message:s}};function Et(e,t){const n=Lt(),i=Mt({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Pt?void 0:Pt].filter((e=>!!e))});e.common.issues.push(i)}class Zt{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 zt;"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 Zt.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 zt;if("aborted"===a.status)return zt;"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 zt=Object.freeze({status:"aborted"}),Rt=e=>({status:"dirty",value:e}),Dt=e=>({status:"valid",value:e}),$t=e=>"aborted"===e.status,Ft=e=>"dirty"===e.status,Vt=e=>"valid"===e.status,Bt=e=>"undefined"!=typeof Promise&&e instanceof Promise;function Ut(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 Kt(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 Wt,Gt,Ht;"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}(Wt||(Wt={}));class qt{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 Jt=(e,t)=>{if(Vt(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 jt(e.common.issues);return this._error=t,this._error}}};function Yt(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,r;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:a.defaultError}:void 0===a.data?{message:null!==(o=null!=s?s:i)&&void 0!==o?o:a.defaultError}:"invalid_type"!==t.code?{message:a.defaultError}:{message:null!==(r=null!=s?s:n)&&void 0!==r?r:a.defaultError}},description:a}}class Xt{get description(){return this._def.description}_getType(e){return At(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zt,ctx:{common:e.parent.common,data:e.data,parsedType:At(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Bt(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:At(e)},a=this._parseSync({data:e,path:i.path,parent:i});return Jt(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:At(e)};if(!this["~standard"].async)try{const t=this._parseSync({data:e,path:[],parent:i});return Vt(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=>Vt(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:At(e)},i=this._parse({data:e,path:n.path,parent:n}),a=await(Bt(i)?i:Promise.resolve(i));return Jt(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:Ot.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 Qn({schema:this,typeName:pi.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 ei.create(this,this._def)}nullable(){return ti.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Mn.create(this)}promise(){return Xn.create(this,this._def)}or(e){return zn.create([this,e],this._def)}and(e){return Fn.create(this,e,this._def)}transform(e){return new Qn({...Yt(this._def),schema:this,typeName:pi.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ni({...Yt(this._def),innerType:this,defaultValue:t,typeName:pi.ZodDefault})}brand(){return new ri({typeName:pi.ZodBranded,type:this,...Yt(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ii({...Yt(this._def),innerType:this,catchValue:t,typeName:pi.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return si.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Qt=/^c[^\s-]{8,}$/i,en=/^[0-9a-z]+$/,tn=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nn=/^[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,an=/^[a-z0-9_-]{21}$/i,on=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,rn=/^[-+]?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)?)??$/,sn=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let cn;const _n=/^(?:(?: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])$/,ln=/^(?:(?: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])$/,dn=/^(([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]))$/,pn=/^(([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])$/,un=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hn=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,fn="((\\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])))",mn=new RegExp(`^${fn}$`);function gn(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 bn(e){let t=`${fn}T${gn(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 vn(e,t){if(!on.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 yn(e,t){return!("v4"!==t&&t||!ln.test(e))||!("v6"!==t&&t||!pn.test(e))}class wn extends Xt{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==Tt.string){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.string,received:t.parsedType}),zt}const t=new Zt;let n;for(const o of this._def.checks)if("min"===o.kind)e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),Et(n,{code:Ot.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),Et(n,{code:Ot.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?Et(n,{code:Ot.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Et(n,{code:Ot.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),t.dirty())}else if("email"===o.kind)sn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"email",code:Ot.invalid_string,message:o.message}),t.dirty());else if("emoji"===o.kind)cn||(cn=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),cn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"emoji",code:Ot.invalid_string,message:o.message}),t.dirty());else if("uuid"===o.kind)nn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"uuid",code:Ot.invalid_string,message:o.message}),t.dirty());else if("nanoid"===o.kind)an.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"nanoid",code:Ot.invalid_string,message:o.message}),t.dirty());else if("cuid"===o.kind)Qt.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"cuid",code:Ot.invalid_string,message:o.message}),t.dirty());else if("cuid2"===o.kind)en.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"cuid2",code:Ot.invalid_string,message:o.message}),t.dirty());else if("ulid"===o.kind)tn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"ulid",code:Ot.invalid_string,message:o.message}),t.dirty());else if("url"===o.kind)try{new URL(e.data)}catch(i){n=this._getOrReturnCtx(e,n),Et(n,{validation:"url",code:Ot.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),Et(n,{validation:"regex",code:Ot.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),Et(n,{code:Ot.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),Et(n,{code:Ot.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),Et(n,{code:Ot.invalid_string,validation:{endsWith:o.value},message:o.message}),t.dirty());else if("datetime"===o.kind){bn(o).test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{code:Ot.invalid_string,validation:"datetime",message:o.message}),t.dirty())}else if("date"===o.kind){mn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{code:Ot.invalid_string,validation:"date",message:o.message}),t.dirty())}else if("time"===o.kind){new RegExp(`^${gn(o)}$`).test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{code:Ot.invalid_string,validation:"time",message:o.message}),t.dirty())}else"duration"===o.kind?rn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"duration",code:Ot.invalid_string,message:o.message}),t.dirty()):"ip"===o.kind?(i=e.data,("v4"!==(a=o.version)&&a||!_n.test(i))&&("v6"!==a&&a||!dn.test(i))&&(n=this._getOrReturnCtx(e,n),Et(n,{validation:"ip",code:Ot.invalid_string,message:o.message}),t.dirty())):"jwt"===o.kind?vn(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"jwt",code:Ot.invalid_string,message:o.message}),t.dirty()):"cidr"===o.kind?yn(e.data,o.version)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"cidr",code:Ot.invalid_string,message:o.message}),t.dirty()):"base64"===o.kind?un.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"base64",code:Ot.invalid_string,message:o.message}),t.dirty()):"base64url"===o.kind?hn.test(e.data)||(n=this._getOrReturnCtx(e,n),Et(n,{validation:"base64url",code:Ot.invalid_string,message:o.message}),t.dirty()):xt.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:Ot.invalid_string,...Wt.errToObj(n)})}_addCheck(e){return new wn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Wt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Wt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Wt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Wt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...Wt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Wt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Wt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Wt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...Wt.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...Wt.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...Wt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Wt.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...Wt.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,...Wt.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,...Wt.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...Wt.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...Wt.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...Wt.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...Wt.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...Wt.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...Wt.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...Wt.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...Wt.errToObj(t)})}nonempty(e){return this.min(1,Wt.errToObj(e))}trim(){return new wn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wn({...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 xn(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)}wn.create=e=>{var t;return new wn({checks:[],typeName:pi.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Yt(e)})};class kn extends Xt{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)!==Tt.number){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.number,received:t.parsedType}),zt}let t;const n=new Zt;for(const i of this._def.checks)if("int"===i.kind)xt.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Et(t,{code:Ot.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),Et(t,{code:Ot.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),Et(t,{code:Ot.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),n.dirty())}else"multipleOf"===i.kind?0!==xn(e.data,i.value)&&(t=this._getOrReturnCtx(e,t),Et(t,{code:Ot.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Et(t,{code:Ot.not_finite,message:i.message}),n.dirty()):xt.assertNever(i);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,Wt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Wt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Wt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Wt.toString(t))}setLimit(e,t,n,i){return new kn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Wt.toString(i)}]})}_addCheck(e){return new kn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Wt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Wt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Wt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Wt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Wt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Wt.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:Wt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Wt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Wt.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&&xt.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)}}kn.create=e=>new kn({checks:[],typeName:pi.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...Yt(e)});class Nn extends Xt{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)!==Tt.bigint)return this._getInvalidInput(e);let t;const n=new Zt;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),Et(t,{code:Ot.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),Et(t,{code:Ot.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),Et(t,{code:Ot.not_multiple_of,multipleOf:i.value,message:i.message}),n.dirty()):xt.assertNever(i);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.bigint,received:t.parsedType}),zt}gte(e,t){return this.setLimit("min",e,!0,Wt.toString(t))}gt(e,t){return this.setLimit("min",e,!1,Wt.toString(t))}lte(e,t){return this.setLimit("max",e,!0,Wt.toString(t))}lt(e,t){return this.setLimit("max",e,!1,Wt.toString(t))}setLimit(e,t,n,i){return new Nn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:Wt.toString(i)}]})}_addCheck(e){return new Nn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Wt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Wt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Wt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Wt.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:Wt.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}}Nn.create=e=>{var t;return new Nn({checks:[],typeName:pi.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...Yt(e)})};class Cn extends Xt{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==Tt.boolean){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.boolean,received:t.parsedType}),zt}return Dt(e.data)}}Cn.create=e=>new Cn({typeName:pi.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...Yt(e)});class Sn extends Xt{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==Tt.date){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.date,received:t.parsedType}),zt}if(isNaN(e.data.getTime())){return Et(this._getOrReturnCtx(e),{code:Ot.invalid_date}),zt}const t=new Zt;let n;for(const i of this._def.checks)"min"===i.kind?e.data.getTime()<i.value&&(n=this._getOrReturnCtx(e,n),Et(n,{code:Ot.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),Et(n,{code:Ot.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),t.dirty()):xt.assertNever(i);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Sn({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:Wt.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:Wt.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}}Sn.create=e=>new Sn({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:pi.ZodDate,...Yt(e)});class Tn extends Xt{_parse(e){if(this._getType(e)!==Tt.symbol){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.symbol,received:t.parsedType}),zt}return Dt(e.data)}}Tn.create=e=>new Tn({typeName:pi.ZodSymbol,...Yt(e)});class An extends Xt{_parse(e){if(this._getType(e)!==Tt.undefined){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.undefined,received:t.parsedType}),zt}return Dt(e.data)}}An.create=e=>new An({typeName:pi.ZodUndefined,...Yt(e)});class On extends Xt{_parse(e){if(this._getType(e)!==Tt.null){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.null,received:t.parsedType}),zt}return Dt(e.data)}}On.create=e=>new On({typeName:pi.ZodNull,...Yt(e)});class jn extends Xt{constructor(){super(...arguments),this._any=!0}_parse(e){return Dt(e.data)}}jn.create=e=>new jn({typeName:pi.ZodAny,...Yt(e)});class Pn extends Xt{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Dt(e.data)}}Pn.create=e=>new Pn({typeName:pi.ZodUnknown,...Yt(e)});class In extends Xt{_parse(e){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.never,received:t.parsedType}),zt}}In.create=e=>new In({typeName:pi.ZodNever,...Yt(e)});class Ln extends Xt{_parse(e){if(this._getType(e)!==Tt.undefined){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.void,received:t.parsedType}),zt}return Dt(e.data)}}Ln.create=e=>new Ln({typeName:pi.ZodVoid,...Yt(e)});class Mn extends Xt{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),i=this._def;if(t.parsedType!==Tt.array)return Et(t,{code:Ot.invalid_type,expected:Tt.array,received:t.parsedType}),zt;if(null!==i.exactLength){const e=t.data.length>i.exactLength.value,a=t.data.length<i.exactLength.value;(e||a)&&(Et(t,{code:e?Ot.too_big:Ot.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&&(Et(t,{code:Ot.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&&(Et(t,{code:Ot.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 qt(t,e,t.path,n))))).then((e=>Zt.mergeArray(n,e)));const a=[...t.data].map(((e,n)=>i.type._parseSync(new qt(t,e,t.path,n))));return Zt.mergeArray(n,a)}get element(){return this._def.type}min(e,t){return new Mn({...this._def,minLength:{value:e,message:Wt.toString(t)}})}max(e,t){return new Mn({...this._def,maxLength:{value:e,message:Wt.toString(t)}})}length(e,t){return new Mn({...this._def,exactLength:{value:e,message:Wt.toString(t)}})}nonempty(e){return this.min(1,e)}}function En(e){if(e instanceof Zn){const t={};for(const n in e.shape){const i=e.shape[n];t[n]=ei.create(En(i))}return new Zn({...e._def,shape:()=>t})}return e instanceof Mn?new Mn({...e._def,type:En(e.element)}):e instanceof ei?ei.create(En(e.unwrap())):e instanceof ti?ti.create(En(e.unwrap())):e instanceof Vn?Vn.create(e.items.map((e=>En(e)))):e}Mn.create=(e,t)=>new Mn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:pi.ZodArray,...Yt(t)});class Zn extends Xt{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=xt.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==Tt.object){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.object,received:t.parsedType}),zt}const{status:t,ctx:n}=this._processInputParams(e),{shape:i,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof In&&"strip"===this._def.unknownKeys))for(const e in n.data)a.includes(e)||o.push(e);const r=[];for(const e of a){const t=i[e],a=n.data[e];r.push({key:{status:"valid",value:e},value:t._parse(new qt(n,a,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof In){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of o)r.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(Et(n,{code:Ot.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];r.push({key:{status:"valid",value:t},value:e._parse(new qt(n,i,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then((async()=>{const e=[];for(const t of r){const n=await t.key,i=await t.value;e.push({key:n,value:i,alwaysSet:t.alwaysSet})}return e})).then((e=>Zt.mergeObjectSync(t,e))):Zt.mergeObjectSync(t,r)}get shape(){return this._def.shape()}strict(e){return Wt.errToObj,new Zn({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{var i,a,o,r;const s=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!==(r=Wt.errToObj(e).message)&&void 0!==r?r:s}:{message:s}}}:{}})}strip(){return new Zn({...this._def,unknownKeys:"strip"})}passthrough(){return new Zn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Zn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Zn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:pi.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new Zn({...this._def,catchall:e})}pick(e){const t={};return xt.objectKeys(e).forEach((n=>{e[n]&&this.shape[n]&&(t[n]=this.shape[n])})),new Zn({...this._def,shape:()=>t})}omit(e){const t={};return xt.objectKeys(this.shape).forEach((n=>{e[n]||(t[n]=this.shape[n])})),new Zn({...this._def,shape:()=>t})}deepPartial(){return En(this)}partial(e){const t={};return xt.objectKeys(this.shape).forEach((n=>{const i=this.shape[n];e&&!e[n]?t[n]=i:t[n]=i.optional()})),new Zn({...this._def,shape:()=>t})}required(e){const t={};return xt.objectKeys(this.shape).forEach((n=>{if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof ei;)e=e._def.innerType;t[n]=e}})),new Zn({...this._def,shape:()=>t})}keyof(){return qn(xt.objectKeys(this.shape))}}Zn.create=(e,t)=>new Zn({shape:()=>e,unknownKeys:"strip",catchall:In.create(),typeName:pi.ZodObject,...Yt(t)}),Zn.strictCreate=(e,t)=>new Zn({shape:()=>e,unknownKeys:"strict",catchall:In.create(),typeName:pi.ZodObject,...Yt(t)}),Zn.lazycreate=(e,t)=>new Zn({shape:e,unknownKeys:"strip",catchall:In.create(),typeName:pi.ZodObject,...Yt(t)});class zn extends Xt{_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 jt(e.ctx.common.issues)));return Et(t,{code:Ot.invalid_union,unionErrors:n}),zt}));{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 jt(e)));return Et(t,{code:Ot.invalid_union,unionErrors:a}),zt}}get options(){return this._def.options}}zn.create=(e,t)=>new zn({options:e,typeName:pi.ZodUnion,...Yt(t)});const Rn=e=>e instanceof Gn?Rn(e.schema):e instanceof Qn?Rn(e.innerType()):e instanceof Hn?[e.value]:e instanceof Jn?e.options:e instanceof Yn?xt.objectValues(e.enum):e instanceof ni?Rn(e._def.innerType):e instanceof An?[void 0]:e instanceof On?[null]:e instanceof ei?[void 0,...Rn(e.unwrap())]:e instanceof ti?[null,...Rn(e.unwrap())]:e instanceof ri||e instanceof ci?Rn(e.unwrap()):e instanceof ii?Rn(e._def.innerType):[];class Dn extends Xt{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Tt.object)return Et(t,{code:Ot.invalid_type,expected:Tt.object,received:t.parsedType}),zt;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}):(Et(t,{code:Ot.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),zt)}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=Rn(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 Dn({typeName:pi.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...Yt(n)})}}function $n(e,t){const n=At(e),i=At(t);if(e===t)return{valid:!0,data:e};if(n===Tt.object&&i===Tt.object){const n=xt.objectKeys(t),i=xt.objectKeys(e).filter((e=>-1!==n.indexOf(e))),a={...e,...t};for(const n of i){const i=$n(e[n],t[n]);if(!i.valid)return{valid:!1};a[n]=i.data}return{valid:!0,data:a}}if(n===Tt.array&&i===Tt.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let i=0;i<e.length;i++){const a=$n(e[i],t[i]);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===Tt.date&&i===Tt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Fn extends Xt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),i=(e,i)=>{if($t(e)||$t(i))return zt;const a=$n(e.value,i.value);return a.valid?((Ft(e)||Ft(i))&&t.dirty(),{status:t.value,value:a.data}):(Et(n,{code:Ot.invalid_intersection_types}),zt)};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}))}}Fn.create=(e,t,n)=>new Fn({left:e,right:t,typeName:pi.ZodIntersection,...Yt(n)});class Vn extends Xt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Tt.array)return Et(n,{code:Ot.invalid_type,expected:Tt.array,received:n.parsedType}),zt;if(n.data.length<this._def.items.length)return Et(n,{code:Ot.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),zt;!this._def.rest&&n.data.length>this._def.items.length&&(Et(n,{code:Ot.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 qt(n,e,n.path,t)):null})).filter((e=>!!e));return n.common.async?Promise.all(i).then((e=>Zt.mergeArray(t,e))):Zt.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new Vn({...this._def,rest:e})}}Vn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:e,typeName:pi.ZodTuple,rest:null,...Yt(t)})};class Bn extends Xt{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!==Tt.object)return Et(n,{code:Ot.invalid_type,expected:Tt.object,received:n.parsedType}),zt;const i=[],a=this._def.keyType,o=this._def.valueType;for(const e in n.data)i.push({key:a._parse(new qt(n,e,n.path,e)),value:o._parse(new qt(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Zt.mergeObjectAsync(t,i):Zt.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,n){return new Bn(t instanceof Xt?{keyType:e,valueType:t,typeName:pi.ZodRecord,...Yt(n)}:{keyType:wn.create(),valueType:e,typeName:pi.ZodRecord,...Yt(t)})}}class Un extends Xt{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!==Tt.map)return Et(n,{code:Ot.invalid_type,expected:Tt.map,received:n.parsedType}),zt;const i=this._def.keyType,a=this._def.valueType,o=[...n.data.entries()].map((([e,t],o)=>({key:i._parse(new qt(n,e,n.path,[o,"key"])),value:a._parse(new qt(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 zt;"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 zt;"dirty"!==i.status&&"dirty"!==a.status||t.dirty(),e.set(i.value,a.value)}return{status:t.value,value:e}}}}Un.create=(e,t,n)=>new Un({valueType:t,keyType:e,typeName:pi.ZodMap,...Yt(n)});class Kn extends Xt{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==Tt.set)return Et(n,{code:Ot.invalid_type,expected:Tt.set,received:n.parsedType}),zt;const i=this._def;null!==i.minSize&&n.data.size<i.minSize.value&&(Et(n,{code:Ot.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&&(Et(n,{code:Ot.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 zt;"dirty"===i.status&&t.dirty(),n.add(i.value)}return{status:t.value,value:n}}const r=[...n.data.values()].map(((e,t)=>a._parse(new qt(n,e,n.path,t))));return n.common.async?Promise.all(r).then((e=>o(e))):o(r)}min(e,t){return new Kn({...this._def,minSize:{value:e,message:Wt.toString(t)}})}max(e,t){return new Kn({...this._def,maxSize:{value:e,message:Wt.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Kn.create=(e,t)=>new Kn({valueType:e,minSize:null,maxSize:null,typeName:pi.ZodSet,...Yt(t)});class Wn extends Xt{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Tt.function)return Et(t,{code:Ot.invalid_type,expected:Tt.function,received:t.parsedType}),zt;function n(e,n){return Mt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Lt(),Pt].filter((e=>!!e)),issueData:{code:Ot.invalid_arguments,argumentsError:n}})}function i(e,n){return Mt({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Lt(),Pt].filter((e=>!!e)),issueData:{code:Ot.invalid_return_type,returnTypeError:n}})}const a={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof Xn){const e=this;return Dt((async function(...t){const r=new jt([]),s=await e._def.args.parseAsync(t,a).catch((e=>{throw r.addIssue(n(t,e)),r})),c=await Reflect.apply(o,this,s);return await e._def.returns._def.type.parseAsync(c,a).catch((e=>{throw r.addIssue(i(c,e)),r}))}))}{const e=this;return Dt((function(...t){const r=e._def.args.safeParse(t,a);if(!r.success)throw new jt([n(t,r.error)]);const s=Reflect.apply(o,this,r.data),c=e._def.returns.safeParse(s,a);if(!c.success)throw new jt([i(s,c.error)]);return c.data}))}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Wn({...this._def,args:Vn.create(e).rest(Pn.create())})}returns(e){return new Wn({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,n){return new Wn({args:e||Vn.create([]).rest(Pn.create()),returns:t||Pn.create(),typeName:pi.ZodFunction,...Yt(n)})}}class Gn extends Xt{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})}}Gn.create=(e,t)=>new Gn({getter:e,typeName:pi.ZodLazy,...Yt(t)});class Hn extends Xt{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Et(t,{received:t.data,code:Ot.invalid_literal,expected:this._def.value}),zt}return{status:"valid",value:e.data}}get value(){return this._def.value}}function qn(e,t){return new Jn({values:e,typeName:pi.ZodEnum,...Yt(t)})}Hn.create=(e,t)=>new Hn({value:e,typeName:pi.ZodLiteral,...Yt(t)});class Jn extends Xt{constructor(){super(...arguments),Gt.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return Et(t,{expected:xt.joinValues(n),received:t.parsedType,code:Ot.invalid_type}),zt}if(Ut(this,Gt)||Kt(this,Gt,new Set(this._def.values)),!Ut(this,Gt).has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return Et(t,{received:t.data,code:Ot.invalid_enum_value,options:n}),zt}return Dt(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 Jn.create(e,{...this._def,...t})}exclude(e,t=this._def){return Jn.create(this.options.filter((t=>!e.includes(t))),{...this._def,...t})}}Gt=new WeakMap,Jn.create=qn;class Yn extends Xt{constructor(){super(...arguments),Ht.set(this,void 0)}_parse(e){const t=xt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==Tt.string&&n.parsedType!==Tt.number){const e=xt.objectValues(t);return Et(n,{expected:xt.joinValues(e),received:n.parsedType,code:Ot.invalid_type}),zt}if(Ut(this,Ht)||Kt(this,Ht,new Set(xt.getValidEnumValues(this._def.values))),!Ut(this,Ht).has(e.data)){const e=xt.objectValues(t);return Et(n,{received:n.data,code:Ot.invalid_enum_value,options:e}),zt}return Dt(e.data)}get enum(){return this._def.values}}Ht=new WeakMap,Yn.create=(e,t)=>new Yn({values:e,typeName:pi.ZodNativeEnum,...Yt(t)});class Xn extends Xt{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==Tt.promise&&!1===t.common.async)return Et(t,{code:Ot.invalid_type,expected:Tt.promise,received:t.parsedType}),zt;const n=t.parsedType===Tt.promise?t.data:Promise.resolve(t.data);return Dt(n.then((e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap}))))}}Xn.create=(e,t)=>new Xn({type:e,typeName:pi.ZodPromise,...Yt(t)});class Qn extends Xt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===pi.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=>{Et(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 zt;const i=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===i.status?zt:"dirty"===i.status||"dirty"===t.value?Rt(i.value):i}));{if("aborted"===t.value)return zt;const i=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===i.status?zt:"dirty"===i.status||"dirty"===t.value?Rt(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?zt:("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?zt:("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(!Vt(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=>Vt(e)?Promise.resolve(i.transform(e.value,a)).then((e=>({status:t.value,value:e}))):e))}xt.assertNever(i)}}Qn.create=(e,t,n)=>new Qn({schema:e,typeName:pi.ZodEffects,effect:t,...Yt(n)}),Qn.createWithPreprocess=(e,t,n)=>new Qn({schema:t,effect:{type:"preprocess",transform:e},typeName:pi.ZodEffects,...Yt(n)});class ei extends Xt{_parse(e){return this._getType(e)===Tt.undefined?Dt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ei.create=(e,t)=>new ei({innerType:e,typeName:pi.ZodOptional,...Yt(t)});class ti extends Xt{_parse(e){return this._getType(e)===Tt.null?Dt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ti.create=(e,t)=>new ti({innerType:e,typeName:pi.ZodNullable,...Yt(t)});class ni extends Xt{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===Tt.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ni.create=(e,t)=>new ni({innerType:e,typeName:pi.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...Yt(t)});class ii extends Xt{_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 Bt(i)?i.then((e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new jt(n.common.issues)},input:n.data})}))):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new jt(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}ii.create=(e,t)=>new ii({innerType:e,typeName:pi.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...Yt(t)});class ai extends Xt{_parse(e){if(this._getType(e)!==Tt.nan){const t=this._getOrReturnCtx(e);return Et(t,{code:Ot.invalid_type,expected:Tt.nan,received:t.parsedType}),zt}return{status:"valid",value:e.data}}}ai.create=e=>new ai({typeName:pi.ZodNaN,...Yt(e)});const oi=Symbol("zod_brand");class ri extends Xt{_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 si extends Xt{_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?zt:"dirty"===e.status?(t.dirty(),Rt(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?zt:"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 si({in:e,out:t,typeName:pi.ZodPipeline})}}class ci extends Xt{_parse(e){const t=this._def.innerType._parse(e),n=e=>(Vt(e)&&(e.value=Object.freeze(e.value)),e);return Bt(t)?t.then((e=>n(e))):n(t)}unwrap(){return this._def.innerType}}function _i(e,t){const n="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof n?{message:n}:n}function li(e,t={},n){return e?jn.create().superRefine(((i,a)=>{var o,r;const s=e(i);if(s instanceof Promise)return s.then((e=>{var o,r;if(!e){const e=_i(t,i),s=null===(r=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===r||r;a.addIssue({code:"custom",...e,fatal:s})}}));if(!s){const e=_i(t,i),s=null===(r=null!==(o=e.fatal)&&void 0!==o?o:n)||void 0===r||r;a.addIssue({code:"custom",...e,fatal:s})}})):jn.create()}ci.create=(e,t)=>new ci({innerType:e,typeName:pi.ZodReadonly,...Yt(t)});const di={object:Zn.lazycreate};var pi;!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"}(pi||(pi={}));const ui=wn.create,hi=kn.create,fi=ai.create,mi=Nn.create,gi=Cn.create,bi=Sn.create,vi=Tn.create,yi=An.create,wi=On.create,xi=jn.create,ki=Pn.create,Ni=In.create,Ci=Ln.create,Si=Mn.create,Ti=Zn.create,Ai=Zn.strictCreate,Oi=zn.create,ji=Dn.create,Pi=Fn.create,Ii=Vn.create,Li=Bn.create,Mi=Un.create,Ei=Kn.create,Zi=Wn.create,zi=Gn.create,Ri=Hn.create,Di=Jn.create,$i=Yn.create,Fi=Xn.create,Vi=Qn.create,Bi=ei.create,Ui=ti.create,Ki=Qn.createWithPreprocess,Wi=si.create,Gi={string:e=>wn.create({...e,coerce:!0}),number:e=>kn.create({...e,coerce:!0}),boolean:e=>Cn.create({...e,coerce:!0}),bigint:e=>Nn.create({...e,coerce:!0}),date:e=>Sn.create({...e,coerce:!0})},Hi=zt;var qi=Object.freeze({__proto__:null,defaultErrorMap:Pt,setErrorMap:function(e){It=e},getErrorMap:Lt,makeIssue:Mt,EMPTY_PATH:[],addIssueToContext:Et,ParseStatus:Zt,INVALID:zt,DIRTY:Rt,OK:Dt,isAborted:$t,isDirty:Ft,isValid:Vt,isAsync:Bt,get util(){return xt},get objectUtil(){return kt},ZodParsedType:Tt,getParsedType:At,ZodType:Xt,datetimeRegex:bn,ZodString:wn,ZodNumber:kn,ZodBigInt:Nn,ZodBoolean:Cn,ZodDate:Sn,ZodSymbol:Tn,ZodUndefined:An,ZodNull:On,ZodAny:jn,ZodUnknown:Pn,ZodNever:In,ZodVoid:Ln,ZodArray:Mn,ZodObject:Zn,ZodUnion:zn,ZodDiscriminatedUnion:Dn,ZodIntersection:Fn,ZodTuple:Vn,ZodRecord:Bn,ZodMap:Un,ZodSet:Kn,ZodFunction:Wn,ZodLazy:Gn,ZodLiteral:Hn,ZodEnum:Jn,ZodNativeEnum:Yn,ZodPromise:Xn,ZodEffects:Qn,ZodTransformer:Qn,ZodOptional:ei,ZodNullable:ti,ZodDefault:ni,ZodCatch:ii,ZodNaN:ai,BRAND:oi,ZodBranded:ri,ZodPipeline:si,ZodReadonly:ci,custom:li,Schema:Xt,ZodSchema:Xt,late:di,get ZodFirstPartyTypeKind(){return pi},coerce:Gi,any:xi,array:Si,bigint:mi,boolean:gi,date:bi,discriminatedUnion:ji,effect:Vi,enum:Di,function:Zi,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>li((t=>t instanceof e),t),intersection:Pi,lazy:zi,literal:Ri,map:Mi,nan:fi,nativeEnum:$i,never:Ni,null:wi,nullable:Ui,number:hi,object:Ti,oboolean:()=>gi().optional(),onumber:()=>hi().optional(),optional:Bi,ostring:()=>ui().optional(),pipeline:Wi,preprocess:Ki,promise:Fi,record:Li,set:Ei,strictObject:Ai,string:ui,symbol:vi,transformer:Vi,tuple:Ii,undefined:yi,union:Oi,unknown:ki,void:Ci,NEVER:Hi,ZodIssueCode:Ot,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:jt});const Ji=qi.object({type:qi.string({message:"Action property 'type' should be a string"}),label:qi.string({message:"Action property 'label' should be a string"}),target:qi.string({message:"Action property 'target' should be a string"}).optional(),camera:qi.boolean({message:"Action property 'camera' should be a boolean"}).optional(),keyboard:qi.boolean({message:"Action property 'keyboard' should be a boolean"}).optional()}),Yi=qi.object({mimeType:qi.string({message:"Attachment property 'mimeType' should be a string"}),uri:qi.string({message:"Attachment property 'uri' should be a string"}).url("Attachment 'uri' property should be a valid URL")}),Xi=qi.object({type:qi.literal("re.notifica.notification.Alert"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),Qi=qi.object({type:qi.literal("re.notifica.notification.Image"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.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:qi.string({message:"Content objects data should be strings"}).url("Content objects data should be valid URLs")})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),ea=qi.object({type:qi.literal("re.notifica.notification.InAppBrowser"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.literal("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:qi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),ta=qi.object({type:qi.literal("re.notifica.notification.Map"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.literal("re.notifica.content.Marker",{message:"Content objects should be of type 're.notifica.content.Marker'"}),data:qi.object({title:qi.string({message:"Content object data property 'title' should be a string"}),description:qi.string({message:"Content object data property 'description' should be a string"}),latitude:qi.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:qi.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:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),na=qi.object({type:qi.literal("re.notifica.notification.Passbook"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.literal("re.notifica.content.PKPass",{message:"Content object should be of type 're.notifica.content.PKPass'"}),data:qi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),ia=qi.object({type:qi.literal("re.notifica.notification.Rate"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.string({message:"Content object type should be a string"}),data:qi.unknown()})).optional(),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),aa=qi.object({type:qi.literal("re.notifica.notification.Store"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.string({message:"Content object type should be a string"}),data:qi.union([qi.string().nonempty("Content object data is mandatory"),qi.object({identifier:qi.string({message:"Content object data property 'identifier' should be a string"}),campaignToken:qi.string({message:"Content object data property 'campaignToken' should be a string"}).optional(),affiliateToken:qi.string({message:"Content object data property 'affiliateToken' should be a string"}).optional(),providerToken:qi.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:qi.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:qi.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:qi.ZodIssueCode.custom,message:"GooglePlay and AppGallery content object data must be a string",path:["content",n,"data"]})}))})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),oa=qi.object({type:qi.literal("re.notifica.notification.URL"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.literal("re.notifica.content.URL",{message:"Content object should be of type 're.notifica.content.URL'"}),data:qi.string({message:"Content object data should be a string"}).url("Content object data should be a valid URL")})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),ra=qi.object({type:qi.literal("re.notifica.notification.Video"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Property 'message' is mandatory"),content:qi.array(qi.object({type:qi.string({message:"Content object type should be a string"}),data:qi.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:qi.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:qi.ZodIssueCode.custom,message:"For a HTML5Video, content object data should be a valid URL",path:["content",n,"data"]})}}))})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),sa=qi.object({type:qi.literal("re.notifica.notification.WebView"),title:qi.string({message:"Property 'title' should be a string"}).optional(),subtitle:qi.string({message:"Property 'subtitle' should be a string"}).optional(),message:qi.string({message:"Property 'message' should be a string"}).nonempty("Message is mandatory"),content:qi.array(qi.object({type:qi.literal("re.notifica.content.HTML",{message:"Content object should be of type 're.notifica.content.HTML'"}),data:qi.string({message:"Content data should be a string containing the HTML markup"})})),actions:qi.array(Ji).optional(),attachments:qi.array(Yi).optional()}),ca=qi.discriminatedUnion("type",[Xi,sa,oa,ea,Qi,ta,ia,na,ra,aa]),_a={name:"My App",androidPackageName:"com.example.app",websitePushConfig:{icon:"https://avatars.githubusercontent.com/u/1728060?s=200&v=4",allowedDomains:["https://my-app.com/"]}};function la({notification:i,applicationId:o,showControls:s=!0,variant:c="android-lockscreen",serviceKey:_,googleMapsAPIKey:l}){var d,p,u,h,f;const[m,g]=a();r((()=>{!function(){b(this,void 0,void 0,(function*(){if(o)try{const e=yield fetch(`https://push.notifica.re/application/${o}/info?apiKey=${_}`);if(e.ok){const{application:t}=yield e.json();g(t)}else{const{error:t}=yield e.json();console.error(`There was an error trying to get the application: ${t}`),g(_a)}}catch(e){console.error("Error fetching the application: ",e),g(_a)}else g(_a)}))}()}),[o,_]);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]=a(null===(d=v.get(c))||void 0===d?void 0:d.platform),[N,C]=a(null===(p=v.get(c))||void 0===p?void 0:p.mobileVariant),[S,T]=a(null===(u=v.get(c))||void 0===u?void 0:u.webDevice),[j,P]=a(null===(h=v.get(c))||void 0===h?void 0:h.webMobileType),[I,L]=a(null===(f=v.get(c))||void 0===f?void 0:f.webDesktopOS),M=ca.safeParse(i);return M.success||function(e){if(e.find((e=>"invalid_union_discriminator"===e.code&&e.path.includes("type")))){const e=ca.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"))}}(M.error.errors),t(k,{options:{serviceKey:_,googleMapsAPIKey:l},children:t("div",{className:"notificare",children:e("div",{className:"notificare__push__preview-wrapper",children:[s&&t(x,{platform:y,mobileVariant:N,webDevice:S,webMobileType:j,webDesktopOS:I,setPlatform:w,setMobileVariant:C,setWebDesktopOS:L,setWebDevice:T,setWebMobileType:P}),m?t("div",{className:"notificare__push__preview",children:M.success?e(n,{children:["android"===y&&t(qe,{notification:M.data,application:m,mobileVariant:N}),"ios"===y&&t(gt,{notification:M.data,application:m,mobileVariant:N}),"web"===y&&t(Ct,{notification:M.data,application:m,mobileVariant:N,webDevice:S,webMobileType:j,webDesktopOS:I})]}):t(A,{message:"→ Invalid Notification",showConsoleWarning:!0})}):t(O,{})]})})})}export{la as NotificareNotificationPreview};
2
+ //# sourceMappingURL=index.js.map