import{__exports as t}from"../../../../../_virtual/utils.js_commonjs-exports";export{__exports as default}from"../../../../../_virtual/utils.js_commonjs-exports";import"./router/utils/format-url.js";import{__exports as o}from"../../../../../_virtual/format-url.js_commonjs-exports";t.__esModule=!0,t.execOnce=function(t){let o,e=!1;return(...n)=>(e||(e=!0,o=t(...n)),o)},t.getLocationOrigin=n,t.getURL=function(){const{href:t}=window.location,o=n();return t.substring(o.length)},t.getDisplayName=r,t.isResSent=s,t.loadGetInitialProps=async function t(o,e){var n;if("production"!==process.env.NODE_ENV&&null!=(n=o.prototype)&&n.getInitialProps){const t=`"${r(o)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;throw new Error(t)}const i=e.res||e.ctx&&e.ctx.res;if(!o.getInitialProps)return e.ctx&&e.Component?{pageProps:await t(e.Component,e.ctx)}:{};const a=await o.getInitialProps(e);if(i&&s(i))return a;if(!a){const t=`"${r(o)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(t)}"production"!==process.env.NODE_ENV&&(0!==Object.keys(a).length||e.ctx||console.warn(`${r(o)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`));return a},t.formatWithValidation=function(t){"development"===process.env.NODE_ENV&&null!==t&&"object"==typeof t&&Object.keys(t).forEach((t=>{-1===i.indexOf(t)&&console.warn(`Unknown key passed via urlObject into url.format: ${t}`)}));return(0,e.formatUrl)(t)},t.ST=t.SP=t.urlObjectKeys=void 0;var e=o;function n(){const{protocol:t,hostname:o,port:e}=window.location;return`${t}//${o}${e?":"+e:""}`}function r(t){return"string"==typeof t?t:t.displayName||t.name||"Unknown"}function s(t){return t.finished||t.headersSent}const i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];t.urlObjectKeys=i;const a="undefined"!=typeof performance;t.SP=a;const c=a&&"function"==typeof performance.mark&&"function"==typeof performance.measure;t.ST=c;
//# sourceMappingURL=utils.js.map
