1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a10ce4-e712-7c31-adac-9a15bb1c3803")}catch(e){}}();import{W as e}from"./jsx-runtime-FYwKsWlz.js";import{d as t,f as n,m as r,t as i,u as a}from"./schemas-_RPHfsNC.js";import{t as ee}from"./providers-Bh-iAvlR.js";var o=e=>e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_]+/g,`-`).replace(/^-+|-+$/g,``),s=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function c(e){let t=[...e].sort((e,t)=>(e.sort_order??0)-(t.sort_order??0)),n=new Set,r=new Map;for(let e of t){let t=o(e.link_text)||`booking`,i=t,a=2;for(;n.has(i);)i=`${t}-${a}`,a++;n.add(i),r.set(e.id,i)}return r}function l(e,t){return c(t).get(e.id)??(o(e.link_text)||`booking`)}function u(e,t){if(t.length===0)return null;if(s.test(e)){let n=t.find(t=>t.id===e);if(n)return n}let n=c(t);for(let r of t)if(n.get(r.id)===e)return r;return null}var d=i([`designmynight`,`opentable`,`thefork`,`kuulseats`,`stampede`,`liveres`,`zenchef`,`quandoo`,`resdiary`,`bookatable`,`sevenrooms`,`resy`,`collins`,`mock`]),f=i([`native`,`widget`,`external`]),p=a({provider:d,mode:f,external_id:n().trim().min(1),config:t(n(),r()).optional()}),te=`https://events-widget.liveres.co.uk/widget.html`;function m(e,t){let n=new URLSearchParams({siteId:e.trim()}),r=t?.trim();return r&&n.set(`stylingURL`,r),`${te}?${n.toString()}`}var ne=`https://widget.thefork.com`;function h(e){return`${ne}/${e.trim()}`}var g=`https://bookings.zenchef.com/results`;function _(e){return`${g}?${new URLSearchParams({rid:e.trim()}).toString()}`}var re={designmynight:`designmynight`,opentable:`opentable`,thefork:`thefork`,kuulseats:`kuulseats`,stampede:`stampede`,liveres:`liveres`,zenchef:`zenchef`,quandoo:`quandoo`,resdiary:`resdiary`,bookatable:`bookatable`},v=new Set([`kuulseats`,`stampede`,`zenchef`,`quandoo`,`resdiary`,`bookatable`]);function y(e){let t=ie(e);if(!t||!t.external_id.trim())return null;let n=t.external_id.trim();switch(t.provider){case`liveres`:return t.mode===`external`?m(n,typeof t.config?.styling_url==`string`?t.config.styling_url:void 0):null;case`thefork`:return t.mode===`external`?h(n):null;case`zenchef`:return _(n);default:break}return v.has(t.provider)?n:null}function ie(e){try{let t=JSON.parse(e),n=p.safeParse(t);if(n.success)return n.data;let r=typeof t.app==`string`?t.app:null,i=typeof t.venue_id==`string`?t.venue_id:null;if(!r||!i)return null;let a=re[r]??(ee.has(r)?r:null);if(!a)return null;let o=f.safeParse(t.mode),s=o.success?o.data:`widget`,c=typeof t.styling_url==`string`?t.styling_url:void 0;return{provider:a,mode:s,external_id:i,...c?{config:{styling_url:c}}:{}}}catch{return null}}function ae(...e){if(!(typeof process>`u`))for(let t of e){let e={}[t];if(typeof e==`string`&&e.length>0)return e}}function b(e){let t={BASE_URL:`/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_BIO_LINKS_DOMAIN:`mypl.link`,VITE_BIO_LINKS_URL:`https://mypl.link`,VITE_ENABLE_COOKIE_CONSENT_BANNER:`false`,VITE_ENABLE_GUS_AI:`false`,VITE_GTM_ID:`GTM-NJVC6LM7`,VITE_PUBLIC_POSTHOG_HOST:`https://eu.i.posthog.com`,VITE_PUBLIC_POSTHOG_PROJECT_TOKEN:`phc_vqbcrJKkaT7Qm89f5khs53kV6TfHasHYbohXzkgSw9qp`,VITE_PUBLIC_SUPABASE_ANON_KEY:`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inljc2d2Znlsa3BqZWF4dmxheXFxIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI3MDU4OTQsImV4cCI6MjA4ODI4MTg5NH0.bU3vhiMkorU-wQEfjPngOilHYuCboOKrWL945cYAU2s`,VITE_PUBLIC_SUPABASE_PUBLISHABLE_KEY:`sb_publishable_Kt5Ocd0bF1coc7Fu0DBa2A_fKKlFakH`,VITE_PUBLIC_SUPABASE_URL:`https://ycsgvfylkpjeaxvlayqq.supabase.co`,VITE_PUBLIC_TYPESENSE_API_KEY:`jrUGncp7k3BtvzJ1ftgtdDjio9cs73nt`,VITE_VERCEL_ENV:`production`,VITE_VERCEL_OBSERVABILITY_CLIENT_CONFIG:`{"analytics":{"scriptSrc":"669790072e2577b3/script.js","viewEndpoint":"669790072e2577b3/view","eventEndpoint":"669790072e2577b3/event","sessionEndpoint":"669790072e2577b3/session"}
1,"speedInsights":{"scriptSrc":"9330f8cfe4e69cb5/script.js","endpoint":"9330f8cfe4e69cb5/vitals"}}`}[e];return typeof t==`string`&&t.length>0?t:ae(String(e))}var x=`my-place.io`,S=`www.my-place.io`,C=`mypl.link`,w=`.staging.my-place.io`,T=`index, follow`,E=`noindex, nofollow`;function oe(e){let t=e.toLowerCase();return t===`staging.my-place.io`||t.endsWith(w)||t.includes(`localhost`)||t.endsWith(`.localhost`)||t===`127.0.0.1`||t.startsWith(`127.`)||t===`vercel.app`||t.endsWith(`.vercel.app`)}function se(e){let t=b(`VITE_BLOCK_SEARCH_INDEXING`);return t===`false`||t===`0`||t===`no`?!1:!!(t===`true`||t===`1`||t===`yes`||O()!==x||k()!==S||e&&oe(e))}function ce(e){return se(e)?E:T}function D(e){let t=e.trim().replace(/\/$/,``);return t.startsWith(`http://`)||t.startsWith(`https://`)?t:`https://${t}`}function O(){return b(`VITE_APP_DOMAIN`)??x}function k(){return b(`VITE_MARKETING_DOMAIN`)??S}function A(){return D(b(`VITE_SITE_URL`)||k())}function le(){return A()}function j(){return b(`VITE_BIO_LINKS_DOMAIN`)??C}function ue(){return D(b(`VITE_BIO_LINKS_URL`)||j())}var M=e({APP_DOMAIN:()=>P,BIO_LINKS_DOMAIN:()=>R,MAIN_SITE_ORIGIN:()=>F,MARKETING_DOMAIN:()=>N,MARKETING_HELP_CENTER_URL:()=>I,getAppUrl:()=>Q,getCurrentOriginUrl:()=>$,getDashboardUrl:()=>K,getMarketingUrl:()=>Z,getVenueBasePath:()=>U,getVenueEditUrl:()=>G,getVenueFormUrl:()=>X,getVenuePathPublicSiteUrl:()=>q,getVenuePreviewSubdomainUrl:()=>Y,getVenuePrimaryLinkTo:()=>W,getVenueProductionPublicSiteUrl:()=>J,isLocalOrPreview:()=>V,isMainMarketingHost:()=>L,isVenueHostname:()=>H});A();var N=k(),P=O(),F=le(),I=`https://help.${P}/en/`;function L(e){return e===P||e===`www.${P}`||e===N}var R=j(),z=()=>typeof window<`u`?window.location.hostname:`localhost`,B=()=>{let e=z();return e===P||e===`www.${P}`||e.endsWith(`.${P}`)||e===N},V=e=>{let t=e??z();return t.includes(`localhost`)||t===`127.0.0.1`||t.startsWith(`127.`)||t.endsWith(`.localhost`)||t===`vercel.app`||t.endsWith(`.vercel.app`)};function H(e){return V(e)?!1:e.endsWith(`.${P}`)&&e!==P&&e!==`www.${P}`?!0:e!==P&&e!==`www.${P}`&&e!==N&&!e.endsWith(`.${P}`)}var U=(e,t)=>{if(typeof window>`u`)return t?`/venue/${e}/edit`:`/venue/${e}`;if(e===`demo`&&!t){let e=window.location.pathname;if(e===`/demo`||e.startsWith(`/demo/`))return`/demo`;if(e===`/venue/demo`||e.startsWith(`/venue/demo/`))return`/venue/demo`}let n=window.location.hostname,r=n.endsWith(`.${P}`)&&n!==P&&n!==`www.${P}`,i=!V(n)&&!L(n)&&!n.endsWith(`.${P}`);return r||i?``:t?`/venue/${e}/edit`:`/venue/${e}`};function W(e,t,n){switch(e.link_type){case`tab`:return`${t}/${e.link_value}`;case`form`:return`${t}/form/${e.link_value}`;case`booking`:{if(y(e.link_value))return null;let r=(n?.allPrimaryLinks??[]).filter(e=>e.link_type===`booking`);return e.id&&e.link_text!==void 0&&r.length>0?`${t}/book/${l({id:e.id,link_text:e.link_text,sort_order:e.sort_order},r)}`:`${t}/book`}default:return null}}var G=e=>B()?`${F}/venue/${e}/edit`:`/venue/${e}/edit`,K=()=>V()?`/dashboard`:`${F}/dashboard`;function q(e){return B()?`${F}/venue/${e}`:`/venue/${e}`}function J(e,t,n){return t?.trim()?`https://www.${t.trim().replace(/^www\./,``)}`:n?.hasProSubdomain===!1?q(e):`https://${e}.${P}`}function Y(e){return`https://${e}.${P}`}var X=(e,t,n)=>{let r=n?.hasProSubdomain!==!1;if(B())return r?`https://${e}.${P}/form/${t}`:`${F}/venue/${e}/form/${t}`;let i=typeof window<`u`?window.location.origin:F;return typeof window<`u`&&H(window.location.hostname)?`${i}/form/${t}`:`${i}/venue/${e}/form/${t}`},Z=(e=`/`)=>V()?e:`${F}${e.startsWith(`/`)?e:`/${e}`}`,Q=(e=`/`)=>V()?e:`${F}${e.startsWith(`/`)?e:`/${e}`}`;function $(e){if(typeof window>`u`)return``;let t=e.startsWith(`/`)?e:`/${e}`;return`${window.location.origin}${t}`}export{m as C,o as E,h as S,u as T,M as _,Q as a,y as b,Z as c,X as d,q as f,V as g,J as h,I as i,U as l,W as m,R as n,$ as o,Y as p,F as r,K as s,P as t,G as u,ue as v,c as w,_ as x,ce as y}; 2//# chunkId=01a10ce4-e712-7c31-adac-9a15bb1c3803
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.