feat: Add i18n with 7 languages (DE, EN, ES, FR, AR, RU, PL)
- Added vue-i18n with language switcher in header - Flag icons with language codes dropdown - RTL support for Arabic - Translated all navigation, auth, and module labels - Language preference saved to localStorage
This commit is contained in:
File diff suppressed because one or more lines are too long
1
dist/assets/AppLayout-AMYs4jcG.js
vendored
1
dist/assets/AppLayout-AMYs4jcG.js
vendored
File diff suppressed because one or more lines are too long
1
dist/assets/AppLayout-M3P9X3hb.js
vendored
Normal file
1
dist/assets/AppLayout-M3P9X3hb.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/AvailabilityView-3FfkRQ5Z.js
vendored
Normal file
1
dist/assets/AvailabilityView-3FfkRQ5Z.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{d as D,u as S,q as M,m as h,c as l,a as o,t as u,F as C,x as F,C as A,r as v,k as m,n as L,o as i}from"./index-CgM2qJ96.js";const O={class:"space-y-6"},V={class:"card"},E={class:"flex items-center justify-between mb-6"},I={class:"text-lg font-semibold"},W={key:0,class:"text-center py-8 text-gray-500"},Y={key:1,class:"grid grid-cols-7 gap-2"},B={class:"text-xs text-gray-500 mb-1"},N=["onClick"],j=D({__name:"AvailabilityView",setup(T){const f=S(),a=v(new Date),y=v([]),g=v(!0),p=m(()=>{const n=a.value.getFullYear(),e=a.value.getMonth(),t=new Date(n,e+1,0).getDate();return Array.from({length:t},(s,r)=>{const d=new Date(n,e,r+1);return{date:d.toISOString().split("T")[0],dayOfWeek:d.toLocaleDateString("de-DE",{weekday:"short"}),day:r+1,isWeekend:d.getDay()===0||d.getDay()===6}})}),_=m(()=>a.value.toLocaleDateString("de-DE",{month:"long",year:"numeric"}));M(c);async function c(){g.value=!0;const n=a.value.getFullYear(),e=a.value.getMonth(),t=new Date(n,e,1).toISOString().split("T")[0],s=new Date(n,e+1,0).toISOString().split("T")[0];try{const r=await h.get(`/availability?from=${t}&to=${s}`);y.value=r.data.availability}catch(r){console.error(r)}finally{g.value=!1}}function b(n){return y.value.find(e=>{var t;return e.date===n&&e.user_id===((t=f.user)==null?void 0:t.id)})}async function k(n){const e=b(n),t=!(e!=null&&e.available);try{await h.post("/availability",{date:n,available:t}),await c()}catch(s){alert(s instanceof Error?s.message:"Fehler")}}function x(){a.value=new Date(a.value.getFullYear(),a.value.getMonth()-1),c()}function w(){a.value=new Date(a.value.getFullYear(),a.value.getMonth()+1),c()}return(n,e)=>(i(),l("div",O,[e[1]||(e[1]=o("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"📅 Verfügbarkeit",-1)),o("div",V,[o("div",E,[o("button",{class:"btn btn-secondary",onClick:x},"←"),o("h2",I,u(_.value),1),o("button",{class:"btn btn-secondary",onClick:w},"→")]),g.value?(i(),l("div",W,"Lädt...")):(i(),l("div",Y,[(i(!0),l(C,null,F(p.value,t=>{var s;return i(),l("div",{key:t.date,class:"text-center"},[o("div",B,u(t.dayOfWeek),1),o("button",{class:L(["w-10 h-10 rounded-lg font-medium transition-colors",t.isWeekend?"bg-gray-100 dark:bg-gray-700":"",(s=b(t.date))!=null&&s.available?"bg-green-500 text-white hover:bg-green-600":"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500"]),onClick:r=>k(t.date)},u(t.day),11,N)])}),128))])),e[0]||(e[0]=A('<div class="mt-6 flex items-center gap-4 text-sm"><div class="flex items-center gap-2"><span class="w-4 h-4 bg-green-500 rounded"></span><span>Verfügbar</span></div><div class="flex items-center gap-2"><span class="w-4 h-4 bg-gray-200 dark:bg-gray-600 rounded"></span><span>Nicht gemeldet</span></div></div>',1))])]))}});export{j as default};
|
||||||
1
dist/assets/AvailabilityView-BNPzNcWA.js
vendored
1
dist/assets/AvailabilityView-BNPzNcWA.js
vendored
@@ -1 +0,0 @@
|
|||||||
import{d as D,u as S,q as M,m as h,c as l,a as o,t as u,F,x as A,A as C,r as v,k as m,o as i,n as L}from"./index-CWxNv9Fc.js";const O={class:"space-y-6"},V={class:"card"},E={class:"flex items-center justify-between mb-6"},I={class:"text-lg font-semibold"},W={key:0,class:"text-center py-8 text-gray-500"},Y={key:1,class:"grid grid-cols-7 gap-2"},B={class:"text-xs text-gray-500 mb-1"},N=["onClick"],j=D({__name:"AvailabilityView",setup(T){const f=S(),a=v(new Date),y=v([]),g=v(!0),p=m(()=>{const n=a.value.getFullYear(),e=a.value.getMonth(),t=new Date(n,e+1,0).getDate();return Array.from({length:t},(s,r)=>{const d=new Date(n,e,r+1);return{date:d.toISOString().split("T")[0],dayOfWeek:d.toLocaleDateString("de-DE",{weekday:"short"}),day:r+1,isWeekend:d.getDay()===0||d.getDay()===6}})}),_=m(()=>a.value.toLocaleDateString("de-DE",{month:"long",year:"numeric"}));M(c);async function c(){g.value=!0;const n=a.value.getFullYear(),e=a.value.getMonth(),t=new Date(n,e,1).toISOString().split("T")[0],s=new Date(n,e+1,0).toISOString().split("T")[0];try{const r=await h.get(`/availability?from=${t}&to=${s}`);y.value=r.data.availability}catch(r){console.error(r)}finally{g.value=!1}}function b(n){return y.value.find(e=>{var t;return e.date===n&&e.user_id===((t=f.user)==null?void 0:t.id)})}async function k(n){const e=b(n),t=!(e!=null&&e.available);try{await h.post("/availability",{date:n,available:t}),await c()}catch(s){alert(s instanceof Error?s.message:"Fehler")}}function x(){a.value=new Date(a.value.getFullYear(),a.value.getMonth()-1),c()}function w(){a.value=new Date(a.value.getFullYear(),a.value.getMonth()+1),c()}return(n,e)=>(i(),l("div",O,[e[1]||(e[1]=o("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"📅 Verfügbarkeit",-1)),o("div",V,[o("div",E,[o("button",{class:"btn btn-secondary",onClick:x},"←"),o("h2",I,u(_.value),1),o("button",{class:"btn btn-secondary",onClick:w},"→")]),g.value?(i(),l("div",W,"Lädt...")):(i(),l("div",Y,[(i(!0),l(F,null,A(p.value,t=>{var s;return i(),l("div",{key:t.date,class:"text-center"},[o("div",B,u(t.dayOfWeek),1),o("button",{class:L(["w-10 h-10 rounded-lg font-medium transition-colors",t.isWeekend?"bg-gray-100 dark:bg-gray-700":"",(s=b(t.date))!=null&&s.available?"bg-green-500 text-white hover:bg-green-600":"bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-500"]),onClick:r=>k(t.date)},u(t.day),11,N)])}),128))])),e[0]||(e[0]=C('<div class="mt-6 flex items-center gap-4 text-sm"><div class="flex items-center gap-2"><span class="w-4 h-4 bg-green-500 rounded"></span><span>Verfügbar</span></div><div class="flex items-center gap-2"><span class="w-4 h-4 bg-gray-200 dark:bg-gray-600 rounded"></span><span>Nicht gemeldet</span></div></div>',1))])]))}});export{j as default};
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
|||||||
import{d as K,c as a,a as n,e as w,b as C,v as F,F as A,x,t as r,r as f,k as m,o as s}from"./index-CWxNv9Fc.js";const G={class:"space-y-6"},E={class:"flex items-center justify-between"},V={class:"flex items-center gap-3"},W={class:"relative"},N={key:0,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},$=["onClick"],Z={class:"text-3xl mb-3"},I={class:"text-lg font-semibold mb-1 text-gray-900 dark:text-white"},L={class:"text-sm text-gray-500 dark:text-gray-400"},T={class:"text-xs text-gray-400 mt-2"},H={key:1,class:"space-y-4"},O={class:"card bg-gray-50 dark:bg-gray-800"},R={class:"flex items-center gap-3"},q={class:"text-3xl"},j={class:"text-xl font-semibold text-gray-900 dark:text-white"},U={class:"text-sm text-gray-500 dark:text-gray-400"},J={class:"grid gap-3"},Q=["onClick"],X={class:"text-2xl"},Y={class:"font-medium text-gray-900 dark:text-white"},ee={key:2,class:"card"},ne={class:"flex items-center gap-3 mb-6 pb-4 border-b dark:border-gray-700"},te={class:"text-3xl"},ie={class:"text-xl font-semibold text-gray-900 dark:text-white"},re=["innerHTML"],le=K({__name:"HelpView",setup(ae){const l=f(""),u=f(null),o=f(null),g=[{id:"getting-started",name:"Erste Schritte",icon:"🚀",description:"Grundlagen und Einrichtung",articles:[{id:"overview",title:"Übersicht",icon:"📋",content:`
|
import{d as K,c as a,a as n,e as w,b as C,v as F,F as A,x,t as r,r as f,k as m,o as s}from"./index-CgM2qJ96.js";const G={class:"space-y-6"},E={class:"flex items-center justify-between"},V={class:"flex items-center gap-3"},W={class:"relative"},N={key:0,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"},$=["onClick"],Z={class:"text-3xl mb-3"},I={class:"text-lg font-semibold mb-1 text-gray-900 dark:text-white"},L={class:"text-sm text-gray-500 dark:text-gray-400"},T={class:"text-xs text-gray-400 mt-2"},H={key:1,class:"space-y-4"},O={class:"card bg-gray-50 dark:bg-gray-800"},R={class:"flex items-center gap-3"},q={class:"text-3xl"},j={class:"text-xl font-semibold text-gray-900 dark:text-white"},U={class:"text-sm text-gray-500 dark:text-gray-400"},J={class:"grid gap-3"},Q=["onClick"],X={class:"text-2xl"},Y={class:"font-medium text-gray-900 dark:text-white"},ee={key:2,class:"card"},ne={class:"flex items-center gap-3 mb-6 pb-4 border-b dark:border-gray-700"},te={class:"text-3xl"},ie={class:"text-xl font-semibold text-gray-900 dark:text-white"},re=["innerHTML"],le=K({__name:"HelpView",setup(ae){const l=f(""),u=f(null),o=f(null),g=[{id:"getting-started",name:"Erste Schritte",icon:"🚀",description:"Grundlagen und Einrichtung",articles:[{id:"overview",title:"Übersicht",icon:"📋",content:`
|
||||||
## Was ist SeCu?
|
## Was ist SeCu?
|
||||||
|
|
||||||
SeCu ist eine modulare Mitarbeiterverwaltung speziell für Sicherheitsunternehmen. Die Software hilft Ihnen bei:
|
SeCu ist eine modulare Mitarbeiterverwaltung speziell für Sicherheitsunternehmen. Die Software hilft Ihnen bei:
|
||||||
@@ -1 +1 @@
|
|||||||
import{d as V,q as j,m as x,c as n,a as e,F as f,x as _,b as u,v as p,s as B,e as v,r,o,t as l,n as w}from"./index-CWxNv9Fc.js";const C={class:"p-6"},D={class:"flex justify-between items-center mb-6"},M={key:0,class:"text-center py-12"},S={key:1,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},G={key:2,class:"space-y-4"},I={class:"flex justify-between items-start"},K={class:"flex items-start space-x-3"},U={class:"text-2xl"},z={class:"font-semibold"},F={class:"text-sm text-gray-500"},L={class:"text-sm text-gray-400 mt-1"},O={class:"flex flex-col items-end space-y-1"},A={key:0,class:"mt-3 text-sm text-gray-600"},E={class:"mt-3 flex items-center text-xs text-gray-500"},N={key:0,class:"ml-4"},R={key:3,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},T={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6"},$={class:"space-y-4"},q=["value"],P={class:"flex justify-end space-x-2 mt-6"},J=V({__name:"IncidentsView",setup(W){const c=r(!0),m=r([]),g=r([]),d=r(!1),i=r({title:"",description:"",category_id:"",severity:2,object_id:""});j(async()=>{await y()});async function y(){c.value=!0;try{const[a,t]=await Promise.all([x.get("/incidents"),x.get("/incidents/categories")]);m.value=a.data.incidents||[],g.value=t.data.categories||[]}catch(a){console.error(a)}c.value=!1}async function k(){try{await x.post("/incidents",i.value),d.value=!1,i.value={title:"",description:"",category_id:"",severity:2,object_id:""},await y()}catch(a){alert("Fehler: "+a.message)}}function h(a){return a>=4?"bg-red-100 text-red-700":a>=3?"bg-orange-100 text-orange-700":"bg-yellow-100 text-yellow-700"}function b(a){return{open:{text:"Offen",class:"bg-red-100 text-red-700"},in_progress:{text:"In Bearbeitung",class:"bg-yellow-100 text-yellow-700"},resolved:{text:"Gelöst",class:"bg-green-100 text-green-700"},closed:{text:"Geschlossen",class:"bg-gray-100 text-gray-700"}}[a]||{text:a,class:"bg-gray-100"}}return(a,t)=>(o(),n("div",C,[e("div",D,[t[6]||(t[6]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"🚨 Vorfallberichte"),e("p",{class:"text-gray-500"},"Incidents dokumentieren und verfolgen")],-1)),e("button",{onClick:t[0]||(t[0]=s=>d.value=!0),class:"btn btn-primary"},"+ Vorfall melden")]),c.value?(o(),n("div",M,"Laden...")):m.value.length===0?(o(),n("div",S,[...t[7]||(t[7]=[e("p",{class:"text-4xl mb-4"},"✅",-1),e("p",null,"Keine Vorfälle gemeldet",-1)])])):(o(),n("div",G,[(o(!0),n(f,null,_(m.value,s=>(o(),n("div",{key:s.id,class:"bg-white rounded-lg shadow p-4"},[e("div",I,[e("div",K,[e("span",U,l(s.category_icon||"📋"),1),e("div",null,[e("h3",z,l(s.title),1),e("p",F,l(s.category_name)+" · "+l(s.object_name||"Ohne Objekt"),1),e("p",L,l(new Date(s.occurred_at).toLocaleString("de-DE")),1)])]),e("div",O,[e("span",{class:w(["px-2 py-1 text-xs rounded",b(s.status).class])},l(b(s.status).text),3),e("span",{class:w(["px-2 py-1 text-xs rounded",h(s.severity)])}," Stufe "+l(s.severity),3)])]),s.description?(o(),n("p",A,l(s.description),1)):v("",!0),e("div",E,[e("span",null,"Gemeldet von "+l(s.reporter_first)+" "+l(s.reporter_last),1),s.attachment_count?(o(),n("span",N,"📎 "+l(s.attachment_count)+" Anhänge",1)):v("",!0)])]))),128))])),d.value?(o(),n("div",R,[e("div",T,[t[14]||(t[14]=e("h2",{class:"text-xl font-bold mb-4"},"Vorfall melden",-1)),e("div",$,[e("div",null,[t[8]||(t[8]=e("label",{class:"block text-sm font-medium mb-1"},"Titel *",-1)),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>i.value.title=s),class:"input",placeholder:"Kurze Beschreibung"},null,512),[[p,i.value.title]])]),e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium mb-1"},"Kategorie",-1)),u(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>i.value.category_id=s),class:"input"},[t[9]||(t[9]=e("option",{value:""},"-- Wählen --",-1)),(o(!0),n(f,null,_(g.value,s=>(o(),n("option",{key:s.id,value:s.id},l(s.icon)+" "+l(s.name),9,q))),128))],512),[[B,i.value.category_id]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Schweregrad (1-5)",-1)),u(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>i.value.severity=s),type:"range",min:"1",max:"5",class:"w-full"},null,512),[[p,i.value.severity,void 0,{number:!0}]]),t[12]||(t[12]=e("div",{class:"flex justify-between text-xs text-gray-500"},[e("span",null,"Gering"),e("span",null,"Kritisch")],-1))]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Beschreibung",-1)),u(e("textarea",{"onUpdate:modelValue":t[4]||(t[4]=s=>i.value.description=s),rows:"3",class:"input",placeholder:"Details..."},null,512),[[p,i.value.description]])])]),e("div",P,[e("button",{onClick:t[5]||(t[5]=s=>d.value=!1),class:"btn"},"Abbrechen"),e("button",{onClick:k,class:"btn btn-primary"},"Melden")])])])):v("",!0)]))}});export{J as default};
|
import{d as V,q as j,m as x,c as n,a as e,F as f,x as _,b as u,v as p,s as B,e as v,r,t as l,n as w,o}from"./index-CgM2qJ96.js";const C={class:"p-6"},D={class:"flex justify-between items-center mb-6"},M={key:0,class:"text-center py-12"},S={key:1,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},G={key:2,class:"space-y-4"},I={class:"flex justify-between items-start"},K={class:"flex items-start space-x-3"},U={class:"text-2xl"},z={class:"font-semibold"},F={class:"text-sm text-gray-500"},L={class:"text-sm text-gray-400 mt-1"},O={class:"flex flex-col items-end space-y-1"},A={key:0,class:"mt-3 text-sm text-gray-600"},E={class:"mt-3 flex items-center text-xs text-gray-500"},N={key:0,class:"ml-4"},R={key:3,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},T={class:"bg-white rounded-lg shadow-xl w-full max-w-lg p-6"},$={class:"space-y-4"},q=["value"],P={class:"flex justify-end space-x-2 mt-6"},J=V({__name:"IncidentsView",setup(W){const c=r(!0),m=r([]),g=r([]),d=r(!1),i=r({title:"",description:"",category_id:"",severity:2,object_id:""});j(async()=>{await y()});async function y(){c.value=!0;try{const[a,t]=await Promise.all([x.get("/incidents"),x.get("/incidents/categories")]);m.value=a.data.incidents||[],g.value=t.data.categories||[]}catch(a){console.error(a)}c.value=!1}async function k(){try{await x.post("/incidents",i.value),d.value=!1,i.value={title:"",description:"",category_id:"",severity:2,object_id:""},await y()}catch(a){alert("Fehler: "+a.message)}}function h(a){return a>=4?"bg-red-100 text-red-700":a>=3?"bg-orange-100 text-orange-700":"bg-yellow-100 text-yellow-700"}function b(a){return{open:{text:"Offen",class:"bg-red-100 text-red-700"},in_progress:{text:"In Bearbeitung",class:"bg-yellow-100 text-yellow-700"},resolved:{text:"Gelöst",class:"bg-green-100 text-green-700"},closed:{text:"Geschlossen",class:"bg-gray-100 text-gray-700"}}[a]||{text:a,class:"bg-gray-100"}}return(a,t)=>(o(),n("div",C,[e("div",D,[t[6]||(t[6]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"🚨 Vorfallberichte"),e("p",{class:"text-gray-500"},"Incidents dokumentieren und verfolgen")],-1)),e("button",{onClick:t[0]||(t[0]=s=>d.value=!0),class:"btn btn-primary"},"+ Vorfall melden")]),c.value?(o(),n("div",M,"Laden...")):m.value.length===0?(o(),n("div",S,[...t[7]||(t[7]=[e("p",{class:"text-4xl mb-4"},"✅",-1),e("p",null,"Keine Vorfälle gemeldet",-1)])])):(o(),n("div",G,[(o(!0),n(f,null,_(m.value,s=>(o(),n("div",{key:s.id,class:"bg-white rounded-lg shadow p-4"},[e("div",I,[e("div",K,[e("span",U,l(s.category_icon||"📋"),1),e("div",null,[e("h3",z,l(s.title),1),e("p",F,l(s.category_name)+" · "+l(s.object_name||"Ohne Objekt"),1),e("p",L,l(new Date(s.occurred_at).toLocaleString("de-DE")),1)])]),e("div",O,[e("span",{class:w(["px-2 py-1 text-xs rounded",b(s.status).class])},l(b(s.status).text),3),e("span",{class:w(["px-2 py-1 text-xs rounded",h(s.severity)])}," Stufe "+l(s.severity),3)])]),s.description?(o(),n("p",A,l(s.description),1)):v("",!0),e("div",E,[e("span",null,"Gemeldet von "+l(s.reporter_first)+" "+l(s.reporter_last),1),s.attachment_count?(o(),n("span",N,"📎 "+l(s.attachment_count)+" Anhänge",1)):v("",!0)])]))),128))])),d.value?(o(),n("div",R,[e("div",T,[t[14]||(t[14]=e("h2",{class:"text-xl font-bold mb-4"},"Vorfall melden",-1)),e("div",$,[e("div",null,[t[8]||(t[8]=e("label",{class:"block text-sm font-medium mb-1"},"Titel *",-1)),u(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>i.value.title=s),class:"input",placeholder:"Kurze Beschreibung"},null,512),[[p,i.value.title]])]),e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium mb-1"},"Kategorie",-1)),u(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>i.value.category_id=s),class:"input"},[t[9]||(t[9]=e("option",{value:""},"-- Wählen --",-1)),(o(!0),n(f,null,_(g.value,s=>(o(),n("option",{key:s.id,value:s.id},l(s.icon)+" "+l(s.name),9,q))),128))],512),[[B,i.value.category_id]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Schweregrad (1-5)",-1)),u(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>i.value.severity=s),type:"range",min:"1",max:"5",class:"w-full"},null,512),[[p,i.value.severity,void 0,{number:!0}]]),t[12]||(t[12]=e("div",{class:"flex justify-between text-xs text-gray-500"},[e("span",null,"Gering"),e("span",null,"Kritisch")],-1))]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Beschreibung",-1)),u(e("textarea",{"onUpdate:modelValue":t[4]||(t[4]=s=>i.value.description=s),rows:"3",class:"input",placeholder:"Details..."},null,512),[[p,i.value.description]])])]),e("div",P,[e("button",{onClick:t[5]||(t[5]=s=>d.value=!1),class:"btn"},"Abbrechen"),e("button",{onClick:k,class:"btn btn-primary"},"Melden")])])])):v("",!0)]))}});export{J as default};
|
||||||
@@ -1 +1 @@
|
|||||||
import{d as h,u as q,r as a,c,a as e,t as g,w as B,b as r,v as n,F as N,e as k,f as R,g as U,o as f}from"./index-CWxNv9Fc.js";const A={class:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"},M={class:"max-w-md w-full space-y-8"},C={class:"card"},E={class:"text-xl font-semibold text-gray-900 dark:text-white mb-6"},D={class:"grid grid-cols-2 gap-4"},F=["placeholder"],O={key:1,class:"p-3 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-lg text-sm"},T=["disabled"],j={class:"mt-4 text-center"},L=h({__name:"LoginView",setup(z){const w=R(),V=U(),m=q(),o=a(""),u=a(""),i=a(m.orgSlug||""),p=a(""),v=a(!1),s=a(!1),x=a(""),y=a(""),b=a("");async function S(){p.value="",v.value=!0;try{s.value?(await m.register({email:o.value,password:u.value,first_name:x.value,last_name:y.value,phone:b.value,org_slug:i.value}),await m.login(o.value,u.value,i.value)):await m.login(o.value,u.value,i.value);const d=V.query.redirect||"/";w.push(d)}catch(d){p.value=d instanceof Error?d.message:"Anmeldung fehlgeschlagen"}finally{v.value=!1}}return(d,t)=>(f(),c("div",A,[e("div",M,[t[13]||(t[13]=e("div",{class:"text-center"},[e("h1",{class:"text-4xl font-bold text-primary-600"},"🔐 SeCu"),e("p",{class:"mt-2 text-gray-600 dark:text-gray-400"},"Mitarbeiterverwaltung")],-1)),e("div",C,[e("h2",E,g(s.value?"Registrieren":"Anmelden"),1),e("form",{onSubmit:B(S,["prevent"]),class:"space-y-4"},[e("div",null,[t[7]||(t[7]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Organisation ",-1)),r(e("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),type:"text",required:"",class:"input",placeholder:"z.B. demo"},null,512),[[n,i.value]])]),e("div",null,[t[8]||(t[8]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," E-Mail ",-1)),r(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>o.value=l),type:"email",required:"",class:"input",placeholder:"name@firma.de"},null,512),[[n,o.value]])]),s.value?(f(),c(N,{key:0},[e("div",D,[e("div",null,[t[9]||(t[9]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Vorname ",-1)),r(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>x.value=l),type:"text",required:"",class:"input"},null,512),[[n,x.value]])]),e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Nachname ",-1)),r(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>y.value=l),type:"text",required:"",class:"input"},null,512),[[n,y.value]])])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Telefon ",-1)),r(e("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>b.value=l),type:"tel",class:"input",placeholder:"Optional"},null,512),[[n,b.value]])])],64)):k("",!0),e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Passwort ",-1)),r(e("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>u.value=l),type:"password",required:"",class:"input",placeholder:s.value?"Mindestens 8 Zeichen":""},null,8,F),[[n,u.value]])]),p.value?(f(),c("div",O,g(p.value),1)):k("",!0),e("button",{type:"submit",disabled:v.value,class:"btn btn-primary w-full"},g(v.value?"Bitte warten...":s.value?"Registrieren":"Anmelden"),9,T)],32),e("div",j,[e("button",{type:"button",class:"text-sm text-primary-600 hover:text-primary-700",onClick:t[6]||(t[6]=l=>s.value=!s.value)},g(s.value?"Bereits registriert? Anmelden":"Noch kein Konto? Registrieren"),1)])])])]))}});export{L as default};
|
import{d as h,u as q,r as a,c,a as e,t as g,w as B,b as r,v as n,F as N,e as k,f as R,g as U,o as f}from"./index-CgM2qJ96.js";const A={class:"min-h-screen flex items-center justify-center bg-gray-50 dark:bg-gray-900 py-12 px-4 sm:px-6 lg:px-8"},M={class:"max-w-md w-full space-y-8"},C={class:"card"},E={class:"text-xl font-semibold text-gray-900 dark:text-white mb-6"},D={class:"grid grid-cols-2 gap-4"},F=["placeholder"],O={key:1,class:"p-3 bg-red-50 dark:bg-red-900/20 text-red-600 dark:text-red-400 rounded-lg text-sm"},T=["disabled"],j={class:"mt-4 text-center"},L=h({__name:"LoginView",setup(z){const w=R(),V=U(),m=q(),o=a(""),u=a(""),i=a(m.orgSlug||""),p=a(""),v=a(!1),s=a(!1),x=a(""),y=a(""),b=a("");async function S(){p.value="",v.value=!0;try{s.value?(await m.register({email:o.value,password:u.value,first_name:x.value,last_name:y.value,phone:b.value,org_slug:i.value}),await m.login(o.value,u.value,i.value)):await m.login(o.value,u.value,i.value);const d=V.query.redirect||"/";w.push(d)}catch(d){p.value=d instanceof Error?d.message:"Anmeldung fehlgeschlagen"}finally{v.value=!1}}return(d,t)=>(f(),c("div",A,[e("div",M,[t[13]||(t[13]=e("div",{class:"text-center"},[e("h1",{class:"text-4xl font-bold text-primary-600"},"🔐 SeCu"),e("p",{class:"mt-2 text-gray-600 dark:text-gray-400"},"Mitarbeiterverwaltung")],-1)),e("div",C,[e("h2",E,g(s.value?"Registrieren":"Anmelden"),1),e("form",{onSubmit:B(S,["prevent"]),class:"space-y-4"},[e("div",null,[t[7]||(t[7]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Organisation ",-1)),r(e("input",{"onUpdate:modelValue":t[0]||(t[0]=l=>i.value=l),type:"text",required:"",class:"input",placeholder:"z.B. demo"},null,512),[[n,i.value]])]),e("div",null,[t[8]||(t[8]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," E-Mail ",-1)),r(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>o.value=l),type:"email",required:"",class:"input",placeholder:"name@firma.de"},null,512),[[n,o.value]])]),s.value?(f(),c(N,{key:0},[e("div",D,[e("div",null,[t[9]||(t[9]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Vorname ",-1)),r(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>x.value=l),type:"text",required:"",class:"input"},null,512),[[n,x.value]])]),e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Nachname ",-1)),r(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>y.value=l),type:"text",required:"",class:"input"},null,512),[[n,y.value]])])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Telefon ",-1)),r(e("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>b.value=l),type:"tel",class:"input",placeholder:"Optional"},null,512),[[n,b.value]])])],64)):k("",!0),e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"}," Passwort ",-1)),r(e("input",{"onUpdate:modelValue":t[5]||(t[5]=l=>u.value=l),type:"password",required:"",class:"input",placeholder:s.value?"Mindestens 8 Zeichen":""},null,8,F),[[n,u.value]])]),p.value?(f(),c("div",O,g(p.value),1)):k("",!0),e("button",{type:"submit",disabled:v.value,class:"btn btn-primary w-full"},g(v.value?"Bitte warten...":s.value?"Registrieren":"Anmelden"),9,T)],32),e("div",j,[e("button",{type:"button",class:"text-sm text-primary-600 hover:text-primary-700",onClick:t[6]||(t[6]=l=>s.value=!s.value)},g(s.value?"Bereits registriert? Anmelden":"Noch kein Konto? Registrieren"),1)])])])]))}});export{L as default};
|
||||||
@@ -1 +1 @@
|
|||||||
import{d as k,q as h,m as d,c as l,a as t,t as r,e as u,F as w,x as M,r as c,o as n,n as f}from"./index-CWxNv9Fc.js";const S={class:"space-y-6"},C={key:0,class:"card bg-gradient-to-r from-primary-500 to-primary-700 text-white"},B={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},V={class:"text-2xl font-bold"},z={class:"text-2xl font-bold"},A={class:"text-2xl font-bold"},F={class:"text-2xl font-bold"},D={class:"card"},E={key:0,class:"text-center py-8 text-gray-500"},L={key:1,class:"space-y-4"},N={class:"flex-1"},$={class:"flex items-center gap-2"},j={class:"font-medium text-gray-900 dark:text-white"},q={key:0,class:"badge badge-primary"},H={key:0,class:"text-sm text-gray-500 mt-1"},P=["disabled","onClick"],K=k({__name:"ModulesView",setup(G){const g=c([]),i=c(!0),o=c(null);h(async()=>{await Promise.all([b(),v()])});async function b(){i.value=!0;try{const s=await d.get("/modules/org");g.value=s.data.modules}catch(s){console.error(s)}finally{i.value=!1}}async function v(){try{const s=await d.get("/modules/developer/status");o.value=s.data}catch{console.log("Dev status not available")}}async function _(s){if(!s.is_core)try{await d.post(`/modules/${s.id}/toggle`,{enabled:!s.enabled}),s.enabled=!s.enabled}catch(e){alert(e instanceof Error?e.message:"Fehler")}}return(s,e)=>{var m,p,y,x;return n(),l("div",S,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"⚙️ Module",-1)),o.value?(n(),l("div",C,[e[4]||(e[4]=t("h2",{class:"text-lg font-semibold mb-4"},"System Status",-1)),t("div",B,[t("div",null,[e[0]||(e[0]=t("p",{class:"text-primary-100 text-sm"},"Benutzer",-1)),t("p",V,r(((m=o.value.stats)==null?void 0:m.user_count)||0),1)]),t("div",null,[e[1]||(e[1]=t("p",{class:"text-primary-100 text-sm"},"Aufträge",-1)),t("p",z,r(((p=o.value.stats)==null?void 0:p.order_count)||0),1)]),t("div",null,[e[2]||(e[2]=t("p",{class:"text-primary-100 text-sm"},"Stundenzettel",-1)),t("p",A,r(((y=o.value.stats)==null?void 0:y.timesheet_count)||0),1)]),t("div",null,[e[3]||(e[3]=t("p",{class:"text-primary-100 text-sm"},"Aktive Module",-1)),t("p",F,r(((x=o.value.stats)==null?void 0:x.enabled_modules)||0),1)])])])):u("",!0),t("div",D,[e[5]||(e[5]=t("h2",{class:"text-lg font-semibold mb-4"},"Verfügbare Module",-1)),i.value?(n(),l("div",E,"Lädt...")):(n(),l("div",L,[(n(!0),l(w,null,M(g.value,a=>(n(),l("div",{key:a.id,class:"flex items-center justify-between p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[t("div",N,[t("div",$,[t("h3",j,r(a.display_name),1),a.is_core?(n(),l("span",q,"Core")):u("",!0)]),a.description?(n(),l("p",H,r(a.description),1)):u("",!0)]),t("button",{disabled:a.is_core,class:f(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors",a.enabled?"bg-primary-600":"bg-gray-200 dark:bg-gray-600",a.is_core?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:I=>_(a)},[t("span",{class:f(["inline-block h-4 w-4 transform rounded-full bg-white transition-transform",a.enabled?"translate-x-6":"translate-x-1"])},null,2)],10,P)]))),128))]))]),e[7]||(e[7]=t("div",{class:"card"},[t("h2",{class:"text-lg font-semibold mb-2"},"Hinweis"),t("p",{class:"text-gray-500 text-sm"}," Core-Module (Basis-System, Auftragsverwaltung) können nicht deaktiviert werden. Änderungen an Modulen werden sofort wirksam. ")],-1))])}}});export{K as default};
|
import{d as k,q as h,m as d,c as l,a as t,t as r,e as u,F as w,x as M,r as c,n as f,o as n}from"./index-CgM2qJ96.js";const S={class:"space-y-6"},C={key:0,class:"card bg-gradient-to-r from-primary-500 to-primary-700 text-white"},B={class:"grid grid-cols-2 md:grid-cols-4 gap-4"},V={class:"text-2xl font-bold"},z={class:"text-2xl font-bold"},A={class:"text-2xl font-bold"},F={class:"text-2xl font-bold"},D={class:"card"},E={key:0,class:"text-center py-8 text-gray-500"},L={key:1,class:"space-y-4"},N={class:"flex-1"},$={class:"flex items-center gap-2"},j={class:"font-medium text-gray-900 dark:text-white"},q={key:0,class:"badge badge-primary"},H={key:0,class:"text-sm text-gray-500 mt-1"},P=["disabled","onClick"],K=k({__name:"ModulesView",setup(G){const g=c([]),i=c(!0),o=c(null);h(async()=>{await Promise.all([b(),v()])});async function b(){i.value=!0;try{const s=await d.get("/modules/org");g.value=s.data.modules}catch(s){console.error(s)}finally{i.value=!1}}async function v(){try{const s=await d.get("/modules/developer/status");o.value=s.data}catch{console.log("Dev status not available")}}async function _(s){if(!s.is_core)try{await d.post(`/modules/${s.id}/toggle`,{enabled:!s.enabled}),s.enabled=!s.enabled}catch(e){alert(e instanceof Error?e.message:"Fehler")}}return(s,e)=>{var m,p,y,x;return n(),l("div",S,[e[6]||(e[6]=t("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"⚙️ Module",-1)),o.value?(n(),l("div",C,[e[4]||(e[4]=t("h2",{class:"text-lg font-semibold mb-4"},"System Status",-1)),t("div",B,[t("div",null,[e[0]||(e[0]=t("p",{class:"text-primary-100 text-sm"},"Benutzer",-1)),t("p",V,r(((m=o.value.stats)==null?void 0:m.user_count)||0),1)]),t("div",null,[e[1]||(e[1]=t("p",{class:"text-primary-100 text-sm"},"Aufträge",-1)),t("p",z,r(((p=o.value.stats)==null?void 0:p.order_count)||0),1)]),t("div",null,[e[2]||(e[2]=t("p",{class:"text-primary-100 text-sm"},"Stundenzettel",-1)),t("p",A,r(((y=o.value.stats)==null?void 0:y.timesheet_count)||0),1)]),t("div",null,[e[3]||(e[3]=t("p",{class:"text-primary-100 text-sm"},"Aktive Module",-1)),t("p",F,r(((x=o.value.stats)==null?void 0:x.enabled_modules)||0),1)])])])):u("",!0),t("div",D,[e[5]||(e[5]=t("h2",{class:"text-lg font-semibold mb-4"},"Verfügbare Module",-1)),i.value?(n(),l("div",E,"Lädt...")):(n(),l("div",L,[(n(!0),l(w,null,M(g.value,a=>(n(),l("div",{key:a.id,class:"flex items-center justify-between p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[t("div",N,[t("div",$,[t("h3",j,r(a.display_name),1),a.is_core?(n(),l("span",q,"Core")):u("",!0)]),a.description?(n(),l("p",H,r(a.description),1)):u("",!0)]),t("button",{disabled:a.is_core,class:f(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors",a.enabled?"bg-primary-600":"bg-gray-200 dark:bg-gray-600",a.is_core?"opacity-50 cursor-not-allowed":"cursor-pointer"]),onClick:I=>_(a)},[t("span",{class:f(["inline-block h-4 w-4 transform rounded-full bg-white transition-transform",a.enabled?"translate-x-6":"translate-x-1"])},null,2)],10,P)]))),128))]))]),e[7]||(e[7]=t("div",{class:"card"},[t("h2",{class:"text-lg font-semibold mb-2"},"Hinweis"),t("p",{class:"text-gray-500 text-sm"}," Core-Module (Basis-System, Auftragsverwaltung) können nicht deaktiviert werden. Änderungen an Modulen werden sofort wirksam. ")],-1))])}}});export{K as default};
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{d as A,u as $,q as B,m as p,c as r,i as S,j as V,a as e,t as o,e as l,n as _,y as k,F as h,x as E,g as M,f as N,r as y,l as D,o as i,p as F}from"./index-CWxNv9Fc.js";const L={key:0,class:"text-center py-12 text-gray-500"},j={key:1,class:"space-y-6"},z={class:"card"},O={class:"flex items-start justify-between"},q={class:"flex items-center gap-3"},I={class:"text-gray-500"},R={class:"text-2xl font-bold text-gray-900 dark:text-white"},Z={key:0,class:"mt-2 text-gray-600 dark:text-gray-400"},H={class:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-6"},K={key:0},T={class:"font-medium"},G={key:1},J={class:"font-medium"},P={key:2},Q={class:"font-medium"},U={class:"font-medium"},W={key:0,class:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700"},X={class:"flex flex-wrap gap-2"},Y={class:"card"},tt={key:0,class:"text-center py-4 text-gray-500"},et={key:1,class:"space-y-3"},st={class:"font-medium text-gray-900 dark:text-white"},at={class:"text-sm text-gray-500"},nt={class:"flex items-center gap-2"},rt={key:0,class:"card"},ot={class:"text-gray-600 dark:text-gray-400 whitespace-pre-wrap"},dt=A({__name:"OrderDetailView",setup(it){const c=M(),w=N(),m=$(),s=y(null),d=y([]),v=y(!0);B(async()=>{try{const n=await p.get(`/orders/${c.params.id}`);s.value=n.data.order,d.value=n.data.assignments}catch(n){console.error(n),w.push("/orders")}finally{v.value=!1}});async function u(n){try{await p.put(`/orders/${c.params.id}`,{status:n}),s.value.status=n}catch(t){alert(t instanceof Error?t.message:"Fehler")}}async function x(n){try{await p.put(`/orders/${c.params.id}/assignment`,{status:n?"confirmed":"declined"});const t=d.value.find(g=>{var a;return g.user_id===((a=m.user)==null?void 0:a.id)});t&&(t.status=n?"confirmed":"declined")}catch(t){alert(t instanceof Error?t.message:"Fehler")}}function b(n){return{draft:"Entwurf",published:"Veröffentlicht",in_progress:"In Bearbeitung",completed:"Abgeschlossen",cancelled:"Abgesagt",pending:"Ausstehend",confirmed:"Bestätigt",declined:"Abgelehnt"}[n]||n}return(n,t)=>{const g=D("router-link");return v.value?(i(),r("div",L,"Lädt...")):s.value?(i(),r("div",j,[S(g,{to:"/orders",class:"text-primary-600 hover:text-primary-700 text-sm"},{default:V(()=>[...t[6]||(t[6]=[F(" ← Zurück zu Aufträge ",-1)])]),_:1}),e("div",z,[e("div",O,[e("div",null,[e("div",q,[e("span",I,"#"+o(s.value.number),1),e("h1",R,o(s.value.title),1)]),s.value.description?(i(),r("p",Z,o(s.value.description),1)):l("",!0)]),e("span",{class:_(["badge",s.value.status==="completed"?"badge-success":"badge-primary"])},o(b(s.value.status)),3)]),e("div",H,[s.value.location?(i(),r("div",K,[t[7]||(t[7]=e("p",{class:"text-sm text-gray-500"},"Ort",-1)),e("p",T,"📍 "+o(s.value.location),1)])):l("",!0),s.value.start_time?(i(),r("div",G,[t[8]||(t[8]=e("p",{class:"text-sm text-gray-500"},"Start",-1)),e("p",J,o(new Date(s.value.start_time).toLocaleString("de-DE")),1)])):l("",!0),s.value.client_name?(i(),r("div",P,[t[9]||(t[9]=e("p",{class:"text-sm text-gray-500"},"Kunde",-1)),e("p",Q,o(s.value.client_name),1)])):l("",!0),e("div",null,[t[10]||(t[10]=e("p",{class:"text-sm text-gray-500"},"Benötigte MA",-1)),e("p",U,o(d.value.length)+"/"+o(s.value.required_staff),1)])]),k(m).canManageOrders?(i(),r("div",W,[t[11]||(t[11]=e("p",{class:"text-sm text-gray-500 mb-2"},"Status ändern:",-1)),e("div",X,[e("button",{class:"btn btn-secondary text-sm",onClick:t[0]||(t[0]=a=>u("draft"))},"Entwurf"),e("button",{class:"btn btn-primary text-sm",onClick:t[1]||(t[1]=a=>u("published"))},"Veröffentlichen"),e("button",{class:"btn btn-warning text-sm",onClick:t[2]||(t[2]=a=>u("in_progress"))},"In Bearbeitung"),e("button",{class:"btn btn-success text-sm",onClick:t[3]||(t[3]=a=>u("completed"))},"Abschließen")])])):l("",!0)]),e("div",Y,[t[12]||(t[12]=e("h2",{class:"text-lg font-semibold text-gray-900 dark:text-white mb-4"}," 👥 Zugewiesene Mitarbeiter ",-1)),d.value.length===0?(i(),r("div",tt," Noch keine Mitarbeiter zugewiesen ")):(i(),r("div",et,[(i(!0),r(h,null,E(d.value,a=>{var f;return i(),r("div",{key:a.id,class:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[e("div",null,[e("p",st,o(a.user_name),1),e("p",at,o(a.user_phone),1)]),e("div",nt,[e("span",{class:_(["badge",a.status==="confirmed"?"badge-success":a.status==="declined"?"badge-danger":"badge-warning"])},o(b(a.status)),3),a.user_id===((f=k(m).user)==null?void 0:f.id)&&a.status==="pending"?(i(),r(h,{key:0},[e("button",{class:"btn btn-success text-sm",onClick:t[4]||(t[4]=C=>x(!0))},"✓"),e("button",{class:"btn btn-danger text-sm",onClick:t[5]||(t[5]=C=>x(!1))},"✗")],64)):l("",!0)])])}),128))]))]),s.value.special_instructions?(i(),r("div",rt,[t[13]||(t[13]=e("h2",{class:"text-lg font-semibold text-gray-900 dark:text-white mb-2"}," 📝 Besondere Hinweise ",-1)),e("p",ot,o(s.value.special_instructions),1)])):l("",!0)])):l("",!0)}}});export{dt as default};
|
import{d as A,u as $,q as B,m as p,c as r,i as S,j as V,a as e,t as o,e as l,n as _,z as k,F as h,x as E,g as M,f as N,r as v,l as z,p as D,o as i}from"./index-CgM2qJ96.js";const F={key:0,class:"text-center py-12 text-gray-500"},L={key:1,class:"space-y-6"},j={class:"card"},O={class:"flex items-start justify-between"},q={class:"flex items-center gap-3"},I={class:"text-gray-500"},R={class:"text-2xl font-bold text-gray-900 dark:text-white"},Z={key:0,class:"mt-2 text-gray-600 dark:text-gray-400"},H={class:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-6"},K={key:0},T={class:"font-medium"},G={key:1},J={class:"font-medium"},P={key:2},Q={class:"font-medium"},U={class:"font-medium"},W={key:0,class:"mt-6 pt-6 border-t border-gray-200 dark:border-gray-700"},X={class:"flex flex-wrap gap-2"},Y={class:"card"},tt={key:0,class:"text-center py-4 text-gray-500"},et={key:1,class:"space-y-3"},st={class:"font-medium text-gray-900 dark:text-white"},at={class:"text-sm text-gray-500"},nt={class:"flex items-center gap-2"},rt={key:0,class:"card"},ot={class:"text-gray-600 dark:text-gray-400 whitespace-pre-wrap"},dt=A({__name:"OrderDetailView",setup(it){const c=M(),w=N(),m=$(),s=v(null),d=v([]),x=v(!0);B(async()=>{try{const n=await p.get(`/orders/${c.params.id}`);s.value=n.data.order,d.value=n.data.assignments}catch(n){console.error(n),w.push("/orders")}finally{x.value=!1}});async function u(n){try{await p.put(`/orders/${c.params.id}`,{status:n}),s.value.status=n}catch(t){alert(t instanceof Error?t.message:"Fehler")}}async function y(n){try{await p.put(`/orders/${c.params.id}/assignment`,{status:n?"confirmed":"declined"});const t=d.value.find(g=>{var a;return g.user_id===((a=m.user)==null?void 0:a.id)});t&&(t.status=n?"confirmed":"declined")}catch(t){alert(t instanceof Error?t.message:"Fehler")}}function b(n){return{draft:"Entwurf",published:"Veröffentlicht",in_progress:"In Bearbeitung",completed:"Abgeschlossen",cancelled:"Abgesagt",pending:"Ausstehend",confirmed:"Bestätigt",declined:"Abgelehnt"}[n]||n}return(n,t)=>{const g=z("router-link");return x.value?(i(),r("div",F,"Lädt...")):s.value?(i(),r("div",L,[S(g,{to:"/orders",class:"text-primary-600 hover:text-primary-700 text-sm"},{default:V(()=>[...t[6]||(t[6]=[D(" ← Zurück zu Aufträge ",-1)])]),_:1}),e("div",j,[e("div",O,[e("div",null,[e("div",q,[e("span",I,"#"+o(s.value.number),1),e("h1",R,o(s.value.title),1)]),s.value.description?(i(),r("p",Z,o(s.value.description),1)):l("",!0)]),e("span",{class:_(["badge",s.value.status==="completed"?"badge-success":"badge-primary"])},o(b(s.value.status)),3)]),e("div",H,[s.value.location?(i(),r("div",K,[t[7]||(t[7]=e("p",{class:"text-sm text-gray-500"},"Ort",-1)),e("p",T,"📍 "+o(s.value.location),1)])):l("",!0),s.value.start_time?(i(),r("div",G,[t[8]||(t[8]=e("p",{class:"text-sm text-gray-500"},"Start",-1)),e("p",J,o(new Date(s.value.start_time).toLocaleString("de-DE")),1)])):l("",!0),s.value.client_name?(i(),r("div",P,[t[9]||(t[9]=e("p",{class:"text-sm text-gray-500"},"Kunde",-1)),e("p",Q,o(s.value.client_name),1)])):l("",!0),e("div",null,[t[10]||(t[10]=e("p",{class:"text-sm text-gray-500"},"Benötigte MA",-1)),e("p",U,o(d.value.length)+"/"+o(s.value.required_staff),1)])]),k(m).canManageOrders?(i(),r("div",W,[t[11]||(t[11]=e("p",{class:"text-sm text-gray-500 mb-2"},"Status ändern:",-1)),e("div",X,[e("button",{class:"btn btn-secondary text-sm",onClick:t[0]||(t[0]=a=>u("draft"))},"Entwurf"),e("button",{class:"btn btn-primary text-sm",onClick:t[1]||(t[1]=a=>u("published"))},"Veröffentlichen"),e("button",{class:"btn btn-warning text-sm",onClick:t[2]||(t[2]=a=>u("in_progress"))},"In Bearbeitung"),e("button",{class:"btn btn-success text-sm",onClick:t[3]||(t[3]=a=>u("completed"))},"Abschließen")])])):l("",!0)]),e("div",Y,[t[12]||(t[12]=e("h2",{class:"text-lg font-semibold text-gray-900 dark:text-white mb-4"}," 👥 Zugewiesene Mitarbeiter ",-1)),d.value.length===0?(i(),r("div",tt," Noch keine Mitarbeiter zugewiesen ")):(i(),r("div",et,[(i(!0),r(h,null,E(d.value,a=>{var f;return i(),r("div",{key:a.id,class:"flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[e("div",null,[e("p",st,o(a.user_name),1),e("p",at,o(a.user_phone),1)]),e("div",nt,[e("span",{class:_(["badge",a.status==="confirmed"?"badge-success":a.status==="declined"?"badge-danger":"badge-warning"])},o(b(a.status)),3),a.user_id===((f=k(m).user)==null?void 0:f.id)&&a.status==="pending"?(i(),r(h,{key:0},[e("button",{class:"btn btn-success text-sm",onClick:t[4]||(t[4]=C=>y(!0))},"✓"),e("button",{class:"btn btn-danger text-sm",onClick:t[5]||(t[5]=C=>y(!1))},"✗")],64)):l("",!0)])])}),128))]))]),s.value.special_instructions?(i(),r("div",rt,[t[13]||(t[13]=e("h2",{class:"text-lg font-semibold text-gray-900 dark:text-white mb-2"}," 📝 Besondere Hinweise ",-1)),e("p",ot,o(s.value.special_instructions),1)])):l("",!0)])):l("",!0)}}});export{dt as default};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
import{d as h,q as k,m,c as s,a as t,n as u,t as a,F as g,x as _,e as v,r as d,o as n}from"./index-CWxNv9Fc.js";const f={class:"p-6"},w={class:"flex space-x-1 border-b mb-6"},C={key:0,class:"text-center py-12"},R={key:1},j={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},M={key:1,class:"grid md:grid-cols-2 lg:grid-cols-3 gap-4"},D={class:"flex justify-between items-start"},B={class:"font-semibold"},E={class:"text-sm text-gray-500"},K={class:"text-xs text-gray-400 mt-1"},L={class:"text-2xl"},T={class:"mt-3 p-2 bg-gray-100 rounded text-xs font-mono break-all"},V={key:2},$={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},A={key:1,class:"space-y-4"},F={class:"flex justify-between items-start"},N={class:"font-semibold"},P={class:"text-sm text-gray-500"},S={class:"mt-3 flex gap-4 text-sm text-gray-600"},q={key:0},z={key:1},I={key:3},O={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},Q={key:1,class:"bg-white rounded-lg shadow overflow-hidden"},W={class:"min-w-full divide-y divide-gray-200"},Z={class:"divide-y divide-gray-200"},G={class:"px-4 py-3 text-sm"},H={class:"px-4 py-3 text-sm"},J={class:"px-4 py-3 text-sm"},U={class:"px-4 py-3 text-sm text-gray-500"},tt=h({__name:"PatrolsView",setup(X){const p=d(!0),r=d([]),c=d([]),x=d([]),l=d("checkpoints");k(async()=>{await y()});async function y(){p.value=!0;try{const[i,o,e]=await Promise.all([m.get("/patrols/checkpoints"),m.get("/patrols/routes"),m.get("/patrols/logs")]);r.value=i.data.checkpoints||[],c.value=o.data.routes||[],x.value=e.data.logs||[]}catch(i){console.error(i)}p.value=!1}function b(i){return new Date(i).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})}return(i,o)=>(n(),s("div",f,[o[7]||(o[7]=t("div",{class:"flex justify-between items-center mb-6"},[t("div",null,[t("h1",{class:"text-2xl font-bold"},"📍 Wächterkontrolle"),t("p",{class:"text-gray-500"},"Checkpoints, Routen & Rundgänge")])],-1)),t("div",w,[t("button",{onClick:o[0]||(o[0]=e=>l.value="checkpoints"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="checkpoints"?"border-blue-600 text-blue-600":"border-transparent"])}," Checkpoints ("+a(r.value.length)+") ",3),t("button",{onClick:o[1]||(o[1]=e=>l.value="routes"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="routes"?"border-blue-600 text-blue-600":"border-transparent"])}," Routen ("+a(c.value.length)+") ",3),t("button",{onClick:o[2]||(o[2]=e=>l.value="logs"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="logs"?"border-blue-600 text-blue-600":"border-transparent"])}," Rundgänge ",2)]),p.value?(n(),s("div",C,"Laden...")):l.value==="checkpoints"?(n(),s("div",R,[r.value.length===0?(n(),s("div",j,[...o[3]||(o[3]=[t("p",{class:"text-4xl mb-4"},"📍",-1),t("p",null,"Keine Checkpoints vorhanden",-1),t("p",{class:"text-sm mt-2"},"Erstelle Checkpoints mit QR-Codes für Rundgänge",-1)])])):(n(),s("div",M,[(n(!0),s(g,null,_(r.value,e=>(n(),s("div",{key:e.id,class:"bg-white rounded-lg shadow p-4"},[t("div",D,[t("div",null,[t("h3",B,a(e.name),1),t("p",E,a(e.object_name),1),t("p",K,a(e.location_description),1)]),t("span",L,a(e.checkpoint_type==="nfc"?"📶":"📱"),1)]),t("div",T,a(e.code),1)]))),128))]))])):l.value==="routes"?(n(),s("div",V,[c.value.length===0?(n(),s("div",$,[...o[4]||(o[4]=[t("p",{class:"text-4xl mb-4"},"🗺️",-1),t("p",null,"Keine Routen definiert",-1)])])):(n(),s("div",A,[(n(!0),s(g,null,_(c.value,e=>(n(),s("div",{key:e.id,class:"bg-white rounded-lg shadow p-4"},[t("div",F,[t("div",null,[t("h3",N,a(e.name),1),t("p",P,a(e.object_name),1)]),t("span",{class:u(["px-2 py-1 text-xs rounded",e.is_active?"bg-green-100 text-green-700":"bg-gray-100"])},a(e.is_active?"Aktiv":"Inaktiv"),3)]),t("div",S,[t("span",null,"📍 "+a(e.checkpoint_count||0)+" Checkpoints",1),e.time_limit_minutes?(n(),s("span",q,"⏱️ Max "+a(e.time_limit_minutes)+" Min",1)):v("",!0),e.interval_minutes?(n(),s("span",z,"🔄 Alle "+a(e.interval_minutes)+" Min",1)):v("",!0)])]))),128))]))])):l.value==="logs"?(n(),s("div",I,[x.value.length===0?(n(),s("div",O,[...o[5]||(o[5]=[t("p",{class:"text-4xl mb-4"},"📋",-1),t("p",null,"Keine Rundgänge heute",-1)])])):(n(),s("div",Q,[t("table",W,[o[6]||(o[6]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Zeit"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Mitarbeiter"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Checkpoint"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Objekt")])],-1)),t("tbody",Z,[(n(!0),s(g,null,_(x.value,e=>(n(),s("tr",{key:e.id,class:"hover:bg-gray-50"},[t("td",G,a(b(e.scanned_at)),1),t("td",H,a(e.first_name)+" "+a(e.last_name),1),t("td",J,a(e.checkpoint_name),1),t("td",U,a(e.object_name),1)]))),128))])])]))])):v("",!0)]))}});export{tt as default};
|
import{d as h,q as k,m,c as s,a as t,n as u,t as a,F as g,x as _,e as v,r as d,o as n}from"./index-CgM2qJ96.js";const f={class:"p-6"},w={class:"flex space-x-1 border-b mb-6"},C={key:0,class:"text-center py-12"},R={key:1},j={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},M={key:1,class:"grid md:grid-cols-2 lg:grid-cols-3 gap-4"},D={class:"flex justify-between items-start"},B={class:"font-semibold"},E={class:"text-sm text-gray-500"},K={class:"text-xs text-gray-400 mt-1"},L={class:"text-2xl"},T={class:"mt-3 p-2 bg-gray-100 rounded text-xs font-mono break-all"},V={key:2},$={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},A={key:1,class:"space-y-4"},F={class:"flex justify-between items-start"},N={class:"font-semibold"},P={class:"text-sm text-gray-500"},S={class:"mt-3 flex gap-4 text-sm text-gray-600"},q={key:0},z={key:1},I={key:3},O={key:0,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},Q={key:1,class:"bg-white rounded-lg shadow overflow-hidden"},W={class:"min-w-full divide-y divide-gray-200"},Z={class:"divide-y divide-gray-200"},G={class:"px-4 py-3 text-sm"},H={class:"px-4 py-3 text-sm"},J={class:"px-4 py-3 text-sm"},U={class:"px-4 py-3 text-sm text-gray-500"},tt=h({__name:"PatrolsView",setup(X){const p=d(!0),r=d([]),c=d([]),x=d([]),l=d("checkpoints");k(async()=>{await y()});async function y(){p.value=!0;try{const[i,o,e]=await Promise.all([m.get("/patrols/checkpoints"),m.get("/patrols/routes"),m.get("/patrols/logs")]);r.value=i.data.checkpoints||[],c.value=o.data.routes||[],x.value=e.data.logs||[]}catch(i){console.error(i)}p.value=!1}function b(i){return new Date(i).toLocaleTimeString("de-DE",{hour:"2-digit",minute:"2-digit"})}return(i,o)=>(n(),s("div",f,[o[7]||(o[7]=t("div",{class:"flex justify-between items-center mb-6"},[t("div",null,[t("h1",{class:"text-2xl font-bold"},"📍 Wächterkontrolle"),t("p",{class:"text-gray-500"},"Checkpoints, Routen & Rundgänge")])],-1)),t("div",w,[t("button",{onClick:o[0]||(o[0]=e=>l.value="checkpoints"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="checkpoints"?"border-blue-600 text-blue-600":"border-transparent"])}," Checkpoints ("+a(r.value.length)+") ",3),t("button",{onClick:o[1]||(o[1]=e=>l.value="routes"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="routes"?"border-blue-600 text-blue-600":"border-transparent"])}," Routen ("+a(c.value.length)+") ",3),t("button",{onClick:o[2]||(o[2]=e=>l.value="logs"),class:u(["px-4 py-2 font-medium border-b-2 -mb-px",l.value==="logs"?"border-blue-600 text-blue-600":"border-transparent"])}," Rundgänge ",2)]),p.value?(n(),s("div",C,"Laden...")):l.value==="checkpoints"?(n(),s("div",R,[r.value.length===0?(n(),s("div",j,[...o[3]||(o[3]=[t("p",{class:"text-4xl mb-4"},"📍",-1),t("p",null,"Keine Checkpoints vorhanden",-1),t("p",{class:"text-sm mt-2"},"Erstelle Checkpoints mit QR-Codes für Rundgänge",-1)])])):(n(),s("div",M,[(n(!0),s(g,null,_(r.value,e=>(n(),s("div",{key:e.id,class:"bg-white rounded-lg shadow p-4"},[t("div",D,[t("div",null,[t("h3",B,a(e.name),1),t("p",E,a(e.object_name),1),t("p",K,a(e.location_description),1)]),t("span",L,a(e.checkpoint_type==="nfc"?"📶":"📱"),1)]),t("div",T,a(e.code),1)]))),128))]))])):l.value==="routes"?(n(),s("div",V,[c.value.length===0?(n(),s("div",$,[...o[4]||(o[4]=[t("p",{class:"text-4xl mb-4"},"🗺️",-1),t("p",null,"Keine Routen definiert",-1)])])):(n(),s("div",A,[(n(!0),s(g,null,_(c.value,e=>(n(),s("div",{key:e.id,class:"bg-white rounded-lg shadow p-4"},[t("div",F,[t("div",null,[t("h3",N,a(e.name),1),t("p",P,a(e.object_name),1)]),t("span",{class:u(["px-2 py-1 text-xs rounded",e.is_active?"bg-green-100 text-green-700":"bg-gray-100"])},a(e.is_active?"Aktiv":"Inaktiv"),3)]),t("div",S,[t("span",null,"📍 "+a(e.checkpoint_count||0)+" Checkpoints",1),e.time_limit_minutes?(n(),s("span",q,"⏱️ Max "+a(e.time_limit_minutes)+" Min",1)):v("",!0),e.interval_minutes?(n(),s("span",z,"🔄 Alle "+a(e.interval_minutes)+" Min",1)):v("",!0)])]))),128))]))])):l.value==="logs"?(n(),s("div",I,[x.value.length===0?(n(),s("div",O,[...o[5]||(o[5]=[t("p",{class:"text-4xl mb-4"},"📋",-1),t("p",null,"Keine Rundgänge heute",-1)])])):(n(),s("div",Q,[t("table",W,[o[6]||(o[6]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Zeit"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Mitarbeiter"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Checkpoint"),t("th",{class:"px-4 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Objekt")])],-1)),t("tbody",Z,[(n(!0),s(g,null,_(x.value,e=>(n(),s("tr",{key:e.id,class:"hover:bg-gray-50"},[t("td",G,a(b(e.scanned_at)),1),t("td",H,a(e.first_name)+" "+a(e.last_name),1),t("td",J,a(e.checkpoint_name),1),t("td",U,a(e.object_name),1)]))),128))])])]))])):v("",!0)]))}});export{tt as default};
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dist/assets/ShiftsView-Qxa8m19e.js
vendored
Normal file
1
dist/assets/ShiftsView-Qxa8m19e.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{d as B,q as $,m as x,c as i,a as t,F as h,x as k,e as S,t as r,b as c,v,r as d,k as N,E as C,o}from"./index-CgM2qJ96.js";const U={class:"p-6"},j={class:"flex justify-between items-center mb-6"},L={class:"bg-white rounded-lg shadow p-4 mb-6"},M={class:"flex flex-wrap gap-2"},z={key:0,class:"text-gray-500"},A={class:"bg-white rounded-lg shadow overflow-hidden"},T={class:"flex items-center justify-between p-4 border-b"},W={class:"font-semibold"},P={class:"grid grid-cols-7 divide-x"},R={class:"text-xs font-semibold text-gray-500 mb-2"},q={key:0,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},I={class:"bg-white rounded-lg shadow-xl w-full max-w-md p-6"},K={class:"space-y-4"},O={class:"grid grid-cols-2 gap-4"},G={class:"grid grid-cols-2 gap-4"},H={class:"flex justify-end space-x-2 mt-6"},X=B({__name:"ShiftsView",setup(J){const D=d(!0),p=d([]),w=d([]),f=d(!1),u=d(new Date),l=d({name:"",start_time:"06:00",end_time:"14:00",break_minutes:30,color:"#3B82F6",is_night_shift:!1});$(async()=>{await b()});async function b(){D.value=!0;try{const[n,e]=await Promise.all([x.get("/shifts/definitions"),x.get(`/shifts/assignments?start=${y(g())}&end=${y(_())}`)]);p.value=n.data.shifts||[],w.value=e.data.assignments||[]}catch(n){console.error(n)}D.value=!1}function g(){const n=new Date(u.value);return n.setDate(n.getDate()-n.getDay()+1),n}function _(){const n=new Date(g());return n.setDate(n.getDate()+6),n}function y(n){return n.toISOString().split("T")[0]}const V=N(()=>{const n=[],e=g();for(let s=0;s<7;s++){const a=new Date(e);a.setDate(a.getDate()+s),n.push({date:y(a),label:a.toLocaleDateString("de-DE",{weekday:"short",day:"2-digit"})})}return n});async function E(){try{await x.post("/shifts/definitions",l.value),f.value=!1,l.value={name:"",start_time:"06:00",end_time:"14:00",break_minutes:30,color:"#3B82F6",is_night_shift:!1},await b()}catch(n){alert("Fehler: "+n.message)}}function F(n){return w.value.filter(e=>e.date===n)}return(n,e)=>(o(),i("div",U,[t("div",j,[e[9]||(e[9]=t("div",null,[t("h1",{class:"text-2xl font-bold"},"📅 Schichtplanung"),t("p",{class:"text-gray-500"},"Dienstpläne verwalten")],-1)),t("button",{onClick:e[0]||(e[0]=s=>f.value=!0),class:"btn btn-primary"},"+ Schicht definieren")]),t("div",L,[e[10]||(e[10]=t("h2",{class:"font-semibold mb-3"},"Schicht-Typen",-1)),t("div",M,[(o(!0),i(h,null,k(p.value,s=>{var a,m;return o(),i("div",{key:s.id,style:C({backgroundColor:s.color+"20",borderColor:s.color}),class:"px-3 py-1 rounded-full border text-sm"},r(s.name)+" ("+r((a=s.start_time)==null?void 0:a.slice(0,5))+" - "+r((m=s.end_time)==null?void 0:m.slice(0,5))+") ",5)}),128)),p.value.length===0?(o(),i("div",z,"Keine Schichten definiert")):S("",!0)])]),t("div",A,[t("div",T,[t("button",{onClick:e[1]||(e[1]=s=>{u.value.setDate(u.value.getDate()-7),b()}),class:"text-gray-600 hover:text-gray-900"},"← Vorherige"),t("span",W,r(g().toLocaleDateString("de-DE"))+" - "+r(_().toLocaleDateString("de-DE")),1),t("button",{onClick:e[2]||(e[2]=s=>{u.value.setDate(u.value.getDate()+7),b()}),class:"text-gray-600 hover:text-gray-900"},"Nächste →")]),t("div",P,[(o(!0),i(h,null,k(V.value,s=>(o(),i("div",{key:s.date,class:"min-h-32 p-2"},[t("div",R,r(s.label),1),(o(!0),i(h,null,k(F(s.date),a=>{var m;return o(),i("div",{key:a.id,style:C({backgroundColor:a.color+"40"}),class:"text-xs p-1 rounded mb-1"},r(a.first_name)+" "+r((m=a.last_name)==null?void 0:m.charAt(0))+". ",5)}),128))]))),128))])]),f.value?(o(),i("div",q,[t("div",I,[e[16]||(e[16]=t("h2",{class:"text-xl font-bold mb-4"},"Neue Schicht definieren",-1)),t("div",K,[t("div",null,[e[11]||(e[11]=t("label",{class:"block text-sm font-medium mb-1"},"Name",-1)),c(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>l.value.name=s),class:"input",placeholder:"z.B. Frühschicht"},null,512),[[v,l.value.name]])]),t("div",O,[t("div",null,[e[12]||(e[12]=t("label",{class:"block text-sm font-medium mb-1"},"Beginn",-1)),c(t("input",{"onUpdate:modelValue":e[4]||(e[4]=s=>l.value.start_time=s),type:"time",class:"input"},null,512),[[v,l.value.start_time]])]),t("div",null,[e[13]||(e[13]=t("label",{class:"block text-sm font-medium mb-1"},"Ende",-1)),c(t("input",{"onUpdate:modelValue":e[5]||(e[5]=s=>l.value.end_time=s),type:"time",class:"input"},null,512),[[v,l.value.end_time]])])]),t("div",G,[t("div",null,[e[14]||(e[14]=t("label",{class:"block text-sm font-medium mb-1"},"Pause (Min.)",-1)),c(t("input",{"onUpdate:modelValue":e[6]||(e[6]=s=>l.value.break_minutes=s),type:"number",class:"input"},null,512),[[v,l.value.break_minutes,void 0,{number:!0}]])]),t("div",null,[e[15]||(e[15]=t("label",{class:"block text-sm font-medium mb-1"},"Farbe",-1)),c(t("input",{"onUpdate:modelValue":e[7]||(e[7]=s=>l.value.color=s),type:"color",class:"w-full h-10 rounded"},null,512),[[v,l.value.color]])])])]),t("div",H,[t("button",{onClick:e[8]||(e[8]=s=>f.value=!1),class:"btn"},"Abbrechen"),t("button",{onClick:E,class:"btn btn-primary"},"Erstellen")])])])):S("",!0)]))}});export{X as default};
|
||||||
1
dist/assets/ShiftsView-gFZrEy1d.js
vendored
1
dist/assets/ShiftsView-gFZrEy1d.js
vendored
@@ -1 +0,0 @@
|
|||||||
import{d as E,q as $,m as x,c as i,a as t,F as h,x as k,e as S,t as r,b as c,v,r as d,k as N,o,C}from"./index-CWxNv9Fc.js";const U={class:"p-6"},j={class:"flex justify-between items-center mb-6"},L={class:"bg-white rounded-lg shadow p-4 mb-6"},M={class:"flex flex-wrap gap-2"},z={key:0,class:"text-gray-500"},A={class:"bg-white rounded-lg shadow overflow-hidden"},T={class:"flex items-center justify-between p-4 border-b"},W={class:"font-semibold"},P={class:"grid grid-cols-7 divide-x"},R={class:"text-xs font-semibold text-gray-500 mb-2"},q={key:0,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},I={class:"bg-white rounded-lg shadow-xl w-full max-w-md p-6"},K={class:"space-y-4"},O={class:"grid grid-cols-2 gap-4"},G={class:"grid grid-cols-2 gap-4"},H={class:"flex justify-end space-x-2 mt-6"},X=E({__name:"ShiftsView",setup(J){const D=d(!0),p=d([]),w=d([]),f=d(!1),u=d(new Date),l=d({name:"",start_time:"06:00",end_time:"14:00",break_minutes:30,color:"#3B82F6",is_night_shift:!1});$(async()=>{await b()});async function b(){D.value=!0;try{const[n,e]=await Promise.all([x.get("/shifts/definitions"),x.get(`/shifts/assignments?start=${y(g())}&end=${y(_())}`)]);p.value=n.data.shifts||[],w.value=e.data.assignments||[]}catch(n){console.error(n)}D.value=!1}function g(){const n=new Date(u.value);return n.setDate(n.getDate()-n.getDay()+1),n}function _(){const n=new Date(g());return n.setDate(n.getDate()+6),n}function y(n){return n.toISOString().split("T")[0]}const V=N(()=>{const n=[],e=g();for(let s=0;s<7;s++){const a=new Date(e);a.setDate(a.getDate()+s),n.push({date:y(a),label:a.toLocaleDateString("de-DE",{weekday:"short",day:"2-digit"})})}return n});async function F(){try{await x.post("/shifts/definitions",l.value),f.value=!1,l.value={name:"",start_time:"06:00",end_time:"14:00",break_minutes:30,color:"#3B82F6",is_night_shift:!1},await b()}catch(n){alert("Fehler: "+n.message)}}function B(n){return w.value.filter(e=>e.date===n)}return(n,e)=>(o(),i("div",U,[t("div",j,[e[9]||(e[9]=t("div",null,[t("h1",{class:"text-2xl font-bold"},"📅 Schichtplanung"),t("p",{class:"text-gray-500"},"Dienstpläne verwalten")],-1)),t("button",{onClick:e[0]||(e[0]=s=>f.value=!0),class:"btn btn-primary"},"+ Schicht definieren")]),t("div",L,[e[10]||(e[10]=t("h2",{class:"font-semibold mb-3"},"Schicht-Typen",-1)),t("div",M,[(o(!0),i(h,null,k(p.value,s=>{var a,m;return o(),i("div",{key:s.id,style:C({backgroundColor:s.color+"20",borderColor:s.color}),class:"px-3 py-1 rounded-full border text-sm"},r(s.name)+" ("+r((a=s.start_time)==null?void 0:a.slice(0,5))+" - "+r((m=s.end_time)==null?void 0:m.slice(0,5))+") ",5)}),128)),p.value.length===0?(o(),i("div",z,"Keine Schichten definiert")):S("",!0)])]),t("div",A,[t("div",T,[t("button",{onClick:e[1]||(e[1]=s=>{u.value.setDate(u.value.getDate()-7),b()}),class:"text-gray-600 hover:text-gray-900"},"← Vorherige"),t("span",W,r(g().toLocaleDateString("de-DE"))+" - "+r(_().toLocaleDateString("de-DE")),1),t("button",{onClick:e[2]||(e[2]=s=>{u.value.setDate(u.value.getDate()+7),b()}),class:"text-gray-600 hover:text-gray-900"},"Nächste →")]),t("div",P,[(o(!0),i(h,null,k(V.value,s=>(o(),i("div",{key:s.date,class:"min-h-32 p-2"},[t("div",R,r(s.label),1),(o(!0),i(h,null,k(B(s.date),a=>{var m;return o(),i("div",{key:a.id,style:C({backgroundColor:a.color+"40"}),class:"text-xs p-1 rounded mb-1"},r(a.first_name)+" "+r((m=a.last_name)==null?void 0:m.charAt(0))+". ",5)}),128))]))),128))])]),f.value?(o(),i("div",q,[t("div",I,[e[16]||(e[16]=t("h2",{class:"text-xl font-bold mb-4"},"Neue Schicht definieren",-1)),t("div",K,[t("div",null,[e[11]||(e[11]=t("label",{class:"block text-sm font-medium mb-1"},"Name",-1)),c(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>l.value.name=s),class:"input",placeholder:"z.B. Frühschicht"},null,512),[[v,l.value.name]])]),t("div",O,[t("div",null,[e[12]||(e[12]=t("label",{class:"block text-sm font-medium mb-1"},"Beginn",-1)),c(t("input",{"onUpdate:modelValue":e[4]||(e[4]=s=>l.value.start_time=s),type:"time",class:"input"},null,512),[[v,l.value.start_time]])]),t("div",null,[e[13]||(e[13]=t("label",{class:"block text-sm font-medium mb-1"},"Ende",-1)),c(t("input",{"onUpdate:modelValue":e[5]||(e[5]=s=>l.value.end_time=s),type:"time",class:"input"},null,512),[[v,l.value.end_time]])])]),t("div",G,[t("div",null,[e[14]||(e[14]=t("label",{class:"block text-sm font-medium mb-1"},"Pause (Min.)",-1)),c(t("input",{"onUpdate:modelValue":e[6]||(e[6]=s=>l.value.break_minutes=s),type:"number",class:"input"},null,512),[[v,l.value.break_minutes,void 0,{number:!0}]])]),t("div",null,[e[15]||(e[15]=t("label",{class:"block text-sm font-medium mb-1"},"Farbe",-1)),c(t("input",{"onUpdate:modelValue":e[7]||(e[7]=s=>l.value.color=s),type:"color",class:"w-full h-10 rounded"},null,512),[[v,l.value.color]])])])]),t("div",H,[t("button",{onClick:e[8]||(e[8]=s=>f.value=!1),class:"btn"},"Abbrechen"),t("button",{onClick:F,class:"btn btn-primary"},"Erstellen")])])])):S("",!0)]))}});export{X as default};
|
|
||||||
@@ -1 +1 @@
|
|||||||
import{d as A,u as M,q as T,m,c as a,a as s,F as y,x as w,w as D,b as p,v as _,s as E,e as i,r as d,o as r,t as l,p as U,y as h,n as z}from"./index-CWxNv9Fc.js";const N={class:"space-y-6"},$={class:"flex items-center justify-between"},B={class:"card"},F={key:0,class:"text-center py-8 text-gray-500"},L={key:1,class:"text-center py-8 text-gray-500"},q={key:2,class:"space-y-3"},K={class:"font-medium"},G={class:"text-sm text-gray-500"},O={key:0},P={key:0,class:"text-sm text-gray-500"},H={key:1,class:"text-sm text-gray-500"},I={class:"flex items-center gap-2"},J=["onClick"],Q=["onClick"],R={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},W={class:"card w-full max-w-md m-4"},X={class:"grid grid-cols-2 gap-4"},Y=["value"],Z={class:"flex justify-end gap-3 pt-4"},se=A({__name:"TimesheetsView",setup(ee){const f=M(),v=d([]),b=d(!0),u=d(!1),o=d({work_date:"",start_time:"",end_time:"",order_id:""}),x=d([]);T(async()=>{await Promise.all([g(),S()])});async function g(){b.value=!0;try{const n=await m.get("/timesheets");v.value=n.data.timesheets}catch(n){console.error(n)}finally{b.value=!1}}async function S(){try{const n=await m.get("/orders");x.value=n.data.orders}catch(n){console.error(n)}}async function j(){try{await m.post("/timesheets",o.value),u.value=!1,o.value={work_date:"",start_time:"",end_time:"",order_id:""},await g()}catch(n){alert(n instanceof Error?n.message:"Fehler")}}async function k(n,e){const t=e==="rejected"?prompt("Ablehnungsgrund:"):null;if(!(e==="rejected"&&!t))try{await m.post(`/timesheets/${n}/review`,{status:e,rejection_reason:t}),await g()}catch(c){alert(c instanceof Error?c.message:"Fehler")}}function C(n){return{pending:"badge-warning",approved:"badge-success",rejected:"badge-danger"}[n]||""}function V(n){return{pending:"Ausstehend",approved:"Genehmigt",rejected:"Abgelehnt"}[n]||n}return(n,e)=>(r(),a("div",N,[s("div",$,[e[6]||(e[6]=s("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"⏱️ Stundenzettel",-1)),s("button",{class:"btn btn-primary",onClick:e[0]||(e[0]=t=>u.value=!0)},"+ Neu")]),s("div",B,[b.value?(r(),a("div",F,"Lädt...")):v.value.length===0?(r(),a("div",L,"Keine Stundenzettel")):(r(),a("div",q,[(r(!0),a(y,null,w(v.value,t=>(r(),a("div",{key:t.id,class:"flex items-center justify-between p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[s("div",null,[s("p",K,l(new Date(t.work_date).toLocaleDateString("de-DE")),1),s("p",G,[U(l(t.start_time)+" - "+l(t.end_time)+" ",1),t.hours_worked?(r(),a("span",O,"("+l(t.hours_worked)+"h)",1)):i("",!0)]),t.order_title?(r(),a("p",P,"📋 "+l(t.order_title),1)):i("",!0),h(f).canManageUsers?(r(),a("p",H,"👤 "+l(t.user_name),1)):i("",!0)]),s("div",I,[s("span",{class:z(["badge",C(t.status)])},l(V(t.status)),3),h(f).canManageUsers&&t.status==="pending"?(r(),a(y,{key:0},[s("button",{class:"btn btn-success text-sm",onClick:c=>k(t.id,"approved")},"✓",8,J),s("button",{class:"btn btn-danger text-sm",onClick:c=>k(t.id,"rejected")},"✗",8,Q)],64)):i("",!0)])]))),128))]))]),u.value?(r(),a("div",R,[s("div",W,[e[13]||(e[13]=s("h2",{class:"text-xl font-semibold mb-6"},"Neuer Stundenzettel",-1)),s("form",{onSubmit:D(j,["prevent"]),class:"space-y-4"},[s("div",null,[e[7]||(e[7]=s("label",{class:"block text-sm font-medium mb-1"},"Datum *",-1)),p(s("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.work_date=t),type:"date",required:"",class:"input"},null,512),[[_,o.value.work_date]])]),s("div",X,[s("div",null,[e[8]||(e[8]=s("label",{class:"block text-sm font-medium mb-1"},"Start",-1)),p(s("input",{"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.start_time=t),type:"time",class:"input"},null,512),[[_,o.value.start_time]])]),s("div",null,[e[9]||(e[9]=s("label",{class:"block text-sm font-medium mb-1"},"Ende",-1)),p(s("input",{"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.end_time=t),type:"time",class:"input"},null,512),[[_,o.value.end_time]])])]),s("div",null,[e[11]||(e[11]=s("label",{class:"block text-sm font-medium mb-1"},"Auftrag",-1)),p(s("select",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.value.order_id=t),class:"input"},[e[10]||(e[10]=s("option",{value:""},"-- Kein Auftrag --",-1)),(r(!0),a(y,null,w(x.value,t=>(r(),a("option",{key:t.id,value:t.id},"#"+l(t.number)+" - "+l(t.title),9,Y))),128))],512),[[E,o.value.order_id]])]),s("div",Z,[s("button",{type:"button",class:"btn btn-secondary",onClick:e[5]||(e[5]=t=>u.value=!1)},"Abbrechen"),e[12]||(e[12]=s("button",{type:"submit",class:"btn btn-primary"},"Einreichen",-1))])],32)])])):i("",!0)]))}});export{se as default};
|
import{d as A,u as M,q as T,m,c as a,a as s,F as y,x as w,w as z,b as p,v as _,s as D,e as i,r as d,t as l,p as E,z as h,n as U,o as r}from"./index-CgM2qJ96.js";const N={class:"space-y-6"},$={class:"flex items-center justify-between"},B={class:"card"},F={key:0,class:"text-center py-8 text-gray-500"},L={key:1,class:"text-center py-8 text-gray-500"},q={key:2,class:"space-y-3"},K={class:"font-medium"},G={class:"text-sm text-gray-500"},O={key:0},P={key:0,class:"text-sm text-gray-500"},H={key:1,class:"text-sm text-gray-500"},I={class:"flex items-center gap-2"},J=["onClick"],Q=["onClick"],R={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},W={class:"card w-full max-w-md m-4"},X={class:"grid grid-cols-2 gap-4"},Y=["value"],Z={class:"flex justify-end gap-3 pt-4"},se=A({__name:"TimesheetsView",setup(ee){const f=M(),v=d([]),b=d(!0),u=d(!1),o=d({work_date:"",start_time:"",end_time:"",order_id:""}),x=d([]);T(async()=>{await Promise.all([g(),S()])});async function g(){b.value=!0;try{const n=await m.get("/timesheets");v.value=n.data.timesheets}catch(n){console.error(n)}finally{b.value=!1}}async function S(){try{const n=await m.get("/orders");x.value=n.data.orders}catch(n){console.error(n)}}async function j(){try{await m.post("/timesheets",o.value),u.value=!1,o.value={work_date:"",start_time:"",end_time:"",order_id:""},await g()}catch(n){alert(n instanceof Error?n.message:"Fehler")}}async function k(n,e){const t=e==="rejected"?prompt("Ablehnungsgrund:"):null;if(!(e==="rejected"&&!t))try{await m.post(`/timesheets/${n}/review`,{status:e,rejection_reason:t}),await g()}catch(c){alert(c instanceof Error?c.message:"Fehler")}}function C(n){return{pending:"badge-warning",approved:"badge-success",rejected:"badge-danger"}[n]||""}function V(n){return{pending:"Ausstehend",approved:"Genehmigt",rejected:"Abgelehnt"}[n]||n}return(n,e)=>(r(),a("div",N,[s("div",$,[e[6]||(e[6]=s("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"⏱️ Stundenzettel",-1)),s("button",{class:"btn btn-primary",onClick:e[0]||(e[0]=t=>u.value=!0)},"+ Neu")]),s("div",B,[b.value?(r(),a("div",F,"Lädt...")):v.value.length===0?(r(),a("div",L,"Keine Stundenzettel")):(r(),a("div",q,[(r(!0),a(y,null,w(v.value,t=>(r(),a("div",{key:t.id,class:"flex items-center justify-between p-4 bg-gray-50 dark:bg-gray-700/50 rounded-lg"},[s("div",null,[s("p",K,l(new Date(t.work_date).toLocaleDateString("de-DE")),1),s("p",G,[E(l(t.start_time)+" - "+l(t.end_time)+" ",1),t.hours_worked?(r(),a("span",O,"("+l(t.hours_worked)+"h)",1)):i("",!0)]),t.order_title?(r(),a("p",P,"📋 "+l(t.order_title),1)):i("",!0),h(f).canManageUsers?(r(),a("p",H,"👤 "+l(t.user_name),1)):i("",!0)]),s("div",I,[s("span",{class:U(["badge",C(t.status)])},l(V(t.status)),3),h(f).canManageUsers&&t.status==="pending"?(r(),a(y,{key:0},[s("button",{class:"btn btn-success text-sm",onClick:c=>k(t.id,"approved")},"✓",8,J),s("button",{class:"btn btn-danger text-sm",onClick:c=>k(t.id,"rejected")},"✗",8,Q)],64)):i("",!0)])]))),128))]))]),u.value?(r(),a("div",R,[s("div",W,[e[13]||(e[13]=s("h2",{class:"text-xl font-semibold mb-6"},"Neuer Stundenzettel",-1)),s("form",{onSubmit:z(j,["prevent"]),class:"space-y-4"},[s("div",null,[e[7]||(e[7]=s("label",{class:"block text-sm font-medium mb-1"},"Datum *",-1)),p(s("input",{"onUpdate:modelValue":e[1]||(e[1]=t=>o.value.work_date=t),type:"date",required:"",class:"input"},null,512),[[_,o.value.work_date]])]),s("div",X,[s("div",null,[e[8]||(e[8]=s("label",{class:"block text-sm font-medium mb-1"},"Start",-1)),p(s("input",{"onUpdate:modelValue":e[2]||(e[2]=t=>o.value.start_time=t),type:"time",class:"input"},null,512),[[_,o.value.start_time]])]),s("div",null,[e[9]||(e[9]=s("label",{class:"block text-sm font-medium mb-1"},"Ende",-1)),p(s("input",{"onUpdate:modelValue":e[3]||(e[3]=t=>o.value.end_time=t),type:"time",class:"input"},null,512),[[_,o.value.end_time]])])]),s("div",null,[e[11]||(e[11]=s("label",{class:"block text-sm font-medium mb-1"},"Auftrag",-1)),p(s("select",{"onUpdate:modelValue":e[4]||(e[4]=t=>o.value.order_id=t),class:"input"},[e[10]||(e[10]=s("option",{value:""},"-- Kein Auftrag --",-1)),(r(!0),a(y,null,w(x.value,t=>(r(),a("option",{key:t.id,value:t.id},"#"+l(t.number)+" - "+l(t.title),9,Y))),128))],512),[[D,o.value.order_id]])]),s("div",Z,[s("button",{type:"button",class:"btn btn-secondary",onClick:e[5]||(e[5]=t=>u.value=!1)},"Abbrechen"),e[12]||(e[12]=s("button",{type:"submit",class:"btn btn-primary"},"Einreichen",-1))])],32)])])):i("",!0)]))}});export{se as default};
|
||||||
@@ -1 +1 @@
|
|||||||
import{d as C,u as U,q as V,m,c as n,a as e,F as E,x as N,w as S,b as o,v as d,y as x,s as q,e as y,r as b,o as i,t as r,n as k}from"./index-CWxNv9Fc.js";const A={class:"space-y-6"},D={class:"flex items-center justify-between"},$={class:"card"},B={key:0,class:"text-center py-8 text-gray-500"},F={key:1,class:"text-center py-8 text-gray-500"},R={key:2,class:"w-full"},j={class:"py-3 font-medium"},L={class:"py-3 text-gray-500"},z={class:"py-3"},T={class:"py-3"},I={class:"py-3 text-right"},K=["onClick"],P={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},G={class:"card w-full max-w-md m-4"},H={class:"grid grid-cols-2 gap-4"},J={key:0},O={class:"flex justify-end gap-3 pt-4"},Y=C({__name:"UsersView",setup(Q){const f=U(),p=b([]),c=b(!0),u=b(!1),l=b({email:"",password:"",first_name:"",last_name:"",phone:"",role:"mitarbeiter"});V(async()=>{await v()});async function v(){c.value=!0;try{const a=await m.get("/users");p.value=a.data.users}catch(a){console.error(a)}finally{c.value=!1}}async function w(){try{await m.post("/users",l.value),u.value=!1,l.value={email:"",password:"",first_name:"",last_name:"",phone:"",role:"mitarbeiter"},await v()}catch(a){alert(a instanceof Error?a.message:"Fehler beim Erstellen")}}async function _(a){try{a.active?await m.delete(`/users/${a.id}`):await m.put(`/users/${a.id}`,{active:!0}),await v()}catch(t){alert(t instanceof Error?t.message:"Fehler")}}function h(a){return{chef:"badge-danger",disponent:"badge-primary",mitarbeiter:"badge-success"}[a]||"badge-secondary"}function M(a){return{chef:"Chef",disponent:"Disponent",mitarbeiter:"Mitarbeiter"}[a]||a}return(a,t)=>(i(),n("div",A,[e("div",D,[t[8]||(t[8]=e("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"👥 Mitarbeiter",-1)),e("button",{class:"btn btn-primary",onClick:t[0]||(t[0]=s=>u.value=!0)},"+ Neu")]),e("div",$,[c.value?(i(),n("div",B,"Lädt...")):p.value.length===0?(i(),n("div",F,"Keine Mitarbeiter")):(i(),n("table",R,[t[9]||(t[9]=e("thead",null,[e("tr",{class:"text-left text-sm text-gray-500 border-b border-gray-200 dark:border-gray-700"},[e("th",{class:"pb-3"},"Name"),e("th",{class:"pb-3"},"E-Mail"),e("th",{class:"pb-3"},"Rolle"),e("th",{class:"pb-3"},"Status"),e("th",{class:"pb-3"})])],-1)),e("tbody",null,[(i(!0),n(E,null,N(p.value,s=>{var g;return i(),n("tr",{key:s.id,class:"border-b border-gray-100 dark:border-gray-800"},[e("td",j,r(s.first_name)+" "+r(s.last_name),1),e("td",L,r(s.email),1),e("td",z,[e("span",{class:k(["badge",h(s.role)])},r(M(s.role)),3)]),e("td",T,[e("span",{class:k(s.active?"text-green-600":"text-red-600")},r(s.active?"Aktiv":"Inaktiv"),3)]),e("td",I,[s.id!==((g=x(f).user)==null?void 0:g.id)&&s.role!=="chef"?(i(),n("button",{key:0,class:"text-sm text-gray-500 hover:text-red-600",onClick:W=>_(s)},r(s.active?"Deaktivieren":"Aktivieren"),9,K)):y("",!0)])])}),128))])]))]),u.value?(i(),n("div",P,[e("div",G,[t[18]||(t[18]=e("h2",{class:"text-xl font-semibold mb-6"},"Neuer Mitarbeiter",-1)),e("form",{onSubmit:S(w,["prevent"]),class:"space-y-4"},[e("div",H,[e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium mb-1"},"Vorname *",-1)),o(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>l.value.first_name=s),type:"text",required:"",class:"input"},null,512),[[d,l.value.first_name]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Nachname *",-1)),o(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>l.value.last_name=s),type:"text",required:"",class:"input"},null,512),[[d,l.value.last_name]])])]),e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium mb-1"},"E-Mail *",-1)),o(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>l.value.email=s),type:"email",required:"",class:"input"},null,512),[[d,l.value.email]])]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Passwort *",-1)),o(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>l.value.password=s),type:"password",required:"",class:"input"},null,512),[[d,l.value.password]])]),e("div",null,[t[14]||(t[14]=e("label",{class:"block text-sm font-medium mb-1"},"Telefon",-1)),o(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>l.value.phone=s),type:"tel",class:"input"},null,512),[[d,l.value.phone]])]),x(f).isChef?(i(),n("div",J,[t[16]||(t[16]=e("label",{class:"block text-sm font-medium mb-1"},"Rolle",-1)),o(e("select",{"onUpdate:modelValue":t[6]||(t[6]=s=>l.value.role=s),class:"input"},[...t[15]||(t[15]=[e("option",{value:"mitarbeiter"},"Mitarbeiter",-1),e("option",{value:"disponent"},"Disponent",-1)])],512),[[q,l.value.role]])])):y("",!0),e("div",O,[e("button",{type:"button",class:"btn btn-secondary",onClick:t[7]||(t[7]=s=>u.value=!1)},"Abbrechen"),t[17]||(t[17]=e("button",{type:"submit",class:"btn btn-primary"},"Erstellen",-1))])],32)])])):y("",!0)]))}});export{Y as default};
|
import{d as C,u as U,q as V,m,c as n,a as e,F as E,x as N,w as S,b as o,v as d,z as x,s as q,e as f,r as b,t as r,n as k,o as i}from"./index-CgM2qJ96.js";const A={class:"space-y-6"},D={class:"flex items-center justify-between"},$={class:"card"},B={key:0,class:"text-center py-8 text-gray-500"},F={key:1,class:"text-center py-8 text-gray-500"},R={key:2,class:"w-full"},j={class:"py-3 font-medium"},z={class:"py-3 text-gray-500"},L={class:"py-3"},T={class:"py-3"},I={class:"py-3 text-right"},K=["onClick"],P={key:0,class:"fixed inset-0 z-50 flex items-center justify-center bg-black/50"},G={class:"card w-full max-w-md m-4"},H={class:"grid grid-cols-2 gap-4"},J={key:0},O={class:"flex justify-end gap-3 pt-4"},Y=C({__name:"UsersView",setup(Q){const y=U(),p=b([]),c=b(!0),u=b(!1),l=b({email:"",password:"",first_name:"",last_name:"",phone:"",role:"mitarbeiter"});V(async()=>{await v()});async function v(){c.value=!0;try{const a=await m.get("/users");p.value=a.data.users}catch(a){console.error(a)}finally{c.value=!1}}async function w(){try{await m.post("/users",l.value),u.value=!1,l.value={email:"",password:"",first_name:"",last_name:"",phone:"",role:"mitarbeiter"},await v()}catch(a){alert(a instanceof Error?a.message:"Fehler beim Erstellen")}}async function _(a){try{a.active?await m.delete(`/users/${a.id}`):await m.put(`/users/${a.id}`,{active:!0}),await v()}catch(t){alert(t instanceof Error?t.message:"Fehler")}}function h(a){return{chef:"badge-danger",disponent:"badge-primary",mitarbeiter:"badge-success"}[a]||"badge-secondary"}function M(a){return{chef:"Chef",disponent:"Disponent",mitarbeiter:"Mitarbeiter"}[a]||a}return(a,t)=>(i(),n("div",A,[e("div",D,[t[8]||(t[8]=e("h1",{class:"text-2xl font-bold text-gray-900 dark:text-white"},"👥 Mitarbeiter",-1)),e("button",{class:"btn btn-primary",onClick:t[0]||(t[0]=s=>u.value=!0)},"+ Neu")]),e("div",$,[c.value?(i(),n("div",B,"Lädt...")):p.value.length===0?(i(),n("div",F,"Keine Mitarbeiter")):(i(),n("table",R,[t[9]||(t[9]=e("thead",null,[e("tr",{class:"text-left text-sm text-gray-500 border-b border-gray-200 dark:border-gray-700"},[e("th",{class:"pb-3"},"Name"),e("th",{class:"pb-3"},"E-Mail"),e("th",{class:"pb-3"},"Rolle"),e("th",{class:"pb-3"},"Status"),e("th",{class:"pb-3"})])],-1)),e("tbody",null,[(i(!0),n(E,null,N(p.value,s=>{var g;return i(),n("tr",{key:s.id,class:"border-b border-gray-100 dark:border-gray-800"},[e("td",j,r(s.first_name)+" "+r(s.last_name),1),e("td",z,r(s.email),1),e("td",L,[e("span",{class:k(["badge",h(s.role)])},r(M(s.role)),3)]),e("td",T,[e("span",{class:k(s.active?"text-green-600":"text-red-600")},r(s.active?"Aktiv":"Inaktiv"),3)]),e("td",I,[s.id!==((g=x(y).user)==null?void 0:g.id)&&s.role!=="chef"?(i(),n("button",{key:0,class:"text-sm text-gray-500 hover:text-red-600",onClick:W=>_(s)},r(s.active?"Deaktivieren":"Aktivieren"),9,K)):f("",!0)])])}),128))])]))]),u.value?(i(),n("div",P,[e("div",G,[t[18]||(t[18]=e("h2",{class:"text-xl font-semibold mb-6"},"Neuer Mitarbeiter",-1)),e("form",{onSubmit:S(w,["prevent"]),class:"space-y-4"},[e("div",H,[e("div",null,[t[10]||(t[10]=e("label",{class:"block text-sm font-medium mb-1"},"Vorname *",-1)),o(e("input",{"onUpdate:modelValue":t[1]||(t[1]=s=>l.value.first_name=s),type:"text",required:"",class:"input"},null,512),[[d,l.value.first_name]])]),e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Nachname *",-1)),o(e("input",{"onUpdate:modelValue":t[2]||(t[2]=s=>l.value.last_name=s),type:"text",required:"",class:"input"},null,512),[[d,l.value.last_name]])])]),e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium mb-1"},"E-Mail *",-1)),o(e("input",{"onUpdate:modelValue":t[3]||(t[3]=s=>l.value.email=s),type:"email",required:"",class:"input"},null,512),[[d,l.value.email]])]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Passwort *",-1)),o(e("input",{"onUpdate:modelValue":t[4]||(t[4]=s=>l.value.password=s),type:"password",required:"",class:"input"},null,512),[[d,l.value.password]])]),e("div",null,[t[14]||(t[14]=e("label",{class:"block text-sm font-medium mb-1"},"Telefon",-1)),o(e("input",{"onUpdate:modelValue":t[5]||(t[5]=s=>l.value.phone=s),type:"tel",class:"input"},null,512),[[d,l.value.phone]])]),x(y).isChef?(i(),n("div",J,[t[16]||(t[16]=e("label",{class:"block text-sm font-medium mb-1"},"Rolle",-1)),o(e("select",{"onUpdate:modelValue":t[6]||(t[6]=s=>l.value.role=s),class:"input"},[...t[15]||(t[15]=[e("option",{value:"mitarbeiter"},"Mitarbeiter",-1),e("option",{value:"disponent"},"Disponent",-1)])],512),[[q,l.value.role]])])):f("",!0),e("div",O,[e("button",{type:"button",class:"btn btn-secondary",onClick:t[7]||(t[7]=s=>u.value=!1)},"Abbrechen"),t[17]||(t[17]=e("button",{type:"submit",class:"btn btn-primary"},"Erstellen",-1))])],32)])])):f("",!0)]))}});export{Y as default};
|
||||||
1
dist/assets/VehiclesView-C2kXdRXZ.js
vendored
1
dist/assets/VehiclesView-C2kXdRXZ.js
vendored
@@ -1 +0,0 @@
|
|||||||
import{d as _,q as h,m as y,c as n,a as e,F as V,x as z,b as r,v as u,s as B,e as g,r as p,o,t as i,n as f,p as k}from"./index-CWxNv9Fc.js";const D={class:"p-6"},F={class:"flex justify-between items-center mb-6"},M={key:0,class:"text-center py-12"},j={key:1,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},C={key:2,class:"grid md:grid-cols-2 lg:grid-cols-3 gap-4"},S={class:"flex justify-between items-start"},E={class:"font-semibold text-lg"},K={class:"text-gray-600"},U={key:0,class:"text-sm text-gray-400"},L={class:"mt-4 grid grid-cols-2 gap-2 text-sm"},N={key:3,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},T={class:"bg-white rounded-lg shadow-xl w-full max-w-md p-6"},A={class:"space-y-4"},W={class:"grid grid-cols-2 gap-4"},$={class:"grid grid-cols-2 gap-4"},q={class:"flex justify-end space-x-2 mt-6"},P=_({__name:"VehiclesView",setup(H){const c=p(!0),m=p([]),d=p(!1),s=p({license_plate:"",brand:"",model:"",year:2024,color:"",fuel_type:"diesel"});h(async()=>{await v()});async function v(){c.value=!0;try{const a=await y.get("/vehicles");m.value=a.data.vehicles||[]}catch(a){console.error(a)}c.value=!1}async function w(){try{await y.post("/vehicles",s.value),d.value=!1,s.value={license_plate:"",brand:"",model:"",year:2024,color:"",fuel_type:"diesel"},await v()}catch(a){alert("Fehler: "+a.message)}}function b(a){return{available:{text:"Verfügbar",class:"bg-green-100 text-green-700",icon:"✅"},in_use:{text:"Im Einsatz",class:"bg-blue-100 text-blue-700",icon:"🚗"},maintenance:{text:"Wartung",class:"bg-yellow-100 text-yellow-700",icon:"🔧"},retired:{text:"Stillgelegt",class:"bg-gray-100 text-gray-700",icon:"⛔"}}[a]||{text:a,class:"bg-gray-100",icon:""}}return(a,t)=>(o(),n("div",D,[e("div",F,[t[7]||(t[7]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"🚗 Fahrzeuge"),e("p",{class:"text-gray-500"},"Fuhrpark verwalten")],-1)),e("button",{onClick:t[0]||(t[0]=l=>d.value=!0),class:"btn btn-primary"},"+ Fahrzeug")]),c.value?(o(),n("div",M,"Laden...")):m.value.length===0?(o(),n("div",j,[...t[8]||(t[8]=[e("p",{class:"text-4xl mb-4"},"🚗",-1),e("p",null,"Keine Fahrzeuge vorhanden",-1)])])):(o(),n("div",C,[(o(!0),n(V,null,z(m.value,l=>{var x;return o(),n("div",{key:l.id,class:"bg-white rounded-lg shadow p-4"},[e("div",S,[e("div",null,[e("h3",E,i(l.license_plate),1),e("p",K,i(l.brand)+" "+i(l.model),1),l.year?(o(),n("p",U,"Baujahr "+i(l.year),1)):g("",!0)]),e("span",{class:f(["px-2 py-1 text-xs rounded",b(l.status).class])},i(b(l.status).icon)+" "+i(b(l.status).text),3)]),e("div",L,[e("div",null,[t[9]||(t[9]=e("span",{class:"text-gray-500"},"KM-Stand:",-1)),k(" "+i(((x=l.current_mileage)==null?void 0:x.toLocaleString())||"-"),1)]),e("div",null,[t[10]||(t[10]=e("span",{class:"text-gray-500"},"Kraftstoff:",-1)),k(" "+i(l.fuel_type),1)]),l.tuev_expires?(o(),n("div",{key:0,class:f(["col-span-2",new Date(l.tuev_expires)<new Date?"text-red-600":""])}," TÜV: "+i(new Date(l.tuev_expires).toLocaleDateString("de-DE")),3)):g("",!0)])])}),128))])),d.value?(o(),n("div",N,[e("div",T,[t[17]||(t[17]=e("h2",{class:"text-xl font-bold mb-4"},"Neues Fahrzeug",-1)),e("div",A,[e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Kennzeichen *",-1)),r(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>s.value.license_plate=l),class:"input",placeholder:"B-AB 1234"},null,512),[[u,s.value.license_plate]])]),e("div",W,[e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium mb-1"},"Marke",-1)),r(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>s.value.brand=l),class:"input",placeholder:"VW"},null,512),[[u,s.value.brand]])]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Modell",-1)),r(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>s.value.model=l),class:"input",placeholder:"Passat"},null,512),[[u,s.value.model]])])]),e("div",$,[e("div",null,[t[14]||(t[14]=e("label",{class:"block text-sm font-medium mb-1"},"Baujahr",-1)),r(e("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>s.value.year=l),type:"number",class:"input"},null,512),[[u,s.value.year,void 0,{number:!0}]])]),e("div",null,[t[16]||(t[16]=e("label",{class:"block text-sm font-medium mb-1"},"Kraftstoff",-1)),r(e("select",{"onUpdate:modelValue":t[5]||(t[5]=l=>s.value.fuel_type=l),class:"input"},[...t[15]||(t[15]=[e("option",{value:"diesel"},"Diesel",-1),e("option",{value:"petrol"},"Benzin",-1),e("option",{value:"electric"},"Elektro",-1),e("option",{value:"hybrid"},"Hybrid",-1)])],512),[[B,s.value.fuel_type]])])])]),e("div",q,[e("button",{onClick:t[6]||(t[6]=l=>d.value=!1),class:"btn"},"Abbrechen"),e("button",{onClick:w,class:"btn btn-primary"},"Erstellen")])])])):g("",!0)]))}});export{P as default};
|
|
||||||
1
dist/assets/VehiclesView-m5j3FcFM.js
vendored
Normal file
1
dist/assets/VehiclesView-m5j3FcFM.js
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
import{d as _,q as h,m as y,c as n,a as e,F as V,x as z,b as r,v as u,s as B,e as g,r as p,t as o,n as f,p as k,o as i}from"./index-CgM2qJ96.js";const D={class:"p-6"},F={class:"flex justify-between items-center mb-6"},M={key:0,class:"text-center py-12"},j={key:1,class:"bg-gray-50 rounded-lg p-12 text-center text-gray-500"},C={key:2,class:"grid md:grid-cols-2 lg:grid-cols-3 gap-4"},S={class:"flex justify-between items-start"},E={class:"font-semibold text-lg"},K={class:"text-gray-600"},U={key:0,class:"text-sm text-gray-400"},L={class:"mt-4 grid grid-cols-2 gap-2 text-sm"},N={key:3,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50"},T={class:"bg-white rounded-lg shadow-xl w-full max-w-md p-6"},A={class:"space-y-4"},W={class:"grid grid-cols-2 gap-4"},$={class:"grid grid-cols-2 gap-4"},q={class:"flex justify-end space-x-2 mt-6"},P=_({__name:"VehiclesView",setup(H){const c=p(!0),m=p([]),d=p(!1),s=p({license_plate:"",brand:"",model:"",year:2024,color:"",fuel_type:"diesel"});h(async()=>{await v()});async function v(){c.value=!0;try{const a=await y.get("/vehicles");m.value=a.data.vehicles||[]}catch(a){console.error(a)}c.value=!1}async function w(){try{await y.post("/vehicles",s.value),d.value=!1,s.value={license_plate:"",brand:"",model:"",year:2024,color:"",fuel_type:"diesel"},await v()}catch(a){alert("Fehler: "+a.message)}}function b(a){return{available:{text:"Verfügbar",class:"bg-green-100 text-green-700",icon:"✅"},in_use:{text:"Im Einsatz",class:"bg-blue-100 text-blue-700",icon:"🚗"},maintenance:{text:"Wartung",class:"bg-yellow-100 text-yellow-700",icon:"🔧"},retired:{text:"Stillgelegt",class:"bg-gray-100 text-gray-700",icon:"⛔"}}[a]||{text:a,class:"bg-gray-100",icon:""}}return(a,t)=>(i(),n("div",D,[e("div",F,[t[7]||(t[7]=e("div",null,[e("h1",{class:"text-2xl font-bold"},"🚗 Fahrzeuge"),e("p",{class:"text-gray-500"},"Fuhrpark verwalten")],-1)),e("button",{onClick:t[0]||(t[0]=l=>d.value=!0),class:"btn btn-primary"},"+ Fahrzeug")]),c.value?(i(),n("div",M,"Laden...")):m.value.length===0?(i(),n("div",j,[...t[8]||(t[8]=[e("p",{class:"text-4xl mb-4"},"🚗",-1),e("p",null,"Keine Fahrzeuge vorhanden",-1)])])):(i(),n("div",C,[(i(!0),n(V,null,z(m.value,l=>{var x;return i(),n("div",{key:l.id,class:"bg-white rounded-lg shadow p-4"},[e("div",S,[e("div",null,[e("h3",E,o(l.license_plate),1),e("p",K,o(l.brand)+" "+o(l.model),1),l.year?(i(),n("p",U,"Baujahr "+o(l.year),1)):g("",!0)]),e("span",{class:f(["px-2 py-1 text-xs rounded",b(l.status).class])},o(b(l.status).icon)+" "+o(b(l.status).text),3)]),e("div",L,[e("div",null,[t[9]||(t[9]=e("span",{class:"text-gray-500"},"KM-Stand:",-1)),k(" "+o(((x=l.current_mileage)==null?void 0:x.toLocaleString())||"-"),1)]),e("div",null,[t[10]||(t[10]=e("span",{class:"text-gray-500"},"Kraftstoff:",-1)),k(" "+o(l.fuel_type),1)]),l.tuev_expires?(i(),n("div",{key:0,class:f(["col-span-2",new Date(l.tuev_expires)<new Date?"text-red-600":""])}," TÜV: "+o(new Date(l.tuev_expires).toLocaleDateString("de-DE")),3)):g("",!0)])])}),128))])),d.value?(i(),n("div",N,[e("div",T,[t[17]||(t[17]=e("h2",{class:"text-xl font-bold mb-4"},"Neues Fahrzeug",-1)),e("div",A,[e("div",null,[t[11]||(t[11]=e("label",{class:"block text-sm font-medium mb-1"},"Kennzeichen *",-1)),r(e("input",{"onUpdate:modelValue":t[1]||(t[1]=l=>s.value.license_plate=l),class:"input",placeholder:"B-AB 1234"},null,512),[[u,s.value.license_plate]])]),e("div",W,[e("div",null,[t[12]||(t[12]=e("label",{class:"block text-sm font-medium mb-1"},"Marke",-1)),r(e("input",{"onUpdate:modelValue":t[2]||(t[2]=l=>s.value.brand=l),class:"input",placeholder:"VW"},null,512),[[u,s.value.brand]])]),e("div",null,[t[13]||(t[13]=e("label",{class:"block text-sm font-medium mb-1"},"Modell",-1)),r(e("input",{"onUpdate:modelValue":t[3]||(t[3]=l=>s.value.model=l),class:"input",placeholder:"Passat"},null,512),[[u,s.value.model]])])]),e("div",$,[e("div",null,[t[14]||(t[14]=e("label",{class:"block text-sm font-medium mb-1"},"Baujahr",-1)),r(e("input",{"onUpdate:modelValue":t[4]||(t[4]=l=>s.value.year=l),type:"number",class:"input"},null,512),[[u,s.value.year,void 0,{number:!0}]])]),e("div",null,[t[16]||(t[16]=e("label",{class:"block text-sm font-medium mb-1"},"Kraftstoff",-1)),r(e("select",{"onUpdate:modelValue":t[5]||(t[5]=l=>s.value.fuel_type=l),class:"input"},[...t[15]||(t[15]=[e("option",{value:"diesel"},"Diesel",-1),e("option",{value:"petrol"},"Benzin",-1),e("option",{value:"electric"},"Elektro",-1),e("option",{value:"hybrid"},"Hybrid",-1)])],512),[[B,s.value.fuel_type]])])])]),e("div",q,[e("button",{onClick:t[6]||(t[6]=l=>d.value=!1),class:"btn"},"Abbrechen"),e("button",{onClick:w,class:"btn btn-primary"},"Erstellen")])])])):g("",!0)]))}});export{P as default};
|
||||||
1
dist/assets/index-BtrpDjiv.css
vendored
1
dist/assets/index-BtrpDjiv.css
vendored
File diff suppressed because one or more lines are too long
29
dist/assets/index-CWxNv9Fc.js
vendored
29
dist/assets/index-CWxNv9Fc.js
vendored
File diff suppressed because one or more lines are too long
47
dist/assets/index-CgM2qJ96.js
vendored
Normal file
47
dist/assets/index-CgM2qJ96.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-FAo1Ctk1.css
vendored
Normal file
1
dist/assets/index-FAo1Ctk1.css
vendored
Normal file
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
@@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
<!-- Android -->
|
<!-- Android -->
|
||||||
<meta name="mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
<script type="module" crossorigin src="/app/assets/index-CWxNv9Fc.js"></script>
|
<script type="module" crossorigin src="/app/assets/index-CgM2qJ96.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/app/assets/index-BtrpDjiv.css">
|
<link rel="stylesheet" crossorigin href="/app/assets/index-FAo1Ctk1.css">
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-50 dark:bg-gray-900">
|
<body class="bg-gray-50 dark:bg-gray-900">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
65
node_modules/.package-lock.json
generated
vendored
65
node_modules/.package-lock.json
generated
vendored
@@ -80,6 +80,50 @@
|
|||||||
"node": ">=12"
|
"node": ">=12"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@intlify/core-base": {
|
||||||
|
"version": "9.14.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/core-base/-/core-base-9.14.5.tgz",
|
||||||
|
"integrity": "sha512-5ah5FqZG4pOoHjkvs8mjtv+gPKYU0zCISaYNjBNNqYiaITxW8ZtVih3GS/oTOqN8d9/mDLyrjD46GBApNxmlsA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/message-compiler": "9.14.5",
|
||||||
|
"@intlify/shared": "9.14.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@intlify/message-compiler": {
|
||||||
|
"version": "9.14.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/message-compiler/-/message-compiler-9.14.5.tgz",
|
||||||
|
"integrity": "sha512-IHzgEu61/YIpQV5Pc3aRWScDcnFKWvQA9kigcINcCBXN8mbW+vk9SK+lDxA6STzKQsVJxUPg9ACC52pKKo3SVQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/shared": "9.14.5",
|
||||||
|
"source-map-js": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@intlify/shared": {
|
||||||
|
"version": "9.14.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@intlify/shared/-/shared-9.14.5.tgz",
|
||||||
|
"integrity": "sha512-9gB+E53BYuAEMhbCAxVgG38EZrk59sxBtv3jSizNL2hEWlgjBjAw1AwpLHtNaeda12pe6W20OGEa0TwuMSRbyQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@jridgewell/gen-mapping": {
|
"node_modules/@jridgewell/gen-mapping": {
|
||||||
"version": "0.3.13",
|
"version": "0.3.13",
|
||||||
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
"resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
|
||||||
@@ -1821,6 +1865,27 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/vue-i18n": {
|
||||||
|
"version": "9.14.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-9.14.5.tgz",
|
||||||
|
"integrity": "sha512-0jQ9Em3ymWngyiIkj0+c/k7WgaPO+TNzjKSNq9BvBQaKJECqn9cd9fL4tkDhB5G1QBskGl9YxxbDAhgbFtpe2g==",
|
||||||
|
"deprecated": "v9 and v10 no longer supported. please migrate to v11. about maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/core-base": "9.14.5",
|
||||||
|
"@intlify/shared": "9.14.5",
|
||||||
|
"@vue/devtools-api": "^6.5.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/kazupon"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "^3.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/vue-router": {
|
"node_modules/vue-router": {
|
||||||
"version": "4.6.4",
|
"version": "4.6.4",
|
||||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.4.tgz",
|
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-4.6.4.tgz",
|
||||||
|
|||||||
20
node_modules/@intlify/core-base/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/core-base/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 kazuya kawaguchi
|
||||||
|
|
||||||
|
Permission 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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE 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.
|
||||||
7
node_modules/@intlify/core-base/README.md
generated
vendored
Normal file
7
node_modules/@intlify/core-base/README.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# @intlify/core-base
|
||||||
|
|
||||||
|
The intlify core base module
|
||||||
|
|
||||||
|
## :copyright: License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
1956
node_modules/@intlify/core-base/dist/core-base.cjs
generated
vendored
Normal file
1956
node_modules/@intlify/core-base/dist/core-base.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@intlify/core-base/dist/core-base.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/core-base.cjs')
|
||||||
1
node_modules/@intlify/core-base/dist/core-base.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/core-base.prod.cjs')
|
||||||
1274
node_modules/@intlify/core-base/dist/core-base.d.ts
generated
vendored
Normal file
1274
node_modules/@intlify/core-base/dist/core-base.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
3681
node_modules/@intlify/core-base/dist/core-base.esm-browser.js
generated
vendored
Normal file
3681
node_modules/@intlify/core-base/dist/core-base.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/core-base/dist/core-base.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@intlify/core-base/dist/core-base.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/core-base/dist/core-base.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '../dist/core-base.mjs'
|
||||||
3730
node_modules/@intlify/core-base/dist/core-base.global.js
generated
vendored
Normal file
3730
node_modules/@intlify/core-base/dist/core-base.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/core-base/dist/core-base.global.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/core-base/dist/core-base.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1933
node_modules/@intlify/core-base/dist/core-base.mjs
generated
vendored
Normal file
1933
node_modules/@intlify/core-base/dist/core-base.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1677
node_modules/@intlify/core-base/dist/core-base.prod.cjs
generated
vendored
Normal file
1677
node_modules/@intlify/core-base/dist/core-base.prod.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/@intlify/core-base/index.js
generated
vendored
Normal file
7
node_modules/@intlify/core-base/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
module.exports = require('./dist/core-base.prod.cjs')
|
||||||
|
} else {
|
||||||
|
module.exports = require('./dist/core-base.cjs')
|
||||||
|
}
|
||||||
81
node_modules/@intlify/core-base/package.json
generated
vendored
Normal file
81
node_modules/@intlify/core-base/package.json
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
{
|
||||||
|
"name": "@intlify/core-base",
|
||||||
|
"version": "9.14.5",
|
||||||
|
"description": "@intlify/core-base",
|
||||||
|
"keywords": [
|
||||||
|
"core",
|
||||||
|
"fundamental",
|
||||||
|
"i18n",
|
||||||
|
"internationalization",
|
||||||
|
"intlify"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"author": {
|
||||||
|
"name": "kazuya kawaguchi",
|
||||||
|
"email": "kawakazu80@gmail.com"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/core-base#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||||
|
"directory": "packages/core"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"main": "index.js",
|
||||||
|
"module": "dist/core-base.mjs",
|
||||||
|
"unpkg": "dist/core-base.global.js",
|
||||||
|
"jsdelivr": "dist/core-base.global.js",
|
||||||
|
"types": "dist/core-base.d.ts",
|
||||||
|
"dependencies": {
|
||||||
|
"@intlify/shared": "9.14.5",
|
||||||
|
"@intlify/message-compiler": "9.14.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@intlify/devtools-if": "9.14.5",
|
||||||
|
"@intlify/vue-devtools": "9.14.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"buildOptions": {
|
||||||
|
"name": "IntlifyCoreBase",
|
||||||
|
"formats": [
|
||||||
|
"mjs",
|
||||||
|
"browser",
|
||||||
|
"cjs",
|
||||||
|
"global"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/core-base.d.ts",
|
||||||
|
"import": "./dist/core-base.mjs",
|
||||||
|
"browser": "./dist/core-base.esm-browser.js",
|
||||||
|
"node": {
|
||||||
|
"import": {
|
||||||
|
"production": "./dist/core-base.prod.cjs",
|
||||||
|
"development": "./dist/core-base.mjs",
|
||||||
|
"default": "./dist/core-base.mjs"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"production": "./dist/core-base.prod.cjs",
|
||||||
|
"development": "./dist/core-base.cjs",
|
||||||
|
"default": "./index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"./dist/*": "./dist/*",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"funding": "https://github.com/sponsors/kazupon",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"sideEffects": false
|
||||||
|
}
|
||||||
20
node_modules/@intlify/message-compiler/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/message-compiler/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 kazuya kawaguchi
|
||||||
|
|
||||||
|
Permission 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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE 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.
|
||||||
7
node_modules/@intlify/message-compiler/README.md
generated
vendored
Normal file
7
node_modules/@intlify/message-compiler/README.md
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# @intlify/message-compiler
|
||||||
|
|
||||||
|
The message compiler for intlify project
|
||||||
|
|
||||||
|
## :copyright: License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
1674
node_modules/@intlify/message-compiler/dist/message-compiler.cjs
generated
vendored
Normal file
1674
node_modules/@intlify/message-compiler/dist/message-compiler.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/message-compiler.cjs')
|
||||||
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/message-compiler.prod.cjs')
|
||||||
249
node_modules/@intlify/message-compiler/dist/message-compiler.d.ts
generated
vendored
Normal file
249
node_modules/@intlify/message-compiler/dist/message-compiler.d.ts
generated
vendored
Normal file
@@ -0,0 +1,249 @@
|
|||||||
|
|
||||||
|
|
||||||
|
import type { BaseError } from '@intlify/shared';
|
||||||
|
import type { RawSourceMap } from 'source-map-js';
|
||||||
|
|
||||||
|
export declare function baseCompile(source: string, options?: CompileOptions): CompilerResult;
|
||||||
|
|
||||||
|
export declare type CacheKeyHandler = (source: string) => string;
|
||||||
|
|
||||||
|
export declare interface CodeGenOptions {
|
||||||
|
location?: boolean;
|
||||||
|
mode?: 'normal' | 'arrow';
|
||||||
|
breakLineCode?: '\n' | ';';
|
||||||
|
needIndent?: boolean;
|
||||||
|
onWarn?: CompileWarnHandler;
|
||||||
|
onError?: CompileErrorHandler;
|
||||||
|
sourceMap?: boolean;
|
||||||
|
filename?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare interface CodeGenResult {
|
||||||
|
code: string;
|
||||||
|
ast: ResourceNode;
|
||||||
|
map?: RawSourceMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare type CompileDomain = 'tokenizer' | 'parser' | 'generator' | 'transformer' | 'optimizer' | 'minifier';
|
||||||
|
|
||||||
|
export declare interface CompileError extends BaseError, SyntaxError {
|
||||||
|
domain?: CompileDomain;
|
||||||
|
location?: SourceLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare const CompileErrorCodes: {
|
||||||
|
readonly EXPECTED_TOKEN: 1;
|
||||||
|
readonly INVALID_TOKEN_IN_PLACEHOLDER: 2;
|
||||||
|
readonly UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3;
|
||||||
|
readonly UNKNOWN_ESCAPE_SEQUENCE: 4;
|
||||||
|
readonly INVALID_UNICODE_ESCAPE_SEQUENCE: 5;
|
||||||
|
readonly UNBALANCED_CLOSING_BRACE: 6;
|
||||||
|
readonly UNTERMINATED_CLOSING_BRACE: 7;
|
||||||
|
readonly EMPTY_PLACEHOLDER: 8;
|
||||||
|
readonly NOT_ALLOW_NEST_PLACEHOLDER: 9;
|
||||||
|
readonly INVALID_LINKED_FORMAT: 10;
|
||||||
|
readonly MUST_HAVE_MESSAGES_IN_PLURAL: 11;
|
||||||
|
readonly UNEXPECTED_EMPTY_LINKED_MODIFIER: 12;
|
||||||
|
readonly UNEXPECTED_EMPTY_LINKED_KEY: 13;
|
||||||
|
readonly UNEXPECTED_LEXICAL_ANALYSIS: 14;
|
||||||
|
readonly UNHANDLED_CODEGEN_NODE_TYPE: 15;
|
||||||
|
readonly UNHANDLED_MINIFIER_NODE_TYPE: 16;
|
||||||
|
readonly __EXTEND_POINT__: 17;
|
||||||
|
};
|
||||||
|
|
||||||
|
export declare type CompileErrorCodes = (typeof CompileErrorCodes)[keyof typeof CompileErrorCodes];
|
||||||
|
|
||||||
|
export declare type CompileErrorHandler = (error: CompileError) => void;
|
||||||
|
|
||||||
|
export declare interface CompileErrorOptions {
|
||||||
|
domain?: CompileDomain;
|
||||||
|
messages?: {
|
||||||
|
[code: number]: string;
|
||||||
|
};
|
||||||
|
args?: unknown[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare type CompileOptions = {
|
||||||
|
optimize?: boolean;
|
||||||
|
minify?: boolean;
|
||||||
|
jit?: boolean;
|
||||||
|
} & TransformOptions & CodeGenOptions & ParserOptions & TokenizeOptions;
|
||||||
|
|
||||||
|
export declare type CompilerResult = CodeGenResult;
|
||||||
|
|
||||||
|
export declare interface CompileWarn {
|
||||||
|
message: string;
|
||||||
|
code: number;
|
||||||
|
location?: SourceLocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare const CompileWarnCodes: {
|
||||||
|
readonly USE_MODULO_SYNTAX: 1;
|
||||||
|
readonly __EXTEND_POINT__: 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
export declare type CompileWarnCodes = (typeof CompileWarnCodes)[keyof typeof CompileWarnCodes];
|
||||||
|
|
||||||
|
export declare type CompileWarnHandler = (warn: CompileWarn) => void;
|
||||||
|
|
||||||
|
export declare function createCompileError<T extends number>(code: T, loc: SourceLocation | null, options?: CompileErrorOptions): CompileError;
|
||||||
|
|
||||||
|
export declare function createCompileWarn<T extends number>(code: T, loc: SourceLocation | null, ...args: unknown[]): CompileWarn;
|
||||||
|
|
||||||
|
export declare function createLocation(start: Position, end: Position, source?: string): SourceLocation;
|
||||||
|
|
||||||
|
export declare function createParser(options?: ParserOptions): Parser;
|
||||||
|
|
||||||
|
export declare function createPosition(line: number, column: number, offset: number): Position;
|
||||||
|
|
||||||
|
/* Excluded from this release type: defaultOnError */
|
||||||
|
|
||||||
|
export declare const detectHtmlTag: (source: string) => boolean;
|
||||||
|
|
||||||
|
export declare const ERROR_DOMAIN = "parser";
|
||||||
|
|
||||||
|
/* Excluded from this release type: errorMessages */
|
||||||
|
|
||||||
|
export declare const enum HelperNameMap {
|
||||||
|
LIST = "list",
|
||||||
|
NAMED = "named",
|
||||||
|
PLURAL = "plural",
|
||||||
|
LINKED = "linked",
|
||||||
|
MESSAGE = "message",
|
||||||
|
TYPE = "type",
|
||||||
|
INTERPOLATE = "interpolate",
|
||||||
|
NORMALIZE = "normalize",
|
||||||
|
VALUES = "values"
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare type Identifier = string;
|
||||||
|
|
||||||
|
export declare interface LinkedKeyNode extends Node_2 {
|
||||||
|
type: NodeTypes.LinkedKey;
|
||||||
|
value: string;
|
||||||
|
/* Excluded from this release type: v */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface LinkedModifierNode extends Node_2 {
|
||||||
|
type: NodeTypes.LinkedModifier;
|
||||||
|
value: Identifier;
|
||||||
|
/* Excluded from this release type: v */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface LinkedNode extends Node_2 {
|
||||||
|
type: NodeTypes.Linked;
|
||||||
|
modifier?: LinkedModifierNode;
|
||||||
|
/* Excluded from this release type: m */
|
||||||
|
key: LinkedKeyNode | NamedNode | ListNode | LiteralNode;
|
||||||
|
/* Excluded from this release type: k */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface ListNode extends Node_2 {
|
||||||
|
type: NodeTypes.List;
|
||||||
|
index: number;
|
||||||
|
/* Excluded from this release type: i */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface LiteralNode extends Node_2 {
|
||||||
|
type: NodeTypes.Literal;
|
||||||
|
value?: string;
|
||||||
|
/* Excluded from this release type: v */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare const LOCATION_STUB: SourceLocation;
|
||||||
|
|
||||||
|
declare type MessageElementNode = TextNode | NamedNode | ListNode | LiteralNode | LinkedNode;
|
||||||
|
|
||||||
|
export declare interface MessageNode extends Node_2 {
|
||||||
|
type: NodeTypes.Message;
|
||||||
|
static?: string;
|
||||||
|
/* Excluded from this release type: s */
|
||||||
|
items: MessageElementNode[];
|
||||||
|
/* Excluded from this release type: i */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface NamedNode extends Node_2 {
|
||||||
|
type: NodeTypes.Named;
|
||||||
|
key: Identifier;
|
||||||
|
modulo?: boolean;
|
||||||
|
/* Excluded from this release type: k */
|
||||||
|
}
|
||||||
|
|
||||||
|
declare interface Node_2 {
|
||||||
|
type: NodeTypes;
|
||||||
|
/* Excluded from this release type: t */
|
||||||
|
start?: number;
|
||||||
|
end?: number;
|
||||||
|
loc?: SourceLocation;
|
||||||
|
}
|
||||||
|
export { Node_2 as Node }
|
||||||
|
|
||||||
|
export declare const enum NodeTypes {
|
||||||
|
Resource = 0,// 0
|
||||||
|
Plural = 1,
|
||||||
|
Message = 2,
|
||||||
|
Text = 3,
|
||||||
|
Named = 4,
|
||||||
|
List = 5,// 5
|
||||||
|
Linked = 6,
|
||||||
|
LinkedKey = 7,
|
||||||
|
LinkedModifier = 8,
|
||||||
|
Literal = 9
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface Parser {
|
||||||
|
parse(source: string): ResourceNode;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface ParserOptions {
|
||||||
|
location?: boolean;
|
||||||
|
onCacheKey?: (source: string) => string;
|
||||||
|
onWarn?: CompileWarnHandler;
|
||||||
|
onError?: CompileErrorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface PluralNode extends Node_2 {
|
||||||
|
type: NodeTypes.Plural;
|
||||||
|
cases: MessageNode[];
|
||||||
|
/* Excluded from this release type: c */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface Position {
|
||||||
|
offset: number;
|
||||||
|
line: number;
|
||||||
|
column: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface ResourceNode extends Node_2 {
|
||||||
|
type: NodeTypes.Resource;
|
||||||
|
body: MessageNode | PluralNode;
|
||||||
|
/* Excluded from this release type: b */
|
||||||
|
cacheKey?: string;
|
||||||
|
helpers?: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface SourceLocation {
|
||||||
|
start: Position;
|
||||||
|
end: Position;
|
||||||
|
source?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface TextNode extends Node_2 {
|
||||||
|
type: NodeTypes.Text;
|
||||||
|
value?: string;
|
||||||
|
/* Excluded from this release type: v */
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface TokenizeOptions {
|
||||||
|
location?: boolean;
|
||||||
|
onError?: CompileErrorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare interface TransformOptions {
|
||||||
|
onWarn?: CompileWarnHandler;
|
||||||
|
onError?: CompileErrorHandler;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Excluded from this release type: warnMessages */
|
||||||
|
|
||||||
|
export { }
|
||||||
1625
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js
generated
vendored
Normal file
1625
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/message-compiler/dist/message-compiler.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/message-compiler/dist/message-compiler.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '../dist/message-compiler.mjs'
|
||||||
1645
node_modules/@intlify/message-compiler/dist/message-compiler.global.js
generated
vendored
Normal file
1645
node_modules/@intlify/message-compiler/dist/message-compiler.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/message-compiler/dist/message-compiler.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1603
node_modules/@intlify/message-compiler/dist/message-compiler.mjs
generated
vendored
Normal file
1603
node_modules/@intlify/message-compiler/dist/message-compiler.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1660
node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs
generated
vendored
Normal file
1660
node_modules/@intlify/message-compiler/dist/message-compiler.node.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1657
node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs
generated
vendored
Normal file
1657
node_modules/@intlify/message-compiler/dist/message-compiler.prod.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7
node_modules/@intlify/message-compiler/index.js
generated
vendored
Normal file
7
node_modules/@intlify/message-compiler/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
module.exports = require('./dist/message-compiler.prod.cjs')
|
||||||
|
} else {
|
||||||
|
module.exports = require('./dist/message-compiler.cjs')
|
||||||
|
}
|
||||||
79
node_modules/@intlify/message-compiler/package.json
generated
vendored
Normal file
79
node_modules/@intlify/message-compiler/package.json
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"name": "@intlify/message-compiler",
|
||||||
|
"version": "9.14.5",
|
||||||
|
"description": "@intlify/message-compiler",
|
||||||
|
"keywords": [
|
||||||
|
"compiler",
|
||||||
|
"i18n",
|
||||||
|
"internationalization",
|
||||||
|
"intlify",
|
||||||
|
"message-format"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"author": {
|
||||||
|
"name": "kazuya kawaguchi",
|
||||||
|
"email": "kawakazu80@gmail.com"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/message-compiler#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||||
|
"directory": "packages/message-compiler"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"main": "index.js",
|
||||||
|
"module": "dist/message-compiler.mjs",
|
||||||
|
"unpkg": "dist/message-compiler.global.js",
|
||||||
|
"jsdelivr": "dist/message-compiler.global.js",
|
||||||
|
"types": "dist/message-compiler.d.ts",
|
||||||
|
"dependencies": {
|
||||||
|
"source-map-js": "^1.0.2",
|
||||||
|
"@intlify/shared": "9.14.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"buildOptions": {
|
||||||
|
"name": "IntlifyMessageCompiler",
|
||||||
|
"formats": [
|
||||||
|
"mjs",
|
||||||
|
"mjs-node",
|
||||||
|
"browser",
|
||||||
|
"cjs",
|
||||||
|
"global"
|
||||||
|
],
|
||||||
|
"enableFullBundleForEsmBrowser": true
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/message-compiler.d.ts",
|
||||||
|
"browser": "./dist/message-compiler.esm-browser.js",
|
||||||
|
"node": {
|
||||||
|
"import": {
|
||||||
|
"production": "./dist/message-compiler.node.mjs",
|
||||||
|
"development": "./dist/message-compiler.node.mjs",
|
||||||
|
"default": "./dist/message-compiler.node.mjs"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"production": "./dist/message-compiler.prod.cjs",
|
||||||
|
"development": "./dist/message-compiler.cjs",
|
||||||
|
"default": "./index.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"import": "./dist/message-compiler.mjs"
|
||||||
|
},
|
||||||
|
"./dist/*": "./dist/*",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"funding": "https://github.com/sponsors/kazupon",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"sideEffects": false
|
||||||
|
}
|
||||||
20
node_modules/@intlify/shared/LICENSE
generated
vendored
Normal file
20
node_modules/@intlify/shared/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 kazuya kawaguchi
|
||||||
|
|
||||||
|
Permission 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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE 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.
|
||||||
18
node_modules/@intlify/shared/README.md
generated
vendored
Normal file
18
node_modules/@intlify/shared/README.md
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# @intlify/shared
|
||||||
|
|
||||||
|
The shared utility package for intlify project
|
||||||
|
|
||||||
|
## Forks
|
||||||
|
The implementation of this module is contains code forked from other packages or projects:
|
||||||
|
|
||||||
|
- [@vue/shared](https://github.com/vuejs/vue-next/tree/master/packages/shared)
|
||||||
|
- Useful Utilities at `utils.ts`
|
||||||
|
- Author: Evan You
|
||||||
|
- License: MIT
|
||||||
|
- Event Emitter at `emitter.ts` and `emittable.ts`
|
||||||
|
- Author: Jason Miller
|
||||||
|
- License: MIT
|
||||||
|
|
||||||
|
## :copyright: License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
324
node_modules/@intlify/shared/dist/shared.cjs
generated
vendored
Normal file
324
node_modules/@intlify/shared/dist/shared.cjs
generated
vendored
Normal file
@@ -0,0 +1,324 @@
|
|||||||
|
/*!
|
||||||
|
* shared v9.14.5
|
||||||
|
* (c) 2025 kazuya kawaguchi
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function warn(msg, err) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console.warn(`[intlify] ` + msg);
|
||||||
|
/* istanbul ignore if */
|
||||||
|
if (err) {
|
||||||
|
console.warn(err.stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const hasWarned = {};
|
||||||
|
function warnOnce(msg) {
|
||||||
|
if (!hasWarned[msg]) {
|
||||||
|
hasWarned[msg] = true;
|
||||||
|
warn(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original Utilities
|
||||||
|
* written by kazuya kawaguchi
|
||||||
|
*/
|
||||||
|
const inBrowser = typeof window !== 'undefined';
|
||||||
|
exports.mark = void 0;
|
||||||
|
exports.measure = void 0;
|
||||||
|
{
|
||||||
|
const perf = inBrowser && window.performance;
|
||||||
|
if (perf &&
|
||||||
|
perf.mark &&
|
||||||
|
perf.measure &&
|
||||||
|
perf.clearMarks &&
|
||||||
|
// @ts-ignore browser compat
|
||||||
|
perf.clearMeasures) {
|
||||||
|
exports.mark = (tag) => {
|
||||||
|
perf.mark(tag);
|
||||||
|
};
|
||||||
|
exports.measure = (name, startTag, endTag) => {
|
||||||
|
perf.measure(name, startTag, endTag);
|
||||||
|
perf.clearMarks(startTag);
|
||||||
|
perf.clearMarks(endTag);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||||
|
/* eslint-disable */
|
||||||
|
function format(message, ...args) {
|
||||||
|
if (args.length === 1 && isObject(args[0])) {
|
||||||
|
args = args[0];
|
||||||
|
}
|
||||||
|
if (!args || !args.hasOwnProperty) {
|
||||||
|
args = {};
|
||||||
|
}
|
||||||
|
return message.replace(RE_ARGS, (match, identifier) => {
|
||||||
|
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||||
|
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||||
|
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||||
|
.replace(/\u2028/g, '\\u2028')
|
||||||
|
.replace(/\u2029/g, '\\u2029')
|
||||||
|
.replace(/\u0027/g, '\\u0027');
|
||||||
|
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||||
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||||
|
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||||
|
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||||
|
const assign = Object.assign;
|
||||||
|
const _create = Object.create;
|
||||||
|
const create = (obj = null) => _create(obj);
|
||||||
|
let _globalThis;
|
||||||
|
const getGlobalThis = () => {
|
||||||
|
// prettier-ignore
|
||||||
|
return (_globalThis ||
|
||||||
|
(_globalThis =
|
||||||
|
typeof globalThis !== 'undefined'
|
||||||
|
? globalThis
|
||||||
|
: typeof self !== 'undefined'
|
||||||
|
? self
|
||||||
|
: typeof window !== 'undefined'
|
||||||
|
? window
|
||||||
|
: typeof global !== 'undefined'
|
||||||
|
? global
|
||||||
|
: create()));
|
||||||
|
};
|
||||||
|
function escapeHtml(rawText) {
|
||||||
|
return rawText
|
||||||
|
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||||
|
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||||
|
}
|
||||||
|
function escapeAttributeValue(value) {
|
||||||
|
return value
|
||||||
|
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
function sanitizeTranslatedHtml(html) {
|
||||||
|
// Escape dangerous characters in attribute values
|
||||||
|
// Process attributes with double quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||||
|
// Process attributes with single quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||||
|
// Detect and neutralize event handler attributes
|
||||||
|
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||||
|
if (eventHandlerPattern.test(html)) {
|
||||||
|
{
|
||||||
|
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||||
|
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||||
|
}
|
||||||
|
// Neutralize event handler attributes by escaping 'on'
|
||||||
|
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||||
|
}
|
||||||
|
// Disable javascript: URLs in various contexts
|
||||||
|
const javascriptUrlPattern = [
|
||||||
|
// In href, src, action, formaction attributes
|
||||||
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||||
|
// In style attributes within url()
|
||||||
|
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||||
|
];
|
||||||
|
javascriptUrlPattern.forEach(pattern => {
|
||||||
|
html = html.replace(pattern, '$1javascript:');
|
||||||
|
});
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
|
function hasOwn(obj, key) {
|
||||||
|
return hasOwnProperty.call(obj, key);
|
||||||
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
/**
|
||||||
|
* Useful Utilities By Evan you
|
||||||
|
* Modified by kazuya kawaguchi
|
||||||
|
* MIT License
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||||
|
*/
|
||||||
|
const isArray = Array.isArray;
|
||||||
|
const isFunction = (val) => typeof val === 'function';
|
||||||
|
const isString = (val) => typeof val === 'string';
|
||||||
|
const isBoolean = (val) => typeof val === 'boolean';
|
||||||
|
const isSymbol = (val) => typeof val === 'symbol';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isObject = (val) => val !== null && typeof val === 'object';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isPromise = (val) => {
|
||||||
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||||
|
};
|
||||||
|
const objectToString = Object.prototype.toString;
|
||||||
|
const toTypeString = (value) => objectToString.call(value);
|
||||||
|
const isPlainObject = (val) => {
|
||||||
|
if (!isObject(val))
|
||||||
|
return false;
|
||||||
|
const proto = Object.getPrototypeOf(val);
|
||||||
|
return proto === null || proto.constructor === Object;
|
||||||
|
};
|
||||||
|
// for converting list and named values to displayed strings.
|
||||||
|
const toDisplayString = (val) => {
|
||||||
|
return val == null
|
||||||
|
? ''
|
||||||
|
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||||
|
? JSON.stringify(val, null, 2)
|
||||||
|
: String(val);
|
||||||
|
};
|
||||||
|
function join(items, separator = '') {
|
||||||
|
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||||
|
}
|
||||||
|
const RANGE = 2;
|
||||||
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||||
|
const lines = source.split(/\r?\n/);
|
||||||
|
let count = 0;
|
||||||
|
const res = [];
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
count += lines[i].length + 1;
|
||||||
|
if (count >= start) {
|
||||||
|
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||||
|
if (j < 0 || j >= lines.length)
|
||||||
|
continue;
|
||||||
|
const line = j + 1;
|
||||||
|
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||||
|
const lineLength = lines[j].length;
|
||||||
|
if (j === i) {
|
||||||
|
// push underline
|
||||||
|
const pad = start - (count - lineLength) + 1;
|
||||||
|
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||||
|
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
else if (j > i) {
|
||||||
|
if (end > count) {
|
||||||
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||||
|
res.push(` | ` + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
count += lineLength + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.join('\n');
|
||||||
|
}
|
||||||
|
function incrementer(code) {
|
||||||
|
let current = code;
|
||||||
|
return () => ++current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitter, forked from the below:
|
||||||
|
* - original repository url: https://github.com/developit/mitt
|
||||||
|
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||||
|
* - author: Jason Miller (https://github.com/developit)
|
||||||
|
* - license: MIT
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Create a event emitter
|
||||||
|
*
|
||||||
|
* @returns An event emitter
|
||||||
|
*/
|
||||||
|
function createEmitter() {
|
||||||
|
const events = new Map();
|
||||||
|
const emitter = {
|
||||||
|
events,
|
||||||
|
on(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
const added = handlers && handlers.push(handler);
|
||||||
|
if (!added) {
|
||||||
|
events.set(event, [handler]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
if (handlers) {
|
||||||
|
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(event, payload) {
|
||||||
|
(events.get(event) || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(payload));
|
||||||
|
(events.get('*') || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(event, payload));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return emitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||||
|
function deepCopy(src, des) {
|
||||||
|
// src and des should both be objects, and none of them can be a array
|
||||||
|
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||||
|
throw new Error('Invalid value');
|
||||||
|
}
|
||||||
|
const stack = [{ src, des }];
|
||||||
|
while (stack.length) {
|
||||||
|
const { src, des } = stack.pop();
|
||||||
|
// using `Object.keys` which skips prototype properties
|
||||||
|
Object.keys(src).forEach(key => {
|
||||||
|
if (key === '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if src[key] is an object/array, set des[key]
|
||||||
|
// to empty object/array to prevent setting by reference
|
||||||
|
if (isObject(src[key]) && !isObject(des[key])) {
|
||||||
|
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||||
|
}
|
||||||
|
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||||
|
// replace with src[key] when:
|
||||||
|
// src[key] or des[key] is not an object, or
|
||||||
|
// src[key] or des[key] is an array
|
||||||
|
des[key] = src[key];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// src[key] and des[key] are both objects, merge them
|
||||||
|
stack.push({ src: src[key], des: des[key] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.assign = assign;
|
||||||
|
exports.create = create;
|
||||||
|
exports.createEmitter = createEmitter;
|
||||||
|
exports.deepCopy = deepCopy;
|
||||||
|
exports.escapeHtml = escapeHtml;
|
||||||
|
exports.format = format;
|
||||||
|
exports.friendlyJSONstringify = friendlyJSONstringify;
|
||||||
|
exports.generateCodeFrame = generateCodeFrame;
|
||||||
|
exports.generateFormatCacheKey = generateFormatCacheKey;
|
||||||
|
exports.getGlobalThis = getGlobalThis;
|
||||||
|
exports.hasOwn = hasOwn;
|
||||||
|
exports.inBrowser = inBrowser;
|
||||||
|
exports.incrementer = incrementer;
|
||||||
|
exports.isArray = isArray;
|
||||||
|
exports.isBoolean = isBoolean;
|
||||||
|
exports.isDate = isDate;
|
||||||
|
exports.isEmptyObject = isEmptyObject;
|
||||||
|
exports.isFunction = isFunction;
|
||||||
|
exports.isNumber = isNumber;
|
||||||
|
exports.isObject = isObject;
|
||||||
|
exports.isPlainObject = isPlainObject;
|
||||||
|
exports.isPromise = isPromise;
|
||||||
|
exports.isRegExp = isRegExp;
|
||||||
|
exports.isString = isString;
|
||||||
|
exports.isSymbol = isSymbol;
|
||||||
|
exports.join = join;
|
||||||
|
exports.makeSymbol = makeSymbol;
|
||||||
|
exports.objectToString = objectToString;
|
||||||
|
exports.sanitizeTranslatedHtml = sanitizeTranslatedHtml;
|
||||||
|
exports.toDisplayString = toDisplayString;
|
||||||
|
exports.toTypeString = toTypeString;
|
||||||
|
exports.warn = warn;
|
||||||
|
exports.warnOnce = warnOnce;
|
||||||
1
node_modules/@intlify/shared/dist/shared.cjs.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/shared.cjs')
|
||||||
1
node_modules/@intlify/shared/dist/shared.cjs.prod.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/shared.prod.cjs')
|
||||||
161
node_modules/@intlify/shared/dist/shared.d.ts
generated
vendored
Normal file
161
node_modules/@intlify/shared/dist/shared.d.ts
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
|
||||||
|
export declare const assign: {
|
||||||
|
<T extends {}, U>(target: T, source: U): T & U;
|
||||||
|
<T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
|
||||||
|
<T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
|
||||||
|
(target: object, ...sources: any[]): any;
|
||||||
|
};
|
||||||
|
|
||||||
|
export declare interface BaseError {
|
||||||
|
code: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare const create: (obj?: object | null) => object;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a event emitter
|
||||||
|
*
|
||||||
|
* @returns An event emitter
|
||||||
|
*/
|
||||||
|
export declare function createEmitter<Events extends Record<EventType, unknown>>(): Emittable<Events>;
|
||||||
|
|
||||||
|
export declare function deepCopy(src: any, des: any): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitter interface
|
||||||
|
*/
|
||||||
|
export declare interface Emittable<Events extends Record<EventType, unknown> = {}> {
|
||||||
|
/**
|
||||||
|
* A map of event names of registered event handlers
|
||||||
|
*/
|
||||||
|
events: EventHandlerMap<Events>;
|
||||||
|
/**
|
||||||
|
* Register an event handler with the event type
|
||||||
|
*
|
||||||
|
* @param event - An {@link EventType}
|
||||||
|
* @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
|
||||||
|
*/
|
||||||
|
on<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
|
||||||
|
/**
|
||||||
|
* Unregister an event handler for the event type
|
||||||
|
*
|
||||||
|
* @param event - An {@link EventType}
|
||||||
|
* @param handler - An {@link EventHandler}, or a {@link WildcardEventHandler} if you are specified "*"
|
||||||
|
*/
|
||||||
|
off<Key extends keyof Events>(event: Key | '*', handler: EventHandler<Events[keyof Events]> | WildcardEventHandler<Events>): void;
|
||||||
|
/**
|
||||||
|
* Invoke all handlers with the event type
|
||||||
|
*
|
||||||
|
* @remarks
|
||||||
|
* Note Manually firing "*" handlers should be not supported
|
||||||
|
*
|
||||||
|
* @param event - An {@link EventType}
|
||||||
|
* @param payload - An event payload, optional
|
||||||
|
*/
|
||||||
|
emit<Key extends keyof Events>(event: Key, payload?: Events[keyof Events]): void;
|
||||||
|
}
|
||||||
|
|
||||||
|
export declare function escapeHtml(rawText: string): string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler
|
||||||
|
*/
|
||||||
|
export declare type EventHandler<T = unknown> = (payload?: T) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler list
|
||||||
|
*/
|
||||||
|
export declare type EventHandlerList<T = unknown> = Array<EventHandler<T>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event handler map
|
||||||
|
*/
|
||||||
|
export declare type EventHandlerMap<Events extends Record<EventType, unknown>> = Map<keyof Events | '*', EventHandlerList<Events[keyof Events]> | WildcardEventHandlerList<Events>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event type
|
||||||
|
*/
|
||||||
|
export declare type EventType = string | symbol;
|
||||||
|
|
||||||
|
export declare function format(message: string, ...args: any): string;
|
||||||
|
|
||||||
|
export declare const friendlyJSONstringify: (json: unknown) => string;
|
||||||
|
|
||||||
|
export declare function generateCodeFrame(source: string, start?: number, end?: number): string;
|
||||||
|
|
||||||
|
export declare const generateFormatCacheKey: (locale: string, key: string, source: string) => string;
|
||||||
|
|
||||||
|
export declare const getGlobalThis: () => any;
|
||||||
|
|
||||||
|
export declare function hasOwn(obj: object | Array<any>, key: string): boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original Utilities
|
||||||
|
* written by kazuya kawaguchi
|
||||||
|
*/
|
||||||
|
export declare const inBrowser: boolean;
|
||||||
|
|
||||||
|
export declare function incrementer(code: number): () => number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Useful Utilities By Evan you
|
||||||
|
* Modified by kazuya kawaguchi
|
||||||
|
* MIT License
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||||
|
*/
|
||||||
|
export declare const isArray: (arg: any) => arg is any[];
|
||||||
|
|
||||||
|
export declare const isBoolean: (val: unknown) => val is boolean;
|
||||||
|
|
||||||
|
export declare const isDate: (val: unknown) => val is Date;
|
||||||
|
|
||||||
|
export declare const isEmptyObject: (val: unknown) => val is boolean;
|
||||||
|
|
||||||
|
export declare const isFunction: (val: unknown) => val is Function;
|
||||||
|
|
||||||
|
export declare const isNumber: (val: unknown) => val is number;
|
||||||
|
|
||||||
|
export declare const isObject: (val: unknown) => val is Record<any, any>;
|
||||||
|
|
||||||
|
export declare const isPlainObject: (val: unknown) => val is object;
|
||||||
|
|
||||||
|
export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
|
||||||
|
|
||||||
|
export declare const isRegExp: (val: unknown) => val is RegExp;
|
||||||
|
|
||||||
|
export declare const isString: (val: unknown) => val is string;
|
||||||
|
|
||||||
|
export declare const isSymbol: (val: unknown) => val is symbol;
|
||||||
|
|
||||||
|
export declare function join(items: string[], separator?: string): string;
|
||||||
|
|
||||||
|
export declare const makeSymbol: (name: string, shareable?: boolean) => symbol;
|
||||||
|
|
||||||
|
export declare let mark: (tag: string) => void | undefined;
|
||||||
|
|
||||||
|
export declare let measure: (name: string, startTag: string, endTag: string) => void | undefined;
|
||||||
|
|
||||||
|
export declare const objectToString: () => string;
|
||||||
|
|
||||||
|
export declare function sanitizeTranslatedHtml(html: string): string;
|
||||||
|
|
||||||
|
export declare const toDisplayString: (val: unknown) => string;
|
||||||
|
|
||||||
|
export declare const toTypeString: (value: unknown) => string;
|
||||||
|
|
||||||
|
export declare function warn(msg: string, err?: Error): void;
|
||||||
|
|
||||||
|
export declare function warnOnce(msg: string): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wildcard event handler
|
||||||
|
*/
|
||||||
|
export declare type WildcardEventHandler<T = Record<string, unknown>> = (event: keyof T, payload?: T[keyof T]) => void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wildcard event handler list
|
||||||
|
*/
|
||||||
|
export declare type WildcardEventHandlerList<T = Record<string, unknown>> = Array<WildcardEventHandler<T>>;
|
||||||
|
|
||||||
|
export { }
|
||||||
290
node_modules/@intlify/shared/dist/shared.esm-browser.js
generated
vendored
Normal file
290
node_modules/@intlify/shared/dist/shared.esm-browser.js
generated
vendored
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
/*!
|
||||||
|
* shared v9.14.5
|
||||||
|
* (c) 2025 kazuya kawaguchi
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
function warn(msg, err) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console.warn(`[intlify] ` + msg);
|
||||||
|
/* istanbul ignore if */
|
||||||
|
if (err) {
|
||||||
|
console.warn(err.stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const hasWarned = {};
|
||||||
|
function warnOnce(msg) {
|
||||||
|
if (!hasWarned[msg]) {
|
||||||
|
hasWarned[msg] = true;
|
||||||
|
warn(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original Utilities
|
||||||
|
* written by kazuya kawaguchi
|
||||||
|
*/
|
||||||
|
const inBrowser = typeof window !== 'undefined';
|
||||||
|
let mark;
|
||||||
|
let measure;
|
||||||
|
{
|
||||||
|
const perf = inBrowser && window.performance;
|
||||||
|
if (perf &&
|
||||||
|
perf.mark &&
|
||||||
|
perf.measure &&
|
||||||
|
perf.clearMarks &&
|
||||||
|
// @ts-ignore browser compat
|
||||||
|
perf.clearMeasures) {
|
||||||
|
mark = (tag) => {
|
||||||
|
perf.mark(tag);
|
||||||
|
};
|
||||||
|
measure = (name, startTag, endTag) => {
|
||||||
|
perf.measure(name, startTag, endTag);
|
||||||
|
perf.clearMarks(startTag);
|
||||||
|
perf.clearMarks(endTag);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||||
|
/* eslint-disable */
|
||||||
|
function format(message, ...args) {
|
||||||
|
if (args.length === 1 && isObject(args[0])) {
|
||||||
|
args = args[0];
|
||||||
|
}
|
||||||
|
if (!args || !args.hasOwnProperty) {
|
||||||
|
args = {};
|
||||||
|
}
|
||||||
|
return message.replace(RE_ARGS, (match, identifier) => {
|
||||||
|
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||||
|
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||||
|
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||||
|
.replace(/\u2028/g, '\\u2028')
|
||||||
|
.replace(/\u2029/g, '\\u2029')
|
||||||
|
.replace(/\u0027/g, '\\u0027');
|
||||||
|
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||||
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||||
|
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||||
|
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||||
|
const assign = Object.assign;
|
||||||
|
const _create = Object.create;
|
||||||
|
const create = (obj = null) => _create(obj);
|
||||||
|
let _globalThis;
|
||||||
|
const getGlobalThis = () => {
|
||||||
|
// prettier-ignore
|
||||||
|
return (_globalThis ||
|
||||||
|
(_globalThis =
|
||||||
|
typeof globalThis !== 'undefined'
|
||||||
|
? globalThis
|
||||||
|
: typeof self !== 'undefined'
|
||||||
|
? self
|
||||||
|
: typeof window !== 'undefined'
|
||||||
|
? window
|
||||||
|
: typeof global !== 'undefined'
|
||||||
|
? global
|
||||||
|
: create()));
|
||||||
|
};
|
||||||
|
function escapeHtml(rawText) {
|
||||||
|
return rawText
|
||||||
|
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||||
|
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||||
|
}
|
||||||
|
function escapeAttributeValue(value) {
|
||||||
|
return value
|
||||||
|
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
function sanitizeTranslatedHtml(html) {
|
||||||
|
// Escape dangerous characters in attribute values
|
||||||
|
// Process attributes with double quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||||
|
// Process attributes with single quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||||
|
// Detect and neutralize event handler attributes
|
||||||
|
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||||
|
if (eventHandlerPattern.test(html)) {
|
||||||
|
{
|
||||||
|
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||||
|
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||||
|
}
|
||||||
|
// Neutralize event handler attributes by escaping 'on'
|
||||||
|
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||||
|
}
|
||||||
|
// Disable javascript: URLs in various contexts
|
||||||
|
const javascriptUrlPattern = [
|
||||||
|
// In href, src, action, formaction attributes
|
||||||
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||||
|
// In style attributes within url()
|
||||||
|
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||||
|
];
|
||||||
|
javascriptUrlPattern.forEach(pattern => {
|
||||||
|
html = html.replace(pattern, '$1javascript:');
|
||||||
|
});
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
|
function hasOwn(obj, key) {
|
||||||
|
return hasOwnProperty.call(obj, key);
|
||||||
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
/**
|
||||||
|
* Useful Utilities By Evan you
|
||||||
|
* Modified by kazuya kawaguchi
|
||||||
|
* MIT License
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||||
|
*/
|
||||||
|
const isArray = Array.isArray;
|
||||||
|
const isFunction = (val) => typeof val === 'function';
|
||||||
|
const isString = (val) => typeof val === 'string';
|
||||||
|
const isBoolean = (val) => typeof val === 'boolean';
|
||||||
|
const isSymbol = (val) => typeof val === 'symbol';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isObject = (val) => val !== null && typeof val === 'object';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isPromise = (val) => {
|
||||||
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||||
|
};
|
||||||
|
const objectToString = Object.prototype.toString;
|
||||||
|
const toTypeString = (value) => objectToString.call(value);
|
||||||
|
const isPlainObject = (val) => {
|
||||||
|
if (!isObject(val))
|
||||||
|
return false;
|
||||||
|
const proto = Object.getPrototypeOf(val);
|
||||||
|
return proto === null || proto.constructor === Object;
|
||||||
|
};
|
||||||
|
// for converting list and named values to displayed strings.
|
||||||
|
const toDisplayString = (val) => {
|
||||||
|
return val == null
|
||||||
|
? ''
|
||||||
|
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||||
|
? JSON.stringify(val, null, 2)
|
||||||
|
: String(val);
|
||||||
|
};
|
||||||
|
function join(items, separator = '') {
|
||||||
|
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||||
|
}
|
||||||
|
const RANGE = 2;
|
||||||
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||||
|
const lines = source.split(/\r?\n/);
|
||||||
|
let count = 0;
|
||||||
|
const res = [];
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
count += lines[i].length + 1;
|
||||||
|
if (count >= start) {
|
||||||
|
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||||
|
if (j < 0 || j >= lines.length)
|
||||||
|
continue;
|
||||||
|
const line = j + 1;
|
||||||
|
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||||
|
const lineLength = lines[j].length;
|
||||||
|
if (j === i) {
|
||||||
|
// push underline
|
||||||
|
const pad = start - (count - lineLength) + 1;
|
||||||
|
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||||
|
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
else if (j > i) {
|
||||||
|
if (end > count) {
|
||||||
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||||
|
res.push(` | ` + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
count += lineLength + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.join('\n');
|
||||||
|
}
|
||||||
|
function incrementer(code) {
|
||||||
|
let current = code;
|
||||||
|
return () => ++current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitter, forked from the below:
|
||||||
|
* - original repository url: https://github.com/developit/mitt
|
||||||
|
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||||
|
* - author: Jason Miller (https://github.com/developit)
|
||||||
|
* - license: MIT
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Create a event emitter
|
||||||
|
*
|
||||||
|
* @returns An event emitter
|
||||||
|
*/
|
||||||
|
function createEmitter() {
|
||||||
|
const events = new Map();
|
||||||
|
const emitter = {
|
||||||
|
events,
|
||||||
|
on(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
const added = handlers && handlers.push(handler);
|
||||||
|
if (!added) {
|
||||||
|
events.set(event, [handler]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
if (handlers) {
|
||||||
|
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(event, payload) {
|
||||||
|
(events.get(event) || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(payload));
|
||||||
|
(events.get('*') || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(event, payload));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return emitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||||
|
function deepCopy(src, des) {
|
||||||
|
// src and des should both be objects, and none of them can be a array
|
||||||
|
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||||
|
throw new Error('Invalid value');
|
||||||
|
}
|
||||||
|
const stack = [{ src, des }];
|
||||||
|
while (stack.length) {
|
||||||
|
const { src, des } = stack.pop();
|
||||||
|
// using `Object.keys` which skips prototype properties
|
||||||
|
Object.keys(src).forEach(key => {
|
||||||
|
if (key === '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if src[key] is an object/array, set des[key]
|
||||||
|
// to empty object/array to prevent setting by reference
|
||||||
|
if (isObject(src[key]) && !isObject(des[key])) {
|
||||||
|
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||||
|
}
|
||||||
|
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||||
|
// replace with src[key] when:
|
||||||
|
// src[key] or des[key] is not an object, or
|
||||||
|
// src[key] or des[key] is an array
|
||||||
|
des[key] = src[key];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// src[key] and des[key] are both objects, merge them
|
||||||
|
stack.push({ src: src[key], des: des[key] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { assign, create, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, sanitizeTranslatedHtml, toDisplayString, toTypeString, warn, warnOnce };
|
||||||
6
node_modules/@intlify/shared/dist/shared.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/@intlify/shared/dist/shared.esm-browser.prod.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* shared v9.14.5
|
||||||
|
* (c) 2025 kazuya kawaguchi
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
function warn(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const hasWarned={};function warnOnce(e){hasWarned[e]||(hasWarned[e]=!0,warn(e))}const inBrowser="undefined"!=typeof window;let mark,measure;const RE_ARGS=/\{([0-9a-zA-Z]+)\}/g;function format(e,...t){return 1===t.length&&isObject(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(RE_ARGS,((e,r)=>t.hasOwnProperty(r)?t[r]:""))}const makeSymbol=(e,t=!1)=>t?Symbol.for(e):Symbol(e),generateFormatCacheKey=(e,t,r)=>friendlyJSONstringify({l:e,k:t,s:r}),friendlyJSONstringify=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),isNumber=e=>"number"==typeof e&&isFinite(e),isDate=e=>"[object Date]"===toTypeString(e),isRegExp=e=>"[object RegExp]"===toTypeString(e),isEmptyObject=e=>isPlainObject(e)&&0===Object.keys(e).length,assign=Object.assign,_create=Object.create,create=(e=null)=>_create(e);let _globalThis;const getGlobalThis=()=>_globalThis||(_globalThis="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:create());function escapeHtml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function escapeAttributeValue(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function sanitizeTranslatedHtml(e){e=(e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,((e,t,r)=>`${t}="${escapeAttributeValue(r)}"`))).replace(/(\w+)\s*=\s*'([^']*)'/g,((e,t,r)=>`${t}='${escapeAttributeValue(r)}'`));/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3"));return[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach((t=>{e=e.replace(t,"$1javascript:")})),e}const hasOwnProperty=Object.prototype.hasOwnProperty;function hasOwn(e,t){return hasOwnProperty.call(e,t)}const isArray=Array.isArray,isFunction=e=>"function"==typeof e,isString=e=>"string"==typeof e,isBoolean=e=>"boolean"==typeof e,isSymbol=e=>"symbol"==typeof e,isObject=e=>null!==e&&"object"==typeof e,isPromise=e=>isObject(e)&&isFunction(e.then)&&isFunction(e.catch),objectToString=Object.prototype.toString,toTypeString=e=>objectToString.call(e),isPlainObject=e=>{if(!isObject(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object},toDisplayString=e=>null==e?"":isArray(e)||isPlainObject(e)&&e.toString===objectToString?JSON.stringify(e,null,2):String(e);function join(e,t=""){return e.reduce(((e,r,n)=>0===n?e+r:e+t+r),"")}const RANGE=2;function generateCodeFrame(e,t=0,r=e.length){const n=e.split(/\r?\n/);let s=0;const i=[];for(let o=0;o<n.length;o++)if(s+=n[o].length+1,s>=t){for(let e=o-2;e<=o+2||r>s;e++){if(e<0||e>=n.length)continue;const a=e+1;i.push(`${a}${" ".repeat(3-String(a).length)}| ${n[e]}`);const c=n[e].length;if(e===o){const e=t-(s-c)+1,n=Math.max(1,r>s?c-e:r-t);i.push(" | "+" ".repeat(e)+"^".repeat(n))}else if(e>o){if(r>s){const e=Math.max(Math.min(r-s,c),1);i.push(" | "+"^".repeat(e))}s+=c+1}}break}return i.join("\n")}function incrementer(e){let t=e;return()=>++t}function createEmitter(){const e=new Map;return{events:e,on(t,r){const n=e.get(t);n&&n.push(r)||e.set(t,[r])},off(t,r){const n=e.get(t);n&&n.splice(n.indexOf(r)>>>0,1)},emit(t,r){(e.get(t)||[]).slice().map((e=>e(r))),(e.get("*")||[]).slice().map((e=>e(t,r)))}}}const isNotObjectOrIsArray=e=>!isObject(e)||isArray(e);function deepCopy(e,t){if(isNotObjectOrIsArray(e)||isNotObjectOrIsArray(t))throw new Error("Invalid value");const r=[{src:e,des:t}];for(;r.length;){const{src:e,des:t}=r.pop();Object.keys(e).forEach((n=>{"__proto__"!==n&&(isObject(e[n])&&!isObject(t[n])&&(t[n]=Array.isArray(e[n])?[]:create()),isNotObjectOrIsArray(t[n])||isNotObjectOrIsArray(e[n])?t[n]=e[n]:r.push({src:e[n],des:t[n]}))}))}}export{assign,create,createEmitter,deepCopy,escapeHtml,format,friendlyJSONstringify,generateCodeFrame,generateFormatCacheKey,getGlobalThis,hasOwn,inBrowser,incrementer,isArray,isBoolean,isDate,isEmptyObject,isFunction,isNumber,isObject,isPlainObject,isPromise,isRegExp,isString,isSymbol,join,makeSymbol,mark,measure,objectToString,sanitizeTranslatedHtml,toDisplayString,toTypeString,warn,warnOnce};
|
||||||
1
node_modules/@intlify/shared/dist/shared.esm-bundler.js
generated
vendored
Normal file
1
node_modules/@intlify/shared/dist/shared.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '../dist/shared.mjs'
|
||||||
290
node_modules/@intlify/shared/dist/shared.mjs
generated
vendored
Normal file
290
node_modules/@intlify/shared/dist/shared.mjs
generated
vendored
Normal file
@@ -0,0 +1,290 @@
|
|||||||
|
/*!
|
||||||
|
* shared v9.14.5
|
||||||
|
* (c) 2025 kazuya kawaguchi
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
function warn(msg, err) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console.warn(`[intlify] ` + msg);
|
||||||
|
/* istanbul ignore if */
|
||||||
|
if (err) {
|
||||||
|
console.warn(err.stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const hasWarned = {};
|
||||||
|
function warnOnce(msg) {
|
||||||
|
if (!hasWarned[msg]) {
|
||||||
|
hasWarned[msg] = true;
|
||||||
|
warn(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original Utilities
|
||||||
|
* written by kazuya kawaguchi
|
||||||
|
*/
|
||||||
|
const inBrowser = typeof window !== 'undefined';
|
||||||
|
let mark;
|
||||||
|
let measure;
|
||||||
|
if ((process.env.NODE_ENV !== 'production')) {
|
||||||
|
const perf = inBrowser && window.performance;
|
||||||
|
if (perf &&
|
||||||
|
perf.mark &&
|
||||||
|
perf.measure &&
|
||||||
|
perf.clearMarks &&
|
||||||
|
// @ts-ignore browser compat
|
||||||
|
perf.clearMeasures) {
|
||||||
|
mark = (tag) => {
|
||||||
|
perf.mark(tag);
|
||||||
|
};
|
||||||
|
measure = (name, startTag, endTag) => {
|
||||||
|
perf.measure(name, startTag, endTag);
|
||||||
|
perf.clearMarks(startTag);
|
||||||
|
perf.clearMarks(endTag);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||||
|
/* eslint-disable */
|
||||||
|
function format(message, ...args) {
|
||||||
|
if (args.length === 1 && isObject(args[0])) {
|
||||||
|
args = args[0];
|
||||||
|
}
|
||||||
|
if (!args || !args.hasOwnProperty) {
|
||||||
|
args = {};
|
||||||
|
}
|
||||||
|
return message.replace(RE_ARGS, (match, identifier) => {
|
||||||
|
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||||
|
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||||
|
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||||
|
.replace(/\u2028/g, '\\u2028')
|
||||||
|
.replace(/\u2029/g, '\\u2029')
|
||||||
|
.replace(/\u0027/g, '\\u0027');
|
||||||
|
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||||
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||||
|
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||||
|
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||||
|
const assign = Object.assign;
|
||||||
|
const _create = Object.create;
|
||||||
|
const create = (obj = null) => _create(obj);
|
||||||
|
let _globalThis;
|
||||||
|
const getGlobalThis = () => {
|
||||||
|
// prettier-ignore
|
||||||
|
return (_globalThis ||
|
||||||
|
(_globalThis =
|
||||||
|
typeof globalThis !== 'undefined'
|
||||||
|
? globalThis
|
||||||
|
: typeof self !== 'undefined'
|
||||||
|
? self
|
||||||
|
: typeof window !== 'undefined'
|
||||||
|
? window
|
||||||
|
: typeof global !== 'undefined'
|
||||||
|
? global
|
||||||
|
: create()));
|
||||||
|
};
|
||||||
|
function escapeHtml(rawText) {
|
||||||
|
return rawText
|
||||||
|
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||||
|
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||||
|
}
|
||||||
|
function escapeAttributeValue(value) {
|
||||||
|
return value
|
||||||
|
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
function sanitizeTranslatedHtml(html) {
|
||||||
|
// Escape dangerous characters in attribute values
|
||||||
|
// Process attributes with double quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||||
|
// Process attributes with single quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||||
|
// Detect and neutralize event handler attributes
|
||||||
|
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||||
|
if (eventHandlerPattern.test(html)) {
|
||||||
|
if ((process.env.NODE_ENV !== 'production')) {
|
||||||
|
warn('Potentially dangerous event handlers detected in translation. ' +
|
||||||
|
'Consider removing onclick, onerror, etc. from your translation messages.');
|
||||||
|
}
|
||||||
|
// Neutralize event handler attributes by escaping 'on'
|
||||||
|
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||||
|
}
|
||||||
|
// Disable javascript: URLs in various contexts
|
||||||
|
const javascriptUrlPattern = [
|
||||||
|
// In href, src, action, formaction attributes
|
||||||
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||||
|
// In style attributes within url()
|
||||||
|
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||||
|
];
|
||||||
|
javascriptUrlPattern.forEach(pattern => {
|
||||||
|
html = html.replace(pattern, '$1javascript:');
|
||||||
|
});
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
|
function hasOwn(obj, key) {
|
||||||
|
return hasOwnProperty.call(obj, key);
|
||||||
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
/**
|
||||||
|
* Useful Utilities By Evan you
|
||||||
|
* Modified by kazuya kawaguchi
|
||||||
|
* MIT License
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||||
|
*/
|
||||||
|
const isArray = Array.isArray;
|
||||||
|
const isFunction = (val) => typeof val === 'function';
|
||||||
|
const isString = (val) => typeof val === 'string';
|
||||||
|
const isBoolean = (val) => typeof val === 'boolean';
|
||||||
|
const isSymbol = (val) => typeof val === 'symbol';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isObject = (val) => val !== null && typeof val === 'object';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isPromise = (val) => {
|
||||||
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||||
|
};
|
||||||
|
const objectToString = Object.prototype.toString;
|
||||||
|
const toTypeString = (value) => objectToString.call(value);
|
||||||
|
const isPlainObject = (val) => {
|
||||||
|
if (!isObject(val))
|
||||||
|
return false;
|
||||||
|
const proto = Object.getPrototypeOf(val);
|
||||||
|
return proto === null || proto.constructor === Object;
|
||||||
|
};
|
||||||
|
// for converting list and named values to displayed strings.
|
||||||
|
const toDisplayString = (val) => {
|
||||||
|
return val == null
|
||||||
|
? ''
|
||||||
|
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||||
|
? JSON.stringify(val, null, 2)
|
||||||
|
: String(val);
|
||||||
|
};
|
||||||
|
function join(items, separator = '') {
|
||||||
|
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||||
|
}
|
||||||
|
const RANGE = 2;
|
||||||
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||||
|
const lines = source.split(/\r?\n/);
|
||||||
|
let count = 0;
|
||||||
|
const res = [];
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
count += lines[i].length + 1;
|
||||||
|
if (count >= start) {
|
||||||
|
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||||
|
if (j < 0 || j >= lines.length)
|
||||||
|
continue;
|
||||||
|
const line = j + 1;
|
||||||
|
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||||
|
const lineLength = lines[j].length;
|
||||||
|
if (j === i) {
|
||||||
|
// push underline
|
||||||
|
const pad = start - (count - lineLength) + 1;
|
||||||
|
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||||
|
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
else if (j > i) {
|
||||||
|
if (end > count) {
|
||||||
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||||
|
res.push(` | ` + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
count += lineLength + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.join('\n');
|
||||||
|
}
|
||||||
|
function incrementer(code) {
|
||||||
|
let current = code;
|
||||||
|
return () => ++current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitter, forked from the below:
|
||||||
|
* - original repository url: https://github.com/developit/mitt
|
||||||
|
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||||
|
* - author: Jason Miller (https://github.com/developit)
|
||||||
|
* - license: MIT
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Create a event emitter
|
||||||
|
*
|
||||||
|
* @returns An event emitter
|
||||||
|
*/
|
||||||
|
function createEmitter() {
|
||||||
|
const events = new Map();
|
||||||
|
const emitter = {
|
||||||
|
events,
|
||||||
|
on(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
const added = handlers && handlers.push(handler);
|
||||||
|
if (!added) {
|
||||||
|
events.set(event, [handler]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
if (handlers) {
|
||||||
|
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(event, payload) {
|
||||||
|
(events.get(event) || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(payload));
|
||||||
|
(events.get('*') || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(event, payload));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return emitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||||
|
function deepCopy(src, des) {
|
||||||
|
// src and des should both be objects, and none of them can be a array
|
||||||
|
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||||
|
throw new Error('Invalid value');
|
||||||
|
}
|
||||||
|
const stack = [{ src, des }];
|
||||||
|
while (stack.length) {
|
||||||
|
const { src, des } = stack.pop();
|
||||||
|
// using `Object.keys` which skips prototype properties
|
||||||
|
Object.keys(src).forEach(key => {
|
||||||
|
if (key === '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if src[key] is an object/array, set des[key]
|
||||||
|
// to empty object/array to prevent setting by reference
|
||||||
|
if (isObject(src[key]) && !isObject(des[key])) {
|
||||||
|
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||||
|
}
|
||||||
|
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||||
|
// replace with src[key] when:
|
||||||
|
// src[key] or des[key] is not an object, or
|
||||||
|
// src[key] or des[key] is an array
|
||||||
|
des[key] = src[key];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// src[key] and des[key] are both objects, merge them
|
||||||
|
stack.push({ src: src[key], des: des[key] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export { assign, create, createEmitter, deepCopy, escapeHtml, format, friendlyJSONstringify, generateCodeFrame, generateFormatCacheKey, getGlobalThis, hasOwn, inBrowser, incrementer, isArray, isBoolean, isDate, isEmptyObject, isFunction, isNumber, isObject, isPlainObject, isPromise, isRegExp, isString, isSymbol, join, makeSymbol, mark, measure, objectToString, sanitizeTranslatedHtml, toDisplayString, toTypeString, warn, warnOnce };
|
||||||
304
node_modules/@intlify/shared/dist/shared.prod.cjs
generated
vendored
Normal file
304
node_modules/@intlify/shared/dist/shared.prod.cjs
generated
vendored
Normal file
@@ -0,0 +1,304 @@
|
|||||||
|
/*!
|
||||||
|
* shared v9.14.5
|
||||||
|
* (c) 2025 kazuya kawaguchi
|
||||||
|
* Released under the MIT License.
|
||||||
|
*/
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
function warn(msg, err) {
|
||||||
|
if (typeof console !== 'undefined') {
|
||||||
|
console.warn(`[intlify] ` + msg);
|
||||||
|
/* istanbul ignore if */
|
||||||
|
if (err) {
|
||||||
|
console.warn(err.stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const hasWarned = {};
|
||||||
|
function warnOnce(msg) {
|
||||||
|
if (!hasWarned[msg]) {
|
||||||
|
hasWarned[msg] = true;
|
||||||
|
warn(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Original Utilities
|
||||||
|
* written by kazuya kawaguchi
|
||||||
|
*/
|
||||||
|
const inBrowser = typeof window !== 'undefined';
|
||||||
|
let mark;
|
||||||
|
let measure;
|
||||||
|
const RE_ARGS = /\{([0-9a-zA-Z]+)\}/g;
|
||||||
|
/* eslint-disable */
|
||||||
|
function format(message, ...args) {
|
||||||
|
if (args.length === 1 && isObject(args[0])) {
|
||||||
|
args = args[0];
|
||||||
|
}
|
||||||
|
if (!args || !args.hasOwnProperty) {
|
||||||
|
args = {};
|
||||||
|
}
|
||||||
|
return message.replace(RE_ARGS, (match, identifier) => {
|
||||||
|
return args.hasOwnProperty(identifier) ? args[identifier] : '';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const makeSymbol = (name, shareable = false) => !shareable ? Symbol(name) : Symbol.for(name);
|
||||||
|
const generateFormatCacheKey = (locale, key, source) => friendlyJSONstringify({ l: locale, k: key, s: source });
|
||||||
|
const friendlyJSONstringify = (json) => JSON.stringify(json)
|
||||||
|
.replace(/\u2028/g, '\\u2028')
|
||||||
|
.replace(/\u2029/g, '\\u2029')
|
||||||
|
.replace(/\u0027/g, '\\u0027');
|
||||||
|
const isNumber = (val) => typeof val === 'number' && isFinite(val);
|
||||||
|
const isDate = (val) => toTypeString(val) === '[object Date]';
|
||||||
|
const isRegExp = (val) => toTypeString(val) === '[object RegExp]';
|
||||||
|
const isEmptyObject = (val) => isPlainObject(val) && Object.keys(val).length === 0;
|
||||||
|
const assign = Object.assign;
|
||||||
|
const _create = Object.create;
|
||||||
|
const create = (obj = null) => _create(obj);
|
||||||
|
let _globalThis;
|
||||||
|
const getGlobalThis = () => {
|
||||||
|
// prettier-ignore
|
||||||
|
return (_globalThis ||
|
||||||
|
(_globalThis =
|
||||||
|
typeof globalThis !== 'undefined'
|
||||||
|
? globalThis
|
||||||
|
: typeof self !== 'undefined'
|
||||||
|
? self
|
||||||
|
: typeof window !== 'undefined'
|
||||||
|
? window
|
||||||
|
: typeof global !== 'undefined'
|
||||||
|
? global
|
||||||
|
: create()));
|
||||||
|
};
|
||||||
|
function escapeHtml(rawText) {
|
||||||
|
return rawText
|
||||||
|
.replace(/&/g, '&') // escape `&` first to avoid double escaping
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/\//g, '/') // escape `/` to prevent closing tags or JavaScript URLs
|
||||||
|
.replace(/=/g, '='); // escape `=` to prevent attribute injection
|
||||||
|
}
|
||||||
|
function escapeAttributeValue(value) {
|
||||||
|
return value
|
||||||
|
.replace(/&(?![a-zA-Z0-9#]{2,6};)/g, '&') // escape unescaped `&`
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/'/g, ''')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
function sanitizeTranslatedHtml(html) {
|
||||||
|
// Escape dangerous characters in attribute values
|
||||||
|
// Process attributes with double quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*"([^"]*)"/g, (_, attrName, attrValue) => `${attrName}="${escapeAttributeValue(attrValue)}"`);
|
||||||
|
// Process attributes with single quotes
|
||||||
|
html = html.replace(/(\w+)\s*=\s*'([^']*)'/g, (_, attrName, attrValue) => `${attrName}='${escapeAttributeValue(attrValue)}'`);
|
||||||
|
// Detect and neutralize event handler attributes
|
||||||
|
const eventHandlerPattern = /\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi;
|
||||||
|
if (eventHandlerPattern.test(html)) {
|
||||||
|
// Neutralize event handler attributes by escaping 'on'
|
||||||
|
html = html.replace(/(\s+)(on)(\w+\s*=)/gi, '$1on$3');
|
||||||
|
}
|
||||||
|
// Disable javascript: URLs in various contexts
|
||||||
|
const javascriptUrlPattern = [
|
||||||
|
// In href, src, action, formaction attributes
|
||||||
|
/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,
|
||||||
|
// In style attributes within url()
|
||||||
|
/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi
|
||||||
|
];
|
||||||
|
javascriptUrlPattern.forEach(pattern => {
|
||||||
|
html = html.replace(pattern, '$1javascript:');
|
||||||
|
});
|
||||||
|
return html;
|
||||||
|
}
|
||||||
|
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||||
|
function hasOwn(obj, key) {
|
||||||
|
return hasOwnProperty.call(obj, key);
|
||||||
|
}
|
||||||
|
/* eslint-enable */
|
||||||
|
/**
|
||||||
|
* Useful Utilities By Evan you
|
||||||
|
* Modified by kazuya kawaguchi
|
||||||
|
* MIT License
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/index.ts
|
||||||
|
* https://github.com/vuejs/vue-next/blob/master/packages/shared/src/codeframe.ts
|
||||||
|
*/
|
||||||
|
const isArray = Array.isArray;
|
||||||
|
const isFunction = (val) => typeof val === 'function';
|
||||||
|
const isString = (val) => typeof val === 'string';
|
||||||
|
const isBoolean = (val) => typeof val === 'boolean';
|
||||||
|
const isSymbol = (val) => typeof val === 'symbol';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isObject = (val) => val !== null && typeof val === 'object';
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
const isPromise = (val) => {
|
||||||
|
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||||
|
};
|
||||||
|
const objectToString = Object.prototype.toString;
|
||||||
|
const toTypeString = (value) => objectToString.call(value);
|
||||||
|
const isPlainObject = (val) => {
|
||||||
|
if (!isObject(val))
|
||||||
|
return false;
|
||||||
|
const proto = Object.getPrototypeOf(val);
|
||||||
|
return proto === null || proto.constructor === Object;
|
||||||
|
};
|
||||||
|
// for converting list and named values to displayed strings.
|
||||||
|
const toDisplayString = (val) => {
|
||||||
|
return val == null
|
||||||
|
? ''
|
||||||
|
: isArray(val) || (isPlainObject(val) && val.toString === objectToString)
|
||||||
|
? JSON.stringify(val, null, 2)
|
||||||
|
: String(val);
|
||||||
|
};
|
||||||
|
function join(items, separator = '') {
|
||||||
|
return items.reduce((str, item, index) => (index === 0 ? str + item : str + separator + item), '');
|
||||||
|
}
|
||||||
|
const RANGE = 2;
|
||||||
|
function generateCodeFrame(source, start = 0, end = source.length) {
|
||||||
|
const lines = source.split(/\r?\n/);
|
||||||
|
let count = 0;
|
||||||
|
const res = [];
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
count += lines[i].length + 1;
|
||||||
|
if (count >= start) {
|
||||||
|
for (let j = i - RANGE; j <= i + RANGE || end > count; j++) {
|
||||||
|
if (j < 0 || j >= lines.length)
|
||||||
|
continue;
|
||||||
|
const line = j + 1;
|
||||||
|
res.push(`${line}${' '.repeat(3 - String(line).length)}| ${lines[j]}`);
|
||||||
|
const lineLength = lines[j].length;
|
||||||
|
if (j === i) {
|
||||||
|
// push underline
|
||||||
|
const pad = start - (count - lineLength) + 1;
|
||||||
|
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
||||||
|
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
else if (j > i) {
|
||||||
|
if (end > count) {
|
||||||
|
const length = Math.max(Math.min(end - count, lineLength), 1);
|
||||||
|
res.push(` | ` + '^'.repeat(length));
|
||||||
|
}
|
||||||
|
count += lineLength + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res.join('\n');
|
||||||
|
}
|
||||||
|
function incrementer(code) {
|
||||||
|
let current = code;
|
||||||
|
return () => ++current;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Event emitter, forked from the below:
|
||||||
|
* - original repository url: https://github.com/developit/mitt
|
||||||
|
* - code url: https://github.com/developit/mitt/blob/master/src/index.ts
|
||||||
|
* - author: Jason Miller (https://github.com/developit)
|
||||||
|
* - license: MIT
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Create a event emitter
|
||||||
|
*
|
||||||
|
* @returns An event emitter
|
||||||
|
*/
|
||||||
|
function createEmitter() {
|
||||||
|
const events = new Map();
|
||||||
|
const emitter = {
|
||||||
|
events,
|
||||||
|
on(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
const added = handlers && handlers.push(handler);
|
||||||
|
if (!added) {
|
||||||
|
events.set(event, [handler]);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
off(event, handler) {
|
||||||
|
const handlers = events.get(event);
|
||||||
|
if (handlers) {
|
||||||
|
handlers.splice(handlers.indexOf(handler) >>> 0, 1);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
emit(event, payload) {
|
||||||
|
(events.get(event) || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(payload));
|
||||||
|
(events.get('*') || [])
|
||||||
|
.slice()
|
||||||
|
.map(handler => handler(event, payload));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
return emitter;
|
||||||
|
}
|
||||||
|
|
||||||
|
const isNotObjectOrIsArray = (val) => !isObject(val) || isArray(val);
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
||||||
|
function deepCopy(src, des) {
|
||||||
|
// src and des should both be objects, and none of them can be a array
|
||||||
|
if (isNotObjectOrIsArray(src) || isNotObjectOrIsArray(des)) {
|
||||||
|
throw new Error('Invalid value');
|
||||||
|
}
|
||||||
|
const stack = [{ src, des }];
|
||||||
|
while (stack.length) {
|
||||||
|
const { src, des } = stack.pop();
|
||||||
|
// using `Object.keys` which skips prototype properties
|
||||||
|
Object.keys(src).forEach(key => {
|
||||||
|
if (key === '__proto__') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// if src[key] is an object/array, set des[key]
|
||||||
|
// to empty object/array to prevent setting by reference
|
||||||
|
if (isObject(src[key]) && !isObject(des[key])) {
|
||||||
|
des[key] = Array.isArray(src[key]) ? [] : create();
|
||||||
|
}
|
||||||
|
if (isNotObjectOrIsArray(des[key]) || isNotObjectOrIsArray(src[key])) {
|
||||||
|
// replace with src[key] when:
|
||||||
|
// src[key] or des[key] is not an object, or
|
||||||
|
// src[key] or des[key] is an array
|
||||||
|
des[key] = src[key];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// src[key] and des[key] are both objects, merge them
|
||||||
|
stack.push({ src: src[key], des: des[key] });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.assign = assign;
|
||||||
|
exports.create = create;
|
||||||
|
exports.createEmitter = createEmitter;
|
||||||
|
exports.deepCopy = deepCopy;
|
||||||
|
exports.escapeHtml = escapeHtml;
|
||||||
|
exports.format = format;
|
||||||
|
exports.friendlyJSONstringify = friendlyJSONstringify;
|
||||||
|
exports.generateCodeFrame = generateCodeFrame;
|
||||||
|
exports.generateFormatCacheKey = generateFormatCacheKey;
|
||||||
|
exports.getGlobalThis = getGlobalThis;
|
||||||
|
exports.hasOwn = hasOwn;
|
||||||
|
exports.inBrowser = inBrowser;
|
||||||
|
exports.incrementer = incrementer;
|
||||||
|
exports.isArray = isArray;
|
||||||
|
exports.isBoolean = isBoolean;
|
||||||
|
exports.isDate = isDate;
|
||||||
|
exports.isEmptyObject = isEmptyObject;
|
||||||
|
exports.isFunction = isFunction;
|
||||||
|
exports.isNumber = isNumber;
|
||||||
|
exports.isObject = isObject;
|
||||||
|
exports.isPlainObject = isPlainObject;
|
||||||
|
exports.isPromise = isPromise;
|
||||||
|
exports.isRegExp = isRegExp;
|
||||||
|
exports.isString = isString;
|
||||||
|
exports.isSymbol = isSymbol;
|
||||||
|
exports.join = join;
|
||||||
|
exports.makeSymbol = makeSymbol;
|
||||||
|
exports.mark = mark;
|
||||||
|
exports.measure = measure;
|
||||||
|
exports.objectToString = objectToString;
|
||||||
|
exports.sanitizeTranslatedHtml = sanitizeTranslatedHtml;
|
||||||
|
exports.toDisplayString = toDisplayString;
|
||||||
|
exports.toTypeString = toTypeString;
|
||||||
|
exports.warn = warn;
|
||||||
|
exports.warnOnce = warnOnce;
|
||||||
7
node_modules/@intlify/shared/index.js
generated
vendored
Normal file
7
node_modules/@intlify/shared/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
module.exports = require('./dist/shared.prod.cjs')
|
||||||
|
} else {
|
||||||
|
module.exports = require('./dist/shared.cjs')
|
||||||
|
}
|
||||||
69
node_modules/@intlify/shared/package.json
generated
vendored
Normal file
69
node_modules/@intlify/shared/package.json
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"name": "@intlify/shared",
|
||||||
|
"version": "9.14.5",
|
||||||
|
"description": "@intlify/shared",
|
||||||
|
"keywords": [
|
||||||
|
"i18n",
|
||||||
|
"internationalization",
|
||||||
|
"intlify",
|
||||||
|
"utitlity"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"author": {
|
||||||
|
"name": "kazuya kawaguchi",
|
||||||
|
"email": "kawakazu80@gmail.com"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/shared#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||||
|
"directory": "packages/shared"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
|
"main": "index.js",
|
||||||
|
"module": "dist/shared.mjs",
|
||||||
|
"types": "dist/shared.d.ts",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"buildOptions": {
|
||||||
|
"name": "IntlifyShared",
|
||||||
|
"formats": [
|
||||||
|
"mjs",
|
||||||
|
"browser",
|
||||||
|
"cjs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/shared.d.ts",
|
||||||
|
"import": "./dist/shared.mjs",
|
||||||
|
"browser": "./dist/shared.esm-browser.js",
|
||||||
|
"node": {
|
||||||
|
"import": {
|
||||||
|
"production": "./dist/shared.prod.cjs",
|
||||||
|
"development": "./dist/shared.mjs",
|
||||||
|
"default": "./dist/shared.mjs"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"production": "./dist/shared.prod.cjs",
|
||||||
|
"development": "./dist/shared.cjs",
|
||||||
|
"default": "./index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"./dist/*": "./dist/*",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"funding": "https://github.com/sponsors/kazupon",
|
||||||
|
"publishConfig": {
|
||||||
|
"access": "public"
|
||||||
|
},
|
||||||
|
"sideEffects": false
|
||||||
|
}
|
||||||
20
node_modules/vue-i18n/LICENSE
generated
vendored
Normal file
20
node_modules/vue-i18n/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 kazuya kawaguchi
|
||||||
|
|
||||||
|
Permission 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:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE 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.
|
||||||
81
node_modules/vue-i18n/README.md
generated
vendored
Normal file
81
node_modules/vue-i18n/README.md
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
# vue-i18n
|
||||||
|
|
||||||
|
Internationalization plugin for Vue.js
|
||||||
|
|
||||||
|
## Which dist file to use?
|
||||||
|
|
||||||
|
### From CDN or without a Bundler
|
||||||
|
|
||||||
|
- **`vue-i18n(.runtime).global(.prod).js`**:
|
||||||
|
|
||||||
|
- For direct use via `<script src="...">` in the browser. Exposes the `VueI18n` global
|
||||||
|
- Note that global builds are not [UMD](https://github.com/umdjs/umd) builds. They are built as [IIFEs](https://developer.mozilla.org/en-US/docs/Glossary/IIFE) and is only meant for direct use via `<script src="...">`
|
||||||
|
- In-browser locale messages compilation:
|
||||||
|
- **`vue-i18n.global.js`** is the "full" build that includes both the compiler and the runtime so it supports compiling locale messages on the fly
|
||||||
|
- **`vue-i18n.runtime.global.js`** contains only the runtime and requires locale messages to be pre-compiled during a build step
|
||||||
|
- Inlines internal the bellow packages - i.e. it’s a single file with no dependencies on other files. This means you **must** import everything from this file and this file only to ensure you are getting the same instance of code
|
||||||
|
- `@intlify/shared`
|
||||||
|
- `@intlify/message-compiler`
|
||||||
|
- `@intlify/core`
|
||||||
|
- Contains hard-coded prod/dev branches, and the prod build is pre-minified. Use the `*.prod.js` files for production
|
||||||
|
|
||||||
|
- **`vue-i18n(.runtime).esm-browser(.prod).js`**:
|
||||||
|
- For usage via native ES modules imports (in browser via `<script type="module">`)
|
||||||
|
- Shares the same runtime compilation, dependency inlining and hard-coded prod/dev behavior with the global build
|
||||||
|
|
||||||
|
### With a Bundler
|
||||||
|
|
||||||
|
- **`vue-i18n(.runtime).esm-bundler.js`**:
|
||||||
|
- For use with bundlers like `webpack`, `rollup` and `parcel`
|
||||||
|
- Leaves prod/dev branches with `process.env.NODE_ENV` guards (must be replaced by bundler)
|
||||||
|
- Does not ship minified builds (to be done together with the rest of the code after bundling)
|
||||||
|
- Imports dependencies (e.g. `@intlify/core-base`, `@intlify/message-compiler`)
|
||||||
|
- Imported dependencies are also `esm-bundler` builds and will in turn import their dependencies (e.g. `@intlify/message-compiler` imports `@intlify/shared`)
|
||||||
|
- This means you **can** install/import these deps individually without ending up with different instances of these dependencies, but you must make sure they all resolve to the same version
|
||||||
|
- In-browser locale messages compilation:
|
||||||
|
- **`vue-i18n.runtime.esm-bundler.js` (default)** is runtime only, and requires all locale messages to be pre-compiled. This is the default entry for bundlers (via `module` field in `package.json`) because when using a bundler templates are typically pre-compiled (e.g. in `*.json` files)
|
||||||
|
- **`vue-i18n.esm-bundler.js`**: includes the runtime compiler. Use this if you are using a bundler but still want locale messages compilation (e.g. templates via inline JavaScript strings)
|
||||||
|
|
||||||
|
### For Node.js (Server-Side)
|
||||||
|
|
||||||
|
- **`vue-i18n.cjs(.prod).js`**:
|
||||||
|
- For CommonJS usage in Node.js
|
||||||
|
- For use in Node.js via `require()`
|
||||||
|
- If you bundle your app with webpack with `target: 'node'` and properly externalize `vue-i18n`, this is the build that will be loaded
|
||||||
|
- The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env.NODE_ENV`
|
||||||
|
|
||||||
|
- **`vue-i18n(.runtime).node.mjs`**:
|
||||||
|
- For ES Moudles usage in Node.js
|
||||||
|
- For use in Node.js via `import`
|
||||||
|
- The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env.NODE_ENV`
|
||||||
|
- This module is proxy module of `vue-i18n(.runtime).mjs`
|
||||||
|
- **`vue-i18n.runtime.node.mjs`**: is runtime only. proxy `vue-i18n.runtime.mjs`
|
||||||
|
- **`vue-i18n.node.mjs`**: includes the runtime compiler. proxy `vue-i18n.mjs`
|
||||||
|
|
||||||
|
> NOTE: ES Modules will be the future of the Node.js module system. The `vue-i18n.cjs(.prod).js` will be deprecated in the future. We recommend you would use `vue-i18n(.runtime).node.mjs`. 9.3+
|
||||||
|
|
||||||
|
|
||||||
|
## For Bundler feature flags
|
||||||
|
|
||||||
|
### Build Feature Flags
|
||||||
|
|
||||||
|
The `esm-bundler` builds now exposes global feature flags that can be overwritten at compile time:
|
||||||
|
|
||||||
|
- `__VUE_I18N_FULL_INSTALL__` (enable/disable, in addition to vue-i18n APIs, components and directives all fully support installation: `true`)
|
||||||
|
- `__VUE_I18N_LEGACY_API__` (enable/disable vue-i18n legacy style APIs support, default: `true`)
|
||||||
|
- `__INTLIFY_JIT_COMPILATION__` (enable/disable message compiler for JIT style, default: `false`)
|
||||||
|
- `__INTLIFY_DROP_MESSAGE_COMPILER__` (enable/disable whether to tree-shake message compiler when we will be bundling, this flag works when `__INTLIFY_JIT_COMPILATION__` is enabled. default: `false`)
|
||||||
|
|
||||||
|
> NOTE: `__INTLIFY_JIT_COMPILATION__`, `__INTLIFY_DROP_MESSAGE_COMPILER__` flag support version, 9.3+
|
||||||
|
|
||||||
|
The build will work without configuring these flags, however it is **strongly recommended** to properly configure them in order to get proper tree shaking in the final bundle. To configure these flags:
|
||||||
|
|
||||||
|
- webpack: use [DefinePlugin](https://webpack.js.org/plugins/define-plugin/)
|
||||||
|
- Rollup: use [@rollup/plugin-replace](https://github.com/rollup/plugins/tree/master/packages/replace)
|
||||||
|
- Vite: configured by default, but can be overwritten using the [`define` option](https://github.com/vitejs/vite/blob/a4133c073e640b17276b2de6e91a6857bdf382e1/src/node/config.ts#L72-L76)
|
||||||
|
|
||||||
|
Note: the replacement value **must be boolean literals** and cannot be strings, otherwise the bundler/minifier will not be able to properly evaluate the conditions.
|
||||||
|
|
||||||
|
## :copyright: License
|
||||||
|
|
||||||
|
[MIT](http://opensource.org/licenses/MIT)
|
||||||
2509
node_modules/vue-i18n/dist/vue-i18n.cjs
generated
vendored
Normal file
2509
node_modules/vue-i18n/dist/vue-i18n.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
node_modules/vue-i18n/dist/vue-i18n.cjs.js
generated
vendored
Normal file
1
node_modules/vue-i18n/dist/vue-i18n.cjs.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/vue-i18n.cjs')
|
||||||
1
node_modules/vue-i18n/dist/vue-i18n.cjs.prod.js
generated
vendored
Normal file
1
node_modules/vue-i18n/dist/vue-i18n.cjs.prod.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
module.exports = require('../dist/vue-i18n.prod.cjs')
|
||||||
4376
node_modules/vue-i18n/dist/vue-i18n.d.ts
generated
vendored
Normal file
4376
node_modules/vue-i18n/dist/vue-i18n.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6847
node_modules/vue-i18n/dist/vue-i18n.esm-browser.js
generated
vendored
Normal file
6847
node_modules/vue-i18n/dist/vue-i18n.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/vue-i18n/dist/vue-i18n.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/vue-i18n/dist/vue-i18n.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js
generated
vendored
Normal file
1
node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '../dist/vue-i18n.mjs'
|
||||||
6860
node_modules/vue-i18n/dist/vue-i18n.global.js
generated
vendored
Normal file
6860
node_modules/vue-i18n/dist/vue-i18n.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/vue-i18n/dist/vue-i18n.global.prod.js
generated
vendored
Normal file
6
node_modules/vue-i18n/dist/vue-i18n.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2982
node_modules/vue-i18n/dist/vue-i18n.mjs
generated
vendored
Normal file
2982
node_modules/vue-i18n/dist/vue-i18n.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
node_modules/vue-i18n/dist/vue-i18n.node.mjs
generated
vendored
Normal file
2
node_modules/vue-i18n/dist/vue-i18n.node.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
global.__VUE_PROD_DEVTOOLS__ = false;
|
||||||
|
export * from '../dist/vue-i18n.mjs'
|
||||||
2362
node_modules/vue-i18n/dist/vue-i18n.prod.cjs
generated
vendored
Normal file
2362
node_modules/vue-i18n/dist/vue-i18n.prod.cjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
5121
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.js
generated
vendored
Normal file
5121
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.prod.js
generated
vendored
Normal file
6
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-browser.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
1
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-bundler.js
generated
vendored
Normal file
1
node_modules/vue-i18n/dist/vue-i18n.runtime.esm-bundler.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from '../dist/vue-i18n.runtime.mjs'
|
||||||
5134
node_modules/vue-i18n/dist/vue-i18n.runtime.global.js
generated
vendored
Normal file
5134
node_modules/vue-i18n/dist/vue-i18n.runtime.global.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
6
node_modules/vue-i18n/dist/vue-i18n.runtime.global.prod.js
generated
vendored
Normal file
6
node_modules/vue-i18n/dist/vue-i18n.runtime.global.prod.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2979
node_modules/vue-i18n/dist/vue-i18n.runtime.mjs
generated
vendored
Normal file
2979
node_modules/vue-i18n/dist/vue-i18n.runtime.mjs
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2
node_modules/vue-i18n/dist/vue-i18n.runtime.node.mjs
generated
vendored
Normal file
2
node_modules/vue-i18n/dist/vue-i18n.runtime.node.mjs
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
global.__VUE_PROD_DEVTOOLS__ = false;
|
||||||
|
export * from '../dist/vue-i18n.runtime.mjs'
|
||||||
7
node_modules/vue-i18n/index.js
generated
vendored
Normal file
7
node_modules/vue-i18n/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
module.exports = require('./dist/vue-i18n.prod.cjs')
|
||||||
|
} else {
|
||||||
|
module.exports = require('./dist/vue-i18n.cjs')
|
||||||
|
}
|
||||||
91
node_modules/vue-i18n/package.json
generated
vendored
Normal file
91
node_modules/vue-i18n/package.json
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
{
|
||||||
|
"name": "vue-i18n",
|
||||||
|
"version": "9.14.5",
|
||||||
|
"description": "Internationalization plugin for Vue.js",
|
||||||
|
"keywords": [
|
||||||
|
"i18n",
|
||||||
|
"internationalization",
|
||||||
|
"intlify",
|
||||||
|
"plugin",
|
||||||
|
"vue",
|
||||||
|
"vue.js"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"author": {
|
||||||
|
"name": "kazuya kawaguchi",
|
||||||
|
"email": "kawakazu80@gmail.com"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/intlify/vue-i18n/tree/master/packages/vue-i18n#readme",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/intlify/vue-i18n.git",
|
||||||
|
"directory": "packages/vue-i18n"
|
||||||
|
},
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/intlify/vue-i18n/issues"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"index.js",
|
||||||
|
"dist",
|
||||||
|
"vetur"
|
||||||
|
],
|
||||||
|
"main": "index.js",
|
||||||
|
"module": "dist/vue-i18n.mjs",
|
||||||
|
"unpkg": "dist/vue-i18n.global.js",
|
||||||
|
"jsdelivr": "dist/vue-i18n.global.js",
|
||||||
|
"types": "dist/vue-i18n.d.ts",
|
||||||
|
"dependencies": {
|
||||||
|
"@vue/devtools-api": "^6.5.0",
|
||||||
|
"@intlify/core-base": "9.14.5",
|
||||||
|
"@intlify/shared": "9.14.5"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@intlify/devtools-if": "9.14.5",
|
||||||
|
"@intlify/vue-devtools": "9.14.5"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"vue": "^3.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 16"
|
||||||
|
},
|
||||||
|
"buildOptions": {
|
||||||
|
"name": "VueI18n",
|
||||||
|
"formats": [
|
||||||
|
"mjs",
|
||||||
|
"mjs-runtime",
|
||||||
|
"browser",
|
||||||
|
"browser-runtime",
|
||||||
|
"cjs",
|
||||||
|
"global",
|
||||||
|
"global-runtime"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/vue-i18n.d.ts",
|
||||||
|
"import": "./dist/vue-i18n.mjs",
|
||||||
|
"browser": "./dist/vue-i18n.esm-browser.js",
|
||||||
|
"node": {
|
||||||
|
"import": {
|
||||||
|
"production": "./dist/vue-i18n.node.mjs",
|
||||||
|
"development": "./dist/vue-i18n.mjs",
|
||||||
|
"default": "./dist/vue-i18n.mjs"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"production": "./dist/vue-i18n.prod.cjs",
|
||||||
|
"development": "./dist/vue-i18n.cjs",
|
||||||
|
"default": "./index.js"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"./dist/*": "./dist/*",
|
||||||
|
"./package.json": "./package.json"
|
||||||
|
},
|
||||||
|
"funding": "https://github.com/sponsors/kazupon",
|
||||||
|
"sideEffects": false,
|
||||||
|
"vetur": {
|
||||||
|
"tags": "vetur/tags.json",
|
||||||
|
"attributes": "vetur/attributes.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user