nuxt-i18n-micro 3.18.0 → 3.18.2

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.
@@ -1 +1 @@
1
- import{u as P,d as B,s as O,r as E,a as L,o as T,b as H,c as I,e as U,f as M,h as R,g as N,p as V,i as q,j as b,k as A,l as D,n as F,m as $,w as W,q as G,t as K,v as Q,x as J,y as C,z as _,A as X,B as Y,C as Z}from"./D_aXYej0.js";import{_ as ee,u as te}from"./Dt5GiM1K.js";async function j(t,n=P()){const{path:u,matched:p}=n.resolve(t);if(!p.length||(n._routePreloaded||=new Set,n._routePreloaded.has(u)))return;const d=n._preloadPromises||=[];if(d.length>4)return Promise.all(d).then(()=>j(t,n));n._routePreloaded.add(u);for(const e of p){const o=e.components?.default;if(typeof o!="function")continue;const c=Promise.resolve(o()).catch(()=>{}).finally(()=>d.splice(d.indexOf(c)));d.push(c)}await Promise.all(d)}const ne=(...t)=>t.find(n=>n!==void 0);function re(t){const n=t.componentName||"NuxtLink";function u(e){return typeof e=="string"&&e.startsWith("#")}function p(e,o,c){const a=c??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return S(e,a);const s="path"in e&&e.path!==void 0?e.path:o(e).path;return{...e,name:void 0,path:S(s,a)}}function d(e){const o=P(),c=$(),a=b(()=>!!e.target&&e.target!=="_self"),s=b(()=>{const l=e.to||e.href||"";return typeof l=="string"&&A(l,{acceptRelative:!0})}),y=N("RouterLink"),g=y&&typeof y!="string"?y.useLink:void 0,h=b(()=>{if(e.external)return!0;const l=e.to||e.href||"";return typeof l=="object"?!1:l===""||s.value}),i=b(()=>{const l=e.to||e.href||"";return h.value?l:p(l,o.resolve,e.trailingSlash)}),m=h.value?void 0:g?.({...e,to:i}),x=b(()=>{const l=e.trailingSlash??t.trailingSlash;if(!i.value||s.value||u(i.value))return i.value;if(h.value){const k=typeof i.value=="object"&&"path"in i.value?q(i.value):i.value,w=typeof k=="object"?o.resolve(k).href:k;return S(w,l)}return typeof i.value=="object"?o.resolve(i.value)?.href??null:S(D(c.app.baseURL,i.value),l)});return{to:i,hasTarget:a,isAbsoluteUrl:s,isExternal:h,href:x,isActive:m?.isActive??b(()=>i.value===o.currentRoute.value.path),isExactActive:m?.isExactActive??b(()=>i.value===o.currentRoute.value.path),route:m?.route??b(()=>o.resolve(i.value)),async navigate(l){await F(x.value,{replace:e.replace,external:h.value||a.value})}}}return B({name:n,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:d,setup(e,{slots:o}){const c=P(),{to:a,href:s,navigate:y,isExternal:g,hasTarget:h,isAbsoluteUrl:i}=d(e),m=O(!1),x=E(null),l=f=>{x.value=e.custom?f?.$el?.nextElementSibling:f?.$el};function k(f){return!m.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===f:e.prefetchOn?.[f]??t.prefetchOn?.[f])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function w(f=L()){if(m.value)return;m.value=!0;const v=typeof a.value=="string"?a.value:g.value?q(a.value):c.resolve(a.value).fullPath,r=g.value?new URL(v,window.location.href).href:v;await Promise.all([f.hooks.callHook("link:prefetch",r).catch(()=>{}),!g.value&&!h.value&&j(a.value,c).catch(()=>{})])}if(k("visibility")){const f=L();let v,r=null;T(()=>{const z=oe();H(()=>{v=I(()=>{x?.value?.tagName&&(r=z.observe(x.value,async()=>{r?.(),r=null,await w(f)}))})})}),U(()=>{v&&M(v),r?.(),r=null})}return()=>{if(!g.value&&!h.value&&!u(a.value)){const r={ref:l,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(k("interaction")&&(r.onPointerenter=w.bind(null,void 0),r.onFocus=w.bind(null,void 0)),m.value&&(r.class=e.prefetchedClass||t.prefetchedClass),r.rel=e.rel||void 0),R(N("RouterLink"),r,o.default)}const f=e.target||null,v=ne(e.noRel?"":e.rel,t.externalRelAttribute,i.value||h.value?"noopener noreferrer":"")||null;return e.custom?o.default?o.default({href:s.value,navigate:y,prefetch:w,get route(){if(!s.value)return;const r=new URL(s.value,window.location.href);return{path:r.pathname,fullPath:r.pathname,get query(){return V(r.search)},hash:r.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:s.value}},rel:v,target:f,isExternal:g.value||h.value,isActive:!1,isExactActive:!1}):null:R("a",{ref:x,href:s.value||null,rel:v,target:f,onClick:r=>{if(!(g.value||h.value))return r.preventDefault(),e.replace?c.replace(s.value):c.push(s.value)}},o.default?.())}}})}const ae=re(K);function S(t,n){const u=n==="append"?W:G;return A(t)&&!t.startsWith("http")?t:u(t,!0)}function oe(){const t=L();if(t._observer)return t._observer;let n=null;const u=new Map,p=(e,o)=>(n||=new IntersectionObserver(c=>{for(const a of c){const s=u.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&s&&s()}}),u.set(e,o),n.observe(e),()=>{u.delete(e),n?.unobserve(e),u.size===0&&(n?.disconnect(),n=null)});return t._observer={observe:p}}const ie=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||ie.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},ue={class:"max-w-520px text-center"},ce=["textContent"],fe=["textContent"],de=["textContent"],he={class:"flex items-center justify-center w-full"},ve={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return te({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(u,p)=>{const d=ae;return Q(),J("div",le,[C("div",ue,[C("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:_(t.statusCode)},null,8,ce),C("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:_(t.statusMessage)},null,8,fe),C("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:_(t.description)},null,8,de),C("div",he,[X(d,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:Y(()=>[Z(_(t.backHome),1)]),_:1})])])])}}},me=ee(ve,[["__scopeId","data-v-c9a13a71"]]);export{me as default};
1
+ import{u as P,d as B,s as O,r as E,a as L,o as T,b as H,c as I,e as U,f as M,h as R,g as N,p as V,i as q,j as b,k as A,l as D,n as F,m as $,w as W,q as G,t as K,v as Q,x as J,y as C,z as _,A as X,B as Y,C as Z}from"./B-cq5x_h.js";import{_ as ee,u as te}from"./D6byAye8.js";async function j(t,n=P()){const{path:u,matched:p}=n.resolve(t);if(!p.length||(n._routePreloaded||=new Set,n._routePreloaded.has(u)))return;const d=n._preloadPromises||=[];if(d.length>4)return Promise.all(d).then(()=>j(t,n));n._routePreloaded.add(u);for(const e of p){const o=e.components?.default;if(typeof o!="function")continue;const c=Promise.resolve(o()).catch(()=>{}).finally(()=>d.splice(d.indexOf(c)));d.push(c)}await Promise.all(d)}const ne=(...t)=>t.find(n=>n!==void 0);function re(t){const n=t.componentName||"NuxtLink";function u(e){return typeof e=="string"&&e.startsWith("#")}function p(e,o,c){const a=c??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return S(e,a);const s="path"in e&&e.path!==void 0?e.path:o(e).path;return{...e,name:void 0,path:S(s,a)}}function d(e){const o=P(),c=$(),a=b(()=>!!e.target&&e.target!=="_self"),s=b(()=>{const l=e.to||e.href||"";return typeof l=="string"&&A(l,{acceptRelative:!0})}),y=N("RouterLink"),g=y&&typeof y!="string"?y.useLink:void 0,h=b(()=>{if(e.external)return!0;const l=e.to||e.href||"";return typeof l=="object"?!1:l===""||s.value}),i=b(()=>{const l=e.to||e.href||"";return h.value?l:p(l,o.resolve,e.trailingSlash)}),m=h.value?void 0:g?.({...e,to:i}),x=b(()=>{const l=e.trailingSlash??t.trailingSlash;if(!i.value||s.value||u(i.value))return i.value;if(h.value){const k=typeof i.value=="object"&&"path"in i.value?q(i.value):i.value,w=typeof k=="object"?o.resolve(k).href:k;return S(w,l)}return typeof i.value=="object"?o.resolve(i.value)?.href??null:S(D(c.app.baseURL,i.value),l)});return{to:i,hasTarget:a,isAbsoluteUrl:s,isExternal:h,href:x,isActive:m?.isActive??b(()=>i.value===o.currentRoute.value.path),isExactActive:m?.isExactActive??b(()=>i.value===o.currentRoute.value.path),route:m?.route??b(()=>o.resolve(i.value)),async navigate(l){await F(x.value,{replace:e.replace,external:h.value||a.value})}}}return B({name:n,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:d,setup(e,{slots:o}){const c=P(),{to:a,href:s,navigate:y,isExternal:g,hasTarget:h,isAbsoluteUrl:i}=d(e),m=O(!1),x=E(null),l=f=>{x.value=e.custom?f?.$el?.nextElementSibling:f?.$el};function k(f){return!m.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===f:e.prefetchOn?.[f]??t.prefetchOn?.[f])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!se()}async function w(f=L()){if(m.value)return;m.value=!0;const v=typeof a.value=="string"?a.value:g.value?q(a.value):c.resolve(a.value).fullPath,r=g.value?new URL(v,window.location.href).href:v;await Promise.all([f.hooks.callHook("link:prefetch",r).catch(()=>{}),!g.value&&!h.value&&j(a.value,c).catch(()=>{})])}if(k("visibility")){const f=L();let v,r=null;T(()=>{const z=oe();H(()=>{v=I(()=>{x?.value?.tagName&&(r=z.observe(x.value,async()=>{r?.(),r=null,await w(f)}))})})}),U(()=>{v&&M(v),r?.(),r=null})}return()=>{if(!g.value&&!h.value&&!u(a.value)){const r={ref:l,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(k("interaction")&&(r.onPointerenter=w.bind(null,void 0),r.onFocus=w.bind(null,void 0)),m.value&&(r.class=e.prefetchedClass||t.prefetchedClass),r.rel=e.rel||void 0),R(N("RouterLink"),r,o.default)}const f=e.target||null,v=ne(e.noRel?"":e.rel,t.externalRelAttribute,i.value||h.value?"noopener noreferrer":"")||null;return e.custom?o.default?o.default({href:s.value,navigate:y,prefetch:w,get route(){if(!s.value)return;const r=new URL(s.value,window.location.href);return{path:r.pathname,fullPath:r.pathname,get query(){return V(r.search)},hash:r.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:s.value}},rel:v,target:f,isExternal:g.value||h.value,isActive:!1,isExactActive:!1}):null:R("a",{ref:x,href:s.value||null,rel:v,target:f,onClick:r=>{if(!(g.value||h.value))return r.preventDefault(),e.replace?c.replace(s.value):c.push(s.value)}},o.default?.())}}})}const ae=re(K);function S(t,n){const u=n==="append"?W:G;return A(t)&&!t.startsWith("http")?t:u(t,!0)}function oe(){const t=L();if(t._observer)return t._observer;let n=null;const u=new Map,p=(e,o)=>(n||=new IntersectionObserver(c=>{for(const a of c){const s=u.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&s&&s()}}),u.set(e,o),n.observe(e),()=>{u.delete(e),n?.unobserve(e),u.size===0&&(n?.disconnect(),n=null)});return t._observer={observe:p}}const ie=/2g/;function se(){const t=navigator.connection;return!!(t&&(t.saveData||ie.test(t.effectiveType)))}const le={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},ue={class:"max-w-520px text-center"},ce=["textContent"],fe=["textContent"],de=["textContent"],he={class:"flex items-center justify-center w-full"},ve={__name:"error-404",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:404},statusMessage:{type:String,default:"Page not found"},description:{type:String,default:"Sorry, the page you are looking for could not be found."},backHome:{type:String,default:"Go back home"}},setup(t){const n=t;return te({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(u,p)=>{const d=ae;return Q(),J("div",le,[C("div",ue,[C("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:_(t.statusCode)},null,8,ce),C("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:_(t.statusMessage)},null,8,fe),C("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:_(t.description)},null,8,de),C("div",he,[X(d,{to:"/",class:"font-medium hover:text-[#00DC82] text-sm underline underline-offset-3"},{default:Y(()=>[Z(_(t.backHome),1)]),_:1})])])])}}},me=ee(ve,[["__scopeId","data-v-c9a13a71"]]);export{me as default};
@@ -1 +1 @@
1
- import{_ as o,u as s}from"./Dt5GiM1K.js";import{v as a,x as i,y as t,z as r}from"./D_aXYej0.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,h)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-334154a6"]]);export{x as default};
1
+ import{_ as o,u as s}from"./D6byAye8.js";import{v as a,x as i,y as t,z as r}from"./B-cq5x_h.js";const u={class:"antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide"},l={class:"max-w-520px text-center"},c=["textContent"],d=["textContent"],p=["textContent"],f={__name:"error-500",props:{appName:{type:String,default:"Nuxt"},statusCode:{type:Number,default:500},statusMessage:{type:String,default:"Internal server error"},description:{type:String,default:"This page is temporarily unavailable."},refresh:{type:String,default:"Refresh this page"}},setup(e){const n=e;return s({title:`${n.statusCode} - ${n.statusMessage} | ${n.appName}`,script:[{innerHTML:`!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:'*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }'}]}),(g,h)=>(a(),i("div",u,[t("div",l,[t("h1",{class:"font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]",textContent:r(e.statusCode)},null,8,c),t("h2",{class:"font-semibold mb-2 sm:text-3xl text-2xl",textContent:r(e.statusMessage)},null,8,d),t("p",{class:"mb-4 px-2 text-[#64748B] text-md",textContent:r(e.description)},null,8,p)])]))}},x=o(f,[["__scopeId","data-v-334154a6"]]);export{x as default};
@@ -1 +1 @@
1
- import{D as r,a as o,E as u,F as c,G as i}from"./D_aXYej0.js";function d(e){const t=e||o();return t.ssrContext?.head||t.runWithContext(()=>{if(u()){const n=c(i);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function x(e,t={}){const n=d(t.nuxt);return r(e,{head:n,...t})}const f=(e,t)=>{const n=e.__vccOpts||e;for(const[s,a]of t)n[s]=a;return n};export{f as _,x as u};
1
+ import{D as r,a as o,E as u,F as c,G as i}from"./B-cq5x_h.js";function d(e){const t=e||o();return t.ssrContext?.head||t.runWithContext(()=>{if(u()){const n=c(i);if(!n)throw new Error("[nuxt] [unhead] Missing Unhead instance.");return n}})}function x(e,t={}){const n=d(t.nuxt);return r(e,{head:n,...t})}const f=(e,t)=>{const n=e.__vccOpts||e;for(const[s,a]of t)n[s]=a;return n};export{f as _,x as u};
@@ -1 +1 @@
1
- {"id":"bdfcba12-33f4-4120-bce9-f186efc3683a","timestamp":1778844295058}
1
+ {"id":"a653a17d-86f7-440a-a09c-9871b01bc761","timestamp":1779781934227}
@@ -0,0 +1 @@
1
+ {"id":"a653a17d-86f7-440a-a09c-9871b01bc761","timestamp":1779781934227,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/D_aXYej0.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/D_aXYej0.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.CyBDSRXN.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/Brscz0ku.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/Dt5GiM1K.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.DJtCwW7w.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/CXlkzKTu.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"bdfcba12-33f4-4120-bce9-f186efc3683a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1778844297940,false]</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/entry.Kj_DYE7z.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/B-cq5x_h.js"><script type="module" src="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/B-cq5x_h.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-404.CyBDSRXN.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BCTbvRLO.js"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/D6byAye8.js"><link rel="prefetch" as="style" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/error-500.DJtCwW7w.css"><link rel="prefetch" as="script" crossorigin href="/__NUXT_DEVTOOLS_I18N_BASE__/_nuxt/BNXusRXY.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__NUXT_DEVTOOLS_I18N_BASE__/",buildId:"a653a17d-86f7-440a-a09c-9871b01bc761",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1779781937006,false]</script></body></html>
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
3
  "configKey": "i18n",
4
- "version": "3.18.0",
4
+ "version": "3.18.2",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -158,6 +158,15 @@ ${accepts}
158
158
  `.trim();
159
159
  }
160
160
 
161
+ function shouldLocalizeRouteRulePath(originalPath) {
162
+ const routeRulePath = originalPath.trim();
163
+ if (!routeRulePath) return true;
164
+ const path = routeRulePath.startsWith("/") ? routeRulePath : `/${routeRulePath}`;
165
+ if (path === "/api" || path.startsWith("/api/")) return false;
166
+ const firstSegment = path.replace(/^\/+/, "").split("/")[0] ?? "";
167
+ return !firstSegment.startsWith("_");
168
+ }
169
+
161
170
  function extractScriptContent(content) {
162
171
  const scriptMatch = content.match(/<script[^>]*>([\s\S]*?)<\/script>/);
163
172
  return scriptMatch?.[1] ? scriptMatch[1] : null;
@@ -806,7 +815,7 @@ declare module '#i18n-internal/plural' {
806
815
  if (routeRules && Object.keys(routeRules).length && !isNoPrefixStrategy(strategy)) {
807
816
  nitroConfig.routeRules = nitroConfig.routeRules || {};
808
817
  for (const [originalPath, ruleValue] of Object.entries(routeRules)) {
809
- if (originalPath.startsWith("/api")) continue;
818
+ if (!shouldLocalizeRouteRulePath(originalPath)) continue;
810
819
  routeGenerator.locales.forEach((localeObj) => {
811
820
  const localeCode = localeObj.code;
812
821
  if (!isLocaleAllowedForUnlocalizedRoute(routeGenerator.routeLocales, routeGenerator.locales, originalPath, localeCode)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-i18n-micro",
3
- "version": "3.18.0",
3
+ "version": "3.18.2",
4
4
  "description": "Nuxt I18n Micro is a lightweight, high-performance internationalization module for Nuxt, designed to handle multi-language support with minimal overhead, fast build times, and efficient runtime performance.",
5
5
  "repository": "s00d/nuxt-i18n-micro",
6
6
  "license": "MIT",
@@ -74,11 +74,11 @@
74
74
  "chokidar": "^3.6.0",
75
75
  "globby": "^14.1.0",
76
76
  "ufo": "^1.5.4",
77
- "@i18n-micro/core": "1.3.0",
78
- "@i18n-micro/path-strategy": "1.3.0",
79
- "@i18n-micro/route-strategy": "1.1.6",
80
- "@i18n-micro/types": "1.2.1",
81
- "@i18n-micro/test-utils": "1.2.0"
77
+ "@i18n-micro/core": "1.3.1",
78
+ "@i18n-micro/route-strategy": "1.1.7",
79
+ "@i18n-micro/test-utils": "1.2.1",
80
+ "@i18n-micro/types": "1.2.2",
81
+ "@i18n-micro/path-strategy": "1.3.2"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@biomejs/biome": "^2.3.14",
@@ -120,10 +120,11 @@
120
120
  "dev:build": "nuxi build playground",
121
121
  "dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
122
122
  "dev:generate": "nuxi generate playground",
123
- "release": "pnpm run format && pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:vitest && pnpm run test:workspaces && pnpm run prepack && node scripts/run-changelogen-release.mjs auto && pnpm publish -r && git push --follow-tags",
124
- "release:lite": "pnpm run prepack && node scripts/run-changelogen-release.mjs patch && pnpm publish -r && git push --follow-tags",
123
+ "release": "pnpm run release:check && pnpm run release:patch",
124
+ "release:check": "pnpm run format && pnpm run lint && pnpm run typecheck && pnpm run test:types && pnpm run test && pnpm run test:vitest && pnpm run test:workspaces",
125
125
  "release:patch": "pnpm run prepack && node scripts/run-changelogen-release.mjs patch && pnpm publish -r && git push --follow-tags",
126
126
  "release:minor": "pnpm run prepack && node scripts/run-changelogen-release.mjs minor && pnpm publish -r && git push --follow-tags",
127
+ "release:major": "pnpm run prepack && node scripts/run-changelogen-release.mjs major && pnpm publish -r && git push --follow-tags",
127
128
  "lint": "biome check .",
128
129
  "lint:fix": "biome check --write .",
129
130
  "format": "biome format --write .",
@@ -140,6 +141,10 @@
140
141
  "client:dev": "nuxi dev client --port 3300",
141
142
  "clean": "find . \\( -name 'node_modules' -o -name '.nuxt' -o -name '.output' -o -name 'dist' \\) -type d -prune -exec rm -rf '{}' + && find . \\( -name 'pnpm-lock.yaml' -o -name 'package-lock.json' \\) -type f -exec rm -f '{}' +",
142
143
  "clean:test": "find test/fixtures -type d \\( -name '.nuxt' -o -name 'test-results' \\) -exec rm -rf '{}' + 2>/dev/null || true",
144
+ "verify:packages": "node scripts/verify-packages.mjs",
145
+ "verify:packages:publint": "node scripts/verify-packages.mjs --publint",
146
+ "compare:published": "node scripts/compare-published-dist.mjs",
147
+ "test:dist:packages": "pnpm --filter \"@i18n-micro/core\" --filter \"@i18n-micro/vue\" --filter \"@i18n-micro/path-strategy\" --filter \"@i18n-micro/route-strategy\" --filter \"@i18n-micro/devtools-ui\" --filter \"@i18n-micro/astro\" run test:dist",
143
148
  "typecheck": "tsc --noEmit",
144
149
  "typecheck:nuxt": "nuxt typecheck --no-emit",
145
150
  "docs:dev": "vitepress dev docs",
@@ -1 +0,0 @@
1
- {"id":"bdfcba12-33f4-4120-bce9-f186efc3683a","timestamp":1778844295058,"matcher":{"static":{},"wildcard":{},"dynamic":{}},"prerendered":[]}