1import{y as C,D as A,S as d,F as P}from"./AOn2pwUb.js";const L=/#/g,O=/&/g,g=/\//g,b=/=/g,h=/\+/g,I=/%5e/gi,Q=/%60/gi,S=/%7c/gi,T=/%20/gi;function j(t){return encodeURI(""+t).replace(S,"|")}function i(t){return j(typeof t=="string"?t:JSON.stringify(t)).replace(h,"%2B").replace(T,"+").replace(L,"%23").replace(O,"%26").replace(Q,"`").replace(I,"^").replace(g,"%2F")}function a(t){return i(t).replace(b,"%3D")}function R(t=""){try{return decodeURIComponent(""+t)}catch{return""+t}}function N(t){return R(t.replace(h," "))}function U(t){return R(t.replace(h," "))}function $(t=""){const e=Object.create(null);t[0]==="?"&&(t=t.slice(1));for(const c of t.split("&")){const n=c.match(/([^=]+)=?(.*)/)||[];if(n.length<2)continue;const o=N(n[1]);if(o==="__proto__"||o==="constructor")continue;const r=U(n[2]||"");e[o]===void 0?e[o]=r:Array.isArray(e[o])?e[o].push(r):e[o]=[e[o],r]}return e}function w(t,e){return(typeof e=="number"||typeof e=="boolean")&&(e=String(e)),e?Array.isArray(e)?e.map(c=>`${a(t)}=${i(c)}`).join("&"):`${a(t)}=${i(e)}`:a(t)}function H(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>w(e,t[e])).filter(Boolean).join("&")}const v=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,K=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,M=/^([/\\]\s*){2,}[^/\\]/;function B(t,e={}){return typeof e=="boolean"&&(e={acceptRelative:e}),e.strict?v.test(t):K.test(t)||(e.acceptRelative?M.test(t):!1)}const E=Symbol.for("ufo:protocolRelative");function D(t="",e){const c=t.match(/^[\s\0]*(blob:|data:|javascript:|vbscript:)(.*)/i);if(c){const[,l,f=""]=c;return{protocol:l.toLowerCase(),pathname:f,href:l+f,auth:"",host:"",search:"",hash:""}}if(!B(t,{acceptRelative:!0}))return p(t);const[,n="",o,r=""]=t.replace(/\\/g,"/").match(/^[\s\0]*([\w+.-]{2,}:)?\/\/([^/@]+@)?(.*)/)||[];let[,u="",s=""]=r.match(/([^#/?]*)(.*)?/)||[];n==="file:"&&(s=s.replace(/\/(?=[A-Za-z]:)/,""));const{pathname:_,search:y,hash:m}=p(s);return{protocol:n.toLowerCase(),auth:o?o.slice(0,Math.max(0,o.length-1)):"",host:u,pathname:_,search:y,hash:m,[E]:!n}}function p(t=""){const[e="",c="",n=""]=(t.match(/([^#?]*)(\?[^#]*)?(#.*)?/)||[]).splice(1);return{pathname:e,search:c,hash:n}}function G(t){const e=t.pathname||"",c=t.search?(t.search.startsWith("?")?"":"?")+t.search:"",n=t.hash||"",o=t.auth?t.auth+"@":"",r=t.host||"";return(t.protocol||t[E]?(t.protocol||"")+"//":"")+o+r+e+c+n}const V=["page"],X=(t,e=V)=>{const c=D(t);if(!c.search)return t;const n=$(c.search),o=Object.fromEntries(Object.entries(n).filter(([r])=>e.includes(r)));return G({...c,search:H(o)})};function F(){const t=C(),e=A();d({link:[{rel:"canonical",key:"canonical",href:X(`https://${P?.[e.value?.shopId]}${t?.fullPath}`)}]})}export{X as s,F as u};
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.