gazetta 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin-dist/assets/index-BZAFKsUp.js +608 -0
- package/admin-dist/assets/index-BpRotMuK.css +1 -0
- package/admin-dist/assets/vendor-primevue-BnR1c_bQ.js +2097 -0
- package/admin-dist/assets/vendor-vue-DSjyxCX6.js +1 -0
- package/admin-dist/index.html +4 -4
- package/dist/admin-api/index.d.ts +8 -2
- package/dist/admin-api/index.d.ts.map +1 -1
- package/dist/admin-api/index.js +31 -5
- package/dist/admin-api/index.js.map +1 -1
- package/dist/admin-api/routes/compare.d.ts +2 -1
- package/dist/admin-api/routes/compare.d.ts.map +1 -1
- package/dist/admin-api/routes/compare.js +6 -1
- package/dist/admin-api/routes/compare.js.map +1 -1
- package/dist/admin-api/routes/fragments.d.ts +2 -1
- package/dist/admin-api/routes/fragments.d.ts.map +1 -1
- package/dist/admin-api/routes/fragments.js +3 -1
- package/dist/admin-api/routes/fragments.js.map +1 -1
- package/dist/admin-api/routes/pages.d.ts +2 -1
- package/dist/admin-api/routes/pages.d.ts.map +1 -1
- package/dist/admin-api/routes/pages.js +3 -1
- package/dist/admin-api/routes/pages.js.map +1 -1
- package/dist/admin-api/routes/publish.d.ts +36 -1
- package/dist/admin-api/routes/publish.d.ts.map +1 -1
- package/dist/admin-api/routes/publish.js +216 -53
- package/dist/admin-api/routes/publish.js.map +1 -1
- package/dist/cli/index.js +228 -29
- package/dist/cli/index.js.map +1 -1
- package/dist/compare.d.ts +14 -0
- package/dist/compare.d.ts.map +1 -1
- package/dist/compare.js +44 -38
- package/dist/compare.js.map +1 -1
- package/dist/concurrency.d.ts +63 -0
- package/dist/concurrency.d.ts.map +1 -0
- package/dist/concurrency.js +134 -0
- package/dist/concurrency.js.map +1 -0
- package/dist/editor/mount.js +71 -71
- package/dist/editor/mount.js.map +1 -1
- package/dist/hash.d.ts +15 -0
- package/dist/hash.d.ts.map +1 -1
- package/dist/hash.js +47 -7
- package/dist/hash.js.map +1 -1
- package/dist/publish-rendered.d.ts +6 -5
- package/dist/publish-rendered.d.ts.map +1 -1
- package/dist/publish-rendered.js +39 -44
- package/dist/publish-rendered.js.map +1 -1
- package/dist/publish.d.ts +38 -0
- package/dist/publish.d.ts.map +1 -1
- package/dist/publish.js +154 -14
- package/dist/publish.js.map +1 -1
- package/dist/sidecars.d.ts +56 -0
- package/dist/sidecars.d.ts.map +1 -0
- package/dist/sidecars.js +141 -0
- package/dist/sidecars.js.map +1 -0
- package/dist/site-loader.d.ts.map +1 -1
- package/dist/site-loader.js +13 -10
- package/dist/site-loader.js.map +1 -1
- package/dist/source-sidecars.d.ts +13 -0
- package/dist/source-sidecars.d.ts.map +1 -0
- package/dist/source-sidecars.js +52 -0
- package/dist/source-sidecars.js.map +1 -0
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +21 -6
- package/dist/targets.js.map +1 -1
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/admin-dist/assets/index-C-xOOPUK.js +0 -604
- package/admin-dist/assets/index-CKOOkleR.css +0 -1
- package/admin-dist/assets/vendor-primevue-BNJTiXAs.js +0 -1670
- package/admin-dist/assets/vendor-vue-GhBrpzPN.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,C as t,E as n,G as r,H as i,I as a,K as o,L as s,P as c,R as l,S as u,T as d,U as f,V as p,W as ee,Y as m,h,j as g,q as _,w as v,z as y}from"./vendor-primevue-BNJTiXAs.js";var b=typeof window<`u`,x,S=e=>x=e,C=Symbol();function w(e){return e&&typeof e==`object`&&Object.prototype.toString.call(e)===`[object Object]`&&typeof e.toJSON!=`function`}var T;(function(e){e.direct=`direct`,e.patchObject=`patch object`,e.patchFunction=`patch function`})(T||={});var E=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:typeof globalThis==`object`?globalThis:{HTMLElement:null};function te(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function D(e,t,n){let r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){ne(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function O(e){let t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function k(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:80,screenY:20,clientX:80,clientY:20,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.dispatchEvent(t)}}var A=typeof navigator==`object`?navigator:{userAgent:``},j=/Macintosh/.test(A.userAgent)&&/AppleWebKit/.test(A.userAgent)&&!/Safari/.test(A.userAgent),ne=b?typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype&&!j?re:`msSaveOrOpenBlob`in A?ie:M:()=>{};function re(e,t=`download`,n){let r=document.createElement(`a`);r.download=t,r.rel=`noopener`,typeof e==`string`?(r.href=e,r.origin===location.origin?k(r):O(r.href)?D(e,t,n):(r.target=`_blank`,k(r))):(r.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(r.href)},4e4),setTimeout(function(){k(r)},0))}function ie(e,t=`download`,n){if(typeof e==`string`)if(O(e))D(e,t,n);else{let t=document.createElement(`a`);t.href=e,t.target=`_blank`,setTimeout(function(){k(t)})}else navigator.msSaveOrOpenBlob(te(e,n),t)}function M(e,t,n,r){if(r||=open(``,`_blank`),r&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return D(e,t,n);let i=e.type===`application/octet-stream`,a=/constructor/i.test(String(E.HTMLElement))||`safari`in E,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a||j)&&typeof FileReader<`u`){let t=new FileReader;t.onloadend=function(){let e=t.result;if(typeof e!=`string`)throw r=null,Error(`Wrong reader.result type`);e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location.assign(e),r=null},t.readAsDataURL(e)}else{let t=URL.createObjectURL(e);r?r.location.assign(t):location.href=t,r=null,setTimeout(function(){URL.revokeObjectURL(t)},4e4)}}var{assign:ae}=Object;function oe(){let t=a(!0),n=t.run(()=>f({})),r=[],i=[],o=e({install(e){S(o),o._a=e,e.provide(C,o),e.config.globalProperties.$pinia=o,i.forEach(e=>r.push(e)),i=[]},use(e){return this._a?r.push(e):i.push(e),this},_p:r,_a:null,_e:t,_s:new Map,state:n});return o}var N=()=>{};function se(e,t,n,r=N){e.add(t);let i=()=>{e.delete(t)&&r()};return!n&&s()&&p(i),i}function P(e,...t){e.forEach(e=>{e(...t)})}var ce=e=>e(),F=Symbol(),I=Symbol();function L(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(let n in t){if(!t.hasOwnProperty(n))continue;let r=t[n],i=e[n];w(i)&&w(r)&&e.hasOwnProperty(n)&&!y(r)&&!l(r)?e[n]=L(i,r):e[n]=r}return e}var le=Symbol();function ue(e){return!w(e)||!Object.prototype.hasOwnProperty.call(e,le)}var{assign:R}=Object;function de(e){return!!(y(e)&&e.effect)}function fe(t,n,r,i){let{state:a,actions:o,getters:s}=n,c=r.state.value[t],l;function u(){return c||(r.state.value[t]=a?a():{}),R(_(r.state.value[t]),o,Object.keys(s||{}).reduce((n,i)=>(n[i]=e(h(()=>{S(r);let e=r._s.get(t);return s[i].call(e,e)})),n),{}))}return l=pe(t,u,n,r,i,!0),l}function pe(e,t,r={},s,u,d){let p,ee=R({actions:{}},r),m={deep:!0},h,g,_=new Set,v=new Set,b=s.state.value[e];!d&&!b&&(s.state.value[e]={}),f({});let x;function C(t){let r;h=g=!1,typeof t==`function`?(t(s.state.value[e]),r={type:T.patchFunction,storeId:e,events:void 0}):(L(s.state.value[e],t),r={type:T.patchObject,payload:t,storeId:e,events:void 0});let i=x=Symbol();n().then(()=>{x===i&&(h=!0)}),g=!0,P(_,r,s.state.value[e])}let w=d?function(){let{state:e}=r,t=e?e():{};this.$patch(e=>{R(e,t)})}:N;function E(){p.stop(),_.clear(),v.clear(),s._s.delete(e)}let te=(t,n=``)=>{if(F in t)return t[I]=n,t;let r=function(){S(s);let n=Array.from(arguments),i=new Set,a=new Set;function o(e){i.add(e)}function c(e){a.add(e)}P(v,{args:n,name:r[I],store:D,after:o,onError:c});let l;try{l=t.apply(this&&this.$id===e?this:D,n)}catch(e){throw P(a,e),e}return l instanceof Promise?l.then(e=>(P(i,e),e)).catch(e=>(P(a,e),Promise.reject(e))):(P(i,l),l)};return r[F]=!0,r[I]=n,r},D=i({_p:s,$id:e,$onAction:se.bind(null,v),$patch:C,$reset:w,$subscribe(t,n={}){let r=se(_,t,n.detached,()=>i()),i=p.run(()=>c(()=>s.state.value[e],r=>{(n.flush===`sync`?g:h)&&t({storeId:e,type:T.direct,events:void 0},r)},R({},m,n)));return r},$dispose:E});s._s.set(e,D);let O=(s._a&&s._a.runWithContext||ce)(()=>s._e.run(()=>(p=a()).run(()=>t({action:te}))));for(let t in O){let n=O[t];y(n)&&!de(n)||l(n)?d||(b&&ue(n)&&(y(n)?n.value=b[t]:L(n,b[t])),s.state.value[e][t]=n):typeof n==`function`&&(O[t]=te(n,t),ee.actions[t]=n)}return R(D,O),R(o(D),O),Object.defineProperty(D,`$state`,{get:()=>s.state.value[e],set:e=>{C(t=>{R(t,e)})}}),s._p.forEach(e=>{R(D,p.run(()=>e({store:D,app:s._a,pinia:s,options:ee})))}),b&&d&&r.hydrate&&r.hydrate(D.$state,b),h=!0,g=!0,D}function me(e,t,n){let r,i=typeof t==`function`;r=i?n:t;function a(n,a){let o=v();return n||=o?d(C,null):null,n&&S(n),n=x,n._s.has(e)||(i?pe(e,t,r,n):fe(e,r,n)),n._s.get(e)}return a.$id=e,a}var z=typeof document<`u`;function he(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function ge(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&he(e.default)}var B=Object.assign;function _e(e,t){let n={};for(let r in t){let i=t[r];n[r]=H(i)?i.map(e):e(i)}return n}var V=()=>{},H=Array.isArray;function ve(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var U=function(e){return e[e.MATCHER_NOT_FOUND=1]=`MATCHER_NOT_FOUND`,e[e.NAVIGATION_GUARD_REDIRECT=2]=`NAVIGATION_GUARD_REDIRECT`,e[e.NAVIGATION_ABORTED=4]=`NAVIGATION_ABORTED`,e[e.NAVIGATION_CANCELLED=8]=`NAVIGATION_CANCELLED`,e[e.NAVIGATION_DUPLICATED=16]=`NAVIGATION_DUPLICATED`,e}({}),ye=Symbol(``);U.MATCHER_NOT_FOUND,U.NAVIGATION_GUARD_REDIRECT,U.NAVIGATION_ABORTED,U.NAVIGATION_CANCELLED,U.NAVIGATION_DUPLICATED;function W(e,t){return B(Error(),{type:e,[ye]:!0},t)}function G(e,t){return e instanceof Error&&ye in e&&(t==null||!!(e.type&t))}var be=Symbol(``),xe=Symbol(``),Se=Symbol(``),Ce=Symbol(``),we=Symbol(``);function Te(){return d(Se)}function Ee(e){return d(Ce)}var De=/#/g,Oe=/&/g,ke=/\//g,Ae=/=/g,je=/\?/g,Me=/\+/g,Ne=/%5B/g,Pe=/%5D/g,Fe=/%5E/g,Ie=/%60/g,Le=/%7B/g,Re=/%7C/g,ze=/%7D/g,Be=/%20/g;function Ve(e){return e==null?``:encodeURI(``+e).replace(Re,`|`).replace(Ne,`[`).replace(Pe,`]`)}function He(e){return Ve(e).replace(Le,`{`).replace(ze,`}`).replace(Fe,`^`)}function Ue(e){return Ve(e).replace(Me,`%2B`).replace(Be,`+`).replace(De,`%23`).replace(Oe,`%26`).replace(Ie,"`").replace(Le,`{`).replace(ze,`}`).replace(Fe,`^`)}function We(e){return Ue(e).replace(Ae,`%3D`)}function Ge(e){return Ve(e).replace(De,`%23`).replace(je,`%3F`)}function Ke(e){return Ge(e).replace(ke,`%2F`)}function K(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var qe=/\/$/,Je=e=>e.replace(qe,``);function Ye(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=nt(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:K(o)}}function Xe(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Ze(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Qe(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&q(t.matched[r],n.matched[i])&&$e(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function q(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function $e(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!et(e[n],t[n]))return!1;return!0}function et(e,t){return H(e)?tt(e,t):H(t)?tt(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function tt(e,t){return H(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function nt(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o<r.length;o++)if(s=r[o],s!==`.`)if(s===`..`)a>1&&a--;else break;return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var J={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0},rt=function(e){return e.pop=`pop`,e.push=`push`,e}({}),it=function(e){return e.back=`back`,e.forward=`forward`,e.unknown=``,e}({});function at(e){if(!e)if(z){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^\/]+/,``)}else e=`/`;return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Je(e)}var ot=/^[^#]+#/;function st(e,t){return e.replace(ot,`#`)+t}function ct(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var lt=()=>({left:window.scrollX,top:window.scrollY});function ut(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=ct(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function dt(e,t){return(history.state?history.state.position-t:-1)+e}var ft=new Map;function pt(e,t){ft.set(e,t)}function mt(e){let t=ft.get(e);return ft.delete(e),t}function ht(e){return typeof e==`string`||e&&typeof e==`object`}function gt(e){return typeof e==`string`||typeof e==`symbol`}function _t(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;e<n.length;++e){let r=n[e].replace(Me,` `),i=r.indexOf(`=`),a=K(i<0?r:r.slice(0,i)),o=i<0?null:K(r.slice(i+1));if(a in t){let e=t[a];H(e)||(e=t[a]=[e]),e.push(o)}else t[a]=o}return t}function vt(e){let t=``;for(let n in e){let r=e[n];if(n=We(n),r==null){r!==void 0&&(t+=(t.length?`&`:``)+n);continue}(H(r)?r.map(e=>e&&Ue(e)):[r&&Ue(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function yt(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=H(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function Y(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function X(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(W(U.NAVIGATION_ABORTED,{from:n,to:t})):e instanceof Error?c(e):ht(e)?c(W(U.NAVIGATION_GUARD_REDIRECT,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function bt(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e]))if(he(s)){let c=(s.__vccOpts||s)[t];c&&a.push(X(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=ge(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&X(c,n,r,o,e,i)()}))}}return a}function xt(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;o<a;o++){let a=t.matched[o];a&&(e.matched.find(e=>q(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>q(e,s))||i.push(s))}return[n,r,i]}var St=()=>location.protocol+`//`+location.host;function Ct(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Ze(n,``)}return Ze(n,e)+r+i}function wt(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=Ct(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:rt.pop,direction:u?u>0?it.forward:it.back:it.unknown})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(B({},e.state,{scroll:lt()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function Tt(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?lt():null}}function Et(e){let{history:t,location:n}=window,r={value:Ct(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:St()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,B({},t.state,Tt(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=B({},i.value,t.state,{forward:e,scroll:lt()});a(o.current,o,!0),a(e,B({},Tt(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function Dt(e){e=at(e);let t=Et(e),n=wt(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=B({location:``,base:e,go:r,createHref:st.bind(null,e)},t,n);return Object.defineProperty(i,`location`,{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,`state`,{enumerable:!0,get:()=>t.state.value}),i}var Z=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.Group=2]=`Group`,e}({}),Q=function(e){return e[e.Static=0]=`Static`,e[e.Param=1]=`Param`,e[e.ParamRegExp=2]=`ParamRegExp`,e[e.ParamRegExpEnd=3]=`ParamRegExpEnd`,e[e.EscapeNext=4]=`EscapeNext`,e}(Q||{}),Ot={type:Z.Static,value:``},kt=/[a-zA-Z0-9_]/;function At(e){if(!e)return[[]];if(e===`/`)return[[Ot]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=Q.Static,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===Q.Static?a.push({type:Z.Static,value:l}):n===Q.Param||n===Q.ParamRegExp||n===Q.ParamRegExpEnd?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:Z.Param,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;s<e.length;){if(c=e[s++],c===`\\`&&n!==Q.ParamRegExp){r=n,n=Q.EscapeNext;continue}switch(n){case Q.Static:c===`/`?(l&&d(),o()):c===`:`?(d(),n=Q.Param):f();break;case Q.EscapeNext:f(),n=r;break;case Q.Param:c===`(`?n=Q.ParamRegExp:kt.test(c)?f():(d(),n=Q.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--);break;case Q.ParamRegExp:c===`)`?u[u.length-1]==`\\`?u=u.slice(0,-1)+c:n=Q.ParamRegExpEnd:u+=c;break;case Q.ParamRegExpEnd:d(),n=Q.Static,c!==`*`&&c!==`?`&&c!==`+`&&s--,u=``;break;default:t(`Unknown state`);break}}return n===Q.ParamRegExp&&t(`Unfinished custom RegExp for param "${l}"`),d(),o(),i}var jt=`[^/]+?`,Mt={sensitive:!1,strict:!1,start:!0,end:!0},$=function(e){return e[e._multiplier=10]=`_multiplier`,e[e.Root=90]=`Root`,e[e.Segment=40]=`Segment`,e[e.SubSegment=30]=`SubSegment`,e[e.Static=40]=`Static`,e[e.Dynamic=20]=`Dynamic`,e[e.BonusCustomRegExp=10]=`BonusCustomRegExp`,e[e.BonusWildcard=-50]=`BonusWildcard`,e[e.BonusRepeatable=-20]=`BonusRepeatable`,e[e.BonusOptional=-8]=`BonusOptional`,e[e.BonusStrict=.7000000000000001]=`BonusStrict`,e[e.BonusCaseSensitive=.25]=`BonusCaseSensitive`,e}($||{}),Nt=/[.+*?^${}()[\]/\\]/g;function Pt(e,t){let n=B({},Mt,t),r=[],i=n.start?`^`:``,a=[];for(let t of e){let e=t.length?[]:[$.Root];n.strict&&!t.length&&(i+=`/`);for(let r=0;r<t.length;r++){let o=t[r],s=$.Segment+(n.sensitive?$.BonusCaseSensitive:0);if(o.type===Z.Static)r||(i+=`/`),i+=o.value.replace(Nt,`\\$&`),s+=$.Static;else if(o.type===Z.Param){let{value:e,repeatable:n,optional:c,regexp:l}=o;a.push({name:e,repeatable:n,optional:c});let u=l||jt;if(u!==jt){s+=$.BonusCustomRegExp;try{RegExp(`(${u})`)}catch(t){throw Error(`Invalid custom RegExp for param "${e}" (${u}): `+t.message)}}let d=n?`((?:${u})(?:/(?:${u}))*)`:`(${u})`;r||(d=c&&t.length<2?`(?:/${d})`:`/`+d),c&&(d+=`?`),i+=d,s+=$.Dynamic,c&&(s+=$.BonusOptional),n&&(s+=$.BonusRepeatable),u===`.*`&&(s+=$.BonusWildcard)}e.push(s)}r.push(e)}if(n.strict&&n.end){let e=r.length-1;r[e][r[e].length-1]+=$.BonusStrict}n.strict||(i+=`/?`),n.end?i+=`$`:n.strict&&!i.endsWith(`/`)&&(i+=`(?:/|$)`);let o=new RegExp(i,n.sensitive?``:`i`);function s(e){let t=e.match(o),n={};if(!t)return null;for(let e=1;e<t.length;e++){let r=t[e]||``,i=a[e-1];n[i.name]=r&&i.repeatable?r.split(`/`):r}return n}function c(t){let n=``,r=!1;for(let i of e){(!r||!n.endsWith(`/`))&&(n+=`/`),r=!1;for(let e of i)if(e.type===Z.Static)n+=e.value;else if(e.type===Z.Param){let{value:a,repeatable:o,optional:s}=e,c=a in t?t[a]:``;if(H(c)&&!o)throw Error(`Provided param "${a}" is an array but it is not repeatable (* or + modifiers)`);let l=H(c)?c.join(`/`):c;if(!l)if(s)i.length<2&&(n.endsWith(`/`)?n=n.slice(0,-1):r=!0);else throw Error(`Missing required param "${a}"`);n+=l}}return n||`/`}return{re:o,score:r,keys:a,parse:s,stringify:c}}function Ft(e,t){let n=0;for(;n<e.length&&n<t.length;){let r=t[n]-e[n];if(r)return r;n++}return e.length<t.length?e.length===1&&e[0]===$.Static+$.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===$.Static+$.Segment?1:-1:0}function It(e,t){let n=0,r=e.score,i=t.score;for(;n<r.length&&n<i.length;){let e=Ft(r[n],i[n]);if(e)return e;n++}if(Math.abs(i.length-r.length)===1){if(Lt(r))return 1;if(Lt(i))return-1}return i.length-r.length}function Lt(e){let t=e[e.length-1];return e.length>0&&t[t.length-1]<0}var Rt={strict:!1,end:!0,sensitive:!1};function zt(e,t,n){let r=B(Pt(At(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Bt(e,t){let n=[],r=new Map;t=ve(Rt,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=Ht(e);s.aliasOf=r&&r.record;let l=ve(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(Ht(B({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=zt(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!Wt(d)&&o(e.name)),Jt(d)&&c(d),s.children){let e=s.children;for(let t=0;t<e.length;t++)a(e[t],d,r&&r.children[t])}r||=d}return f?()=>{o(f)}:V}function o(e){if(gt(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Kt(e,n);n.splice(t,0,e),e.record.name&&!Wt(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw W(U.MATCHER_NOT_FOUND,{location:e});s=i.record.name,a=B(Vt(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Vt(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name);else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw W(U.MATCHER_NOT_FOUND,{location:e,currentLocation:t});s=i.record.name,a=B({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Gt(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Vt(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function Ht(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ut(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,`mods`,{value:{}}),t}function Ut(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function Wt(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Gt(e){return e.reduce((e,t)=>B(e,t.meta),{})}function Kt(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;It(e,t[i])<0?r=i:n=i+1}let i=qt(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function qt(e){let t=e;for(;t=t.parent;)if(Jt(t)&&It(e,t)===0)return t}function Jt({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Yt(e){let t=d(Se),n=d(Ce),r=h(()=>{let n=m(e.to);return t.resolve(n)}),i=h(()=>{let{matched:e}=r.value,{length:t}=e,i=e[t-1],a=n.matched;if(!i||!a.length)return-1;let o=a.findIndex(q.bind(null,i));if(o>-1)return o;let s=en(e[t-2]);return t>1&&en(i)===s&&a[a.length-1].path!==s?a.findIndex(q.bind(null,e[t-2])):o}),a=h(()=>i.value>-1&&$t(n.params,r.value.params)),o=h(()=>i.value>-1&&i.value===n.matched.length-1&&$e(n.params,r.value.params));function s(n={}){if(Qt(n)){let n=t[m(e.replace)?`replace`:`push`](m(e.to)).catch(V);return e.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>n),n}return Promise.resolve()}return{route:r,href:h(()=>r.value.href),isActive:a,isExactActive:o,navigate:s}}function Xt(e){return e.length===1?e[0]:e}var Zt=u({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:Yt,setup(e,{slots:n}){let r=i(Yt(e)),{options:a}=d(Se),o=h(()=>({[tn(e.activeClass,a.linkActiveClass,`router-link-active`)]:r.isActive,[tn(e.exactActiveClass,a.linkExactActiveClass,`router-link-exact-active`)]:r.isExactActive}));return()=>{let i=n.default&&Xt(n.default(r));return e.custom?i:t(`a`,{"aria-current":r.isExactActive?e.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:o.value},i)}}});function Qt(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function $t(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!H(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function en(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var tn=(e,t,n)=>e??t??n,nn=u({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(e,{attrs:n,slots:r}){let i=d(we),a=h(()=>e.route||i.value),o=d(xe,0),s=h(()=>{let e=m(o),{matched:t}=a.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),l=h(()=>a.value.matched[s.value]);g(xe,h(()=>s.value+1)),g(be,l),g(we,a);let u=f();return c(()=>[u.value,l.value,e.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!q(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let i=a.value,o=e.name,s=l.value,c=s&&s.components[o];if(!c)return rn(r.default,{Component:c,route:i});let d=s.props[o],f=t(c,B({},d?d===!0?i.params:typeof d==`function`?d(i):d:null,n,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[o]=null)},ref:u}));return rn(r.default,{Component:f,route:i})||f}}});function rn(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var an=nn;function on(e){let t=Bt(e.routes,e),i=e.parseQuery||_t,a=e.stringifyQuery||vt,o=e.history,s=Y(),c=Y(),l=Y(),u=r(J),d=J;z&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let f=_e.bind(null,e=>``+e),p=_e.bind(null,Ke),h=_e.bind(null,K);function g(e,n){let r,i;return gt(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function _(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function v(){return t.getRoutes().map(e=>e.record)}function y(e){return!!t.getRecordMatcher(e)}function b(e,n){if(n=B({},n||u.value),typeof e==`string`){let r=Ye(i,e,n.path),a=t.resolve({path:r.path},n),s=o.createHref(r.fullPath);return B(r,a,{params:h(a.params),hash:K(r.hash),redirectedFrom:void 0,href:s})}let r;if(e.path!=null)r=B({},e,{path:Ye(i,e.path,n.path).path});else{let t=B({},e.params);for(let e in t)t[e]??delete t[e];r=B({},e,{params:p(t)}),n.params=p(n.params)}let s=t.resolve(r,n),c=e.hash||``;s.params=f(h(s.params));let l=Xe(a,B({},e,{hash:He(c),path:s.path})),d=o.createHref(l);return B({fullPath:l,hash:c,query:a===vt?yt(e.query):e.query||{}},s,{redirectedFrom:void 0,href:d})}function x(e){return typeof e==`string`?Ye(i,e,u.value.path):B({},e)}function S(e,t){if(d!==e)return W(U.NAVIGATION_CANCELLED,{from:t,to:e})}function C(e){return E(e)}function w(e){return C(B(x(e),{replace:!0}))}function T(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=x(i):{path:i},i.params={}),B({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function E(e,t){let n=d=b(e),r=u.value,i=e.state,o=e.force,s=e.replace===!0,c=T(n,r);if(c)return E(B(x(c),{state:typeof c==`object`?B({},i,c.state):i,force:o,replace:s}),t||n);let l=n;l.redirectedFrom=t;let f;return!o&&Qe(a,r,n)&&(f=W(U.NAVIGATION_DUPLICATED,{to:l,from:r}),se(r,r,!0,!1)),(f?Promise.resolve(f):O(l,r)).catch(e=>G(e)?G(e,U.NAVIGATION_GUARD_REDIRECT)?e:N(e):ae(e,l,r)).then(e=>{if(e){if(G(e,U.NAVIGATION_GUARD_REDIRECT))return E(B({replace:s},x(e.to),{state:typeof e.to==`object`?B({},i,e.to.state):i,force:o}),t||l)}else e=A(l,r,!0,s,i);return k(l,r,e),e})}function te(e,t){let n=S(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){let t=F.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function O(e,t){let n,[r,i,a]=xt(e,t);n=bt(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(X(r,e,t))});let o=te.bind(null,e,t);return n.push(o),L(n).then(()=>{n=[];for(let r of s.list())n.push(X(r,e,t));return n.push(o),L(n)}).then(()=>{n=bt(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(X(r,e,t))});return n.push(o),L(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter)if(H(r.beforeEnter))for(let i of r.beforeEnter)n.push(X(i,e,t));else n.push(X(r.beforeEnter,e,t));return n.push(o),L(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=bt(a,`beforeRouteEnter`,e,t,D),n.push(o),L(n))).then(()=>{n=[];for(let r of c.list())n.push(X(r,e,t));return n.push(o),L(n)}).catch(e=>G(e,U.NAVIGATION_CANCELLED)?e:Promise.reject(e))}function k(e,t,n){l.list().forEach(r=>D(()=>r(e,t,n)))}function A(e,t,n,r,i){let a=S(e,t);if(a)return a;let s=t===J,c=z?history.state:{};n&&(r||s?o.replace(e.fullPath,B({scroll:s&&c&&c.scroll},i)):o.push(e.fullPath,i)),u.value=e,se(e,t,n,s),N()}let j;function ne(){j||=o.listen((e,t,n)=>{if(!I.listening)return;let r=b(e),i=T(r,I.currentRoute.value);if(i){E(B(i,{replace:!0,force:!0}),r).catch(V);return}d=r;let a=u.value;z&&pt(dt(a.fullPath,n.delta),lt()),O(r,a).catch(e=>G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_CANCELLED)?e:G(e,U.NAVIGATION_GUARD_REDIRECT)?(E(B(x(e.to),{force:!0}),r).then(e=>{G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&!n.delta&&n.type===rt.pop&&o.go(-1,!1)}).catch(V),Promise.reject()):(n.delta&&o.go(-n.delta,!1),ae(e,r,a))).then(e=>{e||=A(r,a,!1),e&&(n.delta&&!G(e,U.NAVIGATION_CANCELLED)?o.go(-n.delta,!1):n.type===rt.pop&&G(e,U.NAVIGATION_ABORTED|U.NAVIGATION_DUPLICATED)&&o.go(-1,!1)),k(r,a,e)}).catch(V)})}let re=Y(),ie=Y(),M;function ae(e,t,n){N(e);let r=ie.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function oe(){return M&&u.value!==J?Promise.resolve():new Promise((e,t)=>{re.add([e,t])})}function N(e){return M||(M=!e,ne(),re.list().forEach(([t,n])=>e?n(e):t()),re.reset()),e}function se(t,r,i,a){let{scrollBehavior:o}=e;if(!z||!o)return Promise.resolve();let s=!i&&mt(dt(t.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return n().then(()=>o(t,r,s)).then(e=>e&&ut(e)).catch(e=>ae(e,t,r))}let P=e=>o.go(e),ce,F=new Set,I={currentRoute:u,listening:!0,addRoute:g,removeRoute:_,clearRoutes:t.clearRoutes,hasRoute:y,getRoutes:v,resolve:b,options:e,push:C,replace:w,go:P,back:()=>P(-1),forward:()=>P(1),beforeEach:s.add,beforeResolve:c.add,afterEach:l.add,onError:ie.add,isReady:oe,install(e){e.component(`RouterLink`,Zt),e.component(`RouterView`,an),e.config.globalProperties.$router=I,Object.defineProperty(e.config.globalProperties,`$route`,{enumerable:!0,get:()=>m(u)}),z&&!ce&&u.value===J&&(ce=!0,C(o.location).catch(e=>{}));let t={};for(let e in J)Object.defineProperty(t,e,{get:()=>u.value[e],enumerable:!0});e.provide(Se,I),e.provide(Ce,ee(t)),e.provide(we,u);let n=e.unmount;F.add(e),e.unmount=function(){F.delete(e),F.size<1&&(d=J,j&&j(),j=null,u.value=J,ce=!1,M=!1),n()}}};function L(e){return e.reduce((e,t)=>e.then(()=>D(t)),Promise.resolve())}return I}export{oe as a,Te as i,Dt as n,me as o,Ee as r,on as t};
|