PageSourceSearch

https://dsdha-frontend.netlify.app/_nuxt/BZ8IWx-P.js

js dsdha-frontend.netlify.app collected 2026-10-03 11:42:27 UTC 7,535 bytes, 2 lines download raw bytes

1import{an as m,ao as N}from"./XrRBevAG.js";const I=/_key\s*==\s*['"](.*)['"]/;function W(e){return typeof e=="string"?I.test(e.trim()):typeof e=="object"&&"_key"in e}function j(e){if(!Array.isArray(e))throw new Error("Path is not an array");return e.reduce((t,r,o)=>{const n=typeof r;if(n==="number")return`${t}[${r}]`;if(n==="string")return`${t}${o===0?"":"."}${r}`;if(W(r)&&r._key)return`${t}[_key=="${r._key}"]`;if(Array.isArray(r)){const[s,i]=r;return`${t}[${s}:${i}]`}throw new Error(`Unsupported path segment \`${JSON.stringify(r)}\``)},"")}const k={"\f":"\\f","\n":"\\n","\r":"\\r","	":"\\t","'":"\\'","\\":"\\\\"},E={"\\f":"\f","\\n":`
2`,"\\r":"\r","\\t":"	","\\'":"'","\\\\":"\\"};function C(e){return`$${e.map(t=>typeof t=="string"?`['${t.replace(/[\f\n\r\t'\\]/g,r=>k[r])}']`:typeof t=="number"?`[${t}]`:t._key!==""?`[?(@._key=='${t._key.replace(/['\\]/g,r=>k[r])}')]`:`[${t._index}]`).join("")}`}function V(e){return e.map(t=>typeof t=="string"?`['${t.replace(/[\f\n\r\t'\\]/g,r=>k[r])}']`:typeof t=="number"?`[${t}]`:t._key!==""?`[?(@._key=='${t._key.replace(/['\\]/g,r=>k[r])}')]`:`[${t._index}]`)}function P(e){const t=[],r=/\['(.*?)'\]|\[(\d+)\]|\[\?\(@\._key=='(.*?)'\)\]/g;let o;for(;(o=r.exec(e))!==null;){if(o[1]!==void 0){const n=o[1].replace(/\\(\\|f|n|r|t|')/g,s=>E[s]);t.push(n);continue}if(o[2]!==void 0){t.push(parseInt(o[2],10));continue}if(o[3]!==void 0){const n=o[3].replace(/\\(\\')/g,s=>E[s]);t.push({_key:n,_index:-1});continue}}return t}function T(e){return e.map(t=>{if(typeof t=="string"||typeof t=="number")return t;if(t._key!=="")return{_key:t._key};if(t._index!==-1)return t._index;throw new Error(`invalid segment:${JSON.stringify(t)}`)})}function S(e){return e.map(t=>{if(typeof t=="string"||typeof t=="number")return t;if(t._index!==-1)return t._index;throw new Error(`invalid segment:${JSON.stringify(t)}`)})}function M(e,t){if(!t?.mappings)return;const r=C(S(e));if(t.mappings[r]!==void 0)return{mapping:t.mappings[r],matchedPath:r,pathSuffix:""};const o=V(S(e));for(let n=o.length-1;n>=0;n--){const s=`$${o.slice(0,n).join("")}`,i=t.mappings[s];if(i){const u=r.substring(s.length);return{mapping:i,matchedPath:s,pathSuffix:u}}}}function q(e){return e!==null&&Array.isArray(e)}function l(e,t,r=[]){if(q(e))return e.map((o,n)=>{if(m(o)){const s=o._key;if(typeof s=="string")return l(o,t,r.concat({_key:s,_index:n}))}return l(o,t,r.concat(n))});if(m(e)){if(e._type==="block"||e._type==="span"){const o={...e};return e._type==="block"?o.children=l(e.children,t,r.concat("children")):e._type==="span"&&(o.text=l(e.text,t,r.concat("text"))),o}return Object.fromEntries(Object.entries(e).map(([o,n])=>[o,l(n,t,r.concat(o))]))}return t(e,r)}function F(e,t,r){return l(e,(o,n)=>{if(typeof o!="string")return o;const s=M(n,t);if(!s)return o;const{mapping:i,matchedPath:u}=s;if(i.type!=="value"||i.source.type!=="documentValue")return o;const a=t.documents[i.source.document],p=t.paths[i.source.path],f=P(u),c=P(p).concat(n.slice(f.length));return r({sourcePath:c,sourceDocument:a,resultPath:n,value:o})})}const J="drafts",z="versions",g=".",U=`${J}${g}`,G=`${z}${g}`;function O(e){return e.startsWith(U)}function w(e){return e.startsWith(G)}function H(e){return!O(e)&&!w(e)}function K(e){if(!w(e))return;const[t,r]=e.split(g);return r}function X(e){return w(e)?e.split(g).slice(2).join(g):O(e)?e.slice(U.length):e}function B(e){const{baseUrl:t,workspace:r="default",tool:o="default",id:n,type:s,path:i,projectId:u,dataset:a}=e;if(!t)throw new Error("baseUrl is required");if(!i)throw new Error("path is required");if(!n)throw new Error("id is required");if(t!=="/"&&t.endsWith("/"))throw new Error("baseUrl must not end with a slash");const p=r==="default"?void 0:r,f=o==="default"?void 0:o,c=X(n),h=Array.isArray(i)?j(T(i)):i,d=new URLSearchParams({baseUrl:t,id:c,type:s,path:h});if(p&&d.set("workspace",p),f&&d.set("tool",f),u&&d.set("projectId",u),a&&d.set("dataset",a),H(n))d.set("perspective","published");else if(w(n)){const b=K(n);d.set("perspective",b)}const y=[t==="/"?"":t];p&&y.push(p);const _=["mode=presentation",`id=${c}`,`type=${s}`,`path=${encodeURIComponent(h)}`];return f&&_.push(`tool=${f}`),y.push("intent","edit",`${_.join(";")}?${d}`),y.join("/")}function Q(e){let t=typeof e=="string"?e:e.baseUrl;return t!=="/"&&(t=t.replace(/\/$/,"")),typeof e=="string"?{baseUrl:t}:{...e,baseUrl:t}}const R=({sourcePath:e,resultPath:t,value:r})=>{if(Z(r)||tt(r))return!1;const o=e.at(-1);
2return!(e.at(-2)==="slug"&&o==="current"||typeof o=="string"&&(o.startsWith("_")||o.endsWith("Id"))||e.some(n=>n==="meta"||n==="metadata"||n==="openGraph"||n==="seo")||A(e)||A(t)||typeof o=="string"&&Y.has(o))},Y=new Set(["color","colour","currency","email","format","gid","hex","href","hsl","hsla","icon","id","index","key","language","layout","link","linkAction","locale","lqip","page","path","ref","rgb","rgba","route","secret","slug","status","tag","template","theme","type","textTheme","unit","url","username","variant","website"]);function Z(e){return/^\d{4}-\d{2}-\d{2}/.test(e)?!!Date.parse(e):!1}const v=new Set(["app:","data:","discord:","file:","ftp:","ftps:","geo:","http:","https:","imap:","javascript:","magnet:","mailto:","maps:","ms-excel:","ms-powerpoint:","ms-word:","slack:","sms:","spotify:","steam:","teams:","tel:","vscode:","zoom:"]);function tt(e){try{const{protocol:t}=new URL(e,e.startsWith("/")?"https://acme.com":void 0);return v.has(t)||t.startsWith("web+")}catch{return!1}}function A(e){return e.some(t=>typeof t=="string"&&t.match(/type/i)!==null)}const $=20;function et(e,t,r){const{filter:o,logger:n,enabled:s}=r;if(!s){const a="config.enabled must be true, don't call this function otherwise";throw n?.error?.(`[@sanity/client]: ${a}`,{result:e,resultSourceMap:t,config:r}),new TypeError(a)}if(!t)return n?.error?.("[@sanity/client]: Missing Content Source Map from response body",{result:e,resultSourceMap:t,config:r}),e;if(!r.studioUrl){const a="config.studioUrl must be defined";throw n?.error?.(`[@sanity/client]: ${a}`,{result:e,resultSourceMap:t,config:r}),new TypeError(a)}const i={encoded:[],skipped:[]},u=F(e,t,({sourcePath:a,sourceDocument:p,resultPath:f,value:c})=>{if((typeof o=="function"?o({sourcePath:a,resultPath:f,filterDefault:R,sourceDocument:p,value:c}):R({sourcePath:a,resultPath:f,value:c}))===!1)return n&&i.skipped.push({path:x(a),value:`${c.slice(0,$)}${c.length>$?"...":""}`,length:c.length}),c;n&&i.encoded.push({path:x(a),value:`${c.slice(0,$)}${c.length>$?"...":""}`,length:c.length});const{baseUrl:h,workspace:d,tool:y}=Q(typeof r.studioUrl=="function"?r.studioUrl(p):r.studioUrl);if(!h)return c;const{_id:_,_type:b,_projectId:D,_dataset:L}=p;return N(c,{origin:"sanity.io",href:B({baseUrl:h,workspace:d,tool:y,id:_,type:b,path:a,...!r.omitCrossDatasetReferenceData&&{dataset:L,projectId:D}})},!1)});if(n){const a=i.skipped.length,p=i.encoded.length;if((a||p)&&((n?.groupCollapsed||n.log)?.("[@sanity/client]: Encoding source map into result"),n.log?.(`[@sanity/client]: Paths encoded: ${i.encoded.length}, skipped: ${i.skipped.length}`)),i.encoded.length>0&&(n?.log?.("[@sanity/client]: Table of encoded paths"),(n?.table||n.log)?.(i.encoded)),i.skipped.length>0){const f=new Set;for(const{path:c}of i.skipped)f.add(c.replace(I,"0").replace(/\[\d+\]/g,"[]"));n?.log?.("[@sanity/client]: List of skipped paths",[...f.values()])}(a||p)&&n?.groupEnd?.()}return u}function x(e){return j(T(e))}var nt=Object.freeze({__proto__:null,stegaEncodeSourceMap:et});export{F as encodeIntoResult,et as stegaEncodeSourceMap,nt as stegaEncodeSourceMap$1};

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.