Sistema_Gestion_Transporte/project/dist/assets/index-c72321f9.js

9 lines
34 KiB
JavaScript
Raw Normal View History

2023-06-13 10:27:15 -04:00
(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function o(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function N(){}function V(t,e){for(const n in e)t[n]=e[n];return t}function De(t){return t()}function pe(){return Object.create(null)}function rt(t){t.forEach(De)}function re(t){return typeof t=="function"}function q(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Nt;function _e(t,e){return Nt||(Nt=document.createElement("a")),Nt.href=e,t===Nt.href}function hn(t){return Object.keys(t).length===0}function ie(t,...e){if(t==null)return N;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function _t(t){let e;return ie(t,n=>e=n)(),e}function z(t,e,n){t.$$.on_destroy.push(ie(e,n))}function zt(t,e,n,o){if(t){const s=je(t,e,n,o);return t[0](s)}}function je(t,e,n,o){return t[1]&&o?V(n.ctx.slice(),t[1](o(e))):n.ctx}function qt(t,e,n,o){if(t[2]&&o){const s=t[2](o(n));if(e.dirty===void 0)return s;if(typeof s=="object"){const r=[],i=Math.max(e.dirty.length,s.length);for(let c=0;c<i;c+=1)r[c]=e.dirty[c]|s[c];return r}return e.dirty|s}return e.dirty}function Kt(t,e,n,o,s,r){if(s){const i=je(e,n,o,r);t.p(i,s)}}function xt(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let o=0;o<n;o++)e[o]=-1;return e}return-1}function Dt(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function jt(t,e){const n={};e=new Set(e);for(const o in t)!e.has(o)&&o[0]!=="$"&&(n[o]=t[o]);return n}function Tt(t,e,n){return t.set(n),e}const pn=["",!0,1,"true","contenteditable"],_n=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function _(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function p(t){t.parentNode&&t.parentNode.removeChild(t)}function Fe(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function b(t){return document.createElement(t)}function D(t){return document.createTextNode(t)}function w(){return D(" ")}function Yt(){return D("")}function lt(t,e,n,o){return t.addEventListener(e,n,o),()=>t.removeEventListener(e,n,o)}function Ft(t){return function(e){return e.preventDefault(),t.call(this,e)}}function j(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const gn=["width","height"];function gt(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const o in e)e[o]==null?t.removeAttribute(o):o==="style"?t.style.cssText=e[o]:o==="__value"?t.value=t[o]=e[o]:n[o]&&n[o].set&&gn.indexOf(o)===-1?t[o]=e[o]:j(t,o,e[o])}function bn(t){return Array.from(t.childNodes)}function tt(t,e){e=""+e,t.data!==e&&(t.data=e)}function yn(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function vn(t,e,n){~pn.indexOf(n)?yn(t,e):tt(t,e)}function Mt(t,e){t.value=e??""}function kn(t,e,{bubbles:n=!1,cancelable:o=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,o,e),s}function Bt(t,e){return new t(e)}let Pt;function St(t){Pt=t}function Rt(){if(!Pt)throw new Error("Function called outside component initialization");return Pt}function $n(t){Rt().$$.on_mount.push(t)}function wn(t){Rt().$$.on_destroy.push(t)}function Sn(){const t=Rt();return(e,n,{cancelable:o=!1}={})=>{const s=t.$$.callbacks[e];if(s){const r=kn(e,n,{cancelable:o});return s.slice().forEach(i=>{i.call(t,r)}),!r.defaultPrevented}return!0}}function Et(t,e){return Rt().$$.context.set(t,e),e}function et(t){return Rt().$$.context.get(t)}const mt=[],ge=[];let pt=[];const be=[],Be=Promise.resolve();let Zt=!1;function He(){Zt||(Zt=!0,Be.then(ze))}function En(){return He
Occurred in: ${s}`:"",i=ue(t),c=Ke(e)?e(i):e;return`<${i}> ${c}${r}`}const rn=t=>(...e)=>t(zn(...e)),ln=rn(t=>{throw new Error(t)}),Ht=rn(console.warn),ke=4,qn=3,Kn=2,xn=1,Yn=1;function Gn(t,e){const n=t.default?0:W(t.fullPath).reduce((o,s)=>{let r=o;return r+=ke,Tn(s)?r+=Yn:Mn(s)?r+=Kn:Xe(s)?r-=ke+xn:r+=qn,r},0);return{route:t,score:n,index:e}}function Qn(t){return t.map(Gn).sort((e,n)=>e.score<n.score?1:e.score>n.score?-1:e.index-n.index)}function cn(t,e){let n,o;const[s]=e.split("?"),r=W(s),i=r[0]==="",c=Qn(t);for(let a=0,l=c.length;a<l;a++){const{route:f}=c[a];let u=!1;const d={},h=O=>({...f,params:d,uri:O});if(f.default){o=h(e);continue}const v=W(f.fullPath),C=Math.max(r.length,v.length);let k=0;for(;k<C;k++){const O=v[k],M=r[k];if(!ve(O)&&Xe(O)){const S=O==="*"?"*":O.slice(1);d[S]=r.slice(k).map(decodeURIComponent).join("/");break}if(ve(M)){u=!0;break}const U=We.exec(O);if(U&&!i){const S=decodeURIComponent(M);d[U[1]]=S}else if(O!==M){u=!0;break}}if(!u){n=h(Ct(...r.slice(0,k)));break}}return n||o||null}function ae(t,e){return cn([t],e)}function Vn(t,e){if(oe(t,"/"))return t;const[n,o]=t.split("?"),[s]=e.split("?"),r=W(n),i=W(s);if(r[0]==="")return Vt(s,o);if(!oe(r[0],".")){const l=i.concat(r).join("/");return Vt((s==="/"?"":"/")+l,o)}const c=i.concat(r),a=[];return c.forEach(l=>{l===".."?a.pop():l!=="."&&a.push(l)}),Vt(`/${a.join("/")}`,o)}function se(t,e){const{pathname:n,hash:o="",search:s="",state:r}=t,i=W(e,!0),c=W(n,!0);for(;i.length;)i[0]!==c[0]&&ln(ut,`Invalid state: All locations must begin with the basepath "${e}", found "${n}"`),i.shift(),c.shift();return{pathname:Ct(...c),hash:o,search:s,state:r}}const $e=t=>t.length===1?"":t,fe=t=>{const e=t.indexOf("?"),n=t.indexOf("#"),o=e!==-1,s=n!==-1,r=s?$e(wt(t,n)):"",i=s?wt(t,0,n):t,c=o?$e(wt(i,e)):"";return{pathname:(o?wt(i,0,e):i)||"/",search:c,hash:r}},Jn=t=>{const{pathname:e,search:n,hash:o}=t;return e+n+o};function Wn(t,e,n){return Ct(n,Vn(t,e))}function Xn(t,e){const n=le(Un(t)),o=W(n,!0),s=W(e,!0).slice(0,o.length),r=ae({fullPath:n},Ct(...s));return r&&r.uri}const Jt="POP",Zn="PUSH",to="REPLACE";function Wt(t){return{...t.location,pathname:encodeURI(decodeURI(t.location.pathname)),state:t.history.state,_key:t.history.state&&t.history.state._key||"initial"}}function eo(t){let e=[],n=Wt(t),o=Jt;const s=(r=e)=>r.forEach(i=>i({location:n,action:o}));return{get location(){return n},listen(r){e.push(r);const i=()=>{n=Wt(t),o=Jt,s([r])};s([r]);const c=Ge(t,"popstate",i);return()=>{c(),e=e.filter(a=>a!==r)}},navigate(r,i){const{state:c={},replace:a=!1}=i||{};if(o=a?to:Zn,xe(r))i&&Ht(sn,"Navigation options (state or replace) are not supported, when passing a number as the first argument to navigate. They are ignored."),o=Jt,t.history.go(r);else{const l={...c,_key:Ln()};try{t.history[a?"replaceState":"pushState"](l,"",r)}catch{t.location[a?"replace":"assign"](r)}}n=Wt(t),s()}}}function Xt(t,e){return{...fe(e),state:t}}function no(t="/"){let e=0,n=[Xt(null,t)];return{get entries(){return n},get location(){return n[e]},addEventListener(){},removeEventListener(){},history:{get state(){return n[e].state},pushState(o,s,r){e++,n=n.slice(0,e),n.push(Xt(o,r))},replaceState(o,s,r){n[e]=Xt(o,r)},go(o){const s=e+o;s<0||s>n.length-1||(e=s)}}}}const oo=!!(!st&&window.document&&window.document.createElement),so=!st&&window.location.origin==="null",ro=eo(oo&&!so?window:no());let Z=null,un=!0;function io(t,e){const n=document.querySelectorAll("[data-svnav-router]");for(let o=0;o<n.length;o++){const s=n[o],r=Number(s.dataset.svnavRouter);if(r===t)return!0;if(r===e)return!1}return!1}function lo(t){(!Z||t.level>Z.level||t.level===Z.level&&io(t.routerId,Z.routerId))&&(Z=t)}function co(){Z=null}function uo(){un=!1}function we(t){if(!t)return!1;const e="tabindex";try{if(!t.hasAttribute(e)){t.setAttribute(e,"-1");let n;n=Ge(t,"blur",()=>{t.removeAttribute(e),n()})}return t.focus(),document.activeElement===t}catch{return!1}}function ao(t,e){return Number(t.dataset.svnavRouteEnd)===e}function fo(t){return/^H[1-6]$/i.test(t.tagName)}function Se(t,e=document){return e.querySelector(t)}functio
`),c=b("button"),c.textContent="Quitar"},m(f,u){g(f,e,u),g(f,n,u),g(f,o,u),g(f,s,u),g(f,r,u),g(f,i,u),g(f,c,u),a||(l=[lt(r,"click",Ft(t[2])),lt(c,"click",Ft(t[3]))],a=!0)},p:N,i:N,o:N,d(f){f&&p(e),f&&p(n),f&&p(o),f&&p(s),f&&p(r),f&&p(i),f&&p(c),a=!1,rt(l)}}}function us(t,e,n){let o;z(t,ht,a=>n(4,o=a));function s(){Tt(ht,o.cantidad++,o),Tt(ht,o.monto+=1200,o)}function r(){o.cantidad>0&&(Tt(ht,o.cantidad--,o),Tt(ht,o.monto-=1200,o))}return[s,r,()=>s(),()=>r()]}class as extends G{constructor(e){super(),Y(this,e,us,cs,q,{})}}const fs="https://dummyjson.com";async function ds(){const t=await fetch(fs+"/products");if(!t.ok)throw await t.text();return await t.json()}function Ce(t,e,n){const o=t.slice();return o[2]=e[n],o}function Le(t){let e,n,o=t[2].id+"",s,r,i,c=t[2].title+"",a,l,f,u=t[2].description+"",d,h,v,C,k=t[2].price+"",O,M,U,S,$,L;return{c(){e=b("tr"),n=b("td"),s=D(o),r=w(),i=b("td"),a=D(c),l=w(),f=b("td"),d=D(u),h=w(),v=b("td"),C=D("$"),O=D(k),M=w(),U=b("td"),S=b("img"),L=w(),j(S,"width","120"),j(S,"alt","imagen de producto"),_e(S.src,$=t[2].thumbnail)||j(S,"src",$)},m(m,I){g(m,e,I),_(e,n),_(n,s),_(e,r),_(e,i),_(i,a),_(e,l),_(e,f),_(f,d),_(e,h),_(e,v),_(v,C),_(v,O),_(e,M),_(e,U),_(U,S),_(e,L)},p(m,I){I&1&&o!==(o=m[2].id+"")&&tt(s,o),I&1&&c!==(c=m[2].title+"")&&tt(a,c),I&1&&u!==(u=m[2].description+"")&&tt(d,u),I&1&&k!==(k=m[2].price+"")&&tt(O,k),I&1&&!_e(S.src,$=m[2].thumbnail)&&j(S,"src",$)},d(m){m&&p(e)}}}function ms(t){let e,n,o,s,r=t[0],i=[];for(let c=0;c<r.length;c+=1)i[c]=Le(Ce(t,r,c));return{c(){e=b("table"),n=b("thead"),n.innerHTML=`<tr><th>ID</th>
<th>Titulo</th>
<th>Descripción</th>
<th>Precio</th>
<th>Imagen</th></tr>`,o=w(),s=b("tbody");for(let c=0;c<i.length;c+=1)i[c].c();j(e,"width","100%")},m(c,a){g(c,e,a),_(e,n),_(e,o),_(e,s);for(let l=0;l<i.length;l+=1)i[l]&&i[l].m(s,null)},p(c,[a]){if(a&1){r=c[0];let l;for(l=0;l<r.length;l+=1){const f=Ce(c,r,l);i[l]?i[l].p(f,a):(i[l]=Le(f),i[l].c(),i[l].m(s,null))}for(;l<i.length;l+=1)i[l].d(1);i.length=r.length}},i:N,o:N,d(c){c&&p(e),Fe(i,c)}}}function hs(t,e,n){let o=[];async function s(){try{const r=await ds();n(0,o=r.products)}catch(r){alert(r.message||r)}}return s(),[o]}class ps extends G{constructor(e){super(),Y(this,e,hs,ms,q,{})}}const Oe=[{path:"/",component:os},{path:"/about",component:rs},{path:"/contact",component:ls},{path:"/compras",component:as},{path:"/productos",component:ps}];function Ae(t,e,n){const o=t.slice();return o[0]=e[n],o}function _s(t){let e,n,o;var s=t[0].component;function r(i){return{}}return s&&(e=Bt(s,r())),{c(){e&&H(e.$$.fragment),n=w()},m(i,c){e&&F(e,i,c),g(i,n,c),o=!0},p(i,c){if(s!==(s=i[0].component)){if(e){bt();const a=e;A(a.$$.fragment,1,0,()=>{B(a,1)}),yt()}s?(e=Bt(s,r()),H(e.$$.fragment),R(e.$$.fragment,1),F(e,n.parentNode,n)):e=null}},i(i){o||(e&&R(e.$$.fragment,i),o=!0)},o(i){e&&A(e.$$.fragment,i),o=!1},d(i){e&&B(e,i),i&&p(n)}}}function Ne(t){let e,n;return e=new No({props:{path:t[0].path,$$slots:{default:[_s]},$$scope:{ctx:t}}}),{c(){H(e.$$.fragment)},m(o,s){F(e,o,s),n=!0},p(o,s){const r={};s&8&&(r.$$scope={dirty:s,ctx:o}),e.$set(r)},i(o){n||(R(e.$$.fragment,o),n=!0)},o(o){A(e.$$.fragment,o),n=!1},d(o){B(e,o)}}}function gs(t){let e,n,o,s,r,i,c;e=new Xo({});let a=Oe,l=[];for(let u=0;u<a.length;u+=1)l[u]=Ne(Ae(t,a,u));const f=u=>A(l[u],1,1,()=>{l[u]=null});return i=new ts({}),{c(){H(e.$$.fragment),n=w(),o=b("main"),s=b("article");for(let u=0;u<l.length;u+=1)l[u].c();r=w(),H(i.$$.fragment)},m(u,d){F(e,u,d),g(u,n,d),g(u,o,d),_(o,s);for(let h=0;h<l.length;h+=1)l[h]&&l[h].m(s,null);g(u,r,d),F(i,u,d),c=!0},p(u,d){if(d&0){a=Oe;let h;for(h=0;h<a.length;h+=1){const v=Ae(u,a,h);l[h]?(l[h].p(v,d),R(l[h],1)):(l[h]=Ne(v),l[h].c(),R(l[h],1),l[h].m(s,null))}for(bt(),h=a.length;h<l.length;h+=1)f(h);yt()}},i(u){if(!c){R(e.$$.fragment,u);for(let d=0;d<a.length;d+=1)R(l[d]);R(i.$$.fragment,u),c=!0}},o(u){A(e.$$.fragment,u),l=l.filter(Boolean);for(let d=0;d<l.length;d+=1)A(l[d]);A(i.$$.fragment,u),c=!1},d(u){B(e,u),u&&p(n),u&&p(o),Fe(l,u),u&&p(r),B(i,u)}}}function bs(t){let e,n,o;return n=new an({props:{$$slots:{default:[gs]},$$scope:{ctx:t}}}),{c(){e=w(),H(n.$$.fragment),document.title="Document"},m(s,r){g(s,e,r),F(n,s,r),o=!0},p(s,[r]){const i={};r&8&&(i.$$scope={dirty:r,ctx:s}),n.$set(i)},i(s){o||(R(n.$$.fragment,s),o=!0)},o(s){A(n.$$.fragment,s),o=!1},d(s){s&&p(e),B(n,s)}}}class ys extends G{constructor(e){super(),Y(this,e,null,bs,q,{})}}const{document:vs}=_n;function Te(t){let e;return{c(){e=b("p"),e.textContent="Espere un momento..."},m(n,o){g(n,e,o)},d(n){n&&p(e)}}}function Me(t){let e,n;return{c(){e=b("p"),n=D(t[2]),j(e,"class","message")},m(o,s){g(o,e,s),_(e,n)},p(o,s){s&4&&tt(n,o[2])},d(o){o&&p(e)}}}function ks(t){let e,n,o,s,r,i,c,a,l,f,u,d,h,v,C,k,O,M,U,S,$=t[1]&&Te(),L=t[2]&&Me(t);return{c(){e=w(),n=b("h1"),n.textContent="Login",o=w(),s=b("div"),$&&$.c(),r=w(),i=b("form"),c=b("div"),a=b("label"),a.textContent="Usuario",l=w(),f=b("input"),u=w(),d=b("div"),h=b("label"),h.textContent="Contraseña",v=w(),C=b("input"),k=w(),O=b("button"),O.textContent="Acceder",M=w(),L&&L.c(),vs.title="Login",j(a,"for",""),j(f,"type","text"),j(c,"class","field"),j(h,"for",""),j(C,"type","password"),j(d,"class","field"),j(i,"action",""),j(s,"class","login")},m(m,I){g(m,e,I),g(m,n,I),g(m,o,I),g(m,s,I),$&&$.m(s,null),_(s,r),_(s,i),_(i,c),_(c,a),_(c,l),_(c,f),Mt(f,t[0].username),_(i,u),_(i,d),_(d,h),_(d,v),_(d,C),Mt(C,t[0].password),_(i,k),_(i,O),_(s,M),L&&L.m(s,null),U||(S=[lt(f,"input",t[4]),lt(C,"input",t[5]),lt(i,"submit",Ft(t[6]))],U=!0)},p(m,[I]){m[1]?$||($=Te(),$.c(),$.m(s,r)):$&&($.d(1),$=null),I&1&&f.value!==m[0].username&&Mt(f,m[0].username),I&1&&C.value!==m[0].password&&Mt(C,m[0].password),m[2]?L?L.p(m,I):(L=Me(m),L.c(),L.m(s,null)):L&&(L.d