PageSourceSearch

https://www.clearbookings.com/_nuxt/BgyRK8JH.js

js clearbookings.com collected 2026-10-09 04:41:13 UTC 9,032 bytes, 1 lines download raw bytes

vendor: 4,245 bytes, line 1
1import{u as O,g as T,a as _,b as A,s as C,c as L,d as F,e as W,f as E}from"./ZtToXP-i.js";import{d as D,$ as y,j as x,u as U}from"./CtutdB6Z.js";import{d as z}from"./DuAV58dt.js";import"./JInz6klb.js";import"./DfRW3PaF.js";import"./CQmIGG9a.js";import"./C3uaqbz5.js";function N(r){return!r||typeof r.then!="function"?Promise.resolve(r):r}function d(r,...n){try{return N(r(...n))}catch(a){return Promise.reject(a)}}function H(r){const n=typeof r;return r===null||n!=="object"&&n!=="function"}function b(r){const n=Object.getPrototypeOf(r);return!n||n.isPrototypeOf(Object)}function B(r){if(H(r))return String(r);if(b(r)||Array.isArray(r))return JSON.stringify(r);if(typeof r.toJSON=="function")return B(r.toJSON());throw new Error("[unstorage] Cannot stringify value!")}const R="base64:";function J(r){return typeof r=="string"?r:R+X(r)}function q(r){return typeof r!="string"||!r.startsWith(R)?r:V(r.slice(R.length))}function V(r){return globalThis.Buffer?Buffer.from(r,"base64"):Uint8Array.from(globalThis.atob(r),n=>n.codePointAt(0))}function X(r){return globalThis.Buffer?Buffer.from(r).toString("base64"):globalThis.btoa(String.fromCodePoint(...r))}function w(r){return r&&r.split("?")[0]?.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,"")||""}function G(...r){return w(r.join(":"))}function P(r){return r=w(r),r?r+":":""}function Q(r,n){if(n===void 0)return!0;let a=0,g=r.indexOf(":");for(;g>-1;)a++,g=r.indexOf(":",g+1);return a<=n}function Y(r,n){return n?r.startsWith(n)&&r[r.length-1]!=="$":r[r.length-1]!=="$"}const Z="memory",k=()=>{const r=new Map;return{name:Z,getInstance:()=>r,hasItem(n){return r.has(n)},getItem(n){return r.get(n)??null},getItemRaw(n){return r.get(n)??null},setItem(n,a){r.set(n,a)},setItemRaw(n,a){r.set(n,a)},removeItem(n){r.delete(n)},getKeys(){return[...r.keys()]},clear(){r.clear()},dispose(){r.clear()}}};function tt(r={}){const n={mounts:{"":r.driver||k()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},a=t=>{for(const e of n.mountpoints)if(t.startsWith(e))return{base:e,relativeKey:t.slice(e.length),driver:n.mounts[e]};return{base:"",relativeKey:t,driver:n.mounts[""]}},g=(t,e)=>n.mountpoints.filter(o=>o.startsWith(t)||e&&t.startsWith(o)).map(o=>({relativeBase:t.length>o.length?t.slice(o.length):void 0,mountpoint:o,driver:n.mounts[o]})),m=(t,e)=>{if(n.watching){e=w(e);for(const o of n.watchListeners)o(t,e)}},s=async()=>{if(!n.watching){n.watching=!0;for(const t in n.mounts)n.unwatch[t]=await $(n.mounts[t],m,t)}},c=async()=>{if(n.watching){for(const t in n.unwatch)await n.unwatch[t]();n.unwatch={},n.watching=!1}},l=(t,e,o)=>{const i=new Map,u=f=>{let v=i.get(f.base);return v||(v={driver:f.driver,base:f.base,items:[]},i.set(f.base,v)),v};for(const f of t){const v=typeof f=="string",p=w(v?f:f.key),M=v?void 0:f.value,I=v||!f.options?e:{...e,...f.options},K=a(p);u(K).items.push({key:p,value:M,relativeKey:K.relativeKey,options:I})}return Promise.all([...i.values()].map(f=>o(f))).then(f=>f.flat())},h={hasItem(t,e={}){t=w(t);const{relativeKey:o,driver:i}=a(t);return d(i.hasItem,o,e)},getItem(t,e={}){t=w(t);const{relativeKey:o,driver:i}=a(t);return d(i.getItem,o,e).then(u=>D(u))},getItems(t,e={}){return l(t,e,o=>o.driver.getItems?d(o.driver.getItems,o.items.map(i=>({key:i.relativeKey,options:i.options})),e).then(i=>i.map(u=>({key:G(o.base,u.key),value:D(u.value)}))):Promise.all(o.items.map(i=>d(o.driver.getItem,i.relativeKey,i.options).then(u=>({key:i.key,value:D(u)})))))},getItemRaw(t,e={}){t=w(t);const{relativeKey:o,driver:i}=a(t);return i.getItemRaw?d(i.getItemRaw,o,e):d(i.getItem,o,e).then(u=>q(u))},async setItem(t,e,o={}){if(e===void 0)return h.removeItem(t);t=w(t);const{relativeKey:i,driver:u}=a(t);u.setItem&&(await d(u.setItem,i,B(e),o),u.watch||m("update",t))},async setItems(t,e){await l(t,e,async o=>{if(o.driver.setItems)return d(o.driver.setItems,o.items.map(i=>({key:i.relativeKey,value:B(i.value),options:i.options})),e);o.driver.setItem&&await Promise.all(o.items.map(i=>d(o.driver.setItem,i.relativeKey,B(i.value),i.options)))})},async setItemRaw(t,e,o={}){if(e===void 0)return h.removeItem(t,o);t=w(t);const{relativeKey:i,driver:u}=a(t);if(u.setItemRaw)await d(u.setItemRaw,i,e,o);else if(u.setItem)await d(u.setItem,i,J(e),o);else return;
1u.watch||m("update",t)},async removeItem(t,e={}){typeof e=="boolean"&&(e={removeMeta:e}),t=w(t);const{relativeKey:o,driver:i}=a(t);i.removeItem&&(await d(i.removeItem,o,e),(e.removeMeta||e.removeMata)&&await d(i.removeItem,o+"$",e),i.watch||m("remove",t))},async getMeta(t,e={}){typeof e=="boolean"&&(e={nativeOnly:e}),t=w(t);const{relativeKey:o,driver:i}=a(t),u=Object.create(null);if(i.getMeta&&Object.assign(u,await d(i.getMeta,o,e)),!e.nativeOnly){const f=await d(i.getItem,o+"$",e).then(v=>D(v));f&&typeof f=="object"&&(typeof f.atime=="string"&&(f.atime=new Date(f.atime)),typeof f.mtime=="string"&&(f.mtime=new Date(f.mtime)),Object.assign(u,f))}return u},setMeta(t,e,o={}){return this.setItem(t+"$",e,o)},removeMeta(t,e={}){return this.removeItem(t+"$",e)},async getKeys(t,e={}){t=P(t);const o=g(t,!0);let i=[];const u=[];let f=!0;for(const p of o){p.driver.flags?.maxDepth||(f=!1);const M=await d(p.driver.getKeys,p.relativeBase,e);for(const I of M){const K=p.mountpoint+w(I);i.some(j=>K.startsWith(j))||u.push(K)}i=[p.mountpoint,...i.filter(I=>!I.startsWith(p.mountpoint))]}const v=e.maxDepth!==void 0&&!f;return u.filter(p=>(!v||Q(p,e.maxDepth))&&Y(p,t))},async clear(t,e={}){t=P(t),await Promise.all(g(t,!1).map(async o=>{if(o.driver.clear)return d(o.driver.clear,o.relativeBase,e);if(o.driver.removeItem){const i=await o.driver.getKeys(o.relativeBase||"",e);return Promise.all(i.map(u=>o.driver.removeItem(u,e)))}}))},async dispose(){await Promise.all(Object.values(n.mounts).map(t=>S(t)))},async watch(t){return await s(),n.watchListeners.push(t),async()=>{n.watchListeners=n.watchListeners.filter(e=>e!==t),n.watchListeners.length===0&&await c()}},async unwatch(){n.watchListeners=[],await c()},mount(t,e){if(t=P(t),t&&n.mounts[t])throw new Error(`already mounted at ${t}`);return t&&(n.mountpoints.push(t),n.mountpoints.sort((o,i)=>i.length-o.length)),n.mounts[t]=e,n.watching&&Promise.resolve($(e,m,t)).then(o=>{n.unwatch[t]=o}).catch(console.error),h},async unmount(t,e=!0){t=P(t),!(!t||!n.mounts[t])&&(n.watching&&t in n.unwatch&&(n.unwatch[t]?.(),delete n.unwatch[t]),e&&await S(n.mounts[t]),n.mountpoints=n.mountpoints.filter(o=>o!==t),delete n.mounts[t])},getMount(t=""){t=w(t)+":";const e=a(t);return{driver:e.driver,base:e.base}},getMounts(t="",e={}){return t=w(t),g(t,e.parents).map(i=>({driver:i.driver,base:i.mountpoint}))},keys:(t,e={})=>h.getKeys(t,e),get:(t,e={})=>h.getItem(t,e),set:(t,e,o={})=>h.setItem(t,e,o),has:(t,e={})=>h.hasItem(t,e),del:(t,e={})=>h.removeItem(t,e),remove:(t,e={})=>h.removeItem(t,e)};return h}function $(r,n,a){return r.watch?r.watch((g,m)=>n(g,a+m)):()=>{}}async function S(r){typeof r.dispose=="function"&&await d(r.dispose)}const et="http",rt=r=>{const n=(s="")=>x(r.base,s.replace(/:/g,"/")),a=(s="")=>x(r.base,(s||"/").replace(/:/g,"/"),":"),g=(s,c=null)=>{if(s?.response?.status===404)return c;throw s},m=(s,c)=>{const l={...c,...r.headers,...s?.headers};return s?.ttl&&!l["x-ttl"]&&(l["x-ttl"]=s.ttl+""),l};return{name:et,options:r,hasItem(s,c){return y(n(s),{method:"HEAD",headers:m(c)}).then(()=>!0).catch(l=>g(l,!1))},async getItem(s,c){return await y(n(s),{headers:m(c)}).catch(g)},async getItemRaw(s,c){return(await y.raw(n(s),{responseType:"arrayBuffer",headers:m(c,{accept:"application/octet-stream"})}).catch(g))._data},async getMeta(s,c){const l=await y.raw(n(s),{method:"HEAD",headers:m(c)});let h,t;const e=l.headers.get("last-modified");e&&(h=new Date(e));const o=l.headers.get("x-ttl");return o&&(t=Number.parseInt(o,10)),{status:l.status,mtime:h,ttl:t}},async setItem(s,c,l){await y(n(s),{method:"PUT",body:c,headers:m(l)})},async setItemRaw(s,c,l){await y(n(s),{method:"PUT",body:c,headers:m(l,{"content-type":"application/octet-stream"})})},async removeItem(s,c){await y(n(s),{method:"DELETE",headers:m(c)})},async getKeys(s,c){const l=await y(a(s),{headers:m(c)});return Array.isArray(l)?l:[]},async clear(s,c){await y(a(s),{method:"DELETE",headers:m(c)})}}};function mt(r,n){const a=O(r,n);if(!U().public.studio.dev)return a;a.meta.dev=!0;
1const g=tt({driver:rt({base:"/__nuxt_studio/dev/content"})});return a.app.requestRerender=()=>{},a.document.db.upsert=z(async(m,s)=>{const c=T(m,E);if(!c)throw new Error(`Collection not found for fsPath: ${m}`);const l=_(m,c),h=A(l,c,s),t=C(h,c),e=await a.document.generate.contentFromDocument(t);await $fetch("/__nuxt_studio/dev/content/"+m,{method:"PUT",body:e,headers:{"content-type":"text/plain"},timeout:100}).catch(()=>{})},100),a.document.db.delete=async m=>{await g.removeItem(m)},a.on.documentUpdate=m=>{(void 0).on("nuxt-content:update",s=>{const c=L(s.key,E),l=F(s.key,c.source),h=W(s.key,l),t=s.queries.length===0;m(h,t?"remove":"update")})},a.on.mediaUpdate=m=>{(void 0).on("nuxt-studio:media:update",s=>{m(s.id,s.type)})},a}export{mt as useStudioHost};

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.