PageSourceSearch

https://www.hootboard.com/assets/index-Zz13HMKG.js

js hootboard.com collected 2026-09-24 08:55:21 UTC 716,600 bytes, 17 lines download raw bytes

1var Sy=Object.defineProperty;var by=(e,t,o)=>t in e?Sy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Ja=(e,t,o)=>(by(e,typeof t!="symbol"?t+"":t,o),o);import{d as Ey,g as mi,r as Ce,j as O,a as io,u as fi,f as wy,B as Iy}from"./react-vendor-AbT4BmHZ.js";import{g as S,h as Be,p as n,i as m,j,u as Cr,k as He,l as x,m as hi,n as R,s as Te,o as vy,q as Si,v as Cy,w as Ay,x as cn,y as Dy,z as Ty,P as Py}from"./redux-vendor-D6tsYLgP.js";import{m as Le}from"./analytics-D9fFn5Ey.js";import{_ as By}from"./filestack-CLcfot1_.js";import{P as bi}from"./tours-DNlFWm7f.js";import{a as xe,s as Sa,e as ba,au as un,c as Ar,av as pn,aw as yn,ax as Ze,ay as Pe,g as Ei,at as _e,az as Dr,D as te,aA as Ta,aB as gn,aC as ky,aD as Ly,b as wi,h as We,aE as It,aF as Fy,aG as Uy,as as mn,f as Ii,o as Ny}from"./date-utils-TpC3Vao7.js";import{C as Ry}from"./lucide-D97_elQA.js";import{l as Hy}from"./socket-CDWkPsom.js";import{f as xy}from"./immer-CgiGShya.js";import"./select-D_QHZO8r.js";import"./ui-vendor-CEz_DxgW.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function o(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(s){if(s.ep)return;s.ep=!0;const r=o(s);fetch(s.href,r)}})();const My="modulepreload",Oy=function(e){return"/"+e},fn={},Ue=function(t,o,a){let s=Promise.resolve();return o&&o.length>0&&(document.getElementsByTagName("link"),s=Promise.all(o.map(r=>{if(r=Oy(r),r in fn)return;fn[r]=!0;const i=r.endsWith(".css"),l=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${l}`))return;const d=document.createElement("link");if(d.rel=i?"stylesheet":My,i||(d.as="script",d.crossOrigin=""),d.href=r,document.head.appendChild(d),i)return new Promise((p,h)=>{d.addEventListener("load",p),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${r}`)))})}))),s.then(()=>t()).catch(r=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=r,window.dispatchEvent(i),!i.defaultPrevented)throw r})};let ta;const jy=new Uint8Array(16);function qy(){if(!ta&&(ta=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ta))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ta(jy)}const De=[];for(let e=0;e<256;++e)De.push((e+256).toString(16).slice(1));function _y(e,t=0){return(De[e[t+0]]+De[e[t+1]]+De[e[t+2]]+De[e[t+3]]+"-"+De[e[t+4]]+De[e[t+5]]+"-"+De[e[t+6]]+De[e[t+7]]+"-"+De[e[t+8]]+De[e[t+9]]+"-"+De[e[t+10]]+De[e[t+11]]+De[e[t+12]]+De[e[t+13]]+De[e[t+14]]+De[e[t+15]]).toLowerCase()}const $y=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),hn={randomUUID:$y};function Sn(e,t,o){if(hn.randomUUID&&!e)return hn.randomUUID();e=e||{};const a=e.random||(e.rng||qy)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,_y(a)}var yr={exports:{}};(function(e,t){var o=typeof self<"u"?self:Ey,a=function(){function r(){this.fetch=!1,this.DOMException=o.DOMException}return r.prototype=o,new r}();(function(r){(function(i){var l={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function d(b){return b&&DataView.prototype.isPrototypeOf(b)}if(l.arrayBuffer)var p=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(b){return b&&p.indexOf(Object.prototype.toString.call(b))>-1};function v(b){if(typeof b!="string"&&(b=String(b)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(b))throw new TypeError("Invalid character in header field name");return b.toLowerCase()}function A(b){return typeof b!="string"&&(b=String(b)),b}function w(b){var k={next:function(){var M=b.shift();return{done:M===void 0,value:M}}};return l.iterable&&(k[Symbol.iterator]=function(){return k}),k}function N(b){this.map={},b instanceof N?b.forEach(function(k,M){this.append(M,k)},this):Array.isArray(b)?b.forEach(function(k){this.append(k[0],k[1])},this):b&&Object.getOwnPropertyNames(b).forEach(function(k){this.append(k,b[k])},this)}N.prototype.append=function(b,k){b=v(b),k=A(k);var M=this.map[b];this.map[b]=M?M+", "+k:k},N.prototype.delete=function(b){delete this.map[v(b)]},N.prototype.get=function(b){return b=v(b),this.has(b)?this.map[b]:null},N.prototype.has=function(b){return this.map.hasOwnProperty(v(b))},N.prototype.set=function(b,k){this.map[v(b)]=A(k)},N.prototype.forEach=function(b,k){for(var M in this.map)this.map.hasOwnProperty(M)&&b.call(k,this.map[M],M,this)},N.prototype.keys=function(){var b=[];return this.forEach(function(k,M){b.push(M)}),w(b)},N.prototype.values=function(){var b=[];return this.forEach(function(k){b.push(k)}),w(b)},N.prototype.entries=function(){var b=[];return this.forEach(function(k,M){b.push([M,k])}),w(b)},l.iterable&&(N.prototype[Symbol.iterator]=N.prototype.entries);function H(b){if(b.bodyUsed)return Promise.reject(new TypeError("Already read"));b.bodyUsed=!0}function Q(b){return new Promise(function(k,M){b.onload=function(){k(b.result)},b.onerror=function(){M(b.error)}})}function Y(b){var k=new FileReader,M=Q(k);return k.readAsArrayBuffer(b),M}function E(b){var k=new FileReader,M=Q(k);return k.readAsText(b),M}function y(b){for(var k=new Uint8Array(b),M=new Array(k.length),oe=0;oe<k.length;oe++)M[oe]=String.fromCharCode(k[oe]);return M.join("")}function g(b){if(b.slice)return b.slice(0);var k=new Uint8Array(b.byteLength);return k.set(new Uint8Array(b)),k.buffer}function D(){return this.bodyUsed=!1,this._initBody=function(b){this._bodyInit=b,b?typeof b=="string"?this._bodyText=b:l.blob&&Blob.prototype.isPrototypeOf(b)?this._bodyBlob=b:l.formData&&FormData.prototype.isPrototypeOf(b)?this._bodyFormData=b:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(b)?this._bodyText=b.toString():l.arrayBuffer&&l.blob&&d(b)?(this._bodyArrayBuffer=g(b.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(b)||h(b))?this._bodyArrayBuffer=g(b):this._bodyText=b=Object.prototype.toString.call(b):this._bodyText="",this.headers.get("content-type")||(typeof b=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(b)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var b=H(this);if(b)return b;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?H(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(Y)}),this.text=function(){var b=H(this);if(b)return b;if(this._bodyBlob)return E(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(K)}),this.json=function(){return this.text().then(JSON.parse)},this}
1var F=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function J(b){var k=b.toUpperCase();return F.indexOf(k)>-1?k:b}function q(b,k){k=k||{};var M=k.body;if(b instanceof q){if(b.bodyUsed)throw new TypeError("Already read");this.url=b.url,this.credentials=b.credentials,k.headers||(this.headers=new N(b.headers)),this.method=b.method,this.mode=b.mode,this.signal=b.signal,!M&&b._bodyInit!=null&&(M=b._bodyInit,b.bodyUsed=!0)}else this.url=String(b);if(this.credentials=k.credentials||this.credentials||"same-origin",(k.headers||!this.headers)&&(this.headers=new N(k.headers)),this.method=J(k.method||this.method||"GET"),this.mode=k.mode||this.mode||null,this.signal=k.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&M)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(M)}q.prototype.clone=function(){return new q(this,{body:this._bodyInit})};function K(b){var k=new FormData;return b.trim().split("&").forEach(function(M){if(M){var oe=M.split("="),le=oe.shift().replace(/\+/g," "),X=oe.join("=").replace(/\+/g," ");k.append(decodeURIComponent(le),decodeURIComponent(X))}}),k}function he(b){var k=new N,M=b.replace(/\r?\n[\t ]+/g," ");return M.split(/\r?\n/).forEach(function(oe){var le=oe.split(":"),X=le.shift().trim();if(X){var Oe=le.join(":").trim();k.append(X,Oe)}}),k}D.call(q.prototype);function ge(b,k){k||(k={}),this.type="default",this.status=k.status===void 0?200:k.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in k?k.statusText:"OK",this.headers=new N(k.headers),this.url=k.url||"",this._initBody(b)}D.call(ge.prototype),ge.prototype.clone=function(){return new ge(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new N(this.headers),url:this.url})},ge.error=function(){var b=new ge(null,{status:0,statusText:""});return b.type="error",b};var Re=[301,302,303,307,308];ge.redirect=function(b,k){if(Re.indexOf(k)===-1)throw new RangeError("Invalid status code");return new ge(null,{status:k,headers:{location:b}})},i.DOMException=r.DOMException;try{new i.DOMException}catch{i.DOMException=function(k,M){this.message=k,this.name=M;var oe=Error(k);this.stack=oe.stack},i.DOMException.prototype=Object.create(Error.prototype),i.DOMException.prototype.constructor=i.DOMException}function we(b,k){return new Promise(function(M,oe){var le=new q(b,k);if(le.signal&&le.signal.aborted)return oe(new i.DOMException("Aborted","AbortError"));var X=new XMLHttpRequest;function Oe(){X.abort()}X.onload=function(){var Ie={status:X.status,statusText:X.statusText,headers:he(X.getAllResponseHeaders()||"")};Ie.url="responseURL"in X?X.responseURL:Ie.headers.get("X-Request-URL");var Dt="response"in X?X.response:X.responseText;M(new ge(Dt,Ie))},X.onerror=function(){oe(new TypeError("Network request failed"))},X.ontimeout=function(){oe(new TypeError("Network request failed"))},X.onabort=function(){oe(new i.DOMException("Aborted","AbortError"))},X.open(le.method,le.url,!0),le.credentials==="include"?X.withCredentials=!0:le.credentials==="omit"&&(X.withCredentials=!1),"responseType"in X&&l.blob&&(X.responseType="blob"),le.headers.forEach(function(Ie,Dt){X.setRequestHeader(Dt,Ie)}),le.signal&&(le.signal.addEventListener("abort",Oe),X.onreadystatechange=function(){X.readyState===4&&le.signal.removeEventListener("abort",Oe)}),X.send(typeof le._bodyInit>"u"?null:le._bodyInit)})}return we.polyfill=!0,r.fetch||(r.fetch=we,r.Headers=N,r.Request=q,r.Response=ge),i.Headers=N,i.Request=q,i.Response=ge,i.fetch=we,Object.defineProperty(i,"__esModule",{value:!0}),i})({})})(a),a.fetch.ponyfill=!0,delete a.fetch.polyfill;var s=a;t=s.fetch,t.default=s.fetch,t.fetch=s.fetch,t.Headers=s.Headers,t.Request=s.Request,t.Response=s.Response,e.exports=t})(yr,yr.exports);var Gy=yr.exports;const oa=mi(Gy);function zt(){return zt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(e[a]=o[a])}return e},zt.apply(this,arguments)}const aa={stage:"https://stageanalytics.hootboard.com/v1",prod:"https://analyticsapi.hootboard.com/v1"},sa=()=>{var e,t,o;if(typeof window<"u"&&(e=window)!=null&&e.document)return"browser";if(typeof process<"u"&&(t=process)!=null&&t.version)return"node";if(typeof navigator<"u"&&((o=navigator)==null?void 0:o.product)==="ReactNative")return"mobile";throw new Error("Platform not supported!")},Vy=()=>{let e,t=window.navigator.userAgent;return e=t.match(/chrome|chromium|crios/i)?"chrome":t.match(/firefox|fxios/i)?"firefox":t.match(/safari/i)?"safari":t.match(/opr\//i)?"o
1pera":t.match(/edg/i)?"edge":"No browser detection",e};function Jy(){const e=navigator.userAgent;return e.indexOf("Chrome")>-1?e.substring(e.indexOf("Chrome")+7).split(" ")[0]:e.indexOf("Firefox")>-1?e.substring(e.indexOf("Firefox")+8).split(" ")[0]:e.indexOf("Safari")>-1?e.substring(e.indexOf("Version")+8).split(" ")[0]:e.indexOf("MSIE")>-1||e.indexOf("Trident")>-1?e.substring(e.indexOf("MSIE")+5).split(";")[0]:"Unknown browser"}const zy=(e,t)=>{if(t.os==="iOS"||t.os==="Android")return t.os==="iOS"?"IOS Mobile App":"Android Mobile App";if(e.channel)return e.channel;throw new Error("channel property is compulsory")};class Wy{constructor(t={}){if(this.rnLibraries=void 0,this.instanceConfig=void 0,this.instanceConfig={},sa()=="mobile"){if(Object.keys(t).length!=3)throw new Error("AsyncStorage, ReactNative & DeviceInfo must be provided if platform is react-native!");this.rnLibraries=t}}async getSessionId(){let t=await this.configSwitchCaseHandler();const o=await this.reset();return t&&t.sessionId?t.sessionId:o}async getConfig(){return await this.configSwitchCaseHandler("get config platform not supported")}async saveConfig(t){const o=sa();switch(this.instanceConfig=zt({},t),o){case"browser":window.localStorage.setItem("hbAnalyticsConfig",JSON.stringify(this.instanceConfig));break;case"node":break;case"mobile":await this.saveConfigToAsyncStorage(this.instanceConfig);break;default:console.log("Save config fn default platform case")}}
1async init(t){let o=t.sessionId||await this.getSessionId();const a={key:t.key,env:t.env,sessionId:o,distinctId:o};await this.saveConfig(a)}async reset(){const t=Sn(),o=zt({},await this.getConfig(),{sessionId:t,distinctId:t});return await this.saveConfig(o),t}async getDistinctID(){const t=await this.getConfig();return t&&t.distinctId?t.distinctId:await this.reset()}async saveUser(t,o){const a=await this.getConfig();if(!a.sessionId||!a.distinctId)throw new Error("SDK not initialized");await(async({userId:s,userData:r,key:i,env:l})=>{const d=aa[l];try{const p=await oa(`${d}/save-user?key=${i}`,{method:"POST",body:JSON.stringify(zt({userId:s},r)),headers:{"Content-type":"application/json; charset=UTF-8"}});if(p.ok){const h=await p.json();if(h&&h.success)return{message:"user data set"};throw Error("response error false")}throw Error("API request failed error")}catch(p){throw Error(p)}})({userId:t,userData:o,key:a.key,env:a.env})}async track(t,o){const a=await this.getConfig();if(Object.keys(a).length===0)throw new Error("SDK not initialized");{const s=(({webVersion:i,rnLibraries:l})=>{switch(sa()){case"browser":return{os:window.navigator.platform,browser:Vy(),browserVersion:Jy(),currentUrl:window.location.href,screenHeight:window.innerHeight,screenWidth:window.innerWidth,webVersion:i};case"node":return{os:process.platform};case"mobile":try{const{Platform:d,PixelRatio:p,Dimensions:h}=l.ReactNative,v=l.DeviceInfo;return{os:d.OS=="android"?"Android":d.OS=="ios"?"iOS":"",osVersion:d.Version,screenDpi:160*p.get(),screenWidth:h.get("window").width,screenHeight:h.get("window").height,appVersionString:v.getVersion(),appBuildNumber:v.getBuildNumber()}}catch{throw new Error("get platform properties mobile case not supported")}break;default:throw new Error("get platform properties Platform not supported")}})({webVersion:o.webVersion,rnLibraries:this.rnLibraries}),r=zt({libVersion:"1.0.9",insertId:Sn(),distinctId:a.distinctId,sessionId:a.sessionId,time:Date.now()},s,o,{channel:zy(o,s)});await(async({event:i,properties:l,key:d,env:p})=>{try{const h=aa[p],v=await oa(`${h}/track?key=${d}`,{method:"POST",body:JSON.stringify({event:i,properties:l}),headers:{"Content-type":"application/json; charset=UTF-8"}});if(v.ok){const A=await v.json();if(A&&A.success)return{message:"track event successful"};throw Error("API error")}throw Error("API request failed error")}catch(h){throw Error(h)}})({event:t,properties:r,key:a.key,env:a.env})}}async identify(t,o){const a=await this.getConfig();if(Object.keys(a).length===0)throw new Error("SDK not initialized");if(!t)throw new Error("distinctId is required to identify");
1if(!o){const s=await this.getSessionId();this.saveConfig({key:a.key,env:a.env,sessionId:s,distinctId:t})}await(async({sessionId:s,distinctId:r,key:i,env:l})=>{const d=aa[l];try{const p=await oa(`${d}/identify?key=${i}`,{method:"POST",body:JSON.stringify({sessionId:s,distinctId:r}),headers:{"Content-type":"application/json; charset=UTF-8"}});if(p.ok){const h=await p.json();if(h&&h.success)return{message:"user identified"};throw Error("API error")}throw Error("API error")}catch(p){throw Error(p)}})({sessionId:o||a.sessionId,distinctId:t,key:a.key,env:a.env})}async segmentation(t){const o=await this.getConfig();if(Object.keys(o).length!==0)return await(async({segmentationParams:s,key:r,env:i})=>{const l=aa[i];try{const d=await oa(`${l}/segmentation?key=${r}`,{method:"POST",body:JSON.stringify(zt({},s)),headers:{"Content-type":"application/json; charset=UTF-8"}});if(d.ok){const p=await d.json();if(p&&p.success)return p.data;throw Error()}throw Error("API request failed error")}catch(d){throw Error(d)}})({segmentationParams:t,key:o.key,env:o.env});throw new Error("SDK not initialized")}async configSwitchCaseHandler(t){let o;switch(sa()){case"browser":o=this.getConfigFromLocalStorage();break;case"node":o=this.instanceConfig;break;case"mobile":o=await this.getConfigFromAsyncStorage();break;default:t&&(o=t)}return o}getConfigFromLocalStorage(){const t=window.localStorage.getItem("hbAnalyticsConfig");return t?JSON.parse(t):null}async getConfigFromAsyncStorage(){try{const t=await this.rnLibraries.AsyncStorage.getItem("hbAnalyticsConfig");return t?JSON.parse(t):null}catch(t){throw new Error(t)}}async saveConfigToAsyncStorage(t){try{await this.rnLibraries.AsyncStorage.setItem("hbAnalyticsConfig",JSON.stringify(t))}catch(o){throw new Error(o)}}}var Me={},Yy=e=>encodeURIComponent(e).replace(/[!'()*]/g,t=>`%${t.charCodeAt(0).toString(16).toUpperCase()}`),vi="%[a-f0-9]{2}",bn=new RegExp("("+vi+")|([^%]+?)","gi"),En=new RegExp("("+vi+")+","gi");function gr(e,t){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;t=t||1;var o=e.slice(0,t),a=e.slice(t);return Array.prototype.concat.call([],gr(o),gr(a))}function Ky(e){try{return decodeURIComponent(e)}catch{for(var t=e.match(bn)||[],o=1;o<t.length;o++)e=gr(t,o).join(""),t=e.match(bn)||[];return e}}function Qy(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},o=En.exec(e);o;){try{t[o[0]]=decodeURIComponent(o[0])}catch{var a=Ky(o[0]);a!==o[0]&&(t[o[0]]=a)}o=En.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),r=0;r<s.length;r++){var i=s[r];e=e.replace(new RegExp(i,"g"),t[i])}return e}var Zy=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Qy(e)}},Xy=(e,t)=>{if(!(typeof e=="string"&&typeof t=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(t==="")return[e];const o=e.indexOf(t);return o===-1?[e]:[e.slice(0,o),e.slice(o+t.length)]},eg=function(e,t){for(var o={},a=Object.keys(e),s=Array.isArray(t),r=0;r<a.length;r++){var i=a[r],l=e[i];(s?t.indexOf(i)!==-1:t(i,l,e))&&(o[i]=l)}return o};(function(e){const t=Yy,o=Zy,a=Xy,s=eg,r=E=>E==null,i=Symbol("encodeFragmentIdentifier");function l(E){switch(E.arrayFormat){case"index":return y=>(g,D)=>{const F=g.length;return D===void 0||E.skipNull&&D===null||E.skipEmptyString&&D===""?g:D===null?[...g,[h(y,E),"[",F,"]"].join("")]:[...g,[h(y,E),"[",h(F,E),"]=",h(D,E)].join("")]};case"bracket":return y=>(g,D)=>D===void 0||E.skipNull&&D===null||E.skipEmptyString&&D===""?g:D===null?[...g,[h(y,E),"[]"].join("")]:[...g,[h(y,E),"[]=",h(D,E)].join("")];case"colon-list-separator":return y=>(g,D)=>D===void 0||E.skipNull&&D===null||E.skipEmptyString&&D===""?g:D===null?[...g,[h(y,E),":list="].join("")]:[...g,[h(y,E),":list=",h(D,E)].join("")];case"comma":case"separator":case"bracket-separator":{const y=E.arrayFormat==="bracket-separator"?"[]=":"=";return g=>(D,F)=>F===void 0||E.skipNull&&F===null||E.skipEmptyString&&F===""?D:(F=F===null?"":F,D.length===0?[[h(g,E),y,h(F,E)].join("")]:[[D,h(F,E)].join(E.arrayFormatSeparator)])}default:return y=>(g,D)=>D===void 0||E.skipNull&&D===null||E.skipEmptyString&&D===""?g:D===null?[...g,h(y,E)]:[...g,[h(y,E),"=",h(D,E)].join("")]}}function d(E){let y;switch(E.arrayFormat){case"index":return(g,D,F)=>{if(y=/\[(\d*)\]$/.exec(g),g=g.replace(/\[\d*\]$/,""),!y){F[g]=D;return}F[g]===void 0&&(F[g]={}),F[g][y[1]]=D};case"bracket":return(g,D,F)=>{if(y=/(\[\])$/.exec(g),g=g.replace(/\[\]$/,""),!y){F[g]=D;return}if(F[g]===void 0){F[g]=[D];return}F[g]=[].concat(F[g],D)};case"colon-list-separator":return(g,D,F)=>{if(y=/(:list)$/.exec(g),g=g.replace(/:list$/,""),!y){F[g]=D;return}if(F[g]===void 0){F[g]=[D];return}F[g]=[].concat(F[g],D)};case"comma":case"separator":return(g,D,F)=>
1{const J=typeof D=="string"&&D.includes(E.arrayFormatSeparator),q=typeof D=="string"&&!J&&v(D,E).includes(E.arrayFormatSeparator);D=q?v(D,E):D;const K=J||q?D.split(E.arrayFormatSeparator).map(he=>v(he,E)):D===null?D:v(D,E);F[g]=K};case"bracket-separator":return(g,D,F)=>{const J=/(\[\])$/.test(g);if(g=g.replace(/\[\]$/,""),!J){F[g]=D&&v(D,E);return}const q=D===null?[]:D.split(E.arrayFormatSeparator).map(K=>v(K,E));if(F[g]===void 0){F[g]=q;return}F[g]=[].concat(F[g],q)};default:return(g,D,F)=>{if(F[g]===void 0){F[g]=D;return}F[g]=[].concat(F[g],D)}}}function p(E){if(typeof E!="string"||E.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function h(E,y){return y.encode?y.strict?t(E):encodeURIComponent(E):E}function v(E,y){return y.decode?o(E):E}function A(E){return Array.isArray(E)?E.sort():typeof E=="object"?A(Object.keys(E)).sort((y,g)=>Number(y)-Number(g)).map(y=>E[y]):E}function w(E){const y=E.indexOf("#");return y!==-1&&(E=E.slice(0,y)),E}function N(E){let y="";const g=E.indexOf("#");return g!==-1&&(y=E.slice(g)),y}function H(E){E=w(E);const y=E.indexOf("?");return y===-1?"":E.slice(y+1)}function Q(E,y){return y.parseNumbers&&!Number.isNaN(Number(E))&&typeof E=="string"&&E.trim()!==""?E=Number(E):y.parseBooleans&&E!==null&&(E.toLowerCase()==="true"||E.toLowerCase()==="false")&&(E=E.toLowerCase()==="true"),E}function Y(E,y){y=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},y),p(y.arrayFormatSeparator);const g=d(y),D=Object.create(null);if(typeof E!="string"||(E=E.trim().replace(/^[?#&]/,""),!E))return D;for(const F of E.split("&")){if(F==="")continue;let[J,q]=a(y.decode?F.replace(/\+/g," "):F,"=");q=q===void 0?null:["comma","separator","bracket-separator"].includes(y.arrayFormat)?q:v(q,y),g(v(J,y),q,D)}for(const F of Object.keys(D)){const J=D[F];if(typeof J=="object"&&J!==null)for(const q of Object.keys(J))J[q]=Q(J[q],y);else D[F]=Q(J,y)}return y.sort===!1?D:(y.sort===!0?Object.keys(D).sort():Object.keys(D).sort(y.sort)).reduce((F,J)=>{const q=D[J];return q&&typeof q=="object"&&!Array.isArray(q)?F[J]=A(q):F[J]=q,F},Object.create(null))}e.extract=H,e.parse=Y,e.stringify=(E,y)=>{if(!E)return"";y=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},y),p(y.arrayFormatSeparator);const g=q=>y.skipNull&&r(E[q])||y.skipEmptyString&&E[q]==="",D=l(y),F={};for(const q of Object.keys(E))g(q)||(F[q]=E[q]);const J=Object.keys(F);return y.sort!==!1&&J.sort(y.sort),J.map(q=>{const K=E[q];return K===void 0?"":K===null?h(q,y):Array.isArray(K)?K.length===0&&y.arrayFormat==="bracket-separator"?h(q,y)+"[]":K.reduce(D(q),[]).join("&"):h(q,y)+"="+h(K,y)}).filter(q=>q.length>0).join("&")},e.parseUrl=(E,y)=>{y=Object.assign({decode:!0},y);const[g,D]=a(E,"#");return Object.assign({url:g.split("?")[0]||"",query:Y(H(E),y)},y&&y.parseFragmentIdentifier&&D?{fragmentIdentifier:v(D,y)}:{})},e.stringifyUrl=(E,y)=>{y=Object.assign({encode:!0,strict:!0,[i]:!0},y);const g=w(E.url).split("?")[0]||"",D=e.extract(E.url),F=e.parse(D,{sort:!1}),J=Object.assign(F,E.query);let q=e.stringify(J,y);q&&(q=`?${q}`);let K=N(E.url);return E.fragmentIdentifier&&(K=`#${y[i]?h(E.fragmentIdentifier,y):E.fragmentIdentifier}`),`${g}${q}${K}`},e.pick=(E,y,g)=>{g=Object.assign({parseFragmentIdentifier:!0,[i]:!1},g);const{url:D,query:F,fragmentIdentifier:J}=e.parseUrl(E,g);return e.stringifyUrl({url:D,query:s(F,y),fragmentIdentifier:J},g)},e.exclude=(E,y,g)=>{const D=Array.isArray(y)?F=>!y.includes(F):(F,J)=>!y(F,J);return e.pick(E,D,g)}})(Me);const Fa=mi(Me),rt=(e="")=>e.replace(/[^\p{L}\p{N}\p{P}\p{Z}]/gu,""),mr=(e="",t="")=>e.replace(/[^a-z0-9_-\w\s]/g,t),Tr=(e="")=>e.replace(/[^a-z0-9!@&()+_-\w\s]/g,""),tg=(e="",t="")=>rt(e).replace(/[&\\#+$~%^*<>{}]/g,t),Ci=(e="")=>{e=e.toLowerCase();for(var t="àáãäâèéëêìíïîòóöôùúüûñç·/_,:;",o="aaaaaeeeeiiiioooouuuunc------",a=0,s=t.length;a<s;a++)e=e.replace(new RegExp(t.charAt(a),"g"),o.charAt(a));return e=e.replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-"),e},Ai={alphabetsFilter:e=>(e||"").replace(/[a-zA-Z](.*)/g,""),boardNameOnUrlFilter:e=>mr(e,"_").replace(/ /g,"_"),emojiFilter:rt,boardNameFilter:Tr,specialCharFilter:mr,specialCharsExceptFilter:tg,tagFilter:Ci};var u=(e=>(e.REQUEST="request",e.PENDING="pending",e.FULFILLED="fulfilled",e.REJECTED="rejected",e))(u||{}),f=(e=>(e.IDLE="idle",e.PENDING="pending",e.FULFILLED="fulfilled",e.REJECTED="rejected",e))(f||{}),Ye=(e=>(e.GET="GET",e.PUT="PUT",e.POST="POST",e.PATCH="PATCH",e.DELETE="DELETE",e))(Ye||{}),de=(e=>(e.EMAIL_ALREADY_EXISTS="Email already exists!",e.EMAIL_NOT_FOUND="Email not found!",e.EMAIL_NOT_VALIDATED="Your account isn't activated yet.",e.GENERIC="Something wrong happened! Please try again.",e.INVALID_CREDENTIALS="Invalid credentials!",e.INVALID_REQUEST="Invalid request!",e.INVALID_URL_OR_SHORTCODE="Invalid urlOrShortCode",e.METHOD_NOT_ALLOWED="Invalid request method!",e.NO_MORE_HOOT="That's it. No more hoots are available!",e.NO_NOTIFICATIONS="Current page has no notifications!",e.NOT_FOUND="Entry not found!",e.UNEXPECTED_ERROR="Unexpected server error!",e))(de||{});const Zt={colors:{"hoot-bgcolor-white":{background:"#ffffff",font:"black"},"hoot-bgcolor-grey":{background:"#cfd9df",font:"black"},"hoot-bgcolor-cyan":{background:"#56d5d8",font:"black"},"hoot-bgcolor-yellow":{background:"#ffda44",font:"black"},"hoot-bgcolor-brown":{background:"#e2c495",font:"black"},"hoot-bgcolor-pink":{background:"#fcb1dc",font:"black"},"hoot-bgcolor-violet":{background:"#6a5385",font:"white"},"hoot-bgcolor-darkblue":{background:"#34495e",font:"white"},"hoot-bgcolor-red":{background:"#fe5756",font:"white"},"hoot-bgcolor-green":{background:"#3bab52",font:"white"},"hoot-bgcolor-blue":{background:"#2584e5",font:"white"}},userColors:{"bgcolor-blue":{background:"#7fbef0",font:"white"},"bgcolor-red":{background:"#ff8076",font:"white"},"bgcolor-green":{background:"#a7d67d",font:"white"},"bgcolor-purple":{background:"#9380b7",font:"white"},"bgcolor-yellow":{background:"#fdc153",font:"white"},"bgcolor-pink":{background:"#eaa7cd",font:"white"},"bgcolor-nocolor":{background:"#a7a7a7",font:"white"}}},DL=e=>{const{customHootThemeColors:t,background:o,font:a,hootBgColor:s}=e||{},r=Zt.colors[s];return t?{background:t.background,font:t.isDark?"white":"black"}:s&&r?{background:r.background||"white",font:r.font||"black"}:{background:o||"white",font:a||"black"}},Di=e=>{let t,o,a;if(e.startsWith("rgb")){const l=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(!l)return!1;[t,o,a]=l.slice(1,4).map(Number)}else{const l=e.slice(1).replace(e.length<5?/./g:"","$&$&"),d=parseInt(l,16);t=d>>16,o=d>>8&255,a=d&255}const s=rg(t,o,a),r=ng(t,o,a);return s>200&&r<25?!1:s<55&&r<25||s<140&&r>40||o-t>40&&o>150&&s<160||t>100&&a>150&&o<130&&s<160?!0:Math.sqrt(.299*t*t+.587*o*o+.114*a*a)<=127.5},fr=e=>{const t=parseInt(e.slice(1,3),16),o=parseInt(e.slice(3,5),16),a=parseInt(e.slice(5,7),16),s=Math.min(t,o,a),r=Math.max(t,o,a),i=(.2126*t+.7152*o+.0722*a)/255,l=Math.round(i*100),d=Math.round((1-i)*100),p=r===0?0:(r-s)/r*100;return{lightness:l,darkness:d,saturation:p}},za=e=>{let t=e.toString(16);for(;t.length<6;)t=`0${t}`;return t},og=(e,t=.4)=>{const o=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16),r=Math.max(0,Math.floor(o-o*t)),i=Math.max(0,Math.floor(a-a*t)),l=Math.max(0,Math.floor(s-s*t));return`#${(r<<16|i<<8|l).toString(16).padStart(6,"0")}`},ag=(e,t=.2)=>{const o=parseInt(e.slice(1,3),16),a=parseInt(e.slice(3,5),16),s=parseInt(e.slice(5,7),16),r=Math.min(255,Math.floor(o+(255-o)*t)),i=Math.min(255,Math.floor(a+(255-a)*t)),l=Math.min(255,Math.floor(s+(255-s)*t));return`#${(r<<16|i<<8|l).toString(16).padStart(6,"0")}`},Ti="#6dba30",sg=e=>{const{button:t}=e||{};return t||Ti},TL=e=>{let t=sg(e);if(t.includes("rgb")){const v=t.replace(/[^\d,]/g,"").split(","),A=parseInt(v[0]),w=parseInt(v[1]),N=parseInt(v[2]),H=A.toString(16).padStart(2,"0"),Q=w.toString(16).padStart(2,"0"),Y=N.toString(16).padStart(2,"0");t="#"+H+Q+Y}const{darkness:o,lightness:a,saturation:s}=fr(t);s<30?t=Ti:a>73?t=og(t):o>73&&(t=ag(t));const r=parseInt(t.slice(1,3),16),i=parseInt(t.slice(3,5),16),l=parseInt(t.slice(5,7),16),d="#"+za(r<<16|i<<8|l),p="#"+za(i<<16|l<<8|r),h="#"+za(l<<16|r<<8|i);return[d,p,h]},PL=e=>{var v;if(!(e!=null&&e.width))return;const{width:t,height:o}=e,a=document.createElement("canvas");a.height=o,a.width=t;const s=(v=a.getContext)==null?void 0:v.call(a,"2d");if(s===null)return;s.drawImage(e,0,0);const r=s.getImageData(0,0,t,o),i=[];for(let A=0,w=r.data.length;A<w;A+=4)i.push([r.data[A],r.data[A+1],r.data[A+2]]);const l={};
1i.forEach(A=>{const w=A[0]+","+A[1]+","+A[2];l[w]?l[w]++:l[w]=1});const d=Object.keys(l).sort((A,w)=>l[w]-l[A]);return[d[0],d[Math.ceil(d.length/2)],d[d.length-1]].filter(A=>A!=null).map(A=>`#${A.split(",").map(H=>parseInt(H).toString(16).padStart(2,0)).join("")}`).sort((A,w)=>{const N=fr(A),H=fr(w);return N.lightness-H.lightness})},BL=(e,t,o)=>{const a=s=>{const r=s.toString(16);return r.length===1?`0${r}`:r};return`#${a(e)}${a(t)}${a(o)}`},rg=(e,t,o)=>(e*299+t*587+o*114)/1e3,ng=(e,t,o)=>{const a=Math.max(e,t,o),s=Math.min(e,t,o);return a===0?0:(a-s)/a*100},Je={name:(e,t=!0)=>{const o=(e||"").trim();let a=!1,s="";return o&&o.length>0?o.length>80&&(a=!0,s="Name should not be greater than 80 characters"):t&&(a=!0,s="Please enter a valid name"),{value:e,hasError:a,errorMessage:s}},orientation:(e,t=!0,o=!1)=>{const a=(e||"").trim();let s=!1,r="";const i=o?["landscape","portrait"]:["POR","LAN"];return a&&a.length>0?i.some(l=>l==a)||(s=!0,r="Please enter a valid orientation. It can be either portrait or landscape"):t&&(s=!0,r="Please enter a valid orientation"),{value:e,hasError:s,errorMessage:r}},boardName:(e,t=!0)=>{const o=(e||"").trim();let a=!1,s="";return o&&o.length>0?o.length>80&&(a=!0,s="Board name should not be greater than 80 characters"):t&&(a=!0,s="Please enter a valid name for your board"),{value:e,hasError:a,errorMessage:s}},description:(e,t=!0)=>{const o=(e||"").trim();let a=!1,s="";return o&&o.length>=10?o.length>250&&(a=!0,s="A brief description not greater than 250 characters is required"):t&&(a=!0,s="A brief description not less than 10 characters is required"),{value:e,hasError:a,errorMessage:s}},boardDescription:(e,t=!0)=>{const o=(e||"").trim();let a=!1,s="";return o&&o.length>=20?o.length>250&&(a=!0,s="A brief description of your board not greater than 250 characters is required"):t&&(a=!0,s="A brief description of your board not less than 20 characters is required"),{value:e,hasError:a,errorMessage:s}},phoneNumber:(e,t=!1)=>{const o=(e||"").trim().replace(/[\s()+\-.]|ext/gi,"");let a=!1,s="";return o?/^\d{7,}$/.test(o)||(a=!0,s="Invalid phone number!"):t&&(a=!0,s="Phone number is a required field!"),{value:e,hasError:a,errorMessage:s}},email:(e,t=!1)=>{const o=(e||"").trim();let a=!1,s="";if(o){const r=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,})+$/;o.match(r)||(a=!0,s="Invalid email address!")}else t&&(a=!0,s="Email is a required field!");return{value:e,hasError:a,errorMessage:s}},website:(e,t=!1)=>{const o=(e||"").trim();let a=!1,s="";if(o){const r=/^(https?:\/\/)?([\w\d-_]+)\.([\w\d-_.]+)\/?\??([^#\n\r]*)?#?([^\n\r]*)/gm;o.match(r)||(a=!0,s="Invalid website address!")}else t&&(a=!0,s="This is a required field!");return{value:e,hasError:a,errorMessage:s}},boardLogo:(e,t=!0)=>{const o=(e||"").trim();let a=!1,s="";return!o&&t&&(a=!0,s="Board logo is a required field!"),{value:e,hasError:a,errorMessage:s}},businessCategories:(e,t=!0)=>{let o=!1,a="";return e.length===0&&t&&(o=!0,a="At least one category is required!"),{value:e,hasError:o,errorMessage:a}},location:(e,t=!0)=>{let o=!1,a="";return!e&&t&&(o=!0,a="Location is required!"),{value:e,hasError:o,errorMessage:a}},addressLine:(e,t=!0)=>{let o=!1,a="";return!e&&t&&(o=!0,a="Address line should not be empty!"),{value:e,hasError:o,errorMessage:a}},hasErrors:e=>!Object.keys(e).some(o=>!!e[o]&&typeof e[o]=="boolean")},ig="prod",lg="a00f2ce9-e0d8-48d4-a87a-8ac9a2334195",dg="https://cga-kioskweb.hootboard.com",cg="https://atlasapi.hootboard.com",ug="ecdee4ad-4458-427d-ac95-2b327c5f126d",pg="GTM-WB4LSJD",yg="https://adspace.hootboard.com",gg="https://indigo.hootboard.com",mg="https://api.hootboard.com/api",fg="https://napi.hootboard.com/v3",hg="ZDJqcng5b3VtM3hy",Sg="https://api.hootboard.com/resources",bg="api.hootboard.com",Eg="https://cityguide.hootboard.com",wg="https://experiences.hootboard.com",Ig="http://hootboard.boards.s3.amazonaws.com/",vg="https://notifications.hootboard.com/send-message?key=697fddc3-5cc9-4e63-8420-5b64b0f2fdc8",Cg="https://notify.hootboard.com/api/notifications",Ag="https://notify.hootboard.com:8443/notification",Dg="Basic NTZiYzRkN2ZkY2M1YzdlYzY2YjYyZDQ3OTNhNzhjNzM6",Tg="https://analyticsapi.hootboard.com/api",Pg="$839873",Bg=436495,kg="https://www.hootboard.com/",Lg="https://rssfeedreader.hootboard.com/",Fg="752af24b3524d7dddc2a10b3f8238c2e",Ug="820275879727688",Ng="https://embed.hootboard.com/",Rg="https://share.hootboard.com/meta",Hg="https://notifications.hootboard.com/api/notifier/1190",xg="https://napi.hootboard.com/v3/boards/BOARD_ID/subscribe",Mg="acc-d71b6011-3f5a-4621-a7bd-8a7eb07d11bd",Og="pk_live_Y
1V1iN4JZWdLRyjiqTgX70ZeX",jg="b_XQEFmoS6G6LNat02pvOk1oCdL+2NrmIeT/dom7Nf+H0=",qg="AIzaSyCzYZWAiSDa4h851bgmXif9hWSXj3uPmOI",_g="15f8c574-0f04-4b99-96b7-e663349ab2cc",$g="https://analyticsapi.hootboard.com",Gg="j164pszq85",Vg="67aea118-6f58-452d-a53f-46f02283d07a",Jg="https://indigoreport.hootboard.com",zg="219873-9f14-7674-4972--520f6219873",Wg="https://notifications.hootboard.com/",Yg="eo_5ee1319f306909e7871a67d59e2ca5cd9dfacbf1914f11de50c95a5d02ae9e97",Kg="35c7acb4-817a-11ef-981e-33fa5e3e42ee",Qg="https://piper.hootboard.com/webhook",Zg="https://napi.hootboard.com",Xg="https://shared-services.tech-6a5.workers.dev/v1",em="https://swift.hootboard.com",tm="697fddc3-5cc9-4e63-8420-5b64b0f2fdc8",om="https://napi.hootboard.com/api/v5",am="https://socket.hootboard.com",sm=722363,G={SERVER_ENV:ig,STADIA_API_KEY:lg,CITYGUIDE_WEBKIOSK_URL:dg,ATLAS_API_ENDPOINT:cg,ONESIGNAL_APP_ID:ug,GTAG:pg,ADV_DSP_URL:yg,ADV_API:gg,API_URL:mg,API_URL_LATEST:fg,API_KEY:hg,API_ENDPOINT:Sg,DOMAIN:bg,CITYGUIDE_DOMAIN:Eg,EXPERIENCE_DOMAIN:wg,S3_IMAGE_DOMAIN:Ig,SEND_MESSAGE_ENDPOINT:vg,NOTIFICATIONS_ENDPOINT:Cg,NOTIFICATIONS_WEBSOCKET_ENDPOINT:Ag,MIXPANEL_BASIC_AUTHORIZATION:Dg,HOOTBOARD_ANALYTICS_ENDPOINT:Tg,ANALYTICS_EU_USAGE_GROUP:Pg,MIXPANEL_PROJECT_ID:Bg,ROOT_URL:kg,RSS_FEED_READER_URL:Lg,MIXPANEL_KEY:Fg,FACEBOOK_APPID:Ug,EMBED_URL:Ng,SHARE_ITEM_URL:Rg,SHARE_VIA_EMAIL_ENDPOINT:Hg,SUBSCRIBE_API_ENDPOINT:xg,API_ACCESS_KEY:Mg,STRIPE_KEY:Og,BEAMER_API_KEY:jg,GOOGLE_API:qg,ANALYTICS_SDK_KEY:_g,ANALYTICS_API_URL:$g,CLARITY_ID:Gg,ZENDESK_ID:Vg,ADV_ANALYTICS_API:Jg,ADV_ANALYTICS_API_KEY:zg,NOTIFICATIONS_API_URL:Wg,EMAIL_OCTOPUS_API_KEY:Yg,EMAIL_OCTOPUS_LIST_ID:Kg,N8N_WEBHOOK_URL:Qg,NAPI_ENDPOINT:Zg,SHARED_APIS:Xg,STRIPE_PILOT_API:em,NOTIFICATIONS_ACCESS_KEY:tm,API_V5_URL:om,SOCKET_API_URL:am,ADSPACE_BOARD_ID:sm},rm={maxWidth:4e3,maxHeight:3e3},oo=400,Pi=512,nm=8*1024*1024,Bi=8*1024*1024,ki=15*1024*1024,im=10,hr={background:"#e6e6e6",button:"#80b948",font:"#5073a9",colorPalette:"def"},I={IDLE:"idle",REQUEST:"request",PENDING:"pending",REJECTED:"rejected",FULFILLED:"fulfilled"},Ct={webMobile:["Web Desktop","Android Mobile App","IOS Mobile App","Web Mobile"],touchKiosk:["HootBoard Touch Kiosk"],others:["Notifications"]},lm=["Is this done?","Is it over?","Done with this?","Did this end?","Did you join?"],dm=["Web Mobile","Web Desktop","Android Mobile App","IOS Mobile App","Kiosk","Notifications"].join(),cm=[".jpg",".jpeg",".png",".gif"],Pr="https://scraper.hootboard.com",Do="AEDuIZLBRR4mpta8P7ZHjz",um="https://mixpanel.com/api/2.0",pm="https://mixpanel.com/api/2.0/segmentation",ym="1034605854789-d8v8rvhb44be85haqoj19n7cu5r82iff.apps.googleusercontent.com",Li="1.0.0",Fi="13.8.5",Br="https://tr.hootboard.com",Ui="key_790a6210-9a6c-43aa-a456-040da7af18cf",Ni="gck_8c1560bd-9390-46d8-b687-e0d9d2d0f163",gm="https://d2oqhl3js3c5ij.cloudfront.net/255063/hoots/htmlhoots/hootfiles/images/52188I-akqdil.png",Ua=G.SERVER_ENV,mm=G.ONESIGNAL_APP_ID,fm=G.GTAG,Ri=G.ADV_DSP_URL,To=G.ADV_API,Hi=G.API_URL,ce=G.API_URL_LATEST,hm=G.API_KEY,Sm=G.API_ENDPOINT,bm=G.DOMAIN,xi=G.CITYGUIDE_DOMAIN,Em=G.ATLAS_ADMIN_DOMAIN,wm=G.ATLAS_API_ENDPOINT,Im=G.CITYGUIDE_WEBKIOSK_URL,Mi=G.EXPERIENCE_DOMAIN,vm=G.S3_IMAGE_DOMAIN,Oi=G.SEND_MESSAGE_ENDPOINT,kr=G.NOTIFICATIONS_ENDPOINT,ji=G.NOTIFICATIONS_WEBSOCKET_ENDPOINT,Cm=G.MIXPANEL_BASIC_AUTHORIZATION,lo=G.ANALYTICS_EU_USAGE_GROUP,qi=G.HOOTBOARD_ANALYTICS_ENDPOINT,Am=G.MIXPANEL_PROJECT_ID,Lr=G.ROOT_URL,Dm=G.RSS_FEED_READER_URL,_i=G.MIXPANEL_KEY,Tm=G.FACEBOOK_APPID,$i=G.EMBED_URL,Gi=G.SHARE_ITEM_URL,Vi=G.SHARE_VIA_EMAIL_ENDPOINT,Pm=G.SUBSCRIBE_API_ENDPOINT,Bm=G.API_ACCESS_KEY,Ji=G.BEAMER_API_KEY,km=G.STRIPE_KEY,Lm=G.GOOGLE_API,Na=G.ANALYTICS_SDK_KEY,Fr=G.ANALYTICS_API_URL,Fm=G.CLARITY_ID,Um=G.ZENDESK_ID,Nm=G.ADV_ANALYTICS_API,Rm=G.ADV_ANALYTICS_API_KEY,zi=G.NOTIFICATIONS_API_URL,Wi=G.EMAIL_OCTOPUS_API_KEY,Yi=G.EMAIL_OCTOPUS_LIST_ID,Ki=G.N8N_WEBHOOK_URL,Ot=G.NAPI_ENDPOINT,Qi=G.SHARED_APIS,Po=G.STRIPE_PILOT_API,At=G.API_V5_URL,Hm=G.NOTIFICATIONS_ACCESS_KEY,Zi=G.SOCKET_API_URL,Xi=({longitude:e,latitude:t,width:o=400,height:a=400,zoomLevel:s=16})=>`https://api.mapbox.com/styles/v1/mapbox/streets-v12/static/pin-l-embassy+f74e4e(${e},${t})/${e},${t},${s}/${o}x${a}/?access_token=pk.eyJ1Ijoic25haXJoYiIsImEiOiJja2RraGFlMmIwb2prMnBvaHJvY2xsMmkzIn0.zpA777bWdLuQ-ojtL4_3ww`,xm={NEWEST_FIRST:"hootAddDateTime:desc",OLDEST_FIRST:"hootAddDateTime:asc",ALPHABETICAL_ASC:"hootTitle:asc",ALPHABETICAL_DESC:"hootTitle:desc",UPCOMING_EVENTS:"eventStartDateTime:asc"},Mm={NEWEST_FIRST:"newest",OLDEST_FIRST:"oldest",ALPHABETICAL_ASC:"alpha",ALPHABETICAL_DESC:"alph
1a_rev",UPCOMING_EVENTS:"upcoming"},Om={"hb-adspace-dashboard":"HootBoard AdSpace"},el=G.ADSPACE_BOARD_ID,tl={"hb-adspace-dashboard":el},jm=Object.freeze(Object.defineProperty({__proto__:null,ACCEPTED_IMAGE_TYPES:cm,ACTION_STATES:I,ADMIN_SORT_OPTIONS:Mm,ADSPACE_BOARD_ID:el,ADV_ANALYTICS_API:Nm,ADV_ANALYTICS_API_KEY:Rm,ADV_API:To,ADV_DSP_URL:Ri,ALL_ANALYTICS_CHANNELS:dm,ANALYTICS_API_URL:Fr,ANALYTICS_EU_USAGE_GROUP:lo,ANALYTICS_SDK_KEY:Na,API_ACCESS_KEY:Bm,API_ENDPOINT:Sm,API_KEY:hm,API_URL:Hi,API_URL_LATEST:ce,API_V5_URL:At,APP_ICON_SIZE:oo,ATLAS_ADMIN_DOMAIN:Em,ATLAS_API_ENDPOINT:wm,BEAMER_API_KEY:Ji,BOARD_LOGO_SIZE:Pi,CITYGUIDE_DOMAIN:xi,CITYGUIDE_WEBKIOSK_URL:Im,CLARITY_ID:Fm,DEFAULT_COLOR_PALETTE:hr,DOMAIN:bm,DOODLE_IMG_URL:gm,EMAIL_OCTOPUS_API_KEY:Wi,EMAIL_OCTOPUS_LIST_ID:Yi,EMBED_URL:$i,ENGAGEMENT_CHANNELS:Ct,EXPERIENCE_DOMAIN:Mi,FACEBOOK_APPID:Tm,FILESTACK_KEY:Do,GOOGLE_API:Lm,GOOGLE_CLIENT_ID:ym,GTAG:fm,HOOTBOARD_ANALYTICS_ENDPOINT:qi,IMAGE_SIZES:rm,MAP_BOX:Xi,MAX_BOARD_BACKGROUND_SIZE_LIMIT:ki,MAX_BOARD_LOGO_SIZE_LIMIT:Bi,MAX_COVER_IMAGES:im,MAX_UPLOAD_HOOT_IMAGE_SIZE_LIMIT:nm,MIXPANEL_API_ENDPOINT:um,MIXPANEL_BASIC_AUTHORIZATION:Cm,MIXPANEL_KEY:_i,MIXPANEL_PROJECT_ID:Am,MIXPANEL_SEGMENTATION_ENDPOINT:pm,N8N_WEBHOOK_URL:Ki,NAPI_ENDPOINT:Ot,NOTIFICATIONS_ACCESS_KEY:Hm,NOTIFICATIONS_API_URL:zi,NOTIFICATIONS_ENDPOINT:kr,NOTIFICATIONS_WEBSOCKET_ENDPOINT:ji,NOTIFICATION_VERSION:Li,ONESIGNAL_APP_ID:mm,RANDOM_TIMELINE_QUESTIONS_AFTER_EVENT:lm,ROOT_URL:Lr,RSS_FEED_READER_URL:Dm,S3_IMAGE_DOMAIN:vm,SCRAPPER_URL:Pr,SEND_MESSAGE_ENDPOINT:Oi,SERVER_ENV:Ua,SERVICE_FOLLOW_BOARDS:tl,SERVICE_LABELS:Om,SHARED_APIS:Qi,SHARE_ITEM_URL:Gi,SHARE_VIA_EMAIL_ENDPOINT:Vi,SHOPIFY_API_KEY:Ni,SOCKET_API_URL:Zi,SORT_OPTIONS:xm,STRIPE_KEY:km,STRIPE_PILOT_API:Po,SUBSCRIBE_API_ENDPOINT:Pm,URL_SHORTENER_API_KEY:Ui,URL_SHORTENER_URL:Br,WEB_VERSION:Fi,ZENDESK_ID:Um},Symbol.toStringTag,{value:"Module"}));let Jt=null;const qm=e=>{Jt=e},_m=e=>{if(!Jt)return!0;const t=Jt.store.getState(),{accountsById:o}=t.accounts,{activeAccountId:a}=t.activeAccount,s=Object.values(o).find(i=>i.authToken===e);return Object.values(o).filter(i=>i.authToken!==e&&i.partyId!==(s==null?void 0:s.partyId)).length>0?(s&&Jt.store.dispatch(Jt.removeAccountById(s.partyId)),((s==null?void 0:s.partyId)===a||e===localStorage.getItem("authToken"))&&Jt.store.dispatch(Jt.showAccountSwitcher("401")),!1):!0},ol=()=>{let e=null;try{const t=JSON.parse(localStorage.getItem("redux")||"null");t!=null&&t.accounts&&(e=JSON.stringify({accounts:t.accounts}))}catch{}localStorage.clear(),e&&localStorage.setItem("redux",e),document.cookie.split(";").forEach(t=>{const o=t.indexOf("="),a=o>-1?t.substr(0,o):t;document.cookie=`${a.trim()}=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/;`})},kL=()=>{ol(),localStorage.setItem("sessionError","true"),window.location.href="/"},ue={BOARD_ID_HEADER:"x-board-id"},al=e=>{let t=!0;try{t=_m(e)}catch{}t?(window.clearSession(),localStorage.setItem("sessionError",!0),window.location.href=`/${window.location.search}`):(ol(),localStorage.setItem("sessionError",!0))},U=async(e,t={})=>{const o=!t.version,a={method:t.method||"GET",headers:{Accept:"application/json","Content-Type":"application/json",...t.extraHeaders||{}}};let s=`${e}`,r=!1;const i=localStorage.getItem("authToken");if((s.includes("private")||o)&&i&&(r=!0,a.headers.Authorization=`Bearer ${i}`),t.payload)if(a.method==="GET"){const h=Fa.stringify(t.payload);s=`${s}?${h}`}else a.body=JSON.stringify(t.payload||{});const l=o?ce:`${Hi}/v${t.version}`,d=await fetch(`${l}/${s}`,a);if(t.rawResponse)return d;if(r&&d.status===401)return al(i),"Unauthorized";let p=null;try{p=await d.json()}catch{p={result:"1"}}return d.ok?p:{status:"error",message:"Server responded with unexpected error",response:p}},se=(...e)=>U(e[0],{method:"POST",payload:e[1],extraHeaders:e[2]||{},version:2,...e[3]||{}}),ie=(...e)=>U(e[0],{method:"GET",payload:e[1],extraHeaders:e[2]||{},version:2,...e[3]||{}}),be=async(...e)=>U(e[0],{method:"PUT",payload:e[1],extraHeaders:e[2]||{},version:2,...e[3]||{}}),jt=async(...e)=>U(e[0],{method:"DELETE",payload:e[1],extraHeaders:e[2]||{},version:2,...e[3]||{}}),ee=async(e,t={})=>{const o={method:t.method||"GET",headers:{Accept:"application/json","Content-Type":"application/json",...t.extraHeaders||{}}};let a=`${e}`;const s=localStorage.getItem("authToken");if(s&&(o.headers.Authorization=`Bearer ${s}`),t.payload)if(o.method==="GET"){const l=Fa.stringify(t.payload);a=`${a}?${l}`}else o.body=JSON.stringify(t.payload||{});const r=await fetch(`${Ot}/${a}`,o);if(s&&r.status===401)return al(s),"Unauthorized";let i=null;try{i=await r.json()}catch{i={result:"1"}}return r.ok?i:{status:"error",message:"Server responded with unexpected error",response:i}},$m=async({boardId:e})=>await ie("private/board/tags",{boardId:e},null),Gm=async({searchString:e})=>await ie("private/boards/advanced_search",{searchString:e},null),sl=async(e,t)=>{const o={"x-board-id":e};return await jt(`private/membership/remove/${t}`,null,o)},Ra=async(e,t)=>await ee("api/v2/private/boards",{method:"PUT",payload:t,extraHeaders:{"x-board-id":e}}
1),ke=async(e,t={start:0,max:20,addBoardPosts:!1,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!1,showScheduledHoots:!0,customURL:""})=>{const o={"x-board-id":e};return U(`boards/${e}/details`,{payload:t,extraHeaders:o})},rl=async e=>U(`boards/${e}/sub-boards`,{extraHeaders:{"x-board-id":e}}),nl=async e=>await U(`boards/${e}/members`,{method:"GET"}),Vm=async(e,t)=>await ee("api/v2/private/boards/weeklyDigest",{method:"POST",payload:{weeklyDigestDay:t},extraHeaders:{"x-board-id":e}}),il=async(e,t)=>{const o={"x-board-id":e};return await se(`private/boards/customUrl?customUrl=${t}`,null,o)},ll=async e=>U(`notifications/boards/${e}`),Jm=async(e,t)=>U(`notifications/boards/${e}`,{method:"POST",payload:t}),dl=async e=>await U("invites",{method:"GET",extraHeaders:{"x-board-id":e}}),zm=async(e,t)=>await jt("private/boards",null,{"x-board-id":e}),Ur=async(e,t)=>{const o={"x-board-id":e},a={postId:t};let s="api/v2/public/hoot";return localStorage.getItem("authToken")&&(s="api/v2/private/hoot"),await ee(s,{method:"GET",payload:a,extraHeaders:o})},Ha=async(e,t)=>{const o={"x-board-id":e},a={start:t.start,limit:t.max,collectionsBehavior:"OR",showScheduledHoots:t.showScheduledHoots,freeEvents:t.freeEvents,upcomingEvents:t.upcomingEvents,showFeaturedCollection:t.showFeaturedCollection,searchString:t.searchString,sortBy:t.sortBy,sortOrder:t.sortOrder};return(await U("hoots",{payload:a,extraHeaders:o})).data.hoots},cl=async e=>await ie("private/tags",null,{"x-board-id":e}),Wm=async e=>await be(`private/invitation/admin/resend/${e}`,null,null),Ym=async e=>await jt(`private/invitation/admin/remove/${e}`,null,null),Km=async(e,t,o)=>U(`boards/${e}/members/${t}/access`,{method:"PATCH",payload:{accessLevel:o}}),Qm=async(e,t)=>{const o={"x-board-id":e};return localStorage.getItem("authToken"),U(`boards/${e}/details`,{payload:t,extraHeaders:o})},Zm=async(e,t,o)=>{const a={"x-board-id":e};return await be(`private/tags/${t}`,o,a)},Xm=async(e,t)=>{const o={"x-board-id":e};return await jt(`private/tags/${t}`,null,o)},ef=async(e,t)=>await se("private/tags",t,{"x-board-id":e}),tf=async(e,t,o)=>await be("private/tags/featured",{featured:o,filterId:t},{"x-board-id":e}),of=async e=>await be("private/boards/pin",null,{"x-board-id":e}),af=async e=>await be("private/boards/unpin",null,{"x-board-id":e}),sf=async(e,t)=>{let o={};return t.membType==="EP"?(o={...t,membType:"mem"},await fetch(`${ce}/membership/extended-roles`,{method:"POST",body:JSON.stringify({emails:o.inviteEmails,membershipAccessTypeCode:"ME",extendedRoles:["EP"]}),headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e}})):o={...t},o.membType==="prv"&&(o.membType="pvm"),o.boardId=e,await U("invites",{payload:o,method:"POST"})},Nr=async e=>{const{boardId:t,visitId:o,screenAccessToken:a,refId:s,inviteType:r}=e,i=["204","206","207","2040","2060","2070"],l={"x-board-id":t},d=i.includes(r);return await se(d?"private/invitation/admin":"private/membership/follow",d?{visitId:o,screenAccessToken:a,refId:s}:{visitId:o,screenAccessToken:a,encRefId:s},l)},ul=async e=>{const{boardId:t,screenAccessToken:o,encRefId:a,boardCommunityCode:s}=e;return await se("private/membership/request",{boardCommunityCode:s,screenAccessToken:o,encRefId:a},{"x-board-id":t})},Rr=async(e,t)=>{const o={"x-board-id":e};return await be(`private/boards/url?shortUrl=${t}`,null,o)},rf=async(e,t,o,a)=>{const r={Authorization:`Bearer ${localStorage.getItem("authToken")}`,"Content-Type":"text/csv","x-board-id":e};return await(await fetch(`${ce}/invites/bulk`,{method:"POST",headers:r,body:a})).json()},pl=async(e,t,o,a)=>await ee(`api/v2/private/boards/hootApproval/${t}`,{method:"PUT",payload:{postApproval:o,removeMsg:a,approvalReqFrom:"approval"},extraHeaders:{"x-board-id":e}}),nf=async(e,t)=>await se("private/subboards/parent",{parentBoardId:t},{"x-board-id":e}),lf=async(e,t)=>await se("private/subboards/removeParent",{parentBoardId:t},{"x-board-id":e}),df=async(e,t)=>await se("private/subboards/remove",{boardId:t},{"x-board-id":e}),cf=async(e,t)=>await se("private/board/embed",t,{"x-board-id":e}),uf=async(e,t)=>await be("private/board/embed",t,{"x-board-id":e}),pf=async e=>await ie("private/board/embed",null,{"x-board-id":e}),yf=async e=>await ie("public/board/embed",{accessToken:e},null),LL=async(e,t,o)=>await ee("api/v2/private/boards/customSetting",{method:"PUT",payload:{statusName:t,enabled:o},extraHeaders:{"x-board-id":e}}),FL=async(e,t)=>await ee("api/v2/private/boards/externalScreens",{method:"PUT",payload:{enabled:t},extraHeaders:{"x-board-id":e}}),yl=async()=>await ie("public/boards/type"),gf=async()=>await ie("public/business/categories",null,null),gl=async e=>await ee("api/v2/private/boards",{method:"POST",payload:e}),Hr=async e=>{const t={"x-board-id":e.boardId};return await se("private/boards/location",e.data,t)},mf=async e=>{const t={"x-board-id":e.boardId};return await be("private/boards/location",e.data,t)},ml=async e=>{const t={"x-board-id":e.boardId};return await se("private/business/details",e.data,t)},fl=async e=>{const t={"x-board-id":e.boardId};return await be("private/business/details",e.data,t)},ff=async e=>{const t={"x-board-id":e.boardId};return await se("private/business/hours",e.data,t)},hf=async e=>{const t={"x-board-id":e.boardId};return await be("private/business/hours",e.data,t)},Sf=async e=>{const t={"x-board-id":e.boardId};return await se("private/business/photos",e.data,t)},bf=async e=>{const t={"x-board-id":e.boardId};return await jt(`private/business/photos/${e.data}`,null,t)},Ef=async e=>await ie("public/business/search",e,null),wf=async e=>await ie("public/business/details",e,null),If=async e=>{const t={"x-board-id":e.boardId};return await se("private/business/claim",e,t)},vf=async e=>await(await fetch(`${Pr}/gpxy/places/details/photos/static?photoReference=${e}&width=1&height=1`)).json(),Cf=async e=>{const t={Accept:"application/json","Content-Type":"application/json"},o=localStorage.getItem("authToken");t.Authorization=`Bearer ${o}`;const{userBoards:a,...s}=e.userDetails||{},{hoots:r,boardCollections:i,...l}
1=e.boardDetails||{};await fetch(`${To}/v2/ssp/advertisers`,{headers:t,method:"POST",body:JSON.stringify({...s,boardDetails:l,fullName:e.fullName,email:e.email,context:"hootboardCreateBoardFlow"})})},Af=async(e,t)=>U("businesses/search",{payload:{id:e,name:t}}),Df=async(e,t)=>await U("invites",{payload:{boardId:e,...t},method:"POST"}),Tf=async({firstName:e,lastName:t,email:o})=>{const a=`${zi}send-contact-to-email-octopus/send-contact-to-email-octopus`;return await fetch(a,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${Wi}`},body:JSON.stringify({email:o,firstName:e,lastName:t,phoneNumber:"NA",organisation:"NA",industry:"NA",listId:Yi,OS:"WEB-SIGNUP"})})},hl="v3/business-listings/public",Pf=async({boardId:e})=>await ee(`${hl}/my-directories`,{method:"GET",payload:{boardId:e,appKey:"business-listings"}}),Bf=async({boardId:e,listingId:t})=>await ee(`${hl}/my-directories/${encodeURIComponent(t)}/disconnect?appKey=business-listings`,{method:"POST",payload:{boardId:e}}),UL=async({boardId:e})=>await ee("v3/business-listings/profile",{method:"GET",payload:{appKey:"business-listings"},extraHeaders:{"x-board-id":e}}),NL=async({boardId:e,patch:t})=>await ee("v3/business-listings/profile?appKey=business-listings",{method:"PUT",payload:t,extraHeaders:{"x-board-id":e}}),RL=async({boardId:e})=>await ee("v3/business-listings/profile/categories",{method:"GET",payload:{appKey:"business-listings"},extraHeaders:{"x-board-id":e}}),Sl=By(Do),kf=Sl,HL=({fileType:e,maxSize:t,multipleFiles:o,children:a,onUploadDone:s,onOpen:r,onClose:i,className:l,customOptions:d={},autoOpen:p=!1})=>{const h={...d,accept:e,viewType:"list",maxSize:t,maxFiles:o?20:1,uploadInBackground:!1,onOpen:r,onClose:i,onUploadDone:s||(()=>{})};Ce.useEffect(()=>{p&&v()},[]);const v=()=>Sl.picker(h).open();return O.jsx("div",{className:`focus:outline-none cursor-pointer ${l}`,onClick:v,children:a})},xr=e=>{const{boardId:t,...o}=e.businessDetails;return{boardName:e==null?void 0:e.boardName,boardDesc:e.boardDesc,locationId:e.locationId,boardOwnerId:e.boardOwnerId,collections:e.collections,privateBoard:e.privateBoard,domainName:e.domainName,boardType:e.boardType,refSource:e.refSource,globalBoard:e.globalBoard,preApproveHoots:e.preApproveHoots,preApproveComments:e.preApproveComments,paidTags:e.paidTags,boardCollectionRequired:e.boardCollectionRequired,customUrl:e.customUrl,removeLocations:e.removeLocations,boardLogo:e.boardLogo,partnerBoardId:e.partnerBoardId,parentBoardId:e.parentBoardId,hootVisibility:e.hootVisibility,requestAccessToPost:e.requestAccessToPost,boardBackgroundImageLink:e.boardBackgroundImageLink,boardThemeCustomColors:e.boardThemeCustomColors,embedCustTheme:e.embedCustTheme,customBgImage:e.customBgImage,allowMembersToInviteOthers:e.allowMembersToInviteOthers,screenJoiningAccess:e.screenJoiningAccess,boardId:e.boardId,premiumBoard:e.premiumBoard,boardUrl:e.boardUrl,followersCount:e.followersCount,hootsCount:e.hootsCount,memRequestCount:e.memRequestCount,boardCommunityCode:e.boardCommunityCode,boardVisibPublic:e.boardVisibPublic,boardHideSearch:e.boardHideSearch,boardVisibChange:e.boardVisibChange,locations:e.locations,boardAdmin:e.boardAdmin,weeklyDigestDay:e.weeklyDigestDay,purchasedLicenses:e.purchasedLicenses?{...e.purchasedLicenses,kioskAddOns:e.purchasedLicenses.kioskAddOns?1:0}:e.purchasedLicenses,hootViewLimit:e.hootViewLimit,subBoards:e.subBoards,communityCodeRequired:e.communityCodeRequired,superParentSubBoards:e.superParentSubBoards,parentBoard:e.parentBoard,subscriptionId:e.subscriptionId,b2bCustomer:e.b2bCustomer,trialPeriod:e.trialPeriod,customSettings:e.customSettings,trialAvailed:e.trialAvailed,trialEndDate:e.trialEndDate,boardCollections:(e.boardCollections||[]).filter(a=>!!a).map(a=>({collectionId:a.collectionId,collectionName:a.collectionName,collectionParentId:a.collectionParentId,featured:a.featured,parentCollection:a.parentCollection,price:a.price})),upgadeCompletePercent:e.upgadeCompletePercent,boardExists:e.boardExists,hootLimitCount:e.hootLimitCount,viewLimitCount:e.viewLimitCount,boardBlocked:e.boardBlocked,manuallyUpgraded:e.manuallyUpgraded,membershipType:e.membershipType,partnershipStatus:e.partnershipStatus,hoots:e.hoots,admins:e.admins,privacy:e.privacy,boardAttr:e.boardAttr,pinned:e.pinned,pinnedSequence:e.pinnedSequence,partnerRelation:e.partnerRelation,hidePosterName:e.hidePosterName,hideHootDescription:e.hideHootDescription,planInterval:e.planInterval,securedBoard:e.securedBoard,customHootThemeColors:e.customHootThemeColors,businessHours:e.businessHours,businessDetail
1s:o,businessCategories:e.businessCategories,businessPhotos:e.businessPhotos,parentDmoBoardId:e.parentDmoBoardId,claimedRecord:e.claimedRecord,euCycleResetDay:e.euCycleResetDay,userBasedPricing:e.userBasedPricing,subDomain:e.subDomain,emailBoard:e.emailBoard,hbLocalEnabled:e.hbLocalEnabled}},B={saveProfile:"board/save-profile/",saveCustomize:"board/save-customize/",saveShortURL:"board/save-short-url/",getCategories:"board/get-categories/",saveLocation:"board/save-location/",saveContactDetails:"board/save-contact-details/",saveBusinessHours:"board/save-hours/",savePhotos:"board/save-photos/",deletePhoto:"board/delete-photo/",fetchDirectories:"board/fetch-directories/",disconnectDirectory:"board/disconnect-directory/"};function*Lf(){yield S(`${B.saveProfile}request`,function*(e){try{yield n({type:`${B.saveProfile}pending`,payload:{}});const{boardId:t,data:o}=e.payload,{phoneNumber:a,website:s,isAdvertisingEnabled:r,...i}=o,l=i.businessDetails.id,d=yield m(async()=>await Promise.all([Ra(t,xr({...i,boardThemeCustomColors:JSON.stringify(i.boardThemeCustomColors||{}),customHootThemeColors:JSON.stringify(i.customHootThemeColors||[])})),l?fl({boardId:t,data:{id:l,phoneNumber:o.phoneNumber,website:o.website}}):ml({boardId:t,data:{phoneNumber:o.phoneNumber,website:o.website}})]));if(d[0]&&d[1]&&d[0].message&&d[0].message==="success"&&d[1].message&&d[1].message==="success")yield n({type:`${B.saveProfile}fulfilled`,payload:{}});else throw new Error({...d[0],...d[1]})}catch(t){yield n({type:`${B.saveProfile}rejected`,payload:t})}})}function*Ff(){yield S(`${B.saveCustomize}request`,function*(e){try{yield n({type:`${B.saveCustomize}pending`,payload:{}});const t=e.payload.boardId,{isAdvertisingEnabled:o,...a}=e.payload.data,s=yield m(async()=>await Ra(t,xr({...a,boardThemeCustomColors:JSON.stringify(a.boardThemeCustomColors||{}),customHootThemeColors:JSON.stringify(a.customHootThemeColors||[])})));if(s!=null&&s.message&&s.message==="success")yield n({type:`${B.saveCustomize}fulfilled`,payload:{}});else throw new Error(s)}catch(t){yield n({type:`${B.saveCustomize}rejected`,payload:t})}})}function*Uf(){yield S(`${B.saveShortURL}request`,function*(e){try{yield n({type:`${B.saveShortURL}pending`,payload:{}});const{boardId:t,data:o}=e.payload,a=yield m(async()=>await Rr(t,o));if(a!=null&&a.data)throw new Error({reason:"not-available"});const s=yield m(async()=>await il(t,o));if(s!=null&&s.customUrlStatus)yield n({type:`${B.saveShortURL}fulfilled`,payload:{}});else throw new Error(s)}catch(t){yield n({type:`${B.saveShortURL}rejected`,payload:t})}})}function*Nf(){yield S(`${B.saveLocation}request`,function*(e){try{yield n({type:`${B.saveLocation}pending`,payload:{}});const t=e.payload.data.some(a=>a.id),o=yield m(async()=>t?await mf(e.payload):await Hr(e.payload));if(o!=null&&o.message&&o.message==="success")yield n({type:`${B.saveLocation}fulfilled`,payload:{}});else throw new Error(o)}catch(t){yield n({type:`${B.saveLocation}rejected`,payload:t})}})}function*Rf(){yield S(`${B.saveContactDetails}request`,function*(e){try{yield n({type:`${B.saveContactDetails}pending`,payload:{}});const{data:{id:t}}=e.payload,o=yield m(async()=>t?await fl(e.payload):await ml(e.payload));if(o!=null&&o.message&&o.message==="success")yield n({type:`${B.saveContactDetails}fulfilled`,payload:{}});else throw new Error(o)}catch(t){yield n({type:`${B.saveContactDetails}rejected`,payload:t})}})}function*Hf(){yield S(`${B.saveBusinessHours}request`,function*(e){try{yield n({type:`${B.saveBusinessHours}pending`,payload:{}});const t=e.payload.data.some(a=>a.businessHoursId),o=yield m(async()=>t?await hf(e.payload):await ff(e.payload));if(o!=null&&o.message&&o.message==="success")yield n({type:`${B.saveBusinessHours}fulfilled`,payload:{}});else throw new Error(o)}catch(t){yield n({type:`${B.saveBusinessHours}rejected`,payload:t})}})}function*xf(){yield S(`${B.savePhotos}request`,function*(e){try{yield n({type:`${B.savePhotos}pending`,payload:{}});const t=e.payload.data.filter(s=>s.isImported);e.payload.data=e.payload.data.filter(s=>!s.isImported);const o=yield m(async()=>await Promise.all(t.map(s=>kf.storeURL(s.url))));if(!o.every(s=>s.url))throw new Error(o);e.payload.data=[...e.payload.data,...o.map(({url:s})=>({url:s}))];const a=yield m(async()=>await Sf(e.payload));if(a!=null&&a.message&&a.message==="success")yield n({type:`${B.savePhotos}fulfilled`,payload:e.payload.data});else throw new Error(a)}catch(t){yield n({type:`${B.savePhotos}rejected`,payload:t})}})}function*Mf(){yield S(`${B.deletePhoto}request`,function*(e){try{yield n({type:`${B.deletePhoto}pending`,payload:e.payload});const t=yield m(async()=>await bf(e.payload));if(t!=null&&t.message&&t.message==="success")yield n({type:`${B.deletePhoto}fulfilled`,payload:e.payload});else throw new Error(t)}catch(t){yield n({type:`${B.deletePhoto}rejected`,payload:t})}})}function*Of(){yield S(`${B.getCategories}request`,function*(e){try{yield n({type:`${B.getCategories}pending`,payload:{}});const t=yield m(async()=>await gf(e.payload));if(t!=null&&t.message&&t.message==="success"&&t.data)yield n({type:`${B.getCategories}fulfilled`,payload:t.data});else throw new Error(t)}catch(t){yield n({type:`${B.getCategories}rejected`,payload:t})}})}function*jf(){yield S(`${B.fetchDirectories}request`,function*(e){try{yield n({type:`${B.fetchDirectories}pending`,payload:{}});const{boardId:t}=e.payload,o=yield m(async()=>Pf({boardId:t}));yield n({type:`${B.fetchDirectories}fulfilled`,payload:(o==null?void 0:o.directories)||[]})}catch(t){yield n({type:`${B.fetchDirectories}rejected`,payload:t})}})}function*qf(){yield Be(`${B.disconnectDirectory}request`,function*(e){const{boardId:t,listingId:o}=e.payload;try{yield n({type:`${B.disconnectDirectory}pending`,payload:{listingId:o}}),yield m(async()=>Bf({boardId:t,listingId:o})),yield n({type:`${B.disconnectDirectory}fulfilled`,payload:{listingId:o}})}catch(a){yield n({type:`${B.disconnectDirectory}rejected`,payload:a})}})}const _f=[Lf(),Ff(),Uf(),Nf(),Rf(),Hf(),xf(),Mf(),Of(),jf(),qf()],$f=e=>({memberCreated:e.memberCreated,displayName:e.displayName,firstName:e.firstName,lastName:e.lastName,userBoards:[],isPasswordResetRequired:e.isPasswordResetRequired,userInitials:e.userInitials,userPictureExists:e.userPictureExists,userPictureUrl:e.userPictureUrl,onboardingDone:e.onboardingDone,redirectTo:e.redirectTo,partyId:e.partyId,email:e.email,siteAdminRole:e.siteAdminRole,token:e.token,userColorCss:e.userColorCss,emailValidated:e.emailValidated,defaultLocation:e.defaultLocation,locations:e.locations,removeLocations:e.removeLocations,userExternalAccount:e.userExternalAccount}),Gf=e=>e?e.map(t=>{var o,a,s,r,i,l;return{boardName:t==null?void 0:t.name,boardDesc:t==null?void 0:t.description,locationId:(o=t==null?void 0:t.location)==null?void 0:o.googlePlaceId,boardType:t==null?void 0:t.type,boardLogo:t==null?void 0:t.logoUrl,boardBackgroun
1dImageLink:t==null?void 0:t.backgroundImageUrl,boardThemeCustomColors:(a=t==null?void 0:t.customColors)==null?void 0:a.board,boardId:t==null?void 0:t.id,premiumBoard:!!(t!=null&&t.isPremium),boardUrl:t==null?void 0:t.url,followersCount:(s=t==null?void 0:t.stats)==null?void 0:s.members,hootsCount:(r=t==null?void 0:t.stats)==null?void 0:r.hoots,membershipType:t==null?void 0:t.membershipTypeCode,pinned:!!(t!=null&&t.isPinned),preApproveHoots:!!((i=t==null?void 0:t.approvalSettings)!=null&&i.hoots),preApproveComments:!!((l=t==null?void 0:t.approvalSettings)!=null&&l.comments),hootVisibility:t==null?void 0:t.hootVisibility}}):[],Mr=async()=>{const e=await U("user/boards",{extraHeaders:{"x-cache-action":"by-pass"}});if(!(e!=null&&e.success))throw Error(e);return Gf(e.data)},Ke=async()=>{const e=await U("user");if(!e||!(e!=null&&e.success))throw Error(e);const t=await Mr();return{...$f(e.data),userBoards:t}},Vf=async()=>ie("private/user/onboard",null,null),bl=async e=>se("private/user/onboard",{onboardingTourName:e.onboardingTourName,onboardingTourStatus:e.status},null),Jf=async(e,t)=>{const o=localStorage.getItem("authToken");if(!(await fetch(`${To}/v2/ssp/link-board`,{method:"POST",headers:{Authorization:`Bearer ${o}`,"Content-Type":"application/json"},body:JSON.stringify({boardId:e,recordId:t})})).ok)throw new Error("Failed to link board to network.")},zf=async e=>{const t=localStorage.getItem("authToken");if(!(await fetch(`${Ot}/api/v2/private/boards/externalScreens`,{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json",Accept:"application/json","x-board-id":String(e)},body:JSON.stringify({enabled:!0})})).ok)throw new Error("Failed to enable external screens.")},El=async e=>{const t=localStorage.getItem("authToken");if(!(await fetch(`${To}/v2/ssp/onboarding/screens-added`,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({boardId:e})})).ok)throw new Error("Failed to notify screens added.")},xL=async e=>{const t=await fetch(`${To}/v2/network/by-hubspot/${encodeURIComponent(e)}`);
1if(t.status===404)return{success:!1,data:{stage:"not-started",network:null,boards:[],counts:{boards:0,externalScreens:0,totalInventory:0,activeInventory:0,pendingApprovalInventory:0}}};if(!t.ok)throw new Error("Failed to fetch onboarding progress.");return t.json()},wl=["image/jpeg","image/png","image/gif","image/webp"],Il=async e=>{const t=localStorage.getItem("authToken"),o={"Content-Type":"application/json",...t?{Authorization:`Bearer ${t}`}:{}};e.boardId&&(o["x-board-id"]=String(e.boardId));const a=await fetch(`${At}/private/assets/presigned-url`,{method:"POST",headers:o,body:JSON.stringify(e)});if(!a.ok){const s=await a.json().catch(()=>({}));throw new Error(s.error||`Failed to get presigned URL: ${a.status}`)}return a.json()},vl=e=>new Promise((t,o)=>{const a=new XMLHttpRequest;a.upload.addEventListener("progress",s=>{var r;s.lengthComputable&&((r=e.onProgress)==null||r.call(e,+(s.loaded/s.total).toFixed(2)))}),a.addEventListener("load",()=>{a.status>=200&&a.status<300?t():o(new Error(`Upload failed with status ${a.status}`))}),a.addEventListener("error",()=>o(new Error("Upload failed"))),a.addEventListener("abort",()=>o(new Error("Upload aborted"))),a.open("PUT",e.url,!0),a.setRequestHeader("Content-Type",e.contentType),a.send(e.file)}),ML=e=>wl.includes(e.type)?e.size>Bi?{valid:!1,error:"File size exceeds 8MB limit. Please choose a smaller image."}:{valid:!0}:{valid:!1,error:"Please select a valid image file (JPG, PNG, GIF, or WebP)"},OL=e=>wl.includes(e.type)?e.size>ki?{valid:!1,error:"File size exceeds 15MB limit. Please choose a smaller image."}:{valid:!0}:{valid:!1,error:"Please select a valid image file (JPG, PNG, GIF, or WebP)"},jL=async(e,t,o=Pi)=>{const a=await Wf(e),s=document.createElement("canvas"),r=s.getContext("2d");if(!r)throw new Error("Failed to get canvas context");return s.width=o,s.height=o,r.drawImage(a,t.x,t.y,t.width,t.height,0,0,o,o),new Promise((i,l)=>{s.toBlob(d=>{d?i(d):l(new Error("Failed to create blob from canvas"))},"image/jpeg",.9)})},Wf=e=>new Promise((t,o)=>{const a=new Image;a.crossOrigin="anonymous",a.onload=()=>t(a),a.onerror=o,a.src=e}),Yf=e=>{var i;const t=e.split(","),o=((i=t[0].match(/:(.*?);/))==null?void 0:i[1])||"image/jpeg",a=atob(t[1]);let s=a.length;const r=new Uint8Array(s);for(;s--;)r[s]=a.charCodeAt(s);return new Blob([r],{type:o})},P={getBoardTypes:"board/get-types/",createBoard:"board/create/",registerForAdSpace:"board/register-ad-space/",searchBusinesses:"board/search-businesses/",getBusinessDetails:"board/get-business-details/",claimBusiness:"board/claim-business/",importBusiness:"board/import/",importBusinessPhotos:"board/fetch-business-photos/",updateThemeColors:"board/update-theme-colors/",checkBusinessExists:"board/check-business-exists/",onboardingAdminInvites:"board/onboarding-admin-invites/",sendContactToEmailOctopus:"board/send-contact-to-email-octopus/"};function*Kf(){yield S(P.getBoardTypes+"request",function*(){try{yield n({type:P.getBoardTypes+"pending",payload:{}});const e=yield m(async()=>await yl());if(e&&e.message==="success")yield n({type:P.getBoardTypes+"fulfilled",payload:e.data||[]});else throw new Error(e)}catch{yield n({type:P.getBoardTypes+"rejected",payload:{}})}})}function*Qf(){yield S(P.createBoard+"request",function*(e){var t;try{yield n({type:P.createBoard+"pending",payload:{}});const o=e.payload;if((t=o.boardLogo)!=null&&t.startsWith("data:")){const s=Yf(o.boardLogo),r=yield m(async()=>Il({filename:"board-logo.jpg",contentType:"image/jpeg",assetType:"BOARD_LOGO",fileSize:s.size}));yield m(async()=>vl({url:r.data.uploadUrl,file:s,contentType:"image/jpeg"})),o.boardLogo=r.data.permanentUrl}const a=yield m(async()=>await gl(o));if(a&&a.data&&a.data.boardUrl){const r=new URLSearchParams(window.location.search).get("record_id");if(r){try{yield m(Jf,a.data.boardId,r),yield m(zf,a.data.boardId)}catch(d){console.error("Failed to link board to network:",d)}sessionStorage.setItem("hb_onboarding_board_id",String(a.data.boardId)),window.dispatchEvent(new Event("hb_onboarding_refresh"))}const i=yield m(async()=>await Ke()),l=yield m(async()=>await ke(a.data.boardId,{}));i?yield n({type:P.createBoard+"fulfilled",payload:{loginSuccess:!0,userDetails:i,boardInfo:l}}):yield n({type:P.createBoard+"fulfilled",payload:{loginSuccess:!0,userDetails:null}}),yield n({type:"user/board/pin/request",payload:{boardId:a.data.boardId}})}else yield n({type:P.createBoard+"rejected",payload:{loginSuccess:!1}})}catch{yield n({type:P.createBoard+"rejected",payload:{}})}})}function*Zf(){yield S(P.registerForAdSpace+"request",function*(e){try{yield n({type:P.registerForAdSpace+"pending",payload:{}});const t=yield m(async()=>await Ke()),o=yield m(async()=>await ke(e.payload.boardId,{}));if(t&&o){if(o.boardType==="HLB"){const a=o.locations||[{}],s=a[0].regionCode;a[0].countryCode==="US"&&["NY","NJ","CT","PA"].includes(s)&&Cf({email:t.email,fullName:t.displayName,userDetails:t,boardDetail
1s:o})}yield n({type:P.registerForAdSpace+"fulfilled",payload:{loginSuccess:!0,userDetails:t,boardInfo:o}})}else throw new Error}catch{yield n({type:P.registerForAdSpace+"rejected",payload:{}})}})}function*Xf(){yield S(P.searchBusinesses+"request",function*(e){try{yield n({type:P.searchBusinesses+"pending",payload:{}});const{query:t,location:o}=e.payload,a=yield m(async()=>await Ef({...o,query:t}));if(a&&a.message==="success"&&a.data)yield n({type:P.searchBusinesses+"fulfilled",payload:a.data});else throw new Error(a)}catch{yield n({type:P.searchBusinesses+"rejected",payload:{}})}})}function*eh(){yield S(P.getBusinessDetails+"request",function*(e){try{yield n({type:P.getBusinessDetails+"pending",payload:{}});const t=e.payload,o=yield m(async()=>await ke(t));if(o&&o.boardId)yield n({type:P.getBusinessDetails+"fulfilled",payload:o});else throw new Error(o)}catch{yield n({type:P.getBusinessDetails+"rejected",payload:{}})}})}function*th(){yield S(P.claimBusiness+"request",function*(e){try{yield n({type:P.claimBusiness+"pending",payload:{}});const t=e.payload,o=yield m(async()=>await If(t));if(o&&o.message==="success")yield n({type:P.claimBusiness+"fulfilled",payload:o.data});else throw new Error(o)}catch{yield n({type:P.claimBusiness+"rejected",payload:{}})}})}function*oh(){yield S(P.importBusiness+"request",function*(e){try{yield n({type:P.importBusiness+"pending",payload:{}});const t=e.payload,o=yield m(async()=>await wf(t));if(o&&o.message==="success"&&o.data){const a=o.data;yield n({type:P.importBusinessPhotos+"request",payload:a.rawPhotos||[]}),yield n({type:P.importBusiness+"fulfilled",payload:a})}else throw new Error(o)}catch{yield n({type:P.importBusiness+"rejected",payload:{}})}})}function*ah(){yield S(P.importBusinessPhotos+"request",function*(e){try{yield n({type:P.importBusinessPhotos+"pending",payload:{}});const t=e.payload,o=yield m(async()=>await Promise.all(t.map(a=>vf(a.photoReference))));if(o.every(a=>a.success))yield n({type:P.importBusinessPhotos+"fulfilled",payload:o.map((a,s)=>{const r=t[s].width,i=t[s].height,l=1800,d=1e3;return{url:a.data.url,width:r>l?l:r,height:i>d?d:i}})});else throw new Error(o)}catch{yield n({type:P.importBusinessPhotos+"rejected",payload:{}})}})}function*sh(){yield S(P.updateThemeColors+"request",function*(e){try{yield n({type:P.updateThemeColors+"pending",payload:{}});const{boardId:t,boardParams:o}=e.payload;(yield m(async()=>await Ra(t,o)))?yield n({type:P.updateThemeColors+"fulfilled",payload:{}}):yield n({type:P.updateThemeColors+"rejected",payload:{}})}catch{yield n({type:P.updateThemeColors+"rejected",payload:{}})}})}function*rh(){yield S(P.checkBusinessExists+"request",function*(e){try{yield n({type:P.checkBusinessExists+"pending",payload:{}});const{placeId:t,businessName:o}=e.payload,a=yield m(async()=>await Af(t,o));a?yield n({type:P.checkBusinessExists+"fulfilled",payload:a.data}):yield n({type:P.checkBusinessExists+"rejected",payload:{}})}catch{yield n({type:P.checkBusinessExists+"rejected",payload:{}})}})}function*nh(){yield S(P.onboardingAdminInvites+"request",function*(e){try{const{boardId:t,boardAdmin:o,boardName:a,emails:s,message:r,displayName:i,selectedMemberType:l}=e.payload;yield n({type:P.onboardingAdminInvites+"pending"});const d=yield m(()=>Df(t,{adminInvite:o,boardName:a,inviteEmails:s,inviteMsg:r,inviteeName:i,membType:l,partnerBoard:!1}));if(!d)throw new Error;yield n({type:P.onboardingAdminInvites+"fulfilled",payload:d})}catch{yield n({type:P.onboardingAdminInvites+"rejected"})}})}function*ih(){yield S(P.sendContactToEmailOctopus+"request",function*(e){try{const{firstName:t,lastName:o,email:a}=e.payload;yield n({type:P.sendContactToEmailOctopus+"pending"});const s=yield m(()=>Tf({firstName:t,lastName:o,email:a}));if(!s)throw new Error;yield n({type:P.sendContactToEmailOctopus+"fulfilled",payload:s})}catch{yield n({type:P.sendContactToEmailOctopus+"rejected"})}})}const lh=[Kf(),Qf(),Xf(),eh(),th(),Zf(),oh(),ah(),sh(),rh(),nh(),ih()];function so(e){return!e||typeof e!="string"?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e.trim())}function Cl(e){if(!(!e||typeof e!="string"))try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"?e:void 0}catch{return}}const mo={boardType:"",parentBoardId:0,activeBusinessFlow:"normal",searchResults:[],searchAPIStatus:"idle",boardTypes:[],boardTypesAPIStatus:"idle",isDataImported:!1,importBusinessAPIStatus:"idle",boardIdToClaim:0,boardDetail
1sToClaim:null,checkBusinessExistsAPIStatus:"idle",checkBusinessExistsData:{},claimBoardGetAPIStatus:"idle",claimBoardRequestAPIStatus:"idle",claimBoardForm:{boardId:0,phoneNumber:"",notes:""},currentStep:0,stepProcessStatus:"idle",boardLocationFormSaveStatus:"idle",basicBoardDetailsFormSaveStatus:"idle",boardBusinessContactFormSaveStatus:"idle",boardBusinessPhotosFormSaveStatus:"idle",boardBusinessHoursFormSavedStatus:"idle",isBoardLocationFormEntered:!1,isBasicBoardDetailsFormEntered:!1,isBoardBusinessHoursFormEntered:!1,isBoardBusinessPhotosFormEntered:!1,isBoardBusinessContactFormEntered:!1,isBusinessSearchFormEntered:!1,isBusinessClaimFormEntered:!1,sentMixpanelEvents:[],basicInfo:{boardName:"",boardDesc:"",boardLogo:"",businessCategories:[]},locationInfo:null,contactInfo:{id:null,phoneNumber:"",website:""},businessHours:[],businessPhotos:[],errors:{showAllFormErrors:!1,boardNameError:!0,boardNameErrorMessage:"Please enter a valid name for your board.",boardDescError:!0,boardDescErrorMessage:"Please enter a brief description of your board.",boardLogoError:!0,boardLogoErrorMessage:"Please set a logo for your board.",boardTypeError:!1,boardTypeErrorMessage:"Please select the board type.",locationsError:!1,locationsErrorMessage:"Your address & location is required.",basicInfoAPIError:!1,basicInfoAPIErrorMessage:"Yikes! Something went wrong while creating your board.",locationAPIError:!1,locationAPIErrorMessage:"Yikes! Something went wrong while saving location.",contactAPIError:!1,contactAPIErrorMessage:"Yikes! Something went wrong while saving details.",phoneNumberError:!1,phoneNumberErrorMessage:"Please enter a valid phone number",websiteError:!1,websiteErrorMessage:"Please enter a valid website url",hoursAPIError:!1,hoursAPIErrorMessage:"Yikes! Something went wrong while saving hours.",photosAPIError:!1,photosAPIErrorMessage:"Yikes! Something went wrong while saving phots.",claimRequestAPIError:!1,claimRequestAPIErrorMessage:"Yikes! Something went wrong while sending claim request.",claimNoteError:!1,claimNoteErrorMessage:"",claimPhoneError:!1,claimPhoneErrorMessage:"Enter a valid phone number."},createdBoard:{},boardThemeCustomColors:{},customHootThemeColors:[],updateThemeColorsStatus:"idle",isBoardUsageSelected:!1,selectedBoardUsage:[],onboardingAdminInvitesData:null,onboardingAdminInvitesAPIStatus:"idle",sendContactToEmailOctopusResponse:null,sendContactToEmailOctopusAPIStatus:"idle",inviteMemberEmails:{value:"",error:null}},qL=e=>({type:P.registerForAdSpace+"request",payload:{boardId:e}}),_L=()=>({type:P.getBoardTypes+"request"}),$L=e=>({type:P.createBoard+"request",payload:e}),GL=({query:e,location:t})=>({type:P.searchBusinesses+"request",payload:{query:e,location:t}}),VL=e=>({type:P.getBusinessDetails+"request",payload:e}),JL=({boardId:e,phoneNumber:t,notes:o})=>({type:P.claimBusiness+"request",payload:{boardId:e,phoneNumber:t,notes:o}}),zL=({uuid:e,provider:t})=>({type:P.importBusiness+"request",payload:{uuid:e,provider:t}}),WL=({placeId:e,businessName:t})=>({type:P.checkBusinessExists+u.REQUEST,payload:{placeId:e,businessName:t}}),YL=({boardId:e,boardAdmin:t,boardName:o,emails:a,message:s,displayName:r,selectedMemberType:i})=>({type:P.onboardingAdminInvites+u.REQUEST,payload:{boardId:e,boardAdmin:t,boardName:o,emails:a,message:s,displayName:r,selectedMemberType:i}}),KL=({firstName:e,lastName:t,email:o})=>({type:P.sendContactToEmailOctopus+u.REQUEST,payload:{firstName:e,lastName:t,email:o}}),dh=(e,t)=>{var s;const{boardDetails:o}=t.payload;if(!((s=e.createdBoard)!=null&&s.boardId))return;e.createdBoard=o,e.contactInfo.id=(o.businessDetails||{}).id;let a=(o.locations||[]).length>0?o.locations[0]:null;a&&(a.addressLine1||(a={...a,addressLine1:""}),a.addressLine2||(a={...a,addressLine2:""}),e.locationInfo=a),o.businessHours&&o.businessHours.length>0&&(e.businessHours=o.businessHours)},QL=e=>({type:P.updateThemeColors+"request",payload:e}),Al=j({name:"createBoard",initialState:mo,reducers:{resetCreateBoard:(e,t)=>({...mo,...t.payload||{},boardTypes:e.boardTypes.length>0?e.boardTypes:[]}),cancelClaim:e=>{e.claimBoardForm=mo.claimBoardForm,e.claimBoardGetAPIStatus="idle",e.claimBoardRequestAPIStatus="idle",e.boardIdToClaim=0,e.activeBusinessFlow="normal"}
1,backToBusinessDetails:e=>{e.claimBoardForm.boardId=0},proceedToClaim:e=>{e.claimBoardForm.boardId=e.boardIdToClaim},claimRequestFormUpdated:(e,t)=>{const{context:o,value:a}=t.payload;switch(o){case"phone":e.claimBoardForm.phoneNumber=a,e.errors.claimPhoneError=Je.phoneNumber(a).hasError;break;case"notes":e.claimBoardForm.notes=a;break}},startFreshBusiness:e=>({...mo,boardTypes:e.boardTypes.length>0?e.boardTypes:[],boardType:e.boardType,parentBoardId:e.parentBoardId,currentStep:e.currentStep+1,sentMixpanelEvents:e.sentMixpanelEvents}),markEventAsSent:(e,t)=>{e.sentMixpanelEvents=[...e.sentMixpanelEvents,t.payload]},resetMarkedEvents:e=>{e.sentMixpanelEvents=[]},setParentBoardId:(e,t)=>{e.parentBoardId=t.payload.parentBoardId},showValidationErrors:e=>{e.errors.showAllFormErrors=!0},boardNameChanged:(e,t)=>{const o=Ai.boardNameFilter(t.payload),a=o.trim();let s=!0,r="";a&&a.length>0?a.length>80?(s=!0,r="Board name should not be greater than 80 characters"):(s=!1,r=""):(s=!0,r="Please enter a valid name for your board"),e.basicInfo.boardName=o,e.errors.boardNameError=s,e.errors.boardNameErrorMessage=r},boardCategoryChanged:(e,t)=>{e.basicInfo.businessCategories=t.payload},boardDescChanged:(e,t)=>{const o=t.payload,a=(o||"").trim();let s=!0,r="";
1const i=a.length<20;a.length>250?(s=!0,r="A brief description of your board not greater than 250 characters is required"):!e.isDataImported&&i?(s=!0,r="A brief description of your board not less than 20 characters is required"):(s=!1,r=""),e.basicInfo.boardDesc=o,e.errors.boardDescError=s,e.errors.boardDescErrorMessage=r},boardLogoChanged:(e,t)=>{e.basicInfo.boardLogo=t.payload,e.errors.boardLogoError=!1,t.payload===""&&(e.errors.boardLogoError=!0)},boardTypeChanged:(e,t)=>{e.boardType=t.payload.boardType},updateLocation:(e,t)=>{e.locationInfo={...e.locationInfo,...t.payload},e.errors.locationsError=!1,e.locationInfo.addressLine1||(e.errors.locationsError=!0)},nextStep:e=>{e.currentStep=e.currentStep+1,e.errors.showAllFormErrors=!1},prevStep:e=>{e.currentStep<=0||(e.currentStep=e.currentStep-1)},jumpToStep:(e,t)=>{let o=t.payload;o>e.currentStep||o<e.currentStep&&(e.currentStep=o)},contactInfoUpdated:(e,t)=>{const{context:o,value:a}=t.payload;switch(o){case"phone":e.contactInfo.phoneNumber=a,e.errors.phoneNumberError=Je.phoneNumber(a).hasError;break;case"website":e.contactInfo.website=a,e.errors.websiteError=Je.website(a).hasError;break}},addBusinessPhotos:(e,t)=>{e.businessPhotos=[...e.businessPhotos,...t.payload]},removeBusinessPhoto:(e,t)=>{e.businessPhotos=e.businessPhotos.filter((o,a)=>a!==t.payload)},updateBusinessHours:(e,t)=>{e.businessHours=t.payload},updateMixpanelEnteredEventWithPayload:(e,t)=>({...e,...t.payload||{}}),setThemeColors:(e,t)=>{const[o,a,s]=t.payload;e.boardThemeCustomColors={colorPalette:"rec",font:s,background:a,button:o};const r=t.payload.splice(0,3).map(i=>({background:i,isDark:Di(i)}));e.customHootThemeColors=r},setBoardUsageSelected:(e,t)=>{e.isBoardUsageSelected=t.payload},updateSelectedBoardUsage:(e,t)=>{const o=e.selectedBoardUsage.includes(t.payload);o||(e.selectedBoardUsage=[...e.selectedBoardUsage,t.payload]),o&&(e.selectedBoardUsage=e.selectedBoardUsage.filter(a=>a!==t.payload))},resetSelectedBoardUsage:e=>{e.selectedBoardUsage=[]},setInviteMemberEmail(e,t){e.inviteMemberEmails.value=t.payload},validateInviteMemberEmail(e){const t=e.inviteMemberEmails.value.split(",").map(o=>o.trim()).filter(o=>o!=="");t.length===0?e.inviteMemberEmails.error="Please invite at least one member to continue.":t.some(o=>!so(o))?e.inviteMemberEmails.error="Please enter valid email(s).":t.length>5?e.inviteMemberEmails.error="You can invite up to 5 members only.":e.inviteMemberEmails.error=null}},extraReducers:{"/manageBoard/refreshBoardDetails/fulfilled":dh,[P.getBoardTypes+"pending"]:e=>{e.boardTypesAPIStatus="pending",e.boardTypes=[]},[P.getBoardTypes+"fulfilled"]:(e,t)=>{e.boardTypesAPIStatus="fulfilled",e.boardTypes=t.payload.filter(o=>!["HW","HV","HO"].includes(o.boardType))},[P.getBoardTypes+"rejected"]:e=>{e.boardTypesAPIStatus="rejected"},[P.createBoard+"pending"]:e=>{e.errors.basicInfoAPIError=!1,e.stepProcessStatus="pending",e.basicBoardDetailsFormSaveStatus="pending"},[P.createBoard+"fulfilled"]:(e,t)=>{e.stepProcessStatus="idle",e.createdBoard=t.payload.boardInfo,e.basicBoardDetailsFormSaveStatus="fulfilled"},[P.createBoard+"rejected"]:e=>{e.errors.basicInfoAPIError=!0,e.stepProcessStatus="rejected",e.basicBoardDetailsFormSaveStatus="rejected"},[P.searchBusinesses+"pending"]:e=>{e.searchResults=[],e.searchAPIStatus="pending"},[P.searchBusinesses+"fulfilled"]:(e,t)=>{e.searchAPIStatus="fulfilled",e.searchResults=t.payload},[P.searchBusinesses+"rejected"]:e=>{e.searchAPIStatus="rejected"},[P.getBusinessDetails+"request"]:(e,t)=>{const o=t.payload;e.activeBusinessFlow="claim",e.boardIdToClaim=o,e.claimBoardForm=mo.claimBoardForm,e.errors.claimRequestAPIError=!1},[P.getBusinessDetails+"pending"]:e=>{e.claimBoardGetAPIStatus="pending"},[P.getBusinessDetails+"fulfilled"]:(e,t)=>{e.claimBoardGetAPIStatus="fulfilled",e.boardDetailsToClaim=t.payload},[P.getBusinessDetails+"rejected"]:e=>{e.claimBoardGetAPIStatus="rejected"},[P.claimBusiness+"pending"]:e=>{e.errors.claimRequestAPIError=!1,e.claimBoardRequestAPIStatus="pending"},[P.claimBusiness+"fulfilled"]:e=>{e.claimBoardRequestAPIStatus="fulfilled"},[P.claimBusiness+"rejected"]:e=>{e.claimBoardRequestAPIStatus="rejected",e.errors.claimRequestAPIError=!0},[P.importBusiness+"request"]:e=>{e.activeBusinessFlow="import"},[P.importBusiness+"pending"]:e=>{e.importBusinessAPIStatus="pending"},[P.importBusiness+"fulfilled"]:(e,t)=>{var a,s,r,i,l,d,p,h,v;e.isDataImported=!0,e.importBusinessAPIStatus="fulfilled";const o=t.payload||{};
1e.basicInfo={boardName:((a=o==null?void 0:o.boardDetails)==null?void 0:a.boardName)||"",boardDesc:((s=o==null?void 0:o.boardDetails)==null?void 0:s.boardDesc)||"",boardLogo:((r=o==null?void 0:o.boardDetails)==null?void 0:r.boardLogo)||"",businessCategories:((i=o==null?void 0:o.boardDetails)==null?void 0:i.businessCategories)||[]},e.contactInfo={phoneNumber:((l=o==null?void 0:o.businessDetails)==null?void 0:l.internationalNumber)||((d=o==null?void 0:o.businessDetails)==null?void 0:d.phoneNumber)||"",website:((p=o==null?void 0:o.businessDetails)==null?void 0:p.website)||""},e.locationInfo=o==null?void 0:o.location,e.locationInfo&&(e.locationInfo.addressLine1=((v=(h=o==null?void 0:o.location)==null?void 0:h.formattedAddress)==null?void 0:v.split(",")[0])||""),o!=null&&o.businessHours&&(e.businessHours=["SU","MO","TU","WE","TH","FR","SA"].map(A=>{const w=((o==null?void 0:o.businessHours)||[]).find(({day:N})=>N===A);return w||{day:A,openingHours:"09:00:00",closingHours:"18:00:00",active:!1}}).map(A=>{const w={...A};return A.openingHours.length===5&&(w.openingHours=A.openingHours+":00"),A.closingHours.length===5&&(w.closingHours=A.closingHours+":00"),w})),e.activeBusinessFlow="normal",e.currentStep=e.currentStep+1},[P.importBusiness+"rejected"]:e=>{e.importBusinessAPIStatus="rejected",e.isDataImported=!1},[P.importBusinessPhotos+"fulfilled"]:(e,t)=>{e.businessPhotos=t.payload.map(o=>({url:o.url.replace("-w1-h1",`-w${o.width}-h${o.height}`),thumbnail:o.url.replace("-w1-h1","-w200-h200"),isImported:!0}))},[P.importBusinessPhotos+"rejected"]:e=>{e.businessPhotos=[]},[B.saveLocation+"pending"]:e=>{e.errors.locationAPIError=!1,e.stepProcessStatus="pending",e.boardLocationFormSaveStatus="pending"},[B.saveLocation+"fulfilled"]:e=>{e.stepProcessStatus="idle",e.currentStep=e.currentStep+1,e.boardLocationFormSaveStatus="fulfilled"},[B.saveLocation+"rejected"]:e=>{e.errors.locationAPIError=!0,e.stepProcessStatus="rejected",e.boardLocationFormSaveStatus="rejected"},[B.saveContactDetails+"pending"]:e=>{e.errors.contactAPIError=!1,e.stepProcessStatus="pending",e.boardBusinessContactFormSaveStatus="pending"},[B.saveContactDetails+"fulfilled"]:e=>{e.stepProcessStatus="idle",e.currentStep=e.currentStep+1,e.boardBusinessContactFormSaveStatus="fulfilled"},[B.saveContactDetails+"rejected"]:e=>{e.errors.contactAPIError=!0,e.stepProcessStatus="rejected",e.boardBusinessContactFormSaveStatus="rejected"},[B.saveBusinessHours+"pending"]:e=>{e.errors.hoursAPIError=!1,e.stepProcessStatus="pending",e.boardBusinessHoursFormSavedStatus="pending"},[B.saveBusinessHours+"fulfilled"]:e=>{e.stepProcessStatus="idle",e.currentStep=e.currentStep+1,e.boardBusinessHoursFormSavedStatus="fulfilled"},[B.saveBusinessHours+"rejected"]:e=>{e.errors.hoursAPIError=!0,e.stepProcessStatus="rejected",e.boardBusinessHoursFormSavedStatus="rejected"},[B.savePhotos+"pending"]:e=>{e.errors.photosAPIError=!1,e.stepProcessStatus="pending",e.boardBusinessPhotosFormSaveStatus="pending"},[B.savePhotos+"fulfilled"]:e=>{e.stepProcessStatus="idle",e.currentStep=e.currentStep+1,e.boardBusinessPhotosFormSaveStatus="fulfilled"},[B.savePhotos+"rejected"]:e=>{e.errors.photosAPIError=!0,e.stepProcessStatus="rejected",e.boardBusinessPhotosFormSaveStatus="rejected"},[P.updateThemeColors+"pending"]:e=>({...e,updateThemeColorsStatus:"pending"}),[P.updateThemeColors+"fulfilled"]:e=>({...e,updateThemeColorsStatus:"fulfilled"}),[P.updateThemeColors+"rejected"]:e=>({...e,updateThemeColorsStatus:"rejected"}),[P.checkBusinessExists+"pending"]:e=>{e.checkBusinessExistsAPIStatus=f.PENDING},[P.checkBusinessExists+"fulfilled"]:(e,t)=>{e.checkBusinessExistsAPIStatus=f.FULFILLED,e.checkBusinessExistsData=t.payload||{}},[P.checkBusinessExists+"rejected"]:e=>{e.checkBusinessExistsAPIStatus=f.REJECTED},[P.onboardingAdminInvites+"pending"]:e=>{e.onboardingAdminInvitesAPIStatus=f.PENDING},[P.onboardingAdminInvites+"fulfilled"]:(e,t)=>{e.onboardingAdminInvitesAPIStatus=f.FULFILLED,e.onboardingAdminInvitesData=t.payload||{}},[P.onboardingAdminInvites+"rejected"]:e=>{e.onboardingAdminInvitesAPIStatus=f.REJECTED},[P.sendContactToEmailOctopus+"pending"]:e=>{e.sendContactToEmailOctopusAPIStatus=f.PENDING},[P.sendContactToEmailOctopus+"fulfilled"]:(e,t)=>{e.sendContactToEmailOctopusAPIStatus=f.FULFILLED,e.sendContactToEmailOctopusResponse=t.payload||{}},[P.sendContactToEmailOctopus+"rejected"]:e=>{e.sendContactToEmailOctopusAPIStatus=f.REJECTED}}}),{nextStep:ZL,jumpToStep:XL,prevStep:eF,cancelClaim:tF,proceedToClaim:oF,startFreshBusiness:aF,backToBusinessDetail
1s:sF,claimRequestFormUpdated:rF,markEventAsSent:ch,resetMarkedEvents:uh,addBusinessPhotos:nF,removeBusinessPhoto:iF,boardTypeChanged:lF,boardNameChanged:dF,boardCategoryChanged:cF,boardDescChanged:uF,boardLogoChanged:pF,updateLocation:yF,resetCreateBoard:gF,showValidationErrors:mF,updateBusinessHours:fF,setParentBoardId:hF,contactInfoUpdated:SF,updateMixpanelEnteredEventWithPayload:bF,setThemeColors:EF,setBoardUsageSelected:wF,updateSelectedBoardUsage:IF,resetSelectedBoardUsage:vF,setInviteMemberEmail:CF,validateInviteMemberEmail:AF}=Al.actions,ph=Al.reducer,yh=e=>{if(!e)return{};const t=[];return e.locations&&e.locations.map(o=>{t.push(o.googlePlaceId)}),{boardApproveComments:e.preApproveComments,boardApprovePosts:e.preApproveHoots,boardLocations:t,boardLocationSetting:!e.globalBoard,boardLogo:e.boardLogo,boardSecurityType:e.privateBoard?"only members with access can post":"anyone can post",boardSecret:e.boardHideSearch,boardPlan:e.premiumBoard?"paid":"free",boardCollectionCount:(e.boardCollections?e.boardCollections:[]).length,boardSubBoardCount:(e.subBoards?e.subBoards:[]).length,boardSubCommunityType:e.boardUsedForSubType,boardCommunityType:e.boardType,boardDescription:e.boardDesc,boardHootCount:e.hootsCount,boardFollowCount:e.followersCount,boardName:e.boardName,boardId:e.boardId,boardUrl:e.boardUrl}},DF=(e,t)=>{var r;let o="Link";(e==null?void 0:e.type)==="UFIMG"||(e==null?void 0:e.type)==="UFPDF"?o="File":(e==null?void 0:e.type)==="DISC"&&(o="Text");let a=[],s=[];if(((r=e==null?void 0:e.hootStats)==null?void 0:r.rehoots)>0&&(e!=null&&e.postBoards)){const i=e==null?void 0:e.postBoards.filter(l=>l.boardId!==(e==null?void 0:e.owningBoardId));for(const l of i)a.push(l.boardId),s.push(l.boardName)}return{sourceType:e==null?void 0:e.sourceType,hootAboutLink:e!=null&&e.userQuote?e==null?void 0:e.userQuote:"",aboutLink:e!=null&&e.userQuote?e==null?void 0:e.userQuote:"",hootPrivate:e==null?void 0:e.privateHoot,hootMediaSource:e==null?void 0:e.mediaUrl,hootTagsPostedTo:e==null?void 0:e.boardTagsList,rehootedBoardIds:a,tagsPostedTo:a,rehootBoardIDs:a,rehootBoardNames:s,path:window.location.href,hootCreatorId:(e==null?void 0:e.authorId)!==null?e==null?void 0:e.authorId:"",hootType:e==null?void 0:e.type,hootOwningBoardId:(e==null?void 0:e.owningBoardId)!==null?e==null?void 0:e.owningBoardId:"",boardId:t||0,hootColorId:e==null?void 0:e.hootBgColorClass,hootColor:!!(e!=null&&e.hootBgColorClass),hootButton:(e==null?void 0:e.buttonLabel)!==null,hootEventLocation:(e==null?void 0:e.eventLocationPlaceId)!==null?e==null?void 0:e.eventLocationPlaceId:"",hootEvent:!!(e!=null&&e.eventDateTime),hootCategory:o,createdAt:e==null?void 0:e.createdAt,hootDescription:e==null?void 0:e.plainTextDescription,hootId:e==null?void 0:e.id,hootTitle:e==null?void 0:e.title,hootUrl:window.location.href,boardsPostedToCount:(e!=null&&e.postBoards?e.postBoards:[]).length}},TF=(e,t,o,a)=>{let s="Text",r="DISC";e.uploadedFileData&&(s="File",e.uploadedFileData.mimetype==="application/pdf"?r="UFPDF":r="UFIMG"),e.acquiredLinkData&&(s="Link",r="HLBLOG");let i=[];return e.selectedCollections&&e.selectedCollections.length>0&&e.selectedCollections.map(l=>{i.push(l.filterText)}),{boardsPostedToCount:1,hootPrivate:e.hootVisibility==="pri",isRichTextUsed:e.isRichTextUsed,hootEventLocation:e.hootLocation?e.hootLocation.googlePlaceId:"",hootColorId:e.hootBgColorClass,hootTagsPostedTo:i.length>0?i.join():"",boardId:t,boardIdsPostedTo:t,boardName:o,boardNamesPostedTo:o,hootColorID:e.selectedHootBgColor,hootColor:!!e.selectedHootBgColor,hootButton:e.actionButtonLabel!=="",hootLocation:e.hootLocation?e.hootLocation.googlePlaceId:"",hootEvent:!!e.eventDetails,hootCategory:s,hootDescription:e.hootDesc,hootCoverImage:!!(e.hootCoverImages?e.hootCoverImages:[]).length,hootImageCount:(e.hootCoverImages?e.hootCoverImages:[]).length,hootType:r,hootTitle:e.acquiredLinkData?e.acquiredLinkData.titile:e.hootTitle,hootUrl:a,path:window.location.href,postingCategory:e.postingCategory}},PF=e=>({boardAppsId:e.boardAppsId,appName:e.appName,seqNumber:e.seqNumber,showAllScreens:e.showAllScreens,boardId:e.boardId,platformAppId:e.platformAppId,appDeleted:e.appDeleted,appTypeCode:e.appTypeCode,appIconUrl:e.appIconUrl,appCategory:e.appCategory,pageNum:e.pageNum,appIconSize:e.appIconSize,showOnWeb:e.showOnWeb,showOnMobile:e.showOnMobile,boardAppsEndpoints:e.boardAppsEndpoints,appStoreId:e.appStoreId,publishedBy:e.publishedBy,appDescription:e.appDescription,settingsEndpoint:e.settingsEndpoint,hbConfig:e.hbConfig,developerApp:e.developerApp,private:e.private}),BF=e=>(e.listBoards||[]).map(t=>({boardId:t.id,boardName:t.name})),kF=e=>(e||[]).map(t=>({listName:t.name,listId:t.listId})),Dl=io.createContext(),Tl=Fa.parse(window.location.search),{distinctId:ra}=Tl||{},Ne=new Wy;function gh(e){const t=Cr(),o=He(c=>c.activeAccount.activeAccountId),a=He(c=>c.createBoard.sentMixpanelEvents),s=He(c=>c.auth.loginStatus),r=He(c=>c.auth.loginSource),i=He(c=>c.auth.socialAuthStatus),l=He(c=>c.auth.signupStatus),d=He(c=>c.activeAccount.activeAccountDetails),p=He(c=>{var Se;
1return(Se=c.activeBoard)==null?void 0:Se.boardDetails}),h=He(c=>c.createBoard.createdBoard),v=c=>{const Se=document.cookie.split(";");for(const ea of Se){const[fy,hy]=ea.trim().split("=");if(fy===c)return hy}return null},A=v("hb_user_email"),w=v("hb_mixpanel_distinct_id");Le.init(_i,{loaded:c=>{const Se=ra||w;Se&&(c.identify(Se),o&&c.identify(o))},debug:!1,ignore_dnt:!0});const N=async()=>{await Ne.init({key:Na,env:Ua}),H()},H=async()=>{if(ra){const c=await Ne.getDistinctID();c&&Ne.identify(c,ra)}};io.useEffect(()=>{N()},[]),Ce.useEffect(()=>{if(o){const c=`${d==null?void 0:d.partyId}`;window.oneSignalPush(Se=>{Se.login(c).then(()=>{Se.User.addEmail(d==null?void 0:d.email)})}),Le.people.set("$id",o)}},[o,d==null?void 0:d.partyId,d==null?void 0:d.email]),Ce.useEffect(()=>{A?Le.people.set("$onesignal_user_id",A):d!=null&&d.partyId&&Le.people.set("$onesignal_user_id",d==null?void 0:d.partyId)},[d==null?void 0:d.partyId,A]);const Q=yh(p||h);io.useEffect(()=>{if(s==="fulfilled"){Ne.identify(o),Ne.saveUser(d.partyId,{email:d.email,firstName:d.firstName,lastName:d.lastName});const c=Le.get_distinct_id();Le.identify(o),ra&&Le.alias(c),Le.register_once({$email:d.email,$first_name:d.firstName,$last_name:d.lastName,$id:d.partyId,$login_type:d.loginType}),i==="fulfilled"&&Le.people.set({$first_name:d.firstName,$last_name:d.lastName,$email:d.email,$login_source:r}),g("Logged In",y({locationId:d.locationId,flow:"home",path:window.location.path,$email:d.email}))}l==="fulfilled"&&(Ne.identify(o),Ne.saveUser(d.partyId,{email:d.email,firstName:d.firstName,lastName:d.lastName}),Le.alias(o),Le.register_once({$email:d.email,$first_name:d.firstName,$last_name:d.lastName,$id:d.partyId,$login_type:d.loginType}),Le.people.set({$first_name:d.firstName,$last_name:d.lastName,$created:new Date,$email:d.email,$login_source:"HB"}),g("Signed Up",y({locationId:d.locationId,$email:d.email,path:window.location.path})))},[s,l]);const Y=()=>{Ne.reset(),Le.reset()},E=(c="",Se)=>{a.includes(c)||(t(ch(c)),g(c,y(Se||{})))},y=(c={})=>{let Se="";return window.screen.width<=500?Se="Web Mobile":Se="Web Desktop",{...Q,...c||{},...Tl,webVersion:Fi,channel:Se}},g=(c,Se)=>{Le.track(c,{...Se,trackedByHbSDK:!0}),Ne.track(c,Se)},D=c=>{g("Board Deleted",y(c))},F=c=>{g("Hoot Deleted",y(c))},J=c=>{g("Member Removed",y(c))},q=c=>{g("Subscription Cancelled",y(c))},K=c=>{g("Subscribed to Push Notifications",y(c))},he=c=>{g("Un-subscribed from Push Notifications",y(c))},ge=c=>{g("Web & Mobile Engagement Unit Limit Reached",y(c))},Re=c=>{g("Viewed My Hoots Page",y(c))},we=c=>{g("Viewed My Account Page",y(c))},b=c=>{g("Viewed My Boards Page",y(c))},k=c=>{g("Viewed All Boards Page",y(c))},M=c=>{g("Quick Start Guide Item Completed",y(c))},oe=c=>{g("Product Tour Started",y(c))},le=c=>{g("Product Tour Completed",y(c))},X=c=>{g("Account Activated",y(c))},Oe=c=>{g("Viewed HootBoard Page",y(c))},Ie=c=>{g("Viewed Hoot Display Page",y(c))},Dt=(c,Se)=>{let ea="Hoot Posted";Se&&(ea="Hoot Edited"),g(ea,y(c))},Ho=c=>{g("Invitation Sent",y(c))},xo=c=>{g("Invitation Accepted",y(c))},Mo=c=>{g("Board Followed",y(c))},Oo=c=>{g("Collection Created",y(c))},jo=c=>{g("Board Embed Copied",y(c))},qo=c=>{g("Item Shared",y(c))},_o=c=>{g("Viewed Calendar Page",y(c))},$o=c=>{g("Connector Rule Created",y(c))},Go=c=>{g("Connector Account Created",y(c))},Vo=c=>{g("Viewed Connector Page",y(c))},Jo=()=>{E("Viewed Create Board Page",{path:window.location.href})},zo=c=>{g("Viewed Create Sub-Board Page",y({...c,path:window.location.href}))},Wo=c=>{g("Created a Board",y(c)),Ne.identify(d.partyId),Le.people.set({boardCreator:"true"}),Le.identify(d.partyId)},Yo=c=>{g("Board Settings Configured",y(c))},Ko=c=>{g("Sub-Board Removed",y(c))},Qo=c=>{g("Sub-Board Parent Removed",y(c))},re=c=>{g("Sub-Board Added",y(c))},$t=c=>{g("Invitation Revoked",y(c))},tt=c=>{g("Invitation Resent",y(c))},Zo=c=>{g("Viewed Manage Screens Page",y(c))},Xo=c=>{g("Downloaded Kiosk Hardware Details",y(c))},Fe=c=>{g("Clicked Kiosk Hardware Buy Button",y(c))},Nc=c=>{g("Screen License Applied",y(c))},Rc=c=>{g("Screen License Revoked",y(c))},Hc=c=>{g("Screen Created",y(c))},xc=c=>{g("Screen Deleted",y(c))},Mc=c=>{g("App Installed",y(c))},Oc=c=>{g("App Created",y(c))},jc=c=>{g("App Removed",y(c))},qc=c=>{g("Searched Boards",y(c))},_c=c=>{g("Viewed Board Upgrade Page",y(c))},$c=c=>{g("Board Upgraded",y(c))},Gc=c=>{g("Board Licenses Added",y(c))},Vc=c=>{g("Item Added To Cart",y(c))},Jc=c=>{g("Item Removed From Cart",y(c))},zc=c=>{g("Hoot Commented",y(c))},Wc=c=>{g("Hoot reHooted",y(c))},Yc=c=>{g("Viewed HomePage",y(c))},Kc=c=>{g("Saved HootBoard Content",y(c))},Qc=c=>{g("Viewed Analytics Page",y(c))},Zc=c=>{g("Viewed Saved HootBoard Content",y(c))},Xc=c=>{g("Viewed Message Center",y(c))},eu=c=>{g("Conversation Selected",y(c))},tu=c=>{g("Private Message Sent",y(c))},ou=c=>{g("Promote Your Business Page Viewed",y(c))},au=c=>{E("Create Board Flow Started",c)},su=c=>{E("Board Type Selection Form Viewed",c)},ru=c=>{g("Board Type Selection Form Saved",y(c))},nu=c=>{E("Basic Board Details Form Viewed",c)},iu=c=>{g("Basic Board Details Form Entered",y(c))},lu=c=>{g("Basic Board Details Form Saved",y(c))},du=c=>{E("Board Location Form Viewed",c)},cu=c=>{g("Board Location Form Entered",y(c))},uu=c=>{g("Board Location Form Saved",y(c))},pu=c=>{E("Board Business Contact Form Viewed",c)},yu=c=>{g("Board Business Contact Form Entered",y(c))},gu=c=>{g("Board Business Contact Form Saved",y(c))},mu=c=>{g("Board Business Contact Form Skipped",y(c))},fu=c=>{E("Board Business Hours Form Viewed",c)},hu=c=>{g("Board Business Hours Form Entered",y(c))},Su=c=>{g("Board Business Hours Form Saved ",y(c))},bu=c=>{g("Board Business Hours Form Skipped",y(c))},Eu=c=>{E("Board Business Photos Form Viewed",c)},wu=c=>{g("Board Business Photos Form Entered",y(c))},Iu=c=>{g("Board Business Photos Form Saved ",y(c))},vu=c=>{g("Board Business Photos Form Skipped",y(c))},Cu=c=>{t(uh()),g("Create Board Flow Ended",y(c))},Au=c=>{g("Business Search Page Viewed",y(c))},Du=c=>{g("Business Search Started",y(c))},Tu=c=>{g("Create New Business Flow Started",y(c))},Pu=c=>{g("Import Business Flow Started",y(c))},Bu=c=>{g("Existing Business Selected",y(c))},ku=c=>{g("Business Claim Started",y(c))},Lu=c=>{g("Business Claim Form Viewed",y(c))},Fu=c=>{g("Business Claim Form Entered",y(c))},Uu=c=>{g("Business Claim Process Finished",y(c))},Nu=c=>{g("Business Dashboard CTA Clicked",y(c))},Ru=c=>{g("Schedule Demo Page Viewed",y(c))},Hu=c=>{g("Promote On HootBoard Button Clicked",y(c))},xu=c=>{g("AdSpace Page Viewed",y(c))},Mu=c=>{g("AdSpace Network Approval Toggled",y(c))},Ou=c=>{g("AdSpace Screen Enrollment Clicked",y(c))},ju=c=>{g("AdSpace Screen Settings Opened",y(c))},qu=c=>{g("AdSpace Screen Settings Saved",y(c))},_u=c=>
1{g("AdSpace Screen Settings Step Viewed",y(c))},$u=c=>{g("Viewed Activity Feed Page",y(c))},Gu=c=>{g("Viewed Board App",y(c))},Vu=c=>{g("Analytics Activity Selected",y(c))},Ju=c=>{g("Analytics Channel Selected",y(c))},zu=c=>{g("Analytics Time Period Selected",y(c))},Wu=c=>{g("Analytics Report Downloaded",y(c))},Yu=c=>{g("Recommended App Installed",y(c))},Ku=c=>{g("Viewed List Details Page",y(c))},Qu=c=>{g("Viewed My Lists Page",y(c))},Zu=c=>{g("Item Removed From List",y(c))},Xu=c=>{g("Item Added To List",y(c))},ep=c=>{g("List Created",y(c))},tp=c=>{g("List Saved",y(c))},op=c=>{g("List Updated",y(c))},ap=c=>{g("List Deleted",y(c))},sp=c=>{g("List Item Updated",y(c))},rp=c=>{g("Clicked Buy Kiosk Button",y(c))},np=c=>{g("Viewed Buy Digital Kiosks Page",y(c))},ip=c=>{g("Viewed Board Subscribers Page",y(c))},lp=c=>{g("Clicked Download Subscribers List",y(c))},dp=c=>{g("Viewed Manage Sequences Page",y(c))},cp=c=>{g("Create Sequence Flow Started",y(c))},up=c=>{g("Basic Sequence Details Entered",y(c))},pp=c=>{g("Slot Content Layout Selected",y(c))},yp=c=>{g("Content Assigned To Zone",y(c))},gp=c=>{g("New Sequence Created",y(c))},mp=c=>{g("Create Sequence Flow Ended",y(c))},fp=c=>{g("Edit Sequence Flow Started",y(c))},hp=c=>{g("Edit Sequence Flow Ended",y(c))},Sp=c=>{g("Sequence Deleted",y(c))},bp=c=>{g("Sequence Assigned To A Schedule",y(c))},Ep=c=>{g("Sequence Removed From A Schedule",y(c))},wp=c=>{g("Content Assigned To Slot",y(c))},Ip=c=>{g("Collections Assigned To Screen Id",y(c))},vp=c=>{g("Sequence Assigned To Screen Id",y(c))},Cp=c=>{g("Total Slots Assigned In A Sequence",y(c))},Ap=c=>{g("Restricted Feature Accessed",y(c))},Dp=c=>{g("Clicked Upgrade Board Button",y(c))},Tp=c=>{g("Clicked Notify Admin Button",y(c))},Pp=c=>{g("Clicked Close Dialog Button",y(c))},Bp=c=>{g("Viewed Licenses Page",y(c))},kp=c=>{g("Viewed Interactive Kiosk Licenses",y(c))},Lp=c=>{g("Viewed Digital Signage Licenses",y(c))},Fp=c=>{g("Viewed My Premium Licenses Page",y(c))},Up=c=>{g("Clicked Customer Portal Link",y(c))},Np=c=>{g("Added License To Cart",y(c))},Rp=c=>{g("Toggled Pay Via Invoice",y(c))},Hp=c=>{g("Clicked Clear Cart Button",y(c))},xp=c=>{g("Clicked Checkout And Pay",y(c))},Mp=c=>{g("Completed License Upgrade",y(c))},Op=c=>{g("Failed License Upgrade",y(c))},jp=c=>{g("Viewed Web And Mobile Licenses",y(c))},qp=c=>{g("Clicked Upgrade App Button",y(c))},_p=c=>{g("Clicked Manage App Button",y(c))},$p=c=>{g("Initiated Checkout",y(c))},Gp=c=>{g("Initiated Payment",y(c))},Vp=c=>{g("Completed App Upgrade",y(c))},Jp=c=>{g("Failed App Upgrade",y(c))},zp=c=>{g("Viewed Customizations Tab",y(c))},Wp=c=>{g("Viewed Subscriptions Tab",y(c))},Yp=c=>{g("Clicked Go To Licenses",y(c))},Kp=c=>{g("Viewed Kiosk Bundle Licenses",y(c))},Qp=c=>{g("Viewed Board Usage Type Selection",y(c))},Zp=c=>{g("Saved Board Usage Type Selection",y(c))},Xp=c=>{g("Invited Co Admins Via Onboarding",y(c))},ey=c=>{g("Viewed Know Your Visitors Page",y(c))},ty=c=>{g("Changed Screen",y(c))},oy=c=>{g("Updated Date Filter",y(c))},ay=c=>{g("Clicked Subscribe Button",y(c))},sy=c=>{g("Downloaded Report",y(c))},ry=c=>{g("Accessed Restricted Analytics",y(c))},ny=c=>{g("Clicked Go To Licenses",y(c))},iy=c=>{g("Clicked No Thanks Button",y(c))},ly=c=>{g("Skipped Co Admins Invite",y(c))},dy=c=>{g("Viewed Integrations & Services Page",y(c))},cy=c=>{g("Viewed Integration Details",y(c))},uy=c=>{g("Installed an Integration",y(c))},py=c=>{g("Added a New Connection",y(c))},yy=c=>{g("Updated an Existing Connection",y(c))},gy=c=>{g("Deleted an Existing Connection",y(c))},my=c=>{g("Uninstalled an Integration",y(c))};return O.jsx(Dl.Provider,{value:{resetSession:Y,trackBoardDeleted:D,trackHootDeleted:F,trackMemberRemoved:J,trackSubscriptionCancelled:q,trackSubscribedToPushNotifications:K,trackUnSubscribedFromPushNotifications:he,trackWebMobileEngagementUnitLimitReached:ge,trackViewedMyHootsPage:Re,trackViewedMyAccountPage:we,trackViewedMyBoardsPage:b,trackViewedAllBoardsPage:k,scheduleDemoPageViewed:Ru,businessDashboardCTAClicked:Nu,promoteOnHootBoardButtonClicked:Hu,trackQuickStartGuideItemCompleted:M,trackProductTourStarted:oe,trackProductTourCompleted:le,trackViewedMessageCenter:Xc,trackConversationSelected:eu,trackPrivateMessageSent:tu,trackActivateAccount:X,trackViewedHootDisplayPage:Ie,trackViewedHootBoardPage:Oe,trackHootPosted:Dt,trackInvitationSe
1nt:Ho,trackInvitationAccepted:xo,trackBoardFollowed:Mo,trackCollectionCreated:Oo,trackBoardEmbedCopied:jo,trackItemShared:qo,trackViewedCalendarPage:_o,trackConnectorRuleCreated:$o,trackConnectorAccountCreated:Go,trackViewedConnectorPage:Vo,trackViewedCreateBoardPage:Jo,trackViewedCreateSubBoardPage:zo,trackCreatedBoard:Wo,trackBoardSettingsConfigured:Yo,trackSubBoardRemoved:Ko,trackSubBoardParentRemoved:Qo,trackSubBoardAdded:re,trackInvitationRevoked:$t,trackInvitationResent:tt,trackViewedManageScreensPage:Zo,trackDownloadedKioskHardwareDetails:Xo,trackClickedKioskHardwareBuyButton:Fe,trackScreenLicenseApplied:Nc,trackScreenLicenseRevoked:Rc,trackScreenCreated:Hc,trackScreenDeleted:xc,trackAppInstalled:Mc,trackAppCreated:Oc,trackAppRemoved:jc,trackSearchedBoards:qc,trackViewedBoardUpgradePage:_c,trackBoardUpgraded:$c,trackLicensesAdded:Gc,trackItemAddedToCart:Vc,trackItemRemovedFromCart:Jc,trackViewedHomePage:Yc,trackHootCommented:zc,trackHootReHooted:Wc,trackViewedAnalyticsPage:Qc,trackSavedHootBoardContent:Kc,trackViewedSavedHootBoardContent:Zc,trackPromoteYourBusinessPageViewed:ou,trackCreateBoardFlowStarted:au,trackBoardTypeSelectionFormViewed:su,trackBoardTypeSelectionFormSaved:ru,trackBasicBoardDetailsFormViewed:nu,trackBasicBoardDetailsFormEntered:iu,trackBasicBoardDetailsFormSaved:lu,trackBoardLocationFormViewed:du,trackBoardLocationFormEntered:cu,trackBoardLocationFormSaved:uu,trackBoardBusinessContactFormViewed:pu,trackBoardBusinessContactFormEntered:yu,trackBoardBusinessContactFormSaved:gu,trackBoardBusinessContactFormSkipped:mu,trackBoardBusinessHoursFormViewed:fu,trackBoardBusinessHoursFormEntered:hu,trackBoardBusinessHoursFormSaved:Su,trackBoardBusinessHoursFormSkipped:bu,trackBoardBusinessPhotosFormViewed:Eu,trackBoardBusinessPhotosFormEntered:wu,trackBoardBusinessPhotosFormSaved:Iu,trackBoardBusinessPhotosFormSkipped:vu,trackCreateBoardFlowEnded:Cu,trackBusinessSearchPageViewed:Au,trackBusinessSearchStarted:Du,trackCreateNewBusinessFlowStarted:Tu,trackImportBusinessFlowStarted:Pu,trackExistingBusinessSelected:Bu,trackBusinessClaimStarted:ku,trackBusinessClaimFormViewed:Lu,trackBusinessClaimFormEntered:Fu,trackBusinessClaimProcessFinished:Uu,trackViewedActivityFeedPage:$u,trackViewedBoardApp:Gu,trackAnalyticsActivitySelected:Vu,trackAnalyticsReportDownloaded:Wu,trackAnalyticsChannelSelected:Ju,trackAnalyticsTimePeriodSelected:zu,trackRecommendedAppInstalled:Yu,trackViewedListDetailsPage:Ku,trackViewedMyListsPage:Qu,trackItemRemovedFromList:Zu,trackItemAddedToList:Xu,trackListCreated:ep,trackListSaved:tp,trackListUpdated:op,trackListDeleted:ap,trackListItemUpdated:sp,trackBuyKioskButtonClicked:rp,trackViewedBuyDigitalKioskPage:np,trackViewedSubscribersList:ip,trackDownloadSubscribersList:lp,trackViewedManageSequences:dp,trackCreateSequenceFlowStarted:cp,trackBasicSequenceDetailsEntered:up,trackContentLayoutSelected:pp,trackContentAssignedToZone:yp,trackNewSequenceCreated:gp,trackCreateSequenceFlowEnded:mp,trackEditSequenceFlowStarted:fp,trackEditSequenceFlowEnded:hp,trackSequenceDeleted:Sp,trackSequenceAssignedToSchedule:bp,trackContentAssignedToSlot:wp,trackCollectionsAssignedToScreenId:Ip,trackSequenceAssignedToScreenId:vp,trackNumberOfSlotsAssigned:Cp,trackSequenceRemovedFromSchedule:Ep,trackRestrictedFeatureAccessed:Ap,trackClickedUpgradeBoardButton:Dp,trackClickedNotifyAdminButton:Tp,trackClickedCloseDialogButton:Pp,trackViewedLicensesPage:Bp,trackViewedInteractiveKioskLicenses:kp,trackViewedDigitalSignageLicenses:Lp,trackViewedMyPremiumLicensesPage:Fp,trackClickedCustomerPortalLink:Up,trackAddedLicenseToCart:Np,trackToggledPayViaInvoice:Rp,trackClickedClearCartButton:Hp,trackClickedCheckoutAndPay:xp,trackCompletedLicenseUpgrade:Mp,trackFailedLicenseUpgrade:Op,trackViewedWebAndMobileLicenses:jp,trackClickedUpgradeAppButton:qp,trackClickedManageAppButton:_p,trackInitiatedCheckout:$p,trackInitiatedPayment:Gp,trackCompletedAppUpgrade:Vp,trackFailedAppUpgrade:Jp,trackViewedCustomizationsTab:zp,trackViewedSubscriptionsTab:Wp,trackClickedGoToLicenses:Yp,trackViewedKioskBundleLicenses:Kp,trackViewedBoardUsageTypeSelection:Qp,trackSavedBoardUsageTypeSelection:Zp,trackInvitedCoAdminsViaOnboarding:Xp,trackViewedKnowYourVisitorsPage:ey,trackChangedScreen:ty,trackUpdatedDateFilter:oy,trackClickedSubscribeButton:ay,trackDownloadedReport:sy,trackAccessedRestrictedAnalytics:ry,trackClickedGoToLicensesButton:ny,trackClickedNoThanksButton:iy,trackSkippedCoAdminsInvite:ly,trackViewedIntegrationsAndServices:dy,trackViewedIntegrationDetail
1s:cy,trackInstalledAnIntegration:uy,trackAddedNewConnection:py,trackUpdatedExistingConnection:yy,trackDeletedExistingConnection:gy,trackUninstalledAnIntegration:my,trackAdSpacePageViewed:xu,trackAdSpaceNetworkApprovalToggled:Mu,trackAdSpaceScreenEnrollmentClicked:Ou,trackAdSpaceScreenSettingsOpened:ju,trackAdSpaceScreenSettingsSaved:qu,trackAdSpaceScreenSettingsStepViewed:_u},children:e.children})}const Tt={VA:"VA",ME:"ME",AA:"AA",SA:"SA",DA:"DA",FL:"FL"},LF=e=>{switch(e){case"VA":return"Voluntary Admin";case"ME":return"Poster";case"PV":return"Private Viewer";case"AA":return"Admin";case"SA":return"Super Admin";case"DA":return"DMO Admin";default:return"Follower"}},Pl=e=>{switch(e){case"VA":case"AA":case"SA":case"DA":return!0;default:return!1}},FF=e=>{switch(e){case"VA":case"ME":case"PV":case"AA":case"SA":case"DA":return!0;default:return!1}},UF=e=>{switch(e){case"VA":return"hb-brand-black";case"ME":return"hb-brand-purple";case"PV":return"hb-brand-red";case"AA":return"hb-brand-blue";case"SA":return"hb-brand-navy";case"DA":return"hb-brand-green";default:return"hb-brand-yellow"}},NF=e=>{switch(e){case"VA":return!0;case"ME":return!0;case"PV":return!1;case"AA":return!0;case"SA":return!0;case"DA":return!0;default:return!1}},RF=(e,t="pri")=>{const o=t!=="pri";switch(e){case"VA":return!1;case"ME":return!1;case"PV":return!o;case"AA":return!1;case"SA":return!1;case"DA":return!1;default:return!o}},HF=(e,t=!1,o=!1)=>{const a="If you want to create posts, please enter the community code shared by the board's admin",s="The admin has specifically activated settings to disable new requests.";switch(e){case"VA":return"You own this board and can manage all board settings.";case"ME":return"You can view all posts on this board as well as add content to the board, however you cannot manage any board settings.";case"PV":{let r="You can view both public & private posts on this board. However, you cannot post anything. ";return t&&o?r+=`${a} or request access.`:t?r+=a:o?r+="If you want to create posts, please request access.":r+=` ${s}`,r}case"AA":return"You have complete access to all of the board settings.";case"SA":return"You're a super admin and have complete access to the board.";case"DA":return"You own this board and have posting access.";default:{let r="You can view only public posts on this board and cannot post anything. ";return t&&o?r+=`${a} or request access.`:t?r+=a:o?r+="If you want to create posts, please request access.":r+=` ${s}`,r}}},xF=e=>{const t=["view-collections"];if(!e.hoot||!e.accountId||!e.activeBoard.membershipType)return t;const o={DEFAULT:"Default hoot on the board",AUTHOR:"Own hoot (Hoot created by the active user)",AUTHOR_REHOOT:"Own rehooted hoot (Author viewing on different board)",NON_AUTHOR:"Hoot created by someone else",REHOOT:"Rehooted hoot from other boards",SHARED_APP_HOOT:"Hoots from other boards (eg. shared collection)"},a={[Tt.AA]:{[o.DEFAULT]:["pin-unpin","remove","admin-message","screen-settings"],[o.AUTHOR]:["screen-settings","direct-promote","pin-unpin","delete","reschedule","edit","hide-hoot","admin-message","update-collections","privacy-settings","disable-comments","exclude-newsletters","tag-gated-visibility"],[o.AUTHOR_REHOOT]:["screen-settings","direct-promote","pin-unpin","delete","remove","reschedule","edit","hide-hoot","admin-message","update-collections","privacy-settings","disable-comments","exclude-newsletters","tag-gated-visibility"],[o.NON_AUTHOR]:["screen-settings","direct-promote","pin-unpin","delete","edit","reschedule","hide-hoot","update-collections","admin-message","privacy-settings","disable-comments","exclude-newsletters","tag-gated-visibility","hoot-approval"],[o.REHOOT]:["screen-settings","direct-promote","pin-unpin","remove","reschedule","hide-hoot","hoot-approval","admin-message","update-collections","privacy-settings","disable-comments","exclude-newsletters","tag-gated-visibility"],[o.SHARED_APP_HOOT]:["view-collections","shared-collection-app-info"]},[Tt.ME]:{[o.DEFAULT]:t,[o.AUTHOR]:["delete","edit","update-collections","reschedule"],[o.AUTHOR_REHOOT]:["delete","remove","edit","update-collections","reschedule"],[o.NON_AUTHOR]:t,[o.REHOOT]:t,[o.SHARED_APP_HOOT]:t}};a[Tt.DA]=a[Tt.AA],a[Tt.SA]=a[Tt.AA],a[Tt.VA]=a[Tt.AA];let s=o.SHARED_APP_HOOT;return["shared-collection"].includes(e.context)?s=o.SHARED_APP_HOOT:e.hoot.defaultHoot?s=o.DEFAULT:e.hoot.authorId===e.accountId?e.activeBoard.boardId!==e.hoot.owningBoardId&&e.hoot.postBoards.map(i=>i.boardId).includes(e.activeBoard.boardId)?s=o.AUTHOR_REHOOT:s=o.AUTHOR:e.activeBoard.boardId===e.hoot.owningBoardId?s=o.NON_AUTHOR:e.hoot.postBoards.map(i=>i.boardId).includes(e.activeBoard.boardId)&&(s=o.REHOOT),a[e.activeBoard.membershipType]?a[e.activeBoard.membershipType][s]:t},at=()=>{const e=Math.floor(Math.random()*Pa.length+0);return Pa[e].colorValue},MF=e=>{var t;return(t=Pa.find(o=>o.colorValue===e))==null?void 0:t.color},Pa=[{name:"white",color:"#fff",colorValue:"hoot-bgcolor-white",textColor:"text-gray-700"},{name:"grey",color:"#cfd9df",colorValue:"hoot-bgcolor-grey",textColor:"text-gray-700"},{name:"cyan",color:"#56d5d8",colorValue:"hoot-bgcolor-cyan",textColor:"text-gray-700"},{name:"yellow",color:"#ffda44",colorValue:"hoot-bgcolor-yellow",textColor:"text-gray-700"},{name:"brown",color:"#e2c495",colorValue:"hoot-bgcolor-brown",textColor:"text-gray-700"},{name:"pink",color:"#fcb1dc",colorValue:"hoot-bgcolor-pink",textColor:"text-gray-700"},{name:"violet",color:"#6a5385",colorValue:"hoot-bgcolor-violet",textColor:"text-white"},{name:"blue",color:"#2584e5",colorValue:"hoot-bgcolor-blue",textColor:"text-white"},{name:"green",color:"#3bab52",colorValue:"hoot-bgcolor-green",textColor:"text-white"},{name:"red",color:"#fe5756",colorValue:"hoot-bgcolor-red",textColor:"text-white"},{name:"darkblue",color:"#34495e",colorValue:"hoot-bgcolor-darkblue",textColor:"text-white"}],OF=e=>{const t=Pa.find(o=>o.colorValue===e);return t?t.color:null},wn=(e,t,o=!1,a=!1)=>{let s=Lr;return o&&(s=$i),a?`${s}b/${e}/${(t||"").replace(/ /g,"_")}`:`/b/${e}/${(t||"").replace(/ /g,"_")}`},jF=(e,t,o,a,s=!1,r=!1)=>
1{if(s)return;let i=`b/${e}/${t.replace(/ /g,"_")}/${o}/${a.replace(/ /g,"_")}`;return r?`${Lr}${i}`:"/"+i},yt={getAllCompletedSteps:"onBoarding/get-completed-steps/",markStepAsDone:"onBoarding/mark-step-as-done/"},mh=[],fh=e=>({type:yt.getAllCompletedSteps+"request",payload:e}),Gt=({boardId:e,startGuideTourName:t,saveOnRequest:o=!1})=>({type:yt.markStepAsDone+"request",payload:{boardId:e,startGuideTourName:t,saveOnRequest:o}}),In={completedSteps:[],getAllCompletedStepsAPIStatus:"idle",markStepAsDoneAPIStatus:"idle",isQuickStartGuideOpen:!1},Bl=j({name:"onBoarding",initialState:In,reducers:{resetGetAllCompletedStepsAPIStatus:e=>{e.getAllCompletedStepsAPIStatus="idle"},setQuickStartGuide:(e,t)=>{e.isQuickStartGuideOpen=t.payload},resetOnboarding:()=>In,removeCompletedSteps:(e,t)=>{const o=t.payload;e.completedSteps=e.completedSteps.filter(a=>!o.includes(a))}},extraReducers:{[yt.getAllCompletedSteps+"pending"]:e=>{e.getAllCompletedStepsAPIStatus="pending"},[yt.getAllCompletedSteps+"fulfilled"]:(e,t)=>{e.getAllCompletedStepsAPIStatus="fulfilled",e.completedSteps=t.payload.map(o=>o.startGuideTourName)},[yt.getAllCompletedSteps+"rejected"]:e=>{e.getAllCompletedStepsAPIStatus="rejected"},[yt.markStepAsDone+"request"]:(e,t)=>{if(t.payload.saveOnRequest){const o=t.payload.startGuideTourName;e.completedSteps=[...e.completedSteps,o]}},[yt.markStepAsDone+"pending"]:e=>{e.markStepAsDoneAPIStatus="pending"},[yt.markStepAsDone+"fulfilled"]:(e,t)=>{if(e.markStepAsDoneAPIStatus="fulfilled",!t.payload.saveOnRequest){const o=t.payload.startGuideTourName;e.completedSteps=[...e.completedSteps,o]}},[yt.markStepAsDone+"rejected"]:e=>{e.markStepAsDoneAPIStatus="rejected"}}}),{setQuickStartGuide:qF,resetOnboarding:_F}=Bl.actions,hh=Bl.reducer,Sh=async e=>U("membership/extended-roles",{payload:{email:e}}),Or=async()=>ie("private/accmgmt/info",null,null),kl=async()=>ie("private/accmgmt/settings/notifications",null,null),bh=async e=>await be("private/accmgmt/settings/notifications",e,null),Eh=async e=>await be("private/accmgmt/info",e,null),Ll=async e=>U("account/password/reset",{payload:e,method:"PATCH"}),wh=async e=>await be("private/accmgmt/email",{newEmail:e},null),Ih=async e=>await be("private/accmgmt/email/verification",{newEmail:e.newEmail},null),$F=e=>{const t={boardId:e.boardId};e.followBoard&&(t.followBoard=!0);const o=Me.stringify({client_id:e.ssoConfig.client_id,redirect_uri:e.ssoConfig.redirect_uri,response_mode:e.ssoConfig.response_mode,response_type:e.ssoConfig.response_type,scope:e.ssoConfig.scope,state:JSON.stringify(t)});return`${e.ssoConfig.sso_authorize_endpoint}?${o}`},GF=()=>{const e=Me.parse(window.location.search);if(e!=null&&e.sessionToken){po(e.sessionToken);const t=JSON.parse(e.state||"{}")||{};return vh(),t}return{}},vh=()=>{const e=Me.parse(window.location.search);delete e.sessionToken,delete e.authToken,delete e.boardId,delete e.state,history.replaceState({},"",`${window.location.pathname}?${Me.stringify(e)}`)},VF=()=>Me.parse(window.location.search).ssoAuthError?"Yikes! Something went wrong while logging in. Please contact support if this is happening regularly.":!1,JF=()=>!!window.localStorage.getItem("authToken"),Ch=30*24*60*60,po=e=>{window.localStorage.setItem("authToken",e);const t=window.location.protocol==="https:"?"; Secure":"";document.cookie=`authToken=${e}; domain=hootboard.com; path=/; max-age=${Ch}; SameSite=Lax${t}`},Ah=()=>{const e=window.localStorage.getItem("authToken");e&&po(e)},zF=e=>{document.cookie=e+"=; expires=Thu, 01-Jan-70 00:00:01 GMT; domain=hootboard.com; path=/"},Fl=async(e,t)=>{try{const o=await se("auth",{loginEmail:e,password:t},null,{rawResponse:!0});if(o.status===200){const a=o.headers.get("Authorization");return po(a.substring(a.indexOf(" ")+1)),{loginError:!1,activeError:!1}}else return await o.json()}catch(o){console.error(o)}},Ul=async e=>{const{fullName:t,loginEmail:o,password:a,existingUserId:s}=e;try{const r=await se("signup",{fullName:t,loginEmail:o,password:a,existPartyId:s},null,{rawResponse:!0}),i=await r.json();if(i&&!i.signupError){const l=r.headers.get("Authorization");po(l.substring(l.indexOf(" ")+1))}return i}catch(r){console.error(r)}},Dh=async e=>{try{const t=await se("auth/fb",{accesstoken:e.accessToken,email:e.email,fbType:"login",fbid:e.id,firstName:e.first_name,gender:e.gender,lastName:e.last_name,name:e.name,picUrl:e.picture.data.url},null,{rawResponse:!0});if(t.status===200){const o=t.headers.get("Authorization");po(o.substring(o.indexOf(" ")+1))}return!0}catch{}},Th=async e=>{try{const t=await se("auth/social",{accesstoken:e.accessToken,email:e.email,firstName:e.firstName,gender:"",lastName:e.lastName,name:e.name,picUrl:e.profilePicURL,
1clientId:e.clientId,loginSource:e.loginSource=="FB"?"FA":e.loginSource},null,{rawResponse:!0});if(t.status===200){const o=t.headers.get("Authorization");po(o.substring(o.indexOf(" ")+1))}return!0}catch{}},Nl=async e=>ie("validate/email",{loginEmail:e}),Ph=async e=>await se("password/forgot",{loginEmail:e}),Bh=async e=>await se("resend/email",{loginEmail:e}),kh=async e=>se("account/activate",{encPartyId:e,visitId:1}),ao={socialLogin:"auth/socialLogin/"};function*jr(){var e;try{const t=(e=Fa.parse(window.location.search))==null?void 0:e.service,o=t?tl[t]:void 0;o&&(yield m(async()=>await Nr({boardId:o})))}catch(t){console.error("Partner board auto-follow failed",t)}}function*Lh(){yield S("auth/login/request",function*(e){try{yield n({type:"auth/login/pending",payload:{}});const t=yield m(async()=>await Fl(e.payload.loginEmail,e.payload.password));if(t&&!t.loginError&&!t.activeError){const o=yield m(async()=>await Ke());o?yield n({type:"auth/login/fulfilled",payload:{loginSuccess:!0,networkError:!1,userDetails:o,...t}}):yield n({type:"auth/login/fulfilled",payload:{loginSuccess:!0,networkError:!1,userDetails:null,...t}})}else yield n({type:"auth/login/rejected",payload:{loginSuccess:!1,networkError:!1,...t,...t}})}catch{yield n({type:"auth/login/rejected",payload:{networkError:!0,activeError:!1,loginError:!1}})}})}function*Fh(){yield S("auth/resetPassword/request",function*(e){try{yield n({type:"auth/resetPassword/pending",payload:{}}),(yield m(async()=>await Ph(e.payload.resetPasswordEmail))).userExists?yield n({type:"auth/resetPassword/fulfilled",payload:{userExists:!0}}):yield n({type:"auth/resetPassword/rejected",payload:{userExists:!1}})}catch{yield n({type:"auth/resetPassword/rejected",payload:{}})}})}function*Uh(){yield S("auth/activation/email/resend/request",function*(e){try{yield n({type:"auth/activation/email/resend/pending",payload:{}}),(yield m(async()=>await Bh(e.payload.activationEmail))).userExists?yield n({type:"auth/activation/email/resend/fulfilled",payload:{userExists:!0}}):yield n({type:"auth/activation/email/resend/rejected",payload:{userExists:!1}})}catch{yield n({type:"auth/activation/email/resend/rejected",payload:{}})}})}function*Nh(){yield S("auth/email/validate/request",function*(e){try{yield n({type:"auth/email/validate/pending",payload:{}});const t=yield m(async()=>await Nl(e.payload.loginEmail));t?yield n({type:"auth/email/validate/fulfilled",payload:{response:t}}):yield n({type:"auth/email/validate/rejected",payload:{response:t}})}catch{yield n({type:"auth/email/validate/rejected",payload:{}})}})}function*Rh(){yield S("auth/signup/request",function*(e){try{yield n({type:"auth/signup/pending",payload:{}});const t=yield m(async()=>await Ul(e.payload.params));if(t&&!t.signupError){const o=yield m(async()=>await Ke());yield*jr(),o?yield n({type:"auth/signup/fulfilled",payload:{loginSuccess:!0,userDetails:o}}):yield n({type:"auth/signup/fulfilled",payload:{loginSuccess:!0,userDetails:null}})}else yield n({type:"auth/signup/rejected",payload:{userExists:!1}})}catch{yield n({type:"auth/signup/rejected",payload:{}})}})}function*Hh(){yield S("auth/signup/board/follow/request",function*(e){try{if(yield n({type:"auth/signup/board/follow/pending",payload:{}}),yield m(async()=>await Ul(e.payload.signupParams)))if(yield m(async()=>await Nr(e.payload.followBoardParams))){const a=yield m(async()=>await Ke());a?yield n({type:"auth/signup/board/follow/fulfilled",payload:{loginSuccess:!0,userDetails:a}}):yield n({type:"auth/signup/board/follow/rejected",payload:{loginSuccess:!0,userDetails:null}})}else yield n({type:"auth/signup/board/follow/rejected",payload:{loginSuccess:!0,userDetails:null}});else yield n({type:"auth/signup/board/follow/rejected",payload:{userExists:!1}})}catch{yield n({type:"auth/signup/board/follow/rejected",payload:{}})}})}function*xh(){yield S("auth/password/new/request",function*(e){try{yield n({type:"auth/password/new/pending",payload:{}}),(yield m(async()=>await Ll(e.payload)))?yield n({type:"auth/password/new/fulfilled",payload:{updatePasswordSuccess:!0}}):yield n({type:"auth/password/new/rejected",payload:{updatePasswordSuccess:!1}})}catch{yield n({type:"auth/password/new/rejected",payload:{}})}})}function*Mh(){yield S("auth/user/validate/request",function*(){try{yield n({type:"auth/user/validate/pending",payload:{}}),(yield m(async()=>await Ke()))?yield n({type:"auth/user/validate/fulfilled",payload:{updatePasswordSuccess:!0}}):yield n({type:"auth/user/validate/rejected",payload:{updatePasswordSuccess:!1}})}catch{yield n({type:"auth/user/validate/rejected",payload:{}})}})}function*Oh(){yield S("auth/facebookLogin/request",function*(e){try{if(yield n({type:"auth/facebookLogin/pending",payload:{}}),yield m(async()=>await Dh(e.payload))){const o=yield m(async()=>await Ke());yield*jr(),o?yield n({type:"auth/facebookLogin/fulfilled",payload:{loginSuccess:!0,userDetails:o}}):yield n({type:"auth/facebookLogin/fulfilled",payload:{loginSuccess:!0,userDetails:null}})}else yield n({type:"auth/facebookLogin/rejected",payload:{userExists:!1}})}catch{yield n({type:"auth/facebookLogin/rejected",payload:{}})}})}function*vn(){yield S(ao.socialLogin+"request",function*(e){try{if(yield n({type:ao.socialLogin+"pending",payload:{}}),!(yield m(async()=>await Th(e.payload))))throw new Error("Auth request failed!");const o=yield m(async()=>await Ke());if(!o)throw new Error("User details failed!");yield*jr(),yield n({type:ao.socialLogin+"fulfilled",payload:{loginSuccess:!0,userDetails:o}})}catch{yield n({type:ao.socialLogin+"rejected",payload:{}})}})}const jh=[vn(),Lh(),Fh(),Uh(),Nh(),Rh(),Hh(),xh(),Mh(),Oh(),vn()],Cn={activeAccountId:null,activeAccountDetails:null,activeAccountUserBoardsById:{},activeAccountUserBoardsFetchStatus:"idle",activeAccountUserDetailsFetchStatus:"idle",activeAccountUserDetailsFetchError:null,extendedRoles:[]};function ot(e){let t={};return[...e].sort((o,a)=>o.boardName.localeCompare(a.boardName)).map(o=>{t[o.boardId]=o}),t}const qh=e=>({type:"user/boards/list/request",payload:e}),WF=e=>
1({type:"user/details/request",payload:e}),Rl=j({name:"activeAccount",initialState:Cn,reducers:{setActiveAccount:(e,t)=>({...e,activeAccountId:t.payload.activeAccountId,activeAccountDetails:t.payload.activeAccountDetails,activeAccountUserBoardsById:{},activeAccountUserBoardsFetchStatus:"idle",activeAccountUserDetailsFetchStatus:"idle"}),resetActiveAccount:()=>Cn,setEmailValidated:e=>{e.activeAccountDetails&&(e.activeAccountDetails.emailValidated=!0)},setPasswordSet:e=>{e.activeAccountDetails&&(e.activeAccountDetails.isPasswordResetRequired=!1)}},extraReducers:{"user/boards/list/pending":e=>({...e,activeAccountUserBoardsFetchStatus:"pending"}),"user/boards/list/fulfilled":(e,t)=>({...e,activeAccountUserBoardsFetchStatus:"fulfilled",activeAccountUserBoardsById:ot(t.payload.userBoards)}),"board/access/change/fulfilled":(e,t)=>({...e,activeAccountUserBoardsFetchStatus:"fulfilled",activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"auth/signup/board/follow/fulfilled":(e,t)=>({...e,activeAccountUserBoardsFetchStatus:"fulfilled",activeAccountId:t.payload.userDetails.partyId,activeAccountDetails:t.payload.userDetails,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"user/boards/list/rejected":e=>({...e,activeAccountUserBoardsFetchStatus:"rejected"}),"auth/login/fulfilled":(e,t)=>({...e,activeAccountId:t.payload.userDetails.partyId,activeAccountDetails:t.payload.userDetails,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"auth/signup/fulfilled":(e,t)=>({...e,activeAccountId:t.payload.userDetails.partyId,activeAccountDetails:t.payload.userDetails,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"board/create/fulfilled":(e,t)=>({...e,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"board/follow/fulfilled":(e,t)=>({...e,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}),"user/account/update/fulfilled":(e,t)=>({...e,activeAccountDetails:t.payload.accountDetails}),"user/details/pending":e=>({...e,activeAccountUserDetailsFetchStatus:"pending",activeAccountUserDetailsFetchError:null}),"user/details/rejected":(e,t)=>{var o;return{...e,activeAccountUserDetailsFetchStatus:"rejected",activeAccountUserDetailsFetchError:((o=t.payload)==null?void 0:o.error)||null}},"user/details/fulfilled":(e,t)=>{const o=t.payload.userDetails.partyId;return localStorage.setItem("partyId",o),{...e,extendedRoles:t.payload.extendedRoles,activeAccountUserDetailsFetchStatus:"fulfilled",activeAccountId:o,activeAccountDetails:t.payload.userDetails,activeAccountUserBoardsById:ot(t.payload.userDetails.userBoards)}},"auth/facebookLogin/fulfilled":(e,t)=>{const o=t.payload.userDetails;e.activeAccountId=o.partyId,e.activeAccountDetails=o,e.activeAccountUserBoardsById=ot(o.userBoards)},[ao.socialLogin+"fulfilled"]:(e,t)=>{const o=t.payload.userDetails;e.activeAccountId=o.partyId,e.activeAccountDetails=o,e.activeAccountUserBoardsById=ot(o.userBoards)}}}),{setActiveAccount:YF,setEmailValidated:KF,resetActiveAccount:QF,setPasswordSet:ZF}=Rl.actions,_h=Rl.reducer,$h=async e=>U(`boards/${e}/apps`,{payload:{sharedCollections:!0}}),Bo=async(e,t)=>await ee("api/v2/private/screens/apps",{method:"POST",payload:t,extraHeaders:{"x-board-id":e}}),ko=async(e,t,o)=>{const a={"x-board-id":e};return await ee(`api/v2/private/screens/apps/${t}`,{method:"PUT",payload:o,extraHeaders:a})},XF=async(e,t)=>await ee("api/v2/private/screens/apps/discover",{method:"POST",payload:{url:t},extraHeaders:{"x-board-id":e}}),Gh=async(e,t)=>{const o={"x-board-id":e};return await ee(`api/v2/private/screens/apps/${t}`,{method:"DELETE",extraHeaders:o})},Vh=async e=>await ee("api/v2/private/platform/apps",{extraHeaders:{"x-board-id":e}}),Lo=async(e,t=!1)=>U(`boards/${e}/apps`,{payload:{sharedCollections:!0},extraHeaders:t?{"x-cache-action":"by-pass"}:{}}),Jh=async(e,t)=>await ee("api/v2/private/screens/apps",{method:"PUT",payload:t,extraHeaders:{"x-board-id":e}}),zh=(e,t)=>U("upload/sr",{payload:{...t,context:"files"},extraHeaders:{"x-board-id":e}}),Wh={basicInfoStepTitle:"Let's setup your HootBoard",logoSubtitle:"Get your logo on your organization's HootBoard. Your logo will be displayed in multiple places like the board banner, search results and emails.",locationStepSubtitle:"HootBoard is your partner in finding creative ways to power location-based experiences.",locationSearchLabel:"Search for a location",addressLabel:"Your Address",addressPlaceholder:"",addressSubtitle:`Enter the postal address for your organization, use address line 1 and address line 2 fields along
2with the pre-filled fields to be help your customer locate and reach you quickly.`},Yh={},Kh={},Qh={logoSubtitle:"Get your logo on your HootBoard. Your logo will be displayed in multiple places like the board banner, search results and emails.",addressSubtitle:`Enter the postal address, use address line 1 and address line 2 fields along
3with the pre-filled fields to be help visitor locate and reach you quickly.`},Zh={categorySubtitle:"Select categories that best describes your business.",descriptionSubtitle:"Describe your board briefly to your potential customers, highlight your products, services or experiences."},Xh={},eS={},tS={basicInfoStepTitle:"Create a business profile",categorySubtitle:"Select categories that best describes your business.",categorySubtitleV2:"Select categories that best describes your business.",descriptionSubtitle:"Describe your business briefly to your potential customers, highlight your products, services or experiences.",logoSubtitle:`Put your logo centre stage and in front of your potential customers.
4Your logo will be displayed in multiple places like the HootBoard Cityguide, board banner, search results, emails and more.`,locationStepSubtitle:"Adding an accurate location helps HootBoard direct people to your business easily. Be as specific and accurate as possible.",addressLabel:"Your Business Address",addressSubtitle:`Enter the postal address for your business, use address line 1 and address line 2 fields along
5with the pre-filled fields to be help your customer locate and reach you quickly`,contactDetailsStepSubtitle:"Give your customers, multiple ways to reach you.",phoneNumberSubt
5itle:"Adding a phone number increases the chances of a customer getting in touch with you after they encounter your business on HootBoard.",websiteSubtitle:"Let your customer see what you want them to see, showcase your beautifully crafted website to your prospective customers.",businessHoursStepSubtitle:"Let your customers know when you’re open and ready for business.",photosStepSubtitle:`Photos are a great way to capture and showcase your products, services or experiences.
6Add some of the best snaps of your business and help your customer see the great things in store for them when they visit.`},oS={},An={common:Wh,HSC:Yh,HDT:Kh,HGI:Qh,HSI:Zh,HEE:Xh,HCE:eS,HLB:tS,HET:oS},eU=e=>{if(e)return e.replace(/^(almost|over|about|less than|more than)\s+/i,"").replace(/a few seconds?/i,"now").replace(/seconds?/i,"now").replace(/minutes?/i,"m").replace(/hours?/i,"h").replace(/days?/i,"d").replace(/weeks?/i,"w").replace(/months?/i,"mo").replace(/years?/i,"y").replace(/\s*ago\s*/i,"").replace(/\s+/g,"").trim()},tU=e=>({...An.common,...e?An[e]:null}),fo=(e={})=>{var a;const t=((a=localStorage.getItem("authToken"))==null?void 0:a.trim())||"",o=e.additionalParams||{};e.noToken||(o.token=t),window.open([Ri,e.subPages||"","?",Me.stringify(o)].join(""),"_blank")},Dn=e=>{const t=e.locations||[];if(t.length===0)return e;const o=t[0].regionCode,s=t[0].countryCode==="US"&&["NY","NJ","CT","PA"].includes(o),{isCustomAdvertisingPromptEnabled:r}=e.customSettings||{};return{...e,isAdvertisingEnabled:r?!0:e.boardType==="HLB"?s:!1}},aS=e=>new RegExp(/https?:\/\/([\S]+)\/b\/([0-9]+)?\/(\w+)/gm).test(location.href)?Me.parse(location.search)[e]:!1,sS=e=>Object.keys(e||{}).reduce((t,o)=>({...t,...Object.values(I).reduce((a,s)=>({...a,[e[o]+s]:r=>{r[o+"APIStatus"]=s}}),{})}),{}),oU=(e,t=2)=>{if(e===0)return"0 Bytes";const o=1024,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,s)).toFixed(t))+" "+a[s]},rS=e=>new Promise((t,o)=>{const a=new XMLHttpRequest;if(a.upload.addEventListener("progress",s=>e.onProgress(+(s.loaded/s.total).toFixed(2))),a.addEventListener("load",()=>t({status:a.status,body:a.responseText})),a.addEventListener("error",()=>o(new Error("File upload failed"))),a.addEventListener("abort",()=>o(new Error("File upload aborted"))),a.open("PUT",e.url,!0),typeof e.files[Symbol.iterator]=="function"){const s=new FormData;Array.from(e.files).forEach((r,i)=>s.append(i.toString(),r)),a.send(s)}else a.send(e.files)}),aU=e=>/.(jpg|jpeg|png|gif|svg)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Image.svg":/.(pdf)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/PDF.svg":/.(doc|docx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Word%20Doc.svg":/.(ppt|pptx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Power%20point.svg":/.(xls|xlsx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Excel%20file.svg":"https://d9yce0v7jgjpv.cloudfront.net/appicons/FIle%20Upload.svg",nS=e=>Object.fromEntries(Object.entries(e).filter(([,t])=>!!t)),sU=e=>`${Gi}?${new URLSearchParams({websiteName:"HootBoard",twitterUsername:"@HootBoard",...nS(e)})}`,iS=(e,t)=>U("upload/sr",{payload:{...t,context:"files"},extraHeaders:{"x-board-id":e}}),Hl=(...e)=>e.filter(t=>!!t).join(" ");function rU(e){const t=Object.keys(e[0]),o=t.join(","),a=(i,l)=>l??"",s=e.map(i=>t.map(l=>JSON.stringify(i[l],a)).join(","));return[o,...s].join(`\r
7`)}const nU=e=>{const t=e.toLowerCase();return["a","e","i","o","u"].includes(t.charAt(0))?"an":"a"},iU=e=>e.split(/([.!?]\s+)/).map((o,a)=>a%2===1||o.length===0?o:o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()).join(""),lS=e=>new Promise((t,o)=>{const a=new FileReader;a.onload=s=>t(s.target.result),a.onerror=()=>o(new Error("Failed to read file")),a.readAsDataURL(e)}),dS=e=>{var i;const t=e.split(","),o=((i=t[0].match(/:(.*?);/))==null?void 0:i[1])||"image/jpeg",a=atob(t[1]);let s=a.length;const r=new Uint8Array(s);for(;s--;)r[s]=a.charCodeAt(s);return new Blob([r],{type:o})},lU=async e=>{try{const t=dS(e.file),o=`app-icon-${Date.now()}.jpg`,a=await iS(e.boardId,{fileName:o,fileType:"image/jpeg"});if(!a.success)throw new Error("Failed to get signed upload request");return await rS({url:a.data.signedRequest,files:t,onProgress:()=>{}}),{url:a.data.url}}catch(t){throw console.error("Failed to upload app icon:",t),t}},dU=async(e,t)=>{const o=await lS(e);return new Promise((a,s)=>{const r=new Image;r.onload=()=>{const i=document.createElement("canvas");i.width=oo,i.height=oo;const l=i.getContext("2d");l.fillStyle="#ffffff",l.fillRect(0,0,i.width,i.height);let d,p,h,v;if(t)d=t.x,p=t.y,h=t.width,v=t.height;else{const A=Math.min(r.width,r.height);d=(r.width-A)/2,p=(r.height-A)/2,h=A,v=A}l.drawImage(r,d,p,h,v,0,0,oo,oo),a(i.toDataURL("image/jpeg",.9))},r.onerror=()=>s(new Error("Failed to load image")),r.src=o})},cS=async({iconUrl:e,iconColor:t})=>{const a=await(await fetch(`https://process.filestackapi.com/${Do}/${e}`)).text(),s=new DOMParser().parseFromString(a,"image/svg+xml");return s.querySelectorAll("*").forEach(r=>{const i=r.getAttribute("stroke");i&&i!=="none"&&r.setAttribute("stroke",t);const l=r.getAttribute("fill");l&&l!=="none"&&r.setAttribute("fill",t)}),new XMLSerializer().serializeToString(s)},uS=e=>`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(e)))}`,cU=async e=>{let t;if(e.iconColor){const o=await cS({iconUrl:e.iconUrl,iconColor:e.iconColor});
7t=uS(o)}else t=`https://process.filestackapi.com/${Do}/${e.iconUrl}`;return new Promise((o,a)=>{const s=new Image;s.crossOrigin="anonymous";const r=oo,i=20;s.onload=()=>{const l=document.createElement("canvas");l.width=r,l.height=r;const d=l.getContext("2d");d.fillStyle=e.selectedColor,d.fillRect(0,0,l.width,l.height),d.drawImage(s,i,i,l.width-i*2,l.height-i*2),o(l.toDataURL("image/jpeg",.9))},s.onerror=()=>{a(new Error(`Failed to load icon: ${e.iconUrl}`))},s.src=t})},Eo=e=>e.sort((o,a)=>o.pageNum!==a.pageNum?o.pageNum-a.pageNum:o.seqNumber-a.seqNumber);x("/board/fetchBoardApps",async({boardId:e})=>({response:await Lo(e)}));const uU=e=>({type:"board/details/request",payload:e}),pU=e=>({type:"board/leave/request",payload:e}),Wa=x("/board/embed/loadConfig",async({accessToken:e})=>({response:await yf(e)}));function na(e,{app:t,appProps:o}){e.boardApps&&(e.boardApps=e.boardApps.map(a=>a.boardAppsId===t.boardAppsId?{...a,appName:o.name,appIconUrl:o.iconUrl,showOnMobile:o.showOnMobile,showOnWeb:o.showOnWeb,private:o.appAccess!=="public",showAllScreens:o.showOnAllScreens}:a))}function ia(e,t){t!=null&&t.success&&(t!=null&&t.app)&&e.boardApps&&(e.boardApps=Eo([...e.boardApps,t.app]))}const xl=j({name:"activeBoard",initialState:{boardId:null,boardDetails:null,boardDetailsFetchStatus:"idle",boardDetailsFetchReason:null,leaveBoardStatus:"idle",boardApps:[],boardScreens:[],embedParams:null,loadEmbedConfigStatus:"idle",featureGateSettings:{}
7,hasMemberRestriction:!1,usageRestricted:!1,_boardDetailsSnapshot:null},reducers:{resetLeaveBoardStatus:e=>{e.leaveBoardStatus="idle"},setBoardRestrictions:(e,t)=>{e.hasMemberRestriction=t.payload},removeSubboard:(e,t)=>{if(!e.boardDetails)return;const o=e.boardDetails.subBoards.find(({boardId:a})=>a===t.payload.boardId);e.boardDetails.subBoards.splice(o,1)},selectActiveBoard:(e,t)=>({...e,boardId:t.payload,boardDetails:null,boardDetailsFetchStatus:"pending",boardApps:[],boardScreens:[],boardAppsFetchStatus:"pending",boardScreensFetchStatus:"pending"}),resetActiveBoard:e=>{let t=null;return localStorage.getItem("embed")&&(t=e.embedParams),{...e,boardId:null,boardDetails:null,boardDetailsFetchStatus:"idle",boardApps:[],boardScreens:[],embedParams:t}},refreshBoardDetails:(e,t)=>{e.boardDetails=Dn(t.payload.response)},optimisticBoardDetailsUpdate:(e,t)=>{e.boardDetails&&(e._boardDetailsSnapshot=JSON.parse(JSON.stringify(e.boardDetails)),e.boardDetails={...e.boardDetails,...t.payload})},rollbackBoardDetails:e=>{e._boardDetailsSnapsh
7ot&&(e.boardDetails=e._boardDetailsSnapshot),e._boardDetailsSnapshot=null},clearBoardDetailsSnapshot:e=>{e._boardDetailsSnapshot=null},setApps:(e,t)=>{e.boardApps=Eo(t.payload)},embedParamsAdded:(e,t)=>{e.embedParams=t.payload},setUsageRestriction:(e,t)=>{e.usageRestricted=t.payload},updateBoardCustomSetting:(e,t)=>{var s;const{key:o,value:a}=t.payload;(s=e.boardDetails)!=null&&s.customSettings&&(e.boardDetails.customSettings[o]=JSON.stringify(a))}},extraReducers:{"board/details/setApps":(e,t)=>{e.boardApps=Eo(t.payload)},"/manageScreenApps/deleteScreenApp/pending":(e,t)=>{const{appId:o}=t.meta.arg;e.boardApps&&(e.boardApps=e.boardApps.filter(a=>a.boardAppsId!==o))},"/manageScreenApps/updateWebApp/pending":(e,t)=>{na(e,t.meta.arg)},"/manageScreenApps/updateRSSFeedReaderApp/pending":(e,t)=>{na(e,t.meta.arg)},"/manageScreenApps/updateCollectionApp/pending":(e,t)=>{na(e,t.meta.arg)},"/manageScreenApps/updateCalendarApp/pending":(e,t)=>{na(e,t.meta.arg)},"/manageScreenApps/saveWebApp/fulfilled":(e,t)=>{ia(e,t.payload)},"/manageScreenApps/saveRSSFeedReaderApp/fulfilled":(e,t)=>{ia(e,t.payload)},"/manageScreenApps/saveCollectionApp/fulfilled":(e,t)=>{ia(e,t.payload)},"/manageScreenApps/saveCalendarApp/fulfilled":(e,t)=>{ia(e,t.payload)},"app-store/install-app/fulfilled":(e,t)=>{t.payload&&e.boardApps&&(e.boardApps=Eo([...e.boardApps,t.payload]))},"board/details/fulfilled":(e,t)=>{e.boardDetailsFetchStatus="fulfilled",e.boardAppsFetchStatus="fulfilled",t.payload.boardApps&&(e.boardApps=Eo(t.payload.boardApps||[])),e.boardDetails=Dn(t.payload.boardDetails),e.boardId=t.payload.boardDetails.boardId,e.featureGateSettings=t.payload.boardDetails.featureGateSettings},"board/details/pending":e=>({...e,boardDetailsFetchStatus:"pending",boardDetailsFetchReason:null,boardAppsFetchStatus:"pending",boardApps:null,boardDetails:null}),"board/details/rejected":(e,t)=>{var o;return{...e,boardDetailsFetchStatus:"rejected",boardDetailsFetchReason:((o=t.payload)==null?void 0:o.reason)||null,boardAppsFetchStatus:"rejected",boardApps:null,boardDetails:null}},"board/leave/pending":e=>({...e,leaveBoardStatus:"pending"}),"board/leave/fulfilled":e=>({...e,leaveBoardStatus:"fulfilled"}),"board/leave/rejected":e=>({...e,leaveBoardStatus:"rejected"}),[Wa.fulfilled]:(e,t)=>{if(t.payload.response){const o=t.payload.response;if(o.data)return{...e,embedParams:{embed:!0,collections:o.data.collections.replace(/[#]/g,""),view:o.data.boardView,showPosterName:o.data.showPosterName,showComments:o.data.showComments,allowedDomains:o.data.allowedDomains},loadEmbedConfigStatus:"success"}}},[Wa.pending]:e=>({...e,loadEmbedConfigStatus:"pending"}),[Wa.rejected]:e=>({...e,loadEmbedConfigStatus:"rejected"})}}),{selectActiveBoard:yU,resetActiveBoard:gU,refreshBoardDetails:qt,optimisticBoardDetailsUpdate:pS,rollbackBoardDetails:yS,clearBoardDetailsSnapsh
7ot:gS,removeSubboard:mS,resetLeaveBoardStatus:mU,setApps:Ml,embedParamsAdded:fU,updateBoardCustomSetting:hU}=xl.actions,fS=xl.reducer,_t={start:0,max:20,addBoardPosts:!1,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!0,showScheduledHoots:!0,customURL:"",addUpdateCollectionStatus:"idle"},Ya=x("/manageBoard/checkUrl",async(e,t)=>{const{activeBoard:{boardId:o},manageBoard:{changes:{customUrl:a}}}=t.getState();return(await Rr(o,a)).data?{urlAvailable:!1}:{urlAvailable:!0,response:await il(o,a)}}),Ka=x("/manageBoard/deleteBoard",async e=>{var s;const t=await rl(e),o=(((s=t==null?void 0:t.data)==null?void 0:s.subBoards)||[]).length;if(o>0)throw new Error(`This board has ${o} sub-board${o>1?"s":""}. Please remove ${o>1?"them":"it"} and try again.`);const a=await zm(e);if(!(a!=null&&a.boardDeleted))throw new Error}),Qa=x("/manageBoard/fetchBoardData",async e=>await Qm(e,{start:0,max:1,addBoardPosts:!1,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!1,showScheduledHoots:!1})),hS=x("/manageBoard/refreshBoardDetails",async(e,t)=>{const o=await ke(e,_t);return t.dispatch(qt({response:o})),{boardDetails:o}}),Za=x("/manageBoard/saveManageBoardDetails",async({boardId:e,settings:t},o)=>{o.dispatch(pS({boardName:t.boardName,boardDesc:t.boardDesc,boardLogo:t.boardLogo,boardBackgroundImageLink:t.boardBackgroundImageLink,boardThemeCustomColors:t.boardThemeCustomColors,privateBoard:t.privateBoard,securedBoard:t.securedBoard}));try{const a=await Ra(e,{...xr(t),boardThemeCustomColors:JSON.stringify(t.boardThemeCustomColors),customHootThemeColors:t.customHootThemeColors?JSON.stringify(t.customHootThemeColors):null});return o.dispatch(gS()),o.dispatch(hS(e)),o.dispatch(qh()),{response:a}}catch(a){throw o.dispatch(yS()),a}}),Xa=x("/manageBoard/updateCollection",async(e,t)=>{const{manageBoard:{editingCollection:o},activeBoard:{boardId:a}}=t.getState(),s=await Zm(a,o.collectionId,{featured:o.featured,parentTagId:o.collectionParentId,price:o.price,tagText:`#${o.collectionName.replace(/#/g,"")}`}),r=await ke(a,_t);return t.dispatch(qt({response:r})),{response:s}}),la=x("/manageBoard/newBoardCollection",async(e,t)=>{const{manageBoard:{editingCollection:o},activeBoard:{boardId:a}}=t.getState(),s=await ef(a,{featured:o.featured,parentTagId:0,price:0,tagText:`#${o.collectionName.replace(/#/g,"")}`}),r=await ke(a,_t);return t.dispatch(qt({response:r})),{response:s}}),es=x("/manageBoard/deleteCollection",async({collectionId:e},t)=>{const{activeBoard:{boardId:o}}=t.getState(),a=await Xm(o,e),s=await ke(o,_t);return t.dispatch(qt({response:s})),{response:a}}),ts=x("/manageBoard/collectionFeaturedUpdated",async({filterId:e,featured:t},o)=>{const{activeBoard:{boardId:a}}=o.getState(),s=await tf(a,e,t),r=await ke(a,_t);return o.dispatch(qt({response:r})),{response:s}}),os=x("/manageBoard/updateWeeklyDigestDay",async({weeklyDigestDay:e},t)=>{const{activeBoard:{boardId:o}}=t.getState();return{response:await Vm(o,e)}}),as=x("/manageBoard/addParentBoard",async(e,t)=>{const{manageBoard:{tempParentBoard:o},activeBoard:{boardId:a}}=t.getState(),s=await nf(a,o.boardId),r=await ke(a,_t);return t.dispatch(qt({response:r})),{response:s}}),ss=x("/manageBoard/removeParentBoard",async(e,t)=>{const{manageBoard:{changes:{parentBoard:o}},activeBoard:{boardId:a}}=t.getState(),s=await lf(a,o.boardId),r=await ke(a,_t);return t.dispatch(qt({response:r})),{response:s}}),SS=x("/manageBoard/fetchParentBoard",async e=>ke(e)),bS=x("/manageBoard/fetchSubBoards",async e=>rl(e)),rs=x("/manageBoard/removeSubboard",async(e,t)=>{const{activeBoard:{boardId:o}}=t.getState(),a=await df(o,e);a.status&&t.dispatch(mS({boardId:e}));const s=await ke(o,_t);return t.dispatch(qt({response:s})),{response:a}}),Tn={fetchingBoardSettingsStatus:"idle",boardNameError:!1,boardDescriptionError:!1,boardCommunityCodeError:!1,subBoards:[],boardDeleteStatus:"idle",boardDeleteError:null,settings:{},changes:{},madeChanges:!1,editingCollection:null,editingCollectionIndex:-1,isAdding:!1,urlAvailable:!1,urlCheckStatus:null,recommendedColorScheme:{background:"",font:"",button:""},savingStatus:"",tempParentBoard:null,addingParentPending:!1,removingParentPending:!1,subBoardsToRemove:{},addUpdateCollectionStatus:"idle",addCollectionStatus:"idle",deleteCollectionStatus:"idle",collectionFeaturedUpdatedStatus:"idle",addCollectionMixpanelData:{}
7,isSaving:!1,boardInfoSelectedTab:0,pageType:"",isBoardDeletionRestricted:!1,_settingsSnapshot:null},Ol=j({name:"manageBoard",initialState:Tn,reducers:{updateHideHootDescription:(e,t)=>{e.changes.hideHootDescription=t.payload},setCustomHootThemeColors:(e,t)=>{e.changes.customHootThemeColors=t.payload},updateHidePosterName:(e,t)=>{e.changes.hidePosterName=t.payload},undoChanges:e=>{e.changes=e.settings,e.boardNameError=!1,e.boardDescriptionError=!1,e.boardCommunityCodeError=!1},setParentBoard:(e,t)=>{e.tempParentBoard=t.payload},deleteComplete:e=>{e.deleteStatus="",e.attemptingDelete=!1},setAttemptingDelete:(e,t)=>{e.attemptingDelete=t.payload,t.payload||(e.deleteStatus="")},setDefaultColorScheme:(e,t)=>{e.changes.boardThemeCustomColors={...e.changes.boardThemeCustomColors,...t.payload}},setRecommendedColorScheme:(e,t)=>{e.changes.boardThemeCustomColors={...e.changes.boardThemeCustomColors,colorPalette:"rec",...t.payload}},customUrlChanged:(e,t)=>{e.changes.customUrl=t.payload===""?null:t.payload,e.urlAvailable=!1,e.urlCheckStatus=null},setIsAddingCollection:e=>{e.isAdding=!0,e.editingCollection={collectionName:"",featured:!1}},editCollectionNameChanged:(e,t)=>{e.editingCollection.collectionName=Ci(t.payload)},editCollectionFeaturedChanged:(e,t)=>{e.editingCollection.featured=t.payload},setEditingCollection:(e,t)=>{const{collection:o,index:a}=t.payload;e.editingCollection=o,e.editingCollectionIndex=a},closeEditModal:e=>{e.editingCollection=null,e.editingCollectionIndex=-1,e.isAdding=!1},boardNameEntered:(e,t)=>{e.changes.boardName=Tr(t.payload),e.boardNameError=t.payload===""},boardDescEntered:(e,t)=>{e.changes.boardDesc=t.payload,e.boardDescriptionError=t.payload.length<80},boardLogoChanged:(e,t)=>{e.changes.boardLogo=t.payload},boardThemeColorPaletteChanged:(e,t)=>{e.changes.boardThemeCustomColors.colorPalette=t.payload},boardThemeButtonColorChanged:(e,t)=>{e.changes.boardThemeCustomColors.button=t.payload},boardThemeFontColorChanged:(e,t)=>{e.changes.boardThemeCustomColors.font=t.payload}
7,boardThemeBackgroundColorChanged:(e,t)=>{e.changes.boardThemeCustomColors.background=t.payload},backgroundImageLinkChanged:(e,t)=>{e.changes.boardBackgroundImageLink=t.payload},boardCommunityCodeChanged:(e,t)=>{e.changes.boardCommunityCode=t.payload,e.boardCommunityCodeError=t.payload.length<6},allowMembersToInviteOthersChanged:(e,t)=>{e.changes.allowMembersToInviteOthers=t.payload},screenJoiningAccessChanged:(e,t)=>{e.changes.screenJoiningAccess=t.payload},communityCodeRequiredChanged:(e,t)=>{e.changes.communityCodeRequired=t.payload},hootVisibilityChanged:(e,t)=>{e.changes.hootVisibility=t.payload},preApprovehootsChanged:(e,t)=>{e.changes.preApproveHoots=t.payload},preApproveCommentsChanged:(e,t)=>{e.changes.preApproveComments=t.payload},boardHideSearchChanged:(e,t)=>{e.changes.boardHideSearch=t.payload},secureBoardChanged:(e,t)=>{e.changes.securedBoard=t.payload},locationAdded:(e,t)=>{e.changes.locations.push(t.payload)},locationRemoved:(e,t)=>{e.changes.locations.splice(t.payload,1),e.changes.removeLocations=!0},privateBoardChanged:(e,t)=>{e.changes.privateBoard=t.payload,e.changes.requestAccessToPost=t.payload},requestPostToAccessChanged:(e,t)=>{e.changes.requestAccessToPost=t.payload,e.madeChanges=!0},updateLocation:(e,t)=>{e.changes.locations=[t.payload]},boardInfoTabView:(e,t)=>{e.boardInfoSelectedTab=t.payload},clearBoardDeleteError:e=>{e.boardDeleteError=null},clearBoardDeleteStatus:e=>{e.boardDeleteStatus="idle"},restrictBoardDeletion:(e,t)=>{e.isBoardDeletionRestricted=t.payload},addNewCollectionToUI:(e,t)=>{const o=t.payload;o.featured&&e.changes.boardCollections.forEach(a=>{a.featured=!1}),e.changes.boardCollections.push(o)},updateCollectionInUI:(e,t)=>{const{index:o,updatedCollection:a}=t.payload;o>=0&&(a.featured&&e.changes.boardCollections.forEach(s=>{s.featured=!1}),e.changes.boardCollections[o]=a)},removeCollectionFromUI:(e,t)=>{const{index:o}=t.payload;o>=0&&e.changes.boardCollections.splice(o,1)},initializeSettingsFromBoardDetails:(e,t)=>{const o=t.payload,a={...o,locations:o.locations?o.locations:[]},s=hr,r={boardThemeCustomColors:a.boardThemeCustomColors?Object.keys(a.boardThemeCustomColors).length===0?s:a.boardThemeCustomColors:s};e.settings={...a,...r},e.changes={...a,...r},e.urlAvailable=!1,e.urlCheckStatus=null,e.fetchingBoardSettingsStatus="fulfilled"}},extraReducers:{[Qa.fulfilled]:(e,t)=>{const o={...t.payload,locations:t.payload.locations?t.payload.locations:[]},a=hr,s={boardThemeCustomColors:o.boardThemeCustomColors?Object.keys(o.boardThemeCustomColors).length===0?a:o.boardThemeCustomColors:a};e.settings={...o,...s},e.changes={...o,...s},e.urlAvailable=!1,e.urlCheckStatus=null,e.fetchingBoardSettingsStatus="fulfilled"},[Qa.pending]:()=>({...Tn,fetchingBoardSettingsStatus:"pending"}),[Qa.rejected]:e=>{e.fetchingBoardSettingsStatus="rejected"},[SS.fulfilled]:(e,t)=>{e.changes.parentBoard=t.payload},[bS.fulfilled]:(e,t)=>{var o,a;e.subBoards=(((a=(o=t.payload)==null?void 0:o.data)==null?void 0:a.subBoards)||[]).map(s=>({boardId:s==null?void 0:s.id,boardName:s==null?void 0:s.name,boardLogo:s==null?void 0:s.logoUrl}))},[Za.fulfilled]:(e,t)=>{e.pageType===t.meta.arg.pageType&&(e._settingsSnapshot=null,e.savingStatus="fulfilled")},[Za.pending]:(e,t)=>{const o=t.meta.arg.pageType;e._settingsSnapshot=JSON.parse(JSON.stringify(e.settings)),e.settings={...e.changes},e.savingStatus="pending",e.pageType=o},[Za.rejected]:e=>{e._settingsSnapshot&&(e.settings=e._settingsSnapshot,e.changes=e._settingsSnapshot),e._settingsSnapshot=null,e.savingStatus="rejected"},[Xa.fulfilled]:e=>{e.changes.boardCollections[e.editingCollectionIndex].collectionName=`#${e.editingCollection.collectionName.replace(/#/g,"")}`,e.changes.boardCollections[e.editingCollectionIndex].featured=e.editingCollection.featured,e.editingCollection=null,e.editingCollectionIndex=-1,e.addUpdateCollectionStatus="success"},[Xa.pending]:e=>{e.addUpdateCollectionStatus="pending"},[Xa.rejected]:e=>{e.addUpdateCollectionStatus="rejected"},[es.fulfilled]:e=>{e.deleteCollectionStatus="success"},[es.pending]:(e,t)=>{const{index:o}=t.meta.arg;e.changes.boardCollections.splice(o,1)},[es.rejected]:()=>{},[la.pending]:e=>{e.addCollectionMixpanelData={}},[la.fulfilled]:(e,t)=>{const{response:{data:o,message:a}}=t.payload;a==="success"&&(e.changes.boardCollections.push({featured:o.featured,collectionId:o.filterId,parentTagId:o.parentTagId,price:o.price,collectionName:o.tagText}),e.addCollectionMixpanelData={collectionId:o.filterId,parentCollectionId:o.parentTagId,collectionPrice:o.price,collectionName:o.tagText},e.isAdding=!1,e.editingCollection=null,e.editingCollectionIndex=-1,e.addUpdateCollectionStatus="success",e.addCollectionStatus="success")},[la.pending]:e=>{e.addCollectionStatus="rejected",e.addUpdateCollectionStatus="pending"},[la.rejected]:e=>{e.addCollectionStatus="rejected",e.addUpdateCollectionStatus="rejected"},[os.fulfilled]:(e,t)=>{e.isSaving=!1,e.changes.weeklyDigestDay=t.meta.arg.weeklyDigestDay},[os.pending]:e=>{e.isSaving=!0},[os.rejected]:e=>{e.isSaving=!1},[ts.fulfilled]:(e,t)=>{const{response:o}=t.payload;e.collectionFeaturedUpdatedStatus="success",o.message!=="success"&&(e.changes.boardCollections=e.settings.boardCollections)},[ts.pending]:(e,t)=>{const{filterId:o,featured:a}=t.meta.arg;e.changes.boardCollections.forEach((s,r)=>{e.changes.boardCollections[r].collectionId===o?e.changes.boardCollections[r].featured=a:e.changes.boardCollections[r].featured=!1})},[ts.rejected]:e=>{e.changes.boardCollections=e.settings.boardCollections},[Ya.fulfilled]:(e,t)=>{const{urlAvailable:o}=t.payload;if(e.urlAvailable=o,!o){e.urlCheckStatus="rejected";return}e.urlCheckStatus="fulfilled",e.settings.customUrl=e.changes.customUrl},[Ya.pending]:e=>{e.urlCheckStatus="pending",e.urlAvailable=!1},[Ya.rejected]:e=>{e.urlCheckStatus="rejected",e.urlAvailable=!1},[Ka.fulfilled]:(e,t)=>{e.boardDeleteStatus="fulfilled"},[Ka.pending]:e=>{e.boardDeleteError=null,e.boardDeleteStatus="pending"},[Ka.rejected]:(e,t)=>{var o;e.boardDeleteStatus="rejected",e.boardDeleteError=((o=t.error)==null?void 0:o.message)||"Something went wrong and the board could not be deleted."},[as.fulfilled]:(e,t)=>{var o;e.addingParentPending=!1,t.payload.response.status&&(e.changes.parentBoard=e.tempParentBoard,e.changes.parentBoardId=(o=e.tempParentBoard)==null?void 0:o.boardId,e.tempParentBoard=null)},[as.pending]:e=>{e.addingParentPending=!0},[as.rejected]:e=>{e.addingParentPending=!1},[ss.fulfilled]:(e,t)=>{e.removingParentPending=!1,t.payload.response.status&&(e.changes.parentBoard=null,e.changes.parentBoardId=0)},[ss.pending]:e=>{e.removingParentPending=!0},[ss.rejected]:e=>{e.removingParentPending=!1},[rs.fulfilled]:(e,t)=>{const o=t.meta.arg;e.subBoards=e.subBoards.filter(a=>a.boardId!==o),delete e.subBoardsToRemove[o]},[rs.pending]:(e,t)=>{const o=t.meta.arg;e.subBoardsToRemove[o]=!0},[rs.rejected]:(e,t)=>{const o=t.meta.arg;delete e.subBoardsToRemove[o]}}}),{updateHideHootDescription:SU,updateHidePosterName:bU,backgroundImageLinkChanged:EU,setIsAddingCollection:wU,closeEditModal:IU,setEditingCollection:vU,boardNameEntered:CU,boardDescEntered:AU,boardLogoChanged:DU,boardThemeColorPaletteChanged:TU,boardThemeButtonColorChanged:PU,boardThemeFontColorChanged:BU,boardThemeBackgroun
7dColorChanged:kU,boardCommunityCodeChanged:LU,allowMembersToInviteOthersChanged:FU,communityCodeRequiredChanged:UU,hootVisibilityChanged:NU,setCustomHootThemeColors:RU,preApproveCommentsChanged:HU,preApprovehootsChanged:xU,boardHideSearchChanged:MU,secureBoardChanged:OU,privateBoardChanged:jU,requestPostToAccessChanged:qU,customUrlChanged:_U,setRecommendedColorScheme:$U,setDefaultColorScheme:GU,setParentBoard:VU,undoChanges:JU,updateLocation:zU,boardInfoTabView:ns,clearBoardDeleteError:WU,clearBoardDeleteStatus:YU,restrictBoardDeletion:KU,initializeSettingsFromBoardDetails:QU}=Ol.actions,ES=Ol.reducer,wS=async e=>U(`boards/${e}/members/pending`),IS=async(e,t)=>U(`boards/${e}/members/${t.memberId}/update`,{payload:{action:t.action,accessLevel:t.accessLevel},method:"PATCH"}),vS=async(e,t=20,o=0)=>U(`boards/${e}/subscribers?limit=${t}&offset=${o}`);function jl(e){switch(e){case 1:return"ME";case 2:return"AA";case 3:return"";case 4:return"FL";case 5:return"PV";default:return""}}function ZU(e){switch(e){case"AA":return"Admin";case"FL":return"Follower";case"PV":return"Private Viewer";case"SA":return"Super Admin";case"ME":return"Poster";default:return e}}const C={fetchManageMembersData:"manageMembers/fetchManageMembersData/",fetchMembersData:"manageMembers/fetchMembersData/",fetchPendingInvitesData:"manageMembers/fetchPendingInvitesData/",fetchRequestsData:"manageMembers/fetchRequestsData/",refreshPendingInvites:"manageMembers/refreshPendingInvites/",resendInvitation:"manageMembers/resendInvitation/",revokeInvitation:"manageMembers/revokeInvitation/",changeMemberType:"manageMembers/changeMemberType/",removeMember:"manageMembers/removeMember/",updateRequest:"manageMembers/updateRequest/",getAllSubscribers:"manageMembers/getAllSubscribers/",sendInvites:"manageMembers/sendInvites/",sendBulkInvite:"manageMembers/sendBulkInvite/"};function*CS(){yield S(C.fetchManageMembersData+u.REQUEST,function*(e){yield n({type:C.fetchMembersData+u.REQUEST,payload:e.payload}),yield n({type:C.fetchPendingInvitesData+u.REQUEST,payload:e.payload}),yield n({type:C.fetchRequestsData+u.REQUEST,payload:e.payload}),yield n({type:C.getAllSubscribers+u.REQUEST,payload:e.payload})})}function*AS(){yield S(C.fetchMembersData+u.REQUEST,function*(e){try{const{boardId:t}=e.payload;yield n({type:C.fetchMembersData+u.PENDING});const o=yield m(()=>nl(t));if(!o)throw new Error;if(!o.data)throw new Error;yield n({type:C.fetchMembersData+u.FULFILLED,payload:o.data.members})}catch(t){yield n({type:C.fetchMembersData+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*DS(){yield S(C.changeMemberType+u.REQUEST,function*(e){try{const{boardId:t,memberId:o,memberAccessCode:a}=e.payload;yield n({type:C.changeMemberType+u.PENDING,meta:{arg:{memberId:o}}});const s=yield m(()=>Km(t,o,jl(a)));if(!s)throw new Error;if(!s.success)throw new Error(s.message);yield n({type:C.changeMemberType+u.FULFILLED,payload:{response:s,memberId:o,memberAccessCode:a}})}catch(t){yield n({type:C.changeMemberType+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*TS(){yield S(C.removeMember+u.REQUEST,function*(e){try{const{boardId:t,memberId:o}=e.payload;yield n({type:C.removeMember+u.PENDING,meta:{arg:{memberId:o}}});const a=yield m(()=>sl(t,o));if(!a)throw new Error;yield n({type:C.removeMember+u.FULFILLED,payload:{response:a,memberId:o}})}catch(t){yield n({type:C.removeMember+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*PS(){yield S(C.fetchPendingInvitesData+u.REQUEST,function*(e){try{const{boardId:t}=e.payload;yield n({type:C.fetchPendingInvitesData+u.PENDING});const o=yield m(()=>dl(t));if(!o)throw new Error;if(!o.data)throw new Error;yield n({type:C.fetchPendingInvitesData+u.FULFILLED,payload:o.data})}catch(t){yield n({type:C.fetchPendingInvitesData+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*BS(){yield S(C.resendInvitation+u.REQUEST,function*(e){try{yield n({type:C.resendInvitation+u.PENDING,meta:{arg:e.payload}});const t=yield m(()=>Wm(e.payload));if(!t)throw new Error;yield n({type:C.resendInvitation+u.FULFILLED,payload:t,meta:{arg:e.payload}})}catch(t){yield n({type:C.resendInvitation+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC,meta:{arg:e.payload}})}})}function*kS(){yield S(C.revokeInvitation+u.REQUEST,function*(e){try{yield n({type:C.revokeInvitation+u.PENDING,meta:{arg:e.payload}});const t=yield m(()=>Ym(e.payload));if(!t)throw new Error;yield n({type:C.revokeInvitation+u.FULFILLED,payload:{response:t,invitationId:e.payload}})}catch(t){yield n({type:C.revokeInvitation+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*LS(){yield S(C.refreshPendingInvites+u.REQUEST,function*(e){try{yield n({type:C.refreshPendingInvites+u.PENDING});const t=yield m(()=>dl(e.payload));if(!t)throw new Error;yield n({type:C.refreshPendingInvites+u.FULFILLED,payload:t})}catch(t){yield n({type:C.refreshPendingInvites+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*FS(){yield S(C.updateRequest+u.REQUEST,function*(e){try{const{boardId:t,memberId:o,actionType:a,accessLevel:s}=e.payload;yield n({type:C.updateRequest+u.PENDING,meta:{arg:{memberId:o,actionType:a}}});const r=yield m(()=>IS(t,{memberId:o,accessLevel:s,action:a}));if(!r)throw new Error;if(r.error)throw new Error;a==="accept"&&s&&(yield n({type:C.fetchMembersData+u.REQUEST,payload:{boardId:t}}
7)),yield n({type:C.updateRequest+u.FULFILLED,payload:{response:r},meta:{arg:{memberId:o,actionType:a}}})}catch(t){const{memberId:o,actionType:a}=e.payload;yield n({type:C.updateRequest+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC,meta:{arg:{memberId:o,actionType:a}}})}})}function*US(){yield S(C.fetchRequestsData+u.REQUEST,function*(e){try{const{boardId:t}=e.payload;yield n({type:C.fetchRequestsData+u.PENDING});const o=yield m(()=>wS(t));if(!o)throw new Error;if(!o.data)throw new Error;if(!o.data.pendingRequests)throw new Error;yield n({type:C.fetchRequestsData+u.FULFILLED,payload:o.data.pendingRequests})}catch(t){yield n({type:C.fetchRequestsData+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*NS(){yield S(C.getAllSubscribers+u.REQUEST,function*(e){try{const{boardId:t,limit:o,offset:a}=e.payload;yield n({type:C.getAllSubscribers+u.PENDING});const s=yield m(()=>vS(t,o,a));if(!s)throw new Error;if(!s.success)throw new Error(s.errorMessage);if(!s.data.subscribers)throw new Error;yield n({type:C.getAllSubscribers+u.FULFILLED,payload:{subscribers:s.data.subscribers,subscribersCount:s.data.totalSubscriberCount||0}})}catch(t){yield n({type:C.getAllSubscribers+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*RS(){yield S(C.sendInvites+u.REQUEST,function*(e){try{const{boardId:t,boardAdmin:o,boardName:a,emails:s,message:r,displayName:i,selectedMemberType:l}=e.payload;yield n({type:C.sendInvites+u.PENDING});const d=yield m(()=>sf(t,{adminInvite:o,boardName:a,inviteEmails:s,inviteMsg:r,inviteeName:i,membType:l,partnerBoard:!1}));if(yield hi(1e3),yield n({type:C.refreshPendingInvites+u.REQUEST,payload:t}),!d)throw new Error;yield n({type:C.sendInvites+u.FULFILLED,payload:d})}catch{yield n({type:C.sendInvites+u.REJECTED})}})}function*HS(){yield S(C.sendBulkInvite+u.REQUEST,function*(e){try{const{boardId:t,bulkInviteCSVFileName:o,originalFileName:a,csvFile:s}=e.payload;yield n({type:C.sendBulkInvite+u.PENDING});const r=yield m(()=>rf(t,o,a,s));if(!r)throw new Error;yield hi(1e3),yield n({type:C.refreshPendingInvites+u.REQUEST,payload:t}),yield n({type:C.sendBulkInvite+u.FULFILLED,payload:r})}catch{yield n({type:C.sendBulkInvite+u.REJECTED})}})}const xS=[CS(),AS(),DS(),TS(),PS(),BS(),kS(),LS(),FS(),US(),NS(),RS(),HS()];//!validator.validate(action.payload.newEmail),
8const Ea=`Hey, Join our HootBoard please. It will only take 30 seconds, but it's worth it. It's a great way for us to post announcements, policies & events publicly OR privately. We can also use it as a forum or as a way to recognize our achievements. Once you open the board click "Accept Invitation".`,XU=R(C.updateRequest+u.REQUEST),eN=R(C.fetchManageMembersData+u.REQUEST);R(C.fetchMembersData+u.REQUEST);R(C.fetchPendingInvitesData+u.REQUEST);R(C.fetchRequestsData+u.REQUEST);R(C.refreshPendingInvites+u.REQUEST);const tN=R(C.resendInvitation+u.REQUEST),oN=R(C.revokeInvitation+u.REQUEST),aN=R(C.changeMemberType+u.REQUEST),sN=R(C.removeMember+u.REQUEST),rN=R(C.getAllSubscribers+u.REQUEST),nN=R(C.sendInvites+u.REQUEST),iN=R(C.sendBulkInvite+u.REQUEST),MS={isFetchingInitial:!0,fetchedForBoardId:null,members:[],pendingInvites:[],requests:[],filterMemberTypes:{},pendingChanges:{},resendingInvitations:{},revokingInvitations:{},requestsAccepting:{},requestsDeclining:{},getSubscribersData:[],totalSubscribersCount:0,getSubscribersState:f.IDLE,inviteMembers:{isShowing:!1,step:0,selectedMemberType:null,emails:"",emailValidationError:"",message:Ea,errorMessage:null,bulkInviteCSVFileName:"",originalFileName:"",uploadingCSV:!1,csvFile:null,recaptchaCompleted:!1,status:null},rowUpdated:null},ql=j({name:"manageMembers",initialState:MS,reducers:{selectMemberTypeFilter:(e,t)=>{e.filterMemberTypes[t.payload.memberType]=!0},removeMemberTypeFilter:(e,t)=>{delete e.filterMemberTypes[t.payload.memberType]},clearMemberTypeFilters:e=>{e.filterMemberTypes={}},setIsUploadingCSV:(e,t)=>{e.inviteMembers.uploadingCSV=t.payload},bulkInviteFileUploaded:(e,t)=>{const{genFileName:o,origFileName:a,csvFile:s}=t.payload;e.inviteMembers.bulkInviteCSVFileName=o,e.inviteMembers.originalFileName=a,e.inviteMembers.csvFile=s,e.inviteMembers.uploadingCSV=!1},recaptchaCompletedChanged:(e,t)=>{e.inviteMembers.recaptchaCompleted=t.payload},showInviteMembersModal:e=>{e.inviteMembers.isShowing=!0},close:e=>{e.inviteMembers.step=0,e.inviteMembers.isShowing=!1,e.inviteMembers.message=Ea,e.inviteMembers.selectedMemberType=null,e.inviteMembers.bulkInviteCSVFileName="",e.inviteMembers.originalFileName="",e.inviteMembers.status=null,e.inviteMembers.emailValidationError="",e.inviteMembers.recaptchaCompleted=!1,e.inviteMembers.emails=""},nextStep:e=>{e.inviteMembers.step+=1},jumpToStep:(e,t)=>{e.inviteMembers.step=t.payload,e.inviteMembers.recaptchaCompleted=!1},showErrors:()=>{},emailsChanged:(e,t)=>{e.inviteMembers.emails=(t.payload||"").replace(/;/g,","),e.inviteMembers.emailValidationError=""},updateEmailValidationMsg:(e,t)=>
8{e.inviteMembers.emailValidationError=t.payload},messageChanged:(e,t)=>{e.inviteMembers.message=t.payload},memberTypeSelected:(e,t)=>{e.inviteMembers.selectedMemberType=t.payload,e.inviteMembers.step+=1},clearMandatoryInviteMemberStep:e=>{e.inviteMembers.emails="",e.inviteMembers.message=Ea},reset:e=>{e.inviteMembers.step=0,e.inviteMembers.selectedMemberType=null,e.inviteMembers.message=Ea,e.inviteMembers.recaptchaCompleted=!1,e.inviteMembers.status=null,e.inviteMembers.emails="",e.inviteMembers.bulkInviteCSVFileName="",e.inviteMembers.originalFileName="",e.inviteMembers.emailValidationError=""},setRowUpdated:(e,t)=>{e.rowUpdated=t.payload}},extraReducers(e){e.addCase(C.fetchManageMembersData+u.REQUEST,(t,o)=>{var s;const a=((s=o.payload)==null?void 0:s.boardId)??null;t.fetchedForBoardId!==a&&(t.members=[],t.pendingInvites=[],t.requests=[],t.getSubscribersData=[],t.totalSubscribersCount=0),t.fetchedForBoardId=a}),e.addCase(C.fetchManageMembersData+u.PENDING,t=>{t.isFetchingInitial=!0}),e.addCase(C.fetchManageMembersData+u.FULFILLED,t=>{t.isFetchingInitial=!1}),e.addCase(C.fetchManageMembersData+u.REJECTED,t=>{t.isFetchingInitial=!1}),e.addCase(C.fetchMembersData+u.PENDING,t=>{t.isFetchingInitial=!0,t.filterMemberTypes={},t.pendingChanges={}}),e.addCase(C.fetchMembersData+u.FULFILLED,(t,o)=>{t.members=o.payload,t.isFetchingInitial=!1}),e.addCase(C.fetchMembersData+u.REJECTED,t=>{t.isFetchingInitial=!1}),e.addCase(C.changeMemberType+u.PENDING,(t,o)=>{const{memberId:a}=o.meta.arg;t.pendingChanges[a]="pending"}),e.addCase(C.changeMemberType+u.FULFILLED,(t,o)=>{const{response:a,memberId:s,memberAccessCode:r}=o.payload;if(t.pendingChanges[s]="fulfilled",!a)return;const i=t.members.findIndex(l=>l.memberId===s);if(r===3){t.members.splice(i,1);return}t.members[i].memberType=jl(r)}),e.addCase(C.changeMemberType+u.REJECTED,(t,o)=>{const{memberId:a}=o.meta.arg;t.pendingChanges[a]="rejected"}),e.addCase(C.removeMember+u.PENDING,(t,o)=>{const{memberId:a}=o.meta.arg;t.pendingChanges[a]="pending"}),e.addCase(C.removeMember+u.FULFILLED,(t,o)=>{const{memberId:a,response:s}=o.payload;if(!s){t.pendingChanges[a]="rejected";return}t.members=t.members.filter(r=>r.memberId!==a),t.pendingChanges[a]="fulfilled"}),e.addCase(C.removeMember+u.REJECTED,(t,o)=>{const{memberId:a}=o.meta.arg;t.pendingChanges[a]="rejected"}),e.addCase(C.fetchPendingInvitesData+u.PENDING,t=>{t.isFetchingInitial=!0,t.pendingInvites=[],t.revokingInvitations={},t.resendingInvitations={}}),e.addCase(C.fetchPendingInvitesData+u.FULFILLED,(t,o)=>{const a=o.payload;t.isFetchingInitial=!1,t.pendingInvites=a}),e.addCase(C.fetchPendingInvitesData+u.REJECTED,t=>{t.isFetchingInitial=!1}),e.addCase(C.refreshPendingInvites+u.PENDING,()=>{}),e.addCase(C.refreshPendingInvites+u.FULFILLED,(t,o)=>{const{data:a}=o.payload;t.pendingInvites=a||[]}),e.addCase(C.refreshPendingInvites+u.REJECTED,()=>{}),e.addCase(C.resendInvitation+u.PENDING,(t,o)=>{const a=o.meta.arg;t.resendingInvitations[a]="pending"}),e.addCase(C.resendInvitation+u.FULFILLED,(t,o)=>{const{resendInviteStatus:a}=o.payload,s=o.meta.arg;t.resendingInvitations[s]=a?"fulfilled":"rejected"}),e.addCase(C.resendInvitation+u.REJECTED,(t,o)=>{const a=o.meta.arg;t.resendingInvitations[a]="rejected"}),e.addCase(C.revokeInvitation+u.PENDING,(t,o)=>{const a=o.meta.arg;t.revokingInvitations[a]="pending"}),e.addCase(C.revokeInvitation+u.FULFILLED,(t,o)=>{const{response:a,invitationId:s}=o.payload;t.revokingInvitations[s]=a.removeInviteStatus?"fulfilled":"rejected"}),e.addCase(C.revokeInvitation+u.REJECTED,(t,o)=>{const a=o.meta.arg;t.revokingInvitations[a]="rejected"}),e.addCase(C.updateRequest+u.PENDING,(t,o)=>{const{memberId:a,actionType:s}=o.meta.arg;s==="accept"?t.requestsAccepting[a]="pending":t.requestsDeclining[a]="pending"}),e.addCase(C.updateRequest+u.FULFILLED,(t,o)=>{const{response:a}=o.payload,{success:s}=a,{memberId:r,actionType:i}=o.meta.arg;s&&(t.requests=t.requests.filter(({id:l})=>l!==r)),i==="accept"?t.requestsAccepting[r]=s?"fulfilled":"rejected":t.requestsDeclining[r]=s?"fulfilled":"rejected"}),e.addCase(C.updateRequest+u.REJECTED,(t,o)=>{const{memberId:a,actionType:s}=o.meta.arg;s==="accept"?t.requestsAccepting[a]="rejected":t.requestsDeclining[a]="rejected"}),e.addCase(C.fetchRequestsData+u.PENDING,t=>{t.isFetchingInitial=!0,t.requestsAccepting={},t.requestsDeclining={}}),e.addCase(C.fetchRequestsData+u.FULFILLED,(t,o)=>{const a=o.payload;t.isFetchingInitial=!1,t.requests=a}),e.addCase(C.fetchRequestsData+u.REJECTED,t=>{t.isFetchingInitial=!1}),e.addCase(C.getAllSubscribers+u.PENDING,t=>{t.getSubscribersState=f.PENDING}),e.addCase(C.getAllSubscribers+u.FULFILLED,(t,o)=>{const{subscribers:a,subscribersCount:s}=o.payload;t.getSubscribersData=a,t.getSubscribersState=u.FULFILLED,t.totalSubscribersCount=s}),e.addCase(C.getAllSubscribers+u.REJECTED,t=>{t.getSubscribersState=u.REJECTED}),e.addCase(C.sendInvites+u.PENDING,t=>{t.inviteMembers.errorMessage=null,t.inviteMembers.status="pending"}),e.addCase(C.sendInvites+u.FULFILLED,(t,o)=>
8{const{invitationSent:a,invitationExists:s}=o.payload.data[0];a||s?(t.inviteMembers.step=0,t.inviteMembers.selectedMemberType=null,t.inviteMembers.emails="",t.inviteMembers.status="fulfilled"):t.inviteMembers.status="rejected"}),e.addCase(C.sendInvites+u.REJECTED,t=>{t.inviteMembers.status="rejected"}),e.addCase(C.sendBulkInvite+u.PENDING,t=>{t.inviteMembers.status="pending"}),e.addCase(C.sendBulkInvite+u.FULFILLED,(t,o)=>{o.payload.data.length?(t.inviteMembers.step=0,t.inviteMembers.selectedMemberType=null,t.inviteMembers.status="fulfilled"):t.inviteMembers.status="rejected"}),e.addCase(C.sendBulkInvite+u.REJECTED,t=>{t.inviteMembers.status="rejected"})}}),{showInviteMembersModal:Ge,close:lN,jumpToStep:dN,emailsChanged:cN,memberTypeSelected:da,messageChanged:uN,recaptchaCompletedChanged:pN,bulkInviteFileUploaded:yN,reset:gN,setIsUploadingCSV:mN,updateEmailValidationMsg:fN,setRowUpdated:hN,clearMandatoryInviteMemberStep:SN}=ql.actions,OS=ql.reducer,_l=j({name:"visibility",initialState:{isHomePageActive:!1,publicDrawerHeight:0,isMobileView:!0,isLeaveBoardConfirmationModalVisible:!1,isOnboardingModalVisibile:!0,isBoardHeaderVisible:!0,isMiniBoardHeaderVisible:!1,isBoardAppsGridVisible:!1,isBoardAppsDockVisible:!0,isSideMenuVisible:!1,isSideDockVisible:!1,isPersonalNavigationOpen:!1,isHeaderVisible:!1,isBoardAppsVisible:!1,masonryReRenderCount:0,isUserMenuVisible:!1,isLeftDrawerVisible:!1,isBoardNavCollapsed:!1,isSideBarActivityFeedVisible:!1,isBoardAccessModalVisible:!1,updateScreenModalVisibility:"hidden",updateCustomMessageModalVisibility:"hidden",confirmationModalVisibility:"hidden",postHootModalVisibility:"hidden",activityFeedDrawerVisibility:"hidden",slideOutMarketingDrawerVisibility:"hidden",authModalVisibility:"hidden",accountEmailValidationPromptVisibility:"hidden",calendarVisibility:"hidden",boardAccessModalVisibility:"hidden",isPrivacyShieldActive:!1,smartAppBannerPath:null,isSmartAppBannerVisible:!1,isBoardSubscriberDownloadModalVisible:!1,accountSwitcherDialogVisibility:"hidden",accountSwitcherContext:null},reducers:{setSmartAppBannerPath:(e,t)=>{e.smartAppBannerPath=t.payload},toggleSmartAppBanner:(e,t)=>{e.isSmartAppBannerVisible=!!t.payload},setIsPrivacyShieldActive:(e,t)=>{e.isPrivacyShieldActive=t.payload},toggleLeaveBoardConfirmationModal:(e,t)=>{e.isLeaveBoardConfirmationModalVisible=t.payload},setHomePageActive:(e,t)=>{e.isHomePageActive=t.payload},setLeftDrawerVisibility:(e,t)=>{e.isLeftDrawerVisible=t.payload},toggleBoardNavCollapsed:e=>{e.isBoardNavCollapsed=!e.isBoardNavCollapsed},toggleMobileView:(e,t)=>{e.isMobileView=t.payload},setPublicDrawerHeight:(e,t)=>{e.publicDrawerHeight=t.payload},setOnboardingModalVisibility:(e,t)=>{e.isOnboardingModalVisibile=t.payload},setBoardAccessModalVisibility:(e,t)=>({...e,boardAccessModalVisibility:t.payload.visibility}),setCalendarVisibility:(e,t)=>({...e,calendarVisibility:t.payload.visibility}),setAuthModalVisibility:(e,t)=>({...e,authModalVisibility:t.payload.visibility}),setAccountEmailValidationPromptVisibility:(e,t)=>({...e,accountEmailValidationPromptVisibility:t.payload.visibility}),setSlideOutMarketingDrawerVisibility:(e,t)=>({...e,slideOutMarketingDrawerVisibility:t.payload.visibility}),setActivityFeedDrawerVisibility:(e,t)=>({...e,activityFeedDrawerVisibility:t.payload.visibility}),setConfirmationModalVisibility:(e,t)=>({...e,confirmationModalVisibility:t.payload.visibility}),setUpdateScreenModalVisibility:(e,t)=>({...e,updateScreenModalVisibility:t.payload.visibility}),setUpdateCustomMessageModalVisibility:(e,t)=>({...e,updateCustomMessageModalVisibility:t.payload.visibility}),showBoardAccessModal:e=>({...e,isBoardAccessModalVisible:!0}),hideBoardAccessModal:e=>({...e,isBoardAccessModalVisible:!1}),showSideBarActivityFeed:e=>({...e,isSideBarActivityFeedVisible:!0}),hideSideBarActivityFeed:e=>({...e,isSideBarActivityFeedVisible:!1}),showUserMenu:e=>({...e,isUserMenuVisible:!0}),hideUserMenu:e=>({...e,isUserMenuVisible:!1}),showDefaultHeader:e=>({...e,isDefaultHeaderVisible:!0,isMiniBoardHeaderVisible:!1}),toggleBoardAppsView:e=>
8({...e,isBoardAppsDockVisible:!e.isBoardAppsDockVisible,isBoardAppsGridVisible:!e.isBoardAppsGridVisible}),masonryReRendered:e=>({...e,masonryReRenderCount:e.masonryReRenderCount+1}),showBoardApps:e=>({...e,isBoardAppsVisible:!0}),showHeader:e=>({...e,isHeaderVisible:!0}),showPersonalNavigation:e=>({...e,isPersonalNavigationOpen:!0}),hidePersonalNavigation:e=>({...e,isPersonalNavigationOpen:!1}),showBoardHeader:e=>({...e,isMiniHeaderMiniVisible:!1,isBoardHeaderVisible:!0}),showMiniBoardHeader:e=>({...e,isMiniBoardHeaderVisible:!0,isBoardHeaderVisible:!1}),showBoardAppsGrid:e=>({...e,isBoardAppsDockVisible:!1,isBoardAppsGridVisible:!0}),showBoardAppsDock:e=>({...e,isBoardAppsGridVisible:!1,isBoardAppsDockVisible:!0}),setPostHootModalVisibility:(e,t)=>({...e,postHootModalVisibility:t.payload.visibility}),toggleBoardSubscriberDownloadModal:(e,t)=>({...e,isBoardSubscriberDownloadModalVisible:t.payload}),setAccountSwitcherDialogVisibility:(e,t)=>({...e,accountSwitcherDialogVisibility:t.payload.visibility,accountSwitcherContext:t.payload.context||null})},extraReducers:{"app/selectBoardMenu":(e,t)=>t.payload==="posts"?{...e,isBoardHeaderVisible:!0,isMiniBoardHeaderVisible:!1}:{...e,isBoardHeaderVisible:!1,isMiniBoardHeaderVisible:!0},"app/selectBoard":e=>({...e,isBoardHeaderVisible:!0,isMiniBoardHeaderVisible:!1})}}),{setSmartAppBannerPath:jS,setIsPrivacyShieldActive:bN,setHomePageActive:EN,toggleMobileView:wN,setPublicDrawerHeight:IN,toggleLeaveBoardConfirmationModal:vN,setOnboardingModalVisibility:CN,showBoardApps:AN,masonryReRendered:DN,setUpdateScreenModalVisibility:TN,setUpdateCustomMessageModalVisibility:PN,setConfirmationModalVisibility:BN,setPostHootModalVisibility:Ve,setLeftDrawerVisibility:kN,toggleBoardNavCollapsed:LN,setAccountEmailValidationPromptVisibility:FN,setAuthModalVisibility:UN,setBoardAccessModalVisibility:NN,toggleBoardSubscriberDownloadModal:RN,setAccountSwitcherDialogVisibility:qS}=_l.actions,_S=_l.reducer,$l=async(e,t={})=>{const o=localStorage.getItem("authToken"),a=await fetch(`${At}/${e}`,{method:t.method||"POST",headers:{"Content-Type":"application/json",...t.extraHeaders||{},...o?{Authorization:`Bearer ${o}`}:{}},body:JSON.stringify(t.payload)});if(!a.ok){const s=await a.json().catch(()=>({}));throw new Error(s.message||`API request failed: ${a.status}`)}return a.json()},$S=async(e,t)=>await $l("private/hoots",{payload:t,extraHeaders:{"x-board-id":e}}),GS=async(e,t,o)=>{const a={"x-board-id":e};return await $l(`private/hoots/${t}`,{payload:o,extraHeaders:a,method:"PUT"})},Gl=async({start:e=0,max:t=20,upcomingEvents:o=!1,freeEvents:a=!1})=>(await U("hoots/all",{payload:{start:e,max:t,upcomingEvents:o,freeEvents:a},method:"GET"})).data,Vl=async({start:e=0,max:t=20,upcomingEvents:o=!1,freeEvents:a=!1})=>(await U("user/hoots",{payload:{start:e,max:t,upcomingEvents:o,freeEvents:a},method:"GET"})).data,Jl=async({start:e=0,max:t=20,upcomingEvents:o=!1,freeEvents:a=!1})=>await ie("private/hoots/boards/pinned",{start:e,max:t,upcomingEvents:o,freeEvents:a},null),VS=async({postId:e})=>await ie("private/hoot/rehoot/boards",{postId:e},null),is={events:[],refreshId:0,eventsStore:[],yearlyEvents:[],datesWithEvents:[],eventsFetchStatus:"pending",viewType:"week",selectedDate:xe(new Date)},zl=j({name:"calendar",initialState:is,reducers:{refreshData:e=>{e.refreshId=e.refreshId+1},resetCalendar:e=>{e.viewType=is.viewType,e.selectedDate=is.selectedDate},filterEventsByDate:e=>{const t=e.selectedDate,o=e.eventsStore.filter(a=>{const s=pn(new Date(t),1),r=a.eventDetails.eventStartDateTime;let i=a.eventDetails[a.recurringEvent?"eventStartDateTime":"eventEndDateTime"]||r;const l=r.split("T")[1],d=i.split("T")[1];return l===d&&(i=un(new Date(i))),yn(s,{start:xe(Pe(r)),end:Ze(new Date(i))})});e.events=o},switchViewType:(e,t)=>{e.viewType=t.payload},selectYear:(e,t)=>{const o=t.payload,a=new Date(e.selectedDate);a.setFullYear(o),e.selectedDate=a,e.viewType="calendar"},selectDay:(e,t)=>{e.viewType!=="week"&&(e.viewType="week"),e.selectedDate=xe(new Date(t.payload))},navigateDate:(e,t)=>{const a=t.payload==="back",s=new Date(e.selectedDate);e.viewType==="week"&&s.setDate(s.getDate()+(a?-7:7)),e.viewType==="calendar"&&s.setMonth(s.getMonth()+(a?-1:1)),e.selectedDate=s}},extraReducers:{"calendar/events/get/request":e=>{e.eventsFetchStatus="pending",e.datesWithEvents=[]},"calendar/events/get/fulfilled":(e,t)=>
8{const o=t.payload.sort((i,l)=>new Date(i.eventDetails.eventStartDateTime).getTime()-new Date(l.eventDetails.eventStartDateTime).getTime());e.eventsFetchStatus="fulfilled",e.eventsStore=o;const a=[],s=Sa(new Date(e.selectedDate)),r=ba(new Date(e.selectedDate));for(const i of o){const l=i.eventDetails.eventStartDateTime;let d=i.eventDetails[i.recurringEvent?"eventStartDateTime":"eventEndDateTime"]||l;const p=l.split("T")[1],h=d.split("T")[1];p===h&&(d=un(new Date(d)));let v=new Date(s);for(;Ar(v,r);){const A=pn(new Date(v),1);if(yn(A,{start:xe(Pe(l)),end:Ze(new Date(d))})){const N=v.getDate();a.includes(N)||a.push(N)}v=Ei(v,1)}}e.datesWithEvents=a},"calendar/events/get/rejected":e=>{e.eventsFetchStatus="rejected"},"calendar/events/duration/get/request":e=>{e.eventsFetchStatus="pending"},"calendar/events/duration/get/fulfilled":(e,t)=>{const o=t.payload.sort((a,s)=>new Date(a.eventDetails.eventStartDateTime).getTime()-new Date(s.eventDetails.eventStartDateTime).getTime());e.eventsFetchStatus="fulfilled",e.yearlyEvents=o.sort((a,s)=>{const r=new Date(a.eventDetails.eventStartDateTime),i=new Date(s.eventDetails.eventStartDateTime);return r-i})},"calendar/events/duration/get/rejected":e=>{e.eventsFetchStatus="rejected"}}}),JS=e=>({type:"calendar/events/get/request",payload:e}),zS=e=>({type:"calendar/events/duration/get/request",payload:e}),{resetCalendar:WS,switchViewType:YS,filterEventsByDate:KS,selectDay:QS,selectYear:ZS,navigateDate:XS,refreshData:xa}=zl.actions,Wl=zl.reducer,e0=Object.freeze(Object.defineProperty({__proto__:null,default:Wl,filterEventsByDate:KS,getMonthlyEvents:JS,getYearlyEvents:zS,navigateDate:XS,refreshData:xa,resetCalendar:WS,selectDay:QS,selectYear:ZS,switchViewType:YS},Symbol.toStringTag,{value:"Module"})),yo=async(e,t)=>{const o={"x-board-id":e},a={start:t.start,limit:t.max,collectionsBehavior:"OR",showScheduledHoots:t.showScheduledHoots,freeEvents:t.freeEvents,upcomingEvents:t.upcomingEvents,showFeaturedCollection:t.showFeaturedCollection,searchString:t.searchString,sortBy:t.sortBy,sortOrder:t.sortOrder};return(await U("hoots",{payload:a,extraHeaders:o})).data},Ma=async e=>{const t={postId:e};let o="public/hoot/comment";return localStorage.getItem("authToken")&&(o="private/hoot/comment"),await ie(o,t,null)},qr=async(e,t)=>await se("private/hoot/favorite",{postId:t},{"x-board-id":e}),_r=async(e,t)=>{const o={"x-board-id":e};return await be(`private/hoot/favorite/${t}`,null,o)},t0=async(e,t)=>await U("hoots/rehoot",{method:"POST",payload:{boards:t,hootId:e}}),HN=async(e,t)=>await ie("private/hoot/mention",{hootId:t},{"x-board-id":e}),o0=async(e,t,o)=>await ee(`api/v2/private/boards/hoot/${o?"pin":"unpin"}/${t}`,{method:"PUT",extraHeaders:{"x-board-id":e}}),a0=async(e,t,o)=>await ee(`api/v2/private/boards/hootApproval/${t}`,{method:"PUT",payload:{approvalReqFrom:"permission",postApproval:o,removeMsg:""},extraHeaders:{"x-board-id":e}}),Yl=async(e,t,o="")=>await ee(`api/v2/private/hoot/expiry/${t}`,{method:"PUT",payload:{expiryDate:o},extraHeaders:{"x-board-id":e}}),s0=async(e,t,o="",a="")=>{const s={"x-board-id":e},r={hootScheduledDate:o,hootTimezone:a};return await be(`private/hoot/schedule/${t}`,r,s)},Oa=async(e,t={})=>await ee("api/v2/private/hoot/settings",{method:"POST",payload:t,extraHeaders:{"x-board-id":e}}),r0=async(e,t,o)=>await ee("api/v2/private/tags/post",{method:"POST",payload:{postId:t,tagText:o},extraHeaders:{"x-board-id":e}}),n0=async(e,t,o)=>await ee(`api/v2/private/tags/post/${t}`,{method:"PUT",payload:{tagText:o},extraHeaders:{"x-board-id":e}}),i0=async(e,t,o,a)=>await se("private/hoot/comment",{postId:t,mentionIds:o,commentText:a},{"x-board-id":e}),l0=async(e,t,o)=>{const a={"x-board-id":e};return await be(`private/hoot/comment/approve/${t}`,o,a)},d0=async(e,t)=>await jt(`private/hoot/comment/${t}/${e}`,null,null),c0=async(e,t)=>{const o={"x-board-id":e};return await ee(`api/v2/private/hoot/${t}`,{method:"DELETE",extraHeaders:o})},u0=async(e,t)=>{const o={"x-board-id":e};return await ee(`api/v2/private/hoot/remove/${t}`,{method:"PUT",payload:{adminNote:""},extraHeaders:o})},Sr=()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return"UTC"}},Kl=(e,t,o)=>{const a=typeof e=="string"?Pe(e):new Date(e);return _e(a,t,o)},Xe=e=>({id:e.id||0,listId:e.listId||0,listUid:e.listUid||null,postBoards:e.boards||e.listBoards||[],boardTagsList:e.collections,authorId:e.authorId?e.authorId:null,owningBoardId:e.owningBoardId?e.owningBoardId:null,requiresApproval:e.requiresApproval,isScheduled:e.scheduled?e.scheduled:!1,scheduledOnDate:e.scheduledOnDate?e.scheduledOnDate:null,type:e.type,isPinned:e.pinned,isSaved:e.saved,postedTime:e.postedTime,rehootAllowed:e.rehootAllowed,sourceType:e.sourceType,hootStats:e.stats?e.stats:{favorites:0,comments:0,rehoots:0},eventTextLocation:e.eventLoc&&e.eventLoc.eventTextLocation?e.eventLoc.eventTextLocation:null,pinnedComment:e.pinnedComment?e.pinnedComment:{commentText:null,commentPlainText:null,commenterName:null},...Zt.colors[e.styles.background],...y0(e),...m0(e),...E0(e),...f0(e.eventDetails),...I0(e.eventLoc),...v0(e.twitterInfo),...g0(e),...h0(e.authorInfo),...b0(e),thumbnail:e.thumbnail||null,...C0(e.button),...w0(e),...S0(e),...p0(e),postingCategory:e.postingCategory,hootBgColorClass:e.hootBgColor,customHootThemeColors:e.customHootThemeColors,recurringRule:e.recurringRule,hootExpiryDate:e.hootLevelExpDate,tags:e.tags});function p0(e){const t={disableComments:!1,expiryDate:null,excludeDigests:!1,favPost:!1,privateHoot:!0},{disableComments:o,expiryDate:a,excludeDigests:s,favPost:r,privateHoot:i}=e;return{manage:{...t,disableComments:o,setExpiryDate:a!=="",expiryDate:a!==""?a:null,excludeDigests:s,privateHoot:i},favPost:r}}function y0(e){const{title:t,showTitle:o,name:a}=e;return{title:t||a,showTitle:o||!0}}function g0(e){return e.collections&&e.collections.length?{collections:e.collections}:null}function m0(e){switch(e.hootType){case"HLVID":case"HLBLOG":return{description:e.userQuote?e.userQuote:null,plainTextDescription:e.userQuote?e.userQuote:null};default:{const{description:t,plainTextDescription:o}=e;return{description:t||null,plainTextDescription:o||null}}}}function f0(e){const t="EEE, yyyy MMM do h:mm a";let o={eventStartDateTime:null,eventEndDateTime:null,eventTimezone:null,freeEvent:!0};const a=l=>typeof l!="string"?!1:/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s/.test(l),s=l=>l?typeof l=="string"?l.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(l)?l.replace(" ","T"):`${l.replace(" ","T")}Z`:l:null,r=(l,d,p)=>{if(a(l))return l;try{const h=s(l);return h?Kl(h,d,p):null}catch(h){return console.warn("Failed to format timestamp:",l,h),null}}
8,i=(e==null?void 0:e.eventTimezone)||"America/New_York";if(e!=null&&e.eventTimezone&&(o={...o,eventTimezone:e.eventTimezone}),e!=null&&e.eventStartDateTime){const l=r(e.eventStartDateTime,i,t);l&&(o={...o,eventStartDateTime:l})}if(e!=null&&e.eventEndDateTime){const l=r(e.eventEndDateTime,i,t);l&&(o={...o,eventEndDateTime:l})}return{...o,freeEvent:e&&e.freeEvent||!1}}function h0(e){return e?{authorPictureUrl:e.authorPicExists?e.authorPictureUrl:null,authorName:e.authorName,authorInitials:e.authorInitials}:{}}function S0(e){return e.pdfUrl&&e.hootType==="UFPDF"?{pdfUrl:e.pdfUrl}:{pdfUrl:null}}function b0(e){return e.images&&e.images.small&&e.images.small.length?{largeImages:e.images.large,images:e.images.small}:e.listImageUrl?{images:[{url:e.listImageUrl,id:null,width:null,height:425}]}:null}function E0(e){switch(e.hootType){case"HLVID":case"HLBLOG":return{userQuote:e.desc?e.desc:e.postDesc?e.postDesc:null};default:return null}}function w0(e){return e.embedableMedia&&e.embedableMedia.length?e.embededMediaUrl&&e.embededMediaUrl.length?{mediaUrl:e.embededMediaUrl,mediaSnippet:e.embedableMedia}:{mediaUrl:null,mediaSnippet:e.embedableMedia}:e.embededMediaUrl&&e.embededMediaUrl.length?{mediaUrl:e.embededMediaUrl,mediaSnippet:null}:{mediaUrl:null,mediaSnippet:null}}function I0(e){return e&&e.eventLoc?e.eventLocationText?{eventLocationPlaceId:e.eventLocationPlaceId,eventLocationText:e.eventLocationText}:{eventLocationPlaceId:e.eventLocationPlaceId,eventLocationText:null}:{eventLocationPlaceId:null,eventLocationText:null}}function v0(e){return e&&e.twitterHandle&&e.twitterHandle.length&&e.twitterLink&&e.twitterLink.length?{twitterLink:e.twitterLink,twitterHandle:e.twitterHandle}:{twitterHandle:"",twitterLink:""}}function C0(e){if(e){const{buttonLink:t,buttonLabel:o}=e;if(t&&t!==""&&o&&o!=="")return{buttonLink:t,buttonLabel:o}}return{buttonLink:null,buttonLabel:null}}const pe={getBoards:"manage-screen-apps/get-boards/",getCollections:"manage-screen-apps/get-collections/",getSignedUploadRequest:"manage-screen-apps/get-signed-upload-request/",saveFileApp:"manage-screen-apps/save-file-app/",updateFileApp:"manage-screen-apps/update-file-app/"};function*A0(){const e=pe.getBoards;yield S(e+"request",function*(t){try{const{searchString:o}=t.payload;yield n({type:e+"pending"});const a=yield m(async()=>await Gm({searchString:o}));if(a.message!=="success"||!a.data)throw new Error(a);yield n({type:e+"fulfilled",payload:a.data})}catch(o){yield n({type:e+"rejected",payload:o})}})}function*D0(){const e=pe.getCollections;yield S(e+"request",function*(t){try{const{boardId:o}=t.payload;yield n({type:e+"pending"});const a=yield m(async()=>await $m({boardId:o}));if(a.message!=="success"||!a.data)throw new Error(a);yield n({type:e+"fulfilled",payload:a.data})}catch(o){yield n({type:e+"rejected",payload:o})}})}function*T0(){const e=pe.getSignedUploadRequest;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=yield m(()=>{const{boardId:a,fileName:s,fileType:r}=t.payload;return zh(a,{fileName:s,fileType:r})});if(!o.success)throw new Error(o);yield n({type:e+"fulfilled",payload:o.data})}catch(o){yield n({type:e+"rejected",payload:o})}})}function*P0(){const e=pe.saveFileApp;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=yield m(()=>{const{boardId:a,appProps:s,fileAppProps:r}=t.payload;return Bo(a,{boardAppsEndpoints:[{endpoint:r.url,collectionBehavior:"U",boardScreenId:s.selectedScreens.map(({screenId:i})=>i).join()}],appName:s.name,boardId:a,appTypeCode:s.type.appTypeCode,platformAppId:"9",showAllScreens:s.showOnAllScreens,appIconUrl:s.iconUrl,isPrivate:s.private,showOnMobile:s.showOnMobile,showOnWeb:s.showOnWeb})});if(o.message!=="success")return{success:!1};yield n({type:e+"fulfilled",payload:{success:!0,app:o.data}})}catch(o){yield n({type:e+"rejected",payload:o})}})}function*B0(){const e=pe.updateFileApp;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=yield m(()=>{const{boardId:s,appProps:r,fileAppProps:i,app:l}=t.payload;return ko(s,l.boardAppsId,{...l,appName:r.name,showAllScreens:r.showOnAllScreens,boardId:s,appIconUrl:r.iconUrl,isPrivate:r.appAccess!=="public",showOnMobile:r.showOnMobile,showOnWeb:r.showOnWeb,boardAppsEndpoints:[{...l.boardAppsEndpoints[0],endpoint:i.url,boardScreenId:r.selectedScreens.map(({screenId:d})=>d).join()}]})});if(o.message!=="success")return{success:!1};yield n({type:e+"fulfilled",payload:{success:!0,app:o.data}});const a=yield m(()=>Lo(t.payload.boardId));yield n({type:"board/details/setApps",payload:a.data})}catch(o){yield n({type:e+"rejected",payload:o})}})}const k0=[A0(),D0(),T0(),P0(),B0()],ja={isLoading:!1,searchString:"",boardsList:[],searchType:"board",selectedBoard:null,collectionsList:[]},et=({collections:e,noHash:t=!1})=>{let o=[...e].reduce((a,s)=>{const r=a==="",i=s.boardId+":";return a.includes(i)?a.replace(i,i+s.collection+","):a+(r?"":"|")+i+s.collection},"");return t&&(o=o.replace(/#/g,"")),o},$e=({endpoint:e,currentBoard:t,boards:o=[],noBoardName:a=!1})=>!e||e===""?[]:e.split("|").reduce((s,r)=>{const[i,l]=(r.includes(":")?r:`${t.boardId}:${r}`).split(":"),d=o.find(h=>h.boardId===+i);return[...l.split(",").map(h=>{const v={boardId:i,collection:"#"+h.replace("#","")};return a||(v.boardName=(d||t).boardName),v}),...s]},[]),xN=({boardId:e})=>({type:pe.getCollections+"request",payload:{boardId:e}}),MN=({searchString:e})=>({type:pe.getBoards+"request",payload:{searchString:e.replace("@","")}}),wo=({collections:e,selectedValues:t})=>{const o=({boardId:s,collection:r})=>`${s}-${r}`,a=t.map(s=>o(s));return e.filter(s=>{const r=o(s);return!a.includes(r)})},Pn=(e=[])=>$e({endpoint:e.reduce((t,o)=>[`${o.boardId}:${o.collections.join()}`,...t],[]).join("|"),noBoardName:!0}),$r={resetPanel:e=>{e.collectionAppProps.collectionSelector={...ja}},syncData:(e,t)=>{e.collectionAppProps.selectedCollections=t.payload},filterLocalCollections:(e,t)=>
8{const{searchString:o,boardDetails:{boardId:a,boardName:s,boardCollections:r}}=t.payload,{selectedCollections:i}=e.collectionAppProps,l=r.map(d=>d.collectionName).filter(d=>d.includes(o)).map(d=>({boardId:a,boardName:s.replace(/ /g,"_"),collection:d}));e.collectionAppProps.collectionSelector.selectedBoard={boardId:a,boardName:s},e.collectionAppProps.collectionSelector.searchType="collection",e.collectionAppProps.collectionSelector.collectionsList=wo({collections:l,selectedValues:i})},setSearchType:(e,t)=>{e.collectionAppProps.collectionSelector.searchType=t.payload},setSearchText:(e,t)=>{e.collectionAppProps.collectionSelector.searchString=t.payload,t.payload.includes("@")||(e.collectionAppProps.collectionSelector.selectedBoard=null)},removeCollection:(e,t)=>{const{index:o}=t.payload;e.collectionAppProps.selectedCollections=e.collectionAppProps.selectedCollections.filter((a,s)=>s!==o)},selectBoard:(e,t)=>{const{boardId:o,boardName:a}=t.payload;e.collectionAppProps.collectionSelector.searchString="@"+a,e.collectionAppProps.collectionSelector.searchType="collection",e.collectionAppProps.collectionSelector.selectedBoard={boardId:o,boardName:a}},selectCollection:(e,t)=>{const{collection:o}=t.payload,{boardId:a,boardName:s}=e.collectionAppProps.collectionSelector.selectedBoard;e.collectionAppProps.collectionSelector.searchString="",e.collectionAppProps.selectedCollections=[{boardId:a,boardName:s.replace(/ /g,"_"),collection:o},...e.collectionAppProps.selectedCollections]}},Gr={[pe.getBoards+"pending"]:e=>{e.collectionAppProps.collectionSelector.isLoading=!0},[pe.getBoards+"rejected"]:e=>{e.collectionAppProps.collectionSelector.isLoading=!1},[pe.getBoards+"fulfilled"]:(e,t)=>{e.collectionAppProps.collectionSelector.isLoading=!1,e.collectionAppProps.collectionSelector.boardsList=t.payload},[pe.getCollections+"pending"]:e=>{e.collectionAppProps.collectionSelector.isLoading=!0},[pe.getCollections+"rejected"]:e=>{e.collectionAppProps.collectionSelector.isLoading=!1},[pe.getCollections+"fulfilled"]:(e,t)=>{if(!e.collectionAppProps.collectionSelector.selectedBoard)return e;const{boardId:o,boardName:a}=e.collectionAppProps.collectionSelector.selectedBoard;e.collectionAppProps.collectionSelector.isLoading=!1,e.collectionAppProps.collectionSelector.collectionsList=wo({collections:t.payload.map(s=>({boardId:o,boardName:a,collection:s})),selectedValues:e.collectionAppProps.selectedCollections})}},ro={selectCollectionApp:"bulletin-board/select-collection-app/"};function*L0(){const e=ro.selectCollectionApp;yield S(e+"request",function*(t){try{const{boardId:o,params:a}=t.payload;yield n({type:ro.getRelatedTags+"request",payload:{boardId:o,params:{searchString:a.searchString,collectionsUnion:a.collectionsUnion}}}),yield n({type:e+"pending"});const s=yield m(async()=>await yo(o,a));if(!s)throw new Error(s);yield n({type:e+"fulfilled",payload:{data:s,params:a}})}catch(o){yield n({type:e+"rejected",payload:o})}})}const F0=[L0()],Rt=e=>{var Q,Y,E,y,g,D,F,J,q,K,he,ge,Re,we,b,k;const t=e.timestamp||e.createdAt;let o;try{typeof t=="string"?t.includes("T")?o=Pe(t.endsWith("Z")?t:`${t}Z`):o=Pe(`${t.replace(" ","T")}Z`):o=new Date(t)}catch{o=new Date(t)}const a=Dr(o,{addSuffix:!0}).replace(/\babout\s/g,"").replace(/\ban\b|\ba\b/g,"1"),s=(e==null?void 0:e.images)||{};let r=(e==null?void 0:e.thumbnail)||(s==null?void 0:s.thumbnail)||{};if((e==null?void 0:e.type)==="UFIMG"&&Array.isArray(e==null?void 0:e.images)){const M=e.images.find(oe=>oe.size==="SM");M&&(r=M)}const i=M=>M&&(M.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(M)?M.replace(" ","T"):`${M.replace(" ","T")}Z`),l=e!=null&&e.hootScheduledDateTime?_e(Pe(i(e.hootScheduledDateTime)),"UTC","yyyy-MM-dd'T'HH:mm:ss'Z'"):null,d="EEE, yyyy MMM do h:mm a",p=((Q=e==null?void 0:e.eventInfo)==null?void 0:Q.eventTimezone)||"America/New_York",h=(Y=e==null?void 0:e.eventInfo)!=null&&Y.eventStartDateTime?_e(Pe(i(e.eventInfo.eventStartDateTime)),p,d):null,v=(E=e==null?void 0:e.eventInfo)!=null&&E.eventEndDateTime?_e(Pe(i(e.eventInfo.eventEndDateTime)),p,d):null,A=[],w=[],N=[];return e!=null&&e.images&&e.images.length>
80&&e.images.forEach(M=>{const{size:oe,width:le,url:X,height:Oe}=M,Ie={size:oe,width:le||null,url:X||null,height:Oe||null};oe==="SM"?A.push(Ie):oe==="LG"?w.push(Ie):N.push(Ie)}),{id:(e==null?void 0:e.id)||0,owningBoardId:e==null?void 0:e.owningBoardId,authorId:(y=e==null?void 0:e.authorInfo)==null?void 0:y.id,requiresApproval:!(e!=null&&e.isApproved),scheduledOnDate:l,type:e==null?void 0:e.type,postedTime:a.includes("second")?"now":a,sourceType:null,stats:{favorites:(g=e==null?void 0:e.stats)==null?void 0:g.favCount,comments:(D=e==null?void 0:e.stats)==null?void 0:D.commentsCount,rehoots:(F=e==null?void 0:e.stats)==null?void 0:F.rehootCount},pinnedComment:{commentText:null,commentPlainText:null,commenterName:null},title:e==null?void 0:e.title,showTitle:!0,userQuote:e==null?void 0:e.userQuote,description:e==null?void 0:e.description,plainTextDescription:e==null?void 0:e.descriptionPlainText,location:{locationPlaceId:null,locationText:null,textLocation:""},eventDetails:{eventTimezone:(J=e==null?void 0:e.eventInfo)==null?void 0:J.eventTimezone,freeEvent:(q=e==null?void 0:e.eventInfo)==null?void 0:q.freeEvent,eventStartDateTime:h,eventEndDateTime:v},styles:{background:e==null?void 0:e.hootBgColor,font:null},twitterInfo:{twitterLink:(K=e==null?void 0:e.twitterInfo)==null?void 0:K.tweetUrl,twitterHandle:(he=e==null?void 0:e.twitterInfo)==null?void 0:he.twitterHandle},collections:[],authorInfo:{authorPicExists:!!((ge=e==null?void 0:e.authorInfo)!=null&&ge.imageUrl),authorPictureUrl:(Re=e==null?void 0:e.authorInfo)==null?void 0:Re.imageUrl,authorName:((we=e==null?void 0:e.authorInfo)==null?void 0:we.firstName)+" "+((b=e==null?void 0:e.authorInfo)==null?void 0:b.lastName),authorInitials:(k=e==null?void 0:e.authorInfo)==null?void 0:k.initials,bgColorCss:""},images:{type:e!=null&&e.images&&e.images.length>0?"TH":null,small:A,large:w,smaller:N},thumbnail:r!=null&&r.url?{url:r.url,width:r.width,height:r.height}:null,button:{buttonLabel:e.button.label,buttonLink:e.button.link},embedableMedia:{mediaUrl:null,mediaSnippet:null},pdfUrl:null,postImgUrl:"",photoPath:(r==null?void 0:r.url)||"",imgWidth:(r==null?void 0:r.width)||0,imgHeight:(r==null?void 0:r.height)||0,hootUrl:null,htmlFileName:"",widthClass:"w1",timeStamp:e==null?void 0:e.createdAt,boardPermPub:null,postingCategory:e==null?void 0:e.majorCategoryCode,hootFormatType:null,hootBgColor:e==null?void 0:e.hootBgColor,hootType:null,hootLocations:null,hootImageDims:null,thumbPath:null,originalImagePath:null,hootContentUrl:null,hootPoints:0,recurringRule:null,expiryDate:null,boards:null,hootTagsList:null,rehooters:null,timeZone:null,hootExpiryDate:null,admins:null,chargedAmount:null,boardTags:null,rehootAllowed:!!(e!=null&&e.isPublic),defaultHoot:!1,customHootThemeColors:typeof(e==null?void 0:e.customHootThemeColors)=="string"?JSON.parse(e.customHootThemeColors):e.customHootThemeColors,digFullScreenHoot:!1,digHootTimeoutInSec:null,upgradeNeeded:!1,pinned:e==null?void 0:e.isPinned,approved:(e==null?void 0:e.isApproved)===!0,scheduled:!!l,htmlThumbnail:!0,recurringEvent:!1,favPost:!1,saved:!1,privateHoot:!0,hootOwner:!1,loggedIn:!1,pinnedHoot:!1,owningBoardVisibPub:!1,commentDisable:!1,excludeDigest:!1,calendarOnly:!1,tags:(e==null?void 0:e.tags)||"",showOnlyWhenTagsSelected:!!(e!=null&&e.showOnlyWhenTagsSelected)}},U0=e=>{var w,N,H,Q,Y,E,y,g,D,F,J,q,K,he,ge,Re,we,b,k;const t=e.timestamp||e.createdAt;let o;try{typeof t=="string"?t.includes("T")?o=Pe(t.endsWith("Z")?t:`${t}Z`):o=Pe(`${t.replace(" ","T")}Z`):o=new Date(t)}catch{o=new Date(t)}const a=Dr(o,{addSuffix:!0}).replace(/\babout\s/g,"").replace(/\ban\b|\ba\b/g,"1"),s="EEE, yyyy MMM do h:mm a",r=((w=e==null?void 0:e.eventInfo)==null?void 0:w.eventTimezone)||"America/New_York",i=M=>M&&(M.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(M)?M.replace(" ","T"):`${M.replace(" ","T")}Z`),l=(N=e==null?void 0:e.eventInfo)!=null&&N.eventStartDateTime?_e(Pe(i(e.eventInfo.eventStartDateTime)),r,s):null,d=(H=e==null?void 0:e.eventInfo)!=null&&H.eventEndDateTime?_e(Pe(i(e.eventInfo.eventEndDateTime)),r,s):null,p=[],h=[],v=[];return e!=null&&e.images&&e.images.length>
80&&e.images.forEach(M=>{const{size:oe,width:le,url:X,height:Oe}=M,Ie={size:oe,width:le||null,url:X||null,height:Oe||null};oe==="SM"?p.push(Ie):oe==="LG"?h.push(Ie):v.push(Ie)}),{id:e==null?void 0:e.id,owningBoardId:e==null?void 0:e.owningBoardId,authorId:(Q=e==null?void 0:e.authorInfo)==null?void 0:Q.id,requiresApproval:!(e!=null&&e.isApproved),scheduledOnDate:"",type:e==null?void 0:e.type,postedTime:a.includes("second")?"now":a,sourceType:"",stats:{favorites:(Y=e==null?void 0:e.stats)==null?void 0:Y.favCount,comments:(E=e==null?void 0:e.stats)==null?void 0:E.commentsCount,rehoots:(y=e==null?void 0:e.stats)==null?void 0:y.rehootCount},pinnedComment:{commentText:null,commentPlainText:null,commenterName:null},title:e==null?void 0:e.title,showTitle:e==null?void 0:e.showTitle,userQuote:null,description:e==null?void 0:e.description,plainTextDescription:e==null?void 0:e.descriptionPlainText,location:{locationPlaceId:(g=e==null?void 0:e.eventInfo)==null?void 0:g.eventLocPlaceId,locationText:"",textLocation:""},eventDetails:{eventStartDateTime:l,eventEndDateTime:d,eventTimezone:(D=e==null?void 0:e.eventInfo)==null?void 0:D.eventTimezone,freeEvent:(F=e==null?void 0:e.eventInfo)==null?void 0:F.freeEvent},styles:{background:e==null?void 0:e.hootBgColor,font:(J=e==null?void 0:e.colorInfo)==null?void 0:J.font},twitterInfo:{twitterLink:null,twitterHandle:(q=e==null?void 0:e.twitterInfo)==null?void 0:q.twitterHandle},collections:[],authorInfo:{authorPicExists:!0,authorPictureUrl:(K=e==null?void 0:e.authorInfo)==null?void 0:K.imageUrl,authorName:((he=e==null?void 0:e.authorInfo)==null?void 0:he.firstName)+" "+((ge=e==null?void 0:e.authorInfo)==null?void 0:ge.lastName),authorInitials:(Re=e==null?void 0:e.authorInfo)==null?void 0:Re.initials,bgColorCss:""},images:{type:e!=null&&e.images&&e.images.length>0?"EI":null,small:p,large:h,smaller:v},button:{buttonLabel:(we=e==null?void 0:e.button)==null?void 0:we.label,buttonLink:(b=e==null?void 0:e.button)==null?void 0:b.link},embedableMedia:{mediaUrl:(k=e==null?void 0:e.embedMediaInfo)==null?void 0:k.url,mediaSnippet:null},pdfUrl:"",postImgUrl:"",photoPath:"",hootUrl:null,imgWidth:0,imgHeight:0,htmlFileName:null,widthClass:"w1",timeStamp:e==null?void 0:e.createdAt,boardPermPub:"pub",postingCategory:e==null?void 0:e.majorCategoryCode,hootFormatType:null,hootBgColor:e==null?void 0:e.hootBgColor,hootType:null,hootLocations:null,hootImageDims:null,thumbPath:null,originalImagePath:null,hootContentUrl:null,hootPoints:0,recurringRule:null,expiryDate:null,boards:null,hootTagsList:null,rehooters:null,timeZone:null,hootExpiryDate:null,admins:null,chargedAmount:null,boardTags:null,rehootAllowed:!!(e!=null&&e.isPublic),defaultHoot:!1,customHootThemeColors:e==null?void 0:e.customHootThemeColors,digFullScreenHoot:!1,digHootTimeoutInSec:null,upgradeNeeded:!1,scheduled:!1,pinned:e==null?void 0:e.isPinned,htmlThumbnail:e==null?void 0:e.hasThumbnail,recurringEvent:!1,favPost:!1,saved:!1,hootOwner:!1,loggedIn:!1,pinnedHoot:!1,owningBoardVisibPub:!1,commentDisable:!1,excludeDigest:!1,calendarOnly:!1,approved:e==null?void 0:e.isApproved,privateHoot:!(e!=null&&e.isPublic)}},ho=location.search.includes("fromHootTypeSelector"),N0=({app:e,state:t})=>{const{activeBoard:o,bulletinBoard:{fetchHootParams:a}}=t,s=o.boardId,{appName:r,appIconUrl:i}=e,{collectionBehavior:l,endpoint:d}=e.boardAppsEndpoints[0],p=et({collections:$e({currentBoard:{boardId:s},endpoint:d,noBoardName:!0}),noHash:!0}),h={...a,start:0,showScheduledHoots:o.boardDetails?o.boardDetails.boardAdmin:!1,searchString:p.replace(/#/g,""),collectionsUnion:!0};return{type:ro.selectCollectionApp+"request",payload:{app:{appName:r,appIconUrl:i,endpoint:p,collectionBehavior:l},boardId:s,params:h}}},Yt=x("/bulletinBoard/refreshData",async(e,t)=>{const{bulletinBoard:{fetchHootParams:o,hoots:a,selectedCollections:s,collectionAppFilter:r},activeBoard:i}=t.getState(),l={...o,start:0,max:Math.max(a.length,20)};if(r.isActive){l.collectionsUnion=r.app.collectionBehavior==="U";const h=$e({endpoint:l.searchString,currentBoard:{boardId:i.boardId},noBoardName:!0});l.searchString=et({collections:h,noHash:!0})}if(s?s.length===0:!0)if(r.isActive)l.collectionsUnion=!0,l.searchString=et({collections:r.collections,noHash:!0});else return{response:await Ha(i.boardId,l),fetchHootParams:l,boardId:i.boardId,selectedCollections:s};return{response:(await yo(i.boardId,l)).hoots,fetchHootParams:l,boardId:i.boardId,selectedCollections:s}}),Io=x("/bulletinBoard/fetchInitialData",async({boardOptions:e,boardId:t},o)=>{var N;const{bulletinBoard:{relatedTags:a,fetchHootParams:s,selectedCollections:r,collectionAppFilter:i},activeBoard:l}=o.getState(),d=t||l.boardId;if(!d)return o.rejectWithValue({reason:"missing-board-id"});const p={...s,collectionsUnion:!1,showScheduledHoots:l.boardDetail
8s?l.boardDetails.boardAdmin:!1};let h=r;if(e&&(e.selectedCollections&&(typeof e.selectedCollections=="string"&&e.selectedCollections!==""?h=$e({currentBoard:{boardId:d},endpoint:e.selectedCollections,noBoardName:!0}):[...e.selectedCollections].some(Q=>typeof Q=="string")?h=$e({currentBoard:{boardId:d},endpoint:[...e.selectedCollections].join(","),noBoardName:!0}):h=e.selectedCollections),e.upcomingEvents!==void 0&&(p.upcomingEvents=e.upcomingEvents),e.freeEvents!==void 0&&(p.freeEvents=e.freeEvents),e.collectionsUnion!==void 0&&(p.collectionsUnion=e.collectionsUnion)),h&&h.length>0&&!s.userOverriddenSort){const H=h[0],Q=(N=l.boardDetails)==null?void 0:N.boardCollections,Y=Q==null?void 0:Q.find(E=>E.collectionName===H.collection);if(Y!=null&&Y.sortOptions){const E=Ql(Y.sortOptions);E&&(p.sortBy=E.sortBy,p.sortOrder=E.sortOrder)}}else h&&h.length===0&&!s.userOverriddenSort&&(p.sortBy="hootAddDateTime",p.sortOrder="desc",p.userOverriddenSort=!1);const v=h?h.length===0:!0,A=i.isActive?h.reduce((H,Q)=>{const Y=[...i.collections,...a].filter(E=>E.collection===Q.collection);return[...H,...Y,...Y.length===0?[Q]:[]]},[]):h;if(p.searchString=et({collections:A,noHash:!0}),i.isActive){p.collectionsUnion=i.app.collectionBehavior==="U";const H=$e({endpoint:p.searchString,currentBoard:{boardId:d},noBoardName:!0});p.searchString=et({collections:H,noHash:!0})}if(v)if(i.isActive)p.collectionsUnion=!0,p.searchString=et({collections:i.collections,noHash:!0});else return{response:await Ha(d,p),fetchHootParams:p,selectedCollections:h,boardId:d};return{response:await yo(d,p),fetchHootParams:p,selectedCollections:h,boardId:d}}),wa=x("/bulletinBoard/applyFilterFetchHoots",async({boardId:e},t)=>{const{bulletinBoard:{fetchHootParams:o,selectedCollections:a},activeBoard:s}=t.getState();if(a.length===0){const i=await Ha(s.boardId,o);return{hoots:i||[]}}const r=await yo(s.boardId,{...o,showScheduledHoots:s.boardDetails?s.boardDetails.boardAdmin:!1});return{hoots:r?r.hoots:[],boardId:e}}),Ia=x("/bulletinBoard/fetchMoreHoots",async(e,t)=>{const{activeBoard:o,bulletinBoard:{fetchHootParams:a,selectedCollections:s,collectionAppFilter:r}}=t.getState(),i={...a},l=s?s.length===0:!0;if(r.isActive){i.collectionsUnion=r.app.collectionBehavior==="U";const p=$e({endpoint:i.searchString,currentBoard:{boardId:o.boardId},noBoardName:!0});i.searchString=et({collections:p,noHash:!0})}if(l)if(r.isActive)i.collectionsUnion=!0,i.searchString=et({collections:r.collections,noHash:!0});else{const p=await Ha(o.boardId,i);return{response:{hoots:p||[]}}}var d=await yo(o.boardId,{...i,showScheduledHoots:o.boardDetails?o.boardDetails.boardAdmin:!1});return{response:d}}),va=x("/bulletinBoard/favoriteHootChanged",async({hootId:e,favorite:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();let s;return t?s=await qr(a,e):s=await _r(a,e),{response:s}}),Ql=e=>({newest:{sortBy:"hootAddDateTime",sortOrder:"desc"},oldest:{sortBy:"hootAddDateTime",sortOrder:"asc"},alpha:{sortBy:"hootTitle",sortOrder:"asc"},alpha_rev:{sortBy:"hootTitle",sortOrder:"desc"},upcoming:{sortBy:"eventStartDateTime",sortOrder:"asc"}})[e]||null,nt={boardId:null,isLoading:!0,noMoreHoots:!1,showNoMoreHootsBanner:!1,isFetchingHootsForCollections:!1,isFetchingMoreHoots:!1,showRetweetModal:!1,fetchHootParams:{start:0,max:20,addBoardPosts:!0,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!1,showScheduledHoots:!1,searchString:"",collectionsUnion:!0,sortBy:"hootAddDateTime",sortOrder:"desc",userOverriddenSort:!1},hoots:[],collectionsMap:{},collections:[],relatedTags:[],selectedCollections:[],collectionAppFilter:{app:{appName:"",appIconUrl:"",endpoint:"",collectionBehavior:""},isActive:!1,collections:[]},iframeAppFilter:{app:{appName:"",appIconUrl:"",endpoint:""},isActive:!1},showFilter:!1,filter:{upcomingEvents:!1,freeEvents:!1,selectedCollections:{}}},Zl=j({name:"bulletinBoard",initialState:nt,reducers:{toggleIframeApp:(e,t)=>{e.iframeAppFilter.app=t.payload||nt.iframeAppFilter.app,e.iframeAppFilter.isActive=!!t.payload,e.collectionAppFilter=nt.collectionAppFilter},toggleFilter:(e,t)=>{const o=t.payload.boardId;e.iframeAppFilter=nt.iframeAppFilter,e.showFilter=!e.showFilter,e.filter.upcomingEvents=e.fetchHootParams.upcomingEvents,e.filter.freeEvents=e.fetchHootParams.freeEvents,e.filter.selectedCollections=$e({endpoint:e.fetchHootParams.searchString,currentBoard:{boardId:o}
8,noBoardName:!0}).filter(a=>+a.boardId==+o).reduce((a,s)=>({...a,[s.collection]:!0}),{})},filterUpcomingEventsChanged:(e,t)=>{e.filter.upcomingEvents=t.payload},filterFreeEventsChanged:(e,t)=>{e.filter.freeEvents=t.payload},filterSelectCollection:(e,t)=>{e.filter.selectedCollections[t.payload.collection]=!0},filterDeselectCollection:(e,t)=>{delete e.filter.selectedCollections[t.payload.collection]},reset:e=>{e.isLoading=!0,e.showFilter=!1,e.collections=[],e.relatedTags=[],e.selectedCollections=[],e.iframeAppFilter=nt.iframeAppFilter,e.collectionAppFilter=nt.collectionAppFilter,e.filter.upcomingEvents=!1,e.filter.freeEvents=!1,e.filter.selectedCollections={},e.hoots=[],e.noMoreHoots=!1,e.fetchHootParams.start=0,e.fetchHootParams.max=20,e.fetchHootParams.addBoardPosts=!0,e.fetchHootParams.upcomingEvents=!1,e.fetchHootParams.freeEvents=!1,e.fetchHootParams.showFeaturedCollection=!1,e.fetchHootParams.showScheduledHoots=!1,e.fetchHootParams.searchString="",e.fetchHootParams.collectionsUnion=!0,e.showNoMoreHootsBanner=!1},updateHootPinned:(e,t)=>{const{pin:o,hootId:a}=t.payload;e.hoots=e.hoots.map(s=>s.id===a?{...s,isPinned:o}:s)},updateHootRehoot:(e,t)=>{const{selectedHootIndex:o}=t.payload;e.hoots[o].hootStats.rehoots+=1},updateHootFavorite:(e,t)=>{const{selectedHootIndex:o,favorite:a}=t.payload;e.hoots[o].favPost=a,e.hoots[o].hootStats.favorites+=a?1:-1},updateHootApproved:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o&&e.hoots[o])e.hoots[o].requiresApproval=!1;else{const s=e.hoots.findIndex(({id:r})=>r===a.id);s!==-1&&(e.hoots[s].requiresApproval=!1)}},updateHootRejected:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.hoots.splice(o,1);else{const s=e.hoots.findIndex(({id:r})=>r===a.id);e.hoots.splice(s,1)}},removeHootById:(e,t)=>{const{hootId:o}=t.payload;e.hoots=e.hoots.filter(a=>a&&a.id!==o)},updateHootCommentCount:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.hoots[o].hootStats.comments+=1;else{const s=e.hoots.findIndex(({id:r})=>r===a.id);e.hoots[s].hootStats.comments+=1}},rehooted:(e,t)=>{const o=e.hoots.findIndex(({id:a})=>a===t.payload.id);o>-1&&(e.hoots[o].hootStats.rehoots+=1)},showNoMoreHootsBanner:e=>{e.showNoMoreHootsBanner=!0},unSelectCollectionApp:e=>{e.relatedTags=[],e.selectedCollections=[],e.collectionAppFilter=nt.collectionAppFilter},setSorting:(e,t)=>{const{sortBy:o,sortOrder:a}=t.payload;e.fetchHootParams.sortBy=o,e.fetchHootParams.sortOrder=a,e.fetchHootParams.userOverriddenSort=!0}},extraReducers:{"saved/hoots/saveLocal/request":(e,t)=>{const o=t.payload.saveForLaterData.hoots;return{...e,hoots:e.hoots.map(a=>o.includes(a.id)?{...a,isSaved:!0}:a)}},"saved/hoots/unsave/request":(e,t)=>{const{hootId:o}=t.payload;return{...e,hoots:e.hoots.map(a=>a.id===o?{...a,isSaved:!1}:a)}},[ro.selectCollectionApp+"request"]:(e,t)=>{const{app:o,boardId:a}=t.payload,s=$e({endpoint:o.endpoint,currentBoard:{boardId:a},noBoardName:!0});e.collectionAppFilter={app:o,collections:s,isActive:!0},e.relatedTags=[],e.selectedCollections=[],e.iframeAppFilter=nt.iframeAppFilter},[ro.selectCollectionApp+"pending"]:e=>{e.isFetchingHootsForCollections=!0,e.showNoMoreHootsBanner=!1,e.noMoreHoots=!1},[ro.selectCollectionApp+"fulfilled"]:(e,t)=>{var d;const{data:o,params:a}=t.payload,r=((o==null?void 0:o.hoots)||[]).map(U0);e.hoots=r.map(Xe).filter(p=>ho?!(p.requiresApproval||p.isScheduled):p);const l=((o==null?void 0:o.tags)||((d=o==null?void 0:o.hoots[0])==null?void 0:d.tags)||[]).map(p=>({boardId:p.boardId,collections:p.tagsText.split(",")}));l.length&&(e.relatedTags=wo({collections:Pn(l),selectedValues:e.collectionAppFilter.collections})),e.fetchHootParams=a,e.isLoading=!1,e.isFetchingHootsForCollections=!1,e.noMoreHoots=e.hoots.length<20,e.selectedCollections=[],e.fetchHootParams.start=e.hoots.length},[Io.fulfilled]:(e,t)=>{var w,N;if(e.latestRequestId!==t.meta.requestId)return;const{fetchHootParams:o,selectedCollections:a,boardId:s}=t.payload,r=t.payload.response,l=(Array.isArray(r)?r:(r==null?void 0:r.hoots)||[]).map(Rt),{boardId:d}=t.meta.arg,p=l||[],v=((r==null?void 0:r.tags)||((N=(w=r==null?void 0:r.hoots)==null?void 0:w[0])==null?void 0:N.tags)||[]).map(H=>({boardId:H.boardId,collections:H.tagsText.split(",")}));if(v.length&&(e.relatedTags=wo({collections:Pn(v),selectedValues:e.collectionAppFilter.isActive?e.collectionAppFilter.collections:e.selectedCollections})),d&&d!==s)return;e.noMoreHoots=p.length<20,e.hoots=p.map(Xe).filter(H=>ho?!(H.requiresApproval||H.isScheduled):H),e.isLoading=!1,e.isFetchingHootsForCollections=!1,e.fetchHootParams={...o,start:p.length},[...a].every(H=>+s==+H.boardId)?e.collections=wo({collections:[],selectedValues:a}):e.collections=[]}
8,[Io.pending]:(e,t)=>{if(e.hoots=[],e.relatedTags=[],e.isFetchingHootsForCollections=!0,e.noMoreHoots=!1,e.showNoMoreHootsBanner=!1,e.latestRequestId=t.meta.requestId,t.meta.arg){const{addCollection:o,removeCollection:a,boardOptions:s,freeEvents:r,boardId:i,upcomingEvents:l}=t.meta.arg;s&&(e.isLoading=!0,s.selectedCollections&&(typeof s.selectedCollections=="string"?e.selectedCollections=$e({currentBoard:{boardId:i},endpoint:s.selectedCollections,noBoardName:!0}):[...s.selectedCollections].some(p=>typeof p=="string")?e.selectedCollections=$e({currentBoard:{boardId:i},endpoint:[...s.selectedCollections].join(","),noBoardName:!0}):e.selectedCollections=s.selectedCollections)),o?(e.isFetchingHootsForCollections=!0,e.selectedCollections=[...e.selectedCollections,o],e.collections=[],e.fetchHootParams.userOverriddenSort=!1):a&&(e.isFetchingHootsForCollections=!0,e.selectedCollections=e.selectedCollections.filter(d=>d.collection!==a.collection),e.collections=[],e.fetchHootParams.userOverriddenSort=!1),l!==void 0&&(e.isFetchingHootsForCollections=!0,e.fetchHootParams.upcomingEvents=l),r!==void 0&&(e.isFetchingHootsForCollections=!0,e.fetchHootParams.freeEvents=r)}e.fetchHootParams.start=0},[Io.rejected]:e=>{e.isLoading=!1,e.isFetchingHootsForCollections=!1,e.noMoreHoots=!0},[Ia.fulfilled]:(e,t)=>{var i,l;const a=(((l=(i=t.payload)==null?void 0:i.response)==null?void 0:l.hoots)||[]).map(Rt),s=a.constructor.name==="Array"?a.map(Xe).filter(d=>ho?!(d.requiresApproval||d.isScheduled):d):[],r=[...e.hoots,...s];e.hoots=r,e.isFetchingMoreHoots=!1,e.noMoreHoots=s.length<20,e.fetchHootParams.start=r.length},[Ia.pending]:e=>{e.isFetchingMoreHoots=!0},[Ia.rejected]:e=>{e.isFetchingMoreHoots=!1},[va.fulfilled]:(e,t)=>{const{response:o}=t.payload,{hootId:a,favorite:s}=t.meta.arg;if(!o.success){const r=e.hoots.findIndex(i=>i.id===a);e.hoots[r].favPost=!s,e.hoots[r].hootStats.favorites+=s?-1:1}},[va.pending]:(e,t)=>{const{hootId:o,favorite:a}=t.meta.arg,s=e.hoots.findIndex(r=>
8r.id===o);e.hoots[s].favPost=a,e.hoots[s].hootStats.favorites+=a?1:-1},[va.rejected]:(e,t)=>{const{hootId:o,favorite:a}=t.meta.arg,s=e.hoots.findIndex(r=>r.id===o);e.hoots[s].favPost=!a,e.hoots[s].hootStats.favorites+=a?-1:1},[wa.fulfilled]:(e,t)=>{const{hoots:o}=t.payload,a=o.map(Rt);e.hoots=a.map(Xe).filter(s=>ho?!(s.requiresApproval||s.isScheduled):s),e.isLoading=!1,e.isFetchingHootsForCollections=!1,e.noMoreHoots=o.length<20},[wa.pending]:(e,t)=>{e.showFilter=!1,e.isFetchingHootsForCollections=!0,e.collections=[],e.hoots=[];const o=Object.keys(e.filter.selectedCollections).map(s=>({collection:s,boardId:t.meta.arg.boardId}));e.selectedCollections=o;const a={...e.fetchHootParams,start:0,upcomingEvents:e.filter.upcomingEvents,freeEvents:e.filter.freeEvents,searchString:et({collections:o,noHash:!0})};e.fetchHootParams=a,e.noMoreHoots=!1},[wa.rejected]:e=>{e.isLoading=!1,e.isFetchingHootsForCollections=!1},[Yt.fulfilled]:(e,t)=>{const{response:o,fetchHootParams:a}=t.payload;e.isLoading=!1,e.isFetchingHootsForCollections=!1;const s=o==null?void 0:o.map(Rt),r=s||[];e.noMoreHoots=r.length<20,e.hoots=r.map(Xe).filter(i=>ho?!(i.requiresApproval||i.isScheduled):i),e.fetchHootParams={...a,start:r.length,max:20}},[Yt.pending]:e=>{e.isFetchingHootsForCollections=!0},[Yt.rejected]:e=>{e.isLoading=!1,e.isFetchingHootsForCollections=!1},"activeBoard/resetActiveBoard":e=>({...nt,latestRequestId:e.latestRequestId})}}),{toggleFilter:R0,unSelectCollectionApp:H0,filterDeselectCollection:x0,filterFreeEventsChanged:M0,filterSelectCollection:O0,filterUpcomingEventsChanged:j0,reset:q0,updateHootPinned:_0,updateHootRehoot:$0,updateHootFavorite:G0,updateHootApproved:Xl,updateHootRejected:V0,removeHootById:J0,updateHootCommentCount:z0,rehooted:ed,toggleIframeApp:W0,showNoMoreHootsBanner:Y0,setSorting:K0}=Zl.actions,td=Zl.reducer,Q0=Object.freeze(Object.defineProperty({__proto__:null,applyFilterFetchHoots:wa,default:td,favoriteHootChanged:va,fetchInitialData:Io,fetchMoreHoots:Ia,filterDeselectCollection:x0,filterFreeEventsChanged:M0,filterSelectCollection:O0,filterUpcomingEventsChanged:j0,mapAdminToUserSort:Ql,refreshData:Yt,rehooted:ed,removeHootById:J0,reset:q0,selectCollectionApp:N0,setSorting:K0,showNoMoreHootsBanner:Y0,toggleFilter:R0,toggleIframeApp:W0,unSelectCollectionApp:H0,updateHootApproved:Xl,updateHootCommentCount:z0,updateHootFavorite:G0,updateHootPinned:_0,updateHootRehoot:$0,updateHootRejected:V0},Symbol.toStringTag,{value:"Module"}));function Z0(e,t){var s,r,i,l,d,p,h,v;const o=t.type==="HLVID"&&typeof t.videoProvider=="string"&&t.videoProvider.toLowerCase().includes("hootboard");return{...e,hootId:t.id,hootTitle:t.title,isHootBoardVideoHoot:o,hootDesc:o?t.description:t.type==="HLVID"||t.type==="HLBLOG"||t.type==="HLLIST"?t.userQuote:t.description,postingCategory:t.postingCategory,selectedHootTypeIdx:0,postHootStage:1,selectedHootBgColor:t.hootBgColorClass,customHootThemeColors:t.customHootThemeColors,hootCoverImages:X0(t.type,t.largeImages),hootLocation:eb(t.eventLocationPlaceId,t.eventLocationText,t.eventLocationDetails),actionButtonLabel:t.buttonLabel,actionButtonLink:t.buttonLink,hootExpiryDate:t.hootExpiryDate?t.hootExpiryDate:"",eventDetails:tb(Bn(t.eventStartDateTime),Bn(t.eventEndDateTime),t),recurrenceRule:t.recurringRule,selectedCollections:ob(t.boardTagsList),showActionButtonControl:!!t.buttonLabel,showHootLocationControl:!!(t.eventLocationPlaceId&&t.eventLocationPlaceId!==""),showHootExpiryControl:!!t.hootExpiryDate,showHootEventControl:t.eventStartDateTime!==null,hootTitleError:!1,hootDescError:!1,boardSelectionError:!1,showHootCoverImageControl:!(t.type==="HLBLOG"||t.type==="HLVID"||t.type==="HLLIST"||t.type.indexOf("UF")!==-1),embedLinkHoot:t.type==="HLBLOG"||t.type==="HLVID"||t.type==="HLLIST",fileHoot:t.type.indexOf("UF")!==-1,fileHootShowTitle:t.showTitle,displayFullScreenOnScreens:t.digFullScreenHoot||!1,showOnlyWhenTagsSelected:t.showOnlyWhenTagsSelected||!1,selectedBoardId:t.owningBoardId,scheduledHootDate:t.scheduledOnDate?te(Ta(t.scheduledOnDate,"do MMM, yyyy",new Date),"MMM dd, yyyy"):"",isEditHoot:!0,selectedHootTypeCode:t.type||null,showUploadFileControl:t.type==="UFPDF"||t.type==="UFIMG",selectedPdfThumbnailUrl:t.type==="UFPDF"&&((r=(s=t.largeImages)==null?void 0:s[0])==null?void 0:r.url)||null,selectedVideoThumbnailUrl:t.type==="HLVID"&&((l=(i=t.largeImages)==null?void 0:i[0])==null?void 0:l.url)||null,uploadedFileData:t.type.indexOf("UF")!==-1?{url:t.mediaUrl||"",mimetype:t.type==="UFPDF"?"application/pdf":"image/*",filename:t.mediaFilename||"",thumbnailUrl:t.type==="UFIMG"?((p=(d=t.images)==null?void 0:d[0])==null?void 0:p.url)||((h=t.thumbnail)==null?void 0:h.url)||null:((v=t.thumbnail)==null?void 0:v.url)||null}:null}}function X0(e,t){let o=[];return e==="DISC"&&t&&t.map(a=>{o.push({url:a.url,id:a.id})}),o}function eb(e,t,o){const a={cityName:"",zipCode:"",regionName:"",countryCode:"",formattedAddress:"",latitude:0,longitude:0,googlePlaceId:""};return o?{...a,googlePlaceId:o.googlePlaceId||e||"",formattedAddress:o.formattedAddress||t||"",latitude:o.latitude||0,longitude:o.longitude||0,cityName:o.cityName||"",regionName:o.regionName||"",countryCode:o.countryCode||"",zipCode:o.zipCode||""}:e&&t?{...a,googlePlaceId:e,formattedAddress:t}:a}const tb=(e,t,o)=>{let a={};return e!==null&&e!==""?(e!==null&&e!==""&&(a={startDate:e,startTime:e}),a={...a,endDate:t||e,endTime:t||e}
8,{...a,timezone:o.eventTimezone||null,calendarOnlyHoot:o.calendarOnlyHoot,removeAfterEvent:!!o.hootExpiryDate,freeEvent:o.freeEvent}):null};function Bn(e){return e!=null?Ta(e,"EEE, yyyy MMM do h:mm a",new Date):null}function ob(e){let t=[];return e&&e.length>0&&e.map(o=>{t.push({filterText:o})}),t}let od={hootTitle:"",hootDescription:"",tagsText:"",selectedCommIds:"",hootCoverImages:"[]",removedCoveImgs:"",hootBgColor:"hoot-bgcolor-white",uploadedFileLink:"",callToActionLabel:"",callToActionLink:"",linkHootFetchedData:"",linkHootEmbedUrl:"",aboutLink:"",event:{eventStartDate:"",eventStartTime:"",eventEndDate:"",eventEndTime:"",freeEvent:!1},hootLocation:{city:"",region:"",country:"",zipCode:"",formattedAddress:"",latitude:0,longitude:0,placeId:""},eventTimezone:Sr(),hootTimezone:Sr(),recurringRule:{occurences:"",frequency:"",interval:"",dayOfMonth:"",daysOfWeek:"",monthOfYear:"",recurrenceEndDate:"",sendEmailNotification:!0},postingCategory:"ANNT",hootType:"DISC",fileType:"html",hootExpiryDate:"",hootExpiryTime:"",calendarOnlyHoot:!1,showTitle:!0,digFullScreenHoot:!1,showOnlyWhenTagsSelected:!1,hootScheduledDate:"",hootScheduledTime:"",eventTextLoc:"",postApproved:!1,customHoot:!1};function ab(e,t){const o={...t,event:{...od.event},calendarOnlyHoot:!1};if(e){const a=e.timezone||o.eventTimezone;if(o.eventTimezone=a,e.startDate&&e.startTime){const s="MM/dd/yyyy",r="hh:mm a",i=s+" "+r,l=te(new Date(e.startDate),s)+" "+te(new Date(e.startTime),r),d=te(new Date(e.endDate),s)+" "+te(new Date(e.endTime),r),p=gn(Ta(l,i,new Date),a),h=gn(Ta(d,i,new Date),a);o.event.eventStartDate=_e(p,"UTC","MM/dd/yyyy"),o.event.eventStartTime=_e(p,"UTC","hh:mm a"),o.event.eventEndDate=_e(h,"UTC","MM/dd/yyyy"),o.event.eventEndTime=_e(h,"UTC","hh:mm a")}o.event.freeEvent=e.freeEvent,o.calendarOnlyHoot=e.calendarOnlyHoot}return o}function sb(e){var s;const t=((s=e.original.original_url)==null?void 0:s.split("?")[1])||e.original.url.split("?")[1],a=new URLSearchParams(t).get("listToken");return e&&e.type==="embedly"?e.original&&e.original.media&&e.original.media.type?e.original.media.type==="video"||e.original.media.type==="rich"?"HLVID":"HLBLOG":a?"HLLIST":"HLBLOG":"HLBLOG"}function Ba(e){let t={...od},{hootTitle:o,hootDesc:a,hootCoverImages:s,removedHootCoverImageIds:r,hootLocation:i,actionButtonLabel:l,actionButtonLink:d,uploadedFileData:p,fileHootShowTitle:h,displayFullScreenOnScreens:v,showOnlyWhenTagsSelected:A,hootExpiryDate:w,eventDetails:N,recurrenceRule:H,selectedHootBgColor:Q,customHootThemeColors:Y,selectedBoardId:E,privateHoot:y,selectedBoardPostApproval:g,scheduledHootDate:D,hootVisibility:F,selectedCollections:J,postingCategory:q,acquiredLinkData:K,pdfThumbnail:he,selectedHootTypeCode:ge,isHootBoardVideoHoot:Re}={...e};if(t=ab(N,t),t.privateHoot=y,t.hootTitle=o,t.hootDescription=a,s.length>0&&(t.hootCoverImages=JSON.stringify(s)),r.length>0&&(t.removedCoveImgs=r.join()),t.callToActionLabel=l,t.callToActionLink=d,t.hootExpiryDate=w!==""?te(new Date(w),"MM/dd/yyyy"):"",t.hootExpiryTime=w!==""?te(new Date(w),"h:mm a"):"",H&&(t.recurringRule={criteria:H.criteria,dateMonth:H.dateMonth,day:H.day,dayOfMonth:H.dayOfMonth,daysOfWeek:H.daysOfWeek,frequency:H.frequency,interval:H.interval,monthOfYear:H.monthOfYear,occurences:H.occurences,recurrenceEndDate:H.criteria==="UNTIL"?H.recurrenceEndDate:""}),t.hootBgColor=Q,t.customHootThemeColors=Y?JSON.stringify(Y):null,t.selectedCommIds=`${E}:${F}`,t.postApproved=g,t.hootScheduledDate=D,t.postingCategory=q,i&&(t.hootLocation.city=i.cityName,t.hootLocation.region=i.regionName,t.hootLocation.country=i.countryCode,t.hootLocation.latitude=i.latitude,t.hootLocation.longitude=i.longitude,t.hootLocation.formattedAddress=i.formattedAddress,t.hootLocation.zipCode=i.zipCode,t.hootLocation.placeId=i.googlePlaceId),p&&(t.uploadedFileLink=p.url,p.mimetype==="application/pdf"?(t.hootType="UFPDF",t.fileType="pdf"):(t.hootType="UFIMG",t.fileType="image")),t.showTitle=h,t.digFullScreenHoot=v,t.showOnlyWhenTagsSelected=A||!1,K){t.linkHootFetchedData=JSON.stringify(["eventbrite","meetup"].includes(K.type)?K.photos:K.original);const{original_url:b,url:k,link:M}=K.original;t.linkHootEmbedUrl=b||k||M||"",K.timings&&K.timings.timezone&&!(N&&N.timezone)&&(t.eventTimezone=K.timings.timezone),t.hootTitle=K.title,t.aboutLink=K.description,t.hootType=sb(K)}if(J&&J.length>0){let b="";J.map((k,M)=>{M===0?b=`${k.filterText}`:b=`${b},${k.filterText}`}),t.tagsText=b}const we=[];if(s&&s.length>0)for(const b of s)b.s3Key&&we.push({s3Key:b.s3Key,filename:b.filename||b.s3Key.split("/").pop(),contentType:b.contentType||"image/jpeg",width:b.
8width,height:b.height});return p&&p.s3Key&&we.push({s3Key:p.s3Key,filename:p.filename,contentType:p.mimetype,width:p.width,height:p.height}),we.length>0&&(t.stagedFiles=we,t.hootCoverImages="[]"),he!=null&&he.s3Key&&(t.pdfThumbnail={s3Key:he.s3Key,width:he.width,height:he.height}),ge&&!K&&!p&&(t.hootType=ge),(t.hootType==="HLVID"||t.hootType==="HLBLOG")&&!t.aboutLink&&(t.aboutLink=a||""),Re&&(t.hootDescription=""),t}const Wt=R("scrapeContentFromUrl"),ON=(e,t=2)=>{if(e===0)return"0 Bytes";const o=1024,a=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],s=Math.floor(Math.log(e)/Math.log(o));return`${parseFloat((e/o**s).toFixed(t))} ${a[s]}`},Vr=e=>new Promise((t,o)=>{const a=new XMLHttpRequest;if(a.upload.addEventListener("progress",s=>e.onProgress(+(s.loaded/s.total).toFixed(2))),a.addEventListener("load",()=>t({status:a.status,body:a.responseText})),a.addEventListener("error",()=>o(new Error("File upload failed"))),a.addEventListener("abort",()=>o(new Error("File upload aborted"))),a.open("PUT",e.url,!0),typeof e.files[Symbol.iterator]=="function"){const s=new FormData;Array.from(e.files).forEach((r,i)=>s.append(i.toString(),r)),a.send(s)}else a.send(e.files)}),jN=e=>/.(jpg|jpeg|png|gif|svg)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Image.svg":/.(pdf)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/PDF.svg":/.(doc|docx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Word%20Doc.svg":/.(ppt|pptx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Power%20point.svg":/.(xls|xlsx)$/.test(e)?"https://d9yce0v7jgjpv.cloudfront.net/appicons/Excel%20file.svg":"https://d9yce0v7jgjpv.cloudfront.net/appicons/FIle%20Upload.svg",qN=(e,t)=>U("upload/sr",{payload:{...t,context:"files"},extraHeaders:{"x-board-id":e}}),Jr=e=>{const t=new Image,o=URL.createObjectURL(e);return t.src=o,new Promise((a,s)=>{t.onload=()=>{URL.revokeObjectURL(o),a({width:t.naturalWidth,height:t.naturalHeight})},t.onerror=s})},_N=e=>{const t=document.createElement("video"),o=URL.createObjectURL(e);return t.src=o,new Promise((a,s)=>{t.onloadedmetadata=()=>{URL.revokeObjectURL(o),a({width:t.videoWidth,height:t.videoHeight,duration:t.duration})},t.onerror=s})},zr=async(e,t)=>{const o=localStorage.getItem("authToken"),a=await fetch(`${At}/private/hoots/presigned-url`,{method:"POST",headers:{"Content-Type":"application/json","x-board-id":String(e),...o?{Authorization:`Bearer ${o}`}:{}},body:JSON.stringify({...t,isCompressed:t.isCompressed??!1})});if(!a.ok)throw new Error(`Failed to get presigned URL: ${a.status}`);return a.json()},ad=`${Ot}/api/v5/logs`,rb=5e3,nb=20;let vo=[],ls=null;function qa(){if(vo.length===0)return;const e=[...vo];vo=[];const t=JSON.stringify({entries:e});navigator.sendBeacon&&navigator.sendBeacon(ad,new Blob([t],{type:"application/json"}))||kn(t)}function kn(e){fetch(ad,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(t=>{console.error("[LokiLogger] Failed to send logs:",t.message)})}function ib(){ls||(ls=setTimeout(()=>{ls=null,qa()},rb))}function Ln(e,t,o){vo.push({level:e,message:t,...o}),vo.length>=nb?qa():ib()}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&qa()});const Fo={error(e,t){Ln("error",e,t)},warn(e,t){Ln("warn",e,t)},flush:qa},co=new Map;let Ee=null;const lb=async e=>{const t=[];for(const o of e){const a=URL.createObjectURL(o);let s,r;if(o.type.startsWith("image/"))try{const l=await Jr(o);s=l.width,r=l.height}catch{}const i={file:o,previewUrl:a,width:s,height:r};co.set(a,i),t.push(i)}return t},db=()=>{co.forEach(e=>{URL.revokeObjectURL(e.previewUrl)}),co.clear()},$N=async e=>{Ee&&URL.revokeObjectURL(Ee.previewUrl);const t=URL.createObjectURL(e);let o,a;if(e.type.startsWith("image/"))try{const s=await Jr(e);o=s.width,a=s.height}catch{}return Ee={file:e,previewUrl:t,width:o,height:a},Ee},sd=()=>{Ee&&(URL.revokeObjectURL(Ee.previewUrl),Ee=null)},cb=e=>{if(e==="application/pdf")return"UFPDF";if(e.startsWith("image/"))return"UFIMG"},Wr=async(e,t,o,a)=>{const{file:s,previewUrl:r,width:i,height:l}=t,d=await zr(e,{filename:s.name,contentType:s.type,hootType:o,isCompressed:!1,fileSize:s.size});if(d.message!=="success"||!d.data)throw new Error("Failed to get presigned URL");const{uploadUrl:p,s3Key:h,uuid:v}=d.data;return await Vr({url:p,files:s,onProgress:a||(()=>{})}),{s3Key:h,filename:s.name,contentType:s.type,width:i,height:l,size:s.size,previewUrl:r,...v&&{uuid:v}}},Yr=async(e,t,o,a="DISC")=>{const s=[],r=t.length;let i=0;
8for(const l of t){if(l.s3Key){s.push(l),i++,o==null||o(i,r);continue}const d=co.get(l.url);if(!d){s.push({...l,s3Key:""}),i++,o==null||o(i,r);continue}try{const p=await Wr(e,d,a);s.push({url:p.previewUrl,s3Key:p.s3Key,id:l.id}),co.delete(l.url)}catch(p){throw Fo.error("Cover image upload failed",{boardId:String(e),filename:d.file.name,contentType:d.file.type,fileSize:d.file.size,error:p.message}),p}i++,o==null||o(i,r)}return s},Kr=async(e,t)=>{if(!Ee)return null;const o=cb(Ee.file.type);try{const a=await Wr(e,Ee,o,t);return sd(),a}catch(a){throw Fo.error("File upload failed",{boardId:String(e),filename:Ee==null?void 0:Ee.file.name,contentType:Ee==null?void 0:Ee.file.type,fileSize:Ee==null?void 0:Ee.file.size,hootType:o,error:a.message}),a}},rd=async(e,t,o)=>{const a=URL.createObjectURL(t);let s,r;try{const l=await Jr(t);s=l.width,r=l.height}catch{}const i={file:t,previewUrl:a,width:s,height:r};try{const l=await Wr(e,i,void 0,o);return URL.revokeObjectURL(a),l}catch(l){throw URL.revokeObjectURL(a),l}},GN=()=>co.size>0||Ee!==null,nd=()=>{db(),sd()},VN=async e=>{try{const t=`https://process.filestackapi.com/${Do}/${e}`,o=await fetch(t);if(!o.ok)return console.error(`Failed to fetch image from ${e}: ${o.status}`),null;const a=await o.blob(),s=a.type||"image/jpeg",r=s.split("/")[1]||"jpg",i=`scraped-image-${Date.now()}.${r}`,l=new File([a],i,{type:s});return(await lb([l]))[0]||null}catch(t){return console.error(`Failed to download image from ${e} via Filestack proxy:`,t),null}},ds=x("/postHoot/fetchBoardCollections",async({boardId:e})=>({response:await cl(e)})),cs=x("/postHoot/uploadPendingFilesRequest",async({boardId:e,hootCoverImages:t,uploadedFileData:o},{dispatch:a,rejectWithValue:s})=>{try{const r={uploadedCoverImages:[],uploadedFileData:null};if(t&&t.length>0){const i=await Yr(e,t,(l,d)=>{a(Fn({current:l,total:d}))});r.uploadedCoverImages=i}if(o&&!o.s3Key){const i=await Kr(e,l=>{a(Fn({current:l,total:1,isFileUpload:!0}))});i&&(r.uploadedFileData={...o,s3Key:i.s3Key,url:i.previewUrl})}return r}catch(r){return Fo.error("Upload pending files failed",{boardId:e,coverImageCount:t==null?void 0:t.length,hasFileData:!!o,error:r.message}),s(r.message||"Upload failed")}}),us=x("/postHoot/postHootRequest",async({boardId:e,postHootParams:t},o)=>{var a;try{let s={...t};if(t.hootCoverImages&&t.hootCoverImages.length>0){const i=await Yr(e,t.hootCoverImages);s.hootCoverImages=i}if(t.uploadedFileData&&!t.uploadedFileData.s3Key){const i=await Kr(e);i&&(s.uploadedFileData={...t.uploadedFileData,s3Key:i.s3Key,url:i.previewUrl})}if((a=t.selectedPdfThumbnail)!=null&&a.file){const i=await rd(e,t.selectedPdfThumbnail.file);i&&(s.pdfThumbnail={s3Key:i.s3Key,width:i.width,height:i.height})}const r=await $S(e,Ba(s));return nd(),o.dispatch(xa()),await o.dispatch(Yt()),{response:r}}catch(s){throw Fo.error("Post hoot failed",{boardId:e,error:s.message,params:Ba(updatedParams)}),s}}),ps=x("/postHoot/postHootRequest",async({boardId:e,hootId:t,postHootParams:o},a)=>{var s;try{let r={...o};if(o.hootCoverImages&&o.hootCoverImages.length>0){const l=await Yr(e,o.hootCoverImages);r.hootCoverImages=l}if(o.uploadedFileData&&!o.uploadedFileData.s3Key){const l=await Kr(e);l&&(r.uploadedFileData={...o.uploadedFileData,s3Key:l.s3Key,url:l.previewUrl})}if((s=o.selectedPdfThumbnail)!=null&&s.file){const l=await rd(e,o.selectedPdfThumbnail.file);l&&(r.pdfThumbnail={s3Key:l.s3Key,width:l.width,height:l.height})}const i=await GS(e,t,Ba(r));return nd(),a.dispatch(xa()),await a.dispatch(Yt()),{response:i}}catch(r){throw Fo.error("Update hoot failed",{boardId:e,hootId:t,error:r.message,params:Ba(updatedParams)}),r}}),ys={hootId:0,hootTitleError:!0,hootDescError:!0,boardSelectionError:!0,eventError:!1,showErrors:!1,selectedHootTypeIdx:0,postHootStage:0,postingCategory:"ANNT",showHootCoverImageControl:!1,showHootEventControl:!1,showHootLocationControl:!1,showActionButtonControl:!1,showHootExpiryControl:!1,showUploadFileControl:!1,showAddFileButton:!0,selectedHootBgColor:at(),customHootThemeColors:null,hootTitle:"",hootDesc:"",acquiredLinkData:null,linkPreviewLoading:!1,embedLinkHoot:!1,hootCoverImages:[],removedHootCoverImageIds:[],hootLocation:{},actionButtonLabel:"",actionButtonLink:"",uploadedFileData:null,fileHoot:!1,fileHootShowTitle:!0,displayFullScreenOnScreens:!1,showOnlyWhenTagsSelected:!1,hootExpiryDate:"",eventDetails:null,eventStartDateAddedCount:0,recurrenceRule:null,selectedBoards:[],selectedBoardId:0,selectedBoardName:"",selectedBoardPostApproval:!0,isBoardSelected:!1,selectedCollections:[],scheduledHootDate:"",hootVisibility:"pri",privateHoot:!0,boardCollections:[],postHootParams:{},isEditHoot:!1,hootCreationStatus:"",createdHootUrl:"",isRichTextUsed:!1,createdHootUrlWithBoard:"",isPublishListClicked:!1,publishListId:null,scrappedURLContent:null,scrapperAsyncState:f.IDLE,isVideoUploadHoot:!1,isHootBoardVideoHoot:!1,selectedVideoFile:null,selectedVideoFileUrl:null,selectedVideoDuration:null,videoUploadError:null,videoThumbnails:[],selectedVideoThumbnail:null,selectedVideoThumbnailUrl:null,selectedPdfThumbnail:null,selectedPdfThumbnailUrl:null,activeVideoTab:"link",videoFileStats:null,isSubscribedToVideoUploadAddOn:null,isUploadingFiles:!1,uploadProgress:{current:0,total:0},uploadError:null}
8,id=j({name:"postHoot",initialState:ys,reducers:{clearPostHootData:()=>({...ys}),setRichTextUsed:e=>{e.isRichTextUsed=!0},hootTypeSelected:(e,t)=>{let o=t.payload;return{...e,selectedHootTypeIdx:o,postHootStage:1}},postHootStageSelected:(e,t)=>{const o=t.payload;if(o===2){let a=e.hootDesc||"";const s=/(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/gi,r=a.match(s);if(r&&r.length>0){for(const i of r){const l=i.indexOf("<"),d=i.slice(0,l===-1?void 0:l);let p=d.trim();p.includes("://")||(p=`http://${p}`),a=a.replace(d,`<a href="${p}" target="_blank">${d}</a>`)}e.hootDesc=a}}e.postHootStage=o},postingCategorySelected:(e,t)=>{let o=t.payload;return{...e,postingCategory:o}},hootCoverImageControlToggled:(e,t)=>{let o=t.payload;return{...e,showHootCoverImageControl:o}},hootEventControlToggled:(e,t)=>{const o=t.payload;e.showHootEventControl=o,o||(e.eventDetails=null)},hootLocationControlToggled:(e,t)=>{let o=t.payload,a={...e,showHootLocationControl:o};return o||(a={...a,hootLocation:{}}),a},actionButtonControlToggled:(e,t)=>{let o=t.payload,a={...e,showActionButtonControl:o};return o||(a={...a,actionButtonLabel:"",actionButtonLink:""}),a},hootExpiryControlToggled:(e,t)=>{let o=t.payload,a={...e,showHootExpiryControl:o};return o||(a={...a,hootExpiryDate:""}),a},uploadFileControlToggled:(e,t)=>{let o=t.payload,a={...e,showUploadFileControl:o};return o||(a={...a,uploadedFileData:null,fileHoot:!1,fileHootShowTitle:!0}),a},uploadFileButtonToggled:(e,t)=>{let o=t.payload;return{...e,showAddFileButton:o}},hootBgColorSelected:(e,t)=>{const o=t.payload;let a=null,s=null;return typeof o=="object"?(a="hoot-bgcolor-white",s={...o}):a=o,{...e,selectedHootBgColor:a,customHootThemeColors:s}},toggleErrorsDisplay:(e,t)=>({...e,showErrors:t.payload}),hootTitleEntered:(e,t)=>{let o=t.payload;return{...e,hootTitle:o,hootTitleError:!o}},hootDescEntered:(e,t)=>{const o=t.payload;o.replace(/(<([^>]+)>)/gi,"").trim()?(e.hootDesc=o,e.hootDescError=!(e.acquiredLinkData||o)):e.hootDescError=!e.embedLinkHoot},linkDataAcquired:(e,t)=>{const o=t.payload;if(e.acquiredLinkData=o,e.hootTitleError=!o,e.hootDescError=!o,e.embedLinkHoot=!0,o.location){const{googlePlaceId:a,formattedAddress:s,latAndLong:{lat:r,lon:i}}=o.location;e.showHootLocationControl=!0,e.hootLocation.latitude=r,e.hootLocation.longitude=i,e.hootLocation.googlePlaceId=a,e.hootLocation.formattedAddress=s}if(o.timings){const{ends:a,starts:s,timezone:r}=o.timings,i=p=>p&&r?ky(p,r):p,l=i(s),d=i(a);e.showHootEventControl=!0,e.eventDetails={startDate:l,endDate:d,startTime:l,endTime:d,...r?{timezone:r}:{}}}else e.showHootEventControl=!!e.eventDetails},linkPreviewLoaded:(e,t)=>{let o=t.payload;return{...e,linkPreviewLoading:o}},hootCoverImagesAdded:(e,t)=>{let o=t.payload;return{...e,hootCoverImages:[...e.hootCoverImages,...o]}},hootCoverImagesRemoved:(e,t)=>{const o=e.hootCoverImages[t.payload];let a=[...e.removedHootCoverImageIds];o.id>0&&a.push(o.id);const s=e.hootCoverImages.filter(r=>r!==o);return{...e,hootCoverImages:s,removedHootCoverImageIds:a,fileHootShowTitle:s.length===0?!0:e.fileHootShowTitle}},hootCoverImagesReset:e=>{e.removedHootCoverImageIds=e.hootCoverImages.map(t=>t.id),e.hootCoverImages=[],e.fileHootShowTitle=!0},hootCoverImagesMoved:(e,t)=>{const o=e.hootCoverImages[t.payload],a=e.hootCoverImages.filter(s=>s!==o);return a.unshift(o),{...e,hootCoverImages:a}},hootLocationEntered:(e,t)=>{let o=t.payload;return{...e,hootLocation:o}},actionButtonLabelEntered:(e,t)=>{let o=t.payload;return{...e,actionButtonLabel:o}},actionButtonLinkEntered:(e,t)=>{let o=t.payload;return{...e,actionButtonLink:o}},fileUploaded:(e,t)=>{let o=t.payload;return{...e,uploadedFileData:o,fileHoot:!0,selectedPdfThumbnailUrl:(o==null?void 0:o.mimetype)==="application/pdf"?null:e.selectedPdfThumbnailUrl}},fileHootShowTitleToggled:(e,t)=>({...e,fileHootShowTitle:t.payload}),displayFullScreenOnScreensToggled:(e,t)=>({...e,displayFullScreenOnScreens:t.payload}),showOnlyWhenTagsSelectedToggled:(e,t)=>({...e,showOnlyWhenTagsSelected:t.payload}),hootExpiryDateAdded:(e,t)=>{let o=t.payload;return{...e,hootExpiryDate:o}},eventDetailsAdded:(e,t)=>{let o=t.payload;return{...e,eventDetails:o}},eventStartDateCountIncremented:(e,t)=>{let o=t.payload;return{...e,eventStartDateAddedCount:o}},recurrenceRuleAdded:(e,t)=>{e.recurrenceRule=t.payload},boardsToPostAdded:(e,t)=>{let o=t.payload;return{...e,selectedBoards:o,isBoardSelected:!0,hootVisibility:"pri"}},singleBoardToPostAdded:(e,t)=>{let o=t.payload;return{...e,selectedBoardId:o.boardId,selectedBoardName:o.boardName,selectedBoardPostApproval:o.membershipType==="AA"||o.membershipType==="VA"||o.membershipType==="SA"?!0:!o.postApprovalNeeded,hootVisibility:"pri",boardSelectionError:!(o.boardId>0)}},collectionToPostAdded:(e,t)=>{let o=t.payload;return{...e,selectedCollections:o}},collectionToPostRemoved:(e,t)=>({...e,selectedCollections:e.selectedCollections.filter(o=>o.filterId?o.filterId!==t.payload.filterId:o.filterText!==t.payload.filterText)}),scheduledHootDateAdded:(e,t)=>{let o=t.payload;return{...e,scheduledHootDate:o}},scheduledHootDateRemoved:e=>({...e,scheduledHootDate:""}),hootVisibilityChanged:(e,t)=>{const o=t.payload;return{...e,privateHoot:o==="pri",hootVisibility:o}},postHootParamObjectCreated:(e,t)=>{let o=t.payload;return{...e,postHootParams:o}},setInitialState:(e,t)=>
8{let o=t.payload;return Z0(ys,o)},updatePublishList:(e,t)=>{e.isPublishListClicked=!!t.payload,e.publishListId=t.payload},resetScrapperContent:e=>{e.scrappedURLContent=null,e.scrapperAsyncState=f.IDLE},resetHootTitleAndDesc:e=>{e.hootTitle="",e.hootDesc=""},setSelectedVideoFile:(e,t)=>{e.selectedVideoFile=t.payload},setVideoUploadError:(e,t)=>{e.videoUploadError=t.payload},setVideoThumbnails:(e,t)=>{e.videoThumbnails=t.payload},setSelectedVideoThumbnail:(e,t)=>{e.selectedVideoThumbnail=t.payload},setSelectedVideoFileUrl:(e,t)=>{e.selectedVideoFileUrl=t.payload},setSelectedVideoDuration:(e,t)=>{e.selectedVideoDuration=t.payload},setSelectedVideoThumbnailUrl:(e,t)=>{e.selectedVideoThumbnailUrl=t.payload},setSelectedPdfThumbnail:(e,t)=>{e.selectedPdfThumbnail=t.payload},setSelectedPdfThumbnailUrl:(e,t)=>{e.selectedPdfThumbnailUrl=t.payload},setIsVideoUploadHoot:(e,t)=>{e.isVideoUploadHoot=t.payload,t.payload||(e.fileHootShowTitle=!0)},setActiveVideoTab:(e,t)=>{e.activeVideoTab=t.payload},setVideoFileStats:(e,t)=>{e.videoFileStats=t.payload},setIsSubscribedToVideoUploadAddOn:(e,t)=>{e.isSubscribedToVideoUploadAddOn=t.payload},setUploadProgress:(e,t)=>{e.uploadProgress=t.payload},resetUploadState:e=>{e.isUploadingFiles=!1,e.uploadProgress={current:0,total:0},e.uploadError=null}},extraReducers:{[ds.fulfilled]:(e,t)=>t.payload.response?t.payload.response.filters?{...e,showSpinner:!1,boardCollections:t.payload.response.filters,boardCollectionsFetchedStatus:"success"}:{...e,showSpinner:!1,boardCollections:[],boardCollectionsFetchedStatus:"rejected"}:{...e,showSpinner:!1,boardCollections:[],boardCollectionsFetchedStatus:"rejected"},[ds.pending]:e=>({...e,showSpinner:!0,boardCollectionsFetchedStatus:"pending"}),[ds.rejected]:e=>({...e,showSpinner:!1,boardCollections:null,boardCollectionsFetchedStatus:"rejected"}),[us.fulfilled]:(e,t)=>{if(t.payload.response){let o=t.payload.response.data;return o?{...e,createdHootUrl:o.hootUrlWithBoard,showSpinner:!1,hootCreationStatus:"success"}:{...e,showSpinner:!1,hootCreationStatus:"failed"}}else return{...e,showSpinner:!1,hootCreationStatus:"failed"}},[us.rejected]:e=>({...e,showSpinner:!1,hootCreationStatus:"failed"}),[us.pending]:e=>({...e,showSpinner:!0,hootCreationStatus:"pending"}),[ps.fulfilled]:(e,t)=>{if(t.payload.response){const o=t.payload.response.data;return o?{...e,createdHootUrlWithBoard:o.hootUrlWithBoard,createdHootUrl:o.hootUrl,showSpinner:!1,hootCreationStatus:"success"}:{...e,showSpinner:!1,hootCreationStatus:"failed"}}else return{...e,showSpinner:!1,hootCreationStatus:"failed"}},[ps.rejected]:e=>({...e,showSpinner:!1,hootCreationStatus:"failed"}),[ps.pending]:e=>({...e,showSpinner:!0,hootCreationStatus:"pending"}),[Wt.type+u.PENDING]:e=>{e.scrappedURLContent=null,e.scrapperAsyncState=f.PENDING},[Wt.type+u.REJECTED]:e=>{e.scrappedURLContent=null,e.scrapperAsyncState=f.REJECTED},[Wt.type+u.FULFILLED]:(e,t)=>{e.scrappedURLContent=t.payload,e.scrapperAsyncState=f.FULFILLED},[cs.pending]:e=>{e.isUploadingFiles=!0,e.uploadProgress={current:0,total:0},e.uploadError=null},[cs.fulfilled]:(e,t)=>{e.isUploadingFiles=!1,e.uploadError=null,t.payload.uploadedCoverImages&&t.payload.uploadedCoverImages.length>0&&(e.hootCoverImages=t.payload.uploadedCoverImages),t.payload.uploadedFileData&&(e.uploadedFileData=t.payload.uploadedFileData)},[cs.rejected]:(e,t)=>{e.isUploadingFiles=!1,e.uploadError=t.payload||"Upload failed"}}}),{setRichTextUsed:JN,clearPostHootData:zN,hootTypeSelected:st,postHootStageSelected:WN,postingCategorySelected:it,hootCoverImageControlToggled:lt,hootEventControlToggled:dt,hootLocationControlToggled:YN,actionButtonControlToggled:KN,hootExpiryControlToggled:QN,uploadFileControlToggled:ZN,uploadFileButtonToggled:ct,hootBgColorSelected:ut,toggleErrorsDisplay:XN,hootTitleEntered:ub,hootDescEntered:pb,linkDataAcquired:e3,linkPreviewLoaded:t3,hootCoverImagesAdded:yb,hootCoverImagesRemoved:o3,hootCoverImagesMoved:a3,hootLocationEntered:s3,actionButtonLabelEntered:r3,actionButtonLinkEntered:n3,fileUploaded:i3,fileHootShowTitleToggled:l3,displayFullScreenOnScreensToggled:d3,showOnlyWhenTagsSelectedToggled:c3,hootExpiryDateAdded:u3,eventDetailsAdded:p3,eventStartDateCountIncremented:y3,recurrenceRuleAdded:g3,singleBoardToPostAdded:m3,collectionToPostAdded:f3,collectionToPostRemoved:h3,scheduledHootDateAdded:S3,scheduledHootDateRemoved:b3,hootVisibilityChanged:E3,setInitialState:w3,updatePublishList:I3,resetScrapperContent:v3,hootCoverImagesReset:gb,resetHootTitleAndDesc:C3,setSelectedVideoFile:A3,setVideoUploadError:D3,setVideoThumbnails:T3,setSelectedVideoThumbnail:P3,setSelectedVideoFileUrl:B3,setSelectedVideoDuration:k3,setSelectedVideoThumbnailUrl:L3,setSelectedPdfThumbnail:F3,setIsVideoUploadHoot:U3,setActiveVideoTab:N3,setVideoFileStats:R3,setUploadProgress:Fn}=id.actions,mb=id.reducer,_a=({className:e="spinner",color:t="white",width:o="100px"})=>O.jsx("div",{style:{minWidth:o},children:O.jsx("div",{className:Hl("relative h-6 w-full",e,`before:border-${t} before:border-t-${t}`)})});function H3(e){const{children:t,color:o,backgroundColor:a,style:s,buttonColor:r,className:i="",loading:l=!1,large:d=!1,disabled:p=!1}=e,{loading:h,buttonColor:v,backgroundColor:A,...w}=e;return O.jsx("button",{...w,style:{color:o,backgroundColor:a,...s},className:`rounded ${i} ${ld("Button",r)} ${p?"cursor-not-allowed":"cursor-pointer"} block truncate text-sm outline-none md:text-md ${i.indexOf("text-")===-1?"text-white":""} ${i.indexOf("rounded")===-1?"rounded":""} px-4 active:opacity-50 sm:px-6 `+(d?"py-4":"py-2"),children:l?O.jsx(_a,{className:"spinner"}):t})}function fb(e){const{children:t,color:o,style:a,buttonColor:s,backgroundColor:r,className:i="",loading:l=!1,large:d=!1,onClick:p=()=>{}}=e;return O.jsx("button",{onClick:p,...e,style:{color:o,backgroundColor:r,...a},className:`${i} ${ld("OutlineButton",s)} block truncate rounded border-solid bg-white px-6 text-sm outline-none active:opacity-50 md:text-md `+(d?"py-4":"py-2"),children:l?O.jsx(_a,{className:"spinner"}):t})}function x3(e){const{children:t,color:o,style:a,align:s="center",large:r=!1,
8className:i}=e;return O.jsx("a",{...e,style:{color:o,backgroundColor:"transparent",...a},className:`text-${s} block cursor-pointer truncate rounded border-none fill-current px-6 text-sm font-semibold outline-none active:opacity-50 md:text-md ${i} `+(r?"py-4":"py-2"),children:t})}function M3(e){const{children:t,color:o,style:a,large:s=!1,className:r,backgroundColor:i}=e,{buttonColor:l,...d}=e;return O.jsx("a",{...d,style:{color:o,backgroundColor:i||"transparent",...a},className:`flex flex-row items-center justify-center truncate outline-none ${r} block rounded border-none fill-current py-2 px-2 text-sm  font-semibold  active:opacity-50 md:text-md ${r} `+(s?"py-4":"py-2"),children:t})}function ld(e,t){if(!t||t==="")return"";switch(t){case"blue":return e==="OutlineButton"?"border border-hb-brand-blue text-hb-brand-blue":"bg-hb-brand-blue text-white border-hb-brand-blue";case"red":return e==="OutlineButton"?"border border-hb-brand-red text-hb-brand-red":"bg-hb-brand-red text-white border-hb-brand-red";case"yellow":return e==="OutlineButton"?"border border-hb-brand-yellow text-hb-brand-yellow":"bg-hb-brand-yellow text-white border-hb-brand-yellow";case"green":return e==="OutlineButton"?"border border-hb-brand-green text-hb-brand-green":"bg-hb-brand-green text-white border-hb-brand-green";case"navy":return e==="OutlineButton"?"border border-hb-brand-navy text-hb-brand-navy":"bg-hb-brand-navy text-white border-hb-brand-navy";case"black":return e==="OutlineButton"?"border border-hb-brand-black text-hb-brand-black":"bg-hb-brand-black text-white border-hb-brand-black";case"gray-dark":return e==="OutlineButton"?"border border-hb-brand-gray-dark text-hb-brand-gray-dark":"bg-hb-brand-gray-dark text-white border-hb-brand-gray-dark";case"purple":return e==="OutlineButton"?"border border-hb-brand-purple text-hb-brand-purple":"bg-hb-brand-purple text-white border-hb-brand-purple";case"dove":return e==="OutlineButton"?"border border-dove text-dove":"bg-dove text-white border-dove";case"slate":return e==="OutlineButton"?"border border-slate text-slate":"bg-slate text-white border-slate";case"frost":return e==="OutlineButton"?"border border-frost text-frost":"bg-frost text-white border-frost";case"midnight":return e==="OutlineButton"?"border border-midnight text-midnight":"bg-midnight text-white border-midnight"}}const O3=io.forwardRef(function(t,o){const{children:a,style:s,className:r,activeState:i,activeStyle:l,onClick:d,label:p,loading:h}=t;return h?O.jsx(_a,{className:"spinner"}):O.jsxs("button",{ref:o,type:"button",style:s,onClick:d||null,className:`relative flex cursor-pointer items-center justify-center overflow-hidden border-2 transition-[border] duration-300 ease-in-out hover:decoration-none ${r||""} ${i?"border-white":"border-[rgba(255,255,255,0.3)] hover:border-white"} ${p?"rounded-lg text-white font-semibold px-5 py-2 whitespace-nowrap":"rounded-full h-10 w-10"}`,children:[O.jsx("div",{className:`absolute top-0 left-0 -z-10 h-full w-full ${i?l||"":"bg-[rgba(255,255,255,0.26)] blur"}`}),O.jsxs(O.Fragment,{children:[a&&a,p&&p]})]})}),Pt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st24'%20d='M51.2,27.1H71c0.6,0,1.2-0.3,1.6-0.8l6.1-7.7c0.4-0.5,1-0.8,1.6-0.8h15.1c1.1,0,2,0.9,2,2.1v20.5'/%3e%3cpath%20class='st24'%20d='M22.5,39.2V29.2c0-1.2,0.9-2.1,2-2.1h12.2'/%3e%3cpath%20class='st24'%20d='M18.2,50.5V40.4c0-1.2,0.9-2.1,2-2.1h52.1c0.6,0,1.1-0.2,1.5-0.7l7-7.8c0.4-0.4,0.9-0.7,1.5-0.7h17.3%2
80c1.1,0,2,0.9,2,2.1v20.5'/%3e%3cpath%20class='st26'%20d='M14.2,73.4V53c0-1.2,0.9-2.1,2-2.1h57.6c0.5,0,1.1-0.2,1.4-0.6l7.8-8c0.4-0.4,0.9-0.6,1.4-0.6h19.3%20c1.1,0,2,0.9,2,2.1v30.8'/%3e%3cpath%20class='st12'%20d='M112.9,114.3H6.5V61.4h36.9l1,3c2.1,4,5.8,7,10.2,8.2l5.3,0.6l4.8-0.9c3.1-0.6,5.9-2.5,7.6-5.2l3.8-5.9%20l36.7,0.1V114.3z'/%3e%3cpath%20class='st27'%20d='M93.3,114.6H111c1.3,0,2.3-1,2.3-2.3V63.3c0-1.3-1-2.3-2.3-2.3H75.6v0c0,6.9-7.5,12.5-14.2,12.5h-3.2%20c-7.1,0-14.9-5.9-14.9-13.1v0c0,0-26.3,0.1-34.3,0.1c-1.3,0-2.3,1-2.3,2.3l0,49.6c0,1.3,1,2.3,2.3,2.3h67.4'/%3e%3cline%20class='st0'%20x1='46.4'%20y1='87.5'%20x2='73.6'%20y2='87.5'/%3e%3c/svg%3e",Bt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M98,35.4l3.5,11.1l0.1,67.7c0,0.3-0.3,0.6-0.6,0.6l-62.3-0.1c-0.3,0-0.6-0.3-0.6-0.6V81.2V69.9v-9.5V46.6%20L26.8,8.5c-0.1-0.4,0.2-0.7,0.6-0.7h61.6c0.3,0,0.5,0.2,0.6,0.4l3.4,10.8'/%3e%3cpath%20class='st8'%20d='M39.7,17l7.5,25.3c0.1,0.2,0.3,0.4,0.6,0.4h41c0.4,0,0.7-0.4,0.6-0.7l-8-25.5c-0.1-0.2-0.3-0.4-0.6-0.4%20l-40.5,0.1C39.9,16.3,39.6,16.7,39.7,17z'/%3e%3cpath%20class='st0'%20d='M37.7,113.9L15.3,98.2c-0.1-0.2,0-0.4,0.2-0.4h14.4'/%3e%3cline%20class='st0'%20x1='45.6'%20y1='55'%20x2='70.4'%20y2='55'/%3e%3c/svg%3e",kt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cline%20class='st0'%20x1='24'%20y1='87.8'%20x2='23.7'%20y2='57.9'/%3e%3cline%20class='st0'%20x1='23.6'%20y1='44.1'%20x2='23.3'%20y2='7.6'/%3e%3cline%20class='st0'%20x1='59.2'%20y1='88.1'%20x2='59.2'%20y2='37.7'/%3e%3cline%20class='st0'%20x1='59.2'%20y1='23.3'%20x2='59.2'%20y2='7.4'/%3e%3cline%20class='st0'%20x1='94.5'%20y1='87.6'%20x2='94.5'%20y2='71.7'/%3e%3cline%20class='st0'%20x1='94.5'%20y1='57.8'%20x2='94.5'%20y2='6.9'/%3e%3cpath%20class='st3'%20d='M35.3,57.8L12.2,58c0,0,0,0,0,0L12,44.2c0,0,0,0,0,0L35.1,44c0,0,0,0,0,0L35.3,57.8%20C35.3,57.8,35.3,57.8,35.3,57.8z'/%3e%3cpath%20class='st4'%20d='M69.6,33.6l0,3.9c0,0,0,0,0,0l-21,0.2c0,0,0,0,0,0l-0.1-14.3c0,0,0,0,0,0l21-0.2c0,0,0,0,0,0l0,4'/%3e%3cpath%20class='st4'%20d='M83.4,67.6L83.4,67.6v-9.8c0,0,0,0,0,0h22c0,0,0,0,0,0v13.8c0,0,0,0,0,0h-19'/%3e%3ccircle%20class='st3'%20cx='23.6'%20cy='104.3'%20r='9.3'/%3e%3ccircle%20class='st3'%20cx='60.3'%20cy='104.3'%20r='9.3'/%3e%3cpath%20class='st4'%20d='M103,107.9c-1.4,3.3-4.7,5.7-8.5,5.7c-5.1,0-9.3-4.1-9.3-9.3s4.1-9.3,9.3-9.3c3.8,0,7,2.2,8.4,5.4'/%3e%3c/svg%3e",Lt="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cline%20class='st0'%20x1='3.8'%20y1='81.3'%20x2='29.1'%20y2='81.3'/%3e%3cline%20class='st0'%20x1='45.5'%20y1='96.3'%20x2='3.8'%20y2='96.3'/%3e%3cline%20class='st0'%20x1='3.8'%20y1='110.6'%20x2='49.8'%20y2='110.6'/%3e%3cpath%20class='st13'%20d='M87.5,70.1L73.2,94.3c0,0.1-0.1,0.1-0.1,0.2L49.6,109c-0.3,0.2-0.8-0.1-0.7-0.5l4.4-25.4c0-0.1,0-0.1,0.1-0.2%20l39.7-66c3.2-5.4,10.3-7.1,15.7-3.9l0,0c5.4,3.2,7.1,10.3,3.9,15.7l-9.4,15.7'/%3e%3cline%20class='st1'%20x1='53.5'%20y1='83.8'%20x2='72.8'%20y2='95.8'/%3e%3cline%20class='st1'%20x1='86.8'%20y1='27.3'%20x2='106.2'%20y2='39.3'/%3e%3c/svg%3e",So="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st11'%20d='M27.9,44.2l-19.5,0c-0.1,0-0.2,0-0.2,0.1c-0.6,0.5-1.9,1.4-2.6,8.5C4.8,60,5.4,67.4,7,74.5l3.9,17.3l2.6,11.7%20c0,0.2,0.2,0.3,0.4,0.3h14.4c0.2,0,0.4-0.2,0.4-0.4l-5.7-31.4c-0.1-0.7,0.3-1.4,1.1-1.5l3-0.9l0.5-24.1L27.9,44.2z'/%3e%3cpath%20class='st0'%20d='M10.5,91.3l2.6,11.7c0,0.2,0.2,0.3,0.4,0.3h14.4c0.2,0,0.4-0.2,0.4-0.4l-5.7-31.4c-0.1-0.7,0.3-1.4,1.1-1.5%20c
87.8-1.3,46.6-6.8,63.8,25.6c0.2,0.3,0.7,0.2,0.7-0.2l0-79.1c0-0.4-0.5-0.5-0.7-0.2c-1.5,2.9-3.8,9.7-11,15.9%20c-1.5,1.3-3.3,2.6-5.4,3.8'/%3e%3cpath%20class='st0'%20d='M55.5,41.6c-6.5,2.3-18.1,2.5-27.9,2l-19.5,0c-0.1,0-0.2,0-0.2,0.1c-0.6,0.5-1.9,1.4-2.6,8.5%20C4.5,59.5,5.1,66.9,6.7,74'/%3e%3cline%20class='st1'%20x1='26.7'%20y1='43.5'%20x2='26.7'%20y2='69'/%3e%3cpath%20class='st1'%20d='M95,48.5c0,0,8.1,9.7,0,19.4'/%3e%3cpath%20class='st1'%20d='M101.5,40.2c0,0,13.3,17.3-0.3,36.4'/%3e%3cpath%20class='st1'%20d='M108.8,32.6c0,0,16.4,25.3-0.3,51.3'/%3e%3c/svg%3e",Ft="/assets/add-HootBoard-on-your-platform-kPiEzK5n.svg",ca="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3crect%20x='4.3'%20y='14.5'%20class='st12'%20width='91.4'%20height='64.5'/%3e%3cpath%20class='st29'%20d='M114,40.1l0-13.2c0-0.7-0.6-1.3-1.3-1.3H96.4'/%3e%3crect%20x='87.8'%20y='26.1'%20class='st22'%20width='25.4'%20height='52'/%3e%3cpath%20class='st29'%20d='M31,80.4v7.9c0,0.7,0.6,1.3,1.3,1.3l49.9,0.2l0,0l19,18.5c0.8,0.8,2.2,0.2,2.2-0.9V90.9c0-0.7,0.6-1.3,1.3-1.3%20l8.2,0.1c0.7,0,1.3-0.6,1.3-1.3l-0.1-24.7'/%3e%3cpath%20class='st0'%20d='M13.9,88.4v3.9c0,1.1,1.3,1.7,2.2,1l14.7-12.9'/%3e%3cpath%20class='st0'%20d='M75.7,14H5.3C4.6,14,4,14.6,4,15.3v63.1c0,0.7,0.6,1.3,1.3,1.3h8.6l0,0.7v2.5'/%3e%3cpath%20class='st30'%20d='M30.8,80.4l64.2-0.7c0.7,0,1.3-0.6,1.3-1.3V15.3c0-0.7-0.6-1.3-1.3-1.3H75.4'/%3e%3cg%3e%3cline%20class='st0'%20x1='16.6'%20y1='34.2'%20x2='83.7'%2
80y2='34.2'/%3e%3cline%20class='st0'%20x1='16.6'%20y1='46.5'%20x2='83.7'%20y2='46.5'/%3e%3cline%20class='st0'%20x1='16.6'%20y1='58.8'%20x2='83.7'%20y2='58.8'/%3e%3c/g%3e%3c/svg%3e",hb="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st30{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st13'%20d='M52.1,74.9c-0.1,0.7-0.2,1.3-0.5,2c0,0.2-0.3,0.3-0.5,0.3H40.6h-2.4l-16.5-0.2c-0.2,0-0.5-0.2-0.5-0.3%20c-1.7-5.5,0.8-10.1,3.1-12.7c1.6-1.9,3.8-3,6-3h6.3h1.1l4.7,0.2c2.2,0,4.4,1.1,6,3c0.8,0.9,1.6,2,2.2,3.3'/%3e%3cellipse%20class='st13'%20cx='36.5'%20cy='46.9'%20rx='7.4'%20ry='8.7'/%3e%3cpath%20class='st0'%20d='M78.9,94.6H6.8c-0.3,0-0.6-0.3-0.6-0.6V24c0-0.3,0.3-0.6,0.6-0.6H114c0.3,0,0.6,0.3,0.6,0.6V94%20c0,0.3-0.3,0.6-0.6,0.6h-10.8'/%3e%3cline%20class='st1'%20x1='64.9'%20y1='46.8'%20x2='99.8'%20y2='46.8'/%3e%3cline%20class='st1'%20x1='64.9'%20y1='59.1'%20x2='99.8'%20y2='59.1'/%3e%3cline%20class='st1'%20x1='64.9'%20y1='71.3'%20x2='99.8'%20y2='71.3'/%3e%3c/svg%3e",ua="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2023.0.5,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20120%20120'%20style='enable-background:new%200%200%20120%20120;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st1{fill:none;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st2{fill:%23FEBD10;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st3{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st4{fill:%23FFBE00;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st5{fill:none;stroke:%23000000;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st6{fill:none;stroke:%23000000;stroke-width:3;stroke-miterlimit:10;}%20.st7{fill:%23FEBD10;stroke:%23020202;stroke-width:3;stroke-miterlimit:10;}%20.st8{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st9{fill:none;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st10{fill:%235F4C9F;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st11{fill:%236514DD;}%20.st12{fill:%23FFFFFF;}%20.st13{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st14{fill:%23DE1D54;stroke:%23020202;stroke-width:3;stroke-linecap:round;stroke-miterlimit:10;}%20.st15{fill:%23DE1D54;stroke:%23020202;stroke-width:2;stroke-miterlimit:10;}%20.st16{fill:%23FFBE00;}%20.st17{fill:none;stroke:%23000000;stroke-width:1.8;stroke-miterlimit:10;}%20.st18{fill:none;stroke:%23000000;stroke-width:1.5;stroke-miterlimit:10;}%20.st19{fill:none;stroke:%23000000;stroke-miterlimit:10;}%20.st20{fill:none;stroke:%23000000;stroke-width:1.8;stroke-linecap:round;stroke-miterlimit:10;}%20.st21{fill:%23FEBD10;}%20.st22{fill:%2332B77E;}%20.st23{fill:%235F4C9F;}%20.st24{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st25{fill:%23DE1D54;}%20.st26{fill:%236514DD;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st27{fill:none;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}%20.st28{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-miterlimit:10;}%20.st29{fill:%23020202;}%20.st30{fill:%2332B77E;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st31{fill:%23FFFFFF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st32{fill:%234A5568;}%20.st33{fill:none;stroke:%234A5568;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st34{fill:none;stroke:%234A5568;stroke-width:2;stroke-miterlimit:10;}%20.st35{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;stroke:%2332B77E;stroke-width:2;stroke-miterlimit:10;}%20.st36{fill-rule:evenodd;clip-rule:evenodd;fill:none;stroke:%2332B77E;stroke-width:2;stroke-miterlimit:10;}%20.st37{fill:none;}%20.st38{fill:%23FFBE00;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20.st39{fill:%234F52FF;stroke:%23000000;stroke-width:2;stroke-linecap:round;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M104.8,96.4c1.7,4.9,2.3,11.7,0.3,18.1c0,0.3-0.7,0.7-1,0.7H80.7h-5.2L39,114.8c-0.3,0-1-0.3-1-0.7%20c-3.8-12.2,1.7-22.3,7-28.2c3.5-4.2,8.4-6.6,13.2-6.6H72h2.4l10.4,0.3c4.9,0,9.7,2.4,13.2,6.6'/%3e%3cellipse%20class='st1'%20cx='71.7'%20cy='55.3'%20rx='14.7'
8%20ry='17.2'/%3e%3cpath%20class='st1'%20d='M47.5,83.3L35.2,83h-1.9H22.2c-3.9,0-7.7,1.9-10.5,5.3C7.5,93,3.1,101,6.1,110.7c0,0.3,0.6,0.6,0.8,0.6%20l31.1,0.3'/%3e%3cellipse%20class='st1'%20cx='33'%20cy='62.7'%20rx='13'%20ry='15.2'/%3e%3cpath%20class='st13'%20d='M112.1,30.8h3.9c0.3,0,0.5-0.2,0.5-0.5v-8.4c0-0.3-0.2-0.5-0.5-0.5h-13.4c-0.3,0-0.5-0.2-0.5-0.5V7.1%20c0-0.3-0.2-0.5-0.5-0.5h-9.3c-0.3,0-0.5,0.2-0.5,0.5V21c0,0.3-0.2,0.5-0.5,0.5c-2.2,0-10.9,0-13.1,0.1c-0.3,0-0.5,0.2-0.5,0.5v8.4%20c0,0.3,0.2,0.5,0.5,0.5h13c0.3,0,0.5,0.2,0.5,0.5v14.3c0,0.3,0.2,0.5,0.5,0.5h9.3c0.3,0,0.5-0.2,0.5-0.5V31.4c0-0.3,0.2-0.5,0.5-0.5%20h2.9'/%3e%3c/svg%3e",Sb=async(e,t)=>await U("screens",{method:"POST",payload:t,extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),bb=async(e,t)=>await U(`screens/${t.screenId}`,{method:"PUT",payload:t,extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),Eb=async e=>await U(`screens/${e.screenId}/license`,{method:"PATCH",payload:{screenLicenseActive:e.screenLicenseActive},extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),wb=async e=>await U(`screens/${e.screenId}/license`,{method:"PATCH",payload:{screenLicenseActive:e.screenLicenseActive,screenLicenseValue:e.screenLicenseValue},extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),j3=async(e,t,o)=>await U(`screens/${t}/default-playlist`,{method:"PUT",payload:{playlistId:o},extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),Ib=async(e,t=!1)=>{const o={extraHeaders:{[ue.BOARD_ID_HEADER]:e}};return U(t?`boards/${e}/screens/all`:"screens",o)},vb=async e=>await U(`screens/${e.screenId}`,{extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Cb=async(e,t)=>await U(`screens/${t}`,{method:"DELETE",extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),Ab=async(e,t,o,a)=>{const s={[ue.BOARD_ID_HEADER]:e};return await se("private/screen/message",{screenIds:t,screenMessage:o,screenMessageId:a},s)},Db=async e=>{const t={[ue.BOARD_ID_HEADER]:e};return await ie("private/screen/message",null,t)},Tb=async e=>await jt(`private/screen/message/${e}`,null,null),Pb=async()=>U("shopify/query",{payload:{key:Ni,resource:"products",api_version:"2023-07"}}),q3=async e=>{const t=localStorage.getItem("authToken");return(await fetch(`${Zi}/api/socket/screen/online?screenId=${e}`,{headers:{Authorization:`Bearer ${t}`}})).json()},z={getScreen:"board/screens/single/",getScreens:"board/screens/list/",premiumActivationToggle:"board/screens/activate-toggle/",applyScreenLicense:"board/screens/apply-license-tier/",getKiosksData:"board/screens/get-kiosks-data/"};function*Bb(){yield S(z.getScreen+"request",function*(e){try{yield n({type:z.getScreen+"pending",payload:{}});const t=yield m(async()=>await vb(e.payload));if(!t||t.error||!t.data)throw Error();yield n({type:z.getScreen+"fulfilled",payload:t.data})}catch{yield n({type:z.getScreen+"rejected"})}})}function*kb(){yield S(z.getScreens+"request",function*(e){try{yield n({type:z.getScreens+"pending",payload:{}});const t=yield m(async()=>await Ib(e.payload.boardId,e.payload.hasDeleted));if(!t||t.error||!t.data)throw Error();yield n({type:z.getScreens+"fulfilled",payload:{screens:t.data}})}catch{yield n({type:z.getScreens+"rejected",payload:{screens:[]}})}})}function*Lb(){yield S(z.premiumActivationToggle+"request",function*(e){const{payload:t}=e||{};try{yield n({type:z.premiumActivationToggle+"pending",payload:t});const o=yield m(async()=>await Eb({boardId:t.boardId,screenId:t.screenId,screenLicenseActive:t.value}));if(!o||o.error||!o.data)throw Error();yield n({type:z.premiumActivationToggle+"fulfilled",payload:t})}catch(o){yield n({type:z.premiumActivationToggle+"rejected",payload:{...t,error:o}})}})}function*Fb(){yield S(z.applyScreenLicense+"request",function*(e){const{payload:t}=e||{};try{yield n({type:z.applyScreenLicense+"pending",payload:t});const o=yield m(async()=>await wb({boardId:t.boardId,screenId:t.screenId,screenLicenseActive:t.screenLicenseActive,screenLicenseValue:t.screenLicenseValue}));if(!o||o.error||!o.data)throw Error();yield n({type:z.applyScreenLicense+"fulfilled",payload:t})}catch(o){yield n({type:z.applyScreenLicense+"rejected",payload:{...t,error:o}})}})}function*Ub(){yield S(z.getKiosksData+"request",function*(){try{yield n({type:z.getKiosksData+"pending",payload:[]});const e=yield m(async()=>await Pb());if(!e||e.error||!e.data||!e.data.products)throw Error();yield n({type:z.getKiosksData+"fulfilled",payload:e.data.products})}catch(e){yield n({type:z.getKiosksData+"rejected",payload:e.message})}})}const Nb=[Bb(),kb(),Lb(),Fb(),Ub()],Un=e=>({type:z.getScreens+u.REQUEST,payload:e}),_3=e=>({type:z.premiumActivationToggle+u.REQUEST,payload:e}),$3=e=>({type:z.applyScreenLicense+u.REQUEST,payload:e});R(z.getKiosksData+u.REQUEST);const Nn={screens:[],screensAll:[],pendingUpdateScreensIds:[],screenLicenses:null,customMessages:[],currentlySelectedTabIndex:0,screenSetupTab:null,kioskH
8ardwareTab:0,showSpinner:!1,screensLoadingStatus:f.IDLE,kiosksData:[],kiosksDataState:f.IDLE,kiosksDataError:"",wizardCompletedSteps:[]},dd=j({name:"manageScreens",initialState:Nn,reducers:{tabSelected:(e,t)=>({...e,currentlySelectedTabIndex:t.payload.index}),screenSetupTabSelected:(e,t)=>({...e,screenSetupTab:t.payload}),kioskHardwareTabSelected:(e,t)=>({...e,kioskHardwareTab:t.payload}),addWizardCompletedStep:(e,t)=>{const o=t.payload;e.wizardCompletedSteps.includes(o)||e.wizardCompletedSteps.push(o)},removeWizardCompletedStep:(e,t)=>{const o=t.payload;e.wizardCompletedSteps=e.wizardCompletedSteps.filter(a=>a!==o)},clearWizardCompletedSteps:(e,t)=>{const o=t.payload;e.wizardCompletedSteps=e.wizardCompletedSteps.filter(a=>!o.includes(a))}},extraReducers:{[z.getKiosksData+u.PENDING]:e=>{e.kiosksDataState=f.PENDING,e.kiosksDataError=""},[z.getKiosksData+u.FULFILLED]:(e,t)=>{e.kiosksData=t.payload,e.kiosksDataState=f.FULFILLED,e.kiosksDataError=""},[z.getKiosksData+u.REJECTED]:(e,t)=>{e.kiosksDataState=f.REJECTED,e.kiosksDataError=t.payload},"activeBoard/resetActiveBoard":()=>Nn,[z.getScreens+u.PENDING]:e=>({...e,showSpinner:!0,screens:[]}),[z.getScreens+u.FULFILLED]:(e,t)=>{var o;e.showSpinner=!1,e.screensAll=((o=t.payload)==null?void 0:o.screens)||[],e.screens=e.screensAll.filter(a=>!(a!=null&&a.screenDeleted)),e.screensLoadingStatus=f.FULFILLED},[z.getScreens+u.REJECTED]:e=>({...e,showSpinner:!1,error:!0,screens:[]}),"screen/delete/pending":e=>({...e,showSpinner:!0}),"screen/delete/fulfilled":(e,t)=>{var a;const o=(a=t.payload)==null?void 0:a.screenId;return{...e,showSpinner:!1,screens:e.screens.filter(s=>s.screenId!==o),screensAll:e.screensAll.filter(s=>s.screenId!==o)}},"screen/delete/rejected":e=>({...e,showSpinner:!1}),"screen/update/pending":e=>({...e}),[z.getScreens+u.REJECTED]:e=>{e.showSpinner=!1,e.screens=[],e.screensLoadingStatus=f.REJECTED},[z.getScreens+u.PENDING]:e=>{e.showSpinner=!0,e.screensLoadingStatus=f.PENDING},[z.premiumActivationToggle+u.REQUEST]:(e,t)=>{const{screenId:o,value:a}=t.payload;e.screens=e.screens.map(s=>s.screenId===o?{...s,screenLicenseActive:a}:s),e.pendingUpdateScreensIds=[...e.pendingUpdateScreensIds,o]},[z.premiumActivationToggle+u.FULFILLED]:(e,t)=>{const{screenId:o}=t.payload;e.pendingUpdateScreensIds=e.pendingUpdateScreensIds.filter(a=>a!==o)},[z.premiumActivationToggle+u.REJECTED]:(e,t)=>{const{screenId:o}=t.payload;e.screens=e.screens.map(a=>a.screenId===o?{...a,screenLicenseActive:!a.screenLicenseActive}:a),e.pendingUpdateScreensIds=e.pendingUpdateScreensIds.filter(a=>a!==o)},[z.applyScreenLicense+u.FULFILLED]:(e,t)=>{const{screenId:o}=t.payload;e.pendingUpdateScreensIds=e.pendingUpdateScreensIds.filter(a=>a!==o)},[z.applyScreenLicense+u.REJECTED]:(e,t)=>{const{screenId:o}=t.payload;e.screens=e.screens.map(a=>a.screenId===o?{...a,screenLicenseValue:a.screenLicenseValue,screenLicenseActive:a.screenLicenseActive}:a),e.pendingUpdateScreensIds=e.pendingUpdateScreensIds.filter(a=>a!==o)},[z.applyScreenLicense+u.REQUEST]:(e,t)=>{const{screenId:o,screenLicenseActive:a,screenLicenseValue:s}=t.payload;e.screens=e.screens.map(r=>r.screenId===o?{...r,screenLicenseActive:a,screenLicenseValue:s}:r),e.pendingUpdateScreensIds=[...e.pendingUpdateScreensIds,o]}}}),{tabSelected:G3,screenSetupTabSelected:Rn,addWizardCompletedStep:V3,removeWizardCompletedStep:J3,clearWizardCompletedSteps:z3}=dd.actions,Rb=dd.reducer,Hn=({title:e,isCompleted:t,handleOnClick:o})=>O.jsxs("div",{className:"grid items-center",style:{gridTemplateColumns:"auto 1fr"},children:[O.jsx("div",{className:"w-8",children:t!=null&&O.jsx("div",{className:`flex items-center justify-center h-5 w-5 rounded-full border ml-auto text-center leading-5 ${t?"bg-green-600 border-transparent":"border-gray-400"}`,children:t&&O.jsx(Ry,{className:"text-white text-xs"})})}),O.jsx("p",{className:"font-medium block w-full ml-2 cursor-pointer text-hb-brand-blue",onClick:a=>{o(a)},children:e})]}),Hb=(e,t)=>{if(!aS(e.queryName))return;const a=location.pathname.split("/").slice(1,4).join("/"),s=Me.parse(location.search);if(s[e.queryName]){let r="";e.keepOtherQueries&&(delete s[e.queryName],r=Me.stringify(s)),t(`/${a}/${e.navigateTo}${r}`)}}
8,xb=(e="",t={},o)=>{let a="";if(t.boardId&&t.boardName)a=`b/${t.boardId}/${t.boardName.replace(/ /g,"_")}`;else{if(!new RegExp(/https?:\/\/([\S]+)\/b\/([0-9]+)?\/(\w+)/gm).test(location.href))return location.href;a=location.pathname.split("/").slice(1,4).join("/")}const s=Me.parse(location.search),r=Me.parse(e.split("?")[1]||""),i=Me.stringify({...s,...r}),l=i?`?${i}`:"",d=e.split("?")[0],p=`/${a}/${d}${l}`;if(!t.navigation)return p;o(p)},Mb=(e,t)=>({href:e,onClick:o=>{o.preventDefault(),t(e)}}),Ob=()=>{const e=fi();return{boardNav:(t,o)=>xb(t,o,e),anchorNavigation:t=>Mb(t,e),performQueryRedirect:t=>Hb(t,e)}},jb=Ce.createContext(),cd=e=>{const t=Cr(),o=fi(),{boardNav:a}=Ob(),{isOnBoardContext:s,boardId:r,membershipType:i,boardType:l,boardName:d,completedSteps:p,createdBoard:h}=He(({activeBoard:y,onBoarding:{completedSteps:g},createBoard:{createdBoard:D}})=>{const F=y.boardDetails||{};return{boardDetails:F,isOnBoardContext:!!y.boardId,boardId:F.boardId,boardType:F.boardType,membershipType:F.membershipType,boardName:F.boardName,purchasedLicenses:F.purchasedLicenses||{},completedSteps:g,createdBoard:D}}),v=h?h.boardId:"",A=()=>O.jsxs(O.Fragment,{children:[O.jsx("div",{className:"mt-1 ml-10",children:"Explore more about HootBoard ready kiosks from one of our partners."}),O.jsx(fb,{onClick:()=>{o(`${wn(r,d)}/manage/screens/learn-more`)},className:"border-b mt-3 mb-3 ml-10 border-hb-brand-blue text-hb-brand-blue border rounded",children:O.jsx("span",{className:"text-xs sm:text-sm md:text-base",children:"Learn about our Kiosk Software"})}),O.jsxs("div",{className:"grid gap-2 mt-3",children:[O.jsx(Hn,{title:"Set up your FREE Interactive Kiosk",handleOnClick:()=>{t(Rn(0)),a("manage/screens/screens-setup",{navigation:!0})}}),O.jsx(Hn,{title:"Set up your FREE Digital Signage",handleOnClick:()=>{t(Rn(1)),a("manage/screens/screens-setup",{navigation:!0})}})]})]}),w=(y,g,D)=>`${wn(y,g)}/${D}`,N={HSC:[{icon:kt,title:"Let's set up the basics!",description:"Set up the basics of your HootBoard and get up and running in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Customize your HootBoard",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"inviteMembers",title:"Invite members",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}},{slug:"updateSecurity",title:"Update security settings",description:"Decide who can join, post content to your HootBoard. Update privacy settings.				",onClick:()=>{o(w(r,d,"manage/settings/security"))}}]},{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your HootBoard to next level. Setup kiosks for your HootBoard to streamline your communication with something much more engaging.",staticComponent:O.jsx(A,{})},{icon:Pt,title:"Organize your HootBoard",description:"Organize your HootBoard's content with apps and collections.",steps:[{slug:"updateCollections",title:"Customize collections",description:"You can manage board-level collections from settings and hoot-level collections while posting. ",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create an app",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:Lt,title:"Post Content",description:"",steps:[{slug:"postHoot",title:"Post a hoot",description:"",onClick:()=>{t(Ve({visibility:"visible"}))}}]},{icon:Ft,title:"Add HootBoard on your platform",description:"Your HootBoard can be embedded into other websites as well.",steps:[{slug:"visitEmbed",title:"Embed your board",description:"Try embedding your HootBoard. Make sure you disabled the Secured Board option in security settings.",onClick:()=>{o(w(r,d,"manage/embed"))}}]},{icon:ca,title:"See your HootBoard's Engagement",description:"See how your HootBoard is performing among users.",steps:[{slug:"visitAnalytics",title:"See how people interact with your HootBoard",description:"",onClick:()=>{o(w(r,d,"analytics"))}}]},{icon:So,title:"Advertise on HootBoard",description:"HootBoard invites you to showcase your business to our visitors.",steps:[{slug:"visitAdvertise",title:"Signup now to get $100 in advertising credit!",description:"Advertise and reach people who’re ready to spend.",onClick:()=>{fo(),t(Gt({boardId:r,startGuideTourName:"visitAdvertise"}))}}]}],HDT:[{icon:kt,title:"Customize HootBoard",description:"Set up the basics of your HootBoard make it live in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Style your HootBoard appearance!",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"updateSecurity",title:"Update security settings",description:"Your board security is already optimally set. However, take a look at the variety of security settings to adjust as needed.",onClick:()=>{o(w(r,d,"manage/settings/security"))}},{slug:"inviteAdminMembers",title:"Invite co-admins",description:"Bring on a couple of teammates who might help you with your communications.",onClick:()=>
8{t(Ge()),t(da("adm")),o(w(r,d,"manage/members"))}}]},{icon:Lt,title:"Post Hoots",description:"Hoots are the lifeblood for your HootBoard. Keep your board up-to-date with the best of what your organization has to offer.",steps:[{slug:"postHootEvent",title:"Post an event",description:"Try posting your first Hoot to get started!.",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]},{icon:Pt,title:"Organize HootBoard",description:"Arrange your HootBoard's content with apps and collections. It makes finding Hoots easy.",steps:[{slug:"updateCollections",title:"Create your #tags, we call them collections!",description:"A better way to group similar category of Hoots!",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create app-based navigation",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:ua,title:"Invite Members",description:"Adding members to your HootBoard increases the engagements on your board.",steps:[{slug:"inviteMembers",title:"Send Invites",description:"Invite all the co-admins and other members on your board.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}}]},{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your guest experience to the next level. Add HootBoard kiosks and signage to communicate with your audience whether they are your staff or visitors.",staticComponent:O.jsx(A,{})},{icon:Ft,title:"Boost Engagement",description:"Become a HootBoard expert by mastering these advanced features. These advanced features can improve your board engagement. Integrations made easy!",steps:[{slug:"visitEmbed",title:"Embed your HootBoard",description:"Often you want your website visitors to view content from your HootBoard. You can now embed your HootBoard in seconds.",onClick:()=>{o(w(r,d,"manage/embed"))}},{slug:"visitConnectors",title:"Integrations made easy!",description:"HootBoard Connectors are a great way to connect your social media accounts to the footboard. Add content on these integrations to HootBoard.",onClick:()=>{E()}},{slug:"addShortUrl",title:"Set your short URL",description:"By default, HootBoard creates a URL for your board. But setting a short URL for your board makes it easier for others to navigate to your board.",onClick:()=>{t(ns(2)),o(w(r,d,"manage/settings/info"))}},{slug:"visitNotifications",title:"Control Notifications",description:"Easily control what emails and push notifications needs to reach you and your HootBoard members.",onClick:()=>{Y.markAsDone({slug:"visitNotifications"}),o("/account/settings/notifications")}}]}],HGI:[{icon:kt,title:"Let's set up the basics!",description:"Set up the basics of your HootBoard and get up and running in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Customize your HootBoard",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"inviteMembers",title:"Invite managers & other team members",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}},{slug:"updateSecurity",title:"Update security settings",description:"Decide who can join, post content to your HootBoard. Update privacy settings.",onClick:()=>{o(w(r,d,"manage/settings/security"))}}]},{icon:Pt,title:"Organize your HootBoard",description:"Organize your HootBoard's content with apps and collections.",steps:[{slug:"updateCollections",title:"Customize collections",description:"You can manage board-level collections from settings and hoot-level collections while posting. ",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create an app",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:Lt,title:"Post Content",description:"Post content regularly to add more engagement towards your HootBoard.",steps:[{slug:"postHootEvent",title:"Post an event",description:"Try posting your first Hoot to get started!",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]}
8,{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your HootBoard to next level. Setup kiosks for your HootBoard to streamline your communication with something much more engaging.",staticComponent:O.jsx(A,{})},{icon:Ft,title:"Add HootBoard on your platform",description:"Your HootBoard can be embedded into other websites as well.",steps:[{slug:"visitEmbed",title:"Embed your board",description:"Try embedding your HootBoard. Make sure you disabled the Secured Board option in security settings.",onClick:()=>{o(w(r,d,"manage/embed"))}}]},{icon:ca,title:"See your HootBoard's Engagement",description:"See how your HootBoard is performing among users.",steps:[{slug:"visitAnalytics",title:"See how your visitors interact with your HootBoard",description:"",onClick:()=>{o(w(r,d,"analytics"))}}]},{icon:So,title:"Advertise on HootBoard",description:"HootBoard invites you to showcase your business to our visitors.",steps:[{slug:"visitAdvertise",title:"Signup now to get $100 in advertising credit!",description:"Advertise and reach people who’re ready to spend.",onClick:()=>{fo(),t(Gt({boardId:r,startGuideTourName:"visitAdvertise"}))}}]}],HSI:[{icon:kt,title:"Customize HootBoard",description:"Set up the basics of your HootBoard make it live in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Style your HootBoard appearance!",description:"Add logo & background to your HootBoard and a theme for your hoots to make your HootBoard stand!",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"updateSecurity",title:"Update security settings",description:"Your board security is already optimally set. However, take a look at the variety of security settings to adjust as needed.",onClick:()=>{o(w(r,d,"manage/settings/security"))}},{slug:"inviteAdminMembers",title:"Invite co-admins",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),t(da("adm")),o(w(r,d,"manage/members"))}}]},{icon:Lt,title:"Post Hoots",description:"Hoots are the lifeblood for your HootBoard. Keep your board up-to-date with the best of what your organization has to offer.",steps:[{slug:"postHootAnnouncement",title:"Post an announcement",description:"Try posting your first Hoot to get started!",onClick:()=>{t(Ve({visibility:"visible"})),t(it("ANNT")),t(st(0)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}},{slug:"postHootEvent",title:"Post an event",description:"Event hoots will show up on the calendar view as well.",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]},{icon:Pt,title:"Organize HootBoard",description:"Arrange your HootBoard's content with apps and collections. It makes finding Hoots easy.",steps:[{slug:"updateCollections",title:"Create your #tags, we call them collections!",description:"A better way to group similar category of Hoots!",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create app-based navigation",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:ua,title:"Invite Members",description:"Adding members to your HootBoard increases the engagements on your board.",steps:[{slug:"inviteMembers",title:"Send Invites",description:"Invite all the co-admins and other members on your board.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}}]},{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your guest experience to the next level. Add HootBoard kiosks and signage to communicate with your audience whether they are your staff or visitors.",staticComponent:O.jsx(A,{})},{icon:Ft,title:"Boost Engagement",description:"Become a HootBoard expert by mastering these advanced features. These advanced features can improve your board engagement. Integrations made easy!",steps:[{slug:"visitEmbed",title:"Embed your HootBoard",description:"Often you want your website visitors to view content from your HootBoard. You can now embed your HootBoard in seconds.",onClick:()=>{o(w(r,d,"manage/embed"))}},{slug:"visitConnectors",title:"Integrations made easy!",description:"HootBoard Connectors are a great way to connect your social media accounts to the footboard. Add content on these integrations to HootBoard.",onClick:()=>{E()}},{slug:"addShortUrl",title:"Set your short URL",description:"By default, HootBoard creates a URL for your board. But setting a short URL for your board makes it easier for others to navigate to your board.",onClick:()=>{t(ns(2)),o(w(r,d,"manage/settings/info"))}},{slug:"visitNotifications",title:"Control Notifications",description:"Easily control what emails and push notifications needs to reach you and your HootBoard members.",onClick:()=>{Y.markAsDone({slug:"visitNotifications"}),o("/account/settings/notifications")}}]}],HEE:[{icon:kt,title:"Customize HootBoard",description:"Set up the basics of your HootBoard make it live in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Style your HootBoard appearance!",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"updateSecurity",title:"Update security settings",description:"Your board security is already optimally set. However, take a look at the variety of security settings to adjust as needed.",onClick:()=>{o(w(r,d,"manage/settings/security"))}},{slug:"inviteAdminMembers",title:"Invite co-admins",description:"Bring on a couple of teammates who might help you with your communications.",onClick:()=>
8{t(Ge()),t(da("adm")),o(w(r,d,"manage/members"))}}]},{icon:Lt,title:"Post Hoots",description:"Hoots are the lifeblood for your HootBoard. Keep your board up-to-date with the best of what your organization has to offer.",steps:[{slug:"postHootAnnouncement",title:"Post an announcement",description:"Try posting your first Hoot to get started!",onClick:()=>{t(Ve({visibility:"visible"})),t(it("ANNT")),t(st(0)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}},{slug:"postHootEvent",title:"Post an event",description:"Event hoots will show up on the calendar view as well.",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]},{icon:Pt,title:"Organize HootBoard",description:"Arrange your HootBoard's content with apps and collections. It makes finding Hoots easy.",steps:[{slug:"updateCollections",title:"Create your #tags, we call them collections!",description:"A better way to group similar category of Hoots!",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create app-based navigation",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:ua,title:"Invite Members",description:"Adding members to your HootBoard increases the engagements on your board.",steps:[{slug:"inviteMembers",title:"Send Invites",description:"Invite all the co-admins and other members on your board.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}}]},{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your guest experience to the next level. Add HootBoard kiosks and signage to communicate with your audience whether they are your staff or visitors.",staticComponent:O.jsx(A,{})},{icon:Ft,title:"Boost Engagement",description:"Become a HootBoard expert by mastering these advanced features. These advanced features can improve your board engagement. Integrations made easy!",steps:[{slug:"visitEmbed",title:"Embed your HootBoard",description:"Often you want your website visitors to view content from your HootBoard. You can now embed your HootBoard in seconds.",onClick:()=>{o(w(r,d,"manage/embed"))}},{slug:"visitConnectors",title:"Integrations made easy!",description:"HootBoard Connectors are a great way to connect your social media accounts to the footboard. Add content on these integrations to HootBoard.",onClick:()=>{E()}},{slug:"addShortUrl",title:"Set your short URL",description:"By default, HootBoard creates a URL for your board. But setting a short URL for your board makes it easier for others to navigate to your board.",onClick:()=>{t(ns(2)),o(w(r,d,"manage/settings/info"))}},{slug:"visitNotifications",title:"Control Notifications",description:"Easily control what emails and push notifications needs to reach you and your HootBoard members.",onClick:()=>{Y.markAsDone({slug:"visitNotifications"}),o("/account/settings/notifications")}}]}],HCE:[{icon:kt,title:"Let's set up the basics!",description:"Set up the basics of your HootBoard and get up and running in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Customize your HootBoard",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"inviteMembers",title:"Invite managers & other team members",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}},{slug:"updateSecurity",title:"Update security settings",description:"Decide who can join, post content to your HootBoard. Update privacy settings.",onClick:()=>{o(w(r,d,"manage/settings/security"))}}]},{icon:Lt,title:"Post Content",description:"Post content regularly to add more engagement towards your HootBoard.",steps:[{slug:"postHootEvent",title:"Post your first event",description:"Try posting your first Hoot to get started!",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}},{slug:"postHootAnnouncement",title:"Post an announcement",description:"",onClick:()=>{t(Ve({visibility:"visible"})),t(it("ANNT")),t(st(0)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]},{icon:Pt,title:"Organize your HootBoard",description:"Organize your HootBoard's content with apps and collections.",steps:[{slug:"updateCollections",title:"Customize collections",description:"You can manage board-level collections from settings and hoot-level collections while posting. ",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create an app",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]}
8,{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your HootBoard to next level. Setup kiosks for your HootBoard to streamline your communication with something much more engaging.",staticComponent:O.jsx(A,{})},{icon:So,title:"Advertise on HootBoard",description:"HootBoard invites you to showcase your business to our visitors.",steps:[{slug:"visitAdvertise",title:"Signup now to get $100 in advertising credit!",description:"Advertise and reach people who’re ready to spend.",onClick:()=>{fo(),t(Gt({boardId:r,startGuideTourName:"visitAdvertise"}))}}]},{icon:Ft,title:"Add HootBoard on your platform",description:"Your HootBoard can be embedded into other websites as well.",steps:[{slug:"visitEmbed",title:"Embed your board",description:"Try embedding your HootBoard. Make sure you disabled the Secured Board option in security settings.",onClick:()=>{o(w(r,d,"manage/embed"))}}]},{icon:ca,title:"See your HootBoard's Engagement",description:"See how your HootBoard is performing among users.",steps:[{slug:"visitAnalytics",title:"See how people interact with your HootBoard",description:"",onClick:()=>{o(w(r,d,"analytics"))}}]}],HLB:[{icon:hb,title:"List your business for FREE!",description:"A complete profile increases your chances of getting noticed by our visitors. It only takes a few minutes, but makes a world of difference.",steps:[{slug:"setBusinessPhone",title:"Add a phone number",description:"Adding a phone number increases the chances of a customer getting in touch with you after they encounter your business on HootBoard.",onClick:()=>{o(w(r,d,"manage/my-business/info"))}},{slug:"setBusinessWeb",title:"Add website address",description:"Let your customer see what you want them to see, showcase your beautifully crafted website to your prospective customers.",onClick:()=>{o(w(r,d,"manage/my-business/info"))}},{slug:"setBusinessHours",title:"Add working hours",description:"",onClick:()=>{o(w(r,d,"manage/my-business/business-hours"))}}]},{icon:kt,title:"Customize HootBoard",description:"Set up the basics of your HootBoard make it live in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Style your HootBoard appearance!",description:"Add logo & background to your HootBoard and a theme for your hoots to make your HootBoard stand!",onClick:()=>{o(w(r,d,"manage/my-business/info/branding"))}},{slug:"updateSecurity",title:"Update security settings",description:"Your board security is already optimally set. However, take a look at the variety of security settings to adjust as needed.",onClick:()=>{o(w(r,d,"manage/settings/security"))}},{slug:"inviteAdminMembers",title:"Invite co-admins",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),t(da("adm")),o(w(r,d,"manage/members"))}}]},{icon:Lt,title:"Post Hoots",description:"Hoots are the lifeblood for your HootBoard. Keep your board up-to-date with the best of what your organization has to offer. Let's post a hoot about your next event.",steps:[{slug:"postHootEvent",title:"Post a hoot",description:"Try posting your first Hoot to get started!",onClick:()=>{t(Ve({visibility:"visible"})),t(it("EVENT")),t(st(3)),t(ut(at())),t(ct(!0)),t(dt(!0)),t(lt(!0))}}]},{icon:Pt,title:"Organize HootBoard",description:"Arrange your HootBoard's content with apps and collections. It makes finding Hoots easy.",steps:[{slug:"updateCollections",title:"Create your #tags, we call them collections!",description:"A better way to group similar category of Hoots!",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create app-based navigation",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:ua,title:"Invite Members",description:"Adding members to your HootBoard increases the engagements on your board.",steps:[{slug:"inviteMembers",title:"Send Invites",description:"Invite all the co-admins and other members on your board.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}}]},{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your guest experience to the next level. Add HootBoard kiosks and signage to communicate with your audience whether they are your staff, or visitors.",staticComponent:O.jsx(A,{})},{icon:Ft,title:"Boost Engagement",description:"Become a HootBoard expert by mastering these advanced features. These advanced features can improve your board engagement. Integrations made easy!",steps:[{slug:"visitEmbed",title:"Embed your HootBoard",description:"Often you want your website visitors to view content from your HootBoard. You can now embed your HootBoard in seconds.",onClick:()=>{o(w(r,d,"manage/embed"))}},{slug:"visitConnectors",title:"Integrations made easy!",description:"HootBoard Connectors are a great way to connect your social media accounts to the footboard. Add content on these integrations to HootBoard.",onClick:()=>{E()}},{slug:"addShortUrl",title:"Set your short URL",description:"By default, HootBoard creates a URL for your board. But setting a short URL for your board makes it easier for others to navigate to your board.",onClick:()=>{o(w(r,d,"manage/my-business/info/url"))}},{slug:"visitNotifications",title:"Control Notifications",description:"Easily control what emails and push notifications needs to reach you and your HootBoard members.",onClick:()=>{Y.markAsDone({slug:"visitNotifications"}),o("/account/settings/notifications")}}]},{icon:So,title:"Advertise on HootBoard",description:"With the HootBoard promotions app, advertising is dead simple. You can now advertise any content you want in just a few steps.",steps:[{slug:"visitAdvertise",title:"Sign up now and get a $100 free credit. Use it to advertise right away!",description:"Advertise and reach people who’re ready to spend.",onClick:()=>{fo(),t(Gt({boardId:r,startGuideTourName:"visitAdvertise"}))}}]}],HET:[{icon:kt,title:"Let's set up the basics!",description:"Set up the basics of your HootBoard and get up and running in less than 5 minutes!",steps:[{slug:"customizeBoard",title:"Customize your HootBoard",description:"Add logo, update theme and hoot colors, add background image which matches your brand, etc.",onClick:()=>{o(w(r,d,"manage/settings/info"))}},{slug:"inviteMembers",title:"Invite managers & other team members",description:"Invite more members into your HootBoard in a single step.",onClick:()=>{t(Ge()),o(w(r,d,"manage/members"))}},{slug:"updateSecurity",title:"Update security settings",description:"Decide who can join, post content to your HootBoard. Update privacy settings.",onClick:()=>{o(w(r,d,"manage/settings/security"))}}]}
8,{icon:Bt,title:"Setup FREE Interactive Screens & Digital Signage",description:"Take your HootBoard to next level. Setup kiosks for your HootBoard to streamline your communication with something much more engaging.",staticComponent:O.jsx(A,{})},{icon:Pt,title:"Organize your HootBoard",description:"Organize your HootBoard's content with apps and collections.",steps:[{slug:"updateCollections",title:"Customize collections",description:"You can manage board-level collections from settings and hoot-level collections while posting. ",onClick:()=>{o(w(r,d,"manage/settings/collections"))}},{slug:"createApp",title:"Create an app",description:"Apps are a great way to add more interactive content to your HootBoard.",onClick:()=>{o(w(r,d,"manage/apps"))}}]},{icon:Lt,title:"Post Content",description:"Post content regularly to add more engagement towards your HootBoard.",steps:[{slug:"postHoot",title:"Post a hoot",description:"",onClick:()=>{t(Ve({visibility:"visible"}))}}]},{icon:So,title:"Advertise on HootBoard",description:"HootBoard invites you to showcase your business to our visitors.",steps:[{slug:"visitAdvertise",title:"Signup now to get $100 in advertising credit!",description:"Advertise and reach people who’re ready to spend.",onClick:()=>{fo(),t(Gt({boardId:r,startGuideTourName:"visitAdvertise"}))}}]},{icon:Ft,title:"Add HootBoard on your platform",description:"Your HootBoard can be embedded into other websites as well.",steps:[{slug:"visitEmbed",title:"Embed your board",description:"Try embedding your HootBoard. Make sure you disabled the Secured Board option in security settings.",onClick:()=>{o(w(r,d,"manage/embed"))}}]},{icon:ca,title:"See your HootBoard's Engagement",description:"See how your HootBoard is performing among users.",steps:[{slug:"visitAnalytics",title:"See how your visitors interact with your HootBoard",description:"",onClick:()=>{o(w(r,d,"analytics"))}}]}]};N.HW=N.HEE,N.HV=N.HGI,N.HO=N.HSI,N[l]||(N[l]=N.HSI);const H=Pl(i);Ce.useEffect(()=>{s&&r&&H&&t(fh(r))},[r,H]);const Q=Ce.useContext(Dl),Y={getQuickStartGuideSteps:()=>N[l].map(y=>{var g;return{...y,steps:(g=y.steps)==null?void 0:g.map(D=>({...D,isCompleted:p.includes(D.slug)}))}}),markAsDone:y=>{!p.includes(y.slug)&&H&&(t(Gt({boardId:r||v,startGuideTourName:y.slug,saveOnRequest:y.saveOnRequest,saveOnlyLocal:y.saveOnlyLocal})),Q.trackQuickStartGuideItemCompleted({completedStep:y.slug}))},hideGuideManually:()=>{p.includes("manuallyHidden")||t(Gt({boardId:r,startGuideTourName:"manuallyHidden"}))}},E=()=>{Y.markAsDone({slug:"visitConnectors"}),o("/connectors")};return O.jsx(jb.Provider,{value:Y,children:e.children})};cd.propTypes={children:bi.node.isRequired};const qb=(e,t,o)=>{const a=Ce.useMemo(()=>xy((l,d)=>{e[d.type]&&e[d.type](l,...d.payload)}),[]),[s,r]=Ce.useReducer(a,t,o),i=Ce.useMemo(()=>{const l={};for(const d in e)l[d]=(...p)=>r({type:d,payload:p});return l},[e]);return[s,i]},ud=Ce.createContext(null),_b={newNotificationsCounter:0,socket:null},$b={setSocket:(e,t)=>{e.socket=t},increaseNotificationsCounter:e=>{e.newNotificationsCounter++},resetNotificationsCounter:e=>{e.newNotificationsCounter=0}};function pd(e){const[t,o]=qb($b,_b),a=He(i=>i.activeAccount.activeAccountDetails&&i.activeAccount.activeAccountDetails.token);Ce.useEffect(()=>{a&&s(a)},[a]);const s=async i=>{try{let l=await Hy(ji,{query:"token="+i});return r(l)}catch{}},r=i=>{if(i)return o.setSocket(i),i.on("hootboard:notification",()=>{o.increaseNotificationsCounter()}),()=>{i.off("hootboard:notification")}};return O.jsx(ud.Provider,{value:{state:t,dispatch:o},children:e.children})}function W3(){const e=Ce.useContext(ud);if(!e)throw new Error("Please, Wrap the parent with socket provider");return e}pd.propTypes={children:bi.node};class Gb extends io.Component{constructor(t){super(t)}static getDerivedStateFromError(){return{}}componentDidCatch(t){console.error(t)}render(){return this.props.children}}const Qr=e=>{const t=()=>{e.onError&&e.onError(),e.fallbackSrc?a(e.fallbackSrc):a("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=")},[o,a]=Ce.useState(e.src||e.fallbackSrc);return Ce.useEffect(()=>{a(e.src||e.fallbackSrc)},[e.src,e.fallbackSrc]),O.jsx("img",{alt:e.alt,src:o,onClick:e.onClick,onError:t,className:e.className,style:e.style})};Qr.defaultProps={alt:"",style:{},className:""};const Vb=({type:e,className:t=""})=>{const o=Ce.useRef(null),[a,s]=Ce.useState(1);Ce.useEffect(()=>{if(!o.current)return;let{offsetTop:i}=o.current;s(i)},[o]);const r=e==="spinner";return O.jsx("div",{ref:o,style:{height:`calc(100vh - ${a}px)`},className:Hl("grid grid-cols-12 w-full",t),children:O.jsx("div",{className:"col-span-12 w-full h-full flex justify-center items-center",children:O.jsxs("div",{className:"w-24 h-24 overflow-hidden relative",children:[r&&O.jsx(_a,{className:"spinner"}),!r&&O.jsx(Qr,{className:"w-full h-full absolute",src:"/assets/loading.gif"})]})})})},Jb=e=>O.jsx(Ce.Suspense,{fallback:O.jsx(Vb,{type:""}),children:e.children}),zb=()=>{const e=Cr(),t=He(s=>s.visibility.smartAppBannerPath||""),o=(()=>{const s=navigator.userAgent;if(/Android/i.test(s))return"android";if(/iPhone|iPad|iPod/i.test(s)&&/Safari/i.test(s))return"ios-safari";if(/iPhone|iPad|iPod/i.test(s))return"ios-other"})();return{platformName:o,deepLinkPath:t,openInApp:s=>{s==null||s.preventDefault(),window.location.replace(`hootboard://${t}`),setTimeout(()=>{o=="android"?document.hasFocus()&&window.location.replace("https://play.google.com/store/apps/details?id=com.hootboard"):window.location.replace("https://apps.apple.com/us/app/hootboard/id1141706263")},2e3)},setAppBannerPath:s=>{e(jS(s))}}},Wb=()=>{const{openInApp:e,platformName:t}=zb(),o=He(a=>a.visibility.isLeftDrawerVisible);return!t||o?null:O.jsxs("div",{id:"smartAppBanner",className:"flex relative bg-white items-center p-2 justify-between border-b h-14 z-10 sm:hidden",children:[O.jsxs("div",{className:"flex items-center",children:[O.jsx(Qr,{src:"/assets/app-store.png",className:"rounded-lg w-10 h-10"}),O.jsxs("div",{className:"ml-2",children:[O.jsx("div",{className:"font-bold",children:"HootBoard"}),O.jsx("div",{className:"text-xs opacity-50 -mt-1",children:"Open in the HootBoard app"})]})]}),O.jsx("div",{className:"cursor-pointer text-white bg-brand-primary font-bold text-sm px-4 py-2 rounded-full",onClick:e,children:"OPEN"})]})};function*Yb(e){try{yield n({type:"activate-account/pending"});const{encUserId:t}=e.payload,o=yield m(async()=>await kh(t));if(!o)throw new Error(o);if(!o.activationStatus)throw new Error(o);yield n({type:"activate-account/fulfilled"})}catch(t){yield n({type:"activate-account/rejected",payload:t})}}function*Kb(){yield S("activate-account/request",Yb)}const Qb=async e=>await se("password/create",e,null);function*Zb(e){try{yield n({type:"password-reset/pending"});const{encPartyId:t,password:o}=e.payload,a=yield m(async()=>await Qb({encPartyId:t,password:o}));if(!a)throw new Error(a);if(!a.newPasswordStatus)throw new Error(a);yield n({type:"password-reset/fulfilled"})}catch(t){yield n({type:"password-reset/rejected",payload:t})}}function*Xb(){yield S("password-reset/request",Zb)}const eE=async({boardId:e,encParams:t})=>await se("public/boards/notification/email/unsubscribe",{encParams:t},{"x-board-id":e}),tE=async({encParams:e})=>await se("public/accmgmt/notification/email/unsubscribe",{encParams:e},null),oE=async({encParams:e})=>await se("public/invitation/unsubscribe/emails",{encParams:e}
8,null),no={getBoardDetails:"unsubscribe/board/details/"};function*aE(e){const t=no.getBoardDetails;try{yield n({type:t+"pending",payload:{}});let{boardId:o}=e.payload;const a=yield m(async()=>await ke(o));a&&a.status!=="error"?yield n({type:t+"fulfilled",payload:{boardDetails:a}}):yield n({type:t+"rejected",payload:{boardDetails:null}})}catch{yield n({type:t+"rejected",payload:{}})}}function*sE(e){try{yield n({type:"unsubscribe/pending"});const{encParams:t,boardId:o}=e.payload,a=yield m(async()=>await eE({encParams:t,boardId:o}));if(!a)throw new Error(a);yield n({type:"unsubscribe/fulfilled"})}catch(t){yield n({type:"unsubscribe/rejected",payload:t})}}function*rE(e){try{yield n({type:"unsubscribe/pending"});const{encParams:t}=e.payload,o=yield m(async()=>await tE({encParams:t}));if(!o)throw new Error(o);yield n({type:"unsubscribe/fulfilled"})}catch(t){yield n({type:"unsubscribe/rejected",payload:t})}}function*nE(e){try{yield n({type:"unsubscribe/pending"});const{encParams:t}=e.payload,o=yield m(async()=>await oE({encParams:t}));if(!o)throw new Error(o);yield n({type:"unsubscribe/fulfilled"})}catch(t){yield n({type:"unsubscribe/rejected",payload:t})}}function*iE(){yield S("unsubscribe/board/request",sE)}function*lE(){yield S("unsubscribe/personal/request",rE)}function*dE(){yield S("unsubscribe/invitation/request",nE)}function*cE(){yield S(no.getBoardDetails+"request",aE)}function*uE(e){try{yield n({type:"verify-email/pending"});const t=e.payload,o=yield m(async()=>await wh(t));if(!o)throw new Error(o);yield n({type:"verify-email/fulfilled"})}catch(t){yield n({type:"verify-email/rejected",payload:t})}}function*pE(){yield S("verify-email/request",uE)}const yE=async({payload:e,boardId:t})=>{var s;const o=await fetch(`${ce}/pricing/subscriptions/checkout/create-payment-intent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to generate client secret.");const a=await o.json();if(!((s=a==null?void 0:a.data)!=null&&s.clientSecret))throw new Error("Failed to generate client secret.");return a==null?void 0:a.data},ne={addAppUpgradeItem:"app-upgrade/add-app-upgrade-item/",setAppPricingData:"app-upgrade/set-app-pricing-data/",setIsYearlyPricing:"app-upgrade/set-is-yearly-pricing/",setAppPrice:"app-upgrade/set-app-price/",setScreenPrice:"app-upgrade/set-screen-price/",setFreeScreens:"app-upgrade/set-free-screens/",setPaidScreens:"app-upgrade/set-paid-screens/",setGrandTotal:"app-upgrade/set-grand-total/",getClientSecret:"app-upgrade/get-client-secret/",setPaymentStatus:"app-upgrade/set-payment-status/",setPaidViaInvoice:"app-upgrade/pay-via-invoice/"};function*gE(){yield S(ne.getClientSecret,function*(e){try{yield n({type:ne.getClientSecret+u.PENDING,payload:{}});const t=yield m(async()=>yE(e.payload));if(!t)throw new Error;yield n({type:ne.getClientSecret+u.FULFILLED,payload:t})}catch(t){yield n({type:ne.getClientSecret+u.REJECTED,payload:t})}})}const mE=[...gE()],fE=async({boardId:e,isLegacyPricingEnabled:t})=>await U(`boards/${e}/feature-gating/notify`,{method:"POST",payload:{additionalParameters:{isLegacyPricingEnabled:t}}}),hE=async e=>{const t={"x-board-id":e.boardId};return await se("private/subscription",{stripeToken:e.stripeToken,b2bCust:e.isInvoice,includeTrial:e.isTrial,licsPurchased:e.cartItems,billingInterval:e.planInterval},t)},SE=async e=>await ie("private/cards",null,{"x-board-id":e}),bE=async(e,t)=>{const o={"x-board-id":e};return await be(`private/cards?stripeToken=${t}`,null,o)},EE=async e=>await ie("private/pricing",null,{"x-board-id":e}),wE=async e=>await ie("private/subscriptions",null,{"x-board-id":e}),IE=async(e,t)=>{const o={"x-board-id":e};return await jt(`private/subscription/${t}`,null,o)},vE=async(e,t)=>{const o={"x-board-id":e};return await be(`private/customer?adminEmail=${t}`,null,o)},CE=async(e,t,o)=>await be("private/subscription",{subscription:t,billingMethod:o},{"x-board-id":e}),AE=async(e,t)=>await ie("private/invoices",{subscription:t},{"x-board-id":e}),_={saveCard:"pricing-legacy/save-card/",notifyAdmin:"pricing-legacy/notify-admin/",fetchInvoices:"pricing-legacy/fetch-invoices/",processCheckout:"pricing-legacy/process-checkout/",fetchCustomerCard:"pricing-legacy/fetch-customer-card/",updateBillingMethod:"pricing-legacy/update-billing-method/",fetchProductPricing:"pricing-legacy/fetch-product-pricing/",updateCustomerDetails:"pricing-legacy/update-customer-details/",fetchBoardSubscriptions:"pricing-legacy/fetch-board-subscriptions/",subscriptionCancellation:"pricing-legacy/subscription-cancellation/"};function*DE(){yield S(_.notifyAdmin+"request",function*(e){try{yield n({type:_.notifyAdmin+"pending"});const t=yield m(async()=>await fE(e.payload));if(!t)throw new Error(t);if(!t.success)throw new Error(t);yield n({type:_.notifyAdmin+"fulfilled"})}catch(t){yield n({type:_.notifyAdmin+"rejected",payload:t})}})}function*TE(){yield S(_.processCheckout+"request",function*(e){try{yield n({type:_.processCheckout+"pending"});const t=yield m(async()=>await hE(e.payload));if(!t)throw new Error(t);if(!t.message)throw new Error(t);if(t.message!=="success")throw new Error(t);if(!t.data)throw new Error(t);if(!t.data.subscriptionId)throw new Error(t);yield n({type:_.processCheckout+"fulfilled",payload:t})}catch(t){yield n({type:_.processCheckout+"rejected",payload:t})}})}function*PE(){const e=_.fetchProductPricing;yield S(e+"request",function*(t){try{const{boardId:o}=t.payload;yield n({type:e+"pending"});const a=yield m(async()=>await EE(o));if(a&&a.message&&a.message==="success")yield n({type:e+"fulfilled",payload:a});else throw new Error(a)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*BE(){const e=_.fetchCustomerCard;yield S(e+"request",function*(t){try{const{boardId:o}=t.payload;yield n({type:e+"pending"});const a=yield m(async()=>await SE(o));if(a)yield n({type:e+"fulfilled",payload:a});else throw new Error(a)}catch(o){yield n({type:e+"rejected",payload:o})}})}
8function*kE(){const e=_.saveCard;yield S(e+"request",function*(t){try{const{boardId:o,stripeToken:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await bE(o,a));if(s&&s.message&&s.message==="success")yield n({type:e+"fulfilled",payload:s});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*LE(){const e=_.fetchBoardSubscriptions;yield S(e+"request",function*(t){try{const{boardId:o}=t.payload;yield n({type:e+"pending"});const a=yield m(async()=>await wE(o));if(a&&a.message&&a.message==="success")yield n({type:e+"fulfilled",payload:a});else throw new Error(a)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*FE(){const e=_.subscriptionCancellation;yield S(e+"request",function*(t){try{const{boardId:o,subscriptionId:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await IE(o,a));if(s&&s.message&&s.message==="success"&&s.data&&s.data.status)yield n({type:e+"fulfilled",payload:s}),yield n({type:_.fetchBoardSubscriptions+"request",payload:{boardId:o}});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*UE(){const e=_.updateCustomerDetails;
8yield S(e+"request",function*(t){try{const{boardId:o,adminEmail:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await vE(o,a));if(s&&s.message&&s.message==="success")yield n({type:e+"fulfilled",payload:s});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*NE(){const e=_.updateBillingMethod;yield S(e+"request",function*(t){try{const{boardId:o,subscriptionId:a,billingMethod:s}=t.payload;yield n({type:e+"pending"});const r=yield m(async()=>await CE(o,a,s));if(r&&r.message&&r.message==="success")yield n({type:e+"fulfilled",payload:r});else throw new Error(r)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*RE(){const e=_.fetchInvoices;yield S(e+"request",function*(t){try{const{boardId:o,subscriptionId:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await AE(o,a));if(s&&s.message&&s.message==="success")yield n({type:e+"fulfilled",payload:s});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}const HE=[TE(),PE(),BE(),kE(),LE(),FE(),UE(),NE(),RE(),DE()],xE=async(e,t=1)=>await(await fetch(`${kr}/latest/?page=${t}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-access-token":e,"x-notification-version":Li}})).json(),ME=async({token:e,notificationId:t,partyId:o})=>await(await fetch(`${kr}/read`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","x-access-token":e},body:JSON.stringify({notificationId:t,partyId:o})})).json(),ze={getNotifications:"notifications/get/",readNotifications:"notifications/read/"};function*OE(e){const t=ze.getNotifications;try{yield n({type:t+"pending",payload:{}});const o=yield m(async()=>await xE(e.payload.token,e.payload.currentPage));o&&o.success?yield n({type:t+"fulfilled",payload:{pageNumber:e.payload.currentPage,notifications:o.notifications}}):yield n({type:t+"rejected",payload:{notifications:[]}})}catch{yield n({type:t+"rejected",payload:{}})}}function*jE(e){const t=ze.readNotifications;try{yield n({type:t+"pending",payload:{}});const o=yield m(async()=>await ME(e.payload));o&&o.success?yield n({type:t+"fulfilled",payload:{notifications:o.notifications}}):yield n({type:t+"rejected",payload:{notifications:[]}})}catch{yield n({type:t+"rejected",payload:{}})}}function*qE(){yield S(ze.getNotifications+"request",OE)}function*_E(){yield S(ze.readNotifications+"request",jE)}const Z={getEngagementUnitsUsage:"board/analytics/get-engagement-units-usage/",getHootEngagementUnitsUsage:"hoot/engagement-units-usage/",getAppEngagementUnitsUsage:"app/engagement-units-usage/",getActivityChannels:"activity/channels/"},br={WEEK:"WEEK",MONTH:"MONTH",TODAY:"TODAY",YESTERDAY:"YESTERDAY",LAST_7_DAYS:"LAST_7_DAYS",LAST_30_DAYS:"LAST_30_DAYS",LAST_3_MONTHS:"LAST_3_MONTHS",LAST_6_MONTHS:"LAST_6_MONTHS",LAST_12_MONTHS:"LAST_12_MONTHS"},pa={selectedTimeInterval:br.LAST_7_DAYS,startDate:"",endDate:"",selectedMixpanelEvent:lo,selectedKioskMixpanelEvent:lo,error:!1,errorMessage:"",kioskSessionsScreens:[],totalEngagementScreens:[],networkError:!1,fetchMixpanelEngagementStatus:"idle",fetchAnalyticsForBoardStatus:"idle",fetchAnalyticsForSavedContentStatus:"idle",fetchBoardMembersStatus:"idle",engagementData:null,savedContentData:null,analyticsData:null,boardMembers:[],engagementUnitsUsage:{apiStatus:"idle",screensUsage:0,webMobileUsage:0,webMobileAvailableUnits:0,webMobileUsagePercentage:0},showCustomIntervalMenu:!1,selectedDeviceEngagement:"All",customStartDate:"",customEndDate:"",fetchHootEngagementStatus:"idle",fetchAppEngagementStatus:"idle",hootEngagementData:[],appEngagementData:[],fetchActivityChannelsStatus:"idle",activityChannels:[],showRestrictionDialog:!1},Y3=({boardId:e,engagementUnits:t,cycleResetDay:o})=>({type:Z.getEngagementUnitsUsage+"request",payload:{boardId:e,engagementUnits:t,cycleResetDay:o}}),K3=e=>({type:"mixpanel/engagement/request",payload:e}),Q3=e=>({type:Z.getHootEngagementUnitsUsage+"request",payload:e}),Z3=e=>({type:Z.getAppEngagementUnitsUsage+"request",payload:e}),X3=e=>({type:Z.getActivityChannels+"request",payload:e}),eR=e=>({type:"board/members/request",payload:e}
8),yd=j({name:"analytics",initialState:pa,reducers:{updateSelectedScreens:(e,t)=>{const{totalEngagementScreens:o,kioskSessionsScreens:a}=t.payload;if(o)return{...e,totalEngagementScreens:o};if(a)return{...e,kioskSessionsScreens:a}},intervalSelected:(e,t)=>({...e,selectedTimeInterval:t.payload.selectedTimeInterval,customStartDate:t.payload.customStartDate,customEndDate:t.payload.customEndDate}),resetEngagementUnitsUsage:e=>{e.engagementUnitsUsage=pa.engagementUnitsUsage},mixpanelEventSelected:(e,t)=>({...e,selectedMixpanelEvent:t.payload.selectedMixpanelEvent,fetchMixpanelEngagementStatus:"pending",engagementData:null}),hideCustomMenu:e=>({...e,showCustomIntervalMenu:!1}),showCustomMenu:e=>({...e,showCustomIntervalMenu:!0}),updateSelectedDeviceEngagement:(e,t)=>({...e,selectedDeviceEngagement:t.payload.selectedDeviceEngagement}),resetSelectedValues:e=>({...e,selectedDeviceEngagement:pa.selectedDeviceEngagement,selectedTimeInterval:pa.selectedTimeInterval,hootEngagementData:[],appEngagementData:[],engagementData:[]}),triggerRestrictionDialog:(e,t)=>
8{e.showRestrictionDialog=t.payload}},extraReducers:{[Z.getEngagementUnitsUsage+"request"]:(e,t)=>{const{engagementUnits:o}=t.payload;e.engagementUnitsUsage.webMobileAvailableUnits=o},[Z.getEngagementUnitsUsage+"pending"]:e=>{e.engagementUnitsUsage.apiStatus="pending"},[Z.getEngagementUnitsUsage+"fulfilled"]:(e,t)=>{const{webMobileUsage:o,kioskUsage:a}=t.payload,s=e.engagementUnitsUsage.webMobileAvailableUnits;e.engagementUnitsUsage.apiStatus="fulfilled",e.engagementUnitsUsage.screensUsage=a,e.engagementUnitsUsage.webMobileUsage=o;const r=Math.round(o/s*100*100)/100;e.engagementUnitsUsage.webMobileUsagePercentage=r},[Z.getEngagementUnitsUsage+"rejected"]:e=>{e.engagementUnitsUsage.apiStatus="rejected"},"mixpanel/engagement/pending":e=>({...e,fetchMixpanelEngagementStatus:"pending"}),"mixpanel/engagement/fulfilled":(e,t)=>({...e,fetchMixpanelEngagementStatus:"fulfilled",engagementData:t.payload.data}),"mixpanel/engagement/rejected":e=>({...e,fetchMixpanelEngagementStatus:"rejected",engagementData:null}),"board/analytics/pending":e=>({...e,fetchAnalyticsForBoardStatus:"pending"}),"board/analytics/fulfilled":(e,t)=>({...e,fetchAnalyticsForBoardStatus:"fulfilled",analyticsData:t.payload.data}),"board/analytics/rejected":e=>({...e,fetchAnalyticsForBoardStatus:"rejected",analyticsData:null}),"board/analytics/saved/pending":e=>({...e,fetchAnalyticsForSavedContentStatus:"pending"}),"board/analytics/saved/fulfilled":(e,t)=>({...e,fetchAnalyticsForSavedContentStatus:"fulfilled",savedContentData:t.payload.data}),"board/analytics/saved/rejected":e=>({...e,fetchAnalyticsForSavedContentStatus:"rejected",savedContentData:null}),"board/members/pending":e=>({...e,fetchBoardMembersStatus:"pending"}),"board/members/fulfilled":(e,t)=>({...e,fetchBoardMembersStatus:"fulfilled",boardMembers:t.payload.data}),"board/members/rejected":e=>({...e,fetchBoardMembersStatus:"rejected"}),[Z.getHootEngagementUnitsUsage+"pending"]:e=>({...e,fetchHootEngagementStatus:"pending"}),[Z.getHootEngagementUnitsUsage+"fulfilled"]:(e,t)=>({...e,fetchHootEngagementStatus:"fulfilled",hootEngagementData:t.payload.data.filter(o=>o.label!=null).sort((o,a)=>a.count-o.count)}),[Z.getHootEngagementUnitsUsage+"rejected"]:e=>({...e,fetchHootEngagementStatus:"rejected"}),[Z.getAppEngagementUnitsUsage+"pending"]:e=>({...e,fetchAppEngagementStatus:"pending"}),[Z.getAppEngagementUnitsUsage+"fulfilled"]:(e,t)=>({...e,fetchAppEngagementStatus:"fulfilled",appEngagementData:t.payload.data.filter(o=>o.label!=null).sort((o,a)=>a.count-o.count)}),[Z.getAppEngagementUnitsUsage+"rejected"]:e=>({...e,fetchAppEngagementStatus:"rejected"}),[Z.getActivityChannels+"pending"]:e=>({...e,fetchActivityChannelsStatus:"pending"}),[Z.getActivityChannels+"fulfilled"]:(e,t)=>({...e,fetchActivityChannelsStatus:"fulfilled",activityChannels:t.payload.data.events}),[Z.getActivityChannels+"rejected"]:e=>({...e,fetchActivityChannelsStatus:"rejected"})}}),{intervalSelected:tR,updateSelectedScreens:oR,resetEngagementUnitsUsage:aR,mixpanelEventSelected:sR,showCustomMenu:rR,hideCustomMenu:nR,updateSelectedDeviceEngagement:iR,resetSelectedValues:lR,triggerRestrictionDialog:dR}=yd.actions,$E=yd.reducer,gd=(e,t)=>Fy(new Date(t),new Date(e)),cR=e=>{if(!e)return console.error("computeSegmentationParams: params is null or undefined"),null;const{selectedTimeInterval:t,boardId:o,event:a,screenIds:s=[],customStartDate:r,customEndDate:i,timeZone:l}=e;if(!o)return console.error("computeSegmentationParams: boardId is required"),null;if(!a||typeof a!="string")return console.error("computeSegmentationParams: event must be a non-empty string",a),null;if(!l||typeof l!="string")return console.error("computeSegmentationParams: timeZone must be a non-empty string",l),null;const d=KE({boardId:o,screenIds:Array.isArray(s)?s:[]}),p=GE({selectedTimeInterval:t||"LAST_7_DAYS",customEndDate:i,customStartDate:r});if(!p)return console.error("computeSegmentationParams: getDateParams returned null/undefined"),null;const{endDateTime:h,startDateTime:v,timeGranularity:A}=p;if(typeof h!="number"||Number.isNaN(h))return console.error("computeSegmentationParams: endDateTime must be a valid number",h),null;if(typeof v!="number"||Number.isNaN(v))return console.error("computeSegmentationParams: startDateTime must be a valid number",v),null;if(!A||typeof A!="string")return console.error("computeSegmentationParams: timeGranularity must be a non-empty string",A),null;const w=(e.groupBy||[]).map(N=>N==="time"?`time:${A}`:N);return!Array.isArray(w)||w.some(N=>
8typeof N!="string")?(console.error("computeSegmentationParams: groupBy must be an array of strings",w),null):{event:a,filter:d,timeZone:l,endDateTime:h,startDateTime:v,groupBy:w}},GE=e=>{const{selectedTimeInterval:t,customEndDate:o,customStartDate:a}=e;if(t.split("-")[0]==="CUSTOM"){let r;const i=Ze(new Date(o)).getTime(),l=xe(new Date(a)).getTime(),d=gd(l,i);return d===0?r="hour":d<=30?r="day":r="month",{endDateTime:i,startDateTime:l,timeGranularity:r}}else if(t==="TODAY"){const r=new Date,i=Ze(r).getTime(),l=xe(r).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"hour"}}else if(t==="YESTERDAY"){const r=We(new Date,1),i=Ze(r).getTime(),l=xe(r).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"hour"}}else if(t==="LAST_7_DAYS"){const r=new Date,i=Ze(r).getTime(),l=xe(We(r,6)).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"day"}}else if(t==="LAST_30_DAYS"){const r=new Date,i=Ze(r).getTime(),l=xe(We(r,29)).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"day"}}else if(t==="LAST_3_MONTHS"){const r=new Date,i=ba(r).getTime(),l=Sa(It(r,2)).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"month"}}else if(t==="LAST_6_MONTHS"){const r=new Date,i=ba(r).getTime(),l=Sa(It(r,5)).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"month"}}else if(t==="LAST_12_MONTHS"){const r=new Date,i=ba(r).getTime(),l=Sa(It(r,11)).getTime();return{endDateTime:i,startDateTime:l,timeGranularity:"month"}}else{console.error("Not supported case of selectedTimeInterval:",t);const r=new Date;return{endDateTime:r.getTime(),startDateTime:We(r,7).getTime(),timeGranularity:"day"}}},VE=e=>{const t=xe(Ly(new Date,e));return Ar(t,new Date)?wi(t,1):t},uR=e=>e.map((t,o)=>({apps:o,y:t.count,x:t.label,label:0,kioskCount:t.kioskCount||0,webMobileCount:t.webMobileCount||0})),xn=(e,t)=>{var o;return t==="All"?!0:t==="Kiosk"?Ct.touchKiosk.includes(e)||e==="Kiosk"||((o=e==null?void 0:e.toLowerCase())==null?void 0:o.includes("kiosk")):t==="Web, Mobile & Embed"?Ct.webMobile.includes(e)||["Web Desktop","Web Mobile","Android Mobile App","IOS Mobile App"].includes(e):!0},Er=(e,t)=>!e.children||e.children.length===0?xn(e.label,t)&&e.count||0:e.children.reduce((o,a)=>[...Ct.webMobile,...Ct.touchKiosk,"Kiosk","Web Desktop","Web Mobile"].some(r=>{var i,l;return((l=(i=a.label)==null?void 0:i.includes)==null?void 0:l.call(i,r))||a.label===r})?xn(a.label,t)?o+(a.count||0):o:o+Er(a,t),0),JE=e=>!e||!Array.isArray(e)?[]:e.map(t=>{const o=Er(t,"Kiosk"),a=Er(t,"Web, Mobile & Embed");return{...t,kioskCount:o,webMobileCount:a,count:o+a||t.count}}).sort((t,o)=>o.count-t.count),pR=(e,t)=>{if(!e||!Array.isArray(e))return[];const o=JE(e);return t==="All"?o:o.map(a=>{const s=t==="Kiosk"?a.kioskCount:a.webMobileCount;return{...a,count:s}}).filter(a=>a.count>0).sort((a,s)=>s.count-a.count)},yR=e=>{const{selectedDeviceEngagement:t,data:o}=e;if(t==="All")return[{name:"Kiosk Engagement Units",data:o.map(a=>a.kioskEngagementUnits||0)},{name:"Web, Mobile & Embed Engagement Units",data:o.map(a=>a.engagementUnits)}];if(t==="Kiosk")return[{name:"Kiosk Engagement Units",data:o.map(a=>a.kioskEngagementUnits||0)}];if(t==="Web, Mobile & Embed")return[{name:"Web, Mobile & Embed Engagement Units",data:o.map(a=>a.engagementUnits)}];console.error("No case existed")},zE="dd MMM, hha",WE="MMM dd",YE="MMM yyyy",gR=e=>{const t=(e.engagementData||[]).map(h=>{const v={...h};return v.children&&(v.children=v.children.map(A=>{const w={...A};return w.children&&(!w.label||w.label==="Notifications")&&(w.label="Web Desktop"),w})),v}),o=e.channel=="Kiosk"?e.screens:[],a=t.map(h=>h.label),s=gd(e.dates.startDate,e.dates.endDate),r=({label:h,segment:v})=>{let N=(t.find(H=>H.label===h).children||[]).filter(H=>v.includes(H.label));return o.length>0&&(N=N.reduce((H,Q)=>{const Y=(Q.children||[]).filter(E=>o.includes(E.label));return[...H,...Y]},[])),N.reduce((H,Q)=>H+Q.count,0)};let i=WE;const l=e.timeInterval==="LAST_3_MONTHS"||e.timeInterval==="LAST_6_MONTHS"||e.timeInterval==="LAST_12_MONTHS",d=a.length>0&&/^\d{4}-\d{2}$/.test(a[0]);
8return e.timeInterval==="TODAY"||e.timeInterval==="YESTERDAY"||s===0?i=zE:(l||d)&&(i=YE),a.map((h,v)=>{let A;if(/^\d{4}-\d{2}$/.test(h)){const[w,N]=h.split("-");A=new Date(Number.parseInt(w),Number.parseInt(N)-1,15)}else A=new Date(h);return{[e.timeInterval===br.WEEK?"week":e.timeInterval===br.MONTH?"month":"day"]:v,engagementUnits:e.channel=="Kiosk"?0:r({label:h,segment:Ct.webMobile}),x:te(A,i),label:h,kioskEngagementUnits:e.channel=="Web, Mobile & Embed"?0:r({label:h,segment:Ct.touchKiosk})}})},KE=e=>{let t="";return e.boardId&&(t+=`properties.boardId IN ${e.boardId},"${e.boardId}"`),e.screenIds.length!==0&&(t+=` AND properties.screenId IN ${e.screenIds.map(o=>`"${o}"`).join(",")}`),t},mR=(e,t,o)=>{let a;e==="Kiosk"?a="Kiosk":e==="Web, Mobile & Embed"?a="Web, Mobile, Embed":a="Web, Mobile & Engagement Units, Kiosks";const s=t===lo?"Overall Engagement":t;return{chartTitle:o&&`Total Engagement Report (${o.startDate} - ${o.endDate})`,chartSubTitle:s+" - "+a}},md=e=>{const t=e.split("-"),o="yyyy-MM-dd",a=new Date;if(t[0]==="CUSTOM"){const s=e.split("-"),r=s[1],i=s[2],l=te(new Date(i),o),d=te(new Date(r),o);return{endDate:l,startDate:d}}else if(e==="WEEK"){const s=te(a,o),r=te(Uy(a),o);return{endDate:s,startDate:r}}else if(e==="TODAY"){const s=te(a,o),r=te(a,o);return{endDate:s,startDate:r}}else if(e==="YESTERDAY"){const s=te(a,o),r=te(a,o);return{endDate:s,startDate:r}}else if(e==="LAST_7_DAYS"){const s=te(a,o),r=te(We(a,7),o);return{endDate:s,startDate:r}}else if(e==="LAST_30_DAYS"){const s=te(a,o),r=te(We(a,30),o);return{endDate:s,startDate:r}}else if(e==="LAST_3_MONTHS"){const s=te(a,o),r=te(It(a,3),o);return{endDate:s,startDate:r}}else if(e==="LAST_6_MONTHS"){const s=te(a,o),r=te(It(a,6),o);return{endDate:s,startDate:r}}else if(e==="LAST_12_MONTHS"){const s=te(a,o),r=te(It(a,12),o);return{endDate:s,startDate:r}}else console.error("Not supported format")},QE=async e=>{try{const{startDate:t,endDate:o}=md(e.selectedTimeInterval),a=await ie("private/board/saveforlater/analytics",{startDate:t,endDate:o},{"x-board-id":e.boardId});if(!a)throw Error();return{success:!0,error:!1,errorMessage:"",data:a.data||[]}}catch{return{success:!1,error:!0,errorMessage:"Fetching analytics for saved content failed",data:[]}}},ZE=async()=>{let e=await fetch(`${Fr}/v1/events-group?key=${Na}
9		&groupId=${lo}`);if(e.ok){let t=await e.json();return t&&t.success?{success:!0,error:!1,errorMessage:"",data:t.data}:{success:!0,error:!1,errorMessage:"",data:[]}}},XE=async({boardId:e,selectedTimeInterval:t})=>{let{startDate:o,endDate:a}=md(t),s=await fetch(`${qi}/analytics?boardId=${e}&startDate=${o}&endDate=${a}`,{method:"GET",headers:{Accept:"application/json; charset=utf-8","x-access-token":`${localStorage.getItem("authToken")}`}});if(s.ok){let r=await s.json();return r&&r.success?{success:!0,error:!1,errorMessage:"",data:r}:{success:!0,error:!1,errorMessage:"",data:[]}}else return{success:!1,error:!0,errorMessage:"Fetching analytics for boardId failed",data:null}},ew=async e=>{try{const t=VE(e.cycleResetDay),o=It(t,1).getTime(),a=new Date().getTime(),s=await Ne.segmentation({startDateTime:o,endDateTime:a,groupBy:["channel"],timeZone:Sr(),event:lo,filter:`properties.boardId IN ${e.boardId},"${e.boardId}"`}),[r,i]=s.reduce(([l,d],p)=>Ct.webMobile.includes(p.label)?[l+p.count,d]:p.label==Ct.touchKiosk?[l,d+p.count]:[l,d],[0,0]);return{success:!0,data:{webMobileUsage:r,kioskUsage:i}}}catch{return{success:!1,message:"Fetching analytics for boardId failed"}}};function*tw(){yield S("mixpanel/engagement/request",function*(e){var t;try{const o=(t=e.payload)==null?void 0:t.params;if(!o){console.error("[Saga] mixpanel/engagement: Invalid params - computeSegmentationParams returned null"),yield n({type:"mixpanel/engagement/rejected",payload:{data:null}});return}yield n({type:"mixpanel/engagement/pending",payload:{}});const a=yield m(async()=>await Ne.segmentation(o));a?yield n({type:"mixpanel/engagement/fulfilled",payload:{data:a}}):yield n({type:"mixpanel/engagement/rejected",payload:{data:null}})}catch(o){console.error("[Saga] mixpanel/engagement error:",o),yield n({type:"mixpanel/engagement/rejected",payload:{data:null}})}})}function*ow(){yield S(Z.getEngagementUnitsUsage+"request",function*(e){try{yield n({type:Z.getEngagementUnitsUsage+"pending",payload:{}});const{boardId:t,cycleResetDay:o}=e.payload,a=yield m(async()=>await ew({boardId:t,cycleResetDay:o}));if(!a)throw new Error;if(!a.success)throw new Error;if(!a.data)throw new Error;yield n({type:Z.getEngagementUnitsUsage+"fulfilled",payload:a.data})}catch{yield n({type:Z.getEngagementUnitsUsage+"rejected"})}})}function*aw(){yield S(Z.getHootEngagementUnitsUsage+"request",function*(e){var t;try{const o=(t=e.payload)==null?void 0:t.params;if(!o){yield n({type:Z.getHootEngagementUnitsUsage+"rejected",payload:{data:null}});return}yield n({type:Z.getHootEngagementUnitsUsage+"pending",payload:{}});const a=yield m(async()=>await Ne.segmentation(o));a?yield n({type:Z.getHootEngagementUnitsUsage+"fulfilled",payload:{data:a}}):yield n({type:Z.getHootEngagementUnitsUsage+"rejected",payload:{data:null}})}catch{yield n({type:Z.getHootEngagementUnitsUsage+"rejected"})}})}function*sw(){yield S(Z.getAppEngagementUnitsUsage+"request",function*(e){var t;try{const o=(t=e.payload)==null?void 0:t.params;if(!o){yield n({type:Z.getAppEngagementUnitsUsage+"rejected",payload:{data:null}});return}yield n({type:Z.getAppEngagementUnitsUsage+"pending",payload:{}});const a=yield m(async()=>await Ne.segmentation(o));a?yield n({type:Z.getAppEngagementUnitsUsage+"fulfilled",payload:{data:a}}):yield n({type:Z.getAppEngagementUnitsUsage+"rejected",payload:{data:null}})}catch{yield n({type:Z.getAppEngagementUnitsUsage+"rejected"})}})}function*rw(){yield S(Z.getActivityChannels+"request",function*(){try{yield n({type:Z.getActivityChannels+"pending",payload:{}});const e=yield m(async()=>await ZE());e&&e.success?yield n({type:Z.getActivityChannels+"fulfilled",payload:{data:e.data}}):yield n({type:Z.getActivityChannels+"rejected",payload:{data:null}})}catch{yield n({type:Z.getActivityChannels+"rejected"})}})}function*nw(){yield S("board/analytics/request",function*(e){try{yield n({type:"board/analytics/pending",payload:{}});const t=yield m(async()=>await XE(e.payload.params));t&&t.success?yield n({type:"board/analytics/fulfilled",payload:{data:t.data}}):yield n({type:"board/analytics/rejected",payload:{data:null}})}catch{yield n({type:"board/analytics/rejected",payload:{data:null}})}})}function*iw(){yield S("board/analytics/saved/request",function*(e){try{yield n({type:"board/analytics/saved/pending",payload:{}});const t=yield m(async()=>await QE(e.payload.params));t&&t.success?yield n({type:"board/analytics/saved/fulfilled",payload:{data:t.data}}):yield n({type:"board/analytics/saved/rejected",payload:{data:null}})}catch{yield n({type:"board/analytics/saved/rejected",payload:{data:null}})}})}function*lw(){yield S("board/members/request",function*(e){try{yield n({type:"board/members/pending",payload:{}});const t=yield m(async()=>await nl(e.payload.params.boardId));t?yield n({type:"board/members/fulfilled",payload:{data:t.data.members||[]}}):yield n({type:"board/members/rejected",payload:{data:[]}})}catch{yield n({type:"board/analytics/saved/rejected",payload:{data:[]}})}})}const dw=[nw(),tw(),ow(),iw(),lw(),aw(),sw(),rw()];function*cw(e){try{yield n({type:"board/access/change/pending",payload:{}});const t=yield m(async()=>await ul(e.payload));if(t!=null&&t.boardCommunityCodeValid){const o=yield m(async()=>await Ke()),a=yield m(async()=>await ke(e.payload.boardId));a&&a.status!=="error"&&(yield n({type:"board/details/fulfilled",payload:{boardDetail
9s:a}})),o?yield n({type:"board/access/change/fulfilled",payload:{loginSuccess:!0,userDetails:o}}):yield n({type:"board/access/change/rejected",payload:{loginSuccess:!0,userDetails:null}})}else yield n({type:"board/access/change/rejected",payload:{userExists:!1}})}catch{yield n({type:"board/access/change/rejected",payload:{}})}}function*uw(){yield S("board/access/change/request",cw)}function*pw(e){try{yield n({type:"board/access/request/pending",payload:{}}),(yield m(async()=>await ul(e.payload))).status!=="error"?yield n({type:"board/access/request/fulfilled",payload:{loginSuccess:!0}}):yield n({type:"board/access/request/rejected",payload:{userExists:!1}})}catch{yield n({type:"board/access/request/rejected",payload:{}})}}function*yw(){yield S("board/access/request/request",pw)}function*gw(e){try{yield n({type:"board/follow/pending",payload:{}});const t=yield m(async()=>await Nr(e.payload));if(t&&!t.linkExpired){const o=yield m(async()=>await Ke()),a=yield m(async()=>await ke(e.payload.boardId));a&&a.status!=="error"&&(yield n({type:"board/details/fulfilled",payload:{boardDetails:a}})),o?(yield n({type:"board/follow/fulfilled",payload:{loginSuccess:!0,userDetails:o}}),e.payload.refId&&(yield n({type:"user/board/pin/request",payload:{boardId:e.payload.boardId}}))):yield n({type:"board/follow/rejected",payload:{loginSuccess:!0,userDetails:null}})}else yield n({type:"board/follow/rejected",payload:{loginSuccess:!0,userDetails:null,linkExpired:t.linkExpired?t.linkExpired:!1}})}catch(t){console.error(t),yield n({type:"board/follow/rejected",payload:{}})}}function*mw(){yield S("board/follow/request",gw)}function*fw(e){try{yield n({type:"board/notifications/get/pending",payload:{}});const t=yield m(async()=>await ll(e.payload.boardId));t.status!=="error"?yield n({type:"board/notifications/get/fulfilled",payload:{notificationSettings:t.data}}):yield n({type:"board/notifications/get/rejected",payload:{notificationSettings:null}})}catch{yield n({type:"board/notifications/get/rejected",payload:{notificationSettings:null}})}}function*hw(){yield S("board/notifications/get/request",fw)}function*Sw(e){try{if(yield n({type:"board/notifications/update/pending",payload:{}}),(yield m(async()=>await Jm(e.payload.boardId,e.payload.params))).status!=="error"){const o=yield m(async()=>await ll(e.payload.boardId));o.status!=="error"?yield n({type:"board/notifications/update/fulfilled",payload:{notificationSettings:o.data}}):yield n({type:"board/notifications/update/rejected",payload:{notificationSettings:null}})}else yield n({type:"board/notifications/update/rejected",payload:{notificationSettings:null}})}catch{yield n({type:"board/notifications/update/rejected",payload:{notificationSettings:null}})}}function*bw(){yield S("board/notifications/update/request",Sw)}const Ew=async({boardId:e,month:t,year:o,showPrivateEvents:a=!1})=>{const s={month:t,year:o,showPrivateEvents:a},r={"x-board-id":e};let i="api/v2/public/hoots/calendar";return localStorage.getItem("authToken")&&(i="api/v2/private/hoots/calendar"),await ee(i,{method:"GET",payload:s,extraHeaders:r})},ww=async({boardId:e,months:t,years:o,showPrivateEvents:a=!1})=>{const s={months:t,years:o,showPrivateEvents:a},r={"x-board-id":e};let i="api/v2/public/hoots/events/calendar";return localStorage.getItem("authToken")&&(i="api/v2/private/hoots/events/calendar"),await ee(i,{method:"GET",payload:s,extraHeaders:r})};function*Iw(){yield S("calendar/events/get/request",function*(e){try{yield n({type:"calendar/events/get/pending",payload:{}});const t=yield m(async()=>await Ew(e.payload));if(t&&t.status!=="error")yield n({type:"calendar/events/get/fulfilled",payload:t});else throw new Error("API Error!")}catch(t){yield n({type:"calendar/events/get/rejected",payload:t})}})}function*vw(){yield S("calendar/events/duration/get/request",function*(e){try{yield n({type:"calendar/events/duration/get/pending",payload:{}});const t=yield m(async()=>await ww(e.payload));if(t&&t.status!=="error")yield n({type:"calendar/events/duration/get/fulfilled",payload:t});else throw new Error("API Error!")}catch(t){yield n({type:"calendar/events/duration/get/rejected",payload:t})}})}const Cw=[Iw(),vw()],Aw=async()=>ie("private/accmgmt/beamerFilters",null,null),Dw=async e=>{const t=await fetch(`https://api.getbeamer.com/v0/unread/count?filter=${e}`,{method:"GET",headers:{"Beamer-Api-Key":Ji}});if(t.status===200)return t.json();throw Error("Beamer API failed!")};function*Tw(){try{yield n({type:"changelog/get/pending"});const e=yield m(async()=>{const t=await Aw();if(!t)return!1;const o=await Dw(t.role);return{feedUrl:o.url,badgeCount:o.count}});if(!e)throw Error("Unknown error!");yield n({type:"changelog/get/fulfilled",payload:e})}catch(e){yield n({type:"changelog/get/rejected",payload:e})}}function*Pw(){yield S("changelog/get/request",Tw)}const Bw=async e=>U("idlestate/content/sequences/default",{extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),kw=async e=>U("idlestate/content/sequences",{extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),Lw=async e=>U("idlestate/content/sequences/"+e.id,{payload:e.payload,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Fw=async e=>U("idlestate/content/sequences",{method:"POST",payload:e.payload,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Uw=async e=>U("idlestate/content/sequences/"+e.id,{method:"DELETE",extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Nw=async e=>U("idlestate/content/sequences/"+e.payload.id,{method:"PUT",payload:e.payload,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Rw=async e=>U("idlestate/content/schedules",{method:"POST",payload:e.payload,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Hw=async e=>U("idlestate/content/schedules/"+e.data.id,{method:"PATCH",payload:e.data,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),xw=async e=>U("idlestate/content/schedules/"+e.id,{method:"DELETE",extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Mw=async e=>U("idlestate/content/schedules/availability",{payload:e.payload,extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),Ow=async e=>U(`idlestate/content/sequences/${e.id}/default`,{method:"PATCH",extraHeaders:{[ue.BOARD_ID_HEADER]:e.boardId}}),jw=async({id:e,type:t,zoneId:o,isSaved:a})=>{const s=()=>{let r="";switch(t){case"appId":r="appId";break;case"hootId":r="hootId";break;case"imageUrl":r="imageUrl";break;case"url":r="url";break;case"collection":r="collection";break}return r};return a?{response:{data:e},type:s(),zoneId:o}:t==="appId"?{response:await U(`apps/${e}`),type:s(),zoneId:o}:t==="imageUrl"?{response:{data:e,message:s()},type:s(),zoneId:o}:t==="url"?{response:{data:e,message:s()},type:s(),zoneId:o}:t==="collection"?{response:{data:e,message:s()},type:s(),zoneId:o}:t==="hootId"?{response:await ie("private/hoot",{postId:e},{"x-board-id":0}),type:s(),zoneId:o}:null},qw=async()=>U("idlestate/content/sequences/layouts"),L={getDefaultSequences:"sequence/get-defaults/",getAllSequences:"sequence/get-all/",getSequence:"sequence/get/",createSequence:"sequence/create/",deleteSequence:"sequence/delete/",saveSequence:"sequence/save/",assignSequence:"sequence/assign/",updateSchedule:"sequence/update-schedule/",unAssignSequence:"sequence/un-assign/",getAvailability:"sequence/get-availability/",markAsDefault:"sequence/mark-as-default/",loadPreviewContent:"sequence/load-preview-content/",fetchLayouts:"sequence/get-layouts/",fetchHootsForCollectionContentType:"sequence/fetch-hoots/"};function*_w(){yield S(L.getDefaultSequences+I.REQUEST,function*(e){try{yield n({type:L.getDefaultSequences+I.PEND
9ING,payload:{}});const t=yield m(async()=>await Bw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.getDefaultSequences+I.FULFILLED,payload:t.data})}catch{yield n({type:L.getDefaultSequences+I.REJECTED,payload:{}})}})}function*$w(){yield S(L.getAllSequences+I.REQUEST,function*(e){try{yield n({type:L.getAllSequences+I.PENDING,payload:{}});const t=yield m(async()=>await kw(e.payload.boardId));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.getAllSequences+I.FULFILLED,payload:t.data.filter(o=>e.payload.isPlaylist?o.isPlaylist:!0)})}catch{yield n({type:L.getAllSequences+I.REJECTED,payload:{}})}})}function*Gw(){yield S(L.getSequence+I.REQUEST,function*(e){try{yield n({type:L.getSequence+I.PENDING,payload:{}});const t=yield m(async()=>await Lw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.getSequence+I.FULFILLED,payload:t.data})}catch{yield n({type:L.getSequence+I.REJECTED,payload:{}})}})}function*Vw(){yield S(L.createSequence+I.REQUEST,function*(e){try{yield n({type:L.createSequence+I.PENDING,payload:{}});const t=yield m(async()=>await Fw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.createSequence+I.FULFILLED,payload:t.data}),yield n({type:L.getAllSequences+I.REQUEST,payload:e.payload})}catch{yield n({type:L.createSequence+I.REJECTED,payload:{}})}})}function*Jw(){yield S(L.deleteSequence+I.REQUEST,function*(e){try{yield n({type:L.deleteSequence+I.PENDING,payload:{}});const t=yield m(async()=>await Uw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.deleteSequence+I.FULFILLED,payload:t.data}),yield n({type:L.getAllSequences+I.REQUEST,payload:e.payload})}catch{yield n({type:L.deleteSequence+I.REJECTED,payload:{}})}})}function*zw(){yield S(L.saveSequence+I.REQUEST,function*(e){try{yield n({type:L.saveSequence+I.PENDING,payload:{}});const t=yield m(async()=>await Nw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.saveSequence+I.FULFILLED,payload:t.data}),yield n({type:L.getAllSequences+I.REQUEST,payload:e.payload})}catch{yield n({type:L.saveSequence+I.REJECTED,payload:{}})}})}function*Ww(){yield S(L.assignSequence+I.REQUEST,function*(e){try{yield n({type:L.assignSequence+I.PENDING,payload:{}});const t=yield m(async()=>await Rw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.assignSequence+I.FULFILLED,payload:t.data})}catch{yield n({type:L.assignSequence+I.REJECTED,payload:{}})}})}function*Yw(){yield S(L.updateSchedule+I.REQUEST,function*(e){try{yield n({type:L.updateSchedule+I.PENDING,payload:{}});const t=yield m(async()=>await Hw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.updateSchedule+I.FULFILLED,payload:t.data})}catch{yield n({type:L.updateSchedule+I.REJECTED,payload:{}})}})}function*Kw(){yield S(L.unAssignSequence+I.REQUEST,function*(e){try{yield n({type:L.unAssignSequence+I.PENDING,payload:{}});const t=yield m(async()=>await xw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.unAssignSequence+I.FULFILLED,payload:t.data})}catch{yield n({type:L.unAssignSequence+I.REJECTED,payload:{}})}})}function*Qw(){yield S(L.getAvailability+I.REQUEST,function*(e){try{yield n({type:L.getAvailability+I.PENDING,payload:e.payload});const t=yield m(async()=>await Mw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.getAvailability+I.FULFILLED,payload:t.data})}catch{yield n({type:L.getAvailability+I.REJECTED,payload:{}})}})}function*Zw(){yield S(L.fetchLayouts+I.REQUEST,function*(e){try{yield n({type:L.fetchLayouts+I.PENDING,payload:e.payload});const t=yield m(async()=>await qw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.fetchLayouts+I.FULFILLED,payload:t.data})}catch{yield n({type:L.fetchLayouts+I.REJECTED,payload:{}})}})}function*Xw(){yield S(L.markAsDefault+I.REQUEST,function*(e){try{yield n({type:L.markAsDefault+I.PENDING,payload:{}});const t=yield m(async()=>await Ow(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.markAsDefault+I.FULFILLED,payload:t.data}),yield n({type:L.getAllSequences+I.REQUEST,payload:e.payload.boardId})}catch{yield n({type:L.markAsDefault+I.REJECTED,payload:{}})}})}function*eI(){yield Be(L.loadPreviewContent+I.REQUEST,function*(e){try{yield n({type:L.loadPreviewContent+I.PENDING,payload:{}});const t=yield m(async()=>jw(e.payload));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.loadPreviewContent+I.FULFILLED,payload:t})}catch{yield n({type:L.loadPreviewContent+I.REJECTED,payload:{}})}})}function*tI(){yield S(L.fetchHootsForCollectionContentType+I.REQUEST,function*(e){try{yield n({type:L.fetchHootsForCollectionContentType+I.PENDING,payload:{}});const t=yield m(async()=>yo(e.payload.boardId,e.payload.params));if(!t||t.error)throw Error(JSON.stringify(t));yield n({type:L.fetchHootsForCollectionContentType+I.FULFILLED,payload:t.hoots})}catch{yield n({type:L.fetchHootsForCollectionContentType+I.REJECTED,payload:{}})}})}const oI=[_w(),$w(),Gw(),Vw(),Jw(),zw(),Ww(),Yw(),Kw(),Qw(),Xw(),eI(),Zw(),tI()],Mn={currentStep:0,deviceType:null,flowType:null,boardTypes:[],boardTypesStatus:"idle",selectedBoardId:null,adminBoards:[],adminBoardsStatus:"idle",boardInfo:{boardName:"",boardDesc:"",boardLogo:"",boardType:""},locationInfo:null,createdBoard:{},createBoardStatus:"idle",saveLocationStatus:"idle",boardThemeCustomColors:{},errors:{showAllFormErrors:!1,boardNameError:!0,boardNameErrorMessage:"Please enter a name for your board.",boardDescError:!0,boardDescErrorMessage:"Please enter a description for your board.",boardLogoError:!0,boardLogoErrorMessage:"Please upload a logo for your board.",boardTypeError:!0,boardTypeErrorMessage:"Please select a board type.",locationError:!1,locationErrorMessage:"Please enter your location.",createBoardError:!1,createBoardErrorMessage:""}},ae={getBoardTypes:"activate/getBoardTypes/",getAdminBoards:"activate/getAdminBoards/",createBoard:"activate/createBoard/",saveLocation:"activate/saveLocation/"},fR=()=>({type:ae.getAdminBoards+"request"}),hR=e=>({type:ae.createBoard+"request",payload:e}),SR=e=>({type:ae.saveLocation+"request",payload:e}),fd=j({name:"activate",initialState:Mn,reducers:{resetActivate:()=>Mn,setDeviceType:(e,t)=>{e.deviceType=t.payload},setFlowType:(e,t)=>{e.flowType=t.payload},nextStep:e=>{e.currentStep+=1,e.errors.showAllFormErrors=!1},prevStep:e=>{e.currentStep>0&&(e.currentStep-=1)},goToStep:(e,t)=>{e.currentStep=t.payload,e.errors.showAllFormErrors=!1},selectBoard:(e,t)=>{e.selectedBoardId=t.payload},setAdminBoards:(e,t)=>{e.adminBoards=t.payload},setBoardType:(e,t)=>{e.boardInfo.boardType=t.payload,e.errors.boardTypeError=!1},setBoardName:(e,t)=>
9{const o=Ai.boardNameFilter(t.payload),a=o.trim();let s=!0,r="";a.length===0?(s=!0,r="Please enter a name for your board."):a.length>80?(s=!0,r="Board name must be 80 characters or less."):(s=!1,r=""),e.boardInfo.boardName=o,e.errors.boardNameError=s,e.errors.boardNameErrorMessage=r},setBoardDesc:(e,t)=>{const o=t.payload,a=(o||"").trim();let s=!0,r="";a.length<20?(s=!0,r="Description must be at least 20 characters."):a.length>250?(s=!0,r="Description must be 250 characters or less."):(s=!1,r=""),e.boardInfo.boardDesc=o,e.errors.boardDescError=s,e.errors.boardDescErrorMessage=r},setBoardLogo:(e,t)=>{e.boardInfo.boardLogo=t.payload,e.errors.boardLogoError=!t.payload,e.errors.boardLogoErrorMessage=t.payload?"":"Please upload a logo for your board."},setLocation:(e,t)=>{var o,a;e.locationInfo=t.payload,e.errors.locationError=!((o=t.payload)!=null&&o.addressLine1),e.errors.locationErrorMessage=(a=t.payload)!=null&&a.addressLine1?"":"Please enter your location."},setThemeColors:(e,t)=>{e.boardThemeCustomColors=t.payload},showValidationErrors:e=>{e.errors.showAllFormErrors=!0},setCreatedBoard:(e,t)=>{e.createdBoard=t.payload}},extraReducers:e=>{e.addCase(ae.getBoardTypes+"pending",t=>{t.boardTypesStatus=f.PENDING}),e.addCase(ae.getBoardTypes+"fulfilled",(t,o)=>{t.boardTypesStatus=f.FULFILLED,t.boardTypes=(o.payload||[]).filter(a=>!["HW","HV","HO"].includes(a.boardType)).map(a=>({boardType:a.boardType,label:a.boardTypeName,description:a.boardTypeDescription}))}),e.addCase(ae.getBoardTypes+"rejected",t=>{t.boardTypesStatus=f.REJECTED}),e.addCase(ae.getAdminBoards+"pending",t=>{t.adminBoardsStatus=f.PENDING}),e.addCase(ae.getAdminBoards+"fulfilled",(t,o)=>{t.adminBoardsStatus=f.FULFILLED,t.adminBoards=o.payload||[]}),e.addCase(ae.getAdminBoards+"rejected",t=>{t.adminBoardsStatus=f.REJECTED}),e.addCase(ae.createBoard+"pending",t=>{t.createBoardStatus=f.PENDING,t.errors.createBoardError=!1}),e.addCase(ae.createBoard+"fulfilled",(t,o)=>{var a;t.createBoardStatus=f.FULFILLED,t.createdBoard=((a=o.payload)==null?void 0:a.boardInfo)||{}}),e.addCase(ae.createBoard+"rejected",t=>{t.createBoardStatus=f.REJECTED,t.errors.createBoardError=!0,t.errors.createBoardErrorMessage="Failed to create board. Please try again."}),e.addCase(ae.saveLocation+"pending",t=>{t.saveLocationStatus=f.PENDING}),e.addCase(ae.saveLocation+"fulfilled",t=>{t.saveLocationStatus=f.FULFILLED}),e.addCase(ae.saveLocation+"rejected",t=>{t.saveLocationStatus=f.REJECTED})}}),{resetActivate:bR,setDeviceType:ER,setFlowType:wR,nextStep:IR,prevStep:vR,goToStep:CR,selectBoard:AR,setBoardType:DR,setBoardName:TR,setBoardDesc:PR,setBoardLogo:BR,setLocation:kR,setThemeColors:LR,showValidationErrors:FR}=fd.actions,aI=fd.reducer,sI=e=>{var i;const t=e.split(","),o=((i=t[0].match(/:(.*?);/))==null?void 0:i[1])||"image/jpeg",a=atob(t[1]);let s=a.length;const r=new Uint8Array(s);for(;s--;)r[s]=a.charCodeAt(s);return new Blob([r],{type:o})};function*rI(){yield S(ae.getBoardTypes+"request",function*(){try{yield n({type:ae.getBoardTypes+"pending"});const e=yield m(async()=>await yl());if(e&&e.message==="success")yield n({type:ae.getBoardTypes+"fulfilled",payload:e.data||[]});else throw new Error("Failed to fetch board types")}catch{yield n({type:ae.getBoardTypes+"rejected"})}})}function*nI(){yield S(ae.getAdminBoards+"request",function*(){try{yield n({type:ae.getAdminBoards+"pending"});let e=yield Te(o=>{var a;return((a=o.myBoards)==null?void 0:a.boardsById)||{}});Object.keys(e).length===0&&(e=((yield m(async()=>await Mr()))||[]).reduce((a,s)=>(a[s.boardId]=s,a),{}));const t=Object.values(e).filter(o=>Pl(o.membershipType));yield n({type:ae.getAdminBoards+"fulfilled",payload:t})}catch{yield n({type:ae.getAdminBoards+"rejected"})}})}function*iI(){yield S(ae.createBoard+"request",function*(e){var t,o;try{yield n({type:ae.createBoard+"pending"});const{selectedBoardUsage:a,...s}=e.payload;if((t=s.boardLogo)!=null&&t.startsWith("data:")){const i=sI(s.boardLogo),l=yield m(async()=>Il({filename:"board-logo.jpg",contentType:"image/jpeg",assetType:"BOARD_LOGO",fileSize:i.size}));yield m(async()=>vl({url:l.data.uploadUrl,file:i,contentType:"image/jpeg"})),s.boardLogo=l.data.permanentUrl}const r=yield m(async()=>await gl(s));if((o=r==null?void 0:r.data)!=null&&o.boardUrl){const i=r.data.boardId,l=yield Te(p=>{var h;
9return(h=p.activate)==null?void 0:h.locationInfo});if(l)try{yield m(async()=>await Hr({boardId:i,data:[l]}))}catch(p){console.error("Failed to save location:",p)}const d=yield m(async()=>await ke(i,{start:0,max:20,addBoardPosts:!1,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!1,showScheduledHoots:!1,customURL:""}));yield n({type:ae.createBoard+"fulfilled",payload:{boardInfo:d||r.data}}),yield n({type:"user/board/pin/request",payload:{boardId:i}})}else throw new Error("Failed to create board")}catch{yield n({type:ae.createBoard+"rejected"})}})}function*lI(){yield S(ae.saveLocation+"request",function*(e){try{yield n({type:ae.saveLocation+"pending"});const{boardId:t,locationInfo:o}=e.payload,a=yield m(async()=>await Hr({boardId:t,data:[o]}));if(a&&a.message==="success")yield n({type:ae.saveLocation+"fulfilled"});else throw new Error("Failed to save location")}catch{yield n({type:ae.saveLocation+"rejected"})}})}const dI=[rI(),nI(),iI(),lI()];function*cI(e){try{yield n({type:"screen/create/pending",payload:{}});const t=yield m(async()=>await Sb(e.payload.boardId,e.payload.params));t&&t.screenId?(yield n({type:"screen/create/fulfilled",payload:{screenCreated:!0,screenId:t.screenId}}),yield n({type:"board/screens/list/request",payload:{boardId:e.payload.boardId}})):yield n({type:"screen/create/rejected",payload:{screenCreated:!1}})}catch{yield n({type:"screen/create/rejected",payload:{}})}}function*uI(){yield S("screen/create/request",cI)}function*pI(e){try{yield n({type:"boards/all/hoots/pending",payload:{}});const t=yield m(async()=>await Gl(e.payload.params));t&&t.status!=="error"?yield n({type:"boards/all/hoots/fulfilled",payload:{hoots:t}}):yield n({type:"boards/all/hoots/rejected",payload:{hoots:[]}})}catch{yield n({type:"boards/all/hoots/rejected",payload:{}})}}function*yI(){yield S("boards/all/hoots/request",pI)}function*gI(e){try{yield n({type:"boards/all/hoots/more/pending",payload:{}});const t=yield m(async()=>await Gl(e.payload.params));t&&t.status!=="error"?yield n({type:"boards/all/hoots/more/fulfilled",payload:{hoots:t}}):yield n({type:"boards/all/hoots/more/rejected",payload:{hoots:[]}})}catch{yield n({type:"boards/all/hoots/more/rejected",payload:{}})}}function*mI(){yield S("boards/all/hoots/more/request",gI)}function*fI(e){try{yield n({type:"boards/pinned/hoots/pending",payload:{}});const t=yield m(async()=>await Jl(e.payload.params));t&&t.status!=="error"?yield n({type:"boards/pinned/hoots/fulfilled",payload:{hoots:t}}):yield n({type:"boards/pinned/hoots/rejected",payload:{hoots:[]}})}catch{yield n({type:"boards/pinned/hoots/rejected",payload:{}})}}function*hI(){yield S("boards/pinned/hoots/request",fI)}function*SI(e){try{yield n({type:"boards/pinned/hoots/more/pending",payload:{}});const t=yield m(async()=>await Jl(e.payload.params));t&&t.status!=="error"?yield n({type:"boards/pinned/hoots/more/fulfilled",payload:{hoots:t}}):yield n({type:"boards/pinned/hoots/more/rejected",payload:{hoots:[]}})}catch{yield n({type:"boards/pinned/hoots/more/rejected",payload:{}})}}function*bI(){yield S("boards/pinned/hoots/more/request",SI)}const EI=async e=>U("lists",{method:Ye.POST,payload:e}),wI=async e=>U(`lists/${e.listId}/items`,{method:Ye.POST,payload:[e.data]}),II=async e=>U(`lists/${e.listId}/items/${e.itemId}`,{method:Ye.DELETE}),vI=async()=>U("lists"),CI=async e=>U(`lists/${e.listUid}?listToken=${e.listToken}`),AI=async e=>U(`lists/${e}`),DI=async e=>U(`lists/save?listToken=${e}`,{method:Ye.POST}),TI=e=>U(`lists/${e.listId}/items/${e.itemId}`,{method:Ye.PATCH,payload:e.data}),PI=e=>U(`lists/${e.listId}`,{method:Ye.PUT,payload:e.data}),BI=e=>U(`lists/${e}`,{method:Ye.DELETE}),kI=e=>U(`lists/${e}/share`,{method:Ye.POST}),$a=async e=>U(`lists/${e}`),T={createNewList:"list/create-new-list/",removeItemFromList:"list/remove-item-from-list/",addItemToList:"list/add-item-to-list/",getAllLists:"list/get-all-lists/",getList:"list/get-list/",getListById:"list/get-list-id/",saveList:"list/save-list/",updateUserAssignedData:"list/update-user-assigned-data/",updateList:"list/update-list/",deleteList:"list/delete-list/",getShareToken:"list/get-share-token/",getListByToken:"list/get-list-by-token/"};function*LI(){yield S(T.addItemToList+u.REQUEST,function*(e){try{yield n({type:T.addItemToList+u.PENDING});const t=yield m(()=>wI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:T.addItemToList+u.FULFILLED,payload:{item:e.payload,itemIds:t.data.insertIds}})}catch(t){yield n({type:T.addItemToList+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*FI(){yield S(T.removeItemFromList+u.REQUEST,function*(e){try{yield n({type:T.removeItemFromList+u.PENDING});const t=yield m(()=>II(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:T.removeItemFromList+u.FULFILLED,payload:e.payload})}catch(t){yield n({type:T.removeItemFromList+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*UI(){yield S(T.createNewList+u.REQUEST,function*(e){try{yield n({type:T.createNewList+u.PENDING,payload:e.payload});const t=yield m(()=>EI(e.payload.listData));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);const o=t.data.listId;yield n({type:T.createNewList+u.FULFILLED,payload:{listData:e.payload,data:o}}),yield n({type:T.addItemToList+u.REQUEST,payload:{listId:o,data:e.payload.itemData}})}catch(t){yield n({type:T.createNewList+u.REJECTED,payload:{data:e.payload,message:(t==null?void 0:t.message)||de.GENERIC}})}})}function*NI(){yield S(T.getAllLists+u.REQUEST,function*(){try{yield n({type:T.getAllLists+u.PENDING});const e=yield m(()=>vI());if(!e)throw new Error;if(!e.success)throw new Error(e.errorMessage);yield n({type:T.getAllLists+u.FULFILLED,payload:e.data})}catch(e){yield n({type:T.getAllLists+u.REJECTED,payload:(e==null?void 0:e.message)||de.GENERIC})}})}function*RI(){yield S(T.getList+u.REQUEST,function*(e){try{yield n({type:T.getList+u.PENDING});const t=yield m(()=>CI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:T.getList+u.FULFILLED,payload:t.data})}catch(t){yield n({type:T.getList+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*HI(){yield S(T.getListById+u.REQUEST,function*(e){try{yield n({type:T.getListById+u.PENDING});const t=yield m(()=>AI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:T.getListById+u.FULFILLED,payload:t.data})}catch(t){throw yield n({type:T.getListById+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC}),t}}
9)}function*xI(){yield S(T.saveList+u.REQUEST,function*(e){var t;try{yield n({type:T.saveList+u.PENDING});const o=yield m(()=>DI(e.payload));if(!o)throw new Error;if(!o.success)throw new Error((t=o==null?void 0:o.response)==null?void 0:t.message);yield n({type:T.saveList+u.FULFILLED})}catch(o){yield n({type:T.saveList+u.REJECTED,payload:(o==null?void 0:o.message)||de.GENERIC})}})}function*MI(){yield S(T.updateUserAssignedData+u.REQUEST,function*(e){try{yield n({type:T.updateUserAssignedData+u.PENDING});const t=yield m(()=>TI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.message);yield n({type:T.updateUserAssignedData+u.FULFILLED,payload:e.payload})}catch(t){yield n({type:T.updateUserAssignedData+u.REJECTED,payload:t.message||de.GENERIC})}})}function*OI(){yield S(T.updateList+u.REQUEST,function*(e){try{yield n({type:T.updateList+u.PENDING});const t=yield m(()=>PI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.message);yield n({type:T.updateList+u.FULFILLED,payload:e.payload})}catch(t){yield n({type:T.updateList+u.REJECTED,payload:t.message||de.GENERIC})}})}function*jI(){yield S(T.deleteList+u.REQUEST,function*(e){try{yield n({type:T.deleteList+u.PENDING});const t=yield m(()=>BI(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.message);yield n({type:T.deleteList+u.FULFILLED,payload:e.payload})}catch(t){yield n({type:T.deleteList+u.REJECTED,payload:t.message||de.GENERIC})}})}function*qI(){yield S(T.getShareToken+u.REQUEST,function*(e){try{yield n({type:T.getShareToken+u.PENDING});const t=yield m(()=>kI(e.payload));if(!t)throw new Error(t.message);if(!t.success)throw new Error(t.message);if(!t.data)throw new Error(t.message);yield n({type:T.getShareToken+u.FULFILLED,payload:t.data.shareableUrlToken})}catch(t){yield n({type:T.getShareToken+u.REJECTED,payload:t.message||de.GENERIC})}})}function*_I(){yield S(T.getListByToken+u.REQUEST,function*(e){try{yield n({type:T.getListById+u.PENDING});const t=yield m(()=>$a(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:T.getListById+u.FULFILLED,payload:t.data})}catch(t){yield n({type:T.getListById+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}const $I=[LI(),FI(),UI(),NI(),RI(),HI(),xI(),MI(),OI(),jI(),qI(),_I()];function*GI(e){try{yield n({type:"board/screens/messages/get/pending",payload:{}});const t=yield m(async()=>await Db(e.payload.boardId));t&&t.boardScreenMessages?yield n({type:"board/screens/messages/get/fulfilled",payload:{customMessages:t.boardScreenMessages}}):yield n({type:"board/screens/messages/get/rejected",payload:{customMessages:[]}})}catch{yield n({type:"board/screens/messages/get/rejected",payload:{}})}}function*VI(){yield S("board/screens/messages/get/request",GI)}function*JI(e){try{yield n({type:"board/screens/messages/save/pending",payload:{}});const{boardId:t,screenIds:o,screenMessage:a,screenMessageId:s}=e.payload,r=yield m(async()=>await Ab(t,o,a,s));r&&r.screenMessageId?yield n({type:"board/screens/messages/save/fulfilled",payload:{}}):yield n({type:"board/screens/messages/save/rejected",payload:{}})}catch{yield n({type:"board/screens/messages/save/rejected",payload:{}})}}function*zI(){yield S("board/screens/messages/save/request",JI)}function*WI(e){try{yield n({type:"board/screens/messages/delete/pending",payload:{}});const t=yield m(async()=>await Tb(e.payload.screenMessageId));t&&t.screenMessageId?yield n({type:"board/screens/messages/delete/fulfilled",payload:{}}):yield n({type:"board/screens/messages/delete/rejected",payload:{}})}catch{yield n({type:"board/screens/messages/delete/rejected",payload:{}})}}function*YI(){yield S("board/screens/messages/delete/request",WI)}const KI=async({boardId:e,payload:t})=>await ee("api/v2/private/appstore/app",{method:"POST",payload:t,extraHeaders:{"x-board-id":e}}),QI=async({boardId:e,appUUID:t,payload:o})=>{const a={"x-board-id":e};return await ee(`api/v2/private/appstore/app/${t}`,{method:"PUT",payload:o,extraHeaders:a})},ZI=async({appId:e,boardId:t})=>{const o={"x-board-id":t};return await ee(`api/v2/private/appstore/app/unpublish/${e}`,{method:"PUT",extraHeaders:o})},XI=async({boardId:e,latitude:t,longitude:o})=>U("appStore/apps",{method:"GET",payload:{latitude:t,longitude:o},extraHeaders:{"x-board-id":e}||{}}),hd=async({boardId:e,appId:t,appIcon:o,showOnWeb:a,isPrivate:s,showOnMobile:r,showAllScreens:i,boardScreenIds:l})=>await ee("api/v2/private/appstore/app/install",{method:"POST",payload:{appId:t,showOnWeb:a,appIconUrl:o,private:s,showOnMobile:r,showAllScreens:i,boardScreenIds:l},extraHeaders:{"x-board-id":e}}),ev=async({boardId:e})=>await ee("api/v2/private/appstore/app",{extraHeaders:{"x-board-id":e}}),tv=async e=>U(`boards/${e}/apps/recommended-apps`),ov=async({boardId:e})=>U("appStore/categories",{method:"GET",extraHeaders:{"x-board-id":e}}),UR=async({boardId:e,filename:t,contentType:o})=>ee("api/v2/private/appstore/screenshots/presigned-url",{method:"POST",payload:{filename:t,contentType:o},extraHeaders:{"x-board-id":e}}
9),Sd=j({name:"addApp",initialState:{isAddingApp:!1,step:0,appProps:{type:null,name:"",iconUrl:"",showOnAllScreens:!0,selectedScreens:[],private:!1,showOnWeb:!0,showOnMobile:!0,showTypeErrorRequired:!1,showNameErrorRequired:!1,showIconUrlErrorRequired:!1,showOnSelectedScreenErrorRequired:!1},webAppProps:{url:"",mobileFriendlyUrl:"",navScope:"this_site",allowedDomains:"",showUrlErrorRequired:!1},rssFeedReaderAppProps:{url:"",showUrlErrorRequired:!1},fileAppProps:{url:"",showUrlErrorRequired:!1},collectionAppProps:{selectedCollections:[],collectionBehavior:"U",collectionSelector:ja}},reducers:{...$r,setCollectionBehavior:(e,t)=>{e.collectionAppProps.collectionBehavior=t.payload},addAppPressed:(e,t)=>{e.isAddingApp=!0,e.appProps.type=t.payload},close:e=>{e.step=0,e.isAddingApp=!1,e.appProps.type=null,e.appProps.name="",e.appProps.iconUrl="",e.appProps.showOnAllScreens=!0,e.appProps.selectedScreens=[],e.showTypeErrorRequired=!1,e.showNameErrorRequired=!1,e.showIconUrlErrorRequired=!1,e.showOnSelectedScreenErrorRequired=!1,e.webAppProps.url="",e.webAppProps.mobileFriendlyUrl="",e.webAppProps.navScope="this_site",e.webAppProps.allowedDomains="",e.webAppProps.showUrlErrorRequired=!1,e.rssFeedReaderAppProps.url="",e.rssFeedReaderAppProps.showUrlErrorRequired=!1,e.fileAppProps.url="",e.fileAppProps.showUrlErrorRequired=!1,e.collectionAppProps.selectedCollections=[],e.collectionAppProps.collectionBehavior="U"},nextStep:e=>{const t=e.appProps.type===null||e.appProps.type===void 0,o=e.appProps.name.trim()==="",a=e.appProps.iconUrl.trim()==="",s=!e.appProps.showOnAllScreens&&e.appProps.selectedScreens.length===0;if(![t,o,a,s].every(i=>i===!1)){t?e.appProps.showTypeErrorRequired=!0:e.appProps.showTypeErrorRequired=!1,o?e.appProps.showNameErrorRequired=!0:e.appProps.showNameErrorRequired=!1,a?e.appProps.showIconUrlErrorRequired=!0:e.appProps.showIconUrlErrorRequired=!1,s?e.appProps.showOnSelectedScreenErrorRequired=!0:e.appProps.showOnSelectedScreenErrorRequired=!1;return}e.step+=1},jumpToStep:(e,t)=>{e.step=t.payload},appShowOnWebChanged:(e,t)=>{e.appProps.showOnWeb=t.payload},appShowOnMobileChanged:(e,t)=>{e.appProps.showOnMobile=t.payload},appPrivateChanged:(e,t)=>{e.appProps.private=t.payload},appTypeSelected:(e,t)=>{e.appProps.type=t.payload,e.appProps.showTypeErrorRequired=t.payload===null},appNameEntered:(e,t)=>{e.appProps.name=rt(t.payload),e.appProps.showNameErrorRequired=t.payload===""},appIconUploaded:(e,t)=>{e.appProps.iconUrl=t.payload,e.appProps.showIconUrlErrorRequired=t.payload===""},appShownOnAllScreensChanged:(e,t)=>{e.appProps.showOnAllScreens=t.payload,e.appProps.showOnSelectedScreenErrorRequired=!1},appScreenToShowOnAdded:(e,t)=>{e.appProps.selectedScreens.push(t.payload),e.appProps.showOnSelectedScreenErrorRequired=!1},appScreenToShowOnRemoved:(e,t)=>{e.appProps.selectedScreens.splice(t.payload,1),e.appProps.showOnSelectedScreenErrorRequired=e.appProps.selectedScreens.length===0},webAppUrlEntered:(e,t)=>{e.webAppProps.url=t.payload,e.webAppProps.showUrlErrorRequired=t.payload===""},webAppMobileFriendlyUrlEntered:(e,t)=>{e.webAppProps.mobileFriendlyUrl=t.payload},webAppAllowedDomainAdded:(e,t)=>{e.webAppProps.allowedDomains=t.payload.trim()},webAppNavScopeChanged:(e,t)=>{e.webAppProps.navScope=t.payload},rssFeedReaderAppUrlEntered:(e,t)=>{e.rssFeedReaderAppProps.url=t.payload,e.rssFeedReaderAppProps.showUrlErrorRequired=t.payload===""},fileAppUrlEntered:(e,t)=>{e.fileAppProps.url=t.payload,e.fileAppProps.showUrlErrorRequired=t.payload===""},setCollectionAppCollections:(e,t)=>{e.collectionAppProps.selectedCollections=t.payload.map(o=>({filterText:o}))},showErrors:(e,t)=>{switch(t.payload){case"WL":e.webAppProps.showUrlErrorRequired=e.webAppProps.url.trim()==="";break;case"RR":e.rssFeedReaderAppProps.showUrlErrorRequired=e.rssFeedReaderAppProps.url.trim()==="";break;case"FA":e.fileAppProps.showUrlErrorRequired=e.fileAppProps.url.trim()==="";break;case"IA":e.appProps.showTypeErrorRequired=e.appProps.type===null||e.appProps.type===void 0,e.appProps.showNameErrorRequired=e.appProps.name.trim()==="",e.appProps.showIconUrlErrorRequired=e.appProps.iconUrl.trim()==="",e.appProps.showOnSelectedScreenErrorRequired=!e.appProps.showOnAllScreens&&e.appProps.selectedScreens.length===0;break}}},extraReducers:{...Gr}}),{addAppPressed:av,close:sv,nextStep:rv,jumpToStep:nv,appTypeSelected:iv,appNameEntered:lv,appIconUploaded:dv,appShownOnAllScreensChanged:cv,appScreenToShowOnAdded:uv,appScreenToShowOnRemoved:pv,webAppUrlEntered:yv,webAppMobileFriendlyUrlEntered:gv,webAppAllowedDomainAdded:mv,webAppNavScopeChanged:fv,rssFeedReaderAppUrlEntered:hv,fileAppUrlEntered:Sv,setCollectionAppCollections:bv,showErrors:Ev,setCollectionBehavior:wv,appPrivateChanged:Iv,appShowOnMobileChanged:vv,appShowOnWebChanged:Cv,syncData:Av,resetPanel:Dv,selectBoard:Tv,setSearchType:Pv,setSearchText:Bv,removeCollection:kv,selectCollection:Lv,filterLocalCollections:Fv}=Sd.actions,bd=Sd.reducer,NR=Object.freeze(Object.defineProperty({__proto__:null,addAppPressed:av,appIconUploaded:dv,appNameEntered:lv,appPrivateChanged:Iv,appScreenToShowOnAdded:uv,appScreenToShowOnRemoved:pv,appShowOnMobileChanged:vv,appShowOnWebChanged:Cv,appShownOnAllScreensChanged:cv,appTypeSelected:iv,close:sv,default:bd,fileAppUrlEntered:Sv,filterLocalCollections:Fv,jumpToStep:nv,nextStep:rv,removeCollection:kv,resetPanel:Dv,rssFeedReaderAppUrlEntered:hv,selectBoard:Tv,selectCollection:Lv,setCollectionAppCollections:bv,setCollectionBehavior:wv,setSearchText:Bv,setSearchType:Pv,showErrors:Ev,syncData:Av,webAppAllowedDomainAdded:mv,webAppMobileFriendlyUrlEntered:gv,webAppNavScopeChanged:fv,webAppUrlEntered:yv},Symbol.toStringTag,{value:"Module"}));function On(e,t){e.app=t,e.appProps.type=t.appTypeCode,e.appProps.name=t.appName,e.appProps.showOnAllScreens=t.showAllScreens,e.appProps.iconUrl=t.appIconUrl,e.appProps.isDeveloperApp=t.developerApp,e.appProps.showOnWeb=t.showOnWeb,e.appProps.showOnMobile=t.showOnMobile,e.appProps.appAccess=t.isPrivate?"private":"public";const o=t.boardAppsEndpoints&&t.boardAppsEndpoints.length>0?t.boardAppsEndpoints[0]:null;if(e.appProps.selectedScreens=o!=null&&o.screens?o.screens:[],!!o)switch(t.appTypeCode){case"WL":{e.webAppProps.url=o.endpoint,e.webAppProps.mobileFriendlyUrl=o.mobileEndpoint||"";const a=Array.isArray(o.allowedDomains)?o.allowedDomains:null,s=o.domainsAllowed||"";e.webAppProps.allowedDomains=a?a.join(","):s,o.navScope?e.webAppProps.navScope=o.navScope:a&&a.length>0||s.trim()!==""?e.webAppProps.navScope="advanced":e.webAppProps.navScope="this_site";break}case"FA":e.fileAppProps.url=o.endpoint;break;case"RR":e.rssFeedReaderAppProps.url=o.endpoint;break;case"CL":{const{endpoint:a,collectionBehavior:s}=o;e.collectionAppProps.selectedCollections=a,e.collectionAppProps.collectionBehavior=s||"U";break}}}
9const Ed=j({name:"editApp",initialState:{isEditing:!1,isTrimmedMode:!1,app:null,appProps:{type:"",name:"",iconUrl:"",showOnAllScreens:!0,selectedScreens:[],isDeveloperApp:!1,showOnWeb:!0,showOnMobile:!0,appAccess:"public",restrictedAppAccess:{},showTypeErrorRequired:!1,showNameErrorRequired:!1,showIconUrlErrorRequired:!1,showOnSelectedScreenErrorRequired:!1},webAppProps:{url:"",mobileFriendlyUrl:"",navScope:"this_site",allowedDomains:"",showUrlErrorRequired:!1},fileAppProps:{url:"",showUrlErrorRequired:!1},rssFeedReaderAppProps:{url:"",showUrlErrorRequired:!1},collectionAppProps:{selectedCollections:[],collectionBehavior:"",collectionSelector:ja},triggerInAppCustomization:!1,inAppCustomizationUrl:null},reducers:{...$r,setCollectionBehavior:(e,t)=>{e.collectionAppProps.collectionBehavior=t.payload},editAppPressed:(e,t)=>{e.isEditing=!0,e.isTrimmedMode=!1,On(e,t.payload)},editAppBasicPressed:(e,t)=>{e.isEditing=!0,e.isTrimmedMode=!0,On(e,t.payload)},close:e=>{e.isEditing=!1,e.isTrimmedMode=!1,e.app=null,e.appProps.type="",e.appProps.name="",e.appProps.iconUrl="",e.appProps.showOnAllScreens=!0,e.appProps.selectedScreens=[],e.appProps.showTypeErrorRequired=!1,e.appProps.showNameErrorRequired=!1,e.appProps.showIconUrlErrorRequired=!1,e.appProps.showOnSelectedScreenErrorRequired=!1,e.webAppProps.url="",e.webAppProps.mobileFriendlyUrl="",e.webAppProps.navScope="this_site",e.webAppProps.allowedDomains="",e.webAppProps.showUrlErrorRequired=!1,e.fileAppProps.url="",e.fileAppProps.showUrlErrorRequired=!1,e.rssFeedReaderAppProps.url="",e.rssFeedReaderAppProps.showUrlErrorRequired=!1,e.collectionAppProps.selectedCollections=[],e.collectionAppProps.collectionBehavior=""},appShowOnWebChanged:(e,t)=>{e.appProps.showOnWeb=t.payload},appShowOnMobileChanged:(e,t)=>{e.appProps.showOnMobile=t.payload},appAccessChanged:(e,t)=>{e.appProps.appAccess=t.payload},restrictedAppAccessChanged:(e,t)=>{e.appProps.restrictedAppAccess=t.payload},appNameEntered:(e,t)=>{e.appProps.name=rt(t.payload),e.appProps.showNameErrorRequired=t.payload===""},appIconUploaded:(e,t)=>{e.appProps.iconUrl=t.payload},appShownOnAllScreensChanged:(e,t)=>{e.appProps.showOnAllScreens=t.payload,e.appProps.showOnSelectedScreenErrorRequired=!1},appScreenToShowOnAdded:(e,t)=>{e.appProps.selectedScreens.push(t.payload),e.appProps.showOnSelectedScreenErrorRequired=!1},appScreenToShowOnRemoved:(e,t)=>{e.appProps.selectedScreens.splice(t.payload,1),e.appProps.showOnSelectedScreenErrorRequired=e.appProps.selectedScreens.length===0},webAppUrlEntered:(e,t)=>{e.webAppProps.url=t.payload,e.webAppProps.showUrlErrorRequired=t.payload===""},webAppMobileFriendlyUrlEntered:(e,t)=>{e.webAppProps.mobileFriendlyUrl=t.payload},webAppAllowedDomainAdded:(e,t)=>{e.webAppProps.allowedDomains=t.payload.trim()},webAppNavScopeChanged:(e,t)=>{e.webAppProps.navScope=t.payload},fileAppUrlEntered:(e,t)=>{e.fileAppProps.url=t.payload,e.fileAppProps.showUrlErrorRequired=t.payload===""},rssFeedReaderAppUrlEntered:(e,t)=>{e.rssFeedReaderAppProps.url=t.payload,e.rssFeedReaderAppProps.showUrlErrorRequired=t.payload===""},setCollectionAppCollections:(e,t)=>{e.collectionAppProps.selectedCollections=t.payload.map(o=>({filterText:o}))},setDisplayInAppCustomization:(e,t)=>{e.triggerInAppCustomization=t.payload},setInAppCustomizationUrl:(e,t)=>{e.inAppCustomizationUrl=t.payload}},extraReducers:{...Gr}}),{setCollectionBehavior:Uv,editAppPressed:Nv,editAppBasicPressed:Rv,close:Hv,appAccessChanged:xv,restrictedAppAccessChanged:Mv,appShowOnMobileChanged:Ov,appShowOnWebChanged:jv,appNameEntered:qv,appIconUploaded:_v,appShownOnAllScreensChanged:$v,appScreenToShowOnAdded:Gv,appScreenToShowOnRemoved:Vv,webAppUrlEntered:Jv,webAppMobileFriendlyUrlEntered:zv,webAppAllowedDomainAdded:Wv,webAppNavScopeChanged:Yv,fileAppUrlEntered:Kv,rssFeedReaderAppUrlEntered:Qv,setCollectionAppCollections:Zv,syncData:Xv,resetPanel:e2,selectBoard:t2,setSearchType:o2,setSearchText:a2,removeCollection:s2,selectCollection:r2,filterLocalCollections:n2,setDisplayInAppCustomization:i2,setInAppCustomizationUrl:l2}=Ed.actions,wd=Ed.reducer,RR=Object.freeze(Object.defineProperty({__proto__:null,appAccessChanged:xv,appIconUploaded:_v,appNameEntered:qv,appScreenToShowOnAdded:Gv,appScreenToShowOnRemoved:Vv,appShowOnMobileChanged:Ov,appShowOnWebChanged:jv,appShownOnAllScreensChanged:$v,close:Hv,default:wd,editAppBasicPressed:Rv,editAppPressed:Nv,fileAppUrlEntered:Kv,filterLocalCollections:n2,removeCollection:s2,resetPanel:e2,restrictedAppAccessChanged:Mv,rssFeedReaderAppUrlEntered:Qv,selectBoard:t2,selectCollection:r2,setCollectionAppCollections:Zv,setCollectionBehavior:Uv,setDisplayInAppCustomization:i2,setInAppCustomizationUrl:l2,setSearchText:a2,setSearchType:o2,syncData:Xv,webAppAllowedDomainAdded:Wv,webAppMobileFriendlyUrlEntered:zv,webAppNavScopeChanged:Yv,webAppUrlEntered:Jv},Symbol.toStringTag,{value:"Module"}
9)),gs=x("/manageScreenApps/fetchBoardAppsOnly",async({boardId:e},t)=>{const o=await Lo(e);return t.dispatch(Ml(o.data)),{apps:o.data}}),Co=x("/manageScreenApps/fetchScreenAppData",async({boardId:e,bypassCache:t=!1},o)=>{const{activeBoard:{boardDetails:{boardName:a}}}=o.getState(),s=await Promise.all([Vh(e),Lo(e,t)]);o.dispatch(Ml(s[1].data));function r(i){return i.success?i.data.map(l=>{const{appTypeCode:d,boardAppsEndpoints:p}=l,h=d==="CL"?p.map(v=>{const{boards:A,endpoint:w}=v;return{...v,endpoint:$e({boards:A,endpoint:w,currentBoard:{boardId:e,boardName:a}})}}):p;return{...l,boardAppsEndpoints:h}}):[]}return{appCategories:s[0],screenApps:r(s[1])}}),ms=x("/manageScreenApps/saveWebApp",async({boardId:e,appProps:t,webAppProps:o})=>{const a=o.allowedDomains.split(",").map(r=>r.trim()).filter(Boolean),s=await Bo(e,{boardAppsEndpoints:[{endpoint:o.url,collectionBehavior:"U",mobileEndpoint:o.mobileFriendlyUrl,navScope:o.navScope,allowedDomains:a,domainsAllowed:a.join(","),boardScreenId:t.selectedScreens.map(({screenId:r})=>r).join()}],appName:t.name,boardId:e,appTypeCode:t.type.appTypeCode,platformAppId:"1",showAllScreens:t.showOnAllScreens,appIconUrl:t.iconUrl,isPrivate:t.private,showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb});return s.message!=="success"?{success:!1}:{success:!0,app:s.data}}),fs=x("/manageScreenApps/saveRSSFeedReaderApp",async({boardId:e,appProps:t,rssFeedReaderAppProps:o})=>{const a=await Bo(e,{boardAppsEndpoints:[{endpoint:o.url,collectionBehavior:"U",boardScreenId:t.selectedScreens.map(({screenId:s})=>s).join()}],appName:t.name,boardId:e,appTypeCode:t.type.appTypeCode,platformAppId:"8",showAllScreens:t.showOnAllScreens,appIconUrl:t.iconUrl,isPrivate:t.private,showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb});return a.message!=="success"?{success:!1}:{success:!0,app:a.data}}),HR=e=>({type:pe.saveFileApp+"request",payload:e}),xR=e=>({type:pe.getSignedUploadRequest+"request",payload:e}),hs=x("/manageScreenApps/saveCollectionApp",async({boardId:e,appProps:t,collectionAppProps:o})=>{const a=await Bo(e,{boardAppsEndpoints:[{endpoint:et({collections:o.selectedCollections}),collectionBehavior:o.collectionBehavior,boardScreenId:t.selectedScreens.length===0?"":t.selectedScreens.map(({screenId:s})=>s).join()}],appName:t.name,boardId:e,appTypeCode:t.type.appTypeCode,platformAppId:"2",showAllScreens:t.showOnAllScreens,appIconUrl:t.iconUrl,isPrivate:t.private,showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb});return a.message!=="success"?{success:!1}:{success:!0,app:a.data}}),Ss=x("/manageScreenApps/saveCalendarApp",async({boardId:e,appProps:t})=>{const o=await Bo(e,{boardAppsEndpoints:[{endpoint:"/calendar",collectionBehavior:"U",boardScreenId:t.selectedScreens.length===0?"":t.selectedScreens.map(({screenId:a})=>a).join()}],appName:t.name,boardId:e,appTypeCode:t.type.appTypeCode,platformAppId:"6",showAllScreens:t.showOnAllScreens,appIconUrl:t.iconUrl,isPrivate:t.private,showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb});return o.message!=="success"?{success:!1}:{success:!0,app:o.data}}),bs=x("/manageScreenApps/deleteScreenApp",async({boardId:e,appId:t})=>({response:await Gh(e,t),appId:t})),Ga=(e,t)=>{e.dispatch(Co({boardId:t,bypassCache:!0,silent:!0}))},Es=x("/manageScreenApps/updateWebApp",async({boardId:e,appProps:t,webAppProps:o,app:a},s)=>{const r=o.allowedDomains.split(",").map(l=>l.trim()).filter(Boolean),i=await ko(e,a.boardAppsId,{...a,appName:t.name,showAllScreens:t.showOnAllScreens,boardId:e,appIconUrl:t.iconUrl,isPrivate:t.appAccess!=="public",showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb,boardAppsEndpoints:[{...a.boardAppsEndpoints[0],endpoint:o.url,mobileEndpoint:o.mobileFriendlyUrl,navScope:o.navScope,allowedDomains:r,domainsAllowed:r.join(","),boardScreenId:t.selectedScreens.map(({screenId:l})=>l).join()}]});return i.message!=="success"?{success:!1}:(Ga(s,e),{success:!0,updatedApp:i.data})}),MR=e=>({type:pe.updateFileApp+"request",payload:e}),ws=x("/manageScreenApps/updateRSSFeedReaderApp",async({boardId:e,appProps:t,rssFeedReaderAppProps:o,app:a},s)=>{const r=await ko(e,a.boardAppsId,{...a,appName:t.name,showAllScreens:t.showOnAllScreens,boardId:e,appIconUrl:t.iconUrl,isPrivate:t.appAccess!=="public",showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb,boardAppsEndpoints:[{...a.boardAppsEndpoints[0],endpoint:o.url,boardScreenId:t.selectedScreens.map(({screenId:i})=>i).join()}]});return r.message!=="success"?{success:!1}:(Ga(s,e),{success:!0,updatedApp:r.data})}),Is=x("/manageScreenApps/updateCollectionApp",async({boardId:e,appProps:t,collectionAppProps:o,app:a},s)=>{const r=await ko(e,a.boardAppsId,{...a,appName:t.name,showAllScreens:t.showOnAllScreens,boardId:e,appIconUrl:t.iconUrl,isPrivate:t.appAccess!=="public",showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb,boardAppsEndpoints:[{...a.boardAppsEndpoints[0],collectionBehavior:o.collectionBehavior,endpoint:et({collections:o.selectedCollections}),boardScreenId:t.selectedScreens.length===0?"":t.selectedScreens.map(({screenId:i})=>i).join()}]});return r.message!=="success"?{success:!1}:(Ga(s,e),{success:!0,updatedApp:r.data})}),vs=x("/manageScreenApps/updateCalendarApp",async({boardId:e,appProps:t,app:o},a)=>{const s=await ko(e,o.boardAppsId,{...o,appName:t.name,showAllScreens:t.showOnAllScreens,boardId:e,appIconUrl:t.iconUrl,isPrivate:t.appAccess!=="public",showOnMobile:t.showOnMobile,showOnWeb:t.showOnWeb,boardAppsEndpoints:[{...o.boardAppsEndpoints[0],boardScreenId:t.selectedScreens.length===0?"":t.selectedScreens.map(({screenId:r})=>r).join()}]});return s.message!=="success"?{success:!1}:(Ga(a,e),{success:!0,updatedApp:s.data})}),Id=({source:e,destination:t,screenApps:o})=>
9{const a=o.map(l=>l.map(d=>({...d})).filter(d=>typeof d<"u")),[s]=a[e.page].splice(e.index,1);a[t.page]?a[t.page].splice(t.index,0,s):a.push([s]);let r=[];const i=a.filter(l=>l.length).map((l,d)=>l.map((p,h)=>(r.push({appId:p.boardAppsId,seqNumber:h+1,pageNum:d+1}),{...p,pageNum:d+1,seqNumber:h+1})));return r=r.sort((l,d)=>l.pageNum-d.pageNum).reduce((l,d)=>{let p={...d};const h=l[l.length-1];if(h){const v=h.pageNum+1;p.pageNum>v&&(p={...p,pageNum:v})}return[...l,{...p,seq:p.seqNumber}]},[]),{sequences:r,newSequence:i}},Cs=x("/manageScreenApps/persistNewAppOrder",async(e,t)=>{const{sequences:o,newSequence:a}=Id(e);t.dispatch({type:"board/details/setApps",payload:a.flat()});try{return(await Jh(e.boardId,{boardId:e.boardId,sequences:o})).message!=="success"?(t.dispatch({type:"board/details/setApps",payload:e.screenApps.flat()}),{success:!1}):{success:!0,screenApps:a}}catch(s){throw t.dispatch({type:"board/details/setApps",payload:e.screenApps.flat()}),s}}),vd=j({name:"manageScreenApps",initialState:{isVideoHelperActive:!1,isAppIconChooserActive:!1,isFetchingInitial:!1,screenApps:[],appCategories:[],addAppStatus:null,trackAppData:{},getSignedUploadRequestStatus:"idle",getSignedUploadRequestData:null,startUploadCounter:0,editAppStatus:"idle",deleteAppStatus:null,_screenAppsSnapshot:null,_screenAppsBoardId:null},reducers:{setAppIconChooser:(e,t)=>{e.isAppIconChooserActive=!!t.payload},setVideoHelperActive:(e,t)=>{e.isVideoHelperActive=!!t.payload},incrementStartUploadCounter:(e,t)=>{typeof t.payload=="number"?e.startUploadCounter=t.payload:e.startUploadCounter+=1},resetStatus:e=>{e.addAppStatus=null,e.editAppStatus="idle",e.deleteAppStatus=null,e.trackAppData={}},addNewPage:e=>{e.screenApps=[...e.screenApps,[]]}},extraReducers:{[Co.fulfilled]:(e,t)=>{var i,l;const{appCategories:o,screenApps:a}=t.payload,s=a.reduce((d,p)=>p.pageNum>d?p.pageNum:d,0),r=[...Array(s).keys()].map(d=>a.filter(p=>p.pageNum===d+1));e.appCategories=o,e.isFetchingInitial=!1,e.screenApps=r,e._screenAppsBoardId=((l=(i=t.meta)==null?void 0:i.arg)==null?void 0:l.boardId)??null},[Co.pending]:(e,t)=>{var a,s,r,i;(s=(a=t.meta)==null?void 0:a.arg)!=null&&s.silent||(e.isFetchingInitial=!0);const o=((i=(r=t.meta)==null?void 0:r.arg)==null?void 0:i.boardId)??null;e._screenAppsBoardId!==null&&o!==null&&e._screenAppsBoardId!==o&&(e.screenApps=[],e.appCategories=[])},[Co.rejected]:e=>{e.isFetchingInitial=!1},[gs.fulfilled]:e=>{e.isFetchingInitial=!1},[gs.pending]:e=>{e.isFetchingInitial=!0},[gs.rejected]:e=>{e.isFetchingInitial=!1},[bs.pending]:(e,t)=>{const{appId:o}=t.meta.arg;e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps)),e.screenApps=e.screenApps.map(a=>a.filter(s=>s.boardAppsId!==o)).filter(a=>a.length>0),e.deleteAppStatus="pending"},[bs.fulfilled]:e=>{e._screenAppsSnapshot=null,e.deleteAppStatus="fulfilled"},[bs.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null,e.deleteAppStatus="rejected"},[Cs.pending]:(e,t)=>{e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps));const{newSequence:o}=Id(t.meta.arg);e.screenApps=o},[Cs.fulfilled]:(e,t)=>{const{success:o}=t.payload;o||e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null},[Cs.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null},[ms.fulfilled]:(e,t)=>{const{success:o,app:a}=t.payload,{appIconUrl:s,appName:r,boardAppsId:i,appTypeCode:l}=a||{};e.trackAppData={appCategory:"Web",appId:i,boardAppId:i,appTitle:r,appIconUrl:s,appType:l},e.addAppStatus=o?"fulfilled":"rejected"},[ms.pending]:e=>{e.addAppStatus="pending"},[ms.rejected]:e=>{e.addAppStatus="rejected"},[fs.fulfilled]:(e,t)=>{const{success:o,app:a}=t.payload,{appIconUrl:s,appName:r,boardAppsId:i,appTypeCode:l}=a||{};e.trackAppData={appCategory:"Web",appId:i,boardAppId:i,appTitle:r,appIconUrl:s,appType:l},e.addAppStatus=o?"fulfilled":"rejected"},[fs.pending]:e=>{e.addAppStatus="pending"},[fs.rejected]:e=>{e.addAppStatus="rejected"},[pe.saveFileApp+"fulfilled"]:(e,t)=>{const{success:o,app:a}=t.payload,{appIconUrl:s,appName:r,boardAppsId:i,appTypeCode:l}=a||{};e.trackAppData={appCategory:"Web",appId:i,boardAppId:i,appTitle:r,appIconUrl:s,appType:l},e.addAppStatus=o?"fulfilled":"rejected",e.getSignedUploadRequestStatus="idle",e.getSignedUploadRequestData=null,e.startUploadCounter=0},[pe.saveFileApp+"pending"]:e=>{e.addAppStatus="pending"},[pe.saveFileApp+"rejected"]:e=>{e.addAppStatus="rejected"},"addApp/close":e=>{e.getSignedUploadRequestStatus="idle",e.getSignedUploadRequestData=null,e.startUploadCounter=0},"editApp/close":e=>{e.getSignedUploadRequestStatus="idle",e.getSignedUploadRequestData=null,e.startUploadCounter=0},[pe.getSignedUploadRequest+"fulfilled"]:(e,t)=>{e.getSignedUploadRequestStatus="fulfilled",e.getSignedUploadRequestData=t.payload},[pe.getSignedUploadRequest+"pending"]:e=>{e.getSignedUploadRequestStatus="pending"},[pe.getSignedUploadRequest+"rejected"]:e=>{e.getSignedUploadRequestStatus="rejected"},[hs.fulfilled]:(e,t)=>{const{success:o,app:{appIconUrl:a,appName:s,boardAppsId:r,appTypeCode:i}}=t.payload;e.trackAppData={appId:r,appCategory:"HootBoard",boardAppId:r,appTitle:s,appIconUrl:a,appType:i},e.addAppStatus=o?"fulfilled":"rejected"},[hs.pending]:e=>{e.addAppStatus="pending"},[hs.rejected]:e=>{e.addAppStatus="rejected"},[Ss.fulfilled]:(e,t)=>{const{success:o,app:{appIconUrl:a,appName:s,boardAppsId:r,appTypeCode:i}}=t.payload;e.trackAppData={appId:r,appCategory:"HootBoard",boardAppId:r,appTitle:s,appIconUrl:a,appType:i},e.addAppStatus=o?"fulfilled":"rejected"},[Ss.pending]:e=>{e.addAppStatus="pending"},[Ss.rejected]:e=>{e.addAppStatus="rejected"},[Es.pending]:(e,t)=>{const{app:o,appProps:a,webAppProps:s}=t.meta.arg;e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps));const r=s.allowedDomains.split(",").map(l=>
9l.trim()).filter(Boolean),i=r.join(",");e.screenApps=e.screenApps.map(l=>l.map(d=>{if(d.boardAppsId===o.boardAppsId){const[p,...h]=d.boardAppsEndpoints||[];return{...d,appName:a.name,appIconUrl:a.iconUrl,showOnMobile:a.showOnMobile,showOnWeb:a.showOnWeb,isPrivate:a.appAccess!=="public",showAllScreens:a.showOnAllScreens,boardAppsEndpoints:[{...p||{},endpoint:s.url,mobileEndpoint:s.mobileFriendlyUrl,navScope:s.navScope,allowedDomains:r,domainsAllowed:i,screens:a.selectedScreens},...h]}}return d})),e.editAppStatus="pending"},[Es.fulfilled]:(e,t)=>{e._screenAppsSnapshot=null,e.editAppStatus=t.payload.success?"fulfilled":"rejected"},[Es.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null,e.editAppStatus="rejected"},[pe.updateFileApp+"fulfilled"]:(e,t)=>{e.editAppStatus=t.payload.success?"fulfilled":"rejected"},[pe.updateFileApp+"pending"]:e=>{e.editAppStatus="pending"},[pe.updateFileApp+"rejected"]:e=>{e.editAppStatus="rejected"},[ws.pending]:(e,t)=>{const{app:o,appProps:a,rssFeedReaderAppProps:s}=t.meta.arg;e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps)),e.screenApps=e.screenApps.map(r=>r.map(i=>{if(i.boardAppsId===o.boardAppsId){const[l,...d]=i.boardAppsEndpoints||[];return{...i,appName:a.name,appIconUrl:a.iconUrl,showOnMobile:a.showOnMobile,showOnWeb:a.showOnWeb,isPrivate:a.appAccess!=="public",showAllScreens:a.showOnAllScreens,boardAppsEndpoints:[{...l||{},endpoint:s.url,screens:a.selectedScreens},...d]}}return i})),e.editAppStatus="pending"},[ws.fulfilled]:(e,t)=>{e._screenAppsSnapshot=null,e.editAppStatus=t.payload.success?"fulfilled":"rejected"},[ws.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null,e.editAppStatus="rejected"},[Is.pending]:(e,t)=>{const{app:o,appProps:a,collectionAppProps:s}=t.meta.arg;e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps)),e.screenApps=e.screenApps.map(r=>r.map(i=>{if(i.boardAppsId===o.boardAppsId){const[l,...d]=i.boardAppsEndpoints||[];return{...i,appName:a.name,appIconUrl:a.iconUrl,showOnMobile:a.showOnMobile,showOnWeb:a.showOnWeb,isPrivate:a.appAccess!=="public",showAllScreens:a.showOnAllScreens,boardAppsEndpoints:[{...l||{},endpoint:s.selectedCollections,collectionBehavior:s.collectionBehavior,screens:a.selectedScreens},...d]}}return i})),e.editAppStatus="pending"},[Is.fulfilled]:(e,t)=>{e._screenAppsSnapshot=null,e.editAppStatus=t.payload.success?"fulfilled":"rejected"},[Is.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null,e.editAppStatus="rejected"},[vs.pending]:(e,t)=>{const{app:o,appProps:a}=t.meta.arg;e._screenAppsSnapshot=JSON.parse(JSON.stringify(e.screenApps)),e.screenApps=e.screenApps.map(s=>s.map(r=>{if(r.boardAppsId===o.boardAppsId){const[i,...l]=r.boardAppsEndpoints||[];return{...r,appName:a.name,appIconUrl:a.iconUrl,showOnMobile:a.showOnMobile,showOnWeb:a.showOnWeb,isPrivate:a.appAccess!=="public",showAllScreens:a.showOnAllScreens,boardAppsEndpoints:[{...i||{},screens:a.selectedScreens},...l]}}return r})),e.editAppStatus="pending"},[vs.fulfilled]:(e,t)=>{e._screenAppsSnapshot=null,e.editAppStatus=t.payload.success?"fulfilled":"rejected"},[vs.rejected]:e=>{e._screenAppsSnapshot&&(e.screenApps=e._screenAppsSnapshot),e._screenAppsSnapshot=null,e.editAppStatus="rejected"}}}),{resetStatus:OR,addNewPage:jR,setVideoHelperActive:qR,incrementStartUploadCounter:_R,setAppIconChooser:$R}=vd.actions,d2=vy({manage:vd.reducer,addApp:bd,editApp:wd}),V={unPublishApp:"app-store/un-publish-app/",publishApp:"app-store/publish-app/",updatePublishedApp:"app-store/update-published-app/",getAppDirectory:"app-store/get-app-directory/",installApp:"app-store/install-app/",getBoardAppDirectory:"app-store/get-board-app-directory/",getRecommendedApps:"app-store/get-recommended-apps/",installDefaultApps:"app-store/install-default-apps/",getAppStoreCategories:"app-store/get-categories/"};function*c2(){const e=V.unPublishApp;yield S(e+"request",function*(t){try{const{boardId:o,appId:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await ZI({boardId:o,appId:a}));if(s&&s.message==="success")yield n({type:e+"fulfilled",payload:s.data});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*u2(){const e=V.publishApp;yield S(e+"request",function*(t){try{const{boardId:o,payload:a}=t.payload;yield n({type:e+"pending"});const s=yield m(async()=>await KI({boardId:o,payload:a}));if(s&&s.message==="success")yield n({type:e+"fulfilled",payload:s.data});else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*p2(){const e=V.updatePublishedApp;yield S(e+"request",function*(t){try{const{boardId:o,appUUID:a,payload:s}=t.payload;yield n({type:e+"pending"});const r=yield m(async()=>await QI({boardId:o,appUUID:a,payload:s}));if(r&&r.message==="success")yield n({type:e+"fulfilled",payload:r.data});else throw new Error(r)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*y2(){const e=V.getAppDirectory;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=yield m(async()=>await XI(t.payload));if(o&&o.success)yield n({type:e+"fulfilled",payload:o.data});else throw new Error(o)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*g2(){const e=V.installApp;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const{boardId:o,payload:a}=t.payload,s=yield m(async()=>await hd({boardId:o,...a}));if(s&&s.message==="success")yield n({type:e+"fulfilled",payload:s.data}),yield n(Co({boardId:o,bypassCache:!0}));else throw new Error(s)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*m2(){const e=V.installDefaultApps;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const{boardId:o,apps:a}=t.payload,s=a.map(i=>{const l={appIcon:i.appIcon,appId:i.appId,boardScreenIds:"",isPrivate:!1,showAllScreens:!0,showOnWeb:!0,showOnMobile:!0};return m(hd,{boardId:o,...l})}
9),r=yield Si(s);if(r.every(i=>i.message==="success")){yield n({type:e+"fulfilled",payload:r.map(l=>l.data)});const i=yield m(Lo,o,!0);i!=null&&i.data&&(yield n({type:"board/details/setApps",payload:i.data}))}else throw new Error("Some apps failed to install")}catch(o){yield n({type:e+"rejected",payload:o})}})}function*f2(){const e=V.getBoardAppDirectory;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const{boardId:o}=t.payload,a=yield m(async()=>await ev({boardId:o}));if(a&&a.message==="success")yield n({type:e+"fulfilled",payload:a.data});else throw new Error(a)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*h2(){const e=V.getAppStoreCategories;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=yield m(async()=>await ov(t.payload));if(o&&o.success)yield n({type:e+"fulfilled",payload:o.data||[]});else throw new Error(o)}catch(o){yield n({type:e+"rejected",payload:o})}})}function*S2(){const e=V.getRecommendedApps;yield S(e+"request",function*(t){try{yield n({type:e+"pending"});const o=t.payload,a=yield m(async()=>await tv(o));if(!a)throw new Error(a);if(!a.message)throw new Error(a);yield n({type:e+"fulfilled",payload:a.data||[]})}catch(o){yield n({type:e+"rejected",payload:o})}})}const b2=[u2(),g2(),c2(),y2(),p2(),S2(),f2(),m2(),h2()],E2=async({sendersId:e,receiverId:t,messageText:o,hootId:a})=>se("private/messages/send",{sendersId:e,receiverId:t,messageText:o,hootId:a}),w2=async()=>ie("private/messages/conversations"),I2=async()=>ie("private/messages/count/unread"),v2=async({conversationId:e,messageText:t})=>se("private/messages/reply",{conversationId:e,messageText:t}),C2=async e=>be("private/messages/read/"+e);function*A2(e){try{yield n({type:"messaging/send/pending"});const t=yield m(async()=>await E2(e.payload));if(!t.conversationId||!t.messageId)throw new Error(t);yield n({type:"messaging/send/fulfilled",payload:t})}catch(t){yield n({type:"messaging/send/rejected",payload:t})}}function*D2(){yield S("messaging/send/request",A2)}function*T2(e){const{silent:t}=e.payload;try{t||(yield n({type:"messaging/get-conversations/pending"}));const o=yield m(async()=>await w2());if(!o.data||o&&o.message!=="success")throw new Error(o);yield n({type:"messaging/get-conversations/fulfilled",payload:o.data})}catch(o){t||(yield n({type:"messaging/get-conversations/rejected",payload:o}))}}function*P2(){yield S("messaging/get-conversations/request",T2)}function*B2(e){try{yield n({type:"messaging/send-reply/pending"});const{conversationId:t,messageText:o,conversationIndex:a}=e.payload,s=yield m(async()=>await v2({conversationId:t,messageText:o}));if(!s.messageText||!s.messageCount||!s.messageDate)throw new Error(s);yield n({type:"messaging/send-reply/fulfilled",payload:{conversationId:t,conversationIndex:a,messageDate:s.messageDate,messgeDivClass:"blue",messageText:s.messageText}})}catch(t){yield n({type:"messaging/send-reply/rejected",payload:t})}}function*k2(){yield S("messaging/send-reply/request",B2)}function*L2(){try{yield n({type:"messaging/get-unread/pending"});const e=yield m(async()=>await I2());if(!e.unreadMsgCount)throw new Error(e);yield n({type:"messaging/get-unread/fulfilled",payload:e.unreadMsgCount})}catch(e){yield n({type:"messaging/get-unread/rejected",payload:e})}}function*F2(){yield S("messaging/get-unread/request",L2)}function*U2(e){try{yield n({type:"messaging/read/pending"});const{conversationId:t,conversationIndex:o}=e.payload,a=yield m(async()=>await C2(t));if(!a.readMsgStatus)throw new Error(a);yield n({type:"messaging/read/fulfilled",payload:{conversationId:t,conversationIndex:o}})}catch(t){yield n({type:"messaging/read/rejected",payload:t})}}function*N2(){yield S("messaging/read/request",U2)}
9function*R2(e){try{if(yield n({type:"user/account/update/pending",payload:{}}),(yield m(async()=>await Eh(e.payload.params))).status!=="error"){const o=yield m(async()=>await Or());o?yield n({type:"user/account/update/fulfilled",payload:{accountDetails:o}}):yield n({type:"user/account/update/rejected",payload:{accountDetails:null}})}else yield n({type:"user/account/update/rejected",payload:{}})}catch{yield n({type:"user/account/update/rejected",payload:{}})}}function*H2(){yield S("user/account/update/request",R2)}function*x2(){try{yield n({type:"user/account/get/pending",payload:{}});const e=yield m(async()=>await Or());e?yield n({type:"user/account/get/fulfilled",payload:{accountDetails:e}}):yield n({type:"user/account/get/rejected",payload:{accountDetails:null}})}catch{yield n({type:"user/account/get/rejected",payload:{accountDetails:null}})}}function*M2(){yield S("user/account/get/request",x2)}function*O2(e){try{yield n({type:"user/account/password/test/pending",payload:{}});const t=yield m(async()=>await Fl(e.payload.loginEmail,e.payload.password));if(!t)throw new Error(t);if(t.loginError)throw new Error(t);yield n({type:"user/account/password/test/fulfilled",payload:{loginSuccess:!0}})}catch(t){yield n({type:"user/account/password/test/rejected",payload:t})}}function*j2(){yield S("user/account/password/test/request",O2)}function*q2(e){try{yield n({type:"user/account/password/update/pending",payload:{}}),(yield m(async()=>await Ll(e.payload)))?yield n({type:"user/account/password/update/fulfilled",payload:{updatePasswordSuccess:!0}}):yield n({type:"user/account/password/update/rejected",payload:{updatePasswordSuccess:!1}})}catch{yield n({type:"user/account/password/update/rejected",payload:{}})}}function*_2(){yield S("user/account/password/update/request",q2)}function*$2(e){try{if(yield n({type:"user/account/email/update/pending",payload:{}}),(yield m(async()=>await Nl(e.payload.params.newEmail))).isMailIDUnique)if(yield m(async()=>await Ih(e.payload.params))){const a=yield m(async()=>await Or());a?yield n({type:"user/account/email/update/fulfilled",payload:{accountDetails:a}}):yield n({type:"user/account/email/update/rejected",payload:{accountDetails:null}})}else yield n({type:"user/account/email/update/rejected",payload:{updateEmailSuccess:!1}});else yield n({type:"user/account/email/update/rejected",payload:{updateEmailSuccess:!1,isUniqueEmail:!1}})}catch{yield n({type:"user/account/email/update/rejected",payload:{}})}}function*G2(){yield S("user/account/email/update/request",$2)}const go="user/board-groups",V2=async()=>{const e=await U(go);if(!(e!=null&&e.success))throw new Error("Failed to fetch board groups");return e.data},J2=async({name:e,description:t})=>{const o=await U(go,{method:"POST",payload:{name:e,description:t}});if(!(o!=null&&o.success))throw new Error("Failed to create board group");return o.data},z2=async(e,{name:t,description:o})=>{const a=await U(`${go}/${e}`,{method:"PUT",payload:{name:t,description:o}});if(!(a!=null&&a.success))throw new Error("Failed to update board group");return a.data},W2=async e=>{const t=await U(`${go}/${e}`,{method:"DELETE"});if(!(t!=null&&t.success))throw new Error("Failed to delete board group");return t.data},Y2=async(e,t)=>{const o=await U(`${go}/${e}/boards`,{method:"POST",payload:{boardIds:t}});if(!(o!=null&&o.success))throw new Error("Failed to add boards to group");return o.data},K2=async(e,t)=>{const o=await U(`${go}/${e}/boards/${t}`,{method:"DELETE"});if(!(o!=null&&o.success))throw new Error("Failed to remove board from group");return o.data};function*Q2(){try{yield n({type:"boardGroups/fetch/pending"});const e=yield m(async()=>await V2());yield n({type:"boardGroups/fetch/fulfilled",payload:e})}catch(e){console.error("fetchBoardGroups error:",e),yield n({type:"boardGroups/fetch/rejected"})}}function*Z2(e){try{yield n({type:"boardGroups/create/pending"});const t=yield m(async()=>await J2(e.payload));yield n({type:"boardGroups/create/fulfilled",payload:t})}catch(t){console.error("createBoardGroup error:",t),yield n({type:"boardGroups/create/rejected"})}}function*X2(e){try{const{boardGroupId:t,name:o,description:a}=e.payload,s=yield m(async()=>await z2(t,{name:o,description:a}));yield n({type:"boardGroups/update/fulfilled",payload:s})}catch(t){console.error("updateBoardGroup error:",t),yield n({type:"boardGroups/update/rejected"}),yield n({type:"boardGroups/fetch/request"})}}function*eC(e){try{const{boardGroupId:t}=e.payload;yield m(async()=>await W2(t)),yield n({type:"boardGroups/delete/fulfilled",payload:{boardGroupId:t}}
9)}catch(t){console.error("deleteBoardGroup error:",t),yield n({type:"boardGroups/delete/rejected"}),yield n({type:"boardGroups/fetch/request"})}}function*tC(e){try{const{boardGroupId:t,boardIds:o}=e.payload,a=yield m(async()=>await Y2(t,o));yield n({type:"boardGroups/addBoards/fulfilled",payload:a})}catch(t){console.error("addBoardsToGroup error:",t),yield n({type:"boardGroups/addBoards/rejected"}),yield n({type:"boardGroups/fetch/request"})}}function*oC(e){try{const{boardGroupId:t,boardId:o}=e.payload,a=yield m(async()=>await K2(t,o));yield n({type:"boardGroups/removeBoard/fulfilled",payload:a})}catch(t){console.error("removeBoardFromGroup error:",t),yield n({type:"boardGroups/removeBoard/rejected"}),yield n({type:"boardGroups/fetch/request"})}}const aC=[S("boardGroups/fetch/request",Q2),S("boardGroups/create/request",Z2),S("boardGroups/update/request",X2),S("boardGroups/delete/request",eC),S("boardGroups/addBoards/request",tC),S("boardGroups/removeBoard/request",oC)];function*sC(){try{yield n({type:"user/boards/list/pending",payload:{}});const e=yield m(async()=>await Mr());e?yield n({type:"user/boards/list/fulfilled",payload:{userBoards:e}}):yield n({type:"user/boards/list/rejected",payload:{userBoards:[]}})}catch{yield n({type:"user/boards/list/rejected",payload:{}})}}function*rC(){yield S("user/boards/list/request",sC)}function*nC(e){try{yield n({type:"user/board/pin/pending",payload:{}}),(yield m(async()=>await of(e.payload.boardId)))?(yield n({type:"user/boards/list/request",payload:{}}),yield n({type:"user/board/pin/fulfilled",payload:{pinned:!0}})):yield n({type:"user/board/pin/rejected",payload:{pinned:!1}})}catch{yield n({type:"user/board/pin/rejected",payload:{}})}}function*iC(){yield S("user/board/pin/request",nC)}function*lC(e){try{yield n({type:"user/board/unPin/pending",payload:{}}),(yield m(async()=>await af(e.payload.boardId)))?yield n({type:"user/board/unPin/fulfilled",payload:{unPinned:!0}}):yield n({type:"user/board/unPin/rejected",payload:{unPinned:!1}})}catch{yield n({type:"user/board/unPin/rejected",payload:{}})}}function*dC(){yield S("user/board/unPin/request",lC)}function*cC(){try{yield n({type:"user/notifications/get/pending",payload:{}});const e=yield m(async()=>await kl());e.status!=="error"?yield n({type:"user/notifications/get/fulfilled",payload:{notificationSettings:e}}):yield n({type:"user/notifications/get/rejected",payload:{notificationSettings:null}})}catch{yield n({type:"user/notifications/get/rejected",payload:{notificationSettings:null}})}}function*uC(){yield S("user/notifications/get/request",cC)}function*pC(e){try{if(yield n({type:"user/notifications/update/pending",payload:{}}),(yield m(async()=>await bh(e.payload.params))).status!=="error"){const o=yield m(async()=>await kl());o.status!=="error"?yield n({type:"user/notifications/update/fulfilled",payload:{notificationSettings:o}}):yield n({type:"user/notifications/update/rejected",payload:{notificationSettings:null}})}else yield n({type:"user/notifications/update/rejected",payload:{notificationSettings:null}})}catch{yield n({type:"user/notifications/update/rejected",payload:{notificationSettings:null}})}}function*yC(){yield S("user/notifications/update/request",pC)}const gC=async({payload:e,boardId:t})=>{var s;const o=await fetch(`${ce}/pricing/subscriptions/checkout`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to generate client secret.");const a=await o.json();if(!((s=a==null?void 0:a.data)!=null&&s.clientSecret))throw new Error("Failed to generate client secret.");return a},mC=async({payload:e,boardId:t})=>{var s;const o=await fetch(`${ce}/pricing/subscriptions/checkout`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to fetch sessionUrl.");const a=await o.json();if(!((s=a==null?void 0:a.data)!=null&&s.url))throw new Error("Failed to fetch sessionUrl.");return a},fC=async({boardId:e,returnUrl:t})=>{var s;const o=await fetch(`${ce}/pricing/customer-portal`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e},body:JSON.stringify({returnUrl:t})});if(!o.ok)throw new Error("Failed to fetch customer portal session url.");const a=await o.json();if(!((s=a==null?void 0:a.data)!=null&&s.url))throw new Error("Failed to fetch customer portal session url.");return a},hC=async({sessionId:e,boardId:t})=>{const o=await fetch(`${ce}/pricing/subscriptions/checkout/session-status?session_id=${e}`,{method:"GET",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t}});if(!o.ok)throw new Error("Failed to fetch checkout session status.");const a=await o.json();if(!a.status)throw new Error("Failed to fetch checkout session status.");return a.status},SC=async({boardId:e})=>{const t=await fetch(`${ce}/boards/${e}/pricingData`,{method:"GET",headers:{"x-board-id":e.toString(),"content-type":"application/json"}});if(!t.ok)throw new Error("Network error.");return(await t.json()).data},bC=async({payload:e,boardId:t})=>{const o=await fetch(`${Po}/api/payments/request-invoice`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to fetch pay via invoice request.");const a=await o.json();if(!(a!=null&&a.data))throw new Error("Failed to fetch pay via invoice request.");return a},EC=async({payload:e,boardId:t})=>{const o=await fetch(`${Po}/api/payments/create-payment-intent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to generate client secret.");const a=await o.json();if(!(a!=null&&a.data))throw new Error("Failed to generate client secret.");return a==null?void 0:a.data},Zr=async({boardId:e})=>{const t=await fetch(`${ce}/pricing/board/customer/new`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});
9if(!t.ok)throw new Error("Failed to create stripe customer.");const o=await t.json();if(!(o!=null&&o.data))throw new Error("Failed to fetch stripe customer request.");return o==null?void 0:o.data},GR=({stripePricingPlans:e,productTypeLookupKey:t,isYearlyPricing:o})=>{const a=e.filter(r=>r.metadata.productTypeLookupKey===t),s=[];return a.forEach(r=>{var d,p;const i=r.prices.find(h=>{var v;return((v=h.recurring)==null?void 0:v.interval)===(o?"year":"month")});if(i){const h=o?i.unit_amount/12:i.unit_amount;s.push({name:((d=r==null?void 0:r.metadata)==null?void 0:d.simpleName)||r.name,price:{...i,unit_amount:h,recurring:{...i.recurring,interval:"month"}},features:r.marketing_features,metadata:r.metadata,rawItem:r})}const l=r.prices.find(h=>h.type==="one_time");l&&s.push({name:((p=r==null?void 0:r.metadata)==null?void 0:p.simpleName)||r.name,price:{...l,unit_amount:l.unit_amount,recurring:null},features:r.marketing_features,metadata:r.metadata,rawItem:r})}),s},VR=(e,t,o=["PR2024_Q2_WMPU_MEM_DEFAULT","PR2024_Q2_WMPU_FOL_DEFAULT"])=>t[o[0]]*e.filter(a=>a.metadata.productLookupKey===o[0])[0].price.unit_amount+t[o[1]]*e.filter(a=>a.metadata.productLookupKey===o[1])[0].price.unit_amount,wC=e=>{const t={};return e.flatMap(o=>o.prices).map(o=>{t[o.lookup_key]=o}),t},IC=1,JR=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],gt={REQUEST:"/pricing/pricingPlans/request",PENDING:"/pricing/pricingPlans/pending",REJECTED:"/pricing/pricingPlans/rejected",FULFILLED:"/pricing/pricingPlans/fulfilled"},zR=R(gt.REQUEST),vC=e=>{e.fetchPricingPlansForBoardStatus=I.PENDING},CC=(e,t)=>{e.fetchPricingPlansForBoardStatus=I.FULFILLED,e.pricingPlans=t.payload.pricingPlans,e.screens=t.payload.screens,e.members=t.payload.members,e.subscriptions=t.payload.subscriptions,e.rawStripeSubscriptions=t.payload.rawStripeSubscriptions},AC=e=>{e.fetchPricingPlansForBoardStatus=I.REJECTED,e.pricingPlans=[],e.screens=[],e.members=[],e.subscriptions=[]},mt={REQUEST:"/pricing/checkout/sessionStatus/request",PENDING:"/pricing/checkout/sessionStatus/pending",REJECTED:"/pricing/checkout/sessionStatus/rejected",FULFILLED:"/pricing/checkout/sessionStatus/fulfilled"};R(mt.REQUEST);const DC=e=>{e.fetchCheckoutSessionStatusStatus=I.PENDING},TC=(e,t)=>{e.fetchCheckoutSessionStatusStatus=I.FULFILLED,e.checkoutSessionStatus=t.payload.data.checkoutSessionStatus},PC=e=>{e.fetchCheckoutSessionStatusStatus=I.REJECTED,e.checkoutSessionStatus=null},ft={REQUEST:"/pricing/checkout/clientSecretForCheckoutForm/request",PENDING:"/pricing/checkout/clientSecretForCheckoutForm/pending",REJECTED:"/pricing/checkout/clientSecretForCheckoutForm/rejected",FULFILLED:"/pricing/checkout/clientSecretForCheckoutForm/fulfilled"};R(ft.REQUEST);const BC=e=>{e.fetchClientSecretForCheckoutFormStatus=I.PENDING},kC=(e,t)=>{e.fetchClientSecretForCheckoutFormStatus=I.FULFILLED,e.clientSecretForCheckoutForm=t.payload.data.clientSecret},LC=e=>{e.fetchClientSecretForCheckoutFormStatus=I.REJECTED,e.clientSecretForCheckoutForm=null},ht={REQUEST:"/pricing/checkout/checkoutSessionUrl/request",PENDING:"/pricing/checkout/checkoutSessionUrl/pending",REJECTED:"/pricing/checkout/checkoutSessionUrl/rejected",FULFILLED:"/pricing/checkout/checkoutSessionUrl/fulfilled"};R(ht.REQUEST);const FC=e=>{e.fetchCheckoutSessionUrlStatus=I.PENDING},UC=(e,t)=>{e.fetchCheckoutSessionUrlStatus=I.FULFILLED,e.checkoutSessionUrl=t.payload.data.url},NC=e=>{e.fetchCheckoutSessionUrlStatus=I.REJECTED,e.checkoutSessionUrl=null},St={REQUEST:"/pricing/customerPortalUrl/request",PENDING:"/pricing/customerPortalUrl/pending",REJECTED:"/pricing/customerPortalUrl/rejected",FULFILLED:"/pricing/customerPortalUrl/fulfilled"},WR=R(St.REQUEST),RC=e=>{e.fetchCustomerPortalUrlStatus=I.PENDING},HC=(e,t)=>{e.fetchCustomerPortalUrlStatus=I.FULFILLED,e.customerPortalUrl=t.payload.data.url},xC=e=>{e.fetchCustomerPortalUrlStatus=I.REJECTED,e.customerPortalUrl=null},bt={REQUEST:"/pricing/payViaInvoiceRequest/request",PENDING:"/pricing/payViaInvoiceRequest/pending",REJECTED:"/pricing/payViaInvoiceRequest/rejected",FULFILLED:"/pricing/payViaInvoiceRequest/fulfilled"},YR=R(bt.REQUEST),MC=e=>{e.fetchPayViaInvoiceRequestStatus=I.PENDING},OC=(e,t)=>{e.fetchPayViaInvoiceRequestStatus=I.FULFILLED,e.payViaInvoiceRequest=t.payload.data},jC=e=>{e.fetchPayViaInvoiceRequestStatus=I.REJECTED,e.payViaInvoiceRequest=null},Et={REQUEST:"/pricing/clientSecretForCustomCheckout/request",PENDING:"/pricing/clientSecretForCustomCheckout/pending",REJECTED:"/pricing/clientSecretForCustomCheckout/rejected",FULFILLED:"/pricing/clientSecretForCustomCheckout/fulfilled"},KR=R(Et.REQUEST),qC=e=>{e.clientSecretForCustomCheckoutStatus=I.PENDING},_C=(e,t)=>{e.clientSecretForCustomCheckoutStatus=I.FULFILLED,e.clientSecretForCustomCheckout=t.payload.clientSecret,e.prorationDetail
9s=t.payload.prorationDetails},$C=e=>{e.clientSecretForCustomCheckoutStatus=I.REJECTED,e.clientSecretForCustomCheckout=null},wt={REQUEST:"/pricing/createStripeCustomer/request",PENDING:"/pricing/createStripeCustomer/pending",REJECTED:"/pricing/createStripeCustomer/rejected",FULFILLED:"/pricing/createStripeCustomer/fulfilled"},QR=R(wt.REQUEST),GC=e=>{e.createStripeCustomerRequestStatus=I.PENDING},VC=(e,t)=>{e.createStripeCustomerRequestStatus=I.FULFILLED,e.stripeCustomer=t.payload},JC=e=>{e.createStripeCustomerRequestStatus=I.REJECTED,e.stripeCustomer=null},jn={fetchPricingPlansForBoardStatus:null,fetchCustomerPortalUrlStatus:null,fetchPayViaInvoiceRequestStatus:null,createStripeCustomerRequestStatus:null,pricingPlans:[],cart:{items:[],isCartOpen:!1,paymentMode:"cc"},pricingInterval:"year",isYearlyPricing:!0,screens:[],members:[],subscriptions:[],customerPortalUrl:null,payViaInvoiceRequest:null,paidViaInvoiceForScreens:null,appItemsForScreen:null,stripeCustomer:null,screenPaymentStatus:null,clientSecretForCustomCheckoutStatus:null,clientSecretForCustomCheckout:null,stripePaymentId:null,prorationDetails:null},Cd=j({name:"pricing",initialState:jn,reducers:{setPricingInterval:(e,t)=>{e.pricingInterval=t.payload.pricingInterval,e.isYearlyPricing=t.payload.pricingInterval==="year",e.cart.items=e.cart.items.map(o=>({...o,price:wC(e.pricingPlans)[`${o.metadata.productLookupKey}_${t.payload.pricingInterval==="year"?"YR":"MO"}`]}))},closeCart:e=>{e.cart.isCartOpen=!1},openCart:e=>{e.cart.isCartOpen=!0},setPaymentMode:(e,t)=>{e.cart.paymentMode=t.payload.paymentMode},addItemToCart:(e,t)=>{const o=t.payload.item,a=t.payload.quantity,s=t.payload.isAdditionalOnly,r={...o,quantity:a||1,isOneTimeQuantity:o.metadata.productLookupKey.includes("WMPU"),isLinked:o.metadata.productLookupKey.includes("WMPU"),isAdditionalOnly:s||!1};e.cart.items=[...e.cart.items,r],e.cart.isCartOpen=!0},removeItemFromCart:(e,t)=>{const o=t.payload.item,s=t.payload.item.metadata.isLinked?e.cart.items.filter(r=>r.metadata.linkedProductLookupKey!==o.metadata.linkedProductLookupKey):e.cart.items.filter(r=>{var d,p,h;if(r.metadata.productLookupKey===o.metadata.productLookupKey)return!1;const i=((d=o.metadata)==null?void 0:d.productTypeLookupKey)==="PR2025_Q3_BOARD_PRICING",l=o.isAdditionalOnly;if(i&&!l){const v=(p=o.metadata)==null?void 0:p.internalLicenseTypeCode,A=(h=r.metadata)==null?void 0:h.internalLicenseTypeCode;if(A===`int_add_${v}`||A===`signage_add_${v}`)return!1}return!0});e.cart.items=s,e.cart.isCartOpen=!0},increaseItemQuantity:(e,t)=>{var r;const o=t.payload.item;if(((r=o.metadata)==null?void 0:r.productTypeLookupKey)==="PR2025_Q3_BOARD_PRICING")return;const s=e.cart.items.map(i=>i.metadata.productLookupKey===o.metadata.productLookupKey?{...i,quantity:i.quantity+1}:i);e.cart.items=s,e.cart.isCartOpen=!0},reduceItemQuantity:(e,t)=>{var i,l,d;const o=t.payload.item;if(((i=o.metadata)==null?void 0:i.productTypeLookupKey)==="PR2025_Q3_BOARD_PRICING")return;const s=((l=o.metadata)==null?void 0:l.productTypeLookupKey)==="PR2025_Q3_ADDITIONAL_INT"||((d=o.metadata)==null?void 0:d.productTypeLookupKey)==="PR2025_Q3_ADDITIONAL_DGS",r=e.cart.items.map(p=>{if(p.metadata.productLookupKey===o.metadata.productLookupKey){const h=p.quantity-1;return s&&h<IC?p:{...p,quantity:h}}return p}).filter(p=>p.quantity>0);e.cart.items=r,e.cart.isCartOpen=!0},resetCart:e=>{e.cart.items=[],e.cart.isCartOpen=!1},reset:()=>jn,setPaidViaInvoiceForScreens:(e,t)=>{e.paidViaInvoiceForScreens=t.payload},resetPayViaInvoiceRequest:e=>{e.payViaInvoiceRequest=null},addAppItemForScreen:(e,t)=>{e.appItemsForScreen=t.payload},setScreenPaymentStatus:(e,t)=>{e.screenPaymentStatus=t.payload},resetClientSecretForCustomCheckout:e=>{e.clientSecretForCustomCheckout=null},resetClientSecretStatusForCustomCheckout:e=>{e.clientSecretForCustomCheckoutStatus=null},setStripePaymentId:(e,t)=>{e.stripePaymentId=t.payload},resetPayViaInvoiceStates:e=>{e.payViaInvoiceRequest=null,e.fetchPayViaInvoiceRequestStatus=f.IDLE}},extraReducers:e=>{e.addCase(gt.PENDING,vC),e.addCase(gt.FULFILLED,CC),e.addCase(gt.REJECTED,AC),e.addCase(ft.PENDING,BC),e.addCase(ft.FULFILLED,kC),e.addCase(ft.REJECTED,LC),e.addCase(mt.PENDING,DC),e.addCase(mt.FULFILLED,TC),e.addCase(mt.REJECTED,PC),e.addCase(ht.PENDING,FC),e.addCase(ht.FULFILLED,UC),e.addCase(ht.REJECTED,NC),e.addCase(St.PENDING,RC),e.addCase(St.FULFILLED,HC),e.addCase(St.REJECTED,xC),e.addCase(bt.PENDING,MC),e.addCase(bt.FULFILLED,OC),e.addCase(bt.REJECTED,jC),e.addCase(Et.PENDING,qC),e.addCase(Et.FULFILLED,_C),e.addCase(Et.REJECTED,$C),e.addCase(wt.PENDING,GC),e.addCase(wt.FULFILLED,VC),e.addCase(wt.REJECTED,JC)}}),{openCart:ZR,closeCart:XR,setPricingInterval:eH,addItemToCart:tH,removeItemFromCart:oH,increaseItemQuantity:aH,reduceItemQuantity:sH,resetCart:rH,setPaymentMode:nH,setPaidViaInvoiceForScreens:iH,resetPayViaInvoiceRequest:lH,addAppItemForScreen:dH,setScreenPaymentStatus:cH,resetClientSecretForCustomCheckout:uH,resetClientSecretStatusForCustomCheckout:pH,setStripePaymentId:yH,resetPayViaInvoiceStates:gH}=Cd.actions,zC=Cd.reducer;function*WC(e){try{const t=e.payload.boardId;yield n({type:ht.PENDING,payload:null});const o=yield m(mC,{boardId:t,payload:e.payload.checkoutPayload});o?yield n({type:ht.FULFILLED,payload:o}):yield n({type:ht.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:ht.REJECTED,payload:{error:!0}})}}function*YC(){yield Be(ht.REQUEST,WC)}function*KC(e){try{const t=e.payload.boardId;yield n({type:gt.PENDING,payload:null});const o=yield m(SC,{boardId:t});o?yield n({type:gt.FULFILLED,payload:o}):yield n({type:gt.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:gt.REJECTED,payload:{error:!0}})}}function*QC(){yield Be(gt.REQUEST,KC)}function*ZC(e){try{const t=e.payload.boardId;yield n({type:ft.PENDING,payload:null});const o=yield m(gC,{boardId:t,payload:e.payload.checkoutPayload});o?yield n({type:ft.FULFILLED,payload:o}):yield n({type:ft.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:ft.REJECTED,payload:{error:!0}})}}function*XC(){yield Be(ft.REQUEST,ZC)}function*eA(e){try{const t=e.payload.boardId;yield n({type:mt.PENDING,payload:null});const o=yield m(hC,{boardId:t});o?yield n({type:mt.FULFILLED,payload:o}):yield n({type:mt.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:mt.REJECTED,payload:{error:!0}})}}function*tA(){yield Be(mt.REQUEST,eA)}function*oA(e){try{const t=e.payload.boardId,o=e.payload.returnUrl;yield n({type:St.PENDING,payload:null});const a=yield m(fC,{boardId:t,returnUrl:o});a?yield n({type:St.FULFILLED,payload:a}):yield n({type:St.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:St.REJECTED,payload:{error:!0}})}}function*aA(){yield Be(St.REQUEST,oA)}function*sA(e){try{const t=e.payload.boardId;let o=e.payload.checkoutPayload.customerId;if(!o){const s=yield m(Zr,{boardId:t});o=s==null?void 0:s.customerId}yield n({type:bt.PENDING,payload:null});const a=yield m(bC,{boardId:t,payload:{...e.payload.checkoutPayload,customerId:o}});a?yield n({type:bt.FULFILLED,payload:a}):yield n({type:bt.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:bt.REJECTED,payload:{error:!0}})}}function*rA(){yield Be(bt.REQUEST,sA)}function*nA(e){try{const t=e.payload.boardId;let o=e.payload.checkoutPayload.customerId;if(!o){const s=yield m(Zr,{boardId:t});o=s==null?void 0:s.customerId}yield n({type:Et.PENDING,payload:null});const a=yield m(EC,{boardId:t,payload:{...e.payload.checkoutPayload,customerId:o}});a?yield n({type:Et.FULFILLED,payload:a}):yield n({type:Et.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:Et.REJECTED,payload:{error:!0}})}}function*iA(){yield Be(Et.REQUEST,nA)}function*lA(e){try{const t=e.payload.boardId;yield n({type:wt.PENDING,payload:null});const o=yield m(Zr,{boardId:t});o?yield n({type:wt.FULFILLED,payload:o}):yield n({type:wt.REJECTED,payload:{error:!0}})}catch(t){console.log(t),yield n({type:wt.REJECTED,payload:{error:!0}})}}function*dA(){yield Be(wt.REQUEST,lA)}const cA=[QC(),tA(),XC(),YC(),aA(),rA(),iA(),dA()],ve={getAllTourStatuses:"product-tour/get-all-tour-statuses/",markTourAsFinished:"product-tour/mark-tour-as-finished/",markTourAsSkipped:"product-tour/mark-tour-as-skipped/"};function*uA(){yield S(ve.markTourAsSkipped+"request",function*(e){try{yield n({type:ve.markTourAsSkipped+"pending"});const t=e.payload,o=yield m(async()=>await bl({onboardingTourName:t,status:"skipped"}));if(o)yield n({type:ve.markTourAsSkipped+"fulfilled",payload:o});else throw new Error(o)}catch(t){yield n({type:ve.markTourAsSkipped+"rejected",payload:t})}})}function*pA(){yield S(ve.markTourAsFinished+"request",function*(e){try{yield n({type:ve.markTourAsFinished+"pending"});const t=e.payload,o=yield m(async()=>await bl({onboardingTourName:t,status:"completed"}));if(o)yield n({type:ve.markTourAsFinished+"fulfilled",payload:o});else throw new Error(o)}catch(t){yield n({type:ve.markTourAsFinished+"rejected",payload:t})}})}function*yA(){yield S(ve.getAllTourStatuses+"request",function*(){try{yield n({type:ve.getAllTourStatuses+"pending"});const e=yield m(async()=>await Vf());if(e)yield n({type:ve.getAllTourStatuses+"fulfilled",payload:e});else throw new Error(e)}catch(e){yield n({type:ve.getAllTourStatuses+"rejected",payload:e})}})}const gA=[yA(),uA(),pA()],mA="1099527",fA="ad4a074f-9022-427e-87df-b03e93925497";function hA(){const e=document.cookie.match(/(?:^|;\s*)hubspotutk=([^;]*)/);return e?e[1]:void 0}function SA(e){const t=[{name:"email",value:e.email},{name:"firstname",value:e.firstName},{name:"lastname",value:e.lastName},{name:"phone",value:e.phoneNum},{name:"company",value:e.organization},{name:"message",value:e.plan}].filter(a=>a.value),o=hA();return{fields:t,context:{...o?{hutk:o}:{},pageUri:e.url,pageName:document.title}}}async function bA(e){const t=`https://api.hsforms.com/submissions/v3/integration/submit/${mA}/${fA}`;try{const o=await fetch(t,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(SA(e))});if(!o.ok){const a=await o.text().catch(()=>"");console.error(`HubSpot form submission failed: ${o.status} ${a}`)}}catch(o){console.error("HubSpot form submission failed:",o)}}function*EA(e){try{yield n({type:"schedule-demo/pending"});const t=window._hsq=window._hsq||[],o=e.payload;t.push(["identify",{email:o.email,firstname:o.firstName,lastname:o.lastName,company:o.organization,phone:o.phoneNum,url:o.url}]),t.push(["trackPageView"]),yield n({type:"schedule-demo/fulfilled"}),yield m(bA,o);const a={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(o)};let s="https://stagenotifications.hootboard.com/api/contactAdded";Ua==="prod"&&(s="https://notifications.hootboard.com/api/contactAdded");const r=yield m(async()=>await fetch(s,a));yield m(async()=>await r.json())}catch{}finally{yield n({type:"schedule-demo/fulfilled"})}}function*wA(){yield S("schedule-demo/request",EA)}function*IA(e){try{yield n({type:"screen/update/pending",payload:{}});const t=yield m(()=>bb(e.payload.boardId,e.payload.params));t&&!t.error?yield n({type:"screen/update/fulfilled",payload:{screenUpdated:!0}}):yield n({type:"screen/update/rejected",payload:{screenUpdated:!1}})}catch{yield n({type:"screen/update/rejected",payload:{}})}}function*vA(){yield S("screen/update/request",IA)}function*CA(e){try{yield n({type:"screen/delete/pending",payload:{}});const t=yield m(async()=>await Cb(e.payload.boardId,e.payload.screenId));t&&!t.error?(yield n({type:"screen/delete/fulfilled",payload:{screenDeleted:!0,screenId:e.payload.screenId,screenName:e.payload.screenName}}),yield n({type:"board/screens/messages/get/request",payload:{boardId:e.payload.boardId}})):yield n({type:"screen/delete/rejected",payload:{screenDeleted:!1}})}catch{yield n({type:"screen/delete/rejected",payload:{}})}}function*AA(){yield S("screen/delete/request",CA)}
9function*DA(){try{yield n({type:"user/details/pending",payload:{}});const e=yield m(async()=>await Ke());if(e&&e.status!=="error")try{const t=yield m(async()=>await Sh(e.email));yield n({type:"user/details/fulfilled",payload:{userDetails:e,extendedRoles:t.data}})}catch{yield n({type:"user/details/fulfilled",payload:{userDetails:e,extendedRoles:[]}})}else yield n({type:"user/details/rejected",payload:{error:"Unexpected response from server"}})}catch(e){yield n({type:"user/details/rejected",payload:{error:(e==null?void 0:e.message)||"Failed to load user details"}})}}function*TA(){yield S("user/details/request",DA)}function*PA(){yield S("board/details/request",function*(e){try{yield n({type:"board/details/pending",payload:{}});const{boardId:t,boardDetails:o}=e.payload,a=yield m(async()=>await ke(t,o));if(a==="Unauthorized")yield n({type:"board/details/rejected",payload:{boardDetails:null,reason:"unauthorized"}});else if(a&&a.status!=="error")try{const s=yield m(async()=>await $h(t));s!=null&&s.success?yield n({type:"board/details/fulfilled",payload:{boardDetails:a,boardApps:s.data}}):yield n({type:"board/details/fulfilled",payload:{boardDetails:a,boardApps:[]}})}catch{yield n({type:"board/details/fulfilled",payload:{boardDetails:a,boardApps:[]}})}else yield n({type:"board/details/rejected",payload:{boardDetails:null}})}catch{yield n({type:"board/details/rejected",payload:{}})}})}function*BA(){yield S("board/leave/request",function*(e){try{yield n({type:"board/leave/pending",payload:{}});const{boardId:t,memberId:o}=e.payload,a=yield m(async()=>await sl(t,o));a&&a.status!=="error"?(yield n({type:"board/details/request",payload:{boardId:t,boardDetails:{start:0,max:20,addBoardPosts:!1,upcomingEvents:!1,freeEvents:!1,showFeaturedCollection:!1,showScheduledHoots:!0,customURL:""}}}),yield n({type:"user/details/request",payload:{}}),yield n({type:"board/leave/fulfilled",payload:{success:!0}})):yield n({type:"board/leave/rejected",payload:{success:!1}})}catch{yield n({type:"board/leave/rejected",payload:{}})}})}const kA=[PA(),BA()];function*LA(e){try{yield n({type:"custom-url/validate/pending",payload:{}});let{customUrl:t}=e.payload;const o=yield m(async()=>await Rr(0,t));o&&o.status!=="error"?yield n({type:"custom-url/validate/rejected",payload:{isValidCustomUrl:!1}}):yield n({type:"custom-url/validate/rejected",payload:{isValidCustomUrl:!0}})}catch{yield n({type:"custom-url/validate/rejected",payload:{isValidCustomUrl:!1}})}}function*FA(){yield S("custom-url/validate/request",LA)}const UA=async e=>{const t=await fetch(`${Br}/api/shorten?key=${Ui}&url=${encodeURIComponent(e)}`,{method:Ye.GET,headers:{Accept:"application/json","Content-Type":"application/json"}});if(!t.ok)throw new Error("");return t.json()},NA=async e=>{const t=await fetch(Oi,{method:Ye.POST,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("");return t.json()},RA=async e=>{const t=await fetch(Vi,{method:Ye.POST,headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error("");return t.json()},ye={getUrlShortCode:"sharing/get-url-short-code/",sendMessage:"sharing/send-message/",shareViaEmails:"sharing/share-via-emails"},HA=e=>{var t;return(t=e.activeAccount.activeAccountDetails)==null?void 0:t.partyId},xA=e=>{var t;return(t=e.activeAccount.activeAccountDetails)==null?void 0:t.email};function*MA(){yield S(ye.getUrlShortCode+u.REQUEST,function*(e){try{yield n({type:ye.getUrlShortCode+u.PENDING,payload:e.payload});const t=yield m(()=>UA(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:ye.getUrlShortCode+u.FULFILLED,payload:`${Br}/${t.data.shortUrl}`})}catch(t){yield n({type:ye.getUrlShortCode+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*OA(){yield S(ye.sendMessage+u.REQUEST,function*(e){try{yield n({type:ye.sendMessage+u.PENDING});const t=yield m(()=>NA(e.payload));if(!t)throw new Error;if(!t.success)throw new Error(t.errorMessage);yield n({type:ye.sendMessage+u.FULFILLED})}catch(t){yield n({type:ye.sendMessage+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}function*jA(){yield S(ye.shareViaEmails+u.REQUEST,function*(e){try{yield n({type:ye.shareViaEmails+u.PENDING});const t=yield Te(HA),o=yield Te(xA),a=yield m(async()=>{const s=await Ne.getDistinctID();return RA({...e.payload,distinctId:s,userId:t,userEmail:o})});if(!a)throw new Error;if(!a.success)throw new Error(a.errorMessage);yield n({type:ye.shareViaEmails+u.FULFILLED})}catch(t){yield n({type:ye.shareViaEmails+u.REJECTED,payload:(t==null?void 0:t.message)||de.GENERIC})}})}const qA=[MA(),OA(),jA()],_A=async e=>{const t=await fetch(`${Fr}/v1/segmentation/?key=${Na}`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`},body:JSON.stringify(e)});if(!t.ok)throw new Error("Failed to fetch visitors by segmentation.");const o=await t.json();return o==null?void 0:o.data}
9,Ht={getVisitorsData:"get-visitors-data/"};function*$A(){yield S(Ht.getVisitorsData,function*(e){try{yield n({type:Ht.getVisitorsData+u.PENDING,payload:{}});const t=yield m(async()=>_A(e.payload));if(!t)throw new Error;yield n({type:Ht.getVisitorsData+u.FULFILLED,payload:t})}catch(t){yield n({type:Ht.getVisitorsData+u.REJECTED,payload:t})}})}const GA=[...$A()],Qe={REQUEST:"playlist/finalize/request",PENDING:"playlist/finalize/pending",REJECTED:"playlist/finalize/rejected",FULFILLED:"playlist/finalize/fulfilled"},Mt={REQUEST:"playlist/delete/request",PENDING:"playlist/delete/pending",REJECTED:"playlist/delete/rejected",FULFILLED:"playlist/delete/fulfilled"},vt={REQUEST:"playlists/get/request",PENDING:"playlists/get/pending",REJECTED:"playlists/get/rejected",FULFILLED:"playlists/get/fulfilled"},Kt={REQUEST:"playlist/get/request",PENDING:"playlist/get/pending",REJECTED:"playlist/get/rejected",FULFILLED:"playlist/get/fulfilled"},Qt={REQUEST:"playlist/make-default/request",PENDING:"playlist/make-default/pending",REJECTED:"playlist/make-default/rejected",FULFILLED:"playlist/make-default/fulfilled"},As="IDLE",Uo="PENDING",No="FULFILLED",Ro="REJECTED",mH=R(Qe.REQUEST),fH=R(Mt.REQUEST),hH=R("playlist/get/request"),SH=R("playlists/get/request"),bH=R("playlist/make-default/request"),Ad="playlist/duplicate/",Dd=R(Ad),wr="playlist/pull/",Td=R(wr),Pd=async({boardId:e,playlist:t})=>{const o=await fetch(`${ce}/playlists`,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`},body:JSON.stringify(t)});if(o.ok)return{error:!1,data:await o.json(),errorMessage:"",success:!0};throw new Error("Failed to create playlist")},VA=async({boardId:e,playlist:t,playlistId:o})=>{const a=await fetch(`${ce}/playlists/${o}`,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`},body:JSON.stringify(t)});if(a.ok)return{error:!1,data:await a.json(),errorMessage:"",success:!0};throw new Error("Failed to update playlist")},JA=async({boardId:e,playlistId:t})=>{const o=await fetch(`${ce}/playlists/${t}`,{method:"DELETE",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`}});if(o.ok)return{error:!1,data:(await o.json()).data,errorMessage:"",success:!0};throw new Error("Failed to delete playlist")},Bd=async({boardId:e})=>{const t=await fetch(`${ce}/playlists`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`}});if(t.ok)return{error:!1,data:(await t.json()).data,errorMessage:"",success:!0};throw new Error("Failed to fetch playlists")},kd=async({boardId:e,playlistId:t})=>{const o=await fetch(`${ce}/playlists/${t}`,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`}});if(o.ok)return{error:!1,data:(await o.json()).data,errorMessage:"",success:!0};throw new Error("Failed to fetch playlist by id")},zA=async({boardId:e,playlistId:t})=>{const o=await fetch(`${ce}/playlists/${t}/set-default`,{method:"PUT",headers:{Accept:"application/json","Content-Type":"application/json","x-board-id":e,Authorization:`Bearer ${localStorage.getItem("authToken")}`}});if(o.ok)return{error:!1,data:(await o.json()).data,errorMessage:"",success:!0};throw new Error("Failed to make playlist default.")},WA=async e=>{const t={"x-board-id":e.boardId},o={start:0,limit:100,collectionsBehavior:e.collectionsBehavior,showScheduledHoots:!0,freeEvents:!1,upcomingEvents:!1,showFeaturedCollection:!1,searchString:e.searchString};return(await U("hoots",{payload:o,extraHeaders:t})).data.hoots};function EH(e){const t=Math.floor(e/3600),o=Math.floor(e%3600/60),a=e%60;return t>0?`${t}:${o.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`:`${o}:${a.toString().padStart(2,"0")}`}function Xr(){return Math.random().toString(36).substr(2,9)}const wH=e=>{const t={};for(const o of e){const s=Object.keys(o).find(i=>i!=="boardName"&&i!=="tag"),r=s&&typeof o[s]=="number"?o[s]:o.boardId;r!==void 0&&(t[r]||(t[r]=[]),t[r].push(o.tag))}return Object.entries(t).map(([o,a])=>`${o}:${a.join(",")}`).join("|")},IH=e=>{const t=[];if(!e.searchString)return t;const o=e.searchString.split("|");for(const a of o){const[s,r]=a.split(":"),i=Number(s),l=r.split(",");for(const d of l)t.push({boardId:i,tag:d})}return e.asString?t.map(a=>{var r,i;return((r=e.userBoards[a.boardId])==null?void 0:r.boardName)?`${(i=e.userBoards[a.boardId])==null?void 0:i.boardName} #${a.tag}`:`#${a.tag}`}):t.map(a=>{var s;return{...a,boardName:(s=e.userBoards[a.boardId])==null?void 0:s.boardName}})};function*YA(e){var s;console.log("workerFunction");const t=e.payload.playlist,o=(t==null?void 0:t.id)||null,a=e.payload.boardId;if(o)try{yield n({type:Qe.PENDING,payload:null});const r=yield m(VA,{boardId:a,playlistId:o,playlist:t});yield n({type:Qe.FULFILLED,payload:{...r,playlistId:o}})}catch(r){console.log(r),yield n({type:Qe.REJECTED,payload:{error:!0}})}else try{yield n({type:Qe.PENDING,payload:null});const r=yield m(Pd,{boardId:a,playlist:t});yield n({type:Qe.FULFILLED,payload:{...r,playlistId:(s=r==null?void 0:r.data)==null?void 0:s.id}})}catch(r){console.log(r),yield n({type:Qe.REJECTED,payload:{error:!0}})}}function*KA(){yield Be(Qe.REQUEST,YA)}function*QA(e){console.log("workerFunction");try{yield n({type:Mt.PENDING,payload:{currentlyDeletingPlaylistId:e.payload.playlistId}});const t=yield m(JA,{boardId:e.payload.boardId,playlistId:e.payload.playlistId});yield n({type:Mt.FULFILLED,payload:t?e.payload.playlistId:null})}catch(t){console.log(t),yield n({type:Mt.REJECTED,payload:{error:!0}})}}function*ZA(){yield Be(Mt.REQUEST,QA)}function*XA(e){try{yield n({type:vt.PENDING,payload:null});const t=yield m(Bd,{boardId:e.payload.boardId,screenId:e.payload.screenId});yield n({type:vt.FULFILLED,payload:(t==null?void 0:t.data)||[]})}catch(t){console.log(t),yield n({type:vt.REJECTED,payload:{error:!0}})}}function*eD(){yield Be(vt.REQUEST,XA)}function*tD(e){console.log("workerFunction");try{yield n({type:Kt.PENDING,payload:null});const t=yield m(kd,{boardId:e.payload.boardId,playlistId:e.payload.playlistId});yield n({type:Kt.FULFILLED,payload:(t==null?void 0:t.data)||null})}catch(t){console.log(t),yield n({type:Kt.REJECTED,payload:{error:!0}})}}function*oD(){yield Be(Kt.REQUEST,tD)}function*aD(e){console.log("workerFunction");try{yield n({type:Qt.PENDING,payload:null});const t=yield m(zA,{boardId:e.payload.boardId,playlistId:e.payload.playlistId});yield n({type:Qt.FULFILLED,payload:t?e.payload.playlistId:null})}catch(t){console.log(t),yield n({type:Qt.REJECTED,payload:{error:!0}})}}function*sD(){yield Be(Qt.REQUEST,aD)}function*rD(){yield Be(Dd,function*(e){try{yield n({type:e.type+u.PENDING});const t=yield m(kd,e.payload),o={name:`${t.data.name} (copy)`,description:t.data.description,collectionConfig:t.data.collectionConfig,items:t.data.items.map(s=>({id:Xr(),duration:s.duration,previewUrl:s.previewUrl,type:s.type,url:s.url,file:{},isPaidPromotion:s.isPaidPromotion,hasExternalPayment:s.hasExternalPayment}))};yield m(Pd,{boardId:e.payload.boardId,playlist:o});const a=yield m(Bd,{boardId:e.payload.boardId});yield n({type:vt.FULFILLED,payload:(a==null?void 0:a.data)||[]})}catch{yield n({type:e.type+u.REJECTED,payload:{error:!0}}),yield n({type:vt.REQUEST,payload:e.payload})}})}function*nD(){yield Be(Td,function*(e){try{yield n({type:e.type+u.PENDING});const t=yield m(WA,e.payload);if(!t)throw new Error(JSON.stringify(t));yield n({type:e.type+u.FULFILLED,payload:t||[]})}catch(t){console.log("error.message: ",t.message),yield n({type:e.type+u.REJECTED,payload:{error:!0,errorMessage:t.message}})}})}const iD=[eD(),ZA(),KA(),oD(),sD(),rD(),nD()],lD=async e=>{const t=await fetch(`${Pr}/scrape?url=${e}`);if(!t.ok)throw new Error;return t.json()};function*dD(){yield S(Wt,function*(e){try{yield n({type:Wt.type+u.PENDING});const{url:t}=e.payload,o=yield m(()=>lD(t));yield n({type:Wt.type+u.FULFILLED,payload:o})}catch{yield n({type:Wt.type+u.REJECTED})}})}const cD=[dD()],uD=async({payload:e,boardId:t})=>{const o=await fetch(`${At}/private/hoots`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to post hoot.");const a=await o.json();if(!a)throw new Error("Failed to post hoot.");return a},xt={postHoot:"post-hoot/"};function*pD(){yield S(xt.postHoot,function*(e){try{yield n({type:xt.postHoot+u.PENDING,payload:{}});const t=yield m(async()=>uD(e.payload));if(!t)throw new Error;yield n({type:xt.postHoot+u.FULFILLED,payload:t}),yield n(xa()),yield n(Yt())}catch(t){yield n({type:xt.postHoot+u.REJECTED,payload:t})}})}const yD=[...pD()];
9class gD extends Error{constructor(o,a,s){super(a);Ja(this,"status");Ja(this,"errorCode");this.name="InstallIntegrationError",this.status=o,this.errorCode=s}}const Ld=e=>({Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e});async function Xt(e,t){const o=await fetch(`${ce}/integrations/gtfs/catalog/${t}`,{method:"GET",headers:Ld(e)});if(!o.ok){const s=await o.json().catch(()=>null);throw new Error((s==null?void 0:s.message)||`Catalog request failed (HTTP ${o.status})`)}const a=await o.json();return a==null?void 0:a.data}const vH=e=>Xt(e,"countries"),CH=(e,t)=>Xt(e,`subdivisions?country=${encodeURIComponent(t)}`),AH=(e,t)=>Xt(e,`feeds/${encodeURIComponent(t)}`),DH=(e,t)=>{const o=new URLSearchParams;return t.country&&o.set("country",t.country),t.subdivision&&o.set("subdivision",t.subdivision),t.q&&o.set("q",t.q),t.entityType&&o.set("entityType",t.entityType),o.set("limit",String(t.limit)),t.offset!==void 0&&o.set("offset",String(t.offset)),Xt(e,`rt-feeds?${o.toString()}`)},TH=(e,t)=>Xt(e,`rt-feeds/${encodeURIComponent(t)}`),PH=(e,t,o)=>{const a=new URLSearchParams;o&&a.set("country",o);const s=`feeds/${encodeURIComponent(t)}/related-rt${a.toString()?`?${a.toString()}`:""}`;return Xt(e,s)};async function BH(e,t){var r,i;const o=new URLSearchParams;o.set("locationMode",t.locationMode),t.nwsZone&&o.set("nwsZone",t.nwsZone),t.latitude!==void 0&&t.latitude!==""&&o.set("latitude",String(t.latitude)),t.longitude!==void 0&&t.longitude!==""&&o.set("longitude",String(t.longitude)),t.minSeverity&&o.set("minSeverity",t.minSeverity),(r=t.categories)!=null&&r.length&&o.set("categories",t.categories.join(",")),(i=t.excludeTypes)!=null&&i.length&&o.set("excludeTypes",t.excludeTypes.join(",")),t.includeTestAlerts&&o.set("includeTestAlerts","true");const a=await fetch(`${ce}/integrations/nws/preview?${o.toString()}`,{method:"GET",headers:Ld(e)});if(!a.ok){const l=await a.json().catch(()=>null);throw new Error((l==null?void 0:l.message)||`NWS preview failed (HTTP ${a.status})`)}const s=await a.json();return s==null?void 0:s.data}const kH=async(e,t)=>{const o=await fetch(`${ce}/integrations/${encodeURIComponent(t)}/board-instances`,{method:"GET",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});if(!o.ok){const s=await o.json().catch(()=>null);throw new Error((s==null?void 0:s.message)||`Instances request failed (HTTP ${o.status})`)}const a=await o.json();return Array.isArray(a==null?void 0:a.data)?a.data:[]},LH=(e,t)=>{const o=new URLSearchParams;return t.country&&o.set("country",t.country),t.subdivision&&o.set("subdivision",t.subdivision),t.q&&o.set("q",t.q),o.set("limit",String(t.limit)),t.offset!==void 0&&o.set("offset",String(t.offset)),Xt(e,`feeds?${o.toString()}`)},mD=async e=>{const t=await fetch(`${ce}/integrations`,{method:"GET",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});if(!t.ok)throw new Error("Failed to fetch integrations.");const o=await t.json();return o==null?void 0:o.data},fD=async({boardId:e,integrationId:t,config:o})=>{const a=await fetch(`${ce}/integrations/${t}/install`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e,"Content-Type":"application/json"},body:JSON.stringify({config:o})});if(!a.ok){let r=null;try{r=await a.json()}catch{}const i=(r==null?void 0:r.message)||"Failed to install integration.",l=(r==null?void 0:r.errorCode)??void 0;throw new gD(a.status,i,l)}return await a.json()},hD=async({boardId:e,config:t})=>{const o={id:null,meta:{name:`hootboard_${e}`},filter:{radius:{address:t.eventsLocation,radius:t.eventsRadius}}};try{const a=await fetch(`${ce}/yodel/filters/save`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"Content-Type":"application/json"},body:JSON.stringify(o)});if(!a.ok)throw new Error("Failed to get yodel plugin id.");return await a.json()}catch(a){throw console.error("Failed to create yodel plugin",a),a}},SD=async({boardId:e,instanceId:t})=>{const o=await fetch(`${ce}/integrations/instances/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});if(!o.ok)throw new Error("Failed to delete integration instance.");return await o.json()},bD=async({boardId:e,integrationId:t})=>{const o=await fetch(`${ce}/integrations/${t}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});if(!o.ok)throw new Error("Failed to uninstall integration.");return await o.json()},ED=async({boardId:e,instanceId:t,config:o})=>{const a=await fetch(`${ce}/integrations/instances/${t}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e,"Content-Type":"application/json"},body:JSON.stringify({config:o})});if(!a.ok)throw new Error("Failed to update integration instance.");return await a.json()},wD=async({email:e,integration:t,requirements:o})=>{const a=await fetch(`${Ki}/custom-integration-request`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,integration:t,requirements:o})});if(!a.ok)throw new Error("Failed to send custom integration request.");return await a.json()},$={fetchIntegrations:"fetch-integrations/",installIntegration:"install-integration/",getYodelPluginId:"get-yodel-plugin-id/",deleteInstance:"delete-integration-instance/",uninstallIntegration:"uninstall-integration/",updateIntegrationInstance:"update-integration-instance/",sendCustomIntegrationRequest:"send-custom-integration-request/"};function*ID(){yield S($.fetchIntegrations,function*(e){try{yield n({type:$.fetchIntegrations+u.PENDING,payload:{}});const t=yield m(async()=>mD(e.payload));if(!t)throw new Error;yield n({type:$.fetchIntegrations+u.FULFILLED,payload:t})}catch(t){yield n({type:$.fetchIntegrations+u.REJECTED,payload:t})}})}function*vD(){yield S($.installIntegration,function*(e){try{yield n({type:$.installIntegration+u.PENDING,payload:{}});const t=yield m(async()=>fD(e.payload));if(!t)throw new Error;yield n({type:$.installIntegration+u.FULFILLED,payload:t})}catch(t){yield n({type:$.installIntegration+u.REJECTED,payload:{status:t==null?void 0:t.status,errorCode:t==null?void 0:t.errorCode,message:t==null?void 0:t.message}})}})}function*CD(){yield S($.getYodelPluginId,function*(e){try{yield n({type:$.getYodelPluginId+u.PENDING,payload:{}});const t=yield m(async()=>hD(e.payload));if(!t)throw new Error;yield n({type:$.getYodelPluginId+u.FULFILLED,payload:t})}catch(t){yield n({type:$.getYodelPluginId+u.REJECTED,payload:t})}})}function*AD(){yield S($.deleteInstance,function*(e){try{yield n({type:$.deleteInstance+u.PENDING,payload:{}});const t=yield m(async()=>SD(e.payload));if(!t)throw new Error;yield n({type:$.deleteInstance+u.FULFILLED,payload:t})}catch(t){yield n({type:$.deleteInstance+u.REJECTED,payload:t})}})}function*DD(){yield S($.uninstallIntegration,function*(e){try{yield n({type:$.uninstallIntegration+u.PENDING,payload:{}});const t=yield m(async()=>bD(e.payload));if(!t)throw new Error;yield n({type:$.uninstallIntegration+u.FULFILLED,payload:t})}catch(t){yield n({type:$.uninstallIntegration+u.REJECTED,payload:t})}})}function*TD(){yield S($.updateIntegrationInstance,function*(e){try{yield n({type:$.updateIntegrationInstance+u.PENDING,payload:{}});const t=yield m(async()=>ED(e.payload));if(!t)throw new Error;yield n({type:$.updateIntegrationInstance+u.FULFILLED,payload:t})}catch(t){yield n({type:$.updateIntegrationInstance+u.REJECTED,payload:t})}})}function*PD(){yield S($.sendCustomIntegrationRequest,function*(e){try{yield n({type:$.sendCustomIntegrationRequest+u.PENDING,payload:{}});const t=yield m(async()=>wD(e.payload));if(!t)throw new Error;yield n({type:$.sendCustomIntegrationRequest+u.FULFILLED,payload:t})}catch(t){yield n({type:$.sendCustomIntegrationRequest+u.REJECTED,payload:t})}})}const BD=[...ID(),...vD(),...CD(),...AD(),...DD(),...TD(),...PD()],kD=async({collectionName:e,isFeatured:t,sortOptions:o,boardId:a})=>{const s=await fetch(`${Ot}/v4/boardCollections`,{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":a,"Content-Type":"application/json"},body:JSON.stringify({tagText:`#${e}`,isFeatured:t,sortOptions:o})});if(!s.ok)throw new Error("Failed to create new Board Collection!");const r=await s.json();return r==null?void 0:r.data},LD=async({boardCollectionId:e,collectionName:t,isFeatured:o,sortOptions:a,boardId:s})=>{const r=await fetch(`${Ot}/v4/boardCollections/${e}`,{method:"PUT",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":s,"Content-Type":"application/json"},body:JSON.stringify({tagText:`#${t}`,isFeatured:o,sortOptions:a})});if(!r.ok)throw new Error("Failed to update Board Collection!");const i=await r.json();return i==null?void 0:i.data},FD=async({boardCollectionId:e,boardId:t,collectionName:o,isFeatured:a,sortOptions:s})=>{if(!(await fetch(`${Ot}/v4/boardCollections/${e}`,{method:"DELETE",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t,"Content-Type":"application/json"},body:JSON.stringify({tagText:o,isFeatured:a,sortOptions:s})})).ok)throw new Error("Failed to delete Board Collection!");return{success:!0}},me={createBoardCollection:"create-board-collection/",updateBoardCollection:"update-board-collection/",deleteBoardCollection:"delete-board-collection/"};function*UD(){yield S(me.createBoardCollection,function*(e){try{yield n({type:me.createBoardCollection+u.PENDING,payload:{}});const t=yield m(async()=>kD(e.payload));if(!t)throw new Error;yield n({type:me.createBoardCollection+u.FULFILLED,payload:t})}catch(t){yield n({type:me.createBoardCollection+u.REJECTED,payload:t})}})}function*ND(){yield S(me.updateBoardCollection,function*(e){try{yield n({type:me.updateBoardCollection+u.PENDING,payload:{}});const t=yield m(async()=>LD(e.payload));if(!t)throw new Error;yield n({type:me.updateBoardCollection+u.FULFILLED,payload:t})}catch(t){yield n({type:me.updateBoardCollection+u.REJECTED,payload:t})}})}function*RD(){yield S(me.deleteBoardCollection,function*(e){try{yield n({type:me.deleteBoardCollection+u.PENDING,payload:{}});const t=yield m(async()=>FD(e.payload));if(!t)throw new Error;yield n({type:me.deleteBoardCollection+u.FULFILLED,payload:t})}catch(t){yield n({type:me.deleteBoardCollection+u.REJECTED,payload:t})}})}const HD=[...UD(),...ND(),...RD()],FH=async()=>{const e=await fetch(`${Qi}/public-pricing`);if(!e.ok)throw new Error("Something went wrong!");return await e.json()},xD=async({boardId:e})=>{const t=await fetch(`${Ot}/v3/boards/${e}/engagement/free-screens`,{method:"GET",headers:{Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":e}});if(!t.ok)throw new Error("Something went wrong!");const o=await t.json();return o==null?void 0:o.data},MD=async({payload:e,boardId:t})=>{const o=await fetch(`${Po}/api/payments/preview-proration`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("authToken")}`,"x-board-id":t},body:JSON.stringify(e)});if(!o.ok)throw new Error("Failed to preview prorations.");const a=await o.json();if(!(a!=null&&a.data))throw new Error("Failed to preview prorations.");return a==null?void 0:a.data},OD=async({customerId:e})=>{var a;const t=await fetch(`${Po}/api/payments/create-customer-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({customerId:e})});if(!t.ok)throw new Error("Failed to fetch customer session secret.");const o=await t.json();if(!(o!=null&&o.data))throw new Error("Failed to fetch customer session secret.");return(a=o==null?void 0:o.data)==null?void 0:a.customerSessionSecret},fe={fetchFreeScreensEngagementUnits:"board-pricing/fetch-free-screens-engagement-units/",previewProrations:"board-pricing/preview-prorations/",fetchCustomerSessionSecret:"board-pricing/fetch-customer-session-secret/"};function*jD(){yield S(fe.fetchFreeScreensEngagementUnits,function*(e){try{yield n({type:fe.fetchFreeScreensEngagementUnits+u.PENDING,payload:{}});const t=yield m(async()=>xD(e.payload));if(!t)throw new Error;yield n({type:fe.fetchFreeScreensEngagementUnits+u.FULFILLED,payload:t})}catch(t){yield n({type:fe.fetchFreeScreensEngagementUnits+u.REJECTED,payload:t})}})}function*qD(){yield S(fe.previewProrations,function*(e){try{yield n({type:fe.previewProrations+u.PENDING,payload:{}});const t=yield m(async()=>MD(e.payload));if(!t)throw new Error;yield n({type:fe.previewProrations+u.FULFILLED,payload:t})}catch(t){yield n({type:fe.previewProrations+u.REJECTED,payload:t})}})}function*_D(){yield S(fe.fetchCustomerSessionSecret,function*(e){try{yield n({type:fe.fetchCustomerSessionSecret+u.PENDING,payload:{}});const t=yield m(async()=>OD(e.payload));if(!t)throw new Error;yield n({type:fe.fetchCustomerSessionSecret+u.FULFILLED,payload:t})}catch(t){yield n({type:fe.fetchCustomerSessionSecret+u.REJECTED,payload:t})}})}const $D=[...jD(),...qD(),..._D()],GD=async(e,t)=>await U("external-screens",{method:"POST",payload:t,extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),VD=async e=>await U("external-screens",{extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),JD=async(e,t,o)=>await U(`external-screens/${t}`,{method:"PUT",payload:o,extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),zD=async(e,t)=>await U(`external-screens/${t}`,{method:"DELETE",extraHeaders:{[ue.BOARD_ID_HEADER]:e}}),WD=async(e,t)=>{const o=localStorage.getItem("authToken"),{API_URL_LATEST:a}=await Ue(()=>Promise.resolve().then(()=>jm),void 0);return await(await fetch(`${a}/external-screens/bulk`,{method:"POST",headers:{Authorization:`Bearer ${o}`,"Content-Type":"text/csv",[ue.BOARD_ID_HEADER]:String(e)},body:t})).json()},W={getExternalScreens:"externalScreens/list/",createExternalScreen:"externalScreens/create/",updateExter
9nalScreen:"externalScreens/update/",deleteExternalScreen:"externalScreens/delete/",bulkUploadExternalScreens:"externalScreens/bulkUpload/"};function*YD(){yield S(W.getExternalScreens+"request",function*(e){try{yield n({type:W.getExternalScreens+"pending"});const t=yield m(async()=>await VD(e.payload.boardId));if(!t||t.error||!t.data)throw Error();yield n({type:W.getExternalScreens+"fulfilled",payload:{screens:t.data}})}catch{yield n({type:W.getExternalScreens+"rejected"})}})}function*KD(){yield S(W.createExternalScreen+"request",function*(e){try{yield n({type:W.createExternalScreen+"pending"});const t=yield m(async()=>await GD(e.payload.boardId,e.payload.screen));if(!t||t.error||!t.data)throw Error();yield n({type:W.createExternalScreen+"fulfilled",payload:{screen:t.data}}),e.payload.isFirstScreen&&(El(e.payload.boardId).catch(o=>console.error("Failed to notify screens added:",o)),window.dispatchEvent(new Event("hb_onboarding_refresh")))}catch{yield n({type:W.createExternalScreen+"rejected"})}})}function*QD(){yield S(W.updateExternalScreen+"request",function*(e){try{yield n({type:W.updateExternalScreen+"pending"});const t=yield m(async()=>await JD(e.payload.boardId,e.payload.screenId,e.payload.screen));if(!t||t.error||!t.data)throw Error();yield n({type:W.updateExternalScreen+"fulfilled",payload:{screen:t.data}})}catch{yield n({type:W.updateExternalScreen+"rejected"})}})}function*ZD(){yield S(W.deleteExternalScreen+"request",function*(e){try{yield n({type:W.deleteExternalScreen+"pending"});const t=yield m(async()=>await zD(e.payload.boardId,e.payload.screenId));if(!t||t.error||!t.data)throw Error();yield n({type:W.deleteExternalScreen+"fulfilled",payload:{screenId:e.payload.screenId}})}catch{yield n({type:W.deleteExternalScreen+"rejected"})}})}function*XD(){yield S(W.bulkUploadExternalScreens+"request",function*(e){try{yield n({type:W.bulkUploadExternalScreens+"pending"});const t=yield m(async()=>await WD(e.payload.boardId,e.payload.csvFile));if(t.error){yield n({type:W.bulkUploadExternalScreens+"rejected",payload:{errors:t.errors||[]}});return}yield n({type:W.bulkUploadExternalScreens+"fulfilled",payload:t.data}),e.payload.isFirstScreen&&(El(e.payload.boardId).catch(o=>console.error("Failed to notify screens added:",o)),window.dispatchEvent(new Event("hb_onboarding_refresh")))}catch{yield n({type:W.bulkUploadExternalScreens+"rejected",payload:{errors:[]}})}})}const eT=[YD(),KD(),QD(),ZD(),XD()],tT=e=>{const t=e.nodes.filter(d=>{var p;return d.kind==="text"&&!d.hidden&&!!((p=d.text)!=null&&p.trim())});if(t.length===0)return{title:"",description:""};const a=[...t].sort((d,p)=>p.fontSize-d.fontSize)[0],r=[...t.filter(d=>d.id!==a.id)].sort((d,p)=>d.y-p.y),i=a.text.replace(/\s*\n+\s*/g," ").trim(),l=r.map(d=>d.text.trim()).filter(Boolean).join(`
10
11`);return{title:i,description:l}},oT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2071%2070'%20enable-background='new%200%200%2071%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-519.46'%20y1='1236.614'%20x2='-518.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363.5%2086598)'%3e%3cstop%20offset='0'%20stop-color='%23FF9000'/%3e%3cstop%20offset='1'%20stop-color='%23FF6A00'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35.5'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-22'%20class='st1'%20d='M51%2027.2c-.3%202.5-1.1%208.8-6.9%209.5%201.3-2.7%202.2-6%202.6-9.6l4.3.1zm-13%2013.6h-5c-1.4-.8-3.5-2.3-4.6-4.4-1.7-3.3-2.7-7.8-3-12.6h20.1c-.2%204.8-1.2%209.2-3%2012.6-1%202.1-3.1%203.6-4.5%204.4zm-4.2%205.3h3.5v-3.8h-3.5v3.8zm-3.6%205.3h10.5v-3.8h-10.5v3.8zm-10.2-24.2l4.2-.1c.4%203.6%201.3%206.9%202.6%209.6-5.7-.7-6.5-7.1-6.8-9.5zm31.4-1.6h-4.4l.2-2.7c0-.2-.1-.3-.2-.4-.1-.1-.3-.2-.4-.2h-22.1c-.2%200-.3.1-.4.2-.1.1-.2.3-.2.4%200%20.9.1%201.8.2%202.7h-4.4c-.3%200-.7.1-.9.4-.2.3-.3.6-.3%201v.4c.3%202.7%201.3%2010.7%209.2%2010.9%201.3%201.8%203.2%203.2%204.6%204v3.9h-2.5c-.6%200-1.1.5-1.1%201.1v4.5c0%20.6.5%201.1%201.1%201.1h11.3c.6%200%201.1-.5%201.1-1.1v-4.5c0-.6-.5-1.1-1.1-1.1h-2.3v-4c1.4-.8%203.2-2.1%204.4-3.9%207.9-.1%208.9-8.2%209.3-10.9v-.4c0-.4-.1-.7-.3-1-.2-.3-.5-.4-.8-.4z'/%3e%3cpath%20id='Fill-23'%20class='st1'%20d='M28.9%2027.9c0-.4-.4-.7-.8-.7s-.7.4-.7.8c0%20.3.5%206.6%203.2%209.2.1.1.3.2.5.2s.4-.1.5-.2c.3-.3.3-.8%200-1.1-2.3-2.2-2.7-8.2-2.7-8.2'/%3e%3c/svg%3e",aT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2070'%20enable-background='new%200%200%2070%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-518.518'%20y1='1236.614'%20x2='-519.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363%2086598)'%3e%3cstop%20offset='0'%20stop-color='%2365D352'/%3e%3cstop%20offset='1'%20stop-color='%23ACDA7C'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-14'%20class='st1'%20d='M23.7%2029.3h4v8h-4.2c-2.1-.1-3.8-1.9-3.8-4-.1-2.2%201.7-4%204-4zm21.1-8.7c.1-.1.3-.1.4-.1.5%200%20.9.4.9.9v24.3c0%20.5-.4.9-.9.9-.1%200-.3%200-.4-.1l-15.7-8.7v-8.5l15.7-8.7zm-15.1%2026.4c-.1.1-.2.2-.4.2l-4%20.8c-.1%200-.2-.1-.2-.2l-2.2-9h4.5l1.7%206.5.7.6c.2.3.2.8-.1%201.1zm18-16.4l1%20.5c1%20.4%201.6%201.4%201.6%202.5s-.6%202.1-1.6%202.5l-1%20.5v-6zm-26.5%207.6l.2.9%202.2%209c.2.8.9%201.3%201.7%201.3h.30000000000000004l4.1-.7c.5-.1.8-.3%201.1-.6.4-.4.7-1%20.7-1.
116%200-.6-.2-1.2-.7-1.6l-.4-.4-1.3-5%2015%208.4c.4.2.8.3%201.2.3%201.3%200%202.4-1.1%202.4-2.4v-7.5l.6-.3%201-.5c1.5-.7%202.5-2.2%202.5-3.9%200-1.7-1-3.2-2.5-3.9l-1-.5-.6-.2v-7.5c0-1.3-1.1-2.4-2.4-2.4-.4%200-.8.1-1.1.3l-15.3%208.5h-5.2c-3%200-5.5%202.5-5.5%205.5-.1%202.1%201.2%203.9%203%204.8z'/%3e%3c/svg%3e",sT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2070'%20enable-background='new%200%200%2070%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-519.471'%20y1='1236.614'%20x2='-518.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363%2086598)'%3e%3cstop%20offset='0'%20stop-color='%2333AAF7'/%3e%3cstop%20offset='1'%20stop-color='%23036CF8'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-12'%20class='st1'%20d='M20.7%2037.5l13-13c.3-.3.6-.4%201-.4h10.2c.8%200%201.4.6%201.4%201.4v10.2c0%20.4-.1.7-.4%201l-13%2013.1c-.3.3-.6.4-1%20.4s-.7-.1-1-.4l-10.2-10.3c-.3-.3-.4-.6-.4-1%200-.3.1-.7.4-1zm9.1%2013.2c.5.5%201.3.8%202.1.8s1.5-.3%202-.8l13.1-13.1c.5-.5.9-1.2.9-2v-10.1c0-1.6-1.3-2.9-2.9-2.9h-10.3c-.8%200-1.5.3-2.1.8l-13%2013c-.5.5-.9%201.3-.9%202.1s.3%201.5.8%202.1l10.3%2010.1z'/%3e%3cpath%20id='Fill-13'%20class='st1'%20d='M39.2%2031.2c.4.4.9.6%201.5.6s1.1-.2%201.5-.6c.4-.4.6-.9.6-1.5s-.2-1.1-.6-1.5c-.4-.4-.9-.6-1.5-.6s-1.1.2-1.5.6c-.4.4-.6.9-.6%201.5s.2%201.1.6%201.5'/%3e%3c/svg%3e",rT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2070'%20enable-background='new%200%200%2070%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-518.481'%20y1='1236.614'%20x2='-519.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363%2086598)'%3e%3cstop%20offset='0'%20stop-color='%23FF3660'/%3e%3cstop%20offset='1'%20stop-color='%23FF6A64'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20class='st1'%20d='M45.6%2024.6h-2v-1.6c0-.4-.3-.8-.8-.8s-.8.4-.8.8v1.6h-14.5v-1.6c0-.4-.3-.8-.8-.8s-.7.4-.7.8v1.6h-2c-1.5%200-2.8%201.2-2.8%202.8v17.6c0%201.5%201.2%202.8%202.8%202.8h21.6c1.5%200%202.8-1.2%202.8-2.8v-17.6c-.1-1.5-1.3-2.8-2.8-2.8zm-22.8%202.8c0-.7.6-1.2%201.2-1.2h2v.8c0%20.4.3.8.8.8s.8-.3.8-.8v-.9h14.4v.9c0%20.4.3.8.8.8s.8-.3.8-.8v-.9h2c.7%200%201.2.6%201.2%201.2v3.7h-24v-3.6zm22.8%2018.8h-21.6c-.7%200-1.2-.6-1.2-1.2v-12.5h24.1v12.5c-.1.7-.6%201.2-1.3%201.2zM29%2034.8h-1.2c-.7%200-1.2.5-1.2%201.2v1.2c0%20.7.5%201.2%201.2%201.2h1.2c.7%200%201.2-.5%201.2-1.2v-1.2c0-.7-.5-1.2-1.2-1.2zM29.2%2040.4h-1.6c-.6%200-1%20.4-1%201v1.6c0%20.6.4%201%201%201h1.6c.6%200%201-.4%201-1v-1.6c0-.6-.4-1-1-1zM35.6%2034.8h-1.6c-.6%200-1%20.4-1%201v1.6c0%20.6.4%201%201%201h1.6c.6%200%201-.4%201-1v-1.6c0-.6-.4-1-1-1zM35.6%2040.4h-1.6c-.6%200-1%20.4-1%201v1.6c0%20.6.4%201%201%201h1.6c.6%200%201-.4%201-1v-1.6c0-.6-.4-1-1-1zM42%2034.8h-1.6c-.6%200-1%20.4-1%201v1.6c0%20.6.4%201%201%201h1.6c.6%200%201-.4%201-1v-1.6c0-.6-.4-1-1-1zM42%2040.4h-1.6c-.6%200-1%20.4-1%201v1.6c0%20.6.4%201%201%201h1.6c.6%200%201-.4%201-1v-1.6c0-.6-.4-1-1-1z'/%3e%3c/svg%3e",nT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2071%2070'%20enable-background='new%200%200%2071%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-518.471'%20y1='1236.614'%20x2='-519.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363.5%2086598)'%3e%3cstop%20offset='0'%20stop-color='%233ABFB5'/%3e%3cstop%20offset='1'%20stop-color='%238EF3DE'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35.5'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-15'%20class='st1'%20d='M35.5%2029.7c1.2%200%202.2%201%202.2%202.2%200%20.5.4%201%201%201%20.5%200%201-.4%201-1%200-1.9-1.4-3.6-3.3-4v-.9c0-.5-.4-1-1-1-.5%200-1%20.4-1%201v.9c-2%20.5-3.3%202.5-3%204.5.3%202%202%203.6%204.1%203.6%201.2%200%202.2%201%202.2%202.1%200%201.2-.9%202.2-2.1%202.2h-.3c-1.1-.1-1.9-1.1-1.9-2.2%200-.5-.4-1-1-1-.5%200-1%20.4-1%201%200%201.8%201.2%203.5%203%204v1c0%20.5.4%201%201%201%20.5%200%201-.4%201-1v-.9c2.1-.4%203.5-2.3%203.2-4.4-.2-2.1-2-3.7-4.1-3.7-1.2%200-2.2-1-2.2-2.2%200-1.2%201-2.2%202.2-2.2'/%3e%3cpath%20id='Fill-16'%20class='st1'%20d='M35.5%2050.6c-8.5%200-15.5-7-15.5-15.5s7-15.5%2015.5-15.5%2015.5%207%2015.5%2015.5-7%2015.5-15.5%2015.5m0-32.5c-9.4%200-17%207.6-17%2017s7.6%2017%2017%2017%2017-7.6%2017-17-7.6-17-17-17'/%3e%3c/svg%3e",iT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2070'%20enable-background='new%200%200%2070%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-518.481'%20y1='1236.614'%20x2='-519.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363%2086598)'%3e%3cstop%20offset='0'%20stop-color='%2397A6BA'/%3e%3cstop%20offset='1'%20stop-color='%23B7C7DA'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-11'%20class='st1'%20d='M48.2%2046.9c0%20.1-.1.2-.2.2h-26c-.1%200-.2-.1-.2-.2v-3.9c.2-.3
11%201-1%202.7-1.7%202.8-1.1%206.6-1.7%2010.5-1.7%203.9%200%207.7.6%2010.5%201.7%201.7.7%202.5%201.5%202.7%201.7v3.9zm-18.4-14.9v-3.9c0-2.8%202.4-5.2%205.2-5.2%202.9%200%205.2%202.3%205.2%205.2v3.9c0%202.8-2.4%205.2-5.2%205.2-2.9-.1-5.2-2.4-5.2-5.2zm16.3%207.7c-2.3-.9-5.1-1.5-8.1-1.7%202.2-1.1%203.7-3.4%203.7-6v-3.9c0-3.7-3-6.7-6.7-6.7s-6.7%203-6.7%206.7v3.9c0%202.6%201.5%204.9%203.7%206-3%20.2-5.9.9-8.1%201.7-2.2.9-3.8%202.2-3.8%203.1v4c0%201%20.8%201.9%201.9%201.9h26c1%200%201.9-.8%201.9-1.9v-4c0-.9-1.6-2.2-3.8-3.1z'/%3e%3c/svg%3e",lT="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2027.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2018%2019'%20style='enable-background:new%200%200%2018%2019;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cg%3e%3cg%20transform='translate(0%205.684)'%3e%3cpath%20class='st0'%20d='M7.5,8l-2.1,2.1C4.5,11,3,11,2.2,10.2C1.3,9.3,1.3,7.9,2.2,7l4.2-4.2c0.9-0.9,2.3-0.9,3.2,0%20c0.3,0.3,0.8,0.3,1.1,0s0.3-0.8,0-1.1c-1.5-1.5-3.8-1.5-5.3,0L1.1,5.9c-1.5,1.5-1.5,3.8,0,5.3s3.8,1.5,5.3,0l2.1-2.1%20c0.3-0.3,0.3-0.8,0-1.1S7.8,7.7,7.5,8'/%3e%3c/g%3e%3cpath%20class='st0'%20d='M16.9,1.1c-1.5-1.5-3.8-1.5-5.3,0L9.1,3.6c-0.3,0.3-0.3,0.8,0,1.1c0.2,0.3,0.7,0.3,1,0l2.5-2.5%20c0.9-0.9,2.3-0.9,3.2,0c0.9,0.9,0.9,2.3,0,3.2L11.2,10c-0.9,0.9-2.3,0.9-3.2,0c-0.3-0.3-0.8-0.3-1.1,0c-0.3,0.3-0.3,0.8,0,1.1%20c1.5,1.5,3.8,1.5,5.3,0l4.7-4.7C18.4,4.9,18.4,2.6,16.9,1.1'/%3e%3c/g%3e%3c/svg%3e",dT="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2070'%20enable-background='new%200%200%2070%2070'%3e%3cstyle%20type='text/css'%3e.st0{fill-rule:evenodd;clip-rule:evenodd;fill:url(%23Oval_1_);}%20.st1{fill-rule:evenodd;clip-rule:evenodd;fill:%23FFFFFF;}%3c/style%3e%3clinearGradient%20id='Oval_1_'%20gradientUnits='userSpaceOnUse'%20x1='-519.471'%20y1='1236.614'%20x2='-518.471'%20y2='1236.614'%20gradientTransform='matrix(70%200%200%20-70%2036363%2086598)'%3e%3cstop%20offset='0'%20stop-color='%23FACD02'/%3e%3cstop%20offset='1'%20stop-color='%23FAB702'/%3e%3c/linearGradient%3e%3ccircle%20id='Oval'%20class='st0'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20id='Fill-17'%20class='st1'%20d='M51.2%2046.3c0%20.8-.5%201.6-1.2%202l-.3.1c-.3.1-.6.2-.9.2h-.2c-1.2-.1-2.3-1.3-2.3-2.6v-4h5v4.3zm-26.3%202.5c-1.8%200-3.3-1.5-3.3-3.3v-22.7h23v23.3c0%201%20.2%201.9.7%202.7h-20.4zm26.8-8.3h-5.7v-18.2c0-.5-.4-1-1-1h-24c-.5%200-1%20.4-1%201v23.2c0%202.7%202.2%204.8%204.8%204.8h23c.3%200%20.6-.1%201-.1.5%200%201-.1%201.4-.3%201.4-.6%202.4-2%202.4-3.6v-4.8c.1-.5-.3-1-.9-1z'/%3e%3cpath%20id='Fill-18'%20class='st1'%20d='M40%2035.6h-14c-.4%200-.8.3-.8.8%200%20.4.3.8.8.8h14c.4%200%20.8-.3.8-.8s-.4-.8-.8-.8'/%3e%3cpath%20id='Fill-19'%20class='st1'%20d='M40%2039.6h-14c-.4%200-.8.3-.8.8%200%20.4.3.8.8.8h14c.4%200%20.8-.3.8-.8s-.4-.8-.8-.8'/%3e%3cpath%20id='Fill-20'%20class='st1'%20d='M40%2043.6h-14c-.4%200-.8.3-.8.8%200%20.4.3.8.8.8h14c.4%200%20.8-.3.8-.8s-.4-.8-.8-.8'/%3e%3cpath%20id='Fill-21'%20class='st1'%20d='M26.5%2031.8h13v-4h-13v4zm13.5-5.5h-14c-.6%200-1%20.4-1%201v5c0%20.6.4%201%201%201h14c.6%200%201-.4%201-1v-5c0-.5-.4-1-1-1z'/%3e%3c/svg%3e",cT="data:image/svg+xml,%3csvg%20width='20'%20height='18'%20viewBox='0%200%2020%2018'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3ephoto%3c/title%3e%3cg%20fill='%23fff'%3e%3cpath%20d='M18.5%2015.559c0%20.24-.229.444-.5.444h-16c-.271%200-.5-.204-.5-.444v-11.11c0-.242.229-.446.5-.446h2.386c.576%200%201.123-.277%201.464-.742l1.174-1.607c.07-.097.184-.155.303-.155h5.346c.119%200%20.232.058.303.155l1.174%201.607c.34.465.887.742%201.463.742h2.387c.271%200%20.5.204.5.446v11.11zm-.5-13.056h-2.387c-.099%200-.193-.047-.252-.128l-1.174-1.607c-.354-.482-.916-.769-1.514-.769h-5.346c-.598%200-1.161.287-1.514.769l-1.175%201.607c-.058.081-.152.128-.252.128h-2.386c-1.1%200-2%20.875-2%201.946v11.11c0%201.069.9%201.944%202%201.944h16c1.1%200%202-.875%202-1.944v-11.11c0-1.071-.9-1.946-2-1.946z'/%3e%3cpath%20d='M16.213%206.052c-.46%200-.833.373-.833.833%200%20.46.373.834.833.834.46%200%20.833-.374.833-.834%200-.46-.373-.833-.833-.833'/%3e%3cpath%20d='M10%2012.843c-1.911%200-3.466-1.555-3.466-3.466%200-1.911%201.555-3.466%203.466-3.466%201.911%200%203.465%201.555%203.465%203.466%200%201.911-1.554%203.466-3.465%203.466m0-8.432c-2.741%200-4.966%202.225-4.966%204.966s2.225%204.966%204.966%204.966%204.965-2.225%204.965-4.966-2.224-4.966-4.965-4.966'/%3e%3c/g%3e%3c/svg%3e",uT="data:image/svg+xml,%3csvg%20width='71'%20height='70'%20viewBox='0%200%2071%2070'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3equestion%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='100%25'%20y1='50%25'%20x2='0%25'%20y2='50%25'%20id='a'%3e%3cstop%20stop-color='%234ACDE9'%20offset='0%25'/%3e%3cstop%20stop-color='%23A3E2EF'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20transform='translate(-695%20-103)%20translate(695.5%20103)'%20fill='none'%3e%3ccircle%20fill='url(%23a)'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20d='M23.27%2043.978v-3.399h-2.75c-.138%200-.25-.113-.25-.25v-16c0-.138.112-.25.25-.25h24c.138%200%20.25.112.25.25v16c0%20.137-.112.25-.25.25h-17.851l-3.399%203.399zm23-3.649v-5.25h4.25c.138%200%20.25.112.25.25v12c0%20.137-.112.25-.25.25h-3.75v2.935l-2.936-2.935h-10.314c-.138%200-.25-.113-.25-.25v-5.25h11.25c.965%200%201.75-.786%201.75-1.75zm-14.5%201.75v5.25c0%20.964.785%201.75%201.75%201.75h9.693l3.08%203.08c.222.221.517.339.817.339.15%200%20.301-.03.446-.089.434-.181.714-.601.714-1.071v-2.259h2.25c.965%200%201.75-.786%201.75-1.75v-12c0-.965-.785-1.75-1.75-1.75h-4.25v-9.25c0-.965-.785-1.75-1.75-1.75h-24c-.965%200-1.75.785-1.75%201.75v16c0%20.964.785%201.75%201.75%201.75h1.25v2.723c0%20.47.28.89.714%201.071.145.059.296.088.446.088.3%200%20.595-.118.818-.339l3.543-3.543h4.479z'%20fill='%23fff'/%3e%3c/g%3e%3c/svg%3e",pT="data:image/svg+xml,%3csvg%20width='70'%20height='70'%20viewBox='0%200%2070%2070'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3estory%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='98.77%25'%20y1='50%25'%20x2='0%25'%20y2='50%25'%20id='a'%3e%3cstop%20stop-color='%238D5FDB'%20offset='0%25'/%3e%3cstop%20stop-color='%23AD6AFF'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20transform='translate(-838%2
110-103)%20translate(838%20103)'%20fill='none'%3e%3ccircle%20fill='url(%23a)'%20cx='35'%20cy='35'%20r='35'/%3e%3cpath%20d='M19.5%2046.185v-20.369c0-.175.137-.316.307-.316h2.193v18.5h9.887c.978%200%201.925.309%202.736.894l.877.632.877-.632c.811-.585%201.758-.894%202.736-.894h3.387v2.5h-2.872c-1.097%200-2.179.257-3.164.752l-.493.247c-.148.075-.31.113-.471.113-.161%200-.323-.038-.471-.113l-.493-.247c-.985-.495-2.067-.752-3.164-.752h-11.565c-.17%200-.307-.14-.307-.315zm4-23.685h9.545c.664%200%201.263.288%201.705.748v19.972c-.886-.468-1.864-.72-2.863-.72h-8.387v-20zm24%200v20h-8.387c-.999%200-1.977.252-2.863.72v-19.972c.442-.46%201.041-.748%201.705-.748h9.545zm1.5%2021.5v-18.5h2.192c.17%200%20.308.139.308.309v20.376c0%20.175-.137.315-.307.315h-4.693v-2.5h2.5zm-15.137%204.592l.492.248c.355.178.75.272%201.145.272s.79-.094%201.144-.272l.493-.248c.772-.386%201.633-.592%202.491-.592h2.872v2.158l2.023-1.861%201.977%201.861v-2.158h4.693c.996%200%201.807-.814%201.807-1.815v-20.376c0-.997-.811-1.809-1.808-1.809h-2.192v-3h-11.045c-.927%200-1.78.336-2.455.898-.675-.562-1.528-.898-2.455-.898h-11.045v3h-2.193c-.996%200-1.807.815-1.807%201.816v20.369c0%201.001.811%201.815%201.807%201.815h11.565c.858%200%201.719.206%202.491.592z'%20fill='%23fff'/%3e%3c/g%3e%3c/svg%3e",yT="data:image/svg+xml,%3csvg%20width='22'%20height='13'%20viewBox='0%200%2022%2013'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3evideo%3c/title%3e%3cpath%20d='M19.75%209.126l-4.674-2.337-.076-.02v-.326l.095-.029%204.655-2.5v5.212zm-18.25%202.374h12v-10h-12v10zm19.385-9.483c-.227-.137-.507-.143-.74-.018l-5.145%202.763v-3.262c0-.828-.671-1.5-1.5-1.5h-12c-.829%200-1.5.672-1.5%201.5v10c0%20.828.671%201.5%201.5%201.5h12c.829%200%201.5-.672%201.5-1.5v-3.071l5.165%202.582c.106.052.22.079.335.079.137%200%20.274-.037.395-.112.22-.137.355-.378.355-.638v-7.68c0-.263-.139-.508-.365-.643z'%20fill='%23fff'/%3e%3c/svg%3e",gT="data:image/svg+xml,%3csvg%20width='15'%20height='18'%20viewBox='0%200%2015%2018'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3efile%3c/title%3e%3cdefs%3e%3cpath%20id='a'%20d='M0%200h14.625v18h-14.625z'/%3e%3c/defs%3e%3cg%20transform='translate(-854%20-519)%20translate(854%20519)'%20fill='none'%3e%3cmask%20id='b'%3e%3cuse%20xlink:href='%23a'/%3e%3c/mask%3e%3cpath%20d='M12.938%2016.5h-11.25c-.104%200-.188-.084-.188-.187v-14.626c0-.103.084-.187.188-.187h6.319v4.694c0%20.414.336.75.75.75h4.368v9.369c0%20.103-.083.187-.187.187zm-3.431-13.942l2.738%202.886h-2.738v-2.886zm-.358-2.558h-7.461c-.933%200-1.688.756-1.688%201.687v14.626c0%20.932.755%201.687%201.688%201.687h11.25c.932%200%201.687-.755%201.687-1.687v-10.539l-5.476-5.774z'%20fill='%23fff'%20mask='url(%23b)'/%3e%3c/g%3e%3c/svg%3e",mT=[{category:"ANNT",icon:aT,label:"Announcement",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"QUEN",icon:uT,label:"Question",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"STORY",icon:pT,label:"Story",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"EVENT",icon:rT,label:"Event",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!0,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"FSALE",icon:nT,label:"Sale",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"DEAL",icon:sT,label:"Deal",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"JOB",icon:iT,label:"Job",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"ACHMT",icon:oT,label:"Achievements",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"NEWS",icon:dT,label:"News",config:{titleInputPlaceholder:"Add title or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!0,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"LINK",icon:lT,label:"Link",config:{titleInputPlaceholder:"Add a link from the web",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!1,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!1}},{category:"PHOTO",icon:cT,label:"Photo",config:{titleInputPlaceholder:"Add text or link",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!1,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!0}},{category:"VIDEO",icon:yT,label:"Video",config:{titleInputPlaceholder:"Add a link to a video",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!1,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!1,showHootCoverImageControl:!1}},{category:"FILE",icon:gT,label:"File",config:{titleInputPlaceholder:"Add a title",showAddLocationButton:!0,showAddActionButton:!0,showAddFileButton:!1,showHootExpiryButton:!0,showHootEventControl:!1,showUploadFileControl:!0,showHootCoverImageControl:!1}}],fT=[{family:"Inter",label:"Inter",load:()=>Promise.all([Ue(()=>Promise.resolve({}),__vite__mapDeps([0])),Ue(()=>Promise.resolve({}),__vite__mapDeps([1])),Ue(()=>Promise.resolve({}),__vite__mapDeps([2]))])},{family:"Poppins",label:"Poppins",load:()=>Promise.all([Ue(()=>Promise.resolve({}),__vite__mapDeps([3])),Ue(()=>Promise.resolve({}),__vite__mapDeps([4])),Ue(()=>Promise.resolve({}),__vite__mapDeps([5]))])},{family:"Playfair Display",label:"Playfair Display",load:()=>Promise.all([Ue(()=>Promise.resolve({}),__vite__mapDeps([6])),Ue(()=>Promise.resolve({}),__vite__mapDeps([7]))])},{family:"Bebas Neue",label:"Bebas Neue",load:()=>Ue(()=>Promise.resolve({}),__vite__mapDeps([8]))},{family:"Lora",label:"Lora",load:()=>Promise.all([Ue(()=>Promise.resolve({}),__vite__mapDeps([9])),Ue(()=>Promise.resolve({}),__vite__mapDeps([10]))])},{family:"Space Grotesk",label:"Space Grotesk",load:()=>Promise.all([Ue(()=>Promise.resolve({}),__vite__mapDeps([11])),Ue(()=>Promise.resolve({}),__vite__mapDeps([12]))])}],qn=new Set,Ds=new Map,hT=async e=>{if(qn.has(e))return;const t=Ds.get(e);if(t)return t;const o=fT.find(s=>
11s.family===e);if(!o)return;const a=(async()=>{if(await o.load(),typeof document<"u"&&"fonts"in document)try{await document.fonts.load(`16px "${e}"`),await document.fonts.ready}catch{}qn.add(e),Ds.delete(e)})();return Ds.set(e,a),a},ST=async e=>{await Promise.all(e.map(hT))},bT=async(e,t,o)=>{const a=e.scaleX(),s=e.scaleY(),r=e.x(),i=e.y(),l=e.width(),d=e.height();e.scale({x:1,y:1}),e.position({x:0,y:0}),e.size({width:t,height:o});let p;try{p=e.toDataURL({mimeType:"image/png",pixelRatio:1,x:0,y:0,width:t,height:o})}finally{e.scale({x:a,y:s}),e.position({x:r,y:i}),e.size({width:l,height:d}),e.batchDraw()}return(await fetch(p)).blob()};let Fd=null;const UH=e=>{Fd=e},ET=()=>Fd,wT={design:null,selectedNodeIds:[],history:[],historyIndex:-1,visibility:"hidden",categoryFilter:null,postStatus:"idle",postError:null,currentDraftId:null,autoSaveStatus:"idle",editorMode:"user",templateDocId:null,templateName:"",templateLayoutId:"custom",templateEnabled:!1,templateEntrySource:null,templateBoardId:null,recentUploads:[]},Ud=j({name:"flyerEditor",initialState:wT,reducers:{loadDesign(e,t){e.design=t.payload,e.selectedNodeIds=[],e.history=[t.payload],e.historyIndex=0,e.currentDraftId=null,e.autoSaveStatus="idle",e.editorMode="user",e.templateDocId=null,e.templateName="",e.templateLayoutId="custom",e.templateEnabled=!1,e.templateEntrySource=null,e.templateBoardId=null},enterAdminNewMode(e,t){e.design=t.payload.design,e.selectedNodeIds=[],e.history=[t.payload.design],e.historyIndex=0,e.currentDraftId=null,e.autoSaveStatus="idle",e.editorMode="admin-new",e.templateDocId=null,e.templateName=t.payload.name??"",e.templateLayoutId=t.payload.layoutId??"custom",e.templateEnabled=!0,e.templateEntrySource=t.payload.source??"fresh-new",e.templateBoardId=t.payload.boardId??null},enterAdminEditMode(e,t){e.design=t.payload.design,e.selectedNodeIds=[],e.history=[t.payload.design],e.historyIndex=0,e.currentDraftId=null,e.autoSaveStatus="idle",e.editorMode="admin-edit",e.templateDocId=t.payload.docId,e.templateName=t.payload.name,e.templateLayoutId=t.payload.layoutId,e.templateEnabled=!0,e.templateEntrySource="from-doc",e.templateBoardId=t.payload.boardId},setTemplateName(e,t){e.templateName=t.payload},setTemplateEnabled(e,t){e.templateEnabled=t.payload},setTemplateDocId(e,t){e.templateDocId=t.payload,e.editorMode="admin-edit"},loadDraft(e,t){e.design=t.payload.design,e.selectedNodeIds=[],e.history=[t.payload.design],e.historyIndex=0,e.currentDraftId=t.payload.id,e.autoSaveStatus="saved"},setCurrentDraftId(e,t){e.currentDraftId=t.payload},uploadAdded(e,t){const o=t.payload;o&&(e.recentUploads=[o,...e.recentUploads.filter(a=>a!==o)].slice(0,50))},uploadRemoved(e,t){e.recentUploads=e.recentUploads.filter(o=>o!==t.payload)},autoSaveStarted(e){e.autoSaveStatus="saving"},autoSaveSucceeded(e){e.autoSaveStatus="saved"},autoSaveFailed(e){e.autoSaveStatus="error"},clearDesign(e){e.design=null,e.selectedNodeIds=[],e.history=[],e.historyIndex=-1},setBackground(e,t){e.design&&(e.design.background=t.payload)},updateNode(e,t){if(!e.design)return;const o=e.design.nodes.findIndex(a=>a.id===t.payload.id);o!==-1&&(e.design.nodes[o]={...e.design.nodes[o],...t.payload.patch})},addNode(e,t){e.design&&e.design.nodes.push(t.payload)},pasteNodes:{reducer(e,t){if(!e.design)return;const o=t.payload.offset,a=t.payload.nodes.map(s=>({...s,x:s.x+o,y:s.y+o}));e.design.nodes.push(...a),e.selectedNodeIds=a.map(s=>s.id)},prepare(e){return{payload:{nodes:e.map(o=>({...o,id:crypto.randomUUID()})),offset:24}}}},removeNode(e,t){e.design&&(e.design.nodes=e.design.nodes.filter(o=>o.id!==t.payload),e.selectedNodeIds=e.selectedNodeIds.filter(o=>o!==t.payload))},nudgeSelected(e,t){if(!e.design)return;const{dx:o,dy:a}=t.payload;for(const s of e.selectedNodeIds){const r=e.design.nodes.findIndex(l=>l.id===s);if(r===-1)continue;const i=e.design.nodes[r];i.locked||(e.design.nodes[r]={...i,x:i.x+o,y:i.y+a})}},bringToFront(e){if(!e.design)return;const t=new Set(e.selectedNodeIds),o=e.design.nodes.filter(s=>!t.has(s.id)),a=e.design.nodes.filter(s=>t.has(s.id));e.design.nodes=[...o,...a]},sendToBack(e){if(!e.design)return;const t=new Set(e.selectedNodeIds),o=e.design.nodes.filter(s=>!t.has(s.id)),a=e.design.nodes.filter(s=>t.has(s.id));e.design.nodes=[...a,...o]},bringForward(e){if(!e.design)return;const t=e.selectedNodeIds,o=e.design.nodes;for(let a=o.length-2;a>=0;a--)t.includes(o[a].id)&&!t.includes(o[a+1].id)&&([o[a],o[a+1]]=[o[a+1],o[a]])},sendBackward(e){if(!e.design)return;const t=e.selectedNodeIds,o=e.design.nodes;for(let a=1;a<o.length;a++)t.includes(o[a].id)&&!t.includes(o[a-1].id)&&([o[a],o[a-1]]=[o[a-1],o[a]])},setSelectedOpacity(e,t){if(!e.design)return;const o=Math.max(0,Math.min(1,t.payload));for(const a of e.selectedNodeIds){const s=e.design.nodes.findIndex(r=>
11r.id===a);s!==-1&&(e.design.nodes[s]={...e.design.nodes[s],opacity:o})}},flipSelected(e,t){if(e.design)for(const o of e.selectedNodeIds){const a=e.design.nodes.findIndex(r=>r.id===o);if(a===-1)continue;const s=e.design.nodes[a];e.design.nodes[a]={...s,flipH:t.payload==="h"?!s.flipH:s.flipH,flipV:t.payload==="v"?!s.flipV:s.flipV}}},alignSelected(e,t){if(!e.design)return;const o=e.design.nodes.filter(p=>e.selectedNodeIds.includes(p.id));if(o.length===0)return;const a=Math.min(...o.map(p=>p.x)),s=Math.max(...o.map(p=>p.x+p.w)),r=Math.min(...o.map(p=>p.y)),i=Math.max(...o.map(p=>p.y+p.h)),l=(a+s)/2,d=(r+i)/2;for(const p of e.selectedNodeIds){const h=e.design.nodes.findIndex(w=>w.id===p);if(h===-1)continue;const v=e.design.nodes[h];if(v.locked)continue;const A={...v};switch(t.payload){case"left":A.x=a;break;case"right":A.x=s-v.w;break;case"center":A.x=l-v.w/2;break;case"top":A.y=r;break;case"bottom":A.y=i-v.h;break;case"middle":A.y=d-v.h/2;break}e.design.nodes[h]=A}},groupSelected(e){if(!e.design||e.selectedNodeIds.length<2)return;const t=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`g-${Date.now()}-${Math.random().toString(36).slice(2,9)}`;for(const o of e.selectedNodeIds){const a=e.design.nodes.findIndex(s=>s.id===o);a!==-1&&(e.design.nodes[a]={...e.design.nodes[a],groupId:t})}},ungroupSelected(e){if(!e.design)return;const t=new Set(e.design.nodes.filter(o=>e.selectedNodeIds.includes(o.id)&&o.groupId).map(o=>o.groupId));t.size!==0&&(e.design.nodes=e.design.nodes.map(o=>o.groupId&&t.has(o.groupId)?{...o,groupId:void 0}:o))},distributeSelected(e,t){if(!e.design)return;const o=e.design.nodes.filter(r=>e.selectedNodeIds.includes(r.id)).sort((r,i)=>t.payload==="h"?r.x-i.x:r.y-i.y);if(o.length<3)return;const a=o[0],s=o[o.length-1];if(t.payload==="h"){const r=s.x+s.w-a.x,i=o.reduce((p,h)=>p+h.w,0),l=(r-i)/(o.length-1);let d=a.x+a.w+l;for(let p=1;p<o.length-1;p++){const h=o[p],v=e.design.nodes.findIndex(A=>A.id===h.id);if(v===-1||h.locked){d+=h.w+l;continue}e.design.nodes[v]={...h,x:d},d+=h.w+l}}else{const r=s.y+s.h-a.y,i=o.reduce((p,h)=>p+h.h,0),l=(r-i)/(o.length-1);let d=a.y+a.h+l;for(let p=1;p<o.length-1;p++){const h=o[p],v=e.design.nodes.findIndex(A=>A.id===h.id);if(v===-1||h.locked){d+=h.h+l;continue}e.design.nodes[v]={...h,y:d},d+=h.h+l}}},insertShapeAtCenter(e,t){if(!e.design)return;const o=e.design.size==="1080x1920"?1080:1920,a=e.design.size==="1080x1920"?1920:1080,s=t.payload.shape==="line"?600:400,r=t.payload.shape==="line"?8:400,i=crypto.randomUUID(),l={id:i,kind:"shape",shape:t.payload.shape,x:Math.round((o-s)/2),y:Math.round((a-r)/2),w:s,h:r,rotation:0,fill:t.payload.fill,stroke:t.payload.stroke,strokeWidth:t.payload.strokeWidth,cornerRadius:t.payload.cornerRadius};e.design.nodes.push(l),e.selectedNodeIds=[i]},applyBrandTokens(e){e.design&&(e.design.nodes=e.design.nodes.map(t=>t.kind==="text"?{...t,color:"@brand.button"}:t.kind==="shape"?{...t,fill:"@brand.button",stroke:t.stroke?"@brand.font":t.stroke}:t),e.design.background.type==="color"&&(e.design.background={type:"color",value:"@brand.background"}))},applyBrandColorToSelected(e,t){if(!e.design)return;const o=`@brand.${t.payload}`;for(const a of e.selectedNodeIds){const s=e.design.nodes.findIndex(i=>i.id===a);if(s===-1)continue;const r=e.design.nodes[s];r.kind==="text"?e.design.nodes[s]={...r,color:o}:r.kind==="shape"&&(e.design.nodes[s]={...r,fill:o})}},duplicateSelected:{reducer(e,t){if(!e.design)return;const o=t.payload,a=e.selectedNodeIds,s=[];a.forEach((r,i)=>{var d;const l=(d=e.design)==null?void 0:d.nodes.find(p=>p.id===r);l&&s.push({...l,id:o[i],x:l.x+24,y:l.y+24})}),e.design.nodes.push(...s),e.selectedNodeIds=o},prepare(){return{payload:Array.from({length:50},()=>crypto.randomUUID())}}},selectNodes(e,t){e.selectedNodeIds=t.payload},reorderNodes(e,t){if(!e.design)return;const o=new Map(e.design.nodes.map(a=>[a.id,a]));e.design.nodes=t.payload.map(a=>o.get(a)).filter(a=>!!a)},openEditor(e,t){var o;e.visibility="visible",e.categoryFilter=((o=t.payload)==null?void 0:o.categoryFilter)??null},commitHistory(e){if(!e.design)return;const t=JSON.parse(JSON.stringify(e.design)),o=e.history[e.historyIndex];if(o&&JSON.stringify(o)===JSON.stringify(t))return;const a=e.history.slice(0,e.historyIndex+1);a.push(t);const s=Math.max(0,a.length-50);e.history=a.slice(s),e.historyIndex=e.history.length-1},undo(e){e.historyIndex<=0||(e.historyIndex-=1,e.design=JSON.parse(JSON.stringify(e.history[e.historyIndex])),e.selectedNodeIds=[])},redo(e){e.historyIndex>=e.history.length-1||(e.historyIndex+=1,e.design=JSON.parse(JSON.stringify(e.history[e.historyIndex])),e.selectedNodeIds=[])},closeEditor(e){e.visibility="hidden",e.design=null,e.selectedNodeIds=[],e.history=[],e.historyIndex=-1,e.categoryFilter=null,e.postStatus="idle",e.postError=null,e.currentDraftId=null,e.autoSaveStatus="idle",e.editorMode="user",e.templateDocId=null,e.templateName="",e.templateLayoutId="custom",e.templateEnabled=!1,e.templateEntrySource=null,e.templateBoardId=null},postFlyerRequested(){},postStatusChanged(e,t){e.postStatus=t.payload,t.payload!=="error"&&(e.postError=null)},postFailed(e,t){e.postStatus="error",e.postError=t.payload}}}
11),{loadDesign:NH,setBackground:IT,uploadAdded:RH,uploadRemoved:HH,bringToFront:vT,sendToBack:CT,bringForward:AT,sendBackward:DT,setSelectedOpacity:TT,flipSelected:PT,alignSelected:BT,distributeSelected:kT,groupSelected:LT,ungroupSelected:FT,insertShapeAtCenter:UT,enterAdminNewMode:xH,enterAdminEditMode:MH,setTemplateName:OH,setTemplateDocId:jH,clearDesign:NT,updateNode:RT,addNode:HT,pasteNodes:xT,removeNode:MT,nudgeSelected:OT,duplicateSelected:jT,applyBrandTokens:qT,applyBrandColorToSelected:_T,selectNodes:qH,reorderNodes:$T,openEditor:_H,closeEditor:Nd,commitHistory:Rd,undo:$H,redo:GH,postFlyerRequested:GT,postStatusChanged:Ts,postFailed:VT}=Ud.actions,JT=[IT.type,RT.type,HT.type,xT.type,MT.type,OT.type,vT.type,CT.type,AT.type,DT.type,TT.type,PT.type,BT.type,LT.type,FT.type,kT.type,UT.type,qT.type,_T.type,jT.type,$T.type],zT=Ud.reducer,WT={"1080x1920":{width:1080,height:1920},"1920x1080":{width:1920,height:1080}},YT="flyerEditor.draft.v1",KT=7,QT=KT*24*60*60*1e3,ka=(e,t)=>`${YT}:${e}:${t}`,ZT=(e,t,o)=>{if(!(!e||!t||typeof window>"u"))try{const a={design:o,savedAt:new Date().toISOString()};window.localStorage.setItem(ka(e,t),JSON.stringify(a))}catch{}},VH=(e,t)=>{if(!e||!t||typeof window>"u")return null;try{const o=window.localStorage.getItem(ka(e,t));if(!o)return null;const a=JSON.parse(o);return!(a!=null&&a.design)||!(a!=null&&a.savedAt)?null:Date.now()-new Date(a.savedAt).getTime()>QT?(window.localStorage.removeItem(ka(e,t)),null):a}catch{return null}},Hd=(e,t)=>{if(!(!e||!t||typeof window>"u"))try{window.localStorage.removeItem(ka(e,t))}catch{}},en=e=>{var o;const t=(o=e.activeAccount)==null?void 0:o.activeAccountDetails;return(t==null?void 0:t.emailAddress)??(t==null?void 0:t.loginEmail)??(t==null?void 0:t.email)??null},xd=e=>{var t,o;return((o=(t=e.activeBoard)==null?void 0:t.boardDetails)==null?void 0:o.boardId)??null};function*XT(){try{const e=yield Te(H=>H.flyerEditor.design),t=yield Te(H=>{var Q,Y;return((Y=(Q=H.activeBoard)==null?void 0:Q.boardDetails)==null?void 0:Y.boardId)??""});if(!e)throw new Error("No design loaded");if(!t)throw new Error("No active board");const o=ET();if(!o)throw new Error("Canvas not mounted");yield n(Ts("exporting"));const a=Array.from(new Set(e.nodes.filter(H=>H.kind==="text").map(H=>H.kind==="text"?H.fontFamily:"").filter(Boolean)));yield m(ST,a);const s=WT[e.size],r=yield m(bT,o,s.width,s.height),i=`flyer-${e.templateId}-${Date.now()}.png`,l=new File([r],i,{type:"image/png"});yield n(Ts("uploading"));const d=yield m(zr,t,{filename:i,contentType:"image/png",hootType:"DISC",fileSize:l.size});if(d.message!=="success"||!d.data)throw new Error("Failed to get presigned URL");const{uploadUrl:p,s3Key:h,permanentUrl:v}=d.data;yield m(Vr,{url:p,files:l,onProgress:()=>{}});const A=mT.findIndex(H=>H.category===e.categoryCode);if(A===-1)throw new Error("Unknown category");yield n(gb()),yield n(yb([{url:v??"",s3Key:h,id:0,filename:i,contentType:"image/png",width:s.width,height:s.height}])),yield n(st(A));const w=tT(e);w.title&&(yield n(ub(w.title))),w.description&&(yield n(pb(w.description))),yield n(Ve({visibility:"visible"})),yield n(Ts("success"));const N=yield Te(en);Hd(N,t),yield n(Nd())}catch(e){const t=e instanceof Error?e.message:"Post failed";yield n(VT(t))}}function*e1(){yield n(Rd())}function*t1(){const e=yield Te(r=>r.flyerEditor.historyIndex),t=yield Te(r=>r.flyerEditor.editorMode);if(e<=0||t!=="user")return;const o=yield Te(r=>r.flyerEditor.design);if(!o)return;const a=yield Te(en),s=yield Te(xd);ZT(a,s,o)}function*o1(){const e=yield Te(en),t=yield Te(xd);Hd(e,t)}function*a1(){yield S(GT.type,XT),yield Cy(400,JT,e1),yield S(Rd.type,t1),yield S(NT.type,o1)}const tn=e=>{const t=localStorage.getItem("authToken"),o={};return t&&(o.Authorization=`Bearer ${t}`),e!=null&&e!==""&&(o["x-board-id"]=String(e)),o},Md=e=>({"Content-Type":"application/json",...tn(e)}),s1=async e=>{const t=new URLSearchParams;e!=null&&e.categoryCode&&t.set("categoryCode",e.categoryCode);const o=await fetch(`${At}/flyer-templates${t.size?`?${t.toString()}`:""}`,{headers:{...tn(e==null?void 0:e.boardId)}});if(!o.ok)throw new Error(`List templates failed: ${o.status}`);const a=await o.json();return(a==null?void 0:a.data)??[]},r1=async e=>{const t=await fetch(`${At}/flyer-templates`,{method:"POST",headers:Md(e.boardId),body:JSON.stringify(e)});if(!t.ok)throw new Error(`Create template failed: ${t.status}`);return(await t.json()).data},n1=async(e,t,o)=>{const a=await fetch(`${At}/flyer-templates/${e}`,{method:"PATCH",headers:Md(o),body:JSON.stringify(t)});if(!a.ok)throw new Error(`Update template failed: ${a.status}`);return(await a.json()).data},i1=async(e,t)=>{const o=await fetch(`${At}/flyer-templates/${e}`,{method:"DELETE",headers:{...tn(t)}});if(!o.ok)throw new Error(`Delete template failed: ${o.status}`)},Ps=e=>!!(e&&(e.endsWith("@hootboard.com")||e.endsWith("@hootboard.us"))),JH=e=>{var o;const t=(o=e.activeAccount)==null?void 0:o.activeAccountDetails;return Ps(t==null?void 0:t.emailAddress)||Ps(t==null?void 0:t.loginEmail)||Ps(t==null?void 0:t.email)},zH=e=>{var t,o;
11return((o=(t=e.activeBoard)==null?void 0:t.boardDetails)==null?void 0:o.boardAdmin)===!0},on=e=>{var a,s;const t=(s=(a=e.activeBoard)==null?void 0:a.boardDetails)==null?void 0:s.boardId;if(t==null||t==="")return null;const o=typeof t=="number"?t:Number.parseInt(String(t),10);return Number.isNaN(o)?null:o},Ir=10,La=new Map,WH=e=>{const t=URL.createObjectURL(e);return La.set(t,e),t},l1=e=>La.get(e),Od=e=>!!(e&&e.startsWith("blob:")),YH=()=>{for(const e of La.keys())try{URL.revokeObjectURL(e)}catch{}La.clear()},d1=["images.unsplash.com","images.pexels.com"],c1=e=>{if(!e||e.startsWith("data:")||e.startsWith("blob:"))return!1;try{const t=new URL(e);return d1.some(o=>t.hostname===o||t.hostname.endsWith(`.${o}`))}catch{return!1}},_n=e=>Od(e)||c1(e),$n=async(e,t,o)=>{const a=o.get(e);if(a)return a;let s;if(Od(e)){const l=l1(e);if(!l)throw new Error(`Pending file not found for ${e}`);s=l}else{const l=await fetch(e);if(!l.ok)throw new Error(`Failed to fetch ${e}: ${l.status}`);const d=await l.blob(),p=d.type.split("/")[1]||"jpg",h=`bg-${Date.now()}-${Math.random().toString(36).slice(2,8)}.${p}`;s=new File([d],h,{type:d.type||"image/jpeg"})}const r=await zr(t,{filename:s.name,contentType:s.type,hootType:"DISC",fileSize:s.size});if(r.message!=="success"||!r.data)throw new Error("Failed to get presigned URL");await Vr({url:r.data.uploadUrl,files:s,onProgress:()=>{}});const i=r.data.permanentUrl??e;return o.set(e,i),i},jd=async(e,t)=>{const o=new Map,a={...e,background:{...e.background},nodes:e.nodes.map(s=>({...s}))};a.background.type==="image"&&_n(a.background.value)&&(a.background={...a.background,value:await $n(a.background.value,t,o)});for(let s=0;s<a.nodes.length;s++){const r=a.nodes[s];r.kind==="image"&&_n(r.src)&&(a.nodes[s]={...r,src:await $n(r.src,t,o)})}return a},u1={byId:{},allIds:[],fetchStatus:"idle",fetchError:null,mutationStatus:"idle",mutationError:null,adminModeEnabled:!1},Gn=e=>Object.keys(e).sort((t,o)=>{const a=e[t],s=e[o],r=(a.displayOrder??100)-(s.displayOrder??100);return r!==0?r:new Date(s.updatedAt).getTime()-new Date(a.updatedAt).getTime()}),qd=j({name:"flyerTemplates",initialState:u1,reducers:{fetchTemplatesRequested(e){e.fetchStatus="loading",e.fetchError=null},fetchTemplatesSucceeded(e,t){e.byId={};for(const o of t.payload)e.byId[o.id]=o;e.allIds=Gn(e.byId),e.fetchStatus="succeeded"},fetchTemplatesFailed(e,t){e.fetchStatus="failed",e.fetchError=t.payload},mutationStarted(e){e.mutationStatus="loading",e.mutationError=null},templateUpserted(e,t){e.byId[t.payload.id]=t.payload,e.allIds=Gn(e.byId),e.mutationStatus="succeeded"},templateRemoved(e,t){delete e.byId[t.payload],e.allIds=e.allIds.filter(o=>o!==t.payload),e.mutationStatus="succeeded"},mutationFailed(e,t){e.mutationStatus="failed",e.mutationError=t.payload},setAdminModeEnabled(e,t){e.adminModeEnabled=t.payload}},extraReducers:e=>{e.addCase(Nd,t=>{t.adminModeEnabled=!1})}}),{fetchTemplatesRequested:p1,fetchTemplatesSucceeded:y1,fetchTemplatesFailed:g1,mutationStarted:an,templateUpserted:_d,templateRemoved:m1,mutationFailed:sn,setAdminModeEnabled:KH}=qd.actions,f1=qd.reducer,h1=R("flyerTemplates/createRequested"),S1=R("flyerTemplates/updateRequested"),b1=R("flyerTemplates/deleteRequested");function*E1(){try{const e=yield Te(on),t=yield m(s1,{boardId:e});yield n(y1(t))}catch(e){yield n(g1(e instanceof Error?e.message:"Fetch failed"))}}function*w1(e){yield n(an());try{const t=e.payload.boardId??Ir,o=yield m(jd,e.payload.designJson,t),a=yield m(r1,{...e.payload,designJson:o});yield n(_d(a))}catch(t){yield n(sn(t instanceof Error?t.message:"Create failed"))}}function*I1(e){yield n(an());try{const t=yield Te(on),o={...e.payload.patch};if(o.designJson){const s=(o.designJson&&"boardId"in o,t??Ir);o.designJson=yield m(jd,o.designJson,s)}const a=yield m(n1,e.payload.id,o,t);yield n(_d(a))}catch(t){yield n(sn(t instanceof Error?t.message:"Update failed"))}}function*v1(e){yield n(an());try{const t=yield Te(on);yield m(i1,e.payload,t),yield n(m1(e.payload))}catch(t){yield n(sn(t instanceof Error?t.message:"Delete failed"))}}function*C1(){yield S(p1.type,E1),yield S(h1.type,w1),yield S(S1.type,I1),yield S(b1.type,v1)}function*A1(){yield Si([Pw(),wA(),pE(),Kb(),Xb(),rC(),M2(),H2(),uC(),yC(),hw(),bw(),j2(),_2(),G2(),uw(),yw(),iC(),dC(),mw(),uI(),VI(),zI(),YI(),vA(),qE(),_E(),AA(),TA(),FA(),hI(),bI(),yI(),mI(),iE(),lE(),dE(),D2(),P2(),k2(),N2(),F2(),cE(),...Nb,...dw,...kA,...jh,...Cw,...lh,...cA,...HE,...b2,...F0,...k0,..._f,...gA,...mh,...qA,...$I,...oI,...xS,...mE,...GA,...iD,...cD,...yD,...BD,...HD,...aC,...$D,...dI,...eT,a1(),C1()])}const ya={isLoading:!0,isServerError:!1},D1=j({name:"activateAccount",initialState:ya,reducers:{},extraReducers:{"activate-account/pending":()=>ya,"activate-account/fulfilled":()=>({...ya,isLoading:!1}),"activate-account/rejected":()=>({...ya,isLoading:!1,isServerError:!0})}}),QH=({encUserId:e})=>({type:"activate-account/request",payload:{encUserId:e}}),T1=D1.reducer,ga={isDone:!1,isLoading:!1,isServerError:!1,isPasswordMismatchError:!1,isNotStrongPasswordError:!1,localState:{password:null,passwordRepeat:null}},$d=j({name:"resetPassword",initialState:ga,reducers:{setPassword:(e,t)=>{const o=t.payload;e.localState.password=o;const a=e.localState.passwordRepeat;e.isPasswordMismatchError=!a&&o!==a,e.isNotStrongPasswordError=!1},setPasswordRepeat:(e,t)=>
11{const o=t.payload,a=e.localState.password;e.isPasswordMismatchError=a!=null&&o!==a,e.localState.passwordRepeat=o},backToView:e=>{e.isServerError=!1}},extraReducers:{"password-reset/pending":e=>({...ga,isLoading:!0,localState:e.localState}),"password-reset/fulfilled":e=>({...ga,isDone:!0,localState:e.localState}),"password-reset/rejected":e=>({...ga,isServerError:!0,localState:e.localState})}}),ZH=({encPartyId:e,password:t})=>({type:"password-reset/request",payload:{encPartyId:e,password:t}}),{setPassword:XH,setPasswordRepeat:ex,backToView:tx}=$d.actions,P1=$d.reducer,B1={isLoading:!1,actionPerformed:!1,isServerError:!1,getBoardDetailsStatus:"idle",boardDetails:null},ox=e=>({type:no.getBoardDetails+"request",payload:e}),k1=j({name:"unSubscribe",initialState:B1,reducers:{},extraReducers:{"unsubscribe/pending":e=>({...e,isLoading:!0,actionPerformed:!0}),"unsubscribe/fulfilled":e=>({...e,actionPerformed:!0,isLoading:!1}),"unsubscribe/rejected":e=>({...e,actionPerformed:!0,isServerError:!0,isLoading:!1}),[no.getBoardDetails+"rejected"]:e=>({...e,getBoardDetailsStatus:"rejected"}),[no.getBoardDetails+"pending"]:e=>({...e,getBoardDetailsStatus:"pending"}),[no.getBoardDetails+"fulfilled"]:(e,t)=>{const{boardDetails:o}=t.payload;return{...e,getBoardDetailsStatus:"fulfilled",boardDetails:o}}}}),ax=({encParams:e,boardId:t})=>({type:"unsubscribe/board/request",payload:{encParams:e,boardId:t}}),sx=({encParams:e})=>({type:"unsubscribe/personal/request",payload:{encParams:e}}),rx=({encParams:e})=>({type:"unsubscribe/invitation/request",payload:{encParams:e}}),L1=k1.reducer,Vn={isLoading:!0,isServerError:!1},Gd=j({name:"verifyEmail",initialState:Vn,reducers:{stopLoading:e=>{e.isLoading=!1}},extraReducers:{"verify-email/pending":()=>Vn,"verify-email/fulfilled":e=>{e.isLoading=!1,e.isServerError=!1},"verify-email/rejected":e=>{e.isLoading=!1,e.isServerError=!0}}}),nx=e=>({type:"verify-email/request",payload:e}),F1=Gd.reducer,{stopLoading:ix}=Gd.actions;x("user/details",async()=>({userDetails:await Ke()}));const U1={isOffline:null},Vd=j({name:"app",initialState:U1,reducers:{setAppOffline:(e,t)=>{e.isOffline=!!t.payload}},extraReducers:{}}),{setAppOffline:lx}=Vd.actions,N1=Vd.reducer,R1=()=>Ao({params:{start:0,max:20,upcomingEvents:!1,freeEvents:!1}}),Ao=x("/myHoots/fetchInitialHoots",async({params:e})=>({response:await Vl(e)})),Ca=x("/myHoots/fetchMoreHoots",async({params:e})=>({response:await Vl(e)})),Aa=x("/myHoots/favoriteHootChanged",async({hootId:e,favorite:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();let s;return t?s=await qr(a,e):s=await _r(a,e),{response:s}}),Jn={myHoots:[],initialHootsFetchStatus:"idle",fetchMoreHootsStatus:"idle",shouldFetchMore:!1,error:!1,errorMessage:"",page:0,max:20,upcomingEvents:!1,freeEvents:!1},Jd=j({name:"myHoots",initialState:Jn,reducers:{reset:()=>Jn,setPage:(e,t)=>({...e,page:t.payload.page}),updateHootPinned:(e,t)=>{const{pin:o,selectedHootIndex:a}=t.payload;e.myHoots[a].isPinned=o},updateHootRehoot:(e,t)=>{const{selectedHootIndex:o}=t.payload;e.myHoots[o].hootStats.rehoots+=1},updateHootFavorite:(e,t)=>{const{selectedHootIndex:o,favorite:a}=t.payload;e.myHoots[o].favPost=a,e.myHoots[o].hootStats.favorites+=a?1:-1},updateHootApproved:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.myHoots[o].requiresApproval=!1;else{const s=e.myHoots.findIndex(({id:r})=>r===a.id);e.myHoots[s].requiresApproval=!1}},updateHootRejected:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.myHoots.splice(o,1);else{const s=e.myHoots.findIndex(({id:r})=>r===a.id);e.myHoots.splice(s,1)}},removeHootById:(e,t)=>{const{hootId:o}=t.payload;e.myHoots=e.myHoots.filter(a=>a&&a.id!==o)},updateHootCommentCount:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.myHoots[o].hootStats.comments+=1;else{const s=e.myHoots.findIndex(({id:r})=>r===a.id);e.myHoots[s].hootStats.comments+=1}},rehooted:(e,t)=>{const o=e.myHoots.findIndex(({id:a})=>a===t.payload.id);o>-1&&(e.myHoots[o].hootStats.rehoots+=1)}},extraReducers:{[Ao.pending]:e=>({...e,initialHootsFetchStatus:"pending",myHoots:[]}),[Ao.fulfilled]:(e,t)=>{if(t.payload.response&&t.payload.response.length){const a=(t.payload.response||[]).map(Rt).map(Xe);return{...e,myHoots:a,initialHootsFetchStatus:"fulfilled",page:e.page+1,shouldFetchMore:t.payload.response.length>e.max-2}}else return{...e,initialHootsFetchStatus:"fulfilled",myHoots:[],shouldFetchMore:!1}},[Ao.rejected]:e=>({...e,initialHootsFetchStatus:"rejected",myHoots:[],error:!0,errorMessage:"Failed to fetch hoots"}),[Ca.pending]:e=>({...e,fetchMoreHootsStatus:"pending"}),[Ca.fulfilled]:(e,t)=>{if(t.payload.response&&t.payload.response.length){const a=(t.payload.response||[]).map(Rt).map(Xe);return{...e,fetchMoreHootsStatus:"fulfilled",myHoots:[...e.myHoots,...a],page:e.page+1,shouldFetchMore:t.payload.response.length>e.max-2}}else return{...e,page:e.page+1,fetchMoreHootsStatus:"fulfilled",shouldFetchMore:!1}},[Ca.rejected]:e=>({...e,fetchMoreHootsStatus:"rejected",myHoots:[],error:!0,errorMessage:"Failed to fetch hoots"}),[Aa.fulfilled]:(e,t)=>{const{response:o}=t.payload,{favorite:a,index:s}=t.meta.arg;o.success||(e.myHoots[s].favPost=!a,e.myHoots[s].hootStats.favorites+=a?-1:1)},[Aa.pending]:(e,t)=>{const{index:o,favorite:a}=t.meta.arg;e.myHoots[o].favPost=a,e.myHoots[o].hootStats.favorites+=a?1:-1},[Aa.rejected]:(e,t)=>{const{index:o,favorite:a}=t.meta.arg;e.myHoots[o].favPost=!a,e.myHoots[o].hootStats.favorites+=a?-1:1}}}),{updateHootPinned:H1,updateHootRehoot:x1,updateHootFavorite:M1,updateHootApproved:O1,updateHootRejected:j1,removeHootById:q1,updateHootCommentCount:_1,rehooted:zd}=Jd.actions,Wd=Jd.reducer,$1=Object.freeze(Object.defineProperty({__proto__:null,default:Wd,favoriteHootChanged:Aa,fetchInitialHoots:Ao,fetchMoreHoots:Ca,refreshData:R1,rehooted:zd,removeHootById:q1,updateHootApproved:O1,updateHootCommentCount:_1,updateHootFavorite:M1,updateHootPinned:H1,updateHootRehoot:x1,updateHootRejected:j1},Symbol.toStringTag,{value:"Module"})),G1={customUrlValidationStatus:"idle",isValidCustomUrl:!1},V1=j({name:"customUrl",initialState:G1,reducers:{},extraReducers:{"custom-url/validate/request":e=>({...e,customUrlValidationStatus:"pending"}),"custom-url/validate/fulfilled":(e,t)=>
11({...e,customUrlValidationStatus:"fulfilled",isValidCustomUrl:t.payload.isValidCustomUrl}),"custom-url/validate/rejected":(e,t)=>({...e,customUrlValidationStatus:"rejected",isValidCustomUrl:t.payload.isValidCustomUrl})}}),J1=V1.reducer,dx=e=>({type:ze.getNotifications+"request",payload:e}),cx=e=>({type:ze.readNotifications+"request",payload:e}),zn={notifications:[],notificationsFetchStatus:"idle",notificationsReadStatus:"idle",currentPage:0,refreshNotificationsCounter:0,isPageEnd:!1},Yd=j({name:"activityFeed",initialState:zn,reducers:{refreshNotifications:e=>{e.refreshNotificationsCounter+=1},resetToInitialState:e=>({...zn,notifications:e.notifications,refreshNotificationsCounter:e.refreshNotificationsCounter}),clearNotifications:e=>{e.refreshNotificationsCounter=0,e.notifications=[]}},extraReducers:{[ze.getNotifications+"pending"]:e=>({...e,notificationsFetchStatus:"pending"}),[ze.getNotifications+"fulfilled"]:(e,t)=>{const{notifications:o}=t.payload;return o.length===0?{...e,isPageEnd:!0,notificationsFetchStatus:"fulfilled"}:{...e,notifications:t.payload.pageNumber===0?t.payload.notifications:[...e.notifications,...t.payload.notifications],currentPage:t.payload.pageNumber,notificationsFetchStatus:"fulfilled"}},[ze.getNotifications+"rejected"]:e=>({...e,notificationsFetchStatus:"rejected"}),[ze.readNotifications+"pending"]:e=>({...e,notificationsReadStatus:"pending"}),[ze.readNotifications+"fulfilled"]:e=>({...e,notificationsReadStatus:"fulfilled"}),[ze.readNotifications+"rejected"]:e=>({...e,notificationsReadStatus:"rejected"})}}),{resetToInitialState:ux,refreshNotifications:px,clearNotifications:yx}=Yd.actions,z1=Yd.reducer,W1="SIGNUP",Kd="LOGIN",gx="BOARD_LOGIN",Y1="RESET_PASSWORD",K1="RESEND_ACTIVATION",Wn="REQUEST_PASSWORD_RESET",Bs=(e=[])=>{let t=e.filter(o=>!(o&&o.trim()&&o.trim().length>=1));return!!(t&&t.length)},mx=e=>/^(?:(?:[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)|(?:https?|ftp):\/\/[\w_-]+(?:(?:\.[\w_-]+)+)(?:[\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?)$/.test(e),fx=e=>/^([a-zA-Z0-9_\-.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/.test(e),Da={UNKOWN:"UNKOWN",ACTIVE:"ACTIVE",INVALID:"INVALID"},je={isProspect:!1,isUserLoggedIn:!1,sessionExpiredErrorMessage:"Your session is either expired or invalid. Please login again.",loginEmail:"",password:"",passwordRepeat:"",shouldKeepUserLoggedIn:!1,resetPasswordEmail:"",resetPasswordEmailError:!1,resetPasswordEmailErrorMessage:"Please provide a valid email",loginEmailError:!1,loginEmailErrorMessage:"Please provide a valid email",passwordError:!1,passwordErrorMessage:"Need a valid password",passwordRepeatError:!1,passwordRepeatErrorMessage:"Passwords do not match",firstName:"",firstNameError:!1,firstNameErrorMessage:"Need valid first & last names",lastName:"",lastNameError:!1,lastNameErrorMessage:"Need a valid lastname",userAccountStatus:Da.UNKOWN,showAllFormErrors:!1,activationEmail:"",activationEmailError:!1,activationEmailErrorMessage:"",loginStatus:"idle",setNewPasswordStatus:"idle",currentlySelectedView:Kd,loginError:!1,loginErrorMessage:"Incorrect email or password",activeError:!1,activeErrorMessage:"You have not validated this email address.",activationRequestError:!1,activationRequestLoading:!1,activationRequestFinished:!1,networkError:!1,networkErrorMessage:"Could not connect to your servers. Try again",emailValidationStatus:"idle",emailValidationError:!1,emailValidationErrorMessage:"Sorry the user already exists in our system",facebookLoginFailedErrorMessage:null,facebookAuthStatus:"idle",socialLoginFailedErrorMessage:null,socialAuthStatus:"idle",loginSource:"HB"},hx=e=>({type:"auth/activation/email/resend/request",payload:e}),Sx=e=>({type:"auth/signup/request",payload:e}),bx=e=>({type:"auth/resetPassword/request",payload:e}),Ex=e=>({type:"auth/login/request",payload:e}),wx=e=>({type:"auth/email/validate/request",payload:e}),Ix=e=>({type:"auth/socialLogin/request",payload:e}),Qd=j({name:"auth",initialState:je,reducers:{toggleFbProgress:(e,t)=>{e.facebookLoginFailedErrorMessage=null,e.facebookAuthStatus=t.payload},facebookLoginFailed:(e,t)=>{e.facebookLoginFailedErrorMessage=t.payload?"There's been a problem with authenticating your Facebook account. Please try again later.":null},resetPasswordEmailEntered:(e,t)=>({...e,resetPasswordEmail:t.payload.resetPasswordEmail,resetPasswordEmailError:!so(t.payload.resetPasswordEmail),loginError:!1,activeError:!1,showAllFormErrors:!1}),resetAuthView:e=>({...je,isUserLoggedIn:e.isUserLoggedIn}),showSignupView:()=>({...je,currentlySelectedView:W1}),showLoginView:()=>({...je,currentlySelectedView:Kd}),showResetPasswordView:()=>({...je,currentlySelectedView:Y1}),showRequestResetPasswordView:()=>({...je,currentlySelectedView:Wn}
11),showResendActivationEmailView:()=>({...je,currentlySelectedView:K1}),activationEmailEntered:(e,t)=>({...e,activationEmail:t.payload.activationEmail,activationEmailError:!so(t.payload.activationEmail),activationEmailErrorMessage:"Please enter a valid email"}),loginEmailEntered:(e,t)=>({...e,loginEmail:t.payload.loginEmail,loginEmailError:!so(t.payload.loginEmail),loginError:!1,activeError:!1,showAllFormErrors:!1}),passwordEntered:(e,t)=>({...e,password:t.payload.password,passwordError:!!Bs([t.payload.password]),loginError:!1,activeError:!1,showAllFormErrors:!1}),showFormErrors:(e,t)=>({...e,showAllFormErrors:!0,loginEmailError:t.payload.loginEmailError,loginEmailErrorMessage:t.payload.loginEmailErrorMessage}),resetPasswordForm:e=>({...e,resetPasswordStatus:"idle",loginEmail:"",showAllFormErrors:!1,loginEmailError:!0}),firstNameEntered:(e,t)=>({...e,firstName:t.payload.firstName,firstNameError:!!Bs([t.payload.firstName])}),lastNameEntered:(e,t)=>({...e,lastName:t.payload.lastName,lastNameError:!!Bs([t.payload.lastName])}),passwordRepeatEntered:(e,t)=>({...e,passwordRepeat:t.payload.passwordRepeat,passwordRepeatError:t.payload.passwordRepeat!==e.password}),logUserOut:()=>je,logUserIn:e=>({...e,isUserLoggedIn:!0}),setCurrentlySelectedView:(e,t)=>({...e,currentlySelectedView:t.payload.view}),showValidationErrors:e=>({...e,showAllFormErrors:!0}),socialLoginFailed:(e,t)=>({...e,socialAuthStatus:"idle",socialLoginFailedErrorMessage:`There's been a problem with authenticating your ${t.payload.loginSource} login. Please try again later.`}),socialLoginProgress:(e,t)=>({...e,socialAuthStatus:t.payload.socialAuthStatus})},extraReducers:{"auth/activation/email/resend/pending":e=>({...e,activationRequestError:!1,activationRequestLoading:!0,activationRequestFinished:!1}),"auth/activation/email/resend/fulfilled":e=>({...e,activationRequestError:!1,activationRequestLoading:!1,activationRequestFinished:!0}),"auth/activation/email/resend/rejected":e=>({...e,activationRequestError:!0,activationRequestLoading:!1,activationRequestFinished:!0}),"auth/resetPassword/pending":e=>({...e,resetPasswordStatus:"pending",userAccountStatus:Da.UNKNOWN,showAllFormErrors:!1}),"auth/resetPassword/fulfilled":e=>({...je,isUserLoggedIn:e.isUserLoggedIn,resetPasswordStatus:"fulfilled",currentlySelectedView:Wn,userAccountStatus:Da.ACTIVE}),"auth/resetPassword/rejected":e=>({...e,resetPasswordStatus:"rejected",userAccountStatus:Da.INVALID,showAllFormErrors:!0}),"auth/login/fulfilled":(e,t)=>(localStorage.setItem("partyId",t.payload.userDetails.partyId),localStorage.setItem("userBoards",JSON.stringify(t.payload.userDetails.userBoards)),{...je,loginStatus:"fulfilled",isUserLoggedIn:!0}),"auth/login/pending":e=>({...e,loginStatus:"pending",activationRequestFinished:!1}),"auth/login/rejected":(e,t)=>({...e,loginStatus:"rejected",activeError:t.payload.activeError,loginError:t.payload.loginError,networkError:t.payload.networkError,loginErrorMessage:"Incorrect email or password",activeErrorMessage:"You have not validated this email address",networkErrorMessage:"Could not connect to your servers. Try again"}),"auth/signup/pending":e=>({...e,signupStatus:"pending",showAllFormErrors:!1}),"auth/signup/fulfilled":()=>({...je,isUserLoggedIn:!0,signupStatus:"fulfilled"}),"auth/signup/rejected":e=>({...e,signupStatus:"rejected",showAllFormErrors:!0}),"auth/signup/board/follow/pending":e=>({...e,signupStatus:"pending",showAllFormErrors:!1}),"auth/signup/board/follow/fulfilled":()=>({...je,isUserLoggedIn:!0,signupStatus:"fulfilled"}),"auth/signup/board/follow/rejected":e=>({...e,signupStatus:"rejected",showAllFormErrors:!0}),"auth/password/new/fulfilled":()=>({...je,setNewPasswordStatus:"fulfilled"}),"auth/password/new/rejected":e=>({...e,setNewPasswordStatus:"rejected"}),"auth/password/new/pending":e=>({...e,setNewPasswordStatus:"pending"}),"auth/email/validate/pending":e=>({...e,emailValidationStatus:"pending"}),"auth/email/validate/fulfilled":(e,t)=>{let{isMailIDUnique:o,partyId:a}=t.payload.response;return{...e,emailValidationStatus:"fulfilled",emailValidationError:!o,isProspect:!!(o&&a>0),partyId:a}},"auth/email/validate/rejected":e=>({...e,emailValidationStatus:"rejected"}),"auth/facebookLogin/request":e=>({...e,loginSource:"FB"}),"auth/facebookLogin/pending":e=>({...e,loginStatus:"pending",socialAuthStatus:"pending",facebookAuthStatus:"pending"}),"auth/facebookLogin/fulfilled":e=>({...e,loginStatus:"fulfilled",socialAuthStatus:"fulfilled",facebookAuthStatus:"fulfilled",isUserLoggedIn:!0}),"auth/facebookLogin/rejected":e=>({...e,loginStatus:"rejected",socialAuthStatus:"rejected",facebookAuthStatus:"rejected"}),"auth/socialLogin/request":(e,t)=>({...e,loginSource:t.payload.loginSource,socialLoginFailedErrorMessage:null,loginStatus:"idle",socialAuthStatus:"idle"}),"auth/socialLogin/pending":e=>({...e,loginStatus:"pending",socialAuthStatus:"pending"}),"auth/socialLogin/fulfilled":e=>({...e,loginStatus:"fulfilled",socialAuthStatus:"fulfilled",isUserLoggedIn:!0}),"auth/socialLogin/rejected":e=>({...e,loginStatus:"rejected",socialAuthStatus:"rejected"})}}),{socialLoginProgress:vx,socialLoginFailed:Cx,loginEmailEntered:Ax,passwordEntered:Dx,resetPasswordForm:Tx,passwordRepeatEntered:Px,firstNameEntered:Bx,lastNameEntered:kx,showLoginView:Lx,showSignupView:Fx,showRequestResetPasswordView:Ux,logUserOut:Nx,logUserIn:Rx,resetAuthView:Hx,setCurrentlySelectedView:xx,showValidationErrors:Mx,resetPasswordEmailEntered:Ox}=Qd.actions,Q1=Qd.reducer;function jx(e){return{type:"board/follow/request",payload:e}}function qx(e){return{type:"board/access/request/request",payload:e}}function _x(e){return{type:"board/access/change/request",payload:e}}const Yn={boardCommunityCode:"",boardCommunityCodeError:!0,boardCommunityCodeErrorMessage:"A valid community code is required",changeBoardAccessStatus:"idle",requestBoardAccessStatus:"idle",followBoardStatus:"idle",showAllFormErrors:!1,linkExpired:!1},Zd=j({name:"boardAccess",initialState:Yn,reducers:{reset:()=>Yn,boardCommunityCodeEntered:(e,t)=>({...e,boardCommunityCode:t.payload.boardCommunityCode,boardCommunityCodeError:!t.payload.boardCommunityCode.trim().length,boardCommunityCodeErrorMessage:"Need a valid community code"}),showFormValidationErrors:e=>({...e,showAllFormErrors:!0})},extraReducers:{"board/access/change/fulfilled":e=>({...e,changeBoardAccessStatus:"fulfilled"}),"board/access/change/pending":e=>({...e,changeBoardAccessStatus:"pending"}),"board/access/change/rejected":e=>({...e,changeBoardAccessStatus:"rejected",showAllFormErrors:!1}),"board/access/request/fulfilled":e=>({...e,requestBoardAccessStatus:"fulfilled"}),"board/access/request/pending":e=>({...e,requestBoardAccessStatus:"pending"}),"board/access/request/rejected":e=>({...e,requestBoardAccessStatus:"rejected",showAllFormErrors:!1}),"board/follow/fulfilled":e=>({...e,followBoardStatus:"fulfilled"}),"board/follow/pending":e=>({...e,followBoardStatus:"pending"}),"board/follow/rejected":(e,t)=>
11({...e,followBoardStatus:"rejected",showAllFormErrors:!1,linkExpired:t.payload.linkExpired})}}),{reset:$x}=Zd.actions,Z1=Zd.reducer,X1={localState:{adminHootEmailOptIn:!0,adminHootNotifOptIn:!0,comntBoardEmailOptIn:!0,comntBoardNotifOptIn:!0,comntMentnEmailOptIn:!0,comntMentnNotifOptIn:!0,dailyDigest:!0,evntRemindEmailOptIn:!0,evntRemindNotifOptIn:!0,membHootEmailOptIn:!0,membHootNotifOptIn:!1,mineComntEmailOptIn:!0,mineComntNotifOptIn:!0,otherComntEmailOptIn:!0,otherComntNotifOptIn:!0,subBoardAddEmailOptIn:!0,subBoardAddNotifOptIn:!0,newMemberJoinEmailOptIn:!0,newMemberJoinNotifOptIn:!0,weeklyNewsletterOptIn:!0,savedDataAnalyticsEmailOptIn:!1,screenStatusUpdateEmail:!0},serverState:null,isEditing:!1,fetchBoardNotificationSettingsStatus:"idle"};function Gx(e){return{type:"board/notifications/get/request",payload:e}}function Vx(e){return{type:"board/notifications/update/request",payload:e}}const Xd=j({name:"boardNotificationSettings",initialState:X1,reducers:{toggleAdminHootEmail:(e,t)=>({...e,localState:{...e.localState,adminHootEmailOptIn:t.payload.checked}}),toggleAdminHootNotif:(e,t)=>({...e,localState:{...e.localState,adminHootNotifOptIn:t.payload.checked}}),toggleCommentBoardEmail:(e,t)=>({...e,localState:{...e.localState,comntBoardEmailOptIn:t.payload.checked}}),toggleCommentBoardNotif:(e,t)=>({...e,localState:{...e.localState,comntBoardNotifOptIn:t.payload.checked}}),toggleCommentMentionEmail:(e,t)=>({...e,localState:{...e.localState,comntMentnEmailOptIn:t.payload.checked}}),toggleCommentMentionNotif:(e,t)=>({...e,localState:{...e.localState,comntMentnNotifOptIn:t.payload.checked}}),toggleDailyDigestEmail:(e,t)=>({...e,localState:{...e.localState,dailyDigest:t.payload.checked}}),toggleEventRemindersEmail:(e,t)=>({...e,localState:{...e.localState,evntRemindEmailOptIn:t.payload.checked}}),toggleScreenStatusUpdateEmail:(e,t)=>({...e,localState:{...e.localState,screenStatusUpdateEmail:t.payload.checked}}),toggleWeeklySavesDigestEmail:(e,t)=>({...e,localState:{...e.localState,savedDataAnalyticsEmailOptIn:t.payload.checked}}),toggleMemberHootEmail:(e,t)=>({...e,localState:{...e.localState,membHootEmailOptIn:t.payload.checked}}),toggleMemberHootNotif:(e,t)=>({...e,localState:{...e.localState,membHootNotifOptIn:t.payload.checked}}),toggleMineCommentEmail:(e,t)=>({...e,localState:{...e.localState,mineComntEmailOptIn:t.payload.checked}}),toggleMineCommentNotif:(e,t)=>({...e,localState:{...e.localState,mineComntNotifOptIn:t.payload.checked}}),toggleNewMemberJoinEmail:(e,t)=>({...e,localState:{...e.localState,newMemberJoinEmailOptIn:t.payload.checked}}),toggleNewMemberJoinNotif:(e,t)=>({...e,localState:{...e.localState,newMemberJoinNotifOptIn:t.payload.checked}}),toggleOtherCommentEmail:(e,t)=>({...e,localState:{...e.localState,otherComntEmailOptIn:t.payload.checked}}),toggleSubBoardAddedEmail:(e,t)=>({...e,localState:{...e.localState,subBoardAddEmailOptIn:t.payload.checked}}),toggleSubBoardAddedNotif:(e,t)=>({...e,localState:{...e.localState,subBoardAddNotifOptIn:t.payload.checked}}),toggleWeeklyNewsletterEmail:(e,t)=>({...e,localState:{...e.localState,weeklyNewsletterOptIn:t.payload.checked}})},extraReducers:{"board/notifications/get/fulfilled":(e,t)=>({...e,serverState:t.payload.notificationSettings,localState:t.payload.notificationSettings,isEditing:!1,fetchBoardNotificationSettingsStatus:"fulfilled"}),"board/notifications/get/pending":e=>({...e,fetchBoardNotificationSettingsStatus:"pending"}),"board/notifications/get/rejected":e=>({...e,fetchBoardNotificationSettingsStatus:"rejected"}),"board/notifications/update/fulfilled":(e,t)=>({...e,serverState:t.payload.notificationSettings,localState:t.payload.notificationSettings,isEditing:!1,updateBoardNotificationSettingsStatus:"fulfilled"}),"board/notifications/update/pending":e=>({...e,updateBoardNotificationSettingsStatus:"pending"}),"board/notifications/update/rejected":e=>({...e,updateBoardNotificationSettingsStatus:"rejected"})}}),{toggleAdminHootEmail:Jx,toggleAdminHootNotif:zx,toggleCommentBoardEmail:Wx,toggleCommentBoardNotif:Yx,toggleCommentMentionEmail:Kx,toggleCommentMentionNotif:Qx,toggleDailyDigestEmail:Zx,toggleEventRemindersEmail:Xx,toggleMemberHootEmail:eM,toggleMemberHootNotif:tM,toggleMineCommentEmail:oM,toggleMineCommentNotif:aM,toggleNewMemberJoinEmail:sM,toggleNewMemberJoinNotif:rM,toggleOtherCommentEmail:nM,toggleWeeklySavesDigestEmail:iM,toggleSubBoardAddedEmail:lM,toggleSubBoardAddedNotif:dM,toggleWeeklyNewsletterEmail:cM,toggleScreenStatusUpdateEmail:uM}=Xd.actions,eP=Xd.reducer,tP={isOpen:!1,feedUrl:null,originalFeedUrl:null,badgeCount:0},oP=j({name:"changeLog",initialState:tP,reducers:{closeChangeLog:e=>{e.isOpen=!1},openChangeLog:e=>{e.originalFeedUrl&&(e.isOpen=!0,e.feedUrl=e.originalFeedUrl)}},extraReducers:{"changelog/get/fulfilled":(e,t)=>
11{const{badgeCount:o,feedUrl:a}=t.payload;e.originalFeedUrl=a,e.badgeCount=o}}}),aP=oP.reducer,sP=e=>e,Kn=e=>e,rP=(e,t)=>{const o=[...Object.values(Zt.colors),...Object.values(Zt.userColors)].filter((a,s)=>s>1);return{...e,theme:o[t]}},pM=(e,t)=>{const a=[...e.sequenceItems].map(s=>{if(s.seqItemValue!==null&&s.seqItemValue.data&&s.seqItemValueType=="layoutConfig"){const r=s.seqItemValue.data.id,i=s.seqItemValue.data.iconUrl,l=s.seqItemValue.data.orientation,d=s.seqItemValue.data.zones.map(p=>{var v;let h;switch(p.assignedContent.type){case"appId":h=((v=p.assignedContent.value[0])==null?void 0:v.boardAppsId)||p.assignedContent.value.id;break;case"hootId":h=p.assignedContent.value.postId||p.assignedContent.value.id;break;default:h=p.assignedContent.value;break}return{zoneId:p.id,itemValue:h,itemType:p.assignedContent.type,position:p.position}});return{...s,seqItemValue:JSON.stringify({layoutId:r,layoutIconUrl:i,layoutOrientation:l,zones:[...d]})}}else return s});return t?{name:e.name,description:e.description,orientation:e.orientation,id:e.id,createdBy:e.createdBy,isEditable:e.isEditable,object:e.object,sequenceItems:a}:{name:e.name,description:e.description,orientation:e.orientation,sequenceItems:a}},yM=e=>!!e.every(t=>Object.values(t.assignedContent).length>0),nP=e=>{let t=[];const o=e;if(o.images&&o.images.length>0){const a=o.images.filter(s=>{if(s.size){if(s.size=="LG")return s}else return s});t=a.length>0?a:o.images}else o.thumbnail&&o.thumbnail.length>0?t=[{url:o.thumbnail}]:o.internalImages&&o.internalImages.length>0?t=o.internalImages.map(a=>({url:a})):o.thumbPath?t=[{url:o.thumbPath}]:o.hootCoverImages&&Object.keys(o.hootCoverImages).length>0&&o.hootCoverImages.large!==null&&o.hootCoverImages.large[0].url.length>0&&(t=o.hootCoverImages.large);return t.length<=0&&(t=[{url:""}]),t.slice(0,4)},iP=e=>{var t,o;if(e.majorCategoryCode&&e.majorCategoryCode=="EVENT"||e.majorCategoryCode&&e.majorCategoryCode=="ANNT"||e.postingCategory&&e.postingCategory=="EVENT"||e.postingCategory&&e.postingCategory=="ANNT"){const a=e.eventStart||((t=e.eventInfo)==null?void 0:t.eventStartDateTime),s=e.eventEnd||((o=e.eventInfo)==null?void 0:o.eventEndDateTime),r=typeof a=="string"?Pe(a):new Date(a),i=typeof s=="string"?Pe(s):new Date(s);if(mn(r)&&mn(i)){const l="EEE, yyyy MMM do h:mm a";let d=te(r,l);if(!Ii(r,i))d+=` to ${te(i,l)} (IST)`;else{const p=e.hootTimezone||"UTC",h=_e(new Date,p,"zzz");d+=` to ${te(i,"h:mm a")} ${h}`}return d}else return null}else return null},lP=e=>e.signageSettings?!!e.signageSettings.isFullScreen:!!e.digFullScreenHoot,Qn=e=>{if(e.hootType=="HLVID"||e.type=="HLVID")return e.embedMediaInfo&&Object.values(e.embedMediaInfo).length>0?e.embedMediaInfo:e.embedableMedia&&e.embedableMedia.length>0?{html:e.embedableMedia,type:"",url:e.embededMediaUrl}:{html:"",type:"",url:""}},gM=(e,t)=>{if(e.assignedContent.type==="hootId")return dP(t);if(e.assignedContent.type==="appId"){const o=t;return{endpoints:o.endpoints||o}}return t},dP=e=>{var r;const t=e,o=nP(e),a={colorInfo:t.colorInfo||Zt.colors[t.hootBgColor]||{},images:o,title:t.title||t.postName,descriptionPlainText:t.descriptionPlainText||t.postDescPlainText,isFullScreen:lP(t),timeout:t.digHootTimeoutInSec*1e3||((r=t.signageSettings)==null?void 0:r.timeout)*1e3||15e3},s=iP(t);return s!=="null"&&(a.eventDate=s),Qn(t)&&(a.embedMediaInfo=Qn(t)),a},Vt={selectedTab:0,getDefaultSequencesAPIStatus:I.IDLE,allSequences:[],getAllSequencesAPIStatus:I.IDLE,sequenceBuilder:{formMode:null,formStep:0,selectedSlotPosition:null,selectedSlotType:null,activeSequenceDetails:{},previewContent:null},fetchLayoutsAPIStatus:I.IDLE,loadPreviewContentAPIStatus:I.IDLE,getSequenceAPIStatus:I.IDLE,createSequenceAPIStatus:I.IDLE,deleteSequenceAPIStatus:I.IDLE,saveSequenceAPIStatus:I.IDLE,assignSequenceAPIStatus:I.IDLE,updateScheduleAPIStatus:I.IDLE,unAssignSequenceAPIStatus:I.IDLE,markAsDefaultAPIStatus:I.IDLE,sequenceAvailability:[],getAvailabilityAPIStatus:I.IDLE,sequenceScheduling:{dayWidth:35,startDateTime:xe(new Date),endDateTime:Ze(wi(new Date,1)),scheduleInfoDetails:null,screensWithSchedule:{}},slotLayout:{currentStep:0,selectedLayout:null,selectedZoneId:null,availableLayouts:[],showSelectContentModal:!1,zoneType:null,isContentAssigned:!1,hoots:[]}},ks=(e,t)=>{let o=e.allSequences.find(r=>r.isDefault);const a=t.sequences.filter(r=>!r.isDefault||r.sequenceId);if(t.assignedSequenceId){const r=e.allSequences.find(i=>i.id==t.assignedSequenceId);r&&(o={...r,isDefault:!0})}const s=[];if(a.length>0)for(let r=0;r<a.length;r++){const i=a[r],l=xe(new Date(i.endDateTime)),d=Ze(new Date((a[r+1]||{}).startDateTime||e.sequenceScheduling.endDateTime));if(r===0&&Ny(new Date(i.startDateTime),new Date(e.sequenceScheduling.startDateTime))&&s.push({...o,startDateTime:e.sequenceScheduling.startDateTime,endDateTime:We(new Date(i.startDateTime),1)}),!Ii(l,We(d,1))){const p=Ei(l,1),h=We(d,1);Ar(p,new Date(e.sequenceScheduling.endDateTime))&&s.push({...o,startDateTime:p,endDateTime:h})}}else o&&s.push({...o,startDateTime:e.sequenceScheduling.startDateTime,endDateTime:We(new Date(e.sequenceScheduling.endDateTime),1)});return[...s,...a]}
11,ec=j({name:"sequences",initialState:Vt,reducers:{resetState:()=>Vt,setFormMode:(e,t)=>{e.sequenceBuilder.formMode=t.payload},setTab:(e,t)=>{e.selectedTab=t.payload},setFormStep:(e,t)=>{e.sequenceBuilder.formStep=t.payload},setSlotSelector:(e,t)=>{e.sequenceBuilder.selectedSlotPosition=t.payload},setSlotType:(e,t)=>{e.sequenceBuilder.selectedSlotType=t.payload},setFormData:(e,t)=>{e.sequenceBuilder.activeSequenceDetails=t.payload},resetFormMode:e=>{e.sequenceBuilder=Vt.sequenceBuilder},setSlotValue:(e,t)=>{const{position:o,value:a}=t.payload;e.sequenceBuilder.activeSequenceDetails.sequenceItems=e.sequenceBuilder.activeSequenceDetails.sequenceItems.map(s=>s.seqItemPositionNumber===o?{...s,seqItemValue:a,seqItemValueType:a?e.sequenceBuilder.selectedSlotType:null}:s)},resetSteps:e=>{e.sequenceBuilder.selectedSlotType=null,e.sequenceBuilder.selectedSlotPosition=null,e.slotLayout.currentStep=0,e.slotLayout.selectedLayout=null,e.slotLayout.selectedZoneId=null},setScreenSequences:(e,t)=>{const{screenId:o,payload:a}=t.payload;e.sequenceScheduling.screensWithSchedule[o]=ks(e,a)},setTimelineDates:(e,t)=>{if(t.payload){const{startDateTime:o,endDateTime:a}=t.payload;e.sequenceScheduling.startDateTime=o,e.sequenceScheduling.endDateTime=a}else e.sequenceScheduling.startDateTime=Vt.sequenceScheduling.startDateTime,e.sequenceScheduling.endDateTime=Vt.sequenceScheduling.endDateTime},setScheduleInfoBox:(e,t)=>{e.sequenceScheduling.scheduleInfoDetails=t.payload},removeSlotValue:e=>{const t=e.sequenceBuilder.selectedSlotPosition;e.sequenceBuilder.activeSequenceDetails.sequenceItems=e.sequenceBuilder.activeSequenceDetails.sequenceItems.map(o=>o.seqItemPositionNumber===t?{...o,seqItemValue:null,seqItemValueType:null}:o),e.sequenceBuilder.selectedSlotType=null,e.sequenceBuilder.selectedSlotPosition=null},setCurrentStep:(e,t)=>{e.slotLayout.currentStep=t.payload},setSelectedLayout:(e,t)=>{const o=t.payload;if(o!==null){const a=e.slotLayout.availableLayouts.find(r=>r.id==o),s=a.zones.map(r=>({...r,assignedContent:{}}));a.zones=s,a&&(e.slotLayout.selectedLayout=a,e.slotLayout.isContentAssigned=!1)}else e.slotLayout.selectedLayout=null},setAssignedContent:(e,t)=>{const{zoneId:o,value:a,type:s}=t.payload;a==null&&s==null?(e.slotLayout.selectedLayout.zones.find(r=>r.id==o).assignedContent={},e.slotLayout.currentStep=0,e.slotLayout.isContentAssigned=!1):e.slotLayout.selectedLayout.zones.find(r=>r.id==o).assignedContent={value:a,type:s}},setShowSelectContentModal:(e,t)=>{e.slotLayout.showSelectContentModal=t.payload},setSelectedZoneId:(e,t)=>{e.slotLayout.selectedZoneId=t.payload},setZoneType:(e,t)=>{e.slotLayout.zoneType=t.payload},setIsContentAssigned:(e,t)=>{e.slotLayout.isContentAssigned=t.payload},copyContentToAllSlots:(e,t)=>{const{value:o}=t.payload;e.sequenceBuilder.activeSequenceDetails.sequenceItems=e.sequenceBuilder.activeSequenceDetails.sequenceItems.map(a=>a.seqItemValue==null&&a.seqItemTypeCode!=="HAL"?{...a,seqItemValue:o,seqItemValueType:"layoutConfig"}:a),e.sequenceBuilder.selectedSlotType=null,e.sequenceBuilder.selectedSlotPosition=null,e.slotLayout.currentStep=0,e.slotLayout.selectedLayout=null,e.slotLayout.selectedZoneId=null}},extraReducers:{...sS(L),[L.getDefaultSequences+I.FULFILLED]:(e,t)=>{e.getDefaultSequencesAPIStatus=I.FULFILLED;const{sequenceItems:o}=t.payload,a=(o||[]).map(sP);e.sequenceBuilder.activeSequenceDetails.sequenceItems||(e.sequenceBuilder.activeSequenceDetails.sequenceItems=a)},[L.getAllSequences+I.FULFILLED]:(e,t)=>{e.getAllSequencesAPIStatus=I.FULFILLED,e.allSequences=(t.payload||[]).sort((o,a)=>a.isDefault-o.isDefault).map(rP)},[L.saveSequence+I.FULFILLED]:e=>{e.saveSequenceAPIStatus=I.FULFILLED,e.sequenceBuilder=Vt.sequenceBuilder},[L.createSequence+I.FULFILLED]:e=>{e.createSequenceAPIStatus=I.FULFILLED,e.sequenceBuilder=Vt.sequenceBuilder},[L.getSequence+I.FULFILLED]:(e,t)=>{e.getSequenceAPIStatus=I.FULFILLED,!t.payload.orientation||t.payload.orientation==null?e.sequenceBuilder.activeSequenceDetails=Kn({...t.payload,orientation:"LAN"}):e.sequenceBuilder.activeSequenceDetails=Kn(t.payload)},[L.deleteSequence+I.REQUEST]:(e,t)=>{e.allSequences=e.allSequences.filter(o=>o.id!==t.payload.id)},[L.markAsDefault+I.REQUEST]:(e,t)=>{e.allSequences=e.allSequences.map(o=>({...o,isDefault:o.id===t.payload.id}))},[L.unAssignSequence+I.REQUEST]:(e,t)=>{const{id:o}=t.payload;let a;e.sequenceAvailability=e.sequenceAvailability.map(s=>({...s,assignedSequences:s.assignedSequences.filter(r=>(r.id===o&&(a=s.screenDetails.screenId),r.id!==o))}
11)),e.sequenceScheduling.scheduleInfoDetails=null,e.sequenceScheduling.screensWithSchedule[a]=ks(e,{sequences:e.sequenceScheduling.screensWithSchedule[a].filter(s=>s.id!==o)})},[L.getAvailability+I.REQUEST]:(e,t)=>{const{silentRefresh:o}=t.payload;o||(e.sequenceAvailability=[],e.getAvailabilityAPIStatus=I.REQUEST)},[L.getAvailability+I.PENDING]:(e,t)=>{const{silentRefresh:o}=t.payload;o||(e.getAvailabilityAPIStatus=I.PENDING)},[L.getAvailability+I.FULFILLED]:(e,t)=>{e.getAvailabilityAPIStatus=I.FULFILLED,e.sequenceAvailability=t.payload.map(o=>({...o,assignedSequences:o.assignedSequences.map(a=>{const s=e.allSequences.find(r=>r.id===a.sequenceId)||{};return{...a,startDateTime:xe(new Date(a.startDateTime)),endDateTime:Ze(new Date(a.endDateTime)),theme:s.theme||{background:"#dbdbdb"}}})}))},[L.updateSchedule+I.REQUEST]:(e,t)=>{const{data:o,index:a,screenId:s}=t.payload,r=e.sequenceScheduling.screensWithSchedule[s];r[a]={...r[a],...o},e.sequenceScheduling.screensWithSchedule[s]=ks(e,{sequences:r,assignedSequenceId:o.assignedSequenceId})},[L.loadPreviewContent+I.FULFILLED]:(e,t)=>{e.loadPreviewContentAPIStatus=I.FULFILLED;const{response:o,type:a,zoneId:s}=t.payload||{};e.slotLayout.selectedLayout.zones.find(r=>r.id==s).assignedContent={value:o.data||o,type:a}},[L.fetchLayouts+I.FULFILLED]:(e,t)=>{e.fetchLayoutsAPIStatus=I.FULFILLED;const o=t.payload,a=e.sequenceBuilder.activeSequenceDetails.orientation;e.slotLayout.availableLayouts=o.filter(s=>s.orientation==a)},[L.fetchHootsForCollectionContentType+I.FULFILLED]:(e,t)=>{e.slotLayout.hoots=t.payload}}}),{setTab:mM,setScheduleInfoBox:fM,setFormMode:hM,setFormStep:SM,setSlotSelector:bM,setSlotValue:EM,setFormData:wM,setSlotType:IM,resetFormMode:vM,setScreenSequences:CM,setTimelineDates:AM,resetSteps:DM,setCurrentStep:TM,setSelectedLayout:PM,setShowSelectContentModal:BM,setAssignedContent:kM,setSelectedZoneId:LM,setZoneType:FM,setIsContentAssigned:UM,copyContentToAllSlots:NM}=ec.actions,RM=e=>({type:L.getDefaultSequences+I.REQUEST,payload:e}),HM=e=>({type:L.getAllSequences+I.REQUEST,payload:e}),xM=e=>({type:L.getSequence+I.REQUEST,payload:e}),MM=e=>({type:L.createSequence+I.REQUEST,payload:e}),OM=e=>({type:L.deleteSequence+I.REQUEST,payload:e}),jM=e=>({type:L.saveSequence+I.REQUEST,payload:e}),qM=e=>({type:L.assignSequence+I.REQUEST,payload:e}),_M=e=>({type:L.updateSchedule+I.REQUEST,payload:e}),$M=e=>({type:L.unAssignSequence+I.REQUEST,payload:e}),GM=e=>({type:L.getAvailability+I.REQUEST,payload:e}),VM=e=>({type:L.markAsDefault+I.REQUEST,payload:e}),JM=({id:e,type:t,zoneId:o,isSaved:a})=>({type:L.loadPreviewContent+I.REQUEST,payload:{id:e,type:t,zoneId:o,isSaved:a}}),zM=e=>({type:L.fetchLayouts+I.REQUEST,payload:e}),WM=e=>({type:L.fetchHootsForCollectionContentType+I.REQUEST,payload:e}),cP=ec.reducer,YM=e=>{const t={};for(const o of e.params.idleStates)t[o.keyName]=o.isActive,t[o.configKeyName]=JSON.stringify(o.config);return{type:"screen/create/request",payload:{...e,params:{...e.params,idleStates:t}}}},Ls={steps:[{label:"screen Info"},{label:"Content Settings"},{label:"Locations"},{label:"Creating Screen"},{label:"Device Management"}],currentStep:0,localState:{screenName:"",screenType:"INT",screenLayout:"POR",showPrivatePosts:!1,showBoardCommunityCode:!1,collections:"",showPosterName:!1,showInfoPage:!1,mobileJoin:!1,showComments:!1,screensDefaultView:"AV",screenLocation:{formattedAddress:""},locationText:"",locationAppUrl:"",screenJoiningAccess:"FL",idleStates:[{name:"Concierge Home Page",keyName:"conciergeHomePage",configKeyName:"conciergeConfig",config:{title:""}},{name:"Digital Signage",keyName:"digitalSignage",configKeyName:"digitalSignageConfig"},{name:"App Switcher",keyName:"appSwitcher",configKeyName:"appSwitcherConfig"},{name:"Hoot Switcher",keyName:"hootSwitcher",configKeyName:"hootSwitcherConfig"},{name:"Collection Switcher",keyName:"collectionSwitcher",configKeyName:"collectionSwitcherConfig",config:{collections:"",behaviour:"union"}},{name:"Tap Anywhere Animation",keyName:"tapAnywhereAnimation",configKeyName:"tapAnywhereAnimationConfig"},{name:"Upcoming Events Switcher",keyName:"upcomingEventSwitcher",configKeyName:"upcomingEventSwitcherConfig"},{name:"Fullscreen Image Switcher",keyName:"fullScreenImageSwitcher",configKeyName:"fullScreenImageSwitcherConfig",config:{collections:"",behaviour:"union"}}].map(e=>({...e,isActive:!1,isMoreConfigOpen:!1,isConfigurable:!!e.config,config:{...e.config,duration:20}})),screenSize:"32_to_55",iconSize:"0",displayWidthInPixels:null,displayHeightInPixels:null,aspectRatio:null,pixelDensity:null,resolution:"custom",viewOnMobile:!0,welcomeTitle:"Hello",welcomeSubtitle:"How can I help you today?"},serverState:null,isEditing:!1,screenId:null,createScreenStatus:"idle",showAllFormErrors:!1,screenNameError:!0,screenLayoutError:!0,screenNameErrorMessage:"Enter a name or nick-name for your screen",screenLayoutErrorMessage:"Please select a screen orientation",screenLocationError:!0,screenLocationErrorMessage:"Please enter the location of the screen",locationTextError:!0,locationTextErrorMessage:"Please enter valid text",locationAppUrlError:!0,locationAppUrlErrorMessage:"Please enter a valid URL"},tc=j({name:"createScreen",initialState:Ls,reducers:{updateIdleState:(e,t)=>
11{const{index:o,data:a}=t.payload;e.localState.idleStates[o]=a},setScreenType:(e,t)=>({...e,localState:{...e.localState,screenType:t.payload.screenType}}),collectionChanged:(e,t)=>({...e,localState:{...e.localState,collections:t.payload.collections}}),setInitialState:(e,t)=>({...e,serverState:t.payload.initialState,localState:t.payload.initialState}),screenNameChanged:(e,t)=>({...e,localState:{...e.localState,screenName:rt(t.payload.screenName)},screenNameError:!(t.payload.screenName&&t.payload.screenName.trim()&&t.payload.screenName.trim().length)}),screenLayoutChanged:(e,t)=>({...e,localState:{...e.localState,screenLayout:t.payload.screenLayout}}),toggleShowPrivatePosts:e=>({...e,localState:{...e.localState,showPrivatePosts:!e.localState.showPrivatePosts}}),toggleShowBoardCommunityCode:e=>({...e,localState:{...e.localState,showBoardCommunityCode:!e.localState.showBoardCommunityCode}}),toggleShowComments:e=>({...e,localState:{...e.localState,showComments:!e.localState.showComments}}),toggleShowPosterName:e=>({...e,localState:{...e.localState,showPosterName:!e.localState.showPosterName}}),toggleShowInfoPage:e=>({...e,localState:{...e.localState,showInfoPage:!e.localState.showInfoPage}}),toggleMobileJoin:e=>({...e,localState:{...e.localState,mobileJoin:!e.localState.mobileJoin}}),screenLocationChanged:(e,t)=>({...e,localState:{...e.localState,screenLocation:t.payload.screenLocation},screenLocationError:!(t.payload.screenLocation&&t.payload.screenLocation.googlePlaceId)}),locationAppUrlChanged:(e,t)=>({...e,localState:{...e.localState,locationAppUrl:t.payload.locationAppUrl},locationAppUrlError:t.payload.locationAppUrl&&t.payload.locationAppUrl.trim()&&t.payload.locationAppUrl.trim().length?!Cl(t.payload.locationAppUrl):!0}),locationTextChanged:(e,t)=>({...e,localState:{...e.localState,locationText:t.payload.locationText},locationTextError:!(t.payload.locationText&&t.payload.locationText.trim()&&t.payload.locationText.trim().length)}),screenJoiningAccessChanged:(e,t)=>({...e,localState:{...e.localState,screenJoiningAccess:t.payload.screenJoiningAccess}}),screensDefaultViewChanged:(e,t)=>({...e,localState:{...e.localState,screensDefaultView:t.payload.screensDefaultView}}),nextStep:e=>e.currentStep>=e.steps.length-1?e:{...e,showAllFormErrors:!1,currentStep:e.currentStep+1},prevStep:e=>{if(!(e.currentStep<=0))return{...e,showAllFormErrors:!1,currentStep:e.currentStep-1}},jumpToStep:(e,t)=>{if(!(t.payload.targetStep>=e.currentStep))return{...e,showAllFormErrors:!1,currentStep:t.payload.targetStep}},resetCreateScreen:e=>({...Ls,localState:{...Ls.localState,screenType:e.localState.screenType}}),showFormErrors:e=>({...e,showAllFormErrors:!0}),updateScreenSize:(e,t)=>({...e,localState:{...e.localState,screenSize:t.payload.screenSize}}),updatePowerSchedule:(e,t)=>({...e,localState:{...e.localState,screenPowerSchedule:t.payload.screenPowerSchedule}}),updateIconSize:(e,t)=>({...e,localState:{...e.localState,iconSize:t.payload.iconSize}}),updateDisplayWidthInPixels:(e,t)=>({...e,localState:{...e.localState,displayWidthInPixels:t.payload.displayWidthInPixels}}),updateDisplayHeightInPixels:(e,t)=>({...e,localState:{...e.localState,displayHeightInPixels:t.payload.displayHeightInPixels}}),updateAspectRatio:(e,t)=>({...e,localState:{...e.localState,aspectRatio:t.payload.aspectRatio}}),updatePixelDensity:(e,t)=>({...e,localState:{...e.localState,pixelDensity:t.payload.pixelDensity}}),updateResolution:(e,t)=>({...e,localState:{...e.localState,resolution:t.payload.resolution}}),toggleViewOnMobile:(e,t)=>({...e,localState:{...e.localState,viewOnMobile:t.payload.viewOnMobile}}),welcomeTitleChanged:(e,t)=>({...e,localState:{...e.localState,welcomeTitle:rt(t.payload.welcomeTitle)}}),welcomeSubtitleChanged:(e,t)=>({...e,localState:{...e.localState,welcomeSubtitle:rt(t.payload.welcomeSubtitle)}})},extraReducers:{"screen/create/pending":e=>({...e,createScreenStatus:"pending"}),"screen/create/fulfilled":(e,t)=>({...e,createScreenStatus:"fulfilled",screenId:t.payload.screenId}),"screen/create/rejected":e=>({...e,createScreenStatus:"rejected"})}}),{screenNameChanged:KM,screenJoiningAccessChanged:QM,screenLayoutChanged:ZM,toggleShowPrivatePosts:XM,toggleShowBoardCommunityCode:eO,toggleShowComments:tO,toggleShowPosterName:oO,toggleShowInfoPage:aO,toggleMobileJoin:sO,locationAppUrlChanged:rO,locationTextChanged:nO,screenLocationChanged:iO,screensDefaultViewChanged:lO,nextStep:dO,prevStep:cO,jumpToStep:uO,resetCreateScreen:pO,collectionChanged:yO,setScreenType:gO,updateScreenSize:mO,updatePowerSchedule:fO,updateIconSize:hO,updateDisplayWidthInPixels:SO,updateDisplayHeightInPixels:bO,updateAspectRatio:EO,updatePixelDensity:wO,updateResolution:IO,toggleViewOn
11Mobile:vO,welcomeTitleChanged:CO,welcomeSubtitleChanged:AO}=tc.actions,uP=tc.reducer,pP=j({name:"drawer",initialState:{isOpen:!1},reducers:{openDrawer:e=>({...e,isOpen:!0}),closeDrawer:e=>({...e,isOpen:!1})},extraReducers:{}}),yP=pP.reducer;let pt={id:0,collections:"",boardView:"",showPosterName:!0,showComments:!0,allowedDomains:"",embedWindowSize:""};const oc=({embedConfigId:e,selectedCollections:t,selectedEmbedSize:o,selectedEmbedView:a,showPosterName:s,showComments:r,allowedDomains:i,collectionBehavior:l})=>{if(e>0&&(pt.id=e),t&&t.length>0){let d="";t.map((p,h)=>{h===0?d=`${p.collectionName}`:d=`${d},${p.collectionName}`}),pt.collections=d}return pt.boardView=a,pt.showPosterName=s,pt.showComments=r,pt.allowedDomains=i,pt.embedWindowSize=gP(o),pt.collectionBehavior=l,pt};function gP(e){return e.width>0&&e.height>0?`${e.width}x${e.height}`:""}const Zn=(e,t)=>{if(e){const o=e.substring(0,e.indexOf("x")),a=e.substring(e.indexOf("x")+1);return{width:t?`${o}px`:parseInt(o),height:t?`${a}px`:parseInt(a)}}else return{width:0,height:0}},mP=e=>{let t=[];return e!==""&&e.split(",").map(a=>{t.push({collectionName:a})}),t},Fs=x("/board/embed/saveConfig",async({configParams:e},t)=>{const{activeBoard:{boardId:o}}=t.getState();return{response:await cf(o,oc(e))}}),Us=x("/board/embed/updateConfig",async({configParams:e},t)=>{const{activeBoard:{boardId:o}}=t.getState();return{response:await uf(o,oc(e))}}),Ns=x("/board/embed/fetchConfig",async(e,t)=>{const{activeBoard:{boardId:o}}=t.getState();return{response:await pf(o)}}),qe={isEmbed:window.location.hostname.includes("embed"),embedCode:"",embedConfigId:0,selectedCollections:[],selectedSizingOption:"responsive",selectedEmbedSize:{height:0,width:0},embedIframeSize:{width:"100%",height:"630px"},selectedEmbedView:"AI",showPosterName:!0,showComments:!0,allowedDomains:"",allowPrivateAccess:!1,embedAccessToken:"",saveEmbedConfigStatus:"idle",updateEmbedConfigStatus:"idle",fetchEmbedConfigStatus:"idle",loadEmbedConfigStatus:"idle",collectionBehavior:"U"},ac=j({name:"embed",initialState:qe,reducers:{clearEmbedData:()=>qe,embedCodeGenerated:(e,t)=>{let o=t.payload;return{...e,embedCode:o}},collectionAdded:(e,t)=>{let o=t.payload;return{...e,selectedCollections:o}},collectionRemoved:(e,t)=>({...e,selectedCollections:e.selectedCollections.filter(o=>o.collectionId!==t.payload.collectionId)}),sizingOptionsSelected:(e,t)=>({...e,selectedSizingOption:t.payload,embedIframeSize:t.payload==="responsive"?qe.embedIframeSize:e.embedIframeSize}),embedIframeSizeSelected:(e,t)=>{let o=t.payload;return{...e,embedIframeSize:o}},embedSizeSelected:(e,t)=>{let o={height:t.payload.height,width:t.payload.width};return{...e,selectedEmbedSize:o}},embedViewSelected:(e,t)=>({...e,selectedEmbedView:t.payload}),showPosterNameToggled:(e,t)=>({...e,showPosterName:t.payload}),showCommentsToggled:(e,t)=>({...e,showComments:t.payload}),allowedDomainsAdded:(e,t)=>({...e,allowedDomains:t.payload}),allowPrivateAccessToggled:(e,t)=>({...e,allowPrivateAccess:t.payload}),removeEmbedAccessToken:e=>({...e,embedAccessToken:""}),setCollectionBehavior:(e,t)=>({...e,collectionBehavior:t.payload}),resetFixedSize:e=>({...e,selectedEmbedSize:{height:0,width:0},embedIframeSize:{width:"100%",height:"630px"}})},extraReducers:{[Fs.fulfilled]:(e,t)=>{if(t.payload.response){let o=t.payload.response;if(o.data)return{...e,embedConfigId:o.data.id,embedAccessToken:o.data.embedAccessToken,saveEmbedConfigStatus:"success"}}},[Fs.pending]:e=>({...e,saveEmbedConfigStatus:"pending"}),[Fs.rejected]:(e,t)=>{if(t.payload.response)return{...e,saveEmbedConfigStatus:"rejected"}},[Us.fulfilled]:(e,t)=>{if(t.payload.response){let o=t.payload.response;if(o.data)return{...e,embedAccessToken:o.data.embedAccessToken,updateEmbedConfigStatus:"success"}}},[Us.pending]:e=>({...e,updateEmbedConfigStatus:"pending"}),[Us.rejected]:(e,t)=>{if(t.payload.response)return{...e,updateEmbedConfigStatus:"rejected"}},[Ns.fulfilled]:(e,t)=>{const o=((t.payload||{}).response||{}).data||{};return{...e,embedConfigId:o.id||qe.embedConfigId,selectedEmbedView:o.boardView||qe.selectedEmbedView,selectedSizingOption:o.embedWindowSize?"fixedSize":"responsive",selectedEmbedSize:o.embedWindowSize?Zn(o.embedWindowSize,!1):qe.selectedEmbedSize,embedIframeSize:o.embedWindowSize?Zn(o.embedWindowSize,!0):qe.embedIframeSize,showPosterName:o.showPosterName===void 0?qe.showPosterName:o.showPosterName,showComments:o.showComments===void 0?qe.showComments:o.showComments,allowedDomains:o.allowedDomains||qe.allowedDomains,selectedCollections:o.collections?mP(o.collections):qe.selectedCollections,embedAccessToken:o.embedAccessToken||qe.embedAccessToken,fetchEmbedConfigStatus:"success",collectionBehavior:o.collectionBehavior||qe.collectionBehavior}},[Ns.pending]:(e,t)=>{if(t.payload)return{...e,fetchEmbedConfigStatus:"pending"}},[Ns.rejected]:(e,t)=>{if(t.payload)return{...e,fetchEmbedConfigStatus:"rejected"}}}}),{embedCodeGenerated:DO,collectionAdded:TO,sizingOptionsSelected:PO,embedIframeSizeSelected:BO,embedSizeSelected:kO,embedViewSelected:LO,showPosterNameToggled:FO,showCommentsToggled:UO,setCollectionBehavior:NO,resetFixedSize:RO}=ac.actions,fP=ac.reducer,hP=()=>({type:"boards/all/hoots/request",payload:{params:{start:0,max:40,upcomingEvents:!1,freeEvents:!1}}}),SP=e=>({type:"boards/all/hoots/request",payload:e}),bP=e=>({type:"boards/all/hoots/more/request",payload:e}
11),Xn={allBoardHoots:[],initialHootsFetchStatus:"idle",fetchMoreHootsStatus:"idle",shouldFetchMore:!1,error:!1,errorMessage:"",page:0,max:20,upcomingEvents:!1,freeEvents:!1},sc=j({name:"allBoardHoots",initialState:Xn,reducers:{reset:()=>Xn,setPage:(e,t)=>({...e,page:t.payload.page}),updateHootPinned:(e,t)=>{const{pin:o,selectedHootIndex:a}=t.payload;e.allBoardHoots[a].isPinned=o},updateHootRehoot:(e,t)=>{const{selectedHootIndex:o}=t.payload;e.allBoardHoots[o].hootStats.rehoots+=1},updateHootFavorite:(e,t)=>{const{selectedHootIndex:o,favorite:a}=t.payload;e.allBoardHoots[o].favPost=a,e.allBoardHoots[o].hootStats.favorites+=a?1:-1},updateHootApproved:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.allBoardHoots[o].requiresApproval=!1;else{const s=e.allBoardHoots.findIndex(({id:r})=>r===a.id);e.allBoardHoots[s].requiresApproval=!1}},updateHootRejected:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.allBoardHoots.splice(o,1);else{const s=e.allBoardHoots.findIndex(({id:r})=>r===a.id);e.allBoardHoots.splice(s,1)}},removeHootById:(e,t)=>{const{hootId:o}=t.payload;e.allBoardHoots=e.allBoardHoots.filter(a=>a&&a.id!==o)},updateHootCommentCount:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.allBoardHoots[o].hootStats.comments+=1;else{const s=e.allBoardHoots.findIndex(({id:r})=>r===a.id);e.allBoardHoots[s].hootStats.comments+=1}},rehooted:(e,t)=>{const o=e.allBoardHoots.findIndex(({id:a})=>a===t.payload.id);o>-1&&(e.allBoardHoots[o].hootStats.rehoots+=1)}},extraReducers:{"saved/hoots/saveLocal/request":(e,t)=>{const o=t.payload.saveForLaterData.hoots;return{...e,allBoardHoots:e.allBoardHoots.map(a=>o.includes(a.id)?{...a,isSaved:!0}:a)}},"saved/hoots/unsave/request":(e,t)=>{const{hootId:o}=t.payload;return{...e,allBoardHoots:e.allBoardHoots.map(a=>a.id===o?{...a,isSaved:!1}:a)}},"boards/all/hoots/pending":e=>({...e,initialHootsFetchStatus:"pending",allBoardHoots:[]}),"boards/all/hoots/fulfilled":(e,t)=>{if(t.payload.hoots&&t.payload.hoots.length){const a=t.payload.hoots.map(Rt).map(Xe);return{...e,page:e.page+1,initialHootsFetchStatus:"fulfilled",allBoardHoots:a,shouldFetchMore:t.payload.hoots.length>e.max-2}}else return{...e,initialHootsFetchStatus:"fulfilled",allBoardHoots:[],shouldFetchMore:!1}},"boards/all/hoots/rejected":e=>({...e,initialHootsFetchStatus:"rejected",allBoardHoots:[],error:!0,errorMessage:"Failed to fetch hoots"}),"boards/all/hoots/more/pending":e=>({...e,fetchMoreHootsStatus:"pending"}),"boards/all/hoots/more/fulfilled":(e,t)=>{if(t.payload.hoots&&t.payload.hoots.length){const a=t.payload.hoots.map(Rt).map(Xe);return{...e,fetchMoreHootsStatus:"fulfilled",allBoardHoots:[...e.allBoardHoots,...a],page:e.page+1,shouldFetchMore:t.payload.hoots.length>e.max-2}}else return{...e,page:e.page+1,fetchMoreHootsStatus:"fulfilled",shouldFetchMore:!1}},"boards/all/hoots/more/rejected":e=>({...e,fetchMoreHootsStatus:"rejected",allBoardHoots:[],error:!0,errorMessage:"Failed to fetch hoots"})}}),{rehooted:EP,removeHootById:wP,updateHootApproved:IP,updateHootCommentCount:vP,updateHootFavorite:CP,updateHootPinned:AP,updateHootRehoot:DP,updateHootRejected:TP}=sc.actions,rc=sc.reducer,PP=Object.freeze(Object.defineProperty({__proto__:null,default:rc,fetchInitialHoots:SP,fetchMoreHoots:bP,refreshData:hP,rehooted:EP,removeHootById:wP,updateHootApproved:IP,updateHootCommentCount:vP,updateHootFavorite:CP,updateHootPinned:AP,updateHootRehoot:DP,updateHootRejected:TP},Symbol.toStringTag,{value:"Module"})),BP=e=>({type:"boards/pinned/hoots/request",payload:e}),kP=e=>({type:"boards/pinned/hoots/more/request",payload:e}),ei={pinnedBoardHoots:[],initialHootsFetchStatus:"idle",fetchMoreHootsStatus:"idle",shouldFetchMore:!1,error:!1,errorMessage:"",page:0,max:40,upcomingEvents:!1,freeEvents:!1},nc=j({name:"pinnedBoardHoots",initialState:ei,reducers:{reset:()=>ei,setPage:(e,t)=>({...e,page:t.payload.page}),updateHootPinned:(e,t)=>{const{pin:o,selectedHootIndex:a}=t.payload;e.pinnedBoardHoots[a].isPinned=o},updateHootRehoot:(e,t)=>{const{selectedHootIndex:o}=t.payload;e.pinnedBoardHoots[o].hootStats.rehoots+=1},updateHootFavorite:(e,t)=>
11{const{selectedHootIndex:o,favorite:a}=t.payload;e.pinnedBoardHoots[o].favPost=a,e.pinnedBoardHoots[o].hootStats.favorites+=a?1:-1},updateHootApproved:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.pinnedBoardHoots[o].requiresApproval=!1;else{const s=e.pinnedBoardHoots.findIndex(({id:r})=>r===a.id);e.pinnedBoardHoots[s].requiresApproval=!1}},updateHootRejected:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.pinnedBoardHoots.splice(o,1);else{const s=e.pinnedBoardHoots.findIndex(({id:r})=>r===a.id);e.pinnedBoardHoots.splice(s,1)}},removeHootById:(e,t)=>{const{hootId:o}=t.payload;e.pinnedBoardHoots=e.pinnedBoardHoots.filter(a=>a&&a.id!==o)},updateHootCommentCount:(e,t)=>{const{selectedHootIndex:o,selectedHoot:a}=t.payload;if(o)e.pinnedBoardHoots[o].hootStats.comments+=1;else{const s=e.pinnedBoardHoots.findIndex(({id:r})=>r===a.id);e.pinnedBoardHoots[s].hootStats.comments+=1}},rehooted:(e,t)=>{const o=e.pinnedBoardHoots.findIndex(({id:a})=>a===t.payload.id);o>-1&&(e.pinnedBoardHoots[o].hootStats.rehoots+=1)}},extraReducers:{"boards/pinned/hoots/pending":e=>({...e,initialHootsFetchStatus:"pending",pinnedBoardHoots:[]}),"boards/pinned/hoots/fulfilled":(e,t)=>t.payload.hoots&&t.payload.hoots.length?{...e,page:e.page+1,initialHootsFetchStatus:"fulfilled",pinnedBoardHoots:t.payload.hoots.map(Xe),shouldFetchMore:t.payload.hoots.length>e.max-2}:{...e,initialHootsFetchStatus:"fulfilled",pinnedBoardHoots:[],shouldFetchMore:!1},"boards/pinned/hoots/rejected":e=>({...e,initialHootsFetchStatus:"rejected",pinnedBoardHoots:[],error:!0,errorMessage:"Failed to fetch hoots"}),"boards/pinned/hoots/more/pending":e=>({...e,fetchMoreHootsStatus:"pending"}),"boards/pinned/hoots/more/fulfilled":(e,t)=>t.payload.hoots&&t.payload.hoots.length?{...e,fetchMoreHootsStatus:"fulfilled",pinnedBoardHoots:[...e.pinnedBoardHoots,...t.payload.hoots.map(Xe)],page:e.page+1,shouldFetchMore:t.payload.hoots.length>e.max-2}:{...e,page:e.page+1,fetchMoreHootsStatus:"fulfilled",shouldFetchMore:!1},"boards/pinned/hoots/more/rejected":e=>({...e,fetchMoreHootsStatus:"rejected",pinnedBoardHoots:[],error:!0,errorMessage:"Failed to fetch hoots"})}}),{rehooted:LP,removeHootById:FP,updateHootApproved:UP,updateHootCommentCount:NP,updateHootFavorite:RP,updateHootPinned:HP,updateHootRehoot:xP,updateHootRejected:MP}=nc.actions,ic=nc.reducer,OP=Object.freeze(Object.defineProperty({__proto__:null,default:ic,fetchInitialHoots:BP,fetchMoreHoots:kP,rehooted:LP,removeHootById:FP,updateHootApproved:UP,updateHootCommentCount:NP,updateHootFavorite:RP,updateHootPinned:HP,updateHootRehoot:xP,updateHootRejected:MP},Symbol.toStringTag,{value:"Module"})),Va=e=>({id:e.commentId,authorPartyId:e.commenterId,isPinned:e.pinnedComment?e.pinnedComment:!1,postedTime:e.commentTime,requiresApproval:e.approved?!1:!e.approved,...Zt.userColors[e.commenterColorCss],...jP(e),...qP(e)});function jP(e){return{commentWithHtml:e.comment,plainTextComment:e.commentPlainText}}function qP(e){return{authorPictureUrl:e.commenterImg,authorName:e.commenterName,authorInitials:e.commenterInitials}}const uo=e=>({id:e.postId,listId:e.listId,items:e.items||[],postBoards:e.postBoards,boardTagsList:e.boardTagsList,authorId:e.ownerId?e.ownerId:null,owningBoardId:e.owningBoardId?e.owningBoardId:null,requiresApproval:!e.postApproved,isScheduled:e.scheduledHoot?e.scheduledHoot:!1,isSaved:e.saved,scheduledOnDate:e.hootScheduledDate?te(new Date(e.hootScheduledDateTime),"do MMM, yyyy"):null,type:e.hootType,isPinned:e.pinnedHoot,postedTime:e.hootPostedTime,rehootAllowed:e.rehootAllowed,sourceType:e.sourceType,hootTimezone:e.hootTimezone,hootStats:e.hootCounts?e.hootCounts:{favorites:0,comments:0,rehoots:0},eventTextLocation:e.eventTextLoc?e.eventTextLoc:null,pinnedComment:e.pinnedComments?e.pinnedComments:{commentText:null,commentPlainText:null,commenterName:null},...Zt.colors[e.hootBgColor],...$P(e),...VP(e),...QP(e),...JP(e),...XP(e),...eB(e),...GP(e),...zP(e),...KP(e),...tB(e),...ZP(e),...WP(e),..._P(e),...YP(e),digFullScreenHoot:e.digFullScreenHoot,digHootTimeoutInSec:e.digHootTimeoutInSec,videoProvider:e.videoProvider||null,createdAt:e.timeStamp,postingCategory:e.postingCategory,hootBgColorClass:e.hootBgColor,customHootThemeColors:e.customHootThemeColors,calendarOnlyHo
11ot:e.calendarOnlyHoot,recurringRule:e.recurringRule,recurringEvent:e.recurringEvent,hootExpiryDate:e.hootLevelExpDate,defaultHoot:e.defaultHoot,privateHoot:e.privateHoot});function _P(e){const t={digHootTimeoutInSec:15,digFullScreenHoot:!1,disableComments:!1,isScheduled:!1,expiryDate:null,scheduledOnDate:"",excludeDigests:!1,showOnlyWhenTagsSelected:!1,favPost:!1,privateHoot:!0},{digHootTimeoutInSec:o,digFullScreenHoot:a,disableComments:s,expiryDate:r,scheduledHoot:i,hootScheduledDateTime:l,excludeDigests:d,showOnlyWhenTagsSelected:p,favPost:h,privateHoot:v}=e;return{manage:{...t,digFullScreenHoot:a,digHootTimeoutInSec:o,disableComments:s,isScheduled:i,scheduledOnDate:l?te(new Date(l),"MM/dd/yyyy hh:mm a"):"",setExpiryDate:r!=="",expiryDate:r!==""?r:null,excludeDigests:d,showOnlyWhenTagsSelected:!!p,privateHoot:v},favPost:h}}function $P(e){const{itemName:t,postName:o,showTitle:a}=e;return{title:t||o,showTitle:a||!0}}function GP(e){return e.collections&&e.collections.length?{collections:e.collections}:null}function VP(e){switch(e.hootType){case"HLVID":case"HLBLOG":case"HLLIST":return{description:e.aboutLink?e.aboutLink:null,plainTextDescription:e.aboutLink?e.aboutLink:null};default:{const{desc:t,postDesc:o,descPlainText:a,postDescPlainText:s}=e;return{description:t||o||null,plainTextDescription:a||s||null}}}}function JP(e){const t="EEE, yyyy MMM do h:mm a";let o={eventStartDateTime:null,eventEndDateTime:null,eventTimezone:null,freeEvent:!0};const a=l=>typeof l!="string"?!1:/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s/.test(l),s=l=>l?typeof l=="string"?l.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(l)?l.replace(" ","T"):`${l.replace(" ","T")}Z`:l:null,r=(l,d,p)=>{if(a(l))return l;try{const h=s(l);return h?Kl(h,d,p):null}catch(h){return console.warn("Failed to format timestamp:",l,h),null}},i=e.eventTimezone||"America/New_York";if(e.eventTimezone&&(o={...o,eventTimezone:e.eventTimezone}),e.eventStart){const l=r(e.eventStart,i,t);l&&(o={...o,eventStartDateTime:l})}if(e.eventEnd){const l=r(e.eventEnd,i,t);l&&(o={...o,eventEndDateTime:l})}return{...o,freeEvent:e.freeEvent||!1}}function zP(e){return{authorPictureUrl:e.authorPic?e.authorPic:e.ownerPhoto?e.ownerPhoto:null,authorName:e.authorName||e.ownerName,authorInitials:e.authorInitials}}function WP(e){return e.postPdfUrl&&e.hootType==="UFPDF"?{pdfUrl:e.postPdfUrl}:{pdfUrl:null}}function YP(e){return e.hootType==="UFIMG"&&e.thumbPath?{thumbnail:{url:e.thumbPath,width:e.imgWidth,height:e.imgHeight}}:{thumbnail:null}}function KP(e){switch(e.hootType){case"HLVID":case"HLBLOG":case"HLLIST":return{images:ti(e.internalImagesNew,"S"),largeImages:ti(e.internalImagesNew,"L")};case"DISC":return{images:oi(e.hootCoverImagesNew.small?e.hootCoverImagesNew:e.hootCoverImages,"S"),largeImages:oi(e.hootCoverImagesNew.large?e.hootCoverImagesNew:e.hootCoverImages,"L")};case"UFIMG":return e.photoPath?{images:[{width:e.imgWidth,height:e.imgHeight,url:e.photoPath}],largeImages:[{width:e.imgWidth,height:e.imgHeight,url:e.photoPath}]}:e.postImgUrl?{images:[{width:e.imgWidth,height:e.imgHeight,url:e.postImgUrl}],largeImages:[{width:e.imgWidth,height:e.imgHeight,url:e.postImgUrl}]}:{images:null,largeImages:null};case"UFPDF":return e.photoPath?{images:[{width:e.imgWidth,height:e.imgHeight,url:e.photoPath}],largeImages:[{width:e.imgWidth,height:e.imgHeight,url:e.photoPath}]}:e.postImgUrl?{images:[{width:e.imgWidth,height:e.imgHeight,url:e.postImgUrl}],largeImages:[{width:e.imgWidth,height:e.imgHeight,url:e.postImgUrl}]}:{images:null,largeImages:null};default:return{images:null}}}function ti(e,t){return e.small&&e.small.length&&t==="S"?[e.small[0]]:e.large&&e.large.length&&t==="L"?[e.large[0]]:null}function oi(e,t){return e&&e.small&&e.small.length&&t==="S"?e.small:e&&e.large&&e.large.length&&t==="L"?e.large:null}function QP(e){switch(e.hootType){case"HLVID":case"HLBLOG":case"HLLIST":return{userQuote:e.desc?e.desc:e.postDesc?e.postDesc:null};default:return null}}function ZP(e){return e.embedableMedia&&e.embedableMedia.length?e.embededMediaUrl&&e.embededMediaUrl.length?{mediaUrl:e.embededMediaUrl,mediaSnippet:e.embedableMedia}:{mediaUrl:null,mediaSnippet:e.embedableMedia}:e.embededMediaUrl&&e.embededMediaUrl.length?{mediaUrl:e.embededMediaUrl,mediaSnippet:null}:{mediaUrl:null,mediaSnippet:null}}function XP(e){return e.eventLoc?e.eventLocFormatdAdd?{eventLocationPlaceId:e.eventLoc,eventLocationText:e.eventLocFormatdAdd,eventLocationDetail
11s:e.eventLocationDetails||null}:{eventLocationPlaceId:e.eventLoc,eventLocationText:null,eventLocationDetails:e.eventLocationDetails||null}:{eventLocationPlaceId:null,eventLocationText:null,eventLocationDetails:null}}function eB(e){return e.twitterHandle&&e.twitterHandle.length&&e.tweetUrl&&e.tweetUrl.length?{twitterLink:e.tweetUrl,twitterHandle:e.twitterHandle}:{twitterHandle:"",twitterLink:""}}function tB(e){return e.callActionLink&&e.callActionLink.length&&e.callActionName&&e.callActionName.length?{buttonLink:e.callActionLink,buttonLabel:e.callActionName}:{buttonLink:null,buttonLabel:null}}const ma=e=>({itemValueData:e.itemValue,listIds:e.listItemMappings[e.itemValue]||[]}),HO=()=>{let e="";return window.screen.width<=500?e="Web Mobile":e="Web Desktop",e},xO=e=>{const t=He(a=>a.lists.listItemMappings);return Object.keys(t).reduce((a,s)=>{const r=t[s].map(i=>Number(i.split(":")[0]));return[...new Set(r)].includes(e)?a+1:a},0)},Rs=e=>{const t=e.items.sort((o,a)=>{if(!o.userAssignedDateTime&&!a.userAssignedDateTime)return 0;if(!o.userAssignedDateTime)return 1;if(!a.userAssignedDateTime)return-1;const s=new Date(o.userAssignedDateTime),r=new Date(a.userAssignedDateTime);return s.getTime()-r.getTime()});return e.items=t,e},MO=e=>`l/${e.listId}/${e.name.replace(/\s+/g,"_")}`,rn=e=>{if(e.hootType==="HLLIST"){const t=e.embededMediaUrl.split("?")[1];return new URLSearchParams(t).get("listToken")||""}return null},Ae={bb:Q0,mh:$1,pbh:OP,abh:PP,ch:e0},Hs=x("/hootDisplay/deleteHoot",async(e,t)=>{const{activeBoard:{boardId:o},activeHoot:{selectedHootId:a,sliceToUpdate:s}}=t.getState(),r=await c0(o,a);return(r==null?void 0:r.status)==="error"?t.rejectWithValue(r):(s?t.dispatch(Ae[s].refreshData({boardId:o})):Object.keys(Ae).forEach(i=>t.dispatch(Ae[i].refreshData({boardId:o}))),{response:r})}),xs=x("/hootDisplay/removeRehootedHoot",async(e,t)=>{const{activeBoard:{boardId:o},activeHoot:{selectedHootId:a,sliceToUpdate:s}}=t.getState(),r=await u0(o,a);return(r==null?void 0:r.status)==="error"?t.rejectWithValue(r):(s?t.dispatch(Ae[s].refreshData({boardId:o})):Object.keys(Ae).forEach(i=>t.dispatch(Ae[i].refreshData({boardId:o}))),{response:r})}),Ms=x("/hootDisplay/deleteComment",async({commentId:e},t)=>{const{activeHoot:{selectedHootId:o}}=t.getState(),a=await d0(e,o),r=(await Ma(o)).data.map(Va);return{response:a,comments:r}}),Os=x("/hootDisplay/approveComment",async({commentId:e,commentApproval:t,commentRejectMsg:o},a)=>{const{activeBoard:{boardId:s},activeHoot:{selectedHootId:r}}=a.getState(),i=await l0(s,e,{commentApproval:t,commentRejectMsg:o}),d=(await Ma(r)).data.map(Va);return{response:i,comments:d}}),js=x("/hootDisplay/getComments",async({hootId:e})=>({comments:(await Ma(e)).data.map(Va)})),qs=x("/hootDisplay/postComment",async({mentionIds:e,commentText:t,hootId:o},a)=>{const{activeBoard:{boardId:s},activeHoot:{sliceToUpdate:r,selectedHootIndex:i,selectedHoot:l}}=a.getState(),d=await i0(s,o,e,t),h=(await Ma(o)).data.map(Va);return r?a.dispatch(Ae[r].updateHootCommentCount({selectedHoot:l,selectedHootIndex:i,commentCount:h.length})):Object.keys(Ae).forEach(v=>a.dispatch(Ae[v].updateHootCommentCount({selectedHoot:l,selectedHootIndex:i,commentCount:h.length}))),{response:d,comments:h}}),_s=x("/hootDisplay/processHootApprovalRequest",async({postApproval:e},t)=>{const{activeBoard:{boardId:o},activeHoot:{selectedHootId:a,selectedHoot:s,selectedHootIndex:r}}=t.getState(),i=await pl(o,a,e);return i.postApprovalStatus?(t.dispatch(Xl({selectedHoot:s,selectedHootIndex:r})),{response:i}):{response:i}}),$s=x("/hootDisplay/rejectHootApproval",async(e,t)=>{const{activeBoard:{boardId:o},activeHoot:{selectedHootId:a,hootRejectionMessage:s}}=t.getState(),r=await pl(o,a,"remove",s);return r.postApprovalStatus?(t.dispatch(Io({boardId:o})),{response:r}):{response:r}}),Gs=x("/hootDisplay/fetchHoot",async({hootId:e,index:t},o)=>{const{activeBoard:{boardId:a}}=o.getState(),s=await Ur(a||0,e),r=rn(s.data);if(r){const i=await $a(r);if(!i)throw new Error;if(!i.success)throw new Error(i.errorMessage);if(i.error)throw new Error(i.errorMessage);return{hoot:uo({...s.data,listId:i.data.listId,items:i.data.items}),index:t}}return{hoot:uo(s.data),index:t}}),Vs=x("/hootDisplay/pinHootChanged",async({pin:e,hootId:t},o)=>{const{activeBoard:{boardId:a},activeHoot:{selectedHootIndex:s,sliceToUpdate:r}}=o.getState(),i=await o0(a,t,e);return r&&Ae[r]&&(o.dispatch(Ae[r].updateHootPinned({pin:e,hootId:t,selectedHootIndex:s})),o.dispatch(Ae[r].refreshData())),{response:i}}),Js=x("/hootDisplay/favoriteHootChanged",async({hootId:e,favorite:t},o)=>{const{activeBoard:{boardId:a},activeHoot:{sliceToUpdate:s,selectedHootIndex:r}}=o.getState();s&&Ae[s]&&o.dispatch(Ae[s].updateHootFavorite({selectedHootIndex:r,favorite:t}));let i;return t?i=await qr(a,e):i=await _r(a,e),{response:i}}),zs=x("/hootDisplay/hootVisibilityChanged",async({hootId:e,visibility:t},o)=>{const{activeBoard:{boardId:a},activeHoot:{sliceToUpdate:s}}=o.getState(),r=await a0(a,e,t);s?o.dispatch(Ae[s].refreshData({boardId:a})):Object.keys(Ae).forEach(d=>
11o.dispatch(Ae[d].refreshData({boardId:a})));const i=await Ur(a||0,e),l=rn(i.data);if(l){const d=await $a(l);if(!d)throw new Error;if(!d.success)throw new Error(d.errorMessage);if(d.error)throw new Error(d.errorMessage);return{response:r,hoot:uo({...i.data,items:d.data.items,listId:d.data.listId})}}return{response:r,hoot:uo(i.data)}}),Ws=x("/hootDisplay/hootCollectionAdded",async({hootId:e,collection:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await r0(a,e,t)}}),Ys=x("/hootDisplay/hootCollectionRemoved",async({hootId:e,collection:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await n0(a,e,t)}}),Ks=x("/hootDisplay/hootExpiryDateUpdated",async({hootId:e,expiryDate:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await Yl(a,e,t||"")}}),Qs=x("/hootDisplay/hootSetExpiryDateUpdated",async({hootId:e,setExpiryDate:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();if(!t)return{response:await Yl(a,e)}}),Zs=x("/hootDisplay/rescheduleHoot",async({hootId:e,isScheduled:t,scheduledOnDate:o},a)=>{const{activeBoard:{boardId:s},activeHoot:{selectedHoot:r,sliceToUpdate:i}}=a.getState(),{hootTimezone:l}=r||{},d=async p=>{const h=await s0(s,e,p,l);return a.dispatch(Ae[i].refreshData({boardId:s})),{response:h}};if(t){if(o)return d(o)}else return d("")}),Xs=x("/hootDisplay/hootUpdateDigitalSignageSettings",async({hootId:e,config:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await Oa(a,{postId:e,...t})}}),er=x("/hootDisplay/hootDisableCommentsUpdated",async({hootId:e,disableComments:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await Oa(a,{postId:e,disableComments:t})}}),tr=x("/hootDisplay/hootExcludeFromNewsLetterUpdated",async({hootId:e,excludeDigests:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await Oa(a,{postId:e,excludeDigests:t})}}),or=x("/hootDisplay/hootShowOnlyWhenTagsSelectedUpdated",async({hootId:e,showOnlyWhenTagsSelected:t},o)=>{const{activeBoard:{boardId:a}}=o.getState();return{response:await Oa(a,{postId:e,showOnlyWhenTagsSelected:t})}}),ar=x("/hootDisplay/showHootDisplay",async({hootId:e,index:t,hoots:o,sliceToUpdate:a,boardId:s,ignoreBoardId:r},i)=>{const{activeBoard:l}=i.getState(),d=r?0:s||(l.boardId?l.boardId:0),p=await Ur(d,e),h=rn(p.data);if(h){const v=await $a(h);if(v.status!=="error")return{hoot:uo({...p.data,items:v.data.items,listId:v.data.listId}),index:t,hoots:o,sliceToUpdate:a}}return{hoot:uo(p.data),index:t,hoots:o,sliceToUpdate:a}}),lc=j({name:"hootDisplay",initialState:{isHootRestricted:!1,isLoading:!0,showRetweetModal:!1,hoots:[],boardCollections:[],selectedHootId:null,selectedHootIndex:-1,selectedHoot:null,customPlatformHoot:null,isShowingMobileManageHoot:!1,sliceToUpdate:null,isHootModalVisible:!1,hootApprovalStatus:null,hootRejectionStatus:null,deleteHootStatus:null,postCommentStatus:null,loadCommentsStatus:null,refreshCommentsStatus:null,commentApprovalStatus:{},commentRejectionStatus:{},deleteComments:{},comments:[],hootUpdateStatus:"idle",hootRejectionMessage:"",isHootRejectMessageDialogVisible:!1,isHootNotAvailable:!1},reducers:{closeHootDisplay:e=>{e.selectedHoot=null,e.customPlatformHoot=null,e.selectedHootId=null,e.selectedHootIndex=-1,e.hoots=[],e.showRetweetModal=!1,e.sliceToUpdate=null,e.hootApprovalStatus=null,e.hootRejectionStatus=null,e.postCommentStatus=null,e.comments=[],e.loadCommentsStatus=null,e.refreshCommentsStatus=null,e.deleteComments={},e.deleteHootStatus=null,e.commentApprovalStatus={},e.commentRejectionStatus={},e.isShowingMobileManageHoot=!1},showMobileManageHoot:e=>{e.isShowingMobileManageHoot=!0},setHootRejectMessageDialog:(e,t)=>
11{e.isHootRejectMessageDialogVisible=!!t.payload},setHootRejectMessage:(e,t)=>{e.hootRejectionMessage=t.payload},hideMobileManageHoot:e=>{e.isShowingMobileManageHoot=!1},resetApprovalStatus:e=>{e.hootApprovalStatus=null,e.hootRejectionStatus=null},rehooted:(e,t)=>{e.selectedHoot&&e.selectedHootId===t.payload.id&&(e.selectedHoot.hootStats.rehoots+=1)},updateSelectedHootItems:(e,t)=>{const{itemValue:o,listId:a}=t.payload;if(a===e.selectedHoot.listId){const s=e.selectedHoot.items.filter(r=>+r.itemValue!==o);e.selectedHoot={...e.selectedHoot,items:s}}},getHootForCustomPlatform:(e,t)=>{e.customPlatformHoot=t.payload}},extraReducers:{[Ms.fulfilled]:(e,t)=>{const{commentId:o}=t.meta.arg,{comments:a}=t.payload;e.comments=a,e.deleteComments[o]="fulfilled"},[Ms.pending]:(e,t)=>{const{commentId:o}=t.meta.arg;e.deleteComments[o]="pending"},[Ms.rejected]:(e,t)=>{const{commentId:o}=t.meta.arg;e.deleteComments[o]="rejected"},[js.fulfilled]:(e,t)=>{const{comments:o}=t.payload,{refresh:a}=t.meta.arg;e.comments=o,a?e.refreshCommentsStatus="fulfilled":e.loadCommentsStatus="fulfilled"},[js.pending]:(e,t)=>{const{refresh:o}=t.meta.arg;o?e.refreshCommentsStatus="pending":e.loadCommentsStatus="pending"},[js.rejected]:(e,t)=>{const{refresh:o}=t.meta.arg;o?e.refreshCommentsStatus="rejected":e.loadCommentsStatus="rejected"},[Gs.fulfilled]:(e,t)=>{const{hoot:o}=t.payload;e.selectedHootId===o.id&&(e.selectedHoot=o)},[Gs.pending]:(e,t)=>{const{hootId:o,index:a}=t.meta.arg;e.selectedHoot=null,e.selectedHootId=o,e.selectedHootIndex=a},[Gs.rejected]:e=>{e.selectedHoot=null,e.selectedHootId=null,e.selectedHootIndex=-1,e.hoots=[],e.showRetweetModal=!1,e.sliceToUpdate=null},[Vs.fulfilled]:(e,t)=>{const{response:o}=t.payload,{pin:a}=t.meta.arg;o.pinHootStatus!==a&&(e.selectedHoot.isPinned=o.pinHootStatus)},[Vs.pending]:(e,t)=>{const{pin:o}=t.meta.arg;e.selectedHoot.isPinned=o},[Vs.rejected]:(e,t)=>{const{pin:o}=t.meta.arg;e.selectedHoot.isPinned=!o},[Js.fulfilled]:(e,t)=>{const{response:o}=t.payload,{favorite:a}=t.meta.arg;o.success||e.selectedHoot&&(e.selectedHoot.favPost=!a,e.selectedHoot.hootStats.favorites+=a?-1:1)},[Js.pending]:(e,t)=>{const{favorite:o}=t.meta.arg;e.selectedHoot&&(e.selectedHoot.favPost=o,e.selectedHoot.hootStats.favorites+=o?1:-1)},[Js.rejected]:(e,t)=>{const{favorite:o}=t.meta.arg;e.selectedHoot&&(e.selectedHoot.favPost=!o,e.selectedHoot.hootStats.favorites+=o?-1:1)},[zs.fulfilled]:(e,t)=>{var r;const{response:o,hoot:a}=t.payload,{visibility:s}=t.meta.arg;if(e.hootUpdateStatus="fulfilled",e.selectedHoot=a,!o.postApprovalStatus&&((r=e.selectedHoot)!=null&&r.manage)){const i=s==="public";e.selectedHoot.manage.privateHoot=i}},[zs.pending]:(e,t)=>{var s;const{visibility:o}=t.meta.arg,a=o!=="public";e.hootUpdateStatus="pending",(s=e.selectedHoot)!=null&&s.manage&&(e.selectedHoot.manage.privateHoot=a)},[zs.rejected]:(e,t)=>{var s;const{visibility:o}=t.meta.arg,a=o==="public";e.hootUpdateStatus="rejected",(s=e.selectedHoot)!=null&&s.manage&&(e.selectedHoot.manage.privateHoot=a)},[Ws.fulfilled]:(e,t)=>{const{response:o}=t.payload,{collection:a}=t.meta.arg;if(o.status==="error"){const s=e.selectedHoot.boardTagsList.findIndex(r=>r===a);e.selectedHoot.boardTagsList.splice(s,1)}},[Ws.pending]:(e,t)=>{const{collection:o}=t.meta.arg;e.selectedHoot.boardTagsList.push(o)},[Ws.rejected]:(e,t)=>{const{collection:o}=t.meta.arg,a=e.selectedHoot.boardTagsList.findIndex(s=>s===o);e.selectedHoot.boardTagsList.splice(a,1)},[Ys.fulfilled]:(e,t)=>{const{response:o}=t.payload,{collection:a,currIndex:s}=t.meta.arg;o.status==="error"&&e.selectedHoot.boardTagsList.splice(s,0,a)},[Ys.pending]:(e,t)=>{const{currIndex:o}=t.meta.arg;e.selectedHoot.boardTagsList.splice(o,1)},[Ys.rejected]:(e,t)=>{const{collection:o,currIndex:a}=t.meta.arg;e.selectedHoot.boardTagsList.splice(a,0,o)},[Qs.fulfilled]:e=>{var t;(t=e.selectedHoot)!=null&&t.manage&&(e.selectedHoot.manage.expiryDate=null)},[Qs.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{setExpiryDate:o}=t.meta.arg;e.selectedHoot.manage.setExpiryDate=o},[Qs.rejected]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{setExpiryDate:o}=t.meta.arg;e.selectedHoot.manage.setExpiryDate=!o},[Zs.fulfilled]:()=>{},[Zs.pending]:(e,t)=>{if(!e.selectedHoot)return;const{isScheduled:o,scheduledOnDate:a}=t.meta.arg;o&&(e.selectedHoot.scheduledOnDate=te(new Date(a),"do MMM, yyyy"),e.selectedHoot.manage&&(e.selectedHoot.manage.scheduledOnDate=a)),e.selectedHoot.isScheduled=o,e.selectedHoot.manage&&(e.selectedHoot.manage.isScheduled=o)},[Zs.rejected]:(e,t)=>{if(!e.selectedHoot)return;const{isScheduledPrev:o,scheduledOnDatePrev:a}=t.meta.arg;e.selectedHoot.scheduledOnDate=a,e.selectedHoot.isScheduled=o,e.selectedHoot.manage&&(e.selectedHoot.manage.scheduledOnDate=a,e.selectedHoot.manage.isScheduled=o)},[Ks.fulfilled]:()=>{},[Ks.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{expiryDate:o}=t.meta.arg;e.selectedHoot.manage.expiryDate=o||null},[Ks.rejected]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{prevDate:o}=t.meta.arg;e.selectedHoot.manage.expiryDate=o},[er.fulfilled]:()=>{},[er.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{disableComments:o}=t.meta.arg;e.selectedHoot.manage.disableComments=o},[er.rejected]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{disableComments:o}=t.meta.arg;e.selectedHoot.manage.disableComments=!o},[Xs.fulfilled]:()=>{},[Xs.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{config:o}=t.meta.arg;e.selectedHoot.manageCopy={...e.selectedHoot.manage},e.selectedHoot.manage={...e.selectedHoot.manage,...o}},[Xs.rejected]:e=>{e.selectedHoot&&(e.selectedHoot.manage=e.selectedHoot.manageCopy)},[tr.fulfilled]:()=>{},[tr.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{excludeDigests:o}=t.meta.arg;e.selectedHoot.manage.excludeDigests=o},[tr.rejected]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{disableComments:o}=t.meta.arg;e.selectedHoot.manage.disableComments=!o},[or.fulfilled]:()=>{},[or.pending]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{showOnlyWhenTagsSelected:o}=t.meta.arg;e.selectedHoot.manage.showOnlyWhenTagsSelected=o},[or.rejected]:(e,t)=>{var a;if(!((a=e.selectedHoot)!=null&&a.manage))return;const{showOnlyWhenTagsSelected:o}=t.meta.arg;e.selectedHoot.manage.showOnlyWhenTagsSelected=!o},[ar.fulfilled]:(e,t)=>{const{hoots:o,hoot:a,index:s,sliceToUpdate:r}=t.payload;e.isHootRestricted=a.privateHoot,e.selectedHootId===a.id&&(e.hoots=o,e.selectedHoot=a,e.selectedHootIndex=s,e.selectedHootId=a.id,e.sliceToUpdate=r,e.isLoading=!1,e.isHootModalVisible=!0)},[ar.pending]:(e,t)=>{const{hootId:o,index:a,hoots:s}=t.meta.arg;e.isHootRestricted=!1,e.selectedHootId=o,e.selectedHootIndex=a,e.hoots=s,e.hootApprovalStatus=null,e.hootRejectionStatus=null,e.postCommentStatus=null,e.comments=[],e.loadCommentsStatus=null,e.refreshCommentsStatus=null,e.deleteComments={},e.deleteHootStatus=null,e.commentApprovalStatus={},e.commentRejectionStatus={},e.isHootNotAvailable=!1},[ar.rejected]:e=>{e.isHootNotAvailable=!0},[_s.fulfilled]:(e,t)=>{const{postApprovalStatus:o}=t.payload.response;if(!o){e.hootApprovalStatus="rejected";return}if(!e.selectedHoot)return;const{postApproval:a}=t.meta.arg||{},s=a!=="public";e.selectedHoot.manage&&(e.selectedHoot.manage.privateHoot=s),e.selectedHoot.privateHoot=s,e.selectedHoot.requiresApproval=!1,e.hootApprovalStatus="fulfilled"},[_s.pending]:e=>{e.hootApprovalStatus="pending"},[_s.rejected]:e=>{e.hootApprovalStatus="rejected"},[$s.fulfilled]:(e,t)=>{const{postApprovalStatus:o}=t.payload.response;if(!o){e.hootRejectionStatus="rejected";return}e.selectedHoot=null,e.selectedHootId=null,e.selectedHootIndex=-1,e.hoots=[],e.showRetweetModal=!1,e.sliceToUpdate=null,e.hootRejectionMessage="",e.hootRejectionStatus="fulfilled"},[$s.pending]:e=>{e.hootRejectionStatus="pending"},[$s.rejected]:e=>{e.hootRejectionStatus="rejected"},[qs.fulfilled]:(e,t)=>{const{comments:o}=t.payload;e.postCommentStatus="fulfilled",e.comments=o},[qs.pending]:e=>{e.postCommentStatus="pending"},[qs.rejected]:e=>{e.postCommentStatus="rejected"},[Hs.fulfilled]:e=>{e.deleteHootStatus="fulfilled"},[Hs.pending]:e=>{e.deleteHootStatus="pending"},[Hs.rejected]:e=>{e.deleteHootStatus="rejected"},[xs.fulfilled]:e=>{e.deleteHootStatus="fulfilled"},[xs.pending]:e=>{e.deleteHootStatus="pending"},[xs.rejected]:e=>{e.deleteHootStatus="rejected"},[Os.fulfilled]:(e,t)=>{const{commentId:o,commentApproval:a}=t.meta.arg,{comments:s}=t.payload;e.comments=s,a==="remove"?e.commentRejectionStatus[o]="fulfilled":e.commentApprovalStatus[o]="fulfilled"},[Os.pending]:(e,t)=>{const{commentId:o,commentApproval:a}=t.meta.arg;a==="remove"?e.commentRejectionStatus[o]="pending":e.commentApprovalStatus[o]="pending"},[Os.rejected]:(e,t)=>{const{commentId:o,commentApproval:a}=t.meta.arg;a==="remove"?e.commentRejectionStatus[o]="rejected":e.commentApprovalStatus[o]="rejected"},"saved/hoots/unsave/request":e=>{e.selectedHoot&&(e.selectedHoot.isSaved=!1)},"saved/hoots/saveLocal/request":e=>{e.selectedHoot&&(e.selectedHoot.isSaved=!0)}}}),{closeHootDisplay:OO,showMobileManageHoot:jO,hideMobileManageHoot:qO,resetApprovalStatus:_O,setHootRejectMessageDialog:$O,setHootRejectMessage:GO,rehooted:oB,updateSelectedHootItems:VO,getHootForCustomPlatform:JO}=lc.actions,aB=lc.reducer,sr=e=>{var h,v,A,w,N,H,Q,Y,E,y,g,D,F,J,q,K,he,ge,Re,we,b,k,M,oe,le,X,Oe,Ie,Dt,Ho,xo,Mo,Oo,jo,qo,_o,$o,Go,Vo,Jo,zo,Wo,Yo,Ko,Qo;const t=(e==null?void 0:e.object)==="experience",o={USD:"$"},a=e==null?void 0:e.currency,s=t?[{url:e.thumbnail}]:e.object==="board"?[{url:Xi({longitude:e.location.longitude,latitude:e.location.latitude})}]:(e==null?void 0:e.media)||(e==null?void 0:e.images)||[{url:(e==null?void 0:e.logoUrl)||(e==null?void 0:e.backgroundImageUrl)}],r=((h=e==null?void 0:e.categories)==null?void 0:h.split(","))||((v=e==null?void 0:e.tags)==null?void 0:v.split(","))||(e==null?void 0:e.collections);let i=(e==null?void 0:e.localizedInfo)||null;(e!=null&&e.locationInfo||e!=null&&e.location)&&(i={formattedAddress:((A=e==null?void 0:e.locationInfo)==null?void 0:A.formattedAddress)||((w=e==null?void 0:e.location)==null?void 0:w.formattedAddress),geometry:{latitude:((N=e==null?void 0:e.locationInfo)==null?void 0:N.geometry.latitude)||((H=e==null?void 0:e.location)==null?void 0:H.latitude),longitude:((Q=e==null?void 0:e.locationInfo)==null?void 0:Q.geometry.longitude)||((Y=e==null?void 0:e.location)==null?void 0:Y.longitude)},googlePlaceId:((E=e==null?void 0:e.locationInfo)==null?void 0:E.googlePlaceId)||((y=e==null?void 0:e.location)==null?void 0:y.googlePlaceId),boardLocation:`https://stagecityguide.hootboard.com/category/1?activePlaceId=${((g=e==null?void 0:e.locationInfo)==null?void 0:g.googlePlaceId)||((D=e==null?void 0:e.location)==null?void 0:D.googlePlaceId)}&boardId=${e==null?void 0:e.id}`});const l=xi+`/category/1?activePlaceId=${((F=e==null?void 0:e.locationInfo)==null?void 0:F.googlePlaceId)||((J=e==null?void 0:e.location)==null?void 0:J.googlePlaceId)}&boardId=${e==null?void 0:e.id}`,d=Mi+`/tour/${e.productId}?boardId=${e.boardId}`,p=re=>{var $t,tt;return(re==null?void 0:re.type)=="HLLIST"?{buttonLabel:null,buttonLink:null}:(re==null?void 0:re.object)=="board"||t?{buttonLabel:"Show Details",buttonLink:t?d:l}:{buttonLabel:($t=re==null?void 0:re.button)==null?void 0:$t.label,buttonLink:(tt=re==null?void 0:re.button)==null?void 0:tt.link}};return{id:(e==null?void 0:e.id)||e.productId,url:t?e==null?void 0:e.thumbnail:e.object==="board"?l:e==null?void 0:e.url,boardTagsList:r,authorId:(q=e==null?void 0:e.authorInfo)==null?void 0:q.id,owningBoardId:(e==null?void 0:e.owningBoardId)||e.boardId,type:e==null?void 0:e.type,objectType:e==null?void 0:e.object,isPinned:e==null?void 0:e.isPinned,isSaved:e==null?void 0:e.isSaved,isDemo:e==null?void 0:e.isDemo,locationInfo:i,rehootAllowed:!0,sourceType:e==null?void 0:e.sourceTypeCode,hootStats:{favorites:(K=e==null?void 0:e.stats)==null?void 0:K.favCount,comments:(he=e==null?void 0:e.stats)==null?void 0:he.commentsCount,rehoots:(ge=e==null?void 0:e.stats)==null?void 0:ge.rehootCount},eventTextLocation:(Re=e==null?void 0:e.eventInfo)==null?void 0:Re.eventTextLoc,pinnedComment:{commentText:null,commentPlainText:null,commenterName:null},background:t&&"#020817"||((we=e==null?void 0:e.colorInfo)==null?void 0:we.background)||((k=(b=e==null?void 0:e.customColors)==null?void 0:b.board)==null?void 0:k.button)||"white",font:((M=e==null?void 0:e.colorInfo)==null?void 0:M.font)||(Di(((le=(oe=e==null?void 0:e.customColors)==null?void 0:oe.board)==null?void 0:le.button)||"")?"#ffffff"
11:"#000000")||"black",title:(e==null?void 0:e.title)||(e==null?void 0:e.name),showTitle:!0,description:t?e==null?void 0:e.category:e==null?void 0:e.description,plainTextDescription:t?e==null?void 0:e.category:e==null?void 0:e.descriptionPlainText,price:`${o[a]} ${Math.round(e.price)}`,eventLocationPlaceId:((X=e==null?void 0:e.eventInfo)==null?void 0:X.eventLocPlaceId)||((Oe=e==null?void 0:e.location)==null?void 0:Oe.googlePlaceId),eventLocationText:((Ie=e==null?void 0:e.eventInfo)==null?void 0:Ie.eventTextLoc)||((Dt=e==null?void 0:e.location)==null?void 0:Dt.formattedAddress),twitterHandle:(Ho=e==null?void 0:e.twitterInfo)==null?void 0:Ho.twitterHandle,twitterLink:(xo=e==null?void 0:e.twitterInfo)==null?void 0:xo.tweetUrl,collections:r,authorPictureUrl:(Mo=e==null?void 0:e.authorInfo)==null?void 0:Mo.imageUrl,authorName:((Oo=e==null?void 0:e.authorInfo)==null?void 0:Oo.firstName)+" "+((jo=e==null?void 0:e.authorInfo)==null?void 0:jo.lastName),authorInitials:(qo=e==null?void 0:e.authorInfo)==null?void 0:qo.initials,largeImages:[{id:null,width:(_o=s[0])==null?void 0:_o.width,url:($o=s[0])==null?void 0:$o.url,height:(Go=s[0])==null?void 0:Go.height}],images:[{id:null,width:(Vo=s[0])==null?void 0:Vo.width,url:(Jo=s[0])==null?void 0:Jo.url,height:(zo=s[0])==null?void 0:zo.height}],backgroundImageUrl:e==null?void 0:e.backgroundImageUrl,...p(e),mediaUrl:(Wo=e==null?void 0:e.embedMediaInfo)==null?void 0:Wo.url,mediaSnippet:(Yo=e==null?void 0:e.embedMediaInfo)==null?void 0:Yo.html,pdfUrl:e!=null&&e.fileInfo&&((Ko=e==null?void 0:e.fileInfo)==null?void 0:Ko.type)==="UFPDF"?(Qo=e==null?void 0:e.fileInfo)==null?void 0:Qo.url:null,manage:{expiryDate:null,favPost:!1,privateHoot:!1,setExpiryDate:!0},postingCategory:e==null?void 0:e.majorCategoryCode,hootBgColorClass:e==null?void 0:e.hootBgColor,customHootThemeColors:e==null?void 0:e.customHootThemeColors,favPost:!1,requiresApproval:!1,isScheduled:!1,postBoards:null,scheduledOnDate:null,recurringRule:null,postedTime:e!=null&&e.createdAt?Dr(typeof e.createdAt=="string"&&!e.createdAt.endsWith("Z")?Pe(`${e.createdAt.replace(" ","T")}Z`):new Date(e.createdAt),{addSuffix:!0}):"",experienceTiming:e.durationTiming,...(re=>{const $t="EEE, yyyy MMM do h:mm a";let tt={eventStartDateTime:"",eventEndDateTime:"",eventTimezone:"",freeEvent:!1};const Zo=Fe=>Fe?typeof Fe=="string"?Fe.endsWith("Z")||/[+-]\d{2}:\d{2}$/.test(Fe)?Pe(Fe.replace(" ","T")):Pe(`${Fe.replace(" ","T")}Z`):new Date(Fe):null,Xo=(re==null?void 0:re.eventTimezone)||"America/New_York";if(re!=null&&re.eventStartDateTime){const Fe=Zo(re.eventStartDateTime);Fe&&(tt={...tt,eventTimezone:re.eventTimezone||"",eventStartDateTime:_e(Fe,Xo,$t)})}if(re!=null&&re.eventEndDateTime){const Fe=Zo(re.eventEndDateTime);Fe&&(tt={...tt,eventEndDateTime:_e(Fe,Xo,$t)})}return{...tt,freeEvent:(re==null?void 0:re.freeEvent)||!1}})(e==null?void 0:e.eventInfo)}},zO=R(T.createNewList+u.REQUEST),WO=R(T.getAllLists+u.REQUEST),YO=R(T.getList+u.REQUEST),KO=R(T.getListById+u.REQUEST),QO=R(T.saveList+u.REQUEST),ZO=R(T.addItemToList+u.REQUEST),XO=R(T.removeItemFromList+u.REQUEST),ej=R(T.updateUserAssignedData+u.REQUEST),tj=R(T.updateList+u.REQUEST),oj=R(T.deleteList+u.REQUEST),aj=R(T.getShareToken+u.REQUEST),sj=R(T.getListByToken+u.REQUEST),sB={isMapOpen:!1,selectedMapItemId:0,listItemMappings:{},availableLists:[],isCreateListModalVisible:!1,listCreatedState:f.IDLE,listCreatedError:"",getListState:f.IDLE,getListError:"",getListByIdState:f.IDLE,getListByIdError:"",currentList:{},isSaveListButtonClicked:!1,saveListState:f.IDLE,saveListError:"",getListsState:f.IDLE,getListsError:"",addToListState:f.IDLE,addToListError:"",removeFromListState:f.IDLE,removeFromListError:"",activeListItemId:0,userAssignedDataState:f.IDLE,userAssignedDataError:"",updateListDetailsState:f.IDLE,updateListDetailsError:"",deleteListState:f.IDLE,deleteListError:"",isListCardClicked:!1,isEditListModalClicked:!1,isDeleteListButtonClicked:!1,isInfoPageActive:!1,isMapDataAvailable:!1,isSeeMoreButtonClicked:!1,activeDropdownListId:0,activeListCardIndex:0,savedListUid:"",getShareTokenState:f.IDLE,getShareToken:"",getListByTokenState:f.IDLE,getListByTokenError:""},dc=j({name:"lists",initialState:sB,reducers:{toggleMapView:(e,t)=>{const o=!!t.payload;e.isMapOpen=o,o||(e.selectedMapItemId=0)},setSelectedMapItemId:(e,t)=>{e.selectedMapItemId=t.payload},toggleCreateListModal:e=>{e.isCreateListModalVisible=!e.isCreateListModalVisible},toggleListTimelinePage:e=>{e.isListCardClicked=!e.isListCardClicked},toggleEditListModal:e=>{e.isEditListModalClicked=!e.isEditListModalClicked,e.updateListDetailsState=f.IDLE},toggleDeleteListModal:e=>{e.isDeleteListButtonClicked=!e.isDeleteListButtonClicked,e.deleteListState=f.IDLE},updateActiveListItemId:(e,t)=>{e.activeListItemId=t.payload},updateSaveListButtonClick:(e,t)=>{e.isSaveListButtonClicked=t.payload},resetSaveListState:e=>{e.saveListState=f.IDLE},toggleInfoPageActive:e=>{e.isInfoPageActive=!e.isInfoPageActive},resetAddToListState:e=>{e.addToListState=f.IDLE},updateActiveDropdownListId:(e,t)=>{e.activeDropdownListId=t.payload},updateSavedListUid:(e,t)=>{e.savedListUid=t.payload},updateActiveListCardIndex:(e,t)=>{e.activeListCardIndex=t.payload},updateSeeMoreButtonClick:(e,t)=>{e.isSeeMoreButtonClicked=t.payload},resetMyListPage:e=>{e.activeListCardIndex=0,e.isEditListModalClicked=!1,e.isDeleteListButtonClicked=!1,e.isListCardClicked=!1,e.isSeeMoreButtonClicked=!1},resetShareToken:e=>{e.getShareTokenState=f.IDLE,e.getShareToken=""},resetCreateList:e=>{e.listCreatedState=f.IDLE,e.listCreatedError=""}},extraReducers(e){e.addCase(T.createNewList+u.REQUEST,(t,o)=>{const{listData:a,tempId:s}=o.payload;t.availableLists=[{...a,listId:s},...t.availableLists],t.listCreatedError=""}),e.addCase(T.createNewList+u.PENDING,t=>{t.listCreatedState=f.PENDING,t.listCreatedError=""}),e.addCase(T.createNewList+u.FULFILLED,(t,o)=>{t.listCreatedState=f.FULFILLED,t.listCreatedError="";const a=o.payload.listData,s=o.payload.data;t.availableLists=t.availableLists.map(r=>(r.listId===a.tempId&&(r.listId=s),r))}),e.addCase(T.createNewList+u.REJECTED,(t,o)=>{const a=o.payload.data;t.availableLists=t.availableLists.filter(s=>s.listId!==a.tempId),t.listCreatedState=f.REJECTED,t.listCreatedError=o.payload.message}),e.addCase(T.getAllLists+u.PENDING,t=>{t.getListsState=f.PENDING,t.getListsError=""}),e.addCase(T.getAllLists+u.FULFILLED,(t,o)=>{t.listItemMappings={},t.availableLists=o.payload.map(a=>{for(const s of a.items){const{itemValueData:r,listIds:i}=ma({listItemMappings:t.listItemMappings,itemValue:s.itemValue});t.listItemMappings[r]=[...i,`${a.listId}:${s.itemId}`]}return{...a,items:a.items}}).sort((a,s)=>(s.listId||0)-(a.listId||0)),t.getListsState=f.FULFILLED,t.getListsError=""}),e.addCase(T.getAllLists+u.REJECTED,(t,o)=>{t.getListsState=f.REJECTED,t.getListsError=o.payload}),e.addCase(T.addItemToList+u.REQUEST,(t,o)=>{const{listId:a,data:s}=o.payload,{itemValueData:r,listIds:i}=ma({itemValue:s.itemValue,listItemMappings:t.listItemMappings});t.listItemMappings[r]=[...i,`${a}:`]}),e.addCase(T.addItemToList+u.PENDING,t=>{t.addToListState=f.PENDING,t.addToListError=""}),e.addCase(T.addItemToList+u.FULFILLED,(t,o)=>{const a=o.payload.item,s=o.payload.itemIds[0],{itemValueData:r,listIds:i}=ma({itemValue:a.data.itemValue,listItemMappings:t.listItemMappings});t.listItemMappings[r]=i.map(l=>l.includes(`${a.listId}:`)?`${a.listId}:${s}`:l),t.addToListState=f.FULFILLED,t.addToListError=""}),e.addCase(T.addItemToList+u.REJECTED,(t,o)=>{t.addToListState=f.REJECTED,t.addToListError=o.payload}),e.addCase(T.removeItemFromList+u.REQUEST,(t,o)=>{const{listId:a,itemValue:s}=o.payload,{itemValueData:r,listIds:i}=ma({itemValue:s,listItemMappings:t.listItemMappings});t.listItemMappings[r]=i.filter(l=>!l.includes(`${a}:`))}),e.addCase(T.removeItemFromList+u.PENDING,t=>{t.removeFromListState=f.PENDING,t.removeFromListError=""}),e.addCase(T.removeItemFromList+u.FULFILLED,(t,o)=>{var a;if(t.listItemMappings[o.payload.itemValue]=t.listItemMappings[o.payload.itemValue].filter(s=>s!==o.payload.listId.toString()),o.payload.listId===t.currentList.listId){const s=t.currentList.items.filter(l=>l.itemId===o.payload.itemId),r=t.currentList.items.filter(l=>l.itemAddedOnBoardId===s[0].itemAddedOnBoardId);if(r.length===1){const l=(a=t.currentList.listBoards)==null?void 0:a.filter(d=>d.id!==parseInt(r[0].itemAddedOnBoardId));t.currentList.listBoards=l,t.availableLists.map(d=>{d.listId===o.payload.listId&&(d.listBoards=l)})}const i=t.currentList.items.filter(l=>o.payload.itemId!==l.itemId);t.currentList.items=i}t.removeFromListState=f.FULFILLED,t.removeFromListError=""}),e.addCase(T.removeItemFromList+u.REJECTED,(t,o)=>{t.removeFromListState=f.REJECTED,t.removeFromListError=o.payload}),e.addCase(T.getList+u.PENDING,t=>{t.getListState=f.PENDING,t.getListError="",t.isMapDataAvailable=!1}),e.addCase(T.getList+u.FULFILLED,(t,o)=>{t.getListState=f.FULFILLED,t.getListError="";const a=o.payload.items.filter(i=>{if(i.itemData!==null)return i}),r=a.map(i=>i.itemData).map(i=>sr(i));for(let i=0;i<a.length;i++)a[i].itemData=r[i];t.currentList={...o.payload,items:a},t.isMapDataAvailable=o.payload.items.some(i=>{var l;return((l=i.itemData)==null?void 0:l.locationInfo)!==null})}),e.addCase(T.getList+u.REJECTED,(t,o)=>{t.getListState=f.REJECTED,t.getListError=o.payload}),e.addCase(T.getListById+u.PENDING,t=>{t.getListByIdState=f.PENDING,t.getListByIdError="",t.isMapDataAvailable=!1}),e.addCase(T.getListById+u.FULFILLED,(t,o)=>{t.getListByIdState=f.FULFILLED,t.getListByIdError="";const a=o.payload.items.filter(i=>{if(i.itemData!==null)return i}),r=a.map(i=>({...i.itemData,boardId:(i==null?void 0:i.itemAddedOnBoardId)||0}
11)).map(sr);for(let i=0;i<a.length;i++)a[i].itemData=r[i];t.currentList={...o.payload,items:a.reverse()},t.currentList=Rs(t.currentList),t.isMapDataAvailable=o.payload.items.some(i=>{var l;return((l=i.itemData)==null?void 0:l.locationInfo)!==null})}),e.addCase(T.getListById+u.REJECTED,(t,o)=>{t.getListByIdState=f.REJECTED,t.getListByIdError=o.payload}),e.addCase(T.saveList+u.PENDING,t=>{t.saveListState=f.PENDING,t.saveListError=""}),e.addCase(T.saveList+u.FULFILLED,t=>{t.saveListState=f.FULFILLED,t.saveListError=""}),e.addCase(T.saveList+u.REJECTED,(t,o)=>{t.saveListState=f.REJECTED,t.saveListError=o.payload}),e.addCase(T.updateUserAssignedData+u.PENDING,t=>{t.userAssignedDataState=f.PENDING,t.userAssignedDataError=""}),e.addCase(T.updateUserAssignedData+u.FULFILLED,(t,o)=>{t.userAssignedDataState=f.FULFILLED,t.userAssignedDataError="";const a=t.currentList.items.map(s=>(s.itemId===o.payload.itemId&&(s.userAssignedDateTime=o.payload.data.userAssignedDateTime,s.userAssignedNote=o.payload.data.userAssignedNote),s));t.currentList.items=a,t.currentList=Rs(t.currentList)}),e.addCase(T.updateUserAssignedData+u.REJECTED,(t,o)=>{t.userAssignedDataState=f.REJECTED,t.userAssignedDataError=o.payload}),e.addCase(T.updateList+u.PENDING,t=>{t.updateListDetailsState=f.PENDING,t.updateListDetailsError=""}),e.addCase(T.updateList+u.FULFILLED,(t,o)=>{var a,s;t.currentList={...t.currentList,name:(a=o.payload.data)==null?void 0:a.name,description:(s=o.payload.data)==null?void 0:s.description,listImageUrl:o.payload.data.listImageUrl},t.updateListDetailsState=f.FULFILLED,t.updateListDetailsError="",t.availableLists.map(r=>{var i;r.listId===o.payload.listId&&(r.name=(i=o.payload.data)==null?void 0:i.name,r.listImageUrl=o.payload.data.listImageUrl)})}),e.addCase(T.updateList+u.REJECTED,(t,o)=>{t.updateListDetailsState=f.REJECTED,t.updateListDetailsError=o.payload}),e.addCase(T.deleteList+f.PENDING,t=>{t.deleteListState=f.PENDING,t.deleteListError=""}),e.addCase(T.deleteList+f.FULFILLED,(t,o)=>{t.deleteListState=f.FULFILLED,t.deleteListError="";const a=o.payload,s=t.availableLists.findIndex(r=>r.listId===a);t.currentList.listId===a&&t.currentList.items.map(i=>i.itemValue).map(i=>{t.listItemMappings[i]=t.listItemMappings[i].filter(l=>l.split(":")[0]!==a.toString())}),t.availableLists=t.availableLists.filter(r=>r.listId!==o.payload),t.availableLists.length>0&&(s>0?t.activeListCardIndex=s-1:s===0?t.activeListCardIndex=0:t.activeListCardIndex=s+1),t.currentList.listId===a&&(t.currentList={})}),e.addCase(T.deleteList+f.REJECTED,(t,o)=>{t.deleteListState=f.REJECTED,t.deleteListError=o.payload}),e.addCase(T.getShareToken+f.PENDING,t=>{t.getShareTokenState=f.PENDING,t.getShareToken=""}),e.addCase(T.getShareToken+f.FULFILLED,(t,o)=>{t.getShareTokenState=f.FULFILLED,t.getShareToken=o.payload}),e.addCase(T.getShareToken+f.REJECTED,t=>{t.getShareTokenState=f.REJECTED,t.getShareToken=""}),e.addCase(T.getListByToken+u.PENDING,t=>{t.getListByTokenState=f.PENDING,t.getListByTokenError=""}),e.addCase(T.getListByToken+u.FULFILLED,(t,o)=>{t.getListByTokenState=f.FULFILLED,t.getListByTokenError="";const a=o.payload.items.filter(i=>{if(i.itemData!==null)return i}),r=a.map(i=>i.itemData).map(sr).reverse();for(let i=0;i<a.length;i++)a[i].itemData=r[i];t.currentList={...o.payload,items:a},t.currentList=Rs(t.currentList),t.isMapDataAvailable=o.payload.items.some(i=>{var l;return((l=i.itemData)==null?void 0:l.locationInfo)!==null})}),e.addCase(T.getListByToken+u.REJECTED,(t,o)=>{t.getListByTokenState=f.REJECTED,t.getListByTokenError=o.payload})}}),{toggleMapView:rj,toggleCreateListModal:nj,toggleListTimelinePage:ij,toggleEditListModal:lj,toggleDeleteListModal:dj,updateActiveListItemId:cj,updateSaveListButtonClick:uj,resetSaveListState:pj,toggleInfoPageActive:yj,resetAddToListState:gj,updateActiveDropdownListId:mj,updateActiveListCardIndex:fj,updateSavedListUid:hj,resetMyListPage:Sj,updateSeeMoreButtonClick:bj,resetShareToken:Ej,resetCreateList:wj}=dc.actions,rB=dc.reducer,ai={isNew:!0,isSaving:!1,isSaved:!1,saveError:!1,showSpinner:!0,messageError:!1,customMessages:[],getCustomMessagesStatus:"idle",messageErrorReason:"Message field cannot be empty!",localState:{message:"",messageId:null,screenIds:[]}};function Ij(e){return{type:"board/screens/messages/get/request",payload:e}}function vj(e){return{type:"board/screens/messages/save/request",payload:{...e,screenIds:e.screenIds.join(",")}}}function Cj(e){return{type:"board/screens/messages/delete/request",payload:e}}const cc=j({initialState:ai,name:"manageCustomMessage",reducers:{hideError:e=>{e.saveError=!1},resetNewMessage:()=>({...ai,messageError:!0}),setMessageContent:(e,t)=>
11{const o=t.payload;e.messageError=o.message==="",e.localState=t.payload},setEditLocalState:(e,t)=>{const{screenMessageText:o,screenMessageId:a,screens:s}=t.payload;e.isNew=!1,e.localState={message:o,messageId:a,screenIds:s.map(r=>r.screenId)}},deleteBoardScreenMessage:(e,t)=>{e.customMessages=e.customMessages.filter(o=>o.screenMessageId!==t.payload)}},extraReducers:{"board/screens/messages/get/pending":e=>{e.showSpinner=!0,e.getCustomMessagesStatus="pending"},"board/screens/messages/get/fulfilled":(e,t)=>{e.showSpinner=!1,e.getCustomMessagesStatus="fulfilled",e.customMessages=t.payload.customMessages},"board/screens/messages/get/rejected":e=>{e.showSpinner=!1,e.getCustomMessagesStatus="rejected"},"board/screens/messages/save/pending":e=>{e.saveError=!1,e.isSaved=!1,e.isSaving=!0},"board/screens/messages/save/fulfilled":e=>{e.isSaved=!0,e.isSaving=!1},"board/screens/messages/save/rejected":e=>{e.saveError=!0,e.isSaved=!1,e.isSaving=!1}}}),{hideError:Aj,resetNewMessage:Dj,setMessageContent:Tj,setEditLocalState:Pj,deleteBoardScreenMessage:Bj}=cc.actions,nB=cc.reducer,si={categoriesFetchStatus:"idle",categories:[],profile:{apiStatus:"idle",data:{boardName:"",businessCategories:[],boardDesc:"",boardLogo:"",phoneNumber:"",website:""},serverData:{},errors:{boardNameError:!1,boardNameErrorMessage:"",boardDescError:!1,boardDescErrorMessage:"",phoneNumberError:!1,phoneNumberErrorMessage:"",websiteError:!1,websiteErrorMessage:"",boardLogoError:!1,boardLogoErrorMessage:"",businessCategoriesError:!1,businessCategoriesErrorMessage:""},areErrorsVisible:!1},customize:{apiStatus:"idle",data:{boardBackgroundImageLink:"",boardThemeCustomColors:{},customHootThemeColors:[],boardLogo:""},serverData:{},areErrorsVisible:!1,errors:{}},location:{apiStatus:"idle",data:null,serverData:null,areErrorsVisible:!1,errors:{}},hours:{apiStatus:"idle",data:[],serverData:[],errors:{}},directories:{apiStatus:"idle",data:[],disconnectingId:null,error:null},url:{apiStatus:"idle",data:"",errors:{urlNotAvailableError:!1,urlNotAvailableErrorMessage:"URL already in use!",saveError:!1,saveErrorMessage:"Yikes! Something wrong happened."}},photos:{apiStatus:"idle",data:[],serverData:[],errors:{}}},ri=(e,t)=>{const{boardDetails:o}=t.payload,a={boardName:o.boardName||"",boardDesc:o.boardDesc||"",businessCategories:o.businessCategories||[],boardLogo:o.boardLogo||"",phoneNumber:o.businessDetails.phoneNumber||"",website:o.businessDetails.website||""};e.profile.data=a,e.profile.serverData=a;const s={boardLogo:o.boardLogo||"",boardBackgroundImageLink:o.boardBackgroundImageLink||"",boardThemeCustomColors:o.boardThemeCustomColors||{},customHootThemeColors:o.customHootThemeColors||[]};typeof s.boardThemeCustomColors=="string"&&(s.boardThemeCustomColors=JSON.parse(s.boardThemeCustomColors)),typeof s.customHootThemeColors=="string"&&(s.customHootThemeColors=JSON.parse(s.customHootThemeColors)),e.customize.data=s,e.customize.serverData=s,e.url.data=o.customUrl,e.photos.serverData=o.businessPhotos.small;let r=(o.locations||[]).length>0?o.locations[0]:null;r&&(r.addressLine1||(r={...r,addressLine1:""}),r.addressLine2||(r={...r,addressLine2:""})),e.location.data=r,e.location.serverData=r,e.hours.data=o.businessHours,e.hours.serverData=o.businessHours},uc=j({name:"manageMyBusiness",initialState:si,reducers:{resetSettings:()=>si,undoSettings:(e,t)=>{const o=t.payload;e[o].data=e[o].serverData},showValidationErrors:(e,t)=>{const o=t.payload;e[o].areErrorsVisible=!0},profileFormUpdated:(e,t)=>{const{businessCategories:o,boardDesc:a,boardLogo:s,phoneNumber:r,website:i}=t.payload,l=Tr(t.payload.boardName),d=Je.boardName(l);e.profile.data.boardName=d.value,e.profile.errors.boardNameError=d.hasError,e.profile.errors.boardNameErrorMessage=d.errorMessage;const p=Je.boardDescription(a);e.profile.data.boardDesc=p.value,e.profile.errors.boardDescError=p.hasError,e.profile.errors.boardDescErrorMessage=p.errorMessage;const h=Je.phoneNumber(r);e.profile.data.phoneNumber=h.value,e.profile.errors.phoneNumberError=h.hasError,e.profile.errors.phoneNumberErrorMessage=h.errorMessage;const v=Je.website(i);e.profile.data.website=v.value,e.profile.errors.websiteError=v.hasError,e.profile.errors.websiteErrorMessage=v.errorMessage;const A=Je.boardLogo(s);e.profile.data.boardLogo=A.value,e.profile.errors.boardLogoError=A.hasError,e.profile.errors.boardLogoErrorMessage=A.errorMessage;const w=Je.businessCategories(o);e.profile.data.businessCategories=w.value,e.profile.errors.businessCategoriesError=w.hasError,e.profile.errors.businessCategoriesErrorMessage=w.errorMessage},locationFormUpdated:(e,t)=>{const o=t.payload;e.location.data=o;const a=Je.location(o);if(a.hasError)e.location.errors.locationsError=!0,e.location.errors.locationsErrorMessage=a.errorMessage;else{const s=mr(o.addressLine1),r=Je.addressLine(s);e.location.data.addressLine1=r.value,e.location.errors.locationsError=r.hasError,e.location.errors.locationsErrorMessage=r.errorMessage}},customizeFormUpdated:(e,t)=>
11{const{boardBackgroundImageLink:o,boardThemeCustomColors:a,customHootThemeColors:s}=t.payload;e.customize.data.boardBackgroundImageLink=o,e.customize.data.boardThemeCustomColors=a,e.customize.data.customHootThemeColors=s},hoursFormUpdated:(e,t)=>{e.hours.data=t.payload},addPhotos:(e,t)=>{e.photos.data=[...t.payload,...e.photos.data]},removePhoto:(e,t)=>{const o=t.payload;e.photos.data=e.photos.data.filter((a,s)=>o!==s)}},extraReducers:{"/manageBoard/refreshBoardDetails/fulfilled":ri,"board/details/fulfilled":ri,[P.importBusiness+"fulfilled"]:(e,t)=>{var s,r;const o=((r=(s=t.payload)==null?void 0:s.boardDetails)==null?void 0:r.businessCategories)||[],a=e.categories.map(({categoryId:i})=>i);for(const i of o)a.includes(i.categoryId)||(e.categories=[...e.categories,i])},[B.getCategories+"pending"]:e=>{e.categoriesFetchStatus="pending"},[B.getCategories+"fulfilled"]:(e,t)=>{e.categoriesFetchStatus="fulfilled",e.categories=t.payload},[B.getCategories+"rejected"]:e=>{e.categoriesFetchStatus="rejected"},[B.saveProfile+"pending"]:e=>{e.profile.apiStatus="pending"},[B.saveProfile+"fulfilled"]:e=>{e.profile.apiStatus="fulfilled",e.profile.serverData=e.profile.data},[B.saveProfile+"rejected"]:e=>{e.profile.apiStatus="rejected"},[B.saveCustomize+"pending"]:e=>{e.customize.apiStatus="pending"},[B.saveCustomize+"fulfilled"]:e=>{e.customize.apiStatus="fulfilled",e.customize.serverData=e.customize.data},[B.saveCustomize+"rejected"]:e=>{e.customize.apiStatus="rejected"},[B.fetchDirectories+"pending"]:e=>{e.directories.apiStatus="pending",e.directories.error=null},[B.fetchDirectories+"fulfilled"]:(e,t)=>{e.directories.apiStatus="fulfilled",e.directories.data=t.payload||[]},[B.fetchDirectories+"rejected"]:e=>{e.directories.apiStatus="rejected",e.directories.error="Couldn't load your directory connections."},[B.disconnectDirectory+"pending"]:(e,t)=>{var o;e.directories.disconnectingId=((o=t.payload)==null?void 0:o.listingId)||null,e.directories.error=null},[B.disconnectDirectory+"fulfilled"]:(e,t)=>{e.directories.data=e.directories.data.filter(o=>{var a;return o.listingId!==((a=t.payload)==null?void 0:a.listingId)}),e.directories.disconnectingId=null},[B.disconnectDirectory+"rejected"]:e=>{e.directories.disconnectingId=null,e.directories.error="Couldn't disconnect that directory. Try again."},[B.saveShortURL+"pending"]:e=>{e.url.apiStatus="pending",e.url.errors.urlNotAvailableError=!1,e.url.errors.saveError=!1},[B.saveShortURL+"fulfilled"]:e=>{e.url.apiStatus="fulfilled"},[B.saveShortURL+"rejected"]:(e,t)=>{const{reason:o}=t.payload;e.url.apiStatus="rejected",o&&o==="not-available"?e.url.errors.urlNotAvailableError=!0:e.url.errors.saveError=!0},[B.saveLocation+"pending"]:e=>{e.location.apiStatus="pending"},[B.saveLocation+"fulfilled"]:e=>{e.location.apiStatus="fulfilled",e.location.serverData=e.location.data},[B.saveLocation+"rejected"]:e=>{e.location.apiStatus="rejected"},[B.saveBusinessHours+"pending"]:e=>{e.hours.apiStatus="pending"},[B.saveBusinessHours+"fulfilled"]:e=>{e.hours.apiStatus="fulfilled",e.hours.serverData=e.hours.data},[B.saveBusinessHours+"rejected"]:e=>{e.hours.apiStatus="rejected"},[B.deletePhoto+"pending"]:(e,t)=>{const{data:o}=t.payload;e.photos.serverData=e.photos.serverData.filter(a=>a.id!==o),e.photos.apiStatus="pending"},[B.deletePhoto+"fulfilled"]:e=>{e.photos.apiStatus="fulfilled"},[B.deletePhoto+"rejected"]:e=>{e.photos.apiStatus="rejected"},[B.savePhotos+"pending"]:e=>{e.photos.apiStatus="pending"},[B.savePhotos+"fulfilled"]:(e,t)=>{e.photos.apiStatus="fulfilled",e.photos.data=[],e.photos.serverData=[...t.payload,...e.photos.serverData]},[B.savePhotos+"rejected"]:e=>{e.photos.apiStatus="rejected"}}}),kj=({boardId:e,data:t})=>({type:B.saveProfile+"request",payload:{boardId:e,data:t}}),Lj=({boardId:e,data:t})=>({type:B.saveCustomize+"request",payload:{boardId:e,data:t}}),Fj=({boardId:e})=>({type:B.fetchDirectories+"request",payload:{boardId:e}}),Uj=({boardId:e,listingId:t})=>({type:B.disconnectDirectory+"request",payload:{boardId:e,listingId:t}}),Nj=({boardId:e,data:t})=>({type:B.saveShortURL+"request",payload:{boardId:e,data:t}}),Rj=({boardId:e,data:t})=>({type:B.saveLocation+"request",payload:{boardId:e,data:t}}),Hj=()=>({type:B.getCategories+"request",payload:{}}),xj=({boardId:e,data:t})=>({type:B.saveContactDetails+"request",payload:{boardId:e,data:t}}),Mj=({boardId:e,data:t})=>({type:B.saveBusinessHours+"request",payload:{boardId:e,data:t}}),Oj=({boardId:e,data:t})=>({type:B.savePhotos+"request",payload:{boardId:e,data:t}}),jj=({boardId:e,data:t})=>({type:B.deletePhoto+"request",payload:{boardId:e,data:t}}),{undoSettings:qj,showValidationErrors:_j,profileFormUpdated:$j,locationFormUpdated:Gj,customizeFormUpdated:Vj,hoursFormUpdated:Jj,removePhoto:zj,addPhotos:Wj}=uc.actions,iB=uc.reducer,lB=({appId:e,boardId:t})=>({type:V.unPublishApp+"request",payload:{appId:e,boardId:t}}
11),dB=({boardId:e,payload:t})=>({type:V.installApp+"request",payload:{boardId:e,payload:{appId:t.appId,appIcon:t.appIcon,isPrivate:t.appAccess!=="public",showOnWeb:t.showOnWeb,showOnMobile:t.showOnMobile,boardScreenIds:t.boardScreenIds,showAllScreens:t.showAllScreens}}}),cB=({boardId:e,apps:t})=>({type:V.installDefaultApps+"request",payload:{boardId:e,apps:t}}),uB=({boardId:e,payload:t})=>({type:V.publishApp+"request",payload:{boardId:e,payload:{appTypeCode:t.appTypeCode,developerApp:t.developerApp,appVersion:{appName:t.appName,endpoint:t.endpoint,mobileEndpoint:t.mobileEndpoint,collectionBehaviour:t.collectionBehaviour,sortBy:t.sortBy,appIcon:t.appIcon,hbConfig:t.hbConfig,settingsEndpoint:t.settingsEndpoint,domainsAllowed:t.domainsAllowed,appDescription:t.appDescription,longDescription:t.longDescription,marketingFeatures:t.marketingFeatures,screenshots:t.screenshots,websiteUrl:t.websiteUrl,videoUrl:t.videoUrl,global:!1,radius:1e3,appLocation:t.appLocation}}}}),pB=({boardId:e,appUUID:t,payload:o})=>({type:V.updatePublishedApp+"request",payload:{boardId:e,appUUID:t,payload:{appTypeCode:o.appTypeCode,developerApp:o.developerApp,appVersion:{appName:o.appName,endpoint:o.endpoint,mobileEndpoint:o.mobileEndpoint,collectionBehaviour:o.collectionBehaviour,sortBy:o.sortBy,appIcon:o.appIcon,hbConfig:o.hbConfig,settingsEndpoint:o.settingsEndpoint,domainsAllowed:o.domainsAllowed,appDescription:o.appDescription,longDescription:o.longDescription,marketingFeatures:o.marketingFeatures,screenshots:o.screenshots,websiteUrl:o.websiteUrl,videoUrl:o.videoUrl,global:o.global,radius:o.radius,appLocation:o.appLocation}}}}),yB=({boardId:e,boardLocation:t})=>{let o={start:0,max:20,global:!0,boardId:e};return t&&(o={...o,latitude:t.latitude,longitude:t.longitude}),{type:V.getAppDirectory+"request",payload:o}},gB=({boardId:e})=>({type:V.getBoardAppDirectory+"request",payload:{boardId:e}}),mB=({boardId:e})=>({type:V.getAppStoreCategories+"request",payload:{boardId:e}}),fB=R(V.getRecommendedApps+u.REQUEST),bo={isInstallModalVisible:!1,isUnpublishModalVisible:!1,isPublishModalVisible:!1,isAppIconChooserVisible:!1,publishStep:0,installData:{appId:null,appName:null,appIcon:null,publishedBy:null,appDescription:null,boardScreenIds:"",hbConfig:"",settingsEndpoint:null,selectedScreens:[],appAccess:"public",restrictedAppAccess:{},showAllScreens:!0,showOnMobile:!0,showOnWeb:!0},publishData:{appUUID:null,appTypeCode:null,developerApp:!1,appIcon:"",appName:"",sortBy:"appName",endpoint:"",settingsEndpoint:"",hbConfig:"",mobileEndpoint:"",collectionBehaviour:"U",domainsAllowed:"",appDescription:"",appLocation:null,locationString:"",global:null,radius:null,longDescription:"",marketingFeatures:[],screenshots:[],websiteUrl:"",videoUrl:""},buttonClicked:!1,formErrors:{appType:null,appName:null,screens:null,appDescription:null,appIcon:null,endpoint:null,settingsEndpoint:null,location:null},isLoading:!1,isDone:!1,isError:!1,isUnpublishLoading:!1,isUnpublishDone:!1,isUnpublishError:!1,collectionAppProps:{selectedCollections:[],collectionSelector:ja},appDirectory:[],appDirectoryStatus:f.IDLE,appStoreCategories:[],appStoreCategoriesStatus:f.IDLE,recommendedApps:[],recommendedAppsAPIStatus:f.IDLE,boardAppDirectory:[],boardAppDirectoryStatus:f.IDLE,isListLoading:!1,screens:[],defaultAppsInstallAPIStatus:f.IDLE},pc=j({name:"appStore",initialState:bo,reducers:{...$r,resetAppDirectory:()=>bo,prepareForEdit:(e,t)=>
11{const o=t.payload,a=o.appVersion.appLocation||{},s=[];a.region&&s.push(a.region),a.city&&s.push(a.city),a.state&&s.push(a.state),a.country&&s.push(a.country),e.publishData={appUUID:o.uuid,appTypeCode:o.appTypeCode,developerApp:o.developerApp,appIcon:o.appVersion.appIcon,appName:o.appVersion.appName,sortBy:o.appVersion.sortBy,endpoint:o.appVersion.endpoint,global:o.appVersion.global,radius:o.appVersion.radius,mobileEndpoint:o.appVersion.mobileEndpoint,settingsEndpoint:o.appVersion.settingsEndpoint,hbConfig:o.appVersion.hbConfig,collectionBehaviour:o.appVersion.collectionBehaviour,domainsAllowed:o.appVersion.domainsAllowed,appDescription:o.appVersion.appDescription,longDescription:o.appVersion.longDescription||"",marketingFeatures:o.appVersion.marketingFeatures||[],screenshots:o.appVersion.screenshots||[],websiteUrl:o.appVersion.websiteUrl||"",videoUrl:o.appVersion.videoUrl||"",appLocation:a,locationString:s.join(", ")},o.appTypeCode==="CL"&&(e.collectionAppProps.selectedCollections=$e({boards:o.appVersion.boards,endpoint:o.appVersion.endpoint})),e.isPublishModalVisible=!0},prepareForInstall:(e,t)=>{const o=t.payload;e.installData={...bo.installData,appId:o.uuid,hbConfig:(o.appVersion||{}).hbConfig,appName:o.appVersion.appName,appIcon:o.appVersion.appIcon,publishedBy:o.publisherBoardName,appDescription:o.appVersion.appDescription},e.isInstallModalVisible=!0},resetForm:e=>({...bo,appDirectory:e.appDirectory,isListLoading:e.isListLoading,boardAppDirectory:e.boardAppDirectory}),goBackToForm:e=>{e.isDone=!1,e.isError=!1,e.isUnpublishDone=!1,e.isUnpublishError=!1},setInstallData:(e,t)=>{e.installData={...e.installData,...t.payload};const o=e.installData;o.showAllScreens?e.formErrors.screens=null:o.selectedScreens.length===0?e.formErrors.screens="Select at least one screen!":e.formErrors.screens=null,e.installData.boardScreenIds=o.selectedScreens.map(a=>a.screenId).join(",")},setFormData:(e,t)=>{e.publishData={...e.publishData,...t.payload};const o=e.publishData;if(o.appTypeCode?e.formErrors.appType=null:e.formErrors.appType="App type is required!",o.appName===""?e.formErrors.appName="App name is required!":e.formErrors.appName=null,o.appIcon===""?e.formErrors.appIcon="App icon is required!":e.formErrors.appIcon=null,o.appDescription===""?e.formErrors.appDescription="App description is required!":e.formErrors.appDescription=null,o.endpoint==="")o.appTypeCode==="CL"?e.formErrors.endpoint="Minimum one collection needs to be selected!":e.formErrors.endpoint="URL is required!";else if(o.appTypeCode==="CL")e.formErrors.endpoint=null;else{const a=/^(ftp|http|https):\/\/[^ "]+$/.test(o.endpoint);e.formErrors.endpoint=a?null:"Invalid URL!"}if(o.settingsEndpoint!==""){const a=/^(ftp|http|https):\/\/[^ "]+$/.test(o.settingsEndpoint);e.formErrors.settingsEndpoint=a?null:"Invalid Settings URL!"}else e.formErrors.settingsEndpoint=null;if(!o.appLocation||!o.appLocation.googlePlaceId)if(!o.appLocation)e.formErrors.location="Location is required!";else{const a={areaCode:null,postalCode:null,latitude:null,longitude:null,region:null,city:null,state:null,country:null,googlePlaceId:o.appLocation.place_id},{geometry:s,address_components:r}=o.appLocation;s&&s.location&&(a.latitude=s.location.lat(),a.longitude=s.location.lng()),[...r||[]].forEach(i=>{if(i.types){if([...i.types].includes("country")){a.country=i.long_name;return}if([...i.types].includes("administrative_area_level_1")){a.state=i.long_name;return}if([...i.types].includes("administrative_area_level_2")){a.city=i.long_name;return}if([...i.types].includes("locality")){a.region=i.long_name;return}if([...i.types].includes("postal_code")){a.postalCode=i.long_name;return}}}),e.publishData.appLocation=a,e.formErrors.location=null}},setButtonClicked:e=>{e.buttonClicked=!0},jumpToStep:(e,t)=>{e.publishStep=t.payload},nextStep:e=>{e.buttonClicked=!1,e.publishStep=e.publishStep+1},prevStep:e=>{e.buttonClicked=!1,e.publishStep=e.publishStep-1},toggleInstallModal:(e,t)=>{e.isInstallModalVisible=!!t.payload},toggleUnpublishModal:(e,t)=>{e.isUnpublishModalVisible=!!t.payload},togglePublishModal:(e,t)=>{e.isPublishModalVisible=!!t.payload},toggleAppIconChooser:(e,t)=>{e.isAppIconChooserVisible=!!t.payload}}
11,extraReducers:{...Gr,"activeBoard/resetActiveBoard":()=>bo,[V.publishApp+"pending"]:e=>{e.isLoading=!0,e.isDone=!1,e.isError=!1},[V.publishApp+"rejected"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!0},[V.publishApp+"fulfilled"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!1},[V.updatePublishedApp+"pending"]:e=>{e.isLoading=!0,e.isDone=!1,e.isError=!1},[V.updatePublishedApp+"rejected"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!0},[V.updatePublishedApp+"fulfilled"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!1},[V.getBoardAppDirectory+"pending"]:e=>{e.isListLoading=!0,e.boardAppDirectoryStatus=f.PENDING},[V.getBoardAppDirectory+"rejected"]:e=>{e.isListLoading=!1,e.boardAppDirectoryStatus=f.REJECTED},[V.getBoardAppDirectory+"fulfilled"]:(e,t)=>{e.isListLoading=!1,e.boardAppDirectory=t.payload,e.boardAppDirectoryStatus=f.FULFILLED},[V.getAppDirectory+"pending"]:e=>{e.isListLoading=!0,e.appDirectoryStatus=f.PENDING},[V.getAppDirectory+"rejected"]:e=>{e.isListLoading=!1,e.appDirectoryStatus=f.REJECTED},[V.getAppDirectory+"fulfilled"]:(e,t)=>{e.isListLoading=!1,e.appDirectory=[...t.payload||[]].filter(o=>!!o.appVersion),e.appDirectoryStatus=f.FULFILLED},[V.getAppStoreCategories+"pending"]:e=>{e.appStoreCategoriesStatus=f.PENDING},[V.getAppStoreCategories+"rejected"]:e=>{e.appStoreCategoriesStatus=f.REJECTED},[V.getAppStoreCategories+"fulfilled"]:(e,t)=>{e.appStoreCategories=t.payload||[],e.appStoreCategoriesStatus=f.FULFILLED},[V.unPublishApp+"pending"]:e=>{e.isUnpublishModalVisible=!1,e.isUnpublishLoading=!0,e.isUnpublishDone=!1,e.isUnpublishError=!1},[V.unPublishApp+"rejected"]:e=>{e.isUnpublishLoading=!1,e.isUnpublishDone=!0,e.isUnpublishError=!0},[V.unPublishApp+"fulfilled"]:e=>{e.isUnpublishLoading=!1,e.isDone=!0,e.isUnpublishDone=!0,e.isError=!1,e.isUnpublishError=!1},[V.installApp+"pending"]:e=>{e.isLoading=!0,e.isDone=!1,e.isError=!1},[V.installApp+"rejected"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!0},[V.installApp+"fulfilled"]:e=>{e.isLoading=!1,e.isDone=!0,e.isError=!1},[Un+u.PENDING]:e=>{e.isListLoading=!0},[Un+u.FULFILLED]:(e,t)=>{let o=[];const{response:a}=t.payload;a&&a.message==="success"&&(o=a.data),e.isListLoading=!1,e.screens=o},[V.getRecommendedApps+u.PENDING]:e=>{e.recommendedAppsAPIStatus=f.PENDING},[V.getRecommendedApps+u.FULFILLED]:(e,t)=>{e.recommendedAppsAPIStatus=f.FULFILLED,e.recommendedApps=t.payload},[V.installDefaultApps+u.PENDING]:e=>{e.defaultAppsInstallAPIStatus=f.PENDING},[V.installDefaultApps+u.REJECTED]:e=>{e.defaultAppsInstallAPIStatus=f.REJECTED},[V.installDefaultApps+u.FULFILLED]:e=>{e.defaultAppsInstallAPIStatus=f.FULFILLED}}}),{resetAppDirectory:hB,goBackToForm:SB,setFormData:bB,nextStep:EB,prevStep:wB,resetForm:IB,jumpToStep:vB,setInstallData:CB,prepareForEdit:AB,setButtonClicked:DB,prepareForInstall:TB,toggleInstallModal:PB,togglePublishModal:BB,toggleUnpublishModal:kB,toggleAppIconChooser:LB,syncData:FB,resetPanel:UB,selectBoard:NB,setSearchType:RB,setSearchText:HB,removeCollection:xB,selectCollection:MB,filterLocalCollections:OB}=pc.actions,yc=pc.reducer,Yj=Object.freeze(Object.defineProperty({__proto__:null,default:yc,filterLocalCollections:OB,getAppDirectory:yB,getAppStoreCategories:mB,getBoardAppDirectory:gB,getRecommendedApps:fB,goBackToForm:SB,installApp:dB,installDefaultApps:cB,jumpToStep:vB,nextStep:EB,prepareForEdit:AB,prepareForInstall:TB,prevStep:wB,publishApp:uB,removeCollection:xB,resetAppDirectory:hB,resetForm:IB,resetPanel:UB,selectBoard:NB,selectCollection:MB,setButtonClicked:DB,setFormData:bB,setInstallData:CB,setSearchText:HB,setSearchType:RB,syncData:FB,toggleAppIconChooser:LB,toggleInstallModal:PB,togglePublishModal:BB,toggleUnpublishModal:kB,unPublishApp:lB,updatePublishedApp:pB},Symbol.toStringTag,{value:"Module"})),eo={miniSender:{actionErrorMessage:null,actionStatus:"idle",message:""},messageCenter:{replyActionStatus:"idle",replyMessage:"",replyErrorMessage:null,conversationsFetchStatus:"idle",conversationsErrorMessage:null,conversations:[],unreadCount:0,unreadCountFetchStatus:"idle",selectedConversationIndex:null},mixpanelData:{conversationId:null}},gc=j({name:"messaging",initialState:eo,reducers:{setMiniSenderMessage:(e,t)=>
11{e.miniSender.message=t.payload},resetMiniSender:e=>{e.miniSender=eo.miniSender},setConversationIndex:(e,t)=>{const o=t.payload;e.messageCenter.selectedConversationIndex=o;const a=eo.messageCenter;if(e.messageCenter.replyActionStatus=a.replyActionStatus,e.messageCenter.replyErrorMessage=a.replyErrorMessage,e.messageCenter.replyMessage=a.replyMessage,t.payload!=null){const s=e.messageCenter.conversations[o];e.messageCenter.unreadCount-=s.unreadMessages||0}},setConversationReplyMessage:(e,t)=>{e.messageCenter.replyMessage=t.payload}},extraReducers:{"messaging/send/pending":e=>{e.mixpanelData=eo.mixpanelData,e.miniSender.actionErrorMessage=null,e.miniSender.actionStatus="pending"},"messaging/send/fulfilled":(e,t)=>{e.mixpanelData.conversationId=t.payload.conversationId,e.miniSender.actionStatus="fulfilled"},"messaging/send/rejected":e=>{e.miniSender.actionStatus="rejected",e.miniSender.actionErrorMessage="Failed to send your message. Please try again."},"messaging/get-conversations/pending":e=>{e.messageCenter.conversationsErrorMessage=null,e.messageCenter.conversationsFetchStatus="pending"},"messaging/get-conversations/fulfilled":(e,t)=>{e.messageCenter.conversationsFetchStatus="fulfilled",e.messageCenter.conversations=t.payload.map(o=>({...o,messages:o.messages.reverse()})),e.messageCenter.unreadCount=e.messageCenter.conversations.reduce((o,a)=>o+a.unreadMessages,0)},"messaging/get-conversations/rejected":e=>{e.messageCenter.conversationsFetchStatus="rejected",e.messageCenter.conversationsErrorMessage="Failed to fetch conversations. Please try again."},"messaging/send-reply/pending":e=>{e.mixpanelData=eo.mixpanelData,e.messageCenter.replyErrorMessage=null,e.messageCenter.replyActionStatus="pending"},"messaging/send-reply/fulfilled":(e,t)=>{const{conversationIndex:o,conversationId:a,...s}=t.payload;e.mixpanelData.conversationId=a,e.messageCenter.replyActionStatus="fulfilled",e.messageCenter.conversations[o].messages.push(s);const r=eo.messageCenter;e.messageCenter.replyErrorMessage=r.replyErrorMessage,e.messageCenter.replyMessage=r.replyMessage},"messaging/send-reply/rejected":e=>{e.messageCenter.replyActionStatus="rejected",e.messageCenter.replyErrorMessage="Failed to send your message. Please try again."},"messaging/get-unread/pending":e=>{e.messageCenter.unreadCountFetchStatus="pending"},"messaging/get-unread/fulfilled":(e,t)=>{e.messageCenter.unreadCount=t.payload,e.messageCenter.unreadCountFetchStatus="fulfilled"},"messaging/read/request":(e,t)=>{const{conversationIndex:o}=t.payload;e.messageCenter.conversations[o].unreadMessages=0}}}),Kj=({sendersId:e,receiverId:t,messageText:o,hootId:a})=>({type:"messaging/send/request",payload:{sendersId:e,receiverId:t,messageText:o,hootId:a}}),Qj=({conversationId:e,messageText:t,conversationIndex:o})=>({type:"messaging/send-reply/request",payload:{conversationId:e,messageText:t,conversationIndex:o}}),Zj=()=>({type:"messaging/get-conversations/request",payload:{silent:!0}}),Xj=()=>({type:"messaging/get-conversations/request",payload:{silent:!1}}),eq=()=>({type:"messaging/get-unread/request"}),tq=({conversationId:e,conversationIndex:t})=>({type:"messaging/read/request",payload:{conversationId:e,conversationIndex:t}}),{setMiniSenderMessage:oq,resetMiniSender:aq,setConversationIndex:sq,setConversationReplyMessage:rq}=gc.actions,jB=gc.reducer,qB={isFetching:!1,serverState:null,localState:{email:"",firstName:"",lastName:"",userPictureUrl:""},newEmail:"",newEmailError:!1,newEmailErrorMessage:"",currentPasswordTestStatus:"idle",currentPassword:"",currentPasswordError:!1,currentPasswordErrorMessage:"",newPasswordTestStatus:"idle",updatePasswordStatus:"idle",newPassword:"",newPasswordRepeat:"",emailError:!1,emailErrorMessage:"",passwordError:!1,passwordErrorMessage:"",passwordRepeatError:!1,passwordRepeatErrorMessage:"",firstNameError:!1,firstNameErrorMessage:"",lastNameError:!1,lastNameErrorMessage:"",userPictureUrlError:!1,userPictureUrlErrorMessage:"",isEditing:!1,currentViewIndex:0,showAllFormErrors:!1,updateEmailStatus:"idle",beaconChecked:!0};function nq(e){return{type:"user/account/email/update/request",payload:e}}function iq(e){return{type:"user/account/password/update/request",payload:e}}function lq(e){return{type:"user/account/password/test/request",payload:e}}function dq(e){return{type:"user/account/update/request",payload:e}}function cq(e){return{type:"user/account/get/request",payload:e}}
11const mc=j({name:"myAccount",initialState:qB,reducers:{setInitialState:(e,t)=>({...e,serverState:t.payload.initialState,localState:t.payload.initialState}),bypassPasswordConfirm:e=>{e.currentViewIndex=1},newEmailEdited:(e,t)=>({...e,newEmail:t.payload.newEmail,isEditing:!0,newEmailError:!so(t.payload.newEmail),newEmailErrorMessage:"Please enter a valid email"}),emailEdited:(e,t)=>({...e,localState:{...e.localState,email:t.payload.email},isEditing:!0,emailError:!so(t.payload.email),emailErrorMessage:"Please enter a valid email"}),currentPasswordEntered:(e,t)=>({...e,localState:{...e.localState},isEditing:!0,showAllFormErrors:!1,currentPassword:t.payload.currentPassword,currentPasswordError:!t.payload.currentPassword.trim().length,passwordErrorMessage:"Need a valid password"}),newPasswordEntered:(e,t)=>({...e,localState:{...e.localState},newPassword:t.payload.newPassword,isEditing:!0,newPasswordError:!t.payload.newPassword.trim().length,passwordRepeatErrorMessage:"Passwords do not match"}),newPasswordRepeatEntered:(e,t)=>({...e,localState:{...e.localState},newPasswordRepeat:t.payload.newPasswordRepeat,isEditing:!0,passwordRepeatError:e.localState.password!==t.payload.passwordRepeat,passwordRepeatErrorMessage:"Passwords do not match"}),firstNameEdited:(e,t)=>({...e,localState:{...e.localState,firstName:t.payload.firstName,displayName:`${t.payload.firstName} ${e.localState.lastName}`},isEditing:!0,firstNameError:!t.payload.firstName.trim().length,firstNameErrorMessage:"Need a valid first name"}),lastNameEdited:(e,t)=>({...e,localState:{...e.localState,lastName:t.payload.lastName,displayName:`${e.localState.firstName} ${t.payload.lastName}`},isEditing:!0,lastNameError:!t.payload.lastName.trim().length,lastNameErrorMessage:"Need a valid first name"}),userPictureUrlEdited:(e,t)=>({...e,localState:{...e.localState,userPictureUrl:t.payload.userPictureUrl},isEditing:!0,userPictureUrlError:!t.payload.userPictureUrl}),toggleFormErrors:e=>({...e,showAllFormErrors:!0}),resetChangeEmailForm:e=>({...e,newEmail:"",newEmailError:"",newEmailErrorMessage:"",updateEmailStatus:"idle",showAllFormErrors:!1}),resetPasswordForm:e=>({...e,newPassword:"",currentPassword:"",newPasswordRepeat:"",passwordRepeatError:!1,passwordRepeatErrorMessage:"",currentPasswordTestStatus:"idle",updatePasswordStatus:"idle",currentViewIndex:0}),toggleBeaconMode:(e,t)=>{localStorage.setItem("productTourBeaconMode",!!t.payload.checked),e.beaconChecked=!!t.payload.checked},setBeaconMode:(e,t)=>{e.beaconChecked=t.payload}},extraReducers:{"user/account/get/pending":e=>{e.isFetching=!0},"user/account/get/fulfilled":(e,t)=>{e.isFetching=!1,e.localState=t.payload.accountDetails,e.serverState=t.payload.accountDetails},"user/account/update/pending":e=>({...e,updateAccountStatus:"pending"}),"user/account/update/fulfilled":(e,t)=>({...e,updateAccountStatus:"fulfilled",localState:t.payload.accountDetails,serverState:t.payload.accountDetails}),"user/account/update/rejected":e=>({...e,updateAccountStatus:"rejected"}),"user/account/password/test/pending":e=>({...e,currentPasswordTestStatus:"pending"}),"user/account/password/test/rejected":e=>({...e,currentPasswordTestStatus:"rejected",currentPasswordError:!0,showAllFormErrors:!0,currentPasswordErrorMessage:"Password your entered is wrong"}),"user/account/password/test/fulfilled":e=>({...e,currentPasswordTestStatus:"fulfilled",currentViewIndex:1}),"user/account/password/update/pending":e=>({...e,updatePasswordStatus:"pending"}),"user/account/password/update/rejected":e=>({...e,updatePasswordStatus:"rejected"}),"user/account/password/update/fulfilled":e=>({...e,updatePasswordStatus:"fulfilled",currentViewIndex:2}),"user/account/email/update/pending":e=>({...e,updateEmailStatus:"pending"}),"user/account/email/update/rejected":(e,t)=>({...e,updateEmailStatus:"rejected",newEmailError:!0,newEmailErrorMessage:t.payload.isUniqueEmail?"Please try again":"That email is already taken",showAllFormErrors:!0}),"user/account/email/update/fulfilled":(e,t)=>({...e,updateEmailStatus:"fulfilled",localState:t.payload.accountDetails,serverState:t.payload.accountDetails})}}),{currentPasswordEntered:uq,newPasswordEntered:pq,newPasswordRepeatEntered:yq,userPictureUrlEdited:gq,firstNameEdited:mq,lastNameEdited:fq,resetPasswordForm:hq,toggleFormErrors:Sq,newEmailEdited:bq,resetChangeEmailForm:Eq,setBeaconMode:wq,bypassPasswordConfirm:Iq}=mc.actions,_B=mc.reducer,Ut={groups:[],activeGroupId:null,fetchStatus:"idle",mutationStatus:"idle"};function vq(){return{type:"boardGroups/fetch/request"}}function Cq(e){return{type:"boardGroups/create/request",payload:e}}function Aq(e){return{type:"boardGroups/update/request",payload:e}}function Dq(e){return{type:"boardGroups/delete/request",payload:e}}function Tq(e){return{type:"boardGroups/addBoards/request",payload:e}}function Pq(e){return{type:"boardGroups/removeBoard/request",payload:e}}const fc=j({name:"boardGroups",initialState:Ut,reducers:{setActiveGroup:(e,t)=>{e.activeGroupId=t.payload},clearActiveGroup:e=>{e.activeGroupId=null}},extraReducers:{"boardGroups/fetch/pending":e=>{e.fetchStatus="pending"},"boardGroups/fetch/fulfilled":(e,t)=>
11{e.groups=t.payload,e.fetchStatus="fulfilled"},"boardGroups/fetch/rejected":e=>{e.fetchStatus="rejected"},"boardGroups/create/pending":e=>{e.mutationStatus="pending"},"boardGroups/create/fulfilled":(e,t)=>{e.groups=[...e.groups,t.payload].sort((o,a)=>o.name.localeCompare(a.name)),e.mutationStatus="fulfilled"},"boardGroups/create/rejected":e=>{e.mutationStatus="rejected"},"boardGroups/update/request":(e,t)=>{const{boardGroupId:o,name:a,description:s}=t.payload;e.groups=e.groups.map(r=>r.boardGroupId===o?{...r,name:a,description:s}:r).sort((r,i)=>r.name.localeCompare(i.name)),e.mutationStatus="pending"},"boardGroups/update/fulfilled":(e,t)=>{const o=t.payload;e.groups=e.groups.map(a=>a.boardGroupId===o.boardGroupId?{...a,...o}:a).sort((a,s)=>a.name.localeCompare(s.name)),e.mutationStatus="fulfilled"},"boardGroups/delete/request":(e,t)=>{const{boardGroupId:o}=t.payload;e.groups=e.groups.filter(a=>a.boardGroupId!==o),e.activeGroupId===o&&(e.activeGroupId=null),e.mutationStatus="pending"},"boardGroups/delete/fulfilled":e=>{e.mutationStatus="fulfilled"},"boardGroups/addBoards/request":(e,t)=>{const{boardGroupId:o,boardIds:a}=t.payload;e.groups=e.groups.map(s=>{if(s.boardGroupId===o){const r=[...new Set([...s.boardIds||[],...a])];return{...s,boardIds:r,boardCount:r.length}}return s}),e.mutationStatus="pending"},"boardGroups/addBoards/fulfilled":(e,t)=>{const{boardGroupId:o,boardIds:a,boardCount:s}=t.payload;e.groups=e.groups.map(r=>r.boardGroupId===o?{...r,boardIds:a,boardCount:s}:r),e.mutationStatus="fulfilled"},"boardGroups/removeBoard/request":(e,t)=>{const{boardGroupId:o,boardId:a}=t.payload;e.groups=e.groups.map(s=>{if(s.boardGroupId===o){const r=(s.boardIds||[]).filter(i=>i!==a);return{...s,boardIds:r,boardCount:r.length}}return s}),e.mutationStatus="pending"},"boardGroups/removeBoard/fulfilled":(e,t)=>{const{boardGroupId:o,boardIds:a,boardCount:s}=t.payload;e.groups=e.groups.map(r=>r.boardGroupId===o?{...r,boardIds:a,boardCount:s}:r),e.mutationStatus="fulfilled"},"activeAccount/resetActiveAccount":()=>Ut,"activeAccount/setActiveAccount":()=>Ut,"auth/login/fulfilled":()=>Ut,"auth/signup/fulfilled":()=>Ut,"auth/facebookLogin/fulfilled":()=>Ut,"auth/socialLogin/fulfilled":()=>Ut,"auth/logUserOut":()=>Ut}}),{setActiveGroup:Bq,clearActiveGroup:kq}=fc.actions,$B=fc.reducer,ni={serverState:null,localState:{boardsById:{},pinnedBoardIds:[],pinnedBoards:[],unPinnedBoards:[]},getBoardsStatus:"idle",pinBoardStatus:"idle",pinBoardError:!1,pinBoardErrorMessage:"Failed to pin the board",unPinBoardError:!1,unPinBoardErrorMessage:"Failed to pin the board",getBoardsError:!1,getBoardsErrorMessage:"Failed to get boards"};function Lq(e){return{type:"user/board/pin/request",payload:e}}function Fq(e){return{type:"user/board/unPin/request",payload:e}}function rr(e){return Object.keys(e).filter(o=>e[o].pinned)}function fa(e){let t={};return[...e].sort((o,a)=>o.boardName.localeCompare(a.boardName)).map(o=>{t[o.boardId]=o}),t}const to=(e,t)=>e.map(o=>({...o,pinned:t})).sort((o,a)=>o.boardName.localeCompare(a.boardName)),hc=j({name:"myBoards",initialState:ni,reducers:{setInitialState:(e,t)=>{const o=t.payload.activeAccountUserBoardsById;e.boardsById=o,e.pinnedBoardIds=rr(o);const a=Object.values(o);e.localState.pinnedBoards=a.filter(s=>s.pinned),e.localState.unPinnedBoards=a.filter(s=>!s.pinned)},pinBoard:(e,t)=>{e.pinnedBoardIds=[...e.pinnedBoardIds,t.payload.boardId]},unPinBoard:(e,t)=>{const o=t.payload.boardId,a=e.localState.pinnedBoards.find(s=>s.boardId===o);e.pinnedBoardIds=e.pinnedBoardIds.filter(s=>s!==a),e.localState.pinnedBoards=to(e.localState.pinnedBoards.filter(s=>s!==a),!0),e.localState.unPinnedBoards=to([...e.localState.unPinnedBoards,a],!1)}},extraReducers:{"user/board/pin/request":(e,t)=>{const o=t.payload.boardId,a=e.localState.unPinnedBoards.find(s=>s.boardId===o);a&&(e.localState.unPinnedBoards=to(e.localState.unPinnedBoards.filter(s=>s!==a),!1),e.localState.pinnedBoards=to([...e.localState.pinnedBoards,a],!0))},"user/board/unPin/request":(e,t)=>{const o=t.payload.boardId,a=e.localState.pinnedBoards.find(s=>s.boardId===o);e.localState.pinnedBoards=to(e.localState.pinnedBoards.filter(s=>s!==a),!0),e.localState.unPinnedBoards=to([...e.localState.unPinnedBoards,a],!1)},"user/board/pin/pending":e=>({...e,pinBoardStatus:"pending"}),"user/board/pin/fulfilled":e=>({...e,pinBoardStatus:"fulfilled"}),"user/board/pin/rejected":e=>({...e,pinBoardStatus:"rejected"}),"user/board/unPin/pending":e=>({...e,pinBoardStatus:"pending"}),"user/board/unPin/fulfilled":e=>({...e,pinBoardStatus:"fulfilled"}),"user/board/unPin/rejected":e=>({...e,pinBoardStatus:"rejected"}),"user/boards/list/fulfilled":(e,t)=>
11{e.boardsById=fa(t.payload.userBoards),e.pinnedBoardIds=rr(fa(t.payload.userBoards)),e.localState.unPinnedBoards=t.payload.userBoards.filter(o=>!o.pinned),e.localState.pinnedBoards=t.payload.userBoards.filter(o=>o.pinned)},"user/details/fulfilled":(e,t)=>{e.boardsById=fa(t.payload.userDetails.userBoards),e.pinnedBoardIds=rr(fa(t.payload.userDetails.userBoards)),e.localState.unPinnedBoards=t.payload.userDetails.userBoards.filter(o=>!o.pinned),e.localState.pinnedBoards=t.payload.userDetails.userBoards.filter(o=>o.pinned)},"board/follow/fulfilled":(e,t)=>{e.localState.unPinnedBoards=t.payload.userDetails.userBoards.filter(o=>!o.pinned),e.localState.pinnedBoards=t.payload.userDetails.userBoards.filter(o=>o.pinned)},"/manageBoard/deleteBoard/fulfilled":(e,t)=>{var a;const o=(a=t.meta)==null?void 0:a.arg;delete e.boardsById[o],e.pinnedBoardIds=e.pinnedBoardIds.filter(s=>s!==String(o)),e.localState.pinnedBoards=e.localState.pinnedBoards.filter(s=>s.boardId!==o),e.localState.unPinnedBoards=e.localState.unPinnedBoards.filter(s=>s.boardId!==o)},"auth/logUserOut":()=>ni}}),{setInitialState:Uq}=hc.actions,GB=hc.reducer;function Nq(e){return{type:"user/notifications/get/request",payload:e}}function Rq(e){return{type:"user/notifications/update/request",payload:e}}const VB={serverState:null,localState:{hootAprRejEmail:!0,privateMsgEmail:!0,hbUpdatesNotif:!0,myHootPostedEmail:!1,privateMsgNotif:!0,hbUpdatesEmail:!1,hootRemovedEmail:!0,hootAprRejNotif:!0,hootDeletedNotif:!0,rehootNotif:!0,rehootEmail:!0,hootDeletedEmail:!0,hootRemovedNotif:!0,myHootPostedNotif:!1},isEditing:!1,fetchPersonalNotificationSettingsStatus:"idle"},Sc=j({name:"personalNotificationSettings",initialState:VB,reducers:{toggleHootPostedEmail:(e,t)=>({...e,localState:{...e.localState,myHootPostedEmail:t.payload.checked},isEditing:!0}),togglePrivateMsgEmail:(e,t)=>({...e,localState:{...e.localState,privateMsgEmail:t.payload.checked},isEditing:!0}),toggleHootAprRejEmail:(e,t)=>({...e,localState:{...e.localState,hootAprRejEmail:t.payload.checked},isEditing:!0}),toggleHbUpdatesEmail:(e,t)=>({...e,localState:{...e.localState,hbUpdatesEmail:t.payload.checked},isEditing:!0}),toggleHootRemovedEmail:(e,t)=>({...e,localState:{...e.localState,hootRemovedEmail:t.payload.checked},isEditing:!0}),toggleRehootEmail:(e,t)=>({...e,localState:{...e.localState,rehootEmail:t.payload.checked},isEditing:!0}),toggleHootDeletedEmail:(e,t)=>({...e,localState:{...e.localState,hootDeletedEmail:t.payload.checked},isEditing:!0})},extraReducers:{"user/notifications/get/fulfilled":(e,t)=>({...e,serverState:t.payload.notificationSettings,localState:t.payload.notificationSettings,isEditing:!1,fetchPersonalNotificationSettingsStatus:"fulfilled"}),"user/notifications/get/pending":e=>({...e,fetchPersonalNotificationSettingsStatus:"pending"}),"user/notifications/get/rejected":e=>({...e,fetchPersonalNotificationSettingsStatus:"rejected"}),"user/notifications/update/fulfilled":(e,t)=>({...e,serverState:t.payload.notificationSettings,localState:t.payload.notificationSettings,isEditing:!1,updatePersonalNotificationSettingsStatus:"fulfilled"}),"user/notifications/update/pending":e=>({...e,updatePersonalNotificationSettingsStatus:"pending"}),"user/notifications/update/rejected":e=>({...e,updatePersonalNotificationSettingsStatus:"rejected"})}}),{toggleHootAprRejEmail:Hq,toggleHbUpdatesEmail:xq,toggleHootDeletedEmail:Mq,toggleHootPostedEmail:Oq,toggleHootRemovedEmail:jq,togglePrivateMsgEmail:qq,toggleRehootEmail:_q}=Sc.actions,JB=Sc.reducer,$q=e=>te(new Date(e),"MMM d, yyyy"),bc=e=>{const t=[...e.tiers||[]],o=t.sort((d,p)=>p.up_to-d.up_to).filter(d=>d.up_to),a=t.find(d=>!d.up_to)||{};let s={};for(const d of o)e.quantity<=d.up_to&&(s={...d});let r=null;s.unit_amount_decimal?r=parseFloat(`${s.unit_amount_decimal}`):r=parseFloat(`${a.unit_amount_decimal||e.price}`);const i=+(s.flat_amount_decimal||0),l=r*e.quantity+i;return{unitPrice:r,totalPrice:l}},nr=e=>e.reduce((t,o)=>parseFloat(`${t}`)+parseFloat(`${o.totalPrice}
11`),0),zB=e=>{const t=e.map(o=>({pricingId:o.pricingId,licenseType:o.licenseType,noOfLicenses:o.quantity}));return JSON.stringify(t)},Gq=e=>{const t={...e,purchasedLicenses:e.items};return delete t.items,t},Vq=e=>{let o=(e||[]).filter(l=>["active","past_due"].includes(l.status)).reduce((l,d)=>[...l,...d.productItems],[]);const a=l=>["UBF","UBM"].includes(l.licenseType),r=o.filter(a).reduce((l,d)=>l+d.quantity,0);return r>0&&(o=[...o.filter(l=>!a(l)),{currency:"$",itemName:"User Based Pricing",licenseType:"UBP",quantity:r}]),o.reduce((l,d)=>{const p=v=>v.itemName===d.itemName,h=l.find(p);return h?[{...h,quantity:h.quantity+d.quantity},...l.filter(v=>!p(v))]:[d,...l]},[])},Jq=e=>{const t=a=>["UBF","UBM"].includes(a.licenseType),o=e.filter(t);return o.length===0?e:[...e.filter(a=>!t(a)),{planName:"HootBoard for Web & Mobile",description:"Pay per user for your web and mobile. See below how much we charge for different types of users.",isGrouped:!0,sequence:o[0].sequence,isOneTime:!0,licenseType:"UBP",items:o.map(a=>({...a,shortName:(()=>{switch(a.licenseType){case"UBF":return"Followers";case"UBM":return"Members";default:return"Others"}})(),description:(()=>{switch(a.licenseType){case"UBF":return"Can only view public hoots and apps.";case"UBM":return"Can post, view private hoots and apps.";default:return""}})()}))}]},zq=e=>{const t=s=>["UBF","UBM"].includes(s.licenseType),o=e.filter(t);if(o.length===0)return e;const a=o.reduce((s,r)=>s+parseFloat(r.totalPrice),0);return[...e.filter(s=>!t(s)),{name:"HootBoard for Web & Mobile",isGrouped:!0,currency:o[0].currency,items:o.map(s=>({...s,shortName:(()=>{switch(s.licenseType){case"UBF":return"Followers";case"UBM":return"Members";default:return"Others"}})()})),totalPrice:a}]},Wq=e=>!(e||[]).reduce((a,s)=>[...a,...s.productItems],[]).some(a=>["UBF","UBM"].includes(a.licenseType)),Yq=e=>e.map(t=>{const o=t.productItems.map(r=>{const i=bc({price:r.unitAmount||0,quantity:r.quantity||0,tiers:r.tiers||[]});return{...r,...i}}),a=o.reduce((r,i)=>r+i.totalPrice,0);let s=0;return(t.coupon||{}).couponId&&(s=a*t.coupon.percentOff/100),{...t,productItems:o,totalAmount:a,discount:s}}),Kq=({boardId:e})=>({type:_.fetchProductPricing+"request",payload:{boardId:e}}),Qq=({boardId:e})=>({type:_.fetchCustomerCard+"request",payload:{boardId:e}}),Zq=({boardId:e,stripeToken:t})=>({type:_.saveCard+"request",payload:{boardId:e,stripeToken:t}}),Xq=({boardId:e})=>({type:_.fetchBoardSubscriptions+"request",payload:{boardId:e}}),e_=({boardId:e,subscriptionId:t,cancelsOn:o})=>({type:_.subscriptionCancellation+"request",payload:{boardId:e,subscriptionId:t,cancelsOn:o}}),t_=({boardId:e,adminEmail:t})=>({type:_.updateCustomerDetails+"request",payload:{boardId:e,adminEmail:t}}),o_=({boardId:e,subscriptionId:t,billingMethod:o})=>({type:_.updateBillingMethod+"request",payload:{boardId:e,subscriptionId:t,billingMethod:o}}),a_=({boardId:e,subscriptionId:t})=>({type:_.fetchInvoices+"request",payload:{boardId:e,subscriptionId:t}}),s_=e=>({type:_.processCheckout+"request",payload:{...e,cartItems:zB(e.cartItems)}}),r_=(e,t)=>({type:_.notifyAdmin+"request",payload:{boardId:e,isLegacyPricingEnabled:t}}),ii=e=>{let t=e.processForSuccess;return e.includeTrial&&(t="trial"),e.boardSubscriptions.length>0?t="addLicenses":t="upgrade",t},ir={pageSelected:0,includeTrial:!1,cancelsOn:null,boardPricingPlan:{},customerCard:{},customerId:"",customerEmail:"",customerCardFetchStatus:"pending",saveCardStatus:"idle",upgradeBoardProcessStatus:"idle",planInterval:"YR",cart:{payableAmount:0,monthlyAmount:0,items:[]},purchasedLicensesAmount:0,showAddCardControl:!0,saveOnlyCard:!1,existingPurchasedLicenses:null,purchaseAdditionalLicenses:!1,startTrialProcessStatus:"idle",productPricing:[],fetchProductPricingStatus:"idle",notifyAdminAPIStatus:"idle",processForSuccess:"upgrade",fetchBoardSubscriptionsStatus:"idle",boardSubscriptions:[],showCancelSubscriptionModal:!1,cancelSubscriptionStatus:"idle",showChangePaymentMethodModal:!1,subscriptionIdForChange:"",billingMethodForChange:"",showChangeAdminModal:!1,updateCustomerStatus:"idle",showChangeCardModal:!1,updateSubscriptionStatus:"idle",showPreviousInvoicesModal:!1,previousInvoices:[],fetchInvoicesStatus:"idle",requestInvoice:!1,isTrialCancel:!1},Ec=j({name:"pricingLegacy",initialState:ir,reducers:{clearUpgradeData:()=>ir,setTrial:e=>{e.includeTrial=!0},setCustomerStatusIdle:e=>{e.updateCustomerStatus="idle"},setTrialCancel:(e,t)=>
11{e.isTrialCancel=t.payload},setSubscriptionCancelOn:(e,t)=>{e.cancelsOn=t.payload},setUpgradeBoardProcessStatus:(e,t)=>{e.upgradeBoardProcessStatus=t.payload?"pending":"idle",t.payload&&(e.saveCardStatus="idle")},openPricingPage:e=>{e.pageSelected=0},openManageSubscriptionsPage:e=>{e.pageSelected=2},openUpgradeSuccessPage:(e,t)=>({...e,pageSelected:3,processForSuccess:t.payload}),planIntervalChanged:(e,t)=>{const o=t.payload||"YR";if(o!==e.planInterval){e.planInterval=o;const a=[];for(const i of e.cart.items){const l=e.productPricing.find(d=>d.licenseType===i.licenseType&&d.interval===o);if(l){const d=bc({quantity:i.quantity,price:l.amount,tiers:l.tiers}),p={name:l.planName,quantity:i.quantity,currency:l.currency.toUpperCase(),pricingId:l.pricingId,licenseType:l.licenseType,unitPrice:d.unitPrice,totalPrice:d.totalPrice};o==="YR"&&(p.unitPrice=p.unitPrice/12,p.totalPrice=p.totalPrice/12),a.push(p)}}const s=nr(a);let r=s;e.planInterval==="YR"&&(r=r*12),e.cart={items:a,payableAmount:r,monthlyAmount:s}}},setShowAddCardControl:(e,t)=>({...e,showAddCardControl:t.payload}),saveOnlyCardSelected:(e,t)=>{e.saveOnlyCard=t.payload},changePaymentMethodModalOpened:(e,t)=>{e.showChangePaymentMethodModal=t.payload},subscriptionIdForChangeAdded:(e,t)=>({...e,subscriptionIdForChange:t.payload,updateSubscriptionStatus:"idle"}),billingMethodForChangeAdded:(e,t)=>({...e,billingMethodForChange:t.payload}),changeAdminModalOpened:(e,t)=>{e.showChangeAdminModal=t.payload,e.updateCustomerStatus="idle"},changeCardModalOpened:(e,t)=>{e.showChangeCardModal=t.payload},viewPreviousInvoicesModalOpened:(e,t)=>{e.showPreviousInvoicesModal=t.payload},cancelSubscriptionModalOpened:(e,t)=>{e.showCancelSubscriptionModal=t.payload},resetCart:e=>{e.cart=ir.cart},addToCart:(e,t)=>{const o=t.payload;let a=[...e.cart.items];const s=a.find(l=>l.pricingId===o.pricingId);s?(s.quantity+=o.quantity,s.totalPrice=s.quantity*s.unitPrice,a=a.filter(l=>l.pricingId!==o.pricingId),a.push(s)):a.push(o);const r=nr(a);let i=r;e.planInterval==="YR"&&(i=i*12),e.cart={items:a,monthlyAmount:r,payableAmount:i}},removeFromCart:(e,t)=>{let o=e.cart.items.filter((l,d)=>d!==t.payload);const a=l=>["UBF","UBM"].includes(l.licenseType);o.filter(a).length===1&&(o=o.filter(l=>!a(l)));const r=nr(o);let i=r;e.planInterval==="YR"&&(i=i*12),e.cart={items:o,monthlyAmount:r,payableAmount:i}},proceedToPayment:e=>{e.pageSelected=1}},extraReducers:{[_.fetchCustomerCard+"fulfilled"]:(e,t)=>{if(t.payload!==void 0){let o=t.payload.data;if(o&&o.custCard)o.custCard.cardId&&(e.showAddCardControl=!1),e.customerCard=o.custCard,e.customerId=o.customerId,e.customerEmail=o.customerEmail,e.customerCardFetchStatus="success";else return{...e,customerCardFetchStatus:"success"}}else return{...e,customerCardFetchStatus:"rejected"}},[_.fetchCustomerCard+"pending"]:e=>({...e,customerCardFetchStatus:"pending"}),[_.fetchCustomerCard+"rejected"]:e=>({...e,customerCardFetchStatus:"rejected"}),[_.saveCard+"fulfilled"]:(e,t)=>{if(t.payload&&t.payload.data){let o=t.payload.data;return{...e,showAddCardControl:!1,customerCard:o.custCard,saveCardStatus:"success"}}else return{...e,saveCardStatus:"rejected"}},[_.saveCard+"pending"]:e=>({...e,saveCardStatus:"pending"}),[_.saveCard+"rejected"]:e=>({...e,saveCardStatus:"rejected",upgradeBoardProcessStatus:"idle"}),[_.processCheckout+"pending"]:e=>{e.upgradeBoardProcessStatus="pending"},[_.processCheckout+"pending"]:e=>({...e,showSpinner:!0,isError:!1,errorMessage:"",upgradeBoardProcessStatus:"pending"}),[_.processCheckout+"fulfilled"]:e=>({...e,showSpinner:!1,isError:!1,errorMessage:"",pageSelected:3,processForSuccess:ii(e),upgradeBoardProcessStatus:"fulfilled"}),[_.processCheckout+"rejected"]:e=>({...e,showSpinner:!1,isError:!0,upgradeBoardProcessStatus:"idle",processForSuccess:ii(e),errorMessage:"Error occurred while adding licenses!"}),[_.startBoardTrial+"fulfilled"]:(e,t)=>t.payload?{...e,startTrialProcessStatus:"success"}:{...e,startTrialProcessStatus:"rejected"},[_.startBoardTrial+"rejected"]:e=>({...e,startTrialProcessStatus:"rejected"}),[_.startBoardTrial+"pending"]:e=>({...e,startTrialProcessStatus:"pending"}),[_.fetchProductPricing+"fulfilled"]:(e,t)=>{if(t.payload!==void 0){const o=t.payload;let a=o&&Array.isArray(o.data)?o.data:[];return a&&(a=a.filter(s=>s.productId).map(s=>
11{const r=JSON.parse(s.features),i=(s.addOns||[]).map(l=>({...l,features:JSON.parse(l.features||"[]")}));return{...s,features:r,addOns:i,currency:"$"}})),{...e,productPricing:a,fetchProductPricingStatus:"success"}}else return{...e,fetchProductPricingStatus:"rejected"}},[_.fetchProductPricing+"pending"]:e=>({...e,fetchProductPricingStatus:"pending"}),[_.fetchProductPricing+"rejected"]:e=>({...e,fetchProductPricingStatus:"rejected"}),[_.fetchBoardSubscriptions+"fulfilled"]:(e,t)=>t.payload!==void 0?{...e,boardSubscriptions:(t.payload&&Array.isArray(t.payload.data)?t.payload.data:[]).map(o=>({...o,currency:"$",productItems:(o.productItems||[]).map(a=>({...a,currency:"$"}))})),fetchBoardSubscriptionsStatus:"success"}:{...e,fetchBoardSubscriptionsStatus:"rejected"},[_.fetchBoardSubscriptions+"pending"]:e=>({...e,fetchBoardSubscriptionsStatus:"pending"}),[_.fetchBoardSubscriptions+"rejected"]:e=>({...e,fetchBoardSubscriptionsStatus:"rejected"}),[_.subscriptionCancellation+"fulfilled"]:(e,t)=>t.payload!==void 0?{...e,cancelSubscriptionStatus:"success"}:{...e,cancelsOn:null,cancelSubscriptionStatus:"rejected"},[_.subscriptionCancellation+"pending"]:e=>({...e,cancelSubscriptionStatus:"pending"}),[_.subscriptionCancellation+"rejected"]:e=>({...e,cancelsOn:null,cancelSubscriptionStatus:"rejected"}),[_.updateCustomerDetails+"fulfilled"]:(e,t)=>t.payload&&t.payload.data&&t.payload.data.updatedEmail?{...e,customerEmail:t.payload.data.updatedEmail,updateCustomerStatus:"success"}:{...e,updateCustomerStatus:"rejected"},[_.updateCustomerDetails+"pending"]:e=>({...e,updateCustomerStatus:"pending"}),[_.updateCustomerDetails+"rejected"]:e=>({...e,updateCustomerStatus:"rejected"}),[_.updateBillingMethod+"fulfilled"]:(e,t)=>{if(t.payload){let o=[...e.boardSubscriptions];if(t.payload.data){const a=t.payload.data;o=o.map(s=>s.subscriptionId===a.subscriptionId?a:s)}return{...e,updateSubscriptionStatus:"success",boardSubscriptions:o}}else return{...e,updateSubscriptionStatus:"rejected"}},[_.updateBillingMethod+"pending"]:e=>({...e,updateSubscriptionStatus:"pending"}),[_.updateBillingMethod+"rejected"]:e=>({...e,updateSubscriptionStatus:"rejected"}),[_.fetchInvoices+"fulfilled"]:(e,t)=>t.payload!==void 0?{...e,previousInvoices:t.payload&&Array.isArray(t.payload.data)?t.payload.data:[],fetchInvoicesStatus:"success"}:{...e,fetchInvoicesStatus:"rejected"},[_.fetchInvoices+"pending"]:e=>({...e,fetchInvoicesStatus:"pending"}),[_.fetchInvoices+"rejected"]:e=>({...e,fetchInvoicesStatus:"rejected"}),[_.notifyAdmin+"pending"]:e=>{e.notifyAdminAPIStatus="pending"},[_.notifyAdmin+"rejected"]:e=>{e.notifyAdminAPIStatus="rejected"},[_.notifyAdmin+"fulfilled"]:e=>{e.notifyAdminAPIStatus="fulfilled"}}}),{clearUpgradeData:n_,openPricingPage:i_,setSubscriptionCancelOn:l_,setTrialCancel:d_,setCustomerStatusIdle:c_,openManageSubscriptionsPage:u_,openUpgradeSuccessPage:p_,planIntervalChanged:y_,setShowAddCardControl:g_,
11setUpgradeBoardProcessStatus:m_,saveOnlyCardSelected:f_,changePaymentMethodModalOpened:h_,subscriptionIdForChangeAdded:S_,billingMethodForChangeAdded:b_,changeAdminModalOpened:E_,changeCardModalOpened:w_,viewPreviousInvoicesModalOpened:I_,cancelSubscriptionModalOpened:v_,addToCart:C_,removeFromCart:A_,proceedToPayment:D_}=Ec.actions,WB=Ec.reducer,T_=e=>({type:ve.markTourAsFinished+"request",payload:e}),P_=e=>({type:ve.markTourAsSkipped+"request",payload:e}),B_=()=>({type:ve.getAllTourStatuses+"request"}),YB={dataLoaded:!1,isDisabled:!1,completedTours:[],activeTour:"",open:{},disableBeacon:!0},wc=j({name:"productTour",initialState:YB,reducers:{runProductTour:(e,t)=>{const{tourName:o,open:a,disableBeacon:s}=t.payload;e.isDisabled=!1,o&&(e.open[o]=a),e.activeTour=o,s!==void 0&&(e.disableBeacon=s)},setActiveTour:(e,t)=>{e.activeTour=t.payload},setBeaconState:(e,t)=>{e.disableBeacon=t.payload},disableTour:e=>{e.isDisabled=!0}},extraReducers:{[ve.markTourAsFinished+"request"]:(e,t)=>{const o=t.payload;e.completedTours.includes(o)||(e.completedTours=[...e.completedTours,o])},[ve.markTourAsSkipped+"request"]:(e,t)=>{const o=t.payload;e.completedTours.includes(o)||(e.completedTours=[...e.completedTours,o])},[ve.getAllTourStatuses+"fulfilled"]:(e,t)=>{const o=t.payload;e.dataLoaded=!0,e.completedTours=o.filter(a=>["completed","skipped"].includes(a.onboardingTourStatus)).map(a=>a.onboardingTourName)}}}),{runProductTour:k_,setActiveTour:L_,disableTour:F_}=wc.actions,KB=wc.reducer,lr={isError:!1,isLoading:!1,isFinished:!1,isScheduleDemoModelOpen:!1,isOkToSubmit:!1,errors:{firstName:"First name is required",lastName:"Last name is required",email:"Please enter an email address",phone:"Phone number is required",details:"Details required",organization:"Organization name required"},localState:{}},Ic=j({name:"scheduleDemo",initialState:{...lr,localState:Object.keys(lr.errors).reduce((e,t)=>({...e,[t]:""}),{})},reducers:{toggleScheduleDemoModel:e=>({...lr,isScheduleDemoModelOpen:!e.isScheduleDemoModelOpen}),inputChange:(e,t)=>
11{const o=t.payload;e.localState={...e.localState,...o};const a=Object.keys(e.localState).filter(i=>!!e.localState[i]&&e.localState[i]!==""),s={};for(const i of a)s[i]=null;if(e.errors={...e.errors,...s},o.phone&&!e.errors.phone){const i=Je.phoneNumber(o.phone);e.errors.phone=i.hasError?i.errorMessage:null}o.email&&!e.errors.email&&(/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,10})+$/.test(o.email)||(e.errors.email="Invalid email id"));const r=/^[a-zA-Z\s'\-.]+$/;for(const i of["firstName","lastName"])o[i]&&!e.errors[i]&&(r.test(o[i])||(e.errors[i]="Please enter a valid name"));e.isOkToSubmit=Object.keys(e.errors).filter(i=>e.errors[i]!==null).length===0}},extraReducers:{"schedule-demo/pending":e=>{e.isError=!1,e.isLoading=!0,e.isFinished=!1},"schedule-demo/fulfilled":e=>{e.isError=!1,e.isLoading=!1,e.isFinished=!0},"schedule-demo/rejected":e=>{e.isError=!0,e.isLoading=!1,e.isFinished=!0}}}),U_=e=>({type:"schedule-demo/request",payload:e}),{inputChange:N_,toggleScheduleDemoModel:R_}=Ic.actions,QB=Ic.reducer,H_=(e,t=!1)=>{if(t)return{type:"screen/update/request",payload:{...e,params:{...e.params}}};{const o={};for(const a of e.params.idleStates)o[a.keyName]=a.isActive,o[a.configKeyName]=JSON.stringify(a.config);return{type:"screen/update/request",payload:{...e,params:{...e.params,idleStates:o}}}}},x_=e=>({type:"screen/delete/request",payload:e}),M_=e=>({type:`${z.getScreen}request`,payload:e}),dr={steps:["Info","Content","Location","Device Management"],currentStep:0,localState:{screenName:"",screenType:"INT",screenLayout:"POR",showPrivatePosts:!1,showBoardCommunityCode:!1,collections:"",showPosterName:!1,showInfoPage:!1,mobileJoin:!1,showComments:!1,screensDefaultView:"AV",screenLocation:{formattedAddress:""},locationText:"",locationAppUrl:"",screenJoiningAccess:"FL",idleStates:[{name:"Concierge Home Page",keyName:"conciergeHomePage",configKeyName:"conciergeConfig",config:{title:""}},{name:"Digital Signage",keyName:"digitalSignage",configKeyName:"digitalSignageConfig"},{name:"App Switcher",keyName:"appSwitcher",configKeyName:"appSwitcherConfig"},{name:"Hoot Switcher",keyName:"hootSwitcher",configKeyName:"hootSwitcherConfig"},{name:"Collection Switcher",keyName:"collectionSwitcher",configKeyName:"collectionSwitcherConfig",config:{collections:"",behaviour:"union"}},{name:"Tap Anywhere Animation",keyName:"tapAnywhereAnimation",configKeyName:"tapAnywhereAnimationConfig"},{name:"Upcoming Events Switcher",keyName:"upcomingEventSwitcher",configKeyName:"upcomingEventSwitcherConfig"},{name:"Fullscreen Image Switcher",keyName:"fullScreenImageSwitcher",configKeyName:"fullScreenImageSwitcherConfig",config:{collections:"",behaviour:"union"}}],screenSize:"32_to_55",iconSize:"0",displayWidthInPixels:null,displayHeightInPixels:null,aspectRatio:null,pixelDensity:null,resolution:"custom",viewOnMobile:!0,openHootsFromIdleClick:!1,showUnifiedAppIcon:!1,welcomeTitle:"Hello",welcomeSubtitle:"How can I help you today?"},serverState:null,isEditing:!1,loadScreenStatus:"idle",deleteScreenStatus:"idle",updateScreenStatus:"idle",showAllFormErrors:!1,screenNameError:!1,screenNameErrorMessage:"Enter a name or nick-name for your screen",screenLocationError:!1,screenLocationErrorMessage:"Please enter the location of the screen",locationTextError:!1,locationTextErrorMessage:"Please enter valid text",locationAppUrlError:!1,locationAppUrlErrorMessage:"Please enter a valid URL"},vc=j({name:"updateScreen",initialState:dr,reducers:{updateIdleState:(e,t)=>{const{index:o,data:a}=t.payload;e.localState.idleStates[o]=a},assignedContentChanged:(e,t)=>({...e,localState:{...e.localState,...t.payload}}),collectionChanged:(e,t)=>({...e,localState:{...e.localState,collections:t.payload.collections}}),screenNameChanged:(e,t)=>({...e,localState:{...e.localState,screenName:rt(t.payload.screenName)},screenNameError:!(t.payload.screenName&&t.payload.screenName.trim()&&t.payload.screenName.trim().length)}),screenLayoutChanged:(e,t)=>({...e,localState:{...e.localState,screenLayout:t.payload.screenLayout}}),toggleShowPrivatePosts:e=>({...e,localState:{...e.localState,showPrivatePosts:!e.localState.showPrivatePosts}}),toggleShowBoardCommunityCode:e=>({...e,localState:{...e.localState,showBoardCommunityCode:!e.localState.showBoardCommunityCode}}
11),toggleShowComments:e=>({...e,localState:{...e.localState,showComments:!e.localState.showComments}}),toggleShowPosterName:e=>({...e,localState:{...e.localState,showPosterName:!e.localState.showPosterName}}),toggleShowInfoPage:e=>({...e,localState:{...e.localState,showInfoPage:!e.localState.showInfoPage}}),toggleMobileJoin:e=>({...e,localState:{...e.localState,mobileJoin:!e.localState.mobileJoin}}),screenLocationChanged:(e,t)=>({...e,localState:{...e.localState,screenLocation:t.payload.screenLocation},screenLocationError:!(t.payload.screenLocation&&t.payload.screenLocation.formattedAddress)}),screenTimezoneChanged:(e,t)=>({...e,localState:{...e.localState,screenLocation:{...e.localState.screenLocation,timezone:t.payload.timezone,timezoneMode:t.payload.timezoneMode}}}),locationAppUrlChanged:(e,t)=>({...e,localState:{...e.localState,locationAppUrl:t.payload.locationAppUrl},locationAppUrlError:t.payload.locationAppUrl&&t.payload.locationAppUrl.trim()&&t.payload.locationAppUrl.trim().length?!Cl(t.payload.locationAppUrl):!0}),locationTextChanged:(e,t)=>({...e,localState:{...e.localState,locationText:t.payload.locationText},locationTextError:!(t.payload.locationText&&t.payload.locationText.trim()&&t.payload.locationText.trim().length)}),screenJoiningAccessChanged:(e,t)=>({...e,localState:{...e.localState,screenJoiningAccess:t.payload.screenJoiningAccess}}),screensDefaultViewChanged:(e,t)=>({...e,localState:{...e.localState,screensDefaultView:t.payload.screensDefaultView}}),nextStep:e=>{if(!(e.currentStep>=e.steps.length-1))return{...e,currentStep:e.currentStep+1}},prevStep:e=>{if(!(e.currentStep<=0))return{...e,currentStep:e.currentStep-1}},jumpToStep:(e,t)=>({...e,currentStep:t.payload.targetStep}),resetUpdateScreen:()=>dr,showFormErrors:e=>({...e,showAllFormErrors:!0}),updateCollectionsAndSequences:(e,t)=>({...e,localState:{...e.localState,collections:t.payload.collections,defaultSequenceId:t.payload.defaultSequenceId}}),updateScreenSize:(e,t)=>({...e,localState:{...e.localState,screenSize:t.payload.screenSize}}),updateIconSize:(e,t)=>({...e,localState:{...e.localState,iconSize:t.payload.iconSize}}),updateScreenGroups:(e,t)=>({...e,localState:{...e.localState,boardScreenGroupIds:t.payload.boardScreenGroupIds}}),updatePowerSchedule:(e,t)=>({...e,localState:{...e.localState,screenPowerSchedule:t.payload.screenPowerSchedule}}),updateDisplayWidthInPixels:(e,t)=>({...e,localState:{...e.localState,displayWidthInPixels:t.payload.displayWidthInPixels}}),updateDisplayHeightInPixels:(e,t)=>({...e,localState:{...e.localState,displayHeightInPixels:t.payload.displayHeightInPixels}}),updateAspectRatio:(e,t)=>({...e,localState:{...e.localState,aspectRatio:t.payload.aspectRatio}}),updatePixelDensity:(e,t)=>({...e,localState:{...e.localState,pixelDensity:t.payload.pixelDensity}}),updateResolution:(e,t)=>({...e,localState:{...e.localState,resolution:t.payload.resolution}}),toggleViewOnMobile:(e,t)=>({...e,localState:{...e.localState,viewOnMobile:t.payload.viewOnMobile}}),welcomeTitleChanged:(e,t)=>({...e,localState:{...e.localState,welcomeTitle:rt(t.payload.welcomeTitle)}}),welcomeSubtitleChanged:(e,t)=>({...e,localState:{...e.localState,welcomeSubtitle:rt(t.payload.welcomeSubtitle)}})},extraReducers:{"screen/update/pending":e=>{e.updateScreenStatus="pending"},"screen/update/fulfilled":(e,t)=>{e.updateScreenStatus="fulfilled",e.serverState=e.localState},"screen/update/rejected":e=>{e.updateScreenStatus="rejected"},"screen/delete/pending":e=>{e.deletedScreenData={screenId:null}},"screen/delete/fulfilled":(e,t)=>({...e,deleteScreenStatus:"fulfilled",deletedScreenData:{screenId:t.payload.screenId,screenName:t.payload.screenName}}),[z.getScreen+"pending"]:e=>{e.loadScreenStatus="pending"},[z.getScreen+"rejected"]:e=>{e.loadScreenStatus="rejected"},[z.getScreen+"fulfilled"]:(e,t)=>{var i;const o=t.payload;let a={...o,boardScreenGroupIds:((i=o.screenGroups)==null?void 0:i.map(l=>l.boardScreenGroupId))||[]};const s=o.idleStates;let r=dr.localState.idleStates;return s?r=r.map(l=>{const d={...l.config||{},...JSON.parse(s[l.configKeyName])};return{...l,config:d,isActive:s[l.keyName],isConfigurable:Object.entries(d).length>1,isMoreConfigOpen:!1}}):r=r.map(l=>({...l,config:{...l.config||{},duration:20},isActive:!1,isConfigurable:!!l.config,isMoreConfigOpen:!1})),a={...a,idleStates:r},{...e,localState:a,loadScreenStatus:"fulfilled",serverState:a}}}}),{screenNameChanged:O_,screenJoiningAccessChanged:j_,screenLayoutChanged:q_,toggleShowPrivatePosts:__,toggleShowBoardCommunityCode:$_,toggleShowComments:G_,toggleShowPosterName:V_,toggleShowInfoPage:J_,toggleMobileJoin:z_,locationAppUrlChanged:W_,locationTextChanged:Y_,screenLocationChanged:K_,screenTimezoneChanged:Q_,screensDefaultViewChanged:Z_,jumpToStep:X_,resetUpdateScreen:e$,updateCollectionsAndSequences:t$,updateScreenSize:o$,updateIconSize:a$,updateScreenGroups:s$,updatePowerSchedule:r$,updateDisplayWidthInPixels:n$,updateDisplayHeightInPixels:i$,updateAspectRatio:l$,updatePixelDensity:d$,updateResolution:c$,toggleViewOn
11Mobile:u$,welcomeTitleChanged:p$,welcomeSubtitleChanged:y$}=vc.actions,ZB=vc.reducer,li={appUpgradeItem:null,appPricingData:null,isYearlyPricing:!0,appPrice:null,screenPrice:null,freeScreens:null,paidScreens:null,grandTotal:null,clientSecret:null,getClientSecretAsyncState:f.IDLE,getClientSecretErrorState:"",paymentStatus:null,paidViaInvoice:null},nn=j({name:"app-upgrade",initialState:li,reducers:{resetAppUpgradeState:()=>li},extraReducers(e){e.addCase(ne.addAppUpgradeItem,(t,o)=>{t.appUpgradeItem=o.payload}),e.addCase(ne.setAppPricingData,(t,o)=>{t.appPricingData=o.payload}),e.addCase(ne.setIsYearlyPricing,(t,o)=>{t.isYearlyPricing=o.payload}),e.addCase(ne.setAppPrice,(t,o)=>{t.appPrice=o.payload}),e.addCase(ne.setScreenPrice,(t,o)=>{t.screenPrice=o.payload}),e.addCase(ne.setFreeScreens,(t,o)=>{t.freeScreens=o.payload}),e.addCase(ne.setPaidScreens,(t,o)=>{t.paidScreens=o.payload}),e.addCase(ne.setGrandTotal,(t,o)=>{t.grandTotal=o.payload}),e.addCase(ne.getClientSecret+u.PENDING,t=>{t.getClientSecretAsyncState=f.PENDING}),e.addCase(ne.getClientSecret+u.FULFILLED,(t,o)=>{t.clientSecret=o.payload,t.getClientSecretAsyncState=f.FULFILLED}),e.addCase(ne.getClientSecret+u.REJECTED,(t,o)=>{t.getClientSecretErrorState=o.payload,t.getClientSecretAsyncState=f.REJECTED}),e.addCase(ne.setPaymentStatus,(t,o)=>{t.paymentStatus=o.payload}),e.addCase(ne.setPaidViaInvoice,(t,o)=>{t.paidViaInvoice=o.payload})}}),XB=R(ne.addAppUpgradeItem),ek=R(ne.setAppPricingData),tk=R(ne.setIsYearlyPricing),ok=R(ne.setAppPrice),ak=R(ne.setScreenPrice),sk=R(ne.setFreeScreens),rk=R(ne.setPaidScreens),nk=R(ne.setGrandTotal),ik=R(ne.getClientSecret),lk=R(ne.setPaymentStatus),dk=R(ne.setPaidViaInvoice),{resetAppUpgradeState:ck}=nn.actions,g$={...nn.actions,addAppUpgradeItem:XB,setAppPricingData:ek,setIsYearlyPricing:tk,setAppPrice:ok,setScreenPrice:ak,setFreeScreens:sk,setPaidScreens:rk,setGrandTotal:nk,getClientSecret:ik,resetAppUpgradeState:ck,setPaymentStatus:lk,setPaidViaInvoice:dk},uk=nn.reducer,cr=x("/rehoot/submit",async(e,t)=>{const{rehoot:{selectedBoards:o,selectedCollections:a,hoot:s}}=t.getState(),r=a.map(({filterText:d})=>d).join(),i=o.map(({boardId:d})=>({boardId:Number(d),tagsText:r})),l=await t0(s.id,i);return t.dispatch(ed(s)),t.dispatch(zd(s)),t.dispatch(oB(s)),{response:l}}),di=x("/rehoot/getCollections",async(e,t)=>{const{rehoot:{selectedBoards:o}}=t.getState();if(o.length===0)return{collections:[]};const s=(await Promise.all(o.map(l=>cl(l.boardId).then(d=>({res:d,boardId:l.boardId}))))).reduce((l,d)=>(d.res.filters&&(l[d.boardId]=d.res.filters),l),{}),r=Object.keys(s).reduce((l,d)=>(s[d].forEach(p=>{l[p.filterText]=p}),l),{});return{collections:Object.keys(r).map(l=>r[l])}}),ur=x("/rehoot/getBoards",async({id:e})=>{const t=await VS({postId:e});return t.data?t.data:[]}),Cc=j({name:"rehoot",initialState:{hoot:null,boards:[],selectedBoards:[],collections:[],selectedCollections:[],rehootStatus:"",boardsFetchStatus:"idle"},reducers:{addBoard:(e,t)=>{e.selectedBoards.push(t.payload)},removeBoard:(e,t)=>{e.selectedBoards=e.selectedBoards.filter(({boardId:o})=>o!==t.payload.boardId)},addCollection:(e,t)=>{e.selectedCollections.push(t.payload)},removeCollection:(e,t)=>{e.selectedCollections=e.selectedCollections.filter(({filterText:o})=>o!==t.payload.filterText)},setHoot:(e,t)=>{e.hoot=t.payload},close:e=>{e.hoot=null,e.selectedBoards=[],e.collections=[],e.selectedCollections=[],e.rehootStatus=""}},extraReducers:{[ur.fulfilled]:(e,t)=>{e.boards=t.payload,e.boardsFetchStatus="fulfilled"},[ur.pending]:e=>{e.boardsFetchStatus="pending"},[ur.rejected]:e=>{e.boardsFetchStatus="rejected"},[cr.fulfilled]:(e,t)=>{const{response:o}=t.payload;o&&o.status==="error"?e.rehootStatus="rejected":e.rehootStatus="fulfilled"},[cr.pending]:e=>{e.rehootStatus="pending"},[cr.rejected]:e=>{e.rehootStatus="rejected"},[di.fulfilled]:(e,t)=>{const{collections:o}=t.payload;e.collections=o},[di.pending]:(e,t)=>{const{addBoard:o,removeBoard:a}=t.meta.arg;o&&e.selectedBoards.push(o),a&&(e.selectedBoards=e.selectedBoards.filter(({boardId:s})=>s!==a.boardId))}}}),{setHoot:m$,close:f$,removeCollection:h$,addCollection:S$}=Cc.actions,pk=Cc.reducer,b$=R(ye.getUrlShortCode+u.REQUEST),E$=R(ye.sendMessage+u.REQUEST),w$=R(ye.shareViaEmails+u.REQUEST),I$=R(ye.shareViaEmails+u.REJECTED),ha={isShareModalVisible:!1,shareModalTitle:"",messageText:"",sharingItemUrl:null,sharedItemType:null,getUrlShortCodeState:f.IDLE,getUrlShortCodeData:null,getUrlShortCodeError:"",sendMessageState:f.IDLE,sendMessageError:"",shareViaEmailsState:f.IDLE,shareViaEmailsError:""}
11,Ac=j({name:"sharing",initialState:ha,reducers:{setShareModalDetails:(e,t)=>{e.shareModalTitle=t.payload.title,e.sharingItemUrl=t.payload.itemUrl,e.isShareModalVisible=!!t.payload.itemUrl,e.messageText=t.payload.messageText,e.sharedItemType=t.payload.itemType},toggleShareModal:e=>{e.isShareModalVisible&&(e.sharingItemUrl=null),e.isShareModalVisible=!e.isShareModalVisible},resetSharing:()=>ha,resetMessageState:e=>{e.sendMessageState=ha.sendMessageState,e.shareViaEmailsState=ha.shareViaEmailsState}},extraReducers:e=>{e.addCase(ye.getUrlShortCode+u.PENDING,t=>{t.getUrlShortCodeState=f.PENDING,t.getUrlShortCodeError=""}).addCase(ye.getUrlShortCode+u.FULFILLED,(t,o)=>{t.getUrlShortCodeState=f.FULFILLED,t.getUrlShortCodeData=`${o.payload}?t=${Date.now()}`}).addCase(ye.getUrlShortCode+u.REJECTED,(t,o)=>{t.getUrlShortCodeState=f.REJECTED,t.getUrlShortCodeError=o.payload}),e.addCase(ye.sendMessage+u.PENDING,t=>{t.sendMessageState=f.PENDING,t.sendMessageError=""}).addCase(ye.sendMessage+u.FULFILLED,t=>{t.sendMessageState=f.FULFILLED}).addCase(ye.sendMessage+u.REJECTED,(t,o)=>{t.sendMessageState=f.REJECTED,t.sendMessageError=o.payload}),e.addCase(ye.shareViaEmails+u.PENDING,t=>{t.shareViaEmailsState=f.PENDING,t.shareViaEmailsError=""}).addCase(ye.shareViaEmails+u.FULFILLED,t=>{t.shareViaEmailsState=f.FULFILLED}).addCase(ye.shareViaEmails+u.REJECTED,(t,o)=>{t.shareViaEmailsState=f.REJECTED,t.shareViaEmailsError=o.payload})}}),{setShareModalDetails:v$,toggleShareModal:C$,resetSharing:A$,resetMessageState:D$}=Ac.actions,yk=Ac.reducer,ci={accountsById:{},isMultiAuthEnabled:!0};function Nt(){return localStorage.getItem("authToken")||null}const Dc=j({name:"accounts",initialState:ci,reducers:{removeAll:()=>ci,removeOneById:(e,t)=>{const o={...e.accountsById};return delete o[t.payload.partyId],{...e,accountsById:o}},addNewAccount:(e,t)=>({...e,accountsById:{...e.accountsById,[t.payload.account.partyId]:{...t.payload.account,authToken:t.payload.authToken||Nt()}}}),hydrateAccounts:(e,t)=>{var o;return(o=t.payload)!=null&&o.accountsById&&Object.keys(t.payload.accountsById).length>0?{...e,accountsById:t.payload.accountsById}:e}},extraReducers:{"auth/login/fulfilled":(e,t)=>({...e,accountsById:{...e.accountsById,[t.payload.userDetails.partyId]:{...t.payload.userDetails,authToken:Nt()}}}),"auth/signup/fulfilled":(e,t)=>({...e,accountsById:{...e.accountsById,[t.payload.userDetails.partyId]:{...t.payload.userDetails,authToken:Nt()}}}),"auth/signup/board/follow/fulfilled":(e,t)=>({...e,accountsById:{...e.accountsById,[t.payload.userDetails.partyId]:{...t.payload.userDetails,authToken:Nt()}}}),"user/account/update/fulfilled":(e,t)=>{const o=t.payload.accountDetails.partyId,a=e.accountsById[o];return{...e,accountsById:{...e.accountsById,[o]:{...t.payload.accountDetails,authToken:(a==null?void 0:a.authToken)||Nt()}}}},"user/details/fulfilled":(e,t)=>{const o=t.payload.userDetails.partyId,a=e.accountsById[o];return{...e,accountsById:{...e.accountsById,[o]:{...t.payload.userDetails,authToken:(a==null?void 0:a.authToken)||Nt()}}}},"auth/facebookLogin/fulfilled":(e,t)=>{const o=t.payload.userDetails;return{...e,accountsById:{...e.accountsById,[o.partyId]:{...o,authToken:Nt()}}}},[ao.socialLogin+"fulfilled"]:(e,t)=>{const o=t.payload.userDetails;return{...e,accountsById:{...e.accountsById,[o.partyId]:{...o,authToken:Nt()}}}}}}),{removeAll:T$,removeOneById:gk}=Dc.actions,mk=Dc.reducer,fk=e=>{const t=xe(new Date);let o=null;switch(e){case"Today":o=t;break;case"Last 7 Days":o=We(t,6);break;case"Last 30 Days":o=We(t,29);break;case"Last 3 Months":o=It(t,3);break;case"Last 6 Months":o=It(t,6);break}return{from:o,to:Ze(new Date)}},hk={dateRange:{active:!1,from:null,to:null},dateFilter:{label:null,active:!0},screens:[],freeScreens:null,paidScreens:null,hasSubscribed:!1,isRestricted:!1,knowYourVisitorsData:null,knowYourVisitorsApiStatus:f.IDLE},ln=j({name:"know-your-visitors",initialState:hk,reducers:{setDateFilter:(e,t)=>{const{from:o,to:a}=fk(t.payload);e.dateRange.active=!1,e.dateFilter.active=!0,e.dateFilter.label=t.payload,e.dateRange.from=o,e.dateRange.to=a},setDateRange:(e,t)=>
11{const{from:o,to:a}=t.payload;e.dateRange.active=!0,e.dateFilter.active=!1,e.dateRange.from=o,e.dateRange.to=a},changeScreen:(e,t)=>{e.screens=t.payload},setFreeScreens:(e,t)=>{e.freeScreens=t.payload},setPaidScreens:(e,t)=>{e.paidScreens=t.payload},setRestriction:(e,t)=>{e.isRestricted=t.payload},setHasSubscribed:(e,t)=>{e.hasSubscribed=t.payload}},extraReducers(e){e.addCase(Ht.getVisitorsData+u.PENDING,t=>{t.knowYourVisitorsApiStatus=f.PENDING}),e.addCase(Ht.getVisitorsData+u.FULFILLED,(t,o)=>{t.knowYourVisitorsData=o.payload,t.knowYourVisitorsApiStatus=f.FULFILLED}),e.addCase(Ht.getVisitorsData+u.REJECTED,t=>{t.knowYourVisitorsApiStatus=f.REJECTED})}}),{setDateFilter:Sk,setDateRange:bk,changeScreen:Ek,setFreeScreens:wk,setPaidScreens:Ik,setRestriction:vk,setHasSubscribed:Ck}=ln.actions,Ak=R(Ht.getVisitorsData),P$={...ln.actions,setDateFilter:Sk,setDateRange:bk,changeScreen:Ek,setFreeScreens:wk,setPaidScreens:Ik,setRestriction:vk,setHasSubscribed:Ck,getVisitorsData:Ak},Dk=ln.reducer,Tk=e=>{e.makePlaylistDefaultStatus=Uo},Pk=(e,t)=>{e.makePlaylistDefaultStatus=No,e.allPlaylists=e.allPlaylists.map(o=>({...o,isDefault:String(o.id)===String(t.payload)}))},Bk=e=>{e.makePlaylistDefaultStatus=Ro},kk=e=>{e.finalizePlaylistStatus=Uo,e.isFinalizedPlaylistModalOpen=!0},Lk=(e,t)=>{e.finalizePlaylistStatus=No,e.savedPlaylistResponse=t.payload||null},Fk=e=>{e.finalizePlaylistStatus=Ro},Uk=(e,t)=>{e.deletePlaylistStatus=Uo,e.currentlyDeletingPlaylistId=t.payload.currentlyDeletingPlaylistId},Nk=(e,t)=>{const o=t.payload;e.currentlyDeletingPlaylistId=null,e.deletePlaylistStatus=No,e.allPlaylists=e.allPlaylists.filter(a=>String(a.id)!==String(o))},Rk=e=>{e.deletePlaylistStatus=Ro},Hk=e=>{e.getPlaylistsStatus=Uo},xk=(e,t)=>{e.getPlaylistsStatus=No,e.allPlaylists=t.payload},Mk=e=>{e.getPlaylistsStatus=Ro},Ok=e=>{e.getPlaylistByIdStatus=Uo},jk=(e,t)=>{e.getPlaylistByIdStatus=No,e.formStatus=Tc.EDIT,e.name=t.payload.name,e.description=t.payload.description,e.collectionConfig=t.payload.collectionConfig,e.pullContentStatus=f.IDLE,e.items=t.payload.items.map(o=>({...o,id:Xr()}))||[]},qk=e=>{e.getPlaylistByIdStatus=Ro};var Tc=(e=>(e.VIEW="VIEW",e.EDIT="EDIT",e.CREATE="CREATE",e))(Tc||{}),_k=(e=>(e.IMAGE="image",e.VIDEO="video",e))(_k||{});const ui={currentlyDeletingPlaylistId:null,allPlaylists:[],currentlySelectedTab:"playlists",name:"Brand New Playlist",description:"",items:[],formData:{id:"",duration:30,type:"image",url:"",file:null,previewUrl:"",isPaidPromotion:"",hasExternalPayment:""},isPlaylistItemManagerOpen:!1,formStatus:"CREATE",isFinalized:!1,isFinalizedPlaylistModalOpen:!1,savedPlaylistId:null,savedPlaylistResponse:null,finalizePlaylistStatus:As,deletePlaylistStatus:As,getPlaylistsStatus:As,isDefault:!1,duplicatePlaylistStatus:f.IDLE,collectionConfig:{searchString:"",collectionsBehavior:""},pullContentStatus:f.IDLE,syncSummary:{totalItemsCount:0,newItemsAdded:0,itemsRemoved:0}},Pc=j({name:"playlist",initialState:ui,reducers:{setCurrentlySelectedTab:(e,t)=>{e.currentlySelectedTab=t.payload},resetState:()=>ui,setBasicPlaylistDetails:(e,t)=>{e.name=t.payload.name,e.description=t.payload.description},setItems:(e,t)=>{e.items=t.payload},setDuration:(e,t)=>{e.formData.duration=t.payload},setUrl:(e,t)=>{e.formData.url=t.payload},setPreviewUrl:(e,t)=>{e.formData.previewUrl=t.payload},setFileStats:(e,t)=>{e.formData.previewUrl=t.payload.previewUrl,e.formData.url=t.payload.url,e.formData.type=t.payload.type,e.formData.file=t.payload.file},resetFileStats:e=>{e.formData.previewUrl="",e.formData.url="",e.formData.type="image",e.formData.file=null},addToPlaylist:(e,t)=>
11{e.items||(e.items=[]),e.items.push(t.payload),e.isPlaylistItemManagerOpen=!1},updatePlaylistItem:(e,t)=>{const o=e.items.findIndex(a=>a.id===t.payload.id);e.items[o]=t.payload,e.isPlaylistItemManagerOpen=!1},removeItemFromList:(e,t)=>{const o=e.items.findIndex(a=>a.id===t.payload);e.items.splice(o,1)},toggleFinalizedPlaylistModal:e=>{e.isFinalizedPlaylistModalOpen=!e.isFinalizedPlaylistModalOpen},togglePlaylistItemManager:(e,t)=>{const o=t.payload;if(e.formStatus=o?"EDIT":"CREATE",e.isPlaylistItemManagerOpen=!e.isPlaylistItemManagerOpen,o){const a=e.items.find(s=>s.id===o);a&&(e.formData=a)}else e.formData={id:Xr(),duration:30,previewUrl:"",type:"image",url:"",file:null,isPaidPromotion:"",hasExternalPayment:""}},setCollectionConfig:(e,t)=>{e.collectionConfig=t.payload},setItemMeta:(e,t)=>{const{index:o,field:a,value:s}=t.payload;e.items[o][a]=s},resetPullContentStatus:e=>{e.pullContentStatus=f.IDLE}},extraReducers(e){e.addCase(Qe.PENDING,kk),e.addCase(Qe.FULFILLED,Lk),e.addCase(Qe.REJECTED,Fk),e.addCase(Mt.PENDING,Uk),e.addCase(Mt.FULFILLED,Nk),e.addCase(Mt.REJECTED,Rk),e.addCase(vt.PENDING,Hk),e.addCase(vt.FULFILLED,xk),e.addCase(vt.REJECTED,Mk),e.addCase(Kt.PENDING,Ok),e.addCase(Kt.FULFILLED,jk),e.addCase(Kt.REJECTED,qk),e.addCase(Qt.PENDING,Tk),e.addCase(Qt.FULFILLED,Pk),e.addCase(Qt.REJECTED,Bk),e.addCase(Dd,(t,o)=>{t.duplicatePlaylistStatus=f.PENDING;const a=o.payload.playlistId,s=t.allPlaylists.find(r=>r.id===a);s&&t.allPlaylists.push({...s,id:`${a}_copy`,name:"Copying your playlist...",isDisabled:!0,status:"inactive"})}),e.addCase(Ad+u.REJECTED,t=>{t.allPlaylists=t.allPlaylists.map(o=>`${o.id}`.includes("_copy")?{...o,name:"Error copying playlist!"}:o)}),e.addCase(Td,t=>{t.pullContentStatus=f.PENDING}),e.addCase(wr+u.REJECTED,t=>{t.pullContentStatus=f.REJECTED}),e.addCase(wr+u.FULFILLED,(t,o)=>{t.pullContentStatus=f.FULFILLED;let a=t.items.map(p=>p);const s=o.payload.filter(p=>p.isApproved).map(p=>{var h;return{type:p.object,value:p.id,previewUrl:p.thumbnail.url,previewText:p.title,expiryDate:p.hootLevelExpiryDate,owningBoardId:p.owningBoardId,duration:(h=p.signageSettings)==null?void 0:h.timeout,isLocked:!0,isPaidPromotion:"no"}});let r=0,i=0;const l=s.map(p=>p.value);for(let p=0;p<a.length;p++){const h=a[p];h.isLocked&&(l.includes(h.value)?a[p]=h:(a[p]=void 0,i+=1))}a=a.filter(p=>p);const d=a.map(p=>p.value);for(let p=0;p<s.length;p++){const h=s[p];d.includes(h.value)||(a.push(h),r+=1)}t.items=a,t.syncSummary.totalItemsCount=a.length,t.syncSummary.newItemsAdded=r,t.syncSummary.itemsRemoved=i})}}),{setDuration:B$,togglePlaylistItemManager:k$,setFileStats:L$,resetFileStats:F$,addToPlaylist:U$,setItems:N$,removeItemFromList:R$,updatePlaylistItem:H$,toggleFinalizedPlaylistModal:x$,resetState:M$,setBasicPlaylistDetails:O$,setCurrentlySelectedTab:j$,setCollectionConfig:q$,setItemMeta:_$,resetPullContentStatus:$$}=Pc.actions,$k=Pc.reducer,pi={postHootData:null,postHootAsyncState:f.IDLE,postHootErrorState:""},dn=j({name:"post-hoot",initialState:pi,reducers:{resetPostHootState:()=>pi},extraReducers(e){e.addCase(xt.postHoot+u.PENDING,t=>{t.postHootAsyncState=f.PENDING}),e.addCase(xt.postHoot+u.FULFILLED,(t,o)=>{t.postHootData=o.payload,t.postHootAsyncState=f.FULFILLED}),e.addCase(xt.postHoot+u.REJECTED,(t,o)=>{t.postHootErrorState=o.payload,t.postHootAsyncState=f.REJECTED})}}),Gk=R(xt.postHoot),{resetPostHootState:Vk}=dn.actions,G$={...dn.actions,resetPostHootState:Vk,requestPostHoot:Gk},Jk=dn.reducer,yi={integrationsData:[],integrationsApiStatus:f.IDLE,installIntegrationResponse:null,installIntegrationApiStatus:f.IDLE,installIntegrationError:null,selectedIntegration:null,getYodelPluginIdResponse:null,getYodelPluginIdApiStatus:f.IDLE,deleteInstanceResponse:null,deleteInstanceApiStatus:f.IDLE,uninstallIntegrationResponse:null,uninstallIntegrationApiStatus:f.IDLE,updateInstanceResponse:null,updateInstanceApiStatus:f.IDLE,sendCustomIntegrationRes:null,
11sendCustomIntegrationStatus:f.IDLE,navigateToIntegrationsTab:{status:!1,integrationName:null}},Bc=j({name:"integrations",initialState:yi,reducers:{resetIntegrationsState:()=>yi,setSelectedIntegration:(e,t)=>{e.selectedIntegration=t.payload},resetGetPluginIdResponse:e=>{e.getYodelPluginIdResponse=null,e.getYodelPluginIdApiStatus=f.IDLE},resetInstallIntegrationResponse:e=>{e.installIntegrationResponse=null,e.installIntegrationApiStatus=f.IDLE,e.installIntegrationError=null},resetInstanceRelatedStates:e=>{e.deleteInstanceResponse=null,e.deleteInstanceApiStatus=f.IDLE,e.updateInstanceResponse=null,e.updateInstanceApiStatus=f.IDLE},resetDeleteInstanceStates:e=>{e.deleteInstanceResponse=null,e.deleteInstanceApiStatus=f.IDLE},resetUninstallStates:e=>{e.uninstallIntegrationResponse=null,e.uninstallIntegrationApiStatus=f.IDLE},updateIntegrationAfterInstall:(e,t)=>{var s;const{integrationId:o,newInstance:a}=t.payload;e.integrationsData=e.integrationsData.map(r=>r.id===o?{...r,isInstalled:!0,instances:[...r.instances||[],a]}:r),e.selectedIntegration!==null&&((s=e.selectedIntegration)==null?void 0:s.id)===o&&(e.selectedIntegration={...e.selectedIntegration,isInstalled:!0,instances:[...e.selectedIntegration.instances||[],a]})},updateIntegrationAfterInstanceUpdate:(e,t)=>{var r;const{integrationId:o,instanceId:a,updatedConfig:s}=t.payload;if(e.integrationsData=e.integrationsData.map(i=>{if(i.id===o){const l=i.instances.map(d=>d._id===a?{...d,config:s}:d);return{...i,instances:l}}return i}),e.selectedIntegration!==null&&((r=e.selectedIntegration)==null?void 0:r.id)===o){const i=e.selectedIntegration.instances.map(l=>l._id===a?{...l,config:s}:l);e.selectedIntegration={...e.selectedIntegration,instances:i}}},updateIntegrationAfterInstanceDelete:(e,t)=>{var s;const{integrationId:o,instanceId:a}=t.payload;if(e.integrationsData=e.integrationsData.map(r=>{if(r.id===o){const i=r.instances.filter(l=>l._id!==a);return{...r,instances:i,isInstalled:i.length>0}}return r}),e.selectedIntegration!==null&&((s=e.selectedIntegration)==null?void 0:s.id)===o){const r=e.selectedIntegration.instances.filter(i=>i._id!==a);e.selectedIntegration={...e.selectedIntegration,instances:r,isInstalled:r.length>0}}},updateIntegrationAfterUninstall:(e,t)=>{var a;const{integrationId:o}=t.payload;e.integrationsData=e.integrationsData.map(s=>s.id===o?{...s,isInstalled:!1,instances:[]}:s),e.selectedIntegration!==null&&((a=e.selectedIntegration)==null?void 0:a.id)===o&&(e.selectedIntegration={...e.selectedIntegration,isInstalled:!1,instances:[]})},resetSendCustomIntegrationRequest:e=>{e.sendCustomIntegrationStatus=f.IDLE,e.sendCustomIntegrationRes=null},navigateToIntegrationsRequested:(e,t)=>{e.navigateToIntegrationsTab.status=!0,e.navigateToIntegrationsTab.integrationName=t.payload},navigateToIntegrationsCompleted:e=>{e.navigateToIntegrationsTab.status=!1,e.navigateToIntegrationsTab.integrationName=null}},extraReducers(e){e.addCase($.fetchIntegrations+u.PENDING,t=>{t.integrationsApiStatus=f.PENDING}),e.addCase($.fetchIntegrations+u.FULFILLED,(t,o)=>{t.integrationsData=o.payload,t.integrationsApiStatus=f.FULFILLED}),e.addCase($.fetchIntegrations+u.REJECTED,t=>{t.integrationsApiStatus=f.REJECTED}),e.addCase($.installIntegration+u.PENDING,t=>{t.installIntegrationApiStatus=f.PENDING,t.installIntegrationError=null}),e.addCase($.installIntegration+u.FULFILLED,(t,o)=>{t.installIntegrationResponse=o.payload,t.installIntegrationApiStatus=f.FULFILLED,t.installIntegrationError=null}),e.addCase($.installIntegration+u.REJECTED,(t,o)=>{t.installIntegrationApiStatus=f.REJECTED,t.installIntegrationError=o.payload||null}),e.addCase($.deleteInstance+u.PENDING,t=>{t.deleteInstanceApiStatus=f.PENDING}),e.addCase($.deleteInstance+u.FULFILLED,(t,o)=>{t.deleteInstanceResponse=o.payload,t.deleteInstanceApiStatus=f.FULFILLED}),e.addCase($.deleteInstance+u.REJECTED,t=>{t.deleteInstanceApiStatus=f.REJECTED}),e.addCase($.uninstallIntegration+u.PENDING,t=>{t.uninstallIntegrationApiStatus=f.PENDING}),e.addCase($.uninstallIntegration+u.FULFILLED,(t,o)=>{t.uninstallIntegrationResponse=o.payload,t.uninstallIntegrationApiStatus=f.FULFILLED}),e.addCase($.uninstallIntegration+u.REJECTED,t=>{t.uninstallIntegrationApiStatus=f.REJECTED}),e.addCase($.updateIntegrationInstance+u.PENDING,t=>{t.updateInstanceApiStatus=f.PENDING}),e.addCase($.updateIntegrationInstance+u.FULFILLED,(t,o)=>{t.updateInstanceResponse=o.payload,t.updateInstanceApiStatus=f.FULFILLED}),e.addCase($.updateIntegrationInstance+u.REJECTED,t=>{t.updateInstanceApiStatus=f.REJECTED}),e.addCase($.sendCustomIntegrationRequest+u.PENDING,t=>{t.sendCustomIntegrationStatus=f.PENDING}),e.addCase($.sendCustomIntegrationRequest+u.FULFILLED,(t,o)=>{t.sendCustomIntegrationRes=o.payload,t.sendCustomIntegrationStatus=f.FULFILLED}),e.addCase($.sendCustomIntegrationRequest+u.REJECTED,t=>{t.sendCustomIntegrationStatus=f.REJECTED}),e.addCase($.getYodelPluginId+u.PENDING,t=>{t.getYodelPluginIdApiStatus=f.PENDING}),e.addCase($.getYodelPluginId+u.FULFILLED,(t,o)=>{t.getYodelPluginIdResponse=o.payload,t.getYodelPluginIdApiStatus=f.FULFILLED}),e.addCase($.getYodelPluginId+u.REJECTED,t=>{t.getYodelPluginIdApiStatus=f.REJECTED})}}),zk=R($.fetchIntegrations),Wk=R($.installIntegration),Yk=R($.deleteInstance),Kk=R($.uninstallIntegration),Qk=R($.updateIntegrationInstance),Zk=R($.sendCustomIntegrationRequest),Xk=R($.getYodelPluginId),V$={...Bc.actions,fetchIntegrations:zk,installIntegration:Wk,getYodelPluginId:Xk,deleteInstance:Yk,uninstallIntegration:Kk,updateInstance:Qk,sendCustomIntegrationRequest:Zk}
11,eL=Bc.reducer,pr={addNewCollection:{collectionName:"",isFeatured:!1,sortOptions:""},editCollection:{boardCollectionId:"",collectionName:"",isFeatured:!1,sortOptions:""},createBoardCollectionResponse:null,createBoardCollectionStatus:f.IDLE,updateBoardCollectionResponse:null,updateBoardCollectionStatus:f.IDLE,deleteBoardCollectionResponse:null,deleteBoardCollectionStatus:f.IDLE},kc=j({name:"board-collections",initialState:pr,reducers:{setCollectionName:(e,t)=>{e.addNewCollection.collectionName=t.payload},toggleIsFeatured:(e,t)=>{e.addNewCollection.isFeatured=t.payload},setSortOptions:(e,t)=>{e.addNewCollection.sortOptions=t.payload},resetNewCollectionStates:e=>{e.addNewCollection=pr.addNewCollection,e.createBoardCollectionResponse=null,e.createBoardCollectionStatus=f.IDLE},setEditCollectionName:(e,t)=>{e.editCollection.collectionName=t.payload},toggleEditIsFeatured:(e,t)=>{e.editCollection.isFeatured=t.payload},setEditSortOptions:(e,t)=>{e.editCollection.sortOptions=t.payload},setEditCollection:(e,t)=>{e.editCollection=t.payload},resetEditCollectionStates:e=>{e.editCollection=pr.editCollection,e.updateBoardCollectionResponse=null,e.updateBoardCollectionStatus=f.IDLE,e.deleteBoardCollectionResponse=null,e.deleteBoardCollectionStatus=f.IDLE}},extraReducers(e){e.addCase(me.createBoardCollection+u.PENDING,t=>{t.createBoardCollectionStatus=f.PENDING}),e.addCase(me.createBoardCollection+u.FULFILLED,(t,o)=>{t.createBoardCollectionResponse=o.payload,t.createBoardCollectionStatus=f.FULFILLED}),e.addCase(me.createBoardCollection+u.REJECTED,t=>{t.createBoardCollectionStatus=f.REJECTED}),e.addCase(me.updateBoardCollection+u.PENDING,t=>{t.updateBoardCollectionStatus=f.PENDING}),e.addCase(me.updateBoardCollection+u.FULFILLED,(t,o)=>{t.updateBoardCollectionResponse=o.payload,t.updateBoardCollectionStatus=f.FULFILLED}),e.addCase(me.updateBoardCollection+u.REJECTED,t=>{t.updateBoardCollectionStatus=f.REJECTED}),e.addCase(me.deleteBoardCollection+u.PENDING,t=>{t.deleteBoardCollectionStatus=f.PENDING}),e.addCase(me.deleteBoardCollection+u.FULFILLED,(t,o)=>{t.deleteBoardCollectionResponse=o.payload,t.deleteBoardCollectionStatus=f.FULFILLED}),e.addCase(me.deleteBoardCollection+u.REJECTED,t=>{t.deleteBoardCollectionStatus=f.REJECTED})}}),tL=R(me.createBoardCollection),oL=R(me.updateBoardCollection),aL=R(me.deleteBoardCollection),J$={...kc.actions,createBoardCollection:tL,updateBoardCollection:oL,deleteBoardCollection:aL},sL=kc.reducer,rL={isLegacyUser:!1,isAddingAdditionalOnly:!1,additionalScreens:{connect:{count:0,plan:null},reach:{count:0,plan:null},engage:{count:0,plan:null},activate:{count:0,plan:null}},additionalSignages:{connect:{count:0,plan:null},reach:{count:0,plan:null},engage:{count:0,plan:null},activate:{count:0,plan:null}},freeScreenEngagementUnits:null,fetchFreeScreenEngagementStatus:f.IDLE,totalSubscribedScreenLicenses:0,totalSubscribedSignageLicenses:0,isInitialSetup:!0,previewProration:null,previewProrationStatus:f.IDLE,customerSessionSecret:null,fetchCustomerSessionStatus:f.IDLE},Lc=j({name:"pricing",initialState:rL,reducers:{setIsLegacyUser:(e,t)=>{e.isLegacyUser=t.payload},setAdditionalScreens:(e,t)=>{const{tier:o,count:a,plan:s,syncAcrossTiers:r=!1}=t.payload;r?(e.additionalScreens.connect.count=a,e.additionalScreens.reach.count=a,e.additionalScreens.engage.count=a,e.additionalScreens.activate.count=a):e.additionalScreens[o]={count:a,plan:s},e.isInitialSetup=!1},setAdditionalSignages:(e,t)=>{const{tier:o,count:a,plan:s,syncAcrossTiers:r=!1}=t.payload;r?(e.additionalSignages.connect.count=a,e.additionalSignages.reach.count=a,e.additionalSignages.engage.count=a,e.additionalSignages.activate.count=a):e.additionalSignages[o]={count:a,plan:s},e.isInitialSetup=!1},setIsAddingAdditionalOnly:(e,t)=>{e.isAddingAdditionalOnly=t.payload},resetAdditionalItems:e=>{e.additionalScreens={connect:{count:0,plan:null},reach:{count:0,plan:null},engage:{count:0,plan:null},activate:{count:0,plan:null}},e.additionalSignages={connect:{count:0,plan:null},reach:{count:0,plan:null},engage:{count:0,plan:null},activate:{count:0,plan:null}}},setTotalSubscribedScreenLicenses:(e,t)=>{e.totalSubscribedScreenLicenses=t.payload},setTotalSubscribedSignageLicenses:(e,t)=>{e.totalSubscribedSignageLicenses=t.payload},setIsInitialSetup:(e,t)=>{e.isInitialSetup=t.payload},resetPreviewProration:e=>{e.previewProration=null,e.previewProrationStatus=f.IDLE}},extraReducers(e){e.addCase(fe.fetchFreeScreensEngagementUnits+u.PENDING,t=>{t.fetchFreeScreenEngagementStatus=f.PENDING}),e.addCase(fe.fetchFreeScreensEngagementUnits+u.FULFILLED,(t,o)=>{t.freeScreenEngagementUnits=o.payload,t.fetchFreeScreenEngagementStatus=f.FULFILLED}),e.addCase(fe.fetchFreeScreensEngagementUnits+u.REJECTED,t=>{t.fetchFreeScreenEngagementStatus=f.REJECTED}),e.addCase(fe.previewProrations+u.PENDING,t=>{t.previewProrationStatus=f.PENDING}),e.addCase(fe.previewProrations+u.FULFILLED,(t,o)=>{t.previewProration=o.payload,t.previewProrationStatus=f.FULFILLED}),e.addCase(fe.previewProrations+u.REJECTED,t=>{t.previewProrationStatus=f.REJECTED}),e.addCase(fe.fetchCustomerSessionSecret+u.PENDING,t=>{t.fetchCustomerSessionStatus=f.PENDING}),e.addCase(fe.fetchCustomerSessionSecret+u.FULFILLED,(t,o)=>{t.customerSessionSecret=o.payload,t.fetchCustomerSessionStatus=f.FULFILLED}),e.addCase(fe.fetchCustomerSessionSecret+u.REJECTED,t=>{t.fetchCustomerSessionStatus=f.REJECTED})}}),nL=R(fe.fetchFreeScreensEngagementUnits),iL=R(fe.previewProrations),lL=R(fe.fetchCustomerSessionSecret),z$={...Lc.actions,getFreeScreensEngagementUnits:nL,previewProrations:iL,fetchCustomerSessionSecret:lL},dL=Lc.reducer,gi={externalScreens:[],loadingStatus:f.IDLE,createStatus:f.IDLE,updateStatus:f.IDLE,deleteStatus:f.IDLE,bulkUploadStatus:f.IDLE,bulkUploadErrors:[],bulkUploadResult:null},Fc=j({name:"externalScreens",initialState:gi,reducers:{resetBulkUploadState:e=>{e.bulkUploadStatus=f.IDLE,e.bulkUploadErrors=[],e.bulkUploadResult=null},resetCreateStatus:e=>{e.createStatus=f.IDLE},resetUpdateStatus:e=>{e.updateStatus=f.IDLE},resetDeleteStatus:e=>{e.deleteStatus=f.IDLE}},extraReducers:{[W.getExternalScreens+u.PENDING]:e=>{e.loadingStatus=f.PENDING},[W.getExternalScreens+u.FULFILLED]:(e,t)=>{e.loadingStatus=f.FULFILLED,e.externalScreens=t.payload.screens},[W.getExternalScreens+u.REJECTED]:e=>{e.loadingStatus=f.REJECTED,e.externalScreens=[]},[W.createExternalScreen+u.PENDING]:e=>{e.createStatus=f.PENDING},[W.createExternalScreen+u.FULFILLED]:(e,t)=>{e.createStatus=f.FULFILLED,e.externalScreens=[t.payload.screen,...e.externalScreens]},[W.createExternalScreen+u.REJECTED]:e=>{e.createStatus=f.REJECTED}
11,[W.updateExternalScreen+u.PENDING]:e=>{e.updateStatus=f.PENDING},[W.updateExternalScreen+u.FULFILLED]:(e,t)=>{e.updateStatus=f.FULFILLED;const o=t.payload.screen;e.externalScreens=e.externalScreens.map(a=>a.screenId===o.screenId?o:a)},[W.updateExternalScreen+u.REJECTED]:e=>{e.updateStatus=f.REJECTED},[W.deleteExternalScreen+u.PENDING]:e=>{e.deleteStatus=f.PENDING},[W.deleteExternalScreen+u.FULFILLED]:(e,t)=>{e.deleteStatus=f.FULFILLED,e.externalScreens=e.externalScreens.filter(o=>o.screenId!==t.payload.screenId)},[W.deleteExternalScreen+u.REJECTED]:e=>{e.deleteStatus=f.REJECTED},[W.bulkUploadExternalScreens+u.PENDING]:e=>{e.bulkUploadStatus=f.PENDING,e.bulkUploadErrors=[],e.bulkUploadResult=null},[W.bulkUploadExternalScreens+u.FULFILLED]:(e,t)=>{e.bulkUploadStatus=f.FULFILLED,e.bulkUploadResult=t.payload},[W.bulkUploadExternalScreens+u.REJECTED]:(e,t)=>{var o;e.bulkUploadStatus=f.REJECTED,e.bulkUploadErrors=((o=t.payload)==null?void 0:o.errors)||[]},"activeBoard/resetActiveBoard":()=>gi}}),{resetBulkUploadState:W$,resetCreateStatus:Y$,resetUpdateStatus:K$,resetDeleteStatus:Q$}=Fc.actions,Z$=e=>({type:W.getExternalScreens+u.REQUEST,payload:e}),X$=e=>({type:W.createExternalScreen+u.REQUEST,payload:e}),e5=e=>({type:W.updateExternalScreen+u.REQUEST,payload:e}),t5=e=>({type:W.deleteExternalScreen+u.REQUEST,payload:e}),o5=e=>({type:W.bulkUploadExternalScreens+u.REQUEST,payload:e}),cL=Fc.reducer;var uL={};const vr=Ay(),pL=uL.NODE_ENV!=="production"?[...cn({immutableCheck:!1,serializableCheck:!1}),vr]:[...cn({immutableCheck:!1,serializableCheck:!1}),vr],Uc=Dy({reducer:{accounts:mk,activate:aI,activateAccount:T1,activeAccount:_h,activeBoard:fS,activeHoot:aB,activityFeed:z1,allBoardHoots:rc,analytics:$E,app:N1,appStore:yc,appUpgrade:uk,auth:Q1,boardAccess:Z1,boardGroups:$B,boardNotificationSettings:eP,bulletinBoard:td,calendar:Wl,changeLog:aP,createBoard:ph,createScreen:uP,customUrl:J1,drawer:yP,embed:fP,lists:rB,manageBoard:ES,manageCustomMessage:nB,manageMembers:OS,manageMyBusiness:iB,manageScreenApps:d2,manageScreens:Rb,messaging:jB,myAccount:_B,myBoards:GB,myHoots:Wd,onBoarding:hh,personalNotificationSettings:JB,pinnedBoardHoots:ic,playlist:$k,postHoot:mb,productTour:KB,pricing:zC,pricingLegacy:WB,rehoot:pk,resetPassword:P1,scheduleDemo:QB,sequences:cP,sharing:yk,unSubscribe:L1,updateScreen:ZB,verifyEmail:F1,visibility:_S,knowYourVisitors:Dk,postHootNew:Jk,integrations:eL,boardCollections:sL,boardPricing:dL,externalScreens:cL,flyerEditor:zT,flyerTemplates:f1},middleware:pL,devTools:Ua!=="prod",enhancers:[Ty(["myBoards","accounts"])]});qm({store:Uc,removeAccountById:e=>gk({partyId:e}),showAccountSwitcher:e=>qS({visibility:"visible",context:e})});vr.run(A1);Ah();const yL=io.lazy(()=>Ue(()=>import("./App-tN5SdoE9.js").then(e=>e.G),__vite__mapDeps([13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])));wy.createRoot(document.getElementById("root")).render(O.jsx(Gb,{children:O.jsx(Py,{store:Uc,children:O.jsx(gh,{children:O.jsx(pd,{children:O.jsx(Iy,{children:O.jsxs(cd,{children:[O.jsx(Wb,{}),O.jsx(Jb,{children:O.jsx(yL,{})})]})})})})})}));export{ps as $,To as A,P_ as B,Im as C,sT as D,rT as E,nT as F,ut as G,at as H,Je as I,iT as J,Qi as K,Jb as L,Dl as M,dT as N,JH as O,zH as P,uT as Q,st as R,Om as S,Ve as T,_H as U,Qr as V,H3 as W,x3 as X,OF as Y,G$ as Z,Ue as _,FN as a,vx as a$,us as a0,wn as a1,TF as a2,zN as a3,WN as a4,Gs as a5,jb as a6,Ej as a7,on as a8,YH as a9,UN as aA,vq as aB,po as aC,YF as aD,v$ as aE,sU as aF,ee as aG,kN as aH,M3 as aI,vN as aJ,RF as aK,NN as aL,xx as aM,W1 as aN,hr as aO,F_ as aP,VE as aQ,Un as aR,zi as aS,Hm as aT,uj as aU,Kd as aV,gx as aW,Wn as aX,Nl as aY,Ul as aZ,Fl as a_,Nd as aa,xL as ab,Rx as ac,Nx as ad,eq as ae,WF as af,WO as ag,wN as ah,B_ as ai,sg as aj,ym as ak,lx as al,Lr as am,cx as an,W3 as ao,px as ap,yx as aq,dx as ar,ux as as,Vb as at,qS as au,gk as av,QF as aw,T$ as ax,zF as ay,Hx as az,f as b,Vs as b$,Ix as b0,Cx as b1,VF as b2,$F as b3,Ux as b4,Fx as b5,hx as b6,Ax as b7,Bx as b8,kx as b9,S$ as bA,h$ as bB,cr as bC,nj as bD,zO as bE,HO as bF,XO as bG,VO as bH,ZO as bI,mj as bJ,wj as bK,aq as bL,oq as bM,Kj as bN,Do as bO,js as bP,Ms as bQ,Os as bR,jF as bS,zs as bT,Ks as bU,Io as bV,Qs as bW,$O as bX,GO as bY,$s as bZ,_s as b_,Lx as ba,Dx as bb,Px as bc,Sx as bd,KL as be,Mx as bf,so as bg,wx as bh,Bs as bi,Ox as bj,Tx as bk,bx as bl,Ex as bm,Ao as bn,Ca as bo,Aa as bp,ar as bq,m$ as br,f$ as b
11s,eU as bt,fo as bu,Pl as bv,DL as bw,DN as bx,ur as by,di as bz,Hl as c,Uq as c$,w3 as c0,Hs as c1,OO as c2,xs as c3,er as c4,Ci as c5,Ws as c6,Ys as c7,Xs as c8,tr as c9,t3 as cA,BN as cB,ub as cC,Pr as cD,e3 as cE,lt as cF,ct as cG,I3 as cH,aj as cI,Ob as cJ,cj as cK,ej as cL,gj as cM,oj as cN,dj as cO,ij as cP,tj as cQ,jN as cR,ON as cS,qN as cT,Vr as cU,xO as cV,fj as cW,bj as cX,kF as cY,pj as cZ,hj as c_,Zs as ca,or as cb,xF as cc,jO as cd,qO as ce,HN as cf,qs as cg,Zt as ch,Lm as ci,Xi as cj,r_ as ck,FF as cl,_O as cm,gm as cn,sr as co,zb as cp,BF as cq,Fa as cr,sj as cs,KO as ct,Sj as cu,rj as cv,O3 as cw,lj as cx,MO as cy,it as cz,_a as d,tU as d$,kL as d0,kq as d1,Tq as d2,Aq as d3,Cq as d4,Dq as d5,Bq as d6,LF as d7,UF as d8,Pq as d9,$x as dA,vh as dB,qx as dC,_x as dD,NF as dE,HF as dF,Xj as dG,Zj as dH,sq as dI,tq as dJ,rq as dK,Qj as dL,LN as dM,Tc as dN,_F as dO,gF as dP,tF as dQ,oF as dR,rF as dS,bF as dT,sF as dU,JL as dV,mF as dW,VL as dX,dF as dY,uF as dZ,pF as d_,Fq as da,Lq as db,R_ as dc,EN as dd,fm as de,N_ as df,U_ as dg,Ua as dh,CN as di,fU as dj,yU as dk,uU as dl,gU as dm,GF as dn,jx as dp,Wa as dq,Cl as dr,bN as ds,Tt as dt,mU as du,pU as dv,YO as dw,yj as dx,QO as dy,nU as dz,D$ as e,Eq as e$,cF as e0,Pi as e1,EF as e2,wF as e3,vF as e4,ZL as e5,GL as e6,eF as e7,fF as e8,Mj as e9,cN as eA,AF as eB,CF as eC,uN as eD,pN as eE,$L as eF,Hj as eG,WL as eH,qL as eI,XL as eJ,hS as eK,ML as eL,jL as eM,Il as eN,vl as eO,wl as eP,rg as eQ,ng as eR,BL as eS,og as eT,hq as eU,Iq as eV,uq as eW,pq as eX,yq as eY,iq as eZ,lq as e_,SF as ea,xj as eb,yF as ec,Rj as ed,QL as ee,HL as ef,cm as eg,nF as eh,iF as ei,Oj as ej,aF as ek,zL as el,_L as em,lF as en,QR as eo,cU as ep,lU as eq,cB as er,$U as es,TU as et,Za as eu,IF as ev,nN as ew,YL as ex,SN as ey,fN as ez,b$ as f,DR as f$,bq as f0,nq as f1,Sq as f2,mq as f3,fq as f4,fb as f5,gq as f6,dq as f7,wq as f8,cq as f9,Jx as fA,zx as fB,eM as fC,tM as fD,Zx as fE,cM as fF,oM as fG,aM as fH,nM as fI,Kx as fJ,Qx as fK,Wx as fL,Yx as fM,lM as fN,dM as fO,uM as fP,Xx as fQ,iM as fR,Vx as fS,Nq as fT,ER as fU,IR as fV,fR as fW,vR as fX,wR as fY,CR as fZ,AR as f_,ox as fa,sx as fb,rx as fc,ax as fd,JF as fe,ix as ff,nx as fg,SP as fh,bP as fi,tx as fj,XH as fk,ex as fl,ZH as fm,KF as fn,QH as fo,Oq as fp,Hq as fq,Mq as fr,jq as fs,_q as ft,qq as fu,xq as fv,Rq as fw,Gx as fx,sM as fy,rM as fz,Y3 as g,c3 as g$,LR as g0,BR as g1,TR as g2,PR as g3,FR as g4,hR as g5,kR as g6,SR as g7,bR as g8,v3 as g9,ZN as gA,YN as gB,KN as gC,QN as gD,Pa as gE,D3 as gF,A3 as gG,R3 as gH,T3 as gI,k3 as gJ,P3 as gK,mT as gL,zR as gM,U3 as gN,N3 as gO,C3 as gP,B3 as gQ,L3 as gR,m3 as gS,S3 as gT,b3 as gU,XN as gV,ds as gW,f3 as gX,h3 as gY,E3 as gZ,d3 as g_,l3 as ga,Wt as gb,gb as gc,VN as gd,yb as ge,pb as gf,JN as gg,g3 as gh,Sr as gi,dt as gj,p3 as gk,y3 as gl,u3 as gm,im as gn,nm as go,lb as gp,o3 as gq,a3 as gr,s3 as gs,r3 as gt,mx as gu,fx as gv,n3 as gw,F3 as gx,$N as gy,i3 as gz,A$ as h,S1 as h$,GN as h0,cs as h1,oH as h2,sH as h3,aH as h4,yH as h5,cH as h6,YR as h7,GR as h8,tH as h9,IT as hA,WH as hB,RH as hC,OH as hD,KH as hE,VH as hF,NH as hG,Hd as hH,At as hI,UT as hJ,qT as hK,_T as hL,$T as hM,HT as hN,hT as hO,HH as hP,PT as hQ,TT as hR,kT as hS,BT as hT,fT as hU,h1 as hV,xH as hW,p1 as hX,b1 as hY,ST as hZ,MH as h_,u as ha,XR as hb,rH as hc,lH as hd,z$ as he,gH as hf,nH as hg,uH as hh,pH as hi,ZR as hj,KR as hk,iH as hl,km as hm,MT as hn,xT as ho,jT as hp,LT as hq,FT as hr,vT as hs,CT as ht,AT as hu,DT as hv,WT as hw,UH as hx,qH as hy,RT as hz,Di as i,vO as i$,jH as i0,NT as i1,$H as i2,GH as i3,GT as i4,OT as i5,G as i6,PF as i7,yh as i8,W0 as i9,ZS as iA,JS as iB,zS as iC,KS as iD,WS as iE,KM as iF,lO as iG,QM as iH,ZM as iI,mO as iJ,s$ as iK,hO as iL,r$ as iM,SO as iN,bO as iO,EO as iP,wO as iQ,IO as iR,dO as iS,yO as iT,cO as iU,aO as iV,XM as iW,sO as iX,eO as iY,oO as iZ,tO as i_,Dm as ia,N0 as ib,IN as ic,AN as id,va as ie,Y0 as ig,Ia as ih,mr as ii,wo as ij,H0 as ik,R0 as il,j0 as im,M0 as io,x0 as ip,O0 as iq,wa as ir,Mm as is,xm as it,i2 as iu,l2 as iv,YS as iw,XS as ix,JO as iy,QS as iz,E$ as j,FU as 
11j$,CO as j0,AO as j1,nO as j2,rO as j3,iO as j4,aS as j5,pO as j6,fO as j7,YM as j8,uO as j9,es as jA,vU as jB,JU as jC,YU as jD,WU as jE,Ka as jF,KU as jG,OL as jH,CU as jI,AU as jJ,DU as jK,PL as jL,GU as jM,PU as jN,BU as jO,kU as jP,EU as jQ,RU as jR,Ya as jS,_U as jT,zU as jU,ns as jV,bU as jW,SU as jX,os as jY,MU as jZ,OU as j_,U as ja,HM as jb,SH as jc,mM as jd,H_ as je,t$ as jf,Ns as jg,DO as jh,NO as ji,RO as jj,LO as jk,TO as jl,PO as jm,kO as jn,BO as jo,FO as jp,UO as jq,Us as jr,Fs as js,QU as jt,Qa as ju,Xq as jv,J$ as jw,wU as jx,IU as jy,ts as jz,Ne as k,hs as k$,jU as k0,qU as k1,UU as k2,LU as k3,NU as k4,xU as k5,HU as k6,rs as k7,SS as k8,bS as k9,lN as kA,gN as kB,hN as kC,sN as kD,aN as kE,ZU as kF,tN as kG,oN as kH,XU as kI,eN as kJ,Ge as kK,qj as kL,$j as kM,kj as kN,_j as kO,Nj as kP,Gj as kQ,Vj as kR,Lj as kS,Jj as kT,zj as kU,jj as kV,Wj as kW,Fj as kX,Uj as kY,Ev as kZ,Ss as k_,hF as ka,ss as kb,as as kc,VU as kd,hU as ke,FL as kf,LL as kg,UL as kh,RL as ki,NL as kj,Dj as kk,Tj as kl,rt as km,vj as kn,Bj as ko,Cj as kp,PN as kq,Ij as kr,Aj as ks,RN as kt,iN as ku,mN as kv,bm as kw,yN as kx,da as ky,dN as kz,w$ as l,e2 as l$,fs as l0,_R as l1,ms as l2,rv as l3,dU as l4,lv as l5,$R as l6,Cv as l7,vv as l8,Iv as l9,SB as lA,LB as lB,dB as lC,Dv as lD,Co as lE,sv as lF,nv as lG,OR as lH,Hv as lI,V$ as lJ,xv as lK,Mv as lL,jv as lM,Ov as lN,qv as lO,$v as lP,Vv as lQ,Gv as lR,_v as lS,Uv as lT,MR as lU,Kv as lV,Qv as lW,Jv as lX,zv as lY,Wv as lZ,Yv as l_,cv as la,pv as lb,uv as lc,dv as ld,XF as le,yv as lf,gv as lg,mv as lh,fv as li,xR as lj,rS as lk,aU as ll,oU as lm,HR as ln,Sv as lo,hv as lp,MN as lq,xN as lr,Yj as ls,RR as lt,NR as lu,wv as lv,IB as lw,CB as lx,PB as ly,Nv as lz,DF as m,TN as m$,vs as m0,Is as m1,ws as m2,Es as m3,bs as m4,bB as m5,tg as m6,EB as m7,pB as m8,uB as m9,MF as mA,BH as mB,Pj as mC,O_ as mD,Z_ as mE,j_ as mF,q_ as mG,o$ as mH,a$ as mI,n$ as mJ,i$ as mK,l$ as mL,d$ as mM,c$ as mN,J_ as mO,__ as mP,z_ as mQ,$_ as mR,V_ as mS,G_ as mT,u$ as mU,p$ as mV,y$ as mW,Y_ as mX,W_ as mY,K_ as mZ,Q_ as m_,et as ma,wB as mb,UR as mc,BB as md,lB as me,vB as mf,kB as mg,yB as mh,TB as mi,gB as mj,AB as mk,qR as ml,Rv as mm,g$ as mn,Cs as mo,jR as mp,av as mq,Em as mr,vH as ms,AH as mt,CH as mu,LH as mv,kH as mw,PH as mx,TH as my,DH as mz,I$ as n,n_ as n$,e$ as n0,M_ as n1,X_ as n2,x_ as n3,q3 as n4,I as n5,$3 as n6,_3 as n7,Y$ as n8,X$ as n9,Vq as nA,u_ as nB,Wq as nC,Jq as nD,m_ as nE,f_ as nF,g_ as nG,i_ as nH,w_ as nI,Qq as nJ,v_ as nK,e_ as nL,h_ as nM,o_ as nN,c_ as nO,E_ as nP,t_ as nQ,a_ as nR,S_ as nS,I_ as nT,$q as nU,p_ as nV,Yq as nW,d_ as nX,l_ as nY,b_ as nZ,Kq as n_,K$ as na,Q$ as nb,t5 as nc,e5 as nd,W$ as ne,o5 as nf,Z$ as ng,G3 as nh,gO as ni,j3 as nj,z3 as nk,Rn as nl,J3 as nm,V3 as nn,qF as no,eH as np,dH as nq,VR as nr,WR as ns,zq as nt,A_ as nu,s_ as nv,D_ as nw,y_ as nx,bc as ny,C_ as nz,wm as o,tR as o$,Gq as o0,P$ as o1,rU as o2,Fr as o3,Na as o4,Uo as o5,No as o6,j$ as o7,Dd as o8,fH as o9,$m as oA,mH as oB,$$ as oC,Ro as oD,hH as oE,IH as oF,wH as oG,q$ as oH,Td as oI,M$ as oJ,JR as oK,FH as oL,lo as oM,iR as oN,oR as oO,sR as oP,pR as oQ,uR as oR,TL as oS,dm as oT,yR as oU,mR as oV,gR as oW,rR as oX,nR as oY,br as oZ,GE as o_,bH as oa,Mw as ob,xw as oc,Hw as od,Rw as oe,fM as of,CM as og,_M as oh,qM as oi,iU as oj,$M as ok,GM as ol,AM as om,EH as on,x$ as oo,U$ as op,H$ as oq,_k as or,F$ as os,k$ as ot,B$ as ou,L$ as ov,N$ as ow,_$ as ox,R$ as oy,O$ as oz,ce as p,dR as p0,K3 as p1,cR as p2,X3 as p3,eR as p4,rN as p5,lR as p6,Z3 as p7,Q3 as p8,LM as p9,OM as pA,VM as pB,ue as pC,iS as pD,Zq as pE,jm as pF,BM as pa,JM as pb,UM as pc,TM as pd,yM as pe,gM as pf,FM as pg,IM as ph,EM as pi,_N as pj,kM as pk,bM as pl,DM as pm,PM as pn,NM as po,zM as pp,WM as pq,SM as pr,MM as ps,pM as pt,jM as pu,wM as pv,vM as pw,RM as px,hM as py,xM as pz,Me as q,aR as r,ZF as s,C$ as t,aT as u,pT as v,oT as w,k_ as x,L_ as y,T_ as z};
12function __vite__mapDeps(indexes) {
13  if (!__vite__mapDeps.viteFileDeps) {
14    __vite__mapDeps.viteFileDeps = ["assets/400-BGU84w5t.css","assets/600-Cu5xonGD.css","assets/700-BDoCV_Dk.css","assets/400-BD07V9PD.css","assets/600-BuuEE0kt.css","assets/700-4eHTf4xP.css","assets/400-Btq2CTJ4.css","assets/700-DVXIMfaI.css","assets/400-BA6r2S2Y.css","assets/400-80zLTg3m.css","assets/700-BEXS7JF1.css","assets/400-jlB5Us1o.css","assets/700-Vl_gAQvg.css","assets/App-tN5SdoE9.js","assets/react-vendor-AbT4BmHZ.js","assets/redux-vendor-D6tsYLgP.js","assets/immer-CgiGShya.js","assets/ui-vendor-CEz_DxgW.js","assets/charts-B
14xwOLyBT.js","assets/select-D_QHZO8r.js","assets/editor-PO597bpM.js","assets/colorpicker-MRQ2Ga09.js","assets/tours-DNlFWm7f.js","assets/lucide-D97_elQA.js","assets/share-B2rj7Cgs.js","assets/phone-input-CsdZPsc5.js","assets/date-utils-TpC3Vao7.js","assets/App-DwrhdIbM.css"]
15  }
16  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
17}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.