{"version":3,"file":"ViewState.DRFMBVRN.mjs","names":["useSyncExternalStore","__legacyOverrideHOC_DataObserverContext","_jsx"],"sources":["https:/framerusercontent.com/modules/H0iMSHzfE8JFVSuY4mPU/ZHnlFeYRZbhgeKNzVhZz/ViewState.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useSyncExternalStore}from\"react\";function subscribe(cb){window.addEventListener(\"popstate\",cb);window.addEventListener(\"pushstate\",cb);window.addEventListener(\"replacestate\",cb);return()=>{window.removeEventListener(\"popstate\",cb);window.removeEventListener(\"pushstate\",cb);window.removeEventListener(\"replacestate\",cb);};}function getSnapshot(){if(typeof window===\"undefined\")return\"default\";const params=new URLSearchParams(window.location.search);// priority if both exist\nif(params.has(\"form-confirmed\"))return\"form-confirmed\";if(params.has(\"show-video\"))return\"video\";return\"default\";}function getServerSnapshot(){return\"default\";}function useViewState(){return useSyncExternalStore(subscribe,getSnapshot,getServerSnapshot);}const _visibility=show=>({visible:show,style:{display:show?undefined:\"none\"}});export function Default(){const state=useViewState();return _visibility(state===\"default\");}export function Video(){const state=useViewState();return _visibility(state===\"video\");}export function FormConfirmed(){const state=useViewState();return _visibility(state===\"form-confirmed\");}import{useContext as __legacyOverrideHOC_useContext}from\"react\";import{DataObserverContext as __legacyOverrideHOC_DataObserverContext}from\"framer\";export function withDefault(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Default(props)});};}withDefault.displayName=\"Default\";export function withVideo(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...Video(props)});};}withVideo.displayName=\"Video\";export function withFormConfirmed(C){return props=>{__legacyOverrideHOC_useContext(__legacyOverrideHOC_DataObserverContext);return _jsx(C,{...props,...FormConfirmed(props)});};}withFormConfirmed.displayName=\"FormConfirmed\";\nexport const __FramerMetadata__ = {\"exports\":{\"withDefault\":{\"type\":\"reactHoc\",\"name\":\"withDefault\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withFormConfirmed\":{\"type\":\"reactHoc\",\"name\":\"withFormConfirmed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FormConfirmed\":{\"type\":\"override\",\"name\":\"FormConfirmed\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Default\":{\"type\":\"override\",\"name\":\"Default\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"Video\":{\"type\":\"override\",\"name\":\"Video\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"withVideo\":{\"type\":\"reactHoc\",\"name\":\"withVideo\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ViewState.map"],"mappings":"wLAAmF,SAAS,EAAU,EAAG,CAA2H,OAA1H,EAAO,iBAAiB,WAAW,EAAG,CAAC,EAAO,iBAAiB,YAAY,EAAG,CAAC,EAAO,iBAAiB,eAAe,EAAG,KAAW,CAAC,EAAO,oBAAoB,WAAW,EAAG,CAAC,EAAO,oBAAoB,YAAY,EAAG,CAAC,EAAO,oBAAoB,eAAe,EAAG,EAAI,SAAS,GAAa,CAAC,GAAU,IAAS,OAAY,MAAM,UAAU,IAAM,EAAO,IAAI,gBAAgB,EAAO,SAAS,OAAO,CAClZ,OAA9F,EAAO,IAAI,iBAAiB,CAAO,iBAAoB,EAAO,IAAI,aAAa,CAAO,QAAc,UAAW,SAAS,GAAmB,CAAC,MAAM,UAAW,SAAS,GAAc,CAAC,OAAOA,EAAqB,EAAU,EAAY,EAAkB,CAAiF,SAAgB,GAAS,CAA4B,OAAO,EAAtB,GAAc,GAA4B,UAAU,CAAE,SAAgB,GAAO,CAA4B,OAAO,EAAtB,GAAc,GAA4B,QAAQ,CAAE,SAAgB,GAAe,CAA4B,OAAO,EAAtB,GAAc,GAA4B,iBAAiB,CAAqJ,SAAgB,EAAY,EAAE,CAAC,MAAO,KAAQ,EAA+BC,EAAwC,CAAQC,EAAK,EAAE,CAAC,GA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