@circuitwall/jarela 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +2 -2
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page.js +3989 -3805
- package/.next/standalone/.next/server/app/page.js.map +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app-paths-manifest.json +2 -2
- package/.next/standalone/.next/server/chunks/1813.js.map +1 -1
- package/.next/standalone/.next/server/chunks/319.js.map +1 -1
- package/.next/standalone/.next/server/chunks/4045.js.map +1 -1
- package/.next/standalone/.next/server/chunks/4741.js.map +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/proxy.js.map +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/2747-4a6287cacd57d231.js.map +1 -1
- package/.next/standalone/.next/static/chunks/3457-6d51726379cee3b7.js.map +1 -1
- package/.next/standalone/.next/static/chunks/{1998-31a617131197a83a.js → 962-fe2372e00f85e23a.js} +111 -2
- package/.next/standalone/.next/static/chunks/962-fe2372e00f85e23a.js.map +1 -0
- package/.next/standalone/.next/static/chunks/app/layout-84c6f211a7a1ca36.js.map +1 -1
- package/.next/standalone/.next/static/chunks/app/{page-cd662565eba5ef59.js → page-c5b9f4407416c3f9.js} +3493 -3390
- package/.next/standalone/.next/static/chunks/app/page-c5b9f4407416c3f9.js.map +1 -0
- package/.next/standalone/.next/static/chunks/main-3eb94471f04b2368.js.map +1 -1
- package/.next/standalone/.next/static/css/b8e04d59a2bfff04.css +5 -0
- package/.next/standalone/.next/static/css/b8e04d59a2bfff04.css.map +1 -0
- package/.next/standalone/package.json +1 -1
- package/CHANGELOG.md +47 -0
- package/README.md +6 -6
- package/components/agents/agent-editor/VoiceFields.tsx +1 -1
- package/components/credentials/AddCredentialDialog.tsx +30 -141
- package/components/credentials/CredentialsPanel.tsx +146 -49
- package/components/{integrations/IntegrationsPanel.tsx → credentials/IntegrationCard.tsx} +9 -168
- package/components/documents/AddSourceForm.tsx +4 -4
- package/components/documents/DocumentsPanel.tsx +1 -1
- package/components/integrations/NetworkPanel.tsx +104 -0
- package/components/layout/AppShell.tsx +6 -0
- package/components/layout/MenuPanel.tsx +15 -91
- package/components/profile/ProfileEditor.tsx +1 -1
- package/components/proposals/ApprovalsBanner.tsx +2 -2
- package/components/settings/AppearancePanel.tsx +93 -0
- package/components/settings/SettingsPanel.tsx +94 -0
- package/contexts/AppContext.tsx +1 -1
- package/hooks/useUrlSync.ts +1 -1
- package/lib/ui/navigate.ts +1 -1
- package/package.json +1 -1
- package/.next/standalone/.next/static/chunks/1998-31a617131197a83a.js.map +0 -1
- package/.next/standalone/.next/static/chunks/app/page-cd662565eba5ef59.js.map +0 -1
- package/.next/standalone/.next/static/css/11aaed27d2989cc1.css +0 -5
- package/.next/standalone/.next/static/css/11aaed27d2989cc1.css.map +0 -1
- /package/.next/standalone/.next/static/{tTk-KuLcT7O-E0z6PdMmO → EOkgU73YJOpR-vFcKMgL0}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{tTk-KuLcT7O-E0z6PdMmO → EOkgU73YJOpR-vFcKMgL0}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static/chunks/main-3eb94471f04b2368.js","mappings":";;;;;;;;;;mEAEgBA;;;eAAAA;;;AAAT,SAASA,gCACdC,SAA4B;IAE5B,OAAQA;QACN,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL;YACE,OAAO;IACX;AACF;;;;;;;;;ACxBA;;;CAGC;;;;;;;;;;;;IA8DeC,WAAW;eAAXA;;IAtCAC,gBAAgB;eAAhBA;;IAoFAC,oBAAoB;eAApBA;;IAqBAC,gBAAgB;eAAhBA;;;0CArHT;oDAMA;AAMA,SAASF,iBACdG,KAA+C,EAC/CC,IAAY,EACZC,OAA8C;IAE9C,IAAI,OAAOF,UAAU,UAAU;QAC7B,OAAOG,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ACJ,MAAM,IAAI+H;IACZ;IACA,wKAAwK,GACxKE,OAAO;QACL,MAAM,IAAIF;IACZ;AACF;;;;;;;;;;;;;;;;;;;;2CCHA;;;eAAqBlZ;;;;;4EAjCH;mCAWkB;AAUpC;;;CAGC,GACD,eAAeqZ,mBAAmB,EAChCze,SAAS,EACT0H,GAAG,EACQ;IACX,MAAMgX,YAAY,MAAM7W,CAAAA,GAAAA,OAAAA,mBAAAA,EAAoB7H,WAAW0H;IACvD,OAAO;QAAEgX;IAAU;AACrB;AAEe,MAAMtZ,YAAsCrF,OAAAA,OAAK,CAACC,SAAS;;aAIjE2e,mBAAAA,GAAsBF;;;aACtBG,eAAAA,GAAkBH;;IAEzBvc,SAAS;QACP,MAAM,EAAElC,SAAS,EAAE0e,SAAS,EAAE,GAAG,IAAI,CAACte,KAAK;QAE3C,qBAAO,qBAACJ,WAAAA;YAAW,GAAG0e,SAAS;;IACjC;AACF;;;;;;;;;;;;;;;;AC7Ca;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAOL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,gBAAgB;AACnF;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gBAAgB;AACxE,UAAU;AACV;AACA,oGAAoG,gBAA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AAM,CAAC,CAAC;QACjD,IAAIR,UAAU;YACZ8vB,WAAW,GAAG,CAAC7sC,QAAQ,MAAM,GAAG,CAAC,EAAE6sC,SAAS,CAAC,CAAC;QAChD;QACA,IAAI/vB,UAAU,CAACxB,MAAMC,OAAO,CAACvb,QAAQA,QAAQ;YAACA;SAAM;QAEpD,OACG+c,CAAAA,YAAYQ,SAASqvB,cAAAA,CAAa,IACnC,6CAA6C;SAC5CH,oBACCA,kBAAmBxxC,OAAO,CACxB4xC,UACA/vB,SACK9c,MACEhB,GAAG,CACF,uDAAuD;QAEvD,kDAAkD;QAClD,oCAAoC;QACpC,CAACwV,UAAYmC,mBAAmBnC,UAEjCM,IAAI,CAAC,OACR6B,mBAAmB3W,WACpB,IAAE;IAEb,IACA;QACAysC,oBAAoB,GAAG,mCAAmC;;IAE1D,uEAAuE;IACvE,kDAAkD;IACpD;IACA,OAAO;QACLn1C;QACAM,QAAQ60C;IACV;AACF;;;;;;;;;ACnEa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CA8DL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oBAAoB;AACnE;AACA,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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E;AACF,6BAA6B,kBAAkB;AAC/C,uBAAuB,MAAM,aAAa,IAAI,6EAA6E,MAAM;AACjI,EAAE;AACF,wCAAwC,aAAa;AACrD,6BAA6B,IAAI,qBAAqB,OAAO;AAC7D,EAAE;AACF,kCAAkC,KAAK;AACvC,2CAA2C,IAAI;AAC/C,EAAE;AACF,mBAAmB,YAAY;AAC/B,mEAAmE,IAAI;AACvE,oDAAoD,MAAM;AAC1D;AACA,EAAE;AACF,+BAA+B,aAAa;AAC5C,wCAAwC,IAAI,UAAU,oCAAoC,OAAO,SAAS;AAC1G,EAAE;AACF,yBAAyB,KAAK;AAC9B,sCAAsC,IAAI;AAC1C,EAAE;AACF,iDAAiD,KAAK;AACtD,2FAA2F,KAAK;AAChG,EAAE;AACF,8BAA8B,gBAAgB;AAC9C,mDAAmD,WAAW,MAAM,IAAI;AACxE,EAAE;AACF,kCAAkC,QAAQ;AAC1C,6HAA6H,OAAO;AACpI,EAAE;AACF,6BAA6B,MAAM;AACnC,2EAA2E,KAAK;AAChF,2CAA2C,SAAS;AACpD,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,6CAA6C;AAC7C;AACA,mEAAmE,KAAK;AACxE;AACA;AACA,yBAAyB,KAAqC,cAAc,CAAiB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,4BAA4B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAqC,UAAU,CAOzE;AACD;AACA;AACA;AACA,wEAAwE,gBAAgB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAoE,UAAU,CAqCzF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAAqF;AACjI;AACA;AACA,MAAM,KAAqC,EAAE,EAAqC;AAClF;AACA,KAAK,KAAqC,EAAE,EAA0C;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAE1C;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACsU;;AAEtU;;ACreuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAa;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qCAAa;AAClB,uBAAuB,YAAY;AACnC,EAAE,qCAAa;AACf,GAAG;AACH,EAAE,qCAAa;AACf;AACA,QAAQ,qCAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACyF;;AAEzF;;AChEkV;AAC9M;AACsM;;;ACF9O;AACxC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,uBAAuB,QAAQ;AAC/B,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,IAAI;AAC1C,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,YAAY;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,QAAQ,KAAqC,EAAE,EAAqG;AACpJ,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAgH;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EACQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAC4E;AAC3H;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAgB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,KAAqC,EAAE,EAAmE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,U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;;;;ACRA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA,6BAA6B;;;;;;;;;;;;;2CCvK7B;;;eAAwBkpC;;;mCAfuC;AAW/D,MAAMC,WAAW,OAAOvwC,MAAW;AACnC,MAAMwwC,4BAA4BD,WAAW,KAAO,IAAIprC,OAAAA,eAAe;AACvE,MAAMsrC,sBAAsBF,WAAW,KAAO,IAAIvoC,OAAAA,SAAS;AAE5C,SAASsoC,WAAWhzC,KAAsB;IACvD,MAAM,EAAEd,WAAW,EAAE68B,uBAAuB,EAAE,GAAG/7B;IAEjD,SAASozC;QACP,IAAIl0C,eAAeA,YAAYi6B,gBAAgB,EAAE;YAC/C,MAAMka,eAAe1Y,OAAAA,QAAQ,CAACC,OAAO,CACnC5Z,MAAMkd,IAAI,CAACh/B,YAAYi6B,gBAAgB,EAA0B5gB,MAAM,CACrEpI;YAGJjR,YAAYk6B,UAAU,CAAC2C,wBAAwBsX;QACjD;IACF;IAEA,IAAIJ,UAAU;QACZ/zC,aAAai6B,kBAAkBzY,IAAI1gB,MAAMgC,QAAQ;QACjDoxC;IACF;IAEAF,0BAA0B;QACxBh0C,aAAai6B,kBAAkBzY,IAAI1gB,MAAMgC,QAAQ;QACjD,OAAO;YACL9C,aAAai6B,kBAAkB/iB,OAAOpW,MAAMgC,QAAQ;QACtD;IACF;IAEA,kFAAkF;IAClF,oFAAoF;IACpF,gEAAgE;IAChE,qFAAqF;IACrF,mFAAmF;IACnFkxC,0BAA0B;QACxB,IAAIh0C,aAAa;YACfA,YAAYo0C,cAAc,GAAGF;QAC/B;QACA,OAAO;YACL,IAAIl0C,aAAa;gBACfA,YAAYo0C,cAAc,GAAGF;YAC/B;QACF;IACF;IAEAD,oBAAoB;QAClB,IAAIj0C,eAAeA,YAAYo0C,cAAc,EAAE;YAC7Cp0C,YAAYo0C,cAAc;YAC1Bp0C,YAAYo0C,cAAc,GAAG;QAC/B;QACA,OAAO;YACL,IAAIp0C,eAAeA,YAAYo0C,cAAc,EAAE;gBAC7Cp0C,YAAYo0C,cAAc;gBAC1Bp0C,YAAYo0C,cAAc,GAAG;YAC/B;QACF;IACF;IAEA,OAAO;AACT","sources":["webpack://_N_E/../../../../../src/shared/lib/router/utils/interception-prefix-from-param-type.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-match-utils.ts","webpack://_N_E/../../../src/shared/lib/modern-browserslist-target.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/index.ts","webpack://_N_E/../../src/client/index.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-dynamic.ts","webpack://_N_E/../../../../src/shared/lib/router/adapters.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/omit.ts","webpack://_N_E/../../src/client/page-loader.ts","webpack://_N_E/../../src/client/route-loader.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/interception-routes.ts","webpack://_N_E/../../../src/shared/lib/head-manager-context.shared-runtime.ts","webpack://_N_E/../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://_N_E/../../src/client/trusted-types.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-local-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-url.ts","webpack://_N_E/../../src/client/request-idle-callback.ts","webpack://_N_E/./node_modules/next/dist/build/polyfills/polyfill-module.js","webpack://_N_E/../../../src/client/tracing/tracer.ts","webpack://_N_E/../../src/client/normalize-trailing-slash.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/path-has-prefix.ts","webpack://_N_E/../../../src/client/components/readonly-url-search-params.ts","webpack://_N_E/../../src/pages/_app.tsx","webpack://_N_E/./node_modules/next/dist/lib/route-pattern-normalizer.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-asset-path-from-route.ts","webpack://_N_E/../../../../src/shared/lib/page-path/denormalize-page-path.ts","webpack://_N_E/../../src/client/remove-base-path.ts","webpack://_N_E/./node_modules/next/dist/lib/is-api-route.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts","webpack://_N_E/../../src/client/script.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-segment-param.tsx","webpack://_N_E/../../../../../src/shared/lib/router/routes/app.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-bot.ts","webpack://_N_E/../../src/client/register-deployment-id-global.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-path-prefix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-dynamic-param.ts","webpack://_N_E/../../../src/client/components/redirect-error.ts","webpack://_N_E/../../../src/shared/lib/hooks-client-context.shared-runtime.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-relative-url.ts","webpack://_N_E/../../../../src/shared/lib/i18n/normalize-locale-path.ts","webpack://_N_E/../../../src/shared/lib/escape-regexp.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/app-paths.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://_N_E/../../src/pages/_error.tsx","webpack://_N_E/../../../src/client/react-client-callbacks/report-global-error.ts","webpack://_N_E/../../../src/shared/lib/htmlescape.ts","webpack://_N_E/./node_modules/@swc/helpers/esm/_interop_require_default.js","webpack://_N_E/../../../src/client/lib/javascript-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/querystring.ts","webpack://_N_E/../../../src/shared/lib/encode-uri-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/compare-states.ts","webpack://_N_E/../../src/client/with-router.tsx","webpack://_N_E/../../../src/client/components/redirect-status-code.ts","webpack://_N_E/../../../../src/shared/lib/page-path/ensure-leading-slash.ts","webpack://_N_E/../../src/client/detect-domain-locale.ts","webpack://_N_E/../../src/client/webpack.ts","webpack://_N_E/../../../src/shared/lib/is-plain-object.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-prefix.ts","webpack://_N_E/../../src/client/remove-locale.ts","webpack://_N_E/../../../src/shared/lib/segment.ts","webpack://_N_E/../../src/client/has-base-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/sorted-routes.ts","webpack://_N_E/../../src/client/route-announcer.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/html-bots.ts","webpack://_N_E/../../../../src/shared/lib/page-path/normalize-path-sep.ts","webpack://_N_E/../../../src/shared/lib/router-context.shared-runtime.ts","webpack://_N_E/../../../src/client/portal/index.tsx","webpack://_N_E/./node_modules/next/dist/lib/is-error.js","webpack://_N_E/../../../../src/client/components/http-access-fallback/http-access-fallback.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-suffix.ts","webpack://_N_E/../../src/client/next.ts","webpack://_N_E/../../../src/shared/lib/deployment-id.ts","webpack://_N_E/../../../src/shared/lib/mitt.ts","webpack://_N_E/../../../src/client/lib/promise.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-loader-tree.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-matcher.ts","webpack://_N_E/../../../src/client/components/is-next-router-error.ts","webpack://_N_E/../../src/client/router.ts","webpack://_N_E/./node_modules/next/dist/lib/require-instrumentation-client.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-regex.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/as-path-to-search-params.ts","webpack://_N_E/../../../../src/shared/lib/utils/warn-once.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://_N_E/../../src/client/head-manager.ts","webpack://_N_E/../../src/client/resolve-href.ts","webpack://_N_E/../../../src/shared/lib/head.tsx","webpack://_N_E/../../../src/shared/lib/image-config.ts","webpack://_N_E/../../../src/shared/lib/bloom-filter.ts","webpack://_N_E/../../../src/client/react-client-callbacks/on-recoverable-error.ts","webpack://_N_E/../../src/client/add-base-path.ts","webpack://_N_E/../../src/client/add-locale.ts","webpack://_N_E/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-locale.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/resolve-param-value.ts","webpack://_N_E/../../../src/shared/lib/image-config-context.shared-runtime.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-path.ts","webpack://_N_E/../../../src/shared/lib/utils.ts","webpack://_N_E/../../../../src/shared/lib/router/router.ts","webpack://_N_E/../../../src/shared/lib/app-router-context.shared-runtime.ts","webpack://_N_E/../../../src/shared/lib/constants.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/interpolate-as.ts","webpack://_N_E/./node_modules/next/dist/lib/constants.js","webpack://_N_E/../../src/client/set-attributes-from-props.ts","webpack://_N_E/./node_modules/serwist/dist/chunks/waitUntil-BHDx3Rgo.js","webpack://_N_E/./node_modules/serwist/dist/chunks/index.internal-Dxj9Ni9X.js","webpack://_N_E/./node_modules/serwist/dist/index.internal.mjs","webpack://_N_E/./node_modules/@serwist/window/dist/index.mjs","webpack://_N_E/./node_modules/@serwist/window/dist/chunks/isCurrentPageOutOfScope-vi3IAsNY.js","webpack://_N_E/./node_modules/@serwist/next/dist/sw-entry.mjs","webpack://_N_E/ignored|/home/runner/work/jarela/jarela/node_modules/next/dist/lib|private-next-instrumentation-client","webpack://_N_E/./node_modules/next/dist/compiled/path-to-regexp/index.js","webpack://_N_E/../../../src/shared/lib/entry-constants.ts","webpack://_N_E/../../../src/shared/lib/invariant-error.ts","webpack://_N_E/./node_modules/process/browser.js","webpack://_N_E/../../../src/shared/lib/side-effect.tsx"],"sourcesContent":["import type { DynamicParamTypes } from '../../app-router-types'\n\nexport function interceptionPrefixFromParamType(\n paramType: DynamicParamTypes\n): string | null {\n switch (paramType) {\n case 'catchall-intercepted-(..)(..)':\n case 'dynamic-intercepted-(..)(..)':\n return '(..)(..)'\n case 'catchall-intercepted-(.)':\n case 'dynamic-intercepted-(.)':\n return '(.)'\n case 'catchall-intercepted-(..)':\n case 'dynamic-intercepted-(..)':\n return '(..)'\n case 'catchall-intercepted-(...)':\n case 'dynamic-intercepted-(...)':\n return '(...)'\n case 'catchall':\n case 'dynamic':\n case 'optional-catchall':\n default:\n return null\n }\n}\n","/**\n * Client-safe utilities for route matching that don't import server-side\n * utilities to avoid bundling issues with Turbopack\n */\n\nimport type {\n Key,\n TokensToRegexpOptions,\n ParseOptions,\n TokensToFunctionOptions,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n pathToRegexp,\n compile,\n regexpToFunction,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n hasAdjacentParameterIssues,\n normalizeAdjacentParameters,\n stripParameterSeparators,\n stripNormalizedSeparators,\n} from '../../../../lib/route-pattern-normalizer'\n\n/**\n * Client-safe wrapper around pathToRegexp that handles path-to-regexp 6.3.0+ validation errors.\n * This includes both \"Can not repeat without prefix/suffix\" and \"Must have text between parameters\" errors.\n */\nexport function safePathToRegexp(\n route: string | RegExp | Array<string | RegExp>,\n keys?: Key[],\n options?: TokensToRegexpOptions & ParseOptions\n): RegExp {\n if (typeof route !== 'string') {\n return pathToRegexp(route, keys, options)\n }\n\n // Check if normalization is needed and cache the result\n const needsNormalization = hasAdjacentParameterIssues(route)\n const routeToUse = needsNormalization\n ? normalizeAdjacentParameters(route)\n : route\n\n try {\n return pathToRegexp(routeToUse, keys, options)\n } catch (error) {\n // Only try normalization if we haven't already normalized\n if (!needsNormalization) {\n try {\n const normalizedRoute = normalizeAdjacentParameters(route)\n return pathToRegexp(normalizedRoute, keys, options)\n } catch (retryError) {\n // If that doesn't work, fall back to original error\n throw error\n }\n }\n throw error\n }\n}\n\n/**\n * Client-safe wrapper around compile that handles path-to-regexp 6.3.0+ validation errors.\n * No server-side error reporting to avoid bundling issues.\n * When normalization is applied, the returned compiler function automatically strips\n * the internal separator from the output URL.\n */\nexport function safeCompile(\n route: string,\n options?: TokensToFunctionOptions & ParseOptions\n) {\n // Check if normalization is needed and cache the result\n const needsNormalization = hasAdjacentParameterIssues(route)\n const routeToUse = needsNormalization\n ? normalizeAdjacentParameters(route)\n : route\n\n try {\n const compiler = compile(routeToUse, options)\n\n // If we normalized the route, wrap the compiler to strip separators from output\n // The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy\n // path-to-regexp validation, but we don't want it in the final compiled URL\n if (needsNormalization) {\n return (params: any) => {\n return stripNormalizedSeparators(compiler(params))\n }\n }\n\n return compiler\n } catch (error) {\n // Only try normalization if we haven't already normalized\n if (!needsNormalization) {\n try {\n const normalizedRoute = normalizeAdjacentParameters(route)\n const compiler = compile(normalizedRoute, options)\n\n // Wrap the compiler to strip separators from output\n return (params: any) => {\n return stripNormalizedSeparators(compiler(params))\n }\n } catch (retryError) {\n // If that doesn't work, fall back to original error\n throw error\n }\n }\n throw error\n }\n}\n\n/**\n * Client-safe wrapper around regexpToFunction that automatically cleans parameters.\n */\nexport function safeRegexpToFunction<\n T extends Record<string, any> = Record<string, any>,\n>(regexp: RegExp, keys?: Key[]): (pathname: string) => { params: T } | false {\n const originalMatcher = regexpToFunction<T>(regexp, keys || [])\n\n return (pathname: string) => {\n const result = originalMatcher(pathname)\n if (!result) return false\n\n // Clean parameters before returning\n return {\n ...result,\n params: stripParameterSeparators(result.params as any) as T,\n }\n }\n}\n\n/**\n * Safe wrapper for route matcher functions that automatically cleans parameters.\n * This is client-safe and doesn't import path-to-regexp.\n */\nexport function safeRouteMatcher<T extends Record<string, any>>(\n matcherFn: (pathname: string) => false | T\n): (pathname: string) => false | T {\n return (pathname: string) => {\n const result = matcherFn(pathname)\n if (!result) return false\n\n // Clean parameters before returning\n return stripParameterSeparators(result) as T\n }\n}\n","// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.\n// Keep file changes in sync with the corresponding `.d.ts` files.\n\n/**\n * These are the minimum browser versions that we consider \"modern\" and thus compile for by default.\n * This list was generated using `pnpm browserslist \"baseline widely available\"` on 2025-10-01.\n */\nconst MODERN_BROWSERSLIST_TARGET = [\n 'chrome 111',\n 'edge 111',\n 'firefox 111',\n 'safari 16.4',\n]\n\nmodule.exports = MODERN_BROWSERSLIST_TARGET\n","export { getSortedRoutes, getSortedRouteObjects } from './sorted-routes'\nexport { isDynamicRoute } from './is-dynamic'\n","/* global location */\n// imports polyfill from `@next/polyfill-module` after build.\nimport '../build/polyfills/polyfill-module'\nimport type Router from '../shared/lib/router/router'\nimport type {\n AppComponent,\n AppProps,\n PrivateRouteInfo,\n} from '../shared/lib/router/router'\n\nimport React, { type JSX } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport mitt from '../shared/lib/mitt'\nimport type { MittEmitter } from '../shared/lib/mitt'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { disableSmoothScrollDuringRouteTransition } from '../shared/lib/router/utils/disable-smooth-scroll'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport {\n urlQueryToSearchParams,\n assign,\n} from '../shared/lib/router/utils/querystring'\nimport { getURL, loadGetInitialProps, ST } from '../shared/lib/utils'\nimport type { NextWebVitalsMetric, NEXT_DATA } from '../shared/lib/utils'\nimport { Portal } from './portal'\nimport initHeadManager from './head-manager'\nimport PageLoader from './page-loader'\nimport type { StyleSheetTuple } from './page-loader'\nimport { RouteAnnouncer } from './route-announcer'\nimport { createRouter, makePublicRouterInstance } from './router'\nimport { getProperError } from '../lib/is-error'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport type { ImageConfigComplete } from '../shared/lib/image-config'\nimport { removeBasePath } from './remove-base-path'\nimport { hasBasePath } from './has-base-path'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport {\n adaptForAppRouterInstance,\n adaptForPathParams,\n adaptForSearchParams,\n PathnameContextProviderAdapter,\n} from '../shared/lib/router/adapters'\nimport {\n SearchParamsContext,\n PathParamsContext,\n} from '../shared/lib/hooks-client-context.shared-runtime'\nimport { onRecoverableError } from './react-client-callbacks/on-recoverable-error'\nimport tracer from './tracing/tracer'\nimport { isNextRouterError } from './components/is-next-router-error'\n\n/// <reference types=\"react-dom/experimental\" />\n\ndeclare global {\n interface Window {\n /* test fns */\n __NEXT_HYDRATED?: boolean\n __NEXT_HYDRATED_AT?: number\n __NEXT_HYDRATED_CB?: () => void\n\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n __NEXT_P: any[]\n }\n}\ntype RenderRouteInfo = PrivateRouteInfo & {\n App: AppComponent\n scroll?: { x: number; y: number } | null\n isHydratePass?: boolean\n}\ntype RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>\ntype RegisterFn = (input: [string, () => void]) => void\n\nexport const version = process.env.__NEXT_VERSION\nexport let router: Router\nexport const emitter: MittEmitter<string> = mitt()\n\nconst looseToArray = <T extends {}>(input: any): T[] => [].slice.call(input)\n\nlet initialData: NEXT_DATA\nlet defaultLocale: string | undefined = undefined\nlet asPath: string\nlet pageLoader: PageLoader\nlet appElement: HTMLElement | null\nlet headManager: {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n getIsSsr?: () => boolean\n}\nlet initialMatchesMiddleware = false\nlet lastAppProps: AppProps\n\nlet lastRenderReject: (() => void) | null\nlet devClient: any\n\nlet CachedApp: AppComponent, onPerfEntry: (metric: any) => void\nlet CachedComponent: React.ComponentType\n\nclass Container extends React.Component<{\n children?: React.ReactNode\n fn: (err: Error, info?: any) => void\n}> {\n componentDidCatch(componentErr: Error, info: any) {\n this.props.fn(componentErr, info)\n }\n\n componentDidMount() {\n this.scrollToHash()\n\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n // - if middleware matches the current page (may have rewrite params)\n // - if rewrites in next.config.js match (may have rewrite params)\n if (\n router.isSsr &&\n (initialData.isFallback ||\n (initialData.nextExport &&\n (isDynamicRoute(router.pathname) ||\n location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)) ||\n (initialData.props &&\n initialData.props.__N_SSG &&\n (location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)))\n ) {\n // update query on mount for exported pages\n router\n .replace(\n router.pathname +\n '?' +\n String(\n assign(\n urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n asPath,\n {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !initialData.isFallback && !initialMatchesMiddleware,\n }\n )\n .catch((err) => {\n if (!err.cancelled) throw err\n })\n }\n }\n\n componentDidUpdate() {\n this.scrollToHash()\n }\n\n scrollToHash() {\n let { hash } = location\n hash = hash && hash.substring(1)\n if (!hash) return\n\n const el: HTMLElement | null = document.getElementById(hash)\n if (!el) return\n\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(() => el.scrollIntoView(), 0)\n }\n\n render() {\n if (process.env.NODE_ENV === 'production') {\n return this.props.children\n } else {\n const { PagesDevOverlayBridge } =\n require('../next-devtools/userspace/pages/pages-dev-overlay-setup') as typeof import('../next-devtools/userspace/pages/pages-dev-overlay-setup')\n return (\n <PagesDevOverlayBridge>{this.props.children}</PagesDevOverlayBridge>\n )\n }\n }\n}\n\nexport async function initialize(opts: { devClient?: any } = {}): Promise<{\n assetPrefix: string\n}> {\n // This makes sure this specific lines are removed in production\n if (process.env.NODE_ENV === 'development') {\n tracer.onSpanEnd(\n (\n require('./tracing/report-to-socket') as typeof import('./tracing/report-to-socket')\n ).default\n )\n devClient = opts.devClient\n }\n\n initialData = JSON.parse(\n document.getElementById('__NEXT_DATA__')!.textContent!\n )\n window.__NEXT_DATA__ = initialData\n\n defaultLocale = initialData.defaultLocale\n const prefix: string = initialData.assetPrefix || ''\n // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n // So, this is how we do it in the client side at runtime\n ;(self as any).__next_set_public_path__(`${prefix}/_next/`)\n\n asPath = getURL()\n\n // make sure not to attempt stripping basePath for 404s\n if (hasBasePath(asPath)) {\n asPath = removeBasePath(asPath)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { normalizeLocalePath } =\n require('../shared/lib/i18n/normalize-locale-path') as typeof import('../shared/lib/i18n/normalize-locale-path')\n\n const { detectDomainLocale } =\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n\n const { parseRelativeUrl } =\n require('../shared/lib/router/utils/parse-relative-url') as typeof import('../shared/lib/router/utils/parse-relative-url')\n\n const { formatUrl } =\n require('../shared/lib/router/utils/format-url') as typeof import('../shared/lib/router/utils/format-url')\n\n if (initialData.locales) {\n const parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n initialData.locales\n )\n\n if (localePathResult.detectedLocale) {\n parsedAs.pathname = localePathResult.pathname\n asPath = formatUrl(parsedAs)\n } else {\n // derive the default locale if it wasn't detected in the asPath\n // since we don't prerender static pages with all possible default\n // locales\n defaultLocale = initialData.locale\n }\n\n // attempt detecting default locale based on hostname\n const detectedDomain = detectDomainLocale(\n process.env.__NEXT_I18N_DOMAINS as any,\n window.location.hostname\n )\n\n // TODO: investigate if defaultLocale needs to be populated after\n // hydration to prevent mismatched renders\n if (detectedDomain) {\n defaultLocale = detectedDomain.defaultLocale\n }\n }\n }\n\n if (initialData.scriptLoader) {\n const { initScriptLoader } =\n require('./script') as typeof import('./script')\n initScriptLoader(initialData.scriptLoader)\n }\n\n pageLoader = new PageLoader(initialData.buildId, prefix)\n\n const register: RegisterFn = ([r, f]) =>\n pageLoader.routeLoader.onEntrypoint(r, f)\n if (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map((p) => setTimeout(() => register(p), 0))\n }\n window.__NEXT_P = []\n ;(window.__NEXT_P as any).push = register\n\n headManager = initHeadManager()\n headManager.getIsSsr = () => {\n return router.isSsr\n }\n\n appElement = document.getElementById('__next')\n return { assetPrefix: prefix }\n}\n\nfunction renderApp(App: AppComponent, appProps: AppProps) {\n return <App {...appProps} />\n}\n\nfunction AppContainer({\n children,\n}: React.PropsWithChildren<{}>): React.ReactElement {\n // Create a memoized value for next/navigation router context.\n const adaptedForAppRouter = React.useMemo(() => {\n return adaptForAppRouterInstance(router)\n }, [])\n return (\n <Container\n fn={(error) =>\n renderError({ App: CachedApp, err: error }).catch((err) =>\n console.error('Error rendering page: ', err)\n )\n }\n >\n <AppRouterContext.Provider value={adaptedForAppRouter}>\n <SearchParamsContext.Provider value={adaptForSearchParams(router)}>\n <PathnameContextProviderAdapter\n router={router}\n isAutoExport={self.__NEXT_DATA__.autoExport ?? false}\n >\n <PathParamsContext.Provider value={adaptForPathParams(router)}>\n <RouterContext.Provider value={makePublicRouterInstance(router)}>\n <HeadManagerContext.Provider value={headManager}>\n <ImageConfigContext.Provider\n value={\n process.env\n .__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n }\n >\n {children}\n </ImageConfigContext.Provider>\n </HeadManagerContext.Provider>\n </RouterContext.Provider>\n </PathParamsContext.Provider>\n </PathnameContextProviderAdapter>\n </SearchParamsContext.Provider>\n </AppRouterContext.Provider>\n </Container>\n )\n}\n\nconst wrapApp =\n (App: AppComponent) =>\n (wrappedAppProps: Record<string, any>): JSX.Element => {\n const appProps: AppProps = {\n ...wrappedAppProps,\n Component: CachedComponent,\n err: initialData.err,\n router,\n }\n return <AppContainer>{renderApp(App, appProps)}</AppContainer>\n }\n\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nfunction renderError(renderErrorProps: RenderErrorProps): Promise<any> {\n let { App, err } = renderErrorProps\n\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (process.env.NODE_ENV !== 'production') {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n devClient.onUnrecoverableError()\n\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n return doRender({\n App: () => null,\n props: {},\n Component: () => null,\n styleSheets: [],\n })\n }\n\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err)\n console.error(\n `A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred`\n )\n\n return pageLoader\n .loadPage('/_error')\n .then(({ page: ErrorComponent, styleSheets }) => {\n return lastAppProps?.Component === ErrorComponent\n ? import('../pages/_error')\n .then((errorModule) => {\n return import('../pages/_app').then((appModule) => {\n App = appModule.default as any as AppComponent\n renderErrorProps.App = App\n return errorModule\n })\n })\n .then((m) => ({\n ErrorComponent: m.default as React.ComponentType<{}>,\n styleSheets: [],\n }))\n : { ErrorComponent, styleSheets }\n })\n .then(({ ErrorComponent, styleSheets }) => {\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n const AppTree = wrapApp(App)\n const appCtx = {\n Component: ErrorComponent,\n AppTree,\n router,\n ctx: {\n err,\n pathname: initialData.page,\n query: initialData.query,\n asPath,\n AppTree,\n },\n }\n return Promise.resolve(\n renderErrorProps.props?.err\n ? renderErrorProps.props\n : loadGetInitialProps(App, appCtx)\n ).then((initProps) =>\n doRender({\n ...renderErrorProps,\n err,\n Component: ErrorComponent,\n styleSheets,\n props: initProps,\n })\n )\n })\n}\n\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head({ callback }: { callback: () => void }): null {\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n React.useLayoutEffect(() => callback(), [callback])\n return null\n}\n\nconst performanceMarks = {\n navigationStart: 'navigationStart',\n beforeRender: 'beforeRender',\n afterRender: 'afterRender',\n afterHydrate: 'afterHydrate',\n routeChange: 'routeChange',\n} as const\n\nconst performanceMeasures = {\n hydration: 'Next.js-hydration',\n beforeHydration: 'Next.js-before-hydration',\n routeChangeToRender: 'Next.js-route-change-to-render',\n render: 'Next.js-render',\n} as const\n\nlet reactRoot: any = null\n// On initial render a hydrate should always happen\nlet shouldHydrate: boolean = true\n\nfunction clearMarks(): void {\n ;[\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate,\n performanceMarks.afterRender,\n performanceMarks.routeChange,\n ].forEach((mark) => performance.clearMarks(mark))\n}\n\nfunction markHydrateComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterHydrate) // mark end of hydration\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n if (hasBeforeRenderMark) {\n const beforeHydrationMeasure = performance.measure(\n performanceMeasures.beforeHydration,\n performanceMarks.navigationStart,\n performanceMarks.beforeRender\n )\n\n const hydrationMeasure = performance.measure(\n performanceMeasures.hydration,\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate\n )\n\n if (\n process.env.NODE_ENV === 'development' &&\n // Old versions of Safari don't return `PerformanceMeasure`s from `performance.measure()`\n beforeHydrationMeasure &&\n hydrationMeasure\n ) {\n tracer\n .startSpan('navigation-to-hydration', {\n startTime: performance.timeOrigin + beforeHydrationMeasure.startTime,\n attributes: {\n pathname: location.pathname,\n query: location.search,\n },\n })\n .end(\n performance.timeOrigin +\n hydrationMeasure.startTime +\n hydrationMeasure.duration\n )\n }\n }\n\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.hydration)\n .forEach(onPerfEntry)\n }\n clearMarks()\n}\n\nfunction markRenderComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterRender) // mark end of render\n const navStartEntries: PerformanceEntryList = performance.getEntriesByName(\n performanceMarks.routeChange,\n 'mark'\n )\n\n if (!navStartEntries.length) return\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n\n if (hasBeforeRenderMark) {\n performance.measure(\n performanceMeasures.routeChangeToRender,\n navStartEntries[0].name,\n performanceMarks.beforeRender\n )\n performance.measure(\n performanceMeasures.render,\n performanceMarks.beforeRender,\n performanceMarks.afterRender\n )\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.render)\n .forEach(onPerfEntry)\n performance\n .getEntriesByName(performanceMeasures.routeChangeToRender)\n .forEach(onPerfEntry)\n }\n }\n\n clearMarks()\n ;[\n performanceMeasures.routeChangeToRender,\n performanceMeasures.render,\n ].forEach((measure) => performance.clearMeasures(measure))\n}\n\nfunction renderReactElement(\n domEl: HTMLElement,\n fn: (cb: () => void) => JSX.Element\n): void {\n // mark start of hydrate/render\n if (ST) {\n performance.mark(performanceMarks.beforeRender)\n }\n\n const reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete)\n if (!reactRoot) {\n // Unlike with createRoot, you don't need a separate root.render() call here\n reactRoot = ReactDOM.hydrateRoot(domEl, reactEl, {\n onRecoverableError,\n })\n // TODO: Remove shouldHydrate variable when React 18 is stable as it can depend on `reactRoot` existing\n shouldHydrate = false\n } else {\n const startTransition = (React as any).startTransition\n startTransition(() => {\n reactRoot.render(reactEl)\n })\n }\n}\n\nfunction Root({\n callbacks,\n children,\n}: React.PropsWithChildren<{\n callbacks: Array<() => void>\n}>): React.ReactElement {\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n React.useLayoutEffect(\n () => callbacks.forEach((callback) => callback()),\n [callbacks]\n )\n\n if (process.env.__NEXT_TEST_MODE) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n window.__NEXT_HYDRATED = true\n window.__NEXT_HYDRATED_AT = performance.now()\n\n if (window.__NEXT_HYDRATED_CB) {\n window.__NEXT_HYDRATED_CB()\n }\n }, [])\n }\n\n return children as React.ReactElement\n}\n\nfunction doRender(input: RenderRouteInfo): Promise<any> {\n let { App, Component, props, err }: RenderRouteInfo = input\n let styleSheets: StyleSheetTuple[] | undefined =\n 'initial' in input ? undefined : input.styleSheets\n Component = Component || lastAppProps.Component\n props = props || lastAppProps.props\n\n const appProps: AppProps = {\n ...props,\n Component,\n err,\n router,\n }\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps\n\n let canceled: boolean = false\n let resolvePromise: () => void\n const renderPromise = new Promise<void>((resolve, reject) => {\n if (lastRenderReject) {\n lastRenderReject()\n }\n resolvePromise = () => {\n lastRenderReject = null\n resolve()\n }\n lastRenderReject = () => {\n canceled = true\n lastRenderReject = null\n\n const error: any = new Error('Cancel rendering route')\n error.cancelled = true\n reject(error)\n }\n })\n\n // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart(): boolean {\n if (\n !styleSheets ||\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV !== 'production'\n ) {\n return false\n }\n\n const currentStyleTags: HTMLStyleElement[] = looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: Set<string | null> = new Set(\n currentStyleTags.map((tag) => tag.getAttribute('data-n-href'))\n )\n\n const noscript: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n const nonce: string | null | undefined =\n noscript?.getAttribute('data-n-css')\n\n styleSheets.forEach(({ href, text }: { href: string; text: any }) => {\n if (!currentHrefs.has(href)) {\n const styleTag = document.createElement('style')\n styleTag.setAttribute('data-n-href', href)\n styleTag.setAttribute('media', 'x')\n\n if (nonce) {\n styleTag.setAttribute('nonce', nonce)\n }\n\n document.head.appendChild(styleTag)\n styleTag.appendChild(document.createTextNode(text))\n }\n })\n return true\n }\n\n function onHeadCommit(): void {\n if (\n // Turbopack has it's own css injection handling, this code ends up removing the CSS.\n !process.env.TURBOPACK &&\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV === 'production' &&\n // We can skip this during hydration. Running it wont cause any harm, but\n // we may as well save the CPU cycles:\n styleSheets &&\n // Ensure this render was not canceled\n !canceled\n ) {\n const desiredHrefs: Set<string> = new Set(styleSheets.map((s) => s.href))\n const currentStyleTags: HTMLStyleElement[] =\n looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: string[] = currentStyleTags.map(\n (tag) => tag.getAttribute('data-n-href')!\n )\n\n // Toggle `<style>` tags on or off depending on if they're needed:\n for (let idx = 0; idx < currentHrefs.length; ++idx) {\n if (desiredHrefs.has(currentHrefs[idx])) {\n currentStyleTags[idx].removeAttribute('media')\n } else {\n currentStyleTags[idx].setAttribute('media', 'x')\n }\n }\n\n // Reorder styles into intended order:\n let referenceNode: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n if (\n // This should be an invariant:\n referenceNode\n ) {\n styleSheets.forEach(({ href }: { href: string }) => {\n const targetTag: Element | null = document.querySelector(\n `style[data-n-href=\"${href}\"]`\n )\n if (\n // This should be an invariant:\n targetTag\n ) {\n referenceNode!.parentNode!.insertBefore(\n targetTag,\n referenceNode!.nextSibling\n )\n referenceNode = targetTag\n }\n })\n }\n\n // Finally, clean up server rendered stylesheets:\n looseToArray<HTMLLinkElement>(\n document.querySelectorAll('link[data-n-p]')\n ).forEach((el) => {\n el.parentNode!.removeChild(el)\n })\n }\n\n if (input.scroll) {\n const { x, y } = input.scroll\n disableSmoothScrollDuringRouteTransition(() => {\n window.scrollTo(x, y)\n })\n }\n }\n\n function onRootCommit(): void {\n resolvePromise()\n }\n\n onStart()\n\n const elem: JSX.Element = (\n <>\n <Head callback={onHeadCommit} />\n <AppContainer>\n {renderApp(App, appProps)}\n <Portal type=\"next-route-announcer\">\n <RouteAnnouncer />\n </Portal>\n </AppContainer>\n </>\n )\n\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement!, (callback) => (\n <Root callbacks={[callback, onRootCommit]}>\n {process.env.__NEXT_STRICT_MODE ? (\n <React.StrictMode>{elem}</React.StrictMode>\n ) : (\n elem\n )}\n </Root>\n ))\n\n return renderPromise\n}\n\nasync function render(renderingProps: RenderRouteInfo): Promise<void> {\n // if an error occurs in a server-side page (e.g. in getInitialProps),\n // skip re-rendering the error page client-side as data-fetching operations\n // will already have been done on the server and NEXT_DATA contains the correct\n // data for straight-forward hydration of the error page\n if (\n renderingProps.err &&\n // renderingProps.Component might be undefined if there is a top/module-level error\n (typeof renderingProps.Component === 'undefined' ||\n !renderingProps.isHydratePass)\n ) {\n await renderError(renderingProps)\n return\n }\n\n try {\n await doRender(renderingProps)\n } catch (err) {\n const renderErr = getProperError(err)\n // bubble up cancelation errors\n if ((renderErr as Error & { cancelled?: boolean }).cancelled) {\n throw renderErr\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Ensure this error is displayed in the overlay in development\n setTimeout(() => {\n throw renderErr\n })\n }\n await renderError({ ...renderingProps, err: renderErr })\n }\n}\n\nexport async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {\n let initialErr = initialData.err\n\n try {\n const appEntrypoint = await pageLoader.routeLoader.whenEntrypoint('/_app')\n if ('error' in appEntrypoint) {\n throw appEntrypoint.error\n }\n\n const { component: app, exports: mod } = appEntrypoint\n CachedApp = app as AppComponent\n if (mod && mod.reportWebVitals) {\n onPerfEntry = ({\n id,\n name,\n startTime,\n value,\n duration,\n entryType,\n entries,\n attribution,\n }: any): void => {\n // Combines timestamp with random number for unique ID\n const uniqueID: string = `${Date.now()}-${\n Math.floor(Math.random() * (9e12 - 1)) + 1e12\n }`\n let perfStartEntry: string | undefined\n\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime\n }\n\n const webVitals: NextWebVitalsMetric = {\n id: id || uniqueID,\n name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label:\n entryType === 'mark' || entryType === 'measure'\n ? 'custom'\n : 'web-vital',\n }\n if (attribution) {\n webVitals.attribution = attribution\n }\n mod.reportWebVitals(webVitals)\n }\n }\n\n const pageEntrypoint =\n // The dev server fails to serve script assets when there's a hydration\n // error, so we need to skip waiting for the entrypoint.\n process.env.NODE_ENV === 'development' && initialData.err\n ? { error: initialData.err }\n : await pageLoader.routeLoader.whenEntrypoint(initialData.page)\n if ('error' in pageEntrypoint) {\n throw pageEntrypoint.error\n }\n CachedComponent = pageEntrypoint.component\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } =\n require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n if (!isValidElementType(CachedComponent)) {\n throw new Error(\n `The default export is not a React Component in page: \"${initialData.page}\"`\n )\n }\n }\n } catch (error) {\n // This catches errors like throwing in the top level of a module\n initialErr = getProperError(error)\n }\n\n if (process.env.NODE_ENV === 'development') {\n const getServerError = (\n require('../server/dev/node-stack-frames') as typeof import('../server/dev/node-stack-frames')\n ).getServerError\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === initialData.err) {\n setTimeout(() => {\n let error\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr!.message)\n } catch (e) {\n error = e as Error\n }\n\n error.name = initialErr!.name\n error.stack = initialErr!.stack\n const errSource = initialErr.source!\n\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in pages router as it doesn't contain error boundary like app router.\n if (isNextRouterError(initialErr)) {\n error.message =\n 'Next.js navigation API is not allowed to be used in Pages Router.'\n }\n\n throw getServerError(error, errSource)\n })\n }\n // We replaced the server-side error with a client-side error, and should\n // no longer rewrite the stack trace to a Node error.\n else {\n setTimeout(() => {\n throw initialErr\n })\n }\n }\n }\n\n if (window.__NEXT_PRELOADREADY) {\n await window.__NEXT_PRELOADREADY(initialData.dynamicIds)\n }\n\n router = createRouter(initialData.page, initialData.query, asPath, {\n initialProps: initialData.props,\n pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp,\n err: initialErr,\n isFallback: Boolean(initialData.isFallback),\n subscription: (info, App, scroll) =>\n render(\n Object.assign<\n {},\n Omit<RenderRouteInfo, 'App' | 'scroll'>,\n Pick<RenderRouteInfo, 'App' | 'scroll'>\n >({}, info, {\n App,\n scroll,\n }) as RenderRouteInfo\n ),\n locale: initialData.locale,\n locales: initialData.locales,\n defaultLocale,\n domainLocales: initialData.domainLocales,\n isPreview: initialData.isPreview,\n })\n\n initialMatchesMiddleware = await router._initialMatchesMiddlewarePromise\n\n const renderCtx: RenderRouteInfo = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: initialData.props,\n err: initialErr,\n isHydratePass: true,\n }\n\n if (opts?.beforeRender) {\n await opts.beforeRender()\n }\n\n render(renderCtx)\n}\n","import {\n extractInterceptionRouteInformation,\n isInterceptionRouteAppPath,\n} from './interception-routes'\n\n// Identify /.*[param].*/ in route string\nconst TEST_ROUTE = /\\/[^/]*\\[[^/]+\\][^/]*(?=\\/|$)/\n\n// Identify /[param]/ in route string\nconst TEST_STRICT_ROUTE = /\\/\\[[^/]+\\](?=\\/|$)/\n\n/**\n * Check if a route is dynamic.\n *\n * @param route - The route to check.\n * @param strict - Whether to use strict mode which prohibits segments with prefixes/suffixes (default: true).\n * @returns Whether the route is dynamic.\n */\nexport function isDynamicRoute(route: string, strict: boolean = true): boolean {\n if (isInterceptionRouteAppPath(route)) {\n route = extractInterceptionRouteInformation(route).interceptedRoute\n }\n\n if (strict) {\n return TEST_STRICT_ROUTE.test(route)\n }\n\n return TEST_ROUTE.test(route)\n}\n","import type { AppRouterInstance } from '../app-router-context.shared-runtime'\nimport type { Params } from '../../../server/request/params'\nimport type { NextRouter } from './router'\n\nimport React, { useMemo, useRef } from 'react'\nimport { PathnameContext } from '../hooks-client-context.shared-runtime'\nimport { isDynamicRoute } from './utils'\nimport { asPathToSearchParams } from './utils/as-path-to-search-params'\nimport { getRouteRegex } from './utils/route-regex'\n\n/** It adapts a Pages Router (`NextRouter`) to the App Router Instance. */\nexport function adaptForAppRouterInstance(\n pagesRouter: NextRouter\n): AppRouterInstance {\n return {\n back() {\n pagesRouter.back()\n },\n forward() {\n pagesRouter.forward()\n },\n refresh() {\n pagesRouter.reload()\n },\n hmrRefresh() {},\n push(href, { scroll } = {}) {\n void pagesRouter.push(href, undefined, { scroll })\n },\n replace(href, { scroll } = {}) {\n void pagesRouter.replace(href, undefined, { scroll })\n },\n prefetch(href) {\n void pagesRouter.prefetch(href)\n },\n }\n}\n\n/**\n * adaptForSearchParams transforms the ParsedURLQuery into URLSearchParams.\n *\n * @param router the router that contains the query.\n * @returns the search params in the URLSearchParams format\n */\nexport function adaptForSearchParams(\n router: Pick<NextRouter, 'isReady' | 'query' | 'asPath'>\n): URLSearchParams {\n if (!router.isReady || !router.query) {\n return new URLSearchParams()\n }\n\n return asPathToSearchParams(router.asPath)\n}\n\nexport function adaptForPathParams(\n router: Pick<NextRouter, 'isReady' | 'pathname' | 'query' | 'asPath'>\n): Params | null {\n if (!router.isReady || !router.query) {\n return null\n }\n const pathParams: Params = {}\n const routeRegex = getRouteRegex(router.pathname)\n const keys = Object.keys(routeRegex.groups)\n for (const key of keys) {\n pathParams[key] = router.query[key]!\n }\n return pathParams\n}\n\nexport function PathnameContextProviderAdapter({\n children,\n router,\n ...props\n}: React.PropsWithChildren<{\n router: Pick<NextRouter, 'pathname' | 'asPath' | 'isReady' | 'isFallback'>\n isAutoExport: boolean\n}>) {\n const ref = useRef(props.isAutoExport)\n const value = useMemo(() => {\n // isAutoExport is only ever `true` on the first render from the server,\n // so reset it to `false` after we read it for the first time as `true`. If\n // we don't use the value, then we don't need it.\n const isAutoExport = ref.current\n if (isAutoExport) {\n ref.current = false\n }\n\n // When the route is a dynamic route, we need to do more processing to\n // determine if we need to stop showing the pathname.\n if (isDynamicRoute(router.pathname)) {\n // When the router is rendering the fallback page, it can't possibly know\n // the path, so return `null` here. Read more about fallback pages over\n // at:\n // https://nextjs.org/docs/api-reference/data-fetching/get-static-paths#fallback-pages\n if (router.isFallback) {\n return null\n }\n\n // When `isAutoExport` is true, meaning this is a page page has been\n // automatically statically optimized, and the router is not ready, then\n // we can't know the pathname yet. Read more about automatic static\n // optimization at:\n // https://nextjs.org/docs/advanced-features/automatic-static-optimization\n if (isAutoExport && !router.isReady) {\n return null\n }\n }\n\n // The `router.asPath` contains the pathname seen by the browser (including\n // any query strings), so it should have that stripped. Read more about the\n // `asPath` option over at:\n // https://nextjs.org/docs/api-reference/next/router#router-object\n let url: URL\n try {\n url = new URL(router.asPath, 'http://f')\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n return '/'\n }\n\n return url.pathname\n }, [router.asPath, router.isFallback, router.isReady, router.pathname])\n\n return (\n <PathnameContext.Provider value={value}>\n {children}\n </PathnameContext.Provider>\n )\n}\n","export function omit<T extends { [key: string]: unknown }, K extends keyof T>(\n object: T,\n keys: K[]\n): Omit<T, K> {\n const omitted: { [key: string]: unknown } = {}\n Object.keys(object).forEach((key) => {\n if (!keys.includes(key as K)) {\n omitted[key] = object[key]\n }\n })\n return omitted as Omit<T, K>\n}\n","import type { ComponentType } from 'react'\nimport type { RouteLoader } from './route-loader'\nimport type { ProxyMatcher } from '../build/analysis/get-page-static-info'\nimport { addBasePath } from './add-base-path'\nimport { interpolateAs } from '../shared/lib/router/utils/interpolate-as'\nimport getAssetPathFromRoute from '../shared/lib/router/utils/get-asset-path-from-route'\nimport { addLocale } from './add-locale'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport { parseRelativeUrl } from '../shared/lib/router/utils/parse-relative-url'\nimport { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport {\n createRouteLoader,\n getClientBuildManifest,\n markAssetError,\n} from './route-loader'\nimport {\n DEV_CLIENT_PAGES_MANIFEST,\n DEV_CLIENT_MIDDLEWARE_MANIFEST,\n} from '../shared/lib/constants'\nimport { resolvePromiseWithTimeout } from './lib/promise'\n\ndeclare global {\n interface Window {\n __DEV_MIDDLEWARE_MATCHERS?: ProxyMatcher[]\n __DEV_PAGES_MANIFEST?: { pages: string[] }\n __SSG_MANIFEST_CB?: () => void\n __SSG_MANIFEST?: Set<string>\n }\n}\n\nexport type StyleSheetTuple = { href: string; text: string }\nexport type GoodPageCache = {\n page: ComponentType\n mod: any\n styleSheets: StyleSheetTuple[]\n}\n\nexport default class PageLoader {\n private buildId: string\n private assetPrefix: string\n private promisedSsgManifest: Promise<Set<string>>\n private promisedDevPagesManifest?: Promise<string[]>\n private promisedMiddlewareMatchers?: Promise<ProxyMatcher[]>\n\n public routeLoader: RouteLoader\n\n constructor(buildId: string, assetPrefix: string) {\n this.routeLoader = createRouteLoader(assetPrefix)\n\n this.buildId = buildId\n this.assetPrefix = assetPrefix\n\n this.promisedSsgManifest = new Promise((resolve) => {\n if (window.__SSG_MANIFEST) {\n resolve(window.__SSG_MANIFEST)\n } else {\n window.__SSG_MANIFEST_CB = () => {\n resolve(window.__SSG_MANIFEST!)\n }\n }\n })\n }\n\n getPageList() {\n if (process.env.NODE_ENV === 'production') {\n return getClientBuildManifest().then((manifest) => manifest.sortedPages)\n } else {\n if (window.__DEV_PAGES_MANIFEST) {\n return window.__DEV_PAGES_MANIFEST.pages\n } else {\n this.promisedDevPagesManifest ||= fetch(\n `${this.assetPrefix}/_next/static/development/${DEV_CLIENT_PAGES_MANIFEST}`,\n { credentials: 'same-origin' }\n )\n .then((res) => res.json())\n .then((manifest: { pages: string[] }) => {\n window.__DEV_PAGES_MANIFEST = manifest\n return manifest.pages\n })\n .catch((err) => {\n console.log(`Failed to fetch devPagesManifest:`, err)\n throw new Error(\n `Failed to fetch _devPagesManifest.json. Is something blocking that network request?\\n` +\n 'Read more: https://nextjs.org/docs/messages/failed-to-fetch-devpagesmanifest'\n )\n })\n return this.promisedDevPagesManifest\n }\n }\n }\n\n getMiddleware() {\n // Webpack production\n if (\n process.env.NODE_ENV === 'production' &&\n process.env.__NEXT_MIDDLEWARE_MATCHERS\n ) {\n const middlewareMatchers = process.env.__NEXT_MIDDLEWARE_MATCHERS\n window.__MIDDLEWARE_MATCHERS = middlewareMatchers\n ? (middlewareMatchers as any as ProxyMatcher[])\n : undefined\n return window.__MIDDLEWARE_MATCHERS\n // Turbopack production\n } else if (process.env.NODE_ENV === 'production') {\n if (window.__MIDDLEWARE_MATCHERS) {\n return window.__MIDDLEWARE_MATCHERS\n } else {\n const onClientMiddlewareManifest = new Promise<ProxyMatcher[]>(\n (resolve) => {\n // Mandatory because this is not concurrent safe:\n const cb = self.__MIDDLEWARE_MATCHERS_CB\n self.__MIDDLEWARE_MATCHERS_CB = () => {\n resolve(self.__MIDDLEWARE_MATCHERS!)\n cb && cb()\n }\n }\n )\n\n return resolvePromiseWithTimeout(\n onClientMiddlewareManifest,\n markAssetError(\n new Error('Failed to load client middleware manifest')\n ),\n undefined\n )\n }\n // Development both Turbopack and Webpack\n } else {\n if (window.__DEV_MIDDLEWARE_MATCHERS) {\n return window.__DEV_MIDDLEWARE_MATCHERS\n } else {\n if (!this.promisedMiddlewareMatchers) {\n // TODO: Decide what should happen when fetching fails instead of asserting\n // @ts-ignore\n this.promisedMiddlewareMatchers = fetch(\n `${this.assetPrefix}/_next/static/${this.buildId}/${DEV_CLIENT_MIDDLEWARE_MANIFEST}`,\n { credentials: 'same-origin' }\n )\n .then((res) => res.json())\n .then((matchers: ProxyMatcher[]) => {\n window.__DEV_MIDDLEWARE_MATCHERS = matchers\n return matchers\n })\n .catch((err) => {\n console.log(`Failed to fetch _devMiddlewareManifest`, err)\n })\n }\n // TODO Remove this assertion as this could be undefined\n return this.promisedMiddlewareMatchers!\n }\n }\n }\n\n getDataHref(params: {\n asPath: string\n href: string\n locale?: string | false\n skipInterpolation?: boolean\n }): string {\n const { asPath, href, locale } = params\n const { pathname: hrefPathname, query, search } = parseRelativeUrl(href)\n const { pathname: asPathname } = parseRelativeUrl(asPath)\n const route = removeTrailingSlash(hrefPathname)\n if (route[0] !== '/') {\n throw new Error(`Route name should start with a \"/\", got \"${route}\"`)\n }\n\n const getHrefForSlug = (path: string) => {\n const dataRoute = getAssetPathFromRoute(\n removeTrailingSlash(addLocale(path, locale)),\n '.json'\n )\n return addBasePath(\n `/_next/data/${this.buildId}${dataRoute}${search}`,\n true\n )\n }\n\n return getHrefForSlug(\n params.skipInterpolation\n ? asPathname\n : isDynamicRoute(route)\n ? interpolateAs(hrefPathname, asPathname, query).result\n : route\n )\n }\n\n _isSsg(\n /** the route (file-system path) */\n route: string\n ): Promise<boolean> {\n return this.promisedSsgManifest.then((manifest) => manifest.has(route))\n }\n\n loadPage(route: string): Promise<GoodPageCache> {\n return this.routeLoader.loadRoute(route).then((res) => {\n if ('component' in res) {\n return {\n page: res.component,\n mod: res.exports,\n styleSheets: res.styles.map((o) => ({\n href: o.href,\n text: o.content,\n })),\n }\n }\n throw res.error\n })\n }\n\n prefetch(route: string): Promise<void> {\n return this.routeLoader.prefetch(route)\n }\n}\n","import type { ComponentType } from 'react'\nimport type { ProxyMatcher } from '../build/analysis/get-page-static-info'\nimport type { RequiredServerFilesManifest } from '../build'\nimport getAssetPathFromRoute from '../shared/lib/router/utils/get-asset-path-from-route'\nimport { __unsafeCreateTrustedScriptURL } from './trusted-types'\nimport { requestIdleCallback } from './request-idle-callback'\nimport { getAssetTokenQuery } from '../shared/lib/deployment-id'\nimport { encodeURIPath } from '../shared/lib/encode-uri-path'\nimport { resolvePromiseWithTimeout } from './lib/promise'\n\ndeclare global {\n interface Window {\n __BUILD_MANIFEST?: Record<string, string[]>\n __BUILD_MANIFEST_CB?: Function\n __SERVER_FILES_MANIFEST?: RequiredServerFilesManifest\n __MIDDLEWARE_MATCHERS?: ProxyMatcher[]\n __MIDDLEWARE_MATCHERS_CB?: Function\n __REACT_LOADABLE_MANIFEST?: any\n __DYNAMIC_CSS_MANIFEST?: any\n __RSC_MANIFEST?: any\n __RSC_SERVER_MANIFEST?: any\n __NEXT_FONT_MANIFEST?: any\n __SUBRESOURCE_INTEGRITY_MANIFEST?: string\n __INTERCEPTION_ROUTE_REWRITE_MANIFEST?: string\n }\n}\n\ninterface LoadedEntrypointSuccess {\n component: ComponentType\n exports: any\n}\ninterface LoadedEntrypointFailure {\n error: unknown\n}\ntype RouteEntrypoint = LoadedEntrypointSuccess | LoadedEntrypointFailure\n\ninterface RouteStyleSheet {\n href: string\n content: string\n}\n\ninterface LoadedRouteSuccess extends LoadedEntrypointSuccess {\n styles: RouteStyleSheet[]\n}\ninterface LoadedRouteFailure {\n error: unknown\n}\ntype RouteLoaderEntry = LoadedRouteSuccess | LoadedRouteFailure\n\ninterface Future<V> {\n resolve: (entrypoint: V) => void\n future: Promise<V>\n}\nfunction withFuture<T extends object>(\n key: string,\n map: Map<string, Future<T> | T>,\n generator?: () => Promise<T>\n): Promise<T> {\n let entry = map.get(key)\n if (entry) {\n if ('future' in entry) {\n return entry.future\n }\n return Promise.resolve(entry)\n }\n let resolver: (entrypoint: T) => void\n const prom: Promise<T> = new Promise<T>((resolve) => {\n resolver = resolve\n })\n map.set(key, { resolve: resolver!, future: prom })\n return generator\n ? generator()\n .then((value) => {\n resolver(value)\n return value\n })\n .catch((err) => {\n map.delete(key)\n throw err\n })\n : prom\n}\n\nexport interface RouteLoader {\n whenEntrypoint(route: string): Promise<RouteEntrypoint>\n onEntrypoint(route: string, execute: () => unknown): void\n loadRoute(route: string, prefetch?: boolean): Promise<RouteLoaderEntry>\n prefetch(route: string): Promise<void>\n}\n\nconst ASSET_LOAD_ERROR = Symbol('ASSET_LOAD_ERROR')\n// TODO: unexport\nexport function markAssetError(err: Error): Error {\n return Object.defineProperty(err, ASSET_LOAD_ERROR, {})\n}\n\nexport function isAssetError(err?: Error): boolean | undefined {\n return err && ASSET_LOAD_ERROR in err\n}\n\nfunction hasPrefetch(link?: HTMLLinkElement): boolean {\n try {\n link = document.createElement('link')\n return (\n // detect IE11 since it supports prefetch but isn't detected\n // with relList.support\n (!!window.MSInputMethodContext && !!(document as any).documentMode) ||\n link.relList.supports('prefetch')\n )\n } catch {\n return false\n }\n}\n\nconst canPrefetch: boolean = hasPrefetch()\n\nfunction prefetchViaDom(\n href: string,\n as: string,\n link?: HTMLLinkElement\n): Promise<any> {\n return new Promise<void>((resolve, reject) => {\n const selector = `\n link[rel=\"prefetch\"][href^=\"${href}\"],\n link[rel=\"preload\"][href^=\"${href}\"],\n script[src^=\"${href}\"]`\n if (document.querySelector(selector)) {\n return resolve()\n }\n\n link = document.createElement('link')\n\n // The order of property assignment here is intentional:\n if (as) link!.as = as\n link!.rel = `prefetch`\n link!.crossOrigin = process.env.__NEXT_CROSS_ORIGIN!\n link!.onload = resolve as any\n link!.onerror = () =>\n reject(markAssetError(new Error(`Failed to prefetch: ${href}`)))\n\n // `href` should always be last:\n link!.href = href\n\n document.head.appendChild(link)\n })\n}\n\nfunction appendScript(\n src: TrustedScriptURL | string,\n script?: HTMLScriptElement\n): Promise<unknown> {\n return new Promise((resolve, reject) => {\n script = document.createElement('script')\n\n // The order of property assignment here is intentional.\n // 1. Setup success/failure hooks in case the browser synchronously\n // executes when `src` is set.\n script.onload = resolve\n script.onerror = () =>\n reject(markAssetError(new Error(`Failed to load script: ${src}`)))\n\n // 2. Configure the cross-origin attribute before setting `src` in case the\n // browser begins to fetch.\n script.crossOrigin = process.env.__NEXT_CROSS_ORIGIN!\n\n // 3. Finally, set the source and inject into the DOM in case the child\n // must be appended for fetching to start.\n script.src = src as string\n document.body.appendChild(script)\n })\n}\n\n// We wait for pages to be built in dev before we start the route transition\n// timeout to prevent an un-necessary hard navigation in development.\nlet devBuildPromise: Promise<void> | undefined\n\n// TODO: stop exporting or cache the failure\n// It'd be best to stop exporting this. It's an implementation detail. We're\n// only exporting it for backwards compatibility with the `page-loader`.\n// Only cache this response as a last resort if we cannot eliminate all other\n// code branches that use the Build Manifest Callback and push them through\n// the Route Loader interface.\nexport function getClientBuildManifest() {\n if (self.__BUILD_MANIFEST) {\n return Promise.resolve(self.__BUILD_MANIFEST)\n }\n\n const onBuildManifest = new Promise<Record<string, string[]>>((resolve) => {\n // Mandatory because this is not concurrent safe:\n const cb = self.__BUILD_MANIFEST_CB\n self.__BUILD_MANIFEST_CB = () => {\n resolve(self.__BUILD_MANIFEST!)\n cb && cb()\n }\n })\n\n return resolvePromiseWithTimeout(\n onBuildManifest,\n markAssetError(new Error('Failed to load client build manifest')),\n devBuildPromise\n )\n}\n\ninterface RouteFiles {\n scripts: (TrustedScriptURL | string)[]\n css: string[]\n}\nfunction getFilesForRoute(\n assetPrefix: string,\n route: string\n): Promise<RouteFiles> {\n if (process.env.NODE_ENV === 'development') {\n const scriptUrl =\n assetPrefix +\n '/_next/static/chunks/pages' +\n encodeURIPath(getAssetPathFromRoute(route, '.js')) +\n getAssetTokenQuery()\n return Promise.resolve({\n scripts: [__unsafeCreateTrustedScriptURL(scriptUrl)],\n // Styles are handled by `style-loader` in development:\n css: [],\n })\n }\n return getClientBuildManifest().then((manifest) => {\n if (!(route in manifest)) {\n throw markAssetError(new Error(`Failed to lookup route: ${route}`))\n }\n const allFiles = manifest[route].map(\n (entry) => assetPrefix + '/_next/' + encodeURIPath(entry)\n )\n return {\n scripts: allFiles\n .filter((v) => v.endsWith('.js'))\n .map((v) => __unsafeCreateTrustedScriptURL(v) + getAssetTokenQuery()),\n css: allFiles\n .filter((v) => v.endsWith('.css'))\n .map((v) => v + getAssetTokenQuery()),\n }\n })\n}\n\nexport function createRouteLoader(assetPrefix: string): RouteLoader {\n const entrypoints: Map<string, Future<RouteEntrypoint> | RouteEntrypoint> =\n new Map()\n const loadedScripts: Map<string, Promise<unknown>> = new Map()\n const styleSheets: Map<string, Promise<RouteStyleSheet>> = new Map()\n const routes: Map<string, Future<RouteLoaderEntry> | RouteLoaderEntry> =\n new Map()\n\n function maybeExecuteScript(\n src: TrustedScriptURL | string\n ): Promise<unknown> {\n // With HMR we might need to \"reload\" scripts when they are\n // disposed and readded. Executing scripts twice has no functional\n // differences\n if (process.env.NODE_ENV !== 'development') {\n let prom: Promise<unknown> | undefined = loadedScripts.get(src.toString())\n if (prom) {\n return prom\n }\n\n // Skip executing script if it's already in the DOM:\n if (document.querySelector(`script[src^=\"${src}\"]`)) {\n return Promise.resolve()\n }\n\n loadedScripts.set(src.toString(), (prom = appendScript(src)))\n return prom\n } else {\n return appendScript(src)\n }\n }\n\n function fetchStyleSheet(href: string): Promise<RouteStyleSheet> {\n let prom: Promise<RouteStyleSheet> | undefined = styleSheets.get(href)\n if (prom) {\n return prom\n }\n\n styleSheets.set(\n href,\n (prom = fetch(href, { credentials: 'same-origin' })\n .then((res) => {\n if (!res.ok) {\n throw new Error(`Failed to load stylesheet: ${href}`)\n }\n return res.text().then((text) => ({ href: href, content: text }))\n })\n .catch((err) => {\n throw markAssetError(err)\n }))\n )\n return prom\n }\n\n return {\n whenEntrypoint(route: string) {\n return withFuture(route, entrypoints)\n },\n onEntrypoint(route: string, execute: undefined | (() => unknown)) {\n ;(execute\n ? Promise.resolve()\n .then(() => execute())\n .then(\n (exports: any) => ({\n component: (exports && exports.default) || exports,\n exports: exports,\n }),\n (err) => ({ error: err })\n )\n : Promise.resolve(undefined)\n ).then((input: RouteEntrypoint | undefined) => {\n const old = entrypoints.get(route)\n if (old && 'resolve' in old) {\n if (input) {\n entrypoints.set(route, input)\n old.resolve(input)\n }\n } else {\n if (input) {\n entrypoints.set(route, input)\n } else {\n entrypoints.delete(route)\n }\n // when this entrypoint has been resolved before\n // the route is outdated and we want to invalidate\n // this cache entry\n routes.delete(route)\n }\n })\n },\n loadRoute(route: string, prefetch?: boolean) {\n return withFuture<RouteLoaderEntry>(route, routes, () => {\n let devBuildPromiseResolve: () => void\n\n if (process.env.NODE_ENV === 'development') {\n devBuildPromise = new Promise<void>((resolve) => {\n devBuildPromiseResolve = resolve\n })\n }\n\n return resolvePromiseWithTimeout(\n getFilesForRoute(assetPrefix, route)\n .then(({ scripts, css }) => {\n return Promise.all([\n entrypoints.has(route)\n ? []\n : Promise.all(scripts.map(maybeExecuteScript)),\n Promise.all(css.map(fetchStyleSheet)),\n ] as const)\n })\n .then((res) => {\n return this.whenEntrypoint(route).then((entrypoint) => ({\n entrypoint,\n styles: res[1],\n }))\n }),\n markAssetError(new Error(`Route did not complete loading: ${route}`)),\n devBuildPromise\n )\n .then(({ entrypoint, styles }) => {\n const res: RouteLoaderEntry = Object.assign<\n { styles: RouteStyleSheet[] },\n RouteEntrypoint\n >({ styles: styles! }, entrypoint)\n return 'error' in entrypoint ? entrypoint : res\n })\n .catch((err) => {\n if (prefetch) {\n // we don't want to cache errors during prefetch\n throw err\n }\n return { error: err }\n })\n .finally(() => devBuildPromiseResolve?.())\n })\n },\n prefetch(route: string): Promise<void> {\n // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118\n // License: Apache 2.0\n let cn\n if ((cn = (navigator as any).connection)) {\n // Don't prefetch if using 2G or if Save-Data is enabled.\n if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve()\n }\n return getFilesForRoute(assetPrefix, route)\n .then((output) =>\n Promise.all(\n canPrefetch\n ? output.scripts.map((script) =>\n prefetchViaDom(script.toString(), 'script')\n )\n : []\n )\n )\n .then(() => {\n requestIdleCallback(() => this.loadRoute(route, true).catch(() => {}))\n })\n .catch(\n // swallow prefetch errors\n () => {}\n )\n },\n }\n}\n","import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n updateHead?: (state: any) => void\n mountedInstances?: any\n updateScripts?: (state: any) => void\n scripts?: any\n getIsSsr?: () => boolean\n\n // Used in app directory, to render script tags as server components.\n appDir?: boolean\n nonce?: string\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n","/**\n * Stores the Trusted Types Policy. Starts as undefined and can be set to null\n * if Trusted Types is not supported in the browser.\n */\nlet policy: TrustedTypePolicy | null | undefined\n\n/**\n * Getter for the Trusted Types Policy. If it is undefined, it is instantiated\n * here or set to null if Trusted Types is not supported in the browser.\n */\nfunction getPolicy() {\n if (typeof policy === 'undefined' && typeof window !== 'undefined') {\n policy =\n window.trustedTypes?.createPolicy('nextjs', {\n createHTML: (input) => input,\n createScript: (input) => input,\n createScriptURL: (input) => input,\n }) || null\n }\n\n return policy\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function __unsafeCreateTrustedScriptURL(\n url: string\n): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url\n}\n","import { isAbsoluteUrl, getLocationOrigin } from '../../utils'\nimport { hasBasePath } from '../../../../client/has-base-path'\n\n/**\n * Detects whether a given url is routable by the Next.js router (browser only).\n */\nexport function isLocalURL(url: string): boolean {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!isAbsoluteUrl(url)) return true\n try {\n // absolute urls can be local if they are on the same origin\n const locationOrigin = getLocationOrigin()\n const resolved = new URL(url, locationOrigin)\n return resolved.origin === locationOrigin && hasBasePath(resolved.pathname)\n } catch (_) {\n return false\n }\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n","export const requestIdleCallback =\n (typeof self !== 'undefined' &&\n self.requestIdleCallback &&\n self.requestIdleCallback.bind(window)) ||\n function (cb: IdleRequestCallback): number {\n let start = Date.now()\n return self.setTimeout(function () {\n cb({\n didTimeout: false,\n timeRemaining: function () {\n return Math.max(0, 50 - (Date.now() - start))\n },\n })\n }, 1)\n }\n\nexport const cancelIdleCallback =\n (typeof self !== 'undefined' &&\n self.cancelIdleCallback &&\n self.cancelIdleCallback.bind(window)) ||\n function (id: number) {\n return clearTimeout(id)\n }\n","\"trimStart\"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),\"trimEnd\"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),\"description\"in Symbol.prototype||Object.defineProperty(Symbol.prototype,\"description\",{configurable:!0,get:function(){var t=/\\((.*)\\)/.exec(this.toString());return t?t[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(t,r){return r=this.concat.apply([],this),t>1&&r.some(Array.isArray)?r.flat(t-1):r},Array.prototype.flatMap=function(t,r){return this.map(t,r).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(t){if(\"function\"!=typeof t)return this.then(t,t);var r=this.constructor||Promise;return this.then(function(n){return r.resolve(t()).then(function(){return n})},function(n){return r.resolve(t()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(t){return Array.from(t).reduce(function(t,r){return t[r[0]]=r[1],t},{})}),Array.prototype.at||(Array.prototype.at=function(t){var r=Math.trunc(t)||0;if(r<0&&(r+=this.length),!(r<0||r>=this.length))return this[r]}),Object.hasOwn||(Object.hasOwn=function(t,r){if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");return Object.prototype.hasOwnProperty.call(Object(t),r)}),\"canParse\"in URL||(URL.canParse=function(t,r){try{return!!new URL(t,r)}catch(t){return!1}});\n","import mitt from '../../shared/lib/mitt'\nimport type { MittEmitter } from '../../shared/lib/mitt'\n\nexport type SpanOptions = {\n startTime?: number\n attributes?: Record<string, unknown>\n}\n\nexport type SpanState =\n | {\n state: 'inprogress'\n }\n | {\n state: 'ended'\n endTime: number\n }\n\ninterface ISpan {\n name: string\n startTime: number\n attributes: Record<string, unknown>\n state: SpanState\n end(endTime?: number): void\n}\n\nclass Span implements ISpan {\n name: string\n startTime: number\n onSpanEnd: (span: Span) => void\n state: SpanState\n attributes: Record<string, unknown>\n\n constructor(\n name: string,\n options: SpanOptions,\n onSpanEnd: (span: Span) => void\n ) {\n this.name = name\n this.attributes = options.attributes ?? {}\n this.startTime = options.startTime ?? Date.now()\n this.onSpanEnd = onSpanEnd\n this.state = { state: 'inprogress' }\n }\n\n end(endTime?: number) {\n if (this.state.state === 'ended') {\n throw new Error('Span has already ended')\n }\n\n this.state = {\n state: 'ended',\n endTime: endTime ?? Date.now(),\n }\n\n this.onSpanEnd(this)\n }\n}\n\nclass Tracer {\n _emitter: MittEmitter<string> = mitt()\n\n private handleSpanEnd = (span: Span) => {\n this._emitter.emit('spanend', span)\n }\n\n startSpan(name: string, options: SpanOptions) {\n return new Span(name, options, this.handleSpanEnd)\n }\n\n onSpanEnd(cb: (span: ISpan) => void): () => void {\n this._emitter.on('spanend', cb)\n return () => {\n this._emitter.off('spanend', cb)\n }\n }\n}\n\nexport type { ISpan as Span }\nexport default new Tracer()\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n if (process.env.__NEXT_TRAILING_SLASH) {\n if (/\\.[^/]+\\/?$/.test(pathname)) {\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n } else if (pathname.endsWith('/')) {\n return `${pathname}${query}${hash}`\n } else {\n return `${pathname}/${query}${hash}`\n }\n }\n\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n constructor() {\n super(\n 'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n )\n }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n append() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n delete() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n set() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n sort() {\n throw new ReadonlyURLSearchParamsError()\n }\n}\n","import React from 'react'\n\nimport type {\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n AppType,\n} from '../shared/lib/utils'\nimport type { Router } from '../client/router'\n\nimport { loadGetInitialProps } from '../shared/lib/utils'\n\nexport type { AppInitialProps, AppType }\n\nexport type { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType<Router>\n\nexport type AppProps<P = any> = AppPropsType<Router, P>\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise<AppInitialProps> {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App<P = any, CP = {}, S = {}> extends React.Component<\n P & AppProps<CP>,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps<CP>\n\n return <Component {...pageProps} />\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n PARAM_SEPARATOR: null,\n hasAdjacentParameterIssues: null,\n normalizeAdjacentParameters: null,\n normalizeTokensForRegexp: null,\n stripNormalizedSeparators: null,\n stripParameterSeparators: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n PARAM_SEPARATOR: function() {\n return PARAM_SEPARATOR;\n },\n hasAdjacentParameterIssues: function() {\n return hasAdjacentParameterIssues;\n },\n normalizeAdjacentParameters: function() {\n return normalizeAdjacentParameters;\n },\n normalizeTokensForRegexp: function() {\n return normalizeTokensForRegexp;\n },\n stripNormalizedSeparators: function() {\n return stripNormalizedSeparators;\n },\n stripParameterSeparators: function() {\n return stripParameterSeparators;\n }\n});\nconst PARAM_SEPARATOR = '_NEXTSEP_';\nfunction hasAdjacentParameterIssues(route) {\n if (typeof route !== 'string') return false;\n // Check for interception route markers followed immediately by parameters\n // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n // These patterns cause \"Must have text between two parameters\" errors\n if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n return true;\n }\n // Check for basic adjacent parameters without separators\n // Pattern: :param1:param2 (but not :param* or other URL patterns)\n if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n return true;\n }\n return false;\n}\nfunction normalizeAdjacentParameters(route) {\n let normalized = route;\n // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n normalized = normalized.replace(/(\\([^)]*\\)):([^/\\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);\n // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);\n return normalized;\n}\nfunction normalizeTokensForRegexp(tokens) {\n return tokens.map((token)=>{\n // Token union type: Token = string | TokenObject\n // Literal path segments are strings, parameters/wildcards are objects\n if (typeof token === 'object' && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)\n 'modifier' in token && // Only repeating modifiers (* or +) cause the validation error\n // Other modifiers like '?' (optional) are fine\n (token.modifier === '*' || token.modifier === '+') && // Token objects can have different shapes depending on route pattern\n 'prefix' in token && 'suffix' in token && // Both prefix and suffix must be empty strings\n // This is what causes the validation error in path-to-regexp\n token.prefix === '' && token.suffix === '') {\n // Add minimal prefix to satisfy path-to-regexp validation\n // We use '/' as it's the most common path delimiter and won't break route matching\n // The prefix gets used in regex generation but doesn't affect parameter extraction\n return {\n ...token,\n prefix: '/'\n };\n }\n return token;\n });\n}\nfunction stripNormalizedSeparators(pathname) {\n // Remove separator after interception route markers\n // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.\n // The separator appears after the closing paren of interception markers\n return pathname.replace(new RegExp(`\\\\)${PARAM_SEPARATOR}`, 'g'), ')');\n}\nfunction stripParameterSeparators(params) {\n const cleaned = {};\n for (const [key, value] of Object.entries(params)){\n if (typeof value === 'string') {\n // Remove the separator if it appears at the start of parameter values\n cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '');\n } else if (Array.isArray(value)) {\n // Handle array parameters (from repeated route segments)\n cleaned[key] = value.map((item)=>typeof item === 'string' ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '') : item);\n } else {\n cleaned[key] = value;\n }\n }\n return cleaned;\n}\n\n//# sourceMappingURL=route-pattern-normalizer.js.map","// Translates a logical route into its pages asset path (relative from a common prefix)\n// \"asset path\" being its javascript file, data file, prerendered html,...\nexport default function getAssetPathFromRoute(\n route: string,\n ext: string = ''\n): string {\n const path =\n route === '/'\n ? '/index'\n : /^\\/index(\\/|$)/.test(route)\n ? `/index${route}`\n : route\n return path + ext\n}\n","import { isDynamicRoute } from '../router/utils'\nimport { normalizePathSep } from './normalize-path-sep'\n\n/**\n * Performs the opposite transformation of `normalizePagePath`. Note that\n * this function is not idempotent either in cases where there are multiple\n * leading `/index` for the page. Examples:\n * - `/index` -> `/`\n * - `/index/foo` -> `/foo`\n * - `/index/index` -> `/index`\n */\nexport function denormalizePagePath(page: string) {\n let _page = normalizePathSep(page)\n return _page.startsWith('/index/') && !isDynamicRoute(_page)\n ? _page.slice(6)\n : _page !== '/index'\n ? _page\n : '/'\n}\n","import { hasBasePath } from './has-base-path'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function removeBasePath(path: string): string {\n if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {\n if (!hasBasePath(path)) {\n return path\n }\n }\n\n // Can't trim the basePath if it has zero length!\n if (basePath.length === 0) return path\n\n path = path.slice(basePath.length)\n if (!path.startsWith('/')) path = `/${path}`\n return path\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"isAPIRoute\", {\n enumerable: true,\n get: function() {\n return isAPIRoute;\n }\n});\nfunction isAPIRoute(value) {\n return value === '/api' || Boolean(value == null ? void 0 : value.startsWith('/api/'));\n}\n\n//# sourceMappingURL=is-api-route.js.map","import { warnOnce } from '../../utils/warn-once'\n\n/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n","'use client'\n\nimport ReactDOM from 'react-dom'\nimport React, { useEffect, useContext, useRef, type JSX } from 'react'\nimport type { ScriptHTMLAttributes } from 'react'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport { setAttributesFromProps } from './set-attributes-from-props'\nimport { requestIdleCallback } from './request-idle-callback'\nimport { htmlEscapeJsonString } from '../shared/lib/htmlescape'\n\nconst ScriptCache = new Map()\nconst LoadCache = new Set()\n\nexport interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {\n strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive' | 'worker'\n id?: string\n onLoad?: (e: any) => void\n onReady?: () => void | null\n onError?: (e: any) => void\n children?: React.ReactNode\n stylesheets?: string[]\n}\n\n/**\n * @deprecated Use `ScriptProps` instead.\n */\nexport type Props = ScriptProps\n\nconst insertStylesheets = (stylesheets: string[]) => {\n // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad\n //\n // Using ReactDOM.preinit to feature detect appDir and inject styles\n // Stylesheets might have already been loaded if initialized with Script component\n // Re-inject styles here to handle scripts loaded via handleClientScriptLoad\n // ReactDOM.preinit handles dedup and ensures the styles are loaded only once\n if (ReactDOM.preinit) {\n stylesheets.forEach((stylesheet: string) => {\n ReactDOM.preinit(stylesheet, { as: 'style' })\n })\n\n return\n }\n\n // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad\n //\n // We use this function to load styles when appdir is not detected\n // TODO: Use React float APIs to load styles once available for pages dir\n if (typeof window !== 'undefined') {\n let head = document.head\n stylesheets.forEach((stylesheet: string) => {\n let link = document.createElement('link')\n\n link.type = 'text/css'\n link.rel = 'stylesheet'\n link.href = stylesheet\n\n head.appendChild(link)\n })\n }\n}\n\nconst loadScript = (props: ScriptProps): void => {\n const {\n src,\n id,\n onLoad = () => {},\n onReady = null,\n dangerouslySetInnerHTML,\n children = '',\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n } = props\n\n const cacheKey = id || src\n\n // Script has already loaded\n if (cacheKey && LoadCache.has(cacheKey)) {\n return\n }\n\n // Contents of this script are already loading/loaded\n if (ScriptCache.has(src)) {\n LoadCache.add(cacheKey)\n // It is possible that multiple `next/script` components all have same \"src\", but has different \"onLoad\"\n // This is to make sure the same remote script will only load once, but \"onLoad\" are executed in order\n ScriptCache.get(src).then(onLoad, onError)\n return\n }\n\n /** Execute after the script first loaded */\n const afterLoad = () => {\n // Run onReady for the first time after load event\n if (onReady) {\n onReady()\n }\n // add cacheKey to LoadCache when load successfully\n LoadCache.add(cacheKey)\n }\n\n const el = document.createElement('script')\n\n const loadPromise = new Promise<void>((resolve, reject) => {\n el.addEventListener('load', function (e) {\n resolve()\n if (onLoad) {\n onLoad.call(this, e)\n }\n afterLoad()\n })\n el.addEventListener('error', function (e) {\n reject(e)\n })\n }).catch(function (e) {\n if (onError) {\n onError(e)\n }\n })\n\n if (dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n el.innerHTML = (dangerouslySetInnerHTML.__html as string) || ''\n\n afterLoad()\n } else if (children) {\n el.textContent =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n\n afterLoad()\n } else if (src) {\n el.src = src\n // do not add cacheKey into LoadCache for remote script here\n // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above)\n\n ScriptCache.set(src, loadPromise)\n }\n\n setAttributesFromProps(el, props)\n\n if (strategy === 'worker') {\n el.setAttribute('type', 'text/partytown')\n }\n\n el.setAttribute('data-nscript', strategy)\n\n // Load styles associated with this script\n if (stylesheets) {\n insertStylesheets(stylesheets)\n }\n\n document.body.appendChild(el)\n}\n\nexport function handleClientScriptLoad(props: ScriptProps) {\n const { strategy = 'afterInteractive' } = props\n if (strategy === 'lazyOnload') {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n } else {\n loadScript(props)\n }\n}\n\nfunction loadLazyScript(props: ScriptProps) {\n if (document.readyState === 'complete') {\n requestIdleCallback(() => loadScript(props))\n } else {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n }\n}\n\nfunction addBeforeInteractiveToCache() {\n const scripts = [\n ...document.querySelectorAll('[data-nscript=\"beforeInteractive\"]'),\n ...document.querySelectorAll('[data-nscript=\"beforePageRender\"]'),\n ]\n scripts.forEach((script) => {\n const cacheKey = script.id || script.getAttribute('src')\n LoadCache.add(cacheKey)\n })\n}\n\nexport function initScriptLoader(scriptLoaderItems: ScriptProps[]) {\n scriptLoaderItems.forEach(handleClientScriptLoad)\n addBeforeInteractiveToCache()\n}\n\n/**\n * Load a third-party scripts in an optimized way.\n *\n * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)\n */\nfunction Script(props: ScriptProps): JSX.Element | null {\n const {\n id,\n src = '',\n onLoad = () => {},\n onReady = null,\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n ...restProps\n } = props\n\n // Context is available only during SSR\n let { updateScripts, scripts, getIsSsr, appDir, nonce } =\n useContext(HeadManagerContext)\n\n // if a nonce is explicitly passed to the script tag, favor that over the automatic handling\n nonce = restProps.nonce || nonce\n\n /**\n * - First mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache)\n * onReady is skipped, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. hasLoadScriptEffectCalled.current is false, loadScript executes\n * Once the script is loaded, the onLoad and onReady will be called by then\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n *\n * - Second mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache)\n * onReady is called, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. The script is already loaded, loadScript bails out\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n */\n const hasOnReadyEffectCalled = useRef(false)\n\n useEffect(() => {\n const cacheKey = id || src\n if (!hasOnReadyEffectCalled.current) {\n // Run onReady if script has loaded before but component is re-mounted\n if (onReady && cacheKey && LoadCache.has(cacheKey)) {\n onReady()\n }\n\n hasOnReadyEffectCalled.current = true\n }\n }, [onReady, id, src])\n\n const hasLoadScriptEffectCalled = useRef(false)\n\n useEffect(() => {\n if (!hasLoadScriptEffectCalled.current) {\n if (strategy === 'afterInteractive') {\n loadScript(props)\n } else if (strategy === 'lazyOnload') {\n loadLazyScript(props)\n }\n\n hasLoadScriptEffectCalled.current = true\n }\n }, [props, strategy])\n\n if (strategy === 'beforeInteractive' || strategy === 'worker') {\n if (updateScripts) {\n scripts[strategy] = (scripts[strategy] || []).concat([\n {\n id,\n src,\n onLoad,\n onReady,\n onError,\n ...restProps,\n nonce,\n },\n ])\n updateScripts(scripts)\n } else if (getIsSsr && getIsSsr()) {\n // Script has already loaded during SSR\n LoadCache.add(id || src)\n } else if (getIsSsr && !getIsSsr()) {\n loadScript({\n ...props,\n nonce,\n })\n }\n }\n\n // For the app directory, we need React Float to preload these scripts.\n if (appDir) {\n // Injecting stylesheets here handles beforeInteractive and worker scripts correctly\n // For other strategies injecting here ensures correct stylesheet order\n // ReactDOM.preinit handles loading the styles in the correct order,\n // also ensures the stylesheet is loaded only once and in a consistent manner\n //\n // Case 1: Styles for beforeInteractive/worker with appDir - handled here\n // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet\n // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here\n // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function\n if (stylesheets) {\n stylesheets.forEach((styleSrc) => {\n ReactDOM.preinit(styleSrc, { as: 'style' })\n })\n }\n\n // Before interactive scripts need to be loaded by Next.js' runtime instead\n // of native <script> tags, because they no longer have `defer`.\n if (strategy === 'beforeInteractive') {\n if (!src) {\n // For inlined scripts, we put the content in `children`.\n if (restProps.dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n restProps.children = restProps.dangerouslySetInnerHTML\n .__html as string\n delete restProps.dangerouslySetInnerHTML\n }\n\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${htmlEscapeJsonString(\n JSON.stringify([0, { ...restProps, id }])\n )})`,\n }}\n />\n )\n } else {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${htmlEscapeJsonString(\n JSON.stringify([src, { ...restProps, id }])\n )})`,\n }}\n />\n )\n }\n } else if (strategy === 'afterInteractive') {\n if (src) {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n }\n }\n }\n\n return null\n}\n\nObject.defineProperty(Script, '__nextScript', { value: true })\n\nexport default Script\n","import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n paramName: string\n paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n segment.startsWith(marker)\n )\n\n // if an interception marker is part of the path segment, we need to jump ahead\n // to the relevant portion for param parsing\n if (interceptionMarker) {\n segment = segment.slice(interceptionMarker.length)\n }\n\n if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n return {\n // TODO-APP: Optional catchall does not currently work with parallel routes,\n // so for now aren't handling a potential interception marker.\n paramType: 'optional-catchall',\n paramName: segment.slice(5, -2),\n }\n }\n\n if (segment.startsWith('[...') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `catchall-intercepted-${interceptionMarker}`\n : 'catchall',\n paramName: segment.slice(4, -1),\n }\n }\n\n if (segment.startsWith('[') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `dynamic-intercepted-${interceptionMarker}`\n : 'dynamic',\n paramName: segment.slice(1, -1),\n }\n }\n\n return null\n}\n\nexport function isCatchAll(\n type: DynamicParamTypes\n): type is\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall' {\n return (\n type === 'catchall' ||\n type === 'catchall-intercepted-(..)(..)' ||\n type === 'catchall-intercepted-(.)' ||\n type === 'catchall-intercepted-(..)' ||\n type === 'catchall-intercepted-(...)' ||\n type === 'optional-catchall'\n )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n repeat: boolean\n optional: boolean\n} {\n let repeat = false\n let optional = false\n\n switch (paramType) {\n case 'catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n repeat = true\n break\n case 'optional-catchall':\n repeat = true\n optional = true\n break\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n break\n default:\n paramType satisfies never\n }\n\n return { repeat, optional }\n}\n","import { InvariantError } from '../../invariant-error'\nimport { getSegmentParam, type SegmentParam } from '../utils/get-segment-param'\nimport {\n INTERCEPTION_ROUTE_MARKERS,\n type InterceptionMarker,\n} from '../utils/interception-routes'\n\nexport type RouteGroupAppRouteSegment = {\n type: 'route-group'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type ParallelRouteAppRouteSegment = {\n type: 'parallel-route'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type StaticAppRouteSegment = {\n type: 'static'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type DynamicAppRouteSegment = {\n type: 'dynamic'\n name: string\n param: SegmentParam\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\n/**\n * Represents a single segment in a route path.\n * Can be either static (e.g., \"blog\") or dynamic (e.g., \"[slug]\").\n */\nexport type AppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n | RouteGroupAppRouteSegment\n | ParallelRouteAppRouteSegment\n\nexport type NormalizedAppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n\nfunction normalizeEncodedDynamicPlaceholder(segment: string): string {\n if (!/%5b|%5d/i.test(segment)) {\n return segment\n }\n\n try {\n const decodedSegment = decodeURIComponent(segment)\n return getSegmentParam(decodedSegment) ? decodedSegment : segment\n } catch {\n return segment\n }\n}\n\nexport function parseAppRouteSegment(segment: string): AppRouteSegment | null {\n if (segment === '') {\n return null\n }\n\n // Check if the segment starts with an interception marker\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n\n const param = getSegmentParam(segment)\n if (param) {\n return {\n type: 'dynamic',\n name: segment,\n param,\n interceptionMarker,\n }\n } else if (segment.startsWith('(') && segment.endsWith(')')) {\n return {\n type: 'route-group',\n name: segment,\n interceptionMarker,\n }\n } else if (segment.startsWith('@')) {\n return {\n type: 'parallel-route',\n name: segment,\n interceptionMarker,\n }\n } else {\n return {\n type: 'static',\n name: segment,\n interceptionMarker,\n }\n }\n}\n\nexport type AppRoute = {\n normalized: boolean\n pathname: string\n segments: AppRouteSegment[]\n dynamicSegments: DynamicAppRouteSegment[]\n interceptionMarker: InterceptionMarker | undefined\n interceptingRoute: AppRoute | undefined\n interceptedRoute: AppRoute | undefined\n}\n\nexport type NormalizedAppRoute = Omit<AppRoute, 'normalized' | 'segments'> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n}\n\nexport function isNormalizedAppRoute(\n route: InterceptionAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isNormalizedAppRoute(\n route: AppRoute | InterceptionAppRoute\n): route is NormalizedAppRoute {\n return route.normalized\n}\n\nexport type InterceptionAppRoute = Omit<\n AppRoute,\n 'interceptionMarker' | 'interceptingRoute' | 'interceptedRoute'\n> & {\n interceptionMarker: InterceptionMarker\n interceptingRoute: AppRoute\n interceptedRoute: AppRoute\n}\n\nexport type NormalizedInterceptionAppRoute = Omit<\n InterceptionAppRoute,\n | 'normalized'\n | 'segments'\n | 'interceptionMarker'\n | 'interceptingRoute'\n | 'interceptedRoute'\n> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n interceptionMarker: InterceptionMarker\n interceptingRoute: NormalizedAppRoute\n interceptedRoute: NormalizedAppRoute\n}\n\nexport function isInterceptionAppRoute(\n route: NormalizedAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isInterceptionAppRoute(\n route: AppRoute\n): route is InterceptionAppRoute {\n return (\n route.interceptionMarker !== undefined &&\n route.interceptingRoute !== undefined &&\n route.interceptedRoute !== undefined\n )\n}\n\nexport function parseAppRoute(\n pathname: string,\n normalized: true\n): NormalizedAppRoute\nexport function parseAppRoute(pathname: string, normalized: false): AppRoute\nexport function parseAppRoute(\n pathname: string,\n normalized: boolean\n): AppRoute | NormalizedAppRoute {\n const pathnameSegments = pathname.split('/').filter(Boolean)\n\n // Build segments array with static and dynamic segments\n const segments: AppRouteSegment[] = []\n\n // Parse if this is an interception route.\n let interceptionMarker: InterceptionMarker | undefined\n let interceptingRoute: AppRoute | NormalizedAppRoute | undefined\n let interceptedRoute: AppRoute | NormalizedAppRoute | undefined\n\n for (const segment of pathnameSegments) {\n const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment)\n\n // Parse the segment into an AppSegment.\n const appSegment = parseAppRouteSegment(normalizedSegment)\n if (!appSegment) {\n continue\n }\n\n if (\n normalized &&\n (appSegment.type === 'route-group' ||\n appSegment.type === 'parallel-route')\n ) {\n throw new InvariantError(\n `${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`\n )\n }\n\n segments.push(appSegment)\n\n if (appSegment.interceptionMarker) {\n const parts = pathname.split(appSegment.interceptionMarker)\n if (parts.length !== 2) {\n throw new Error(`Invalid interception route: ${pathname}`)\n }\n\n interceptingRoute = normalized\n ? parseAppRoute(parts[0], true)\n : parseAppRoute(parts[0], false)\n interceptedRoute = normalized\n ? parseAppRoute(parts[1], true)\n : parseAppRoute(parts[1], false)\n interceptionMarker = appSegment.interceptionMarker\n }\n }\n\n const dynamicSegments = segments.filter(\n (segment) => segment.type === 'dynamic'\n )\n\n return {\n normalized,\n pathname,\n segments,\n dynamicSegments,\n interceptionMarker,\n interceptingRoute,\n interceptedRoute,\n }\n}\n","import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n if (isDomBotUA(userAgent)) {\n return 'dom'\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html'\n }\n return undefined\n}\n","import { getDeploymentId } from '../shared/lib/deployment-id'\n\nconst deploymentId = getDeploymentId()\n;(globalThis as any).NEXT_DEPLOYMENT_ID = deploymentId\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n","import type { DynamicParam } from '../../../../server/app-render/app-render'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\nimport type { OpaqueFallbackRouteParams } from '../../../../server/request/fallback-params'\nimport type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypesShort } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport { parseLoaderTree } from './parse-loader-tree'\nimport { parseAppRoute, parseAppRouteSegment } from '../routes/app'\nimport { resolveParamValue } from './resolve-param-value'\n\n/**\n * Gets the value of a param from the params object. This correctly handles the\n * case where the param is a fallback route param and encodes the resulting\n * value.\n *\n * @param interpolatedParams - The params object.\n * @param segmentKey - The key of the segment.\n * @param fallbackRouteParams - The fallback route params.\n * @returns The value of the param.\n */\nfunction getParamValue(\n interpolatedParams: Params,\n segmentKey: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n let value = interpolatedParams[segmentKey]\n\n if (fallbackRouteParams?.has(segmentKey)) {\n // We know that the fallback route params has the segment key because we\n // checked that above.\n const [searchValue] = fallbackRouteParams.get(segmentKey)!\n value = searchValue\n } else if (Array.isArray(value)) {\n value = value.map((i) => encodeURIComponent(i))\n } else if (typeof value === 'string') {\n value = encodeURIComponent(value)\n }\n\n return value\n}\n\nexport function interpolateParallelRouteParams(\n loaderTree: LoaderTree,\n params: Params,\n pagePath: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Params {\n const interpolated = structuredClone(params)\n\n // Stack-based traversal with depth tracking\n const stack: Array<{ tree: LoaderTree; depth: number }> = [\n { tree: loaderTree, depth: 0 },\n ]\n\n // Parse the route from the provided page path.\n const route = parseAppRoute(pagePath, true)\n\n while (stack.length > 0) {\n const { tree, depth } = stack.pop()!\n const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n const appSegment = parseAppRouteSegment(segment)\n\n if (\n appSegment?.type === 'dynamic' &&\n !interpolated.hasOwnProperty(appSegment.param.paramName) &&\n // If the param is in the fallback route params, we don't need to\n // interpolate it because it's already marked as being unknown.\n !fallbackRouteParams?.has(appSegment.param.paramName)\n ) {\n const { paramName, paramType } = appSegment.param\n\n const paramValue = resolveParamValue(\n paramName,\n paramType,\n depth,\n route,\n interpolated\n )\n\n if (paramValue !== undefined) {\n interpolated[paramName] = paramValue\n } else if (paramType !== 'optional-catchall') {\n throw new InvariantError(\n `Could not resolve param value for segment: ${paramName}`\n )\n }\n }\n\n // Calculate next depth - increment if this is not a route group and not empty\n let nextDepth = depth\n if (\n appSegment &&\n appSegment.type !== 'route-group' &&\n appSegment.type !== 'parallel-route'\n ) {\n nextDepth++\n }\n\n // Add all parallel routes to the stack for processing\n for (const parallelRoute of Object.values(parallelRoutes)) {\n stack.push({ tree: parallelRoute, depth: nextDepth })\n }\n }\n\n return interpolated\n}\n\n/**\n *\n * Shared logic on client and server for creating a dynamic param value.\n *\n * This code needs to be shared with the client so it can extract dynamic route\n * params from the URL without a server request.\n *\n * Because everything in this module is sent to the client, we should aim to\n * keep this code as simple as possible. The special case handling for catchall\n * and optional is, alas, unfortunate.\n */\nexport function getDynamicParam(\n interpolatedParams: Params,\n segmentKey: string,\n dynamicParamType: DynamicParamTypesShort,\n fallbackRouteParams: OpaqueFallbackRouteParams | null,\n staticSiblings: readonly string[] | null\n): DynamicParam {\n let value: string | string[] | undefined = getParamValue(\n interpolatedParams,\n segmentKey,\n fallbackRouteParams\n )\n\n // handle the case where an optional catchall does not have a value,\n // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`\n if (!value || value.length === 0) {\n if (dynamicParamType === 'oc') {\n return {\n param: segmentKey,\n value: null,\n type: dynamicParamType,\n treeSegment: [segmentKey, '', dynamicParamType, staticSiblings],\n }\n }\n\n throw new InvariantError(\n `Missing value for segment key: \"${segmentKey}\" with dynamic param type: ${dynamicParamType}`\n )\n }\n\n const paramCacheKey = Array.isArray(value) ? value.join('/') : value\n\n return {\n param: segmentKey,\n // The value that is passed to user code.\n value,\n // The value that is rendered in the router tree.\n // TODO: If the number of static siblings exceeds some threshold (e.g.,\n // dozens or hundreds), consider sending a Bloom filter instead of the full\n // array to reduce payload size. The client would then use the Bloom filter\n // to check membership with a small false positive rate.\n treeSegment: [segmentKey, paramCacheKey, dynamicParamType, staticSiblings],\n type: dynamicParamType,\n }\n}\n\n/**\n * Regular expression pattern used to match route parameters.\n * Matches both single parameters and parameter groups.\n * Examples:\n * - `[[...slug]]` matches parameter group with key 'slug', repeat: true, optional: true\n * - `[...slug]` matches parameter group with key 'slug', repeat: true, optional: false\n * - `[[foo]]` matches parameter with key 'foo', repeat: false, optional: true\n * - `[bar]` matches parameter with key 'bar', repeat: false, optional: false\n */\nexport const PARAMETER_PATTERN = /^([^[]*)\\[((?:\\[[^\\]]*\\])|[^\\]]+)\\](.*)$/\n\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[[...slug]]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[[foo]]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `[bar]` -> `{ key: 'bar', repeat: false, optional: false }`\n * - `fizz` -> `{ key: 'fizz', repeat: false, optional: false }`\n * @param param - The parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseParameter(param: string) {\n const match = param.match(PARAMETER_PATTERN)\n\n if (!match) {\n return parseMatchedParameter(param)\n }\n\n return parseMatchedParameter(match[2])\n}\n\n/**\n * Parses a matched parameter from the PARAMETER_PATTERN regex to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `...slug` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[foo]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `bar` -> `{ key: 'bar', repeat: false, optional: false }`\n * @param param - The matched parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseMatchedParameter(param: string) {\n const optional = param.startsWith('[') && param.endsWith(']')\n if (optional) {\n param = param.slice(1, -1)\n }\n const repeat = param.startsWith('...')\n if (repeat) {\n param = param.slice(3)\n }\n return { key: param, repeat, optional }\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n","'use client'\n\nimport { createContext } from 'react'\nimport type { Params } from '../../server/request/params'\nimport { ReadonlyURLSearchParams } from '../../client/components/readonly-url-search-params'\n\nexport const SearchParamsContext = createContext<URLSearchParams | null>(null)\nexport const PathnameContext = createContext<string | null>(null)\nexport const PathParamsContext = createContext<Params | null>(null)\n\n// Dev-only context for Suspense DevTools instrumentation\n// These promises are used to track navigation hook usage in React DevTools\nexport type InstrumentedPromise<T> = Promise<T> & {\n status: 'fulfilled'\n value: T\n displayName: string\n}\n\nexport type NavigationPromises = {\n pathname: InstrumentedPromise<string>\n searchParams: InstrumentedPromise<ReadonlyURLSearchParams>\n params: InstrumentedPromise<Params>\n // Layout segment hooks (updated at each layout boundary)\n selectedLayoutSegmentPromises?: Map<\n string,\n InstrumentedPromise<string | null>\n >\n selectedLayoutSegmentsPromises?: Map<string, InstrumentedPromise<string[]>>\n}\n\nexport const NavigationPromisesContext =\n createContext<NavigationPromises | null>(null)\n\n// Creates an instrumented promise for Suspense DevTools\n// These promises are always fulfilled and exist purely for\n// tracking in React's Suspense DevTools.\nexport function createDevToolsInstrumentedPromise<T>(\n displayName: string,\n value: T\n): InstrumentedPromise<T> {\n const promise = Promise.resolve(value) as InstrumentedPromise<T>\n promise.status = 'fulfilled'\n promise.value = value\n promise.displayName = `${displayName} (SSR)`\n return promise\n}\n\nexport { ReadonlyURLSearchParams }\n\nif (process.env.NODE_ENV !== 'production') {\n SearchParamsContext.displayName = 'SearchParamsContext'\n PathnameContext.displayName = 'PathnameContext'\n PathParamsContext.displayName = 'PathParamsContext'\n NavigationPromisesContext.displayName = 'NavigationPromisesContext'\n}\n","import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n auth: string | null\n hash: string\n host: string | null\n hostname: string | null\n href: string\n pathname: string\n port: string | null\n protocol: string | null\n query: ParsedUrlQuery\n search: string\n slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n url: string,\n base: string | undefined,\n parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n const globalBase = new URL(\n typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n )\n\n const resolvedBase = base\n ? new URL(base, globalBase)\n : url.startsWith('.')\n ? new URL(\n typeof window === 'undefined' ? 'http://n' : window.location.href\n )\n : globalBase\n\n const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n '/'\n )\n ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n // See https://nodejs.org/api/http.html#messageurl\n // Not using `origin` to support other protocols\n new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n : new URL(url, resolvedBase)\n\n if (origin !== globalBase.origin) {\n throw new Error(`invariant: invalid relative URL, router received ${url}`)\n }\n\n return {\n auth: null,\n host: null,\n hostname: null,\n pathname,\n port: null,\n protocol: null,\n query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n search,\n hash,\n href: href.slice(origin.length),\n // We don't know for relative URLs at this point since we set a custom, internal\n // base that isn't surfaced to users.\n slashes: null,\n }\n}\n","export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n","// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nconst reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/\nconst reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g\n\nexport function escapeStringRegexp(str: string) {\n // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n if (reHasRegExp.test(str)) {\n return str.replace(reReplaceRegExp, '\\\\$&')\n }\n return str\n}\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n const aHasSlot = a.includes('/@')\n const bHasSlot = b.includes('/@')\n if (aHasSlot && !bHasSlot) return -1\n if (!aHasSlot && bHasSlot) return 1\n return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n","import React from 'react'\nimport Head from '../shared/lib/head'\nimport type { NextPageContext } from '../shared/lib/utils'\n\nconst statusCodes: { [code: number]: string } = {\n 400: 'Bad Request',\n 404: 'This page could not be found',\n 405: 'Method Not Allowed',\n 500: 'Internal Server Error',\n}\n\nexport type ErrorProps = {\n statusCode: number\n hostname?: string\n title?: string\n withDarkMode?: boolean\n}\n\nfunction _getInitialProps({\n req,\n res,\n err,\n}: NextPageContext): Promise<ErrorProps> | ErrorProps {\n const statusCode =\n res && res.statusCode ? res.statusCode : err ? err.statusCode! : 404\n\n let hostname\n\n if (typeof window !== 'undefined') {\n hostname = window.location.hostname\n } else if (req) {\n const { getRequestMeta } =\n require('../server/request-meta') as typeof import('../server/request-meta')\n\n const initUrl = getRequestMeta(req, 'initURL')\n if (initUrl) {\n const url = new URL(initUrl)\n hostname = url.hostname\n }\n }\n\n return { statusCode, hostname }\n}\n\nconst styles: Record<string, React.CSSProperties> = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n desc: {\n lineHeight: '48px',\n },\n h1: {\n display: 'inline-block',\n margin: '0 20px 0 0',\n paddingRight: 23,\n fontSize: 24,\n fontWeight: 500,\n verticalAlign: 'top',\n },\n h2: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: '28px',\n },\n wrap: {\n display: 'inline-block',\n },\n}\n\n/**\n * `Error` component used for handling errors.\n */\nexport default class Error<P = {}> extends React.Component<P & ErrorProps> {\n static displayName = 'ErrorPage'\n\n static getInitialProps = _getInitialProps\n static origGetInitialProps = _getInitialProps\n\n render() {\n const { statusCode, withDarkMode = true } = this.props\n const title =\n this.props.title ||\n statusCodes[statusCode] ||\n 'An unexpected error has occurred'\n\n return (\n <div style={styles.error}>\n <Head>\n <title>\n {statusCode\n ? `${statusCode}: ${title}`\n : 'Application error: a client-side exception has occurred'}\n </title>\n </Head>\n <div style={styles.desc}>\n <style\n dangerouslySetInnerHTML={{\n /* CSS minified from\n body { margin: 0; color: #000; background: #fff; }\n .next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n }\n\n ${\n withDarkMode\n ? `@media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n }`\n : ''\n }\n */\n __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}${\n withDarkMode\n ? '@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}'\n : ''\n }`,\n }}\n />\n\n {statusCode ? (\n <h1 className=\"next-error-h1\" style={styles.h1}>\n {statusCode}\n </h1>\n ) : null}\n <div style={styles.wrap}>\n <h2 style={styles.h2}>\n {this.props.title || statusCode ? (\n title\n ) : (\n <>\n Application error: a client-side exception has occurred{' '}\n {Boolean(this.props.hostname) && (\n <>while loading {this.props.hostname}</>\n )}{' '}\n (see the browser console for more information)\n </>\n )}\n .\n </h2>\n </div>\n </div>\n </div>\n )\n }\n}\n","export const reportGlobalError =\n typeof reportError === 'function'\n ? // In modern browsers, reportError will dispatch an error event,\n // emulating an uncaught JavaScript error.\n reportError\n : (error: unknown) => {\n // TODO: Dispatch error event\n globalThis.console.error(error)\n }\n","// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nconst ATTRIBUTE_ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '&',\n '\"': '"',\n \"'\": ''',\n '<': '<',\n '>': '>',\n}\n\nconst ATTRIBUTE_ESCAPE_REGEX = /[&\"'<>]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match])\n}\n\nexport function htmlEscapeAttributeString(str: string): string {\n return str.replace(\n ATTRIBUTE_ESCAPE_REGEX,\n (match) => ATTRIBUTE_ESCAPE_LOOKUP[match]\n )\n}\n","function _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexport { _interop_require_default as _ };\n","// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n // eslint-disable-next-line no-control-regex\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n","export function encodeURIPath(file: string) {\n return file\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')\n}\n","import type { default as Router } from '../router'\n\nexport function compareRouterStates(a: Router['state'], b: Router['state']) {\n const stateKeys = Object.keys(a)\n if (stateKeys.length !== Object.keys(b).length) return false\n\n for (let i = stateKeys.length; i--; ) {\n const key = stateKeys[i]\n if (key === 'query') {\n const queryKeys = Object.keys(a.query)\n if (queryKeys.length !== Object.keys(b.query).length) {\n return false\n }\n for (let j = queryKeys.length; j--; ) {\n const queryKey = queryKeys[j]\n if (\n !b.query.hasOwnProperty(queryKey) ||\n a.query[queryKey] !== b.query[queryKey]\n ) {\n return false\n }\n }\n } else if (\n !b.hasOwnProperty(key) ||\n a[key as keyof Router['state']] !== b[key as keyof Router['state']]\n ) {\n return false\n }\n }\n\n return true\n}\n","import React, { type JSX } from 'react'\nimport type {\n BaseContext,\n NextComponentType,\n NextPageContext,\n} from '../shared/lib/utils'\nimport type { NextRouter } from './router'\nimport { useRouter } from './router'\n\nexport type WithRouterProps = {\n router: NextRouter\n}\n\nexport type ExcludeRouterProps<P> = Pick<\n P,\n Exclude<keyof P, keyof WithRouterProps>\n>\n\nexport default function withRouter<\n P extends WithRouterProps,\n C extends BaseContext = NextPageContext,\n>(\n ComposedComponent: NextComponentType<C, any, P>\n): React.ComponentType<ExcludeRouterProps<P>> {\n function WithRouterWrapper(props: any): JSX.Element {\n return <ComposedComponent router={useRouter()} {...props} />\n }\n\n WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps\n // This is needed to allow checking for custom getInitialProps in _app\n ;(WithRouterWrapper as any).origGetInitialProps = (\n ComposedComponent as any\n ).origGetInitialProps\n if (process.env.NODE_ENV !== 'production') {\n const name =\n ComposedComponent.displayName || ComposedComponent.name || 'Unknown'\n WithRouterWrapper.displayName = `withRouter(${name})`\n }\n\n return WithRouterWrapper\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import type { detectDomainLocale as Fn } from '../shared/lib/i18n/detect-domain-locale'\n\nexport const detectDomainLocale: typeof Fn = (...args) => {\n if (process.env.__NEXT_I18N_SUPPORT) {\n return (\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n ).detectDomainLocale(...args)\n }\n}\n","declare const __webpack_require__: any\ndeclare let __webpack_public_path__: string\n\nimport { getAssetToken, getAssetTokenQuery } from '../shared/lib/deployment-id'\n\n// If we have a deployment ID query string, we need to append it to the webpack chunk names\n// I am keeping the process check explicit so this can be statically optimized\nif (getAssetToken()) {\n const suffix = getAssetTokenQuery()\n const getChunkScriptFilename = __webpack_require__.u\n __webpack_require__.u = (...args: any[]) =>\n // We enode the chunk filename because our static server matches against and encoded\n // filename path.\n getChunkScriptFilename(...args) + suffix\n\n const getChunkCssFilename = __webpack_require__.k\n __webpack_require__.k = (...args: any[]) =>\n getChunkCssFilename(...args) + suffix\n\n const getMiniCssFilename = __webpack_require__.miniCssF\n __webpack_require__.miniCssF = (...args: any[]) =>\n getMiniCssFilename(...args) + suffix\n}\n\n// Ignore the module ID transform in client.\n;(self as any).__next_set_public_path__ = (path: string) => {\n __webpack_public_path__ = path\n}\n\nexport {}\n","export function getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","import { parsePath } from '../shared/lib/router/utils/parse-path'\n\nexport function removeLocale(path: string, locale?: string) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { pathname } = parsePath(path)\n const pathLower = pathname.toLowerCase()\n const localeLower = locale?.toLowerCase()\n\n return locale &&\n (pathLower.startsWith(`/${localeLower}/`) ||\n pathLower === `/${localeLower}`)\n ? `${pathname.length === locale.length + 1 ? `/` : ``}${path.slice(\n locale.length + 1\n )}`\n : path\n }\n return path\n}\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n return pathHasPrefix(path, basePath)\n}\n","class UrlNode {\n placeholder: boolean = true\n children: Map<string, UrlNode> = new Map()\n slugName: string | null = null\n restSlugName: string | null = null\n optionalRestSlugName: string | null = null\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false)\n }\n\n smoosh(): string[] {\n return this._smoosh()\n }\n\n private _smoosh(prefix: string = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort()\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1)\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1)\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1)\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], [])\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`)\n )\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1)\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`\n )\n }\n\n routes.unshift(r)\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`)\n )\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`)\n )\n }\n\n return routes\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false\n return\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`)\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0]\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1)\n\n let isOptional = false\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1)\n isOptional = true\n }\n\n if (segmentName.startsWith('…')) {\n throw new Error(\n `Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`\n )\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3)\n isCatchAll = true\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`\n )\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`\n )\n }\n\n function handleSlug(previousSlug: string | null, nextSlug: string) {\n if (previousSlug !== null) {\n // If the specific segment already has a slug but the slug is not `something`\n // This prevents collisions like:\n // pages/[post]/index.js\n // pages/[id]/index.js\n // Because currently multiple dynamic params on the same segment level are not supported\n if (previousSlug !== nextSlug) {\n // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`\n )\n }\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`\n )\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dynamic path`\n )\n }\n })\n\n slugNames.push(nextSlug)\n }\n\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error(\n `You cannot use both an required and optional catch-all route at the same level (\"[...${this.restSlugName}]\" and \"${urlPaths[0]}\" ).`\n )\n }\n\n handleSlug(this.optionalRestSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = '[[...]]'\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot use both an optional and required catch-all route at the same level (\"[[...${this.optionalRestSlugName}]]\" and \"${urlPaths[0]}\").`\n )\n }\n\n handleSlug(this.restSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = '[...]'\n }\n } else {\n if (isOptional) {\n throw new Error(\n `Optional route parameters are not yet supported (\"${urlPaths[0]}\").`\n )\n }\n handleSlug(this.slugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = '[]'\n }\n }\n\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode())\n }\n\n this.children\n .get(nextSegment)!\n ._insert(urlPaths.slice(1), slugNames, isCatchAll)\n }\n}\n\n/**\n * @deprecated Use `sortSortableRoutes` or `sortPages` instead.\n */\nexport function getSortedRoutes(\n normalizedPages: ReadonlyArray<string>\n): string[] {\n // First the UrlNode is created, and every UrlNode can have only 1 dynamic segment\n // Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js\n // Only 1 dynamic segment per nesting level\n\n // So in the case that is test/integration/dynamic-routing it'll be this:\n // pages/[post]/comments.js\n // pages/blog/[post]/comment/[id].js\n // Both are fine because `pages/[post]` and `pages/blog` are on the same level\n // So in this case `UrlNode` created here has `this.slugName === 'post'`\n // And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities\n // Instead what has to be passed through is the upwards path's dynamic names\n const root = new UrlNode()\n\n // Here the `root` gets injected multiple paths, and insert will break them up into sublevels\n normalizedPages.forEach((pagePath) => root.insert(pagePath))\n // Smoosh will then sort those sublevels up to the point where you get the correct route definition priority\n return root.smoosh()\n}\n\n/**\n * @deprecated Use `sortSortableRouteObjects` or `sortPageObjects` instead.\n */\nexport function getSortedRouteObjects<T>(\n objects: T[],\n getter: (obj: T) => string\n): T[] {\n // We're assuming here that all the pathnames are unique, that way we can\n // sort the list and use the index as the key.\n const indexes: Record<string, number> = {}\n const pathnames: string[] = []\n for (let i = 0; i < objects.length; i++) {\n const pathname = getter(objects[i])\n indexes[pathname] = i\n pathnames[i] = pathname\n }\n\n // Sort the pathnames.\n const sorted = getSortedRoutes(pathnames)\n\n // Map the sorted pathnames back to the original objects using the new sorted\n // index.\n return sorted.map((pathname) => objects[indexes[pathname]])\n}\n","import React from 'react'\nimport { useRouter } from './router'\n\nconst nextjsRouteAnnouncerStyles: React.CSSProperties = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n top: 0,\n width: '1px',\n\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}\n\nexport const RouteAnnouncer = () => {\n const { asPath } = useRouter()\n const [routeAnnouncement, setRouteAnnouncement] = React.useState('')\n\n // Only announce the path change, but not for the first load because screen\n // reader will do that automatically.\n const previouslyLoadedPath = React.useRef(asPath)\n\n // Every time the path changes, announce the new page’s title following this\n // priority: first the document title (from head), otherwise the first h1, or\n // if none of these exist, then the pathname from the URL. This methodology is\n // inspired by Marcy Sutton’s accessible client routing user testing. More\n // information can be found here:\n // https://www.gatsbyjs.com/blog/2019-07-11-user-testing-accessible-client-routing/\n React.useEffect(\n () => {\n // If the path hasn't change, we do nothing.\n if (previouslyLoadedPath.current === asPath) return\n previouslyLoadedPath.current = asPath\n\n if (document.title) {\n setRouteAnnouncement(document.title)\n } else {\n const pageHeader = document.querySelector('h1')\n const content = pageHeader?.innerText ?? pageHeader?.textContent\n\n setRouteAnnouncement(content || asPath)\n }\n },\n // TODO: switch to pathname + query object of dynamic route requirements\n [asPath]\n )\n\n return (\n <p\n aria-live=\"assertive\" // Make the announcement immediately.\n id=\"__next-route-announcer__\"\n role=\"alert\"\n style={nextjsRouteAnnouncerStyles}\n >\n {routeAnnouncement}\n </p>\n )\n}\n\nexport default RouteAnnouncer\n","// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n","/**\n * For a given page path, this function ensures that there is no backslash\n * escaping slashes in the path. Example:\n * - `foo\\/bar\\/baz` -> `foo/bar/baz`\n */\nexport function normalizePathSep(path: string): string {\n return path.replace(/\\\\/g, '/')\n}\n","import React from 'react'\nimport type { NextRouter } from './router/router'\n\nexport const RouterContext = React.createContext<NextRouter | null>(null)\n\nif (process.env.NODE_ENV !== 'production') {\n RouterContext.displayName = 'RouterContext'\n}\n","import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\ntype PortalProps = {\n children: React.ReactNode\n type: string\n}\n\nexport const Portal = ({ children, type }: PortalProps) => {\n const [portalNode, setPortalNode] = useState<HTMLElement | null>(null)\n\n useEffect(() => {\n const element = document.createElement(type)\n document.body.appendChild(element)\n setPortalNode(element)\n return () => {\n document.body.removeChild(element)\n }\n }, [type])\n\n return portalNode ? createPortal(children, portalNode) : null\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n default: null,\n getProperError: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n /**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */ default: function() {\n return isError;\n },\n getProperError: function() {\n return getProperError;\n }\n});\nconst _isplainobject = require(\"../shared/lib/is-plain-object\");\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */ function safeStringifyLite(obj) {\n const seen = new WeakSet();\n return JSON.stringify(obj, (_key, value)=>{\n // If value is an object and already seen, replace with \"[Circular]\"\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular]';\n }\n seen.add(value);\n }\n return value;\n });\n}\nfunction isError(err) {\n return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;\n}\nfunction getProperError(err) {\n if (isError(err)) {\n return err;\n }\n if (process.env.NODE_ENV === 'development') {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return Object.defineProperty(new Error('An undefined error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), \"__NEXT_ERROR_CODE\", {\n value: \"E98\",\n enumerable: false,\n configurable: true\n });\n }\n if (err === null) {\n return Object.defineProperty(new Error('A null error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), \"__NEXT_ERROR_CODE\", {\n value: \"E336\",\n enumerable: false,\n configurable: true\n });\n }\n }\n return Object.defineProperty(new Error((0, _isplainobject.isPlainObject)(err) ? safeStringifyLite(err) : err + ''), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=is-error.js.map","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n","import './register-deployment-id-global'\nimport './webpack'\nimport '../lib/require-instrumentation-client'\n\nimport { initialize, hydrate, version, router, emitter } from './'\n\ndeclare global {\n interface Window {\n next: any\n }\n}\n\nwindow.next = {\n version,\n // router is initialized later so it has to be live-binded\n get router() {\n return router\n },\n emitter,\n}\n\ninitialize({})\n .then(() => hydrate())\n .catch(console.error)\n","let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n deploymentId = document.documentElement.dataset.dplId\n // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n // HTML only), React isn't aware of it at all.\n delete document.documentElement.dataset.dplId\n} else {\n // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n // Server side: left as is or replaced with a string or replaced with false\n deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n let id = getDeploymentId()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n\nexport function getAssetToken(): string | undefined {\n return (\n process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID\n )\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n let id = getAssetToken()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n","/*\nMIT License\n\nCopyright (c) Jason Miller (https://jasonformat.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n// This file is based on https://github.com/developit/mitt/blob/v1.1.3/src/index.js\n// It's been edited for the needs of this script\n// See the LICENSE at the top of the file\n\ntype Handler = (...evts: any[]) => void\n\nexport type MittEmitter<T> = {\n on(type: T, handler: Handler): void\n off(type: T, handler: Handler): void\n emit(type: T, ...evts: any[]): void\n}\n\nexport default function mitt(): MittEmitter<string> {\n const all: { [s: string]: Handler[] } = Object.create(null)\n\n return {\n on(type: string, handler: Handler) {\n ;(all[type] || (all[type] = [])).push(handler)\n },\n\n off(type: string, handler: Handler) {\n if (all[type]) {\n all[type].splice(all[type].indexOf(handler) >>> 0, 1)\n }\n },\n\n emit(type: string, ...evts: any[]) {\n // eslint-disable-next-line array-callback-return\n ;(all[type] || []).slice().map((handler: Handler) => {\n handler(...evts)\n })\n },\n }\n}\n","import { requestIdleCallback } from '../request-idle-callback'\n\n// 3.8s was arbitrarily chosen as it's what https://web.dev/interactive\n// considers as \"Good\" time-to-interactive. We must assume something went\n// wrong beyond this point, and then fall-back to a full page transition to\n// show the user something of value.\nconst MS_MAX_IDLE_DELAY = 3800\n\n/** Resolve a promise that times out after given amount of milliseconds. */\nexport function resolvePromiseWithTimeout<T>(\n p: Promise<T>,\n err: Error,\n devPromise: Promise<void> | undefined\n): Promise<T> {\n return new Promise((resolve, reject) => {\n let cancelled = false\n\n p.then((r) => {\n // Resolved, cancel the timeout\n cancelled = true\n resolve(r)\n }).catch(reject)\n\n // We wrap these checks separately for better dead-code elimination in\n // production bundles.\n if (process.env.NODE_ENV === 'development') {\n ;(devPromise || Promise.resolve()).then(() => {\n requestIdleCallback(() =>\n setTimeout(() => {\n if (!cancelled) {\n reject(err)\n }\n }, MS_MAX_IDLE_DELAY)\n )\n })\n }\n\n if (process.env.NODE_ENV !== 'development') {\n requestIdleCallback(() =>\n setTimeout(() => {\n if (!cancelled) {\n reject(err)\n }\n }, MS_MAX_IDLE_DELAY)\n )\n }\n })\n}\n","import { DEFAULT_SEGMENT_KEY } from '../../segment'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\n\nexport function parseLoaderTree(tree: LoaderTree) {\n const [segment, parallelRoutes, modules, staticSiblings] = tree\n const { layout, template } = modules\n let { page } = modules\n // a __DEFAULT__ segment means that this route didn't match any of the\n // segments in the route, so we should use the default page\n page = segment === DEFAULT_SEGMENT_KEY ? modules.defaultPage : page\n\n const conventionPath = layout?.[1] || template?.[1] || page?.[1]\n\n return {\n page,\n segment,\n modules,\n /* it can be either layout / template / page */\n conventionPath,\n parallelRoutes,\n staticSiblings,\n }\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","import type { Group } from './route-regex'\nimport { DecodeError } from '../../utils'\nimport type { Params } from '../../../../server/request/params'\nimport { safeRouteMatcher } from './route-match-utils'\n\nexport interface RouteMatchFn {\n (pathname: string): false | Params\n}\n\ntype RouteMatcherOptions = {\n // We only use the exec method of the RegExp object. This helps us avoid using\n // type assertions that the passed in properties are of the correct type.\n re: Pick<RegExp, 'exec'>\n groups: Record<string, Group>\n}\n\nexport function getRouteMatcher({\n re,\n groups,\n}: RouteMatcherOptions): RouteMatchFn {\n const rawMatcher = (pathname: string) => {\n const routeMatch = re.exec(pathname)\n if (!routeMatch) return false\n\n const decode = (param: string) => {\n try {\n return decodeURIComponent(param)\n } catch {\n throw new DecodeError('failed to decode param')\n }\n }\n\n const params: Params = {}\n for (const [key, group] of Object.entries(groups)) {\n const match = routeMatch[group.pos]\n if (match !== undefined) {\n if (group.repeat) {\n params[key] = match.split('/').map((entry) => decode(entry))\n } else {\n params[key] = decode(match)\n }\n }\n }\n\n return params\n }\n\n // Wrap with safe matcher to handle parameter cleaning\n return safeRouteMatcher(rawMatcher)\n}\n","import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","/* global window */\nimport React from 'react'\nimport Router from '../shared/lib/router/router'\nimport type { NextRouter } from '../shared/lib/router/router'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport isError from '../lib/is-error'\n\ntype SingletonRouterBase = {\n router: Router | null\n readyCallbacks: Array<() => any>\n ready(cb: () => any): void\n}\n\nexport { Router }\n\nexport type { NextRouter }\n\nexport type SingletonRouter = SingletonRouterBase & NextRouter\n\nconst singletonRouter: SingletonRouterBase = {\n router: null, // holds the actual router instance\n readyCallbacks: [],\n ready(callback: () => void) {\n if (this.router) return callback()\n if (typeof window !== 'undefined') {\n this.readyCallbacks.push(callback)\n }\n },\n}\n\n// Create public properties and methods of the router in the singletonRouter\nconst urlPropertyFields = [\n 'pathname',\n 'route',\n 'query',\n 'asPath',\n 'components',\n 'isFallback',\n 'basePath',\n 'locale',\n 'locales',\n 'defaultLocale',\n 'isReady',\n 'isPreview',\n 'isLocaleDomain',\n 'domainLocales',\n] as const\nconst routerEvents = [\n 'routeChangeStart',\n 'beforeHistoryChange',\n 'routeChangeComplete',\n 'routeChangeError',\n 'hashChangeStart',\n 'hashChangeComplete',\n] as const\nexport type RouterEvent = (typeof routerEvents)[number]\n\nconst coreMethodFields = [\n 'push',\n 'replace',\n 'reload',\n 'back',\n 'prefetch',\n 'beforePopState',\n] as const\n\n// Events is a static property on the router, the router doesn't have to be initialized to use it\nObject.defineProperty(singletonRouter, 'events', {\n get() {\n return Router.events\n },\n})\n\nfunction getRouter(): Router {\n if (!singletonRouter.router) {\n const message =\n 'No router instance found.\\n' +\n 'You should only use \"next/router\" on the client side of your app.\\n'\n throw new Error(message)\n }\n return singletonRouter.router\n}\n\nurlPropertyFields.forEach((field) => {\n // Here we need to use Object.defineProperty because we need to return\n // the property assigned to the actual router\n // The value might get changed as we change routes and this is the\n // proper way to access it\n Object.defineProperty(singletonRouter, field, {\n get() {\n const router = getRouter()\n return router[field] as string\n },\n })\n})\n\ncoreMethodFields.forEach((field) => {\n // We don't really know the types here, so we add them later instead\n ;(singletonRouter as any)[field] = (...args: any[]) => {\n const router = getRouter() as any\n return router[field](...args)\n }\n})\n\nrouterEvents.forEach((event) => {\n singletonRouter.ready(() => {\n Router.events.on(event, (...args) => {\n const eventField = `on${event.charAt(0).toUpperCase()}${event.substring(\n 1\n )}`\n const _singletonRouter = singletonRouter as any\n if (_singletonRouter[eventField]) {\n try {\n _singletonRouter[eventField](...args)\n } catch (err) {\n console.error(`Error when running the Router event: ${eventField}`)\n console.error(\n isError(err) ? `${err.message}\\n${err.stack}` : err + ''\n )\n }\n }\n })\n })\n})\n\n// Export the singletonRouter and this is the public API.\nexport default singletonRouter as SingletonRouter\n\n// Reexport the withRouter HOC\nexport { default as withRouter } from './with-router'\n\n/**\n * This hook gives access the [router object](https://nextjs.org/docs/pages/api-reference/functions/use-router#router-object)\n * inside the [Pages Router](https://nextjs.org/docs/pages/building-your-application).\n *\n * Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/pages/api-reference/functions/use-router)\n */\nexport function useRouter(): NextRouter {\n const router = React.useContext(RouterContext)\n if (!router) {\n throw new Error(\n 'NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted'\n )\n }\n\n return router\n}\n\n/**\n * Create a router and assign it as the singleton instance.\n * This is used in client side when we are initializing the app.\n * This should **not** be used inside the server.\n * @internal\n */\nexport function createRouter(\n ...args: ConstructorParameters<typeof Router>\n): Router {\n singletonRouter.router = new Router(...args)\n singletonRouter.readyCallbacks.forEach((cb) => cb())\n singletonRouter.readyCallbacks = []\n\n return singletonRouter.router\n}\n\n/**\n * This function is used to create the `withRouter` router instance\n * @internal\n */\nexport function makePublicRouterInstance(router: Router): NextRouter {\n const scopedRouter = router as any\n const instance = {} as any\n\n for (const property of urlPropertyFields) {\n if (typeof scopedRouter[property] === 'object') {\n instance[property] = Object.assign(\n Array.isArray(scopedRouter[property]) ? [] : {},\n scopedRouter[property]\n ) // makes sure query is not stateful\n continue\n }\n\n instance[property] = scopedRouter[property]\n }\n\n // Events is a static property on the router, the router doesn't have to be initialized to use it\n instance.events = Router.events\n\n coreMethodFields.forEach((field) => {\n instance[field] = (...args: any[]) => {\n return scopedRouter[field](...args)\n }\n })\n\n return instance\n}\n","/**\n * This module imports the client instrumentation hook from the project root.\n *\n * The `private-next-instrumentation-client` module is automatically aliased to\n * the `instrumentation-client.ts` file in the project root by webpack or turbopack.\n */ \"use strict\";\nif (process.env.NODE_ENV === 'development') {\n const measureName = 'Client Instrumentation Hook';\n const startTime = performance.now();\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client');\n const endTime = performance.now();\n const duration = endTime - startTime;\n // Using 16ms threshold as it represents one frame (1000ms/60fps)\n // This helps identify if the instrumentation hook initialization\n // could potentially cause frame drops during development.\n const THRESHOLD = 16;\n if (duration > THRESHOLD) {\n console.log(`[${measureName}] Slow execution detected: ${duration.toFixed(0)}ms (Note: Code download overhead is not included in this measurement)`);\n }\n} else {\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client');\n}\n\n//# sourceMappingURL=require-instrumentation-client.js.map","import {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { PARAMETER_PATTERN, parseMatchedParameter } from './get-dynamic-param'\n\nexport interface Group {\n pos: number\n repeat: boolean\n optional: boolean\n}\n\nexport interface RouteRegex {\n groups: { [groupName: string]: Group }\n re: RegExp\n}\n\nexport type RegexReference = {\n names: Record<string, string>\n intercepted: Record<string, string>\n}\n\ntype GetNamedRouteRegexOptions = {\n /**\n * Whether to prefix the route keys with the NEXT_INTERCEPTION_MARKER_PREFIX\n * or NEXT_QUERY_PARAM_PREFIX. This is only relevant when creating the\n * routes-manifest during the build.\n */\n prefixRouteKeys: boolean\n\n /**\n * Whether to include the suffix in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n\n /**\n * Whether to backtrack duplicate keys. This is only relevant when creating\n * the routes-manifest during the build.\n */\n backreferenceDuplicateKeys?: boolean\n\n /**\n * If provided, this will be used as the reference for the dynamic parameter\n * keys instead of generating them in context. This is currently only used for\n * interception routes.\n */\n reference?: RegexReference\n}\n\ntype GetRouteRegexOptions = {\n /**\n * Whether to include extra parts in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n * of adding this option.\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n}\n\nfunction getParametrizedRoute(\n route: string,\n includeSuffix: boolean,\n includePrefix: boolean\n) {\n const groups: { [groupName: string]: Group } = {}\n let groupIndex = 1\n\n const segments: string[] = []\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n if (markerMatch && paramMatches && paramMatches[2]) {\n const { key, optional, repeat } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)\n } else if (paramMatches && paramMatches[2]) {\n const { key, repeat, optional } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n }\n\n let s = repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n\n // Remove the leading slash if includePrefix already added it.\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n }\n }\n\n return {\n parameterizedRoute: segments.join(''),\n groups,\n }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(\n normalizedRoute: string,\n {\n includeSuffix = false,\n includePrefix = false,\n excludeOptionalTrailingSlash = false,\n }: GetRouteRegexOptions = {}\n): RouteRegex {\n const { parameterizedRoute, groups } = getParametrizedRoute(\n normalizedRoute,\n includeSuffix,\n includePrefix\n )\n\n let re = parameterizedRoute\n if (!excludeOptionalTrailingSlash) {\n re += '(?:/)?'\n }\n\n return {\n re: new RegExp(`^${re}$`),\n groups: groups,\n }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n let i = 0\n\n return () => {\n let routeKey = ''\n let j = ++i\n while (j > 0) {\n routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n j = Math.floor((j - 1) / 26)\n }\n return routeKey\n }\n}\n\nfunction getSafeKeyFromSegment({\n interceptionMarker,\n getSafeRouteKey,\n segment,\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n}: {\n interceptionMarker?: string\n getSafeRouteKey: () => string\n segment: string\n routeKeys: Record<string, string>\n keyPrefix?: string\n backreferenceDuplicateKeys: boolean\n}) {\n const { key, optional, repeat } = parseMatchedParameter(segment)\n\n // replace any non-word characters since they can break\n // the named regex\n let cleanedKey = key.replace(/\\W/g, '')\n\n if (keyPrefix) {\n cleanedKey = `${keyPrefix}${cleanedKey}`\n }\n let invalidKey = false\n\n // check if the key is still invalid and fallback to using a known\n // safe key\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true\n }\n if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n invalidKey = true\n }\n\n if (invalidKey) {\n cleanedKey = getSafeRouteKey()\n }\n\n const duplicateKey = cleanedKey in routeKeys\n\n if (keyPrefix) {\n routeKeys[cleanedKey] = `${keyPrefix}${key}`\n } else {\n routeKeys[cleanedKey] = key\n }\n\n // if the segment has an interception marker, make sure that's part of the regex pattern\n // this is to ensure that the route with the interception marker doesn't incorrectly match\n // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n const interceptionPrefix = interceptionMarker\n ? escapeStringRegexp(interceptionMarker)\n : ''\n\n let pattern: string\n if (duplicateKey && backreferenceDuplicateKeys) {\n // Use a backreference to the key to ensure that the key is the same value\n // in each of the placeholders.\n pattern = `\\\\k<${cleanedKey}>`\n } else if (repeat) {\n pattern = `(?<${cleanedKey}>.+?)`\n } else {\n pattern = `(?<${cleanedKey}>[^/]+?)`\n }\n\n return {\n key,\n pattern: optional\n ? `(?:/${interceptionPrefix}${pattern})?`\n : `/${interceptionPrefix}${pattern}`,\n cleanedKey: cleanedKey,\n optional,\n repeat,\n }\n}\n\nfunction getNamedParametrizedRoute(\n route: string,\n prefixRouteKeys: boolean,\n includeSuffix: boolean,\n includePrefix: boolean,\n backreferenceDuplicateKeys: boolean,\n reference: RegexReference = { names: {}, intercepted: {} }\n) {\n const getSafeRouteKey = buildGetSafeRouteKey()\n const routeKeys: { [named: string]: string } = {}\n\n const segments: string[] = []\n const inverseParts: string[] = []\n\n // Ensure we don't mutate the original reference object.\n reference = structuredClone(reference)\n\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n segment.startsWith(m)\n )\n\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n const interceptionMarker = hasInterceptionMarker\n ? paramMatches?.[1]\n : undefined\n\n let keyPrefix: string | undefined\n if (interceptionMarker && paramMatches?.[2]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n reference.intercepted[paramMatches[2]] = interceptionMarker\n } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n } else {\n keyPrefix = prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined\n }\n\n if (interceptionMarker && paramMatches && paramMatches[2]) {\n // If there's an interception marker, add it to the segments.\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n interceptionMarker,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n segments.push(pattern)\n inverseParts.push(\n `/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else if (paramMatches && paramMatches[2]) {\n // If there's a prefix, add it to the segments if it's enabled.\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n inverseParts.push(`/${paramMatches[1]}`)\n }\n\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n // Remove the leading slash if includePrefix already added it.\n let s = pattern\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n inverseParts.push(\n `/:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n inverseParts.push(`/${segment}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n inverseParts.push(paramMatches[3])\n }\n }\n\n return {\n namedParameterizedRoute: segments.join(''),\n routeKeys,\n pathToRegexpPattern: inverseParts.join(''),\n reference,\n }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n normalizedRoute: string,\n options: GetNamedRouteRegexOptions\n) {\n const result = getNamedParametrizedRoute(\n normalizedRoute,\n options.prefixRouteKeys,\n options.includeSuffix ?? false,\n options.includePrefix ?? false,\n options.backreferenceDuplicateKeys ?? false,\n options.reference\n )\n\n let namedRegex = result.namedParameterizedRoute\n if (!options.excludeOptionalTrailingSlash) {\n namedRegex += '(?:/)?'\n }\n\n return {\n ...getRouteRegex(normalizedRoute, options),\n namedRegex: `^${namedRegex}$`,\n routeKeys: result.routeKeys,\n pathToRegexpPattern: result.pathToRegexpPattern,\n reference: result.reference,\n }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n normalizedRoute: string,\n options: {\n catchAll?: boolean\n }\n) {\n const { parameterizedRoute } = getParametrizedRoute(\n normalizedRoute,\n false,\n false\n )\n const { catchAll = true } = options\n if (parameterizedRoute === '/') {\n let catchAllRegex = catchAll ? '.*' : ''\n return {\n namedRegex: `^/${catchAllRegex}$`,\n }\n }\n\n const { namedParameterizedRoute } = getNamedParametrizedRoute(\n normalizedRoute,\n false,\n false,\n false,\n false,\n undefined\n )\n let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n return {\n namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n }\n}\n","// Convert router.asPath to a URLSearchParams object\n// example: /dynamic/[slug]?foo=bar -> { foo: 'bar' }\nexport function asPathToSearchParams(asPath: string): URLSearchParams {\n return new URL(asPath, 'http://n').searchParams\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n","import { setAttributesFromProps } from './set-attributes-from-props'\n\nimport type { JSX } from 'react'\n\nfunction reactElementToDOM({ type, props }: JSX.Element): HTMLElement {\n const el: HTMLElement = document.createElement(type)\n setAttributesFromProps(el, props)\n\n const { children, dangerouslySetInnerHTML } = props\n if (dangerouslySetInnerHTML) {\n el.innerHTML = dangerouslySetInnerHTML.__html || ''\n } else if (children) {\n el.textContent =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n }\n return el\n}\n\n/**\n * When a `nonce` is present on an element, browsers such as Chrome and Firefox strip it out of the\n * actual HTML attributes for security reasons *when the element is added to the document*. Thus,\n * given two equivalent elements that have nonces, `Element,isEqualNode()` will return false if one\n * of those elements gets added to the document. Although the `element.nonce` property will be the\n * same for both elements, the one that was added to the document will return an empty string for\n * its nonce HTML attribute value.\n *\n * This custom `isEqualNode()` function therefore removes the nonce value from the `newTag` before\n * comparing it to `oldTag`, restoring it afterwards.\n *\n * For more information, see:\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1211471#c12\n */\nexport function isEqualNode(oldTag: Element, newTag: Element) {\n if (oldTag instanceof HTMLElement && newTag instanceof HTMLElement) {\n const nonce = newTag.getAttribute('nonce')\n // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not\n // be stripped if there is no content security policy response header that includes a nonce.\n if (nonce && !oldTag.getAttribute('nonce')) {\n const cloneTag = newTag.cloneNode(true) as typeof newTag\n cloneTag.setAttribute('nonce', '')\n cloneTag.nonce = nonce\n return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag)\n }\n }\n\n return oldTag.isEqualNode(newTag)\n}\n\nfunction updateElements(type: string, components: JSX.Element[]) {\n const headEl = document.querySelector('head')\n if (!headEl) return\n\n const oldTags = new Set(headEl.querySelectorAll(`${type}[data-next-head]`))\n\n if (type === 'meta') {\n const metaCharset = headEl.querySelector('meta[charset]')\n if (metaCharset !== null) {\n oldTags.add(metaCharset)\n }\n }\n\n const newTags: Element[] = []\n for (let i = 0; i < components.length; i++) {\n const component = components[i]\n const newTag = reactElementToDOM(component)\n newTag.setAttribute('data-next-head', '')\n\n let isNew = true\n for (const oldTag of oldTags) {\n if (isEqualNode(oldTag, newTag)) {\n oldTags.delete(oldTag)\n isNew = false\n break\n }\n }\n\n if (isNew) {\n newTags.push(newTag)\n }\n }\n\n for (const oldTag of oldTags) {\n oldTag.parentNode?.removeChild(oldTag)\n }\n\n for (const newTag of newTags) {\n // meta[charset] must be first element so special case\n if (\n newTag.tagName.toLowerCase() === 'meta' &&\n newTag.getAttribute('charset') !== null\n ) {\n headEl.prepend(newTag)\n }\n headEl.appendChild(newTag)\n }\n}\n\nexport default function initHeadManager(): {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n} {\n return {\n mountedInstances: new Set(),\n updateHead: (head: JSX.Element[]) => {\n const tags: Record<string, JSX.Element[]> = {}\n\n head.forEach((h) => {\n if (\n // If the font tag is loaded only on client navigation\n // it won't be inlined. In this case revert to the original behavior\n h.type === 'link' &&\n h.props['data-optimized-fonts']\n ) {\n if (\n document.querySelector(`style[data-href=\"${h.props['data-href']}\"]`)\n ) {\n return\n } else {\n h.props.href = h.props['data-href']\n h.props['data-href'] = undefined\n }\n }\n\n const components = tags[h.type] || []\n components.push(h)\n tags[h.type] = components\n })\n\n const titleComponent = tags.title ? tags.title[0] : null\n let title = ''\n if (titleComponent) {\n const { children } = titleComponent.props\n title =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n }\n if (title !== document.title) document.title = title\n ;['meta', 'base', 'link', 'style', 'script'].forEach((type) => {\n updateElements(type, tags[type] || [])\n })\n },\n }\n}\n","import type { NextRouter, Url } from '../shared/lib/router/router'\n\nimport { searchParamsToUrlQuery } from '../shared/lib/router/utils/querystring'\nimport { formatWithValidation } from '../shared/lib/router/utils/format-url'\nimport { omit } from '../shared/lib/router/utils/omit'\nimport { normalizeRepeatedSlashes } from '../shared/lib/utils'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { isDynamicRoute } from '../shared/lib/router/utils'\nimport { interpolateAs } from '../shared/lib/router/utils/interpolate-as'\nimport { getRouteRegex } from '../shared/lib/router/utils/route-regex'\nimport { getRouteMatcher } from '../shared/lib/router/utils/route-matcher'\n\n/**\n * Resolves a given hyperlink with a certain router state (basePath not included).\n * Preserves absolute urls.\n */\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs: true\n): [string, string] | [string]\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: false\n): string\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: boolean\n): [string, string] | [string] | string {\n // we use a dummy base url for relative urls\n let base: URL\n let urlAsString = typeof href === 'string' ? href : formatWithValidation(href)\n\n // repeated slashes and backslashes in the URL are considered\n // invalid and will never match a Next.js page/file\n // https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1\n const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\\/\\//i)\n const urlAsStringNoProto = urlProtoMatch\n ? urlAsString.slice(urlProtoMatch[0].length)\n : urlAsString\n\n const urlParts = urlAsStringNoProto.split('?', 1)\n\n if ((urlParts[0] || '').match(/(\\/\\/|\\\\)/)) {\n console.error(\n `Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\\\ are not valid in the href.`\n )\n const normalizedUrl = normalizeRepeatedSlashes(urlAsStringNoProto)\n urlAsString = (urlProtoMatch ? urlProtoMatch[0] : '') + normalizedUrl\n }\n\n // Return because it cannot be routed by the Next.js router\n if (!isLocalURL(urlAsString)) {\n return (resolveAs ? [urlAsString] : urlAsString) as string\n }\n\n try {\n let baseBase = urlAsString.startsWith('#') ? router.asPath : router.pathname\n\n // If the provided href is only a query string, it is safer to use the asPath\n // considering rewrites.\n if (urlAsString.startsWith('?')) {\n baseBase = router.asPath\n\n // However, if is a dynamic route, we need to use the pathname to preserve the\n // query interpolation and rewrites (router.pathname will look like \"/[slug]\").\n if (isDynamicRoute(router.pathname)) {\n baseBase = router.pathname\n\n const routeRegex = getRouteRegex(router.pathname)\n const match = getRouteMatcher(routeRegex)(router.asPath)\n\n // For dynamic routes, if asPath doesn't match the pathname regex, it is a rewritten path.\n // In this case, should use asPath to preserve the current URL.\n if (!match) {\n baseBase = router.asPath\n }\n\n // Note: There is an edge case where the pathname is dynamic, and also a rewrite path to the same segment.\n // E.g. in \"/[slug]\" path, rewrite \"/foo\" -> \"/bar\"\n\n // In this case, it will be treated as a non-rewritten path and possibly interpolate the query string.\n // E.g., \"/any?slug=foo\" will become the content of \"/foo\", not rewritten as \"/bar\"\n\n // This is currently a trade-off of not resolving rewrite paths on every Router/Link call,\n // but using a lighter route regex pattern check.\n }\n }\n\n base = new URL(baseBase, 'http://n')\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n base = new URL('/', 'http://n')\n }\n\n try {\n const finalUrl = new URL(urlAsString, base)\n finalUrl.pathname = normalizePathTrailingSlash(finalUrl.pathname)\n let interpolatedAs = ''\n\n if (\n isDynamicRoute(finalUrl.pathname) &&\n finalUrl.searchParams &&\n resolveAs\n ) {\n const query = searchParamsToUrlQuery(finalUrl.searchParams)\n\n const { result, params } = interpolateAs(\n finalUrl.pathname,\n finalUrl.pathname,\n query\n )\n\n if (result) {\n interpolatedAs = formatWithValidation({\n pathname: result,\n hash: finalUrl.hash,\n query: omit(query, params),\n })\n }\n }\n\n // if the origin didn't change, it means we received a relative href\n const resolvedHref =\n finalUrl.origin === base.origin\n ? finalUrl.href.slice(finalUrl.origin.length)\n : finalUrl.href\n\n return resolveAs\n ? [resolvedHref, interpolatedAs || resolvedHref]\n : resolvedHref\n } catch (_) {\n return resolveAs ? [urlAsString] : urlAsString\n }\n}\n","'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\nimport { warnOnce } from './utils/warn-once'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n // eslint-disable-next-line default-case\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n","export const VALID_LOADERS = [\n 'default',\n 'imgix',\n 'cloudinary',\n 'akamai',\n 'custom',\n] as const\n\nexport type LoaderValue = (typeof VALID_LOADERS)[number]\n\nexport type ImageLoaderProps = {\n src: string\n width: number\n quality?: number\n}\n\nexport type ImageLoaderPropsWithConfig = ImageLoaderProps & {\n config: Readonly<ImageConfig>\n}\n\nexport type LocalPattern = {\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\nexport type RemotePattern = {\n /**\n * Must be `http` or `https`.\n */\n protocol?: 'http' | 'https'\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single subdomain.\n * Double `**` matches any number of subdomains.\n */\n hostname: string\n\n /**\n * Can be literal port such as `8080` or empty string\n * meaning no port.\n */\n port?: string\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\ntype ImageFormat = 'image/avif' | 'image/webp'\n\n/**\n * Image configurations\n *\n * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)\n */\nexport type ImageConfigComplete = {\n /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */\n deviceSizes: number[]\n\n /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */\n imageSizes: number[]\n\n /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */\n loader: LoaderValue\n\n /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */\n path: string\n\n /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */\n loaderFile: string\n\n /**\n * @deprecated Use `remotePatterns` instead.\n */\n domains: string[]\n\n /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */\n disableStaticImages: boolean\n\n /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */\n minimumCacheTTL: number\n\n /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */\n formats: ImageFormat[]\n\n /** @see [Maximum Disk Cache Size (in bytes)](https://nextjs.org/docs/api-reference/next/image#maximumdiskcachesize) */\n maximumDiskCacheSize: number | undefined\n\n /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */\n maximumRedirects: number\n\n /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */\n maximumResponseBody: number\n\n /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */\n dangerouslyAllowLocalIP: boolean\n\n /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */\n dangerouslyAllowSVG: boolean\n\n /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */\n contentSecurityPolicy: string\n\n /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */\n contentDispositionType: 'inline' | 'attachment'\n\n /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */\n remotePatterns: Array<URL | RemotePattern>\n\n /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */\n localPatterns: LocalPattern[] | undefined\n\n /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */\n qualities: number[] | undefined\n\n /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */\n unoptimized: boolean\n\n /**\n * When true, the `cacheHandler` configured in next.config.js will also be used\n * for caching optimized images. When false, images use the default filesystem cache.\n * @see [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandler#image-optimization-caching)\n */\n customCacheHandler: boolean\n}\n\nexport type ImageConfig = Partial<ImageConfigComplete>\n\nexport const imageConfigDefault: ImageConfigComplete = {\n deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n imageSizes: [32, 48, 64, 96, 128, 256, 384],\n path: '/_next/image',\n loader: 'default',\n loaderFile: '',\n /**\n * @deprecated Use `remotePatterns` instead to protect your application from malicious users.\n */\n domains: [],\n disableStaticImages: false,\n minimumCacheTTL: 14400, // 4 hours\n formats: ['image/webp'],\n maximumDiskCacheSize: undefined, // auto-detect by default\n maximumRedirects: 3,\n maximumResponseBody: 50_000_000, // 50 MB\n dangerouslyAllowLocalIP: false,\n dangerouslyAllowSVG: false,\n contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,\n contentDispositionType: 'attachment',\n localPatterns: undefined, // default: allow all local images\n remotePatterns: [], // default: allow no remote images\n qualities: [75],\n unoptimized: false,\n customCacheHandler: false,\n}\n","// minimal implementation MurmurHash2 hash function\nfunction murmurhash2(str: string) {\n let h = 0\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i)\n h = Math.imul(h ^ c, 0x5bd1e995)\n h ^= h >>> 13\n h = Math.imul(h, 0x5bd1e995)\n }\n return h >>> 0\n}\n\n// default to 0.01% error rate as the filter compresses very well\nconst DEFAULT_ERROR_RATE = 0.0001\n\nexport class BloomFilter {\n numItems: number\n errorRate: number\n numBits: number\n numHashes: number\n bitArray: number[]\n\n constructor(numItems: number, errorRate: number = DEFAULT_ERROR_RATE) {\n this.numItems = numItems\n this.errorRate = errorRate\n this.numBits = Math.ceil(\n -(numItems * Math.log(errorRate)) / (Math.log(2) * Math.log(2))\n )\n this.numHashes = Math.ceil((this.numBits / numItems) * Math.log(2))\n this.bitArray = new Array(this.numBits).fill(0)\n }\n\n static from(items: string[], errorRate = DEFAULT_ERROR_RATE) {\n const filter = new BloomFilter(items.length, errorRate)\n\n for (const item of items) {\n filter.add(item)\n }\n return filter\n }\n\n export() {\n const data = {\n numItems: this.numItems,\n errorRate: this.errorRate,\n numBits: this.numBits,\n numHashes: this.numHashes,\n bitArray: this.bitArray,\n }\n\n if (process.env.NEXT_RUNTIME === 'nodejs') {\n if (this.errorRate < DEFAULT_ERROR_RATE) {\n const filterData = JSON.stringify(data)\n const gzipSize = (\n require('next/dist/compiled/gzip-size') as typeof import('next/dist/compiled/gzip-size')\n ).sync(filterData)\n\n if (gzipSize > 1024) {\n console.warn(\n `Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate ${this.errorRate} resulted in size ${filterData.length} bytes, ${gzipSize} bytes (gzip)`\n )\n }\n }\n }\n\n return data\n }\n\n import(data: ReturnType<(typeof this)['export']>) {\n this.numItems = data.numItems\n this.errorRate = data.errorRate\n this.numBits = data.numBits\n this.numHashes = data.numHashes\n this.bitArray = data.bitArray\n }\n\n add(item: string) {\n const hashValues = this.getHashValues(item)\n hashValues.forEach((hash) => {\n this.bitArray[hash] = 1\n })\n }\n\n contains(item: string) {\n const hashValues = this.getHashValues(item)\n return hashValues.every((hash) => this.bitArray[hash])\n }\n\n getHashValues(item: string) {\n const hashValues = []\n for (let i = 1; i <= this.numHashes; i++) {\n const hash = murmurhash2(`${item}${i}`) % this.numBits\n hashValues.push(hash)\n }\n return hashValues\n }\n}\n","// This module can be shared between both pages router and app router\n\nimport type { HydrationOptions } from 'react-dom/client'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport isError from '../../lib/is-error'\nimport { reportGlobalError } from './report-global-error'\n\nconst recoverableErrors = new WeakSet<Error>()\n\nconst isInstantTest =\n process.env.__NEXT_EXPOSE_TESTING_API &&\n typeof self !== 'undefined' &&\n !!self.__next_instant_test\n\nexport function isRecoverableError(error: Error): boolean {\n return recoverableErrors.has(error)\n}\n\nexport const onRecoverableError: HydrationOptions['onRecoverableError'] = (\n error\n) => {\n // x-ref: https://github.com/facebook/react/pull/28736\n let cause = isError(error) && 'cause' in error ? error.cause : error\n // Skip certain custom errors which are not expected to be reported on client\n if (isBailoutToCSRError(cause)) return\n\n // Instant Navigation Testing API: suppress \"server could not finish this\n // Suspense boundary\" errors (React error #419) during instant test mode.\n // The static shell intentionally has incomplete Suspense boundaries — React\n // correctly falls back to client rendering, which is expected.\n if (isInstantTest) {\n if (isError(cause)) {\n if (process.env.NODE_ENV === 'production') {\n if (cause.message.includes('#419')) return\n } else {\n if (cause.message.includes('could not finish this Suspense boundary'))\n return\n }\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n const { decorateDevError } =\n require('../../next-devtools/userspace/app/errors/stitched-error') as typeof import('../../next-devtools/userspace/app/errors/stitched-error')\n const causeError = decorateDevError(cause)\n recoverableErrors.add(causeError)\n cause = causeError\n }\n\n reportGlobalError(cause)\n}\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n return normalizePathTrailingSlash(\n process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n ? path\n : addPathPrefix(path, basePath)\n )\n}\n","import type { addLocale as Fn } from '../shared/lib/router/utils/add-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nexport const addLocale: typeof Fn = (path, ...args) => {\n if (process.env.__NEXT_I18N_SUPPORT) {\n return normalizePathTrailingSlash(\n (\n require('../shared/lib/router/utils/add-locale') as typeof import('../shared/lib/router/utils/add-locale')\n ).addLocale(path, ...args)\n )\n }\n return path\n}\n","function _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexport { _interop_require_wildcard as _ };\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n","import type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypes } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport type {\n NormalizedAppRoute,\n NormalizedAppRouteSegment,\n} from '../routes/app'\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type'\n\n/**\n * Extracts the param value from a path segment, handling interception markers\n * based on the expected param type.\n *\n * @param pathSegment - The path segment to extract the value from\n * @param params - The current params object for resolving dynamic param references\n * @param paramType - The expected param type which may include interception marker info\n * @returns The extracted param value\n */\nfunction getParamValueFromSegment(\n pathSegment: NormalizedAppRouteSegment,\n params: Params,\n paramType: DynamicParamTypes\n): string {\n // If the segment is dynamic, resolve it from the params object\n if (pathSegment.type === 'dynamic') {\n return params[pathSegment.param.paramName] as string\n }\n\n // If the paramType indicates this is an intercepted param, strip the marker\n // that matches the interception marker in the param type\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (interceptionPrefix === pathSegment.interceptionMarker) {\n return pathSegment.name.replace(pathSegment.interceptionMarker, '')\n }\n\n // For static segments, use the name\n return pathSegment.name\n}\n\n/**\n * Resolves a route parameter value from the route segments at the given depth.\n * This shared logic is used by both extractPathnameRouteParamSegmentsFromLoaderTree\n * and resolveRouteParamsFromTree.\n *\n * @param paramName - The parameter name to resolve\n * @param paramType - The parameter type (dynamic, catchall, etc.)\n * @param depth - The current depth in the route tree\n * @param route - The normalized route containing segments\n * @param params - The current params object (used to resolve embedded param references)\n * @param options - Configuration options\n * @returns The resolved parameter value, or undefined if it cannot be resolved\n */\nexport function resolveParamValue(\n paramName: string,\n paramType: DynamicParamTypes,\n depth: number,\n route: NormalizedAppRoute,\n params: Params\n): string | string[] | undefined {\n switch (paramType) {\n case 'catchall':\n case 'optional-catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n // For catchall routes, derive from pathname using depth to determine\n // which segments to use\n const processedSegments: string[] = []\n\n // Process segments to handle any embedded dynamic params\n for (let index = depth; index < route.segments.length; index++) {\n const pathSegment = route.segments[index]\n\n if (pathSegment.type === 'static') {\n let value = pathSegment.name\n\n // For intercepted catch-all params, strip the marker from the first segment\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (\n interceptionPrefix &&\n index === depth &&\n interceptionPrefix === pathSegment.interceptionMarker\n ) {\n // Strip the interception marker from the value\n value = value.replace(pathSegment.interceptionMarker, '')\n }\n\n processedSegments.push(value)\n } else {\n // If the segment is a param placeholder, check if we have its value\n if (!params.hasOwnProperty(pathSegment.param.paramName)) {\n // If the segment is an optional catchall, we can break out of the\n // loop because it's optional!\n if (pathSegment.param.paramType === 'optional-catchall') {\n break\n }\n\n // Unknown param placeholder in pathname - can't derive full value\n return undefined\n }\n\n // If the segment matches a param, use the param value\n // We don't encode values here as that's handled during retrieval.\n const paramValue = params[pathSegment.param.paramName]\n if (Array.isArray(paramValue)) {\n processedSegments.push(...paramValue)\n } else {\n processedSegments.push(paramValue as string)\n }\n }\n }\n\n if (processedSegments.length > 0) {\n return processedSegments\n } else if (paramType === 'optional-catchall') {\n return undefined\n } else {\n // We shouldn't be able to match a catchall segment without any path\n // segments if it's not an optional catchall\n throw new InvariantError(\n `Unexpected empty path segments match for a route \"${route.pathname}\" with param \"${paramName}\" of type \"${paramType}\"`\n )\n }\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n // For regular dynamic parameters, take the segment at this depth\n if (depth < route.segments.length) {\n const pathSegment = route.segments[depth]\n\n // Check if the segment at this depth is a placeholder for an unknown param\n if (\n pathSegment.type === 'dynamic' &&\n !params.hasOwnProperty(pathSegment.param.paramName)\n ) {\n // The segment is a placeholder like [category] and we don't have the value\n return undefined\n }\n\n // If the segment matches a param, use the param value from params object\n // Otherwise it's a static segment, just use it directly\n // We don't encode values here as that's handled during retrieval\n return getParamValueFromSegment(pathSegment, params, paramType)\n }\n\n return undefined\n\n default:\n paramType satisfies never\n }\n}\n","import React from 'react'\nimport type { ImageConfigComplete } from './image-config'\nimport { imageConfigDefault } from './image-config'\n\nexport const ImageConfigContext =\n React.createContext<ImageConfigComplete>(imageConfigDefault)\n\nif (process.env.NODE_ENV !== 'production') {\n ImageConfigContext.displayName = 'ImageConfigContext'\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n /**\n * Object of `query` values from url\n */\n query: Partial<{\n [key: string]: string | string[]\n }>\n /**\n * Object of `cookies` from header\n */\n cookies: Partial<{\n [key: string]: string\n }>\n\n body: any\n\n env: Env\n\n draftMode?: boolean\n\n preview?: boolean\n /**\n * Preview data set on the request, if any\n * */\n previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n /**\n * Send data `any` data in response\n */\n send: Send<Data>\n /**\n * Send data `json` data in response\n */\n json: Send<Data>\n status: (statusCode: number) => NextApiResponse<Data>\n redirect(url: string): NextApiResponse<Data>\n redirect(status: number, url: string): NextApiResponse<Data>\n\n /**\n * Set draft mode\n */\n setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n /**\n * Set preview data for Next.js' prerender mode\n */\n setPreviewData: (\n data: object | string,\n options?: {\n /**\n * Specifies the number (in seconds) for the preview session to last for.\n * The given number will be converted to an integer by rounding down.\n * By default, no maximum age is set and the preview session finishes\n * when the client shuts down (browser is closed).\n */\n maxAge?: number\n /**\n * Specifies the path for the preview session to work under. By default,\n * the path is considered the \"default path\", i.e., any pages under \"/\".\n */\n path?: string\n }\n ) => NextApiResponse<Data>\n\n /**\n * Clear preview data for Next.js' prerender mode\n */\n clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n /**\n * Revalidate a specific page and regenerate it using On-Demand Incremental\n * Static Regeneration.\n * The path should be an actual path, not a rewritten path. E.g. for\n * \"/blog/[slug]\" this should be \"/blog/post-1\".\n * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n */\n revalidate: (\n urlPath: string,\n opts?: {\n unstable_onlyGenerated?: boolean\n }\n ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n req: NextApiRequest,\n res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n fn: T\n): T {\n let used = false\n let result: ReturnType<T>\n\n return ((...args: any[]) => {\n if (!used) {\n used = true\n result = fn(...args)\n }\n return result\n }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location\n return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n const { href } = window.location\n const origin = getLocationOrigin()\n return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n return typeof Component === 'string'\n ? Component\n : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n const urlParts = url.split('?')\n const urlNoQuery = urlParts[0]\n\n return (\n urlNoQuery\n // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/')\n .replace(/\\/\\/+/g, '/') +\n (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n )\n}\n\nexport async function loadGetInitialProps<\n C extends BaseContext,\n IP = {},\n P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n throw new Error(message)\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n }\n }\n return {} as IP\n }\n\n const props = await App.getInitialProps(ctx)\n\n if (res && isResSent(res)) {\n return props\n }\n\n if (!props) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n throw new Error(message)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\n `${getDisplayName(\n App\n )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n )\n }\n }\n\n return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n SP &&\n (['mark', 'measure', 'getEntriesByName'] as const).every(\n (method) => typeof performance[method] === 'function'\n )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n code: string\n\n constructor(page: string) {\n super()\n this.code = 'ENOENT'\n this.name = 'PageNotFoundError'\n this.message = `Cannot find module for page: ${page}`\n }\n}\n\nexport class MissingStaticPage extends Error {\n constructor(page: string, message: string) {\n super()\n this.message = `Failed to load static file for page: ${page} ${message}`\n }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n code: string\n constructor() {\n super()\n this.code = 'ENOENT'\n this.message = `Cannot find the middleware module`\n }\n}\n\nexport interface CacheFs {\n existsSync: typeof fs.existsSync\n readFile: typeof fs.promises.readFile\n readFileSync: typeof fs.readFileSync\n writeFile(f: string, d: any): Promise<void>\n mkdir(dir: string): Promise<void | string>\n stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","import type { ComponentType } from 'react'\nimport type { DomainLocale } from '../../../server/config'\nimport type { MittEmitter } from '../mitt'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { RouterEvent } from '../../../client/router'\nimport type { StyleSheetTuple } from '../../../client/page-loader'\nimport type { UrlObject } from 'url'\nimport type PageLoader from '../../../client/page-loader'\nimport type { AppContextType, NextPageContext, NEXT_DATA } from '../utils'\nimport { removeTrailingSlash } from './utils/remove-trailing-slash'\nimport {\n getClientBuildManifest,\n isAssetError,\n markAssetError,\n} from '../../../client/route-loader'\nimport { handleClientScriptLoad } from '../../../client/script'\nimport isError, { getProperError } from '../../../lib/is-error'\nimport { denormalizePagePath } from '../page-path/denormalize-page-path'\nimport { normalizeLocalePath } from '../i18n/normalize-locale-path'\nimport mitt from '../mitt'\nimport { getLocationOrigin, getURL, loadGetInitialProps, ST } from '../utils'\nimport { isDynamicRoute } from './utils/is-dynamic'\nimport { parseRelativeUrl } from './utils/parse-relative-url'\nimport { getRouteMatcher } from './utils/route-matcher'\nimport { getRouteRegex } from './utils/route-regex'\nimport { formatWithValidation } from './utils/format-url'\nimport { detectDomainLocale } from '../../../client/detect-domain-locale'\nimport { parsePath } from './utils/parse-path'\nimport { addLocale } from '../../../client/add-locale'\nimport { removeLocale } from '../../../client/remove-locale'\nimport { removeBasePath } from '../../../client/remove-base-path'\nimport { addBasePath } from '../../../client/add-base-path'\nimport { hasBasePath } from '../../../client/has-base-path'\nimport { resolveHref } from '../../../client/resolve-href'\nimport { isAPIRoute } from '../../../lib/is-api-route'\nimport { getNextPathnameInfo } from './utils/get-next-pathname-info'\nimport { formatNextPathnameInfo } from './utils/format-next-pathname-info'\nimport { compareRouterStates } from './utils/compare-states'\nimport { isLocalURL } from './utils/is-local-url'\nimport { isBot } from './utils/is-bot'\nimport { omit } from './utils/omit'\nimport { interpolateAs } from './utils/interpolate-as'\nimport { disableSmoothScrollDuringRouteTransition } from './utils/disable-smooth-scroll'\nimport type { Params } from '../../../server/request/params'\nimport {\n MATCHED_PATH_HEADER,\n NEXT_NAV_DEPLOYMENT_ID_HEADER,\n} from '../../../lib/constants'\nimport { getDeploymentId } from '../deployment-id'\nimport { isJavaScriptURLString } from '../../../client/lib/javascript-url'\n\nlet resolveRewrites: typeof import('./utils/resolve-rewrites').default\nif (process.env.__NEXT_HAS_REWRITES) {\n resolveRewrites = (\n require('./utils/resolve-rewrites') as typeof import('./utils/resolve-rewrites')\n ).default\n}\n\ndeclare global {\n interface Window {\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n }\n}\n\ninterface RouteProperties {\n shallow: boolean\n}\n\ninterface TransitionOptions {\n shallow?: boolean\n locale?: string | false\n scroll?: boolean\n unstable_skipClientCache?: boolean\n}\n\ninterface NextHistoryState {\n url: string\n as: string\n options: TransitionOptions\n}\n\nexport type HistoryState =\n | null\n | { __NA: true; __N?: false }\n | { __N: false; __NA?: false }\n | ({ __NA?: false; __N: true; key: string } & NextHistoryState)\n\nfunction buildCancellationError() {\n return Object.assign(new Error('Route Cancelled'), {\n cancelled: true,\n })\n}\n\ninterface MiddlewareEffectParams<T extends FetchDataOutput> {\n fetchData?: () => Promise<T>\n locale?: string\n asPath: string\n router: Router\n}\n\nexport async function matchesMiddleware<T extends FetchDataOutput>(\n options: MiddlewareEffectParams<T>\n): Promise<boolean> {\n const matchers = await Promise.resolve(\n options.router.pageLoader.getMiddleware()\n )\n if (!matchers) return false\n\n const { pathname: asPathname } = parsePath(options.asPath)\n // remove basePath first since path prefix has to be in the order of `/${basePath}/${locale}`\n const cleanedAs = hasBasePath(asPathname)\n ? removeBasePath(asPathname)\n : asPathname\n const asWithBasePathAndLocale = addBasePath(\n addLocale(cleanedAs, options.locale)\n )\n\n // Check only path match on client. Matching \"has\" should be done on server\n // where we can access more info such as headers, HttpOnly cookie, etc.\n return matchers.some((m) =>\n new RegExp(m.regexp).test(asWithBasePathAndLocale)\n )\n}\n\nfunction stripOrigin(url: string) {\n const origin = getLocationOrigin()\n\n return url.startsWith(origin) ? url.substring(origin.length) : url\n}\n\nfunction prepareUrlAs(router: NextRouter, url: Url, as?: Url) {\n // If url and as provided as an object representation,\n // we'll format them into the string version here.\n let [resolvedHref, resolvedAs] = resolveHref(router, url, true)\n const origin = getLocationOrigin()\n const hrefWasAbsolute = resolvedHref.startsWith(origin)\n const asWasAbsolute = resolvedAs && resolvedAs.startsWith(origin)\n\n resolvedHref = stripOrigin(resolvedHref)\n resolvedAs = resolvedAs ? stripOrigin(resolvedAs) : resolvedAs\n\n const preparedUrl = hrefWasAbsolute ? resolvedHref : addBasePath(resolvedHref)\n const preparedAs = as\n ? stripOrigin(resolveHref(router, as))\n : resolvedAs || resolvedHref\n\n return {\n url: preparedUrl,\n as: asWasAbsolute ? preparedAs : addBasePath(preparedAs),\n }\n}\n\nfunction resolveDynamicRoute(pathname: string, pages: string[]) {\n const cleanPathname = removeTrailingSlash(denormalizePagePath(pathname))\n if (cleanPathname === '/404' || cleanPathname === '/_error') {\n return pathname\n }\n\n // handle resolving href for dynamic routes\n if (!pages.includes(cleanPathname)) {\n // eslint-disable-next-line array-callback-return\n pages.some((page) => {\n if (isDynamicRoute(page) && getRouteRegex(page).re.test(cleanPathname)) {\n pathname = page\n return true\n }\n })\n }\n return removeTrailingSlash(pathname)\n}\n\nfunction getMiddlewareData<T extends FetchDataOutput>(\n source: string,\n response: Response,\n options: MiddlewareEffectParams<T>\n) {\n const nextConfig = {\n basePath: options.router.basePath,\n i18n: { locales: options.router.locales },\n trailingSlash: Boolean(process.env.__NEXT_TRAILING_SLASH),\n }\n const rewriteHeader = response.headers.get('x-nextjs-rewrite')\n\n let rewriteTarget =\n rewriteHeader || response.headers.get('x-nextjs-matched-path')\n\n const matchedPath = response.headers.get(MATCHED_PATH_HEADER)\n\n if (\n matchedPath &&\n !rewriteTarget &&\n !matchedPath.includes('__next_data_catchall') &&\n !matchedPath.includes('/_error') &&\n !matchedPath.includes('/404')\n ) {\n // leverage x-matched-path to detect next.config.js rewrites\n rewriteTarget = matchedPath\n }\n\n if (rewriteTarget) {\n if (\n rewriteTarget.startsWith('/') ||\n process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE\n ) {\n const parsedRewriteTarget = parseRelativeUrl(rewriteTarget)\n const pathnameInfo = getNextPathnameInfo(parsedRewriteTarget.pathname, {\n nextConfig,\n parseData: true,\n })\n\n let fsPathname = removeTrailingSlash(pathnameInfo.pathname)\n return Promise.all([\n options.router.pageLoader.getPageList(),\n getClientBuildManifest(),\n ]).then(([pages, { __rewrites: rewrites }]: any) => {\n let as = addLocale(pathnameInfo.pathname, pathnameInfo.locale)\n\n if (\n isDynamicRoute(as) ||\n (!rewriteHeader &&\n pages.includes(\n normalizeLocalePath(removeBasePath(as), options.router.locales)\n .pathname\n ))\n ) {\n const parsedSource = getNextPathnameInfo(\n parseRelativeUrl(source).pathname,\n {\n // Pass basePath (and trailingSlash) so the basePath prefix is\n // stripped before the `_next/data/` check, but omit `i18n` so the\n // locale prefix is preserved here — the rewrite resolver below\n // handles the locale-prefixed `as`.\n nextConfig: {\n basePath: nextConfig.basePath,\n trailingSlash: nextConfig.trailingSlash,\n },\n parseData: true,\n }\n )\n\n as = addBasePath(parsedSource.pathname)\n parsedRewriteTarget.pathname = as\n }\n\n if (process.env.__NEXT_HAS_REWRITES) {\n const result = resolveRewrites(\n as,\n pages,\n rewrites,\n parsedRewriteTarget.query,\n (path: string) => resolveDynamicRoute(path, pages),\n options.router.locales\n )\n\n if (result.matchedPage) {\n parsedRewriteTarget.pathname = result.parsedAs.pathname\n as = parsedRewriteTarget.pathname\n Object.assign(parsedRewriteTarget.query, result.parsedAs.query)\n }\n } else if (!pages.includes(fsPathname)) {\n const resolvedPathname = resolveDynamicRoute(fsPathname, pages)\n\n if (resolvedPathname !== fsPathname) {\n fsPathname = resolvedPathname\n }\n }\n\n const resolvedHref = !pages.includes(fsPathname)\n ? resolveDynamicRoute(\n normalizeLocalePath(\n removeBasePath(parsedRewriteTarget.pathname),\n options.router.locales\n ).pathname,\n pages\n )\n : fsPathname\n\n if (isDynamicRoute(resolvedHref)) {\n const matches = getRouteMatcher(getRouteRegex(resolvedHref))(as)\n Object.assign(parsedRewriteTarget.query, matches || {})\n }\n\n return {\n type: 'rewrite' as const,\n parsedAs: parsedRewriteTarget,\n resolvedHref,\n }\n })\n }\n const src = parsePath(source)\n const pathname = formatNextPathnameInfo({\n ...getNextPathnameInfo(src.pathname, { nextConfig, parseData: true }),\n defaultLocale: options.router.defaultLocale,\n buildId: '',\n })\n\n return Promise.resolve({\n type: 'redirect-external' as const,\n destination: `${pathname}${src.query}${src.hash}`,\n })\n }\n\n const redirectTarget = response.headers.get('x-nextjs-redirect')\n\n if (redirectTarget) {\n if (redirectTarget.startsWith('/')) {\n const src = parsePath(redirectTarget)\n const pathname = formatNextPathnameInfo({\n ...getNextPathnameInfo(src.pathname, { nextConfig, parseData: true }),\n defaultLocale: options.router.defaultLocale,\n buildId: '',\n })\n\n return Promise.resolve({\n type: 'redirect-internal' as const,\n newAs: `${pathname}${src.query}${src.hash}`,\n newUrl: `${pathname}${src.query}${src.hash}`,\n })\n }\n\n return Promise.resolve({\n type: 'redirect-external' as const,\n destination: redirectTarget,\n })\n }\n\n return Promise.resolve({ type: 'next' as const })\n}\n\ninterface WithMiddlewareEffectsOutput extends FetchDataOutput {\n effect: Awaited<ReturnType<typeof getMiddlewareData>>\n}\n\nasync function withMiddlewareEffects<T extends FetchDataOutput>(\n options: MiddlewareEffectParams<T>\n): Promise<WithMiddlewareEffectsOutput | null> {\n const matches = await matchesMiddleware(options)\n if (!matches || !options.fetchData) {\n return null\n }\n\n const data = await options.fetchData()\n\n const effect = await getMiddlewareData(data.dataHref, data.response, options)\n\n return {\n dataHref: data.dataHref,\n json: data.json,\n response: data.response,\n text: data.text,\n cacheKey: data.cacheKey,\n effect,\n }\n}\n\nexport type Url = UrlObject | string\n\nexport type BaseRouter = {\n route: string\n pathname: string\n query: ParsedUrlQuery\n asPath: string\n basePath: string\n locale?: string | undefined\n locales?: readonly string[] | undefined\n defaultLocale?: string | undefined\n domainLocales?: readonly DomainLocale[] | undefined\n isLocaleDomain: boolean\n}\n\nexport type NextRouter = BaseRouter &\n Pick<\n Router,\n | 'push'\n | 'replace'\n | 'reload'\n | 'back'\n | 'forward'\n | 'prefetch'\n | 'beforePopState'\n | 'events'\n | 'isFallback'\n | 'isReady'\n | 'isPreview'\n >\n\nexport type PrefetchOptions = {\n priority?: boolean\n locale?: string | false\n unstable_skipClientCache?: boolean\n}\n\nexport type PrivateRouteInfo =\n | (Omit<CompletePrivateRouteInfo, 'styleSheets'> & { initial: true })\n | CompletePrivateRouteInfo\n\nexport type CompletePrivateRouteInfo = {\n Component: ComponentType\n styleSheets: StyleSheetTuple[]\n __N_SSG?: boolean\n __N_SSP?: boolean\n props?: Record<string, any>\n err?: Error\n error?: any\n route?: string\n resolvedAs?: string\n query?: ParsedUrlQuery\n}\n\nexport type AppProps = Pick<CompletePrivateRouteInfo, 'Component' | 'err'> & {\n router: Router\n} & Record<string, any>\nexport type AppComponent = ComponentType<AppProps>\n\ntype Subscription = (\n data: PrivateRouteInfo,\n App: AppComponent,\n resetScroll: { x: number; y: number } | null\n) => Promise<void>\n\ntype BeforePopStateCallback = (state: NextHistoryState) => boolean\n\ntype ComponentLoadCancel = (() => void) | null\n\ntype HistoryMethod = 'replaceState' | 'pushState'\n\nconst manualScrollRestoration =\n process.env.__NEXT_SCROLL_RESTORATION &&\n typeof window !== 'undefined' &&\n 'scrollRestoration' in window.history &&\n !!(function () {\n try {\n let v = '__next'\n return (sessionStorage.setItem(v, v), sessionStorage.removeItem(v), true)\n } catch (n) {}\n })()\n\nconst SSG_DATA_NOT_FOUND = Symbol('SSG_DATA_NOT_FOUND')\n\nfunction fetchRetry(\n url: string,\n attempts: number,\n options: Pick<RequestInit, 'method' | 'headers'>\n): Promise<Response> {\n return fetch(url, {\n // Cookies are required to be present for Next.js' SSG \"Preview Mode\".\n // Cookies may also be required for `getServerSideProps`.\n //\n // > `fetch` won’t send cookies, unless you set the credentials init\n // > option.\n // https://developer.mozilla.org/docs/Web/API/Fetch_API/Using_Fetch\n //\n // > For maximum browser compatibility when it comes to sending &\n // > receiving cookies, always supply the `credentials: 'same-origin'`\n // > option instead of relying on the default.\n // https://github.com/github/fetch#caveats\n credentials: 'same-origin',\n method: options.method || 'GET',\n headers: Object.assign({}, options.headers, {\n 'x-nextjs-data': '1',\n }),\n }).then((response) => {\n return !response.ok && attempts > 1 && response.status >= 500\n ? fetchRetry(url, attempts - 1, options)\n : response\n })\n}\n\ninterface FetchDataOutput {\n dataHref: string\n json: Record<string, any> | null\n response: Response\n text: string\n cacheKey: string\n}\n\ninterface FetchNextDataParams {\n dataHref: string\n isServerRender: boolean\n parseJSON: boolean | undefined\n hasMiddleware?: boolean\n inflightCache: NextDataCache\n persistCache: boolean\n isPrefetch: boolean\n isBackground?: boolean\n unstable_skipClientCache?: boolean\n}\n\nfunction tryToParseAsJSON(text: string) {\n try {\n return JSON.parse(text)\n } catch (error) {\n return null\n }\n}\n\nfunction fetchNextData({\n dataHref,\n inflightCache,\n isPrefetch,\n hasMiddleware,\n isServerRender,\n parseJSON,\n persistCache,\n isBackground,\n unstable_skipClientCache,\n}: FetchNextDataParams): Promise<FetchDataOutput> {\n const { href: cacheKey } = new URL(dataHref, window.location.href)\n const deploymentId = getDeploymentId()\n const getData = (params?: { method?: 'HEAD' | 'GET' }) =>\n fetchRetry(dataHref, isServerRender ? 3 : 1, {\n headers: Object.assign(\n {} as HeadersInit,\n isPrefetch ? { purpose: 'prefetch' } : {},\n isPrefetch && hasMiddleware ? { 'x-middleware-prefetch': '1' } : {},\n deploymentId ? { 'x-deployment-id': deploymentId } : {}\n ),\n method: params?.method ?? 'GET',\n })\n .then((response) => {\n if (response.ok && params?.method === 'HEAD') {\n return { dataHref, response, text: '', json: {}, cacheKey }\n }\n\n return response.text().then((text) => {\n if (!response.ok) {\n /**\n * When the data response is a redirect because of a middleware\n * we do not consider it an error. The headers must bring the\n * mapped location.\n * TODO: Change the status code in the handler.\n */\n if (\n hasMiddleware &&\n [301, 302, 307, 308].includes(response.status)\n ) {\n return { dataHref, response, text, json: {}, cacheKey }\n }\n\n if (response.status === 404) {\n if (tryToParseAsJSON(text)?.notFound) {\n return {\n dataHref,\n json: { notFound: SSG_DATA_NOT_FOUND },\n response,\n text,\n cacheKey,\n }\n }\n }\n\n const error = new Error(`Failed to load static props`)\n\n /**\n * We should only trigger a server-side transition if this was\n * caused on a client-side transition. Otherwise, we'd get into\n * an infinite loop.\n */\n if (!isServerRender) {\n markAssetError(error)\n }\n\n throw error\n }\n\n let dplResponseHeader = response.headers.get(\n NEXT_NAV_DEPLOYMENT_ID_HEADER\n )\n if (dplResponseHeader != null && dplResponseHeader !== deploymentId) {\n // When not found, or we want to force a MPA navigation because of Skew Protection\n const error = new Error(\n `Loaded static props were from an outdated deployment, forcing a hard reload`\n )\n /**\n * We should only trigger a server-side transition if this was\n * caused on a client-side transition. Otherwise, we'd get into\n * an infinite loop.\n */\n if (!isServerRender) {\n markAssetError(error)\n }\n throw error\n }\n\n return {\n dataHref,\n json: parseJSON ? tryToParseAsJSON(text) : null,\n response,\n text,\n cacheKey,\n }\n })\n })\n .then((data) => {\n if (\n !persistCache ||\n process.env.NODE_ENV !== 'production' ||\n data.response.headers.get('x-middleware-cache') === 'no-cache'\n ) {\n delete inflightCache[cacheKey]\n }\n return data\n })\n .catch((err) => {\n if (!unstable_skipClientCache) {\n delete inflightCache[cacheKey]\n }\n if (\n // chrome\n err.message === 'Failed to fetch' ||\n // firefox\n err.message === 'NetworkError when attempting to fetch resource.' ||\n // safari\n err.message === 'Load failed'\n ) {\n markAssetError(err)\n }\n throw err\n })\n\n // when skipping client cache we wait to update\n // inflight cache until successful data response\n // this allows racing click event with fetching newer data\n // without blocking navigation when stale data is available\n if (unstable_skipClientCache && persistCache) {\n return getData({}).then((data) => {\n if (data.response.headers.get('x-middleware-cache') !== 'no-cache') {\n // only update cache if not marked as no-cache\n inflightCache[cacheKey] = Promise.resolve(data)\n }\n\n return data\n })\n }\n\n if (inflightCache[cacheKey] !== undefined) {\n return inflightCache[cacheKey]\n }\n return (inflightCache[cacheKey] = getData(\n isBackground ? { method: 'HEAD' } : {}\n ))\n}\n\ninterface NextDataCache {\n [asPath: string]: Promise<FetchDataOutput>\n}\n\nexport function createKey() {\n return Math.random().toString(36).slice(2, 10)\n}\n\nfunction handleHardNavigation({\n url,\n router,\n}: {\n url: string\n router: Router\n}) {\n // ensure we don't trigger a hard navigation to the same\n // URL as this can end up with an infinite refresh\n if (url === addBasePath(addLocale(router.asPath, router.locale))) {\n throw new Error(\n `Invariant: attempted to hard navigate to the same URL ${url} ${location.href}`\n )\n }\n window.location.href = url\n}\n\nconst getCancelledHandler = ({\n route,\n router,\n}: {\n route: string\n router: Router\n}) => {\n let cancelled = false\n const cancel = (router.clc = () => {\n cancelled = true\n })\n\n const handleCancelled = () => {\n if (cancelled) {\n const error: any = new Error(\n `Abort fetching component for route: \"${route}\"`\n )\n error.cancelled = true\n throw error\n }\n\n if (cancel === router.clc) {\n router.clc = null\n }\n }\n return handleCancelled\n}\n\nexport default class Router implements BaseRouter {\n basePath: string\n\n /**\n * Map of all components loaded in `Router`\n */\n components: { [pathname: string]: PrivateRouteInfo }\n // Server Data Cache (full data requests)\n sdc: NextDataCache = {}\n // Server Background Cache (HEAD requests)\n sbc: NextDataCache = {}\n\n sub: Subscription\n clc: ComponentLoadCancel\n pageLoader: PageLoader\n _bps: BeforePopStateCallback | undefined\n events: MittEmitter<RouterEvent>\n _wrapApp: (App: AppComponent) => any\n isSsr: boolean\n _inFlightRoute?: string | undefined\n _shallow?: boolean | undefined\n locales?: readonly string[] | undefined\n defaultLocale?: string | undefined\n domainLocales?: readonly DomainLocale[] | undefined\n isReady: boolean\n isLocaleDomain: boolean\n isFirstPopStateEvent = true\n _initialMatchesMiddlewarePromise: Promise<boolean>\n // static entries filter\n _bfl_s?: import('../../lib/bloom-filter').BloomFilter\n // dynamic entires filter\n _bfl_d?: import('../../lib/bloom-filter').BloomFilter\n\n private state: Readonly<{\n route: string\n pathname: string\n query: ParsedUrlQuery\n asPath: string\n locale: string | undefined\n isFallback: boolean\n isPreview: boolean\n }>\n\n private _key: string = createKey()\n\n static events: MittEmitter<RouterEvent> = mitt()\n\n constructor(\n pathname: string,\n query: ParsedUrlQuery,\n as: string,\n {\n initialProps,\n pageLoader,\n App,\n wrapApp,\n Component,\n err,\n subscription,\n isFallback,\n locale,\n locales,\n defaultLocale,\n domainLocales,\n isPreview,\n }: {\n subscription: Subscription\n initialProps: any\n pageLoader: any\n Component: ComponentType\n App: AppComponent\n wrapApp: (WrapAppComponent: AppComponent) => any\n err?: Error\n isFallback: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n isPreview?: boolean\n }\n ) {\n // represents the current component key\n const route = removeTrailingSlash(pathname)\n\n // set up the component cache (by route keys)\n this.components = {}\n // We should not keep the cache, if there's an error\n // Otherwise, this cause issues when when going back and\n // come again to the errored page.\n if (pathname !== '/_error') {\n this.components[route] = {\n Component,\n initial: true,\n props: initialProps,\n err,\n __N_SSG: initialProps && initialProps.__N_SSG,\n __N_SSP: initialProps && initialProps.__N_SSP,\n }\n }\n\n this.components['/_app'] = {\n Component: App as ComponentType,\n styleSheets: [\n /* /_app does not need its stylesheets managed */\n ],\n }\n\n // Backwards compat for Router.router.events\n // TODO: Should be remove the following major version as it was never documented\n this.events = Router.events\n\n this.pageLoader = pageLoader\n // if auto prerendered and dynamic route wait to update asPath\n // until after mount to prevent hydration mismatch\n const autoExportDynamic =\n isDynamicRoute(pathname) && self.__NEXT_DATA__.autoExport\n\n this.basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\n this.sub = subscription\n this.clc = null\n this._wrapApp = wrapApp\n // make sure to ignore extra popState in safari on navigating\n // back from external site\n this.isSsr = true\n this.isLocaleDomain = false\n this.isReady = !!(\n self.__NEXT_DATA__.gssp ||\n self.__NEXT_DATA__.gip ||\n self.__NEXT_DATA__.isExperimentalCompile ||\n (self.__NEXT_DATA__.appGip && !self.__NEXT_DATA__.gsp) ||\n (!autoExportDynamic &&\n !self.location.search &&\n !process.env.__NEXT_HAS_REWRITES)\n )\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n this.locales = locales\n this.defaultLocale = defaultLocale\n this.domainLocales = domainLocales\n this.isLocaleDomain = !!detectDomainLocale(\n domainLocales,\n self.location.hostname\n )\n }\n\n this.state = {\n route,\n pathname,\n query,\n asPath: autoExportDynamic ? pathname : as,\n isPreview: !!isPreview,\n locale: process.env.__NEXT_I18N_SUPPORT ? locale : undefined,\n isFallback,\n }\n\n this._initialMatchesMiddlewarePromise = Promise.resolve(false)\n\n if (typeof window !== 'undefined') {\n // make sure \"as\" doesn't start with double slashes or else it can\n // throw an error as it's considered invalid\n if (!as.startsWith('//')) {\n // in order for `e.state` to work on the `onpopstate` event\n // we have to register the initial route upon initialization\n const options: TransitionOptions = { locale }\n const asPath = getURL()\n\n this._initialMatchesMiddlewarePromise = matchesMiddleware({\n router: this,\n locale,\n asPath,\n }).then((matches) => {\n // if middleware matches we leave resolving to the change function\n // as the server needs to resolve for correct priority\n ;(options as any)._shouldResolveHref = as !== pathname\n\n this.changeState(\n 'replaceState',\n matches\n ? asPath\n : formatWithValidation({\n pathname: addBasePath(pathname),\n query,\n }),\n asPath,\n options\n )\n return matches\n })\n }\n\n window.addEventListener('popstate', this.onPopState)\n\n // enable custom scroll restoration handling when available\n // otherwise fallback to browser's default handling\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n if (manualScrollRestoration) {\n window.history.scrollRestoration = 'manual'\n }\n }\n }\n }\n\n onPopState = (e: PopStateEvent): void => {\n const { isFirstPopStateEvent } = this\n this.isFirstPopStateEvent = false\n\n const state = e.state as HistoryState\n\n if (!state) {\n // We get state as undefined for two reasons.\n // 1. With older safari (< 8) and older chrome (< 34)\n // 2. When the URL changed with #\n //\n // In the both cases, we don't need to proceed and change the route.\n // (as it's already changed)\n // But we can simply replace the state with the new changes.\n // Actually, for (1) we don't need to nothing. But it's hard to detect that event.\n // So, doing the following for (1) does no harm.\n const { pathname, query } = this\n this.changeState(\n 'replaceState',\n formatWithValidation({ pathname: addBasePath(pathname), query }),\n getURL()\n )\n return\n }\n\n // __NA is used to identify if the history entry can be handled by the app-router.\n if (state.__NA) {\n window.location.reload()\n return\n }\n\n if (!state.__N) {\n return\n }\n\n // Safari fires popstateevent when reopening the browser.\n if (\n isFirstPopStateEvent &&\n this.locale === state.options.locale &&\n state.as === this.asPath\n ) {\n return\n }\n\n let forcedScroll: { x: number; y: number } | undefined\n const { url, as, options, key } = state\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n if (manualScrollRestoration) {\n if (this._key !== key) {\n // Snapshot current scroll position:\n try {\n sessionStorage.setItem(\n '__next_scroll_' + this._key,\n JSON.stringify({ x: self.pageXOffset, y: self.pageYOffset })\n )\n } catch {}\n\n // Restore old scroll position:\n try {\n const v = sessionStorage.getItem('__next_scroll_' + key)\n forcedScroll = JSON.parse(v!)\n } catch {\n forcedScroll = { x: 0, y: 0 }\n }\n }\n }\n }\n this._key = key\n\n const { pathname } = parseRelativeUrl(url)\n\n // Make sure we don't re-render on initial load,\n // can be caused by navigating back from an external site\n if (\n this.isSsr &&\n as === addBasePath(this.asPath) &&\n pathname === addBasePath(this.pathname)\n ) {\n return\n }\n\n // If the downstream application returns falsy, return.\n // They will then be responsible for handling the event.\n if (this._bps && !this._bps(state)) {\n return\n }\n\n this.change(\n 'replaceState',\n url,\n as,\n Object.assign<{}, TransitionOptions, TransitionOptions>({}, options, {\n shallow: options.shallow && this._shallow,\n locale: options.locale || this.defaultLocale,\n // @ts-ignore internal value not exposed on types\n _h: 0,\n }),\n forcedScroll\n )\n }\n\n reload(): void {\n window.location.reload()\n }\n\n /**\n * Go back in history\n */\n back() {\n window.history.back()\n }\n\n /**\n * Go forward in history\n */\n forward() {\n window.history.forward()\n }\n\n /**\n * Performs a `pushState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */\n push(url: Url, as?: Url, options: TransitionOptions = {}) {\n if (\n isJavaScriptURLString(url.toString()) ||\n (as && isJavaScriptURLString(as.toString()))\n ) {\n throw new Error(\n 'Next.js has blocked a javascript: URL as a security precaution.'\n )\n }\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n // TODO: remove in the future when we update history before route change\n // is complete, as the popstate event should handle this capture.\n if (manualScrollRestoration) {\n try {\n // Snapshot scroll position right before navigating to a new page:\n sessionStorage.setItem(\n '__next_scroll_' + this._key,\n JSON.stringify({ x: self.pageXOffset, y: self.pageYOffset })\n )\n } catch {}\n }\n }\n ;({ url, as } = prepareUrlAs(this, url, as))\n return this.change('pushState', url, as, options)\n }\n\n /**\n * Performs a `replaceState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */\n replace(url: Url, as?: Url, options: TransitionOptions = {}) {\n if (\n isJavaScriptURLString(url.toString()) ||\n (as && isJavaScriptURLString(as.toString()))\n ) {\n throw new Error(\n 'Next.js has blocked a javascript: URL as a security precaution.'\n )\n }\n ;({ url, as } = prepareUrlAs(this, url, as))\n return this.change('replaceState', url, as, options)\n }\n\n async _bfl(\n as: string,\n resolvedAs?: string,\n locale?: string | false,\n skipNavigate?: boolean\n ) {\n if (process.env.__NEXT_CLIENT_ROUTER_FILTER_ENABLED) {\n if (!this._bfl_s && !this._bfl_d) {\n const { BloomFilter } =\n require('../../lib/bloom-filter') as typeof import('../../lib/bloom-filter')\n\n type Filter = ReturnType<\n import('../../lib/bloom-filter').BloomFilter['export']\n >\n let staticFilterData: Filter | undefined\n let dynamicFilterData: Filter | undefined\n\n try {\n ;({\n __routerFilterStatic: staticFilterData,\n __routerFilterDynamic: dynamicFilterData,\n } = (await getClientBuildManifest()) as any as {\n __routerFilterStatic?: Filter\n __routerFilterDynamic?: Filter\n })\n } catch (err) {\n // failed to load build manifest hard navigate\n // to be safe\n console.error(err)\n if (skipNavigate) {\n return true\n }\n handleHardNavigation({\n url: addBasePath(\n addLocale(as, locale || this.locale, this.defaultLocale)\n ),\n router: this,\n })\n return new Promise(() => {})\n }\n\n const routerFilterSValue: Filter | false = process.env\n .__NEXT_CLIENT_ROUTER_S_FILTER as any\n\n if (!staticFilterData && routerFilterSValue) {\n staticFilterData = routerFilterSValue ? routerFilterSValue : undefined\n }\n\n const routerFilterDValue: Filter | false = process.env\n .__NEXT_CLIENT_ROUTER_D_FILTER as any\n\n if (!dynamicFilterData && routerFilterDValue) {\n dynamicFilterData = routerFilterDValue\n ? routerFilterDValue\n : undefined\n }\n\n if (staticFilterData?.numHashes) {\n this._bfl_s = new BloomFilter(\n staticFilterData.numItems,\n staticFilterData.errorRate\n )\n this._bfl_s.import(staticFilterData)\n }\n\n if (dynamicFilterData?.numHashes) {\n this._bfl_d = new BloomFilter(\n dynamicFilterData.numItems,\n dynamicFilterData.errorRate\n )\n this._bfl_d.import(dynamicFilterData)\n }\n }\n\n let matchesBflStatic = false\n let matchesBflDynamic = false\n const pathsToCheck: Array<{ as?: string; allowMatchCurrent?: boolean }> =\n [{ as }, { as: resolvedAs }]\n\n for (const { as: curAs, allowMatchCurrent } of pathsToCheck) {\n if (curAs) {\n const asNoSlash = removeTrailingSlash(\n new URL(curAs, 'http://n').pathname\n )\n const asNoSlashLocale = addBasePath(\n addLocale(asNoSlash, locale || this.locale)\n )\n\n if (\n allowMatchCurrent ||\n asNoSlash !==\n removeTrailingSlash(new URL(this.asPath, 'http://n').pathname)\n ) {\n matchesBflStatic =\n matchesBflStatic ||\n !!this._bfl_s?.contains(asNoSlash) ||\n !!this._bfl_s?.contains(asNoSlashLocale)\n\n for (const normalizedAS of [asNoSlash, asNoSlashLocale]) {\n // if any sub-path of as matches a dynamic filter path\n // it should be hard navigated\n const curAsParts = normalizedAS.split('/')\n for (\n let i = 0;\n !matchesBflDynamic && i < curAsParts.length + 1;\n i++\n ) {\n const currentPart = curAsParts.slice(0, i).join('/')\n if (currentPart && this._bfl_d?.contains(currentPart)) {\n matchesBflDynamic = true\n break\n }\n }\n }\n\n // if the client router filter is matched then we trigger\n // a hard navigation\n if (matchesBflStatic || matchesBflDynamic) {\n if (skipNavigate) {\n return true\n }\n handleHardNavigation({\n url: addBasePath(\n addLocale(as, locale || this.locale, this.defaultLocale)\n ),\n router: this,\n })\n return new Promise(() => {})\n }\n }\n }\n }\n }\n return false\n }\n\n private async change(\n method: HistoryMethod,\n url: string,\n as: string,\n options: TransitionOptions,\n forcedScroll?: { x: number; y: number }\n ): Promise<boolean> {\n if (!isLocalURL(url)) {\n handleHardNavigation({ url, router: this })\n return false\n }\n // WARNING: `_h` is an internal option for handing Next.js client-side\n // hydration. Your app should _never_ use this property. It may change at\n // any time without notice.\n const isQueryUpdating = (options as any)._h === 1\n\n if (!isQueryUpdating && !options.shallow) {\n await this._bfl(as, undefined, options.locale)\n }\n\n let shouldResolveHref =\n isQueryUpdating ||\n (options as any)._shouldResolveHref ||\n parsePath(url).pathname === parsePath(as).pathname\n\n const nextState = {\n ...this.state,\n }\n\n // for static pages with query params in the URL we delay\n // marking the router ready until after the query is updated\n // or a navigation has occurred\n const readyStateChange = this.isReady !== true\n this.isReady = true\n const isSsr = this.isSsr\n\n if (!isQueryUpdating) {\n this.isSsr = false\n }\n\n // if a route transition is already in progress before\n // the query updating is triggered ignore query updating\n if (isQueryUpdating && this.clc) {\n return false\n }\n\n const prevLocale = nextState.locale\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n nextState.locale =\n options.locale === false\n ? this.defaultLocale\n : options.locale || nextState.locale\n\n if (typeof options.locale === 'undefined') {\n options.locale = nextState.locale\n }\n\n const parsedAs = parseRelativeUrl(\n hasBasePath(as) ? removeBasePath(as) : as\n )\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n this.locales\n )\n\n if (localePathResult.detectedLocale) {\n nextState.locale = localePathResult.detectedLocale\n parsedAs.pathname = addBasePath(parsedAs.pathname)\n as = formatWithValidation(parsedAs)\n url = addBasePath(\n normalizeLocalePath(\n hasBasePath(url) ? removeBasePath(url) : url,\n this.locales\n ).pathname\n )\n }\n let didNavigate = false\n\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (process.env.__NEXT_I18N_SUPPORT) {\n // if the locale isn't configured hard navigate to show 404 page\n if (!this.locales?.includes(nextState.locale!)) {\n parsedAs.pathname = addLocale(parsedAs.pathname, nextState.locale)\n handleHardNavigation({\n url: formatWithValidation(parsedAs),\n router: this,\n })\n // this was previously a return but was removed in favor\n // of better dead code elimination with regenerator runtime\n didNavigate = true\n }\n }\n\n const detectedDomain = detectDomainLocale(\n this.domainLocales,\n undefined,\n nextState.locale\n )\n\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (process.env.__NEXT_I18N_SUPPORT) {\n // if we are navigating to a domain locale ensure we redirect to the\n // correct domain\n if (\n !didNavigate &&\n detectedDomain &&\n this.isLocaleDomain &&\n self.location.hostname !== detectedDomain.domain\n ) {\n const asNoBasePath = removeBasePath(as)\n handleHardNavigation({\n url: `http${detectedDomain.http ? '' : 's'}://${\n detectedDomain.domain\n }${addBasePath(\n `${\n nextState.locale === detectedDomain.defaultLocale\n ? ''\n : `/${nextState.locale}`\n }${asNoBasePath === '/' ? '' : asNoBasePath}` || '/'\n )}`,\n router: this,\n })\n // this was previously a return but was removed in favor\n // of better dead code elimination with regenerator runtime\n didNavigate = true\n }\n }\n\n if (didNavigate) {\n return new Promise(() => {})\n }\n }\n\n // marking route changes as a navigation start entry\n if (ST) {\n performance.mark('routeChange')\n }\n\n const { shallow = false, scroll = true } = options\n const routeProps = { shallow }\n\n if (this._inFlightRoute && this.clc) {\n if (!isSsr) {\n Router.events.emit(\n 'routeChangeError',\n buildCancellationError(),\n this._inFlightRoute,\n routeProps\n )\n }\n this.clc()\n this.clc = null\n }\n\n as = addBasePath(\n addLocale(\n hasBasePath(as) ? removeBasePath(as) : as,\n options.locale,\n this.defaultLocale\n )\n )\n const cleanedAs = removeLocale(\n hasBasePath(as) ? removeBasePath(as) : as,\n nextState.locale\n )\n this._inFlightRoute = as\n\n const localeChange = prevLocale !== nextState.locale\n\n // If the url change is only related to a hash change\n // We should not proceed. We should only change the state.\n\n if (!isQueryUpdating && this.onlyAHashChange(cleanedAs) && !localeChange) {\n nextState.asPath = cleanedAs\n Router.events.emit('hashChangeStart', as, routeProps)\n // TODO: do we need the resolved href when only a hash change?\n this.changeState(method, url, as, {\n ...options,\n scroll: false,\n })\n if (scroll) {\n this.scrollToHash(cleanedAs)\n }\n try {\n await this.set(nextState, this.components[nextState.route], null)\n } catch (err) {\n if (isError(err) && err.cancelled) {\n Router.events.emit('routeChangeError', err, cleanedAs, routeProps)\n }\n throw err\n }\n\n Router.events.emit('hashChangeComplete', as, routeProps)\n return true\n }\n\n let parsed = parseRelativeUrl(url)\n let { pathname, query } = parsed\n\n // The build manifest needs to be loaded before auto-static dynamic pages\n // get their query parameters to allow ensuring they can be parsed properly\n // when rewritten to\n let pages: string[], rewrites: any\n try {\n ;[pages, { __rewrites: rewrites }] = await Promise.all([\n this.pageLoader.getPageList(),\n getClientBuildManifest(),\n this.pageLoader.getMiddleware(),\n ])\n } catch (err) {\n // If we fail to resolve the page list or client-build manifest, we must\n // do a server-side transition:\n handleHardNavigation({ url: as, router: this })\n return false\n }\n\n // If asked to change the current URL we should reload the current page\n // (not location.reload() but reload getInitialProps and other Next.js stuffs)\n // We also need to set the method = replaceState always\n // as this should not go into the history (That's how browsers work)\n // We should compare the new asPath to the current asPath, not the url\n if (!this.urlIsNew(cleanedAs) && !localeChange) {\n method = 'replaceState'\n }\n\n // we need to resolve the as value using rewrites for dynamic SSG\n // pages to allow building the data URL correctly\n let resolvedAs = as\n\n // url and as should always be prefixed with basePath by this\n // point by either next/link or router.push/replace so strip the\n // basePath from the pathname to match the pages dir 1-to-1\n pathname = pathname\n ? removeTrailingSlash(removeBasePath(pathname))\n : pathname\n\n let route = removeTrailingSlash(pathname)\n const parsedAsPathname = as.startsWith('/') && parseRelativeUrl(as).pathname\n\n // if we detected the path as app route during prefetching\n // trigger hard navigation\n if ((this.components[pathname] as any)?.__appRouter) {\n handleHardNavigation({ url: as, router: this })\n return new Promise(() => {})\n }\n\n const isMiddlewareRewrite = !!(\n parsedAsPathname &&\n route !== parsedAsPathname &&\n (!isDynamicRoute(route) ||\n !getRouteMatcher(getRouteRegex(route))(parsedAsPathname))\n )\n\n // we don't attempt resolve asPath when we need to execute\n // middleware as the resolving will occur server-side\n const isMiddlewareMatch =\n !options.shallow &&\n (await matchesMiddleware({\n asPath: as,\n locale: nextState.locale,\n router: this,\n }))\n\n if (isQueryUpdating && isMiddlewareMatch) {\n shouldResolveHref = false\n }\n\n if (shouldResolveHref && pathname !== '/_error') {\n ;(options as any)._shouldResolveHref = true\n\n if (process.env.__NEXT_HAS_REWRITES && as.startsWith('/')) {\n const rewritesResult = resolveRewrites(\n addBasePath(addLocale(cleanedAs, nextState.locale), true),\n pages,\n rewrites,\n query,\n (p: string) => resolveDynamicRoute(p, pages),\n this.locales\n )\n\n if (rewritesResult.externalDest) {\n handleHardNavigation({ url: as, router: this })\n return true\n }\n if (!isMiddlewareMatch) {\n resolvedAs = rewritesResult.asPath\n }\n\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref\n parsed.pathname = addBasePath(pathname)\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n } else {\n parsed.pathname = resolveDynamicRoute(pathname, pages)\n\n if (parsed.pathname !== pathname) {\n pathname = parsed.pathname\n parsed.pathname = addBasePath(pathname)\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n }\n }\n\n if (!isLocalURL(as)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invalid href: \"${url}\" and as: \"${as}\", received relative href and external as` +\n `\\nSee more info: https://nextjs.org/docs/messages/invalid-relative-url-external-as`\n )\n }\n handleHardNavigation({ url: as, router: this })\n return false\n }\n\n resolvedAs = removeLocale(removeBasePath(resolvedAs), nextState.locale)\n\n route = removeTrailingSlash(pathname)\n let routeMatch: Params | false = false\n\n if (isDynamicRoute(route)) {\n const parsedAs = parseRelativeUrl(resolvedAs)\n const asPathname = parsedAs.pathname\n\n const routeRegex = getRouteRegex(route)\n routeMatch = getRouteMatcher(routeRegex)(asPathname)\n const shouldInterpolate = route === asPathname\n const interpolatedAs = shouldInterpolate\n ? interpolateAs(route, asPathname, query)\n : ({} as { result: undefined; params: undefined })\n\n if (!routeMatch || (shouldInterpolate && !interpolatedAs.result)) {\n const missingParams = Object.keys(routeRegex.groups).filter(\n (param) => !query[param] && !routeRegex.groups[param].optional\n )\n\n if (missingParams.length > 0 && !isMiddlewareMatch) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `${\n shouldInterpolate\n ? `Interpolating href`\n : `Mismatching \\`as\\` and \\`href\\``\n } failed to manually provide ` +\n `the params: ${missingParams.join(\n ', '\n )} in the \\`href\\`'s \\`query\\``\n )\n }\n\n throw new Error(\n (shouldInterpolate\n ? `The provided \\`href\\` (${url}) value is missing query values (${missingParams.join(\n ', '\n )}) to be interpolated properly. `\n : `The provided \\`as\\` value (${asPathname}) is incompatible with the \\`href\\` value (${route}). `) +\n `Read more: https://nextjs.org/docs/messages/${\n shouldInterpolate\n ? 'href-interpolation-failed'\n : 'incompatible-href-as'\n }`\n )\n }\n } else if (shouldInterpolate) {\n as = formatWithValidation(\n Object.assign({}, parsedAs, {\n pathname: interpolatedAs.result,\n query: omit(query, interpolatedAs.params!),\n })\n )\n } else {\n // Merge params into `query`, overwriting any specified in search\n Object.assign(query, routeMatch)\n }\n }\n\n if (!isQueryUpdating) {\n Router.events.emit('routeChangeStart', as, routeProps)\n }\n\n const isErrorRoute = this.pathname === '/404' || this.pathname === '/_error'\n\n try {\n let routeInfo = await this.getRouteInfo({\n route,\n pathname,\n query,\n as,\n resolvedAs,\n routeProps,\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n hasMiddleware: isMiddlewareMatch,\n unstable_skipClientCache: options.unstable_skipClientCache,\n isQueryUpdating: isQueryUpdating && !this.isFallback,\n isMiddlewareRewrite,\n })\n\n if (!isQueryUpdating && !options.shallow) {\n await this._bfl(\n as,\n 'resolvedAs' in routeInfo ? routeInfo.resolvedAs : undefined,\n nextState.locale\n )\n }\n\n if ('route' in routeInfo && isMiddlewareMatch) {\n pathname = routeInfo.route || route\n route = pathname\n\n if (!routeProps.shallow) {\n query = Object.assign({}, routeInfo.query || {}, query)\n }\n\n const cleanedParsedPathname = hasBasePath(parsed.pathname)\n ? removeBasePath(parsed.pathname)\n : parsed.pathname\n\n if (routeMatch && pathname !== cleanedParsedPathname) {\n Object.keys(routeMatch).forEach((key) => {\n if (routeMatch && query[key] === routeMatch[key]) {\n delete query[key]\n }\n })\n }\n\n if (isDynamicRoute(pathname)) {\n const prefixedAs =\n !routeProps.shallow && routeInfo.resolvedAs\n ? routeInfo.resolvedAs\n : addBasePath(\n addLocale(\n new URL(as, location.href).pathname,\n nextState.locale\n ),\n true\n )\n\n let rewriteAs = prefixedAs\n\n if (hasBasePath(rewriteAs)) {\n rewriteAs = removeBasePath(rewriteAs)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const localeResult = normalizeLocalePath(rewriteAs, this.locales)\n nextState.locale = localeResult.detectedLocale || nextState.locale\n rewriteAs = localeResult.pathname\n }\n const routeRegex = getRouteRegex(pathname)\n const curRouteMatch = getRouteMatcher(routeRegex)(\n new URL(rewriteAs, location.href).pathname\n )\n\n if (curRouteMatch) {\n Object.assign(query, curRouteMatch)\n }\n }\n }\n\n // If the routeInfo brings a redirect we simply apply it.\n if ('type' in routeInfo) {\n if (routeInfo.type === 'redirect-internal') {\n return this.change(method, routeInfo.newUrl, routeInfo.newAs, options)\n } else {\n handleHardNavigation({ url: routeInfo.destination, router: this })\n return new Promise(() => {})\n }\n }\n\n const component: any = routeInfo.Component\n if (component && component.unstable_scriptLoader) {\n const scripts = [].concat(component.unstable_scriptLoader())\n\n scripts.forEach((script: any) => {\n handleClientScriptLoad(script.props)\n })\n }\n\n // handle redirect on client-transition\n if ((routeInfo.__N_SSG || routeInfo.__N_SSP) && routeInfo.props) {\n if (\n routeInfo.props.pageProps &&\n routeInfo.props.pageProps.__N_REDIRECT\n ) {\n // Use the destination from redirect without adding locale\n options.locale = false\n\n const destination = routeInfo.props.pageProps.__N_REDIRECT\n\n // check if destination is internal (resolves to a page) and attempt\n // client-navigation if it is falling back to hard navigation if\n // it's not\n if (\n destination.startsWith('/') &&\n routeInfo.props.pageProps.__N_REDIRECT_BASE_PATH !== false\n ) {\n const parsedHref = parseRelativeUrl(destination)\n parsedHref.pathname = resolveDynamicRoute(\n parsedHref.pathname,\n pages\n )\n\n const { url: newUrl, as: newAs } = prepareUrlAs(\n this,\n destination,\n destination\n )\n return this.change(method, newUrl, newAs, options)\n }\n handleHardNavigation({ url: destination, router: this })\n return new Promise(() => {})\n }\n\n nextState.isPreview = !!routeInfo.props.__N_PREVIEW\n\n // handle SSG data 404\n if (routeInfo.props.notFound === SSG_DATA_NOT_FOUND) {\n let notFoundRoute\n\n try {\n await this.fetchComponent('/404')\n notFoundRoute = '/404'\n } catch (_) {\n notFoundRoute = '/_error'\n }\n\n routeInfo = await this.getRouteInfo({\n route: notFoundRoute,\n pathname: notFoundRoute,\n query,\n as,\n resolvedAs,\n routeProps: { shallow: false },\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n isNotFound: true,\n })\n\n if ('type' in routeInfo) {\n throw new Error(`Unexpected middleware effect on /404`)\n }\n }\n }\n\n if (\n isQueryUpdating &&\n this.pathname === '/_error' &&\n self.__NEXT_DATA__.props?.pageProps?.statusCode === 500 &&\n routeInfo.props?.pageProps\n ) {\n // ensure statusCode is still correct for static 500 page\n // when updating query information\n routeInfo.props.pageProps.statusCode = 500\n }\n\n // shallow routing is only allowed for same page URL changes.\n const isValidShallowRoute =\n options.shallow && nextState.route === (routeInfo.route ?? route)\n\n const shouldScroll =\n options.scroll ?? (!isQueryUpdating && !isValidShallowRoute)\n const resetScroll = shouldScroll ? { x: 0, y: 0 } : null\n const upcomingScrollState = forcedScroll ?? resetScroll\n\n // the new state that the router gonna set\n const upcomingRouterState = {\n ...nextState,\n route,\n pathname,\n query,\n asPath: cleanedAs,\n isFallback: false,\n }\n\n // When the page being rendered is the 404 page, we should only update the\n // query parameters. Route changes here might add the basePath when it\n // wasn't originally present. This is also why this block is before the\n // below `changeState` call which updates the browser's history (changing\n // the URL).\n if (isQueryUpdating && isErrorRoute) {\n routeInfo = await this.getRouteInfo({\n route: this.pathname,\n pathname: this.pathname,\n query,\n as,\n resolvedAs,\n routeProps: { shallow: false },\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n isQueryUpdating: isQueryUpdating && !this.isFallback,\n })\n\n if ('type' in routeInfo) {\n throw new Error(`Unexpected middleware effect on ${this.pathname}`)\n }\n\n if (\n this.pathname === '/_error' &&\n self.__NEXT_DATA__.props?.pageProps?.statusCode === 500 &&\n routeInfo.props?.pageProps\n ) {\n // ensure statusCode is still correct for static 500 page\n // when updating query information\n routeInfo.props.pageProps.statusCode = 500\n }\n\n try {\n await this.set(upcomingRouterState, routeInfo, upcomingScrollState)\n } catch (err) {\n if (isError(err) && err.cancelled) {\n Router.events.emit('routeChangeError', err, cleanedAs, routeProps)\n }\n throw err\n }\n\n return true\n }\n\n Router.events.emit('beforeHistoryChange', as, routeProps)\n this.changeState(method, url, as, options)\n\n // for query updates we can skip it if the state is unchanged and we don't\n // need to scroll\n // https://github.com/vercel/next.js/issues/37139\n const canSkipUpdating =\n isQueryUpdating &&\n !upcomingScrollState &&\n !readyStateChange &&\n !localeChange &&\n compareRouterStates(upcomingRouterState, this.state)\n\n if (!canSkipUpdating) {\n try {\n await this.set(upcomingRouterState, routeInfo, upcomingScrollState)\n } catch (e: any) {\n if (e.cancelled) routeInfo.error = routeInfo.error || e\n else throw e\n }\n\n if (routeInfo.error) {\n if (!isQueryUpdating) {\n Router.events.emit(\n 'routeChangeError',\n routeInfo.error,\n cleanedAs,\n routeProps\n )\n }\n\n throw routeInfo.error\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n if (nextState.locale) {\n document.documentElement.lang = nextState.locale\n }\n }\n\n if (!isQueryUpdating) {\n Router.events.emit('routeChangeComplete', as, routeProps)\n }\n\n // A hash mark # is the optional last part of a URL\n const hashRegex = /#.+$/\n if (shouldScroll && hashRegex.test(as)) {\n this.scrollToHash(as)\n }\n }\n\n return true\n } catch (err) {\n if (isError(err) && err.cancelled) {\n return false\n }\n throw err\n }\n }\n\n changeState(\n method: HistoryMethod,\n url: string,\n as: string,\n options: TransitionOptions = {}\n ): void {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window.history === 'undefined') {\n console.error(`Warning: window.history is not available.`)\n return\n }\n\n if (typeof window.history[method] === 'undefined') {\n console.error(`Warning: window.history.${method} is not available`)\n return\n }\n }\n\n if (method !== 'pushState' || getURL() !== as) {\n this._shallow = options.shallow\n window.history[method](\n {\n url,\n as,\n options,\n __N: true,\n key: (this._key = method !== 'pushState' ? this._key : createKey()),\n } as HistoryState,\n // Most browsers currently ignores this parameter, although they may use it in the future.\n // Passing the empty string here should be safe against future changes to the method.\n // https://developer.mozilla.org/docs/Web/API/History/replaceState\n '',\n as\n )\n }\n }\n\n async handleRouteInfoError(\n err: Error & { code?: any; cancelled?: boolean },\n pathname: string,\n query: ParsedUrlQuery,\n as: string,\n routeProps: RouteProperties,\n loadErrorFail?: boolean\n ): Promise<CompletePrivateRouteInfo> {\n if (err.cancelled) {\n // bubble up cancellation errors\n throw err\n }\n\n if (isAssetError(err) || loadErrorFail) {\n Router.events.emit('routeChangeError', err, as, routeProps)\n\n // If we can't load the page it could be one of following reasons\n // 1. Page doesn't exists\n // 2. Page does exist in a different zone\n // 3. Internal error while loading the page\n\n // So, doing a hard reload is the proper way to deal with this.\n handleHardNavigation({\n url: as,\n router: this,\n })\n\n // Changing the URL doesn't block executing the current code path.\n // So let's throw a cancellation error stop the routing logic.\n throw buildCancellationError()\n }\n\n console.error(err)\n\n try {\n let props: Record<string, any> | undefined\n const { page: Component, styleSheets } =\n await this.fetchComponent('/_error')\n\n const routeInfo: CompletePrivateRouteInfo = {\n props,\n Component,\n styleSheets,\n err,\n error: err,\n }\n\n if (!routeInfo.props) {\n try {\n routeInfo.props = await this.getInitialProps(Component, {\n err,\n pathname,\n query,\n } as any)\n } catch (gipErr) {\n console.error('Error in error page `getInitialProps`: ', gipErr)\n routeInfo.props = {}\n }\n }\n\n return routeInfo\n } catch (routeInfoErr) {\n return this.handleRouteInfoError(\n isError(routeInfoErr) ? routeInfoErr : new Error(routeInfoErr + ''),\n pathname,\n query,\n as,\n routeProps,\n true\n )\n }\n }\n\n async getRouteInfo({\n route: requestedRoute,\n pathname,\n query,\n as,\n resolvedAs,\n routeProps,\n locale,\n hasMiddleware,\n isPreview,\n unstable_skipClientCache,\n isQueryUpdating,\n isMiddlewareRewrite,\n isNotFound,\n }: {\n route: string\n pathname: string\n query: ParsedUrlQuery\n as: string\n resolvedAs: string\n hasMiddleware?: boolean\n routeProps: RouteProperties\n locale: string | undefined\n isPreview: boolean\n unstable_skipClientCache?: boolean\n isQueryUpdating?: boolean\n isMiddlewareRewrite?: boolean\n isNotFound?: boolean\n }) {\n /**\n * This `route` binding can change if there's a rewrite\n * so we keep a reference to the original requested route\n * so we can store the cache for it and avoid re-requesting every time\n * for shallow routing purposes.\n */\n let route = requestedRoute\n\n try {\n let existingInfo: PrivateRouteInfo | undefined = this.components[route]\n if (routeProps.shallow && existingInfo && this.route === route) {\n return existingInfo\n }\n\n const handleCancelled = getCancelledHandler({ route, router: this })\n\n if (hasMiddleware) {\n existingInfo = undefined\n }\n\n let cachedRouteInfo =\n existingInfo &&\n !('initial' in existingInfo) &&\n process.env.NODE_ENV !== 'development'\n ? existingInfo\n : undefined\n\n const isBackground = isQueryUpdating\n const fetchNextDataParams: FetchNextDataParams = {\n dataHref: this.pageLoader.getDataHref({\n href: formatWithValidation({ pathname, query }),\n skipInterpolation: true,\n asPath: isNotFound ? '/404' : resolvedAs,\n locale,\n }),\n hasMiddleware: true,\n isServerRender: this.isSsr,\n parseJSON: true,\n inflightCache: isBackground ? this.sbc : this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache,\n isBackground,\n }\n\n let data:\n | WithMiddlewareEffectsOutput\n | (Pick<WithMiddlewareEffectsOutput, 'json'> &\n Omit<Partial<WithMiddlewareEffectsOutput>, 'json'>)\n | null =\n isQueryUpdating && !isMiddlewareRewrite\n ? null\n : await withMiddlewareEffects({\n fetchData: () => fetchNextData(fetchNextDataParams),\n asPath: isNotFound ? '/404' : resolvedAs,\n locale: locale,\n router: this,\n }).catch((err) => {\n // we don't hard error during query updating\n // as it's un-necessary and doesn't need to be fatal\n // unless it is a fallback route and the props can't\n // be loaded\n if (isQueryUpdating) {\n return null\n }\n throw err\n })\n\n // when rendering error routes we don't apply middleware\n // effects\n if (data && (pathname === '/_error' || pathname === '/404')) {\n data.effect = undefined\n }\n\n if (isQueryUpdating) {\n if (!data) {\n data = { json: self.__NEXT_DATA__.props }\n } else {\n data.json = self.__NEXT_DATA__.props\n }\n }\n\n handleCancelled()\n\n if (\n data?.effect?.type === 'redirect-internal' ||\n data?.effect?.type === 'redirect-external'\n ) {\n return data.effect\n }\n\n if (data?.effect?.type === 'rewrite') {\n const resolvedRoute = removeTrailingSlash(data.effect.resolvedHref)\n const pages = await this.pageLoader.getPageList()\n\n // during query updating the page must match although during\n // client-transition a redirect that doesn't match a page\n // can be returned and this should trigger a hard navigation\n // which is valid for incremental migration\n if (!isQueryUpdating || pages.includes(resolvedRoute)) {\n route = resolvedRoute\n pathname = data.effect.resolvedHref\n query = { ...query, ...data.effect.parsedAs.query }\n resolvedAs = removeBasePath(\n normalizeLocalePath(data.effect.parsedAs.pathname, this.locales)\n .pathname\n )\n\n // Check again the cache with the new destination.\n existingInfo = this.components[route]\n if (\n routeProps.shallow &&\n existingInfo &&\n this.route === route &&\n !hasMiddleware\n ) {\n // If we have a match with the current route due to rewrite,\n // we can copy the existing information to the rewritten one.\n // Then, we return the information along with the matched route.\n return { ...existingInfo, route }\n }\n }\n }\n\n if (isAPIRoute(route)) {\n handleHardNavigation({ url: as, router: this })\n return new Promise<never>(() => {})\n }\n\n const routeInfo =\n cachedRouteInfo ||\n (await this.fetchComponent(route).then<CompletePrivateRouteInfo>(\n (res) => ({\n Component: res.page,\n styleSheets: res.styleSheets,\n __N_SSG: res.mod.__N_SSG,\n __N_SSP: res.mod.__N_SSP,\n })\n ))\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } =\n require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n if (!isValidElementType(routeInfo.Component)) {\n throw new Error(\n `The default export is not a React Component in page: \"${pathname}\"`\n )\n }\n }\n const wasBailedPrefetch = data?.response?.headers.get('x-middleware-skip')\n\n const shouldFetchData = routeInfo.__N_SSG || routeInfo.__N_SSP\n\n // For non-SSG prefetches that bailed before sending data\n // we clear the cache to fetch full response\n if (wasBailedPrefetch && data?.dataHref) {\n delete this.sdc[data.dataHref]\n }\n\n const { props, cacheKey } = await this._getData(async () => {\n if (shouldFetchData) {\n if (data?.json && !wasBailedPrefetch) {\n return { cacheKey: data.cacheKey, props: data.json }\n }\n\n const dataHref = data?.dataHref\n ? data.dataHref\n : this.pageLoader.getDataHref({\n href: formatWithValidation({ pathname, query }),\n asPath: resolvedAs,\n locale,\n })\n\n const fetched = await fetchNextData({\n dataHref,\n isServerRender: this.isSsr,\n parseJSON: true,\n inflightCache: wasBailedPrefetch ? {} : this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache,\n })\n\n return {\n cacheKey: fetched.cacheKey,\n props: fetched.json || {},\n }\n }\n\n return {\n headers: {},\n props: await this.getInitialProps(\n routeInfo.Component,\n // we provide AppTree later so this needs to be `any`\n {\n pathname,\n query,\n asPath: as,\n locale,\n locales: this.locales,\n defaultLocale: this.defaultLocale,\n } as any\n ),\n }\n })\n\n // Only bust the data cache for SSP routes although\n // middleware can skip cache per request with\n // x-middleware-cache: no-cache as well\n if (routeInfo.__N_SSP && fetchNextDataParams.dataHref && cacheKey) {\n delete this.sdc[cacheKey]\n }\n\n // we kick off a HEAD request in the background\n // when a non-prefetch request is made to signal revalidation\n if (\n !this.isPreview &&\n routeInfo.__N_SSG &&\n process.env.NODE_ENV !== 'development' &&\n !isQueryUpdating\n ) {\n fetchNextData(\n Object.assign({}, fetchNextDataParams, {\n isBackground: true,\n persistCache: false,\n inflightCache: this.sbc,\n })\n ).catch(() => {})\n }\n\n props.pageProps = Object.assign({}, props.pageProps)\n routeInfo.props = props\n routeInfo.route = route\n routeInfo.query = query\n routeInfo.resolvedAs = resolvedAs\n this.components[route] = routeInfo\n\n return routeInfo\n } catch (err) {\n return this.handleRouteInfoError(\n getProperError(err),\n pathname,\n query,\n as,\n routeProps\n )\n }\n }\n\n private set(\n state: typeof this.state,\n data: PrivateRouteInfo,\n resetScroll: { x: number; y: number } | null\n ): Promise<void> {\n this.state = state\n\n return this.sub(\n data,\n this.components['/_app'].Component as AppComponent,\n resetScroll\n )\n }\n\n /**\n * Callback to execute before replacing router state\n * @param cb callback to be executed\n */\n beforePopState(cb: BeforePopStateCallback) {\n this._bps = cb\n }\n\n onlyAHashChange(as: string): boolean {\n if (!this.asPath) return false\n const [oldUrlNoHash, oldHash] = this.asPath.split('#', 2)\n const [newUrlNoHash, newHash] = as.split('#', 2)\n\n // Makes sure we scroll to the provided hash if the url/hash are the same\n if (newHash && oldUrlNoHash === newUrlNoHash && oldHash === newHash) {\n return true\n }\n\n // If the urls are change, there's more than a hash change\n if (oldUrlNoHash !== newUrlNoHash) {\n return false\n }\n\n // If the hash has changed, then it's a hash only change.\n // This check is necessary to handle both the enter and\n // leave hash === '' cases. The identity case falls through\n // and is treated as a next reload.\n return oldHash !== newHash\n }\n\n scrollToHash(as: string): void {\n const [, hash = ''] = as.split('#', 2)\n\n disableSmoothScrollDuringRouteTransition(\n () => {\n // Scroll to top if the hash is just `#` with no value or `#top`\n // To mirror browsers\n if (hash === '' || hash === 'top') {\n window.scrollTo(0, 0)\n return\n }\n\n // Decode hash to make non-latin anchor works.\n const rawHash = decodeURIComponent(hash)\n // First we check if the element by id is found\n const idEl = document.getElementById(rawHash)\n if (idEl) {\n idEl.scrollIntoView()\n return\n }\n // If there's no element with the id, we check the `name` property\n // To mirror browsers\n const nameEl = document.getElementsByName(rawHash)[0]\n if (nameEl) {\n nameEl.scrollIntoView()\n }\n },\n {\n onlyHashChange: this.onlyAHashChange(as),\n }\n )\n }\n\n urlIsNew(asPath: string): boolean {\n return this.asPath !== asPath\n }\n\n /**\n * Prefetch page code, you may wait for the data during page rendering.\n * This feature only works in production!\n * @param url the href of prefetched page\n * @param asPath the as path of the prefetched page\n */\n async prefetch(\n url: string,\n asPath: string = url,\n options: PrefetchOptions = {}\n ): Promise<void> {\n // Prefetch is not supported in development mode because it would trigger on-demand-entries\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (typeof window !== 'undefined' && isBot(window.navigator.userAgent)) {\n // No prefetches for bots that render the link since they are typically navigating\n // links via the equivalent of a hard navigation and hence never utilize these\n // prefetches.\n return\n }\n let parsed = parseRelativeUrl(url)\n const urlPathname = parsed.pathname\n\n let { pathname, query } = parsed\n const originalPathname = pathname\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n if (options.locale === false) {\n pathname = normalizeLocalePath!(pathname, this.locales).pathname\n parsed.pathname = pathname\n url = formatWithValidation(parsed)\n\n let parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath!(\n parsedAs.pathname,\n this.locales\n )\n parsedAs.pathname = localePathResult.pathname\n options.locale = localePathResult.detectedLocale || this.defaultLocale\n asPath = formatWithValidation(parsedAs)\n }\n }\n\n const pages = await this.pageLoader.getPageList()\n let resolvedAs = asPath\n\n const locale =\n typeof options.locale !== 'undefined'\n ? options.locale || undefined\n : this.locale\n\n const isMiddlewareMatch = await matchesMiddleware({\n asPath: asPath,\n locale: locale,\n router: this,\n })\n\n if (process.env.__NEXT_HAS_REWRITES && asPath.startsWith('/')) {\n let rewrites: any\n ;({ __rewrites: rewrites } = await getClientBuildManifest())\n\n const rewritesResult = resolveRewrites(\n addBasePath(addLocale(asPath, this.locale), true),\n pages,\n rewrites,\n parsed.query,\n (p: string) => resolveDynamicRoute(p, pages),\n this.locales\n )\n\n if (rewritesResult.externalDest) {\n return\n }\n\n if (!isMiddlewareMatch) {\n resolvedAs = removeLocale(\n removeBasePath(rewritesResult.asPath),\n this.locale\n )\n }\n\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref\n parsed.pathname = pathname\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n }\n parsed.pathname = resolveDynamicRoute(parsed.pathname, pages)\n\n if (isDynamicRoute(parsed.pathname)) {\n pathname = parsed.pathname\n parsed.pathname = pathname\n Object.assign(\n query,\n getRouteMatcher(getRouteRegex(parsed.pathname))(\n parsePath(asPath).pathname\n ) || {}\n )\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n\n const data =\n process.env.__NEXT_MIDDLEWARE_PREFETCH === 'strict'\n ? null\n : await withMiddlewareEffects({\n fetchData: () =>\n fetchNextData({\n dataHref: this.pageLoader.getDataHref({\n href: formatWithValidation({\n pathname: originalPathname,\n query,\n }),\n skipInterpolation: true,\n asPath: resolvedAs,\n locale,\n }),\n hasMiddleware: true,\n isServerRender: false,\n parseJSON: true,\n inflightCache: this.sdc,\n persistCache: !this.isPreview,\n isPrefetch: true,\n }),\n asPath: asPath,\n locale: locale,\n router: this,\n })\n\n /**\n * If there was a rewrite we apply the effects of the rewrite on the\n * current parameters for the prefetch.\n */\n if (data?.effect.type === 'rewrite') {\n parsed.pathname = data.effect.resolvedHref\n pathname = data.effect.resolvedHref\n query = { ...query, ...data.effect.parsedAs.query }\n resolvedAs = data.effect.parsedAs.pathname\n url = formatWithValidation(parsed)\n }\n\n /**\n * If there is a redirect to an external destination then we don't have\n * to prefetch content as it will be unused.\n */\n if (data?.effect.type === 'redirect-external') {\n return\n }\n\n const route = removeTrailingSlash(pathname)\n\n if (await this._bfl(asPath, resolvedAs, options.locale, true)) {\n this.components[urlPathname] = { __appRouter: true } as any\n }\n\n await Promise.all([\n this.pageLoader._isSsg(route).then((isSsg) => {\n return isSsg\n ? fetchNextData({\n dataHref: data?.json\n ? data?.dataHref\n : this.pageLoader.getDataHref({\n href: url,\n asPath: resolvedAs,\n locale: locale,\n }),\n isServerRender: false,\n parseJSON: true,\n inflightCache: this.sdc,\n persistCache: !this.isPreview,\n isPrefetch: true,\n unstable_skipClientCache:\n options.unstable_skipClientCache ||\n (options.priority &&\n !!process.env.__NEXT_OPTIMISTIC_CLIENT_CACHE),\n })\n .then(() => false)\n .catch(() => false)\n : false\n }),\n this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](route),\n ])\n }\n\n async fetchComponent(route: string) {\n const handleCancelled = getCancelledHandler({ route, router: this })\n\n try {\n const componentResult = await this.pageLoader.loadPage(route)\n handleCancelled()\n\n return componentResult\n } catch (err) {\n handleCancelled()\n throw err\n }\n }\n\n _getData<T>(fn: () => Promise<T>): Promise<T> {\n let cancelled = false\n const cancel = () => {\n cancelled = true\n }\n this.clc = cancel\n return fn().then((data) => {\n if (cancel === this.clc) {\n this.clc = null\n }\n\n if (cancelled) {\n const err: any = new Error('Loading initial props cancelled')\n err.cancelled = true\n throw err\n }\n\n return data\n })\n }\n\n getInitialProps(\n Component: ComponentType,\n ctx: NextPageContext\n ): Promise<Record<string, any>> {\n const { Component: App } = this.components['/_app']\n const AppTree = this._wrapApp(App as AppComponent)\n ctx.AppTree = AppTree\n return loadGetInitialProps<AppContextType<Router>>(App, {\n AppTree,\n Component,\n router: this,\n ctx,\n })\n }\n\n get route(): string {\n return this.state.route\n }\n\n get pathname(): string {\n return this.state.pathname\n }\n\n get query(): ParsedUrlQuery {\n return this.state.query\n }\n\n get asPath(): string {\n return this.state.asPath\n }\n\n get locale(): string | undefined {\n return this.state.locale\n }\n\n get isFallback(): boolean {\n return this.state.isFallback\n }\n\n get isPreview(): boolean {\n return this.state.isPreview\n }\n}\n","'use client'\n\nimport type {\n FocusAndScrollRef,\n PrefetchKind,\n} from '../../client/components/router-reducer/router-reducer-types'\nimport type { Params } from '../../server/request/params'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n CacheNode,\n LoadingModuleData,\n} from './app-router-types'\nimport React from 'react'\n\nexport interface NavigateOptions {\n scroll?: boolean\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n */\n transitionTypes?: string[]\n}\n\nexport interface PrefetchOptions {\n kind: PrefetchKind\n onInvalidate?: () => void\n}\n\nexport interface AppRouterInstance {\n /**\n * Navigate to the previous history entry.\n */\n back(): void\n /**\n * Navigate to the next history entry.\n */\n forward(): void\n /**\n * Refresh the current page.\n */\n refresh(): void\n /**\n * Refresh the current page. Use in development only.\n * @internal\n */\n hmrRefresh(): void\n /**\n * Navigate to the provided href.\n * Pushes a new history entry.\n */\n push(href: string, options?: NavigateOptions): void\n /**\n * Navigate to the provided href.\n * Replaces the current history entry.\n */\n replace(href: string, options?: NavigateOptions): void\n /**\n * Prefetch the provided href.\n */\n prefetch(href: string, options?: PrefetchOptions): void\n /**\n * Perform a gesture navigation using prefetched data.\n * Only available when experimental.gestureTransition is enabled.\n * @experimental\n */\n experimental_gesturePush?(href: string, options?: NavigateOptions): void\n}\n\nexport const AppRouterContext = React.createContext<AppRouterInstance | null>(\n null\n)\nexport const LayoutRouterContext = React.createContext<{\n parentTree: FlightRouterState\n parentCacheNode: CacheNode\n parentSegmentPath: FlightSegmentPath | null\n parentParams: Params\n parentLoadingData: LoadingModuleData | null\n debugNameContext: string\n url: string\n isActive: boolean\n} | null>(null)\n\nexport const GlobalLayoutRouterContext = React.createContext<{\n tree: FlightRouterState\n focusAndScrollRef: FocusAndScrollRef\n nextUrl: string | null\n previousNextUrl: string | null\n}>(null as any)\n\nexport const TemplateContext = React.createContext<React.ReactNode>(null as any)\n\nif (process.env.NODE_ENV !== 'production') {\n AppRouterContext.displayName = 'AppRouterContext'\n LayoutRouterContext.displayName = 'LayoutRouterContext'\n GlobalLayoutRouterContext.displayName = 'GlobalLayoutRouterContext'\n TemplateContext.displayName = 'TemplateContext'\n}\n\nexport const MissingSlotContext = React.createContext<Set<string>>(new Set())\n","import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'\n\nexport { MODERN_BROWSERSLIST_TARGET }\n\nexport type ValueOf<T> = Required<T>[keyof T]\n\nexport const COMPILER_NAMES = {\n client: 'client',\n server: 'server',\n edgeServer: 'edge-server',\n} as const\n\nexport type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>\n\nexport const COMPILER_INDEXES: {\n [compilerKey in CompilerNameValues]: number\n} = {\n [COMPILER_NAMES.client]: 0,\n [COMPILER_NAMES.server]: 1,\n [COMPILER_NAMES.edgeServer]: 2,\n} as const\n\n// Re-export entry constants for backward compatibility\nexport {\n UNDERSCORE_NOT_FOUND_ROUTE,\n UNDERSCORE_NOT_FOUND_ROUTE_ENTRY,\n UNDERSCORE_GLOBAL_ERROR_ROUTE,\n UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n} from './entry-constants'\n\nexport enum AdapterOutputType {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER = 'PRERENDER',\n\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static)\n */\n STATIC_FILE = 'STATIC_FILE',\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE = 'MIDDLEWARE',\n}\n\nexport const PHASE_EXPORT = 'phase-export'\nexport const PHASE_ANALYZE = 'phase-analyze'\nexport const PHASE_PRODUCTION_BUILD = 'phase-production-build'\nexport const PHASE_PRODUCTION_SERVER = 'phase-production-server'\nexport const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'\nexport const PHASE_TEST = 'phase-test'\nexport const PHASE_INFO = 'phase-info'\n\nexport type PHASE_TYPE =\n | typeof PHASE_INFO\n | typeof PHASE_TEST\n | typeof PHASE_EXPORT\n | typeof PHASE_ANALYZE\n | typeof PHASE_PRODUCTION_BUILD\n | typeof PHASE_PRODUCTION_SERVER\n | typeof PHASE_DEVELOPMENT_SERVER\n\nexport const PAGES_MANIFEST = 'pages-manifest.json'\nexport const APP_PATHS_MANIFEST = 'app-paths-manifest.json'\nexport const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json'\nexport const BUILD_MANIFEST = 'build-manifest.json'\nexport const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json'\nexport const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest'\nexport const NEXT_FONT_MANIFEST = 'next-font-manifest'\nexport const EXPORT_MARKER = 'export-marker.json'\nexport const EXPORT_DETAIL = 'export-detail.json'\nexport const PRERENDER_MANIFEST = 'prerender-manifest.json'\nexport const PREFETCH_HINTS = 'prefetch-hints.json'\nexport const ROUTES_MANIFEST = 'routes-manifest.json'\nexport const IMAGES_MANIFEST = 'images-manifest.json'\nexport const SERVER_FILES_MANIFEST = 'required-server-files'\nexport const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json'\nexport const MIDDLEWARE_MANIFEST = 'middleware-manifest.json'\nexport const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST =\n '_clientMiddlewareManifest.js'\nexport const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json'\nexport const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json'\nexport const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'\nexport const SERVER_DIRECTORY = 'server'\nexport const CONFIG_FILES = [\n 'next.config.js',\n 'next.config.mjs',\n 'next.config.ts',\n // process.features can be undefined on Edge runtime\n // TODO: Remove `as any` once we bump @types/node to v22.10.0+\n ...((process?.features as any)?.typescript ? ['next.config.mts'] : []),\n]\nexport const BUILD_ID_FILE = 'BUILD_ID'\nexport const BLOCKED_PAGES = ['/_document', '/_app', '/_error']\nexport const CLIENT_PUBLIC_FILES_PATH = 'public'\nexport const CLIENT_STATIC_FILES_PATH = 'static'\nexport const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'\nexport const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'\nexport const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__'\n\n// server/[entry]/page_client-reference-manifest.js\nexport const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest'\n// server/server-reference-manifest\nexport const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest'\n// server/middleware-build-manifest.js\nexport const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-manifest'\n// server/middleware-react-loadable-manifest.js\nexport const MIDDLEWARE_REACT_LOADABLE_MANIFEST =\n 'middleware-react-loadable-manifest'\n// server/interception-route-rewrite-manifest.js\nexport const INTERCEPTION_ROUTE_REWRITE_MANIFEST =\n 'interception-route-rewrite-manifest'\n// server/dynamic-css-manifest.js\nexport const DYNAMIC_CSS_MANIFEST = 'dynamic-css-manifest'\n\n// static/runtime/main.js\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`\n// next internal client components chunk for layouts\nexport const APP_CLIENT_INTERNALS = 'app-pages-internals'\n// static/runtime/react-refresh.js\nexport const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`\n// static/runtime/webpack.js\nexport const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`\n// static/runtime/polyfills.js\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = 'polyfills'\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(\n CLIENT_STATIC_FILES_RUNTIME_POLYFILLS\n)\nexport const DEFAULT_RUNTIME_WEBPACK = 'webpack-runtime'\nexport const EDGE_RUNTIME_WEBPACK = 'edge-runtime-webpack'\nexport const STATIC_PROPS_ID = '__N_SSG'\nexport const SERVER_PROPS_ID = '__N_SSP'\nexport const DEFAULT_SERIF_FONT = {\n name: 'Times New Roman',\n xAvgCharWidth: 821,\n azAvgWidth: 854.3953488372093,\n unitsPerEm: 2048,\n}\nexport const DEFAULT_SANS_SERIF_FONT = {\n name: 'Arial',\n xAvgCharWidth: 904,\n azAvgWidth: 934.5116279069767,\n unitsPerEm: 2048,\n}\nexport const STATIC_STATUS_PAGES = ['/500']\nexport const TRACE_OUTPUT_VERSION = 1\n// in `MB`\nexport const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000\n\nexport const RSC_MODULE_TYPES = {\n client: 'client',\n server: 'server',\n} as const\n\n// comparing\n// https://nextjs.org/docs/api-reference/edge-runtime\n// with\n// https://nodejs.org/docs/latest/api/globals.html\nexport const EDGE_UNSUPPORTED_NODE_APIS = [\n 'clearImmediate',\n 'setImmediate',\n 'BroadcastChannel',\n 'ByteLengthQueuingStrategy',\n 'CompressionStream',\n 'CountQueuingStrategy',\n 'DecompressionStream',\n 'DomException',\n 'MessageChannel',\n 'MessageEvent',\n 'MessagePort',\n 'ReadableByteStreamController',\n 'ReadableStreamBYOBRequest',\n 'ReadableStreamDefaultController',\n 'TransformStreamDefaultController',\n 'WritableStreamDefaultController',\n]\n\nexport const SYSTEM_ENTRYPOINTS = new Set<string>([\n CLIENT_STATIC_FILES_RUNTIME_MAIN,\n CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n])\n","import type { ParsedUrlQuery } from 'querystring'\n\nimport { getRouteMatcher } from './route-matcher'\nimport { getRouteRegex } from './route-regex'\n\nexport function interpolateAs(\n route: string,\n asPathname: string,\n query: ParsedUrlQuery\n) {\n let interpolatedRoute = ''\n\n const dynamicRegex = getRouteRegex(route)\n const dynamicGroups = dynamicRegex.groups\n const dynamicMatches =\n // Try to match the dynamic route against the asPath\n (asPathname !== route ? getRouteMatcher(dynamicRegex)(asPathname) : '') ||\n // Fall back to reading the values from the href\n // TODO: should this take priority; also need to change in the router.\n query\n\n interpolatedRoute = route\n const params = Object.keys(dynamicGroups)\n\n if (\n !params.every((param) => {\n let value = dynamicMatches[param] || ''\n const { repeat, optional } = dynamicGroups[param]\n\n // support single-level catch-all\n // TODO: more robust handling for user-error (passing `/`)\n let replaced = `[${repeat ? '...' : ''}${param}]`\n if (optional) {\n replaced = `${!value ? '/' : ''}[${replaced}]`\n }\n if (repeat && !Array.isArray(value)) value = [value]\n\n return (\n (optional || param in dynamicMatches) &&\n // Interpolate group into data URL if present\n (interpolatedRoute =\n interpolatedRoute!.replace(\n replaced,\n repeat\n ? (value as string[])\n .map(\n // these values should be fully encoded instead of just\n // path delimiter escaped since they are being inserted\n // into the URL and we expect URL encoded segments\n // when parsing dynamic route params\n (segment) => encodeURIComponent(segment)\n )\n .join('/')\n : encodeURIComponent(value as string)\n ) || '/')\n )\n })\n ) {\n interpolatedRoute = '' // did not satisfy all requirements\n\n // n.b. We ignore this error because we handle warning for this case in\n // development in the `<Link>` component directly.\n }\n return {\n params,\n result: interpolatedRoute,\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n ACTION_SUFFIX: null,\n APP_DIR_ALIAS: null,\n CACHE_ONE_YEAR_SECONDS: null,\n DOT_NEXT_ALIAS: null,\n ESLINT_DEFAULT_DIRS: null,\n GSP_NO_RETURNED_VALUE: null,\n GSSP_COMPONENT_MEMBER_ERROR: null,\n GSSP_NO_RETURNED_VALUE: null,\n HTML_CONTENT_TYPE_HEADER: null,\n INFINITE_CACHE: null,\n INSTRUMENTATION_HOOK_FILENAME: null,\n JSON_CONTENT_TYPE_HEADER: null,\n MATCHED_PATH_HEADER: null,\n MIDDLEWARE_FILENAME: null,\n MIDDLEWARE_LOCATION_REGEXP: null,\n NEXT_BODY_SUFFIX: null,\n NEXT_CACHE_IMPLICIT_TAG_ID: null,\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: null,\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: null,\n NEXT_CACHE_ROOT_PARAM_TAG_ID: null,\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: null,\n NEXT_CACHE_TAGS_HEADER: null,\n NEXT_CACHE_TAG_MAX_ITEMS: null,\n NEXT_CACHE_TAG_MAX_LENGTH: null,\n NEXT_DATA_SUFFIX: null,\n NEXT_INTERCEPTION_MARKER_PREFIX: null,\n NEXT_META_SUFFIX: null,\n NEXT_NAV_DEPLOYMENT_ID_HEADER: null,\n NEXT_QUERY_PARAM_PREFIX: null,\n NEXT_RESUME_HEADER: null,\n NEXT_RESUME_STATE_LENGTH_HEADER: null,\n NON_STANDARD_NODE_ENV: null,\n PAGES_DIR_ALIAS: null,\n PRERENDER_REVALIDATE_HEADER: null,\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: null,\n PROXY_FILENAME: null,\n PROXY_LOCATION_REGEXP: null,\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: null,\n ROOT_DIR_ALIAS: null,\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: null,\n RSC_ACTION_ENCRYPTION_ALIAS: null,\n RSC_ACTION_PROXY_ALIAS: null,\n RSC_ACTION_VALIDATE_ALIAS: null,\n RSC_CACHE_WRAPPER_ALIAS: null,\n RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: null,\n RSC_MOD_REF_PROXY_ALIAS: null,\n RSC_SEGMENTS_DIR_SUFFIX: null,\n RSC_SEGMENT_SUFFIX: null,\n RSC_SUFFIX: null,\n SERVER_PROPS_EXPORT_ERROR: null,\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: null,\n SERVER_PROPS_SSG_CONFLICT: null,\n SERVER_RUNTIME: null,\n SSG_FALLBACK_EXPORT_ERROR: null,\n SSG_GET_INITIAL_PROPS_CONFLICT: null,\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: null,\n TEXT_PLAIN_CONTENT_TYPE_HEADER: null,\n UNSTABLE_REVALIDATE_RENAME_ERROR: null,\n WEBPACK_LAYERS: null,\n WEBPACK_RESOURCE_QUERIES: null,\n WEB_SOCKET_MAX_RECONNECTIONS: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ACTION_SUFFIX: function() {\n return ACTION_SUFFIX;\n },\n APP_DIR_ALIAS: function() {\n return APP_DIR_ALIAS;\n },\n CACHE_ONE_YEAR_SECONDS: function() {\n return CACHE_ONE_YEAR_SECONDS;\n },\n DOT_NEXT_ALIAS: function() {\n return DOT_NEXT_ALIAS;\n },\n ESLINT_DEFAULT_DIRS: function() {\n return ESLINT_DEFAULT_DIRS;\n },\n GSP_NO_RETURNED_VALUE: function() {\n return GSP_NO_RETURNED_VALUE;\n },\n GSSP_COMPONENT_MEMBER_ERROR: function() {\n return GSSP_COMPONENT_MEMBER_ERROR;\n },\n GSSP_NO_RETURNED_VALUE: function() {\n return GSSP_NO_RETURNED_VALUE;\n },\n HTML_CONTENT_TYPE_HEADER: function() {\n return HTML_CONTENT_TYPE_HEADER;\n },\n INFINITE_CACHE: function() {\n return INFINITE_CACHE;\n },\n INSTRUMENTATION_HOOK_FILENAME: function() {\n return INSTRUMENTATION_HOOK_FILENAME;\n },\n JSON_CONTENT_TYPE_HEADER: function() {\n return JSON_CONTENT_TYPE_HEADER;\n },\n MATCHED_PATH_HEADER: function() {\n return MATCHED_PATH_HEADER;\n },\n MIDDLEWARE_FILENAME: function() {\n return MIDDLEWARE_FILENAME;\n },\n MIDDLEWARE_LOCATION_REGEXP: function() {\n return MIDDLEWARE_LOCATION_REGEXP;\n },\n NEXT_BODY_SUFFIX: function() {\n return NEXT_BODY_SUFFIX;\n },\n NEXT_CACHE_IMPLICIT_TAG_ID: function() {\n return NEXT_CACHE_IMPLICIT_TAG_ID;\n },\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {\n return NEXT_CACHE_REVALIDATED_TAGS_HEADER;\n },\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {\n return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;\n },\n NEXT_CACHE_ROOT_PARAM_TAG_ID: function() {\n return NEXT_CACHE_ROOT_PARAM_TAG_ID;\n },\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;\n },\n NEXT_CACHE_TAGS_HEADER: function() {\n return NEXT_CACHE_TAGS_HEADER;\n },\n NEXT_CACHE_TAG_MAX_ITEMS: function() {\n return NEXT_CACHE_TAG_MAX_ITEMS;\n },\n NEXT_CACHE_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_TAG_MAX_LENGTH;\n },\n NEXT_DATA_SUFFIX: function() {\n return NEXT_DATA_SUFFIX;\n },\n NEXT_INTERCEPTION_MARKER_PREFIX: function() {\n return NEXT_INTERCEPTION_MARKER_PREFIX;\n },\n NEXT_META_SUFFIX: function() {\n return NEXT_META_SUFFIX;\n },\n NEXT_NAV_DEPLOYMENT_ID_HEADER: function() {\n return NEXT_NAV_DEPLOYMENT_ID_HEADER;\n },\n NEXT_QUERY_PARAM_PREFIX: function() {\n return NEXT_QUERY_PARAM_PREFIX;\n },\n NEXT_RESUME_HEADER: function() {\n return NEXT_RESUME_HEADER;\n },\n NEXT_RESUME_STATE_LENGTH_HEADER: function() {\n return NEXT_RESUME_STATE_LENGTH_HEADER;\n },\n NON_STANDARD_NODE_ENV: function() {\n return NON_STANDARD_NODE_ENV;\n },\n PAGES_DIR_ALIAS: function() {\n return PAGES_DIR_ALIAS;\n },\n PRERENDER_REVALIDATE_HEADER: function() {\n return PRERENDER_REVALIDATE_HEADER;\n },\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {\n return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;\n },\n PROXY_FILENAME: function() {\n return PROXY_FILENAME;\n },\n PROXY_LOCATION_REGEXP: function() {\n return PROXY_LOCATION_REGEXP;\n },\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {\n return PUBLIC_DIR_MIDDLEWARE_CONFLICT;\n },\n ROOT_DIR_ALIAS: function() {\n return ROOT_DIR_ALIAS;\n },\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {\n return RSC_ACTION_CLIENT_WRAPPER_ALIAS;\n },\n RSC_ACTION_ENCRYPTION_ALIAS: function() {\n return RSC_ACTION_ENCRYPTION_ALIAS;\n },\n RSC_ACTION_PROXY_ALIAS: function() {\n return RSC_ACTION_PROXY_ALIAS;\n },\n RSC_ACTION_VALIDATE_ALIAS: function() {\n return RSC_ACTION_VALIDATE_ALIAS;\n },\n RSC_CACHE_WRAPPER_ALIAS: function() {\n return RSC_CACHE_WRAPPER_ALIAS;\n },\n RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {\n return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;\n },\n RSC_MOD_REF_PROXY_ALIAS: function() {\n return RSC_MOD_REF_PROXY_ALIAS;\n },\n RSC_SEGMENTS_DIR_SUFFIX: function() {\n return RSC_SEGMENTS_DIR_SUFFIX;\n },\n RSC_SEGMENT_SUFFIX: function() {\n return RSC_SEGMENT_SUFFIX;\n },\n RSC_SUFFIX: function() {\n return RSC_SUFFIX;\n },\n SERVER_PROPS_EXPORT_ERROR: function() {\n return SERVER_PROPS_EXPORT_ERROR;\n },\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {\n return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;\n },\n SERVER_PROPS_SSG_CONFLICT: function() {\n return SERVER_PROPS_SSG_CONFLICT;\n },\n SERVER_RUNTIME: function() {\n return SERVER_RUNTIME;\n },\n SSG_FALLBACK_EXPORT_ERROR: function() {\n return SSG_FALLBACK_EXPORT_ERROR;\n },\n SSG_GET_INITIAL_PROPS_CONFLICT: function() {\n return SSG_GET_INITIAL_PROPS_CONFLICT;\n },\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {\n return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;\n },\n TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {\n return TEXT_PLAIN_CONTENT_TYPE_HEADER;\n },\n UNSTABLE_REVALIDATE_RENAME_ERROR: function() {\n return UNSTABLE_REVALIDATE_RENAME_ERROR;\n },\n WEBPACK_LAYERS: function() {\n return WEBPACK_LAYERS;\n },\n WEBPACK_RESOURCE_QUERIES: function() {\n return WEBPACK_RESOURCE_QUERIES;\n },\n WEB_SOCKET_MAX_RECONNECTIONS: function() {\n return WEB_SOCKET_MAX_RECONNECTIONS;\n }\n});\nconst TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nconst HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nconst JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nconst NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nconst NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nconst MATCHED_PATH_HEADER = 'x-matched-path';\nconst PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nconst PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nconst RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nconst RSC_SEGMENT_SUFFIX = '.segment.rsc';\nconst RSC_SUFFIX = '.rsc';\nconst ACTION_SUFFIX = '.action';\nconst NEXT_DATA_SUFFIX = '.json';\nconst NEXT_META_SUFFIX = '.meta';\nconst NEXT_BODY_SUFFIX = '.body';\nconst NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id';\nconst NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nconst NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nconst NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nconst NEXT_RESUME_HEADER = 'next-resume';\nconst NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length';\nconst NEXT_CACHE_TAG_MAX_ITEMS = 128;\nconst NEXT_CACHE_TAG_MAX_LENGTH = 256;\nconst NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nconst NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\nconst NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_';\nconst CACHE_ONE_YEAR_SECONDS = 31536000;\nconst INFINITE_CACHE = 0xfffffffe;\nconst MIDDLEWARE_FILENAME = 'middleware';\nconst MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\nconst PROXY_FILENAME = 'proxy';\nconst PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;\nconst INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\nconst PAGES_DIR_ALIAS = 'private-next-pages';\nconst DOT_NEXT_ALIAS = 'private-dot-next';\nconst ROOT_DIR_ALIAS = 'private-next-root-dir';\nconst APP_DIR_ALIAS = 'private-next-app-dir';\nconst RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy';\nconst RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nconst RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nconst RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nconst RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nconst RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nconst RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nconst PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nconst SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nconst SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nconst SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nconst STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nconst SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nconst GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nconst GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nconst UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nconst GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nconst NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nconst SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nconst ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nconst SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\nconst WEB_SOCKET_MAX_RECONNECTIONS = 12;\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\n\n//# sourceMappingURL=constants.js.map","const DOMAttributeNames: Record<string, string> = {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv',\n noModule: 'noModule',\n}\n\nconst ignoreProps = [\n 'onLoad',\n 'onReady',\n 'dangerouslySetInnerHTML',\n 'children',\n 'onError',\n 'strategy',\n 'stylesheets',\n]\n\nfunction isBooleanScriptAttribute(\n attr: string\n): attr is 'async' | 'defer' | 'noModule' {\n return ['async', 'defer', 'noModule'].includes(attr)\n}\n\nexport function setAttributesFromProps(el: HTMLElement, props: object) {\n for (const [p, value] of Object.entries(props)) {\n if (!props.hasOwnProperty(p)) continue\n if (ignoreProps.includes(p)) continue\n\n // we don't render undefined props to the DOM\n if (value === undefined) {\n continue\n }\n\n const attr = DOMAttributeNames[p] || p.toLowerCase()\n\n if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) {\n // Correctly assign boolean script attributes\n // https://github.com/vercel/next.js/pull/20748\n ;(el as HTMLScriptElement)[attr] = !!value\n } else {\n el.setAttribute(attr, String(value))\n }\n\n // Remove falsy non-zero boolean attributes so they are correctly interpreted\n // (e.g. if we set them to false, this coerces to the string \"false\", which the browser interprets as true)\n if (\n value === false ||\n (el.tagName === 'SCRIPT' &&\n isBooleanScriptAttribute(attr) &&\n (!value || value === 'false'))\n ) {\n // Call setAttribute before, as we need to set and unset the attribute to override force async:\n // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async\n el.setAttribute(attr, '')\n el.removeAttribute(attr)\n }\n }\n}\n","//#region src/utils/cacheNames.ts\nconst _cacheNameDetails = {\n\tgoogleAnalytics: \"googleAnalytics\",\n\tprecache: \"precache-v2\",\n\tprefix: \"serwist\",\n\truntime: \"runtime\",\n\tsuffix: typeof registration !== \"undefined\" ? registration.scope : \"\"\n};\nconst _createCacheName = (cacheName) => {\n\treturn [\n\t\t_cacheNameDetails.prefix,\n\t\tcacheName,\n\t\t_cacheNameDetails.suffix\n\t].filter((value) => value && value.length > 0).join(\"-\");\n};\nconst eachCacheNameDetail = (fn) => {\n\tfor (const key of Object.keys(_cacheNameDetails)) fn(key);\n};\nconst cacheNames = {\n\tupdateDetails: (details) => {\n\t\teachCacheNameDetail((key) => {\n\t\t\tconst detail = details[key];\n\t\t\tif (typeof detail === \"string\") _cacheNameDetails[key] = detail;\n\t\t});\n\t},\n\tgetGoogleAnalyticsName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n\t},\n\tgetPrecacheName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.precache);\n\t},\n\tgetPrefix: () => {\n\t\treturn _cacheNameDetails.prefix;\n\t},\n\tgetRuntimeName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.runtime);\n\t},\n\tgetSuffix: () => {\n\t\treturn _cacheNameDetails.suffix;\n\t}\n};\n//#endregion\n//#region src/utils/canConstructResponseFromBodyStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a new response from a `response.body` stream.\n*\n* @returns `true`, if the current browser can successfully construct\n* a response from a `response.body` stream, `false` otherwise.\n* @private\n*/\nfunction canConstructResponseFromBodyStream() {\n\tif (supportStatus === void 0) {\n\t\tconst testResponse = new Response(\"\");\n\t\tif (\"body\" in testResponse) try {\n\t\t\tnew Response(testResponse.body);\n\t\t\tsupportStatus = true;\n\t\t} catch {\n\t\t\tsupportStatus = false;\n\t\t}\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/models/messages/messages.ts\nconst messages = {\n\t\"invalid-value\": ({ paramName, validValueDescription, value }) => {\n\t\tif (!paramName || !validValueDescription) throw new Error(`Unexpected input to 'invalid-value' error.`);\n\t\treturn `The '${paramName}' parameter was given a value with an unexpected value. ${validValueDescription} Received a value of ${JSON.stringify(value)}.`;\n\t},\n\t\"not-an-array\": ({ moduleName, className, funcName, paramName }) => {\n\t\tif (!moduleName || !className || !funcName || !paramName) throw new Error(`Unexpected input to 'not-an-array' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className}.${funcName}()' must be an array.`;\n\t},\n\t\"incorrect-type\": ({ expectedType, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedType || !paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-type' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className ? `${className}.` : \"\"}${funcName}()' must be of type ${expectedType}.`;\n\t},\n\t\"incorrect-class\": ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem }) => {\n\t\tif (!expectedClassName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-class' error.`);\n\t\tconst classNameStr = className ? `${className}.` : \"\";\n\t\tif (isReturnValueProblem) return `The return value from '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t},\n\t\"missing-a-method\": ({ expectedMethod, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedMethod || !paramName || !moduleName || !className || !funcName) throw new Error(`Unexpected input to 'missing-a-method' error.`);\n\t\treturn `${moduleName}.${className}.${funcName}() expected the '${paramName}' parameter to expose a '${expectedMethod}' method.`;\n\t},\n\t\"add-to-cache-list-unexpected-type\": ({ entry }) => {\n\t\treturn `An unexpected entry was passed to 'serwist.Serwist.addToPrecacheList()' The entry '${JSON.stringify(entry)}' isn't supported. You must supply an array of strings with one or more characters, objects with a url property or Request objects.`;\n\t},\n\t\"add-to-cache-list-conflicting-entries\": ({ firstEntry, secondEntry }) => {\n\t\tif (!firstEntry || !secondEntry) throw new Error(\"Unexpected input to 'add-to-cache-list-duplicate-entries' error.\");\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${firstEntry} but different revision details. Serwist is unable to cache and version the asset correctly. Please remove one of the entries.`;\n\t},\n\t\"plugin-error-request-will-fetch\": ({ thrownErrorMessage }) => {\n\t\tif (!thrownErrorMessage) throw new Error(\"Unexpected input to 'plugin-error-request-will-fetch', error.\");\n\t\treturn `An error was thrown by a plugin's 'requestWillFetch()' method. The thrown error message was: '${thrownErrorMessage}'.`;\n\t},\n\t\"invalid-cache-name\": ({ cacheNameId, value }) => {\n\t\tif (!cacheNameId) throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n\t\treturn `You must provide a name containing at least one character for setCacheDetails({${cacheNameId}: '...'}). Received a value of '${JSON.stringify(value)}'`;\n\t},\n\t\"unregister-route-but-not-found-with-method\": ({ method }) => {\n\t\tif (!method) throw new Error(\"Unexpected input to 'unregister-route-but-not-found-with-method' error.\");\n\t\treturn `The route you're trying to unregister was not previously registered for the method type '${method}'.`;\n\t},\n\t\"unregister-route-route-not-registered\": () => {\n\t\treturn \"The route you're trying to unregister was not previously registered.\";\n\t},\n\t\"queue-replay-failed\": ({ name }) => {\n\t\treturn `Replaying the background sync queue '${name}' failed.`;\n\t},\n\t\"duplicate-queue-name\": ({ name }) => {\n\t\treturn `The queue name '${name}' is already being used. All instances of 'serwist.BackgroundSyncQueue' must be given unique names.`;\n\t},\n\t\"expired-test-without-max-age\": ({ methodName, paramName }) => {\n\t\treturn `The '${methodName}()' method can only be used when the '${paramName}' is used in the constructor.`;\n\t},\n\t\"unsupported-route-type\": ({ moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter was an unsupported type. Please check the docs for ${moduleName}.${className}.${funcName} for valid input types.`;\n\t},\n\t\"not-array-of-class\": ({ value, expectedClass, moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter must be an array of '${expectedClass}' objects. Received '${JSON.stringify(value)},'. Please check the call to ${moduleName}.${className}.${funcName}() to fix the issue.`;\n\t},\n\t\"max-entries-or-age-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.maxEntries' or 'config.maxAgeSeconds' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"statuses-or-headers-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.statuses' or 'config.headers' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"invalid-string\": ({ moduleName, funcName, paramName }) => {\n\t\tif (!paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'invalid-string' error.`);\n\t\treturn `When using strings, the '${paramName}' parameter must start with 'http' (for cross-origin matches) or '/' (for same-origin matches). Please see the docs for ${moduleName}.${funcName}() for more info.`;\n\t},\n\t\"channel-name-required\": () => {\n\t\treturn \"You must provide a channelName to construct a BroadcastCacheUpdate instance.\";\n\t},\n\t\"invalid-responses-are-same-args\": () => {\n\t\treturn \"The arguments passed into responsesAreSame() appear to be invalid. Please ensure valid Responses are used.\";\n\t},\n\t\"expire-custom-caches-only\": () => {\n\t\treturn \"You must provide a 'cacheName' property when using the expiration plugin with a runtime caching strategy.\";\n\t},\n\t\"unit-must-be-bytes\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n\t\treturn `The 'unit' portion of the Range header must be set to 'bytes'. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"single-range-only\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'single-range-only' error.`);\n\t\treturn `Multiple ranges are not supported. Please use a single start value, and optional end value. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"invalid-range-values\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n\t\treturn `The Range header is missing both start and end values. At least one of those values is needed. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"no-range-header\": () => {\n\t\treturn \"No Range header was found in the Request provided.\";\n\t},\n\t\"range-not-satisfiable\": ({ size, start, end }) => {\n\t\treturn `The start (${start}) and end (${end}) values in the Range are not satisfiable by the cached response, which is ${size} bytes.`;\n\t},\n\t\"attempt-to-cache-non-get-request\": ({ url, method }) => {\n\t\treturn `Unable to cache '${url}' because it is a '${method}' request and only 'GET' requests can be cached.`;\n\t},\n\t\"cache-put-with-no-response\": ({ url }) => {\n\t\treturn `There was an attempt to cache '${url}' but the response was not defined.`;\n\t},\n\t\"no-response\": ({ url, error }) => {\n\t\tlet message = `The strategy could not generate a response for '${url}'.`;\n\t\tif (error) message += ` The underlying error is ${error}.`;\n\t\treturn message;\n\t},\n\t\"bad-precaching-response\": ({ url, status }) => {\n\t\treturn `The precaching request for '${url}' failed${status ? ` with an HTTP status of ${status}.` : \".\"}`;\n\t},\n\t\"non-precached-url\": ({ url }) => {\n\t\treturn `'createHandlerBoundToURL(\"${url}\")' was called, but that URL is not precached. Please pass in a URL that is precached instead.`;\n\t},\n\t\"add-to-cache-list-conflicting-integrities\": ({ url }) => {\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${url} with different integrity values. Please remove one of them.`;\n\t},\n\t\"missing-precache-entry\": ({ cacheName, url }) => {\n\t\treturn `Unable to find a precached response in ${cacheName} for ${url}.`;\n\t},\n\t\"cross-origin-copy-response\": ({ origin }) => {\n\t\treturn `'@serwist/core.copyResponse()' can only be used with same-origin responses. It was passed a response with origin ${origin}.`;\n\t},\n\t\"opaque-streams-source\": ({ type }) => {\n\t\tconst message = `One of the '@serwist/streams' sources resulted in an '${type}' response.`;\n\t\tif (type === \"opaqueredirect\") return `${message} Please do not use a navigation request that results in a redirect as a source.`;\n\t\treturn `${message} Please ensure your sources are CORS-enabled.`;\n\t}\n};\n//#endregion\n//#region src/models/messages/messageGenerator.ts\nconst fallback = (code, ...args) => {\n\tlet msg = code;\n\tif (args.length > 0) msg += ` :: ${JSON.stringify(args)}`;\n\treturn msg;\n};\nconst generatorFunction = (code, details = {}) => {\n\tconst message = messages[code];\n\tif (!message) throw new Error(`Unable to find message for code '${code}'.`);\n\treturn message(details);\n};\nconst messageGenerator = process.env.NODE_ENV === \"production\" ? fallback : generatorFunction;\n//#endregion\n//#region src/utils/SerwistError.ts\n/**\n* Serwist errors should be thrown with this class.\n* This allows use to ensure the type easily in tests,\n* helps developers identify errors from Serwist\n* easily and allows use to optimise error\n* messages correctly.\n*\n* @private\n*/\nvar SerwistError = class extends Error {\n\tdetails;\n\t/**\n\t*\n\t* @param errorCode The error code that\n\t* identifies this particular error.\n\t* @param details Any relevant arguments\n\t* that will help developers identify issues should\n\t* be added as a key on the context object.\n\t*/\n\tconstructor(errorCode, details) {\n\t\tconst message = messageGenerator(errorCode, details);\n\t\tsuper(message);\n\t\tthis.name = errorCode;\n\t\tthis.details = details;\n\t}\n};\n//#endregion\n//#region src/utils/assert.ts\nconst isArray = (value, details) => {\n\tif (!Array.isArray(value)) throw new SerwistError(\"not-an-array\", details);\n};\nconst hasMethod = (object, expectedMethod, details) => {\n\tif (typeof object[expectedMethod] !== \"function\") {\n\t\tdetails.expectedMethod = expectedMethod;\n\t\tthrow new SerwistError(\"missing-a-method\", details);\n\t}\n};\nconst isType = (object, expectedType, details) => {\n\tif (typeof object !== expectedType) {\n\t\tdetails.expectedType = expectedType;\n\t\tthrow new SerwistError(\"incorrect-type\", details);\n\t}\n};\nconst isInstance = (object, expectedClass, details) => {\n\tif (!(object instanceof expectedClass)) {\n\t\tdetails.expectedClassName = expectedClass.name;\n\t\tthrow new SerwistError(\"incorrect-class\", details);\n\t}\n};\nconst isOneOf = (value, validValues, details) => {\n\tif (!validValues.includes(value)) {\n\t\tdetails.validValueDescription = `Valid values are ${JSON.stringify(validValues)}.`;\n\t\tthrow new SerwistError(\"invalid-value\", details);\n\t}\n};\nconst isArrayOfClass = (value, expectedClass, details) => {\n\tconst error = new SerwistError(\"not-array-of-class\", details);\n\tif (!Array.isArray(value)) throw error;\n\tfor (const item of value) if (!(item instanceof expectedClass)) throw error;\n};\nconst finalAssertExports = process.env.NODE_ENV === \"production\" ? null : {\n\thasMethod,\n\tisArray,\n\tisInstance,\n\tisOneOf,\n\tisType,\n\tisArrayOfClass\n};\n//#endregion\n//#region src/utils/getFriendlyURL.ts\nconst getFriendlyURL = (url) => {\n\treturn new URL(String(url), location.href).href.replace(new RegExp(`^${location.origin}`), \"\");\n};\n//#endregion\n//#region src/utils/logger.ts\n/**\n* The logger used by Serwist inside of both service workers and the window global scope.\n*\n* Note: This is forcibly `null` in production mode to reduce bundle size. Do check whether\n* you are currently in development mode (by using `process.env.NODE_ENV !== \"production\"`)\n* before using it.\n*/\nconst logger = process.env.NODE_ENV === \"production\" || typeof self === \"undefined\" ? null : (() => {\n\tif (!(\"__WB_DISABLE_DEV_LOGS\" in globalThis)) self.__WB_DISABLE_DEV_LOGS = false;\n\tlet inGroup = false;\n\tconst methodToColorMap = {\n\t\tdebug: \"#7f8c8d\",\n\t\tlog: \"#2ecc71\",\n\t\twarn: \"#f39c12\",\n\t\terror: \"#c0392b\",\n\t\tgroupCollapsed: \"#3498db\",\n\t\tgroupEnd: null\n\t};\n\tconst print = (method, args) => {\n\t\tif (self.__WB_DISABLE_DEV_LOGS) return;\n\t\tif (method === \"groupCollapsed\") {\n\t\t\tif (typeof navigator !== \"undefined\" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n\t\t\t\tconsole[method](...args);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst styles = [\n\t\t\t`background: ${methodToColorMap[method]}`,\n\t\t\t\"border-radius: 0.5em\",\n\t\t\t\"color: white\",\n\t\t\t\"font-weight: bold\",\n\t\t\t\"padding: 2px 0.5em\"\n\t\t];\n\t\tconst logPrefix = inGroup ? [] : [\"%cserwist\", styles.join(\";\")];\n\t\tconsole[method](...logPrefix, ...args);\n\t\tif (method === \"groupCollapsed\") inGroup = true;\n\t\tif (method === \"groupEnd\") inGroup = false;\n\t};\n\treturn Object.keys(methodToColorMap).reduce((api, method) => {\n\t\tapi[method] = (...args) => {\n\t\t\tprint(method, args);\n\t\t};\n\t\treturn api;\n\t}, {});\n})();\n//#endregion\n//#region src/utils/timeout.ts\n/**\n* Returns a promise that resolves and the passed number of milliseconds.\n* This utility is an async/await-friendly version of `setTimeout`.\n*\n* @param ms\n* @returns\n* @private\n*/\nfunction timeout(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n//#endregion\n//#region src/models/quotaErrorCallbacks.ts\nconst quotaErrorCallbacks = /* @__PURE__ */ new Set();\n//#endregion\n//#region src/utils/cacheMatchIgnoreParams.ts\nfunction stripParams(fullURL, ignoreParams) {\n\tconst strippedURL = new URL(fullURL);\n\tfor (const param of ignoreParams) strippedURL.searchParams.delete(param);\n\treturn strippedURL.href;\n}\n/**\n* Matches an item in the cache, ignoring specific URL params. This is similar\n* to the `ignoreSearch` option, but it allows you to ignore just specific\n* params (while continuing to match on the others).\n*\n* @private\n* @param cache\n* @param request\n* @param matchOptions\n* @param ignoreParams\n* @returns\n*/\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n\tconst strippedRequestURL = stripParams(request.url, ignoreParams);\n\tif (request.url === strippedRequestURL) return cache.match(request, matchOptions);\n\tconst keysOptions = {\n\t\t...matchOptions,\n\t\tignoreSearch: true\n\t};\n\tconst cacheKeys = await cache.keys(request, keysOptions);\n\tfor (const cacheKey of cacheKeys) if (strippedRequestURL === stripParams(cacheKey.url, ignoreParams)) return cache.match(cacheKey, matchOptions);\n}\n//#endregion\n//#region src/utils/Deferred.ts\n/**\n* The Deferred class composes Promises in a way that allows for them to be\n* resolved or rejected from outside the constructor. In most cases promises\n* should be used directly, but Deferreds can be necessary when the logic to\n* resolve a promise must be separate.\n*\n* @private\n*/\nvar Deferred = class {\n\tpromise;\n\tresolve;\n\treject;\n\t/**\n\t* Creates a promise and exposes its resolve and reject functions as methods.\n\t*/\n\tconstructor() {\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n};\n//#endregion\n//#region src/utils/executeQuotaErrorCallbacks.ts\n/**\n* Runs all of the callback functions, one at a time sequentially, in the order\n* in which they were registered.\n*\n* @private\n*/\nconst executeQuotaErrorCallbacks = async () => {\n\tif (process.env.NODE_ENV !== \"production\") logger.log(`About to run ${quotaErrorCallbacks.size} callbacks to clean up caches.`);\n\tfor (const callback of quotaErrorCallbacks) {\n\t\tawait callback();\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(callback, \"is complete.\");\n\t}\n\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Finished running callbacks.\");\n};\n//#endregion\n//#region src/utils/deleteOutdatedCaches.ts\nconst SUBSTRING_TO_FIND = \"-precache-\";\n/**\n* Cleans up incompatible precaches that were created by older versions of\n* Serwist, by a service worker registered under the current scope.\n*\n* This is meant to be called as part of the `activate` event.\n*\n* This should be safe to use as long as you don't include `substringToFind`\n* (defaulting to `-precache-`) in your non-precache cache names.\n*\n* @param currentPrecacheName The cache name currently in use for\n* precaching. This cache won't be deleted.\n* @param substringToFind Cache names which include this\n* substring will be deleted (excluding `currentPrecacheName`).\n* @returns A list of all the cache names that were deleted.\n* @private\n*/\nconst deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {\n\tconst cacheNamesToDelete = (await self.caches.keys()).filter((cacheName) => {\n\t\treturn cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName;\n\t});\n\tawait Promise.all(cacheNamesToDelete.map((cacheName) => self.caches.delete(cacheName)));\n\treturn cacheNamesToDelete;\n};\n//#endregion\n//#region src/utils/cleanupOutdatedCaches.ts\n/**\n* Adds an `activate` event listener which will clean up incompatible\n* precaches that were created by older versions of Serwist.\n*/\nconst cleanupOutdatedCaches = (cacheName) => {\n\tself.addEventListener(\"activate\", (event) => {\n\t\tevent.waitUntil(deleteOutdatedCaches(cacheNames.getPrecacheName(cacheName)).then((cachesDeleted) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (cachesDeleted.length > 0) logger.log(\"The following out-of-date precaches were cleaned up automatically:\", cachesDeleted);\n\t\t\t}\n\t\t}));\n\t});\n};\n//#endregion\n//#region src/utils/clientsClaim.ts\n/**\n* Claims any currently available clients once the service worker\n* becomes active. This is normally used in conjunction with `skipWaiting()`.\n*/\nconst clientsClaim = () => {\n\tself.addEventListener(\"activate\", () => self.clients.claim());\n};\n//#endregion\n//#region src/utils/waitUntil.ts\n/**\n* A utility method that makes it easier to use `event.waitUntil` with\n* async functions and return the result.\n*\n* @param event\n* @param asyncFn\n* @returns\n* @private\n*/\nconst waitUntil = (event, asyncFn) => {\n\tconst returnPromise = asyncFn();\n\tevent.waitUntil(returnPromise);\n\treturn returnPromise;\n};\n//#endregion\nexport { Deferred as a, timeout as c, finalAssertExports as d, SerwistError as f, executeQuotaErrorCallbacks as i, logger as l, cacheNames as m, clientsClaim as n, cacheMatchIgnoreParams as o, canConstructResponseFromBodyStream as p, cleanupOutdatedCaches as r, quotaErrorCallbacks as s, waitUntil as t, getFriendlyURL as u };\n\n//# sourceMappingURL=waitUntil-BHDx3Rgo.js.map","import { c as timeout } from \"./waitUntil-BHDx3Rgo.js\";\n//#region src/utils/resultingClientExists.ts\nconst MAX_RETRY_TIME = 2e3;\n/**\n* Returns a promise that resolves to a window client matching the passed\n* `resultingClientId`. For browsers that don't support `resultingClientId`\n* or if waiting for the resulting client to apper takes too long, resolve to\n* `undefined`.\n*\n* @param resultingClientId\n* @returns\n* @private\n*/\nasync function resultingClientExists(resultingClientId) {\n\tif (!resultingClientId) return;\n\tlet existingWindows = await self.clients.matchAll({ type: \"window\" });\n\tconst existingWindowIds = new Set(existingWindows.map((w) => w.id));\n\tlet resultingWindow;\n\tconst startTime = performance.now();\n\twhile (performance.now() - startTime < MAX_RETRY_TIME) {\n\t\texistingWindows = await self.clients.matchAll({ type: \"window\" });\n\t\tresultingWindow = existingWindows.find((w) => {\n\t\t\tif (resultingClientId) return w.id === resultingClientId;\n\t\t\treturn !existingWindowIds.has(w.id);\n\t\t});\n\t\tif (resultingWindow) break;\n\t\tawait timeout(100);\n\t}\n\treturn resultingWindow;\n}\n//#endregion\n//#region src/utils/canConstructReadableStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n* object.\n*\n* @returns `true`, if the current browser can successfully construct a `ReadableStream`, `false` otherwise.\n*\n* @private\n*/\nfunction canConstructReadableStream() {\n\tif (supportStatus === void 0) try {\n\t\tnew ReadableStream({ start() {} });\n\t\tsupportStatus = true;\n\t} catch {\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/utils/dontWaitFor.ts\n/**\n* A helper function that prevents a promise from being flagged as unused.\n*\n* @private\n*/\nfunction dontWaitFor(promise) {\n\tpromise.then(() => {});\n}\n//#endregion\nexport { canConstructReadableStream as n, resultingClientExists as r, dontWaitFor as t };\n\n//# sourceMappingURL=index.internal-Dxj9Ni9X.js.map","import { a as Deferred, c as timeout, d as finalAssertExports, f as SerwistError, i as executeQuotaErrorCallbacks, l as logger, m as cacheNames, n as clientsClaim, o as cacheMatchIgnoreParams, p as canConstructResponseFromBodyStream, r as cleanupOutdatedCaches, t as waitUntil, u as getFriendlyURL } from \"./chunks/waitUntil-BHDx3Rgo.js\";\nimport { n as canConstructReadableStream, r as resultingClientExists, t as dontWaitFor } from \"./chunks/index.internal-Dxj9Ni9X.js\";\nexport { Deferred, SerwistError, finalAssertExports as assert, cacheMatchIgnoreParams, canConstructReadableStream, canConstructResponseFromBodyStream, cleanupOutdatedCaches, clientsClaim, dontWaitFor, executeQuotaErrorCallbacks, getFriendlyURL, logger, cacheNames as privateCacheNames, resultingClientExists, timeout, waitUntil };\n","import { t as isCurrentPageOutOfScope } from \"./chunks/isCurrentPageOutOfScope-vi3IAsNY.js\";\nimport { Deferred, logger } from \"serwist/internal\";\n//#region src/messageSW.ts\n/**\n* Sends a data object to a service worker via `postMessage` and resolves with\n* a response (if any).\n*\n* A response can be sent by calling `event.ports[0].postMessage(...)`, which will\n* resolve the promise returned by `messageSW()`. If no response is sent, the promise\n* will never resolve.\n*\n* @param sw The service worker to send the message to.\n* @param data An object to send to the service worker.\n* @returns\n*/\nconst messageSW = (sw, data) => {\n\treturn new Promise((resolve) => {\n\t\tconst messageChannel = new MessageChannel();\n\t\tmessageChannel.port1.onmessage = (event) => {\n\t\t\tresolve(event.data);\n\t\t};\n\t\tsw.postMessage(data, [messageChannel.port2]);\n\t});\n};\n//#endregion\n//#region src/utils/SerwistEvent.ts\n/**\n* A minimal `Event` subclass shim.\n* This doesn't *actually* subclass `Event` because not all browsers support\n* constructable `EventTarget`, and using a real `Event` will error.\n* @private\n*/\nvar SerwistEvent = class {\n\ttarget;\n\tsw;\n\toriginalEvent;\n\tisExternal;\n\tconstructor(type, props) {\n\t\tthis.type = type;\n\t\tObject.assign(this, props);\n\t}\n};\n//#endregion\n//#region src/utils/SerwistEventTarget.ts\n/**\n* A minimal `EventTarget` shim.\n* This is necessary because not all browsers support constructable\n* `EventTarget`, so using a real `EventTarget` will error.\n* @private\n*/\nvar SerwistEventTarget = class {\n\t_eventListenerRegistry = /* @__PURE__ */ new Map();\n\t/**\n\t* @param type\n\t* @param listener\n\t* @private\n\t*/\n\taddEventListener(type, listener) {\n\t\tthis._getEventListenersByType(type).add(listener);\n\t}\n\t/**\n\t* @param type\n\t* @param listener\n\t* @private\n\t*/\n\tremoveEventListener(type, listener) {\n\t\tthis._getEventListenersByType(type).delete(listener);\n\t}\n\t/**\n\t* @param event\n\t* @private\n\t*/\n\tdispatchEvent(event) {\n\t\tevent.target = this;\n\t\tconst listeners = this._getEventListenersByType(event.type);\n\t\tfor (const listener of listeners) listener(event);\n\t}\n\t/**\n\t* Returns a Set of listeners associated with the passed event type.\n\t* If no handlers have been registered, an empty Set is returned.\n\t*\n\t* @param type The event type.\n\t* @returns An array of handler functions.\n\t* @private\n\t*/\n\t_getEventListenersByType(type) {\n\t\tif (!this._eventListenerRegistry.has(type)) this._eventListenerRegistry.set(type, /* @__PURE__ */ new Set());\n\t\treturn this._eventListenerRegistry.get(type);\n\t}\n};\n//#endregion\n//#region src/utils/urlsMatch.ts\n/**\n* Returns true if two URLs have the same `.href` property. The URLs can be\n* relative, and if they are the current location href is used to resolve URLs.\n*\n* @private\n* @param url1\n* @param url2\n* @returns\n*/\nfunction urlsMatch(url1, url2) {\n\tconst { href } = location;\n\treturn new URL(url1, href).href === new URL(url2, href).href;\n}\n//#endregion\n//#region src/Serwist.ts\nconst WAITING_TIMEOUT_DURATION = 200;\nconst REGISTRATION_TIMEOUT_DURATION = 6e4;\nconst SKIP_WAITING_MESSAGE = { type: \"SKIP_WAITING\" };\n/**\n* A class to aid in handling service worker registration, updates, and\n* reacting to service worker lifecycle events.\n*\n* @fires `@serwist/window.Serwist.message`\n* @fires `@serwist/window.Serwist.installed`\n* @fires `@serwist/window.Serwist.waiting`\n* @fires `@serwist/window.Serwist.controlling`\n* @fires `@serwist/window.Serwist.activated`\n* @fires `@serwist/window.Serwist.redundant`\n*/\nvar Serwist = class extends SerwistEventTarget {\n\t_scriptURL;\n\t_registerOptions = {};\n\t_updateFoundCount = 0;\n\t_swDeferred = new Deferred();\n\t_activeDeferred = new Deferred();\n\t_controllingDeferred = new Deferred();\n\t_registrationTime = 0;\n\t_isUpdate;\n\t_compatibleControllingSW;\n\t_registration;\n\t_sw;\n\t_ownSWs = /* @__PURE__ */ new Set();\n\t_externalSW;\n\t_waitingTimeout;\n\t/**\n\t* Creates a new Serwist instance with a script URL and service worker\n\t* options. The script URL and options are the same as those used when\n\t* calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n\t*\n\t* @param scriptURL The service worker script associated with this instance. Using a\n\t* [`TrustedScriptURL`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedScriptURL) is supported.\n\t* @param registerOptions The service worker options associated with this instance.\n\t*/\n\tconstructor(scriptURL, registerOptions = {}) {\n\t\tsuper();\n\t\tthis._scriptURL = scriptURL;\n\t\tthis._registerOptions = registerOptions;\n\t\tnavigator.serviceWorker.addEventListener(\"message\", this._onMessage);\n\t}\n\t/**\n\t* Registers a service worker for this instances script URL and service\n\t* worker options. By default this method delays registration until after\n\t* the window has loaded.\n\t*\n\t* @param options\n\t*/\n\tasync register({ immediate = false } = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (this._registrationTime) {\n\t\t\t\tlogger.error(\"Cannot re-register a Serwist instance after it has been registered. Create a new instance instead.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!immediate && document.readyState !== \"complete\") await new Promise((res) => window.addEventListener(\"load\", res));\n\t\tthis._isUpdate = Boolean(navigator.serviceWorker.controller);\n\t\tthis._compatibleControllingSW = this._getControllingSWIfCompatible();\n\t\tthis._registration = await this._registerScript();\n\t\tif (this._compatibleControllingSW) {\n\t\t\tthis._sw = this._compatibleControllingSW;\n\t\t\tthis._activeDeferred.resolve(this._compatibleControllingSW);\n\t\t\tthis._controllingDeferred.resolve(this._compatibleControllingSW);\n\t\t\tthis._compatibleControllingSW.addEventListener(\"statechange\", this._onStateChange, { once: true });\n\t\t}\n\t\tconst waitingSW = this._registration.waiting;\n\t\tif (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n\t\t\tthis._sw = waitingSW;\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tthis.dispatchEvent(new SerwistEvent(\"waiting\", {\n\t\t\t\t\tsw: waitingSW,\n\t\t\t\t\twasWaitingBeforeRegister: true\n\t\t\t\t}));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(\"A service worker was already waiting to activate before this script was registered...\");\n\t\t\t});\n\t\t}\n\t\tif (this._sw) {\n\t\t\tthis._swDeferred.resolve(this._sw);\n\t\t\tthis._ownSWs.add(this._sw);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.log(\"Successfully registered service worker.\", this._scriptURL.toString());\n\t\t\tif (navigator.serviceWorker.controller) if (this._compatibleControllingSW) logger.debug(\"A service worker with the same script URL is already controlling this page.\");\n\t\t\telse logger.debug(\"A service worker with a different script URL is currently controlling the page. The browser is now fetching the new script now...\");\n\t\t\tif (isCurrentPageOutOfScope(this._registerOptions.scope || this._scriptURL.toString())) logger.warn(\"The current page is not in scope for the registered service worker. Was this a mistake?\");\n\t\t}\n\t\tthis._registration.addEventListener(\"updatefound\", this._onUpdateFound);\n\t\tnavigator.serviceWorker.addEventListener(\"controllerchange\", this._onControllerChange);\n\t\treturn this._registration;\n\t}\n\t/**\n\t* Checks for updates of the registered service worker.\n\t*/\n\tasync update() {\n\t\tif (!this._registration) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(\"Cannot update a Serwist instance without being registered. Register the Serwist instance first.\");\n\t\t\treturn;\n\t\t}\n\t\tawait this._registration.update();\n\t}\n\t/**\n\t* Resolves to the service worker registered by this instance as soon as it\n\t* is active. If a service worker was already controlling at registration\n\t* time then it will resolve to that if the script URLs (and optionally\n\t* script versions) match, otherwise it will wait until an update is found\n\t* and activates.\n\t*\n\t* @returns\n\t*/\n\tget active() {\n\t\treturn this._activeDeferred.promise;\n\t}\n\t/**\n\t* Resolves to the service worker registered by this instance as soon as it\n\t* is controlling the page. If a service worker was already controlling at\n\t* registration time then it will resolve to that if the script URLs (and\n\t* optionally script versions) match, otherwise it will wait until an update\n\t* is found and starts controlling the page.\n\t* Note: the first time a service worker is installed it will active but\n\t* not start controlling the page unless `clients.claim()` is called in the\n\t* service worker.\n\t*\n\t* @returns\n\t*/\n\tget controlling() {\n\t\treturn this._controllingDeferred.promise;\n\t}\n\t/**\n\t* Resolves with a reference to a service worker that matches the script URL\n\t* of this instance, as soon as it's available.\n\t*\n\t* If, at registration time, there's already an active or waiting service\n\t* worker with a matching script URL, it will be used (with the waiting\n\t* service worker taking precedence over the active service worker if both\n\t* match, since the waiting service worker would have been registered more\n\t* recently).\n\t* If there's no matching active or waiting service worker at registration\n\t* time then the promise will not resolve until an update is found and starts\n\t* installing, at which point the installing service worker is used.\n\t*\n\t* @returns\n\t*/\n\tgetSW() {\n\t\treturn this._sw !== void 0 ? Promise.resolve(this._sw) : this._swDeferred.promise;\n\t}\n\t/**\n\t* Sends the passed data object to the service worker registered by this\n\t* instance (via `getSW`) and resolves with a response (if any).\n\t*\n\t* A response can be sent by calling `event.ports[0].postMessage(...)`, which will\n\t* resolve the promise returned by `messageSW()`. If no response is sent, the promise\n\t* will never resolve.\n\t*\n\t* @param data An object to send to the service worker\n\t* @returns\n\t*/\n\tasync messageSW(data) {\n\t\treturn messageSW(await this.getSW(), data);\n\t}\n\t/**\n\t* Sends a `{ type: \"SKIP_WAITING\" }` message to the service worker that is\n\t* currently waiting and associated with the current registration.\n\t*\n\t* If there is no current registration, or no service worker is waiting,\n\t* calling this will have no effect.\n\t*/\n\tmessageSkipWaiting() {\n\t\tif (this._registration?.waiting) messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n\t}\n\t/**\n\t* Checks for a service worker already controlling the page and returns\n\t* it if its script URL matches.\n\t*\n\t* @private\n\t* @returns\n\t*/\n\t_getControllingSWIfCompatible() {\n\t\tconst controller = navigator.serviceWorker.controller;\n\t\tif (controller && urlsMatch(controller.scriptURL, this._scriptURL.toString())) return controller;\n\t}\n\t/**\n\t* Registers a service worker for this instances script URL and register\n\t* options and tracks the time registration was complete.\n\t*\n\t* @private\n\t*/\n\tasync _registerScript() {\n\t\ttry {\n\t\t\tconst reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n\t\t\tthis._registrationTime = performance.now();\n\t\t\treturn reg;\n\t\t} catch (error) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onUpdateFound = (originalEvent) => {\n\t\tconst registration = this._registration;\n\t\tconst installingSW = registration.installing;\n\t\tconst updateLikelyTriggeredExternally = this._updateFoundCount > 0 || !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) || performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION;\n\t\tif (updateLikelyTriggeredExternally) {\n\t\t\tthis._externalSW = installingSW;\n\t\t\tregistration.removeEventListener(\"updatefound\", this._onUpdateFound);\n\t\t} else {\n\t\t\tthis._sw = installingSW;\n\t\t\tthis._ownSWs.add(installingSW);\n\t\t\tthis._swDeferred.resolve(installingSW);\n\t\t\tif (process.env.NODE_ENV !== \"production\") if (this._isUpdate) logger.log(\"Updated service worker found. Installing now...\");\n\t\t\telse logger.log(\"Service worker is installing...\");\n\t\t}\n\t\tthis.dispatchEvent(new SerwistEvent(\"installing\", {\n\t\t\tsw: installingSW,\n\t\t\toriginalEvent,\n\t\t\tisExternal: updateLikelyTriggeredExternally,\n\t\t\tisUpdate: this._isUpdate\n\t\t}));\n\t\t++this._updateFoundCount;\n\t\tinstallingSW.addEventListener(\"statechange\", this._onStateChange);\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onStateChange = (originalEvent) => {\n\t\tconst registration = this._registration;\n\t\tconst sw = originalEvent.target;\n\t\tconst { state } = sw;\n\t\tconst isExternal = sw === this._externalSW;\n\t\tconst eventProps = {\n\t\t\tsw,\n\t\t\tisExternal,\n\t\t\toriginalEvent\n\t\t};\n\t\tif (!isExternal && this._isUpdate) eventProps.isUpdate = true;\n\t\tthis.dispatchEvent(new SerwistEvent(state, eventProps));\n\t\tif (state === \"installed\") this._waitingTimeout = self.setTimeout(() => {\n\t\t\tif (state === \"installed\" && registration.waiting === sw) {\n\t\t\t\tthis.dispatchEvent(new SerwistEvent(\"waiting\", eventProps));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") if (isExternal) logger.warn(\"An external service worker has installed but is waiting for this client to close before activating...\");\n\t\t\t\telse logger.warn(\"The service worker has installed but is waiting for existing clients to close before activating...\");\n\t\t\t}\n\t\t}, WAITING_TIMEOUT_DURATION);\n\t\telse if (state === \"activating\") {\n\t\t\tclearTimeout(this._waitingTimeout);\n\t\t\tif (!isExternal) this._activeDeferred.resolve(sw);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") switch (state) {\n\t\t\tcase \"installed\":\n\t\t\t\tif (isExternal) logger.warn(\"An external service worker has installed. You may want to suggest users reload this page.\");\n\t\t\t\telse logger.log(\"Registered service worker installed.\");\n\t\t\t\tbreak;\n\t\t\tcase \"activated\":\n\t\t\t\tif (isExternal) logger.warn(\"An external service worker has activated.\");\n\t\t\t\telse {\n\t\t\t\t\tlogger.log(\"Registered service worker activated.\");\n\t\t\t\t\tif (sw !== navigator.serviceWorker.controller) logger.warn(\"The registered service worker is active but not yet controlling the page. Reload or run `clients.claim()` in the service worker.\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"redundant\":\n\t\t\t\tif (sw === this._compatibleControllingSW) logger.log(\"Previously controlling service worker now redundant!\");\n\t\t\t\telse if (!isExternal) logger.log(\"Registered service worker now redundant!\");\n\t\t\t\tbreak;\n\t\t}\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onControllerChange = (originalEvent) => {\n\t\tconst sw = this._sw;\n\t\tconst isExternal = sw !== navigator.serviceWorker.controller;\n\t\tthis.dispatchEvent(new SerwistEvent(\"controlling\", {\n\t\t\tisExternal,\n\t\t\toriginalEvent,\n\t\t\tsw,\n\t\t\tisUpdate: this._isUpdate\n\t\t}));\n\t\tif (!isExternal) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Registered service worker now controlling this page.\");\n\t\t\tthis._controllingDeferred.resolve(sw);\n\t\t}\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onMessage = async (originalEvent) => {\n\t\tconst { data, ports, source } = originalEvent;\n\t\tawait this.getSW();\n\t\tif (this._ownSWs.has(source)) this.dispatchEvent(new SerwistEvent(\"message\", {\n\t\t\tdata,\n\t\t\toriginalEvent,\n\t\t\tports,\n\t\t\tsw: source\n\t\t}));\n\t};\n};\n/**\n* The `message` event is dispatched any time a `postMessage` is received.\n*\n* @event workbox-window.Workbox#message\n* @type {SerwistEvent}\n* @property {*} data The `data` property from the original `message` event.\n* @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n* event.\n* @property {string} type `message`.\n* @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `installed` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n* changes to `installed`.\n*\n* Then can happen either the very first time a service worker is installed,\n* or after an update to the current service worker is found. In the case\n* of an update being found, the event's `isUpdate` property will be `true`.\n*\n* @event workbox-window.Workbox#installed\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `installed`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `waiting` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n* changes to `installed` and then doesn't immediately change to `activating`.\n* It may also be dispatched if a service worker with the same\n* [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n* was already waiting when the {@link workbox-window.Workbox#register}\n* method was called.\n*\n* @event workbox-window.Workbox#waiting\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event|undefined} originalEvent The original\n* [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event, or `undefined` in the case where the service worker was waiting\n* to before `.register()` was called.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n* a matching `scriptURL` was already waiting when this `Workbox`\n* instance called `register()`.\n* @property {string} type `waiting`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `controlling` event is dispatched if a\n* [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n* fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n* and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n* of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n* matches the `scriptURL` of the `Workbox` instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n*\n* @event workbox-window.Workbox#controlling\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this service worker was registered.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `controlling`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `activated` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n* changes to `activated`.\n*\n* @event workbox-window.Workbox#activated\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `activated`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `redundant` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n* changes to `redundant`.\n*\n* @event workbox-window.Workbox#redundant\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {string} type `redundant`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `installing` event is dispatched if the service worker\n* finds the new version and starts installing.\n*\n* @event workbox-window.Workbox#installing\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The installing service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {string} type `installing`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n//#endregion\nexport { Serwist, SerwistEvent, messageSW };\n\n//# sourceMappingURL=index.mjs.map","//#region src/utils/isCurrentPageOutOfScope.ts\nconst isCurrentPageOutOfScope = (scope) => {\n\tconst scopeURL = new URL(scope, document.baseURI);\n\tconst scopeURLBasePath = new URL(\"./\", scopeURL.href).pathname;\n\treturn !location.pathname.startsWith(scopeURLBasePath);\n};\n//#endregion\nexport { isCurrentPageOutOfScope as t };\n\n//# sourceMappingURL=isCurrentPageOutOfScope-vi3IAsNY.js.map","import { Serwist } from \"@serwist/window\";\nimport { isCurrentPageOutOfScope } from \"@serwist/window/internal\";\n//#region src/sw-entry.ts\nif (typeof window !== \"undefined\" && \"serviceWorker\" in navigator && typeof caches !== \"undefined\") {\n\tconst scope = self.__SERWIST_SW_ENTRY.scope;\n\tlet swEntryWorker;\n\tif (self.__SERWIST_SW_ENTRY.swEntryWorker) swEntryWorker = new Worker(self.__SERWIST_SW_ENTRY.swEntryWorker);\n\twindow.serwist = new Serwist(window.location.origin + self.__SERWIST_SW_ENTRY.sw, { scope });\n\tif (self.__SERWIST_SW_ENTRY.register && !isCurrentPageOutOfScope(scope)) window.serwist.register();\n\tif (self.__SERWIST_SW_ENTRY.cacheOnNavigation) {\n\t\tconst cacheOnNavigation = async (url) => {\n\t\t\tif (!window.navigator.onLine || !url) return;\n\t\t\tswEntryWorker?.postMessage({\n\t\t\t\ttype: \"__FRONTEND_NAV_CACHE__\",\n\t\t\t\turl\n\t\t\t});\n\t\t};\n\t\tconst pushState = history.pushState;\n\t\thistory.pushState = (...args) => {\n\t\t\tpushState.apply(history, args);\n\t\t\tcacheOnNavigation(args[2]);\n\t\t};\n\t\tconst replaceState = history.replaceState;\n\t\thistory.replaceState = (...args) => {\n\t\t\treplaceState.apply(history, args);\n\t\t\tcacheOnNavigation(args[2]);\n\t\t};\n\t\twindow.addEventListener(\"online\", () => {\n\t\t\tcacheOnNavigation(window.location.pathname);\n\t\t});\n\t}\n\tif (self.__SERWIST_SW_ENTRY.reloadOnOnline) window.addEventListener(\"online\", () => location.reload());\n}\n//#endregion\nexport {};\n\n//# sourceMappingURL=sw-entry.mjs.map","/* (ignored) */","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var n=e;Object.defineProperty(n,\"__esModule\",{value:true});n.pathToRegexp=n.tokensToRegexp=n.regexpToFunction=n.match=n.tokensToFunction=n.compile=n.parse=void 0;function lexer(e){var n=[];var r=0;while(r<e.length){var t=e[r];if(t===\"*\"||t===\"+\"||t===\"?\"){n.push({type:\"MODIFIER\",index:r,value:e[r++]});continue}if(t===\"\\\\\"){n.push({type:\"ESCAPED_CHAR\",index:r++,value:e[r++]});continue}if(t===\"{\"){n.push({type:\"OPEN\",index:r,value:e[r++]});continue}if(t===\"}\"){n.push({type:\"CLOSE\",index:r,value:e[r++]});continue}if(t===\":\"){var a=\"\";var i=r+1;while(i<e.length){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError(\"Missing parameter name at \".concat(r));n.push({type:\"NAME\",index:r,value:a});r=i;continue}if(t===\"(\"){var c=1;var f=\"\";var i=r+1;if(e[i]===\"?\"){throw new TypeError('Pattern cannot start with \"?\" at '.concat(i))}while(i<e.length){if(e[i]===\"\\\\\"){f+=e[i++]+e[i++];continue}if(e[i]===\")\"){c--;if(c===0){i++;break}}else if(e[i]===\"(\"){c++;if(e[i+1]!==\"?\"){throw new TypeError(\"Capturing groups are not allowed at \".concat(i))}}f+=e[i++]}if(c)throw new TypeError(\"Unbalanced pattern at \".concat(r));if(!f)throw new TypeError(\"Missing pattern at \".concat(r));n.push({type:\"PATTERN\",index:r,value:f});r=i;continue}n.push({type:\"CHAR\",index:r,value:e[r++]})}n.push({type:\"END\",index:r,value:\"\"});return n}function parse(e,n){if(n===void 0){n={}}var r=lexer(e);var t=n.prefixes,a=t===void 0?\"./\":t,i=n.delimiter,o=i===void 0?\"/#?\":i;var c=[];var f=0;var u=0;var p=\"\";var tryConsume=function(e){if(u<r.length&&r[u].type===e)return r[u++].value};var mustConsume=function(e){var n=tryConsume(e);if(n!==undefined)return n;var t=r[u],a=t.type,i=t.index;throw new TypeError(\"Unexpected \".concat(a,\" at \").concat(i,\", expected \").concat(e))};var consumeText=function(){var e=\"\";var n;while(n=tryConsume(\"CHAR\")||tryConsume(\"ESCAPED_CHAR\")){e+=n}return e};var isSafe=function(e){for(var n=0,r=o;n<r.length;n++){var t=r[n];if(e.indexOf(t)>-1)return true}return false};var safePattern=function(e){var n=c[c.length-1];var r=e||(n&&typeof n===\"string\"?n:\"\");if(n&&!r){throw new TypeError('Must have text between two parameters, missing text after \"'.concat(n.name,'\"'))}if(!r||isSafe(r))return\"[^\".concat(escapeString(o),\"]+?\");return\"(?:(?!\".concat(escapeString(r),\")[^\").concat(escapeString(o),\"])+?\")};while(u<r.length){var v=tryConsume(\"CHAR\");var s=tryConsume(\"NAME\");var d=tryConsume(\"PATTERN\");if(s||d){var g=v||\"\";if(a.indexOf(g)===-1){p+=g;g=\"\"}if(p){c.push(p);p=\"\"}c.push({name:s||f++,prefix:g,suffix:\"\",pattern:d||safePattern(g),modifier:tryConsume(\"MODIFIER\")||\"\"});continue}var x=v||tryConsume(\"ESCAPED_CHAR\");if(x){p+=x;continue}if(p){c.push(p);p=\"\"}var h=tryConsume(\"OPEN\");if(h){var g=consumeText();var l=tryConsume(\"NAME\")||\"\";var m=tryConsume(\"PATTERN\")||\"\";var T=consumeText();mustConsume(\"CLOSE\");c.push({name:l||(m?f++:\"\"),pattern:l&&!m?safePattern(g):m,prefix:g,suffix:T,modifier:tryConsume(\"MODIFIER\")||\"\"});continue}mustConsume(\"END\")}return c}n.parse=parse;function compile(e,n){return tokensToFunction(parse(e,n),n)}n.compile=compile;function tokensToFunction(e,n){if(n===void 0){n={}}var r=flags(n);var t=n.encode,a=t===void 0?function(e){return e}:t,i=n.validate,o=i===void 0?true:i;var c=e.map((function(e){if(typeof e===\"object\"){return new RegExp(\"^(?:\".concat(e.pattern,\")$\"),r)}}));return function(n){var r=\"\";for(var t=0;t<e.length;t++){var i=e[t];if(typeof i===\"string\"){r+=i;continue}var f=n?n[i.name]:undefined;var u=i.modifier===\"?\"||i.modifier===\"*\";var p=i.modifier===\"*\"||i.modifier===\"+\";if(Array.isArray(f)){if(!p){throw new TypeError('Expected \"'.concat(i.name,'\" to not repeat, but got an array'))}if(f.length===0){if(u)continue;throw new TypeError('Expected \"'.concat(i.name,'\" to not be empty'))}for(var v=0;v<f.length;v++){var s=a(f[v],i);if(o&&!c[t].test(s)){throw new TypeError('Expected all \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix}continue}if(typeof f===\"string\"||typeof f===\"number\"){var s=a(String(f),i);if(o&&!c[t].test(s)){throw new TypeError('Expected \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix;continue}if(u)continue;var d=p?\"an array\":\"a string\";throw new TypeError('Expected \"'.concat(i.name,'\" to be ').concat(d))}return r}}n.tokensToFunction=tokensToFunction;function match(e,n){var r=[];var t=pathToRegexp(e,r,n);return regexpToFunction(t,r,n)}n.match=match;function regexpToFunction(e,n,r){if(r===void 0){r={}}var t=r.decode,a=t===void 0?function(e){return e}:t;return function(r){var t=e.exec(r);if(!t)return false;var i=t[0],o=t.index;var c=Object.create(null);var _loop_1=function(e){if(t[e]===undefined)return\"continue\";var r=n[e-1];if(r.modifier===\"*\"||r.modifier===\"+\"){c[r.name]=t[e].split(r.prefix+r.suffix).map((function(e){return a(e,r)}))}else{c[r.name]=a(t[e],r)}};for(var f=1;f<t.length;f++){_loop_1(f)}return{path:i,index:o,params:c}}}n.regexpToFunction=regexpToFunction;function escapeString(e){return e.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g,\"\\\\$1\")}function flags(e){return e&&e.sensitive?\"\":\"i\"}function regexpToRegexp(e,n){if(!n)return e;var r=/\\((?:\\?<(.*?)>)?(?!\\?)/g;var t=0;var a=r.exec(e.source);while(a){n.push({name:a[1]||t++,prefix:\"\",suffix:\"\",modifier:\"\",pattern:\"\"});a=r.exec(e.source)}return e}function arrayToRegexp(e,n,r){var t=e.map((function(e){return pathToRegexp(e,n,r).source}));return new RegExp(\"(?:\".concat(t.join(\"|\"),\")\"),flags(r))}function stringToRegexp(e,n,r){return tokensToRegexp(parse(e,r),n,r)}function tokensToRegexp(e,n,r){if(r===void 0){r={}}var t=r.strict,a=t===void 0?false:t,i=r.start,o=i===void 0?true:i,c=r.end,f=c===void 0?true:c,u=r.encode,p=u===void 0?function(e){return e}:u,v=r.delimiter,s=v===void 0?\"/#?\":v,d=r.endsWith,g=d===void 0?\"\":d;var x=\"[\".concat(escapeString(g),\"]|$\");var h=\"[\".concat(escapeString(s),\"]\");var l=o?\"^\":\"\";for(var m=0,T=e;m<T.length;m++){var E=T[m];if(typeof E===\"string\"){l+=escapeString(p(E))}else{var w=escapeString(p(E.prefix));var y=escapeString(p(E.suffix));if(E.pattern){if(n)n.push(E);if(w||y){if(E.modifier===\"+\"||E.modifier===\"*\"){var R=E.modifier===\"*\"?\"?\":\"\";l+=\"(?:\".concat(w,\"((?:\").concat(E.pattern,\")(?:\").concat(y).concat(w,\"(?:\").concat(E.pattern,\"))*)\").concat(y,\")\").concat(R)}else{l+=\"(?:\".concat(w,\"(\").concat(E.pattern,\")\").concat(y,\")\").concat(E.modifier)}}else{if(E.modifier===\"+\"||E.modifier===\"*\"){throw new TypeError('Can not repeat \"'.concat(E.name,'\" without a prefix and suffix'))}l+=\"(\".concat(E.pattern,\")\").concat(E.modifier)}}else{l+=\"(?:\".concat(w).concat(y,\")\").concat(E.modifier)}}}if(f){if(!a)l+=\"\".concat(h,\"?\");l+=!r.endsWith?\"$\":\"(?=\".concat(x,\")\")}else{var A=e[e.length-1];var _=typeof A===\"string\"?h.indexOf(A[A.length-1])>-1:A===undefined;if(!a){l+=\"(?:\".concat(h,\"(?=\").concat(x,\"))?\")}if(!_){l+=\"(?=\".concat(h,\"|\").concat(x,\")\")}}return new RegExp(l,flags(r))}n.tokensToRegexp=tokensToRegexp;function pathToRegexp(e,n,r){if(e instanceof RegExp)return regexpToRegexp(e,n);if(Array.isArray(e))return arrayToRegexp(e,n,r);return stringToRegexp(e,n,r)}n.pathToRegexp=pathToRegexp})();module.exports=e})();","export const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found'\nexport const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error'\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`\n","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import type React from 'react'\nimport { Children, useEffect, useLayoutEffect, type JSX } from 'react'\n\ntype State = JSX.Element[] | undefined\n\nexport type SideEffectProps = {\n reduceComponentsToState: (components: Array<React.ReactElement<any>>) => State\n handleStateChange?: (state: State) => void\n headManager: any\n children: React.ReactNode\n}\n\nconst isServer = typeof window === 'undefined'\nconst useClientOnlyLayoutEffect = isServer ? () => {} : useLayoutEffect\nconst useClientOnlyEffect = isServer ? () => {} : useEffect\n\nexport default function SideEffect(props: SideEffectProps) {\n const { headManager, reduceComponentsToState } = props\n\n function emitChange() {\n if (headManager && headManager.mountedInstances) {\n const headElements = Children.toArray(\n Array.from(headManager.mountedInstances as Set<React.ReactNode>).filter(\n Boolean\n )\n ) as React.ReactElement[]\n headManager.updateHead(reduceComponentsToState(headElements))\n }\n }\n\n if (isServer) {\n headManager?.mountedInstances?.add(props.children)\n emitChange()\n }\n\n useClientOnlyLayoutEffect(() => {\n headManager?.mountedInstances?.add(props.children)\n return () => {\n headManager?.mountedInstances?.delete(props.children)\n }\n })\n\n // We need to call `updateHead` method whenever the `SideEffect` is trigger in all\n // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s\n // being rendered, we only trigger the method from the last one.\n // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`\n // singleton in the layout effect pass, and actually trigger it in the effect pass.\n useClientOnlyLayoutEffect(() => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n return () => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n }\n })\n\n useClientOnlyEffect(() => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n return () => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n }\n })\n\n return null\n}\n"],"names":["interceptionPrefixFromParamType","paramType","safeCompile","safePathToRegexp","safeRegexpToFunction","safeRouteMatcher","route","keys","options","pathToRegexp","needsNormalization","hasAdjacentParameterIssues","routeToUse","normalizeAdjacentParameters","error","normalizedRoute","retryError","compiler","compile","params","stripNormalizedSeparators","regexp","originalMatcher","regexpToFunction","pathname","result","stripParameterSeparators","matcherFn","MODERN_BROWSERSLIST_TARGET","module","exports","getSortedRouteObjects","getSortedRoutes","isDynamicRoute","emitter","hydrate","initialize","router","version","process","env","__NEXT_VERSION","mitt","looseToArray","input","slice","call","initialData","defaultLocale","undefined","asPath","pageLoader","appElement","headManager","initialMatchesMiddleware","lastAppProps","lastRenderReject","devClient","CachedApp","onPerfEntry","CachedComponent","Container","React","Component","componentDidCatch","componentErr","info","props","fn","componentDidMount","scrollToHash","isSsr","isFallback","nextExport","location","search","__NEXT_HAS_REWRITES","__N_SSG","replace","String","assign","urlQueryToSearchParams","query","URLSearchParams","_h","shallow","catch","err","cancelled","componentDidUpdate","hash","substring","el","document","getElementById","setTimeout","scrollIntoView","render","NODE_ENV","children","PagesDevOverlayBridge","require","opts","tracer","onSpanEnd","default","JSON","parse","textContent","window","__NEXT_DATA__","prefix","assetPrefix","self","__next_set_public_path__","getURL","hasBasePath","removeBasePath","__NEXT_I18N_SUPPORT","normalizeLocalePath","detectDomainLocale","parseRelativeUrl","formatUrl","locales","parsedAs","localePathResult","detectedLocale","locale","detectedDomain","__NEXT_I18N_DOMAINS","hostname","scriptLoader","initScriptLoader","PageLoader","buildId","register","r","f","routeLoader","onEntrypoint","__NEXT_P","map","p","push","initHeadManager","getIsSsr","renderApp","App","appProps","AppContainer","adaptedForAppRouter","useMemo","adaptForAppRouterInstance","renderError","console","AppRouterContext","Provider","value","SearchParamsContext","adaptForSearchParams","PathnameContextProviderAdapter","isAutoExport","autoExport","PathParamsContext","adaptForPathParams","RouterContext","makePublicRouterInstance","HeadManagerContext","ImageConfigContext","__NEXT_IMAGE_OPTS","wrapApp","wrappedAppProps","renderErrorProps","onUnrecoverableError","doRender","styleSheets","loadPage","then","page","ErrorComponent","errorModule","appModule","m","AppTree","appCtx","ctx","Promise","resolve","loadGetInitialProps","initProps","Head","callback","useLayoutEffect","performanceMarks","navigationStart","beforeRender","afterRender","afterHydrate","routeChange","performanceMeasures","hydration","beforeHydration","routeChangeToRender","reactRoot","shouldHydrate","clearMarks","forEach","mark","performance","markHydrateComplete","ST","hasBeforeRenderMark","getEntriesByName","length","beforeHydrationMeasure","measure","hydrationMeasure","startSpan","startTime","timeOrigin","attributes","end","duration","markRenderComplete","navStartEntries","name","clearMeasures","renderReactElement","domEl","reactEl","ReactDOM","hydrateRoot","onRecoverableError","startTransition","Root","callbacks","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_AT","now","__NEXT_HYDRATED_CB","canceled","resolvePromise","renderPromise","reject","Error","onStart","currentStyleTags","querySelectorAll","currentHrefs","Set","tag","getAttribute","noscript","querySelector","nonce","href","text","has","styleTag","createElement","setAttribute","head","appendChild","createTextNode","onHeadCommit","TURBOPACK","desiredHrefs","s","idx","removeAttribute","referenceNode","targetTag","parentNode","insertBefore","nextSibling","removeChild","scroll","x","y","disableSmoothScrollDuringRouteTransition","scrollTo","onRootCommit","elem","Portal","type","RouteAnnouncer","__NEXT_STRICT_MODE","StrictMode","renderingProps","isHydratePass","renderErr","getProperError","initialErr","appEntrypoint","whenEntrypoint","component","app","mod","reportWebVitals","id","entryType","entries","attribution","uniqueID","Date","Math","floor","random","perfStartEntry","webVitals","label","pageEntrypoint","isValidElementType","getServerError","message","e","stack","errSource","source","isNextRouterError","__NEXT_PRELOADREADY","dynamicIds","createRouter","initialProps","Boolean","subscription","Object","domainLocales","isPreview","_initialMatchesMiddlewarePromise","renderCtx","initial","TEST_ROUTE","TEST_STRICT_ROUTE","strict","isInterceptionRouteAppPath","extractInterceptionRouteInformation","interceptedRoute","test","pagesRouter","back","forward","refresh","reload","hmrRefresh","prefetch","isReady","asPathToSearchParams","pathParams","routeRegex","getRouteRegex","groups","key","ref","useRef","current","url","URL","_","PathnameContext","omit","object","omitted","includes","constructor","createRouteLoader","promisedSsgManifest","__SSG_MANIFEST","__SSG_MANIFEST_CB","getPageList","getClientBuildManifest","manifest","sortedPages","__DEV_PAGES_MANIFEST","pages","promisedDevPagesManifest","fetch","DEV_CLIENT_PAGES_MANIFEST","credentials","res","json","log","getMiddleware","__NEXT_MIDDLEWARE_MATCHERS","middlewareMatchers","__MIDDLEWARE_MATCHERS","onClientMiddlewareManifest","cb","__MIDDLEWARE_MATCHERS_CB","resolvePromiseWithTimeout","markAssetError","__DEV_MIDDLEWARE_MATCHERS","promisedMiddlewareMatchers","DEV_CLIENT_MIDDLEWARE_MANIFEST","matchers","getDataHref","hrefPathname","asPathname","removeTrailingSlash","getHrefForSlug","path","dataRoute","getAssetPathFromRoute","addLocale","addBasePath","skipInterpolation","interpolateAs","_isSsg","loadRoute","styles","o","content","isAssetError","withFuture","generator","entry","get","future","resolver","prom","set","delete","ASSET_LOAD_ERROR","Symbol","defineProperty","hasPrefetch","link","MSInputMethodContext","documentMode","relList","supports","canPrefetch","prefetchViaDom","as","selector","rel","crossOrigin","__NEXT_CROSS_ORIGIN","onload","onerror","appendScript","src","script","body","devBuildPromise","__BUILD_MANIFEST","onBuildManifest","__BUILD_MANIFEST_CB","getFilesForRoute","scriptUrl","encodeURIPath","getAssetTokenQuery","scripts","__unsafeCreateTrustedScriptURL","css","allFiles","filter","v","endsWith","entrypoints","Map","loadedScripts","routes","maybeExecuteScript","toString","fetchStyleSheet","ok","execute","old","devBuildPromiseResolve","all","entrypoint","finally","cn","navigator","connection","saveData","effectiveType","output","requestIdleCallback","INTERCEPTION_ROUTE_MARKERS","split","find","segment","startsWith","interceptingRoute","marker","normalizeAppPath","concat","join","splitInterceptingRoute","createContext","displayName","BailoutToCSRError","isBailoutToCSRError","BAILOUT_TO_CSR","reason","digest","policy","getPolicy","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","isLocalURL","isAbsoluteUrl","locationOrigin","getLocationOrigin","resolved","origin","formatWithValidation","urlObjectKeys","slashedProtocols","urlObj","auth","protocol","host","encodeURIComponent","indexOf","port","querystring","slashes","warn","cancelIdleCallback","bind","start","didTimeout","timeRemaining","max","clearTimeout","Span","state","endTime","Tracer","handleSpanEnd","_emitter","on","off","span","emit","normalizePathTrailingSlash","__NEXT_MANUAL_TRAILING_SLASH","parsePath","__NEXT_TRAILING_SLASH","pathHasPrefix","ReadonlyURLSearchParams","ReadonlyURLSearchParamsError","append","sort","appGetInitialProps","pageProps","origGetInitialProps","getInitialProps","ext","denormalizePagePath","_page","normalizePathSep","basePath","__NEXT_ROUTER_BASEPATH","__NEXT_MANUAL_CLIENT_BASE_PATH","onlyHashChange","htmlElement","documentElement","hasDataAttribute","dataset","scrollBehavior","getComputedStyle","warnOnce","existing","style","dontForceLayout","getClientRects","handleClientScriptLoad","ScriptCache","LoadCache","insertStylesheets","stylesheets","preinit","stylesheet","loadScript","onLoad","onReady","dangerouslySetInnerHTML","strategy","onError","cacheKey","add","afterLoad","loadPromise","addEventListener","innerHTML","__html","Array","isArray","setAttributesFromProps","loadLazyScript","readyState","addBeforeInteractiveToCache","scriptLoaderItems","Script","restProps","updateScripts","appDir","useContext","hasOnReadyEffectCalled","hasLoadScriptEffectCalled","styleSrc","htmlEscapeJsonString","stringify","preload","integrity","getParamProperties","getSegmentParam","isCatchAll","interceptionMarker","paramName","repeat","optional","isInterceptionAppRoute","isNormalizedAppRoute","parseAppRoute","parseAppRouteSegment","normalizeEncodedDynamicPlaceholder","decodedSegment","decodeURIComponent","param","normalized","pathnameSegments","segments","normalizedSegment","appSegment","InvariantError","parts","dynamicSegments","HTML_LIMITED_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","getBotType","isBot","HEADLESS_BROWSER_BOT_UA_RE","isDomBotUA","userAgent","isHtmlLimitedBotUA","deploymentId","getDeploymentId","globalThis","NEXT_DEPLOYMENT_ID","removePathPrefix","withoutPrefix","PARAMETER_PATTERN","getDynamicParam","interpolateParallelRouteParams","parseMatchedParameter","parseParameter","getParamValue","interpolatedParams","segmentKey","fallbackRouteParams","searchValue","i","loaderTree","pagePath","interpolated","structuredClone","tree","depth","pop","parallelRoutes","parseLoaderTree","hasOwnProperty","paramValue","resolveParamValue","nextDepth","parallelRoute","values","dynamicParamType","staticSiblings","treeSegment","paramCacheKey","match","REDIRECT_ERROR_CODE","isRedirectError","errorCode","destination","status","at","statusCode","Number","isNaN","RedirectStatusCode","NavigationPromisesContext","createDevToolsInstrumentedPromise","promise","base","parseQuery","globalBase","resolvedBase","searchParams","searchParamsToUrlQuery","cache","WeakMap","lowercasedLocales","toLowerCase","index","escapeStringRegexp","reHasRegExp","reReplaceRegExp","str","compareAppPaths","normalizeRscURL","ensureLeadingSlash","reduce","isGroupSegment","a","b","aHasSlot","bHasSlot","localeCompare","formatNextPathnameInfo","ignorePrefix","trailingSlash","addPathSuffix","addPathPrefix","statusCodes","_getInitialProps","req","getRequestMeta","initUrl","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","lineHeight","h1","margin","paddingRight","fontSize","fontWeight","verticalAlign","h2","wrap","withDarkMode","title","div","className","reportGlobalError","reportError","ESCAPE_REGEX","htmlEscapeAttributeString","ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_REGEX","isJavaScriptURLString","isJavaScriptProtocol","stringifyUrlQueryParam","item","target","searchParamsList","file","compareRouterStates","stateKeys","queryKeys","j","queryKey","withRouter","ComposedComponent","WithRouterWrapper","useRouter","args","getAssetToken","suffix","getChunkScriptFilename","__webpack_require__","u","getChunkCssFilename","k","getMiniCssFilename","miniCssF","__webpack_public_path__","getObjectClassLabel","isPlainObject","prototype","getPrototypeOf","removeLocale","pathLower","localeLower","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isParallelRouteSegment","isPageSegment","stringifiedQuery","parallelRouteKey","rawSegment","first","segmentPath","node","segmentValue","UrlNode","insert","urlPath","_insert","smoosh","_smoosh","childrenPaths","slugName","splice","restSlugName","optionalRestSlugName","c","prev","curr","placeholder","unshift","urlPaths","slugNames","nextSegment","segmentName","isOptional","handleSlug","previousSlug","nextSlug","slug","normalizedPages","root","objects","getter","indexes","pathnames","sorted","nextjsRouteAnnouncerStyles","border","clip","overflow","padding","position","top","width","whiteSpace","wordWrap","routeAnnouncement","setRouteAnnouncement","useState","previouslyLoadedPath","pageHeader","innerText","aria-live","role","portalNode","setPortalNode","element","createPortal","HTTPAccessErrorStatus","HTTP_ERROR_FALLBACK_ERROR_CODE","getAccessFallbackErrorTypeByStatus","getAccessFallbackHTTPStatus","isHTTPAccessFallbackError","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","httpStatus","next","getDeploymentIdQuery","dplId","ampersand","NEXT_IMMUTABLE_ASSET_TOKEN","create","handler","evts","MS_MAX_IDLE_DELAY","devPromise","modules","layout","template","defaultPage","conventionPath","getRouteMatcher","re","rawMatcher","routeMatch","exec","decode","DecodeError","group","pos","Router","singletonRouter","readyCallbacks","ready","urlPropertyFields","routerEvents","coreMethodFields","events","getRouter","field","event","eventField","charAt","toUpperCase","_singletonRouter","isError","scopedRouter","instance","property","getNamedMiddlewareRegex","getNamedRouteRegex","getParametrizedRoute","includeSuffix","includePrefix","groupIndex","markerMatch","paramMatches","parameterizedRoute","excludeOptionalTrailingSlash","RegExp","buildGetSafeRouteKey","routeKey","fromCharCode","getSafeKeyFromSegment","getSafeRouteKey","routeKeys","keyPrefix","backreferenceDuplicateKeys","cleanedKey","invalidKey","parseInt","duplicateKey","interceptionPrefix","pattern","getNamedParametrizedRoute","prefixRouteKeys","reference","names","intercepted","inverseParts","hasInterceptionMarker","some","NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_QUERY_PARAM_PREFIX","namedParameterizedRoute","pathToRegexpPattern","namedRegex","catchAll","catchAllRegex","catchAllGroupedRegex","warnings","msg","getNextPathnameInfo","i18n","nextConfig","pathnameNoDataPrefix","paths","parseData","i18nProvider","analyze","isEqualNode","reactElementToDOM","oldTag","newTag","HTMLElement","cloneTag","cloneNode","updateElements","components","headEl","oldTags","metaCharset","newTags","isNew","tagName","prepend","mountedInstances","updateHead","tags","h","titleComponent","resolveHref","resolveAs","urlAsString","urlProtoMatch","urlAsStringNoProto","urlParts","normalizedUrl","normalizeRepeatedSlashes","baseBase","finalUrl","interpolatedAs","resolvedHref","defaultHead","meta","charSet","onlyReactElement","list","child","Fragment","Children","toArray","fragmentList","fragmentChild","METATYPES","unique","metaTypes","metaCategories","isUnique","hasKey","len","metatype","category","categories","reduceComponents","headChildrenElements","reverse","srcMessage","cloneElement","Effect","reduceComponentsToState","VALID_LOADERS","imageConfigDefault","deviceSizes","imageSizes","loader","loaderFile","domains","disableStaticImages","minimumCacheTTL","formats","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","dangerouslyAllowLocalIP","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","localPatterns","remotePatterns","qualities","unoptimized","customCacheHandler","BloomFilter","murmurhash2","charCodeAt","imul","DEFAULT_ERROR_RATE","numItems","errorRate","numBits","ceil","numHashes","bitArray","fill","from","items","export","data","NEXT_RUNTIME","filterData","gzipSize","sync","import","hashValues","getHashValues","contains","every","isRecoverableError","recoverableErrors","WeakSet","isInstantTest","__NEXT_EXPOSE_TESTING_API","__next_instant_test","cause","decorateDevError","causeError","required","lower","getParamValueFromSegment","pathSegment","processedSegments","hashIndex","queryIndex","hasQuery","MiddlewareNotFoundError","MissingStaticPage","NormalizeError","PageNotFoundError","SP","WEB_VITALS","execOnce","getDisplayName","isResSent","stringifyError","used","ABSOLUTE_URL_REGEX","finished","headersSent","urlNoQuery","method","code","createKey","matchesMiddleware","resolveRewrites","buildCancellationError","cleanedAs","asWithBasePathAndLocale","stripOrigin","prepareUrlAs","resolvedAs","hrefWasAbsolute","asWasAbsolute","preparedUrl","preparedAs","resolveDynamicRoute","cleanPathname","getMiddlewareData","response","rewriteHeader","headers","rewriteTarget","matchedPath","MATCHED_PATH_HEADER","__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE","parsedRewriteTarget","pathnameInfo","fsPathname","__rewrites","rewrites","parsedSource","matchedPage","resolvedPathname","matches","redirectTarget","newAs","newUrl","withMiddlewareEffects","fetchData","effect","dataHref","manualScrollRestoration","__NEXT_SCROLL_RESTORATION","history","sessionStorage","setItem","removeItem","n","SSG_DATA_NOT_FOUND","fetchRetry","attempts","tryToParseAsJSON","fetchNextData","inflightCache","isPrefetch","hasMiddleware","isServerRender","parseJSON","persistCache","isBackground","unstable_skipClientCache","getData","purpose","notFound","dplResponseHeader","NEXT_NAV_DEPLOYMENT_ID_HEADER","handleHardNavigation","getCancelledHandler","cancel","clc","handleCancelled","sdc","sbc","isFirstPopStateEvent","_key","onPopState","changeState","__NA","__N","forcedScroll","pageXOffset","pageYOffset","getItem","_bps","change","_shallow","__N_SSP","autoExportDynamic","sub","_wrapApp","isLocaleDomain","gssp","gip","isExperimentalCompile","appGip","gsp","_shouldResolveHref","scrollRestoration","_bfl","skipNavigate","__NEXT_CLIENT_ROUTER_FILTER_ENABLED","_bfl_s","_bfl_d","staticFilterData","dynamicFilterData","__routerFilterStatic","__routerFilterDynamic","routerFilterSValue","__NEXT_CLIENT_ROUTER_S_FILTER","routerFilterDValue","__NEXT_CLIENT_ROUTER_D_FILTER","matchesBflStatic","matchesBflDynamic","pathsToCheck","curAs","allowMatchCurrent","asNoSlash","asNoSlashLocale","normalizedAS","curAsParts","currentPart","isQueryUpdating","shouldResolveHref","nextState","readyStateChange","prevLocale","didNavigate","domain","asNoBasePath","http","routeProps","_inFlightRoute","localeChange","onlyAHashChange","parsed","urlIsNew","parsedAsPathname","__appRouter","isMiddlewareRewrite","isMiddlewareMatch","rewritesResult","externalDest","shouldInterpolate","missingParams","isErrorRoute","routeInfo","getRouteInfo","cleanedParsedPathname","prefixedAs","rewriteAs","localeResult","curRouteMatch","unstable_scriptLoader","__N_REDIRECT","__N_REDIRECT_BASE_PATH","parsedHref","__N_PREVIEW","notFoundRoute","fetchComponent","isNotFound","isValidShallowRoute","shouldScroll","resetScroll","upcomingScrollState","upcomingRouterState","canSkipUpdating","lang","hashRegex","handleRouteInfoError","loadErrorFail","gipErr","routeInfoErr","requestedRoute","existingInfo","cachedRouteInfo","fetchNextDataParams","resolvedRoute","isAPIRoute","wasBailedPrefetch","shouldFetchData","_getData","fetched","beforePopState","oldUrlNoHash","oldHash","newUrlNoHash","newHash","rawHash","idEl","nameEl","getElementsByName","urlPathname","originalPathname","__NEXT_MIDDLEWARE_PREFETCH","isSsg","priority","__NEXT_OPTIMISTIC_CLIENT_CACHE","componentResult","GlobalLayoutRouterContext","LayoutRouterContext","MissingSlotContext","TemplateContext","APP_CLIENT_INTERNALS","APP_PATHS_MANIFEST","APP_PATH_ROUTES_MANIFEST","AdapterOutputType","BARREL_OPTIMIZATION_PREFIX","BLOCKED_PAGES","BUILD_ID_FILE","BUILD_MANIFEST","CLIENT_PUBLIC_FILES_PATH","CLIENT_REFERENCE_MANIFEST","CLIENT_STATIC_FILES_PATH","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","COMPILER_INDEXES","COMPILER_NAMES","CONFIG_FILES","DEFAULT_RUNTIME_WEBPACK","DEFAULT_SANS_SERIF_FONT","DEFAULT_SERIF_FONT","DYNAMIC_CSS_MANIFEST","EDGE_RUNTIME_WEBPACK","EDGE_UNSUPPORTED_NODE_APIS","EXPORT_DETAIL","EXPORT_MARKER","FUNCTIONS_CONFIG_MANIFEST","IMAGES_MANIFEST","INTERCEPTION_ROUTE_REWRITE_MANIFEST","MIDDLEWARE_BUILD_MANIFEST","MIDDLEWARE_MANIFEST","MIDDLEWARE_REACT_LOADABLE_MANIFEST","NEXT_BUILTIN_DOCUMENT","NEXT_FONT_MANIFEST","PAGES_MANIFEST","PHASE_ANALYZE","PHASE_DEVELOPMENT_SERVER","PHASE_EXPORT","PHASE_INFO","PHASE_PRODUCTION_BUILD","PHASE_PRODUCTION_SERVER","PHASE_TEST","PREFETCH_HINTS","PRERENDER_MANIFEST","REACT_LOADABLE_MANIFEST","ROUTES_MANIFEST","RSC_MODULE_TYPES","SERVER_DIRECTORY","SERVER_FILES_MANIFEST","SERVER_PROPS_ID","SERVER_REFERENCE_MANIFEST","STATIC_PROPS_ID","STATIC_STATUS_PAGES","STRING_LITERAL_DROP_BUNDLE","SUBRESOURCE_INTEGRITY_MANIFEST","SYSTEM_ENTRYPOINTS","TRACE_OUTPUT_VERSION","TURBOPACK_CLIENT_BUILD_MANIFEST","TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST","TURBO_TRACE_DEFAULT_MEMORY_LIMIT","UNDERSCORE_GLOBAL_ERROR_ROUTE","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","client","server","edgeServer","features","typescript","xAvgCharWidth","azAvgWidth","unitsPerEm","interpolatedRoute","dynamicRegex","dynamicGroups","dynamicMatches","replaced","DOMAttributeNames","acceptCharset","htmlFor","httpEquiv","noModule","ignoreProps","isBooleanScriptAttribute","attr","SideEffect","isServer","useClientOnlyLayoutEffect","useClientOnlyEffect","emitChange","headElements","_pendingUpdate"],"sourceRoot":"","ignoreList":[17,23,27,46,67,79,92,102,104,105,106,107,108,109,110,111,114]}
|
|
1
|
+
{"version":3,"file":"static/chunks/main-3eb94471f04b2368.js","mappings":";;;;;;;;;;mEAEgBA;;;eAAAA;;;AAAT,SAASA,gCACdC,SAA4B;IAE5B,OAAQA;QACN,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL;YACE,OAAO;IACX;AACF;;;;;;;;;ACxBA;;;CAGC;;;;;;;;;;;;IA8DeC,WAAW;eAAXA;;IAtCAC,gBAAgB;eAAhBA;;IAoFAC,oBAAoB;eAApBA;;IAqBAC,gBAAgB;eAAhBA;;;0CArHT;oDAMA;AAMA,SAASF,iBACdG,KAA+C,EAC/CC,IAAY,EACZC,OAA8C;IAE9C,IAAI,OAAOF,UAAU,UAAU;QAC7B,OAAOG,CAAAA,GAAAA,cAAAA,YAAAA,EAAaH,OAAOC,MAAMC;IACnC;IAEA,wDAAwD;IACxD,MAAME,qBAAqBC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;;;;;;;;2CCHA;;;eAAqBlZ;;;;;4EAjCH;mCAWkB;AAUpC;;;CAGC,GACD,eAAeqZ,mBAAmB,EAChCze,SAAS,EACT0H,GAAG,EACQ;IACX,MAAMgX,YAAY,MAAM7W,CAAAA,GAAAA,OAAAA,mBAAAA,EAAoB7H,WAAW0H;IACvD,OAAO;QAAEgX;IAAU;AACrB;AAEe,MAAMtZ,YAAsCrF,OAAAA,OAAK,CAACC,SAAS;;aAIjE2e,mBAAAA,GAAsBF;;;aACtBG,eAAAA,GAAkBH;;IAEzBvc,SAAS;QACP,MAAM,EAAElC,SAAS,EAAE0e,SAAS,EAAE,GAAG,IAAI,CAACte,KAAK;QAE3C,qBAAO,qBAACJ,WAAAA;YAAW,GAAG0e,SAAS;;IACjC;AACF;;;;;;;;;;;;;;;;AC7Ca;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CAOL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,IAAI;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mEAAmE,gBAAgB;AACnF;AACA,gEAAgE,gBAAgB;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,6CAA6C,gBAAgB;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,gBAAgB;AACxE,UAAU;AACV;AACA,oGAAoG,gBAAgB;AACpH,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC1GA,uFAAuF;AACvF,0EAA0E;;;;;2CA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C,EAAE6sC,SAAS,CAAC,CAAC;QAChD;QACA,IAAI/vB,UAAU,CAACxB,MAAMC,OAAO,CAACvb,QAAQA,QAAQ;YAACA;SAAM;QAEpD,OACG+c,CAAAA,YAAYQ,SAASqvB,cAAAA,CAAa,IACnC,6CAA6C;SAC5CH,oBACCA,kBAAmBxxC,OAAO,CACxB4xC,UACA/vB,SACK9c,MACEhB,GAAG,CACF,uDAAuD;QAEvD,kDAAkD;QAClD,oCAAoC;QACpC,CAACwV,UAAYmC,mBAAmBnC,UAEjCM,IAAI,CAAC,OACR6B,mBAAmB3W,WACpB,IAAE;IAEb,IACA;QACAysC,oBAAoB,GAAG,mCAAmC;;IAE1D,uEAAuE;IACvE,kDAAkD;IACpD;IACA,OAAO;QACLn1C;QACAM,QAAQ60C;IACV;AACF;;;;;;;;;ACnEa;AACb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,MAAM,CA8DL;AACD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AACD;AACA,6CAA6C;AAC7C,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,oBAAoB;AACnE;AACA,0CAA0C,eAAe;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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CAAwC,aAAa;AACrD,6BAA6B,IAAI,qBAAqB,OAAO;AAC7D,EAAE;AACF,kCAAkC,KAAK;AACvC,2CAA2C,IAAI;AAC/C,EAAE;AACF,mBAAmB,YAAY;AAC/B,mEAAmE,IAAI;AACvE,oDAAoD,MAAM;AAC1D;AACA,EAAE;AACF,+BAA+B,aAAa;AAC5C,wCAAwC,IAAI,UAAU,oCAAoC,OAAO,SAAS;AAC1G,EAAE;AACF,yBAAyB,KAAK;AAC9B,sCAAsC,IAAI;AAC1C,EAAE;AACF,iDAAiD,KAAK;AACtD,2FAA2F,KAAK;AAChG,EAAE;AACF,8BAA8B,gBAAgB;AAC9C,mDAAmD,WAAW,MAAM,IAAI;AACxE,EAAE;AACF,kCAAkC,QAAQ;AAC1C,6HAA6H,OAAO;AACpI,EAAE;AACF,6BAA6B,MAAM;AACnC,2EAA2E,KAAK;AAChF,2CAA2C,SAAS;AACpD,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,qBAAqB;AACzD;AACA;AACA,6CAA6C;AAC7C;AACA,mEAAmE,KAAK;AACxE;AACA;AACA,yBAAyB,KAAqC,cAAc,CAAiB;AAC7F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,4BAA4B;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,KAAqC,UAAU,CAOzE;AACD;AACA;AACA;AACA,wEAAwE,gBAAgB;AACxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,KAAoE,UAAU,CAqCzF;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,0BAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,KAAqC,EAAE,EAAqF;AACjI;AACA;AACA,MAAM,KAAqC,EAAE,EAAqC;AAClF;AACA,KAAK,KAAqC,EAAE,EAA0C;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAE1C;AACJ,GAAG;AACH,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACsU;;AAEtU;;ACreuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD,gBAAgB;AACrE;AACA;AACA;AACA;AACA,kDAAkD,gBAAgB;AAClE;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,qCAAa;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,qCAAa;AAClB,uBAAuB,YAAY;AACnC,EAAE,qCAAa;AACf,GAAG;AACH,EAAE,qCAAa;AACf;AACA,QAAQ,qCAAa;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;AACA;AACyF;;AAEzF;;AChEkV;AAC9M;AACsM;;;ACF9O;AACxC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,OAAO;AAChB;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,QAAQ;AAC3B,uBAAuB,QAAQ;AAC/B,4BAA4B,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,oBAAoB,IAAI;AAC1C,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wFAAwF,YAAY;AACpG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,QAAQ,KAAqC,EAAE,EAAqG;AACpJ,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAK1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EAAgH;AAC9J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAc,sBAAsB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ,OAAO,KAAqC,EAAE,EAAoB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA,OAAO,KAAqC,EAAE,EACQ;AACtD;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ,KAAqC,EAAE,EAC4E;AAC3H;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,MAAM,KAAqC,EAAE,EAgB1C;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,OAAO,KAAqC,EAAE,EAAmE;AACjH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU,sBAAsB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,SA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AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA,MAAM;AACN;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,wBAAwB,sBAAsB;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB;AACtB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,sCAAsC;;AAEtC;AACA;AACA;;AAEA,4BAA4B;AAC5B;AACA;AACA;AACA,6BAA6B;;;;;;;;;;;;;2CCvK7B;;;eAAwBkpC;;;mCAfuC;AAW/D,MAAMC,WAAW,OAAOvwC,MAAW;AACnC,MAAMwwC,4BAA4BD,WAAW,KAAO,IAAIprC,OAAAA,eAAe;AACvE,MAAMsrC,sBAAsBF,WAAW,KAAO,IAAIvoC,OAAAA,SAAS;AAE5C,SAASsoC,WAAWhzC,KAAsB;IACvD,MAAM,EAAEd,WAAW,EAAE68B,uBAAuB,EAAE,GAAG/7B;IAEjD,SAASozC;QACP,IAAIl0C,eAAeA,YAAYi6B,gBAAgB,EAAE;YAC/C,MAAMka,eAAe1Y,OAAAA,QAAQ,CAACC,OAAO,CACnC5Z,MAAMkd,IAAI,CAACh/B,YAAYi6B,gBAAgB,EAA0B5gB,MAAM,CACrEpI;YAGJjR,YAAYk6B,UAAU,CAAC2C,wBAAwBsX;QACjD;IACF;IAEA,IAAIJ,UAAU;QACZ/zC,aAAai6B,kBAAkBzY,IAAI1gB,MAAMgC,QAAQ;QACjDoxC;IACF;IAEAF,0BAA0B;QACxBh0C,aAAai6B,kBAAkBzY,IAAI1gB,MAAMgC,QAAQ;QACjD,OAAO;YACL9C,aAAai6B,kBAAkB/iB,OAAOpW,MAAMgC,QAAQ;QACtD;IACF;IAEA,kFAAkF;IAClF,oFAAoF;IACpF,gEAAgE;IAChE,qFAAqF;IACrF,mFAAmF;IACnFkxC,0BAA0B;QACxB,IAAIh0C,aAAa;YACfA,YAAYo0C,cAAc,GAAGF;QAC/B;QACA,OAAO;YACL,IAAIl0C,aAAa;gBACfA,YAAYo0C,cAAc,GAAGF;YAC/B;QACF;IACF;IAEAD,oBAAoB;QAClB,IAAIj0C,eAAeA,YAAYo0C,cAAc,EAAE;YAC7Cp0C,YAAYo0C,cAAc;YAC1Bp0C,YAAYo0C,cAAc,GAAG;QAC/B;QACA,OAAO;YACL,IAAIp0C,eAAeA,YAAYo0C,cAAc,EAAE;gBAC7Cp0C,YAAYo0C,cAAc;gBAC1Bp0C,YAAYo0C,cAAc,GAAG;YAC/B;QACF;IACF;IAEA,OAAO;AACT","sources":["webpack://_N_E/../../../../../src/shared/lib/router/utils/interception-prefix-from-param-type.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-match-utils.ts","webpack://_N_E/../../../src/shared/lib/modern-browserslist-target.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/index.ts","webpack://_N_E/../../src/client/index.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-dynamic.ts","webpack://_N_E/../../../../src/shared/lib/router/adapters.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/omit.ts","webpack://_N_E/../../src/client/page-loader.ts","webpack://_N_E/../../src/client/route-loader.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/interception-routes.ts","webpack://_N_E/../../../src/shared/lib/head-manager-context.shared-runtime.ts","webpack://_N_E/../../../../src/shared/lib/lazy-dynamic/bailout-to-csr.ts","webpack://_N_E/../../src/client/trusted-types.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-local-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-url.ts","webpack://_N_E/../../src/client/request-idle-callback.ts","webpack://_N_E/./node_modules/next/dist/build/polyfills/polyfill-module.js","webpack://_N_E/../../../src/client/tracing/tracer.ts","webpack://_N_E/../../src/client/normalize-trailing-slash.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/path-has-prefix.ts","webpack://_N_E/../../../src/client/components/readonly-url-search-params.ts","webpack://_N_E/../../src/pages/_app.tsx","webpack://_N_E/./node_modules/next/dist/lib/route-pattern-normalizer.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-asset-path-from-route.ts","webpack://_N_E/../../../../src/shared/lib/page-path/denormalize-page-path.ts","webpack://_N_E/../../src/client/remove-base-path.ts","webpack://_N_E/./node_modules/next/dist/lib/is-api-route.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/disable-smooth-scroll.ts","webpack://_N_E/../../src/client/script.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-segment-param.tsx","webpack://_N_E/../../../../../src/shared/lib/router/routes/app.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/is-bot.ts","webpack://_N_E/../../src/client/register-deployment-id-global.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-path-prefix.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-dynamic-param.ts","webpack://_N_E/../../../src/client/components/redirect-error.ts","webpack://_N_E/../../../src/shared/lib/hooks-client-context.shared-runtime.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-relative-url.ts","webpack://_N_E/../../../../src/shared/lib/i18n/normalize-locale-path.ts","webpack://_N_E/../../../src/shared/lib/escape-regexp.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/app-paths.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/format-next-pathname-info.ts","webpack://_N_E/../../src/pages/_error.tsx","webpack://_N_E/../../../src/client/react-client-callbacks/report-global-error.ts","webpack://_N_E/../../../src/shared/lib/htmlescape.ts","webpack://_N_E/./node_modules/@swc/helpers/esm/_interop_require_default.js","webpack://_N_E/../../../src/client/lib/javascript-url.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/querystring.ts","webpack://_N_E/../../../src/shared/lib/encode-uri-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/compare-states.ts","webpack://_N_E/../../src/client/with-router.tsx","webpack://_N_E/../../../src/client/components/redirect-status-code.ts","webpack://_N_E/../../../../src/shared/lib/page-path/ensure-leading-slash.ts","webpack://_N_E/../../src/client/detect-domain-locale.ts","webpack://_N_E/../../src/client/webpack.ts","webpack://_N_E/../../../src/shared/lib/is-plain-object.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-prefix.ts","webpack://_N_E/../../src/client/remove-locale.ts","webpack://_N_E/../../../src/shared/lib/segment.ts","webpack://_N_E/../../src/client/has-base-path.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/sorted-routes.ts","webpack://_N_E/../../src/client/route-announcer.tsx","webpack://_N_E/../../../../../src/shared/lib/router/utils/html-bots.ts","webpack://_N_E/../../../../src/shared/lib/page-path/normalize-path-sep.ts","webpack://_N_E/../../../src/shared/lib/router-context.shared-runtime.ts","webpack://_N_E/../../../src/client/portal/index.tsx","webpack://_N_E/./node_modules/next/dist/lib/is-error.js","webpack://_N_E/../../../../src/client/components/http-access-fallback/http-access-fallback.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-path-suffix.ts","webpack://_N_E/../../src/client/next.ts","webpack://_N_E/../../../src/shared/lib/deployment-id.ts","webpack://_N_E/../../../src/shared/lib/mitt.ts","webpack://_N_E/../../../src/client/lib/promise.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-loader-tree.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/remove-trailing-slash.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-matcher.ts","webpack://_N_E/../../../src/client/components/is-next-router-error.ts","webpack://_N_E/../../src/client/router.ts","webpack://_N_E/./node_modules/next/dist/lib/require-instrumentation-client.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/route-regex.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/as-path-to-search-params.ts","webpack://_N_E/../../../../src/shared/lib/utils/warn-once.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/get-next-pathname-info.ts","webpack://_N_E/../../src/client/head-manager.ts","webpack://_N_E/../../src/client/resolve-href.ts","webpack://_N_E/../../../src/shared/lib/head.tsx","webpack://_N_E/../../../src/shared/lib/image-config.ts","webpack://_N_E/../../../src/shared/lib/bloom-filter.ts","webpack://_N_E/../../../src/client/react-client-callbacks/on-recoverable-error.ts","webpack://_N_E/../../src/client/add-base-path.ts","webpack://_N_E/../../src/client/add-locale.ts","webpack://_N_E/./node_modules/@swc/helpers/esm/_interop_require_wildcard.js","webpack://_N_E/../../../../../src/shared/lib/router/utils/add-locale.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/resolve-param-value.ts","webpack://_N_E/../../../src/shared/lib/image-config-context.shared-runtime.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/parse-path.ts","webpack://_N_E/../../../src/shared/lib/utils.ts","webpack://_N_E/../../../../src/shared/lib/router/router.ts","webpack://_N_E/../../../src/shared/lib/app-router-context.shared-runtime.ts","webpack://_N_E/../../../src/shared/lib/constants.ts","webpack://_N_E/../../../../../src/shared/lib/router/utils/interpolate-as.ts","webpack://_N_E/./node_modules/next/dist/lib/constants.js","webpack://_N_E/../../src/client/set-attributes-from-props.ts","webpack://_N_E/./node_modules/serwist/dist/chunks/waitUntil-BHDx3Rgo.js","webpack://_N_E/./node_modules/serwist/dist/chunks/index.internal-Dxj9Ni9X.js","webpack://_N_E/./node_modules/serwist/dist/index.internal.mjs","webpack://_N_E/./node_modules/@serwist/window/dist/index.mjs","webpack://_N_E/./node_modules/@serwist/window/dist/chunks/isCurrentPageOutOfScope-vi3IAsNY.js","webpack://_N_E/./node_modules/@serwist/next/dist/sw-entry.mjs","webpack://_N_E/ignored|/home/runner/work/jarela/jarela/node_modules/next/dist/lib|private-next-instrumentation-client","webpack://_N_E/./node_modules/next/dist/compiled/path-to-regexp/index.js","webpack://_N_E/../../../src/shared/lib/entry-constants.ts","webpack://_N_E/../../../src/shared/lib/invariant-error.ts","webpack://_N_E/./node_modules/process/browser.js","webpack://_N_E/../../../src/shared/lib/side-effect.tsx"],"sourcesContent":["import type { DynamicParamTypes } from '../../app-router-types'\n\nexport function interceptionPrefixFromParamType(\n paramType: DynamicParamTypes\n): string | null {\n switch (paramType) {\n case 'catchall-intercepted-(..)(..)':\n case 'dynamic-intercepted-(..)(..)':\n return '(..)(..)'\n case 'catchall-intercepted-(.)':\n case 'dynamic-intercepted-(.)':\n return '(.)'\n case 'catchall-intercepted-(..)':\n case 'dynamic-intercepted-(..)':\n return '(..)'\n case 'catchall-intercepted-(...)':\n case 'dynamic-intercepted-(...)':\n return '(...)'\n case 'catchall':\n case 'dynamic':\n case 'optional-catchall':\n default:\n return null\n }\n}\n","/**\n * Client-safe utilities for route matching that don't import server-side\n * utilities to avoid bundling issues with Turbopack\n */\n\nimport type {\n Key,\n TokensToRegexpOptions,\n ParseOptions,\n TokensToFunctionOptions,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n pathToRegexp,\n compile,\n regexpToFunction,\n} from 'next/dist/compiled/path-to-regexp'\nimport {\n hasAdjacentParameterIssues,\n normalizeAdjacentParameters,\n stripParameterSeparators,\n stripNormalizedSeparators,\n} from '../../../../lib/route-pattern-normalizer'\n\n/**\n * Client-safe wrapper around pathToRegexp that handles path-to-regexp 6.3.0+ validation errors.\n * This includes both \"Can not repeat without prefix/suffix\" and \"Must have text between parameters\" errors.\n */\nexport function safePathToRegexp(\n route: string | RegExp | Array<string | RegExp>,\n keys?: Key[],\n options?: TokensToRegexpOptions & ParseOptions\n): RegExp {\n if (typeof route !== 'string') {\n return pathToRegexp(route, keys, options)\n }\n\n // Check if normalization is needed and cache the result\n const needsNormalization = hasAdjacentParameterIssues(route)\n const routeToUse = needsNormalization\n ? normalizeAdjacentParameters(route)\n : route\n\n try {\n return pathToRegexp(routeToUse, keys, options)\n } catch (error) {\n // Only try normalization if we haven't already normalized\n if (!needsNormalization) {\n try {\n const normalizedRoute = normalizeAdjacentParameters(route)\n return pathToRegexp(normalizedRoute, keys, options)\n } catch (retryError) {\n // If that doesn't work, fall back to original error\n throw error\n }\n }\n throw error\n }\n}\n\n/**\n * Client-safe wrapper around compile that handles path-to-regexp 6.3.0+ validation errors.\n * No server-side error reporting to avoid bundling issues.\n * When normalization is applied, the returned compiler function automatically strips\n * the internal separator from the output URL.\n */\nexport function safeCompile(\n route: string,\n options?: TokensToFunctionOptions & ParseOptions\n) {\n // Check if normalization is needed and cache the result\n const needsNormalization = hasAdjacentParameterIssues(route)\n const routeToUse = needsNormalization\n ? normalizeAdjacentParameters(route)\n : route\n\n try {\n const compiler = compile(routeToUse, options)\n\n // If we normalized the route, wrap the compiler to strip separators from output\n // The normalization inserts _NEXTSEP_ as a literal string in the pattern to satisfy\n // path-to-regexp validation, but we don't want it in the final compiled URL\n if (needsNormalization) {\n return (params: any) => {\n return stripNormalizedSeparators(compiler(params))\n }\n }\n\n return compiler\n } catch (error) {\n // Only try normalization if we haven't already normalized\n if (!needsNormalization) {\n try {\n const normalizedRoute = normalizeAdjacentParameters(route)\n const compiler = compile(normalizedRoute, options)\n\n // Wrap the compiler to strip separators from output\n return (params: any) => {\n return stripNormalizedSeparators(compiler(params))\n }\n } catch (retryError) {\n // If that doesn't work, fall back to original error\n throw error\n }\n }\n throw error\n }\n}\n\n/**\n * Client-safe wrapper around regexpToFunction that automatically cleans parameters.\n */\nexport function safeRegexpToFunction<\n T extends Record<string, any> = Record<string, any>,\n>(regexp: RegExp, keys?: Key[]): (pathname: string) => { params: T } | false {\n const originalMatcher = regexpToFunction<T>(regexp, keys || [])\n\n return (pathname: string) => {\n const result = originalMatcher(pathname)\n if (!result) return false\n\n // Clean parameters before returning\n return {\n ...result,\n params: stripParameterSeparators(result.params as any) as T,\n }\n }\n}\n\n/**\n * Safe wrapper for route matcher functions that automatically cleans parameters.\n * This is client-safe and doesn't import path-to-regexp.\n */\nexport function safeRouteMatcher<T extends Record<string, any>>(\n matcherFn: (pathname: string) => false | T\n): (pathname: string) => false | T {\n return (pathname: string) => {\n const result = matcherFn(pathname)\n if (!result) return false\n\n // Clean parameters before returning\n return stripParameterSeparators(result) as T\n }\n}\n","// Note: This file is JS because it's used by the taskfile-swc.js file, which is JS.\n// Keep file changes in sync with the corresponding `.d.ts` files.\n\n/**\n * These are the minimum browser versions that we consider \"modern\" and thus compile for by default.\n * This list was generated using `pnpm browserslist \"baseline widely available\"` on 2025-10-01.\n */\nconst MODERN_BROWSERSLIST_TARGET = [\n 'chrome 111',\n 'edge 111',\n 'firefox 111',\n 'safari 16.4',\n]\n\nmodule.exports = MODERN_BROWSERSLIST_TARGET\n","export { getSortedRoutes, getSortedRouteObjects } from './sorted-routes'\nexport { isDynamicRoute } from './is-dynamic'\n","/* global location */\n// imports polyfill from `@next/polyfill-module` after build.\nimport '../build/polyfills/polyfill-module'\nimport type Router from '../shared/lib/router/router'\nimport type {\n AppComponent,\n AppProps,\n PrivateRouteInfo,\n} from '../shared/lib/router/router'\n\nimport React, { type JSX } from 'react'\nimport ReactDOM from 'react-dom/client'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport mitt from '../shared/lib/mitt'\nimport type { MittEmitter } from '../shared/lib/mitt'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport { disableSmoothScrollDuringRouteTransition } from '../shared/lib/router/utils/disable-smooth-scroll'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport {\n urlQueryToSearchParams,\n assign,\n} from '../shared/lib/router/utils/querystring'\nimport { getURL, loadGetInitialProps, ST } from '../shared/lib/utils'\nimport type { NextWebVitalsMetric, NEXT_DATA } from '../shared/lib/utils'\nimport { Portal } from './portal'\nimport initHeadManager from './head-manager'\nimport PageLoader from './page-loader'\nimport type { StyleSheetTuple } from './page-loader'\nimport { RouteAnnouncer } from './route-announcer'\nimport { createRouter, makePublicRouterInstance } from './router'\nimport { getProperError } from '../lib/is-error'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport type { ImageConfigComplete } from '../shared/lib/image-config'\nimport { removeBasePath } from './remove-base-path'\nimport { hasBasePath } from './has-base-path'\nimport { AppRouterContext } from '../shared/lib/app-router-context.shared-runtime'\nimport {\n adaptForAppRouterInstance,\n adaptForPathParams,\n adaptForSearchParams,\n PathnameContextProviderAdapter,\n} from '../shared/lib/router/adapters'\nimport {\n SearchParamsContext,\n PathParamsContext,\n} from '../shared/lib/hooks-client-context.shared-runtime'\nimport { onRecoverableError } from './react-client-callbacks/on-recoverable-error'\nimport tracer from './tracing/tracer'\nimport { isNextRouterError } from './components/is-next-router-error'\n\n/// <reference types=\"react-dom/experimental\" />\n\ndeclare global {\n interface Window {\n /* test fns */\n __NEXT_HYDRATED?: boolean\n __NEXT_HYDRATED_AT?: number\n __NEXT_HYDRATED_CB?: () => void\n\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n __NEXT_P: any[]\n }\n}\ntype RenderRouteInfo = PrivateRouteInfo & {\n App: AppComponent\n scroll?: { x: number; y: number } | null\n isHydratePass?: boolean\n}\ntype RenderErrorProps = Omit<RenderRouteInfo, 'Component' | 'styleSheets'>\ntype RegisterFn = (input: [string, () => void]) => void\n\nexport const version = process.env.__NEXT_VERSION\nexport let router: Router\nexport const emitter: MittEmitter<string> = mitt()\n\nconst looseToArray = <T extends {}>(input: any): T[] => [].slice.call(input)\n\nlet initialData: NEXT_DATA\nlet defaultLocale: string | undefined = undefined\nlet asPath: string\nlet pageLoader: PageLoader\nlet appElement: HTMLElement | null\nlet headManager: {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n getIsSsr?: () => boolean\n}\nlet initialMatchesMiddleware = false\nlet lastAppProps: AppProps\n\nlet lastRenderReject: (() => void) | null\nlet devClient: any\n\nlet CachedApp: AppComponent, onPerfEntry: (metric: any) => void\nlet CachedComponent: React.ComponentType\n\nclass Container extends React.Component<{\n children?: React.ReactNode\n fn: (err: Error, info?: any) => void\n}> {\n componentDidCatch(componentErr: Error, info: any) {\n this.props.fn(componentErr, info)\n }\n\n componentDidMount() {\n this.scrollToHash()\n\n // We need to replace the router state if:\n // - the page was (auto) exported and has a query string or search (hash)\n // - it was auto exported and is a dynamic route (to provide params)\n // - if it is a client-side skeleton (fallback render)\n // - if middleware matches the current page (may have rewrite params)\n // - if rewrites in next.config.js match (may have rewrite params)\n if (\n router.isSsr &&\n (initialData.isFallback ||\n (initialData.nextExport &&\n (isDynamicRoute(router.pathname) ||\n location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)) ||\n (initialData.props &&\n initialData.props.__N_SSG &&\n (location.search ||\n process.env.__NEXT_HAS_REWRITES ||\n initialMatchesMiddleware)))\n ) {\n // update query on mount for exported pages\n router\n .replace(\n router.pathname +\n '?' +\n String(\n assign(\n urlQueryToSearchParams(router.query),\n new URLSearchParams(location.search)\n )\n ),\n asPath,\n {\n // @ts-ignore\n // WARNING: `_h` is an internal option for handing Next.js\n // client-side hydration. Your app should _never_ use this property.\n // It may change at any time without notice.\n _h: 1,\n // Fallback pages must trigger the data fetch, so the transition is\n // not shallow.\n // Other pages (strictly updating query) happens shallowly, as data\n // requirements would already be present.\n shallow: !initialData.isFallback && !initialMatchesMiddleware,\n }\n )\n .catch((err) => {\n if (!err.cancelled) throw err\n })\n }\n }\n\n componentDidUpdate() {\n this.scrollToHash()\n }\n\n scrollToHash() {\n let { hash } = location\n hash = hash && hash.substring(1)\n if (!hash) return\n\n const el: HTMLElement | null = document.getElementById(hash)\n if (!el) return\n\n // If we call scrollIntoView() in here without a setTimeout\n // it won't scroll properly.\n setTimeout(() => el.scrollIntoView(), 0)\n }\n\n render() {\n if (process.env.NODE_ENV === 'production') {\n return this.props.children\n } else {\n const { PagesDevOverlayBridge } =\n require('../next-devtools/userspace/pages/pages-dev-overlay-setup') as typeof import('../next-devtools/userspace/pages/pages-dev-overlay-setup')\n return (\n <PagesDevOverlayBridge>{this.props.children}</PagesDevOverlayBridge>\n )\n }\n }\n}\n\nexport async function initialize(opts: { devClient?: any } = {}): Promise<{\n assetPrefix: string\n}> {\n // This makes sure this specific lines are removed in production\n if (process.env.NODE_ENV === 'development') {\n tracer.onSpanEnd(\n (\n require('./tracing/report-to-socket') as typeof import('./tracing/report-to-socket')\n ).default\n )\n devClient = opts.devClient\n }\n\n initialData = JSON.parse(\n document.getElementById('__NEXT_DATA__')!.textContent!\n )\n window.__NEXT_DATA__ = initialData\n\n defaultLocale = initialData.defaultLocale\n const prefix: string = initialData.assetPrefix || ''\n // With dynamic assetPrefix it's no longer possible to set assetPrefix at the build time\n // So, this is how we do it in the client side at runtime\n ;(self as any).__next_set_public_path__(`${prefix}/_next/`)\n\n asPath = getURL()\n\n // make sure not to attempt stripping basePath for 404s\n if (hasBasePath(asPath)) {\n asPath = removeBasePath(asPath)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { normalizeLocalePath } =\n require('../shared/lib/i18n/normalize-locale-path') as typeof import('../shared/lib/i18n/normalize-locale-path')\n\n const { detectDomainLocale } =\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n\n const { parseRelativeUrl } =\n require('../shared/lib/router/utils/parse-relative-url') as typeof import('../shared/lib/router/utils/parse-relative-url')\n\n const { formatUrl } =\n require('../shared/lib/router/utils/format-url') as typeof import('../shared/lib/router/utils/format-url')\n\n if (initialData.locales) {\n const parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n initialData.locales\n )\n\n if (localePathResult.detectedLocale) {\n parsedAs.pathname = localePathResult.pathname\n asPath = formatUrl(parsedAs)\n } else {\n // derive the default locale if it wasn't detected in the asPath\n // since we don't prerender static pages with all possible default\n // locales\n defaultLocale = initialData.locale\n }\n\n // attempt detecting default locale based on hostname\n const detectedDomain = detectDomainLocale(\n process.env.__NEXT_I18N_DOMAINS as any,\n window.location.hostname\n )\n\n // TODO: investigate if defaultLocale needs to be populated after\n // hydration to prevent mismatched renders\n if (detectedDomain) {\n defaultLocale = detectedDomain.defaultLocale\n }\n }\n }\n\n if (initialData.scriptLoader) {\n const { initScriptLoader } =\n require('./script') as typeof import('./script')\n initScriptLoader(initialData.scriptLoader)\n }\n\n pageLoader = new PageLoader(initialData.buildId, prefix)\n\n const register: RegisterFn = ([r, f]) =>\n pageLoader.routeLoader.onEntrypoint(r, f)\n if (window.__NEXT_P) {\n // Defer page registration for another tick. This will increase the overall\n // latency in hydrating the page, but reduce the total blocking time.\n window.__NEXT_P.map((p) => setTimeout(() => register(p), 0))\n }\n window.__NEXT_P = []\n ;(window.__NEXT_P as any).push = register\n\n headManager = initHeadManager()\n headManager.getIsSsr = () => {\n return router.isSsr\n }\n\n appElement = document.getElementById('__next')\n return { assetPrefix: prefix }\n}\n\nfunction renderApp(App: AppComponent, appProps: AppProps) {\n return <App {...appProps} />\n}\n\nfunction AppContainer({\n children,\n}: React.PropsWithChildren<{}>): React.ReactElement {\n // Create a memoized value for next/navigation router context.\n const adaptedForAppRouter = React.useMemo(() => {\n return adaptForAppRouterInstance(router)\n }, [])\n return (\n <Container\n fn={(error) =>\n renderError({ App: CachedApp, err: error }).catch((err) =>\n console.error('Error rendering page: ', err)\n )\n }\n >\n <AppRouterContext.Provider value={adaptedForAppRouter}>\n <SearchParamsContext.Provider value={adaptForSearchParams(router)}>\n <PathnameContextProviderAdapter\n router={router}\n isAutoExport={self.__NEXT_DATA__.autoExport ?? false}\n >\n <PathParamsContext.Provider value={adaptForPathParams(router)}>\n <RouterContext.Provider value={makePublicRouterInstance(router)}>\n <HeadManagerContext.Provider value={headManager}>\n <ImageConfigContext.Provider\n value={\n process.env\n .__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n }\n >\n {children}\n </ImageConfigContext.Provider>\n </HeadManagerContext.Provider>\n </RouterContext.Provider>\n </PathParamsContext.Provider>\n </PathnameContextProviderAdapter>\n </SearchParamsContext.Provider>\n </AppRouterContext.Provider>\n </Container>\n )\n}\n\nconst wrapApp =\n (App: AppComponent) =>\n (wrappedAppProps: Record<string, any>): JSX.Element => {\n const appProps: AppProps = {\n ...wrappedAppProps,\n Component: CachedComponent,\n err: initialData.err,\n router,\n }\n return <AppContainer>{renderApp(App, appProps)}</AppContainer>\n }\n\n// This method handles all runtime and debug errors.\n// 404 and 500 errors are special kind of errors\n// and they are still handle via the main render method.\nfunction renderError(renderErrorProps: RenderErrorProps): Promise<any> {\n let { App, err } = renderErrorProps\n\n // In development runtime errors are caught by our overlay\n // In production we catch runtime errors using componentDidCatch which will trigger renderError\n if (process.env.NODE_ENV !== 'production') {\n // A Next.js rendering runtime error is always unrecoverable\n // FIXME: let's make this recoverable (error in GIP client-transition)\n devClient.onUnrecoverableError()\n\n // We need to render an empty <App> so that the `<ReactDevOverlay>` can\n // render itself.\n return doRender({\n App: () => null,\n props: {},\n Component: () => null,\n styleSheets: [],\n })\n }\n\n // Make sure we log the error to the console, otherwise users can't track down issues.\n console.error(err)\n console.error(\n `A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred`\n )\n\n return pageLoader\n .loadPage('/_error')\n .then(({ page: ErrorComponent, styleSheets }) => {\n return lastAppProps?.Component === ErrorComponent\n ? import('../pages/_error')\n .then((errorModule) => {\n return import('../pages/_app').then((appModule) => {\n App = appModule.default as any as AppComponent\n renderErrorProps.App = App\n return errorModule\n })\n })\n .then((m) => ({\n ErrorComponent: m.default as React.ComponentType<{}>,\n styleSheets: [],\n }))\n : { ErrorComponent, styleSheets }\n })\n .then(({ ErrorComponent, styleSheets }) => {\n // In production we do a normal render with the `ErrorComponent` as component.\n // If we've gotten here upon initial render, we can use the props from the server.\n // Otherwise, we need to call `getInitialProps` on `App` before mounting.\n const AppTree = wrapApp(App)\n const appCtx = {\n Component: ErrorComponent,\n AppTree,\n router,\n ctx: {\n err,\n pathname: initialData.page,\n query: initialData.query,\n asPath,\n AppTree,\n },\n }\n return Promise.resolve(\n renderErrorProps.props?.err\n ? renderErrorProps.props\n : loadGetInitialProps(App, appCtx)\n ).then((initProps) =>\n doRender({\n ...renderErrorProps,\n err,\n Component: ErrorComponent,\n styleSheets,\n props: initProps,\n })\n )\n })\n}\n\n// Dummy component that we render as a child of Root so that we can\n// toggle the correct styles before the page is rendered.\nfunction Head({ callback }: { callback: () => void }): null {\n // We use `useLayoutEffect` to guarantee the callback is executed\n // as soon as React flushes the update.\n React.useLayoutEffect(() => callback(), [callback])\n return null\n}\n\nconst performanceMarks = {\n navigationStart: 'navigationStart',\n beforeRender: 'beforeRender',\n afterRender: 'afterRender',\n afterHydrate: 'afterHydrate',\n routeChange: 'routeChange',\n} as const\n\nconst performanceMeasures = {\n hydration: 'Next.js-hydration',\n beforeHydration: 'Next.js-before-hydration',\n routeChangeToRender: 'Next.js-route-change-to-render',\n render: 'Next.js-render',\n} as const\n\nlet reactRoot: any = null\n// On initial render a hydrate should always happen\nlet shouldHydrate: boolean = true\n\nfunction clearMarks(): void {\n ;[\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate,\n performanceMarks.afterRender,\n performanceMarks.routeChange,\n ].forEach((mark) => performance.clearMarks(mark))\n}\n\nfunction markHydrateComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterHydrate) // mark end of hydration\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n if (hasBeforeRenderMark) {\n const beforeHydrationMeasure = performance.measure(\n performanceMeasures.beforeHydration,\n performanceMarks.navigationStart,\n performanceMarks.beforeRender\n )\n\n const hydrationMeasure = performance.measure(\n performanceMeasures.hydration,\n performanceMarks.beforeRender,\n performanceMarks.afterHydrate\n )\n\n if (\n process.env.NODE_ENV === 'development' &&\n // Old versions of Safari don't return `PerformanceMeasure`s from `performance.measure()`\n beforeHydrationMeasure &&\n hydrationMeasure\n ) {\n tracer\n .startSpan('navigation-to-hydration', {\n startTime: performance.timeOrigin + beforeHydrationMeasure.startTime,\n attributes: {\n pathname: location.pathname,\n query: location.search,\n },\n })\n .end(\n performance.timeOrigin +\n hydrationMeasure.startTime +\n hydrationMeasure.duration\n )\n }\n }\n\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.hydration)\n .forEach(onPerfEntry)\n }\n clearMarks()\n}\n\nfunction markRenderComplete(): void {\n if (!ST) return\n\n performance.mark(performanceMarks.afterRender) // mark end of render\n const navStartEntries: PerformanceEntryList = performance.getEntriesByName(\n performanceMarks.routeChange,\n 'mark'\n )\n\n if (!navStartEntries.length) return\n\n const hasBeforeRenderMark = performance.getEntriesByName(\n performanceMarks.beforeRender,\n 'mark'\n ).length\n\n if (hasBeforeRenderMark) {\n performance.measure(\n performanceMeasures.routeChangeToRender,\n navStartEntries[0].name,\n performanceMarks.beforeRender\n )\n performance.measure(\n performanceMeasures.render,\n performanceMarks.beforeRender,\n performanceMarks.afterRender\n )\n if (onPerfEntry) {\n performance\n .getEntriesByName(performanceMeasures.render)\n .forEach(onPerfEntry)\n performance\n .getEntriesByName(performanceMeasures.routeChangeToRender)\n .forEach(onPerfEntry)\n }\n }\n\n clearMarks()\n ;[\n performanceMeasures.routeChangeToRender,\n performanceMeasures.render,\n ].forEach((measure) => performance.clearMeasures(measure))\n}\n\nfunction renderReactElement(\n domEl: HTMLElement,\n fn: (cb: () => void) => JSX.Element\n): void {\n // mark start of hydrate/render\n if (ST) {\n performance.mark(performanceMarks.beforeRender)\n }\n\n const reactEl = fn(shouldHydrate ? markHydrateComplete : markRenderComplete)\n if (!reactRoot) {\n // Unlike with createRoot, you don't need a separate root.render() call here\n reactRoot = ReactDOM.hydrateRoot(domEl, reactEl, {\n onRecoverableError,\n })\n // TODO: Remove shouldHydrate variable when React 18 is stable as it can depend on `reactRoot` existing\n shouldHydrate = false\n } else {\n const startTransition = (React as any).startTransition\n startTransition(() => {\n reactRoot.render(reactEl)\n })\n }\n}\n\nfunction Root({\n callbacks,\n children,\n}: React.PropsWithChildren<{\n callbacks: Array<() => void>\n}>): React.ReactElement {\n // We use `useLayoutEffect` to guarantee the callbacks are executed\n // as soon as React flushes the update\n React.useLayoutEffect(\n () => callbacks.forEach((callback) => callback()),\n [callbacks]\n )\n\n if (process.env.__NEXT_TEST_MODE) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n window.__NEXT_HYDRATED = true\n window.__NEXT_HYDRATED_AT = performance.now()\n\n if (window.__NEXT_HYDRATED_CB) {\n window.__NEXT_HYDRATED_CB()\n }\n }, [])\n }\n\n return children as React.ReactElement\n}\n\nfunction doRender(input: RenderRouteInfo): Promise<any> {\n let { App, Component, props, err }: RenderRouteInfo = input\n let styleSheets: StyleSheetTuple[] | undefined =\n 'initial' in input ? undefined : input.styleSheets\n Component = Component || lastAppProps.Component\n props = props || lastAppProps.props\n\n const appProps: AppProps = {\n ...props,\n Component,\n err,\n router,\n }\n // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error.\n lastAppProps = appProps\n\n let canceled: boolean = false\n let resolvePromise: () => void\n const renderPromise = new Promise<void>((resolve, reject) => {\n if (lastRenderReject) {\n lastRenderReject()\n }\n resolvePromise = () => {\n lastRenderReject = null\n resolve()\n }\n lastRenderReject = () => {\n canceled = true\n lastRenderReject = null\n\n const error: any = new Error('Cancel rendering route')\n error.cancelled = true\n reject(error)\n }\n })\n\n // This function has a return type to ensure it doesn't start returning a\n // Promise. It should remain synchronous.\n function onStart(): boolean {\n if (\n !styleSheets ||\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV !== 'production'\n ) {\n return false\n }\n\n const currentStyleTags: HTMLStyleElement[] = looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: Set<string | null> = new Set(\n currentStyleTags.map((tag) => tag.getAttribute('data-n-href'))\n )\n\n const noscript: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n const nonce: string | null | undefined =\n noscript?.getAttribute('data-n-css')\n\n styleSheets.forEach(({ href, text }: { href: string; text: any }) => {\n if (!currentHrefs.has(href)) {\n const styleTag = document.createElement('style')\n styleTag.setAttribute('data-n-href', href)\n styleTag.setAttribute('media', 'x')\n\n if (nonce) {\n styleTag.setAttribute('nonce', nonce)\n }\n\n document.head.appendChild(styleTag)\n styleTag.appendChild(document.createTextNode(text))\n }\n })\n return true\n }\n\n function onHeadCommit(): void {\n if (\n // Turbopack has it's own css injection handling, this code ends up removing the CSS.\n !process.env.TURBOPACK &&\n // We use `style-loader` in development, so we don't need to do anything\n // unless we're in production:\n process.env.NODE_ENV === 'production' &&\n // We can skip this during hydration. Running it wont cause any harm, but\n // we may as well save the CPU cycles:\n styleSheets &&\n // Ensure this render was not canceled\n !canceled\n ) {\n const desiredHrefs: Set<string> = new Set(styleSheets.map((s) => s.href))\n const currentStyleTags: HTMLStyleElement[] =\n looseToArray<HTMLStyleElement>(\n document.querySelectorAll('style[data-n-href]')\n )\n const currentHrefs: string[] = currentStyleTags.map(\n (tag) => tag.getAttribute('data-n-href')!\n )\n\n // Toggle `<style>` tags on or off depending on if they're needed:\n for (let idx = 0; idx < currentHrefs.length; ++idx) {\n if (desiredHrefs.has(currentHrefs[idx])) {\n currentStyleTags[idx].removeAttribute('media')\n } else {\n currentStyleTags[idx].setAttribute('media', 'x')\n }\n }\n\n // Reorder styles into intended order:\n let referenceNode: Element | null = document.querySelector(\n 'noscript[data-n-css]'\n )\n if (\n // This should be an invariant:\n referenceNode\n ) {\n styleSheets.forEach(({ href }: { href: string }) => {\n const targetTag: Element | null = document.querySelector(\n `style[data-n-href=\"${href}\"]`\n )\n if (\n // This should be an invariant:\n targetTag\n ) {\n referenceNode!.parentNode!.insertBefore(\n targetTag,\n referenceNode!.nextSibling\n )\n referenceNode = targetTag\n }\n })\n }\n\n // Finally, clean up server rendered stylesheets:\n looseToArray<HTMLLinkElement>(\n document.querySelectorAll('link[data-n-p]')\n ).forEach((el) => {\n el.parentNode!.removeChild(el)\n })\n }\n\n if (input.scroll) {\n const { x, y } = input.scroll\n disableSmoothScrollDuringRouteTransition(() => {\n window.scrollTo(x, y)\n })\n }\n }\n\n function onRootCommit(): void {\n resolvePromise()\n }\n\n onStart()\n\n const elem: JSX.Element = (\n <>\n <Head callback={onHeadCommit} />\n <AppContainer>\n {renderApp(App, appProps)}\n <Portal type=\"next-route-announcer\">\n <RouteAnnouncer />\n </Portal>\n </AppContainer>\n </>\n )\n\n // We catch runtime errors using componentDidCatch which will trigger renderError\n renderReactElement(appElement!, (callback) => (\n <Root callbacks={[callback, onRootCommit]}>\n {process.env.__NEXT_STRICT_MODE ? (\n <React.StrictMode>{elem}</React.StrictMode>\n ) : (\n elem\n )}\n </Root>\n ))\n\n return renderPromise\n}\n\nasync function render(renderingProps: RenderRouteInfo): Promise<void> {\n // if an error occurs in a server-side page (e.g. in getInitialProps),\n // skip re-rendering the error page client-side as data-fetching operations\n // will already have been done on the server and NEXT_DATA contains the correct\n // data for straight-forward hydration of the error page\n if (\n renderingProps.err &&\n // renderingProps.Component might be undefined if there is a top/module-level error\n (typeof renderingProps.Component === 'undefined' ||\n !renderingProps.isHydratePass)\n ) {\n await renderError(renderingProps)\n return\n }\n\n try {\n await doRender(renderingProps)\n } catch (err) {\n const renderErr = getProperError(err)\n // bubble up cancelation errors\n if ((renderErr as Error & { cancelled?: boolean }).cancelled) {\n throw renderErr\n }\n\n if (process.env.NODE_ENV === 'development') {\n // Ensure this error is displayed in the overlay in development\n setTimeout(() => {\n throw renderErr\n })\n }\n await renderError({ ...renderingProps, err: renderErr })\n }\n}\n\nexport async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {\n let initialErr = initialData.err\n\n try {\n const appEntrypoint = await pageLoader.routeLoader.whenEntrypoint('/_app')\n if ('error' in appEntrypoint) {\n throw appEntrypoint.error\n }\n\n const { component: app, exports: mod } = appEntrypoint\n CachedApp = app as AppComponent\n if (mod && mod.reportWebVitals) {\n onPerfEntry = ({\n id,\n name,\n startTime,\n value,\n duration,\n entryType,\n entries,\n attribution,\n }: any): void => {\n // Combines timestamp with random number for unique ID\n const uniqueID: string = `${Date.now()}-${\n Math.floor(Math.random() * (9e12 - 1)) + 1e12\n }`\n let perfStartEntry: string | undefined\n\n if (entries && entries.length) {\n perfStartEntry = entries[0].startTime\n }\n\n const webVitals: NextWebVitalsMetric = {\n id: id || uniqueID,\n name,\n startTime: startTime || perfStartEntry,\n value: value == null ? duration : value,\n label:\n entryType === 'mark' || entryType === 'measure'\n ? 'custom'\n : 'web-vital',\n }\n if (attribution) {\n webVitals.attribution = attribution\n }\n mod.reportWebVitals(webVitals)\n }\n }\n\n const pageEntrypoint =\n // The dev server fails to serve script assets when there's a hydration\n // error, so we need to skip waiting for the entrypoint.\n process.env.NODE_ENV === 'development' && initialData.err\n ? { error: initialData.err }\n : await pageLoader.routeLoader.whenEntrypoint(initialData.page)\n if ('error' in pageEntrypoint) {\n throw pageEntrypoint.error\n }\n CachedComponent = pageEntrypoint.component\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } =\n require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n if (!isValidElementType(CachedComponent)) {\n throw new Error(\n `The default export is not a React Component in page: \"${initialData.page}\"`\n )\n }\n }\n } catch (error) {\n // This catches errors like throwing in the top level of a module\n initialErr = getProperError(error)\n }\n\n if (process.env.NODE_ENV === 'development') {\n const getServerError = (\n require('../server/dev/node-stack-frames') as typeof import('../server/dev/node-stack-frames')\n ).getServerError\n // Server-side runtime errors need to be re-thrown on the client-side so\n // that the overlay is rendered.\n if (initialErr) {\n if (initialErr === initialData.err) {\n setTimeout(() => {\n let error\n try {\n // Generate a new error object. We `throw` it because some browsers\n // will set the `stack` when thrown, and we want to ensure ours is\n // not overridden when we re-throw it below.\n throw new Error(initialErr!.message)\n } catch (e) {\n error = e as Error\n }\n\n error.name = initialErr!.name\n error.stack = initialErr!.stack\n const errSource = initialErr.source!\n\n // In development, error the navigation API usage in runtime,\n // since it's not allowed to be used in pages router as it doesn't contain error boundary like app router.\n if (isNextRouterError(initialErr)) {\n error.message =\n 'Next.js navigation API is not allowed to be used in Pages Router.'\n }\n\n throw getServerError(error, errSource)\n })\n }\n // We replaced the server-side error with a client-side error, and should\n // no longer rewrite the stack trace to a Node error.\n else {\n setTimeout(() => {\n throw initialErr\n })\n }\n }\n }\n\n if (window.__NEXT_PRELOADREADY) {\n await window.__NEXT_PRELOADREADY(initialData.dynamicIds)\n }\n\n router = createRouter(initialData.page, initialData.query, asPath, {\n initialProps: initialData.props,\n pageLoader,\n App: CachedApp,\n Component: CachedComponent,\n wrapApp,\n err: initialErr,\n isFallback: Boolean(initialData.isFallback),\n subscription: (info, App, scroll) =>\n render(\n Object.assign<\n {},\n Omit<RenderRouteInfo, 'App' | 'scroll'>,\n Pick<RenderRouteInfo, 'App' | 'scroll'>\n >({}, info, {\n App,\n scroll,\n }) as RenderRouteInfo\n ),\n locale: initialData.locale,\n locales: initialData.locales,\n defaultLocale,\n domainLocales: initialData.domainLocales,\n isPreview: initialData.isPreview,\n })\n\n initialMatchesMiddleware = await router._initialMatchesMiddlewarePromise\n\n const renderCtx: RenderRouteInfo = {\n App: CachedApp,\n initial: true,\n Component: CachedComponent,\n props: initialData.props,\n err: initialErr,\n isHydratePass: true,\n }\n\n if (opts?.beforeRender) {\n await opts.beforeRender()\n }\n\n render(renderCtx)\n}\n","import {\n extractInterceptionRouteInformation,\n isInterceptionRouteAppPath,\n} from './interception-routes'\n\n// Identify /.*[param].*/ in route string\nconst TEST_ROUTE = /\\/[^/]*\\[[^/]+\\][^/]*(?=\\/|$)/\n\n// Identify /[param]/ in route string\nconst TEST_STRICT_ROUTE = /\\/\\[[^/]+\\](?=\\/|$)/\n\n/**\n * Check if a route is dynamic.\n *\n * @param route - The route to check.\n * @param strict - Whether to use strict mode which prohibits segments with prefixes/suffixes (default: true).\n * @returns Whether the route is dynamic.\n */\nexport function isDynamicRoute(route: string, strict: boolean = true): boolean {\n if (isInterceptionRouteAppPath(route)) {\n route = extractInterceptionRouteInformation(route).interceptedRoute\n }\n\n if (strict) {\n return TEST_STRICT_ROUTE.test(route)\n }\n\n return TEST_ROUTE.test(route)\n}\n","import type { AppRouterInstance } from '../app-router-context.shared-runtime'\nimport type { Params } from '../../../server/request/params'\nimport type { NextRouter } from './router'\n\nimport React, { useMemo, useRef } from 'react'\nimport { PathnameContext } from '../hooks-client-context.shared-runtime'\nimport { isDynamicRoute } from './utils'\nimport { asPathToSearchParams } from './utils/as-path-to-search-params'\nimport { getRouteRegex } from './utils/route-regex'\n\n/** It adapts a Pages Router (`NextRouter`) to the App Router Instance. */\nexport function adaptForAppRouterInstance(\n pagesRouter: NextRouter\n): AppRouterInstance {\n return {\n back() {\n pagesRouter.back()\n },\n forward() {\n pagesRouter.forward()\n },\n refresh() {\n pagesRouter.reload()\n },\n hmrRefresh() {},\n push(href, { scroll } = {}) {\n void pagesRouter.push(href, undefined, { scroll })\n },\n replace(href, { scroll } = {}) {\n void pagesRouter.replace(href, undefined, { scroll })\n },\n prefetch(href) {\n void pagesRouter.prefetch(href)\n },\n }\n}\n\n/**\n * adaptForSearchParams transforms the ParsedURLQuery into URLSearchParams.\n *\n * @param router the router that contains the query.\n * @returns the search params in the URLSearchParams format\n */\nexport function adaptForSearchParams(\n router: Pick<NextRouter, 'isReady' | 'query' | 'asPath'>\n): URLSearchParams {\n if (!router.isReady || !router.query) {\n return new URLSearchParams()\n }\n\n return asPathToSearchParams(router.asPath)\n}\n\nexport function adaptForPathParams(\n router: Pick<NextRouter, 'isReady' | 'pathname' | 'query' | 'asPath'>\n): Params | null {\n if (!router.isReady || !router.query) {\n return null\n }\n const pathParams: Params = {}\n const routeRegex = getRouteRegex(router.pathname)\n const keys = Object.keys(routeRegex.groups)\n for (const key of keys) {\n pathParams[key] = router.query[key]!\n }\n return pathParams\n}\n\nexport function PathnameContextProviderAdapter({\n children,\n router,\n ...props\n}: React.PropsWithChildren<{\n router: Pick<NextRouter, 'pathname' | 'asPath' | 'isReady' | 'isFallback'>\n isAutoExport: boolean\n}>) {\n const ref = useRef(props.isAutoExport)\n const value = useMemo(() => {\n // isAutoExport is only ever `true` on the first render from the server,\n // so reset it to `false` after we read it for the first time as `true`. If\n // we don't use the value, then we don't need it.\n const isAutoExport = ref.current\n if (isAutoExport) {\n ref.current = false\n }\n\n // When the route is a dynamic route, we need to do more processing to\n // determine if we need to stop showing the pathname.\n if (isDynamicRoute(router.pathname)) {\n // When the router is rendering the fallback page, it can't possibly know\n // the path, so return `null` here. Read more about fallback pages over\n // at:\n // https://nextjs.org/docs/api-reference/data-fetching/get-static-paths#fallback-pages\n if (router.isFallback) {\n return null\n }\n\n // When `isAutoExport` is true, meaning this is a page page has been\n // automatically statically optimized, and the router is not ready, then\n // we can't know the pathname yet. Read more about automatic static\n // optimization at:\n // https://nextjs.org/docs/advanced-features/automatic-static-optimization\n if (isAutoExport && !router.isReady) {\n return null\n }\n }\n\n // The `router.asPath` contains the pathname seen by the browser (including\n // any query strings), so it should have that stripped. Read more about the\n // `asPath` option over at:\n // https://nextjs.org/docs/api-reference/next/router#router-object\n let url: URL\n try {\n url = new URL(router.asPath, 'http://f')\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n return '/'\n }\n\n return url.pathname\n }, [router.asPath, router.isFallback, router.isReady, router.pathname])\n\n return (\n <PathnameContext.Provider value={value}>\n {children}\n </PathnameContext.Provider>\n )\n}\n","export function omit<T extends { [key: string]: unknown }, K extends keyof T>(\n object: T,\n keys: K[]\n): Omit<T, K> {\n const omitted: { [key: string]: unknown } = {}\n Object.keys(object).forEach((key) => {\n if (!keys.includes(key as K)) {\n omitted[key] = object[key]\n }\n })\n return omitted as Omit<T, K>\n}\n","import type { ComponentType } from 'react'\nimport type { RouteLoader } from './route-loader'\nimport type { ProxyMatcher } from '../build/analysis/get-page-static-info'\nimport { addBasePath } from './add-base-path'\nimport { interpolateAs } from '../shared/lib/router/utils/interpolate-as'\nimport getAssetPathFromRoute from '../shared/lib/router/utils/get-asset-path-from-route'\nimport { addLocale } from './add-locale'\nimport { isDynamicRoute } from '../shared/lib/router/utils/is-dynamic'\nimport { parseRelativeUrl } from '../shared/lib/router/utils/parse-relative-url'\nimport { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport {\n createRouteLoader,\n getClientBuildManifest,\n markAssetError,\n} from './route-loader'\nimport {\n DEV_CLIENT_PAGES_MANIFEST,\n DEV_CLIENT_MIDDLEWARE_MANIFEST,\n} from '../shared/lib/constants'\nimport { resolvePromiseWithTimeout } from './lib/promise'\n\ndeclare global {\n interface Window {\n __DEV_MIDDLEWARE_MATCHERS?: ProxyMatcher[]\n __DEV_PAGES_MANIFEST?: { pages: string[] }\n __SSG_MANIFEST_CB?: () => void\n __SSG_MANIFEST?: Set<string>\n }\n}\n\nexport type StyleSheetTuple = { href: string; text: string }\nexport type GoodPageCache = {\n page: ComponentType\n mod: any\n styleSheets: StyleSheetTuple[]\n}\n\nexport default class PageLoader {\n private buildId: string\n private assetPrefix: string\n private promisedSsgManifest: Promise<Set<string>>\n private promisedDevPagesManifest?: Promise<string[]>\n private promisedMiddlewareMatchers?: Promise<ProxyMatcher[]>\n\n public routeLoader: RouteLoader\n\n constructor(buildId: string, assetPrefix: string) {\n this.routeLoader = createRouteLoader(assetPrefix)\n\n this.buildId = buildId\n this.assetPrefix = assetPrefix\n\n this.promisedSsgManifest = new Promise((resolve) => {\n if (window.__SSG_MANIFEST) {\n resolve(window.__SSG_MANIFEST)\n } else {\n window.__SSG_MANIFEST_CB = () => {\n resolve(window.__SSG_MANIFEST!)\n }\n }\n })\n }\n\n getPageList() {\n if (process.env.NODE_ENV === 'production') {\n return getClientBuildManifest().then((manifest) => manifest.sortedPages)\n } else {\n if (window.__DEV_PAGES_MANIFEST) {\n return window.__DEV_PAGES_MANIFEST.pages\n } else {\n this.promisedDevPagesManifest ||= fetch(\n `${this.assetPrefix}/_next/static/development/${DEV_CLIENT_PAGES_MANIFEST}`,\n { credentials: 'same-origin' }\n )\n .then((res) => res.json())\n .then((manifest: { pages: string[] }) => {\n window.__DEV_PAGES_MANIFEST = manifest\n return manifest.pages\n })\n .catch((err) => {\n console.log(`Failed to fetch devPagesManifest:`, err)\n throw new Error(\n `Failed to fetch _devPagesManifest.json. Is something blocking that network request?\\n` +\n 'Read more: https://nextjs.org/docs/messages/failed-to-fetch-devpagesmanifest'\n )\n })\n return this.promisedDevPagesManifest\n }\n }\n }\n\n getMiddleware() {\n // Webpack production\n if (\n process.env.NODE_ENV === 'production' &&\n process.env.__NEXT_MIDDLEWARE_MATCHERS\n ) {\n const middlewareMatchers = process.env.__NEXT_MIDDLEWARE_MATCHERS\n window.__MIDDLEWARE_MATCHERS = middlewareMatchers\n ? (middlewareMatchers as any as ProxyMatcher[])\n : undefined\n return window.__MIDDLEWARE_MATCHERS\n // Turbopack production\n } else if (process.env.NODE_ENV === 'production') {\n if (window.__MIDDLEWARE_MATCHERS) {\n return window.__MIDDLEWARE_MATCHERS\n } else {\n const onClientMiddlewareManifest = new Promise<ProxyMatcher[]>(\n (resolve) => {\n // Mandatory because this is not concurrent safe:\n const cb = self.__MIDDLEWARE_MATCHERS_CB\n self.__MIDDLEWARE_MATCHERS_CB = () => {\n resolve(self.__MIDDLEWARE_MATCHERS!)\n cb && cb()\n }\n }\n )\n\n return resolvePromiseWithTimeout(\n onClientMiddlewareManifest,\n markAssetError(\n new Error('Failed to load client middleware manifest')\n ),\n undefined\n )\n }\n // Development both Turbopack and Webpack\n } else {\n if (window.__DEV_MIDDLEWARE_MATCHERS) {\n return window.__DEV_MIDDLEWARE_MATCHERS\n } else {\n if (!this.promisedMiddlewareMatchers) {\n // TODO: Decide what should happen when fetching fails instead of asserting\n // @ts-ignore\n this.promisedMiddlewareMatchers = fetch(\n `${this.assetPrefix}/_next/static/${this.buildId}/${DEV_CLIENT_MIDDLEWARE_MANIFEST}`,\n { credentials: 'same-origin' }\n )\n .then((res) => res.json())\n .then((matchers: ProxyMatcher[]) => {\n window.__DEV_MIDDLEWARE_MATCHERS = matchers\n return matchers\n })\n .catch((err) => {\n console.log(`Failed to fetch _devMiddlewareManifest`, err)\n })\n }\n // TODO Remove this assertion as this could be undefined\n return this.promisedMiddlewareMatchers!\n }\n }\n }\n\n getDataHref(params: {\n asPath: string\n href: string\n locale?: string | false\n skipInterpolation?: boolean\n }): string {\n const { asPath, href, locale } = params\n const { pathname: hrefPathname, query, search } = parseRelativeUrl(href)\n const { pathname: asPathname } = parseRelativeUrl(asPath)\n const route = removeTrailingSlash(hrefPathname)\n if (route[0] !== '/') {\n throw new Error(`Route name should start with a \"/\", got \"${route}\"`)\n }\n\n const getHrefForSlug = (path: string) => {\n const dataRoute = getAssetPathFromRoute(\n removeTrailingSlash(addLocale(path, locale)),\n '.json'\n )\n return addBasePath(\n `/_next/data/${this.buildId}${dataRoute}${search}`,\n true\n )\n }\n\n return getHrefForSlug(\n params.skipInterpolation\n ? asPathname\n : isDynamicRoute(route)\n ? interpolateAs(hrefPathname, asPathname, query).result\n : route\n )\n }\n\n _isSsg(\n /** the route (file-system path) */\n route: string\n ): Promise<boolean> {\n return this.promisedSsgManifest.then((manifest) => manifest.has(route))\n }\n\n loadPage(route: string): Promise<GoodPageCache> {\n return this.routeLoader.loadRoute(route).then((res) => {\n if ('component' in res) {\n return {\n page: res.component,\n mod: res.exports,\n styleSheets: res.styles.map((o) => ({\n href: o.href,\n text: o.content,\n })),\n }\n }\n throw res.error\n })\n }\n\n prefetch(route: string): Promise<void> {\n return this.routeLoader.prefetch(route)\n }\n}\n","import type { ComponentType } from 'react'\nimport type { ProxyMatcher } from '../build/analysis/get-page-static-info'\nimport type { RequiredServerFilesManifest } from '../build'\nimport getAssetPathFromRoute from '../shared/lib/router/utils/get-asset-path-from-route'\nimport { __unsafeCreateTrustedScriptURL } from './trusted-types'\nimport { requestIdleCallback } from './request-idle-callback'\nimport { getAssetTokenQuery } from '../shared/lib/deployment-id'\nimport { encodeURIPath } from '../shared/lib/encode-uri-path'\nimport { resolvePromiseWithTimeout } from './lib/promise'\n\ndeclare global {\n interface Window {\n __BUILD_MANIFEST?: Record<string, string[]>\n __BUILD_MANIFEST_CB?: Function\n __SERVER_FILES_MANIFEST?: RequiredServerFilesManifest\n __MIDDLEWARE_MATCHERS?: ProxyMatcher[]\n __MIDDLEWARE_MATCHERS_CB?: Function\n __REACT_LOADABLE_MANIFEST?: any\n __DYNAMIC_CSS_MANIFEST?: any\n __RSC_MANIFEST?: any\n __RSC_SERVER_MANIFEST?: any\n __NEXT_FONT_MANIFEST?: any\n __SUBRESOURCE_INTEGRITY_MANIFEST?: string\n __INTERCEPTION_ROUTE_REWRITE_MANIFEST?: string\n }\n}\n\ninterface LoadedEntrypointSuccess {\n component: ComponentType\n exports: any\n}\ninterface LoadedEntrypointFailure {\n error: unknown\n}\ntype RouteEntrypoint = LoadedEntrypointSuccess | LoadedEntrypointFailure\n\ninterface RouteStyleSheet {\n href: string\n content: string\n}\n\ninterface LoadedRouteSuccess extends LoadedEntrypointSuccess {\n styles: RouteStyleSheet[]\n}\ninterface LoadedRouteFailure {\n error: unknown\n}\ntype RouteLoaderEntry = LoadedRouteSuccess | LoadedRouteFailure\n\ninterface Future<V> {\n resolve: (entrypoint: V) => void\n future: Promise<V>\n}\nfunction withFuture<T extends object>(\n key: string,\n map: Map<string, Future<T> | T>,\n generator?: () => Promise<T>\n): Promise<T> {\n let entry = map.get(key)\n if (entry) {\n if ('future' in entry) {\n return entry.future\n }\n return Promise.resolve(entry)\n }\n let resolver: (entrypoint: T) => void\n const prom: Promise<T> = new Promise<T>((resolve) => {\n resolver = resolve\n })\n map.set(key, { resolve: resolver!, future: prom })\n return generator\n ? generator()\n .then((value) => {\n resolver(value)\n return value\n })\n .catch((err) => {\n map.delete(key)\n throw err\n })\n : prom\n}\n\nexport interface RouteLoader {\n whenEntrypoint(route: string): Promise<RouteEntrypoint>\n onEntrypoint(route: string, execute: () => unknown): void\n loadRoute(route: string, prefetch?: boolean): Promise<RouteLoaderEntry>\n prefetch(route: string): Promise<void>\n}\n\nconst ASSET_LOAD_ERROR = Symbol('ASSET_LOAD_ERROR')\n// TODO: unexport\nexport function markAssetError(err: Error): Error {\n return Object.defineProperty(err, ASSET_LOAD_ERROR, {})\n}\n\nexport function isAssetError(err?: Error): boolean | undefined {\n return err && ASSET_LOAD_ERROR in err\n}\n\nfunction hasPrefetch(link?: HTMLLinkElement): boolean {\n try {\n link = document.createElement('link')\n return (\n // detect IE11 since it supports prefetch but isn't detected\n // with relList.support\n (!!window.MSInputMethodContext && !!(document as any).documentMode) ||\n link.relList.supports('prefetch')\n )\n } catch {\n return false\n }\n}\n\nconst canPrefetch: boolean = hasPrefetch()\n\nfunction prefetchViaDom(\n href: string,\n as: string,\n link?: HTMLLinkElement\n): Promise<any> {\n return new Promise<void>((resolve, reject) => {\n const selector = `\n link[rel=\"prefetch\"][href^=\"${href}\"],\n link[rel=\"preload\"][href^=\"${href}\"],\n script[src^=\"${href}\"]`\n if (document.querySelector(selector)) {\n return resolve()\n }\n\n link = document.createElement('link')\n\n // The order of property assignment here is intentional:\n if (as) link!.as = as\n link!.rel = `prefetch`\n link!.crossOrigin = process.env.__NEXT_CROSS_ORIGIN!\n link!.onload = resolve as any\n link!.onerror = () =>\n reject(markAssetError(new Error(`Failed to prefetch: ${href}`)))\n\n // `href` should always be last:\n link!.href = href\n\n document.head.appendChild(link)\n })\n}\n\nfunction appendScript(\n src: TrustedScriptURL | string,\n script?: HTMLScriptElement\n): Promise<unknown> {\n return new Promise((resolve, reject) => {\n script = document.createElement('script')\n\n // The order of property assignment here is intentional.\n // 1. Setup success/failure hooks in case the browser synchronously\n // executes when `src` is set.\n script.onload = resolve\n script.onerror = () =>\n reject(markAssetError(new Error(`Failed to load script: ${src}`)))\n\n // 2. Configure the cross-origin attribute before setting `src` in case the\n // browser begins to fetch.\n script.crossOrigin = process.env.__NEXT_CROSS_ORIGIN!\n\n // 3. Finally, set the source and inject into the DOM in case the child\n // must be appended for fetching to start.\n script.src = src as string\n document.body.appendChild(script)\n })\n}\n\n// We wait for pages to be built in dev before we start the route transition\n// timeout to prevent an un-necessary hard navigation in development.\nlet devBuildPromise: Promise<void> | undefined\n\n// TODO: stop exporting or cache the failure\n// It'd be best to stop exporting this. It's an implementation detail. We're\n// only exporting it for backwards compatibility with the `page-loader`.\n// Only cache this response as a last resort if we cannot eliminate all other\n// code branches that use the Build Manifest Callback and push them through\n// the Route Loader interface.\nexport function getClientBuildManifest() {\n if (self.__BUILD_MANIFEST) {\n return Promise.resolve(self.__BUILD_MANIFEST)\n }\n\n const onBuildManifest = new Promise<Record<string, string[]>>((resolve) => {\n // Mandatory because this is not concurrent safe:\n const cb = self.__BUILD_MANIFEST_CB\n self.__BUILD_MANIFEST_CB = () => {\n resolve(self.__BUILD_MANIFEST!)\n cb && cb()\n }\n })\n\n return resolvePromiseWithTimeout(\n onBuildManifest,\n markAssetError(new Error('Failed to load client build manifest')),\n devBuildPromise\n )\n}\n\ninterface RouteFiles {\n scripts: (TrustedScriptURL | string)[]\n css: string[]\n}\nfunction getFilesForRoute(\n assetPrefix: string,\n route: string\n): Promise<RouteFiles> {\n if (process.env.NODE_ENV === 'development') {\n const scriptUrl =\n assetPrefix +\n '/_next/static/chunks/pages' +\n encodeURIPath(getAssetPathFromRoute(route, '.js')) +\n getAssetTokenQuery()\n return Promise.resolve({\n scripts: [__unsafeCreateTrustedScriptURL(scriptUrl)],\n // Styles are handled by `style-loader` in development:\n css: [],\n })\n }\n return getClientBuildManifest().then((manifest) => {\n if (!(route in manifest)) {\n throw markAssetError(new Error(`Failed to lookup route: ${route}`))\n }\n const allFiles = manifest[route].map(\n (entry) => assetPrefix + '/_next/' + encodeURIPath(entry)\n )\n return {\n scripts: allFiles\n .filter((v) => v.endsWith('.js'))\n .map((v) => __unsafeCreateTrustedScriptURL(v) + getAssetTokenQuery()),\n css: allFiles\n .filter((v) => v.endsWith('.css'))\n .map((v) => v + getAssetTokenQuery()),\n }\n })\n}\n\nexport function createRouteLoader(assetPrefix: string): RouteLoader {\n const entrypoints: Map<string, Future<RouteEntrypoint> | RouteEntrypoint> =\n new Map()\n const loadedScripts: Map<string, Promise<unknown>> = new Map()\n const styleSheets: Map<string, Promise<RouteStyleSheet>> = new Map()\n const routes: Map<string, Future<RouteLoaderEntry> | RouteLoaderEntry> =\n new Map()\n\n function maybeExecuteScript(\n src: TrustedScriptURL | string\n ): Promise<unknown> {\n // With HMR we might need to \"reload\" scripts when they are\n // disposed and readded. Executing scripts twice has no functional\n // differences\n if (process.env.NODE_ENV !== 'development') {\n let prom: Promise<unknown> | undefined = loadedScripts.get(src.toString())\n if (prom) {\n return prom\n }\n\n // Skip executing script if it's already in the DOM:\n if (document.querySelector(`script[src^=\"${src}\"]`)) {\n return Promise.resolve()\n }\n\n loadedScripts.set(src.toString(), (prom = appendScript(src)))\n return prom\n } else {\n return appendScript(src)\n }\n }\n\n function fetchStyleSheet(href: string): Promise<RouteStyleSheet> {\n let prom: Promise<RouteStyleSheet> | undefined = styleSheets.get(href)\n if (prom) {\n return prom\n }\n\n styleSheets.set(\n href,\n (prom = fetch(href, { credentials: 'same-origin' })\n .then((res) => {\n if (!res.ok) {\n throw new Error(`Failed to load stylesheet: ${href}`)\n }\n return res.text().then((text) => ({ href: href, content: text }))\n })\n .catch((err) => {\n throw markAssetError(err)\n }))\n )\n return prom\n }\n\n return {\n whenEntrypoint(route: string) {\n return withFuture(route, entrypoints)\n },\n onEntrypoint(route: string, execute: undefined | (() => unknown)) {\n ;(execute\n ? Promise.resolve()\n .then(() => execute())\n .then(\n (exports: any) => ({\n component: (exports && exports.default) || exports,\n exports: exports,\n }),\n (err) => ({ error: err })\n )\n : Promise.resolve(undefined)\n ).then((input: RouteEntrypoint | undefined) => {\n const old = entrypoints.get(route)\n if (old && 'resolve' in old) {\n if (input) {\n entrypoints.set(route, input)\n old.resolve(input)\n }\n } else {\n if (input) {\n entrypoints.set(route, input)\n } else {\n entrypoints.delete(route)\n }\n // when this entrypoint has been resolved before\n // the route is outdated and we want to invalidate\n // this cache entry\n routes.delete(route)\n }\n })\n },\n loadRoute(route: string, prefetch?: boolean) {\n return withFuture<RouteLoaderEntry>(route, routes, () => {\n let devBuildPromiseResolve: () => void\n\n if (process.env.NODE_ENV === 'development') {\n devBuildPromise = new Promise<void>((resolve) => {\n devBuildPromiseResolve = resolve\n })\n }\n\n return resolvePromiseWithTimeout(\n getFilesForRoute(assetPrefix, route)\n .then(({ scripts, css }) => {\n return Promise.all([\n entrypoints.has(route)\n ? []\n : Promise.all(scripts.map(maybeExecuteScript)),\n Promise.all(css.map(fetchStyleSheet)),\n ] as const)\n })\n .then((res) => {\n return this.whenEntrypoint(route).then((entrypoint) => ({\n entrypoint,\n styles: res[1],\n }))\n }),\n markAssetError(new Error(`Route did not complete loading: ${route}`)),\n devBuildPromise\n )\n .then(({ entrypoint, styles }) => {\n const res: RouteLoaderEntry = Object.assign<\n { styles: RouteStyleSheet[] },\n RouteEntrypoint\n >({ styles: styles! }, entrypoint)\n return 'error' in entrypoint ? entrypoint : res\n })\n .catch((err) => {\n if (prefetch) {\n // we don't want to cache errors during prefetch\n throw err\n }\n return { error: err }\n })\n .finally(() => devBuildPromiseResolve?.())\n })\n },\n prefetch(route: string): Promise<void> {\n // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118\n // License: Apache 2.0\n let cn\n if ((cn = (navigator as any).connection)) {\n // Don't prefetch if using 2G or if Save-Data is enabled.\n if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve()\n }\n return getFilesForRoute(assetPrefix, route)\n .then((output) =>\n Promise.all(\n canPrefetch\n ? output.scripts.map((script) =>\n prefetchViaDom(script.toString(), 'script')\n )\n : []\n )\n )\n .then(() => {\n requestIdleCallback(() => this.loadRoute(route, true).catch(() => {}))\n })\n .catch(\n // swallow prefetch errors\n () => {}\n )\n },\n }\n}\n","import { normalizeAppPath } from './app-paths'\n\n// order matters here, the first match will be used\nexport const INTERCEPTION_ROUTE_MARKERS = [\n '(..)(..)',\n '(.)',\n '(..)',\n '(...)',\n] as const\n\nexport type InterceptionMarker = (typeof INTERCEPTION_ROUTE_MARKERS)[number]\n\nexport function isInterceptionRouteAppPath(path: string): boolean {\n // TODO-APP: add more serious validation\n return (\n path\n .split('/')\n .find((segment) =>\n INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n ) !== undefined\n )\n}\n\ntype InterceptionRouteInformation = {\n /**\n * The intercepting route. This is the route that is being intercepted or the\n * route that the user was coming from. This is matched by the Next-Url\n * header.\n */\n interceptingRoute: string\n\n /**\n * The intercepted route. This is the route that is being intercepted or the\n * route that the user is going to. This is matched by the request pathname.\n */\n interceptedRoute: string\n}\n\nexport function extractInterceptionRouteInformation(\n path: string\n): InterceptionRouteInformation {\n let interceptingRoute: string | undefined\n let marker: (typeof INTERCEPTION_ROUTE_MARKERS)[number] | undefined\n let interceptedRoute: string | undefined\n\n for (const segment of path.split('/')) {\n marker = INTERCEPTION_ROUTE_MARKERS.find((m) => segment.startsWith(m))\n if (marker) {\n ;[interceptingRoute, interceptedRoute] = path.split(marker, 2)\n break\n }\n }\n\n if (!interceptingRoute || !marker || !interceptedRoute) {\n throw new Error(\n `Invalid interception route: ${path}. Must be in the format /<intercepting route>/(..|...|..)(..)/<intercepted route>`\n )\n }\n\n interceptingRoute = normalizeAppPath(interceptingRoute) // normalize the path, e.g. /(blog)/feed -> /feed\n\n switch (marker) {\n case '(.)':\n // (.) indicates that we should match with sibling routes, so we just need to append the intercepted route to the intercepting route\n if (interceptingRoute === '/') {\n interceptedRoute = `/${interceptedRoute}`\n } else {\n interceptedRoute = interceptingRoute + '/' + interceptedRoute\n }\n break\n case '(..)':\n // (..) indicates that we should match at one level up, so we need to remove the last segment of the intercepting route\n if (interceptingRoute === '/') {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..) marker at the root level, use (.) instead.`\n )\n }\n interceptedRoute = interceptingRoute\n .split('/')\n .slice(0, -1)\n .concat(interceptedRoute)\n .join('/')\n break\n case '(...)':\n // (...) will match the route segment in the root directory, so we need to use the root directory to prepend the intercepted route\n interceptedRoute = '/' + interceptedRoute\n break\n case '(..)(..)':\n // (..)(..) indicates that we should match at two levels up, so we need to remove the last two segments of the intercepting route\n\n const splitInterceptingRoute = interceptingRoute.split('/')\n if (splitInterceptingRoute.length <= 2) {\n throw new Error(\n `Invalid interception route: ${path}. Cannot use (..)(..) marker at the root level or one level up.`\n )\n }\n\n interceptedRoute = splitInterceptingRoute\n .slice(0, -2)\n .concat(interceptedRoute)\n .join('/')\n break\n default:\n throw new Error('Invariant: unexpected marker')\n }\n\n return { interceptingRoute, interceptedRoute }\n}\n","import React from 'react'\n\nexport const HeadManagerContext: React.Context<{\n updateHead?: (state: any) => void\n mountedInstances?: any\n updateScripts?: (state: any) => void\n scripts?: any\n getIsSsr?: () => boolean\n\n // Used in app directory, to render script tags as server components.\n appDir?: boolean\n nonce?: string\n}> = React.createContext({})\n\nif (process.env.NODE_ENV !== 'production') {\n HeadManagerContext.displayName = 'HeadManagerContext'\n}\n","// This has to be a shared module which is shared between client component error boundary and dynamic component\nconst BAILOUT_TO_CSR = 'BAILOUT_TO_CLIENT_SIDE_RENDERING'\n\n/** An error that should be thrown when we want to bail out to client-side rendering. */\nexport class BailoutToCSRError extends Error {\n public readonly digest = BAILOUT_TO_CSR\n\n constructor(public readonly reason: string) {\n super(`Bail out to client-side rendering: ${reason}`)\n }\n}\n\n/** Checks if a passed argument is an error that is thrown if we want to bail out to client-side rendering. */\nexport function isBailoutToCSRError(err: unknown): err is BailoutToCSRError {\n if (typeof err !== 'object' || err === null || !('digest' in err)) {\n return false\n }\n\n return err.digest === BAILOUT_TO_CSR\n}\n","/**\n * Stores the Trusted Types Policy. Starts as undefined and can be set to null\n * if Trusted Types is not supported in the browser.\n */\nlet policy: TrustedTypePolicy | null | undefined\n\n/**\n * Getter for the Trusted Types Policy. If it is undefined, it is instantiated\n * here or set to null if Trusted Types is not supported in the browser.\n */\nfunction getPolicy() {\n if (typeof policy === 'undefined' && typeof window !== 'undefined') {\n policy =\n window.trustedTypes?.createPolicy('nextjs', {\n createHTML: (input) => input,\n createScript: (input) => input,\n createScriptURL: (input) => input,\n }) || null\n }\n\n return policy\n}\n\n/**\n * Unsafely promote a string to a TrustedScriptURL, falling back to strings\n * when Trusted Types are not available.\n * This is a security-sensitive function; any use of this function\n * must go through security review. In particular, it must be assured that the\n * provided string will never cause an XSS vulnerability if used in a context\n * that will cause a browser to load and execute a resource, e.g. when\n * assigning to script.src.\n */\nexport function __unsafeCreateTrustedScriptURL(\n url: string\n): TrustedScriptURL | string {\n return getPolicy()?.createScriptURL(url) || url\n}\n","import { isAbsoluteUrl, getLocationOrigin } from '../../utils'\nimport { hasBasePath } from '../../../../client/has-base-path'\n\n/**\n * Detects whether a given url is routable by the Next.js router (browser only).\n */\nexport function isLocalURL(url: string): boolean {\n // prevent a hydration mismatch on href for url with anchor refs\n if (!isAbsoluteUrl(url)) return true\n try {\n // absolute urls can be local if they are on the same origin\n const locationOrigin = getLocationOrigin()\n const resolved = new URL(url, locationOrigin)\n return resolved.origin === locationOrigin && hasBasePath(resolved.pathname)\n } catch (_) {\n return false\n }\n}\n","// Format function modified from nodejs\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { UrlObject } from 'url'\nimport type { ParsedUrlQuery } from 'querystring'\nimport * as querystring from './querystring'\n\nconst slashedProtocols = /https?|ftp|gopher|file/\n\nexport function formatUrl(urlObj: UrlObject) {\n let { auth, hostname } = urlObj\n let protocol = urlObj.protocol || ''\n let pathname = urlObj.pathname || ''\n let hash = urlObj.hash || ''\n let query = urlObj.query || ''\n let host: string | false = false\n\n auth = auth ? encodeURIComponent(auth).replace(/%3A/i, ':') + '@' : ''\n\n if (urlObj.host) {\n host = auth + urlObj.host\n } else if (hostname) {\n host = auth + (~hostname.indexOf(':') ? `[${hostname}]` : hostname)\n if (urlObj.port) {\n host += ':' + urlObj.port\n }\n }\n\n if (query && typeof query === 'object') {\n query = String(querystring.urlQueryToSearchParams(query as ParsedUrlQuery))\n }\n\n let search = urlObj.search || (query && `?${query}`) || ''\n\n if (protocol && !protocol.endsWith(':')) protocol += ':'\n\n if (\n urlObj.slashes ||\n ((!protocol || slashedProtocols.test(protocol)) && host !== false)\n ) {\n host = '//' + (host || '')\n if (pathname && pathname[0] !== '/') pathname = '/' + pathname\n } else if (!host) {\n host = ''\n }\n\n if (hash && hash[0] !== '#') hash = '#' + hash\n if (search && search[0] !== '?') search = '?' + search\n\n pathname = pathname.replace(/[?#]/g, encodeURIComponent)\n search = search.replace('#', '%23')\n\n return `${protocol}${host}${pathname}${search}${hash}`\n}\n\nexport const urlObjectKeys = [\n 'auth',\n 'hash',\n 'host',\n 'hostname',\n 'href',\n 'path',\n 'pathname',\n 'port',\n 'protocol',\n 'query',\n 'search',\n 'slashes',\n]\n\nexport function formatWithValidation(url: UrlObject): string {\n if (process.env.NODE_ENV === 'development') {\n if (url !== null && typeof url === 'object') {\n Object.keys(url).forEach((key) => {\n if (!urlObjectKeys.includes(key)) {\n console.warn(\n `Unknown key passed via urlObject into url.format: ${key}`\n )\n }\n })\n }\n }\n\n return formatUrl(url)\n}\n","export const requestIdleCallback =\n (typeof self !== 'undefined' &&\n self.requestIdleCallback &&\n self.requestIdleCallback.bind(window)) ||\n function (cb: IdleRequestCallback): number {\n let start = Date.now()\n return self.setTimeout(function () {\n cb({\n didTimeout: false,\n timeRemaining: function () {\n return Math.max(0, 50 - (Date.now() - start))\n },\n })\n }, 1)\n }\n\nexport const cancelIdleCallback =\n (typeof self !== 'undefined' &&\n self.cancelIdleCallback &&\n self.cancelIdleCallback.bind(window)) ||\n function (id: number) {\n return clearTimeout(id)\n }\n","\"trimStart\"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),\"trimEnd\"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),\"description\"in Symbol.prototype||Object.defineProperty(Symbol.prototype,\"description\",{configurable:!0,get:function(){var t=/\\((.*)\\)/.exec(this.toString());return t?t[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(t,r){return r=this.concat.apply([],this),t>1&&r.some(Array.isArray)?r.flat(t-1):r},Array.prototype.flatMap=function(t,r){return this.map(t,r).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(t){if(\"function\"!=typeof t)return this.then(t,t);var r=this.constructor||Promise;return this.then(function(n){return r.resolve(t()).then(function(){return n})},function(n){return r.resolve(t()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(t){return Array.from(t).reduce(function(t,r){return t[r[0]]=r[1],t},{})}),Array.prototype.at||(Array.prototype.at=function(t){var r=Math.trunc(t)||0;if(r<0&&(r+=this.length),!(r<0||r>=this.length))return this[r]}),Object.hasOwn||(Object.hasOwn=function(t,r){if(null==t)throw new TypeError(\"Cannot convert undefined or null to object\");return Object.prototype.hasOwnProperty.call(Object(t),r)}),\"canParse\"in URL||(URL.canParse=function(t,r){try{return!!new URL(t,r)}catch(t){return!1}});\n","import mitt from '../../shared/lib/mitt'\nimport type { MittEmitter } from '../../shared/lib/mitt'\n\nexport type SpanOptions = {\n startTime?: number\n attributes?: Record<string, unknown>\n}\n\nexport type SpanState =\n | {\n state: 'inprogress'\n }\n | {\n state: 'ended'\n endTime: number\n }\n\ninterface ISpan {\n name: string\n startTime: number\n attributes: Record<string, unknown>\n state: SpanState\n end(endTime?: number): void\n}\n\nclass Span implements ISpan {\n name: string\n startTime: number\n onSpanEnd: (span: Span) => void\n state: SpanState\n attributes: Record<string, unknown>\n\n constructor(\n name: string,\n options: SpanOptions,\n onSpanEnd: (span: Span) => void\n ) {\n this.name = name\n this.attributes = options.attributes ?? {}\n this.startTime = options.startTime ?? Date.now()\n this.onSpanEnd = onSpanEnd\n this.state = { state: 'inprogress' }\n }\n\n end(endTime?: number) {\n if (this.state.state === 'ended') {\n throw new Error('Span has already ended')\n }\n\n this.state = {\n state: 'ended',\n endTime: endTime ?? Date.now(),\n }\n\n this.onSpanEnd(this)\n }\n}\n\nclass Tracer {\n _emitter: MittEmitter<string> = mitt()\n\n private handleSpanEnd = (span: Span) => {\n this._emitter.emit('spanend', span)\n }\n\n startSpan(name: string, options: SpanOptions) {\n return new Span(name, options, this.handleSpanEnd)\n }\n\n onSpanEnd(cb: (span: ISpan) => void): () => void {\n this._emitter.on('spanend', cb)\n return () => {\n this._emitter.off('spanend', cb)\n }\n }\n}\n\nexport type { ISpan as Span }\nexport default new Tracer()\n","import { removeTrailingSlash } from '../shared/lib/router/utils/remove-trailing-slash'\nimport { parsePath } from '../shared/lib/router/utils/parse-path'\n\n/**\n * Normalizes the trailing slash of a path according to the `trailingSlash` option\n * in `next.config.js`.\n */\nexport const normalizePathTrailingSlash = (path: string) => {\n if (!path.startsWith('/') || process.env.__NEXT_MANUAL_TRAILING_SLASH) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n if (process.env.__NEXT_TRAILING_SLASH) {\n if (/\\.[^/]+\\/?$/.test(pathname)) {\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n } else if (pathname.endsWith('/')) {\n return `${pathname}${query}${hash}`\n } else {\n return `${pathname}/${query}${hash}`\n }\n }\n\n return `${removeTrailingSlash(pathname)}${query}${hash}`\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Checks if a given path starts with a given prefix. It ensures it matches\n * exactly without containing extra chars. e.g. prefix /docs should replace\n * for /docs, /docs/, /docs/a but not /docsss\n * @param path The path to check.\n * @param prefix The prefix to check against.\n */\nexport function pathHasPrefix(path: string, prefix: string) {\n if (typeof path !== 'string') {\n return false\n }\n\n const { pathname } = parsePath(path)\n return pathname === prefix || pathname.startsWith(prefix + '/')\n}\n","/**\n * ReadonlyURLSearchParams implementation shared between client and server.\n * This file is intentionally not marked as 'use client' or 'use server'\n * so it can be imported by both environments.\n */\n\n/** @internal */\nclass ReadonlyURLSearchParamsError extends Error {\n constructor() {\n super(\n 'Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams'\n )\n }\n}\n\n/**\n * A read-only version of URLSearchParams that throws errors when mutation methods are called.\n * This ensures that the URLSearchParams returned by useSearchParams() cannot be mutated.\n */\nexport class ReadonlyURLSearchParams extends URLSearchParams {\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n append() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n delete() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n set() {\n throw new ReadonlyURLSearchParamsError()\n }\n /** @deprecated Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams */\n sort() {\n throw new ReadonlyURLSearchParamsError()\n }\n}\n","import React from 'react'\n\nimport type {\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n AppType,\n} from '../shared/lib/utils'\nimport type { Router } from '../client/router'\n\nimport { loadGetInitialProps } from '../shared/lib/utils'\n\nexport type { AppInitialProps, AppType }\n\nexport type { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType<Router>\n\nexport type AppProps<P = any> = AppPropsType<Router, P>\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise<AppInitialProps> {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App<P = any, CP = {}, S = {}> extends React.Component<\n P & AppProps<CP>,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps<CP>\n\n return <Component {...pageProps} />\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n PARAM_SEPARATOR: null,\n hasAdjacentParameterIssues: null,\n normalizeAdjacentParameters: null,\n normalizeTokensForRegexp: null,\n stripNormalizedSeparators: null,\n stripParameterSeparators: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n PARAM_SEPARATOR: function() {\n return PARAM_SEPARATOR;\n },\n hasAdjacentParameterIssues: function() {\n return hasAdjacentParameterIssues;\n },\n normalizeAdjacentParameters: function() {\n return normalizeAdjacentParameters;\n },\n normalizeTokensForRegexp: function() {\n return normalizeTokensForRegexp;\n },\n stripNormalizedSeparators: function() {\n return stripNormalizedSeparators;\n },\n stripParameterSeparators: function() {\n return stripParameterSeparators;\n }\n});\nconst PARAM_SEPARATOR = '_NEXTSEP_';\nfunction hasAdjacentParameterIssues(route) {\n if (typeof route !== 'string') return false;\n // Check for interception route markers followed immediately by parameters\n // Pattern: /(.):param, /(..):param, /(...):param, /(.)(.):param etc.\n // These patterns cause \"Must have text between two parameters\" errors\n if (/\\/\\(\\.{1,3}\\):[^/\\s]+/.test(route)) {\n return true;\n }\n // Check for basic adjacent parameters without separators\n // Pattern: :param1:param2 (but not :param* or other URL patterns)\n if (/:[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*/.test(route)) {\n return true;\n }\n return false;\n}\nfunction normalizeAdjacentParameters(route) {\n let normalized = route;\n // Handle interception route patterns: (.):param -> (.)_NEXTSEP_:param\n normalized = normalized.replace(/(\\([^)]*\\)):([^/\\s]+)/g, `$1${PARAM_SEPARATOR}:$2`);\n // Handle other adjacent parameter patterns: :param1:param2 -> :param1_NEXTSEP_:param2\n normalized = normalized.replace(/:([^:/\\s)]+)(?=:)/g, `:$1${PARAM_SEPARATOR}`);\n return normalized;\n}\nfunction normalizeTokensForRegexp(tokens) {\n return tokens.map((token)=>{\n // Token union type: Token = string | TokenObject\n // Literal path segments are strings, parameters/wildcards are objects\n if (typeof token === 'object' && token !== null && // Not all token objects have 'modifier' property (e.g., simple text tokens)\n 'modifier' in token && // Only repeating modifiers (* or +) cause the validation error\n // Other modifiers like '?' (optional) are fine\n (token.modifier === '*' || token.modifier === '+') && // Token objects can have different shapes depending on route pattern\n 'prefix' in token && 'suffix' in token && // Both prefix and suffix must be empty strings\n // This is what causes the validation error in path-to-regexp\n token.prefix === '' && token.suffix === '') {\n // Add minimal prefix to satisfy path-to-regexp validation\n // We use '/' as it's the most common path delimiter and won't break route matching\n // The prefix gets used in regex generation but doesn't affect parameter extraction\n return {\n ...token,\n prefix: '/'\n };\n }\n return token;\n });\n}\nfunction stripNormalizedSeparators(pathname) {\n // Remove separator after interception route markers\n // Pattern: (.)_NEXTSEP_ -> (.), (..)_NEXTSEP_ -> (..), etc.\n // The separator appears after the closing paren of interception markers\n return pathname.replace(new RegExp(`\\\\)${PARAM_SEPARATOR}`, 'g'), ')');\n}\nfunction stripParameterSeparators(params) {\n const cleaned = {};\n for (const [key, value] of Object.entries(params)){\n if (typeof value === 'string') {\n // Remove the separator if it appears at the start of parameter values\n cleaned[key] = value.replace(new RegExp(`^${PARAM_SEPARATOR}`), '');\n } else if (Array.isArray(value)) {\n // Handle array parameters (from repeated route segments)\n cleaned[key] = value.map((item)=>typeof item === 'string' ? item.replace(new RegExp(`^${PARAM_SEPARATOR}`), '') : item);\n } else {\n cleaned[key] = value;\n }\n }\n return cleaned;\n}\n\n//# sourceMappingURL=route-pattern-normalizer.js.map","// Translates a logical route into its pages asset path (relative from a common prefix)\n// \"asset path\" being its javascript file, data file, prerendered html,...\nexport default function getAssetPathFromRoute(\n route: string,\n ext: string = ''\n): string {\n const path =\n route === '/'\n ? '/index'\n : /^\\/index(\\/|$)/.test(route)\n ? `/index${route}`\n : route\n return path + ext\n}\n","import { isDynamicRoute } from '../router/utils'\nimport { normalizePathSep } from './normalize-path-sep'\n\n/**\n * Performs the opposite transformation of `normalizePagePath`. Note that\n * this function is not idempotent either in cases where there are multiple\n * leading `/index` for the page. Examples:\n * - `/index` -> `/`\n * - `/index/foo` -> `/foo`\n * - `/index/index` -> `/index`\n */\nexport function denormalizePagePath(page: string) {\n let _page = normalizePathSep(page)\n return _page.startsWith('/index/') && !isDynamicRoute(_page)\n ? _page.slice(6)\n : _page !== '/index'\n ? _page\n : '/'\n}\n","import { hasBasePath } from './has-base-path'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function removeBasePath(path: string): string {\n if (process.env.__NEXT_MANUAL_CLIENT_BASE_PATH) {\n if (!hasBasePath(path)) {\n return path\n }\n }\n\n // Can't trim the basePath if it has zero length!\n if (basePath.length === 0) return path\n\n path = path.slice(basePath.length)\n if (!path.startsWith('/')) path = `/${path}`\n return path\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"isAPIRoute\", {\n enumerable: true,\n get: function() {\n return isAPIRoute;\n }\n});\nfunction isAPIRoute(value) {\n return value === '/api' || Boolean(value == null ? void 0 : value.startsWith('/api/'));\n}\n\n//# sourceMappingURL=is-api-route.js.map","import { warnOnce } from '../../utils/warn-once'\n\n/**\n * Run function with `scroll-behavior: auto` applied to `<html/>`.\n * This css change will be reverted after the function finishes.\n */\nexport function disableSmoothScrollDuringRouteTransition(\n fn: () => void,\n options: { dontForceLayout?: boolean; onlyHashChange?: boolean } = {}\n) {\n // if only the hash is changed, we don't need to disable smooth scrolling\n // we only care to prevent smooth scrolling when navigating to a new page to avoid jarring UX\n if (options.onlyHashChange) {\n fn()\n return\n }\n\n const htmlElement = document.documentElement\n const hasDataAttribute = htmlElement.dataset.scrollBehavior === 'smooth'\n\n if (!hasDataAttribute) {\n // Warn if smooth scrolling is detected but no data attribute is present\n if (\n process.env.NODE_ENV === 'development' &&\n getComputedStyle(htmlElement).scrollBehavior === 'smooth'\n ) {\n warnOnce(\n 'Detected `scroll-behavior: smooth` on the `<html>` element. To disable smooth scrolling during route transitions, ' +\n 'add `data-scroll-behavior=\"smooth\"` to your <html> element. ' +\n 'Learn more: https://nextjs.org/docs/messages/missing-data-scroll-behavior'\n )\n }\n // No smooth scrolling configured, run directly without style manipulation\n fn()\n return\n }\n\n // Proceed with temporarily disabling smooth scrolling\n const existing = htmlElement.style.scrollBehavior\n htmlElement.style.scrollBehavior = 'auto'\n if (!options.dontForceLayout) {\n // In Chrome-based browsers we need to force reflow before calling `scrollTo`.\n // Otherwise it will not pickup the change in scrollBehavior\n // More info here: https://github.com/vercel/next.js/issues/40719#issuecomment-1336248042\n htmlElement.getClientRects()\n }\n fn()\n htmlElement.style.scrollBehavior = existing\n}\n","'use client'\n\nimport ReactDOM from 'react-dom'\nimport React, { useEffect, useContext, useRef, type JSX } from 'react'\nimport type { ScriptHTMLAttributes } from 'react'\nimport { HeadManagerContext } from '../shared/lib/head-manager-context.shared-runtime'\nimport { setAttributesFromProps } from './set-attributes-from-props'\nimport { requestIdleCallback } from './request-idle-callback'\nimport { htmlEscapeJsonString } from '../shared/lib/htmlescape'\n\nconst ScriptCache = new Map()\nconst LoadCache = new Set()\n\nexport interface ScriptProps extends ScriptHTMLAttributes<HTMLScriptElement> {\n strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive' | 'worker'\n id?: string\n onLoad?: (e: any) => void\n onReady?: () => void | null\n onError?: (e: any) => void\n children?: React.ReactNode\n stylesheets?: string[]\n}\n\n/**\n * @deprecated Use `ScriptProps` instead.\n */\nexport type Props = ScriptProps\n\nconst insertStylesheets = (stylesheets: string[]) => {\n // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad\n //\n // Using ReactDOM.preinit to feature detect appDir and inject styles\n // Stylesheets might have already been loaded if initialized with Script component\n // Re-inject styles here to handle scripts loaded via handleClientScriptLoad\n // ReactDOM.preinit handles dedup and ensures the styles are loaded only once\n if (ReactDOM.preinit) {\n stylesheets.forEach((stylesheet: string) => {\n ReactDOM.preinit(stylesheet, { as: 'style' })\n })\n\n return\n }\n\n // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad\n //\n // We use this function to load styles when appdir is not detected\n // TODO: Use React float APIs to load styles once available for pages dir\n if (typeof window !== 'undefined') {\n let head = document.head\n stylesheets.forEach((stylesheet: string) => {\n let link = document.createElement('link')\n\n link.type = 'text/css'\n link.rel = 'stylesheet'\n link.href = stylesheet\n\n head.appendChild(link)\n })\n }\n}\n\nconst loadScript = (props: ScriptProps): void => {\n const {\n src,\n id,\n onLoad = () => {},\n onReady = null,\n dangerouslySetInnerHTML,\n children = '',\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n } = props\n\n const cacheKey = id || src\n\n // Script has already loaded\n if (cacheKey && LoadCache.has(cacheKey)) {\n return\n }\n\n // Contents of this script are already loading/loaded\n if (ScriptCache.has(src)) {\n LoadCache.add(cacheKey)\n // It is possible that multiple `next/script` components all have same \"src\", but has different \"onLoad\"\n // This is to make sure the same remote script will only load once, but \"onLoad\" are executed in order\n ScriptCache.get(src).then(onLoad, onError)\n return\n }\n\n /** Execute after the script first loaded */\n const afterLoad = () => {\n // Run onReady for the first time after load event\n if (onReady) {\n onReady()\n }\n // add cacheKey to LoadCache when load successfully\n LoadCache.add(cacheKey)\n }\n\n const el = document.createElement('script')\n\n const loadPromise = new Promise<void>((resolve, reject) => {\n el.addEventListener('load', function (e) {\n resolve()\n if (onLoad) {\n onLoad.call(this, e)\n }\n afterLoad()\n })\n el.addEventListener('error', function (e) {\n reject(e)\n })\n }).catch(function (e) {\n if (onError) {\n onError(e)\n }\n })\n\n if (dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n el.innerHTML = (dangerouslySetInnerHTML.__html as string) || ''\n\n afterLoad()\n } else if (children) {\n el.textContent =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n\n afterLoad()\n } else if (src) {\n el.src = src\n // do not add cacheKey into LoadCache for remote script here\n // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above)\n\n ScriptCache.set(src, loadPromise)\n }\n\n setAttributesFromProps(el, props)\n\n if (strategy === 'worker') {\n el.setAttribute('type', 'text/partytown')\n }\n\n el.setAttribute('data-nscript', strategy)\n\n // Load styles associated with this script\n if (stylesheets) {\n insertStylesheets(stylesheets)\n }\n\n document.body.appendChild(el)\n}\n\nexport function handleClientScriptLoad(props: ScriptProps) {\n const { strategy = 'afterInteractive' } = props\n if (strategy === 'lazyOnload') {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n } else {\n loadScript(props)\n }\n}\n\nfunction loadLazyScript(props: ScriptProps) {\n if (document.readyState === 'complete') {\n requestIdleCallback(() => loadScript(props))\n } else {\n window.addEventListener('load', () => {\n requestIdleCallback(() => loadScript(props))\n })\n }\n}\n\nfunction addBeforeInteractiveToCache() {\n const scripts = [\n ...document.querySelectorAll('[data-nscript=\"beforeInteractive\"]'),\n ...document.querySelectorAll('[data-nscript=\"beforePageRender\"]'),\n ]\n scripts.forEach((script) => {\n const cacheKey = script.id || script.getAttribute('src')\n LoadCache.add(cacheKey)\n })\n}\n\nexport function initScriptLoader(scriptLoaderItems: ScriptProps[]) {\n scriptLoaderItems.forEach(handleClientScriptLoad)\n addBeforeInteractiveToCache()\n}\n\n/**\n * Load a third-party scripts in an optimized way.\n *\n * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script)\n */\nfunction Script(props: ScriptProps): JSX.Element | null {\n const {\n id,\n src = '',\n onLoad = () => {},\n onReady = null,\n strategy = 'afterInteractive',\n onError,\n stylesheets,\n ...restProps\n } = props\n\n // Context is available only during SSR\n let { updateScripts, scripts, getIsSsr, appDir, nonce } =\n useContext(HeadManagerContext)\n\n // if a nonce is explicitly passed to the script tag, favor that over the automatic handling\n nonce = restProps.nonce || nonce\n\n /**\n * - First mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache)\n * onReady is skipped, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. hasLoadScriptEffectCalled.current is false, loadScript executes\n * Once the script is loaded, the onLoad and onReady will be called by then\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n *\n * - Second mount:\n * 1. The useEffect for onReady executes\n * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache)\n * onReady is called, set hasOnReadyEffectCalled.current to true\n * 3. The useEffect for loadScript executes\n * 4. The script is already loaded, loadScript bails out\n * [If strict mode is enabled / is wrapped in <OffScreen /> component]\n * 5. The useEffect for onReady executes again\n * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped\n * 7. The useEffect for loadScript executes again\n * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped\n */\n const hasOnReadyEffectCalled = useRef(false)\n\n useEffect(() => {\n const cacheKey = id || src\n if (!hasOnReadyEffectCalled.current) {\n // Run onReady if script has loaded before but component is re-mounted\n if (onReady && cacheKey && LoadCache.has(cacheKey)) {\n onReady()\n }\n\n hasOnReadyEffectCalled.current = true\n }\n }, [onReady, id, src])\n\n const hasLoadScriptEffectCalled = useRef(false)\n\n useEffect(() => {\n if (!hasLoadScriptEffectCalled.current) {\n if (strategy === 'afterInteractive') {\n loadScript(props)\n } else if (strategy === 'lazyOnload') {\n loadLazyScript(props)\n }\n\n hasLoadScriptEffectCalled.current = true\n }\n }, [props, strategy])\n\n if (strategy === 'beforeInteractive' || strategy === 'worker') {\n if (updateScripts) {\n scripts[strategy] = (scripts[strategy] || []).concat([\n {\n id,\n src,\n onLoad,\n onReady,\n onError,\n ...restProps,\n nonce,\n },\n ])\n updateScripts(scripts)\n } else if (getIsSsr && getIsSsr()) {\n // Script has already loaded during SSR\n LoadCache.add(id || src)\n } else if (getIsSsr && !getIsSsr()) {\n loadScript({\n ...props,\n nonce,\n })\n }\n }\n\n // For the app directory, we need React Float to preload these scripts.\n if (appDir) {\n // Injecting stylesheets here handles beforeInteractive and worker scripts correctly\n // For other strategies injecting here ensures correct stylesheet order\n // ReactDOM.preinit handles loading the styles in the correct order,\n // also ensures the stylesheet is loaded only once and in a consistent manner\n //\n // Case 1: Styles for beforeInteractive/worker with appDir - handled here\n // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet\n // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here\n // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function\n if (stylesheets) {\n stylesheets.forEach((styleSrc) => {\n ReactDOM.preinit(styleSrc, { as: 'style' })\n })\n }\n\n // Before interactive scripts need to be loaded by Next.js' runtime instead\n // of native <script> tags, because they no longer have `defer`.\n if (strategy === 'beforeInteractive') {\n if (!src) {\n // For inlined scripts, we put the content in `children`.\n if (restProps.dangerouslySetInnerHTML) {\n // Casting since lib.dom.d.ts doesn't have TrustedHTML yet.\n restProps.children = restProps.dangerouslySetInnerHTML\n .__html as string\n delete restProps.dangerouslySetInnerHTML\n }\n\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${htmlEscapeJsonString(\n JSON.stringify([0, { ...restProps, id }])\n )})`,\n }}\n />\n )\n } else {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n return (\n <script\n nonce={nonce}\n dangerouslySetInnerHTML={{\n __html: `(self.__next_s=self.__next_s||[]).push(${htmlEscapeJsonString(\n JSON.stringify([src, { ...restProps, id }])\n )})`,\n }}\n />\n )\n }\n } else if (strategy === 'afterInteractive') {\n if (src) {\n // @ts-ignore\n ReactDOM.preload(\n src,\n restProps.integrity\n ? {\n as: 'script',\n integrity: restProps.integrity,\n nonce,\n crossOrigin: restProps.crossOrigin,\n }\n : { as: 'script', nonce, crossOrigin: restProps.crossOrigin }\n )\n }\n }\n }\n\n return null\n}\n\nObject.defineProperty(Script, '__nextScript', { value: true })\n\nexport default Script\n","import { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport type { DynamicParamTypes } from '../../app-router-types'\n\nexport type SegmentParam = {\n paramName: string\n paramType: DynamicParamTypes\n}\n\n/**\n * Parse dynamic route segment to type of parameter\n */\nexport function getSegmentParam(segment: string): SegmentParam | null {\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((marker) =>\n segment.startsWith(marker)\n )\n\n // if an interception marker is part of the path segment, we need to jump ahead\n // to the relevant portion for param parsing\n if (interceptionMarker) {\n segment = segment.slice(interceptionMarker.length)\n }\n\n if (segment.startsWith('[[...') && segment.endsWith(']]')) {\n return {\n // TODO-APP: Optional catchall does not currently work with parallel routes,\n // so for now aren't handling a potential interception marker.\n paramType: 'optional-catchall',\n paramName: segment.slice(5, -2),\n }\n }\n\n if (segment.startsWith('[...') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `catchall-intercepted-${interceptionMarker}`\n : 'catchall',\n paramName: segment.slice(4, -1),\n }\n }\n\n if (segment.startsWith('[') && segment.endsWith(']')) {\n return {\n paramType: interceptionMarker\n ? `dynamic-intercepted-${interceptionMarker}`\n : 'dynamic',\n paramName: segment.slice(1, -1),\n }\n }\n\n return null\n}\n\nexport function isCatchAll(\n type: DynamicParamTypes\n): type is\n | 'catchall'\n | 'catchall-intercepted-(..)(..)'\n | 'catchall-intercepted-(.)'\n | 'catchall-intercepted-(..)'\n | 'catchall-intercepted-(...)'\n | 'optional-catchall' {\n return (\n type === 'catchall' ||\n type === 'catchall-intercepted-(..)(..)' ||\n type === 'catchall-intercepted-(.)' ||\n type === 'catchall-intercepted-(..)' ||\n type === 'catchall-intercepted-(...)' ||\n type === 'optional-catchall'\n )\n}\n\nexport function getParamProperties(paramType: DynamicParamTypes): {\n repeat: boolean\n optional: boolean\n} {\n let repeat = false\n let optional = false\n\n switch (paramType) {\n case 'catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n repeat = true\n break\n case 'optional-catchall':\n repeat = true\n optional = true\n break\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n break\n default:\n paramType satisfies never\n }\n\n return { repeat, optional }\n}\n","import { InvariantError } from '../../invariant-error'\nimport { getSegmentParam, type SegmentParam } from '../utils/get-segment-param'\nimport {\n INTERCEPTION_ROUTE_MARKERS,\n type InterceptionMarker,\n} from '../utils/interception-routes'\n\nexport type RouteGroupAppRouteSegment = {\n type: 'route-group'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type ParallelRouteAppRouteSegment = {\n type: 'parallel-route'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type StaticAppRouteSegment = {\n type: 'static'\n name: string\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\nexport type DynamicAppRouteSegment = {\n type: 'dynamic'\n name: string\n param: SegmentParam\n\n /**\n * If present, this segment has an interception marker prefixing it.\n */\n interceptionMarker?: InterceptionMarker\n}\n\n/**\n * Represents a single segment in a route path.\n * Can be either static (e.g., \"blog\") or dynamic (e.g., \"[slug]\").\n */\nexport type AppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n | RouteGroupAppRouteSegment\n | ParallelRouteAppRouteSegment\n\nexport type NormalizedAppRouteSegment =\n | StaticAppRouteSegment\n | DynamicAppRouteSegment\n\nfunction normalizeEncodedDynamicPlaceholder(segment: string): string {\n if (!/%5b|%5d/i.test(segment)) {\n return segment\n }\n\n try {\n const decodedSegment = decodeURIComponent(segment)\n return getSegmentParam(decodedSegment) ? decodedSegment : segment\n } catch {\n return segment\n }\n}\n\nexport function parseAppRouteSegment(segment: string): AppRouteSegment | null {\n if (segment === '') {\n return null\n }\n\n // Check if the segment starts with an interception marker\n const interceptionMarker = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n\n const param = getSegmentParam(segment)\n if (param) {\n return {\n type: 'dynamic',\n name: segment,\n param,\n interceptionMarker,\n }\n } else if (segment.startsWith('(') && segment.endsWith(')')) {\n return {\n type: 'route-group',\n name: segment,\n interceptionMarker,\n }\n } else if (segment.startsWith('@')) {\n return {\n type: 'parallel-route',\n name: segment,\n interceptionMarker,\n }\n } else {\n return {\n type: 'static',\n name: segment,\n interceptionMarker,\n }\n }\n}\n\nexport type AppRoute = {\n normalized: boolean\n pathname: string\n segments: AppRouteSegment[]\n dynamicSegments: DynamicAppRouteSegment[]\n interceptionMarker: InterceptionMarker | undefined\n interceptingRoute: AppRoute | undefined\n interceptedRoute: AppRoute | undefined\n}\n\nexport type NormalizedAppRoute = Omit<AppRoute, 'normalized' | 'segments'> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n}\n\nexport function isNormalizedAppRoute(\n route: InterceptionAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isNormalizedAppRoute(\n route: AppRoute | InterceptionAppRoute\n): route is NormalizedAppRoute {\n return route.normalized\n}\n\nexport type InterceptionAppRoute = Omit<\n AppRoute,\n 'interceptionMarker' | 'interceptingRoute' | 'interceptedRoute'\n> & {\n interceptionMarker: InterceptionMarker\n interceptingRoute: AppRoute\n interceptedRoute: AppRoute\n}\n\nexport type NormalizedInterceptionAppRoute = Omit<\n InterceptionAppRoute,\n | 'normalized'\n | 'segments'\n | 'interceptionMarker'\n | 'interceptingRoute'\n | 'interceptedRoute'\n> & {\n normalized: true\n segments: NormalizedAppRouteSegment[]\n interceptionMarker: InterceptionMarker\n interceptingRoute: NormalizedAppRoute\n interceptedRoute: NormalizedAppRoute\n}\n\nexport function isInterceptionAppRoute(\n route: NormalizedAppRoute\n): route is NormalizedInterceptionAppRoute\nexport function isInterceptionAppRoute(\n route: AppRoute\n): route is InterceptionAppRoute {\n return (\n route.interceptionMarker !== undefined &&\n route.interceptingRoute !== undefined &&\n route.interceptedRoute !== undefined\n )\n}\n\nexport function parseAppRoute(\n pathname: string,\n normalized: true\n): NormalizedAppRoute\nexport function parseAppRoute(pathname: string, normalized: false): AppRoute\nexport function parseAppRoute(\n pathname: string,\n normalized: boolean\n): AppRoute | NormalizedAppRoute {\n const pathnameSegments = pathname.split('/').filter(Boolean)\n\n // Build segments array with static and dynamic segments\n const segments: AppRouteSegment[] = []\n\n // Parse if this is an interception route.\n let interceptionMarker: InterceptionMarker | undefined\n let interceptingRoute: AppRoute | NormalizedAppRoute | undefined\n let interceptedRoute: AppRoute | NormalizedAppRoute | undefined\n\n for (const segment of pathnameSegments) {\n const normalizedSegment = normalizeEncodedDynamicPlaceholder(segment)\n\n // Parse the segment into an AppSegment.\n const appSegment = parseAppRouteSegment(normalizedSegment)\n if (!appSegment) {\n continue\n }\n\n if (\n normalized &&\n (appSegment.type === 'route-group' ||\n appSegment.type === 'parallel-route')\n ) {\n throw new InvariantError(\n `${pathname} is being parsed as a normalized route, but it has a route group or parallel route segment.`\n )\n }\n\n segments.push(appSegment)\n\n if (appSegment.interceptionMarker) {\n const parts = pathname.split(appSegment.interceptionMarker)\n if (parts.length !== 2) {\n throw new Error(`Invalid interception route: ${pathname}`)\n }\n\n interceptingRoute = normalized\n ? parseAppRoute(parts[0], true)\n : parseAppRoute(parts[0], false)\n interceptedRoute = normalized\n ? parseAppRoute(parts[1], true)\n : parseAppRoute(parts[1], false)\n interceptionMarker = appSegment.interceptionMarker\n }\n }\n\n const dynamicSegments = segments.filter(\n (segment) => segment.type === 'dynamic'\n )\n\n return {\n normalized,\n pathname,\n segments,\n dynamicSegments,\n interceptionMarker,\n interceptingRoute,\n interceptedRoute,\n }\n}\n","import { HTML_LIMITED_BOT_UA_RE } from './html-bots'\n\n// Bot crawler that will spin up a headless browser and execute JS.\n// Only the main Googlebot search crawler executes JavaScript, not other Google crawlers.\n// x-ref: https://developers.google.com/search/docs/crawling-indexing/google-common-crawlers\n// This regex specifically matches \"Googlebot\" but NOT \"Mediapartners-Google\", \"AdsBot-Google\", etc.\nconst HEADLESS_BROWSER_BOT_UA_RE = /Googlebot(?!-)|Googlebot$/i\n\nexport const HTML_LIMITED_BOT_UA_RE_STRING = HTML_LIMITED_BOT_UA_RE.source\n\nexport { HTML_LIMITED_BOT_UA_RE }\n\nfunction isDomBotUA(userAgent: string) {\n return HEADLESS_BROWSER_BOT_UA_RE.test(userAgent)\n}\n\nfunction isHtmlLimitedBotUA(userAgent: string) {\n return HTML_LIMITED_BOT_UA_RE.test(userAgent)\n}\n\nexport function isBot(userAgent: string): boolean {\n return isDomBotUA(userAgent) || isHtmlLimitedBotUA(userAgent)\n}\n\nexport function getBotType(userAgent: string): 'dom' | 'html' | undefined {\n if (isDomBotUA(userAgent)) {\n return 'dom'\n }\n if (isHtmlLimitedBotUA(userAgent)) {\n return 'html'\n }\n return undefined\n}\n","import { getDeploymentId } from '../shared/lib/deployment-id'\n\nconst deploymentId = getDeploymentId()\n;(globalThis as any).NEXT_DEPLOYMENT_ID = deploymentId\n","import { pathHasPrefix } from './path-has-prefix'\n\n/**\n * Given a path and a prefix it will remove the prefix when it exists in the\n * given path. It ensures it matches exactly without containing extra chars\n * and if the prefix is not there it will be noop.\n *\n * @param path The path to remove the prefix from.\n * @param prefix The prefix to be removed.\n */\nexport function removePathPrefix(path: string, prefix: string): string {\n // If the path doesn't start with the prefix we can return it as is. This\n // protects us from situations where the prefix is a substring of the path\n // prefix such as:\n //\n // For prefix: /blog\n //\n // /blog -> true\n // /blog/ -> true\n // /blog/1 -> true\n // /blogging -> false\n // /blogging/ -> false\n // /blogging/1 -> false\n if (!pathHasPrefix(path, prefix)) {\n return path\n }\n\n // Remove the prefix from the path via slicing.\n const withoutPrefix = path.slice(prefix.length)\n\n // If the path without the prefix starts with a `/` we can return it as is.\n if (withoutPrefix.startsWith('/')) {\n return withoutPrefix\n }\n\n // If the path without the prefix doesn't start with a `/` we need to add it\n // back to the path to make sure it's a valid path.\n return `/${withoutPrefix}`\n}\n","import type { DynamicParam } from '../../../../server/app-render/app-render'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\nimport type { OpaqueFallbackRouteParams } from '../../../../server/request/fallback-params'\nimport type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypesShort } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport { parseLoaderTree } from './parse-loader-tree'\nimport { parseAppRoute, parseAppRouteSegment } from '../routes/app'\nimport { resolveParamValue } from './resolve-param-value'\n\n/**\n * Gets the value of a param from the params object. This correctly handles the\n * case where the param is a fallback route param and encodes the resulting\n * value.\n *\n * @param interpolatedParams - The params object.\n * @param segmentKey - The key of the segment.\n * @param fallbackRouteParams - The fallback route params.\n * @returns The value of the param.\n */\nfunction getParamValue(\n interpolatedParams: Params,\n segmentKey: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n) {\n let value = interpolatedParams[segmentKey]\n\n if (fallbackRouteParams?.has(segmentKey)) {\n // We know that the fallback route params has the segment key because we\n // checked that above.\n const [searchValue] = fallbackRouteParams.get(segmentKey)!\n value = searchValue\n } else if (Array.isArray(value)) {\n value = value.map((i) => encodeURIComponent(i))\n } else if (typeof value === 'string') {\n value = encodeURIComponent(value)\n }\n\n return value\n}\n\nexport function interpolateParallelRouteParams(\n loaderTree: LoaderTree,\n params: Params,\n pagePath: string,\n fallbackRouteParams: OpaqueFallbackRouteParams | null\n): Params {\n const interpolated = structuredClone(params)\n\n // Stack-based traversal with depth tracking\n const stack: Array<{ tree: LoaderTree; depth: number }> = [\n { tree: loaderTree, depth: 0 },\n ]\n\n // Parse the route from the provided page path.\n const route = parseAppRoute(pagePath, true)\n\n while (stack.length > 0) {\n const { tree, depth } = stack.pop()!\n const { segment, parallelRoutes } = parseLoaderTree(tree)\n\n const appSegment = parseAppRouteSegment(segment)\n\n if (\n appSegment?.type === 'dynamic' &&\n !interpolated.hasOwnProperty(appSegment.param.paramName) &&\n // If the param is in the fallback route params, we don't need to\n // interpolate it because it's already marked as being unknown.\n !fallbackRouteParams?.has(appSegment.param.paramName)\n ) {\n const { paramName, paramType } = appSegment.param\n\n const paramValue = resolveParamValue(\n paramName,\n paramType,\n depth,\n route,\n interpolated\n )\n\n if (paramValue !== undefined) {\n interpolated[paramName] = paramValue\n } else if (paramType !== 'optional-catchall') {\n throw new InvariantError(\n `Could not resolve param value for segment: ${paramName}`\n )\n }\n }\n\n // Calculate next depth - increment if this is not a route group and not empty\n let nextDepth = depth\n if (\n appSegment &&\n appSegment.type !== 'route-group' &&\n appSegment.type !== 'parallel-route'\n ) {\n nextDepth++\n }\n\n // Add all parallel routes to the stack for processing\n for (const parallelRoute of Object.values(parallelRoutes)) {\n stack.push({ tree: parallelRoute, depth: nextDepth })\n }\n }\n\n return interpolated\n}\n\n/**\n *\n * Shared logic on client and server for creating a dynamic param value.\n *\n * This code needs to be shared with the client so it can extract dynamic route\n * params from the URL without a server request.\n *\n * Because everything in this module is sent to the client, we should aim to\n * keep this code as simple as possible. The special case handling for catchall\n * and optional is, alas, unfortunate.\n */\nexport function getDynamicParam(\n interpolatedParams: Params,\n segmentKey: string,\n dynamicParamType: DynamicParamTypesShort,\n fallbackRouteParams: OpaqueFallbackRouteParams | null,\n staticSiblings: readonly string[] | null\n): DynamicParam {\n let value: string | string[] | undefined = getParamValue(\n interpolatedParams,\n segmentKey,\n fallbackRouteParams\n )\n\n // handle the case where an optional catchall does not have a value,\n // e.g. `/dashboard/[[...slug]]` when requesting `/dashboard`\n if (!value || value.length === 0) {\n if (dynamicParamType === 'oc') {\n return {\n param: segmentKey,\n value: null,\n type: dynamicParamType,\n treeSegment: [segmentKey, '', dynamicParamType, staticSiblings],\n }\n }\n\n throw new InvariantError(\n `Missing value for segment key: \"${segmentKey}\" with dynamic param type: ${dynamicParamType}`\n )\n }\n\n const paramCacheKey = Array.isArray(value) ? value.join('/') : value\n\n return {\n param: segmentKey,\n // The value that is passed to user code.\n value,\n // The value that is rendered in the router tree.\n // TODO: If the number of static siblings exceeds some threshold (e.g.,\n // dozens or hundreds), consider sending a Bloom filter instead of the full\n // array to reduce payload size. The client would then use the Bloom filter\n // to check membership with a small false positive rate.\n treeSegment: [segmentKey, paramCacheKey, dynamicParamType, staticSiblings],\n type: dynamicParamType,\n }\n}\n\n/**\n * Regular expression pattern used to match route parameters.\n * Matches both single parameters and parameter groups.\n * Examples:\n * - `[[...slug]]` matches parameter group with key 'slug', repeat: true, optional: true\n * - `[...slug]` matches parameter group with key 'slug', repeat: true, optional: false\n * - `[[foo]]` matches parameter with key 'foo', repeat: false, optional: true\n * - `[bar]` matches parameter with key 'bar', repeat: false, optional: false\n */\nexport const PARAMETER_PATTERN = /^([^[]*)\\[((?:\\[[^\\]]*\\])|[^\\]]+)\\](.*)$/\n\n/**\n * Parses a given parameter from a route to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[[...slug]]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[[foo]]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `[bar]` -> `{ key: 'bar', repeat: false, optional: false }`\n * - `fizz` -> `{ key: 'fizz', repeat: false, optional: false }`\n * @param param - The parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseParameter(param: string) {\n const match = param.match(PARAMETER_PATTERN)\n\n if (!match) {\n return parseMatchedParameter(param)\n }\n\n return parseMatchedParameter(match[2])\n}\n\n/**\n * Parses a matched parameter from the PARAMETER_PATTERN regex to a data structure that can be used\n * to generate the parametrized route.\n * Examples:\n * - `[...slug]` -> `{ key: 'slug', repeat: true, optional: true }`\n * - `...slug` -> `{ key: 'slug', repeat: true, optional: false }`\n * - `[foo]` -> `{ key: 'foo', repeat: false, optional: true }`\n * - `bar` -> `{ key: 'bar', repeat: false, optional: false }`\n * @param param - The matched parameter to parse.\n * @returns The parsed parameter as a data structure.\n */\nexport function parseMatchedParameter(param: string) {\n const optional = param.startsWith('[') && param.endsWith(']')\n if (optional) {\n param = param.slice(1, -1)\n }\n const repeat = param.startsWith('...')\n if (repeat) {\n param = param.slice(3)\n }\n return { key: param, repeat, optional }\n}\n","import { RedirectStatusCode } from './redirect-status-code'\n\nexport const REDIRECT_ERROR_CODE = 'NEXT_REDIRECT'\n\nexport type RedirectType = 'push' | 'replace'\n\nexport type RedirectError = Error & {\n digest: `${typeof REDIRECT_ERROR_CODE};${RedirectType};${string};${RedirectStatusCode};`\n}\n\n/**\n * Checks an error to determine if it's an error generated by the\n * `redirect(url)` helper.\n *\n * @param error the error that may reference a redirect error\n * @returns true if the error is a redirect error\n */\nexport function isRedirectError(error: unknown): error is RedirectError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n\n const digest = error.digest.split(';')\n const [errorCode, type] = digest\n const destination = digest.slice(2, -2).join(';')\n const status = digest.at(-2)\n\n const statusCode = Number(status)\n\n return (\n errorCode === REDIRECT_ERROR_CODE &&\n (type === 'replace' || type === 'push') &&\n typeof destination === 'string' &&\n !isNaN(statusCode) &&\n statusCode in RedirectStatusCode\n )\n}\n","'use client'\n\nimport { createContext } from 'react'\nimport type { Params } from '../../server/request/params'\nimport { ReadonlyURLSearchParams } from '../../client/components/readonly-url-search-params'\n\nexport const SearchParamsContext = createContext<URLSearchParams | null>(null)\nexport const PathnameContext = createContext<string | null>(null)\nexport const PathParamsContext = createContext<Params | null>(null)\n\n// Dev-only context for Suspense DevTools instrumentation\n// These promises are used to track navigation hook usage in React DevTools\nexport type InstrumentedPromise<T> = Promise<T> & {\n status: 'fulfilled'\n value: T\n displayName: string\n}\n\nexport type NavigationPromises = {\n pathname: InstrumentedPromise<string>\n searchParams: InstrumentedPromise<ReadonlyURLSearchParams>\n params: InstrumentedPromise<Params>\n // Layout segment hooks (updated at each layout boundary)\n selectedLayoutSegmentPromises?: Map<\n string,\n InstrumentedPromise<string | null>\n >\n selectedLayoutSegmentsPromises?: Map<string, InstrumentedPromise<string[]>>\n}\n\nexport const NavigationPromisesContext =\n createContext<NavigationPromises | null>(null)\n\n// Creates an instrumented promise for Suspense DevTools\n// These promises are always fulfilled and exist purely for\n// tracking in React's Suspense DevTools.\nexport function createDevToolsInstrumentedPromise<T>(\n displayName: string,\n value: T\n): InstrumentedPromise<T> {\n const promise = Promise.resolve(value) as InstrumentedPromise<T>\n promise.status = 'fulfilled'\n promise.value = value\n promise.displayName = `${displayName} (SSR)`\n return promise\n}\n\nexport { ReadonlyURLSearchParams }\n\nif (process.env.NODE_ENV !== 'production') {\n SearchParamsContext.displayName = 'SearchParamsContext'\n PathnameContext.displayName = 'PathnameContext'\n PathParamsContext.displayName = 'PathParamsContext'\n NavigationPromisesContext.displayName = 'NavigationPromisesContext'\n}\n","import type { ParsedUrlQuery } from 'querystring'\nimport { getLocationOrigin } from '../../utils'\nimport { searchParamsToUrlQuery } from './querystring'\n\nexport interface ParsedRelativeUrl {\n auth: string | null\n hash: string\n host: string | null\n hostname: string | null\n href: string\n pathname: string\n port: string | null\n protocol: string | null\n query: ParsedUrlQuery\n search: string\n slashes: null\n}\n\n/**\n * Parses path-relative urls (e.g. `/hello/world?foo=bar`). If url isn't path-relative\n * (e.g. `./hello`) then at least base must be.\n * Absolute urls are rejected with one exception, in the browser, absolute urls that are on\n * the current origin will be parsed as relative\n */\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery?: true\n): ParsedRelativeUrl\nexport function parseRelativeUrl(\n url: string,\n base: string | undefined,\n parseQuery: false\n): Omit<ParsedRelativeUrl, 'query'>\nexport function parseRelativeUrl(\n url: string,\n base?: string,\n parseQuery = true\n): ParsedRelativeUrl | Omit<ParsedRelativeUrl, 'query'> {\n const globalBase = new URL(\n typeof window === 'undefined' ? 'http://n' : getLocationOrigin()\n )\n\n const resolvedBase = base\n ? new URL(base, globalBase)\n : url.startsWith('.')\n ? new URL(\n typeof window === 'undefined' ? 'http://n' : window.location.href\n )\n : globalBase\n\n const { pathname, searchParams, search, hash, href, origin } = url.startsWith(\n '/'\n )\n ? // 'http://localhost:3000///' would be received as '///' in Node.js' IncomingMessage\n // See https://nodejs.org/api/http.html#messageurl\n // Not using `origin` to support other protocols\n new URL(`${resolvedBase.protocol}//${resolvedBase.host}${url}`)\n : new URL(url, resolvedBase)\n\n if (origin !== globalBase.origin) {\n throw new Error(`invariant: invalid relative URL, router received ${url}`)\n }\n\n return {\n auth: null,\n host: null,\n hostname: null,\n pathname,\n port: null,\n protocol: null,\n query: parseQuery ? searchParamsToUrlQuery(searchParams) : undefined,\n search,\n hash,\n href: href.slice(origin.length),\n // We don't know for relative URLs at this point since we set a custom, internal\n // base that isn't surfaced to users.\n slashes: null,\n }\n}\n","export interface PathLocale {\n detectedLocale?: string\n pathname: string\n}\n\n/**\n * A cache of lowercased locales for each list of locales. This is stored as a\n * WeakMap so if the locales are garbage collected, the cache entry will be\n * removed as well.\n */\nconst cache = new WeakMap<readonly string[], readonly string[]>()\n\n/**\n * For a pathname that may include a locale from a list of locales, it\n * removes the locale from the pathname returning it alongside with the\n * detected locale.\n *\n * @param pathname A pathname that may include a locale.\n * @param locales A list of locales.\n * @returns The detected locale and pathname without locale\n */\nexport function normalizeLocalePath(\n pathname: string,\n locales?: readonly string[]\n): PathLocale {\n // If locales is undefined, return the pathname as is.\n if (!locales) return { pathname }\n\n // Get the cached lowercased locales or create a new cache entry.\n let lowercasedLocales = cache.get(locales)\n if (!lowercasedLocales) {\n lowercasedLocales = locales.map((locale) => locale.toLowerCase())\n cache.set(locales, lowercasedLocales)\n }\n\n let detectedLocale: string | undefined\n\n // The first segment will be empty, because it has a leading `/`. If\n // there is no further segment, there is no locale (or it's the default).\n const segments = pathname.split('/', 2)\n\n // If there's no second segment (ie, the pathname is just `/`), there's no\n // locale.\n if (!segments[1]) return { pathname }\n\n // The second segment will contain the locale part if any.\n const segment = segments[1].toLowerCase()\n\n // See if the segment matches one of the locales. If it doesn't, there is\n // no locale (or it's the default).\n const index = lowercasedLocales.indexOf(segment)\n if (index < 0) return { pathname }\n\n // Return the case-sensitive locale.\n detectedLocale = locales[index]\n\n // Remove the `/${locale}` part of the pathname.\n pathname = pathname.slice(detectedLocale.length + 1) || '/'\n\n return { pathname, detectedLocale }\n}\n","// regexp is based on https://github.com/sindresorhus/escape-string-regexp\nconst reHasRegExp = /[|\\\\{}()[\\]^$+*?.-]/\nconst reReplaceRegExp = /[|\\\\{}()[\\]^$+*?.-]/g\n\nexport function escapeStringRegexp(str: string) {\n // see also: https://github.com/lodash/lodash/blob/2da024c3b4f9947a48517639de7560457cd4ec6c/escapeRegExp.js#L23\n if (reHasRegExp.test(str)) {\n return str.replace(reReplaceRegExp, '\\\\$&')\n }\n return str\n}\n","import { ensureLeadingSlash } from '../../page-path/ensure-leading-slash'\nimport { isGroupSegment } from '../../segment'\n\n/**\n * Normalizes an app route so it represents the actual request path. Essentially\n * performing the following transformations:\n *\n * - `/(dashboard)/user/[id]/page` to `/user/[id]`\n * - `/(dashboard)/account/page` to `/account`\n * - `/user/[id]/page` to `/user/[id]`\n * - `/account/page` to `/account`\n * - `/page` to `/`\n * - `/(dashboard)/user/[id]/route` to `/user/[id]`\n * - `/(dashboard)/account/route` to `/account`\n * - `/user/[id]/route` to `/user/[id]`\n * - `/account/route` to `/account`\n * - `/route` to `/`\n * - `/` to `/`\n *\n * @param route the app route to normalize\n * @returns the normalized pathname\n */\nexport function normalizeAppPath(route: string) {\n return ensureLeadingSlash(\n route.split('/').reduce((pathname, segment, index, segments) => {\n // Empty segments are ignored.\n if (!segment) {\n return pathname\n }\n\n // Groups are ignored.\n if (isGroupSegment(segment)) {\n return pathname\n }\n\n // Parallel segments are ignored.\n if (segment[0] === '@') {\n return pathname\n }\n\n // The last segment (if it's a leaf) should be ignored.\n if (\n (segment === 'page' || segment === 'route') &&\n index === segments.length - 1\n ) {\n return pathname\n }\n\n return `${pathname}/${segment}`\n }, '')\n )\n}\n\n/**\n * Comparator for sorting app paths so that parallel slot paths (containing\n * `/@`) come before the children/root page path. This ensures the last item\n * is always the children page, which is what `renderPageComponent` reads via\n * `appPaths[appPaths.length - 1]`.\n *\n * Without this, route group prefixes like `(group)` (char code 0x28) sort\n * before `@` (0x40), causing the children page to sort first instead of last\n * and leading to a manifest mismatch / 404 in webpack dev mode.\n */\nexport function compareAppPaths(a: string, b: string): number {\n const aHasSlot = a.includes('/@')\n const bHasSlot = b.includes('/@')\n if (aHasSlot && !bHasSlot) return -1\n if (!aHasSlot && bHasSlot) return 1\n return a.localeCompare(b)\n}\n\n/**\n * Strips the `.rsc` extension if it's in the pathname.\n * Since this function is used on full urls it checks `?` for searchParams handling.\n */\nexport function normalizeRscURL(url: string) {\n return url.replace(\n /\\.rsc($|\\?)/,\n // $1 ensures `?` is preserved\n '$1'\n )\n}\n","import type { NextPathnameInfo } from './get-next-pathname-info'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { addPathPrefix } from './add-path-prefix'\nimport { addPathSuffix } from './add-path-suffix'\nimport { addLocale } from './add-locale'\n\ninterface ExtendedInfo extends NextPathnameInfo {\n defaultLocale?: string\n ignorePrefix?: boolean\n}\n\nexport function formatNextPathnameInfo(info: ExtendedInfo) {\n let pathname = addLocale(\n info.pathname,\n info.locale,\n info.buildId ? undefined : info.defaultLocale,\n info.ignorePrefix\n )\n\n if (info.buildId || !info.trailingSlash) {\n pathname = removeTrailingSlash(pathname)\n }\n\n if (info.buildId) {\n pathname = addPathSuffix(\n addPathPrefix(pathname, `/_next/data/${info.buildId}`),\n info.pathname === '/' ? 'index.json' : '.json'\n )\n }\n\n pathname = addPathPrefix(pathname, info.basePath)\n return !info.buildId && info.trailingSlash\n ? !pathname.endsWith('/')\n ? addPathSuffix(pathname, '/')\n : pathname\n : removeTrailingSlash(pathname)\n}\n","import React from 'react'\nimport Head from '../shared/lib/head'\nimport type { NextPageContext } from '../shared/lib/utils'\n\nconst statusCodes: { [code: number]: string } = {\n 400: 'Bad Request',\n 404: 'This page could not be found',\n 405: 'Method Not Allowed',\n 500: 'Internal Server Error',\n}\n\nexport type ErrorProps = {\n statusCode: number\n hostname?: string\n title?: string\n withDarkMode?: boolean\n}\n\nfunction _getInitialProps({\n req,\n res,\n err,\n}: NextPageContext): Promise<ErrorProps> | ErrorProps {\n const statusCode =\n res && res.statusCode ? res.statusCode : err ? err.statusCode! : 404\n\n let hostname\n\n if (typeof window !== 'undefined') {\n hostname = window.location.hostname\n } else if (req) {\n const { getRequestMeta } =\n require('../server/request-meta') as typeof import('../server/request-meta')\n\n const initUrl = getRequestMeta(req, 'initURL')\n if (initUrl) {\n const url = new URL(initUrl)\n hostname = url.hostname\n }\n }\n\n return { statusCode, hostname }\n}\n\nconst styles: Record<string, React.CSSProperties> = {\n error: {\n // https://github.com/sindresorhus/modern-normalize/blob/main/modern-normalize.css#L38-L52\n fontFamily:\n 'system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"',\n height: '100vh',\n textAlign: 'center',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n },\n desc: {\n lineHeight: '48px',\n },\n h1: {\n display: 'inline-block',\n margin: '0 20px 0 0',\n paddingRight: 23,\n fontSize: 24,\n fontWeight: 500,\n verticalAlign: 'top',\n },\n h2: {\n fontSize: 14,\n fontWeight: 400,\n lineHeight: '28px',\n },\n wrap: {\n display: 'inline-block',\n },\n}\n\n/**\n * `Error` component used for handling errors.\n */\nexport default class Error<P = {}> extends React.Component<P & ErrorProps> {\n static displayName = 'ErrorPage'\n\n static getInitialProps = _getInitialProps\n static origGetInitialProps = _getInitialProps\n\n render() {\n const { statusCode, withDarkMode = true } = this.props\n const title =\n this.props.title ||\n statusCodes[statusCode] ||\n 'An unexpected error has occurred'\n\n return (\n <div style={styles.error}>\n <Head>\n <title>\n {statusCode\n ? `${statusCode}: ${title}`\n : 'Application error: a client-side exception has occurred'}\n </title>\n </Head>\n <div style={styles.desc}>\n <style\n dangerouslySetInnerHTML={{\n /* CSS minified from\n body { margin: 0; color: #000; background: #fff; }\n .next-error-h1 {\n border-right: 1px solid rgba(0, 0, 0, .3);\n }\n\n ${\n withDarkMode\n ? `@media (prefers-color-scheme: dark) {\n body { color: #fff; background: #000; }\n .next-error-h1 {\n border-right: 1px solid rgba(255, 255, 255, .3);\n }\n }`\n : ''\n }\n */\n __html: `body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}${\n withDarkMode\n ? '@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}'\n : ''\n }`,\n }}\n />\n\n {statusCode ? (\n <h1 className=\"next-error-h1\" style={styles.h1}>\n {statusCode}\n </h1>\n ) : null}\n <div style={styles.wrap}>\n <h2 style={styles.h2}>\n {this.props.title || statusCode ? (\n title\n ) : (\n <>\n Application error: a client-side exception has occurred{' '}\n {Boolean(this.props.hostname) && (\n <>while loading {this.props.hostname}</>\n )}{' '}\n (see the browser console for more information)\n </>\n )}\n .\n </h2>\n </div>\n </div>\n </div>\n )\n }\n}\n","export const reportGlobalError =\n typeof reportError === 'function'\n ? // In modern browsers, reportError will dispatch an error event,\n // emulating an uncaught JavaScript error.\n reportError\n : (error: unknown) => {\n // TODO: Dispatch error event\n globalThis.console.error(error)\n }\n","// This utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\nconst ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '\\\\u0026',\n '>': '\\\\u003e',\n '<': '\\\\u003c',\n '\\u2028': '\\\\u2028',\n '\\u2029': '\\\\u2029',\n}\n\nexport const ESCAPE_REGEX = /[&><\\u2028\\u2029]/g\n\nconst ATTRIBUTE_ESCAPE_LOOKUP: { [match: string]: string } = {\n '&': '&',\n '\"': '"',\n \"'\": ''',\n '<': '<',\n '>': '>',\n}\n\nconst ATTRIBUTE_ESCAPE_REGEX = /[&\"'<>]/g\n\nexport function htmlEscapeJsonString(str: string): string {\n return str.replace(ESCAPE_REGEX, (match) => ESCAPE_LOOKUP[match])\n}\n\nexport function htmlEscapeAttributeString(str: string): string {\n return str.replace(\n ATTRIBUTE_ESCAPE_REGEX,\n (match) => ATTRIBUTE_ESCAPE_LOOKUP[match]\n )\n}\n","function _interop_require_default(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\nexport { _interop_require_default as _ };\n","// Adapted from React's sanitizeURL function found here: https://github.com/facebook/react/blob/b565373afd0cc1988497e1107106e851e8cfb261/packages/react-dom-bindings/src/shared/sanitizeURL.js\n\n// A javascript: URL can contain leading C0 control or \\u0020 SPACE,\n// and any newline or tab are filtered out as if they're not part of the URL.\n// https://url.spec.whatwg.org/#url-parsing\n// Tab or newline are defined as \\r\\n\\t:\n// https://infra.spec.whatwg.org/#ascii-tab-or-newline\n// A C0 control is a code point in the range \\u0000 NULL to \\u001F\n// INFORMATION SEPARATOR ONE, inclusive:\n// https://infra.spec.whatwg.org/#c0-control-or-space\n\nconst isJavaScriptProtocol =\n // eslint-disable-next-line no-control-regex\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i\n\nexport function isJavaScriptURLString(url: string): boolean {\n return isJavaScriptProtocol.test('' + (url as unknown as string))\n}\n","import type { ParsedUrlQuery } from 'querystring'\n\nexport function searchParamsToUrlQuery(\n searchParams: URLSearchParams\n): ParsedUrlQuery {\n const query: ParsedUrlQuery = {}\n for (const [key, value] of searchParams.entries()) {\n const existing = query[key]\n if (typeof existing === 'undefined') {\n query[key] = value\n } else if (Array.isArray(existing)) {\n existing.push(value)\n } else {\n query[key] = [existing, value]\n }\n }\n return query\n}\n\nfunction stringifyUrlQueryParam(param: unknown): string {\n if (typeof param === 'string') {\n return param\n }\n\n if (\n (typeof param === 'number' && !isNaN(param)) ||\n typeof param === 'boolean'\n ) {\n return String(param)\n } else {\n return ''\n }\n}\n\nexport function urlQueryToSearchParams(query: ParsedUrlQuery): URLSearchParams {\n const searchParams = new URLSearchParams()\n for (const [key, value] of Object.entries(query)) {\n if (Array.isArray(value)) {\n for (const item of value) {\n searchParams.append(key, stringifyUrlQueryParam(item))\n }\n } else {\n searchParams.set(key, stringifyUrlQueryParam(value))\n }\n }\n return searchParams\n}\n\nexport function assign(\n target: URLSearchParams,\n ...searchParamsList: URLSearchParams[]\n): URLSearchParams {\n for (const searchParams of searchParamsList) {\n for (const key of searchParams.keys()) {\n target.delete(key)\n }\n\n for (const [key, value] of searchParams.entries()) {\n target.append(key, value)\n }\n }\n\n return target\n}\n","export function encodeURIPath(file: string) {\n return file\n .split('/')\n .map((p) => encodeURIComponent(p))\n .join('/')\n}\n","import type { default as Router } from '../router'\n\nexport function compareRouterStates(a: Router['state'], b: Router['state']) {\n const stateKeys = Object.keys(a)\n if (stateKeys.length !== Object.keys(b).length) return false\n\n for (let i = stateKeys.length; i--; ) {\n const key = stateKeys[i]\n if (key === 'query') {\n const queryKeys = Object.keys(a.query)\n if (queryKeys.length !== Object.keys(b.query).length) {\n return false\n }\n for (let j = queryKeys.length; j--; ) {\n const queryKey = queryKeys[j]\n if (\n !b.query.hasOwnProperty(queryKey) ||\n a.query[queryKey] !== b.query[queryKey]\n ) {\n return false\n }\n }\n } else if (\n !b.hasOwnProperty(key) ||\n a[key as keyof Router['state']] !== b[key as keyof Router['state']]\n ) {\n return false\n }\n }\n\n return true\n}\n","import React, { type JSX } from 'react'\nimport type {\n BaseContext,\n NextComponentType,\n NextPageContext,\n} from '../shared/lib/utils'\nimport type { NextRouter } from './router'\nimport { useRouter } from './router'\n\nexport type WithRouterProps = {\n router: NextRouter\n}\n\nexport type ExcludeRouterProps<P> = Pick<\n P,\n Exclude<keyof P, keyof WithRouterProps>\n>\n\nexport default function withRouter<\n P extends WithRouterProps,\n C extends BaseContext = NextPageContext,\n>(\n ComposedComponent: NextComponentType<C, any, P>\n): React.ComponentType<ExcludeRouterProps<P>> {\n function WithRouterWrapper(props: any): JSX.Element {\n return <ComposedComponent router={useRouter()} {...props} />\n }\n\n WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps\n // This is needed to allow checking for custom getInitialProps in _app\n ;(WithRouterWrapper as any).origGetInitialProps = (\n ComposedComponent as any\n ).origGetInitialProps\n if (process.env.NODE_ENV !== 'production') {\n const name =\n ComposedComponent.displayName || ComposedComponent.name || 'Unknown'\n WithRouterWrapper.displayName = `withRouter(${name})`\n }\n\n return WithRouterWrapper\n}\n","export enum RedirectStatusCode {\n SeeOther = 303,\n TemporaryRedirect = 307,\n PermanentRedirect = 308,\n}\n","/**\n * For a given page path, this function ensures that there is a leading slash.\n * If there is not a leading slash, one is added, otherwise it is noop.\n */\nexport function ensureLeadingSlash(path: string) {\n return path.startsWith('/') ? path : `/${path}`\n}\n","import type { detectDomainLocale as Fn } from '../shared/lib/i18n/detect-domain-locale'\n\nexport const detectDomainLocale: typeof Fn = (...args) => {\n if (process.env.__NEXT_I18N_SUPPORT) {\n return (\n require('../shared/lib/i18n/detect-domain-locale') as typeof import('../shared/lib/i18n/detect-domain-locale')\n ).detectDomainLocale(...args)\n }\n}\n","declare const __webpack_require__: any\ndeclare let __webpack_public_path__: string\n\nimport { getAssetToken, getAssetTokenQuery } from '../shared/lib/deployment-id'\n\n// If we have a deployment ID query string, we need to append it to the webpack chunk names\n// I am keeping the process check explicit so this can be statically optimized\nif (getAssetToken()) {\n const suffix = getAssetTokenQuery()\n const getChunkScriptFilename = __webpack_require__.u\n __webpack_require__.u = (...args: any[]) =>\n // We enode the chunk filename because our static server matches against and encoded\n // filename path.\n getChunkScriptFilename(...args) + suffix\n\n const getChunkCssFilename = __webpack_require__.k\n __webpack_require__.k = (...args: any[]) =>\n getChunkCssFilename(...args) + suffix\n\n const getMiniCssFilename = __webpack_require__.miniCssF\n __webpack_require__.miniCssF = (...args: any[]) =>\n getMiniCssFilename(...args) + suffix\n}\n\n// Ignore the module ID transform in client.\n;(self as any).__next_set_public_path__ = (path: string) => {\n __webpack_public_path__ = path\n}\n\nexport {}\n","export function getObjectClassLabel(value: any): string {\n return Object.prototype.toString.call(value)\n}\n\nexport function isPlainObject(value: any): boolean {\n if (getObjectClassLabel(value) !== '[object Object]') {\n return false\n }\n\n const prototype = Object.getPrototypeOf(value)\n\n /**\n * this used to be previously:\n *\n * `return prototype === null || prototype === Object.prototype`\n *\n * but Edge Runtime expose Object from vm, being that kind of type-checking wrongly fail.\n *\n * It was changed to the current implementation since it's resilient to serialization.\n */\n return prototype === null || prototype.hasOwnProperty('isPrototypeOf')\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Adds the provided prefix to the given path. It first ensures that the path\n * is indeed starting with a slash.\n */\nexport function addPathPrefix(path: string, prefix?: string) {\n if (!path.startsWith('/') || !prefix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${prefix}${pathname}${query}${hash}`\n}\n","import { parsePath } from '../shared/lib/router/utils/parse-path'\n\nexport function removeLocale(path: string, locale?: string) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const { pathname } = parsePath(path)\n const pathLower = pathname.toLowerCase()\n const localeLower = locale?.toLowerCase()\n\n return locale &&\n (pathLower.startsWith(`/${localeLower}/`) ||\n pathLower === `/${localeLower}`)\n ? `${pathname.length === locale.length + 1 ? `/` : ``}${path.slice(\n locale.length + 1\n )}`\n : path\n }\n return path\n}\n","import type { FlightRouterState, Segment } from './app-router-types'\n\nexport function getSegmentValue(segment: Segment) {\n return Array.isArray(segment) ? segment[1] : segment\n}\n\nexport function isGroupSegment(segment: string) {\n // Use array[0] for performant purpose\n return segment[0] === '(' && segment.endsWith(')')\n}\n\nexport function isParallelRouteSegment(segment: string) {\n return segment.startsWith('@') && segment !== '@children'\n}\n\nexport function addSearchParamsIfPageSegment(\n segment: Segment,\n searchParams: Record<string, string | string[] | undefined>\n) {\n const isPageSegment = segment.includes(PAGE_SEGMENT_KEY)\n\n if (isPageSegment) {\n const stringifiedQuery = JSON.stringify(searchParams)\n return stringifiedQuery !== '{}'\n ? PAGE_SEGMENT_KEY + '?' + stringifiedQuery\n : PAGE_SEGMENT_KEY\n }\n\n return segment\n}\n\nexport function computeSelectedLayoutSegment(\n segments: string[] | null,\n parallelRouteKey: string\n): string | null {\n if (!segments || segments.length === 0) {\n return null\n }\n\n // For 'children', use first segment; for other parallel routes, use last segment\n const rawSegment =\n parallelRouteKey === 'children'\n ? segments[0]\n : segments[segments.length - 1]\n\n // If the default slot is showing, return null since it's not technically \"selected\" (it's a fallback)\n // Returning an internal value like `__DEFAULT__` would be confusing\n return rawSegment === DEFAULT_SEGMENT_KEY ? null : rawSegment\n}\n\n/** Get the canonical parameters from the current level to the leaf node. */\nexport function getSelectedLayoutSegmentPath(\n tree: FlightRouterState,\n parallelRouteKey: string,\n first = true,\n segmentPath: string[] = []\n): string[] {\n let node: FlightRouterState\n if (first) {\n // Use the provided parallel route key on the first parallel route\n node = tree[1][parallelRouteKey]\n } else {\n // After first parallel route prefer children, if there's no children pick the first parallel route.\n const parallelRoutes = tree[1]\n node = parallelRoutes.children ?? Object.values(parallelRoutes)[0]\n }\n\n if (!node) return segmentPath\n const segment = node[0]\n\n let segmentValue = getSegmentValue(segment)\n\n if (!segmentValue || segmentValue.startsWith(PAGE_SEGMENT_KEY)) {\n return segmentPath\n }\n\n segmentPath.push(segmentValue)\n\n return getSelectedLayoutSegmentPath(\n node,\n parallelRouteKey,\n false,\n segmentPath\n )\n}\n\nexport const PAGE_SEGMENT_KEY = '__PAGE__'\nexport const DEFAULT_SEGMENT_KEY = '__DEFAULT__'\nexport const NOT_FOUND_SEGMENT_KEY = '/_not-found'\n","import { pathHasPrefix } from '../shared/lib/router/utils/path-has-prefix'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function hasBasePath(path: string): boolean {\n return pathHasPrefix(path, basePath)\n}\n","class UrlNode {\n placeholder: boolean = true\n children: Map<string, UrlNode> = new Map()\n slugName: string | null = null\n restSlugName: string | null = null\n optionalRestSlugName: string | null = null\n\n insert(urlPath: string): void {\n this._insert(urlPath.split('/').filter(Boolean), [], false)\n }\n\n smoosh(): string[] {\n return this._smoosh()\n }\n\n private _smoosh(prefix: string = '/'): string[] {\n const childrenPaths = [...this.children.keys()].sort()\n if (this.slugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[]'), 1)\n }\n if (this.restSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[...]'), 1)\n }\n if (this.optionalRestSlugName !== null) {\n childrenPaths.splice(childrenPaths.indexOf('[[...]]'), 1)\n }\n\n const routes = childrenPaths\n .map((c) => this.children.get(c)!._smoosh(`${prefix}${c}/`))\n .reduce((prev, curr) => [...prev, ...curr], [])\n\n if (this.slugName !== null) {\n routes.push(\n ...this.children.get('[]')!._smoosh(`${prefix}[${this.slugName}]/`)\n )\n }\n\n if (!this.placeholder) {\n const r = prefix === '/' ? '/' : prefix.slice(0, -1)\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot define a route with the same specificity as a optional catch-all route (\"${r}\" and \"${r}[[...${this.optionalRestSlugName}]]\").`\n )\n }\n\n routes.unshift(r)\n }\n\n if (this.restSlugName !== null) {\n routes.push(\n ...this.children\n .get('[...]')!\n ._smoosh(`${prefix}[...${this.restSlugName}]/`)\n )\n }\n\n if (this.optionalRestSlugName !== null) {\n routes.push(\n ...this.children\n .get('[[...]]')!\n ._smoosh(`${prefix}[[...${this.optionalRestSlugName}]]/`)\n )\n }\n\n return routes\n }\n\n private _insert(\n urlPaths: string[],\n slugNames: string[],\n isCatchAll: boolean\n ): void {\n if (urlPaths.length === 0) {\n this.placeholder = false\n return\n }\n\n if (isCatchAll) {\n throw new Error(`Catch-all must be the last part of the URL.`)\n }\n\n // The next segment in the urlPaths list\n let nextSegment = urlPaths[0]\n\n // Check if the segment matches `[something]`\n if (nextSegment.startsWith('[') && nextSegment.endsWith(']')) {\n // Strip `[` and `]`, leaving only `something`\n let segmentName = nextSegment.slice(1, -1)\n\n let isOptional = false\n if (segmentName.startsWith('[') && segmentName.endsWith(']')) {\n // Strip optional `[` and `]`, leaving only `something`\n segmentName = segmentName.slice(1, -1)\n isOptional = true\n }\n\n if (segmentName.startsWith('…')) {\n throw new Error(\n `Detected a three-dot character ('…') at ('${segmentName}'). Did you mean ('...')?`\n )\n }\n\n if (segmentName.startsWith('...')) {\n // Strip `...`, leaving only `something`\n segmentName = segmentName.substring(3)\n isCatchAll = true\n }\n\n if (segmentName.startsWith('[') || segmentName.endsWith(']')) {\n throw new Error(\n `Segment names may not start or end with extra brackets ('${segmentName}').`\n )\n }\n\n if (segmentName.startsWith('.')) {\n throw new Error(\n `Segment names may not start with erroneous periods ('${segmentName}').`\n )\n }\n\n function handleSlug(previousSlug: string | null, nextSlug: string) {\n if (previousSlug !== null) {\n // If the specific segment already has a slug but the slug is not `something`\n // This prevents collisions like:\n // pages/[post]/index.js\n // pages/[id]/index.js\n // Because currently multiple dynamic params on the same segment level are not supported\n if (previousSlug !== nextSlug) {\n // TODO: This error seems to be confusing for users, needs an error link, the description can be based on above comment.\n throw new Error(\n `You cannot use different slug names for the same dynamic path ('${previousSlug}' !== '${nextSlug}').`\n )\n }\n }\n\n slugNames.forEach((slug) => {\n if (slug === nextSlug) {\n throw new Error(\n `You cannot have the same slug name \"${nextSlug}\" repeat within a single dynamic path`\n )\n }\n\n if (slug.replace(/\\W/g, '') === nextSegment.replace(/\\W/g, '')) {\n throw new Error(\n `You cannot have the slug names \"${slug}\" and \"${nextSlug}\" differ only by non-word symbols within a single dynamic path`\n )\n }\n })\n\n slugNames.push(nextSlug)\n }\n\n if (isCatchAll) {\n if (isOptional) {\n if (this.restSlugName != null) {\n throw new Error(\n `You cannot use both an required and optional catch-all route at the same level (\"[...${this.restSlugName}]\" and \"${urlPaths[0]}\" ).`\n )\n }\n\n handleSlug(this.optionalRestSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.optionalRestSlugName = segmentName\n // nextSegment is overwritten to [[...]] so that it can later be sorted specifically\n nextSegment = '[[...]]'\n } else {\n if (this.optionalRestSlugName != null) {\n throw new Error(\n `You cannot use both an optional and required catch-all route at the same level (\"[[...${this.optionalRestSlugName}]]\" and \"${urlPaths[0]}\").`\n )\n }\n\n handleSlug(this.restSlugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.restSlugName = segmentName\n // nextSegment is overwritten to [...] so that it can later be sorted specifically\n nextSegment = '[...]'\n }\n } else {\n if (isOptional) {\n throw new Error(\n `Optional route parameters are not yet supported (\"${urlPaths[0]}\").`\n )\n }\n handleSlug(this.slugName, segmentName)\n // slugName is kept as it can only be one particular slugName\n this.slugName = segmentName\n // nextSegment is overwritten to [] so that it can later be sorted specifically\n nextSegment = '[]'\n }\n }\n\n // If this UrlNode doesn't have the nextSegment yet we create a new child UrlNode\n if (!this.children.has(nextSegment)) {\n this.children.set(nextSegment, new UrlNode())\n }\n\n this.children\n .get(nextSegment)!\n ._insert(urlPaths.slice(1), slugNames, isCatchAll)\n }\n}\n\n/**\n * @deprecated Use `sortSortableRoutes` or `sortPages` instead.\n */\nexport function getSortedRoutes(\n normalizedPages: ReadonlyArray<string>\n): string[] {\n // First the UrlNode is created, and every UrlNode can have only 1 dynamic segment\n // Eg you can't have pages/[post]/abc.js and pages/[hello]/something-else.js\n // Only 1 dynamic segment per nesting level\n\n // So in the case that is test/integration/dynamic-routing it'll be this:\n // pages/[post]/comments.js\n // pages/blog/[post]/comment/[id].js\n // Both are fine because `pages/[post]` and `pages/blog` are on the same level\n // So in this case `UrlNode` created here has `this.slugName === 'post'`\n // And since your PR passed through `slugName` as an array basically it'd including it in too many possibilities\n // Instead what has to be passed through is the upwards path's dynamic names\n const root = new UrlNode()\n\n // Here the `root` gets injected multiple paths, and insert will break them up into sublevels\n normalizedPages.forEach((pagePath) => root.insert(pagePath))\n // Smoosh will then sort those sublevels up to the point where you get the correct route definition priority\n return root.smoosh()\n}\n\n/**\n * @deprecated Use `sortSortableRouteObjects` or `sortPageObjects` instead.\n */\nexport function getSortedRouteObjects<T>(\n objects: T[],\n getter: (obj: T) => string\n): T[] {\n // We're assuming here that all the pathnames are unique, that way we can\n // sort the list and use the index as the key.\n const indexes: Record<string, number> = {}\n const pathnames: string[] = []\n for (let i = 0; i < objects.length; i++) {\n const pathname = getter(objects[i])\n indexes[pathname] = i\n pathnames[i] = pathname\n }\n\n // Sort the pathnames.\n const sorted = getSortedRoutes(pathnames)\n\n // Map the sorted pathnames back to the original objects using the new sorted\n // index.\n return sorted.map((pathname) => objects[indexes[pathname]])\n}\n","import React from 'react'\nimport { useRouter } from './router'\n\nconst nextjsRouteAnnouncerStyles: React.CSSProperties = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n top: 0,\n width: '1px',\n\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n whiteSpace: 'nowrap',\n wordWrap: 'normal',\n}\n\nexport const RouteAnnouncer = () => {\n const { asPath } = useRouter()\n const [routeAnnouncement, setRouteAnnouncement] = React.useState('')\n\n // Only announce the path change, but not for the first load because screen\n // reader will do that automatically.\n const previouslyLoadedPath = React.useRef(asPath)\n\n // Every time the path changes, announce the new page’s title following this\n // priority: first the document title (from head), otherwise the first h1, or\n // if none of these exist, then the pathname from the URL. This methodology is\n // inspired by Marcy Sutton’s accessible client routing user testing. More\n // information can be found here:\n // https://www.gatsbyjs.com/blog/2019-07-11-user-testing-accessible-client-routing/\n React.useEffect(\n () => {\n // If the path hasn't change, we do nothing.\n if (previouslyLoadedPath.current === asPath) return\n previouslyLoadedPath.current = asPath\n\n if (document.title) {\n setRouteAnnouncement(document.title)\n } else {\n const pageHeader = document.querySelector('h1')\n const content = pageHeader?.innerText ?? pageHeader?.textContent\n\n setRouteAnnouncement(content || asPath)\n }\n },\n // TODO: switch to pathname + query object of dynamic route requirements\n [asPath]\n )\n\n return (\n <p\n aria-live=\"assertive\" // Make the announcement immediately.\n id=\"__next-route-announcer__\"\n role=\"alert\"\n style={nextjsRouteAnnouncerStyles}\n >\n {routeAnnouncement}\n </p>\n )\n}\n\nexport default RouteAnnouncer\n","// This regex contains the bots that we need to do a blocking render for and can't safely stream the response\n// due to how they parse the DOM. For example, they might explicitly check for metadata in the `head` tag, so we can't stream metadata tags after the `head` was sent.\n// Note: The pattern [\\w-]+-Google captures all Google crawlers with \"-Google\" suffix (e.g., Mediapartners-Google, AdsBot-Google, Storebot-Google)\n// as well as crawlers starting with \"Google-\" (e.g., Google-PageRenderer, Google-InspectionTool)\nexport const HTML_LIMITED_BOT_UA_RE =\n /[\\w-]+-Google|Google-[\\w-]+|Chrome-Lighthouse|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti|googleweblight/i\n","/**\n * For a given page path, this function ensures that there is no backslash\n * escaping slashes in the path. Example:\n * - `foo\\/bar\\/baz` -> `foo/bar/baz`\n */\nexport function normalizePathSep(path: string): string {\n return path.replace(/\\\\/g, '/')\n}\n","import React from 'react'\nimport type { NextRouter } from './router/router'\n\nexport const RouterContext = React.createContext<NextRouter | null>(null)\n\nif (process.env.NODE_ENV !== 'production') {\n RouterContext.displayName = 'RouterContext'\n}\n","import { useEffect, useState } from 'react'\nimport { createPortal } from 'react-dom'\n\ntype PortalProps = {\n children: React.ReactNode\n type: string\n}\n\nexport const Portal = ({ children, type }: PortalProps) => {\n const [portalNode, setPortalNode] = useState<HTMLElement | null>(null)\n\n useEffect(() => {\n const element = document.createElement(type)\n document.body.appendChild(element)\n setPortalNode(element)\n return () => {\n document.body.removeChild(element)\n }\n }, [type])\n\n return portalNode ? createPortal(children, portalNode) : null\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n default: null,\n getProperError: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n /**\n * Checks whether the given value is a NextError.\n * This can be used to print a more detailed error message with properties like `code` & `digest`.\n */ default: function() {\n return isError;\n },\n getProperError: function() {\n return getProperError;\n }\n});\nconst _isplainobject = require(\"../shared/lib/is-plain-object\");\n/**\n * This is a safe stringify function that handles circular references.\n * We're using a simpler version here to avoid introducing\n * the dependency `safe-stable-stringify` into production bundle.\n *\n * This helper is used both in development and production.\n */ function safeStringifyLite(obj) {\n const seen = new WeakSet();\n return JSON.stringify(obj, (_key, value)=>{\n // If value is an object and already seen, replace with \"[Circular]\"\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return '[Circular]';\n }\n seen.add(value);\n }\n return value;\n });\n}\nfunction isError(err) {\n return typeof err === 'object' && err !== null && 'name' in err && 'message' in err;\n}\nfunction getProperError(err) {\n if (isError(err)) {\n return err;\n }\n if (process.env.NODE_ENV === 'development') {\n // provide better error for case where `throw undefined`\n // is called in development\n if (typeof err === 'undefined') {\n return Object.defineProperty(new Error('An undefined error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), \"__NEXT_ERROR_CODE\", {\n value: \"E98\",\n enumerable: false,\n configurable: true\n });\n }\n if (err === null) {\n return Object.defineProperty(new Error('A null error was thrown, ' + 'see here for more info: https://nextjs.org/docs/messages/threw-undefined'), \"__NEXT_ERROR_CODE\", {\n value: \"E336\",\n enumerable: false,\n configurable: true\n });\n }\n }\n return Object.defineProperty(new Error((0, _isplainobject.isPlainObject)(err) ? safeStringifyLite(err) : err + ''), \"__NEXT_ERROR_CODE\", {\n value: \"E394\",\n enumerable: false,\n configurable: true\n });\n}\n\n//# sourceMappingURL=is-error.js.map","export const HTTPAccessErrorStatus = {\n NOT_FOUND: 404,\n FORBIDDEN: 403,\n UNAUTHORIZED: 401,\n}\n\nconst ALLOWED_CODES = new Set(Object.values(HTTPAccessErrorStatus))\n\nexport const HTTP_ERROR_FALLBACK_ERROR_CODE = 'NEXT_HTTP_ERROR_FALLBACK'\n\nexport type HTTPAccessFallbackError = Error & {\n digest: `${typeof HTTP_ERROR_FALLBACK_ERROR_CODE};${string}`\n}\n\n/**\n * Checks an error to determine if it's an error generated by\n * the HTTP navigation APIs `notFound()`, `forbidden()` or `unauthorized()`.\n *\n * @param error the error that may reference a HTTP access error\n * @returns true if the error is a HTTP access error\n */\nexport function isHTTPAccessFallbackError(\n error: unknown\n): error is HTTPAccessFallbackError {\n if (\n typeof error !== 'object' ||\n error === null ||\n !('digest' in error) ||\n typeof error.digest !== 'string'\n ) {\n return false\n }\n const [prefix, httpStatus] = error.digest.split(';')\n\n return (\n prefix === HTTP_ERROR_FALLBACK_ERROR_CODE &&\n ALLOWED_CODES.has(Number(httpStatus))\n )\n}\n\nexport function getAccessFallbackHTTPStatus(\n error: HTTPAccessFallbackError\n): number {\n const httpStatus = error.digest.split(';')[1]\n return Number(httpStatus)\n}\n\nexport function getAccessFallbackErrorTypeByStatus(\n status: number\n): 'not-found' | 'forbidden' | 'unauthorized' | undefined {\n switch (status) {\n case 401:\n return 'unauthorized'\n case 403:\n return 'forbidden'\n case 404:\n return 'not-found'\n default:\n return\n }\n}\n","import { parsePath } from './parse-path'\n\n/**\n * Similarly to `addPathPrefix`, this function adds a suffix at the end on the\n * provided path. It also works only for paths ensuring the argument starts\n * with a slash.\n */\nexport function addPathSuffix(path: string, suffix?: string) {\n if (!path.startsWith('/') || !suffix) {\n return path\n }\n\n const { pathname, query, hash } = parsePath(path)\n return `${pathname}${suffix}${query}${hash}`\n}\n","import './register-deployment-id-global'\nimport './webpack'\nimport '../lib/require-instrumentation-client'\n\nimport { initialize, hydrate, version, router, emitter } from './'\n\ndeclare global {\n interface Window {\n next: any\n }\n}\n\nwindow.next = {\n version,\n // router is initialized later so it has to be live-binded\n get router() {\n return router\n },\n emitter,\n}\n\ninitialize({})\n .then(() => hydrate())\n .catch(console.error)\n","let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n deploymentId = document.documentElement.dataset.dplId\n // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n // HTML only), React isn't aware of it at all.\n delete document.documentElement.dataset.dplId\n} else {\n // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n // Server side: left as is or replaced with a string or replaced with false\n deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n let id = getDeploymentId()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n\nexport function getAssetToken(): string | undefined {\n return (\n process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID\n )\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n let id = getAssetToken()\n if (id) {\n return `${ampersand ? '&' : '?'}dpl=${id}`\n }\n return ''\n}\n","/*\nMIT License\n\nCopyright (c) Jason Miller (https://jasonformat.com/)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n*/\n\n// This file is based on https://github.com/developit/mitt/blob/v1.1.3/src/index.js\n// It's been edited for the needs of this script\n// See the LICENSE at the top of the file\n\ntype Handler = (...evts: any[]) => void\n\nexport type MittEmitter<T> = {\n on(type: T, handler: Handler): void\n off(type: T, handler: Handler): void\n emit(type: T, ...evts: any[]): void\n}\n\nexport default function mitt(): MittEmitter<string> {\n const all: { [s: string]: Handler[] } = Object.create(null)\n\n return {\n on(type: string, handler: Handler) {\n ;(all[type] || (all[type] = [])).push(handler)\n },\n\n off(type: string, handler: Handler) {\n if (all[type]) {\n all[type].splice(all[type].indexOf(handler) >>> 0, 1)\n }\n },\n\n emit(type: string, ...evts: any[]) {\n // eslint-disable-next-line array-callback-return\n ;(all[type] || []).slice().map((handler: Handler) => {\n handler(...evts)\n })\n },\n }\n}\n","import { requestIdleCallback } from '../request-idle-callback'\n\n// 3.8s was arbitrarily chosen as it's what https://web.dev/interactive\n// considers as \"Good\" time-to-interactive. We must assume something went\n// wrong beyond this point, and then fall-back to a full page transition to\n// show the user something of value.\nconst MS_MAX_IDLE_DELAY = 3800\n\n/** Resolve a promise that times out after given amount of milliseconds. */\nexport function resolvePromiseWithTimeout<T>(\n p: Promise<T>,\n err: Error,\n devPromise: Promise<void> | undefined\n): Promise<T> {\n return new Promise((resolve, reject) => {\n let cancelled = false\n\n p.then((r) => {\n // Resolved, cancel the timeout\n cancelled = true\n resolve(r)\n }).catch(reject)\n\n // We wrap these checks separately for better dead-code elimination in\n // production bundles.\n if (process.env.NODE_ENV === 'development') {\n ;(devPromise || Promise.resolve()).then(() => {\n requestIdleCallback(() =>\n setTimeout(() => {\n if (!cancelled) {\n reject(err)\n }\n }, MS_MAX_IDLE_DELAY)\n )\n })\n }\n\n if (process.env.NODE_ENV !== 'development') {\n requestIdleCallback(() =>\n setTimeout(() => {\n if (!cancelled) {\n reject(err)\n }\n }, MS_MAX_IDLE_DELAY)\n )\n }\n })\n}\n","import { DEFAULT_SEGMENT_KEY } from '../../segment'\nimport type { LoaderTree } from '../../../../server/lib/app-dir-module'\n\nexport function parseLoaderTree(tree: LoaderTree) {\n const [segment, parallelRoutes, modules, staticSiblings] = tree\n const { layout, template } = modules\n let { page } = modules\n // a __DEFAULT__ segment means that this route didn't match any of the\n // segments in the route, so we should use the default page\n page = segment === DEFAULT_SEGMENT_KEY ? modules.defaultPage : page\n\n const conventionPath = layout?.[1] || template?.[1] || page?.[1]\n\n return {\n page,\n segment,\n modules,\n /* it can be either layout / template / page */\n conventionPath,\n parallelRoutes,\n staticSiblings,\n }\n}\n","/**\n * Removes the trailing slash for a given route or page path. Preserves the\n * root page. Examples:\n * - `/foo/bar/` -> `/foo/bar`\n * - `/foo/bar` -> `/foo/bar`\n * - `/` -> `/`\n */\nexport function removeTrailingSlash(route: string) {\n return route.replace(/\\/$/, '') || '/'\n}\n","import type { Group } from './route-regex'\nimport { DecodeError } from '../../utils'\nimport type { Params } from '../../../../server/request/params'\nimport { safeRouteMatcher } from './route-match-utils'\n\nexport interface RouteMatchFn {\n (pathname: string): false | Params\n}\n\ntype RouteMatcherOptions = {\n // We only use the exec method of the RegExp object. This helps us avoid using\n // type assertions that the passed in properties are of the correct type.\n re: Pick<RegExp, 'exec'>\n groups: Record<string, Group>\n}\n\nexport function getRouteMatcher({\n re,\n groups,\n}: RouteMatcherOptions): RouteMatchFn {\n const rawMatcher = (pathname: string) => {\n const routeMatch = re.exec(pathname)\n if (!routeMatch) return false\n\n const decode = (param: string) => {\n try {\n return decodeURIComponent(param)\n } catch {\n throw new DecodeError('failed to decode param')\n }\n }\n\n const params: Params = {}\n for (const [key, group] of Object.entries(groups)) {\n const match = routeMatch[group.pos]\n if (match !== undefined) {\n if (group.repeat) {\n params[key] = match.split('/').map((entry) => decode(entry))\n } else {\n params[key] = decode(match)\n }\n }\n }\n\n return params\n }\n\n // Wrap with safe matcher to handle parameter cleaning\n return safeRouteMatcher(rawMatcher)\n}\n","import {\n isHTTPAccessFallbackError,\n type HTTPAccessFallbackError,\n} from './http-access-fallback/http-access-fallback'\nimport { isRedirectError, type RedirectError } from './redirect-error'\n\n/**\n * Returns true if the error is a navigation signal error. These errors are\n * thrown by user code to perform navigation operations and interrupt the React\n * render.\n */\nexport function isNextRouterError(\n error: unknown\n): error is RedirectError | HTTPAccessFallbackError {\n return isRedirectError(error) || isHTTPAccessFallbackError(error)\n}\n","/* global window */\nimport React from 'react'\nimport Router from '../shared/lib/router/router'\nimport type { NextRouter } from '../shared/lib/router/router'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport isError from '../lib/is-error'\n\ntype SingletonRouterBase = {\n router: Router | null\n readyCallbacks: Array<() => any>\n ready(cb: () => any): void\n}\n\nexport { Router }\n\nexport type { NextRouter }\n\nexport type SingletonRouter = SingletonRouterBase & NextRouter\n\nconst singletonRouter: SingletonRouterBase = {\n router: null, // holds the actual router instance\n readyCallbacks: [],\n ready(callback: () => void) {\n if (this.router) return callback()\n if (typeof window !== 'undefined') {\n this.readyCallbacks.push(callback)\n }\n },\n}\n\n// Create public properties and methods of the router in the singletonRouter\nconst urlPropertyFields = [\n 'pathname',\n 'route',\n 'query',\n 'asPath',\n 'components',\n 'isFallback',\n 'basePath',\n 'locale',\n 'locales',\n 'defaultLocale',\n 'isReady',\n 'isPreview',\n 'isLocaleDomain',\n 'domainLocales',\n] as const\nconst routerEvents = [\n 'routeChangeStart',\n 'beforeHistoryChange',\n 'routeChangeComplete',\n 'routeChangeError',\n 'hashChangeStart',\n 'hashChangeComplete',\n] as const\nexport type RouterEvent = (typeof routerEvents)[number]\n\nconst coreMethodFields = [\n 'push',\n 'replace',\n 'reload',\n 'back',\n 'prefetch',\n 'beforePopState',\n] as const\n\n// Events is a static property on the router, the router doesn't have to be initialized to use it\nObject.defineProperty(singletonRouter, 'events', {\n get() {\n return Router.events\n },\n})\n\nfunction getRouter(): Router {\n if (!singletonRouter.router) {\n const message =\n 'No router instance found.\\n' +\n 'You should only use \"next/router\" on the client side of your app.\\n'\n throw new Error(message)\n }\n return singletonRouter.router\n}\n\nurlPropertyFields.forEach((field) => {\n // Here we need to use Object.defineProperty because we need to return\n // the property assigned to the actual router\n // The value might get changed as we change routes and this is the\n // proper way to access it\n Object.defineProperty(singletonRouter, field, {\n get() {\n const router = getRouter()\n return router[field] as string\n },\n })\n})\n\ncoreMethodFields.forEach((field) => {\n // We don't really know the types here, so we add them later instead\n ;(singletonRouter as any)[field] = (...args: any[]) => {\n const router = getRouter() as any\n return router[field](...args)\n }\n})\n\nrouterEvents.forEach((event) => {\n singletonRouter.ready(() => {\n Router.events.on(event, (...args) => {\n const eventField = `on${event.charAt(0).toUpperCase()}${event.substring(\n 1\n )}`\n const _singletonRouter = singletonRouter as any\n if (_singletonRouter[eventField]) {\n try {\n _singletonRouter[eventField](...args)\n } catch (err) {\n console.error(`Error when running the Router event: ${eventField}`)\n console.error(\n isError(err) ? `${err.message}\\n${err.stack}` : err + ''\n )\n }\n }\n })\n })\n})\n\n// Export the singletonRouter and this is the public API.\nexport default singletonRouter as SingletonRouter\n\n// Reexport the withRouter HOC\nexport { default as withRouter } from './with-router'\n\n/**\n * This hook gives access the [router object](https://nextjs.org/docs/pages/api-reference/functions/use-router#router-object)\n * inside the [Pages Router](https://nextjs.org/docs/pages/building-your-application).\n *\n * Read more: [Next.js Docs: `useRouter`](https://nextjs.org/docs/pages/api-reference/functions/use-router)\n */\nexport function useRouter(): NextRouter {\n const router = React.useContext(RouterContext)\n if (!router) {\n throw new Error(\n 'NextRouter was not mounted. https://nextjs.org/docs/messages/next-router-not-mounted'\n )\n }\n\n return router\n}\n\n/**\n * Create a router and assign it as the singleton instance.\n * This is used in client side when we are initializing the app.\n * This should **not** be used inside the server.\n * @internal\n */\nexport function createRouter(\n ...args: ConstructorParameters<typeof Router>\n): Router {\n singletonRouter.router = new Router(...args)\n singletonRouter.readyCallbacks.forEach((cb) => cb())\n singletonRouter.readyCallbacks = []\n\n return singletonRouter.router\n}\n\n/**\n * This function is used to create the `withRouter` router instance\n * @internal\n */\nexport function makePublicRouterInstance(router: Router): NextRouter {\n const scopedRouter = router as any\n const instance = {} as any\n\n for (const property of urlPropertyFields) {\n if (typeof scopedRouter[property] === 'object') {\n instance[property] = Object.assign(\n Array.isArray(scopedRouter[property]) ? [] : {},\n scopedRouter[property]\n ) // makes sure query is not stateful\n continue\n }\n\n instance[property] = scopedRouter[property]\n }\n\n // Events is a static property on the router, the router doesn't have to be initialized to use it\n instance.events = Router.events\n\n coreMethodFields.forEach((field) => {\n instance[field] = (...args: any[]) => {\n return scopedRouter[field](...args)\n }\n })\n\n return instance\n}\n","/**\n * This module imports the client instrumentation hook from the project root.\n *\n * The `private-next-instrumentation-client` module is automatically aliased to\n * the `instrumentation-client.ts` file in the project root by webpack or turbopack.\n */ \"use strict\";\nif (process.env.NODE_ENV === 'development') {\n const measureName = 'Client Instrumentation Hook';\n const startTime = performance.now();\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client');\n const endTime = performance.now();\n const duration = endTime - startTime;\n // Using 16ms threshold as it represents one frame (1000ms/60fps)\n // This helps identify if the instrumentation hook initialization\n // could potentially cause frame drops during development.\n const THRESHOLD = 16;\n if (duration > THRESHOLD) {\n console.log(`[${measureName}] Slow execution detected: ${duration.toFixed(0)}ms (Note: Code download overhead is not included in this measurement)`);\n }\n} else {\n // eslint-disable-next-line @next/internal/typechecked-require -- Not a module.\n module.exports = require('private-next-instrumentation-client');\n}\n\n//# sourceMappingURL=require-instrumentation-client.js.map","import {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { PARAMETER_PATTERN, parseMatchedParameter } from './get-dynamic-param'\n\nexport interface Group {\n pos: number\n repeat: boolean\n optional: boolean\n}\n\nexport interface RouteRegex {\n groups: { [groupName: string]: Group }\n re: RegExp\n}\n\nexport type RegexReference = {\n names: Record<string, string>\n intercepted: Record<string, string>\n}\n\ntype GetNamedRouteRegexOptions = {\n /**\n * Whether to prefix the route keys with the NEXT_INTERCEPTION_MARKER_PREFIX\n * or NEXT_QUERY_PARAM_PREFIX. This is only relevant when creating the\n * routes-manifest during the build.\n */\n prefixRouteKeys: boolean\n\n /**\n * Whether to include the suffix in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n\n /**\n * Whether to backtrack duplicate keys. This is only relevant when creating\n * the routes-manifest during the build.\n */\n backreferenceDuplicateKeys?: boolean\n\n /**\n * If provided, this will be used as the reference for the dynamic parameter\n * keys instead of generating them in context. This is currently only used for\n * interception routes.\n */\n reference?: RegexReference\n}\n\ntype GetRouteRegexOptions = {\n /**\n * Whether to include extra parts in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n * of adding this option.\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n}\n\nfunction getParametrizedRoute(\n route: string,\n includeSuffix: boolean,\n includePrefix: boolean\n) {\n const groups: { [groupName: string]: Group } = {}\n let groupIndex = 1\n\n const segments: string[] = []\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n if (markerMatch && paramMatches && paramMatches[2]) {\n const { key, optional, repeat } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)\n } else if (paramMatches && paramMatches[2]) {\n const { key, repeat, optional } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n }\n\n let s = repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n\n // Remove the leading slash if includePrefix already added it.\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n }\n }\n\n return {\n parameterizedRoute: segments.join(''),\n groups,\n }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(\n normalizedRoute: string,\n {\n includeSuffix = false,\n includePrefix = false,\n excludeOptionalTrailingSlash = false,\n }: GetRouteRegexOptions = {}\n): RouteRegex {\n const { parameterizedRoute, groups } = getParametrizedRoute(\n normalizedRoute,\n includeSuffix,\n includePrefix\n )\n\n let re = parameterizedRoute\n if (!excludeOptionalTrailingSlash) {\n re += '(?:/)?'\n }\n\n return {\n re: new RegExp(`^${re}$`),\n groups: groups,\n }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n let i = 0\n\n return () => {\n let routeKey = ''\n let j = ++i\n while (j > 0) {\n routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n j = Math.floor((j - 1) / 26)\n }\n return routeKey\n }\n}\n\nfunction getSafeKeyFromSegment({\n interceptionMarker,\n getSafeRouteKey,\n segment,\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n}: {\n interceptionMarker?: string\n getSafeRouteKey: () => string\n segment: string\n routeKeys: Record<string, string>\n keyPrefix?: string\n backreferenceDuplicateKeys: boolean\n}) {\n const { key, optional, repeat } = parseMatchedParameter(segment)\n\n // replace any non-word characters since they can break\n // the named regex\n let cleanedKey = key.replace(/\\W/g, '')\n\n if (keyPrefix) {\n cleanedKey = `${keyPrefix}${cleanedKey}`\n }\n let invalidKey = false\n\n // check if the key is still invalid and fallback to using a known\n // safe key\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true\n }\n if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n invalidKey = true\n }\n\n if (invalidKey) {\n cleanedKey = getSafeRouteKey()\n }\n\n const duplicateKey = cleanedKey in routeKeys\n\n if (keyPrefix) {\n routeKeys[cleanedKey] = `${keyPrefix}${key}`\n } else {\n routeKeys[cleanedKey] = key\n }\n\n // if the segment has an interception marker, make sure that's part of the regex pattern\n // this is to ensure that the route with the interception marker doesn't incorrectly match\n // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n const interceptionPrefix = interceptionMarker\n ? escapeStringRegexp(interceptionMarker)\n : ''\n\n let pattern: string\n if (duplicateKey && backreferenceDuplicateKeys) {\n // Use a backreference to the key to ensure that the key is the same value\n // in each of the placeholders.\n pattern = `\\\\k<${cleanedKey}>`\n } else if (repeat) {\n pattern = `(?<${cleanedKey}>.+?)`\n } else {\n pattern = `(?<${cleanedKey}>[^/]+?)`\n }\n\n return {\n key,\n pattern: optional\n ? `(?:/${interceptionPrefix}${pattern})?`\n : `/${interceptionPrefix}${pattern}`,\n cleanedKey: cleanedKey,\n optional,\n repeat,\n }\n}\n\nfunction getNamedParametrizedRoute(\n route: string,\n prefixRouteKeys: boolean,\n includeSuffix: boolean,\n includePrefix: boolean,\n backreferenceDuplicateKeys: boolean,\n reference: RegexReference = { names: {}, intercepted: {} }\n) {\n const getSafeRouteKey = buildGetSafeRouteKey()\n const routeKeys: { [named: string]: string } = {}\n\n const segments: string[] = []\n const inverseParts: string[] = []\n\n // Ensure we don't mutate the original reference object.\n reference = structuredClone(reference)\n\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n segment.startsWith(m)\n )\n\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n const interceptionMarker = hasInterceptionMarker\n ? paramMatches?.[1]\n : undefined\n\n let keyPrefix: string | undefined\n if (interceptionMarker && paramMatches?.[2]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n reference.intercepted[paramMatches[2]] = interceptionMarker\n } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n } else {\n keyPrefix = prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined\n }\n\n if (interceptionMarker && paramMatches && paramMatches[2]) {\n // If there's an interception marker, add it to the segments.\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n interceptionMarker,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n segments.push(pattern)\n inverseParts.push(\n `/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else if (paramMatches && paramMatches[2]) {\n // If there's a prefix, add it to the segments if it's enabled.\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n inverseParts.push(`/${paramMatches[1]}`)\n }\n\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n // Remove the leading slash if includePrefix already added it.\n let s = pattern\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n inverseParts.push(\n `/:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n inverseParts.push(`/${segment}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n inverseParts.push(paramMatches[3])\n }\n }\n\n return {\n namedParameterizedRoute: segments.join(''),\n routeKeys,\n pathToRegexpPattern: inverseParts.join(''),\n reference,\n }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n normalizedRoute: string,\n options: GetNamedRouteRegexOptions\n) {\n const result = getNamedParametrizedRoute(\n normalizedRoute,\n options.prefixRouteKeys,\n options.includeSuffix ?? false,\n options.includePrefix ?? false,\n options.backreferenceDuplicateKeys ?? false,\n options.reference\n )\n\n let namedRegex = result.namedParameterizedRoute\n if (!options.excludeOptionalTrailingSlash) {\n namedRegex += '(?:/)?'\n }\n\n return {\n ...getRouteRegex(normalizedRoute, options),\n namedRegex: `^${namedRegex}$`,\n routeKeys: result.routeKeys,\n pathToRegexpPattern: result.pathToRegexpPattern,\n reference: result.reference,\n }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n normalizedRoute: string,\n options: {\n catchAll?: boolean\n }\n) {\n const { parameterizedRoute } = getParametrizedRoute(\n normalizedRoute,\n false,\n false\n )\n const { catchAll = true } = options\n if (parameterizedRoute === '/') {\n let catchAllRegex = catchAll ? '.*' : ''\n return {\n namedRegex: `^/${catchAllRegex}$`,\n }\n }\n\n const { namedParameterizedRoute } = getNamedParametrizedRoute(\n normalizedRoute,\n false,\n false,\n false,\n false,\n undefined\n )\n let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n return {\n namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n }\n}\n","// Convert router.asPath to a URLSearchParams object\n// example: /dynamic/[slug]?foo=bar -> { foo: 'bar' }\nexport function asPathToSearchParams(asPath: string): URLSearchParams {\n return new URL(asPath, 'http://n').searchParams\n}\n","let warnOnce = (_: string) => {}\nif (process.env.NODE_ENV !== 'production') {\n const warnings = new Set<string>()\n warnOnce = (msg: string) => {\n if (!warnings.has(msg)) {\n console.warn(msg)\n }\n warnings.add(msg)\n }\n}\n\nexport { warnOnce }\n","import { normalizeLocalePath } from '../../i18n/normalize-locale-path'\nimport { removePathPrefix } from './remove-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\nimport type { I18NProvider } from '../../../../server/lib/i18n-provider'\n\nexport interface NextPathnameInfo {\n /**\n * The base path in case the pathname included it.\n */\n basePath?: string\n /**\n * The buildId for when the parsed URL is a data URL. Parsing it can be\n * disabled with the `parseData` option.\n */\n buildId?: string\n /**\n * If there was a locale in the pathname, this will hold its value.\n */\n locale?: string\n /**\n * The processed pathname without a base path, locale, or data URL elements\n * when parsing it is enabled.\n */\n pathname: string\n /**\n * A boolean telling if the pathname had a trailingSlash. This can be only\n * true if trailingSlash is enabled.\n */\n trailingSlash?: boolean\n}\n\ninterface Options {\n /**\n * When passed to true, this function will also parse Nextjs data URLs.\n */\n parseData?: boolean\n /**\n * A partial of the Next.js configuration to parse the URL.\n */\n nextConfig?: {\n basePath?: string\n i18n?: { locales?: readonly string[] } | null\n trailingSlash?: boolean\n }\n\n /**\n * If provided, this normalizer will be used to detect the locale instead of\n * the default locale detection.\n */\n i18nProvider?: I18NProvider\n}\n\nexport function getNextPathnameInfo(\n pathname: string,\n options: Options\n): NextPathnameInfo {\n const { basePath, i18n, trailingSlash } = options.nextConfig ?? {}\n const info: NextPathnameInfo = {\n pathname,\n trailingSlash: pathname !== '/' ? pathname.endsWith('/') : trailingSlash,\n }\n\n if (basePath && pathHasPrefix(info.pathname, basePath)) {\n info.pathname = removePathPrefix(info.pathname, basePath)\n info.basePath = basePath\n }\n let pathnameNoDataPrefix = info.pathname\n\n if (\n info.pathname.startsWith('/_next/data/') &&\n info.pathname.endsWith('.json')\n ) {\n const paths = info.pathname\n .replace(/^\\/_next\\/data\\//, '')\n .replace(/\\.json$/, '')\n .split('/')\n\n const buildId = paths[0]\n info.buildId = buildId\n pathnameNoDataPrefix =\n paths[1] !== 'index' ? `/${paths.slice(1).join('/')}` : '/'\n\n // update pathname with normalized if enabled although\n // we use normalized to populate locale info still\n if (options.parseData === true) {\n info.pathname = pathnameNoDataPrefix\n }\n }\n\n // If provided, use the locale route normalizer to detect the locale instead\n // of the function below.\n if (i18n) {\n let result = options.i18nProvider\n ? options.i18nProvider.analyze(info.pathname)\n : normalizeLocalePath(info.pathname, i18n.locales)\n\n info.locale = result.detectedLocale\n info.pathname = result.pathname ?? info.pathname\n\n if (!result.detectedLocale && info.buildId) {\n result = options.i18nProvider\n ? options.i18nProvider.analyze(pathnameNoDataPrefix)\n : normalizeLocalePath(pathnameNoDataPrefix, i18n.locales)\n\n if (result.detectedLocale) {\n info.locale = result.detectedLocale\n }\n }\n }\n return info\n}\n","import { setAttributesFromProps } from './set-attributes-from-props'\n\nimport type { JSX } from 'react'\n\nfunction reactElementToDOM({ type, props }: JSX.Element): HTMLElement {\n const el: HTMLElement = document.createElement(type)\n setAttributesFromProps(el, props)\n\n const { children, dangerouslySetInnerHTML } = props\n if (dangerouslySetInnerHTML) {\n el.innerHTML = dangerouslySetInnerHTML.__html || ''\n } else if (children) {\n el.textContent =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n }\n return el\n}\n\n/**\n * When a `nonce` is present on an element, browsers such as Chrome and Firefox strip it out of the\n * actual HTML attributes for security reasons *when the element is added to the document*. Thus,\n * given two equivalent elements that have nonces, `Element,isEqualNode()` will return false if one\n * of those elements gets added to the document. Although the `element.nonce` property will be the\n * same for both elements, the one that was added to the document will return an empty string for\n * its nonce HTML attribute value.\n *\n * This custom `isEqualNode()` function therefore removes the nonce value from the `newTag` before\n * comparing it to `oldTag`, restoring it afterwards.\n *\n * For more information, see:\n * https://bugs.chromium.org/p/chromium/issues/detail?id=1211471#c12\n */\nexport function isEqualNode(oldTag: Element, newTag: Element) {\n if (oldTag instanceof HTMLElement && newTag instanceof HTMLElement) {\n const nonce = newTag.getAttribute('nonce')\n // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not\n // be stripped if there is no content security policy response header that includes a nonce.\n if (nonce && !oldTag.getAttribute('nonce')) {\n const cloneTag = newTag.cloneNode(true) as typeof newTag\n cloneTag.setAttribute('nonce', '')\n cloneTag.nonce = nonce\n return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag)\n }\n }\n\n return oldTag.isEqualNode(newTag)\n}\n\nfunction updateElements(type: string, components: JSX.Element[]) {\n const headEl = document.querySelector('head')\n if (!headEl) return\n\n const oldTags = new Set(headEl.querySelectorAll(`${type}[data-next-head]`))\n\n if (type === 'meta') {\n const metaCharset = headEl.querySelector('meta[charset]')\n if (metaCharset !== null) {\n oldTags.add(metaCharset)\n }\n }\n\n const newTags: Element[] = []\n for (let i = 0; i < components.length; i++) {\n const component = components[i]\n const newTag = reactElementToDOM(component)\n newTag.setAttribute('data-next-head', '')\n\n let isNew = true\n for (const oldTag of oldTags) {\n if (isEqualNode(oldTag, newTag)) {\n oldTags.delete(oldTag)\n isNew = false\n break\n }\n }\n\n if (isNew) {\n newTags.push(newTag)\n }\n }\n\n for (const oldTag of oldTags) {\n oldTag.parentNode?.removeChild(oldTag)\n }\n\n for (const newTag of newTags) {\n // meta[charset] must be first element so special case\n if (\n newTag.tagName.toLowerCase() === 'meta' &&\n newTag.getAttribute('charset') !== null\n ) {\n headEl.prepend(newTag)\n }\n headEl.appendChild(newTag)\n }\n}\n\nexport default function initHeadManager(): {\n mountedInstances: Set<unknown>\n updateHead: (head: JSX.Element[]) => void\n} {\n return {\n mountedInstances: new Set(),\n updateHead: (head: JSX.Element[]) => {\n const tags: Record<string, JSX.Element[]> = {}\n\n head.forEach((h) => {\n if (\n // If the font tag is loaded only on client navigation\n // it won't be inlined. In this case revert to the original behavior\n h.type === 'link' &&\n h.props['data-optimized-fonts']\n ) {\n if (\n document.querySelector(`style[data-href=\"${h.props['data-href']}\"]`)\n ) {\n return\n } else {\n h.props.href = h.props['data-href']\n h.props['data-href'] = undefined\n }\n }\n\n const components = tags[h.type] || []\n components.push(h)\n tags[h.type] = components\n })\n\n const titleComponent = tags.title ? tags.title[0] : null\n let title = ''\n if (titleComponent) {\n const { children } = titleComponent.props\n title =\n typeof children === 'string'\n ? children\n : Array.isArray(children)\n ? children.join('')\n : ''\n }\n if (title !== document.title) document.title = title\n ;['meta', 'base', 'link', 'style', 'script'].forEach((type) => {\n updateElements(type, tags[type] || [])\n })\n },\n }\n}\n","import type { NextRouter, Url } from '../shared/lib/router/router'\n\nimport { searchParamsToUrlQuery } from '../shared/lib/router/utils/querystring'\nimport { formatWithValidation } from '../shared/lib/router/utils/format-url'\nimport { omit } from '../shared/lib/router/utils/omit'\nimport { normalizeRepeatedSlashes } from '../shared/lib/utils'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { isDynamicRoute } from '../shared/lib/router/utils'\nimport { interpolateAs } from '../shared/lib/router/utils/interpolate-as'\nimport { getRouteRegex } from '../shared/lib/router/utils/route-regex'\nimport { getRouteMatcher } from '../shared/lib/router/utils/route-matcher'\n\n/**\n * Resolves a given hyperlink with a certain router state (basePath not included).\n * Preserves absolute urls.\n */\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs: true\n): [string, string] | [string]\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: false\n): string\nexport function resolveHref(\n router: NextRouter,\n href: Url,\n resolveAs?: boolean\n): [string, string] | [string] | string {\n // we use a dummy base url for relative urls\n let base: URL\n let urlAsString = typeof href === 'string' ? href : formatWithValidation(href)\n\n // repeated slashes and backslashes in the URL are considered\n // invalid and will never match a Next.js page/file\n // https://www.rfc-editor.org/rfc/rfc3986.html#section-3.1\n const urlProtoMatch = urlAsString.match(/^[a-z][a-z0-9+.-]*:\\/\\//i)\n const urlAsStringNoProto = urlProtoMatch\n ? urlAsString.slice(urlProtoMatch[0].length)\n : urlAsString\n\n const urlParts = urlAsStringNoProto.split('?', 1)\n\n if ((urlParts[0] || '').match(/(\\/\\/|\\\\)/)) {\n console.error(\n `Invalid href '${urlAsString}' passed to next/router in page: '${router.pathname}'. Repeated forward-slashes (//) or backslashes \\\\ are not valid in the href.`\n )\n const normalizedUrl = normalizeRepeatedSlashes(urlAsStringNoProto)\n urlAsString = (urlProtoMatch ? urlProtoMatch[0] : '') + normalizedUrl\n }\n\n // Return because it cannot be routed by the Next.js router\n if (!isLocalURL(urlAsString)) {\n return (resolveAs ? [urlAsString] : urlAsString) as string\n }\n\n try {\n let baseBase = urlAsString.startsWith('#') ? router.asPath : router.pathname\n\n // If the provided href is only a query string, it is safer to use the asPath\n // considering rewrites.\n if (urlAsString.startsWith('?')) {\n baseBase = router.asPath\n\n // However, if is a dynamic route, we need to use the pathname to preserve the\n // query interpolation and rewrites (router.pathname will look like \"/[slug]\").\n if (isDynamicRoute(router.pathname)) {\n baseBase = router.pathname\n\n const routeRegex = getRouteRegex(router.pathname)\n const match = getRouteMatcher(routeRegex)(router.asPath)\n\n // For dynamic routes, if asPath doesn't match the pathname regex, it is a rewritten path.\n // In this case, should use asPath to preserve the current URL.\n if (!match) {\n baseBase = router.asPath\n }\n\n // Note: There is an edge case where the pathname is dynamic, and also a rewrite path to the same segment.\n // E.g. in \"/[slug]\" path, rewrite \"/foo\" -> \"/bar\"\n\n // In this case, it will be treated as a non-rewritten path and possibly interpolate the query string.\n // E.g., \"/any?slug=foo\" will become the content of \"/foo\", not rewritten as \"/bar\"\n\n // This is currently a trade-off of not resolving rewrite paths on every Router/Link call,\n // but using a lighter route regex pattern check.\n }\n }\n\n base = new URL(baseBase, 'http://n')\n } catch (_) {\n // fallback to / for invalid asPath values e.g. //\n base = new URL('/', 'http://n')\n }\n\n try {\n const finalUrl = new URL(urlAsString, base)\n finalUrl.pathname = normalizePathTrailingSlash(finalUrl.pathname)\n let interpolatedAs = ''\n\n if (\n isDynamicRoute(finalUrl.pathname) &&\n finalUrl.searchParams &&\n resolveAs\n ) {\n const query = searchParamsToUrlQuery(finalUrl.searchParams)\n\n const { result, params } = interpolateAs(\n finalUrl.pathname,\n finalUrl.pathname,\n query\n )\n\n if (result) {\n interpolatedAs = formatWithValidation({\n pathname: result,\n hash: finalUrl.hash,\n query: omit(query, params),\n })\n }\n }\n\n // if the origin didn't change, it means we received a relative href\n const resolvedHref =\n finalUrl.origin === base.origin\n ? finalUrl.href.slice(finalUrl.origin.length)\n : finalUrl.href\n\n return resolveAs\n ? [resolvedHref, interpolatedAs || resolvedHref]\n : resolvedHref\n } catch (_) {\n return resolveAs ? [urlAsString] : urlAsString\n }\n}\n","'use client'\n\nimport React, { useContext, type JSX } from 'react'\nimport Effect from './side-effect'\nimport { HeadManagerContext } from './head-manager-context.shared-runtime'\nimport { warnOnce } from './utils/warn-once'\n\nexport function defaultHead(): JSX.Element[] {\n const head = [\n <meta charSet=\"utf-8\" key=\"charset\" />,\n <meta name=\"viewport\" content=\"width=device-width\" key=\"viewport\" />,\n ]\n return head\n}\n\nfunction onlyReactElement(\n list: Array<React.ReactElement<any>>,\n child: React.ReactElement | number | string\n): Array<React.ReactElement<any>> {\n // React children can be \"string\" or \"number\" in this case we ignore them for backwards compat\n if (typeof child === 'string' || typeof child === 'number') {\n return list\n }\n // Adds support for React.Fragment\n if (child.type === React.Fragment) {\n return list.concat(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n React.Children.toArray(child.props.children).reduce(\n // @ts-expect-error @types/react does not remove fragments but this could also return ReactPortal[]\n (\n fragmentList: Array<React.ReactElement<any>>,\n fragmentChild: React.ReactElement | number | string\n ): Array<React.ReactElement<any>> => {\n if (\n typeof fragmentChild === 'string' ||\n typeof fragmentChild === 'number'\n ) {\n return fragmentList\n }\n return fragmentList.concat(fragmentChild)\n },\n []\n )\n )\n }\n return list.concat(child)\n}\n\nconst METATYPES = ['name', 'httpEquiv', 'charSet', 'itemProp']\n\n/*\n returns a function for filtering head child elements\n which shouldn't be duplicated, like <title/>\n Also adds support for deduplicated `key` properties\n*/\nfunction unique() {\n const keys = new Set()\n const tags = new Set()\n const metaTypes = new Set()\n const metaCategories: { [metatype: string]: Set<string> } = {}\n\n return (h: React.ReactElement<any>) => {\n let isUnique = true\n let hasKey = false\n\n if (h.key && typeof h.key !== 'number' && h.key.indexOf('$') > 0) {\n hasKey = true\n const key = h.key.slice(h.key.indexOf('$') + 1)\n if (keys.has(key)) {\n isUnique = false\n } else {\n keys.add(key)\n }\n }\n\n // eslint-disable-next-line default-case\n switch (h.type) {\n case 'title':\n case 'base':\n if (tags.has(h.type)) {\n isUnique = false\n } else {\n tags.add(h.type)\n }\n break\n case 'meta':\n for (let i = 0, len = METATYPES.length; i < len; i++) {\n const metatype = METATYPES[i]\n if (!h.props.hasOwnProperty(metatype)) continue\n\n if (metatype === 'charSet') {\n if (metaTypes.has(metatype)) {\n isUnique = false\n } else {\n metaTypes.add(metatype)\n }\n } else {\n const category = h.props[metatype]\n const categories = metaCategories[metatype] || new Set()\n if ((metatype !== 'name' || !hasKey) && categories.has(category)) {\n isUnique = false\n } else {\n categories.add(category)\n metaCategories[metatype] = categories\n }\n }\n }\n break\n }\n\n return isUnique\n }\n}\n\n/**\n *\n * @param headChildrenElements List of children of <Head>\n */\nfunction reduceComponents(\n headChildrenElements: Array<React.ReactElement<any>>\n) {\n return headChildrenElements\n .reduce(onlyReactElement, [])\n .reverse()\n .concat(defaultHead().reverse())\n .filter(unique())\n .reverse()\n .map((c: React.ReactElement<any>, i: number) => {\n const key = c.key || i\n if (process.env.NODE_ENV === 'development') {\n // omit JSON-LD structured data snippets from the warning\n if (c.type === 'script' && c.props['type'] !== 'application/ld+json') {\n const srcMessage = c.props['src']\n ? `<script> tag with src=\"${c.props['src']}\"`\n : `inline <script>`\n warnOnce(\n `Do not add <script> tags using next/head (see ${srcMessage}). Use next/script instead. \\nSee more info here: https://nextjs.org/docs/messages/no-script-tags-in-head-component`\n )\n } else if (c.type === 'link' && c.props['rel'] === 'stylesheet') {\n warnOnce(\n `Do not add stylesheets using next/head (see <link rel=\"stylesheet\"> tag with href=\"${c.props['href']}\"). Use Document instead. \\nSee more info here: https://nextjs.org/docs/messages/no-stylesheets-in-head-component`\n )\n }\n }\n return React.cloneElement(c, { key })\n })\n}\n\n/**\n * This component injects elements to `<head>` of your page.\n * To avoid duplicated `tags` in `<head>` you can use the `key` property, which will make sure every tag is only rendered once.\n */\nfunction Head({ children }: { children: React.ReactNode }) {\n const headManager = useContext(HeadManagerContext)\n return (\n <Effect\n reduceComponentsToState={reduceComponents}\n headManager={headManager}\n >\n {children}\n </Effect>\n )\n}\n\nexport default Head\n","export const VALID_LOADERS = [\n 'default',\n 'imgix',\n 'cloudinary',\n 'akamai',\n 'custom',\n] as const\n\nexport type LoaderValue = (typeof VALID_LOADERS)[number]\n\nexport type ImageLoaderProps = {\n src: string\n width: number\n quality?: number\n}\n\nexport type ImageLoaderPropsWithConfig = ImageLoaderProps & {\n config: Readonly<ImageConfig>\n}\n\nexport type LocalPattern = {\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\nexport type RemotePattern = {\n /**\n * Must be `http` or `https`.\n */\n protocol?: 'http' | 'https'\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single subdomain.\n * Double `**` matches any number of subdomains.\n */\n hostname: string\n\n /**\n * Can be literal port such as `8080` or empty string\n * meaning no port.\n */\n port?: string\n\n /**\n * Can be literal or wildcard.\n * Single `*` matches a single path segment.\n * Double `**` matches any number of path segments.\n */\n pathname?: string\n\n /**\n * Can be literal query string such as `?v=1` or\n * empty string meaning no query string.\n */\n search?: string\n}\n\ntype ImageFormat = 'image/avif' | 'image/webp'\n\n/**\n * Image configurations\n *\n * @see [Image configuration options](https://nextjs.org/docs/api-reference/next/image#configuration-options)\n */\nexport type ImageConfigComplete = {\n /** @see [Device sizes documentation](https://nextjs.org/docs/api-reference/next/image#device-sizes) */\n deviceSizes: number[]\n\n /** @see [Image sizing documentation](https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing) */\n imageSizes: number[]\n\n /** @see [Image loaders configuration](https://nextjs.org/docs/api-reference/next/legacy/image#loader) */\n loader: LoaderValue\n\n /** @see [Image loader configuration](https://nextjs.org/docs/app/api-reference/components/image#path) */\n path: string\n\n /** @see [Image loader configuration](https://nextjs.org/docs/api-reference/next/image#loader-configuration) */\n loaderFile: string\n\n /**\n * @deprecated Use `remotePatterns` instead.\n */\n domains: string[]\n\n /** @see [Disable static image import configuration](https://nextjs.org/docs/api-reference/next/image#disable-static-imports) */\n disableStaticImages: boolean\n\n /** @see [Cache behavior](https://nextjs.org/docs/api-reference/next/image#caching-behavior) */\n minimumCacheTTL: number\n\n /** @see [Acceptable formats](https://nextjs.org/docs/api-reference/next/image#acceptable-formats) */\n formats: ImageFormat[]\n\n /** @see [Maximum Disk Cache Size (in bytes)](https://nextjs.org/docs/api-reference/next/image#maximumdiskcachesize) */\n maximumDiskCacheSize: number | undefined\n\n /** @see [Maximum Redirects](https://nextjs.org/docs/api-reference/next/image#maximumredirects) */\n maximumRedirects: number\n\n /** @see [Maximum Response Body](https://nextjs.org/docs/api-reference/next/image#maximumresponsebody) */\n maximumResponseBody: number\n\n /** @see [Dangerously Allow Local IP](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-local-ip) */\n dangerouslyAllowLocalIP: boolean\n\n /** @see [Dangerously Allow SVG](https://nextjs.org/docs/api-reference/next/image#dangerously-allow-svg) */\n dangerouslyAllowSVG: boolean\n\n /** @see [Content Security Policy](https://nextjs.org/docs/api-reference/next/image#contentsecuritypolicy) */\n contentSecurityPolicy: string\n\n /** @see [Content Disposition Type](https://nextjs.org/docs/api-reference/next/image#contentdispositiontype) */\n contentDispositionType: 'inline' | 'attachment'\n\n /** @see [Remote Patterns](https://nextjs.org/docs/api-reference/next/image#remotepatterns) */\n remotePatterns: Array<URL | RemotePattern>\n\n /** @see [Local Patterns](https://nextjs.org/docs/api-reference/next/image#localPatterns) */\n localPatterns: LocalPattern[] | undefined\n\n /** @see [Qualities](https://nextjs.org/docs/api-reference/next/image#qualities) */\n qualities: number[] | undefined\n\n /** @see [Unoptimized](https://nextjs.org/docs/api-reference/next/image#unoptimized) */\n unoptimized: boolean\n\n /**\n * When true, the `cacheHandler` configured in next.config.js will also be used\n * for caching optimized images. When false, images use the default filesystem cache.\n * @see [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/cacheHandler#image-optimization-caching)\n */\n customCacheHandler: boolean\n}\n\nexport type ImageConfig = Partial<ImageConfigComplete>\n\nexport const imageConfigDefault: ImageConfigComplete = {\n deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],\n imageSizes: [32, 48, 64, 96, 128, 256, 384],\n path: '/_next/image',\n loader: 'default',\n loaderFile: '',\n /**\n * @deprecated Use `remotePatterns` instead to protect your application from malicious users.\n */\n domains: [],\n disableStaticImages: false,\n minimumCacheTTL: 14400, // 4 hours\n formats: ['image/webp'],\n maximumDiskCacheSize: undefined, // auto-detect by default\n maximumRedirects: 3,\n maximumResponseBody: 50_000_000, // 50 MB\n dangerouslyAllowLocalIP: false,\n dangerouslyAllowSVG: false,\n contentSecurityPolicy: `script-src 'none'; frame-src 'none'; sandbox;`,\n contentDispositionType: 'attachment',\n localPatterns: undefined, // default: allow all local images\n remotePatterns: [], // default: allow no remote images\n qualities: [75],\n unoptimized: false,\n customCacheHandler: false,\n}\n","// minimal implementation MurmurHash2 hash function\nfunction murmurhash2(str: string) {\n let h = 0\n for (let i = 0; i < str.length; i++) {\n const c = str.charCodeAt(i)\n h = Math.imul(h ^ c, 0x5bd1e995)\n h ^= h >>> 13\n h = Math.imul(h, 0x5bd1e995)\n }\n return h >>> 0\n}\n\n// default to 0.01% error rate as the filter compresses very well\nconst DEFAULT_ERROR_RATE = 0.0001\n\nexport class BloomFilter {\n numItems: number\n errorRate: number\n numBits: number\n numHashes: number\n bitArray: number[]\n\n constructor(numItems: number, errorRate: number = DEFAULT_ERROR_RATE) {\n this.numItems = numItems\n this.errorRate = errorRate\n this.numBits = Math.ceil(\n -(numItems * Math.log(errorRate)) / (Math.log(2) * Math.log(2))\n )\n this.numHashes = Math.ceil((this.numBits / numItems) * Math.log(2))\n this.bitArray = new Array(this.numBits).fill(0)\n }\n\n static from(items: string[], errorRate = DEFAULT_ERROR_RATE) {\n const filter = new BloomFilter(items.length, errorRate)\n\n for (const item of items) {\n filter.add(item)\n }\n return filter\n }\n\n export() {\n const data = {\n numItems: this.numItems,\n errorRate: this.errorRate,\n numBits: this.numBits,\n numHashes: this.numHashes,\n bitArray: this.bitArray,\n }\n\n if (process.env.NEXT_RUNTIME === 'nodejs') {\n if (this.errorRate < DEFAULT_ERROR_RATE) {\n const filterData = JSON.stringify(data)\n const gzipSize = (\n require('next/dist/compiled/gzip-size') as typeof import('next/dist/compiled/gzip-size')\n ).sync(filterData)\n\n if (gzipSize > 1024) {\n console.warn(\n `Creating filter with error rate less than 0.1% (0.001) can increase the size dramatically proceed with caution. Received error rate ${this.errorRate} resulted in size ${filterData.length} bytes, ${gzipSize} bytes (gzip)`\n )\n }\n }\n }\n\n return data\n }\n\n import(data: ReturnType<(typeof this)['export']>) {\n this.numItems = data.numItems\n this.errorRate = data.errorRate\n this.numBits = data.numBits\n this.numHashes = data.numHashes\n this.bitArray = data.bitArray\n }\n\n add(item: string) {\n const hashValues = this.getHashValues(item)\n hashValues.forEach((hash) => {\n this.bitArray[hash] = 1\n })\n }\n\n contains(item: string) {\n const hashValues = this.getHashValues(item)\n return hashValues.every((hash) => this.bitArray[hash])\n }\n\n getHashValues(item: string) {\n const hashValues = []\n for (let i = 1; i <= this.numHashes; i++) {\n const hash = murmurhash2(`${item}${i}`) % this.numBits\n hashValues.push(hash)\n }\n return hashValues\n }\n}\n","// This module can be shared between both pages router and app router\n\nimport type { HydrationOptions } from 'react-dom/client'\nimport { isBailoutToCSRError } from '../../shared/lib/lazy-dynamic/bailout-to-csr'\nimport isError from '../../lib/is-error'\nimport { reportGlobalError } from './report-global-error'\n\nconst recoverableErrors = new WeakSet<Error>()\n\nconst isInstantTest =\n process.env.__NEXT_EXPOSE_TESTING_API &&\n typeof self !== 'undefined' &&\n !!self.__next_instant_test\n\nexport function isRecoverableError(error: Error): boolean {\n return recoverableErrors.has(error)\n}\n\nexport const onRecoverableError: HydrationOptions['onRecoverableError'] = (\n error\n) => {\n // x-ref: https://github.com/facebook/react/pull/28736\n let cause = isError(error) && 'cause' in error ? error.cause : error\n // Skip certain custom errors which are not expected to be reported on client\n if (isBailoutToCSRError(cause)) return\n\n // Instant Navigation Testing API: suppress \"server could not finish this\n // Suspense boundary\" errors (React error #419) during instant test mode.\n // The static shell intentionally has incomplete Suspense boundaries — React\n // correctly falls back to client rendering, which is expected.\n if (isInstantTest) {\n if (isError(cause)) {\n if (process.env.NODE_ENV === 'production') {\n if (cause.message.includes('#419')) return\n } else {\n if (cause.message.includes('could not finish this Suspense boundary'))\n return\n }\n }\n }\n\n if (process.env.NODE_ENV !== 'production') {\n const { decorateDevError } =\n require('../../next-devtools/userspace/app/errors/stitched-error') as typeof import('../../next-devtools/userspace/app/errors/stitched-error')\n const causeError = decorateDevError(cause)\n recoverableErrors.add(causeError)\n cause = causeError\n }\n\n reportGlobalError(cause)\n}\n","import { addPathPrefix } from '../shared/lib/router/utils/add-path-prefix'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function addBasePath(path: string, required?: boolean): string {\n return normalizePathTrailingSlash(\n process.env.__NEXT_MANUAL_CLIENT_BASE_PATH && !required\n ? path\n : addPathPrefix(path, basePath)\n )\n}\n","import type { addLocale as Fn } from '../shared/lib/router/utils/add-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nexport const addLocale: typeof Fn = (path, ...args) => {\n if (process.env.__NEXT_I18N_SUPPORT) {\n return normalizePathTrailingSlash(\n (\n require('../shared/lib/router/utils/add-locale') as typeof import('../shared/lib/router/utils/add-locale')\n ).addLocale(path, ...args)\n )\n }\n return path\n}\n","function _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== \"function\") return null;\n\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n\n return (_getRequireWildcardCache = function(nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\nfunction _interop_require_wildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) return obj;\n if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") return { default: obj };\n\n var cache = _getRequireWildcardCache(nodeInterop);\n\n if (cache && cache.has(obj)) return cache.get(obj);\n\n var newObj = { __proto__: null };\n var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;\n\n for (var key in obj) {\n if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;\n if (desc && (desc.get || desc.set)) Object.defineProperty(newObj, key, desc);\n else newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n\n if (cache) cache.set(obj, newObj);\n\n return newObj;\n}\nexport { _interop_require_wildcard as _ };\n","import { addPathPrefix } from './add-path-prefix'\nimport { pathHasPrefix } from './path-has-prefix'\n\n/**\n * For a given path and a locale, if the locale is given, it will prefix the\n * locale. The path shouldn't be an API path. If a default locale is given the\n * prefix will be omitted if the locale is already the default locale.\n */\nexport function addLocale(\n path: string,\n locale?: string | false,\n defaultLocale?: string,\n ignorePrefix?: boolean\n) {\n // If no locale was given or the locale is the default locale, we don't need\n // to prefix the path.\n if (!locale || locale === defaultLocale) return path\n\n const lower = path.toLowerCase()\n\n // If the path is an API path or the path already has the locale prefix, we\n // don't need to prefix the path.\n if (!ignorePrefix) {\n if (pathHasPrefix(lower, '/api')) return path\n if (pathHasPrefix(lower, `/${locale.toLowerCase()}`)) return path\n }\n\n // Add the locale prefix to the path.\n return addPathPrefix(path, `/${locale}`)\n}\n","import type { Params } from '../../../../server/request/params'\nimport type { DynamicParamTypes } from '../../app-router-types'\nimport { InvariantError } from '../../invariant-error'\nimport type {\n NormalizedAppRoute,\n NormalizedAppRouteSegment,\n} from '../routes/app'\nimport { interceptionPrefixFromParamType } from './interception-prefix-from-param-type'\n\n/**\n * Extracts the param value from a path segment, handling interception markers\n * based on the expected param type.\n *\n * @param pathSegment - The path segment to extract the value from\n * @param params - The current params object for resolving dynamic param references\n * @param paramType - The expected param type which may include interception marker info\n * @returns The extracted param value\n */\nfunction getParamValueFromSegment(\n pathSegment: NormalizedAppRouteSegment,\n params: Params,\n paramType: DynamicParamTypes\n): string {\n // If the segment is dynamic, resolve it from the params object\n if (pathSegment.type === 'dynamic') {\n return params[pathSegment.param.paramName] as string\n }\n\n // If the paramType indicates this is an intercepted param, strip the marker\n // that matches the interception marker in the param type\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (interceptionPrefix === pathSegment.interceptionMarker) {\n return pathSegment.name.replace(pathSegment.interceptionMarker, '')\n }\n\n // For static segments, use the name\n return pathSegment.name\n}\n\n/**\n * Resolves a route parameter value from the route segments at the given depth.\n * This shared logic is used by both extractPathnameRouteParamSegmentsFromLoaderTree\n * and resolveRouteParamsFromTree.\n *\n * @param paramName - The parameter name to resolve\n * @param paramType - The parameter type (dynamic, catchall, etc.)\n * @param depth - The current depth in the route tree\n * @param route - The normalized route containing segments\n * @param params - The current params object (used to resolve embedded param references)\n * @param options - Configuration options\n * @returns The resolved parameter value, or undefined if it cannot be resolved\n */\nexport function resolveParamValue(\n paramName: string,\n paramType: DynamicParamTypes,\n depth: number,\n route: NormalizedAppRoute,\n params: Params\n): string | string[] | undefined {\n switch (paramType) {\n case 'catchall':\n case 'optional-catchall':\n case 'catchall-intercepted-(..)(..)':\n case 'catchall-intercepted-(.)':\n case 'catchall-intercepted-(..)':\n case 'catchall-intercepted-(...)':\n // For catchall routes, derive from pathname using depth to determine\n // which segments to use\n const processedSegments: string[] = []\n\n // Process segments to handle any embedded dynamic params\n for (let index = depth; index < route.segments.length; index++) {\n const pathSegment = route.segments[index]\n\n if (pathSegment.type === 'static') {\n let value = pathSegment.name\n\n // For intercepted catch-all params, strip the marker from the first segment\n const interceptionPrefix = interceptionPrefixFromParamType(paramType)\n if (\n interceptionPrefix &&\n index === depth &&\n interceptionPrefix === pathSegment.interceptionMarker\n ) {\n // Strip the interception marker from the value\n value = value.replace(pathSegment.interceptionMarker, '')\n }\n\n processedSegments.push(value)\n } else {\n // If the segment is a param placeholder, check if we have its value\n if (!params.hasOwnProperty(pathSegment.param.paramName)) {\n // If the segment is an optional catchall, we can break out of the\n // loop because it's optional!\n if (pathSegment.param.paramType === 'optional-catchall') {\n break\n }\n\n // Unknown param placeholder in pathname - can't derive full value\n return undefined\n }\n\n // If the segment matches a param, use the param value\n // We don't encode values here as that's handled during retrieval.\n const paramValue = params[pathSegment.param.paramName]\n if (Array.isArray(paramValue)) {\n processedSegments.push(...paramValue)\n } else {\n processedSegments.push(paramValue as string)\n }\n }\n }\n\n if (processedSegments.length > 0) {\n return processedSegments\n } else if (paramType === 'optional-catchall') {\n return undefined\n } else {\n // We shouldn't be able to match a catchall segment without any path\n // segments if it's not an optional catchall\n throw new InvariantError(\n `Unexpected empty path segments match for a route \"${route.pathname}\" with param \"${paramName}\" of type \"${paramType}\"`\n )\n }\n case 'dynamic':\n case 'dynamic-intercepted-(..)(..)':\n case 'dynamic-intercepted-(.)':\n case 'dynamic-intercepted-(..)':\n case 'dynamic-intercepted-(...)':\n // For regular dynamic parameters, take the segment at this depth\n if (depth < route.segments.length) {\n const pathSegment = route.segments[depth]\n\n // Check if the segment at this depth is a placeholder for an unknown param\n if (\n pathSegment.type === 'dynamic' &&\n !params.hasOwnProperty(pathSegment.param.paramName)\n ) {\n // The segment is a placeholder like [category] and we don't have the value\n return undefined\n }\n\n // If the segment matches a param, use the param value from params object\n // Otherwise it's a static segment, just use it directly\n // We don't encode values here as that's handled during retrieval\n return getParamValueFromSegment(pathSegment, params, paramType)\n }\n\n return undefined\n\n default:\n paramType satisfies never\n }\n}\n","import React from 'react'\nimport type { ImageConfigComplete } from './image-config'\nimport { imageConfigDefault } from './image-config'\n\nexport const ImageConfigContext =\n React.createContext<ImageConfigComplete>(imageConfigDefault)\n\nif (process.env.NODE_ENV !== 'production') {\n ImageConfigContext.displayName = 'ImageConfigContext'\n}\n","/**\n * Given a path this function will find the pathname, query and hash and return\n * them. This is useful to parse full paths on the client side.\n * @param path A path to parse e.g. /foo/bar?id=1#hash\n */\nexport function parsePath(path: string) {\n const hashIndex = path.indexOf('#')\n const queryIndex = path.indexOf('?')\n const hasQuery = queryIndex > -1 && (hashIndex < 0 || queryIndex < hashIndex)\n\n if (hasQuery || hashIndex > -1) {\n return {\n pathname: path.substring(0, hasQuery ? queryIndex : hashIndex),\n query: hasQuery\n ? path.substring(queryIndex, hashIndex > -1 ? hashIndex : undefined)\n : '',\n hash: hashIndex > -1 ? path.slice(hashIndex) : '',\n }\n }\n\n return { pathname: path, query: '', hash: '' }\n}\n","import type { HtmlProps } from './html-context.shared-runtime'\nimport type { ComponentType, JSX } from 'react'\nimport type { DomainLocale } from '../../server/config'\nimport type { Env } from '@next/env'\nimport type { IncomingMessage, ServerResponse } from 'http'\nimport type { NextRouter } from './router/router'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { PreviewData } from '../../types'\nimport type { COMPILER_NAMES } from './constants'\nimport type fs from 'fs'\n\nexport type NextComponentType<\n Context extends BaseContext = NextPageContext,\n InitialProps = {},\n Props = {},\n> = ComponentType<Props> & {\n /**\n * Used for initial page load data population. Data returned from `getInitialProps` is serialized when server rendered.\n * Make sure to return plain `Object` without using `Date`, `Map`, `Set`.\n * @param context Context of `page`\n */\n getInitialProps?(context: Context): InitialProps | Promise<InitialProps>\n}\n\nexport type DocumentType = NextComponentType<\n DocumentContext,\n DocumentInitialProps,\n DocumentProps\n>\n\nexport type AppType<P = {}> = NextComponentType<\n AppContextType,\n P,\n AppPropsType<any, P>\n>\n\nexport type AppTreeType = ComponentType<\n AppInitialProps & { [name: string]: any }\n>\n\n/**\n * Web vitals provided to _app.reportWebVitals by Core Web Vitals plugin developed by Google Chrome team.\n * https://nextjs.org/blog/next-9-4#integrated-web-vitals-reporting\n */\nexport const WEB_VITALS = ['CLS', 'FCP', 'FID', 'INP', 'LCP', 'TTFB'] as const\nexport type NextWebVitalsMetric = {\n id: string\n startTime: number\n value: number\n attribution?: { [key: string]: unknown }\n} & (\n | {\n label: 'web-vital'\n name: (typeof WEB_VITALS)[number]\n }\n | {\n label: 'custom'\n name:\n | 'Next.js-hydration'\n | 'Next.js-route-change-to-render'\n | 'Next.js-render'\n }\n)\n\nexport type Enhancer<C> = (Component: C) => C\n\nexport type ComponentsEnhancer =\n | {\n enhanceApp?: Enhancer<AppType>\n enhanceComponent?: Enhancer<NextComponentType>\n }\n | Enhancer<NextComponentType>\n\nexport type RenderPageResult = {\n html: string\n head?: Array<JSX.Element | null>\n}\n\nexport type RenderPage = (\n options?: ComponentsEnhancer\n) => DocumentInitialProps | Promise<DocumentInitialProps>\n\nexport type BaseContext = {\n res?: ServerResponse\n [k: string]: any\n}\n\nexport type NEXT_DATA = {\n props: Record<string, any>\n page: string\n query: ParsedUrlQuery\n buildId: string\n assetPrefix?: string\n nextExport?: boolean\n autoExport?: boolean\n isFallback?: boolean\n isExperimentalCompile?: boolean\n dynamicIds?: (string | number)[]\n err?: Error & {\n statusCode?: number\n source?: typeof COMPILER_NAMES.server | typeof COMPILER_NAMES.edgeServer\n }\n gsp?: boolean\n gssp?: boolean\n customServer?: boolean\n gip?: boolean\n appGip?: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n scriptLoader?: any[]\n isPreview?: boolean\n notFoundSrcPage?: string\n}\n\n/**\n * `Next` context\n */\nexport interface NextPageContext {\n /**\n * Error object if encountered during rendering\n */\n err?: (Error & { statusCode?: number }) | null\n /**\n * `HTTP` request object.\n */\n req?: IncomingMessage\n /**\n * `HTTP` response object.\n */\n res?: ServerResponse\n /**\n * Path section of `URL`.\n */\n pathname: string\n /**\n * Query string section of `URL` parsed as an object.\n */\n query: ParsedUrlQuery\n /**\n * `String` of the actual path including query.\n */\n asPath?: string\n /**\n * The currently active locale\n */\n locale?: string\n /**\n * All configured locales\n */\n locales?: readonly string[]\n /**\n * The configured default locale\n */\n defaultLocale?: string\n /**\n * `Component` the tree of the App to use if needing to render separately\n */\n AppTree: AppTreeType\n}\n\nexport type AppContextType<Router extends NextRouter = NextRouter> = {\n Component: NextComponentType<NextPageContext>\n AppTree: AppTreeType\n ctx: NextPageContext\n router: Router\n}\n\nexport type AppInitialProps<PageProps = any> = {\n pageProps: PageProps\n}\n\nexport type AppPropsType<\n Router extends NextRouter = NextRouter,\n PageProps = {},\n> = AppInitialProps<PageProps> & {\n Component: NextComponentType<NextPageContext, any, any>\n router: Router\n __N_SSG?: boolean\n __N_SSP?: boolean\n}\n\nexport type DocumentContext = NextPageContext & {\n renderPage: RenderPage\n defaultGetInitialProps(\n ctx: DocumentContext,\n options?: { nonce?: string }\n ): Promise<DocumentInitialProps>\n}\n\nexport type DocumentInitialProps = RenderPageResult & {\n styles?: React.ReactElement[] | Iterable<React.ReactNode> | JSX.Element\n}\n\nexport type DocumentProps = DocumentInitialProps & HtmlProps\n\n/**\n * Next `API` route request\n */\nexport interface NextApiRequest extends IncomingMessage {\n /**\n * Object of `query` values from url\n */\n query: Partial<{\n [key: string]: string | string[]\n }>\n /**\n * Object of `cookies` from header\n */\n cookies: Partial<{\n [key: string]: string\n }>\n\n body: any\n\n env: Env\n\n draftMode?: boolean\n\n preview?: boolean\n /**\n * Preview data set on the request, if any\n * */\n previewData?: PreviewData\n}\n\n/**\n * Send body of response\n */\ntype Send<T> = (body: T) => void\n\n/**\n * Next `API` route response\n */\nexport type NextApiResponse<Data = any> = ServerResponse & {\n /**\n * Send data `any` data in response\n */\n send: Send<Data>\n /**\n * Send data `json` data in response\n */\n json: Send<Data>\n status: (statusCode: number) => NextApiResponse<Data>\n redirect(url: string): NextApiResponse<Data>\n redirect(status: number, url: string): NextApiResponse<Data>\n\n /**\n * Set draft mode\n */\n setDraftMode: (options: { enable: boolean }) => NextApiResponse<Data>\n\n /**\n * Set preview data for Next.js' prerender mode\n */\n setPreviewData: (\n data: object | string,\n options?: {\n /**\n * Specifies the number (in seconds) for the preview session to last for.\n * The given number will be converted to an integer by rounding down.\n * By default, no maximum age is set and the preview session finishes\n * when the client shuts down (browser is closed).\n */\n maxAge?: number\n /**\n * Specifies the path for the preview session to work under. By default,\n * the path is considered the \"default path\", i.e., any pages under \"/\".\n */\n path?: string\n }\n ) => NextApiResponse<Data>\n\n /**\n * Clear preview data for Next.js' prerender mode\n */\n clearPreviewData: (options?: { path?: string }) => NextApiResponse<Data>\n\n /**\n * Revalidate a specific page and regenerate it using On-Demand Incremental\n * Static Regeneration.\n * The path should be an actual path, not a rewritten path. E.g. for\n * \"/blog/[slug]\" this should be \"/blog/post-1\".\n * @link https://nextjs.org/docs/app/building-your-application/data-fetching/incremental-static-regeneration#on-demand-revalidation-with-revalidatepath\n */\n revalidate: (\n urlPath: string,\n opts?: {\n unstable_onlyGenerated?: boolean\n }\n ) => Promise<void>\n}\n\n/**\n * Next `API` route handler\n */\nexport type NextApiHandler<T = any> = (\n req: NextApiRequest,\n res: NextApiResponse<T>\n) => unknown | Promise<unknown>\n\n/**\n * Utils\n */\nexport function execOnce<T extends (...args: any[]) => ReturnType<T>>(\n fn: T\n): T {\n let used = false\n let result: ReturnType<T>\n\n return ((...args: any[]) => {\n if (!used) {\n used = true\n result = fn(...args)\n }\n return result\n }) as T\n}\n\n// Scheme: https://tools.ietf.org/html/rfc3986#section-3.1\n// Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\nconst ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\\d+\\-.]*?:/\nexport const isAbsoluteUrl = (url: string) => ABSOLUTE_URL_REGEX.test(url)\n\nexport function getLocationOrigin() {\n const { protocol, hostname, port } = window.location\n return `${protocol}//${hostname}${port ? ':' + port : ''}`\n}\n\nexport function getURL() {\n const { href } = window.location\n const origin = getLocationOrigin()\n return href.substring(origin.length)\n}\n\nexport function getDisplayName<P>(Component: ComponentType<P>) {\n return typeof Component === 'string'\n ? Component\n : Component.displayName || Component.name || 'Unknown'\n}\n\nexport function isResSent(res: ServerResponse) {\n return res.finished || res.headersSent\n}\n\nexport function normalizeRepeatedSlashes(url: string) {\n const urlParts = url.split('?')\n const urlNoQuery = urlParts[0]\n\n return (\n urlNoQuery\n // first we replace any non-encoded backslashes with forward\n // then normalize repeated forward slashes\n .replace(/\\\\/g, '/')\n .replace(/\\/\\/+/g, '/') +\n (urlParts[1] ? `?${urlParts.slice(1).join('?')}` : '')\n )\n}\n\nexport async function loadGetInitialProps<\n C extends BaseContext,\n IP = {},\n P = {},\n>(App: NextComponentType<C, IP, P>, ctx: C): Promise<IP> {\n if (process.env.NODE_ENV !== 'production') {\n if (App.prototype?.getInitialProps) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`\n throw new Error(message)\n }\n }\n // when called from _app `ctx` is nested in `ctx`\n const res = ctx.res || (ctx.ctx && ctx.ctx.res)\n\n if (!App.getInitialProps) {\n if (ctx.ctx && ctx.Component) {\n // @ts-ignore pageProps default\n return {\n pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx),\n }\n }\n return {} as IP\n }\n\n const props = await App.getInitialProps(ctx)\n\n if (res && isResSent(res)) {\n return props\n }\n\n if (!props) {\n const message = `\"${getDisplayName(\n App\n )}.getInitialProps()\" should resolve to an object. But found \"${props}\" instead.`\n throw new Error(message)\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (Object.keys(props).length === 0 && !ctx.ctx) {\n console.warn(\n `${getDisplayName(\n App\n )} returned an empty object from \\`getInitialProps\\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`\n )\n }\n }\n\n return props\n}\n\nexport const SP = typeof performance !== 'undefined'\nexport const ST =\n SP &&\n (['mark', 'measure', 'getEntriesByName'] as const).every(\n (method) => typeof performance[method] === 'function'\n )\n\nexport class DecodeError extends Error {}\nexport class NormalizeError extends Error {}\nexport class PageNotFoundError extends Error {\n code: string\n\n constructor(page: string) {\n super()\n this.code = 'ENOENT'\n this.name = 'PageNotFoundError'\n this.message = `Cannot find module for page: ${page}`\n }\n}\n\nexport class MissingStaticPage extends Error {\n constructor(page: string, message: string) {\n super()\n this.message = `Failed to load static file for page: ${page} ${message}`\n }\n}\n\nexport class MiddlewareNotFoundError extends Error {\n code: string\n constructor() {\n super()\n this.code = 'ENOENT'\n this.message = `Cannot find the middleware module`\n }\n}\n\nexport interface CacheFs {\n existsSync: typeof fs.existsSync\n readFile: typeof fs.promises.readFile\n readFileSync: typeof fs.readFileSync\n writeFile(f: string, d: any): Promise<void>\n mkdir(dir: string): Promise<void | string>\n stat(f: string): Promise<{ mtime: Date }>\n}\n\nexport function stringifyError(error: Error) {\n return JSON.stringify({ message: error.message, stack: error.stack })\n}\n","import type { ComponentType } from 'react'\nimport type { DomainLocale } from '../../../server/config'\nimport type { MittEmitter } from '../mitt'\nimport type { ParsedUrlQuery } from 'querystring'\nimport type { RouterEvent } from '../../../client/router'\nimport type { StyleSheetTuple } from '../../../client/page-loader'\nimport type { UrlObject } from 'url'\nimport type PageLoader from '../../../client/page-loader'\nimport type { AppContextType, NextPageContext, NEXT_DATA } from '../utils'\nimport { removeTrailingSlash } from './utils/remove-trailing-slash'\nimport {\n getClientBuildManifest,\n isAssetError,\n markAssetError,\n} from '../../../client/route-loader'\nimport { handleClientScriptLoad } from '../../../client/script'\nimport isError, { getProperError } from '../../../lib/is-error'\nimport { denormalizePagePath } from '../page-path/denormalize-page-path'\nimport { normalizeLocalePath } from '../i18n/normalize-locale-path'\nimport mitt from '../mitt'\nimport { getLocationOrigin, getURL, loadGetInitialProps, ST } from '../utils'\nimport { isDynamicRoute } from './utils/is-dynamic'\nimport { parseRelativeUrl } from './utils/parse-relative-url'\nimport { getRouteMatcher } from './utils/route-matcher'\nimport { getRouteRegex } from './utils/route-regex'\nimport { formatWithValidation } from './utils/format-url'\nimport { detectDomainLocale } from '../../../client/detect-domain-locale'\nimport { parsePath } from './utils/parse-path'\nimport { addLocale } from '../../../client/add-locale'\nimport { removeLocale } from '../../../client/remove-locale'\nimport { removeBasePath } from '../../../client/remove-base-path'\nimport { addBasePath } from '../../../client/add-base-path'\nimport { hasBasePath } from '../../../client/has-base-path'\nimport { resolveHref } from '../../../client/resolve-href'\nimport { isAPIRoute } from '../../../lib/is-api-route'\nimport { getNextPathnameInfo } from './utils/get-next-pathname-info'\nimport { formatNextPathnameInfo } from './utils/format-next-pathname-info'\nimport { compareRouterStates } from './utils/compare-states'\nimport { isLocalURL } from './utils/is-local-url'\nimport { isBot } from './utils/is-bot'\nimport { omit } from './utils/omit'\nimport { interpolateAs } from './utils/interpolate-as'\nimport { disableSmoothScrollDuringRouteTransition } from './utils/disable-smooth-scroll'\nimport type { Params } from '../../../server/request/params'\nimport {\n MATCHED_PATH_HEADER,\n NEXT_NAV_DEPLOYMENT_ID_HEADER,\n} from '../../../lib/constants'\nimport { getDeploymentId } from '../deployment-id'\nimport { isJavaScriptURLString } from '../../../client/lib/javascript-url'\n\nlet resolveRewrites: typeof import('./utils/resolve-rewrites').default\nif (process.env.__NEXT_HAS_REWRITES) {\n resolveRewrites = (\n require('./utils/resolve-rewrites') as typeof import('./utils/resolve-rewrites')\n ).default\n}\n\ndeclare global {\n interface Window {\n /* prod */\n __NEXT_DATA__: NEXT_DATA\n }\n}\n\ninterface RouteProperties {\n shallow: boolean\n}\n\ninterface TransitionOptions {\n shallow?: boolean\n locale?: string | false\n scroll?: boolean\n unstable_skipClientCache?: boolean\n}\n\ninterface NextHistoryState {\n url: string\n as: string\n options: TransitionOptions\n}\n\nexport type HistoryState =\n | null\n | { __NA: true; __N?: false }\n | { __N: false; __NA?: false }\n | ({ __NA?: false; __N: true; key: string } & NextHistoryState)\n\nfunction buildCancellationError() {\n return Object.assign(new Error('Route Cancelled'), {\n cancelled: true,\n })\n}\n\ninterface MiddlewareEffectParams<T extends FetchDataOutput> {\n fetchData?: () => Promise<T>\n locale?: string\n asPath: string\n router: Router\n}\n\nexport async function matchesMiddleware<T extends FetchDataOutput>(\n options: MiddlewareEffectParams<T>\n): Promise<boolean> {\n const matchers = await Promise.resolve(\n options.router.pageLoader.getMiddleware()\n )\n if (!matchers) return false\n\n const { pathname: asPathname } = parsePath(options.asPath)\n // remove basePath first since path prefix has to be in the order of `/${basePath}/${locale}`\n const cleanedAs = hasBasePath(asPathname)\n ? removeBasePath(asPathname)\n : asPathname\n const asWithBasePathAndLocale = addBasePath(\n addLocale(cleanedAs, options.locale)\n )\n\n // Check only path match on client. Matching \"has\" should be done on server\n // where we can access more info such as headers, HttpOnly cookie, etc.\n return matchers.some((m) =>\n new RegExp(m.regexp).test(asWithBasePathAndLocale)\n )\n}\n\nfunction stripOrigin(url: string) {\n const origin = getLocationOrigin()\n\n return url.startsWith(origin) ? url.substring(origin.length) : url\n}\n\nfunction prepareUrlAs(router: NextRouter, url: Url, as?: Url) {\n // If url and as provided as an object representation,\n // we'll format them into the string version here.\n let [resolvedHref, resolvedAs] = resolveHref(router, url, true)\n const origin = getLocationOrigin()\n const hrefWasAbsolute = resolvedHref.startsWith(origin)\n const asWasAbsolute = resolvedAs && resolvedAs.startsWith(origin)\n\n resolvedHref = stripOrigin(resolvedHref)\n resolvedAs = resolvedAs ? stripOrigin(resolvedAs) : resolvedAs\n\n const preparedUrl = hrefWasAbsolute ? resolvedHref : addBasePath(resolvedHref)\n const preparedAs = as\n ? stripOrigin(resolveHref(router, as))\n : resolvedAs || resolvedHref\n\n return {\n url: preparedUrl,\n as: asWasAbsolute ? preparedAs : addBasePath(preparedAs),\n }\n}\n\nfunction resolveDynamicRoute(pathname: string, pages: string[]) {\n const cleanPathname = removeTrailingSlash(denormalizePagePath(pathname))\n if (cleanPathname === '/404' || cleanPathname === '/_error') {\n return pathname\n }\n\n // handle resolving href for dynamic routes\n if (!pages.includes(cleanPathname)) {\n // eslint-disable-next-line array-callback-return\n pages.some((page) => {\n if (isDynamicRoute(page) && getRouteRegex(page).re.test(cleanPathname)) {\n pathname = page\n return true\n }\n })\n }\n return removeTrailingSlash(pathname)\n}\n\nfunction getMiddlewareData<T extends FetchDataOutput>(\n source: string,\n response: Response,\n options: MiddlewareEffectParams<T>\n) {\n const nextConfig = {\n basePath: options.router.basePath,\n i18n: { locales: options.router.locales },\n trailingSlash: Boolean(process.env.__NEXT_TRAILING_SLASH),\n }\n const rewriteHeader = response.headers.get('x-nextjs-rewrite')\n\n let rewriteTarget =\n rewriteHeader || response.headers.get('x-nextjs-matched-path')\n\n const matchedPath = response.headers.get(MATCHED_PATH_HEADER)\n\n if (\n matchedPath &&\n !rewriteTarget &&\n !matchedPath.includes('__next_data_catchall') &&\n !matchedPath.includes('/_error') &&\n !matchedPath.includes('/404')\n ) {\n // leverage x-matched-path to detect next.config.js rewrites\n rewriteTarget = matchedPath\n }\n\n if (rewriteTarget) {\n if (\n rewriteTarget.startsWith('/') ||\n process.env.__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE\n ) {\n const parsedRewriteTarget = parseRelativeUrl(rewriteTarget)\n const pathnameInfo = getNextPathnameInfo(parsedRewriteTarget.pathname, {\n nextConfig,\n parseData: true,\n })\n\n let fsPathname = removeTrailingSlash(pathnameInfo.pathname)\n return Promise.all([\n options.router.pageLoader.getPageList(),\n getClientBuildManifest(),\n ]).then(([pages, { __rewrites: rewrites }]: any) => {\n let as = addLocale(pathnameInfo.pathname, pathnameInfo.locale)\n\n if (\n isDynamicRoute(as) ||\n (!rewriteHeader &&\n pages.includes(\n normalizeLocalePath(removeBasePath(as), options.router.locales)\n .pathname\n ))\n ) {\n const parsedSource = getNextPathnameInfo(\n parseRelativeUrl(source).pathname,\n {\n // Pass basePath (and trailingSlash) so the basePath prefix is\n // stripped before the `_next/data/` check, but omit `i18n` so the\n // locale prefix is preserved here — the rewrite resolver below\n // handles the locale-prefixed `as`.\n nextConfig: {\n basePath: nextConfig.basePath,\n trailingSlash: nextConfig.trailingSlash,\n },\n parseData: true,\n }\n )\n\n as = addBasePath(parsedSource.pathname)\n parsedRewriteTarget.pathname = as\n }\n\n if (process.env.__NEXT_HAS_REWRITES) {\n const result = resolveRewrites(\n as,\n pages,\n rewrites,\n parsedRewriteTarget.query,\n (path: string) => resolveDynamicRoute(path, pages),\n options.router.locales\n )\n\n if (result.matchedPage) {\n parsedRewriteTarget.pathname = result.parsedAs.pathname\n as = parsedRewriteTarget.pathname\n Object.assign(parsedRewriteTarget.query, result.parsedAs.query)\n }\n } else if (!pages.includes(fsPathname)) {\n const resolvedPathname = resolveDynamicRoute(fsPathname, pages)\n\n if (resolvedPathname !== fsPathname) {\n fsPathname = resolvedPathname\n }\n }\n\n const resolvedHref = !pages.includes(fsPathname)\n ? resolveDynamicRoute(\n normalizeLocalePath(\n removeBasePath(parsedRewriteTarget.pathname),\n options.router.locales\n ).pathname,\n pages\n )\n : fsPathname\n\n if (isDynamicRoute(resolvedHref)) {\n const matches = getRouteMatcher(getRouteRegex(resolvedHref))(as)\n Object.assign(parsedRewriteTarget.query, matches || {})\n }\n\n return {\n type: 'rewrite' as const,\n parsedAs: parsedRewriteTarget,\n resolvedHref,\n }\n })\n }\n const src = parsePath(source)\n const pathname = formatNextPathnameInfo({\n ...getNextPathnameInfo(src.pathname, { nextConfig, parseData: true }),\n defaultLocale: options.router.defaultLocale,\n buildId: '',\n })\n\n return Promise.resolve({\n type: 'redirect-external' as const,\n destination: `${pathname}${src.query}${src.hash}`,\n })\n }\n\n const redirectTarget = response.headers.get('x-nextjs-redirect')\n\n if (redirectTarget) {\n if (redirectTarget.startsWith('/')) {\n const src = parsePath(redirectTarget)\n const pathname = formatNextPathnameInfo({\n ...getNextPathnameInfo(src.pathname, { nextConfig, parseData: true }),\n defaultLocale: options.router.defaultLocale,\n buildId: '',\n })\n\n return Promise.resolve({\n type: 'redirect-internal' as const,\n newAs: `${pathname}${src.query}${src.hash}`,\n newUrl: `${pathname}${src.query}${src.hash}`,\n })\n }\n\n return Promise.resolve({\n type: 'redirect-external' as const,\n destination: redirectTarget,\n })\n }\n\n return Promise.resolve({ type: 'next' as const })\n}\n\ninterface WithMiddlewareEffectsOutput extends FetchDataOutput {\n effect: Awaited<ReturnType<typeof getMiddlewareData>>\n}\n\nasync function withMiddlewareEffects<T extends FetchDataOutput>(\n options: MiddlewareEffectParams<T>\n): Promise<WithMiddlewareEffectsOutput | null> {\n const matches = await matchesMiddleware(options)\n if (!matches || !options.fetchData) {\n return null\n }\n\n const data = await options.fetchData()\n\n const effect = await getMiddlewareData(data.dataHref, data.response, options)\n\n return {\n dataHref: data.dataHref,\n json: data.json,\n response: data.response,\n text: data.text,\n cacheKey: data.cacheKey,\n effect,\n }\n}\n\nexport type Url = UrlObject | string\n\nexport type BaseRouter = {\n route: string\n pathname: string\n query: ParsedUrlQuery\n asPath: string\n basePath: string\n locale?: string | undefined\n locales?: readonly string[] | undefined\n defaultLocale?: string | undefined\n domainLocales?: readonly DomainLocale[] | undefined\n isLocaleDomain: boolean\n}\n\nexport type NextRouter = BaseRouter &\n Pick<\n Router,\n | 'push'\n | 'replace'\n | 'reload'\n | 'back'\n | 'forward'\n | 'prefetch'\n | 'beforePopState'\n | 'events'\n | 'isFallback'\n | 'isReady'\n | 'isPreview'\n >\n\nexport type PrefetchOptions = {\n priority?: boolean\n locale?: string | false\n unstable_skipClientCache?: boolean\n}\n\nexport type PrivateRouteInfo =\n | (Omit<CompletePrivateRouteInfo, 'styleSheets'> & { initial: true })\n | CompletePrivateRouteInfo\n\nexport type CompletePrivateRouteInfo = {\n Component: ComponentType\n styleSheets: StyleSheetTuple[]\n __N_SSG?: boolean\n __N_SSP?: boolean\n props?: Record<string, any>\n err?: Error\n error?: any\n route?: string\n resolvedAs?: string\n query?: ParsedUrlQuery\n}\n\nexport type AppProps = Pick<CompletePrivateRouteInfo, 'Component' | 'err'> & {\n router: Router\n} & Record<string, any>\nexport type AppComponent = ComponentType<AppProps>\n\ntype Subscription = (\n data: PrivateRouteInfo,\n App: AppComponent,\n resetScroll: { x: number; y: number } | null\n) => Promise<void>\n\ntype BeforePopStateCallback = (state: NextHistoryState) => boolean\n\ntype ComponentLoadCancel = (() => void) | null\n\ntype HistoryMethod = 'replaceState' | 'pushState'\n\nconst manualScrollRestoration =\n process.env.__NEXT_SCROLL_RESTORATION &&\n typeof window !== 'undefined' &&\n 'scrollRestoration' in window.history &&\n !!(function () {\n try {\n let v = '__next'\n return (sessionStorage.setItem(v, v), sessionStorage.removeItem(v), true)\n } catch (n) {}\n })()\n\nconst SSG_DATA_NOT_FOUND = Symbol('SSG_DATA_NOT_FOUND')\n\nfunction fetchRetry(\n url: string,\n attempts: number,\n options: Pick<RequestInit, 'method' | 'headers'>\n): Promise<Response> {\n return fetch(url, {\n // Cookies are required to be present for Next.js' SSG \"Preview Mode\".\n // Cookies may also be required for `getServerSideProps`.\n //\n // > `fetch` won’t send cookies, unless you set the credentials init\n // > option.\n // https://developer.mozilla.org/docs/Web/API/Fetch_API/Using_Fetch\n //\n // > For maximum browser compatibility when it comes to sending &\n // > receiving cookies, always supply the `credentials: 'same-origin'`\n // > option instead of relying on the default.\n // https://github.com/github/fetch#caveats\n credentials: 'same-origin',\n method: options.method || 'GET',\n headers: Object.assign({}, options.headers, {\n 'x-nextjs-data': '1',\n }),\n }).then((response) => {\n return !response.ok && attempts > 1 && response.status >= 500\n ? fetchRetry(url, attempts - 1, options)\n : response\n })\n}\n\ninterface FetchDataOutput {\n dataHref: string\n json: Record<string, any> | null\n response: Response\n text: string\n cacheKey: string\n}\n\ninterface FetchNextDataParams {\n dataHref: string\n isServerRender: boolean\n parseJSON: boolean | undefined\n hasMiddleware?: boolean\n inflightCache: NextDataCache\n persistCache: boolean\n isPrefetch: boolean\n isBackground?: boolean\n unstable_skipClientCache?: boolean\n}\n\nfunction tryToParseAsJSON(text: string) {\n try {\n return JSON.parse(text)\n } catch (error) {\n return null\n }\n}\n\nfunction fetchNextData({\n dataHref,\n inflightCache,\n isPrefetch,\n hasMiddleware,\n isServerRender,\n parseJSON,\n persistCache,\n isBackground,\n unstable_skipClientCache,\n}: FetchNextDataParams): Promise<FetchDataOutput> {\n const { href: cacheKey } = new URL(dataHref, window.location.href)\n const deploymentId = getDeploymentId()\n const getData = (params?: { method?: 'HEAD' | 'GET' }) =>\n fetchRetry(dataHref, isServerRender ? 3 : 1, {\n headers: Object.assign(\n {} as HeadersInit,\n isPrefetch ? { purpose: 'prefetch' } : {},\n isPrefetch && hasMiddleware ? { 'x-middleware-prefetch': '1' } : {},\n deploymentId ? { 'x-deployment-id': deploymentId } : {}\n ),\n method: params?.method ?? 'GET',\n })\n .then((response) => {\n if (response.ok && params?.method === 'HEAD') {\n return { dataHref, response, text: '', json: {}, cacheKey }\n }\n\n return response.text().then((text) => {\n if (!response.ok) {\n /**\n * When the data response is a redirect because of a middleware\n * we do not consider it an error. The headers must bring the\n * mapped location.\n * TODO: Change the status code in the handler.\n */\n if (\n hasMiddleware &&\n [301, 302, 307, 308].includes(response.status)\n ) {\n return { dataHref, response, text, json: {}, cacheKey }\n }\n\n if (response.status === 404) {\n if (tryToParseAsJSON(text)?.notFound) {\n return {\n dataHref,\n json: { notFound: SSG_DATA_NOT_FOUND },\n response,\n text,\n cacheKey,\n }\n }\n }\n\n const error = new Error(`Failed to load static props`)\n\n /**\n * We should only trigger a server-side transition if this was\n * caused on a client-side transition. Otherwise, we'd get into\n * an infinite loop.\n */\n if (!isServerRender) {\n markAssetError(error)\n }\n\n throw error\n }\n\n let dplResponseHeader = response.headers.get(\n NEXT_NAV_DEPLOYMENT_ID_HEADER\n )\n if (dplResponseHeader != null && dplResponseHeader !== deploymentId) {\n // When not found, or we want to force a MPA navigation because of Skew Protection\n const error = new Error(\n `Loaded static props were from an outdated deployment, forcing a hard reload`\n )\n /**\n * We should only trigger a server-side transition if this was\n * caused on a client-side transition. Otherwise, we'd get into\n * an infinite loop.\n */\n if (!isServerRender) {\n markAssetError(error)\n }\n throw error\n }\n\n return {\n dataHref,\n json: parseJSON ? tryToParseAsJSON(text) : null,\n response,\n text,\n cacheKey,\n }\n })\n })\n .then((data) => {\n if (\n !persistCache ||\n process.env.NODE_ENV !== 'production' ||\n data.response.headers.get('x-middleware-cache') === 'no-cache'\n ) {\n delete inflightCache[cacheKey]\n }\n return data\n })\n .catch((err) => {\n if (!unstable_skipClientCache) {\n delete inflightCache[cacheKey]\n }\n if (\n // chrome\n err.message === 'Failed to fetch' ||\n // firefox\n err.message === 'NetworkError when attempting to fetch resource.' ||\n // safari\n err.message === 'Load failed'\n ) {\n markAssetError(err)\n }\n throw err\n })\n\n // when skipping client cache we wait to update\n // inflight cache until successful data response\n // this allows racing click event with fetching newer data\n // without blocking navigation when stale data is available\n if (unstable_skipClientCache && persistCache) {\n return getData({}).then((data) => {\n if (data.response.headers.get('x-middleware-cache') !== 'no-cache') {\n // only update cache if not marked as no-cache\n inflightCache[cacheKey] = Promise.resolve(data)\n }\n\n return data\n })\n }\n\n if (inflightCache[cacheKey] !== undefined) {\n return inflightCache[cacheKey]\n }\n return (inflightCache[cacheKey] = getData(\n isBackground ? { method: 'HEAD' } : {}\n ))\n}\n\ninterface NextDataCache {\n [asPath: string]: Promise<FetchDataOutput>\n}\n\nexport function createKey() {\n return Math.random().toString(36).slice(2, 10)\n}\n\nfunction handleHardNavigation({\n url,\n router,\n}: {\n url: string\n router: Router\n}) {\n // ensure we don't trigger a hard navigation to the same\n // URL as this can end up with an infinite refresh\n if (url === addBasePath(addLocale(router.asPath, router.locale))) {\n throw new Error(\n `Invariant: attempted to hard navigate to the same URL ${url} ${location.href}`\n )\n }\n window.location.href = url\n}\n\nconst getCancelledHandler = ({\n route,\n router,\n}: {\n route: string\n router: Router\n}) => {\n let cancelled = false\n const cancel = (router.clc = () => {\n cancelled = true\n })\n\n const handleCancelled = () => {\n if (cancelled) {\n const error: any = new Error(\n `Abort fetching component for route: \"${route}\"`\n )\n error.cancelled = true\n throw error\n }\n\n if (cancel === router.clc) {\n router.clc = null\n }\n }\n return handleCancelled\n}\n\nexport default class Router implements BaseRouter {\n basePath: string\n\n /**\n * Map of all components loaded in `Router`\n */\n components: { [pathname: string]: PrivateRouteInfo }\n // Server Data Cache (full data requests)\n sdc: NextDataCache = {}\n // Server Background Cache (HEAD requests)\n sbc: NextDataCache = {}\n\n sub: Subscription\n clc: ComponentLoadCancel\n pageLoader: PageLoader\n _bps: BeforePopStateCallback | undefined\n events: MittEmitter<RouterEvent>\n _wrapApp: (App: AppComponent) => any\n isSsr: boolean\n _inFlightRoute?: string | undefined\n _shallow?: boolean | undefined\n locales?: readonly string[] | undefined\n defaultLocale?: string | undefined\n domainLocales?: readonly DomainLocale[] | undefined\n isReady: boolean\n isLocaleDomain: boolean\n isFirstPopStateEvent = true\n _initialMatchesMiddlewarePromise: Promise<boolean>\n // static entries filter\n _bfl_s?: import('../../lib/bloom-filter').BloomFilter\n // dynamic entires filter\n _bfl_d?: import('../../lib/bloom-filter').BloomFilter\n\n private state: Readonly<{\n route: string\n pathname: string\n query: ParsedUrlQuery\n asPath: string\n locale: string | undefined\n isFallback: boolean\n isPreview: boolean\n }>\n\n private _key: string = createKey()\n\n static events: MittEmitter<RouterEvent> = mitt()\n\n constructor(\n pathname: string,\n query: ParsedUrlQuery,\n as: string,\n {\n initialProps,\n pageLoader,\n App,\n wrapApp,\n Component,\n err,\n subscription,\n isFallback,\n locale,\n locales,\n defaultLocale,\n domainLocales,\n isPreview,\n }: {\n subscription: Subscription\n initialProps: any\n pageLoader: any\n Component: ComponentType\n App: AppComponent\n wrapApp: (WrapAppComponent: AppComponent) => any\n err?: Error\n isFallback: boolean\n locale?: string\n locales?: readonly string[]\n defaultLocale?: string\n domainLocales?: readonly DomainLocale[]\n isPreview?: boolean\n }\n ) {\n // represents the current component key\n const route = removeTrailingSlash(pathname)\n\n // set up the component cache (by route keys)\n this.components = {}\n // We should not keep the cache, if there's an error\n // Otherwise, this cause issues when when going back and\n // come again to the errored page.\n if (pathname !== '/_error') {\n this.components[route] = {\n Component,\n initial: true,\n props: initialProps,\n err,\n __N_SSG: initialProps && initialProps.__N_SSG,\n __N_SSP: initialProps && initialProps.__N_SSP,\n }\n }\n\n this.components['/_app'] = {\n Component: App as ComponentType,\n styleSheets: [\n /* /_app does not need its stylesheets managed */\n ],\n }\n\n // Backwards compat for Router.router.events\n // TODO: Should be remove the following major version as it was never documented\n this.events = Router.events\n\n this.pageLoader = pageLoader\n // if auto prerendered and dynamic route wait to update asPath\n // until after mount to prevent hydration mismatch\n const autoExportDynamic =\n isDynamicRoute(pathname) && self.__NEXT_DATA__.autoExport\n\n this.basePath = process.env.__NEXT_ROUTER_BASEPATH || ''\n this.sub = subscription\n this.clc = null\n this._wrapApp = wrapApp\n // make sure to ignore extra popState in safari on navigating\n // back from external site\n this.isSsr = true\n this.isLocaleDomain = false\n this.isReady = !!(\n self.__NEXT_DATA__.gssp ||\n self.__NEXT_DATA__.gip ||\n self.__NEXT_DATA__.isExperimentalCompile ||\n (self.__NEXT_DATA__.appGip && !self.__NEXT_DATA__.gsp) ||\n (!autoExportDynamic &&\n !self.location.search &&\n !process.env.__NEXT_HAS_REWRITES)\n )\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n this.locales = locales\n this.defaultLocale = defaultLocale\n this.domainLocales = domainLocales\n this.isLocaleDomain = !!detectDomainLocale(\n domainLocales,\n self.location.hostname\n )\n }\n\n this.state = {\n route,\n pathname,\n query,\n asPath: autoExportDynamic ? pathname : as,\n isPreview: !!isPreview,\n locale: process.env.__NEXT_I18N_SUPPORT ? locale : undefined,\n isFallback,\n }\n\n this._initialMatchesMiddlewarePromise = Promise.resolve(false)\n\n if (typeof window !== 'undefined') {\n // make sure \"as\" doesn't start with double slashes or else it can\n // throw an error as it's considered invalid\n if (!as.startsWith('//')) {\n // in order for `e.state` to work on the `onpopstate` event\n // we have to register the initial route upon initialization\n const options: TransitionOptions = { locale }\n const asPath = getURL()\n\n this._initialMatchesMiddlewarePromise = matchesMiddleware({\n router: this,\n locale,\n asPath,\n }).then((matches) => {\n // if middleware matches we leave resolving to the change function\n // as the server needs to resolve for correct priority\n ;(options as any)._shouldResolveHref = as !== pathname\n\n this.changeState(\n 'replaceState',\n matches\n ? asPath\n : formatWithValidation({\n pathname: addBasePath(pathname),\n query,\n }),\n asPath,\n options\n )\n return matches\n })\n }\n\n window.addEventListener('popstate', this.onPopState)\n\n // enable custom scroll restoration handling when available\n // otherwise fallback to browser's default handling\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n if (manualScrollRestoration) {\n window.history.scrollRestoration = 'manual'\n }\n }\n }\n }\n\n onPopState = (e: PopStateEvent): void => {\n const { isFirstPopStateEvent } = this\n this.isFirstPopStateEvent = false\n\n const state = e.state as HistoryState\n\n if (!state) {\n // We get state as undefined for two reasons.\n // 1. With older safari (< 8) and older chrome (< 34)\n // 2. When the URL changed with #\n //\n // In the both cases, we don't need to proceed and change the route.\n // (as it's already changed)\n // But we can simply replace the state with the new changes.\n // Actually, for (1) we don't need to nothing. But it's hard to detect that event.\n // So, doing the following for (1) does no harm.\n const { pathname, query } = this\n this.changeState(\n 'replaceState',\n formatWithValidation({ pathname: addBasePath(pathname), query }),\n getURL()\n )\n return\n }\n\n // __NA is used to identify if the history entry can be handled by the app-router.\n if (state.__NA) {\n window.location.reload()\n return\n }\n\n if (!state.__N) {\n return\n }\n\n // Safari fires popstateevent when reopening the browser.\n if (\n isFirstPopStateEvent &&\n this.locale === state.options.locale &&\n state.as === this.asPath\n ) {\n return\n }\n\n let forcedScroll: { x: number; y: number } | undefined\n const { url, as, options, key } = state\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n if (manualScrollRestoration) {\n if (this._key !== key) {\n // Snapshot current scroll position:\n try {\n sessionStorage.setItem(\n '__next_scroll_' + this._key,\n JSON.stringify({ x: self.pageXOffset, y: self.pageYOffset })\n )\n } catch {}\n\n // Restore old scroll position:\n try {\n const v = sessionStorage.getItem('__next_scroll_' + key)\n forcedScroll = JSON.parse(v!)\n } catch {\n forcedScroll = { x: 0, y: 0 }\n }\n }\n }\n }\n this._key = key\n\n const { pathname } = parseRelativeUrl(url)\n\n // Make sure we don't re-render on initial load,\n // can be caused by navigating back from an external site\n if (\n this.isSsr &&\n as === addBasePath(this.asPath) &&\n pathname === addBasePath(this.pathname)\n ) {\n return\n }\n\n // If the downstream application returns falsy, return.\n // They will then be responsible for handling the event.\n if (this._bps && !this._bps(state)) {\n return\n }\n\n this.change(\n 'replaceState',\n url,\n as,\n Object.assign<{}, TransitionOptions, TransitionOptions>({}, options, {\n shallow: options.shallow && this._shallow,\n locale: options.locale || this.defaultLocale,\n // @ts-ignore internal value not exposed on types\n _h: 0,\n }),\n forcedScroll\n )\n }\n\n reload(): void {\n window.location.reload()\n }\n\n /**\n * Go back in history\n */\n back() {\n window.history.back()\n }\n\n /**\n * Go forward in history\n */\n forward() {\n window.history.forward()\n }\n\n /**\n * Performs a `pushState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */\n push(url: Url, as?: Url, options: TransitionOptions = {}) {\n if (\n isJavaScriptURLString(url.toString()) ||\n (as && isJavaScriptURLString(as.toString()))\n ) {\n throw new Error(\n 'Next.js has blocked a javascript: URL as a security precaution.'\n )\n }\n if (process.env.__NEXT_SCROLL_RESTORATION) {\n // TODO: remove in the future when we update history before route change\n // is complete, as the popstate event should handle this capture.\n if (manualScrollRestoration) {\n try {\n // Snapshot scroll position right before navigating to a new page:\n sessionStorage.setItem(\n '__next_scroll_' + this._key,\n JSON.stringify({ x: self.pageXOffset, y: self.pageYOffset })\n )\n } catch {}\n }\n }\n ;({ url, as } = prepareUrlAs(this, url, as))\n return this.change('pushState', url, as, options)\n }\n\n /**\n * Performs a `replaceState` with arguments\n * @param url of the route\n * @param as masks `url` for the browser\n * @param options object you can define `shallow` and other options\n */\n replace(url: Url, as?: Url, options: TransitionOptions = {}) {\n if (\n isJavaScriptURLString(url.toString()) ||\n (as && isJavaScriptURLString(as.toString()))\n ) {\n throw new Error(\n 'Next.js has blocked a javascript: URL as a security precaution.'\n )\n }\n ;({ url, as } = prepareUrlAs(this, url, as))\n return this.change('replaceState', url, as, options)\n }\n\n async _bfl(\n as: string,\n resolvedAs?: string,\n locale?: string | false,\n skipNavigate?: boolean\n ) {\n if (process.env.__NEXT_CLIENT_ROUTER_FILTER_ENABLED) {\n if (!this._bfl_s && !this._bfl_d) {\n const { BloomFilter } =\n require('../../lib/bloom-filter') as typeof import('../../lib/bloom-filter')\n\n type Filter = ReturnType<\n import('../../lib/bloom-filter').BloomFilter['export']\n >\n let staticFilterData: Filter | undefined\n let dynamicFilterData: Filter | undefined\n\n try {\n ;({\n __routerFilterStatic: staticFilterData,\n __routerFilterDynamic: dynamicFilterData,\n } = (await getClientBuildManifest()) as any as {\n __routerFilterStatic?: Filter\n __routerFilterDynamic?: Filter\n })\n } catch (err) {\n // failed to load build manifest hard navigate\n // to be safe\n console.error(err)\n if (skipNavigate) {\n return true\n }\n handleHardNavigation({\n url: addBasePath(\n addLocale(as, locale || this.locale, this.defaultLocale)\n ),\n router: this,\n })\n return new Promise(() => {})\n }\n\n const routerFilterSValue: Filter | false = process.env\n .__NEXT_CLIENT_ROUTER_S_FILTER as any\n\n if (!staticFilterData && routerFilterSValue) {\n staticFilterData = routerFilterSValue ? routerFilterSValue : undefined\n }\n\n const routerFilterDValue: Filter | false = process.env\n .__NEXT_CLIENT_ROUTER_D_FILTER as any\n\n if (!dynamicFilterData && routerFilterDValue) {\n dynamicFilterData = routerFilterDValue\n ? routerFilterDValue\n : undefined\n }\n\n if (staticFilterData?.numHashes) {\n this._bfl_s = new BloomFilter(\n staticFilterData.numItems,\n staticFilterData.errorRate\n )\n this._bfl_s.import(staticFilterData)\n }\n\n if (dynamicFilterData?.numHashes) {\n this._bfl_d = new BloomFilter(\n dynamicFilterData.numItems,\n dynamicFilterData.errorRate\n )\n this._bfl_d.import(dynamicFilterData)\n }\n }\n\n let matchesBflStatic = false\n let matchesBflDynamic = false\n const pathsToCheck: Array<{ as?: string; allowMatchCurrent?: boolean }> =\n [{ as }, { as: resolvedAs }]\n\n for (const { as: curAs, allowMatchCurrent } of pathsToCheck) {\n if (curAs) {\n const asNoSlash = removeTrailingSlash(\n new URL(curAs, 'http://n').pathname\n )\n const asNoSlashLocale = addBasePath(\n addLocale(asNoSlash, locale || this.locale)\n )\n\n if (\n allowMatchCurrent ||\n asNoSlash !==\n removeTrailingSlash(new URL(this.asPath, 'http://n').pathname)\n ) {\n matchesBflStatic =\n matchesBflStatic ||\n !!this._bfl_s?.contains(asNoSlash) ||\n !!this._bfl_s?.contains(asNoSlashLocale)\n\n for (const normalizedAS of [asNoSlash, asNoSlashLocale]) {\n // if any sub-path of as matches a dynamic filter path\n // it should be hard navigated\n const curAsParts = normalizedAS.split('/')\n for (\n let i = 0;\n !matchesBflDynamic && i < curAsParts.length + 1;\n i++\n ) {\n const currentPart = curAsParts.slice(0, i).join('/')\n if (currentPart && this._bfl_d?.contains(currentPart)) {\n matchesBflDynamic = true\n break\n }\n }\n }\n\n // if the client router filter is matched then we trigger\n // a hard navigation\n if (matchesBflStatic || matchesBflDynamic) {\n if (skipNavigate) {\n return true\n }\n handleHardNavigation({\n url: addBasePath(\n addLocale(as, locale || this.locale, this.defaultLocale)\n ),\n router: this,\n })\n return new Promise(() => {})\n }\n }\n }\n }\n }\n return false\n }\n\n private async change(\n method: HistoryMethod,\n url: string,\n as: string,\n options: TransitionOptions,\n forcedScroll?: { x: number; y: number }\n ): Promise<boolean> {\n if (!isLocalURL(url)) {\n handleHardNavigation({ url, router: this })\n return false\n }\n // WARNING: `_h` is an internal option for handing Next.js client-side\n // hydration. Your app should _never_ use this property. It may change at\n // any time without notice.\n const isQueryUpdating = (options as any)._h === 1\n\n if (!isQueryUpdating && !options.shallow) {\n await this._bfl(as, undefined, options.locale)\n }\n\n let shouldResolveHref =\n isQueryUpdating ||\n (options as any)._shouldResolveHref ||\n parsePath(url).pathname === parsePath(as).pathname\n\n const nextState = {\n ...this.state,\n }\n\n // for static pages with query params in the URL we delay\n // marking the router ready until after the query is updated\n // or a navigation has occurred\n const readyStateChange = this.isReady !== true\n this.isReady = true\n const isSsr = this.isSsr\n\n if (!isQueryUpdating) {\n this.isSsr = false\n }\n\n // if a route transition is already in progress before\n // the query updating is triggered ignore query updating\n if (isQueryUpdating && this.clc) {\n return false\n }\n\n const prevLocale = nextState.locale\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n nextState.locale =\n options.locale === false\n ? this.defaultLocale\n : options.locale || nextState.locale\n\n if (typeof options.locale === 'undefined') {\n options.locale = nextState.locale\n }\n\n const parsedAs = parseRelativeUrl(\n hasBasePath(as) ? removeBasePath(as) : as\n )\n const localePathResult = normalizeLocalePath(\n parsedAs.pathname,\n this.locales\n )\n\n if (localePathResult.detectedLocale) {\n nextState.locale = localePathResult.detectedLocale\n parsedAs.pathname = addBasePath(parsedAs.pathname)\n as = formatWithValidation(parsedAs)\n url = addBasePath(\n normalizeLocalePath(\n hasBasePath(url) ? removeBasePath(url) : url,\n this.locales\n ).pathname\n )\n }\n let didNavigate = false\n\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (process.env.__NEXT_I18N_SUPPORT) {\n // if the locale isn't configured hard navigate to show 404 page\n if (!this.locales?.includes(nextState.locale!)) {\n parsedAs.pathname = addLocale(parsedAs.pathname, nextState.locale)\n handleHardNavigation({\n url: formatWithValidation(parsedAs),\n router: this,\n })\n // this was previously a return but was removed in favor\n // of better dead code elimination with regenerator runtime\n didNavigate = true\n }\n }\n\n const detectedDomain = detectDomainLocale(\n this.domainLocales,\n undefined,\n nextState.locale\n )\n\n // we need to wrap this in the env check again since regenerator runtime\n // moves this on its own due to the return\n if (process.env.__NEXT_I18N_SUPPORT) {\n // if we are navigating to a domain locale ensure we redirect to the\n // correct domain\n if (\n !didNavigate &&\n detectedDomain &&\n this.isLocaleDomain &&\n self.location.hostname !== detectedDomain.domain\n ) {\n const asNoBasePath = removeBasePath(as)\n handleHardNavigation({\n url: `http${detectedDomain.http ? '' : 's'}://${\n detectedDomain.domain\n }${addBasePath(\n `${\n nextState.locale === detectedDomain.defaultLocale\n ? ''\n : `/${nextState.locale}`\n }${asNoBasePath === '/' ? '' : asNoBasePath}` || '/'\n )}`,\n router: this,\n })\n // this was previously a return but was removed in favor\n // of better dead code elimination with regenerator runtime\n didNavigate = true\n }\n }\n\n if (didNavigate) {\n return new Promise(() => {})\n }\n }\n\n // marking route changes as a navigation start entry\n if (ST) {\n performance.mark('routeChange')\n }\n\n const { shallow = false, scroll = true } = options\n const routeProps = { shallow }\n\n if (this._inFlightRoute && this.clc) {\n if (!isSsr) {\n Router.events.emit(\n 'routeChangeError',\n buildCancellationError(),\n this._inFlightRoute,\n routeProps\n )\n }\n this.clc()\n this.clc = null\n }\n\n as = addBasePath(\n addLocale(\n hasBasePath(as) ? removeBasePath(as) : as,\n options.locale,\n this.defaultLocale\n )\n )\n const cleanedAs = removeLocale(\n hasBasePath(as) ? removeBasePath(as) : as,\n nextState.locale\n )\n this._inFlightRoute = as\n\n const localeChange = prevLocale !== nextState.locale\n\n // If the url change is only related to a hash change\n // We should not proceed. We should only change the state.\n\n if (!isQueryUpdating && this.onlyAHashChange(cleanedAs) && !localeChange) {\n nextState.asPath = cleanedAs\n Router.events.emit('hashChangeStart', as, routeProps)\n // TODO: do we need the resolved href when only a hash change?\n this.changeState(method, url, as, {\n ...options,\n scroll: false,\n })\n if (scroll) {\n this.scrollToHash(cleanedAs)\n }\n try {\n await this.set(nextState, this.components[nextState.route], null)\n } catch (err) {\n if (isError(err) && err.cancelled) {\n Router.events.emit('routeChangeError', err, cleanedAs, routeProps)\n }\n throw err\n }\n\n Router.events.emit('hashChangeComplete', as, routeProps)\n return true\n }\n\n let parsed = parseRelativeUrl(url)\n let { pathname, query } = parsed\n\n // The build manifest needs to be loaded before auto-static dynamic pages\n // get their query parameters to allow ensuring they can be parsed properly\n // when rewritten to\n let pages: string[], rewrites: any\n try {\n ;[pages, { __rewrites: rewrites }] = await Promise.all([\n this.pageLoader.getPageList(),\n getClientBuildManifest(),\n this.pageLoader.getMiddleware(),\n ])\n } catch (err) {\n // If we fail to resolve the page list or client-build manifest, we must\n // do a server-side transition:\n handleHardNavigation({ url: as, router: this })\n return false\n }\n\n // If asked to change the current URL we should reload the current page\n // (not location.reload() but reload getInitialProps and other Next.js stuffs)\n // We also need to set the method = replaceState always\n // as this should not go into the history (That's how browsers work)\n // We should compare the new asPath to the current asPath, not the url\n if (!this.urlIsNew(cleanedAs) && !localeChange) {\n method = 'replaceState'\n }\n\n // we need to resolve the as value using rewrites for dynamic SSG\n // pages to allow building the data URL correctly\n let resolvedAs = as\n\n // url and as should always be prefixed with basePath by this\n // point by either next/link or router.push/replace so strip the\n // basePath from the pathname to match the pages dir 1-to-1\n pathname = pathname\n ? removeTrailingSlash(removeBasePath(pathname))\n : pathname\n\n let route = removeTrailingSlash(pathname)\n const parsedAsPathname = as.startsWith('/') && parseRelativeUrl(as).pathname\n\n // if we detected the path as app route during prefetching\n // trigger hard navigation\n if ((this.components[pathname] as any)?.__appRouter) {\n handleHardNavigation({ url: as, router: this })\n return new Promise(() => {})\n }\n\n const isMiddlewareRewrite = !!(\n parsedAsPathname &&\n route !== parsedAsPathname &&\n (!isDynamicRoute(route) ||\n !getRouteMatcher(getRouteRegex(route))(parsedAsPathname))\n )\n\n // we don't attempt resolve asPath when we need to execute\n // middleware as the resolving will occur server-side\n const isMiddlewareMatch =\n !options.shallow &&\n (await matchesMiddleware({\n asPath: as,\n locale: nextState.locale,\n router: this,\n }))\n\n if (isQueryUpdating && isMiddlewareMatch) {\n shouldResolveHref = false\n }\n\n if (shouldResolveHref && pathname !== '/_error') {\n ;(options as any)._shouldResolveHref = true\n\n if (process.env.__NEXT_HAS_REWRITES && as.startsWith('/')) {\n const rewritesResult = resolveRewrites(\n addBasePath(addLocale(cleanedAs, nextState.locale), true),\n pages,\n rewrites,\n query,\n (p: string) => resolveDynamicRoute(p, pages),\n this.locales\n )\n\n if (rewritesResult.externalDest) {\n handleHardNavigation({ url: as, router: this })\n return true\n }\n if (!isMiddlewareMatch) {\n resolvedAs = rewritesResult.asPath\n }\n\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref\n parsed.pathname = addBasePath(pathname)\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n } else {\n parsed.pathname = resolveDynamicRoute(pathname, pages)\n\n if (parsed.pathname !== pathname) {\n pathname = parsed.pathname\n parsed.pathname = addBasePath(pathname)\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n }\n }\n\n if (!isLocalURL(as)) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `Invalid href: \"${url}\" and as: \"${as}\", received relative href and external as` +\n `\\nSee more info: https://nextjs.org/docs/messages/invalid-relative-url-external-as`\n )\n }\n handleHardNavigation({ url: as, router: this })\n return false\n }\n\n resolvedAs = removeLocale(removeBasePath(resolvedAs), nextState.locale)\n\n route = removeTrailingSlash(pathname)\n let routeMatch: Params | false = false\n\n if (isDynamicRoute(route)) {\n const parsedAs = parseRelativeUrl(resolvedAs)\n const asPathname = parsedAs.pathname\n\n const routeRegex = getRouteRegex(route)\n routeMatch = getRouteMatcher(routeRegex)(asPathname)\n const shouldInterpolate = route === asPathname\n const interpolatedAs = shouldInterpolate\n ? interpolateAs(route, asPathname, query)\n : ({} as { result: undefined; params: undefined })\n\n if (!routeMatch || (shouldInterpolate && !interpolatedAs.result)) {\n const missingParams = Object.keys(routeRegex.groups).filter(\n (param) => !query[param] && !routeRegex.groups[param].optional\n )\n\n if (missingParams.length > 0 && !isMiddlewareMatch) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\n `${\n shouldInterpolate\n ? `Interpolating href`\n : `Mismatching \\`as\\` and \\`href\\``\n } failed to manually provide ` +\n `the params: ${missingParams.join(\n ', '\n )} in the \\`href\\`'s \\`query\\``\n )\n }\n\n throw new Error(\n (shouldInterpolate\n ? `The provided \\`href\\` (${url}) value is missing query values (${missingParams.join(\n ', '\n )}) to be interpolated properly. `\n : `The provided \\`as\\` value (${asPathname}) is incompatible with the \\`href\\` value (${route}). `) +\n `Read more: https://nextjs.org/docs/messages/${\n shouldInterpolate\n ? 'href-interpolation-failed'\n : 'incompatible-href-as'\n }`\n )\n }\n } else if (shouldInterpolate) {\n as = formatWithValidation(\n Object.assign({}, parsedAs, {\n pathname: interpolatedAs.result,\n query: omit(query, interpolatedAs.params!),\n })\n )\n } else {\n // Merge params into `query`, overwriting any specified in search\n Object.assign(query, routeMatch)\n }\n }\n\n if (!isQueryUpdating) {\n Router.events.emit('routeChangeStart', as, routeProps)\n }\n\n const isErrorRoute = this.pathname === '/404' || this.pathname === '/_error'\n\n try {\n let routeInfo = await this.getRouteInfo({\n route,\n pathname,\n query,\n as,\n resolvedAs,\n routeProps,\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n hasMiddleware: isMiddlewareMatch,\n unstable_skipClientCache: options.unstable_skipClientCache,\n isQueryUpdating: isQueryUpdating && !this.isFallback,\n isMiddlewareRewrite,\n })\n\n if (!isQueryUpdating && !options.shallow) {\n await this._bfl(\n as,\n 'resolvedAs' in routeInfo ? routeInfo.resolvedAs : undefined,\n nextState.locale\n )\n }\n\n if ('route' in routeInfo && isMiddlewareMatch) {\n pathname = routeInfo.route || route\n route = pathname\n\n if (!routeProps.shallow) {\n query = Object.assign({}, routeInfo.query || {}, query)\n }\n\n const cleanedParsedPathname = hasBasePath(parsed.pathname)\n ? removeBasePath(parsed.pathname)\n : parsed.pathname\n\n if (routeMatch && pathname !== cleanedParsedPathname) {\n Object.keys(routeMatch).forEach((key) => {\n if (routeMatch && query[key] === routeMatch[key]) {\n delete query[key]\n }\n })\n }\n\n if (isDynamicRoute(pathname)) {\n const prefixedAs =\n !routeProps.shallow && routeInfo.resolvedAs\n ? routeInfo.resolvedAs\n : addBasePath(\n addLocale(\n new URL(as, location.href).pathname,\n nextState.locale\n ),\n true\n )\n\n let rewriteAs = prefixedAs\n\n if (hasBasePath(rewriteAs)) {\n rewriteAs = removeBasePath(rewriteAs)\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n const localeResult = normalizeLocalePath(rewriteAs, this.locales)\n nextState.locale = localeResult.detectedLocale || nextState.locale\n rewriteAs = localeResult.pathname\n }\n const routeRegex = getRouteRegex(pathname)\n const curRouteMatch = getRouteMatcher(routeRegex)(\n new URL(rewriteAs, location.href).pathname\n )\n\n if (curRouteMatch) {\n Object.assign(query, curRouteMatch)\n }\n }\n }\n\n // If the routeInfo brings a redirect we simply apply it.\n if ('type' in routeInfo) {\n if (routeInfo.type === 'redirect-internal') {\n return this.change(method, routeInfo.newUrl, routeInfo.newAs, options)\n } else {\n handleHardNavigation({ url: routeInfo.destination, router: this })\n return new Promise(() => {})\n }\n }\n\n const component: any = routeInfo.Component\n if (component && component.unstable_scriptLoader) {\n const scripts = [].concat(component.unstable_scriptLoader())\n\n scripts.forEach((script: any) => {\n handleClientScriptLoad(script.props)\n })\n }\n\n // handle redirect on client-transition\n if ((routeInfo.__N_SSG || routeInfo.__N_SSP) && routeInfo.props) {\n if (\n routeInfo.props.pageProps &&\n routeInfo.props.pageProps.__N_REDIRECT\n ) {\n // Use the destination from redirect without adding locale\n options.locale = false\n\n const destination = routeInfo.props.pageProps.__N_REDIRECT\n\n // check if destination is internal (resolves to a page) and attempt\n // client-navigation if it is falling back to hard navigation if\n // it's not\n if (\n destination.startsWith('/') &&\n routeInfo.props.pageProps.__N_REDIRECT_BASE_PATH !== false\n ) {\n const parsedHref = parseRelativeUrl(destination)\n parsedHref.pathname = resolveDynamicRoute(\n parsedHref.pathname,\n pages\n )\n\n const { url: newUrl, as: newAs } = prepareUrlAs(\n this,\n destination,\n destination\n )\n return this.change(method, newUrl, newAs, options)\n }\n handleHardNavigation({ url: destination, router: this })\n return new Promise(() => {})\n }\n\n nextState.isPreview = !!routeInfo.props.__N_PREVIEW\n\n // handle SSG data 404\n if (routeInfo.props.notFound === SSG_DATA_NOT_FOUND) {\n let notFoundRoute\n\n try {\n await this.fetchComponent('/404')\n notFoundRoute = '/404'\n } catch (_) {\n notFoundRoute = '/_error'\n }\n\n routeInfo = await this.getRouteInfo({\n route: notFoundRoute,\n pathname: notFoundRoute,\n query,\n as,\n resolvedAs,\n routeProps: { shallow: false },\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n isNotFound: true,\n })\n\n if ('type' in routeInfo) {\n throw new Error(`Unexpected middleware effect on /404`)\n }\n }\n }\n\n if (\n isQueryUpdating &&\n this.pathname === '/_error' &&\n self.__NEXT_DATA__.props?.pageProps?.statusCode === 500 &&\n routeInfo.props?.pageProps\n ) {\n // ensure statusCode is still correct for static 500 page\n // when updating query information\n routeInfo.props.pageProps.statusCode = 500\n }\n\n // shallow routing is only allowed for same page URL changes.\n const isValidShallowRoute =\n options.shallow && nextState.route === (routeInfo.route ?? route)\n\n const shouldScroll =\n options.scroll ?? (!isQueryUpdating && !isValidShallowRoute)\n const resetScroll = shouldScroll ? { x: 0, y: 0 } : null\n const upcomingScrollState = forcedScroll ?? resetScroll\n\n // the new state that the router gonna set\n const upcomingRouterState = {\n ...nextState,\n route,\n pathname,\n query,\n asPath: cleanedAs,\n isFallback: false,\n }\n\n // When the page being rendered is the 404 page, we should only update the\n // query parameters. Route changes here might add the basePath when it\n // wasn't originally present. This is also why this block is before the\n // below `changeState` call which updates the browser's history (changing\n // the URL).\n if (isQueryUpdating && isErrorRoute) {\n routeInfo = await this.getRouteInfo({\n route: this.pathname,\n pathname: this.pathname,\n query,\n as,\n resolvedAs,\n routeProps: { shallow: false },\n locale: nextState.locale,\n isPreview: nextState.isPreview,\n isQueryUpdating: isQueryUpdating && !this.isFallback,\n })\n\n if ('type' in routeInfo) {\n throw new Error(`Unexpected middleware effect on ${this.pathname}`)\n }\n\n if (\n this.pathname === '/_error' &&\n self.__NEXT_DATA__.props?.pageProps?.statusCode === 500 &&\n routeInfo.props?.pageProps\n ) {\n // ensure statusCode is still correct for static 500 page\n // when updating query information\n routeInfo.props.pageProps.statusCode = 500\n }\n\n try {\n await this.set(upcomingRouterState, routeInfo, upcomingScrollState)\n } catch (err) {\n if (isError(err) && err.cancelled) {\n Router.events.emit('routeChangeError', err, cleanedAs, routeProps)\n }\n throw err\n }\n\n return true\n }\n\n Router.events.emit('beforeHistoryChange', as, routeProps)\n this.changeState(method, url, as, options)\n\n // for query updates we can skip it if the state is unchanged and we don't\n // need to scroll\n // https://github.com/vercel/next.js/issues/37139\n const canSkipUpdating =\n isQueryUpdating &&\n !upcomingScrollState &&\n !readyStateChange &&\n !localeChange &&\n compareRouterStates(upcomingRouterState, this.state)\n\n if (!canSkipUpdating) {\n try {\n await this.set(upcomingRouterState, routeInfo, upcomingScrollState)\n } catch (e: any) {\n if (e.cancelled) routeInfo.error = routeInfo.error || e\n else throw e\n }\n\n if (routeInfo.error) {\n if (!isQueryUpdating) {\n Router.events.emit(\n 'routeChangeError',\n routeInfo.error,\n cleanedAs,\n routeProps\n )\n }\n\n throw routeInfo.error\n }\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n if (nextState.locale) {\n document.documentElement.lang = nextState.locale\n }\n }\n\n if (!isQueryUpdating) {\n Router.events.emit('routeChangeComplete', as, routeProps)\n }\n\n // A hash mark # is the optional last part of a URL\n const hashRegex = /#.+$/\n if (shouldScroll && hashRegex.test(as)) {\n this.scrollToHash(as)\n }\n }\n\n return true\n } catch (err) {\n if (isError(err) && err.cancelled) {\n return false\n }\n throw err\n }\n }\n\n changeState(\n method: HistoryMethod,\n url: string,\n as: string,\n options: TransitionOptions = {}\n ): void {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window.history === 'undefined') {\n console.error(`Warning: window.history is not available.`)\n return\n }\n\n if (typeof window.history[method] === 'undefined') {\n console.error(`Warning: window.history.${method} is not available`)\n return\n }\n }\n\n if (method !== 'pushState' || getURL() !== as) {\n this._shallow = options.shallow\n window.history[method](\n {\n url,\n as,\n options,\n __N: true,\n key: (this._key = method !== 'pushState' ? this._key : createKey()),\n } as HistoryState,\n // Most browsers currently ignores this parameter, although they may use it in the future.\n // Passing the empty string here should be safe against future changes to the method.\n // https://developer.mozilla.org/docs/Web/API/History/replaceState\n '',\n as\n )\n }\n }\n\n async handleRouteInfoError(\n err: Error & { code?: any; cancelled?: boolean },\n pathname: string,\n query: ParsedUrlQuery,\n as: string,\n routeProps: RouteProperties,\n loadErrorFail?: boolean\n ): Promise<CompletePrivateRouteInfo> {\n if (err.cancelled) {\n // bubble up cancellation errors\n throw err\n }\n\n if (isAssetError(err) || loadErrorFail) {\n Router.events.emit('routeChangeError', err, as, routeProps)\n\n // If we can't load the page it could be one of following reasons\n // 1. Page doesn't exists\n // 2. Page does exist in a different zone\n // 3. Internal error while loading the page\n\n // So, doing a hard reload is the proper way to deal with this.\n handleHardNavigation({\n url: as,\n router: this,\n })\n\n // Changing the URL doesn't block executing the current code path.\n // So let's throw a cancellation error stop the routing logic.\n throw buildCancellationError()\n }\n\n console.error(err)\n\n try {\n let props: Record<string, any> | undefined\n const { page: Component, styleSheets } =\n await this.fetchComponent('/_error')\n\n const routeInfo: CompletePrivateRouteInfo = {\n props,\n Component,\n styleSheets,\n err,\n error: err,\n }\n\n if (!routeInfo.props) {\n try {\n routeInfo.props = await this.getInitialProps(Component, {\n err,\n pathname,\n query,\n } as any)\n } catch (gipErr) {\n console.error('Error in error page `getInitialProps`: ', gipErr)\n routeInfo.props = {}\n }\n }\n\n return routeInfo\n } catch (routeInfoErr) {\n return this.handleRouteInfoError(\n isError(routeInfoErr) ? routeInfoErr : new Error(routeInfoErr + ''),\n pathname,\n query,\n as,\n routeProps,\n true\n )\n }\n }\n\n async getRouteInfo({\n route: requestedRoute,\n pathname,\n query,\n as,\n resolvedAs,\n routeProps,\n locale,\n hasMiddleware,\n isPreview,\n unstable_skipClientCache,\n isQueryUpdating,\n isMiddlewareRewrite,\n isNotFound,\n }: {\n route: string\n pathname: string\n query: ParsedUrlQuery\n as: string\n resolvedAs: string\n hasMiddleware?: boolean\n routeProps: RouteProperties\n locale: string | undefined\n isPreview: boolean\n unstable_skipClientCache?: boolean\n isQueryUpdating?: boolean\n isMiddlewareRewrite?: boolean\n isNotFound?: boolean\n }) {\n /**\n * This `route` binding can change if there's a rewrite\n * so we keep a reference to the original requested route\n * so we can store the cache for it and avoid re-requesting every time\n * for shallow routing purposes.\n */\n let route = requestedRoute\n\n try {\n let existingInfo: PrivateRouteInfo | undefined = this.components[route]\n if (routeProps.shallow && existingInfo && this.route === route) {\n return existingInfo\n }\n\n const handleCancelled = getCancelledHandler({ route, router: this })\n\n if (hasMiddleware) {\n existingInfo = undefined\n }\n\n let cachedRouteInfo =\n existingInfo &&\n !('initial' in existingInfo) &&\n process.env.NODE_ENV !== 'development'\n ? existingInfo\n : undefined\n\n const isBackground = isQueryUpdating\n const fetchNextDataParams: FetchNextDataParams = {\n dataHref: this.pageLoader.getDataHref({\n href: formatWithValidation({ pathname, query }),\n skipInterpolation: true,\n asPath: isNotFound ? '/404' : resolvedAs,\n locale,\n }),\n hasMiddleware: true,\n isServerRender: this.isSsr,\n parseJSON: true,\n inflightCache: isBackground ? this.sbc : this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache,\n isBackground,\n }\n\n let data:\n | WithMiddlewareEffectsOutput\n | (Pick<WithMiddlewareEffectsOutput, 'json'> &\n Omit<Partial<WithMiddlewareEffectsOutput>, 'json'>)\n | null =\n isQueryUpdating && !isMiddlewareRewrite\n ? null\n : await withMiddlewareEffects({\n fetchData: () => fetchNextData(fetchNextDataParams),\n asPath: isNotFound ? '/404' : resolvedAs,\n locale: locale,\n router: this,\n }).catch((err) => {\n // we don't hard error during query updating\n // as it's un-necessary and doesn't need to be fatal\n // unless it is a fallback route and the props can't\n // be loaded\n if (isQueryUpdating) {\n return null\n }\n throw err\n })\n\n // when rendering error routes we don't apply middleware\n // effects\n if (data && (pathname === '/_error' || pathname === '/404')) {\n data.effect = undefined\n }\n\n if (isQueryUpdating) {\n if (!data) {\n data = { json: self.__NEXT_DATA__.props }\n } else {\n data.json = self.__NEXT_DATA__.props\n }\n }\n\n handleCancelled()\n\n if (\n data?.effect?.type === 'redirect-internal' ||\n data?.effect?.type === 'redirect-external'\n ) {\n return data.effect\n }\n\n if (data?.effect?.type === 'rewrite') {\n const resolvedRoute = removeTrailingSlash(data.effect.resolvedHref)\n const pages = await this.pageLoader.getPageList()\n\n // during query updating the page must match although during\n // client-transition a redirect that doesn't match a page\n // can be returned and this should trigger a hard navigation\n // which is valid for incremental migration\n if (!isQueryUpdating || pages.includes(resolvedRoute)) {\n route = resolvedRoute\n pathname = data.effect.resolvedHref\n query = { ...query, ...data.effect.parsedAs.query }\n resolvedAs = removeBasePath(\n normalizeLocalePath(data.effect.parsedAs.pathname, this.locales)\n .pathname\n )\n\n // Check again the cache with the new destination.\n existingInfo = this.components[route]\n if (\n routeProps.shallow &&\n existingInfo &&\n this.route === route &&\n !hasMiddleware\n ) {\n // If we have a match with the current route due to rewrite,\n // we can copy the existing information to the rewritten one.\n // Then, we return the information along with the matched route.\n return { ...existingInfo, route }\n }\n }\n }\n\n if (isAPIRoute(route)) {\n handleHardNavigation({ url: as, router: this })\n return new Promise<never>(() => {})\n }\n\n const routeInfo =\n cachedRouteInfo ||\n (await this.fetchComponent(route).then<CompletePrivateRouteInfo>(\n (res) => ({\n Component: res.page,\n styleSheets: res.styleSheets,\n __N_SSG: res.mod.__N_SSG,\n __N_SSP: res.mod.__N_SSP,\n })\n ))\n\n if (process.env.NODE_ENV !== 'production') {\n const { isValidElementType } =\n require('next/dist/compiled/react-is') as typeof import('next/dist/compiled/react-is')\n if (!isValidElementType(routeInfo.Component)) {\n throw new Error(\n `The default export is not a React Component in page: \"${pathname}\"`\n )\n }\n }\n const wasBailedPrefetch = data?.response?.headers.get('x-middleware-skip')\n\n const shouldFetchData = routeInfo.__N_SSG || routeInfo.__N_SSP\n\n // For non-SSG prefetches that bailed before sending data\n // we clear the cache to fetch full response\n if (wasBailedPrefetch && data?.dataHref) {\n delete this.sdc[data.dataHref]\n }\n\n const { props, cacheKey } = await this._getData(async () => {\n if (shouldFetchData) {\n if (data?.json && !wasBailedPrefetch) {\n return { cacheKey: data.cacheKey, props: data.json }\n }\n\n const dataHref = data?.dataHref\n ? data.dataHref\n : this.pageLoader.getDataHref({\n href: formatWithValidation({ pathname, query }),\n asPath: resolvedAs,\n locale,\n })\n\n const fetched = await fetchNextData({\n dataHref,\n isServerRender: this.isSsr,\n parseJSON: true,\n inflightCache: wasBailedPrefetch ? {} : this.sdc,\n persistCache: !isPreview,\n isPrefetch: false,\n unstable_skipClientCache,\n })\n\n return {\n cacheKey: fetched.cacheKey,\n props: fetched.json || {},\n }\n }\n\n return {\n headers: {},\n props: await this.getInitialProps(\n routeInfo.Component,\n // we provide AppTree later so this needs to be `any`\n {\n pathname,\n query,\n asPath: as,\n locale,\n locales: this.locales,\n defaultLocale: this.defaultLocale,\n } as any\n ),\n }\n })\n\n // Only bust the data cache for SSP routes although\n // middleware can skip cache per request with\n // x-middleware-cache: no-cache as well\n if (routeInfo.__N_SSP && fetchNextDataParams.dataHref && cacheKey) {\n delete this.sdc[cacheKey]\n }\n\n // we kick off a HEAD request in the background\n // when a non-prefetch request is made to signal revalidation\n if (\n !this.isPreview &&\n routeInfo.__N_SSG &&\n process.env.NODE_ENV !== 'development' &&\n !isQueryUpdating\n ) {\n fetchNextData(\n Object.assign({}, fetchNextDataParams, {\n isBackground: true,\n persistCache: false,\n inflightCache: this.sbc,\n })\n ).catch(() => {})\n }\n\n props.pageProps = Object.assign({}, props.pageProps)\n routeInfo.props = props\n routeInfo.route = route\n routeInfo.query = query\n routeInfo.resolvedAs = resolvedAs\n this.components[route] = routeInfo\n\n return routeInfo\n } catch (err) {\n return this.handleRouteInfoError(\n getProperError(err),\n pathname,\n query,\n as,\n routeProps\n )\n }\n }\n\n private set(\n state: typeof this.state,\n data: PrivateRouteInfo,\n resetScroll: { x: number; y: number } | null\n ): Promise<void> {\n this.state = state\n\n return this.sub(\n data,\n this.components['/_app'].Component as AppComponent,\n resetScroll\n )\n }\n\n /**\n * Callback to execute before replacing router state\n * @param cb callback to be executed\n */\n beforePopState(cb: BeforePopStateCallback) {\n this._bps = cb\n }\n\n onlyAHashChange(as: string): boolean {\n if (!this.asPath) return false\n const [oldUrlNoHash, oldHash] = this.asPath.split('#', 2)\n const [newUrlNoHash, newHash] = as.split('#', 2)\n\n // Makes sure we scroll to the provided hash if the url/hash are the same\n if (newHash && oldUrlNoHash === newUrlNoHash && oldHash === newHash) {\n return true\n }\n\n // If the urls are change, there's more than a hash change\n if (oldUrlNoHash !== newUrlNoHash) {\n return false\n }\n\n // If the hash has changed, then it's a hash only change.\n // This check is necessary to handle both the enter and\n // leave hash === '' cases. The identity case falls through\n // and is treated as a next reload.\n return oldHash !== newHash\n }\n\n scrollToHash(as: string): void {\n const [, hash = ''] = as.split('#', 2)\n\n disableSmoothScrollDuringRouteTransition(\n () => {\n // Scroll to top if the hash is just `#` with no value or `#top`\n // To mirror browsers\n if (hash === '' || hash === 'top') {\n window.scrollTo(0, 0)\n return\n }\n\n // Decode hash to make non-latin anchor works.\n const rawHash = decodeURIComponent(hash)\n // First we check if the element by id is found\n const idEl = document.getElementById(rawHash)\n if (idEl) {\n idEl.scrollIntoView()\n return\n }\n // If there's no element with the id, we check the `name` property\n // To mirror browsers\n const nameEl = document.getElementsByName(rawHash)[0]\n if (nameEl) {\n nameEl.scrollIntoView()\n }\n },\n {\n onlyHashChange: this.onlyAHashChange(as),\n }\n )\n }\n\n urlIsNew(asPath: string): boolean {\n return this.asPath !== asPath\n }\n\n /**\n * Prefetch page code, you may wait for the data during page rendering.\n * This feature only works in production!\n * @param url the href of prefetched page\n * @param asPath the as path of the prefetched page\n */\n async prefetch(\n url: string,\n asPath: string = url,\n options: PrefetchOptions = {}\n ): Promise<void> {\n // Prefetch is not supported in development mode because it would trigger on-demand-entries\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (typeof window !== 'undefined' && isBot(window.navigator.userAgent)) {\n // No prefetches for bots that render the link since they are typically navigating\n // links via the equivalent of a hard navigation and hence never utilize these\n // prefetches.\n return\n }\n let parsed = parseRelativeUrl(url)\n const urlPathname = parsed.pathname\n\n let { pathname, query } = parsed\n const originalPathname = pathname\n\n if (process.env.__NEXT_I18N_SUPPORT) {\n if (options.locale === false) {\n pathname = normalizeLocalePath!(pathname, this.locales).pathname\n parsed.pathname = pathname\n url = formatWithValidation(parsed)\n\n let parsedAs = parseRelativeUrl(asPath)\n const localePathResult = normalizeLocalePath!(\n parsedAs.pathname,\n this.locales\n )\n parsedAs.pathname = localePathResult.pathname\n options.locale = localePathResult.detectedLocale || this.defaultLocale\n asPath = formatWithValidation(parsedAs)\n }\n }\n\n const pages = await this.pageLoader.getPageList()\n let resolvedAs = asPath\n\n const locale =\n typeof options.locale !== 'undefined'\n ? options.locale || undefined\n : this.locale\n\n const isMiddlewareMatch = await matchesMiddleware({\n asPath: asPath,\n locale: locale,\n router: this,\n })\n\n if (process.env.__NEXT_HAS_REWRITES && asPath.startsWith('/')) {\n let rewrites: any\n ;({ __rewrites: rewrites } = await getClientBuildManifest())\n\n const rewritesResult = resolveRewrites(\n addBasePath(addLocale(asPath, this.locale), true),\n pages,\n rewrites,\n parsed.query,\n (p: string) => resolveDynamicRoute(p, pages),\n this.locales\n )\n\n if (rewritesResult.externalDest) {\n return\n }\n\n if (!isMiddlewareMatch) {\n resolvedAs = removeLocale(\n removeBasePath(rewritesResult.asPath),\n this.locale\n )\n }\n\n if (rewritesResult.matchedPage && rewritesResult.resolvedHref) {\n // if this directly matches a page we need to update the href to\n // allow the correct page chunk to be loaded\n pathname = rewritesResult.resolvedHref\n parsed.pathname = pathname\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n }\n parsed.pathname = resolveDynamicRoute(parsed.pathname, pages)\n\n if (isDynamicRoute(parsed.pathname)) {\n pathname = parsed.pathname\n parsed.pathname = pathname\n Object.assign(\n query,\n getRouteMatcher(getRouteRegex(parsed.pathname))(\n parsePath(asPath).pathname\n ) || {}\n )\n\n if (!isMiddlewareMatch) {\n url = formatWithValidation(parsed)\n }\n }\n\n const data =\n process.env.__NEXT_MIDDLEWARE_PREFETCH === 'strict'\n ? null\n : await withMiddlewareEffects({\n fetchData: () =>\n fetchNextData({\n dataHref: this.pageLoader.getDataHref({\n href: formatWithValidation({\n pathname: originalPathname,\n query,\n }),\n skipInterpolation: true,\n asPath: resolvedAs,\n locale,\n }),\n hasMiddleware: true,\n isServerRender: false,\n parseJSON: true,\n inflightCache: this.sdc,\n persistCache: !this.isPreview,\n isPrefetch: true,\n }),\n asPath: asPath,\n locale: locale,\n router: this,\n })\n\n /**\n * If there was a rewrite we apply the effects of the rewrite on the\n * current parameters for the prefetch.\n */\n if (data?.effect.type === 'rewrite') {\n parsed.pathname = data.effect.resolvedHref\n pathname = data.effect.resolvedHref\n query = { ...query, ...data.effect.parsedAs.query }\n resolvedAs = data.effect.parsedAs.pathname\n url = formatWithValidation(parsed)\n }\n\n /**\n * If there is a redirect to an external destination then we don't have\n * to prefetch content as it will be unused.\n */\n if (data?.effect.type === 'redirect-external') {\n return\n }\n\n const route = removeTrailingSlash(pathname)\n\n if (await this._bfl(asPath, resolvedAs, options.locale, true)) {\n this.components[urlPathname] = { __appRouter: true } as any\n }\n\n await Promise.all([\n this.pageLoader._isSsg(route).then((isSsg) => {\n return isSsg\n ? fetchNextData({\n dataHref: data?.json\n ? data?.dataHref\n : this.pageLoader.getDataHref({\n href: url,\n asPath: resolvedAs,\n locale: locale,\n }),\n isServerRender: false,\n parseJSON: true,\n inflightCache: this.sdc,\n persistCache: !this.isPreview,\n isPrefetch: true,\n unstable_skipClientCache:\n options.unstable_skipClientCache ||\n (options.priority &&\n !!process.env.__NEXT_OPTIMISTIC_CLIENT_CACHE),\n })\n .then(() => false)\n .catch(() => false)\n : false\n }),\n this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](route),\n ])\n }\n\n async fetchComponent(route: string) {\n const handleCancelled = getCancelledHandler({ route, router: this })\n\n try {\n const componentResult = await this.pageLoader.loadPage(route)\n handleCancelled()\n\n return componentResult\n } catch (err) {\n handleCancelled()\n throw err\n }\n }\n\n _getData<T>(fn: () => Promise<T>): Promise<T> {\n let cancelled = false\n const cancel = () => {\n cancelled = true\n }\n this.clc = cancel\n return fn().then((data) => {\n if (cancel === this.clc) {\n this.clc = null\n }\n\n if (cancelled) {\n const err: any = new Error('Loading initial props cancelled')\n err.cancelled = true\n throw err\n }\n\n return data\n })\n }\n\n getInitialProps(\n Component: ComponentType,\n ctx: NextPageContext\n ): Promise<Record<string, any>> {\n const { Component: App } = this.components['/_app']\n const AppTree = this._wrapApp(App as AppComponent)\n ctx.AppTree = AppTree\n return loadGetInitialProps<AppContextType<Router>>(App, {\n AppTree,\n Component,\n router: this,\n ctx,\n })\n }\n\n get route(): string {\n return this.state.route\n }\n\n get pathname(): string {\n return this.state.pathname\n }\n\n get query(): ParsedUrlQuery {\n return this.state.query\n }\n\n get asPath(): string {\n return this.state.asPath\n }\n\n get locale(): string | undefined {\n return this.state.locale\n }\n\n get isFallback(): boolean {\n return this.state.isFallback\n }\n\n get isPreview(): boolean {\n return this.state.isPreview\n }\n}\n","'use client'\n\nimport type {\n FocusAndScrollRef,\n PrefetchKind,\n} from '../../client/components/router-reducer/router-reducer-types'\nimport type { Params } from '../../server/request/params'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n CacheNode,\n LoadingModuleData,\n} from './app-router-types'\nimport React from 'react'\n\nexport interface NavigateOptions {\n scroll?: boolean\n /**\n * Transition types to apply when navigating. These types are passed to\n * [`React.addTransitionType`](https://react.dev/reference/react/addTransitionType)\n * inside the navigation transition, enabling\n * [`<ViewTransition>`](https://react.dev/reference/react/ViewTransition) components\n * to apply different animations based on the type of navigation.\n */\n transitionTypes?: string[]\n}\n\nexport interface PrefetchOptions {\n kind: PrefetchKind\n onInvalidate?: () => void\n}\n\nexport interface AppRouterInstance {\n /**\n * Navigate to the previous history entry.\n */\n back(): void\n /**\n * Navigate to the next history entry.\n */\n forward(): void\n /**\n * Refresh the current page.\n */\n refresh(): void\n /**\n * Refresh the current page. Use in development only.\n * @internal\n */\n hmrRefresh(): void\n /**\n * Navigate to the provided href.\n * Pushes a new history entry.\n */\n push(href: string, options?: NavigateOptions): void\n /**\n * Navigate to the provided href.\n * Replaces the current history entry.\n */\n replace(href: string, options?: NavigateOptions): void\n /**\n * Prefetch the provided href.\n */\n prefetch(href: string, options?: PrefetchOptions): void\n /**\n * Perform a gesture navigation using prefetched data.\n * Only available when experimental.gestureTransition is enabled.\n * @experimental\n */\n experimental_gesturePush?(href: string, options?: NavigateOptions): void\n}\n\nexport const AppRouterContext = React.createContext<AppRouterInstance | null>(\n null\n)\nexport const LayoutRouterContext = React.createContext<{\n parentTree: FlightRouterState\n parentCacheNode: CacheNode\n parentSegmentPath: FlightSegmentPath | null\n parentParams: Params\n parentLoadingData: LoadingModuleData | null\n debugNameContext: string\n url: string\n isActive: boolean\n} | null>(null)\n\nexport const GlobalLayoutRouterContext = React.createContext<{\n tree: FlightRouterState\n focusAndScrollRef: FocusAndScrollRef\n nextUrl: string | null\n previousNextUrl: string | null\n}>(null as any)\n\nexport const TemplateContext = React.createContext<React.ReactNode>(null as any)\n\nif (process.env.NODE_ENV !== 'production') {\n AppRouterContext.displayName = 'AppRouterContext'\n LayoutRouterContext.displayName = 'LayoutRouterContext'\n GlobalLayoutRouterContext.displayName = 'GlobalLayoutRouterContext'\n TemplateContext.displayName = 'TemplateContext'\n}\n\nexport const MissingSlotContext = React.createContext<Set<string>>(new Set())\n","import MODERN_BROWSERSLIST_TARGET from './modern-browserslist-target'\n\nexport { MODERN_BROWSERSLIST_TARGET }\n\nexport type ValueOf<T> = Required<T>[keyof T]\n\nexport const COMPILER_NAMES = {\n client: 'client',\n server: 'server',\n edgeServer: 'edge-server',\n} as const\n\nexport type CompilerNameValues = ValueOf<typeof COMPILER_NAMES>\n\nexport const COMPILER_INDEXES: {\n [compilerKey in CompilerNameValues]: number\n} = {\n [COMPILER_NAMES.client]: 0,\n [COMPILER_NAMES.server]: 1,\n [COMPILER_NAMES.edgeServer]: 2,\n} as const\n\n// Re-export entry constants for backward compatibility\nexport {\n UNDERSCORE_NOT_FOUND_ROUTE,\n UNDERSCORE_NOT_FOUND_ROUTE_ENTRY,\n UNDERSCORE_GLOBAL_ERROR_ROUTE,\n UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY,\n} from './entry-constants'\n\nexport enum AdapterOutputType {\n /**\n * `PAGES` represents all the React pages that are under `pages/`.\n */\n PAGES = 'PAGES',\n\n /**\n * `PAGES_API` represents all the API routes under `pages/api/`.\n */\n PAGES_API = 'PAGES_API',\n /**\n * `APP_PAGE` represents all the React pages that are under `app/` with the\n * filename of `page.{j,t}s{,x}`.\n */\n APP_PAGE = 'APP_PAGE',\n\n /**\n * `APP_ROUTE` represents all the API routes and metadata routes that are under `app/` with the\n * filename of `route.{j,t}s{,x}`.\n */\n APP_ROUTE = 'APP_ROUTE',\n\n /**\n * `PRERENDER` represents an ISR enabled route that might\n * have a seeded cache entry or fallback generated during build\n */\n PRERENDER = 'PRERENDER',\n\n /**\n * `STATIC_FILE` represents a static file (ie /_next/static)\n */\n STATIC_FILE = 'STATIC_FILE',\n\n /**\n * `MIDDLEWARE` represents the middleware output if present\n */\n MIDDLEWARE = 'MIDDLEWARE',\n}\n\nexport const PHASE_EXPORT = 'phase-export'\nexport const PHASE_ANALYZE = 'phase-analyze'\nexport const PHASE_PRODUCTION_BUILD = 'phase-production-build'\nexport const PHASE_PRODUCTION_SERVER = 'phase-production-server'\nexport const PHASE_DEVELOPMENT_SERVER = 'phase-development-server'\nexport const PHASE_TEST = 'phase-test'\nexport const PHASE_INFO = 'phase-info'\n\nexport type PHASE_TYPE =\n | typeof PHASE_INFO\n | typeof PHASE_TEST\n | typeof PHASE_EXPORT\n | typeof PHASE_ANALYZE\n | typeof PHASE_PRODUCTION_BUILD\n | typeof PHASE_PRODUCTION_SERVER\n | typeof PHASE_DEVELOPMENT_SERVER\n\nexport const PAGES_MANIFEST = 'pages-manifest.json'\nexport const APP_PATHS_MANIFEST = 'app-paths-manifest.json'\nexport const APP_PATH_ROUTES_MANIFEST = 'app-path-routes-manifest.json'\nexport const BUILD_MANIFEST = 'build-manifest.json'\nexport const FUNCTIONS_CONFIG_MANIFEST = 'functions-config-manifest.json'\nexport const SUBRESOURCE_INTEGRITY_MANIFEST = 'subresource-integrity-manifest'\nexport const NEXT_FONT_MANIFEST = 'next-font-manifest'\nexport const EXPORT_MARKER = 'export-marker.json'\nexport const EXPORT_DETAIL = 'export-detail.json'\nexport const PRERENDER_MANIFEST = 'prerender-manifest.json'\nexport const PREFETCH_HINTS = 'prefetch-hints.json'\nexport const ROUTES_MANIFEST = 'routes-manifest.json'\nexport const IMAGES_MANIFEST = 'images-manifest.json'\nexport const SERVER_FILES_MANIFEST = 'required-server-files'\nexport const DEV_CLIENT_PAGES_MANIFEST = '_devPagesManifest.json'\nexport const MIDDLEWARE_MANIFEST = 'middleware-manifest.json'\nexport const TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST =\n '_clientMiddlewareManifest.js'\nexport const TURBOPACK_CLIENT_BUILD_MANIFEST = 'client-build-manifest.json'\nexport const DEV_CLIENT_MIDDLEWARE_MANIFEST = '_devMiddlewareManifest.json'\nexport const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json'\nexport const SERVER_DIRECTORY = 'server'\nexport const CONFIG_FILES = [\n 'next.config.js',\n 'next.config.mjs',\n 'next.config.ts',\n // process.features can be undefined on Edge runtime\n // TODO: Remove `as any` once we bump @types/node to v22.10.0+\n ...((process?.features as any)?.typescript ? ['next.config.mts'] : []),\n]\nexport const BUILD_ID_FILE = 'BUILD_ID'\nexport const BLOCKED_PAGES = ['/_document', '/_app', '/_error']\nexport const CLIENT_PUBLIC_FILES_PATH = 'public'\nexport const CLIENT_STATIC_FILES_PATH = 'static'\nexport const STRING_LITERAL_DROP_BUNDLE = '__NEXT_DROP_CLIENT_FILE__'\nexport const NEXT_BUILTIN_DOCUMENT = '__NEXT_BUILTIN_DOCUMENT__'\nexport const BARREL_OPTIMIZATION_PREFIX = '__barrel_optimize__'\n\n// server/[entry]/page_client-reference-manifest.js\nexport const CLIENT_REFERENCE_MANIFEST = 'client-reference-manifest'\n// server/server-reference-manifest\nexport const SERVER_REFERENCE_MANIFEST = 'server-reference-manifest'\n// server/middleware-build-manifest.js\nexport const MIDDLEWARE_BUILD_MANIFEST = 'middleware-build-manifest'\n// server/middleware-react-loadable-manifest.js\nexport const MIDDLEWARE_REACT_LOADABLE_MANIFEST =\n 'middleware-react-loadable-manifest'\n// server/interception-route-rewrite-manifest.js\nexport const INTERCEPTION_ROUTE_REWRITE_MANIFEST =\n 'interception-route-rewrite-manifest'\n// server/dynamic-css-manifest.js\nexport const DYNAMIC_CSS_MANIFEST = 'dynamic-css-manifest'\n\n// static/runtime/main.js\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN = `main`\nexport const CLIENT_STATIC_FILES_RUNTIME_MAIN_APP = `${CLIENT_STATIC_FILES_RUNTIME_MAIN}-app`\n// next internal client components chunk for layouts\nexport const APP_CLIENT_INTERNALS = 'app-pages-internals'\n// static/runtime/react-refresh.js\nexport const CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH = `react-refresh`\n// static/runtime/webpack.js\nexport const CLIENT_STATIC_FILES_RUNTIME_WEBPACK = `webpack`\n// static/runtime/polyfills.js\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS = 'polyfills'\nexport const CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL = Symbol(\n CLIENT_STATIC_FILES_RUNTIME_POLYFILLS\n)\nexport const DEFAULT_RUNTIME_WEBPACK = 'webpack-runtime'\nexport const EDGE_RUNTIME_WEBPACK = 'edge-runtime-webpack'\nexport const STATIC_PROPS_ID = '__N_SSG'\nexport const SERVER_PROPS_ID = '__N_SSP'\nexport const DEFAULT_SERIF_FONT = {\n name: 'Times New Roman',\n xAvgCharWidth: 821,\n azAvgWidth: 854.3953488372093,\n unitsPerEm: 2048,\n}\nexport const DEFAULT_SANS_SERIF_FONT = {\n name: 'Arial',\n xAvgCharWidth: 904,\n azAvgWidth: 934.5116279069767,\n unitsPerEm: 2048,\n}\nexport const STATIC_STATUS_PAGES = ['/500']\nexport const TRACE_OUTPUT_VERSION = 1\n// in `MB`\nexport const TURBO_TRACE_DEFAULT_MEMORY_LIMIT = 6000\n\nexport const RSC_MODULE_TYPES = {\n client: 'client',\n server: 'server',\n} as const\n\n// comparing\n// https://nextjs.org/docs/api-reference/edge-runtime\n// with\n// https://nodejs.org/docs/latest/api/globals.html\nexport const EDGE_UNSUPPORTED_NODE_APIS = [\n 'clearImmediate',\n 'setImmediate',\n 'BroadcastChannel',\n 'ByteLengthQueuingStrategy',\n 'CompressionStream',\n 'CountQueuingStrategy',\n 'DecompressionStream',\n 'DomException',\n 'MessageChannel',\n 'MessageEvent',\n 'MessagePort',\n 'ReadableByteStreamController',\n 'ReadableStreamBYOBRequest',\n 'ReadableStreamDefaultController',\n 'TransformStreamDefaultController',\n 'WritableStreamDefaultController',\n]\n\nexport const SYSTEM_ENTRYPOINTS = new Set<string>([\n CLIENT_STATIC_FILES_RUNTIME_MAIN,\n CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH,\n CLIENT_STATIC_FILES_RUNTIME_MAIN_APP,\n])\n","import type { ParsedUrlQuery } from 'querystring'\n\nimport { getRouteMatcher } from './route-matcher'\nimport { getRouteRegex } from './route-regex'\n\nexport function interpolateAs(\n route: string,\n asPathname: string,\n query: ParsedUrlQuery\n) {\n let interpolatedRoute = ''\n\n const dynamicRegex = getRouteRegex(route)\n const dynamicGroups = dynamicRegex.groups\n const dynamicMatches =\n // Try to match the dynamic route against the asPath\n (asPathname !== route ? getRouteMatcher(dynamicRegex)(asPathname) : '') ||\n // Fall back to reading the values from the href\n // TODO: should this take priority; also need to change in the router.\n query\n\n interpolatedRoute = route\n const params = Object.keys(dynamicGroups)\n\n if (\n !params.every((param) => {\n let value = dynamicMatches[param] || ''\n const { repeat, optional } = dynamicGroups[param]\n\n // support single-level catch-all\n // TODO: more robust handling for user-error (passing `/`)\n let replaced = `[${repeat ? '...' : ''}${param}]`\n if (optional) {\n replaced = `${!value ? '/' : ''}[${replaced}]`\n }\n if (repeat && !Array.isArray(value)) value = [value]\n\n return (\n (optional || param in dynamicMatches) &&\n // Interpolate group into data URL if present\n (interpolatedRoute =\n interpolatedRoute!.replace(\n replaced,\n repeat\n ? (value as string[])\n .map(\n // these values should be fully encoded instead of just\n // path delimiter escaped since they are being inserted\n // into the URL and we expect URL encoded segments\n // when parsing dynamic route params\n (segment) => encodeURIComponent(segment)\n )\n .join('/')\n : encodeURIComponent(value as string)\n ) || '/')\n )\n })\n ) {\n interpolatedRoute = '' // did not satisfy all requirements\n\n // n.b. We ignore this error because we handle warning for this case in\n // development in the `<Link>` component directly.\n }\n return {\n params,\n result: interpolatedRoute,\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n0 && (module.exports = {\n ACTION_SUFFIX: null,\n APP_DIR_ALIAS: null,\n CACHE_ONE_YEAR_SECONDS: null,\n DOT_NEXT_ALIAS: null,\n ESLINT_DEFAULT_DIRS: null,\n GSP_NO_RETURNED_VALUE: null,\n GSSP_COMPONENT_MEMBER_ERROR: null,\n GSSP_NO_RETURNED_VALUE: null,\n HTML_CONTENT_TYPE_HEADER: null,\n INFINITE_CACHE: null,\n INSTRUMENTATION_HOOK_FILENAME: null,\n JSON_CONTENT_TYPE_HEADER: null,\n MATCHED_PATH_HEADER: null,\n MIDDLEWARE_FILENAME: null,\n MIDDLEWARE_LOCATION_REGEXP: null,\n NEXT_BODY_SUFFIX: null,\n NEXT_CACHE_IMPLICIT_TAG_ID: null,\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: null,\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: null,\n NEXT_CACHE_ROOT_PARAM_TAG_ID: null,\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: null,\n NEXT_CACHE_TAGS_HEADER: null,\n NEXT_CACHE_TAG_MAX_ITEMS: null,\n NEXT_CACHE_TAG_MAX_LENGTH: null,\n NEXT_DATA_SUFFIX: null,\n NEXT_INTERCEPTION_MARKER_PREFIX: null,\n NEXT_META_SUFFIX: null,\n NEXT_NAV_DEPLOYMENT_ID_HEADER: null,\n NEXT_QUERY_PARAM_PREFIX: null,\n NEXT_RESUME_HEADER: null,\n NEXT_RESUME_STATE_LENGTH_HEADER: null,\n NON_STANDARD_NODE_ENV: null,\n PAGES_DIR_ALIAS: null,\n PRERENDER_REVALIDATE_HEADER: null,\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: null,\n PROXY_FILENAME: null,\n PROXY_LOCATION_REGEXP: null,\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: null,\n ROOT_DIR_ALIAS: null,\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: null,\n RSC_ACTION_ENCRYPTION_ALIAS: null,\n RSC_ACTION_PROXY_ALIAS: null,\n RSC_ACTION_VALIDATE_ALIAS: null,\n RSC_CACHE_WRAPPER_ALIAS: null,\n RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: null,\n RSC_MOD_REF_PROXY_ALIAS: null,\n RSC_SEGMENTS_DIR_SUFFIX: null,\n RSC_SEGMENT_SUFFIX: null,\n RSC_SUFFIX: null,\n SERVER_PROPS_EXPORT_ERROR: null,\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: null,\n SERVER_PROPS_SSG_CONFLICT: null,\n SERVER_RUNTIME: null,\n SSG_FALLBACK_EXPORT_ERROR: null,\n SSG_GET_INITIAL_PROPS_CONFLICT: null,\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: null,\n TEXT_PLAIN_CONTENT_TYPE_HEADER: null,\n UNSTABLE_REVALIDATE_RENAME_ERROR: null,\n WEBPACK_LAYERS: null,\n WEBPACK_RESOURCE_QUERIES: null,\n WEB_SOCKET_MAX_RECONNECTIONS: null\n});\nfunction _export(target, all) {\n for(var name in all)Object.defineProperty(target, name, {\n enumerable: true,\n get: all[name]\n });\n}\n_export(exports, {\n ACTION_SUFFIX: function() {\n return ACTION_SUFFIX;\n },\n APP_DIR_ALIAS: function() {\n return APP_DIR_ALIAS;\n },\n CACHE_ONE_YEAR_SECONDS: function() {\n return CACHE_ONE_YEAR_SECONDS;\n },\n DOT_NEXT_ALIAS: function() {\n return DOT_NEXT_ALIAS;\n },\n ESLINT_DEFAULT_DIRS: function() {\n return ESLINT_DEFAULT_DIRS;\n },\n GSP_NO_RETURNED_VALUE: function() {\n return GSP_NO_RETURNED_VALUE;\n },\n GSSP_COMPONENT_MEMBER_ERROR: function() {\n return GSSP_COMPONENT_MEMBER_ERROR;\n },\n GSSP_NO_RETURNED_VALUE: function() {\n return GSSP_NO_RETURNED_VALUE;\n },\n HTML_CONTENT_TYPE_HEADER: function() {\n return HTML_CONTENT_TYPE_HEADER;\n },\n INFINITE_CACHE: function() {\n return INFINITE_CACHE;\n },\n INSTRUMENTATION_HOOK_FILENAME: function() {\n return INSTRUMENTATION_HOOK_FILENAME;\n },\n JSON_CONTENT_TYPE_HEADER: function() {\n return JSON_CONTENT_TYPE_HEADER;\n },\n MATCHED_PATH_HEADER: function() {\n return MATCHED_PATH_HEADER;\n },\n MIDDLEWARE_FILENAME: function() {\n return MIDDLEWARE_FILENAME;\n },\n MIDDLEWARE_LOCATION_REGEXP: function() {\n return MIDDLEWARE_LOCATION_REGEXP;\n },\n NEXT_BODY_SUFFIX: function() {\n return NEXT_BODY_SUFFIX;\n },\n NEXT_CACHE_IMPLICIT_TAG_ID: function() {\n return NEXT_CACHE_IMPLICIT_TAG_ID;\n },\n NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {\n return NEXT_CACHE_REVALIDATED_TAGS_HEADER;\n },\n NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {\n return NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER;\n },\n NEXT_CACHE_ROOT_PARAM_TAG_ID: function() {\n return NEXT_CACHE_ROOT_PARAM_TAG_ID;\n },\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_SOFT_TAG_MAX_LENGTH;\n },\n NEXT_CACHE_TAGS_HEADER: function() {\n return NEXT_CACHE_TAGS_HEADER;\n },\n NEXT_CACHE_TAG_MAX_ITEMS: function() {\n return NEXT_CACHE_TAG_MAX_ITEMS;\n },\n NEXT_CACHE_TAG_MAX_LENGTH: function() {\n return NEXT_CACHE_TAG_MAX_LENGTH;\n },\n NEXT_DATA_SUFFIX: function() {\n return NEXT_DATA_SUFFIX;\n },\n NEXT_INTERCEPTION_MARKER_PREFIX: function() {\n return NEXT_INTERCEPTION_MARKER_PREFIX;\n },\n NEXT_META_SUFFIX: function() {\n return NEXT_META_SUFFIX;\n },\n NEXT_NAV_DEPLOYMENT_ID_HEADER: function() {\n return NEXT_NAV_DEPLOYMENT_ID_HEADER;\n },\n NEXT_QUERY_PARAM_PREFIX: function() {\n return NEXT_QUERY_PARAM_PREFIX;\n },\n NEXT_RESUME_HEADER: function() {\n return NEXT_RESUME_HEADER;\n },\n NEXT_RESUME_STATE_LENGTH_HEADER: function() {\n return NEXT_RESUME_STATE_LENGTH_HEADER;\n },\n NON_STANDARD_NODE_ENV: function() {\n return NON_STANDARD_NODE_ENV;\n },\n PAGES_DIR_ALIAS: function() {\n return PAGES_DIR_ALIAS;\n },\n PRERENDER_REVALIDATE_HEADER: function() {\n return PRERENDER_REVALIDATE_HEADER;\n },\n PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {\n return PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER;\n },\n PROXY_FILENAME: function() {\n return PROXY_FILENAME;\n },\n PROXY_LOCATION_REGEXP: function() {\n return PROXY_LOCATION_REGEXP;\n },\n PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {\n return PUBLIC_DIR_MIDDLEWARE_CONFLICT;\n },\n ROOT_DIR_ALIAS: function() {\n return ROOT_DIR_ALIAS;\n },\n RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {\n return RSC_ACTION_CLIENT_WRAPPER_ALIAS;\n },\n RSC_ACTION_ENCRYPTION_ALIAS: function() {\n return RSC_ACTION_ENCRYPTION_ALIAS;\n },\n RSC_ACTION_PROXY_ALIAS: function() {\n return RSC_ACTION_PROXY_ALIAS;\n },\n RSC_ACTION_VALIDATE_ALIAS: function() {\n return RSC_ACTION_VALIDATE_ALIAS;\n },\n RSC_CACHE_WRAPPER_ALIAS: function() {\n return RSC_CACHE_WRAPPER_ALIAS;\n },\n RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS: function() {\n return RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS;\n },\n RSC_MOD_REF_PROXY_ALIAS: function() {\n return RSC_MOD_REF_PROXY_ALIAS;\n },\n RSC_SEGMENTS_DIR_SUFFIX: function() {\n return RSC_SEGMENTS_DIR_SUFFIX;\n },\n RSC_SEGMENT_SUFFIX: function() {\n return RSC_SEGMENT_SUFFIX;\n },\n RSC_SUFFIX: function() {\n return RSC_SUFFIX;\n },\n SERVER_PROPS_EXPORT_ERROR: function() {\n return SERVER_PROPS_EXPORT_ERROR;\n },\n SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {\n return SERVER_PROPS_GET_INIT_PROPS_CONFLICT;\n },\n SERVER_PROPS_SSG_CONFLICT: function() {\n return SERVER_PROPS_SSG_CONFLICT;\n },\n SERVER_RUNTIME: function() {\n return SERVER_RUNTIME;\n },\n SSG_FALLBACK_EXPORT_ERROR: function() {\n return SSG_FALLBACK_EXPORT_ERROR;\n },\n SSG_GET_INITIAL_PROPS_CONFLICT: function() {\n return SSG_GET_INITIAL_PROPS_CONFLICT;\n },\n STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {\n return STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR;\n },\n TEXT_PLAIN_CONTENT_TYPE_HEADER: function() {\n return TEXT_PLAIN_CONTENT_TYPE_HEADER;\n },\n UNSTABLE_REVALIDATE_RENAME_ERROR: function() {\n return UNSTABLE_REVALIDATE_RENAME_ERROR;\n },\n WEBPACK_LAYERS: function() {\n return WEBPACK_LAYERS;\n },\n WEBPACK_RESOURCE_QUERIES: function() {\n return WEBPACK_RESOURCE_QUERIES;\n },\n WEB_SOCKET_MAX_RECONNECTIONS: function() {\n return WEB_SOCKET_MAX_RECONNECTIONS;\n }\n});\nconst TEXT_PLAIN_CONTENT_TYPE_HEADER = 'text/plain';\nconst HTML_CONTENT_TYPE_HEADER = 'text/html; charset=utf-8';\nconst JSON_CONTENT_TYPE_HEADER = 'application/json; charset=utf-8';\nconst NEXT_QUERY_PARAM_PREFIX = 'nxtP';\nconst NEXT_INTERCEPTION_MARKER_PREFIX = 'nxtI';\nconst MATCHED_PATH_HEADER = 'x-matched-path';\nconst PRERENDER_REVALIDATE_HEADER = 'x-prerender-revalidate';\nconst PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER = 'x-prerender-revalidate-if-generated';\nconst RSC_SEGMENTS_DIR_SUFFIX = '.segments';\nconst RSC_SEGMENT_SUFFIX = '.segment.rsc';\nconst RSC_SUFFIX = '.rsc';\nconst ACTION_SUFFIX = '.action';\nconst NEXT_DATA_SUFFIX = '.json';\nconst NEXT_META_SUFFIX = '.meta';\nconst NEXT_BODY_SUFFIX = '.body';\nconst NEXT_NAV_DEPLOYMENT_ID_HEADER = 'x-nextjs-deployment-id';\nconst NEXT_CACHE_TAGS_HEADER = 'x-next-cache-tags';\nconst NEXT_CACHE_REVALIDATED_TAGS_HEADER = 'x-next-revalidated-tags';\nconst NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER = 'x-next-revalidate-tag-token';\nconst NEXT_RESUME_HEADER = 'next-resume';\nconst NEXT_RESUME_STATE_LENGTH_HEADER = 'x-next-resume-state-length';\nconst NEXT_CACHE_TAG_MAX_ITEMS = 128;\nconst NEXT_CACHE_TAG_MAX_LENGTH = 256;\nconst NEXT_CACHE_SOFT_TAG_MAX_LENGTH = 1024;\nconst NEXT_CACHE_IMPLICIT_TAG_ID = '_N_T_';\nconst NEXT_CACHE_ROOT_PARAM_TAG_ID = '_N_RP_';\nconst CACHE_ONE_YEAR_SECONDS = 31536000;\nconst INFINITE_CACHE = 0xfffffffe;\nconst MIDDLEWARE_FILENAME = 'middleware';\nconst MIDDLEWARE_LOCATION_REGEXP = `(?:src/)?${MIDDLEWARE_FILENAME}`;\nconst PROXY_FILENAME = 'proxy';\nconst PROXY_LOCATION_REGEXP = `(?:src/)?${PROXY_FILENAME}`;\nconst INSTRUMENTATION_HOOK_FILENAME = 'instrumentation';\nconst PAGES_DIR_ALIAS = 'private-next-pages';\nconst DOT_NEXT_ALIAS = 'private-dot-next';\nconst ROOT_DIR_ALIAS = 'private-next-root-dir';\nconst APP_DIR_ALIAS = 'private-next-app-dir';\nconst RSC_MOD_REF_PROXY_ALIAS = 'private-next-rsc-mod-ref-proxy';\nconst RSC_ACTION_VALIDATE_ALIAS = 'private-next-rsc-action-validate';\nconst RSC_ACTION_PROXY_ALIAS = 'private-next-rsc-server-reference';\nconst RSC_CACHE_WRAPPER_ALIAS = 'private-next-rsc-cache-wrapper';\nconst RSC_DYNAMIC_IMPORT_WRAPPER_ALIAS = 'private-next-rsc-track-dynamic-import';\nconst RSC_ACTION_ENCRYPTION_ALIAS = 'private-next-rsc-action-encryption';\nconst RSC_ACTION_CLIENT_WRAPPER_ALIAS = 'private-next-rsc-action-client-wrapper';\nconst PUBLIC_DIR_MIDDLEWARE_CONFLICT = `You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict`;\nconst SSG_GET_INITIAL_PROPS_CONFLICT = `You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps`;\nconst SERVER_PROPS_GET_INIT_PROPS_CONFLICT = `You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.`;\nconst SERVER_PROPS_SSG_CONFLICT = `You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps`;\nconst STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR = `can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props`;\nconst SERVER_PROPS_EXPORT_ERROR = `pages with \\`getServerSideProps\\` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export`;\nconst GSP_NO_RETURNED_VALUE = 'Your `getStaticProps` function did not return an object. Did you forget to add a `return`?';\nconst GSSP_NO_RETURNED_VALUE = 'Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?';\nconst UNSTABLE_REVALIDATE_RENAME_ERROR = 'The `unstable_revalidate` property is available for general use.\\n' + 'Please use `revalidate` instead.';\nconst GSSP_COMPONENT_MEMBER_ERROR = `can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member`;\nconst NON_STANDARD_NODE_ENV = `You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env`;\nconst SSG_FALLBACK_EXPORT_ERROR = `Pages with \\`fallback\\` enabled in \\`getStaticPaths\\` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export`;\nconst ESLINT_DEFAULT_DIRS = [\n 'app',\n 'pages',\n 'components',\n 'lib',\n 'src'\n];\nconst SERVER_RUNTIME = {\n edge: 'edge',\n experimentalEdge: 'experimental-edge',\n nodejs: 'nodejs'\n};\nconst WEB_SOCKET_MAX_RECONNECTIONS = 12;\n/**\n * The names of the webpack layers. These layers are the primitives for the\n * webpack chunks.\n */ const WEBPACK_LAYERS_NAMES = {\n /**\n * The layer for the shared code between the client and server bundles.\n */ shared: 'shared',\n /**\n * The layer for server-only runtime and picking up `react-server` export conditions.\n * Including app router RSC pages and app router custom routes and metadata routes.\n */ reactServerComponents: 'rsc',\n /**\n * Server Side Rendering layer for app (ssr).\n */ serverSideRendering: 'ssr',\n /**\n * The browser client bundle layer for actions.\n */ actionBrowser: 'action-browser',\n /**\n * The Node.js bundle layer for the API routes.\n */ apiNode: 'api-node',\n /**\n * The Edge Lite bundle layer for the API routes.\n */ apiEdge: 'api-edge',\n /**\n * The layer for the middleware code.\n */ middleware: 'middleware',\n /**\n * The layer for the instrumentation hooks.\n */ instrument: 'instrument',\n /**\n * The layer for assets on the edge.\n */ edgeAsset: 'edge-asset',\n /**\n * The browser client bundle layer for App directory.\n */ appPagesBrowser: 'app-pages-browser',\n /**\n * The browser client bundle layer for Pages directory.\n */ pagesDirBrowser: 'pages-dir-browser',\n /**\n * The Edge Lite bundle layer for Pages directory.\n */ pagesDirEdge: 'pages-dir-edge',\n /**\n * The Node.js bundle layer for Pages directory.\n */ pagesDirNode: 'pages-dir-node'\n};\nconst WEBPACK_LAYERS = {\n ...WEBPACK_LAYERS_NAMES,\n GROUP: {\n builtinReact: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ],\n serverOnly: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n neutralTarget: [\n // pages api\n WEBPACK_LAYERS_NAMES.apiNode,\n WEBPACK_LAYERS_NAMES.apiEdge\n ],\n clientOnly: [\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser\n ],\n bundled: [\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.actionBrowser,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.shared,\n WEBPACK_LAYERS_NAMES.instrument,\n WEBPACK_LAYERS_NAMES.middleware\n ],\n appPages: [\n // app router pages and layouts\n WEBPACK_LAYERS_NAMES.reactServerComponents,\n WEBPACK_LAYERS_NAMES.serverSideRendering,\n WEBPACK_LAYERS_NAMES.appPagesBrowser,\n WEBPACK_LAYERS_NAMES.actionBrowser\n ]\n }\n};\nconst WEBPACK_RESOURCE_QUERIES = {\n edgeSSREntry: '__next_edge_ssr_entry__',\n metadata: '__next_metadata__',\n metadataRoute: '__next_metadata_route__',\n metadataImageMeta: '__next_metadata_image_meta__'\n};\n\n//# sourceMappingURL=constants.js.map","const DOMAttributeNames: Record<string, string> = {\n acceptCharset: 'accept-charset',\n className: 'class',\n htmlFor: 'for',\n httpEquiv: 'http-equiv',\n noModule: 'noModule',\n}\n\nconst ignoreProps = [\n 'onLoad',\n 'onReady',\n 'dangerouslySetInnerHTML',\n 'children',\n 'onError',\n 'strategy',\n 'stylesheets',\n]\n\nfunction isBooleanScriptAttribute(\n attr: string\n): attr is 'async' | 'defer' | 'noModule' {\n return ['async', 'defer', 'noModule'].includes(attr)\n}\n\nexport function setAttributesFromProps(el: HTMLElement, props: object) {\n for (const [p, value] of Object.entries(props)) {\n if (!props.hasOwnProperty(p)) continue\n if (ignoreProps.includes(p)) continue\n\n // we don't render undefined props to the DOM\n if (value === undefined) {\n continue\n }\n\n const attr = DOMAttributeNames[p] || p.toLowerCase()\n\n if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) {\n // Correctly assign boolean script attributes\n // https://github.com/vercel/next.js/pull/20748\n ;(el as HTMLScriptElement)[attr] = !!value\n } else {\n el.setAttribute(attr, String(value))\n }\n\n // Remove falsy non-zero boolean attributes so they are correctly interpreted\n // (e.g. if we set them to false, this coerces to the string \"false\", which the browser interprets as true)\n if (\n value === false ||\n (el.tagName === 'SCRIPT' &&\n isBooleanScriptAttribute(attr) &&\n (!value || value === 'false'))\n ) {\n // Call setAttribute before, as we need to set and unset the attribute to override force async:\n // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async\n el.setAttribute(attr, '')\n el.removeAttribute(attr)\n }\n }\n}\n","//#region src/utils/cacheNames.ts\nconst _cacheNameDetails = {\n\tgoogleAnalytics: \"googleAnalytics\",\n\tprecache: \"precache-v2\",\n\tprefix: \"serwist\",\n\truntime: \"runtime\",\n\tsuffix: typeof registration !== \"undefined\" ? registration.scope : \"\"\n};\nconst _createCacheName = (cacheName) => {\n\treturn [\n\t\t_cacheNameDetails.prefix,\n\t\tcacheName,\n\t\t_cacheNameDetails.suffix\n\t].filter((value) => value && value.length > 0).join(\"-\");\n};\nconst eachCacheNameDetail = (fn) => {\n\tfor (const key of Object.keys(_cacheNameDetails)) fn(key);\n};\nconst cacheNames = {\n\tupdateDetails: (details) => {\n\t\teachCacheNameDetail((key) => {\n\t\t\tconst detail = details[key];\n\t\t\tif (typeof detail === \"string\") _cacheNameDetails[key] = detail;\n\t\t});\n\t},\n\tgetGoogleAnalyticsName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.googleAnalytics);\n\t},\n\tgetPrecacheName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.precache);\n\t},\n\tgetPrefix: () => {\n\t\treturn _cacheNameDetails.prefix;\n\t},\n\tgetRuntimeName: (userCacheName) => {\n\t\treturn userCacheName || _createCacheName(_cacheNameDetails.runtime);\n\t},\n\tgetSuffix: () => {\n\t\treturn _cacheNameDetails.suffix;\n\t}\n};\n//#endregion\n//#region src/utils/canConstructResponseFromBodyStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a new response from a `response.body` stream.\n*\n* @returns `true`, if the current browser can successfully construct\n* a response from a `response.body` stream, `false` otherwise.\n* @private\n*/\nfunction canConstructResponseFromBodyStream() {\n\tif (supportStatus === void 0) {\n\t\tconst testResponse = new Response(\"\");\n\t\tif (\"body\" in testResponse) try {\n\t\t\tnew Response(testResponse.body);\n\t\t\tsupportStatus = true;\n\t\t} catch {\n\t\t\tsupportStatus = false;\n\t\t}\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/models/messages/messages.ts\nconst messages = {\n\t\"invalid-value\": ({ paramName, validValueDescription, value }) => {\n\t\tif (!paramName || !validValueDescription) throw new Error(`Unexpected input to 'invalid-value' error.`);\n\t\treturn `The '${paramName}' parameter was given a value with an unexpected value. ${validValueDescription} Received a value of ${JSON.stringify(value)}.`;\n\t},\n\t\"not-an-array\": ({ moduleName, className, funcName, paramName }) => {\n\t\tif (!moduleName || !className || !funcName || !paramName) throw new Error(`Unexpected input to 'not-an-array' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className}.${funcName}()' must be an array.`;\n\t},\n\t\"incorrect-type\": ({ expectedType, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedType || !paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-type' error.`);\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${className ? `${className}.` : \"\"}${funcName}()' must be of type ${expectedType}.`;\n\t},\n\t\"incorrect-class\": ({ expectedClassName, paramName, moduleName, className, funcName, isReturnValueProblem }) => {\n\t\tif (!expectedClassName || !moduleName || !funcName) throw new Error(`Unexpected input to 'incorrect-class' error.`);\n\t\tconst classNameStr = className ? `${className}.` : \"\";\n\t\tif (isReturnValueProblem) return `The return value from '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t\treturn `The parameter '${paramName}' passed into '${moduleName}.${classNameStr}${funcName}()' must be an instance of class ${expectedClassName}.`;\n\t},\n\t\"missing-a-method\": ({ expectedMethod, paramName, moduleName, className, funcName }) => {\n\t\tif (!expectedMethod || !paramName || !moduleName || !className || !funcName) throw new Error(`Unexpected input to 'missing-a-method' error.`);\n\t\treturn `${moduleName}.${className}.${funcName}() expected the '${paramName}' parameter to expose a '${expectedMethod}' method.`;\n\t},\n\t\"add-to-cache-list-unexpected-type\": ({ entry }) => {\n\t\treturn `An unexpected entry was passed to 'serwist.Serwist.addToPrecacheList()' The entry '${JSON.stringify(entry)}' isn't supported. You must supply an array of strings with one or more characters, objects with a url property or Request objects.`;\n\t},\n\t\"add-to-cache-list-conflicting-entries\": ({ firstEntry, secondEntry }) => {\n\t\tif (!firstEntry || !secondEntry) throw new Error(\"Unexpected input to 'add-to-cache-list-duplicate-entries' error.\");\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${firstEntry} but different revision details. Serwist is unable to cache and version the asset correctly. Please remove one of the entries.`;\n\t},\n\t\"plugin-error-request-will-fetch\": ({ thrownErrorMessage }) => {\n\t\tif (!thrownErrorMessage) throw new Error(\"Unexpected input to 'plugin-error-request-will-fetch', error.\");\n\t\treturn `An error was thrown by a plugin's 'requestWillFetch()' method. The thrown error message was: '${thrownErrorMessage}'.`;\n\t},\n\t\"invalid-cache-name\": ({ cacheNameId, value }) => {\n\t\tif (!cacheNameId) throw new Error(`Expected a 'cacheNameId' for error 'invalid-cache-name'`);\n\t\treturn `You must provide a name containing at least one character for setCacheDetails({${cacheNameId}: '...'}). Received a value of '${JSON.stringify(value)}'`;\n\t},\n\t\"unregister-route-but-not-found-with-method\": ({ method }) => {\n\t\tif (!method) throw new Error(\"Unexpected input to 'unregister-route-but-not-found-with-method' error.\");\n\t\treturn `The route you're trying to unregister was not previously registered for the method type '${method}'.`;\n\t},\n\t\"unregister-route-route-not-registered\": () => {\n\t\treturn \"The route you're trying to unregister was not previously registered.\";\n\t},\n\t\"queue-replay-failed\": ({ name }) => {\n\t\treturn `Replaying the background sync queue '${name}' failed.`;\n\t},\n\t\"duplicate-queue-name\": ({ name }) => {\n\t\treturn `The queue name '${name}' is already being used. All instances of 'serwist.BackgroundSyncQueue' must be given unique names.`;\n\t},\n\t\"expired-test-without-max-age\": ({ methodName, paramName }) => {\n\t\treturn `The '${methodName}()' method can only be used when the '${paramName}' is used in the constructor.`;\n\t},\n\t\"unsupported-route-type\": ({ moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter was an unsupported type. Please check the docs for ${moduleName}.${className}.${funcName} for valid input types.`;\n\t},\n\t\"not-array-of-class\": ({ value, expectedClass, moduleName, className, funcName, paramName }) => {\n\t\treturn `The supplied '${paramName}' parameter must be an array of '${expectedClass}' objects. Received '${JSON.stringify(value)},'. Please check the call to ${moduleName}.${className}.${funcName}() to fix the issue.`;\n\t},\n\t\"max-entries-or-age-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.maxEntries' or 'config.maxAgeSeconds' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"statuses-or-headers-required\": ({ moduleName, className, funcName }) => {\n\t\treturn `You must define either 'config.statuses' or 'config.headers' in '${moduleName}.${className}.${funcName}'`;\n\t},\n\t\"invalid-string\": ({ moduleName, funcName, paramName }) => {\n\t\tif (!paramName || !moduleName || !funcName) throw new Error(`Unexpected input to 'invalid-string' error.`);\n\t\treturn `When using strings, the '${paramName}' parameter must start with 'http' (for cross-origin matches) or '/' (for same-origin matches). Please see the docs for ${moduleName}.${funcName}() for more info.`;\n\t},\n\t\"channel-name-required\": () => {\n\t\treturn \"You must provide a channelName to construct a BroadcastCacheUpdate instance.\";\n\t},\n\t\"invalid-responses-are-same-args\": () => {\n\t\treturn \"The arguments passed into responsesAreSame() appear to be invalid. Please ensure valid Responses are used.\";\n\t},\n\t\"expire-custom-caches-only\": () => {\n\t\treturn \"You must provide a 'cacheName' property when using the expiration plugin with a runtime caching strategy.\";\n\t},\n\t\"unit-must-be-bytes\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'unit-must-be-bytes' error.`);\n\t\treturn `The 'unit' portion of the Range header must be set to 'bytes'. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"single-range-only\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'single-range-only' error.`);\n\t\treturn `Multiple ranges are not supported. Please use a single start value, and optional end value. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"invalid-range-values\": ({ normalizedRangeHeader }) => {\n\t\tif (!normalizedRangeHeader) throw new Error(`Unexpected input to 'invalid-range-values' error.`);\n\t\treturn `The Range header is missing both start and end values. At least one of those values is needed. The Range header provided was \"${normalizedRangeHeader}\"`;\n\t},\n\t\"no-range-header\": () => {\n\t\treturn \"No Range header was found in the Request provided.\";\n\t},\n\t\"range-not-satisfiable\": ({ size, start, end }) => {\n\t\treturn `The start (${start}) and end (${end}) values in the Range are not satisfiable by the cached response, which is ${size} bytes.`;\n\t},\n\t\"attempt-to-cache-non-get-request\": ({ url, method }) => {\n\t\treturn `Unable to cache '${url}' because it is a '${method}' request and only 'GET' requests can be cached.`;\n\t},\n\t\"cache-put-with-no-response\": ({ url }) => {\n\t\treturn `There was an attempt to cache '${url}' but the response was not defined.`;\n\t},\n\t\"no-response\": ({ url, error }) => {\n\t\tlet message = `The strategy could not generate a response for '${url}'.`;\n\t\tif (error) message += ` The underlying error is ${error}.`;\n\t\treturn message;\n\t},\n\t\"bad-precaching-response\": ({ url, status }) => {\n\t\treturn `The precaching request for '${url}' failed${status ? ` with an HTTP status of ${status}.` : \".\"}`;\n\t},\n\t\"non-precached-url\": ({ url }) => {\n\t\treturn `'createHandlerBoundToURL(\"${url}\")' was called, but that URL is not precached. Please pass in a URL that is precached instead.`;\n\t},\n\t\"add-to-cache-list-conflicting-integrities\": ({ url }) => {\n\t\treturn `Two of the entries passed to 'serwist.Serwist.addToPrecacheList()' had the URL ${url} with different integrity values. Please remove one of them.`;\n\t},\n\t\"missing-precache-entry\": ({ cacheName, url }) => {\n\t\treturn `Unable to find a precached response in ${cacheName} for ${url}.`;\n\t},\n\t\"cross-origin-copy-response\": ({ origin }) => {\n\t\treturn `'@serwist/core.copyResponse()' can only be used with same-origin responses. It was passed a response with origin ${origin}.`;\n\t},\n\t\"opaque-streams-source\": ({ type }) => {\n\t\tconst message = `One of the '@serwist/streams' sources resulted in an '${type}' response.`;\n\t\tif (type === \"opaqueredirect\") return `${message} Please do not use a navigation request that results in a redirect as a source.`;\n\t\treturn `${message} Please ensure your sources are CORS-enabled.`;\n\t}\n};\n//#endregion\n//#region src/models/messages/messageGenerator.ts\nconst fallback = (code, ...args) => {\n\tlet msg = code;\n\tif (args.length > 0) msg += ` :: ${JSON.stringify(args)}`;\n\treturn msg;\n};\nconst generatorFunction = (code, details = {}) => {\n\tconst message = messages[code];\n\tif (!message) throw new Error(`Unable to find message for code '${code}'.`);\n\treturn message(details);\n};\nconst messageGenerator = process.env.NODE_ENV === \"production\" ? fallback : generatorFunction;\n//#endregion\n//#region src/utils/SerwistError.ts\n/**\n* Serwist errors should be thrown with this class.\n* This allows use to ensure the type easily in tests,\n* helps developers identify errors from Serwist\n* easily and allows use to optimise error\n* messages correctly.\n*\n* @private\n*/\nvar SerwistError = class extends Error {\n\tdetails;\n\t/**\n\t*\n\t* @param errorCode The error code that\n\t* identifies this particular error.\n\t* @param details Any relevant arguments\n\t* that will help developers identify issues should\n\t* be added as a key on the context object.\n\t*/\n\tconstructor(errorCode, details) {\n\t\tconst message = messageGenerator(errorCode, details);\n\t\tsuper(message);\n\t\tthis.name = errorCode;\n\t\tthis.details = details;\n\t}\n};\n//#endregion\n//#region src/utils/assert.ts\nconst isArray = (value, details) => {\n\tif (!Array.isArray(value)) throw new SerwistError(\"not-an-array\", details);\n};\nconst hasMethod = (object, expectedMethod, details) => {\n\tif (typeof object[expectedMethod] !== \"function\") {\n\t\tdetails.expectedMethod = expectedMethod;\n\t\tthrow new SerwistError(\"missing-a-method\", details);\n\t}\n};\nconst isType = (object, expectedType, details) => {\n\tif (typeof object !== expectedType) {\n\t\tdetails.expectedType = expectedType;\n\t\tthrow new SerwistError(\"incorrect-type\", details);\n\t}\n};\nconst isInstance = (object, expectedClass, details) => {\n\tif (!(object instanceof expectedClass)) {\n\t\tdetails.expectedClassName = expectedClass.name;\n\t\tthrow new SerwistError(\"incorrect-class\", details);\n\t}\n};\nconst isOneOf = (value, validValues, details) => {\n\tif (!validValues.includes(value)) {\n\t\tdetails.validValueDescription = `Valid values are ${JSON.stringify(validValues)}.`;\n\t\tthrow new SerwistError(\"invalid-value\", details);\n\t}\n};\nconst isArrayOfClass = (value, expectedClass, details) => {\n\tconst error = new SerwistError(\"not-array-of-class\", details);\n\tif (!Array.isArray(value)) throw error;\n\tfor (const item of value) if (!(item instanceof expectedClass)) throw error;\n};\nconst finalAssertExports = process.env.NODE_ENV === \"production\" ? null : {\n\thasMethod,\n\tisArray,\n\tisInstance,\n\tisOneOf,\n\tisType,\n\tisArrayOfClass\n};\n//#endregion\n//#region src/utils/getFriendlyURL.ts\nconst getFriendlyURL = (url) => {\n\treturn new URL(String(url), location.href).href.replace(new RegExp(`^${location.origin}`), \"\");\n};\n//#endregion\n//#region src/utils/logger.ts\n/**\n* The logger used by Serwist inside of both service workers and the window global scope.\n*\n* Note: This is forcibly `null` in production mode to reduce bundle size. Do check whether\n* you are currently in development mode (by using `process.env.NODE_ENV !== \"production\"`)\n* before using it.\n*/\nconst logger = process.env.NODE_ENV === \"production\" || typeof self === \"undefined\" ? null : (() => {\n\tif (!(\"__WB_DISABLE_DEV_LOGS\" in globalThis)) self.__WB_DISABLE_DEV_LOGS = false;\n\tlet inGroup = false;\n\tconst methodToColorMap = {\n\t\tdebug: \"#7f8c8d\",\n\t\tlog: \"#2ecc71\",\n\t\twarn: \"#f39c12\",\n\t\terror: \"#c0392b\",\n\t\tgroupCollapsed: \"#3498db\",\n\t\tgroupEnd: null\n\t};\n\tconst print = (method, args) => {\n\t\tif (self.__WB_DISABLE_DEV_LOGS) return;\n\t\tif (method === \"groupCollapsed\") {\n\t\t\tif (typeof navigator !== \"undefined\" && /^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n\t\t\t\tconsole[method](...args);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tconst styles = [\n\t\t\t`background: ${methodToColorMap[method]}`,\n\t\t\t\"border-radius: 0.5em\",\n\t\t\t\"color: white\",\n\t\t\t\"font-weight: bold\",\n\t\t\t\"padding: 2px 0.5em\"\n\t\t];\n\t\tconst logPrefix = inGroup ? [] : [\"%cserwist\", styles.join(\";\")];\n\t\tconsole[method](...logPrefix, ...args);\n\t\tif (method === \"groupCollapsed\") inGroup = true;\n\t\tif (method === \"groupEnd\") inGroup = false;\n\t};\n\treturn Object.keys(methodToColorMap).reduce((api, method) => {\n\t\tapi[method] = (...args) => {\n\t\t\tprint(method, args);\n\t\t};\n\t\treturn api;\n\t}, {});\n})();\n//#endregion\n//#region src/utils/timeout.ts\n/**\n* Returns a promise that resolves and the passed number of milliseconds.\n* This utility is an async/await-friendly version of `setTimeout`.\n*\n* @param ms\n* @returns\n* @private\n*/\nfunction timeout(ms) {\n\treturn new Promise((resolve) => setTimeout(resolve, ms));\n}\n//#endregion\n//#region src/models/quotaErrorCallbacks.ts\nconst quotaErrorCallbacks = /* @__PURE__ */ new Set();\n//#endregion\n//#region src/utils/cacheMatchIgnoreParams.ts\nfunction stripParams(fullURL, ignoreParams) {\n\tconst strippedURL = new URL(fullURL);\n\tfor (const param of ignoreParams) strippedURL.searchParams.delete(param);\n\treturn strippedURL.href;\n}\n/**\n* Matches an item in the cache, ignoring specific URL params. This is similar\n* to the `ignoreSearch` option, but it allows you to ignore just specific\n* params (while continuing to match on the others).\n*\n* @private\n* @param cache\n* @param request\n* @param matchOptions\n* @param ignoreParams\n* @returns\n*/\nasync function cacheMatchIgnoreParams(cache, request, ignoreParams, matchOptions) {\n\tconst strippedRequestURL = stripParams(request.url, ignoreParams);\n\tif (request.url === strippedRequestURL) return cache.match(request, matchOptions);\n\tconst keysOptions = {\n\t\t...matchOptions,\n\t\tignoreSearch: true\n\t};\n\tconst cacheKeys = await cache.keys(request, keysOptions);\n\tfor (const cacheKey of cacheKeys) if (strippedRequestURL === stripParams(cacheKey.url, ignoreParams)) return cache.match(cacheKey, matchOptions);\n}\n//#endregion\n//#region src/utils/Deferred.ts\n/**\n* The Deferred class composes Promises in a way that allows for them to be\n* resolved or rejected from outside the constructor. In most cases promises\n* should be used directly, but Deferreds can be necessary when the logic to\n* resolve a promise must be separate.\n*\n* @private\n*/\nvar Deferred = class {\n\tpromise;\n\tresolve;\n\treject;\n\t/**\n\t* Creates a promise and exposes its resolve and reject functions as methods.\n\t*/\n\tconstructor() {\n\t\tthis.promise = new Promise((resolve, reject) => {\n\t\t\tthis.resolve = resolve;\n\t\t\tthis.reject = reject;\n\t\t});\n\t}\n};\n//#endregion\n//#region src/utils/executeQuotaErrorCallbacks.ts\n/**\n* Runs all of the callback functions, one at a time sequentially, in the order\n* in which they were registered.\n*\n* @private\n*/\nconst executeQuotaErrorCallbacks = async () => {\n\tif (process.env.NODE_ENV !== \"production\") logger.log(`About to run ${quotaErrorCallbacks.size} callbacks to clean up caches.`);\n\tfor (const callback of quotaErrorCallbacks) {\n\t\tawait callback();\n\t\tif (process.env.NODE_ENV !== \"production\") logger.log(callback, \"is complete.\");\n\t}\n\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Finished running callbacks.\");\n};\n//#endregion\n//#region src/utils/deleteOutdatedCaches.ts\nconst SUBSTRING_TO_FIND = \"-precache-\";\n/**\n* Cleans up incompatible precaches that were created by older versions of\n* Serwist, by a service worker registered under the current scope.\n*\n* This is meant to be called as part of the `activate` event.\n*\n* This should be safe to use as long as you don't include `substringToFind`\n* (defaulting to `-precache-`) in your non-precache cache names.\n*\n* @param currentPrecacheName The cache name currently in use for\n* precaching. This cache won't be deleted.\n* @param substringToFind Cache names which include this\n* substring will be deleted (excluding `currentPrecacheName`).\n* @returns A list of all the cache names that were deleted.\n* @private\n*/\nconst deleteOutdatedCaches = async (currentPrecacheName, substringToFind = SUBSTRING_TO_FIND) => {\n\tconst cacheNamesToDelete = (await self.caches.keys()).filter((cacheName) => {\n\t\treturn cacheName.includes(substringToFind) && cacheName.includes(self.registration.scope) && cacheName !== currentPrecacheName;\n\t});\n\tawait Promise.all(cacheNamesToDelete.map((cacheName) => self.caches.delete(cacheName)));\n\treturn cacheNamesToDelete;\n};\n//#endregion\n//#region src/utils/cleanupOutdatedCaches.ts\n/**\n* Adds an `activate` event listener which will clean up incompatible\n* precaches that were created by older versions of Serwist.\n*/\nconst cleanupOutdatedCaches = (cacheName) => {\n\tself.addEventListener(\"activate\", (event) => {\n\t\tevent.waitUntil(deleteOutdatedCaches(cacheNames.getPrecacheName(cacheName)).then((cachesDeleted) => {\n\t\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\t\tif (cachesDeleted.length > 0) logger.log(\"The following out-of-date precaches were cleaned up automatically:\", cachesDeleted);\n\t\t\t}\n\t\t}));\n\t});\n};\n//#endregion\n//#region src/utils/clientsClaim.ts\n/**\n* Claims any currently available clients once the service worker\n* becomes active. This is normally used in conjunction with `skipWaiting()`.\n*/\nconst clientsClaim = () => {\n\tself.addEventListener(\"activate\", () => self.clients.claim());\n};\n//#endregion\n//#region src/utils/waitUntil.ts\n/**\n* A utility method that makes it easier to use `event.waitUntil` with\n* async functions and return the result.\n*\n* @param event\n* @param asyncFn\n* @returns\n* @private\n*/\nconst waitUntil = (event, asyncFn) => {\n\tconst returnPromise = asyncFn();\n\tevent.waitUntil(returnPromise);\n\treturn returnPromise;\n};\n//#endregion\nexport { Deferred as a, timeout as c, finalAssertExports as d, SerwistError as f, executeQuotaErrorCallbacks as i, logger as l, cacheNames as m, clientsClaim as n, cacheMatchIgnoreParams as o, canConstructResponseFromBodyStream as p, cleanupOutdatedCaches as r, quotaErrorCallbacks as s, waitUntil as t, getFriendlyURL as u };\n\n//# sourceMappingURL=waitUntil-BHDx3Rgo.js.map","import { c as timeout } from \"./waitUntil-BHDx3Rgo.js\";\n//#region src/utils/resultingClientExists.ts\nconst MAX_RETRY_TIME = 2e3;\n/**\n* Returns a promise that resolves to a window client matching the passed\n* `resultingClientId`. For browsers that don't support `resultingClientId`\n* or if waiting for the resulting client to apper takes too long, resolve to\n* `undefined`.\n*\n* @param resultingClientId\n* @returns\n* @private\n*/\nasync function resultingClientExists(resultingClientId) {\n\tif (!resultingClientId) return;\n\tlet existingWindows = await self.clients.matchAll({ type: \"window\" });\n\tconst existingWindowIds = new Set(existingWindows.map((w) => w.id));\n\tlet resultingWindow;\n\tconst startTime = performance.now();\n\twhile (performance.now() - startTime < MAX_RETRY_TIME) {\n\t\texistingWindows = await self.clients.matchAll({ type: \"window\" });\n\t\tresultingWindow = existingWindows.find((w) => {\n\t\t\tif (resultingClientId) return w.id === resultingClientId;\n\t\t\treturn !existingWindowIds.has(w.id);\n\t\t});\n\t\tif (resultingWindow) break;\n\t\tawait timeout(100);\n\t}\n\treturn resultingWindow;\n}\n//#endregion\n//#region src/utils/canConstructReadableStream.ts\nlet supportStatus;\n/**\n* A utility function that determines whether the current browser supports\n* constructing a [`ReadableStream`](https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream/ReadableStream)\n* object.\n*\n* @returns `true`, if the current browser can successfully construct a `ReadableStream`, `false` otherwise.\n*\n* @private\n*/\nfunction canConstructReadableStream() {\n\tif (supportStatus === void 0) try {\n\t\tnew ReadableStream({ start() {} });\n\t\tsupportStatus = true;\n\t} catch {\n\t\tsupportStatus = false;\n\t}\n\treturn supportStatus;\n}\n//#endregion\n//#region src/utils/dontWaitFor.ts\n/**\n* A helper function that prevents a promise from being flagged as unused.\n*\n* @private\n*/\nfunction dontWaitFor(promise) {\n\tpromise.then(() => {});\n}\n//#endregion\nexport { canConstructReadableStream as n, resultingClientExists as r, dontWaitFor as t };\n\n//# sourceMappingURL=index.internal-Dxj9Ni9X.js.map","import { a as Deferred, c as timeout, d as finalAssertExports, f as SerwistError, i as executeQuotaErrorCallbacks, l as logger, m as cacheNames, n as clientsClaim, o as cacheMatchIgnoreParams, p as canConstructResponseFromBodyStream, r as cleanupOutdatedCaches, t as waitUntil, u as getFriendlyURL } from \"./chunks/waitUntil-BHDx3Rgo.js\";\nimport { n as canConstructReadableStream, r as resultingClientExists, t as dontWaitFor } from \"./chunks/index.internal-Dxj9Ni9X.js\";\nexport { Deferred, SerwistError, finalAssertExports as assert, cacheMatchIgnoreParams, canConstructReadableStream, canConstructResponseFromBodyStream, cleanupOutdatedCaches, clientsClaim, dontWaitFor, executeQuotaErrorCallbacks, getFriendlyURL, logger, cacheNames as privateCacheNames, resultingClientExists, timeout, waitUntil };\n","import { t as isCurrentPageOutOfScope } from \"./chunks/isCurrentPageOutOfScope-vi3IAsNY.js\";\nimport { Deferred, logger } from \"serwist/internal\";\n//#region src/messageSW.ts\n/**\n* Sends a data object to a service worker via `postMessage` and resolves with\n* a response (if any).\n*\n* A response can be sent by calling `event.ports[0].postMessage(...)`, which will\n* resolve the promise returned by `messageSW()`. If no response is sent, the promise\n* will never resolve.\n*\n* @param sw The service worker to send the message to.\n* @param data An object to send to the service worker.\n* @returns\n*/\nconst messageSW = (sw, data) => {\n\treturn new Promise((resolve) => {\n\t\tconst messageChannel = new MessageChannel();\n\t\tmessageChannel.port1.onmessage = (event) => {\n\t\t\tresolve(event.data);\n\t\t};\n\t\tsw.postMessage(data, [messageChannel.port2]);\n\t});\n};\n//#endregion\n//#region src/utils/SerwistEvent.ts\n/**\n* A minimal `Event` subclass shim.\n* This doesn't *actually* subclass `Event` because not all browsers support\n* constructable `EventTarget`, and using a real `Event` will error.\n* @private\n*/\nvar SerwistEvent = class {\n\ttarget;\n\tsw;\n\toriginalEvent;\n\tisExternal;\n\tconstructor(type, props) {\n\t\tthis.type = type;\n\t\tObject.assign(this, props);\n\t}\n};\n//#endregion\n//#region src/utils/SerwistEventTarget.ts\n/**\n* A minimal `EventTarget` shim.\n* This is necessary because not all browsers support constructable\n* `EventTarget`, so using a real `EventTarget` will error.\n* @private\n*/\nvar SerwistEventTarget = class {\n\t_eventListenerRegistry = /* @__PURE__ */ new Map();\n\t/**\n\t* @param type\n\t* @param listener\n\t* @private\n\t*/\n\taddEventListener(type, listener) {\n\t\tthis._getEventListenersByType(type).add(listener);\n\t}\n\t/**\n\t* @param type\n\t* @param listener\n\t* @private\n\t*/\n\tremoveEventListener(type, listener) {\n\t\tthis._getEventListenersByType(type).delete(listener);\n\t}\n\t/**\n\t* @param event\n\t* @private\n\t*/\n\tdispatchEvent(event) {\n\t\tevent.target = this;\n\t\tconst listeners = this._getEventListenersByType(event.type);\n\t\tfor (const listener of listeners) listener(event);\n\t}\n\t/**\n\t* Returns a Set of listeners associated with the passed event type.\n\t* If no handlers have been registered, an empty Set is returned.\n\t*\n\t* @param type The event type.\n\t* @returns An array of handler functions.\n\t* @private\n\t*/\n\t_getEventListenersByType(type) {\n\t\tif (!this._eventListenerRegistry.has(type)) this._eventListenerRegistry.set(type, /* @__PURE__ */ new Set());\n\t\treturn this._eventListenerRegistry.get(type);\n\t}\n};\n//#endregion\n//#region src/utils/urlsMatch.ts\n/**\n* Returns true if two URLs have the same `.href` property. The URLs can be\n* relative, and if they are the current location href is used to resolve URLs.\n*\n* @private\n* @param url1\n* @param url2\n* @returns\n*/\nfunction urlsMatch(url1, url2) {\n\tconst { href } = location;\n\treturn new URL(url1, href).href === new URL(url2, href).href;\n}\n//#endregion\n//#region src/Serwist.ts\nconst WAITING_TIMEOUT_DURATION = 200;\nconst REGISTRATION_TIMEOUT_DURATION = 6e4;\nconst SKIP_WAITING_MESSAGE = { type: \"SKIP_WAITING\" };\n/**\n* A class to aid in handling service worker registration, updates, and\n* reacting to service worker lifecycle events.\n*\n* @fires `@serwist/window.Serwist.message`\n* @fires `@serwist/window.Serwist.installed`\n* @fires `@serwist/window.Serwist.waiting`\n* @fires `@serwist/window.Serwist.controlling`\n* @fires `@serwist/window.Serwist.activated`\n* @fires `@serwist/window.Serwist.redundant`\n*/\nvar Serwist = class extends SerwistEventTarget {\n\t_scriptURL;\n\t_registerOptions = {};\n\t_updateFoundCount = 0;\n\t_swDeferred = new Deferred();\n\t_activeDeferred = new Deferred();\n\t_controllingDeferred = new Deferred();\n\t_registrationTime = 0;\n\t_isUpdate;\n\t_compatibleControllingSW;\n\t_registration;\n\t_sw;\n\t_ownSWs = /* @__PURE__ */ new Set();\n\t_externalSW;\n\t_waitingTimeout;\n\t/**\n\t* Creates a new Serwist instance with a script URL and service worker\n\t* options. The script URL and options are the same as those used when\n\t* calling [navigator.serviceWorker.register(scriptURL, options)](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register).\n\t*\n\t* @param scriptURL The service worker script associated with this instance. Using a\n\t* [`TrustedScriptURL`](https://developer.mozilla.org/en-US/docs/Web/API/TrustedScriptURL) is supported.\n\t* @param registerOptions The service worker options associated with this instance.\n\t*/\n\tconstructor(scriptURL, registerOptions = {}) {\n\t\tsuper();\n\t\tthis._scriptURL = scriptURL;\n\t\tthis._registerOptions = registerOptions;\n\t\tnavigator.serviceWorker.addEventListener(\"message\", this._onMessage);\n\t}\n\t/**\n\t* Registers a service worker for this instances script URL and service\n\t* worker options. By default this method delays registration until after\n\t* the window has loaded.\n\t*\n\t* @param options\n\t*/\n\tasync register({ immediate = false } = {}) {\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tif (this._registrationTime) {\n\t\t\t\tlogger.error(\"Cannot re-register a Serwist instance after it has been registered. Create a new instance instead.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!immediate && document.readyState !== \"complete\") await new Promise((res) => window.addEventListener(\"load\", res));\n\t\tthis._isUpdate = Boolean(navigator.serviceWorker.controller);\n\t\tthis._compatibleControllingSW = this._getControllingSWIfCompatible();\n\t\tthis._registration = await this._registerScript();\n\t\tif (this._compatibleControllingSW) {\n\t\t\tthis._sw = this._compatibleControllingSW;\n\t\t\tthis._activeDeferred.resolve(this._compatibleControllingSW);\n\t\t\tthis._controllingDeferred.resolve(this._compatibleControllingSW);\n\t\t\tthis._compatibleControllingSW.addEventListener(\"statechange\", this._onStateChange, { once: true });\n\t\t}\n\t\tconst waitingSW = this._registration.waiting;\n\t\tif (waitingSW && urlsMatch(waitingSW.scriptURL, this._scriptURL.toString())) {\n\t\t\tthis._sw = waitingSW;\n\t\t\tPromise.resolve().then(() => {\n\t\t\t\tthis.dispatchEvent(new SerwistEvent(\"waiting\", {\n\t\t\t\t\tsw: waitingSW,\n\t\t\t\t\twasWaitingBeforeRegister: true\n\t\t\t\t}));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") logger.warn(\"A service worker was already waiting to activate before this script was registered...\");\n\t\t\t});\n\t\t}\n\t\tif (this._sw) {\n\t\t\tthis._swDeferred.resolve(this._sw);\n\t\t\tthis._ownSWs.add(this._sw);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") {\n\t\t\tlogger.log(\"Successfully registered service worker.\", this._scriptURL.toString());\n\t\t\tif (navigator.serviceWorker.controller) if (this._compatibleControllingSW) logger.debug(\"A service worker with the same script URL is already controlling this page.\");\n\t\t\telse logger.debug(\"A service worker with a different script URL is currently controlling the page. The browser is now fetching the new script now...\");\n\t\t\tif (isCurrentPageOutOfScope(this._registerOptions.scope || this._scriptURL.toString())) logger.warn(\"The current page is not in scope for the registered service worker. Was this a mistake?\");\n\t\t}\n\t\tthis._registration.addEventListener(\"updatefound\", this._onUpdateFound);\n\t\tnavigator.serviceWorker.addEventListener(\"controllerchange\", this._onControllerChange);\n\t\treturn this._registration;\n\t}\n\t/**\n\t* Checks for updates of the registered service worker.\n\t*/\n\tasync update() {\n\t\tif (!this._registration) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(\"Cannot update a Serwist instance without being registered. Register the Serwist instance first.\");\n\t\t\treturn;\n\t\t}\n\t\tawait this._registration.update();\n\t}\n\t/**\n\t* Resolves to the service worker registered by this instance as soon as it\n\t* is active. If a service worker was already controlling at registration\n\t* time then it will resolve to that if the script URLs (and optionally\n\t* script versions) match, otherwise it will wait until an update is found\n\t* and activates.\n\t*\n\t* @returns\n\t*/\n\tget active() {\n\t\treturn this._activeDeferred.promise;\n\t}\n\t/**\n\t* Resolves to the service worker registered by this instance as soon as it\n\t* is controlling the page. If a service worker was already controlling at\n\t* registration time then it will resolve to that if the script URLs (and\n\t* optionally script versions) match, otherwise it will wait until an update\n\t* is found and starts controlling the page.\n\t* Note: the first time a service worker is installed it will active but\n\t* not start controlling the page unless `clients.claim()` is called in the\n\t* service worker.\n\t*\n\t* @returns\n\t*/\n\tget controlling() {\n\t\treturn this._controllingDeferred.promise;\n\t}\n\t/**\n\t* Resolves with a reference to a service worker that matches the script URL\n\t* of this instance, as soon as it's available.\n\t*\n\t* If, at registration time, there's already an active or waiting service\n\t* worker with a matching script URL, it will be used (with the waiting\n\t* service worker taking precedence over the active service worker if both\n\t* match, since the waiting service worker would have been registered more\n\t* recently).\n\t* If there's no matching active or waiting service worker at registration\n\t* time then the promise will not resolve until an update is found and starts\n\t* installing, at which point the installing service worker is used.\n\t*\n\t* @returns\n\t*/\n\tgetSW() {\n\t\treturn this._sw !== void 0 ? Promise.resolve(this._sw) : this._swDeferred.promise;\n\t}\n\t/**\n\t* Sends the passed data object to the service worker registered by this\n\t* instance (via `getSW`) and resolves with a response (if any).\n\t*\n\t* A response can be sent by calling `event.ports[0].postMessage(...)`, which will\n\t* resolve the promise returned by `messageSW()`. If no response is sent, the promise\n\t* will never resolve.\n\t*\n\t* @param data An object to send to the service worker\n\t* @returns\n\t*/\n\tasync messageSW(data) {\n\t\treturn messageSW(await this.getSW(), data);\n\t}\n\t/**\n\t* Sends a `{ type: \"SKIP_WAITING\" }` message to the service worker that is\n\t* currently waiting and associated with the current registration.\n\t*\n\t* If there is no current registration, or no service worker is waiting,\n\t* calling this will have no effect.\n\t*/\n\tmessageSkipWaiting() {\n\t\tif (this._registration?.waiting) messageSW(this._registration.waiting, SKIP_WAITING_MESSAGE);\n\t}\n\t/**\n\t* Checks for a service worker already controlling the page and returns\n\t* it if its script URL matches.\n\t*\n\t* @private\n\t* @returns\n\t*/\n\t_getControllingSWIfCompatible() {\n\t\tconst controller = navigator.serviceWorker.controller;\n\t\tif (controller && urlsMatch(controller.scriptURL, this._scriptURL.toString())) return controller;\n\t}\n\t/**\n\t* Registers a service worker for this instances script URL and register\n\t* options and tracks the time registration was complete.\n\t*\n\t* @private\n\t*/\n\tasync _registerScript() {\n\t\ttry {\n\t\t\tconst reg = await navigator.serviceWorker.register(this._scriptURL, this._registerOptions);\n\t\t\tthis._registrationTime = performance.now();\n\t\t\treturn reg;\n\t\t} catch (error) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.error(error);\n\t\t\tthrow error;\n\t\t}\n\t}\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onUpdateFound = (originalEvent) => {\n\t\tconst registration = this._registration;\n\t\tconst installingSW = registration.installing;\n\t\tconst updateLikelyTriggeredExternally = this._updateFoundCount > 0 || !urlsMatch(installingSW.scriptURL, this._scriptURL.toString()) || performance.now() > this._registrationTime + REGISTRATION_TIMEOUT_DURATION;\n\t\tif (updateLikelyTriggeredExternally) {\n\t\t\tthis._externalSW = installingSW;\n\t\t\tregistration.removeEventListener(\"updatefound\", this._onUpdateFound);\n\t\t} else {\n\t\t\tthis._sw = installingSW;\n\t\t\tthis._ownSWs.add(installingSW);\n\t\t\tthis._swDeferred.resolve(installingSW);\n\t\t\tif (process.env.NODE_ENV !== \"production\") if (this._isUpdate) logger.log(\"Updated service worker found. Installing now...\");\n\t\t\telse logger.log(\"Service worker is installing...\");\n\t\t}\n\t\tthis.dispatchEvent(new SerwistEvent(\"installing\", {\n\t\t\tsw: installingSW,\n\t\t\toriginalEvent,\n\t\t\tisExternal: updateLikelyTriggeredExternally,\n\t\t\tisUpdate: this._isUpdate\n\t\t}));\n\t\t++this._updateFoundCount;\n\t\tinstallingSW.addEventListener(\"statechange\", this._onStateChange);\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onStateChange = (originalEvent) => {\n\t\tconst registration = this._registration;\n\t\tconst sw = originalEvent.target;\n\t\tconst { state } = sw;\n\t\tconst isExternal = sw === this._externalSW;\n\t\tconst eventProps = {\n\t\t\tsw,\n\t\t\tisExternal,\n\t\t\toriginalEvent\n\t\t};\n\t\tif (!isExternal && this._isUpdate) eventProps.isUpdate = true;\n\t\tthis.dispatchEvent(new SerwistEvent(state, eventProps));\n\t\tif (state === \"installed\") this._waitingTimeout = self.setTimeout(() => {\n\t\t\tif (state === \"installed\" && registration.waiting === sw) {\n\t\t\t\tthis.dispatchEvent(new SerwistEvent(\"waiting\", eventProps));\n\t\t\t\tif (process.env.NODE_ENV !== \"production\") if (isExternal) logger.warn(\"An external service worker has installed but is waiting for this client to close before activating...\");\n\t\t\t\telse logger.warn(\"The service worker has installed but is waiting for existing clients to close before activating...\");\n\t\t\t}\n\t\t}, WAITING_TIMEOUT_DURATION);\n\t\telse if (state === \"activating\") {\n\t\t\tclearTimeout(this._waitingTimeout);\n\t\t\tif (!isExternal) this._activeDeferred.resolve(sw);\n\t\t}\n\t\tif (process.env.NODE_ENV !== \"production\") switch (state) {\n\t\t\tcase \"installed\":\n\t\t\t\tif (isExternal) logger.warn(\"An external service worker has installed. You may want to suggest users reload this page.\");\n\t\t\t\telse logger.log(\"Registered service worker installed.\");\n\t\t\t\tbreak;\n\t\t\tcase \"activated\":\n\t\t\t\tif (isExternal) logger.warn(\"An external service worker has activated.\");\n\t\t\t\telse {\n\t\t\t\t\tlogger.log(\"Registered service worker activated.\");\n\t\t\t\t\tif (sw !== navigator.serviceWorker.controller) logger.warn(\"The registered service worker is active but not yet controlling the page. Reload or run `clients.claim()` in the service worker.\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"redundant\":\n\t\t\t\tif (sw === this._compatibleControllingSW) logger.log(\"Previously controlling service worker now redundant!\");\n\t\t\t\telse if (!isExternal) logger.log(\"Registered service worker now redundant!\");\n\t\t\t\tbreak;\n\t\t}\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onControllerChange = (originalEvent) => {\n\t\tconst sw = this._sw;\n\t\tconst isExternal = sw !== navigator.serviceWorker.controller;\n\t\tthis.dispatchEvent(new SerwistEvent(\"controlling\", {\n\t\t\tisExternal,\n\t\t\toriginalEvent,\n\t\t\tsw,\n\t\t\tisUpdate: this._isUpdate\n\t\t}));\n\t\tif (!isExternal) {\n\t\t\tif (process.env.NODE_ENV !== \"production\") logger.log(\"Registered service worker now controlling this page.\");\n\t\t\tthis._controllingDeferred.resolve(sw);\n\t\t}\n\t};\n\t/**\n\t* @private\n\t* @param originalEvent\n\t*/\n\t_onMessage = async (originalEvent) => {\n\t\tconst { data, ports, source } = originalEvent;\n\t\tawait this.getSW();\n\t\tif (this._ownSWs.has(source)) this.dispatchEvent(new SerwistEvent(\"message\", {\n\t\t\tdata,\n\t\t\toriginalEvent,\n\t\t\tports,\n\t\t\tsw: source\n\t\t}));\n\t};\n};\n/**\n* The `message` event is dispatched any time a `postMessage` is received.\n*\n* @event workbox-window.Workbox#message\n* @type {SerwistEvent}\n* @property {*} data The `data` property from the original `message` event.\n* @property {Event} originalEvent The original [`message`]{@link https://developer.mozilla.org/en-US/docs/Web/API/MessageEvent}\n* event.\n* @property {string} type `message`.\n* @property {MessagePort[]} ports The `ports` value from `originalEvent`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `installed` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n* changes to `installed`.\n*\n* Then can happen either the very first time a service worker is installed,\n* or after an update to the current service worker is found. In the case\n* of an update being found, the event's `isUpdate` property will be `true`.\n*\n* @event workbox-window.Workbox#installed\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `installed`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `waiting` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n* changes to `installed` and then doesn't immediately change to `activating`.\n* It may also be dispatched if a service worker with the same\n* [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n* was already waiting when the {@link workbox-window.Workbox#register}\n* method was called.\n*\n* @event workbox-window.Workbox#waiting\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event|undefined} originalEvent The original\n* [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event, or `undefined` in the case where the service worker was waiting\n* to before `.register()` was called.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {boolean|undefined} wasWaitingBeforeRegister True if a service worker with\n* a matching `scriptURL` was already waiting when this `Workbox`\n* instance called `register()`.\n* @property {string} type `waiting`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `controlling` event is dispatched if a\n* [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n* fires on the service worker [container]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer}\n* and the [`scriptURL`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/scriptURL}\n* of the new [controller]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/controller}\n* matches the `scriptURL` of the `Workbox` instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}.\n*\n* @event workbox-window.Workbox#controlling\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`controllerchange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/oncontrollerchange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this service worker was registered.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `controlling`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `activated` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* {@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw|registered service worker}\n* changes to `activated`.\n*\n* @event workbox-window.Workbox#activated\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {boolean|undefined} isExternal True if this event is associated\n* with an [external service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-window#when_an_unexpected_version_of_the_service_worker_is_found}.\n* @property {string} type `activated`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `redundant` event is dispatched if the state of a\n* {@link workbox-window.Workbox} instance's\n* [registered service worker]{@link https://developers.google.com/web/tools/workbox/modules/workbox-precaching#def-registered-sw}\n* changes to `redundant`.\n*\n* @event workbox-window.Workbox#redundant\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {string} type `redundant`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n/**\n* The `installing` event is dispatched if the service worker\n* finds the new version and starts installing.\n*\n* @event workbox-window.Workbox#installing\n* @type {SerwistEvent}\n* @property {ServiceWorker} sw The installing service worker instance.\n* @property {Event} originalEvent The original [`statechange`]{@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker/onstatechange}\n* event.\n* @property {boolean|undefined} isUpdate True if a service worker was already\n* controlling when this `Workbox` instance called `register()`.\n* @property {string} type `installing`.\n* @property {Workbox} target The `Workbox` instance.\n*/\n//#endregion\nexport { Serwist, SerwistEvent, messageSW };\n\n//# sourceMappingURL=index.mjs.map","//#region src/utils/isCurrentPageOutOfScope.ts\nconst isCurrentPageOutOfScope = (scope) => {\n\tconst scopeURL = new URL(scope, document.baseURI);\n\tconst scopeURLBasePath = new URL(\"./\", scopeURL.href).pathname;\n\treturn !location.pathname.startsWith(scopeURLBasePath);\n};\n//#endregion\nexport { isCurrentPageOutOfScope as t };\n\n//# sourceMappingURL=isCurrentPageOutOfScope-vi3IAsNY.js.map","import { Serwist } from \"@serwist/window\";\nimport { isCurrentPageOutOfScope } from \"@serwist/window/internal\";\n//#region src/sw-entry.ts\nif (typeof window !== \"undefined\" && \"serviceWorker\" in navigator && typeof caches !== \"undefined\") {\n\tconst scope = self.__SERWIST_SW_ENTRY.scope;\n\tlet swEntryWorker;\n\tif (self.__SERWIST_SW_ENTRY.swEntryWorker) swEntryWorker = new Worker(self.__SERWIST_SW_ENTRY.swEntryWorker);\n\twindow.serwist = new Serwist(window.location.origin + self.__SERWIST_SW_ENTRY.sw, { scope });\n\tif (self.__SERWIST_SW_ENTRY.register && !isCurrentPageOutOfScope(scope)) window.serwist.register();\n\tif (self.__SERWIST_SW_ENTRY.cacheOnNavigation) {\n\t\tconst cacheOnNavigation = async (url) => {\n\t\t\tif (!window.navigator.onLine || !url) return;\n\t\t\tswEntryWorker?.postMessage({\n\t\t\t\ttype: \"__FRONTEND_NAV_CACHE__\",\n\t\t\t\turl\n\t\t\t});\n\t\t};\n\t\tconst pushState = history.pushState;\n\t\thistory.pushState = (...args) => {\n\t\t\tpushState.apply(history, args);\n\t\t\tcacheOnNavigation(args[2]);\n\t\t};\n\t\tconst replaceState = history.replaceState;\n\t\thistory.replaceState = (...args) => {\n\t\t\treplaceState.apply(history, args);\n\t\t\tcacheOnNavigation(args[2]);\n\t\t};\n\t\twindow.addEventListener(\"online\", () => {\n\t\t\tcacheOnNavigation(window.location.pathname);\n\t\t});\n\t}\n\tif (self.__SERWIST_SW_ENTRY.reloadOnOnline) window.addEventListener(\"online\", () => location.reload());\n}\n//#endregion\nexport {};\n\n//# sourceMappingURL=sw-entry.mjs.map","/* (ignored) */","(()=>{\"use strict\";if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var e={};(()=>{var n=e;Object.defineProperty(n,\"__esModule\",{value:true});n.pathToRegexp=n.tokensToRegexp=n.regexpToFunction=n.match=n.tokensToFunction=n.compile=n.parse=void 0;function lexer(e){var n=[];var r=0;while(r<e.length){var t=e[r];if(t===\"*\"||t===\"+\"||t===\"?\"){n.push({type:\"MODIFIER\",index:r,value:e[r++]});continue}if(t===\"\\\\\"){n.push({type:\"ESCAPED_CHAR\",index:r++,value:e[r++]});continue}if(t===\"{\"){n.push({type:\"OPEN\",index:r,value:e[r++]});continue}if(t===\"}\"){n.push({type:\"CLOSE\",index:r,value:e[r++]});continue}if(t===\":\"){var a=\"\";var i=r+1;while(i<e.length){var o=e.charCodeAt(i);if(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122||o===95){a+=e[i++];continue}break}if(!a)throw new TypeError(\"Missing parameter name at \".concat(r));n.push({type:\"NAME\",index:r,value:a});r=i;continue}if(t===\"(\"){var c=1;var f=\"\";var i=r+1;if(e[i]===\"?\"){throw new TypeError('Pattern cannot start with \"?\" at '.concat(i))}while(i<e.length){if(e[i]===\"\\\\\"){f+=e[i++]+e[i++];continue}if(e[i]===\")\"){c--;if(c===0){i++;break}}else if(e[i]===\"(\"){c++;if(e[i+1]!==\"?\"){throw new TypeError(\"Capturing groups are not allowed at \".concat(i))}}f+=e[i++]}if(c)throw new TypeError(\"Unbalanced pattern at \".concat(r));if(!f)throw new TypeError(\"Missing pattern at \".concat(r));n.push({type:\"PATTERN\",index:r,value:f});r=i;continue}n.push({type:\"CHAR\",index:r,value:e[r++]})}n.push({type:\"END\",index:r,value:\"\"});return n}function parse(e,n){if(n===void 0){n={}}var r=lexer(e);var t=n.prefixes,a=t===void 0?\"./\":t,i=n.delimiter,o=i===void 0?\"/#?\":i;var c=[];var f=0;var u=0;var p=\"\";var tryConsume=function(e){if(u<r.length&&r[u].type===e)return r[u++].value};var mustConsume=function(e){var n=tryConsume(e);if(n!==undefined)return n;var t=r[u],a=t.type,i=t.index;throw new TypeError(\"Unexpected \".concat(a,\" at \").concat(i,\", expected \").concat(e))};var consumeText=function(){var e=\"\";var n;while(n=tryConsume(\"CHAR\")||tryConsume(\"ESCAPED_CHAR\")){e+=n}return e};var isSafe=function(e){for(var n=0,r=o;n<r.length;n++){var t=r[n];if(e.indexOf(t)>-1)return true}return false};var safePattern=function(e){var n=c[c.length-1];var r=e||(n&&typeof n===\"string\"?n:\"\");if(n&&!r){throw new TypeError('Must have text between two parameters, missing text after \"'.concat(n.name,'\"'))}if(!r||isSafe(r))return\"[^\".concat(escapeString(o),\"]+?\");return\"(?:(?!\".concat(escapeString(r),\")[^\").concat(escapeString(o),\"])+?\")};while(u<r.length){var v=tryConsume(\"CHAR\");var s=tryConsume(\"NAME\");var d=tryConsume(\"PATTERN\");if(s||d){var g=v||\"\";if(a.indexOf(g)===-1){p+=g;g=\"\"}if(p){c.push(p);p=\"\"}c.push({name:s||f++,prefix:g,suffix:\"\",pattern:d||safePattern(g),modifier:tryConsume(\"MODIFIER\")||\"\"});continue}var x=v||tryConsume(\"ESCAPED_CHAR\");if(x){p+=x;continue}if(p){c.push(p);p=\"\"}var h=tryConsume(\"OPEN\");if(h){var g=consumeText();var l=tryConsume(\"NAME\")||\"\";var m=tryConsume(\"PATTERN\")||\"\";var T=consumeText();mustConsume(\"CLOSE\");c.push({name:l||(m?f++:\"\"),pattern:l&&!m?safePattern(g):m,prefix:g,suffix:T,modifier:tryConsume(\"MODIFIER\")||\"\"});continue}mustConsume(\"END\")}return c}n.parse=parse;function compile(e,n){return tokensToFunction(parse(e,n),n)}n.compile=compile;function tokensToFunction(e,n){if(n===void 0){n={}}var r=flags(n);var t=n.encode,a=t===void 0?function(e){return e}:t,i=n.validate,o=i===void 0?true:i;var c=e.map((function(e){if(typeof e===\"object\"){return new RegExp(\"^(?:\".concat(e.pattern,\")$\"),r)}}));return function(n){var r=\"\";for(var t=0;t<e.length;t++){var i=e[t];if(typeof i===\"string\"){r+=i;continue}var f=n?n[i.name]:undefined;var u=i.modifier===\"?\"||i.modifier===\"*\";var p=i.modifier===\"*\"||i.modifier===\"+\";if(Array.isArray(f)){if(!p){throw new TypeError('Expected \"'.concat(i.name,'\" to not repeat, but got an array'))}if(f.length===0){if(u)continue;throw new TypeError('Expected \"'.concat(i.name,'\" to not be empty'))}for(var v=0;v<f.length;v++){var s=a(f[v],i);if(o&&!c[t].test(s)){throw new TypeError('Expected all \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix}continue}if(typeof f===\"string\"||typeof f===\"number\"){var s=a(String(f),i);if(o&&!c[t].test(s)){throw new TypeError('Expected \"'.concat(i.name,'\" to match \"').concat(i.pattern,'\", but got \"').concat(s,'\"'))}r+=i.prefix+s+i.suffix;continue}if(u)continue;var d=p?\"an array\":\"a string\";throw new TypeError('Expected \"'.concat(i.name,'\" to be ').concat(d))}return r}}n.tokensToFunction=tokensToFunction;function match(e,n){var r=[];var t=pathToRegexp(e,r,n);return regexpToFunction(t,r,n)}n.match=match;function regexpToFunction(e,n,r){if(r===void 0){r={}}var t=r.decode,a=t===void 0?function(e){return e}:t;return function(r){var t=e.exec(r);if(!t)return false;var i=t[0],o=t.index;var c=Object.create(null);var _loop_1=function(e){if(t[e]===undefined)return\"continue\";var r=n[e-1];if(r.modifier===\"*\"||r.modifier===\"+\"){c[r.name]=t[e].split(r.prefix+r.suffix).map((function(e){return a(e,r)}))}else{c[r.name]=a(t[e],r)}};for(var f=1;f<t.length;f++){_loop_1(f)}return{path:i,index:o,params:c}}}n.regexpToFunction=regexpToFunction;function escapeString(e){return e.replace(/([.+*?=^!:${}()[\\]|/\\\\])/g,\"\\\\$1\")}function flags(e){return e&&e.sensitive?\"\":\"i\"}function regexpToRegexp(e,n){if(!n)return e;var r=/\\((?:\\?<(.*?)>)?(?!\\?)/g;var t=0;var a=r.exec(e.source);while(a){n.push({name:a[1]||t++,prefix:\"\",suffix:\"\",modifier:\"\",pattern:\"\"});a=r.exec(e.source)}return e}function arrayToRegexp(e,n,r){var t=e.map((function(e){return pathToRegexp(e,n,r).source}));return new RegExp(\"(?:\".concat(t.join(\"|\"),\")\"),flags(r))}function stringToRegexp(e,n,r){return tokensToRegexp(parse(e,r),n,r)}function tokensToRegexp(e,n,r){if(r===void 0){r={}}var t=r.strict,a=t===void 0?false:t,i=r.start,o=i===void 0?true:i,c=r.end,f=c===void 0?true:c,u=r.encode,p=u===void 0?function(e){return e}:u,v=r.delimiter,s=v===void 0?\"/#?\":v,d=r.endsWith,g=d===void 0?\"\":d;var x=\"[\".concat(escapeString(g),\"]|$\");var h=\"[\".concat(escapeString(s),\"]\");var l=o?\"^\":\"\";for(var m=0,T=e;m<T.length;m++){var E=T[m];if(typeof E===\"string\"){l+=escapeString(p(E))}else{var w=escapeString(p(E.prefix));var y=escapeString(p(E.suffix));if(E.pattern){if(n)n.push(E);if(w||y){if(E.modifier===\"+\"||E.modifier===\"*\"){var R=E.modifier===\"*\"?\"?\":\"\";l+=\"(?:\".concat(w,\"((?:\").concat(E.pattern,\")(?:\").concat(y).concat(w,\"(?:\").concat(E.pattern,\"))*)\").concat(y,\")\").concat(R)}else{l+=\"(?:\".concat(w,\"(\").concat(E.pattern,\")\").concat(y,\")\").concat(E.modifier)}}else{if(E.modifier===\"+\"||E.modifier===\"*\"){throw new TypeError('Can not repeat \"'.concat(E.name,'\" without a prefix and suffix'))}l+=\"(\".concat(E.pattern,\")\").concat(E.modifier)}}else{l+=\"(?:\".concat(w).concat(y,\")\").concat(E.modifier)}}}if(f){if(!a)l+=\"\".concat(h,\"?\");l+=!r.endsWith?\"$\":\"(?=\".concat(x,\")\")}else{var A=e[e.length-1];var _=typeof A===\"string\"?h.indexOf(A[A.length-1])>-1:A===undefined;if(!a){l+=\"(?:\".concat(h,\"(?=\").concat(x,\"))?\")}if(!_){l+=\"(?=\".concat(h,\"|\").concat(x,\")\")}}return new RegExp(l,flags(r))}n.tokensToRegexp=tokensToRegexp;function pathToRegexp(e,n,r){if(e instanceof RegExp)return regexpToRegexp(e,n);if(Array.isArray(e))return arrayToRegexp(e,n,r);return stringToRegexp(e,n,r)}n.pathToRegexp=pathToRegexp})();module.exports=e})();","export const UNDERSCORE_NOT_FOUND_ROUTE = '/_not-found'\nexport const UNDERSCORE_NOT_FOUND_ROUTE_ENTRY = `${UNDERSCORE_NOT_FOUND_ROUTE}/page`\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE = '/_global-error'\nexport const UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY = `${UNDERSCORE_GLOBAL_ERROR_ROUTE}/page`\n","export class InvariantError extends Error {\n constructor(message: string, options?: ErrorOptions) {\n super(\n `Invariant: ${message.endsWith('.') ? message : message + '.'} This is a bug in Next.js.`,\n options\n )\n this.name = 'InvariantError'\n }\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","import type React from 'react'\nimport { Children, useEffect, useLayoutEffect, type JSX } from 'react'\n\ntype State = JSX.Element[] | undefined\n\nexport type SideEffectProps = {\n reduceComponentsToState: (components: Array<React.ReactElement<any>>) => State\n handleStateChange?: (state: State) => void\n headManager: any\n children: React.ReactNode\n}\n\nconst isServer = typeof window === 'undefined'\nconst useClientOnlyLayoutEffect = isServer ? () => {} : useLayoutEffect\nconst useClientOnlyEffect = isServer ? () => {} : useEffect\n\nexport default function SideEffect(props: SideEffectProps) {\n const { headManager, reduceComponentsToState } = props\n\n function emitChange() {\n if (headManager && headManager.mountedInstances) {\n const headElements = Children.toArray(\n Array.from(headManager.mountedInstances as Set<React.ReactNode>).filter(\n Boolean\n )\n ) as React.ReactElement[]\n headManager.updateHead(reduceComponentsToState(headElements))\n }\n }\n\n if (isServer) {\n headManager?.mountedInstances?.add(props.children)\n emitChange()\n }\n\n useClientOnlyLayoutEffect(() => {\n headManager?.mountedInstances?.add(props.children)\n return () => {\n headManager?.mountedInstances?.delete(props.children)\n }\n })\n\n // We need to call `updateHead` method whenever the `SideEffect` is trigger in all\n // life-cycles: mount, update, unmount. However, if there are multiple `SideEffect`s\n // being rendered, we only trigger the method from the last one.\n // This is ensured by keeping the last unflushed `updateHead` in the `_pendingUpdate`\n // singleton in the layout effect pass, and actually trigger it in the effect pass.\n useClientOnlyLayoutEffect(() => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n return () => {\n if (headManager) {\n headManager._pendingUpdate = emitChange\n }\n }\n })\n\n useClientOnlyEffect(() => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n return () => {\n if (headManager && headManager._pendingUpdate) {\n headManager._pendingUpdate()\n headManager._pendingUpdate = null\n }\n }\n })\n\n return null\n}\n"],"names":["interceptionPrefixFromParamType","paramType","safeCompile","safePathToRegexp","safeRegexpToFunction","safeRouteMatcher","route","keys","options","pathToRegexp","needsNormalization","hasAdjacentParameterIssues","routeToUse","normalizeAdjacentParameters","error","normalizedRoute","retryError","compiler","compile","params","stripNormalizedSeparators","regexp","originalMatcher","regexpToFunction","pathname","result","stripParameterSeparators","matcherFn","MODERN_BROWSERSLIST_TARGET","module","exports","getSortedRouteObjects","getSortedRoutes","isDynamicRoute","emitter","hydrate","initialize","router","version","process","env","__NEXT_VERSION","mitt","looseToArray","input","slice","call","initialData","defaultLocale","undefined","asPath","pageLoader","appElement","headManager","initialMatchesMiddleware","lastAppProps","lastRenderReject","devClient","CachedApp","onPerfEntry","CachedComponent","Container","React","Component","componentDidCatch","componentErr","info","props","fn","componentDidMount","scrollToHash","isSsr","isFallback","nextExport","location","search","__NEXT_HAS_REWRITES","__N_SSG","replace","String","assign","urlQueryToSearchParams","query","URLSearchParams","_h","shallow","catch","err","cancelled","componentDidUpdate","hash","substring","el","document","getElementById","setTimeout","scrollIntoView","render","NODE_ENV","children","PagesDevOverlayBridge","require","opts","tracer","onSpanEnd","default","JSON","parse","textContent","window","__NEXT_DATA__","prefix","assetPrefix","self","__next_set_public_path__","getURL","hasBasePath","removeBasePath","__NEXT_I18N_SUPPORT","normalizeLocalePath","detectDomainLocale","parseRelativeUrl","formatUrl","locales","parsedAs","localePathResult","detectedLocale","locale","detectedDomain","__NEXT_I18N_DOMAINS","hostname","scriptLoader","initScriptLoader","PageLoader","buildId","register","r","f","routeLoader","onEntrypoint","__NEXT_P","map","p","push","initHeadManager","getIsSsr","renderApp","App","appProps","AppContainer","adaptedForAppRouter","useMemo","adaptForAppRouterInstance","renderError","console","AppRouterContext","Provider","value","SearchParamsContext","adaptForSearchParams","PathnameContextProviderAdapter","isAutoExport","autoExport","PathParamsContext","adaptForPathParams","RouterContext","makePublicRouterInstance","HeadManagerContext","ImageConfigContext","__NEXT_IMAGE_OPTS","wrapApp","wrappedAppProps","renderErrorProps","onUnrecoverableError","doRender","styleSheets","loadPage","then","page","ErrorComponent","errorModule","appModule","m","AppTree","appCtx","ctx","Promise","resolve","loadGetInitialProps","initProps","Head","callback","useLayoutEffect","performanceMarks","navigationStart","beforeRender","afterRender","afterHydrate","routeChange","performanceMeasures","hydration","beforeHydration","routeChangeToRender","reactRoot","shouldHydrate","clearMarks","forEach","mark","performance","markHydrateComplete","ST","hasBeforeRenderMark","getEntriesByName","length","beforeHydrationMeasure","measure","hydrationMeasure","startSpan","startTime","timeOrigin","attributes","end","duration","markRenderComplete","navStartEntries","name","clearMeasures","renderReactElement","domEl","reactEl","ReactDOM","hydrateRoot","onRecoverableError","startTransition","Root","callbacks","__NEXT_TEST_MODE","useEffect","__NEXT_HYDRATED","__NEXT_HYDRATED_AT","now","__NEXT_HYDRATED_CB","canceled","resolvePromise","renderPromise","reject","Error","onStart","currentStyleTags","querySelectorAll","currentHrefs","Set","tag","getAttribute","noscript","querySelector","nonce","href","text","has","styleTag","createElement","setAttribute","head","appendChild","createTextNode","onHeadCommit","TURBOPACK","desiredHrefs","s","idx","removeAttribute","referenceNode","targetTag","parentNode","insertBefore","nextSibling","removeChild","scroll","x","y","disableSmoothScrollDuringRouteTransition","scrollTo","onRootCommit","elem","Portal","type","RouteAnnouncer","__NEXT_STRICT_MODE","StrictMode","renderingProps","isHydratePass","renderErr","getProperError","initialErr","appEntrypoint","whenEntrypoint","component","app","mod","reportWebVitals","id","entryType","entries","attribution","uniqueID","Date","Math","floor","random","perfStartEntry","webVitals","label","pageEntrypoint","isValidElementType","getServerError","message","e","stack","errSource","source","isNextRouterError","__NEXT_PRELOADREADY","dynamicIds","createRouter","initialProps","Boolean","subscription","Object","domainLocales","isPreview","_initialMatchesMiddlewarePromise","renderCtx","initial","TEST_ROUTE","TEST_STRICT_ROUTE","strict","isInterceptionRouteAppPath","extractInterceptionRouteInformation","interceptedRoute","test","pagesRouter","back","forward","refresh","reload","hmrRefresh","prefetch","isReady","asPathToSearchParams","pathParams","routeRegex","getRouteRegex","groups","key","ref","useRef","current","url","URL","_","PathnameContext","omit","object","omitted","includes","constructor","createRouteLoader","promisedSsgManifest","__SSG_MANIFEST","__SSG_MANIFEST_CB","getPageList","getClientBuildManifest","manifest","sortedPages","__DEV_PAGES_MANIFEST","pages","promisedDevPagesManifest","fetch","DEV_CLIENT_PAGES_MANIFEST","credentials","res","json","log","getMiddleware","__NEXT_MIDDLEWARE_MATCHERS","middlewareMatchers","__MIDDLEWARE_MATCHERS","onClientMiddlewareManifest","cb","__MIDDLEWARE_MATCHERS_CB","resolvePromiseWithTimeout","markAssetError","__DEV_MIDDLEWARE_MATCHERS","promisedMiddlewareMatchers","DEV_CLIENT_MIDDLEWARE_MANIFEST","matchers","getDataHref","hrefPathname","asPathname","removeTrailingSlash","getHrefForSlug","path","dataRoute","getAssetPathFromRoute","addLocale","addBasePath","skipInterpolation","interpolateAs","_isSsg","loadRoute","styles","o","content","isAssetError","withFuture","generator","entry","get","future","resolver","prom","set","delete","ASSET_LOAD_ERROR","Symbol","defineProperty","hasPrefetch","link","MSInputMethodContext","documentMode","relList","supports","canPrefetch","prefetchViaDom","as","selector","rel","crossOrigin","__NEXT_CROSS_ORIGIN","onload","onerror","appendScript","src","script","body","devBuildPromise","__BUILD_MANIFEST","onBuildManifest","__BUILD_MANIFEST_CB","getFilesForRoute","scriptUrl","encodeURIPath","getAssetTokenQuery","scripts","__unsafeCreateTrustedScriptURL","css","allFiles","filter","v","endsWith","entrypoints","Map","loadedScripts","routes","maybeExecuteScript","toString","fetchStyleSheet","ok","execute","old","devBuildPromiseResolve","all","entrypoint","finally","cn","navigator","connection","saveData","effectiveType","output","requestIdleCallback","INTERCEPTION_ROUTE_MARKERS","split","find","segment","startsWith","interceptingRoute","marker","normalizeAppPath","concat","join","splitInterceptingRoute","createContext","displayName","BailoutToCSRError","isBailoutToCSRError","BAILOUT_TO_CSR","reason","digest","policy","getPolicy","trustedTypes","createPolicy","createHTML","createScript","createScriptURL","isLocalURL","isAbsoluteUrl","locationOrigin","getLocationOrigin","resolved","origin","formatWithValidation","urlObjectKeys","slashedProtocols","urlObj","auth","protocol","host","encodeURIComponent","indexOf","port","querystring","slashes","warn","cancelIdleCallback","bind","start","didTimeout","timeRemaining","max","clearTimeout","Span","state","endTime","Tracer","handleSpanEnd","_emitter","on","off","span","emit","normalizePathTrailingSlash","__NEXT_MANUAL_TRAILING_SLASH","parsePath","__NEXT_TRAILING_SLASH","pathHasPrefix","ReadonlyURLSearchParams","ReadonlyURLSearchParamsError","append","sort","appGetInitialProps","pageProps","origGetInitialProps","getInitialProps","ext","denormalizePagePath","_page","normalizePathSep","basePath","__NEXT_ROUTER_BASEPATH","__NEXT_MANUAL_CLIENT_BASE_PATH","onlyHashChange","htmlElement","documentElement","hasDataAttribute","dataset","scrollBehavior","getComputedStyle","warnOnce","existing","style","dontForceLayout","getClientRects","handleClientScriptLoad","ScriptCache","LoadCache","insertStylesheets","stylesheets","preinit","stylesheet","loadScript","onLoad","onReady","dangerouslySetInnerHTML","strategy","onError","cacheKey","add","afterLoad","loadPromise","addEventListener","innerHTML","__html","Array","isArray","setAttributesFromProps","loadLazyScript","readyState","addBeforeInteractiveToCache","scriptLoaderItems","Script","restProps","updateScripts","appDir","useContext","hasOnReadyEffectCalled","hasLoadScriptEffectCalled","styleSrc","htmlEscapeJsonString","stringify","preload","integrity","getParamProperties","getSegmentParam","isCatchAll","interceptionMarker","paramName","repeat","optional","isInterceptionAppRoute","isNormalizedAppRoute","parseAppRoute","parseAppRouteSegment","normalizeEncodedDynamicPlaceholder","decodedSegment","decodeURIComponent","param","normalized","pathnameSegments","segments","normalizedSegment","appSegment","InvariantError","parts","dynamicSegments","HTML_LIMITED_BOT_UA_RE","HTML_LIMITED_BOT_UA_RE_STRING","getBotType","isBot","HEADLESS_BROWSER_BOT_UA_RE","isDomBotUA","userAgent","isHtmlLimitedBotUA","deploymentId","getDeploymentId","globalThis","NEXT_DEPLOYMENT_ID","removePathPrefix","withoutPrefix","PARAMETER_PATTERN","getDynamicParam","interpolateParallelRouteParams","parseMatchedParameter","parseParameter","getParamValue","interpolatedParams","segmentKey","fallbackRouteParams","searchValue","i","loaderTree","pagePath","interpolated","structuredClone","tree","depth","pop","parallelRoutes","parseLoaderTree","hasOwnProperty","paramValue","resolveParamValue","nextDepth","parallelRoute","values","dynamicParamType","staticSiblings","treeSegment","paramCacheKey","match","REDIRECT_ERROR_CODE","isRedirectError","errorCode","destination","status","at","statusCode","Number","isNaN","RedirectStatusCode","NavigationPromisesContext","createDevToolsInstrumentedPromise","promise","base","parseQuery","globalBase","resolvedBase","searchParams","searchParamsToUrlQuery","cache","WeakMap","lowercasedLocales","toLowerCase","index","escapeStringRegexp","reHasRegExp","reReplaceRegExp","str","compareAppPaths","normalizeRscURL","ensureLeadingSlash","reduce","isGroupSegment","a","b","aHasSlot","bHasSlot","localeCompare","formatNextPathnameInfo","ignorePrefix","trailingSlash","addPathSuffix","addPathPrefix","statusCodes","_getInitialProps","req","getRequestMeta","initUrl","fontFamily","height","textAlign","display","flexDirection","alignItems","justifyContent","desc","lineHeight","h1","margin","paddingRight","fontSize","fontWeight","verticalAlign","h2","wrap","withDarkMode","title","div","className","reportGlobalError","reportError","ESCAPE_REGEX","htmlEscapeAttributeString","ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_LOOKUP","ATTRIBUTE_ESCAPE_REGEX","isJavaScriptURLString","isJavaScriptProtocol","stringifyUrlQueryParam","item","target","searchParamsList","file","compareRouterStates","stateKeys","queryKeys","j","queryKey","withRouter","ComposedComponent","WithRouterWrapper","useRouter","args","getAssetToken","suffix","getChunkScriptFilename","__webpack_require__","u","getChunkCssFilename","k","getMiniCssFilename","miniCssF","__webpack_public_path__","getObjectClassLabel","isPlainObject","prototype","getPrototypeOf","removeLocale","pathLower","localeLower","DEFAULT_SEGMENT_KEY","NOT_FOUND_SEGMENT_KEY","PAGE_SEGMENT_KEY","addSearchParamsIfPageSegment","computeSelectedLayoutSegment","getSegmentValue","getSelectedLayoutSegmentPath","isParallelRouteSegment","isPageSegment","stringifiedQuery","parallelRouteKey","rawSegment","first","segmentPath","node","segmentValue","UrlNode","insert","urlPath","_insert","smoosh","_smoosh","childrenPaths","slugName","splice","restSlugName","optionalRestSlugName","c","prev","curr","placeholder","unshift","urlPaths","slugNames","nextSegment","segmentName","isOptional","handleSlug","previousSlug","nextSlug","slug","normalizedPages","root","objects","getter","indexes","pathnames","sorted","nextjsRouteAnnouncerStyles","border","clip","overflow","padding","position","top","width","whiteSpace","wordWrap","routeAnnouncement","setRouteAnnouncement","useState","previouslyLoadedPath","pageHeader","innerText","aria-live","role","portalNode","setPortalNode","element","createPortal","HTTPAccessErrorStatus","HTTP_ERROR_FALLBACK_ERROR_CODE","getAccessFallbackErrorTypeByStatus","getAccessFallbackHTTPStatus","isHTTPAccessFallbackError","NOT_FOUND","FORBIDDEN","UNAUTHORIZED","ALLOWED_CODES","httpStatus","next","getDeploymentIdQuery","dplId","ampersand","NEXT_IMMUTABLE_ASSET_TOKEN","create","handler","evts","MS_MAX_IDLE_DELAY","devPromise","modules","layout","template","defaultPage","conventionPath","getRouteMatcher","re","rawMatcher","routeMatch","exec","decode","DecodeError","group","pos","Router","singletonRouter","readyCallbacks","ready","urlPropertyFields","routerEvents","coreMethodFields","events","getRouter","field","event","eventField","charAt","toUpperCase","_singletonRouter","isError","scopedRouter","instance","property","getNamedMiddlewareRegex","getNamedRouteRegex","getParametrizedRoute","includeSuffix","includePrefix","groupIndex","markerMatch","paramMatches","parameterizedRoute","excludeOptionalTrailingSlash","RegExp","buildGetSafeRouteKey","routeKey","fromCharCode","getSafeKeyFromSegment","getSafeRouteKey","routeKeys","keyPrefix","backreferenceDuplicateKeys","cleanedKey","invalidKey","parseInt","duplicateKey","interceptionPrefix","pattern","getNamedParametrizedRoute","prefixRouteKeys","reference","names","intercepted","inverseParts","hasInterceptionMarker","some","NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_QUERY_PARAM_PREFIX","namedParameterizedRoute","pathToRegexpPattern","namedRegex","catchAll","catchAllRegex","catchAllGroupedRegex","warnings","msg","getNextPathnameInfo","i18n","nextConfig","pathnameNoDataPrefix","paths","parseData","i18nProvider","analyze","isEqualNode","reactElementToDOM","oldTag","newTag","HTMLElement","cloneTag","cloneNode","updateElements","components","headEl","oldTags","metaCharset","newTags","isNew","tagName","prepend","mountedInstances","updateHead","tags","h","titleComponent","resolveHref","resolveAs","urlAsString","urlProtoMatch","urlAsStringNoProto","urlParts","normalizedUrl","normalizeRepeatedSlashes","baseBase","finalUrl","interpolatedAs","resolvedHref","defaultHead","meta","charSet","onlyReactElement","list","child","Fragment","Children","toArray","fragmentList","fragmentChild","METATYPES","unique","metaTypes","metaCategories","isUnique","hasKey","len","metatype","category","categories","reduceComponents","headChildrenElements","reverse","srcMessage","cloneElement","Effect","reduceComponentsToState","VALID_LOADERS","imageConfigDefault","deviceSizes","imageSizes","loader","loaderFile","domains","disableStaticImages","minimumCacheTTL","formats","maximumDiskCacheSize","maximumRedirects","maximumResponseBody","dangerouslyAllowLocalIP","dangerouslyAllowSVG","contentSecurityPolicy","contentDispositionType","localPatterns","remotePatterns","qualities","unoptimized","customCacheHandler","BloomFilter","murmurhash2","charCodeAt","imul","DEFAULT_ERROR_RATE","numItems","errorRate","numBits","ceil","numHashes","bitArray","fill","from","items","export","data","NEXT_RUNTIME","filterData","gzipSize","sync","import","hashValues","getHashValues","contains","every","isRecoverableError","recoverableErrors","WeakSet","isInstantTest","__NEXT_EXPOSE_TESTING_API","__next_instant_test","cause","decorateDevError","causeError","required","lower","getParamValueFromSegment","pathSegment","processedSegments","hashIndex","queryIndex","hasQuery","MiddlewareNotFoundError","MissingStaticPage","NormalizeError","PageNotFoundError","SP","WEB_VITALS","execOnce","getDisplayName","isResSent","stringifyError","used","ABSOLUTE_URL_REGEX","finished","headersSent","urlNoQuery","method","code","createKey","matchesMiddleware","resolveRewrites","buildCancellationError","cleanedAs","asWithBasePathAndLocale","stripOrigin","prepareUrlAs","resolvedAs","hrefWasAbsolute","asWasAbsolute","preparedUrl","preparedAs","resolveDynamicRoute","cleanPathname","getMiddlewareData","response","rewriteHeader","headers","rewriteTarget","matchedPath","MATCHED_PATH_HEADER","__NEXT_EXTERNAL_MIDDLEWARE_REWRITE_RESOLVE","parsedRewriteTarget","pathnameInfo","fsPathname","__rewrites","rewrites","parsedSource","matchedPage","resolvedPathname","matches","redirectTarget","newAs","newUrl","withMiddlewareEffects","fetchData","effect","dataHref","manualScrollRestoration","__NEXT_SCROLL_RESTORATION","history","sessionStorage","setItem","removeItem","n","SSG_DATA_NOT_FOUND","fetchRetry","attempts","tryToParseAsJSON","fetchNextData","inflightCache","isPrefetch","hasMiddleware","isServerRender","parseJSON","persistCache","isBackground","unstable_skipClientCache","getData","purpose","notFound","dplResponseHeader","NEXT_NAV_DEPLOYMENT_ID_HEADER","handleHardNavigation","getCancelledHandler","cancel","clc","handleCancelled","sdc","sbc","isFirstPopStateEvent","_key","onPopState","changeState","__NA","__N","forcedScroll","pageXOffset","pageYOffset","getItem","_bps","change","_shallow","__N_SSP","autoExportDynamic","sub","_wrapApp","isLocaleDomain","gssp","gip","isExperimentalCompile","appGip","gsp","_shouldResolveHref","scrollRestoration","_bfl","skipNavigate","__NEXT_CLIENT_ROUTER_FILTER_ENABLED","_bfl_s","_bfl_d","staticFilterData","dynamicFilterData","__routerFilterStatic","__routerFilterDynamic","routerFilterSValue","__NEXT_CLIENT_ROUTER_S_FILTER","routerFilterDValue","__NEXT_CLIENT_ROUTER_D_FILTER","matchesBflStatic","matchesBflDynamic","pathsToCheck","curAs","allowMatchCurrent","asNoSlash","asNoSlashLocale","normalizedAS","curAsParts","currentPart","isQueryUpdating","shouldResolveHref","nextState","readyStateChange","prevLocale","didNavigate","domain","asNoBasePath","http","routeProps","_inFlightRoute","localeChange","onlyAHashChange","parsed","urlIsNew","parsedAsPathname","__appRouter","isMiddlewareRewrite","isMiddlewareMatch","rewritesResult","externalDest","shouldInterpolate","missingParams","isErrorRoute","routeInfo","getRouteInfo","cleanedParsedPathname","prefixedAs","rewriteAs","localeResult","curRouteMatch","unstable_scriptLoader","__N_REDIRECT","__N_REDIRECT_BASE_PATH","parsedHref","__N_PREVIEW","notFoundRoute","fetchComponent","isNotFound","isValidShallowRoute","shouldScroll","resetScroll","upcomingScrollState","upcomingRouterState","canSkipUpdating","lang","hashRegex","handleRouteInfoError","loadErrorFail","gipErr","routeInfoErr","requestedRoute","existingInfo","cachedRouteInfo","fetchNextDataParams","resolvedRoute","isAPIRoute","wasBailedPrefetch","shouldFetchData","_getData","fetched","beforePopState","oldUrlNoHash","oldHash","newUrlNoHash","newHash","rawHash","idEl","nameEl","getElementsByName","urlPathname","originalPathname","__NEXT_MIDDLEWARE_PREFETCH","isSsg","priority","__NEXT_OPTIMISTIC_CLIENT_CACHE","componentResult","GlobalLayoutRouterContext","LayoutRouterContext","MissingSlotContext","TemplateContext","APP_CLIENT_INTERNALS","APP_PATHS_MANIFEST","APP_PATH_ROUTES_MANIFEST","AdapterOutputType","BARREL_OPTIMIZATION_PREFIX","BLOCKED_PAGES","BUILD_ID_FILE","BUILD_MANIFEST","CLIENT_PUBLIC_FILES_PATH","CLIENT_REFERENCE_MANIFEST","CLIENT_STATIC_FILES_PATH","CLIENT_STATIC_FILES_RUNTIME_MAIN","CLIENT_STATIC_FILES_RUNTIME_MAIN_APP","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS","CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL","CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH","CLIENT_STATIC_FILES_RUNTIME_WEBPACK","COMPILER_INDEXES","COMPILER_NAMES","CONFIG_FILES","DEFAULT_RUNTIME_WEBPACK","DEFAULT_SANS_SERIF_FONT","DEFAULT_SERIF_FONT","DYNAMIC_CSS_MANIFEST","EDGE_RUNTIME_WEBPACK","EDGE_UNSUPPORTED_NODE_APIS","EXPORT_DETAIL","EXPORT_MARKER","FUNCTIONS_CONFIG_MANIFEST","IMAGES_MANIFEST","INTERCEPTION_ROUTE_REWRITE_MANIFEST","MIDDLEWARE_BUILD_MANIFEST","MIDDLEWARE_MANIFEST","MIDDLEWARE_REACT_LOADABLE_MANIFEST","NEXT_BUILTIN_DOCUMENT","NEXT_FONT_MANIFEST","PAGES_MANIFEST","PHASE_ANALYZE","PHASE_DEVELOPMENT_SERVER","PHASE_EXPORT","PHASE_INFO","PHASE_PRODUCTION_BUILD","PHASE_PRODUCTION_SERVER","PHASE_TEST","PREFETCH_HINTS","PRERENDER_MANIFEST","REACT_LOADABLE_MANIFEST","ROUTES_MANIFEST","RSC_MODULE_TYPES","SERVER_DIRECTORY","SERVER_FILES_MANIFEST","SERVER_PROPS_ID","SERVER_REFERENCE_MANIFEST","STATIC_PROPS_ID","STATIC_STATUS_PAGES","STRING_LITERAL_DROP_BUNDLE","SUBRESOURCE_INTEGRITY_MANIFEST","SYSTEM_ENTRYPOINTS","TRACE_OUTPUT_VERSION","TURBOPACK_CLIENT_BUILD_MANIFEST","TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST","TURBO_TRACE_DEFAULT_MEMORY_LIMIT","UNDERSCORE_GLOBAL_ERROR_ROUTE","UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY","UNDERSCORE_NOT_FOUND_ROUTE","UNDERSCORE_NOT_FOUND_ROUTE_ENTRY","client","server","edgeServer","features","typescript","xAvgCharWidth","azAvgWidth","unitsPerEm","interpolatedRoute","dynamicRegex","dynamicGroups","dynamicMatches","replaced","DOMAttributeNames","acceptCharset","htmlFor","httpEquiv","noModule","ignoreProps","isBooleanScriptAttribute","attr","SideEffect","isServer","useClientOnlyLayoutEffect","useClientOnlyEffect","emitChange","headElements","_pendingUpdate"],"sourceRoot":"","ignoreList":[17,23,27,46,67,79,92,102,104,105,106,107,108,109,110,111,114]}
|