PageSourceSearch

https://josh-cellars-test.vercel.app/build/routes/($locale).preview.$documentId-74MYFAOD.js

js josh-cellars-test.vercel.app collected 2026-10-03 05:49:12 UTC 14,294 bytes, 3 lines download raw bytes

1import{b as D,d as N}from"/build/_shared/chunk-LSE5XBCH.js";import"/build/_shared/chunk-XWFK5R6G.js";import{Aa as oe,d as re,n as ne}from"/build/_shared/chunk-7UHYDGVS.js";import{A as te,a as G,g as Y,i as Z,u as ee}from"/build/_shared/chunk-GXSIKGAD.js";import"/build/_shared/chunk-PP6NRHC2.js";import{b as ke,d as P}from"/build/_shared/chunk-5XTMU6GV.js";var ve=ke((Mt,me)=>{var qe="Expected a function",ge=NaN,We="[object Symbol]",Fe=/^\s+|\s+$/g,Ve=/^[-+]0x[0-9a-f]+$/i,Be=/^0b[01]+$/i,Ke=/^0o[0-7]+$/i,ze=parseInt,Xe=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,He=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Xe||He||Function("return this")(),Ye=Object.prototype,Ze=Ye.toString,et=Math.max,tt=Math.min,z=function(){return Ge.Date.now()};function rt(t,e,r){var o,n,i,s,a,c,u=0,f=!1,p=!1,d=!0;if(typeof t!="function")throw new TypeError(qe);e=be(e)||0,X(r)&&(f=!!r.leading,p="maxWait"in r,i=p?et(be(r.maxWait)||0,e):i,d="trailing"in r?!!r.trailing:d);function l(y){var v=o,w=n;return o=n=void 0,u=y,s=t.apply(w,v),s}function h(y){return u=y,a=setTimeout(S,e),f?l(y):s}function U(y){var v=y-c,w=y-u,H=e-v;return p?tt(H,i-w):H}function j(y){var v=y-c,w=y-u;return c===void 0||v>=e||v<0||p&&w>=i}function S(){var y=z();if(j(y))return x(y);a=setTimeout(S,U(y))}function x(y){return a=void 0,d&&o?l(y):(o=n=void 0,s)}function b(){a!==void 0&&clearTimeout(a),u=0,o=c=n=a=void 0}function m(){return a===void 0?s:x(z())}function C(){var y=z(),v=j(y);if(o=arguments,n=this,c=y,v){if(a===void 0)return h(c);if(p)return a=setTimeout(S,e),l(c)}return a===void 0&&(a=setTimeout(S,e)),s}return C.cancel=b,C.flush=m,C}function X(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function nt(t){return!!t&&typeof t=="object"}function ot(t){return typeof t=="symbol"||nt(t)&&Ze.call(t)==We}function be(t){if(typeof t=="number")return t;if(ot(t))return ge;if(X(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=X(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(Fe,"");var r=Be.test(t);return r||Ke.test(t)?ze(t.slice(2),r?2:8):Ve.test(t)?ge:+t}me.exports=rt});function ie(t,...e){let r=t.length-1;return t.slice(0,r).reduce((o,n,i)=>o+n+e[i],"")+t[r]}var g=P(G(),1);var we=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,R=/_key\s*==\s*['"](.*)['"]/,Pe=/^\d*:\d*$/;function L(t){return typeof t=="number"||typeof t=="string"&&/^\[\d+\]$/.test(t)}function $(t){return typeof t=="string"?R.test(t.trim()):typeof t=="object"&&"_key"in t}function ue(t){if(typeof t=="string"&&Pe.test(t))return!0;if(!Array.isArray(t)||t.length!==2)return!1;let[e,r]=t;return(typeof e=="number"||e==="")&&(typeof r=="number"||r==="")}function ce(t,e,r){let o=typeof e=="string"?J(e):e;if(!Array.isArray(o))throw new Error("Path must be an array or a string");let n=t;for(let i=0;i<o.length;i++){let s=o[i];if(L(s)){if(!Array.isArray(n))return r;n=n[s]}
1if($(s)){if(!Array.isArray(n))return r;n=n.find(a=>a._key===s._key)}if(typeof s=="string"&&(n=typeof n=="object"&&n!==null?n[s]:void 0),typeof n>"u")return r}return n}function fe(t){if(!Array.isArray(t))throw new Error("Path is not an array");return t.reduce((e,r,o)=>{let n=typeof r;if(n==="number")return`${e}[${r}]`;if(n==="string")return`${e}${o===0?"":"."}${r}`;if($(r)&&r._key)return`${e}[_key=="${r._key}"]`;if(Array.isArray(r)){let[i,s]=r;return`${e}[${i}:${s}]`}throw new Error(`Unsupported path segment \`${JSON.stringify(r)}\``)},"")}function J(t){if(typeof t!="string")throw new Error("Path is not a string");let e=t.match(we);if(!e)throw new Error("Invalid path string");return e.map(Ee)}function Ee(t){return L(t)?je(t):$(t)?xe(t):ue(t)?$e(t):t}function je(t){return Number(t.replace(/[^\d]/g,""))}function xe(t){return{_key:t.match(R)[1]}}function $e(t){let[e,r]=t.split(":").map(o=>o===""?o:Number(o));return[e,r]}var _=Object.freeze({__proto__:null,fromString:J,get:ce,isIndexSegment:L,isIndexTuple:ue,isKeySegment:$,reKeySegment:R,toString:fe}),M="drafts.";function Q(t){return t.startsWith(M)?t.slice(M.length):t}var se={"\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","'":"\\'","\\":"\\\\"},ae={"\\f":"\f","\\n":`
2`,"\\r":"\r","\\t":"	","\\'":"'","\\\\":"\\"};function pe(t){return`$${t.map(e=>typeof e=="string"?`['${e.replace(/[\f\n\r\t'\\]/g,r=>se[r])}']`:typeof e=="number"?`[${e}]`:e._key!==""?`[?(@._key=='${e._key.replace(/['\\]/g,r=>se[r])}')]`:`[${e._index}]`).join("")}`}function de(t){let e=[],r=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g,o;for(;(o=r.exec(t))!==null;){if(o[1]!==void 0){let n=o[1].replace(/\\(\\|f|n|r|t|')/g,i=>ae[i]);e.push(n);continue}if(o[2]!==void 0){e.push(parseInt(o[2],10));continue}if(o[3]!==void 0){let n=o[3].replace(/\\(\\')/g,i=>ae[i]);e.push({_key:n,_index:-1});continue}}return e}function q(t){return t.map(e=>{if(typeof e=="string"||typeof e=="number")return e;if(e._key!=="")return{_key:e._key};if(e._index!==-1)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function W(t){return(typeof t=="string"?J(t):t).map(e=>{if(typeof e=="string"||typeof e=="number")return e;if(Array.isArray(e))throw new Error(`IndexTuple segments aren't supported:${JSON.stringify(e)}`);if(Oe(e))return e;if(e._key)return{_key:e._key,_index:-1};throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function Oe(t){return typeof t=="object"&&"_key"in t&&"_index"in t}function Ie(t){return t.map(e=>{if(typeof e=="string"||typeof e=="number")return e;if(e._index!==-1)return e._index;throw new Error(`invalid segment:${JSON.stringify(e)}`)})}function le(t,e){if(!e?.mappings)return;let r=pe(Ie(t));if(e.mappings[r]!==void 0)return{mapping:e.mappings[r],matchedPath:r,pathSuffix:""};let o=Object.entries(e.mappings).filter(([a])=>r.startsWith(a)).sort(([a],[c])=>c.length-a.length);if(o.length==0)return;let[n,i]=o[0],s=r.substring(n.length);return{mapping:i,matchedPath:n,pathSuffix:s}}function F(t){let{resultSourceMap:e,resultPath:r}=t,{mapping:o,pathSuffix:n}=le(r,e)||{};if(!o||o.source.type==="literal"||o.source.type==="unknown")return;let i=e.documents[o.source.document],s=e.paths[o.source.path];if(i&&s){let{baseUrl:a,workspace:c,tool:u}=Ae(typeof t.studioUrl=="function"?t.studioUrl(i):t.studioUrl);if(!a)return;let{_id:f,_type:p,_projectId:d,_dataset:l}=i;return{baseUrl:a,workspace:c,tool:u,id:f,type:p,path:de(s+n),projectId:d,dataset:l}}}function Ae(t){let e=typeof t=="string"?t:t.baseUrl;return e!=="/"&&(e=e.replace(/\/$/,"")),typeof t=="string"?{baseUrl:e}:{...t,baseUrl:e}}var Te,Ue,Ce;function O(t,e,r,o,n){let i=n&&"input"in n?n.input:r.value,s=n?.expected??t.expects,a=n?.received??function(l){let h=typeof l;return h==="object"&&(h=(l&&Object.getPrototypeOf(l)?.constructor?.name)??"null"),h==="string"?`"${l}"`:h==="number"||h==="bigint"||h==="boolean"?`${l}`:h}(i),c={kind:t.kind,type:t.type,input:i,expected:s,received:a,message:`Invalid ${e}: ${s?`Expected ${s} but r`:"R"}eceived ${a}`,requirement:t.requirement,path:n?.path,issues:n?.issues,lang:o.lang,abortEarly:o.abortEarly,abortPipeEarly:o.abortPipeEarly,skipPipe:o.skipPipe},u=t.kind==="schema",f=t.message??(p=t.reference,d=c.lang,Ce?.get(p)?.get(d))??(u?function(l){return Ue?.get(l)}(c.lang):null)??o.message??function(l){return Te?.get(l)}(c.lang);var p,d;f&&(c.message=typeof f=="function"?f(c):f),u&&(r.typed=!1),r.issues?r.issues.push(c):r.issues=[c]}function De(t){return t!=="__proto__"&&t!=="prototype"&&t!=="constructor"}function V(t,e){return{kind:"schema",type:"object",reference:V,expects:"Object",async:!1,entries:t,message:e,_run(r,o){let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let i in this.entries){let s=n[i],a=this.entries[i]._run({typed:!1,value:s},o);if(a.issues){let c={type:"object",origin:"value",input:n,key:i,value:s};for(let u of a.issues)u.path?u.path.unshift(c):u.path=[c],r.issues?.pu
2sh(u);if(r.issues||(r.issues=a.issues),o.abortEarly){r.typed=!1;break}}a.typed||(r.typed=!1),(a.value!==void 0||i in n)&&(r.value[i]=a.value)}}else O(this,"type",r,o);return r}}}function I(t,...e){let r={kind:"schema",type:"optional",reference:I,expects:`${t.expects} | undefined`,async:!1,wrapped:t,_run(o,n){return o.value===void 0&&("default"in this&&(o.value=function(i,s,a){return typeof i.default=="function"?i.default(s,a):i.default}(this,o,n)),o.value===void 0)?(o.typed=!0,o):this.wrapped._run(o,n)}};return 0 in e&&(r.default=e[0]),r}function A(t){return{kind:"schema",type:"string",reference:A,expects:"string",async:!1,message:t,_run(e,r){return typeof e.value=="string"?e.typed=!0:O(this,"type",e,r),e}}}function Ne(t){return t!==null&&Array.isArray(t)}function Me(t){let e="";for(let r of t)typeof r!="string"?typeof r!="number"?Ne(r)?(e&&(e+=":"),e+=`${r.join(",")}}`):r._key&&(e&&(e+=":"),e+=`${r._key}`):(e&&(e+=":"),e+=`${r}`):(e&&(e+="."),e+=r);return e}var k=function(...t){return{...t[0],pipe:t,_run(e,r){for(let o=0;o<t.length;o++){e=t[o]._run(e,r);let n=t[o+1];if(r.skipPipe||e.issues&&(r.abortEarly||r.abortPipeEarly||n?.kind==="schema"||n?.kind==="transformation")){e.typed=!1;break}}return e}}}(A(),function t(e,r){return{kind:"validation",type:"min_length",reference:t,async:!1,expects:`>=${e}`,requirement:e,message:r,_run(o,n){return o.typed&&o.value.length<this.requirement&&O(this,"length",o,n,{received:`${o.value.length}`}),o}}}(1)),E=I(k),Re=V({baseUrl:k,dataset:E,id:k,path:k,projectId:E,tool:E,type:E,workspace:E,isDraft:I(A())});function ye(t){let{id:e,path:r,baseUrl:o,tool:n,workspace:i,type:s}=t;return a=t,Re._run({typed:!1,value:a},{abortEarly:!0}).issues?void 0:[["id",Q(e)],["type",s],["path",Me(_.fromString(r))],["base",encodeURIComponent(o)],["workspace",i],["tool",n],["isDraft",e.startsWith("drafts.")]].filter(([,c])=>!!c).map(c=>{let[u,f]=c;return f===!0?u:c.join("=")}).join(";");var a}V({origin:k,href:k,data:I(function t(e,r,o){return{kind:"schema",type:"record",reference:t,expects:"Object",async:!1,key:e,value:r,message:o,_run(n,i){let s=n.value;if(s&&typeof s=="object"){n.typed=!0,n.value={};for(let a in s)if(De(a)){let c=s[a],u=this.key._run({typed:!1,value:a},i);if(u.issues){let p={type:"record",origin:"key",input:s,key:a,value:c};for(let d of u.issues)d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=u.issues),i.abortEarly){n.typed=!1;break}}let f=this.value._run({typed:!1,value:c},i);if(f.issues){let p={type:"record",origin:"value",input:s,key:a,value:c};for(let d of f.issues)d.path?d.path.unshift(p):d.path=[p],n.issues?.push(d);if(n.issues||(n.issues=f.issues),i.abortEarly){n.typed=!1;break}}(!u.typed||!f.typed)&&(n.typed=!1),u.typed&&(n.value[u.value]=f.value)}}else O(this,"type",n,i);return n}}}(A(),function t(){return{kind:"schema",type:"unknown",reference:t,expects:"unknown",async:!1,_run:e=>(e.typed=!0,e)}}()))});var Le=(t,e,r,o)=>{if(!e||!r)return;let n=W(o),i=F({resultPath:n,resultSourceMap:e,studioUrl:r});return i?ye({baseUrl:i.baseUrl,workspace:i.workspace,tool:i.tool,type:i.type,id:i.id,path:typeof i.path=="string"?i.path:_.toString(q(i.path))}):void 0};function B(t,e,r,o){let n=s=>s?typeof s=="string"?_.fromString(s):s:[],i=n(o);return Object.assign(s=>Le(0,e,r,[...i,...n(s)]),{scope:s=>B(t,e,r,[...i,...n(s)])})}function Je(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var he=Je(function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(e)){if((o=e.length)!=r.length)return!1;for(n=o;n--!=0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if((o=(i=Object.keys(e)).length)!==Object.keys(r).length)return!1;for(n=o;n--!=0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!=0;){var s=i[n];if(!t(e[s],r[s]))return!1}return!0}return e!=e&&r!=r});function Qe(t,e,r){return(0,g.useMemo)(()=>B(t,e,r),[t,e,r])}var K=t=>{let{createFetcherStore:e,enableLiveMode:r}=N({tag:"react-loader",...t}),o=function(s){let a=typeof s=="object"?s?.config().stega.studioUrl:void 0,c=a,u=new Set;return{subscribe:f=>(u.add(f),()=>u.delete(f)),getSnapshot:()=>a,getServerSnapshot:()=>c,setStudioUrl(f){a=f,u.forEach(p=>p())}}}(t.client),n=function({createFetcherStore:s,studioUrlStore:a}){let c={};return(u,f=c,p={})=>{let d=(0,g.useMemo)(()=>p.initial?{perspective:"published",...p.initial}:void 0,[p.initial]),l=(0,g.useMemo)(()=>JSON.stringify(f),[f]),[h,U]=(0,g.useState)(()=>s(u,JSON.parse(l),d).value);(0,g.useEffect)(()=>{let x=s(u,JSON.parse(l),d).subscribe(b=>{U(m=>he(m.sourceMap,b.sourceMap)&&he(m.data,b.data)&&m.error===b.error&&m.loading===b.loading&&m.perspective===b.perspective?m:b)}
2);return()=>x()},[l,d,u]);let j=(0,g.useSyncExternalStore)(a.subscribe,a.getSnapshot,a.getServerSnapshot),S=Qe(h.data,h.sourceMap,j);return(0,g.useMemo)(()=>({...h,encodeDataAttribute:S}),[h,S])}}({createFetcherStore:e,studioUrlStore:o}),i=function({enableLiveMode:s,setStudioUrl:a}){return({allowStudioOrigin:c,client:u,onConnect:f,onDisconnect:p,studioUrl:d})=>{(0,g.useEffect)(()=>{c&&console.warn("`allowStudioOrigin` is deprecated and no longer needed");let l=s({client:u,onConnect:f,onDisconnect:p});return()=>l()},[c,u,f,p]),(0,g.useEffect)(()=>{a(d??typeof u=="object"?u?.config().stega.studioUrl:void 0)},[d,u])}}({enableLiveMode:r,setStudioUrl:o.setStudioUrl});return{loadQuery:()=>{throw new Error("The `loadQuery` function is server only.")},useQuery:n,setServerClient:()=>{throw new Error("The `setServerClient` function is server only.")},useLiveMode:i}},{loadQuery:Pt,setServerClient:Et,useLiveMode:jt,useQuery:xt}=K({client:!1,ssr:!0});var Ct=re(),Dt=K({client:!1,ssr:!0});var Se=P(ve()),T=P(G());var _e=P(te()),it=1e3;var st=()=>{let t=Y(),{documentId:e,previewToken:r}=ee(),{sanityPreview:o,sanityDataset:n,sanityProjectID:i,sanityApiVersion:s}=oe(),a=(0,T.useMemo)(()=>(0,Se.default)(()=>{t.revalidate()},it),[e]);return(0,T.useEffect)(()=>{if(ne(o?.enabled,"The preview is not accessible"),!o?.enabled)return;let u=D({projectId:i,dataset:n,apiVersion:s,useCdn:!1,token:r}).listen(ie`*[_id == "${e}"]`).subscribe(a);return()=>{u.unsubscribe()}},[e]),(0,_e.jsx)(Z,{})};export{st as default};
3

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.